Skip to content

Bundle dist outputs and inline SDK runtime#8

Merged
jsmestad merged 1 commit into
mainfrom
bundle-sdk-inline
Apr 29, 2026
Merged

Bundle dist outputs and inline SDK runtime#8
jsmestad merged 1 commit into
mainfrom
bundle-sdk-inline

Conversation

@breznknecht
Copy link
Copy Markdown
Collaborator

@breznknecht breznknecht commented Apr 29, 2026

Summary

Bundle package outputs so SDK code is in dist artifacts while keeping OpenCode host plugin imports external at runtime.

Changes

  • Move @headsdown/sdk to devDependencies and keep @opencode-ai/plugin in dependencies.
  • Build bundled outputs for dist/index.js and dist/tui.js with esbuild.
  • Add bundled dist/policy.js output for test coverage of policy helpers.
  • Run tests against built dist artifacts.
  • Document bundling commands and rationale in README.

Compatibility

Exports remain @headsdown/opencode and @headsdown/opencode/tui. Runtime plugin behavior is unchanged.

Validation

  • npm run build
  • npm test
  • npm pack + scratch install check (@headsdown/sdk not installed transitively)
  • Runtime import check for @headsdown/opencode and @headsdown/opencode/tui

@jsmestad jsmestad merged commit e15e4df into main Apr 29, 2026
2 checks passed
@jsmestad jsmestad deleted the bundle-sdk-inline branch April 29, 2026 19:15
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.

2 participants