Skip to main content

Module process

Module process 

Source
Expand description

Process-based extension runtime — JSON-RPC 2.0 over stdio.

Spawns the extension as a child process. Communication uses Content-Length framing (LSP-style) over stdin/stdout.

Structs§

CapabilityDeclaration
Generic capability declaration returned by an extension’s initialize response.
InitializeCapabilitiesResult
ProcessExtension
A running extension process communicating via JSON-RPC 2.0 over stdio.
ProviderCompleteParams
ProviderCompleteResult
ProviderToolUse
RegisteredExtensionToolSpec
RegisteredProviderModelSpec
RegisteredProviderSpec

Enums§

ProviderStreamEvent
A single streaming event from a provider extension.

Constants§

NOTIFICATION_QUEUE_CAPACITY
CP-11 fix-2 (B): bounded notification handoff. Combined with the 4 MiB per-frame reader cap, queue capacity fixes the worst-case bytes parked between the sidecar reader and a subscriber; beyond it the reader AWAITS (backpressure onto the child’s stdout pipe) instead of retaining hostile flood frames in host memory.
PROVIDER_EVENT_QUEUE_CAPACITY
CP-11 fix-2 (B): bounded provider stream-event handoff between the provider_stream notification loop and the route forwarder.

Functions§

complete_provider_with_tools
Interior extension-provider tool loop. session_tools is built ONCE by the caller (under the same registry read guard passed as registry) and reused for every tool call in every interior round — the registry stays read-locked for the whole outer provider call, so no catalog drift is possible inside this loop and one set snapshot governs all rounds.
execute_provider_tool_use
extract_provider_tool_uses
parse_provider_stream_event
Parse a single provider.stream.event notification’s params value into a ProviderStreamEvent. Returns Err(String) on malformed input.
validate_capability
Validate a CapabilityDeclaration against the granted permission set.