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§
- Capability
Declaration - Generic capability declaration returned by an extension’s
initializeresponse. - Initialize
Capabilities Result - Process
Extension - A running extension process communicating via JSON-RPC 2.0 over stdio.
- Provider
Complete Params - Provider
Complete Result - Provider
Tool Use - Registered
Extension Tool Spec - Registered
Provider Model Spec - Registered
Provider Spec
Enums§
- Provider
Stream Event - 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_streamnotification loop and the route forwarder.
Functions§
- complete_
provider_ with_ tools - Interior extension-provider tool loop.
session_toolsis built ONCE by the caller (under the same registry read guard passed asregistry) 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.eventnotification’sparamsvalue into aProviderStreamEvent. ReturnsErr(String)on malformed input. - validate_
capability - Validate a
CapabilityDeclarationagainst the granted permission set.