Expand description
Identity, configuration, commands, events and the envelope — the entire
client↔session contract (PLAN-phase2 §2.1–§2.4). Everything a client can
send is serde-able from day one; SessionEventWire::Stream deliberately
is not (it carries the un-serialised StreamEvent in-process).
Modules§
- reasoning_
level_ serde ReasoningLevelhas no serde impls in agent-core; go through its canonical string form.
Structs§
- Addressed
- A command with its origin.
from: None= host-originated (router, lifecycle, idle probe) and bypasses input ownership (B1). - Attach
Snapshot - Client
Id - Minted by the actor per Attach.
- Client
Meta - Continue
Info Wire - Serializable copy of
engine::setup::ContinueInfo. - Conversation
Snapshot - Serializable mirror of
ConversationState(+ the actor’s auto-turn counter). Clients MUST replace, never merge, onConversation(_). - Conversation
Tokens - Envelope
- Per-session, gapless
seqassigned at the single emit site (SessionActor::emit);tsfrom the host clock. - Prompt
Request - Reasoning
Clamp Wire - Session
Config - Everything
EngineHost::create_sessionneeds. Serializable: it is the payload of the wireAttach::Create. MirrorsEngineOptsminus the host-level fields (profile, no_extensions), plus the per-session facts a daemon cannot inherit from its own process (cwd, env overlay). - Session
Header Sessionminusapi_messagesand accounting: what a client mirrors.- Session
Id - Conversation session id — the
Session.idstring ({name}-{ts}-{pid}; see events/registry.rs sanitize rules). NOT the tools::activation::SessionId (that is the per-runtime gate identity minted at Runtime::from_parts). - Session
Meta - Session
Reload Record - What
Checkpoint{Reload}reports sodaemon reloadcan rebuild the session as it IS (not as it was created): the actor’s config, keep-warm pin, lifecycle, the non-persisted knobs (settings_replay, incl./system), and the CURRENT model/thinking. - Setting
Applied
Enums§
- Attach
Mode - Attach mode. Ownership (B1):
Mirrorowns input iff nobody does,Takeoversteals it,Observenever owns it. - Attach
State - Actor-side client accounting (§8):
Detachednever cancels a stream. - Checkpoint
Reason - Why a
Checkpointwas requested. - Client
Kind - Compaction
Policy Wire - Serializable mirror of
runtime::compaction::CompactionPolicy. - EndReason
- History
Mode - What a client wants in
Attached/Conversation: the fullapi_messagesmirror (Full, the 741b6b60 behaviour) or only the digest + a daemon-side display tail (Digest, phase 4). - Host
Event - Host-originated events pushed into a session (C3 router, loader).
- Owner
Change Reason - Prompt
Kind - Session
Command - The entire client→session control surface (SEAMS §5.2/§5.3).
- Session
Event Wire - What a session tells its clients.
Streamcarries the un-serialised StreamEvent in-process (LocalTransport) — that IS the byte-identical contract. The socket boundary converts towire::WireSessionEvent. - Session
Lifecycle - Where a session is in its park/unpark life (
SessionHandle::lifecycle). - Session
Query - Session
Setting - The
&mut Runtimesetters the TUI/rpc/server call (SEAMS §5.3). - Turn
Trigger
Constants§
- CONFIRM_
ACTIVATION_ PROMPT_ TITLE - Fixed title
confirm_activation_with_hostuses for theactivate_toolsy/yes gate (tools/discovery.rs). Everything not in the confirm set isSecret(masked input). - CONFIRM_
PROMPT_ TITLE - Fixed title
resolve_before_tool_call_resultuses for Confirm prompts (runtime/mod.rs). - DEFAULT_
TAIL_ ITEMS - Default for
ClientMeta.tail_items: matches the TUI’s resumed-display cap.
Functions§
- capture_
client_ env - Secret patterns (case-insensitive suffix/infix) stripped at the client.
Secrets never reach the daemon — the broker owns credentials.
Build a
SessionEnvfrom the current process environment, stripping client-only prefixes and secrets. Returns(kept_env, stripped_secret_names). The stripped names are ONLY the secrets (notSYNAPS_*prefixes, those are noise). Used by thin clients beforeHello. - is_
secret_ key - Whether a key matches the secret denylist (case-insensitive).
Delegates to the canonical implementation in
agent_core::core::config. - should_
strip_ env - Whether a key should be stripped from the client env snapshot.
- strip_
client_ env - The pure part of
capture_client_env: filtervars(unit-testable without touching the process environment). - tail_
items_ from_ env SYNAPS_ATTACH_TAIL_ITEMS(client side): display items requested inAttached.display_tail;DEFAULT_TAIL_ITEMSwhen unset/invalid.
Type Aliases§
- Session
Env - Ordered key-value snapshot of a client’s environment.