Skip to main content

Module runtime

Module runtime 

Source

Modules§

attachments
Offline preflight for canonical user attachments and rich tool results.
budget
Task 23 — per-turn budgets (spec §8.1).
capture_worker
Nonblocking, bounded dispatch of completed memory captures.
chat_capture
Typed, terminal-only continuous-memory chat capture (task C1).
compaction
Conversation compaction — turn a long message history into a structured summary.
context
Task 29 — centralized request-aware context budgeting (spec §9.1).
continuation
Opt-in context windows within a stable logical session. Rollover seals eligible source evidence before changing the next request; never calls an LLM summarizer or clears environment state. A durable successor starts fresh elapsed time; cumulative resource/cost budgets remain unchanged.
google_gemini
Google Gemini (Code Assist) runtime — broker-proxied only.
google_vertex
Provider-local Google Vertex public catalog and generateContent adapter.
memory_context
Typed continuous-memory context domain model (task A1).
memory_history
Existing-history disclosure preview and consent gate (task D1).
openai
OpenAI-compatible provider engine.
relay
CP-11 fix-2 (A): bounded caller-facing stream boundary.
subagent
telemetry
Structured per-request API telemetry.
trace
Versioned, provider-neutral request trace envelope (spec §6.1, §6.4).

Structs§

ReasoningClamp
A reasoning-level substitution performed during a model change because the newly selected model does not support the previously active level.
Runtime
TurnCompletion
Per-turn signals shared by the host and the engine.

Enums§

AgentEvent
BeforeToolCallDecision
Result of resolving before_tool_call extension policy.
CancelCause
Why a host cancelled a turn, as far as a canceled tool result says.
LlmEvent
SessionEvent
StreamEvent
Top-level stream event — grouped into concern-specific sub-enums.

Functions§

activation_policy
Bundle of all dependencies needed to drive a streaming agent loop. Constructed once by Runtime::run_stream_with_messages before spawning the stream task. Host activation policy for MODEL-INITIATED activate_tools (tools.activation_confirm + server.auto_approve_confirms).
build_host_http_client
The process-global HTTP client for EngineHost (same builder as Runtime::new). The host’s HTTP client builder (also used by the attach-TUI client, A4).
emit_after_tool_call
Emit an after_tool_call event and return the tool output to record in history — either the original output, or a Replace { output } substituted by an extension transform hook (compression, redaction, summarization). The runtime tool name is included when it differs from the API-safe name.
emit_before_tool_call
Emit a before_tool_call event and include the runtime tool name when it differs from the API-safe name. session_id is the owning conversation (None for workers → JSON null, unchanged).
resolve_before_tool_call_decision
Resolve before_tool_call policy into executable input or a block reason.
resolve_before_tool_call_result
Resolve a before_tool_call result that may request user confirmation.