Expand description
Application kit: DaemonSession, pool, TurnRunner, and helpers.
Structs§
- Chat
Event Result - Structured outcome of classifying one daemon event.
- Classifier
Config - Product-specific classifier knobs.
- Classifier
Config Error - Error constructing an
EventClassifier. - Compact
Image Options - Controls
compact_image_attachment. Zero fields use defaults. - Connection
Pool - Manages daemon connections, one active slot per session id.
- Daemon
Session - Dual-socket session: stream + lazy RPC sidecar.
- Daemon
Session Options - Options for constructing a DaemonSession.
- ErrPool
Exhausted - Returned when no idle pool slot is immediately available.
- ErrQuery
Busy - Returned when an app key already has an in-flight query.
- Event
Classifier - Maps decoded daemon events into deliverable, streaming, or failed outcomes.
- InMemory
Session Store - Process-local store.
- Input
Opts - Optional input knobs for TurnRunner.
- Pool
Config - Pool configuration.
- Pool
Stats - Pool stats snapshot.
- Pooled
Conn - One connection slot in the pool.
- Query
Gate - Enforces single-flight query execution per app key with daemon-first cancel.
- Send
Turn Options - Options for
send_turn. - Session
Record - Persisted session record.
- SseBroadcaster
- Generic, string-keyed pub/sub fan-out for SSE-style event delivery.
- SseEvent
- One Server-Sent Event payload. The event type vocabulary
(
delta/complete/query_error/status_change/ …) is app-defined. - Turn
Boundary - Applies DaemonSession end rules to pool frames.
- Turn
Chunk - One streamed turn chunk.
- Turn
Config - Turn runner configuration.
- Turn
Event Stats - Tracks per-turn stream filtering counters.
- Turn
Lifecycle Gate - Per-turn progress flags (DaemonSession parity; not shared across chats).
- Turn
Runner - Executes a turn against a pooled connection.
Enums§
- Chat
Event Terminal - How a processed event should end the query loop.
- Timeout
Policy - Timeout policy for idle / query / stream-close.
Constants§
- TURN_
END_ IDLE - Completion event for gated
status=idle. - TURN_
END_ STOPPED - Completion event for
status=stoppedafter running. - TURN_
END_ STREAM_ END - Completion event for turn-scoped
soothe.stream.end.
Traits§
- Session
Store - Session ↔ loop persistence.
Functions§
- compact_
attachments - Applies
compact_image_attachmentto each attachment map that carriesmime_type+data. - compact_
image_ attachment - Downscales
image/*payloads when either dimension exceedsCompactImageOptions::max_dim. - default_
thinking_ step_ events - Default thinking-step event allowlist (overridable via
ClassifierConfig). - extract_
thinking_ step - Maps an allowlisted progress event to one structured UI line.
- input_
message_ for_ loop - Build a protocol-1
loop_inputnotification envelope (GoInputMessageForLoop). - is_
daemon_ turn_ end_ event - True for TurnBoundary completion_event values (not phase deliverables).
- should_
drop_ stream_ chunk_ early - Reports whether a chunk can be skipped before the turn pipeline.
Type Aliases§
- AppKey
- Application conversation key used by
super::ConnectionPool,super::QueryGate,super::TurnRunner, andsuper::SessionStore(e.g. Triarchchat_id). - Cancel
Fn - Local cancel callback for an in-flight query (typically a timeout context cancel).
- Early
Drop Fn - Filters non-actionable stream chunks before yield (Go
EarlyDropFn). - Send
Cancel Fn - Async daemon-cancel sender (
command_requestcancel for the loop).