Description
The typecheck CI job is failing on every open PR that touches any file in packages/opencode. The errors all look like this:
Module '"@opencode-ai/sdk/v2"' has no exported member 'TextPart'
Module '"@opencode-ai/sdk/v2"' has no exported member 'AssistantMessage'
'@opencode-ai/sdk/v2' has no exported member named 'createOpencodeClient'
The root cause is in packages/sdk/js/package.json. The exports map for ./v2, ./v2/client, and ./v2/gen/client points the types field at ./dist/v2/*.d.ts files, but the dist/v2/ directory is not committed to the repo (it is a build artifact). TypeScript resolves types from the types field and fails because the files do not exist.
All the types are present in the source -- the export map just needs to point at the source .ts files directly, which is how every other export in the same file already works.
Plugins
No response
OpenCode version
No response
Steps to reproduce
- Open any PR against the dev branch that touches a file in packages/opencode
-
- Wait for the typecheck CI job to run
-
- It fails with "Module has no exported member" errors for types from @opencode-ai/sdk/v2
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Description
The typecheck CI job is failing on every open PR that touches any file in
packages/opencode. The errors all look like this:The root cause is in
packages/sdk/js/package.json. The exports map for./v2,./v2/client, and./v2/gen/clientpoints thetypesfield at./dist/v2/*.d.tsfiles, but thedist/v2/directory is not committed to the repo (it is a build artifact). TypeScript resolves types from thetypesfield and fails because the files do not exist.All the types are present in the source -- the export map just needs to point at the source
.tsfiles directly, which is how every other export in the same file already works.Plugins
No response
OpenCode version
No response
Steps to reproduce
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response