Skip to main content

Module frontend

Module frontend 

Source
Expand description

Protocol-neutral frontend contract for one SDK-owned Supercode runtime.

Terminal, HTTP, ACP, and future browser frontends consume this contract; none of them owns an crate::Agent or a second model loop. Events keep their complete JSON payload and gain a monotonic sequence so a frontend can cross the history-replay/live-stream boundary without duplicates.

Re-exports§

pub use crate::sdk::SdkError as FrontendRuntimeError;
pub use crate::sdk::SdkEvent as FrontendEvent;
pub use crate::sdk::SdkRuntime as FrontendRuntime;

Structs§

FrontendActions
Actions the current runtime adapter can actually perform.
FrontendAttachSnapshot
Serializable half of an attachment returned by an out-of-process runtime. The live receiver is transport-owned and joined to this snapshot locally.
FrontendAttachment
Atomic history/replay/live attachment to one runtime.
FrontendCommandDescriptor
One runtime-provided command surfaced by a composer.
FrontendDisplayCapabilities
Display semantics emitted by the runtime.
FrontendOperationDescriptor
One operation the runtime can genuinely invoke.
FrontendRequest
One pending interactive request, emitted as a sequenced frontend event.
FrontendRuntimeDescriptor
Complete frontend-facing description of one SDK-owned runtime.
FrontendRuntimeMetadata
Source/emulation identity supplied by the session-loading surface.
HttpFrontendRuntime
Authenticated HTTP implementation of FrontendRuntime.

Enums§

FrontendApprovalDecision
Typed approval decision accepted by FrontendRuntime::respond.
FrontendConnectionState
Frontend-visible runtime connection state.
FrontendElicitationAction
MCP elicitation outcome accepted by a frontend response.
FrontendOperationInvocation
Typed invocation accepted by FrontendRuntime::invoke.
FrontendOperationKind
Stable family for an explicitly invocable frontend operation.
FrontendOperationResult
Typed result returned by FrontendRuntime::invoke.
FrontendRequestKind
Kind of interactive request surfaced by the SDK runtime.
FrontendResponse
Typed response to one SDK-owned interactive request.
FrontendTurnState
Whether a model/tool turn currently owns the runtime.

Constants§

FRONTEND_REPLAY_CAPACITY
Maximum sequenced events retained between canonical history snapshots.
FRONTEND_RUNTIME_SCHEMA_VERSION
Frontend contract schema version.