diff options
| author | GoldJohnKing <GoldJohnKing@live.cn> | 2026-09-10 09:00:50 +0800 |
|---|---|---|
| committer | GoldJohnKing <GoldJohnKing@live.cn> | 2026-09-10 09:00:50 +0800 |
| commit | ca380ba48876148518a393b0e87c3e2a25fd3bcf (patch) | |
| tree | 55b55a7d53bfd600e3e7a55e3fdfaf44f464bd28 /tests/opencode/test-session-bootstrap.mjs | |
| parent | aeba3ee2fd6dfc750827dfc3d3624ff505f94b59 (diff) | |
fix(opencode): differentiate tool mapping by host flavor and harden child detection
Current opencode2 builds renamed the model-facing tools (bash→shell,
task→subagent with `agent` instead of `subagent_type`, apply_patch→
patch/patchText) and removed todowrite entirely, so the single v1
mapping injected on v2 hosts taught the model stale tool names.
- export V1_MAPPING/V2_MAPPING and inject the flavor-correct one on
each path (v1 messages.transform → V1; v2 ctx.session.hook("context")
→ V2, incl. no-todo-tool guidance and sessionID continuation)
- child-session detection now keys on parentID presence (primary
signal on both flavors) with dual-shape unwrapping preserved; v1
#2160 behavior unchanged
- mirror surfaces updated: INSTALL.md dual mapping tables,
README.opencode.md host-flavor notes, test-bootstrap-caching.mjs
asserts both mappings + drives the v2 context hook end-to-end
- skills: add OpenCode to executing-plans' subagent-capable list,
accurate OpenCode worktree status (git fallback; TUI dialogs are
user-side only), generalized live-subagent resume guidance
Diffstat (limited to 'tests/opencode/test-session-bootstrap.mjs')
0 files changed, 0 insertions, 0 deletions
