Skip to main content

Module types

Module types 

Source
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
ReasoningLevel has 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).
AttachSnapshot
ClientId
Minted by the actor per Attach.
ClientMeta
ContinueInfoWire
Serializable copy of engine::setup::ContinueInfo.
ConversationSnapshot
Serializable mirror of ConversationState (+ the actor’s auto-turn counter). Clients MUST replace, never merge, on Conversation(_).
ConversationTokens
Envelope
Per-session, gapless seq assigned at the single emit site (SessionActor::emit); ts from the host clock.
MessagesHashMemo
Memo of wire::messages_hash(api_messages) shared by every clone of one snapshot: the daemon converts a Conversation to its wire digest once per socket client, and hashing serialises the whole history — now once per event, not once per client. Keyed on the history’s length and last message identity (histories only grow), so a snapshot whose messages are replaced afterwards recomputes instead of reusing a stale hash.
PromptRequest
ReasoningClampWire
SessionConfig
Everything EngineHost::create_session needs. Serializable: it is the payload of the wire Attach::Create. Mirrors EngineOpts minus the host-level fields (profile, no_extensions), plus the per-session facts a daemon cannot inherit from its own process (cwd, env overlay).
SessionHeader
Session minus api_messages and accounting: what a client mirrors.
SessionId
Conversation session id — the Session.id string ({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).
SessionMeta
SessionReloadRecord
What Checkpoint{Reload} reports so daemon reload can 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.
SettingApplied

Enums§

AttachMode
Attach mode. Ownership (B1): Mirror owns input iff nobody does, Takeover steals it, Observe never owns it.
AttachState
Actor-side client accounting (§8): Detached never cancels a stream.
CheckpointReason
Why a Checkpoint was requested.
ClientKind
CompactionPolicyWire
Serializable mirror of runtime::compaction::CompactionPolicy.
EndReason
HistoryMode
What a client wants in Attached / Conversation: the full api_messages mirror (Full, the 741b6b60 behaviour) or only the digest + a daemon-side display tail (Digest, phase 4).
HostEvent
Host-originated events pushed into a session (C3 router, loader).
OwnerChangeReason
PromptKind
SessionCommand
The entire client→session control surface (SEAMS §5.2/§5.3).
SessionEventWire
What a session tells its clients. Stream carries the un-serialised StreamEvent in-process (LocalTransport) — that IS the byte-identical contract. The socket boundary converts to wire::WireSessionEvent.
SessionLifecycle
Where a session is in its park/unpark life (SessionHandle::lifecycle).
SessionQuery
SessionSetting
The &mut Runtime setters the TUI/rpc/server call (SEAMS §5.3).
TurnTrigger

Constants§

CONFIRM_ACTIVATION_PROMPT_TITLE
Fixed title confirm_activation_with_host uses for the activate_tools y/yes gate (tools/discovery.rs). Everything not in the confirm set is Secret (masked input).
CONFIRM_PROMPT_TITLE
Fixed title resolve_before_tool_call_result uses 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 SessionEnv from the current process environment, stripping client-only prefixes and secrets. Returns (kept_env, stripped_secret_names). The stripped names are ONLY the secrets (not SYNAPS_* prefixes, those are noise). Used by thin clients before Hello.
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: filter vars (unit-testable without touching the process environment).
tail_items_from_env
SYNAPS_ATTACH_TAIL_ITEMS (client side): display items requested in Attached.display_tail; DEFAULT_TAIL_ITEMS when unset/invalid.

Type Aliases§

SessionEnv
Ordered key-value snapshot of a client’s environment.