Skip to content

v1.38.2: Add GSD SDK, fix runtime dependencies, and improve installer#113

Merged
rokicool merged 25 commits intomainfrom
dev
Apr 27, 2026
Merged

v1.38.2: Add GSD SDK, fix runtime dependencies, and improve installer#113
rokicool merged 25 commits intomainfrom
dev

Conversation

@rokicool
Copy link
Copy Markdown
Owner

Summary

  • Added complete GSD SDK (gsd-opencode/sdk/) with 50+ TypeScript source files, compiled distribution, query layer (50+ handlers), golden fixtures, and comprehensive test suite
  • Fixed SDK runtime dependency resolution by adding @anthropic-ai/claude-agent-sdk and ws to parent package.json
  • Updated both DM and legacy installers to handle SDK runtime dependencies for pre-built distributions
  • Added SDK dist rebuild step (4d) to sync workflow documentation
  • Updated CHANGELOG with v1.38.2 entry

Changes

547 files changed (90,764 insertions, 148 deletions)

Key additions

  • SDK CLI with run, init, query, and milestone subcommands
  • SDK query layer: phase lifecycle, state management, roadmap, templates, profiles, validation, verification, audit, UAT, workspace
  • SDK session runner, phase runner, init runner, event stream, context engine, prompt builder, plan parser
  • SDK golden fixtures and parity testing infrastructure
  • SDK comprehensive test suite (40+ test files)
  • gsd-sdk.cjs CommonJS shim for external callers
  • install.js legacy installer script (7452 lines)

Bug fixes

  • SDK dist files were missing after sync from upstream — rebuilt with tsc
  • SDK runtime dependencies not available when using pre-built dist — added to parent package.json
  • Installer skipped npm install for pre-built dist — now runs npm install and verifies dependency

rokicool added 25 commits April 25, 2026 20:35
- Fix package.json path resolution in getPackageVersion() (was resolving
  to wrong directory level)
- Update verifyIntegrity() to use new 'commands/' directory structure
  instead of legacy 'command/' path
…ication

- Replace hardcoded sample file checks with full manifest-based verification
  using get-shit-done/INSTALLED_FILES.json (created during install)
- Compare SHA-256 hashes of all installed files against recorded manifest
  values to detect corruption or tampering
- Detect extra files present on disk but not tracked in manifest
- Fall back to sample-based checks only when no manifest exists
- Clean up unused getSourceDirectory() from check.js
- Copy 188 files from upstream submodule v1.38.5
- Translate 613 Claude Code artifacts to OpenCode equivalents across 100 files
- Add new install.js and gsd-sdk.js scripts for OpenCode integration
- Update SyncService.js and discovery-phase.md
- Update package.json with new dependencies
- Add @gsd-build/sdk as npm dependency in package.json
- Write .env file during install with GSD_AGENTS_DIR pointing to agents directory
- Handle .env cleanup in uninstall and re-install flows
- Remove bundled SDK source directory (now managed via npm)
- Rewrite bin/gsd-sdk.js to use import.meta.resolve() to find
  @gsd-build/sdk/dist/cli.js from npm's install tree instead of
  a hardcoded relative path to a bundled sdk/ directory
- Add gsd-sdk to package.json bin entry so npm creates the PATH symlink
- Remove get-shit-done/bin/ from SyncService (upstream installer not needed)
- Remove @gsd-build/sdk from package.json dependencies
- Copy original/get-shit-done/sdk/ to gsd-opencode/sdk/ with prebuilt dist/
- Rename bin/gsd-sdk.js to .cjs to work with ESM package type
- Add installSdk() step to install.js: npm install + npm run build in target
- Add sdk/ to DIRECTORIES_TO_COPY, ALLOWED_NAMESPACES, and uninstall cleanup
- Fix SyncService directory mapping typo (gsd-shit-doen/sdk -> sdk/)
- Add sdk/.npmignore to exclude node_modules and dist from published tarball
…nCode

- Copy 331 files from upstream get-shit-done submodule (1 copied, 330 diverged)
- Translate 165 files with 908 Claude→OpenCode replacements
- Add SDK bundled source and build to commit tracking
- Validate forbidden strings check passed on all 431 .md files
- Preserve all oc-/-oc- OpenCode-specific files
…tives

The translation incorrectly replaced @anthropic-ai/claude-agent-sdk with
a non-existent @anthropic-ai/OpenCode-agent-sdk in lock files, causing
npm install E404 errors during package installation.
- Copy 428 files from submodule original/get-shit-done (v1.38.5)
- Apply translation rules: 727 replacements across 100 files
- Replace task() calls with @subagent_type shorthand (already done)
- Inject mode: subagent into agent definitions (already done)
- Validate forbidden strings: PASSED (431 files, 0 violations)
- Protect oc-/-oc- files: verified untouched
- Copy 1 file from upstream submodule (sdk/package.json)
- 427 diverged files preserved with local modifications
- 420 orphaned OpenCode-specific files preserved
- Translate artifacts: 0 task() calls (already converted), 1 whitespace fix
- Add agents mode: 0 changes (already present in all 33 agent files)
- Forbidden strings validation: PASSED on 431 files
- Remove deprecated SDK source files (upstream removal)
- Remove duplicate 'Installing to' message (file-ops.js was logging at info level, now debug)
- Detect pre-built SDK dist and skip rebuild when src/ is missing
- Show detailed build error output when SDK build fails
- Return structured result with descriptive message for SDK status in summary
sdk/.npmignore was excluding dist/ which caused MODULE_NOT_FOUND
when running gsd-sdk after npm install. Since src/ was moved to
test-fixtures/, we ship pre-built dist/ instead of rebuilding.

- sdk/.npmignore: remove dist/ exclusion, add src/ exclusion
- sdk/package.json: guard prepublishOnly to only rebuild if src/ exists
Pre-built dist/ imports @anthropic-ai/OpenCode-agent-sdk but
package.json declared @anthropic-ai/claude-agent-sdk, causing
ERR_MODULE_NOT_FOUND at runtime.
- Exclude sdk/** from translation (was corrupting package names)
- Restore sdk/src/ from upstream (test-fixtures/src was identical copy)
- Rebuild sdk/dist/ from clean upstream source
- Revert package.json: claude-agent-sdk is the correct package
  (OpenCode-agent-sdk doesn't exist, was a translation artifact)

The SDK uses @anthropic-ai/claude-agent-sdk which works with both
Claude Code and OpenCode. Translation should not touch SDK files.
Translate remaining Claude Code references in SDK source and dist files
to OpenCode naming. Update translation config and discovery-phase workflow.
Changes span 153 files across sdk/src/ and sdk/dist/ with 664 insertions
and 657 deletions.
- Copy 4 new SDK files from upstream submodule (v1.38.5)
- Translate event-stream/session-runner test and source files
- Update discovery-phase.md translation
- Remove stale SDK dist files
- Update translation config with 1 new rule
- Restore event-stream.d.ts and session-runner.js deleted by sync
- Rebuilt with tsc to match updated source files
The pre-built SDK dist (session-runner.js) imports @anthropic-ai/claude-agent-sdk
at runtime but node_modules was skipped during pre-built install.

- bin/dm/src/commands/install.js: run npm install --omit=dev when dist is pre-built
- bin/install.js: same fix for legacy installer
- M-COPY-AND-TRANSLATE.md: step 4d now includes npm install before build
- DM installer: capture npm install output, verify @anthropic-ai/claude-agent-sdk exists after install
- Legacy installer: check for actual dependency path not just node_modules, show warning if missing
- Remove --omit=dev flag (was potentially causing silent failures)
@anthropic-ai/claude-agent-sdk and ws were only declared in sdk/package.json
but gsd-sdk shim runs from the parent package location. Node's module
resolution couldn't find the deps since they weren't in the parent's
node_modules.

Adding them to the parent package.json ensures they ship with the npm
tarball and are available when gsd-sdk spawns sdk/dist/cli.js.
@rokicool rokicool merged commit 3a63565 into main Apr 27, 2026
5 checks passed
@rokicool rokicool deleted the dev branch April 27, 2026 04:08
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.

1 participant