fix: pin @opencode-ai/sdk to <1.2.7 to fix broken v2 exports

@opencode-ai/sdk versions 1.2.7+ have a broken build where dist/v2/
directory is missing (files are incorrectly placed under dist/src/v2/
instead). This causes 'Cannot find module' errors when running takt
installed via npm install -g.

The v2 export path '@opencode-ai/sdk/v2' resolves to dist/v2/index.js
per the package's exports map, but that file does not exist in 1.2.7+.

Pinning to <1.2.7 as a workaround until the SDK package is fixed.
This commit is contained in:
Tomohisa Takaoka 2026-02-19 19:33:58 -08:00
parent 78dead335d
commit 26372c0091

View File

@ -62,7 +62,7 @@
"dependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.2.47",
"@openai/codex-sdk": "^0.103.0",
"@opencode-ai/sdk": "^1.1.53",
"@opencode-ai/sdk": ">=1.1.53 <1.2.7",
"chalk": "^5.3.0",
"commander": "^12.1.0",
"update-notifier": "^7.3.1",