fix(cli): vendor scaffold-response types, unblock 0.10.0 publish#93
Merged
stackbilt-admin merged 1 commit intomainfrom Apr 9, 2026
Merged
fix(cli): vendor scaffold-response types, unblock 0.10.0 publish#93stackbilt-admin merged 1 commit intomainfrom
stackbilt-admin merged 1 commit intomainfrom
Conversation
…t/contracts @stackbilt/cli had a file:../../../contracts dep pointing to a sibling repo that is not published to npm. Packing the tarball preserved the file: specifier in the resulting package.json, which would cause every downstream `npm install @stackbilt/cli` to fail with ENOENT. Root cause: http-client.ts imported three type-only symbols (ScaffoldFileType, GovernanceDocsType, PromptContextType) from @stackbilt/contracts/dist/scaffold-response. The import was erased at compile time, but the declared dep was still resolved at install time on the consumer side. Fix: vendor the three interfaces inline at packages/cli/src/types/scaffold-contract-types.ts and re-point the type-only import. The contracts dep is then removed from package.json entirely. Verified via `npm pack` tarball inspection — no more file: specifier in the published package.json. When @stackbilt/contracts is properly published to npm, the vendored file can be deleted and http-client.ts re-imports from the real package. Validation: - pnpm run typecheck: clean - pnpm run build: clean - pnpm run test: 345/345 passing (no change) - npm pack tarball: dependencies block has only workspace:^ refs (no file:) This unblocks publishing @stackbilt/cli@0.10.0 and the full 0.10.0 release.
stackbilt-admin
pushed a commit
that referenced
this pull request
Apr 9, 2026
Two small drift-cleanup changes after the 0.10.0 publish: - .ai/state.adf — CURRENT was still v0.8.0 from the #50-53 era, had no mention of blast + surface or the npm publish milestone. Refreshed to reflect the current reality: 0.10.0 live on npm, #94/#90/#69 as the next queue, vendor-fix (#93) recorded in COMPLETED so the scaffold-response type-vendor context isn't lost. - packages/cli/src/http-client.ts — the ScaffoldFile doc comment said "sourced from @stackbilt/contracts" which is no longer accurate after #93. Updated to "vendored from @stackbilt/contracts" and pointed at the local types file for discoverability. No runtime behavior change. Sweep also confirmed the rest of the docs (README, CHANGELOG, PUBLISHING.md, per-package READMEs, docs/) are already 0.10.0-accurate from yesterday's pre-release docs audit.
3 tasks
stackbilt-admin
added a commit
that referenced
this pull request
Apr 9, 2026
Two small drift-cleanup changes after the 0.10.0 publish: - .ai/state.adf — CURRENT was still v0.8.0 from the #50-53 era, had no mention of blast + surface or the npm publish milestone. Refreshed to reflect the current reality: 0.10.0 live on npm, #94/#90/#69 as the next queue, vendor-fix (#93) recorded in COMPLETED so the scaffold-response type-vendor context isn't lost. - packages/cli/src/http-client.ts — the ScaffoldFile doc comment said "sourced from @stackbilt/contracts" which is no longer accurate after #93. Updated to "vendored from @stackbilt/contracts" and pointed at the local types file for discoverability. No runtime behavior change. Sweep also confirmed the rest of the docs (README, CHANGELOG, PUBLISHING.md, per-package READMEs, docs/) are already 0.10.0-accurate from yesterday's pre-release docs audit. Co-authored-by: Kurt Overmier <kurt@stackbilt.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
`@stackbilt/cli` had `"@stackbilt/contracts": "file:../../../contracts"` in its dependencies — pointing to an unpublished sibling repo. Publishing the tarball as-is would ship a broken package: every downstream `npm install @stackbilt/cli` would fail with ENOENT when npm tries to resolve the file: spec.
Root cause
`packages/cli/src/http-client.ts` imported three type-only symbols from `@stackbilt/contracts/dist/scaffold-response`:
These were erased at compile time (zero runtime cost), but the declared `dependencies` entry is still resolved at install time on the consumer side. Caught during 0.10.0 publish pre-flight via `npm pack` tarball inspection.
Fix
Vendored the three interfaces inline at `packages/cli/src/types/scaffold-contract-types.ts` with structural copies of the upstream `@stackbilt/contracts@0.1.0` definitions. Re-pointed the type-only import in `http-client.ts`. Removed `@stackbilt/contracts` from `cli/package.json` dependencies.
Validation
Follow-up
When `@stackbilt/contracts` is properly published to npm, the vendored file can be deleted and `http-client.ts` can re-import from the real package.
Unblocks
🤖 Generated with Claude Code