MCPcopy Create free account
hub / github.com/LLMQuant/quant-mind / _collect_hooks

Function _collect_hooks

quantmind/flows/_runner.py:62–72  ·  view source on GitHub ↗

Return hooks in run order: memory hooks first (PR6), then extras.

(
    memory: object | None,
    extras: list[RunHooks[Any]],
)

Source from the content-addressed store, hash-verified

60
61
62def _collect_hooks(
63 memory: object | None,
64 extras: list[RunHooks[Any]],
65) -> list[RunHooks[Any]]:
66 """Return hooks in run order: memory hooks first (PR6), then extras."""
67 hooks: list[RunHooks[Any]] = []
68 # PR6 will append `memory.run_hooks()` here when `memory` exposes the
69 # `Memory` Protocol. PR5 keeps `memory` opaque and contributes no hooks.
70 del memory
71 hooks.extend(extras)
72 return hooks
73
74
75def _compose_hooks(

Calls

no outgoing calls