Skip to main content

Module sdk

Module sdk 

Source
Expand description

Versioned public SDK contract shared by every Supercode surface.

This module names the operations, capabilities, events, and errors that transports project. CLI, JSON-RPC, HTTP, MCP, ACP, and language clients may add correlation ids or wire metadata, but they must not define a second execution contract or place those envelope fields in a session.

Structs§

SdkAgent
SDK-owned emulation runtime component.
SdkCapabilities
Capability inventory for the complete v1 SDK, independent of transport.
SdkEvent
Canonical event before a wire transport adds subscription metadata.
SdkRequest
One typed SDK request before a transport adds its envelope.
SdkRuntimeEvent
One runtime event paired with its durable SDK identity.

Enums§

RuntimeSubmitError
Typed turn failure shared by local, HTTP, ACP, CLI, and language adapters.
SdkError
Typed failure returned by every SDK adapter and compatibility projection.
SdkErrorCode
Stable machine-readable SDK failure categories.
SdkOperation
One operation owned by the SDK facade.

Constants§

SDK_SCHEMA_VERSION
Current language-neutral SDK schema.

Traits§

SdkPromptSource
Renderable prompt source configured on an SDK emulation component.
SdkRuntime
Canonical live-runtime contract owned by the SDK.
SdkService
Stateful SDK facade consumed by public transport adapters.

Functions§

create_agent
Construct the emulation component inside the SDK ownership boundary.
discover_session_page
Discover one persisted-session page with its opaque successor cursor.
discover_sessions
Discover persisted sessions through the canonical SDK catalog owner.
load_session
Load one durable locator through the canonical SDK catalog owner.
load_session_path
Load an explicit transcript/store path through the SDK import boundary. An OpenCode selector is accepted only for its SQLite store.
load_session_with_fidelity
load_session at a declared fidelity.
resume_agent
Resume canonical history inside a fresh SDK-owned emulation component.
submit_agent
Submit one text turn through the SDK-owned emulation loop.
submit_agent_with_images
Submit one multimodal turn through the SDK-owned emulation loop.