Expand description
aphrodite: core compression engine exposed as both an rlib (for the
aphrodite binary and the aphrodite-hermes bridge) and a C ABI cdylib.
The C ABI is agent-agnostic and handle-based: aphrodite_init allocates a
session handle, the aphrodite_* functions operate on it (classify,
compress, retrieve, transform, terminal, session_start, catalog, stats,
reload, config_get/set, search, dispatch, resolve, stage2, struct_extract),
and aphrodite_destroy frees it. The Hermes plugin uses the higher-level,
process-global aphrodite_hermes_* ABI in the aphrodite-hermes crate.
Re-exports§
pub use preview::build_preview;pub use preview::detect_type;
Modules§
- catalog
- Catalog generation - port of plugins/aphrodite/_hooks/catalog.py
- config
- CLI configuration for aphrodite.
- config_
loader - TOML config loader - port of plugins/aphrodite/_core/config.py
- directives
- Conversational Directives - lightweight behavioral context for the LLM.
- flow
- Flow-context assembler (report 05, P1) - the single choke point for ALL per-turn injected context.
- hooks
- Full hook implementations - expanded from plugins/aphrodite/_hooks/
- marker
- CCR marker generation - 1:1 port of plugins/aphrodite/_marker/marker.py
- poll_
worker - Poll-worker auto-backgrounding: intercept slow tool calls and replace
output with a “poll worker” CCR marker so the agent can check progress
asynchronously via
process(action='poll')instead of blocking on raw output. - prefetch
- Prefetch - background file loading into CCR. Port of plugins/aphrodite/_hooks/prefetch.py
- preview
- Preview builder: content-type detection and human-readable preview strings for compressed CCR content.
- proxy
- aphrodite - Reverse proxy with Chat Completions API support.
- resolve
- CCR marker resolution - port of plugins/aphrodite/_resolve.py
- retrieve
/retrieveendpoint - resolve CCR markers to original content.- session
- Session lifecycle - port of plugins/aphrodite/_hooks/session.py
- setup
- Bootstrap setup:
aphrodite setup- one-shot install aftercargo install aphrodite. - stage2
- Stage 2 compression - semantic reduction of CCR-stored content. Port of plugins/aphrodite/_stage2.py
- state
- Aphrodite internal state - mirrors plugins/aphrodite/_core/state.py All session-scoped state lives here: inline store, conv index, markers, counters.
- struct_
extract - Code structure extractor - regex-based pattern matching per language. Port of plugins/aphrodite/_core/struct.py
Functions§
- aphrodite_
call_ hook - Deprecated (report 01-T5): stateless, creates a throwaway AphroditeState
per call. Use
aphrodite_init+aphrodite_dispatch(stateful, handle-based) instead. This stub keeps the ABI symbol alive for any legacy consumer that hasn’t migrated yet. - aphrodite_
catalog - aphrodite_
classify - aphrodite_
compress - aphrodite_
config_ get - aphrodite_
config_ set - aphrodite_
destroy - aphrodite_
directive - aphrodite_
dispatch - Universal hook dispatcher. Python calls this for every hook handler. Returns JSON-wrapped result or raw string if content-only.
- aphrodite_
filter_ lines - Filter lines by query - port of _resolve.py _filter_lines
- aphrodite_
free_ string - aphrodite_
hooks - aphrodite_
init - aphrodite_
preview - Generate preview for content - port of _marker/preview.py
- aphrodite_
reload - aphrodite_
resolve - Resolve hash with full recursive expansion - port of _resolve.py
- aphrodite_
retrieve - aphrodite_
search - aphrodite_
session_ start - aphrodite_
stage2 - Stage 2 semantic reduction - port of _stage2.py
- aphrodite_
stats - aphrodite_
struct_ extract - Code structure extraction - port of _core/struct.py
- aphrodite_
terminal - aphrodite_
transform - aphrodite_
version