Skip to main content

Crate microscope_hooks

Crate microscope_hooks 

Source
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§

HookConfig
HookContext
HookManager
MemoryBlockRef
MemoryCandidate
WriteConfig

Enums§

HookError
HookEvent

Traits§

HookHandler

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

Type Aliases§

HookResult