Expand description
Microscope Hooks - thin orchestration layer for LLM lifecycle events.
The model is only the motor. Hooks are the nervous system. Microscope Memory is the memory.
Six lifecycle hooks:
- on_session_start - load identity, project context, constraints
- before_prompt - inspect request, search memory, build context, inject contract
- before_tool_call - retrieve task memory, check constraints, add project context
- after_tool_call - summarize result, detect facts, prepare memory candidate
- after_response - extract durable memory, assign layer/importance, write if enabled
- on_error - store error trace, associate with task, expose recovery context
Structs§
Enums§
Traits§
Functions§
- build_
context_ package - default_
after_ response - default_
after_ tool_ call - default_
before_ prompt - default_
before_ tool_ call - default_
on_ error - default_
on_ session_ start