Skip to content

Generate protocol catalogs and negotiate compatibility - #37

Draft
wolfiesch wants to merge 2 commits into
mainfrom
review/protocol-codegen
Draft

Generate protocol catalogs and negotiate compatibility#37
wolfiesch wants to merge 2 commits into
mainfrom
review/protocol-codegen

Conversation

@wolfiesch

Copy link
Copy Markdown
Owner

Why

AgentTab currently has duplicated protocol knowledge across Rust, the extension, and both SDKs. That makes compatibility drift easy and upgrades brittle—especially when an unattended client and host do not update at the same time.

What changes

  • Adds a canonical protocol/agenttab-v1.json catalog and generated Rust, TypeScript, Python, and extension constants/types.
  • Adds generator drift checks to CI and release validation.
  • Negotiates protocol version and feature support explicitly for RPC and Native Messaging.
  • Returns structured incompatibility errors instead of failing later with ambiguous transport errors.
  • Adds one bounded capability-to-exact-v1 fallback for strict legacy peers.
  • Preserves conversation/resume inputs and staged reviews across the internal compatibility retry.
  • Prevents fallback after a timeout, any response byte/message, malformed/partial frames, or explicit incompatibility.

Review decisions

  • Canonical source: approve making the JSON catalog authoritative for protocol identifiers and feature declarations.
  • Compatibility policy: approve the single legacy retry. It intentionally favors mixed-version unattended upgrades over a hard lockstep requirement.
  • Residual ambiguity: a new host that crashes after receiving the enriched hello but before returning any byte is indistinguishable from a strict-v1 rejection, so one legacy retry occurs. It cannot loop.

Validation

  • Protocol generator drift check
  • Workspace TypeScript typecheck
  • SDK/MCP/OMP/installer/site builds
  • Extension build
  • Targeted TypeScript, Python, Native Messaging fallback, partial-frame, timeout, and incompatibility regressions

Why draft

This changes the project-wide compatibility contract and generated-code workflow. The branch is implementation-complete, but the policy and maintenance model deserve explicit review before merge.

@wolfiesch
wolfiesch force-pushed the review/protocol-codegen branch from c378093 to 778f97f Compare August 31, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant