Skip to main content

Module ontology

Module ontology 

Source
Expand description

The supercode ontology (docs/ONTOLOGY.md): the one model under the session spine and the orchestration world. Lower layers never import upper ones — this module depends on nothing above it except the session layer’s crate::session::OrchestrationNouns wire block, which a Binding projects onto.

Modules§

binding
The one conversation record (docs/ONTOLOGY.md §2.2): a conversation reached on a surface, routed to a profile, run by a worker, with a lifecycle. A Hermes sessions row, an OpenClaw session key and an orchestrator bindings row each decode to it ONCE, here; the discovery row’s nouns are its projection (Binding::nouns).
codec
The codec contract both pieces obey (docs/ONTOLOGY.md §2.5): every artifact a codec reads or writes names the Fidelity it reached and, only at Fidelity::Semantic, the loss it accepted. The session half is the crate::Session loaders and writers; the world half implements WorldCodec.
fidelity
Behavioral translation-fidelity measurement.
identity
Harness identity: the one list every registry, ledger and codec keys on.
residue
Retained residue: source fields the model does not interpret, kept verbatim and re-emitted on the diagonal. Distinct from the MEASURED loss of an export-and-reload (crate::FidelityResidue); this is what a codec keeps, that is what a measurement counts.
secret
Secret references. A credential is named, never held: the model carries WHERE a value lives (docs/ORCHESTRATOR-IR.md §1 rule 3), and a vault resolves it at the moment of use.
surface
The conversation-on-a-surface nouns (ORCH-3 / ORCH-6): where a conversation is reached, why it exists, which job it belongs to, where it moved. They are the vocabulary a crate::ontology::Binding is made of and the wire block every discovery row carries.

Structs§

ArtifactFidelity
What one artifact reached on the way in or out.
Binding
The conversation record.
CrossSurface
ORCH-3: a conversation moved to another surface (Hermes handoff_*).
FidelityMetric
Result of measuring one actual translation cell.
FidelityResidue
Measured residue of one actual export/reload cell.
Handoff
A conversation moved (or moving) to another surface — Hermes handoff_*.
HarnessId
Extensible identifier for a coding harness.
HermesSessionRow
One Hermes sessions row, the columns a binding is made of. Empty strings are read as absent by the decoder.
OrchestratorBindingRow
One row of an orchestrator profile’s bindings table, as read.
Recurrence
ORCH-3: the job a recurring session belongs to.
Residue
Unmodeled source fields, keyed by the source’s own field name.
SurfaceKey
ORCH-3: the conversation identity on a surface. Full tuple on a channel; degenerate (all None) on a terminal.
Worker
The worker session a binding points at.
WorkspaceRef
ORCH-6: the wire form of [SessionMeta::workspace] — a typed workspace carried on a discovered or loaded row. The D2 precedence that produces it lives in workspace() (ORCH-3’s contract); this only names the result.

Enums§

EndReason
Why a binding ended (docs/ORCHESTRATOR-IR.md §2.5).
Fidelity
How faithfully a reconstruction reproduces its source.
SecretRef
Where a secret value lives. Wire form: {"env": NAME} or {"dotenv": KEY}.
Trigger
ORCH-3: why a session exists (the trigger noun; docs/HERMES-IDEAL-SUPPORT-DESIGN.md §3).
WorkspaceKind
ORCH-3 / UNI-9: the typed workspace, derived — never stored.

Traits§

Vault
Resolves references at use; never part of a serialized model.
WorldCodec
A harness’s operational home compiled into a world value and back.

Functions§

core_messages
Canonical messages participating in cross-format fidelity scoring.
hermes_cron_job_id
Hermes cron fire session ids are minted as cron_<job_id>_<YYYYMMDD_HHMMSS> (cron/scheduler.py); recover the job id.
hermes_source_for_binding
The Hermes sessions.source word for a binding (inverse of hermes_trigger_for_source): a channel conversation’s source is its platform; the rest are the words Hermes’s own doors mint.
hermes_trigger_for_source
Hermes sessions.source → trigger. Cron fires are tagged cron; the CLI, TUI and ACP adapter are human surfaces; api_server is the HTTP API; webhook is inbound; every other value is a messaging platform.
measure_fidelity
Measure an export/reload cell without applying a regression floor.
messages_equal
Compare semantic message fields shared by the supported harnesses.
messages_equal_multimodal
Compare semantics plus multimodal parts and tool names.
parse_hermes_session_key
Parse a Hermes gateway session key (agent:<profile|main>:<platform>:<chat_type>[:<chat_id>][:<thread_id>][:<participant>]). Returns the surface and the profile namespace (None for main).
parse_openclaw_session_key
Parse an OpenClaw gateway session key. Shapes (docs/channels/channel-routing.md, docs/automation/cron-jobs.md, docs/cli/acp.md upstream): agent:<id>:main, agent:<id>:<channel>:<group|channel>:<cid>[:thread|topic:<tid>], cron:<jobId>, hook:<name>:<id>, acp-bridge:<uuid>.
render_hermes_session_key
Render a surface as Hermes’s build_session_key form, which parse_hermes_session_key reads back unchanged.
render_openclaw_session_key
Render an OpenClaw gateway session key for a binding under an agent (inverse of parse_openclaw_session_key): a cron fire is cron:<jobId>, a conversation is the agent shape.
replay_eligible
The replayable subsequence of a canonical transcript.
replay_excluded
Whether a source message was intentionally outside the replayable slice.