INDEX 11 / 14
Thirteen tools
A tool call's output becomes part of the model's context, and every one of these handles exists to decide what of it the model keeps.
Each is a thin relay into the Rust dylib: the plugin registers each tool from the dylib's schema list, and every call dispatches through aphrodite_hermes_dispatch_tool, returning the JSON result verbatim.
It is the reason all handlers share one session store: content compressed by a hook or by aphrodite_compress stays resolvable by aphrodite_retrieve for the life of the session.
01 // REGISTRY // 13 ENTRIES
Every handle, one relay
Each row is one registered handle: the identifier the agent types, the side of the session store it moves, the arguments its schema declares, and the sentence the schema gives it. The door chip's colour is the family and not a rank - teal reads, canary writes, and bone is the engine tuning itself.
| # | Handle | Door | Args | What the model reads |
|---|---|---|---|---|
| 01 | aphrodite_retrieve | Pull | 3 args | Expand a CCR marker, or read a file, to full content. |
| 02 | aphrodite_compress | Store | 3 args | Store content in CCR and get a marker back. |
| 03 | aphrodite_stats | Status | No args | Session and proxy health counters for the CCR engine. |
| 04 | aphrodite_rebuild | Status | No args | Report dylib version and proxy health. Reports state; it never rebuilds anything, whatever the name suggests. |
| 05 | aphrodite_files | Status | No args | List file paths touched this session. |
| 06 | aphrodite_diff | Status | No args | Per-turn history of what was compressed. |
| 07 | aphrodite_search | Find | 2 args | Find already-compressed entries by keyword or type. |
| 08 | aphrodite_directive | Tune | 2 args | Inspect or change the active behavioral directives. |
| 09 | aphrodite_test | Test | 1 args | Smoke-test the compress and retrieve round trip. |
| 10 | aphrodite_catalog | Status | 1 args | List every CCR entry recorded this session. |
| 11 | aphrodite_reclassify | Re-type | 1 args | Re-detect type and preview for stored entries. |
| 12 | aphrodite_prefetch | Preload | 1 args | Read files now and store them as CCR markers. |
| 13 | aphrodite_prefetch_status | Status | No args | List prefetched files that are resolvable now. Live prefetch schedule - what is loaded and ready, not what was once asked for. |
THERE IS AN INTERNAL 14TH REGISTRY ENTRY, context_engine_pre_llm - THE CONTEXT ENGINE'S OWN PRE-LLM HOOK, NOT A TOOL AN AGENT CALLS DIRECTLY. aphrodite_debug is compiled in under debug_assertions only: a real schema, not a registered tool, so it is named rather than counted.
02 // CONTRACT // THE MARKER
THE MARKER
| Payload | MARKER | PREVIEW |
|---|---|---|
<<< CCR: a1b2c3d4... |build|4247 >>> | [build:4E 1W 124L | error[E0432]: unresolved import `crate::store::SessionStore`] | |
<<< CCR: e5f6a7b8... |terminal|1036 >>> | [terminal:14L exit code: 0] |
A marker and its preview are two views of one payload, so both are computed from the same bytes: the hash addresses the stored output, the type is the classifier's verdict, and the size is the UTF-8 byte count of the bytes behind the hash - which is what a retrieval of that marker puts back into the transcript, not an estimate of it. The preview beside each one comes from the engine's own builders, so its tallies are the payload's own: the build-log sample counts four error lines, one warning line and every line it printed, and the test run reports the exit code of the last line it printed.
Both payloads clear their gate before either becomes a marker - 4,096 characters for a tool result, 1,024 for terminal output - because below the gate the engine passes the bytes through raw and no marker exists at all. Every figure here is the payload's own length rather than a typed number, so a change to the output moves the preview, the tallies and the size together.
- BLAKE3 hash - pattern
^^[0-9a-fA-F]{8,64}$; truncated hashes never resolve, exact match only. - Byte-exact round-trip -
aphrodite_retrievereturns the original bytes, nested markers expanded recursively. - Workspace-confined reads -
pathreads are capped at 10 MiB and refuse paths outside the workspace. - Markers don't survive a session restart - the dylib is loaded once per process, so a new session starts a fresh store.
03 // SCHEMAS // EVERY ARGUMENT
SCHEMAS // EVERY TOOL
Each panel is the schema the agent is handed: the description it reads, then every argument with its type and its own sentence. None of it is retyped - the schema is rendered straight from schemas.rs, so an argument added to a tool appears without an edit.
aphrodite_retrieve
Pull 3 argsExpand a CCR marker, or read a file, to full content. Supply `hash` to resolve a marker recorded this session (nested markers are expanded recursively), or `path` to read a file straight from disk. Give one or the other - if both are present `path` wins. `path` reads are confined to the current workspace and capped at 10 MiB, so paths outside it are refused. `query` narrows the result to matching lines, which is the cheap way to poke at a large entry without pulling all of it into context. Returns {found: true, source: "ccr"|"path", hash|path, content} on success, {found: false, error} when the hash is unknown or the read is refused.
Give hash or path - if both are present, path wins.
The query parameter is the cheap way to poke at a large entry without pulling all of it into context.
aphrodite_compress
Store 3 argsStore content in CCR and get a marker back. Hashes the content, classifies it (or trusts the `type` hint), keeps it in the session store, and hands back a resolvable `<<<CCR:hash|type|size>>>` marker - park bulky text here instead of carrying it in context, then pull it back with aphrodite_retrieve when you actually need it. Storage is in-process and sub-millisecond; markers stay resolvable for the life of the session but do not survive a process restart. Returns {hash, type, size, preview, marker}.
Hashes the content, classifies it (or trusts the type hint), keeps it in the session store, and hands back a resolvable marker - park bulky text here instead of carrying it in context.
aphrodite_stats
Status No argsSession and proxy health counters for the CCR engine. One call covers both halves of the system: session state held by the dylib, and a live TCP poll of the two proxy ports. Takes no arguments. Returns {version, engine, inline_entries, markers, referenced_files, archived_turns, turn, engine_enabled, threshold_pct, tool_threshold, terminal_threshold, proxies: {token: {port, alive}, cache: {port, alive}}}. `alive: false` means nothing answered on that port within 400ms - the plugin still works, it just is not proxying.
aphrodite_rebuild
Status No argsReport dylib version and proxy health. It does not rebuild or install anything - the loaded dylib cannot safely replace itself mid-session - it reports the state an operator needs plus the command to run outside the session. Takes no arguments. Returns {status: "ok", version, proxies, hint}.
aphrodite_files
Status No argsList file paths touched this session. Populated as tool hooks observe reads, writes and prefetches, so it doubles as a record of what has already been looked at. Takes no arguments. Returns {total, files: [{path, tool}]} where `tool` is the tool that first referenced the path.
aphrodite_diff
Status No argsPer-turn history of what was compressed. Walks the archived conversation index in turn order, one entry per turn that produced a compression. Takes no arguments. Returns {total, turns: [{turn, hash, summary, size}]}; each `hash` is resolvable through aphrodite_retrieve.
aphrodite_search
Find 2 argsFind already-compressed entries by keyword or type. Matches case-insensitively against each entry's preview line and its CCR type - it does NOT search the full stored bodies, so treat a miss as inconclusive and fall back to aphrodite_catalog. Newest first, capped at 20 results. Returns {query, total, results: [{hash, type, size, preview}]}.
aphrodite_directive
Tune 2 argsInspect or change the active behavioral directives. Directives are short instruction files injected into every turn through pre_llm_call - "focus" for terse, minimal-tool execution, "explore" for broad reading, "lazy" for defer-until-needed execution, and whatever else ships in directives/. `list` returns {available, active, ephemeral: [{name, inline, expires_after_turn}]}; `swap` replaces the whole active set with one directive and returns {swapped, active}; `add` appends to the set (silent if already active) and returns {active}; `load` activates a directive from the available set on demand and returns {loaded, active} (errors on an unknown name, unlike `add`); `remove` drops one and returns {active}; `reset` clears actives, ephemerals and the manual latch, handing control back to automatic selection. An unknown directive name returns {error} and changes nothing.
aphrodite_test
Test 1 argsSmoke-test the compress and retrieve round trip. Compresses built-in samples in-process and checks each one comes back byte-identical, then reports proxy health alongside. Use it to confirm the engine is actually wired up before trusting a marker. Returns {mode, status: "ok"|"fail", passed, total, checks: [{type, hash, roundtrip}], proxies}. `status` is "ok" only when every check round-tripped.
aphrodite_catalog
Status 1 argsList every CCR entry recorded this session. The complete inventory, newest first - unlike aphrodite_search it filters nothing, so this is the reliable way to find a marker you half-remember. Returns {mode, total, turn, items: [...]}, where each item is {hash, type, size, preview} in `toc` mode and additionally {turn, center} in `full` mode.
aphrodite_reclassify
Re-type 1 argsRe-detect type and preview for stored entries. Re-runs classification against content already in the store and rewrites the catalog entry in place, which repairs entries that were typed before a classifier improvement or stored with a wrong hint. Content and hashes are never modified, so existing markers keep resolving. Returns {status: "ok", reclassified: <count>}.
aphrodite_prefetch
Preload 1 argsRead files now and store them as CCR markers. Despite the name this is synchronous: every path is read and compressed before the call returns, so each returned hash is immediately resolvable through aphrodite_retrieve. Batch the files you expect to need next instead of reading them one at a time - one call, one marker per file, no file bodies in context. Oversized files are skipped rather than truncated. Returns {total, loaded, skipped_size, missing, inline_store_bytes, inline_store_byte_budget, results: [{path, status: "loaded"|"skipped"|"missing", hash, type, size, preview, reason}]}. Watch inline_store_bytes against its budget: a batch larger than the budget evicts older entries, including ones from the same batch.
aphrodite_prefetch_status
Status No argsList prefetched files that are resolvable now. Because prefetch is synchronous, `loading` and `errors` are always empty and anything tracked is already `ready` - this is an inventory of file-backed markers, not a progress bar. Takes no arguments. Returns {loading: [], ready: [{path, hash, type, size}], errors: [], total_ready}.
04 // RULE // META-TOOLS
Meta-tool output is auto-expanded
Output from meta-tools (like aphrodite_stats or aphrodite_catalog) is expanded inline, never compressed - the agent always sees its own engine's status in full.
Compressing the catalog would just be the engine hiding its own ledger.