Skip to content

feat: add V1/V2 compatibility foundation and diagnostics - #29

Draft
AlaeddineMessadi wants to merge 1 commit into
mainfrom
codex/v1-v2-foundation
Draft

AlaeddineMessadi wants to merge 1 commit into
mainfrom
codex/v1-v2-foundation

Conversation

@AlaeddineMessadi

Copy link
Copy Markdown
Owner

OpenCode V2 changes session, input, permission and lifecycle contracts, so routing existing V1 tools directly to it cannot preserve their behavior. This adds typed V1/V2 adapters, backend detection, read-only diagnostics, normalized operations, durable V2 jobs and native MCP Tasks while preserving V1 support.

The capability manifest accounts for 87 tools plus resources/templates/prompts. V2 has 64 supported mappings, 22 intentional V1-only exceptions, and one upstream-blocked command operation. Unsupported calls fail before mutation. Setup/migration docs, generated compatibility references, production archive checks, and Ubuntu/macOS/Windows × Node 22/24 CI are included. Package metadata is prepared as 3.1.0-rc.1; nothing has been published.

Validation

  • Full local suites: 755 passed, 3 skipped on Node 22.23.2 and 24.21.0 (macOS arm64).
  • Coverage gate passed; generated documentation and whitespace checks passed; npm audit reports zero vulnerabilities.
  • Retained candidate archive passed production installation checks and model-free native checks against opencode-ai@1.18.31 and @opencode/cli@2.0.6 on both Node versions.
  • Live doctor checks verified read-only requests, no startup attempts, accurate provider readiness, and credential redaction.

Why this is a draft

  • opencode_command_execute remains blocked by missing V2 invocation/result correlation: [FEATURE]: V2 session.command invocation identity and result correlation anomalyco/opencode#49690. The original 65-supported-tool milestone gate is not met.
  • Durable execution/recovery, forms/permissions, reverts and native Tasks have fixture/contract coverage; live inference, OAuth and GUI clients remain unverified. Hosted-platform CI results are pending.
  • One initial V2 native-test final-phase failure did not reproduce on subsequent runs. Its cause remains unresolved; the harness now distinguishes cleanup failures and records safe failure diagnostics.

See plans/verification.md for exact evidence, plans/004-v2-writes-input.md for the unblock checklist, and MIGRATION.md for option and lifecycle limitations.

@brocasm

brocasm commented Sep 23, 2026

Copy link
Copy Markdown

Interressing about this PR, wainting merge to test this MCP

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.

3 participants