Repository navigation
[Draft] feat: add opt-in OpenCode V2 session transport (stacked) - #552
Draft
tbrandenburg wants to merge 9 commits into
Draft
tbrandenburg wants to merge 9 commits into
tbrandenburg wants to merge 9 commits into
Conversation
added 5 commits
October 25, 2026 15:14
added 4 commits
October 25, 2026 15:47
This was referenced Oct 25, 2026
Author
|
Related to #550 (OpenCode V2 server API compatibility). Non-closing reference; this PR alone does not deliver complete V2 support. |
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更范围
增加显式选择的 OpenCode V2 session-transport 切片,V1 仍为默认;不自动探测,也不 fallback。
/api/info、/api/location及 session create/get/list 的 native envelope。opencode.*或 shared interrupt extension 返回-32601,不访问 upstream HTTP。关联议题:tbrandenburg#3 ;capability gate:tbrandenburg#6 。
堆叠与限制
保持 Draft,依赖 #551。 当前对 upstream
main的 diff 包含 adapter 准备切片,不是独立 diff;应先审查 #551,不能先合并本 PR。本次只追加提交,未 rebase、force push 或合并。不声明 V2 A2A model execution、task-scoped cancellation、permission/form intervention、request-scoped model override 或完整 V2 兼容性。
当前 PR head 验证
验证 head:
cc8470d7b631b00e580de741324d5956ef673780。bash ./scripts/doctor.sh:通过;890 passed,coverage 92.88%。包含 locked dependency sync、兼容性检查、pre-commit、mypy、pytest、coverage policy、hash-locked build 和 built-wheel smoke。uv run --all-extras pytest --no-cov tests/execution/test_streaming_output_contract_core.py -k 'non_completed_outcome_without_error_metadata_is_terminal_before_tools or invalid_prompt_submission_fails_without_legacy_resend':4 passed。uv run --all-extras pytest --no-cov tests/jsonrpc/test_jsonrpc_unsupported_method.py tests/contracts/test_extension_contract_consistency.py tests/server/test_agent_card.py tests/execution/test_v2_prompt_failfast.py tests/upstream/test_v2_upstream_adapter.py:118 passed,覆盖 capability 一致性、禁用方法零 upstream HTTP、消息 fail-fast 和 V2 session transport。移植过程记录:capability gate 仅有两处文档冲突,保留本切片范围,没有带入后续 correlation 调查文档。首次 doctor 为 1 failed / 889 passed:新增测试依赖后续集成分支的错误文案;已将断言适配为本切片现有 fail-closed 文案,保留失败终态、拒绝 streaming 和零 upstream HTTP 断言。随后一次 doctor 因 formatter 自动修改此断言而停止,审查并追加格式提交后,上述精确 head 的完整 doctor 通过。
以上结果来自本 PR 的精确 head,不借用集成分支结果。本次未运行 live OpenCode/model smoke 或 conformance。