Skip to content

feat(v2)!: bump ACP schema to 2.0.0-beta.4 - #208

Merged
PsiACE merged 7 commits into
mainfrom
feat/acp-v2-schema-beta.4
Nov 28, 2026
Merged

PsiACE merged 7 commits into
mainfrom
feat/acp-v2-schema-beta.4

Conversation

@PsiACE

@PsiACE PsiACE commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Updates the experimental ACP v2 schema bindings, runtime, and docs to ACP schema 2.0.0-beta.4.

Summary

  • Schema regeneration (schema/v2/): Regenerated src/acp/experimental/v2/{schema,meta,interfaces,agent,client}.py and src/acp/schema.py. Adds beta.4 session/auth/cancel methods, drops removed NES and document notifications, requires non-null requestId for request-scoped elicitation, preserves custom JSON values in accepted elicitation content, and exports reusable v2 union aliases (SessionUpdate, ContentBlock, StateUpdate, BackgroundWork, AvailableCommand).
  • v2 wire validation & deserialization: Enforces explicit discriminator tags at v2 wire boundaries while keeping Python constructor defaults, scopes patch-field salvaging to v2._schema_base.BaseModel via track_defaulted_fields() (leaving v1 validation semantics and performance unchanged), moves model-specific rules into scoped bases and generated field validators, composes skip_invalid_items + use_default_on_error on optional dual-annotated lists, and returns JSON-safe ValidationError payloads (-32602) while mapping invalid v2 handler results to -32603.
  • Initialization, negotiation & transport: Uses StrictInt for v2 protocolVersion (disabling legacy string coercion on v2), returns -32022 with {requested, supported} for unsupported older versions, negotiates higher versions down to 2, encapsulates repeat initialize serialization and request locking inside InitializationState (preserving its existing API and prior initialization on failed repeats), translates auth.terminal: {} to True on v2→v1 fallback, and configures v2 stdio batch rejection on NdjsonTransport without changing Connection.__init__.
  • Docs: Updated docs/experimental-v2.md for Preview.

Verification

  • make gen-check, make check, make test (677 passed, 1 skipped), make docs-test
  • ACP TCK v0.5.0: CONFORMANT on both direct v2.run_agent and AgentProtocolRouter(v2=...) (300 passed, 0 failed, 15 skipped), 18 / 18 dual-stack AgentProtocolRouter(v1=..., v2=...) initialization checks (incl. ACP-INIT-208), and v1 CONFORMANT
  • Live stdio interop with TypeScript SDK v2.12.0 and Rust SDK v5.6.1: all 4 directions passed

BREAKING CHANGE: Update the experimental v2 bindings and runtime to the beta.4 schema, which removes NES and document notifications and requires a non-null request ID for request-scoped elicitation.
@PsiACE
PsiACE force-pushed the feat/acp-v2-schema-beta.4 branch from bcdb7cc to 9f97bea Compare November 26, 2026 09:23
@PsiACE
PsiACE marked this pull request as ready for review November 28, 2026 03:16
@PsiACE
PsiACE merged commit ac611b0 into main Nov 28, 2026
9 checks passed
@PsiACE
PsiACE deleted the feat/acp-v2-schema-beta.4 branch November 28, 2026 04: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