Skip to main content

Crate mcp_twill_host

Crate mcp_twill_host 

Source
Expand description

Compiled host adapters and runtime policy for mcp-twill servers.

RFC 0019 host profiles compile an immutable native tool-surface snapshot into a separately hashed host snapshot. That snapshot drives generated VS Code artifacts and either the closed process-envelope router or the typed in-process bridge. This crate also owns process-level runtime identity and the effect-aware retry policy a supervisor needs when it considers re-issuing a call.

Hot-replacement detection (noticing the server binary was swapped under a live connection) is planned follow-up work in this crate; nothing here populates executable_hash yet.

Structs§

AbsentContextPolicy
HostAdapterProfile
HostAdapterProfileBuilder
HostAdapterProfileDecl
HostAdapterSnapshot
HostApplicationRejection
HostCallEnvelopeV1
HostCallResultV1
HostConfirmationPolicy
HostGuidanceProjection
HostInProcessAdapter
HostInvocationLimits
HostProcessEntrypointError
HostProcessLimits
HostProcessRouter
HostRecoveryAction
HostResultProjection
HostVsCodeVersionV1
RuntimeHost
Wraps a server with the identity facts a process-level host can observe.
UnsupportedContextPolicy
VsCodeEngineRange
VsCodeGeneratedArtifacts
VsCodeVersion

Enums§

HostAdapterKind
HostApplicationErrorDialect
HostCallOutcomeV1
HostConfirmationAuthority
HostConfirmationTrigger
HostContextReason
HostFrameworkErrorDialect
HostGuidanceSegment
HostInvocationContextV1
HostInvocationTransport
HostRuntimeFactsV1
HostSuccessDialect
HostToolNameProjection
RetryDecision
The host’s answer to “may this call be re-issued after an ambiguous failure?”.

Functions§

generate_vscode_artifacts
retry_decision
Effect-aware retry policy, reading both the effect and the idempotency declaration from the plan. Pure and read effects are always retryable. Writes, deletes, process execution, and network calls are retryable only when the command declared itself idempotent in the catalog; composites take the most restrictive answer among their parts.