Skip to main content

Module hooks

Module hooks 

Source
Expand description

Hooks module: PostToolUse hook handler for passive capture from AI coding assistants.

Parses PostToolUse JSON payloads from stdin, extracts relevant information based on tool type, and creates appropriate memories with auto-tagging.

Modules§

diff
Diff computation and semantic summarization for code edits.

Structs§

AutoInsight
An auto-insight generated by trigger-based analysis during PostToolUse.
ExtractedMemory
Extracted memory from a hook payload.
HookPayload
PostToolUse hook payload from an AI coding assistant.
PendingEdge
A pending edge to be created once both nodes exist.

Functions§

check_triggers
Check trigger conditions against session activity and return any auto-insights.
content_hash
Content hash for deduplication.
extract
Extract memory from a hook payload.
materialize_edges
Resolve pending edges into concrete Edge values, given the memory ID that was just stored and the set of existing graph-node IDs.
parse_payload
Parse a hook payload from JSON string.
resolve_edges
Populate graph_edges on an ExtractedMemory by checking which file graph nodes already exist in the database. This creates edges between files that were previously Read and are now being Edited or Written, capturing the common explore-then-modify workflow.