Repository navigation
feat(extensions)!: normalize extension version and capability negotiation #3057
Description
User Story
As an operator or extension author, I want every supported extension protocol to negotiate version and capabilities consistently, so that incompatible gateway and extension combinations fail clearly instead of silently degrading.
Problem Statement
Compute drivers, credential drivers, gateway interceptors, and supervisor middleware expose different version and capability shapes. Some report a free-form implementation version, some provide service metadata, and some lack protocol-version negotiation. The gateway cannot apply one compatibility policy across extension families.
Impact / Why This Matters
Operators can pair independently deployed components that connect successfully but do not understand required fields or behaviors. Each extension author invents compatibility rules, and clients cannot discover which optional capabilities are supported. Silent degradation is especially risky when a missing capability affects security or resource enforcement.
Proposed Design
Define a common extension handshake model with:
- a protocol contract version distinct from the implementation/build version;
- a typed or namespaced capability set;
- required versus optional capability semantics;
- clear rejection and diagnostic behavior for incompatible peers;
- a documented gateway/extension version-skew policy; and
- capability snapshots available through appropriate operator/client discovery surfaces.
Apply the common semantics to compute drivers, credential drivers, gateway interceptors, and supervisor middleware while allowing extension-specific capability payloads.
Acceptance Criteria
- Every supported extension protocol reports protocol version and implementation version separately.
- Every protocol can advertise optional capabilities and declare required capabilities.
- The gateway rejects an extension missing a required capability with an actionable error.
- Unknown optional capabilities are tolerated according to documented forward-compatibility rules.
- Supported version skew is documented and covered by mixed-version tests.
- Operator-visible gateway information reports negotiated extension versions/capabilities without exposing secrets.
- Built-in extensions use the same negotiation path as external extensions.
- Extension author documentation and migration notes include the new handshake.
Alternatives Considered
Compare semantic implementation versions in the gateway. This requires a growing feature-to-version table and conflates build identity with protocol support. Let every extension family retain its own mechanism. This preserves current inconsistency and makes a system-wide compatibility policy unenforceable.
Agent Investigation
The current protocols expose different combinations of driver_version, service_version, manifests, and capability fields. Resource-specific compute capabilities are tracked in #2902, while fail-closed gateway/supervisor feature negotiation is tracked in #2949.
Related: #2565, #2902, #2949. Source audit: https://gist.github.com/mrunalp/e80942c1544a0225ee588796a41ab30b.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
0.1.0#2565github-actions commentedon Sep 15, 2026
This issue has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. Comment or remove the state:stale label to keep it open.
sjenning commentedon Sep 15, 2026
Implementation Plan
Issue type:
featComplexity: High
Confidence: Medium — integration points are clear; the initial public contract is fixed below for implementation.
Summary
Introduce one bidirectional extension peer-metadata model for protocol version, implementation version, supported capabilities, and peer requirements. Use the same negotiation validator for in-process and external compute drivers, credential drivers, gateway interceptors, and supervisor middleware; reject missing metadata, incompatible protocol majors, or unmet requirements during gateway startup while tolerating unknown optional capabilities.
Retain each family's typed payload beside the common metadata. Snapshot successful negotiations and expose only non-secret version/capability data through elevated gateway information and client-facing representations.
Contract Decisions
1.0; accept same-major minor skew when requirements are satisfied and reject major-version mismatch.openshell.<family>.*.driver_versionandservice_versionfields populated but deprecated for a wire-compatible migration; do not reuse field tags.Scope
proto/extension.proto(new): common peer metadata and typed protocol version.proto/{compute_driver,credential_driver,gateway_interceptor,supervisor_middleware}.proto: carry gateway metadata in startup requests and extension metadata in responses/manifests.proto/openshell.proto: add generic non-secret negotiated-extension snapshots toGetGatewayInfoResponse, preserving compute resource-capability output from feat(api): advertise portable resource capabilities from compute drivers #2902.crates/openshell-core: protobuf-aware normalization, identifier validation, compatibility enforcement, and actionable errors.ComputeRuntime::from_driver; update Docker, Podman, Kubernetes, VM, MXC, and test implementations.Describe, retain snapshots, and preserve interceptor-specific bindings/provider-profile flags.Describe, validate built-in and remote manifests through the same helper, and retain snapshots.Implementation Steps
{major, minor}versions, implementation identity/version, supported capabilities, and required peer capabilities.ResourceCapabilitiespayload.Describe, routing built-ins through the same validation path.GetGatewayInfo.mise run pre-commit,mise run test, andmise run ci.Test Plan
e2e/fixtures change; startup negotiation is covered by loopback/UDS integration tests and does not change sandbox infrastructure behavior.Risks & Open Questions
Describerequest becomes typed rather thangoogle.protobuf.Empty; the RPC path is stable, but extension authors must regenerate bindings.Documentation Impact
/proc, binary execution, or inter-process visibility behavior changes.Revision 1 — initial plan with protocol and capability-namespace decisions
sjenning commentedon Sep 15, 2026
Implementation Complete
PR: #3352
What was built
Added a common protocol-version and capability handshake across compute drivers, credential drivers, gateway interceptors, and supervisor middleware. The gateway now rejects incompatible peers before use and reports immutable, non-secret negotiated snapshots through gateway info and the Go SDK.
Tests
e2e/changedmise run pre-commit,mise run go:ci,mise run sdk:ts:ci,OPENSHELL_NO_BROWSER=0 mise run test, andOPENSHELL_NO_BROWSER=0 mise run ciDocs updated
The issue will auto-close when the PR is merged.
feat(extensions)!: normalize protocol negotiation
feat(extensions)!: normalize protocol negotiation
feat(extensions)!: normalize protocol negotiation
feat(extensions)!: normalize protocol negotiation
feat(extensions)!: normalize protocol negotiation
feat(extensions)!: normalize protocol negotiation (NVIDIA#3352)