Expand description
Full hook implementations - expanded from plugins/aphrodite/_hooks/
transform_tool_result: content-aware compression with essential tool skip, file reference tracking, threshold gating, preview generation. transform_terminal_output: terminal-specific compression with exit code detection, threshold gating, streaming support.
Structs§
- Tool
Call Meta - Metadata Hermes already sends alongside a tool result (report 05, P2) - the
signals the bridge historically dropped on the floor (
status,error_type,error_message,args,duration_ms). Threaded throughtransform_tool_result_with_metainto thetool_eventstelemetry ring.
Functions§
- compute_
hash - Compute a CCR hash for content using BLAKE3 (40 hex chars).
- on_
session_ start - Session start hook - full reset.
- post_
llm_ call - Post-LLM call hook - archive turn.
- pre_
llm_ call - Pre-LLM call hook - inject catalog + active directives into context.
- transform_
terminal_ output - Transform terminal output - exit code aware.
- transform_
terminal_ output_ classified - Same as
transform_terminal_output, with the sameclassifycontract astransform_tool_result_classified. - transform_
terminal_ output_ with_ meta - Same as
transform_terminal_output_classified, plus the Hermes-suppliedcommandandreturncode(report 05, P2/T6/T8) recorded into thetool_eventstelemetry ring.returncode == 0(or absent) isok. - transform_
tool_ result - Transform tool output - full compression pipeline.
- transform_
tool_ result_ classified - Same as
transform_tool_result, but a caller that has already found the “real” payload underneath a wrapper the core classifier can’t see through (e.g. an agent-specific JSON envelope) may supply it viaclassifyas(content_to_classify, type). Core stays agnostic to what a wrapper looks like - it only ever hashes and stores the ORIGINALcontent, soaphrodite_retrievealways returns exactly what was passed in;classifyaffects only the reportedtypeand the generated preview. - transform_
tool_ result_ with_ meta - Same as
transform_tool_result_classified, plus the Hermes-supplied call metadata (report 05, P2/T6) that gets recorded into thetool_eventstelemetry ring. This is the entry point the Hermes bridge routes to so the error/args/duration signals Hermes ships on every call stop being dropped.