@specship/specship 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +6 -0
- package/LICENSE +21 -0
- package/README.md +583 -0
- package/agents/specship-explorer.md +29 -0
- package/commands/ss-behaviour.md +116 -0
- package/commands/ss-check.md +43 -0
- package/commands/ss-design-implement.md +84 -0
- package/commands/ss-design-loop.md +125 -0
- package/commands/ss-explore.md +43 -0
- package/commands/ss-spec.md +118 -0
- package/dist/activation/starter-prompt.d.ts +57 -0
- package/dist/activation/starter-prompt.d.ts.map +1 -0
- package/dist/activation/starter-prompt.js +164 -0
- package/dist/activation/starter-prompt.js.map +1 -0
- package/dist/analytics/specship-impact.d.ts +72 -0
- package/dist/analytics/specship-impact.d.ts.map +1 -0
- package/dist/analytics/specship-impact.js +216 -0
- package/dist/analytics/specship-impact.js.map +1 -0
- package/dist/behaviour/behaviour-surface.d.ts +59 -0
- package/dist/behaviour/behaviour-surface.d.ts.map +1 -0
- package/dist/behaviour/behaviour-surface.js +112 -0
- package/dist/behaviour/behaviour-surface.js.map +1 -0
- package/dist/bin/node-version-check.d.ts +37 -0
- package/dist/bin/node-version-check.d.ts.map +1 -0
- package/dist/bin/node-version-check.js +79 -0
- package/dist/bin/node-version-check.js.map +1 -0
- package/dist/bin/specship.d.ts +25 -0
- package/dist/bin/specship.d.ts.map +1 -0
- package/dist/bin/specship.js +2823 -0
- package/dist/bin/specship.js.map +1 -0
- package/dist/bin/uninstall.d.ts +13 -0
- package/dist/bin/uninstall.d.ts.map +1 -0
- package/dist/bin/uninstall.js +35 -0
- package/dist/bin/uninstall.js.map +1 -0
- package/dist/context/formatter.d.ts +30 -0
- package/dist/context/formatter.d.ts.map +1 -0
- package/dist/context/formatter.js +263 -0
- package/dist/context/formatter.js.map +1 -0
- package/dist/context/index.d.ts +119 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +1289 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/markers.d.ts +19 -0
- package/dist/context/markers.d.ts.map +1 -0
- package/dist/context/markers.js +22 -0
- package/dist/context/markers.js.map +1 -0
- package/dist/db/index.d.ts +103 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +279 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrations.d.ts +44 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/migrations.js +503 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/db/queries.d.ts +357 -0
- package/dist/db/queries.d.ts.map +1 -0
- package/dist/db/queries.js +1504 -0
- package/dist/db/queries.js.map +1 -0
- package/dist/db/schema.sql +451 -0
- package/dist/db/spec-queries.d.ts +130 -0
- package/dist/db/spec-queries.d.ts.map +1 -0
- package/dist/db/spec-queries.js +738 -0
- package/dist/db/spec-queries.js.map +1 -0
- package/dist/db/sqlite-adapter.d.ts +65 -0
- package/dist/db/sqlite-adapter.d.ts.map +1 -0
- package/dist/db/sqlite-adapter.js +214 -0
- package/dist/db/sqlite-adapter.js.map +1 -0
- package/dist/designer/artifact-store.js +54 -0
- package/dist/designer/browser.js +141 -0
- package/dist/designer/cdp-ensure.js +60 -0
- package/dist/designer/cdp-env.js +18 -0
- package/dist/designer/cdp-trace.js +599 -0
- package/dist/designer/cross-platform.js +74 -0
- package/dist/designer/designer-controller.js +1413 -0
- package/dist/designer/file-panel.js +39 -0
- package/dist/designer/interstitials.js +97 -0
- package/dist/designer/oopif-reader.js +176 -0
- package/dist/designer/package-meta.js +18 -0
- package/dist/designer/preview-host.js +50 -0
- package/dist/designer/repo-root.js +31 -0
- package/dist/designer/run-state.js +353 -0
- package/dist/designer/session-store.js +59 -0
- package/dist/designer/ui-anchors.js +651 -0
- package/dist/directory.d.ts +67 -0
- package/dist/directory.d.ts.map +1 -0
- package/dist/directory.js +267 -0
- package/dist/directory.js.map +1 -0
- package/dist/enforce/enforce.d.ts +70 -0
- package/dist/enforce/enforce.d.ts.map +1 -0
- package/dist/enforce/enforce.js +125 -0
- package/dist/enforce/enforce.js.map +1 -0
- package/dist/errors.d.ts +136 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +219 -0
- package/dist/errors.js.map +1 -0
- package/dist/extraction/dfm-extractor.d.ts +31 -0
- package/dist/extraction/dfm-extractor.d.ts.map +1 -0
- package/dist/extraction/dfm-extractor.js +151 -0
- package/dist/extraction/dfm-extractor.js.map +1 -0
- package/dist/extraction/generated-detection.d.ts +30 -0
- package/dist/extraction/generated-detection.d.ts.map +1 -0
- package/dist/extraction/generated-detection.js +80 -0
- package/dist/extraction/generated-detection.js.map +1 -0
- package/dist/extraction/grammars.d.ts +100 -0
- package/dist/extraction/grammars.d.ts.map +1 -0
- package/dist/extraction/grammars.js +426 -0
- package/dist/extraction/grammars.js.map +1 -0
- package/dist/extraction/index.d.ts +138 -0
- package/dist/extraction/index.d.ts.map +1 -0
- package/dist/extraction/index.js +1394 -0
- package/dist/extraction/index.js.map +1 -0
- package/dist/extraction/languages/c-cpp.d.ts +4 -0
- package/dist/extraction/languages/c-cpp.d.ts.map +1 -0
- package/dist/extraction/languages/c-cpp.js +171 -0
- package/dist/extraction/languages/c-cpp.js.map +1 -0
- package/dist/extraction/languages/csharp.d.ts +3 -0
- package/dist/extraction/languages/csharp.d.ts.map +1 -0
- package/dist/extraction/languages/csharp.js +73 -0
- package/dist/extraction/languages/csharp.js.map +1 -0
- package/dist/extraction/languages/dart.d.ts +3 -0
- package/dist/extraction/languages/dart.d.ts.map +1 -0
- package/dist/extraction/languages/dart.js +192 -0
- package/dist/extraction/languages/dart.js.map +1 -0
- package/dist/extraction/languages/go.d.ts +3 -0
- package/dist/extraction/languages/go.d.ts.map +1 -0
- package/dist/extraction/languages/go.js +74 -0
- package/dist/extraction/languages/go.js.map +1 -0
- package/dist/extraction/languages/index.d.ts +10 -0
- package/dist/extraction/languages/index.d.ts.map +1 -0
- package/dist/extraction/languages/index.js +51 -0
- package/dist/extraction/languages/index.js.map +1 -0
- package/dist/extraction/languages/java.d.ts +3 -0
- package/dist/extraction/languages/java.d.ts.map +1 -0
- package/dist/extraction/languages/java.js +70 -0
- package/dist/extraction/languages/java.js.map +1 -0
- package/dist/extraction/languages/javascript.d.ts +3 -0
- package/dist/extraction/languages/javascript.d.ts.map +1 -0
- package/dist/extraction/languages/javascript.js +90 -0
- package/dist/extraction/languages/javascript.js.map +1 -0
- package/dist/extraction/languages/kotlin.d.ts +3 -0
- package/dist/extraction/languages/kotlin.d.ts.map +1 -0
- package/dist/extraction/languages/kotlin.js +259 -0
- package/dist/extraction/languages/kotlin.js.map +1 -0
- package/dist/extraction/languages/lua.d.ts +3 -0
- package/dist/extraction/languages/lua.d.ts.map +1 -0
- package/dist/extraction/languages/lua.js +150 -0
- package/dist/extraction/languages/lua.js.map +1 -0
- package/dist/extraction/languages/luau.d.ts +3 -0
- package/dist/extraction/languages/luau.d.ts.map +1 -0
- package/dist/extraction/languages/luau.js +37 -0
- package/dist/extraction/languages/luau.js.map +1 -0
- package/dist/extraction/languages/objc.d.ts +3 -0
- package/dist/extraction/languages/objc.d.ts.map +1 -0
- package/dist/extraction/languages/objc.js +133 -0
- package/dist/extraction/languages/objc.js.map +1 -0
- package/dist/extraction/languages/pascal.d.ts +3 -0
- package/dist/extraction/languages/pascal.d.ts.map +1 -0
- package/dist/extraction/languages/pascal.js +66 -0
- package/dist/extraction/languages/pascal.js.map +1 -0
- package/dist/extraction/languages/php.d.ts +3 -0
- package/dist/extraction/languages/php.d.ts.map +1 -0
- package/dist/extraction/languages/php.js +107 -0
- package/dist/extraction/languages/php.js.map +1 -0
- package/dist/extraction/languages/python.d.ts +3 -0
- package/dist/extraction/languages/python.d.ts.map +1 -0
- package/dist/extraction/languages/python.js +56 -0
- package/dist/extraction/languages/python.js.map +1 -0
- package/dist/extraction/languages/ruby.d.ts +3 -0
- package/dist/extraction/languages/ruby.d.ts.map +1 -0
- package/dist/extraction/languages/ruby.js +114 -0
- package/dist/extraction/languages/ruby.js.map +1 -0
- package/dist/extraction/languages/rust.d.ts +3 -0
- package/dist/extraction/languages/rust.d.ts.map +1 -0
- package/dist/extraction/languages/rust.js +109 -0
- package/dist/extraction/languages/rust.js.map +1 -0
- package/dist/extraction/languages/scala.d.ts +3 -0
- package/dist/extraction/languages/scala.d.ts.map +1 -0
- package/dist/extraction/languages/scala.js +139 -0
- package/dist/extraction/languages/scala.js.map +1 -0
- package/dist/extraction/languages/swift.d.ts +3 -0
- package/dist/extraction/languages/swift.d.ts.map +1 -0
- package/dist/extraction/languages/swift.js +91 -0
- package/dist/extraction/languages/swift.js.map +1 -0
- package/dist/extraction/languages/typescript.d.ts +3 -0
- package/dist/extraction/languages/typescript.d.ts.map +1 -0
- package/dist/extraction/languages/typescript.js +129 -0
- package/dist/extraction/languages/typescript.js.map +1 -0
- package/dist/extraction/liquid-extractor.d.ts +52 -0
- package/dist/extraction/liquid-extractor.d.ts.map +1 -0
- package/dist/extraction/liquid-extractor.js +313 -0
- package/dist/extraction/liquid-extractor.js.map +1 -0
- package/dist/extraction/mybatis-extractor.d.ts +48 -0
- package/dist/extraction/mybatis-extractor.d.ts.map +1 -0
- package/dist/extraction/mybatis-extractor.js +198 -0
- package/dist/extraction/mybatis-extractor.js.map +1 -0
- package/dist/extraction/parse-worker.d.ts +8 -0
- package/dist/extraction/parse-worker.d.ts.map +1 -0
- package/dist/extraction/parse-worker.js +94 -0
- package/dist/extraction/parse-worker.js.map +1 -0
- package/dist/extraction/specs/markdown-spec-extractor.d.ts +114 -0
- package/dist/extraction/specs/markdown-spec-extractor.d.ts.map +1 -0
- package/dist/extraction/specs/markdown-spec-extractor.js +699 -0
- package/dist/extraction/specs/markdown-spec-extractor.js.map +1 -0
- package/dist/extraction/specs/types.d.ts +39 -0
- package/dist/extraction/specs/types.d.ts.map +1 -0
- package/dist/extraction/specs/types.js +8 -0
- package/dist/extraction/specs/types.js.map +1 -0
- package/dist/extraction/svelte-extractor.d.ts +56 -0
- package/dist/extraction/svelte-extractor.d.ts.map +1 -0
- package/dist/extraction/svelte-extractor.js +272 -0
- package/dist/extraction/svelte-extractor.js.map +1 -0
- package/dist/extraction/tree-sitter-helpers.d.ts +28 -0
- package/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
- package/dist/extraction/tree-sitter-helpers.js +103 -0
- package/dist/extraction/tree-sitter-helpers.js.map +1 -0
- package/dist/extraction/tree-sitter-types.d.ts +193 -0
- package/dist/extraction/tree-sitter-types.d.ts.map +1 -0
- package/dist/extraction/tree-sitter-types.js +10 -0
- package/dist/extraction/tree-sitter-types.js.map +1 -0
- package/dist/extraction/tree-sitter.d.ts +317 -0
- package/dist/extraction/tree-sitter.d.ts.map +1 -0
- package/dist/extraction/tree-sitter.js +3092 -0
- package/dist/extraction/tree-sitter.js.map +1 -0
- package/dist/extraction/vue-extractor.d.ts +51 -0
- package/dist/extraction/vue-extractor.d.ts.map +1 -0
- package/dist/extraction/vue-extractor.js +251 -0
- package/dist/extraction/vue-extractor.js.map +1 -0
- package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/dist/extraction/wasm-runtime-flags.d.ts +38 -0
- package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
- package/dist/extraction/wasm-runtime-flags.js +106 -0
- package/dist/extraction/wasm-runtime-flags.js.map +1 -0
- package/dist/fitness/fitness.d.ts +75 -0
- package/dist/fitness/fitness.d.ts.map +1 -0
- package/dist/fitness/fitness.js +204 -0
- package/dist/fitness/fitness.js.map +1 -0
- package/dist/graph/index.d.ts +8 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +13 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/maintainability.d.ts +115 -0
- package/dist/graph/maintainability.d.ts.map +1 -0
- package/dist/graph/maintainability.js +299 -0
- package/dist/graph/maintainability.js.map +1 -0
- package/dist/graph/queries.d.ts +106 -0
- package/dist/graph/queries.d.ts.map +1 -0
- package/dist/graph/queries.js +366 -0
- package/dist/graph/queries.js.map +1 -0
- package/dist/graph/traversal.d.ts +127 -0
- package/dist/graph/traversal.d.ts.map +1 -0
- package/dist/graph/traversal.js +531 -0
- package/dist/graph/traversal.js.map +1 -0
- package/dist/health/smoke-check.d.ts +85 -0
- package/dist/health/smoke-check.d.ts.map +1 -0
- package/dist/health/smoke-check.js +246 -0
- package/dist/health/smoke-check.js.map +1 -0
- package/dist/index.d.ts +674 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1473 -0
- package/dist/index.js.map +1 -0
- package/dist/installer/config-writer.d.ts +28 -0
- package/dist/installer/config-writer.d.ts.map +1 -0
- package/dist/installer/config-writer.js +91 -0
- package/dist/installer/config-writer.js.map +1 -0
- package/dist/installer/index.d.ts +100 -0
- package/dist/installer/index.d.ts.map +1 -0
- package/dist/installer/index.js +442 -0
- package/dist/installer/index.js.map +1 -0
- package/dist/installer/init-offer.d.ts +31 -0
- package/dist/installer/init-offer.d.ts.map +1 -0
- package/dist/installer/init-offer.js +30 -0
- package/dist/installer/init-offer.js.map +1 -0
- package/dist/installer/instructions-template.d.ts +36 -0
- package/dist/installer/instructions-template.d.ts.map +1 -0
- package/dist/installer/instructions-template.js +57 -0
- package/dist/installer/instructions-template.js.map +1 -0
- package/dist/installer/targets/claude.d.ts +146 -0
- package/dist/installer/targets/claude.d.ts.map +1 -0
- package/dist/installer/targets/claude.js +864 -0
- package/dist/installer/targets/claude.js.map +1 -0
- package/dist/installer/targets/registry.d.ts +19 -0
- package/dist/installer/targets/registry.d.ts.map +1 -0
- package/dist/installer/targets/registry.js +31 -0
- package/dist/installer/targets/registry.js.map +1 -0
- package/dist/installer/targets/shared.d.ts +76 -0
- package/dist/installer/targets/shared.d.ts.map +1 -0
- package/dist/installer/targets/shared.js +260 -0
- package/dist/installer/targets/shared.js.map +1 -0
- package/dist/installer/targets/types.d.ts +95 -0
- package/dist/installer/targets/types.d.ts.map +1 -0
- package/dist/installer/targets/types.js +12 -0
- package/dist/installer/targets/types.js.map +1 -0
- package/dist/isolation/worktree.d.ts +65 -0
- package/dist/isolation/worktree.d.ts.map +1 -0
- package/dist/isolation/worktree.js +231 -0
- package/dist/isolation/worktree.js.map +1 -0
- package/dist/mcp/daemon-paths.d.ts +46 -0
- package/dist/mcp/daemon-paths.d.ts.map +1 -0
- package/dist/mcp/daemon-paths.js +125 -0
- package/dist/mcp/daemon-paths.js.map +1 -0
- package/dist/mcp/daemon.d.ts +161 -0
- package/dist/mcp/daemon.d.ts.map +1 -0
- package/dist/mcp/daemon.js +403 -0
- package/dist/mcp/daemon.js.map +1 -0
- package/dist/mcp/designer-tools.d.ts +33 -0
- package/dist/mcp/designer-tools.d.ts.map +1 -0
- package/dist/mcp/designer-tools.js +313 -0
- package/dist/mcp/designer-tools.js.map +1 -0
- package/dist/mcp/engine.d.ts +105 -0
- package/dist/mcp/engine.d.ts.map +1 -0
- package/dist/mcp/engine.js +270 -0
- package/dist/mcp/engine.js.map +1 -0
- package/dist/mcp/fitness-tool.d.ts +12 -0
- package/dist/mcp/fitness-tool.d.ts.map +1 -0
- package/dist/mcp/fitness-tool.js +46 -0
- package/dist/mcp/fitness-tool.js.map +1 -0
- package/dist/mcp/index.d.ts +112 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +477 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/maintainability-tool.d.ts +13 -0
- package/dist/mcp/maintainability-tool.d.ts.map +1 -0
- package/dist/mcp/maintainability-tool.js +64 -0
- package/dist/mcp/maintainability-tool.js.map +1 -0
- package/dist/mcp/proxy.d.ts +81 -0
- package/dist/mcp/proxy.d.ts.map +1 -0
- package/dist/mcp/proxy.js +510 -0
- package/dist/mcp/proxy.js.map +1 -0
- package/dist/mcp/server-instructions.d.ts +18 -0
- package/dist/mcp/server-instructions.d.ts.map +1 -0
- package/dist/mcp/server-instructions.js +79 -0
- package/dist/mcp/server-instructions.js.map +1 -0
- package/dist/mcp/session.d.ts +77 -0
- package/dist/mcp/session.d.ts.map +1 -0
- package/dist/mcp/session.js +294 -0
- package/dist/mcp/session.js.map +1 -0
- package/dist/mcp/spec-tools.d.ts +39 -0
- package/dist/mcp/spec-tools.d.ts.map +1 -0
- package/dist/mcp/spec-tools.js +534 -0
- package/dist/mcp/spec-tools.js.map +1 -0
- package/dist/mcp/tools.d.ts +417 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +3179 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/transport.d.ts +188 -0
- package/dist/mcp/transport.d.ts.map +1 -0
- package/dist/mcp/transport.js +343 -0
- package/dist/mcp/transport.js.map +1 -0
- package/dist/mcp/version.d.ts +19 -0
- package/dist/mcp/version.d.ts.map +1 -0
- package/dist/mcp/version.js +71 -0
- package/dist/mcp/version.js.map +1 -0
- package/dist/reflect/apply.d.ts +31 -0
- package/dist/reflect/apply.d.ts.map +1 -0
- package/dist/reflect/apply.js +286 -0
- package/dist/reflect/apply.js.map +1 -0
- package/dist/reflect/hash.d.ts +20 -0
- package/dist/reflect/hash.d.ts.map +1 -0
- package/dist/reflect/hash.js +36 -0
- package/dist/reflect/hash.js.map +1 -0
- package/dist/reflect/index.d.ts +16 -0
- package/dist/reflect/index.d.ts.map +1 -0
- package/dist/reflect/index.js +43 -0
- package/dist/reflect/index.js.map +1 -0
- package/dist/reflect/miner.d.ts +21 -0
- package/dist/reflect/miner.d.ts.map +1 -0
- package/dist/reflect/miner.js +463 -0
- package/dist/reflect/miner.js.map +1 -0
- package/dist/reflect/store.d.ts +31 -0
- package/dist/reflect/store.d.ts.map +1 -0
- package/dist/reflect/store.js +101 -0
- package/dist/reflect/store.js.map +1 -0
- package/dist/reflect/sweep.d.ts +26 -0
- package/dist/reflect/sweep.d.ts.map +1 -0
- package/dist/reflect/sweep.js +42 -0
- package/dist/reflect/sweep.js.map +1 -0
- package/dist/reflect/targets.d.ts +52 -0
- package/dist/reflect/targets.d.ts.map +1 -0
- package/dist/reflect/targets.js +192 -0
- package/dist/reflect/targets.js.map +1 -0
- package/dist/reflect/types.d.ts +96 -0
- package/dist/reflect/types.d.ts.map +1 -0
- package/dist/reflect/types.js +13 -0
- package/dist/reflect/types.js.map +1 -0
- package/dist/resolution/brief-link-resolver.d.ts +114 -0
- package/dist/resolution/brief-link-resolver.d.ts.map +1 -0
- package/dist/resolution/brief-link-resolver.js +261 -0
- package/dist/resolution/brief-link-resolver.js.map +1 -0
- package/dist/resolution/callback-synthesizer.d.ts +10 -0
- package/dist/resolution/callback-synthesizer.d.ts.map +1 -0
- package/dist/resolution/callback-synthesizer.js +1300 -0
- package/dist/resolution/callback-synthesizer.js.map +1 -0
- package/dist/resolution/domain-gap-seed.d.ts +60 -0
- package/dist/resolution/domain-gap-seed.d.ts.map +1 -0
- package/dist/resolution/domain-gap-seed.js +87 -0
- package/dist/resolution/domain-gap-seed.js.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.js +225 -0
- package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
- package/dist/resolution/frameworks/csharp.d.ts +8 -0
- package/dist/resolution/frameworks/csharp.d.ts.map +1 -0
- package/dist/resolution/frameworks/csharp.js +241 -0
- package/dist/resolution/frameworks/csharp.js.map +1 -0
- package/dist/resolution/frameworks/drupal.d.ts +51 -0
- package/dist/resolution/frameworks/drupal.d.ts.map +1 -0
- package/dist/resolution/frameworks/drupal.js +367 -0
- package/dist/resolution/frameworks/drupal.js.map +1 -0
- package/dist/resolution/frameworks/expo-modules.d.ts +3 -0
- package/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
- package/dist/resolution/frameworks/expo-modules.js +143 -0
- package/dist/resolution/frameworks/expo-modules.js.map +1 -0
- package/dist/resolution/frameworks/express.d.ts +8 -0
- package/dist/resolution/frameworks/express.d.ts.map +1 -0
- package/dist/resolution/frameworks/express.js +308 -0
- package/dist/resolution/frameworks/express.js.map +1 -0
- package/dist/resolution/frameworks/fabric.d.ts +3 -0
- package/dist/resolution/frameworks/fabric.d.ts.map +1 -0
- package/dist/resolution/frameworks/fabric.js +354 -0
- package/dist/resolution/frameworks/fabric.js.map +1 -0
- package/dist/resolution/frameworks/go.d.ts +8 -0
- package/dist/resolution/frameworks/go.d.ts.map +1 -0
- package/dist/resolution/frameworks/go.js +161 -0
- package/dist/resolution/frameworks/go.js.map +1 -0
- package/dist/resolution/frameworks/index.d.ts +48 -0
- package/dist/resolution/frameworks/index.d.ts.map +1 -0
- package/dist/resolution/frameworks/index.js +161 -0
- package/dist/resolution/frameworks/index.js.map +1 -0
- package/dist/resolution/frameworks/java.d.ts +8 -0
- package/dist/resolution/frameworks/java.d.ts.map +1 -0
- package/dist/resolution/frameworks/java.js +504 -0
- package/dist/resolution/frameworks/java.js.map +1 -0
- package/dist/resolution/frameworks/laravel.d.ts +13 -0
- package/dist/resolution/frameworks/laravel.d.ts.map +1 -0
- package/dist/resolution/frameworks/laravel.js +257 -0
- package/dist/resolution/frameworks/laravel.js.map +1 -0
- package/dist/resolution/frameworks/nestjs.d.ts +26 -0
- package/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
- package/dist/resolution/frameworks/nestjs.js +698 -0
- package/dist/resolution/frameworks/nestjs.js.map +1 -0
- package/dist/resolution/frameworks/play.d.ts +19 -0
- package/dist/resolution/frameworks/play.d.ts.map +1 -0
- package/dist/resolution/frameworks/play.js +111 -0
- package/dist/resolution/frameworks/play.js.map +1 -0
- package/dist/resolution/frameworks/python.d.ts +10 -0
- package/dist/resolution/frameworks/python.d.ts.map +1 -0
- package/dist/resolution/frameworks/python.js +396 -0
- package/dist/resolution/frameworks/python.js.map +1 -0
- package/dist/resolution/frameworks/react-native.d.ts +3 -0
- package/dist/resolution/frameworks/react-native.d.ts.map +1 -0
- package/dist/resolution/frameworks/react-native.js +360 -0
- package/dist/resolution/frameworks/react-native.js.map +1 -0
- package/dist/resolution/frameworks/react.d.ts +8 -0
- package/dist/resolution/frameworks/react.d.ts.map +1 -0
- package/dist/resolution/frameworks/react.js +365 -0
- package/dist/resolution/frameworks/react.js.map +1 -0
- package/dist/resolution/frameworks/ruby.d.ts +8 -0
- package/dist/resolution/frameworks/ruby.d.ts.map +1 -0
- package/dist/resolution/frameworks/ruby.js +302 -0
- package/dist/resolution/frameworks/ruby.js.map +1 -0
- package/dist/resolution/frameworks/rust.d.ts +8 -0
- package/dist/resolution/frameworks/rust.d.ts.map +1 -0
- package/dist/resolution/frameworks/rust.js +304 -0
- package/dist/resolution/frameworks/rust.js.map +1 -0
- package/dist/resolution/frameworks/svelte.d.ts +9 -0
- package/dist/resolution/frameworks/svelte.d.ts.map +1 -0
- package/dist/resolution/frameworks/svelte.js +249 -0
- package/dist/resolution/frameworks/svelte.js.map +1 -0
- package/dist/resolution/frameworks/swift-objc.d.ts +37 -0
- package/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
- package/dist/resolution/frameworks/swift-objc.js +252 -0
- package/dist/resolution/frameworks/swift-objc.js.map +1 -0
- package/dist/resolution/frameworks/swift.d.ts +10 -0
- package/dist/resolution/frameworks/swift.d.ts.map +1 -0
- package/dist/resolution/frameworks/swift.js +400 -0
- package/dist/resolution/frameworks/swift.js.map +1 -0
- package/dist/resolution/frameworks/vue.d.ts +9 -0
- package/dist/resolution/frameworks/vue.d.ts.map +1 -0
- package/dist/resolution/frameworks/vue.js +306 -0
- package/dist/resolution/frameworks/vue.js.map +1 -0
- package/dist/resolution/go-module.d.ts +26 -0
- package/dist/resolution/go-module.d.ts.map +1 -0
- package/dist/resolution/go-module.js +78 -0
- package/dist/resolution/go-module.js.map +1 -0
- package/dist/resolution/import-resolver.d.ts +68 -0
- package/dist/resolution/import-resolver.d.ts.map +1 -0
- package/dist/resolution/import-resolver.js +1275 -0
- package/dist/resolution/import-resolver.js.map +1 -0
- package/dist/resolution/index.d.ts +117 -0
- package/dist/resolution/index.d.ts.map +1 -0
- package/dist/resolution/index.js +895 -0
- package/dist/resolution/index.js.map +1 -0
- package/dist/resolution/lru-cache.d.ts +24 -0
- package/dist/resolution/lru-cache.d.ts.map +1 -0
- package/dist/resolution/lru-cache.js +62 -0
- package/dist/resolution/lru-cache.js.map +1 -0
- package/dist/resolution/name-matcher.d.ts +32 -0
- package/dist/resolution/name-matcher.d.ts.map +1 -0
- package/dist/resolution/name-matcher.js +596 -0
- package/dist/resolution/name-matcher.js.map +1 -0
- package/dist/resolution/path-aliases.d.ts +68 -0
- package/dist/resolution/path-aliases.d.ts.map +1 -0
- package/dist/resolution/path-aliases.js +238 -0
- package/dist/resolution/path-aliases.js.map +1 -0
- package/dist/resolution/spec-link-resolver.d.ts +148 -0
- package/dist/resolution/spec-link-resolver.d.ts.map +1 -0
- package/dist/resolution/spec-link-resolver.js +337 -0
- package/dist/resolution/spec-link-resolver.js.map +1 -0
- package/dist/resolution/strip-comments.d.ts +27 -0
- package/dist/resolution/strip-comments.d.ts.map +1 -0
- package/dist/resolution/strip-comments.js +441 -0
- package/dist/resolution/strip-comments.js.map +1 -0
- package/dist/resolution/swift-objc-bridge.d.ts +134 -0
- package/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
- package/dist/resolution/swift-objc-bridge.js +256 -0
- package/dist/resolution/swift-objc-bridge.js.map +1 -0
- package/dist/resolution/types.d.ts +216 -0
- package/dist/resolution/types.d.ts.map +1 -0
- package/dist/resolution/types.js +8 -0
- package/dist/resolution/types.js.map +1 -0
- package/dist/resolution/workspace-packages.d.ts +48 -0
- package/dist/resolution/workspace-packages.d.ts.map +1 -0
- package/dist/resolution/workspace-packages.js +208 -0
- package/dist/resolution/workspace-packages.js.map +1 -0
- package/dist/search/query-parser.d.ts +57 -0
- package/dist/search/query-parser.d.ts.map +1 -0
- package/dist/search/query-parser.js +177 -0
- package/dist/search/query-parser.js.map +1 -0
- package/dist/search/query-utils.d.ts +71 -0
- package/dist/search/query-utils.d.ts.map +1 -0
- package/dist/search/query-utils.js +380 -0
- package/dist/search/query-utils.js.map +1 -0
- package/dist/server/cli.js +152 -0
- package/dist/server/index.js +12 -0
- package/dist/server/ingest/impact-backfill.js +69 -0
- package/dist/server/ingest/impact-query.js +343 -0
- package/dist/server/ingest/index.js +19 -0
- package/dist/server/ingest/ingestor.js +541 -0
- package/dist/server/ingest/parser.js +104 -0
- package/dist/server/ingest/pricing.js +78 -0
- package/dist/server/ingest/specship-classify.js +153 -0
- package/dist/server/ingest/types.js +9 -0
- package/dist/server/ingest/watcher.js +77 -0
- package/dist/server/package.json +3 -0
- package/dist/server/project-registry.js +101 -0
- package/dist/server/routes/claude.js +907 -0
- package/dist/server/routes/domain.js +0 -0
- package/dist/server/routes/events.js +134 -0
- package/dist/server/routes/graph.js +248 -0
- package/dist/server/routes/maintainability.js +18 -0
- package/dist/server/routes/memory.js +272 -0
- package/dist/server/routes/projects.js +197 -0
- package/dist/server/routes/reflect.js +93 -0
- package/dist/server/routes/spec.js +373 -0
- package/dist/server/routes/status.js +112 -0
- package/dist/server/routes/workflow.js +253 -0
- package/dist/server/server.js +238 -0
- package/dist/server/static-handler.js +87 -0
- package/dist/statusline/active-run.d.ts +16 -0
- package/dist/statusline/active-run.d.ts.map +1 -0
- package/dist/statusline/active-run.js +73 -0
- package/dist/statusline/active-run.js.map +1 -0
- package/dist/statusline/cache.d.ts +21 -0
- package/dist/statusline/cache.d.ts.map +1 -0
- package/dist/statusline/cache.js +34 -0
- package/dist/statusline/cache.js.map +1 -0
- package/dist/statusline/index.d.ts +24 -0
- package/dist/statusline/index.d.ts.map +1 -0
- package/dist/statusline/index.js +128 -0
- package/dist/statusline/index.js.map +1 -0
- package/dist/statusline/paths.d.ts +27 -0
- package/dist/statusline/paths.d.ts.map +1 -0
- package/dist/statusline/paths.js +101 -0
- package/dist/statusline/paths.js.map +1 -0
- package/dist/statusline/render.d.ts +25 -0
- package/dist/statusline/render.d.ts.map +1 -0
- package/dist/statusline/render.js +72 -0
- package/dist/statusline/render.js.map +1 -0
- package/dist/statusline/session-marker.d.ts +30 -0
- package/dist/statusline/session-marker.d.ts.map +1 -0
- package/dist/statusline/session-marker.js +71 -0
- package/dist/statusline/session-marker.js.map +1 -0
- package/dist/statusline/types.d.ts +67 -0
- package/dist/statusline/types.d.ts.map +1 -0
- package/dist/statusline/types.js +16 -0
- package/dist/statusline/types.js.map +1 -0
- package/dist/sync/git-hooks.d.ts +45 -0
- package/dist/sync/git-hooks.d.ts.map +1 -0
- package/dist/sync/git-hooks.js +225 -0
- package/dist/sync/git-hooks.js.map +1 -0
- package/dist/sync/index.d.ts +19 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +35 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/watch-policy.d.ts +48 -0
- package/dist/sync/watch-policy.d.ts.map +1 -0
- package/dist/sync/watch-policy.js +124 -0
- package/dist/sync/watch-policy.js.map +1 -0
- package/dist/sync/watcher.d.ts +283 -0
- package/dist/sync/watcher.d.ts.map +1 -0
- package/dist/sync/watcher.js +606 -0
- package/dist/sync/watcher.js.map +1 -0
- package/dist/sync/worktree.d.ts +54 -0
- package/dist/sync/worktree.d.ts.map +1 -0
- package/dist/sync/worktree.js +137 -0
- package/dist/sync/worktree.js.map +1 -0
- package/dist/types.d.ts +625 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +118 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/glyphs.d.ts +42 -0
- package/dist/ui/glyphs.d.ts.map +1 -0
- package/dist/ui/glyphs.js +78 -0
- package/dist/ui/glyphs.js.map +1 -0
- package/dist/ui/shimmer-progress.d.ts +11 -0
- package/dist/ui/shimmer-progress.d.ts.map +1 -0
- package/dist/ui/shimmer-progress.js +90 -0
- package/dist/ui/shimmer-progress.js.map +1 -0
- package/dist/ui/shimmer-worker.d.ts +2 -0
- package/dist/ui/shimmer-worker.d.ts.map +1 -0
- package/dist/ui/shimmer-worker.js +118 -0
- package/dist/ui/shimmer-worker.js.map +1 -0
- package/dist/ui/types.d.ts +17 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui/types.js +3 -0
- package/dist/ui/types.js.map +1 -0
- package/dist/utils.d.ts +205 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +549 -0
- package/dist/utils.js.map +1 -0
- package/dist/web/chunk-2AJCHB7P.js +1 -0
- package/dist/web/chunk-2CPLUFCH.js +2 -0
- package/dist/web/chunk-2I7L37NS.js +1 -0
- package/dist/web/chunk-2NAWAJB5.js +1 -0
- package/dist/web/chunk-2OJBIPE4.js +1 -0
- package/dist/web/chunk-372AYXK6.js +17 -0
- package/dist/web/chunk-3E2WB6D5.js +1 -0
- package/dist/web/chunk-3EBFYSCH.js +2 -0
- package/dist/web/chunk-3QCQ4BXS.js +1 -0
- package/dist/web/chunk-42XVAQ6I.js +1 -0
- package/dist/web/chunk-4IMMPEYM.js +1 -0
- package/dist/web/chunk-4JYHAP7B.js +1 -0
- package/dist/web/chunk-4TJQJPCZ.js +1 -0
- package/dist/web/chunk-4WZIHTPC.js +1 -0
- package/dist/web/chunk-4YVSYOSD.js +1 -0
- package/dist/web/chunk-52PO6IMB.js +2 -0
- package/dist/web/chunk-54D6RFSW.js +1 -0
- package/dist/web/chunk-5BQIOYKW.js +1 -0
- package/dist/web/chunk-5HGWHUJA.js +1 -0
- package/dist/web/chunk-5XRUOPZE.js +1 -0
- package/dist/web/chunk-5Y244R4G.js +1 -0
- package/dist/web/chunk-6O7Z3P2M.js +1 -0
- package/dist/web/chunk-6QXULGLG.js +1 -0
- package/dist/web/chunk-6RRDPT5Z.js +1 -0
- package/dist/web/chunk-6VKB2ZWM.js +1 -0
- package/dist/web/chunk-7DMFVTU4.js +1 -0
- package/dist/web/chunk-7P5CVBJZ.js +1 -0
- package/dist/web/chunk-7SMPKVEP.js +1 -0
- package/dist/web/chunk-AHLX543M.js +1 -0
- package/dist/web/chunk-AMGJBO7D.js +3 -0
- package/dist/web/chunk-AZJVTPLU.js +1 -0
- package/dist/web/chunk-B3CWIVBW.js +1 -0
- package/dist/web/chunk-BLBRMCN2.js +1 -0
- package/dist/web/chunk-BMIAXD2V.js +2 -0
- package/dist/web/chunk-BPCJLNBS.js +47 -0
- package/dist/web/chunk-BRHEUDLY.js +6 -0
- package/dist/web/chunk-BUXWEHIY.js +1 -0
- package/dist/web/chunk-CD5IZM7Y.js +1 -0
- package/dist/web/chunk-DLQPZWSI.css +1 -0
- package/dist/web/chunk-DSGNOCKQ.js +1 -0
- package/dist/web/chunk-DT5LJYFX.js +1 -0
- package/dist/web/chunk-DYRFLPJA.js +1 -0
- package/dist/web/chunk-E3J3CXR5.js +1 -0
- package/dist/web/chunk-E73OX2P7.js +1 -0
- package/dist/web/chunk-EAXRKDLV.js +1 -0
- package/dist/web/chunk-EBKKDHYI.js +1 -0
- package/dist/web/chunk-EE7V7Q5P.js +1 -0
- package/dist/web/chunk-EKY2FUHU.js +1 -0
- package/dist/web/chunk-EP6XOPXH.js +1 -0
- package/dist/web/chunk-ESGDLJOJ.js +1 -0
- package/dist/web/chunk-ETJG7NCY.js +1 -0
- package/dist/web/chunk-EUUEFEDI.js +1 -0
- package/dist/web/chunk-EX4ZHR4F.js +1 -0
- package/dist/web/chunk-F5UNCSXP.js +1 -0
- package/dist/web/chunk-FFGJXUHI.js +1 -0
- package/dist/web/chunk-FGNZDHTL.js +11 -0
- package/dist/web/chunk-FIJW2UNJ.js +1 -0
- package/dist/web/chunk-FMV5PXRC.js +5 -0
- package/dist/web/chunk-G7VZT5KB.js +3 -0
- package/dist/web/chunk-GCOM4JPR.js +2 -0
- package/dist/web/chunk-GEIIDO6C.js +1 -0
- package/dist/web/chunk-GRZYXPSO.js +7 -0
- package/dist/web/chunk-GWBABPZ5.js +1 -0
- package/dist/web/chunk-GYGPS3AN.js +1 -0
- package/dist/web/chunk-H4GLRD3Q.js +1 -0
- package/dist/web/chunk-H5TWEFYX.js +1 -0
- package/dist/web/chunk-H7AF7YS4.js +1 -0
- package/dist/web/chunk-HCB2N2KH.js +1 -0
- package/dist/web/chunk-HDZDQILN.js +1 -0
- package/dist/web/chunk-HMK6UO6N.js +1 -0
- package/dist/web/chunk-HVVXPI4D.js +1 -0
- package/dist/web/chunk-IHEE5NYJ.js +1 -0
- package/dist/web/chunk-IPB746BT.js +1 -0
- package/dist/web/chunk-ISNEBICW.js +1 -0
- package/dist/web/chunk-J2GZVLHH.js +1 -0
- package/dist/web/chunk-JTFXTIPE.js +903 -0
- package/dist/web/chunk-KHU5M2AL.js +1 -0
- package/dist/web/chunk-KW3DHCFV.js +1 -0
- package/dist/web/chunk-LB6JPLX2.js +1 -0
- package/dist/web/chunk-LBXLFPVN.js +1 -0
- package/dist/web/chunk-LGNSHRCE.js +1 -0
- package/dist/web/chunk-LNSVDHCI.js +1 -0
- package/dist/web/chunk-LVGIY3SO.js +1 -0
- package/dist/web/chunk-LXLHIHEN.js +1 -0
- package/dist/web/chunk-MFHO2F2U.js +4 -0
- package/dist/web/chunk-N5OSSQFZ.js +1 -0
- package/dist/web/chunk-N6SS4G6S.js +1 -0
- package/dist/web/chunk-NAJYJNHS.js +1 -0
- package/dist/web/chunk-NHD66NOI.js +1 -0
- package/dist/web/chunk-NNLJ55MY.js +1 -0
- package/dist/web/chunk-NTBJG6SJ.js +1 -0
- package/dist/web/chunk-NUDB3Q2Y.js +3 -0
- package/dist/web/chunk-OM7JVWQQ.js +1 -0
- package/dist/web/chunk-OXEF5E3E.js +1 -0
- package/dist/web/chunk-PGGJPDJG.js +1 -0
- package/dist/web/chunk-PUYSJNJR.js +1 -0
- package/dist/web/chunk-Q2RVFS45.js +1 -0
- package/dist/web/chunk-Q7L6LLAK.js +1 -0
- package/dist/web/chunk-QCMKJIWY.js +1 -0
- package/dist/web/chunk-QEQRY4QQ.js +1 -0
- package/dist/web/chunk-QH6CF3M3.js +1 -0
- package/dist/web/chunk-QQ5LD7PI.js +1 -0
- package/dist/web/chunk-QR6L3KAC.js +1 -0
- package/dist/web/chunk-QXJS6F3U.js +1 -0
- package/dist/web/chunk-R2DLK4HO.js +1 -0
- package/dist/web/chunk-RD6TVPOT.js +1 -0
- package/dist/web/chunk-RKY4EJYJ.js +1 -0
- package/dist/web/chunk-RONYWVY7.js +1 -0
- package/dist/web/chunk-RSZZWGGC.js +1 -0
- package/dist/web/chunk-RXKXYF2C.js +1 -0
- package/dist/web/chunk-SCNDZRN2.js +1 -0
- package/dist/web/chunk-SH6UVHQC.js +1 -0
- package/dist/web/chunk-SWKJRNYY.js +1 -0
- package/dist/web/chunk-T7AZ65JP.js +1 -0
- package/dist/web/chunk-TCZDVOHD.js +1 -0
- package/dist/web/chunk-TF5TF6IP.js +1 -0
- package/dist/web/chunk-TPTITA3V.js +1 -0
- package/dist/web/chunk-TR335633.js +1 -0
- package/dist/web/chunk-UR5KDXPX.js +1 -0
- package/dist/web/chunk-UR6O2GEH.js +1 -0
- package/dist/web/chunk-UTNMGWTP.js +1 -0
- package/dist/web/chunk-VECWMHJP.js +1 -0
- package/dist/web/chunk-VUACT35R.js +3 -0
- package/dist/web/chunk-VZI7H4SZ.js +1 -0
- package/dist/web/chunk-W22AVG3N.js +1 -0
- package/dist/web/chunk-W6NGHRHX.js +1 -0
- package/dist/web/chunk-WB6YHOD4.js +1 -0
- package/dist/web/chunk-WBT64AWV.js +1 -0
- package/dist/web/chunk-WFXJIXZE.js +4 -0
- package/dist/web/chunk-WTGYRH3Z.js +298 -0
- package/dist/web/chunk-WXTCVDTP.js +1 -0
- package/dist/web/chunk-XCDHWLVH.js +1 -0
- package/dist/web/chunk-Y3H6FFUZ.js +1 -0
- package/dist/web/chunk-Y4F5ULGJ.js +1 -0
- package/dist/web/chunk-YEGKAAEE.js +1 -0
- package/dist/web/chunk-YM2KU57F.js +1 -0
- package/dist/web/chunk-YRERBP6T.js +1 -0
- package/dist/web/chunk-ZLV4VCDG.js +3 -0
- package/dist/web/chunk-ZQUJMA5K.js +4 -0
- package/dist/web/chunk-ZTVI5KFF.js +1 -0
- package/dist/web/favicon-16.png +0 -0
- package/dist/web/favicon-180.png +0 -0
- package/dist/web/favicon-32.png +0 -0
- package/dist/web/favicon-512.png +0 -0
- package/dist/web/favicon-small.svg +15 -0
- package/dist/web/favicon.ico +0 -0
- package/dist/web/favicon.svg +20 -0
- package/dist/web/icon-192.png +0 -0
- package/dist/web/icon-512.png +0 -0
- package/dist/web/index.html +146 -0
- package/dist/web/main-ESADRXN2.css +1 -0
- package/dist/web/main-SQFUMVQA.js +1 -0
- package/dist/web/manifest.webmanifest +15 -0
- package/dist/web/media/codicon-LN6W7LCM.ttf +0 -0
- package/dist/web/styles-KSOPUVDA.css +1 -0
- package/dist/web/sw.js +69 -0
- package/dist/workflows/condition-evaluator.d.ts +75 -0
- package/dist/workflows/condition-evaluator.d.ts.map +1 -0
- package/dist/workflows/condition-evaluator.js +282 -0
- package/dist/workflows/condition-evaluator.js.map +1 -0
- package/dist/workflows/defaults/claude-design-implement.yaml +336 -0
- package/dist/workflows/defaults/index.d.ts +26 -0
- package/dist/workflows/defaults/index.d.ts.map +1 -0
- package/dist/workflows/defaults/index.js +94 -0
- package/dist/workflows/defaults/index.js.map +1 -0
- package/dist/workflows/defaults/spec-author.yaml +214 -0
- package/dist/workflows/defaults/spec-fix.yaml +110 -0
- package/dist/workflows/defaults/spec-implement.yaml +150 -0
- package/dist/workflows/defaults/spec-relink.yaml +81 -0
- package/dist/workflows/defaults/spec-verify.yaml +51 -0
- package/dist/workflows/discovery.d.ts +46 -0
- package/dist/workflows/discovery.d.ts.map +1 -0
- package/dist/workflows/discovery.js +193 -0
- package/dist/workflows/discovery.js.map +1 -0
- package/dist/workflows/executor.d.ts +98 -0
- package/dist/workflows/executor.d.ts.map +1 -0
- package/dist/workflows/executor.js +664 -0
- package/dist/workflows/executor.js.map +1 -0
- package/dist/workflows/runners/approval.d.ts +18 -0
- package/dist/workflows/runners/approval.d.ts.map +1 -0
- package/dist/workflows/runners/approval.js +34 -0
- package/dist/workflows/runners/approval.js.map +1 -0
- package/dist/workflows/runners/bash.d.ts +13 -0
- package/dist/workflows/runners/bash.d.ts.map +1 -0
- package/dist/workflows/runners/bash.js +143 -0
- package/dist/workflows/runners/bash.js.map +1 -0
- package/dist/workflows/runners/cancel.d.ts +10 -0
- package/dist/workflows/runners/cancel.d.ts.map +1 -0
- package/dist/workflows/runners/cancel.js +19 -0
- package/dist/workflows/runners/cancel.js.map +1 -0
- package/dist/workflows/runners/prompt.d.ts +51 -0
- package/dist/workflows/runners/prompt.d.ts.map +1 -0
- package/dist/workflows/runners/prompt.js +306 -0
- package/dist/workflows/runners/prompt.js.map +1 -0
- package/dist/workflows/runners/script.d.ts +17 -0
- package/dist/workflows/runners/script.d.ts.map +1 -0
- package/dist/workflows/runners/script.js +155 -0
- package/dist/workflows/runners/script.js.map +1 -0
- package/dist/workflows/runners/types.d.ts +57 -0
- package/dist/workflows/runners/types.d.ts.map +1 -0
- package/dist/workflows/runners/types.js +13 -0
- package/dist/workflows/runners/types.js.map +1 -0
- package/dist/workflows/schemas/workflow.d.ts +166 -0
- package/dist/workflows/schemas/workflow.d.ts.map +1 -0
- package/dist/workflows/schemas/workflow.js +437 -0
- package/dist/workflows/schemas/workflow.js.map +1 -0
- package/hooks/hooks.json +38 -0
- package/package.json +78 -0
- package/scripts/add-lang/bench.sh +60 -0
- package/scripts/add-lang/check-grammar.mjs +75 -0
- package/scripts/add-lang/dump-ast.mjs +103 -0
- package/scripts/add-lang/verify-extraction.mjs +70 -0
- package/scripts/agent-eval/arms-F.sh +21 -0
- package/scripts/agent-eval/arms-matrix.sh +37 -0
- package/scripts/agent-eval/audit.sh +68 -0
- package/scripts/agent-eval/bench-readme.sh +28 -0
- package/scripts/agent-eval/bench-why-repo.sh +22 -0
- package/scripts/agent-eval/block-read-hook.sh +19 -0
- package/scripts/agent-eval/hook-settings.json +15 -0
- package/scripts/agent-eval/itrun.sh +120 -0
- package/scripts/agent-eval/parse-arms.mjs +116 -0
- package/scripts/agent-eval/parse-bench-readme.mjs +84 -0
- package/scripts/agent-eval/parse-run.mjs +45 -0
- package/scripts/agent-eval/parse-session.mjs +93 -0
- package/scripts/agent-eval/probe-context.mjs +21 -0
- package/scripts/agent-eval/probe-explore.mjs +40 -0
- package/scripts/agent-eval/probe-node.mjs +20 -0
- package/scripts/agent-eval/probe-sweep.mjs +119 -0
- package/scripts/agent-eval/probe-trace.mjs +20 -0
- package/scripts/agent-eval/run-agent.sh +34 -0
- package/scripts/agent-eval/run-all.sh +67 -0
- package/scripts/agent-eval/run-arms.sh +56 -0
- package/scripts/agent-eval/seq-matrix.mjs +137 -0
- package/scripts/build-bundle.sh +118 -0
- package/scripts/build-server-bundle.mjs +80 -0
- package/scripts/build-web-bundle.mjs +66 -0
- package/scripts/extract-release-notes.mjs +130 -0
- package/scripts/local-install.sh +41 -0
- package/scripts/npm-sdk.js +75 -0
- package/scripts/npm-shim.js +246 -0
- package/scripts/offline-install.ps1 +148 -0
- package/scripts/offline-install.sh +149 -0
- package/scripts/pack-npm.sh +119 -0
- package/scripts/prepare-release.mjs +270 -0
- package/scripts/sync-shim-version.mjs +64 -0
- package/selectors.json +41 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// probe-sweep — direct MCP test across N repos × N tools, no claude needed.
|
|
3
|
+
//
|
|
4
|
+
// Measures response characteristics (size, sections present, signals fired)
|
|
5
|
+
// for each (repo, query) pair against the built dist/. Sub-second per probe;
|
|
6
|
+
// the full sweep below runs in ~10-30s vs hours for a real claude audit.
|
|
7
|
+
//
|
|
8
|
+
// Use this to iterate on backend changes rapidly: change tools.ts /
|
|
9
|
+
// context-builder, npm run build, re-run probe-sweep, compare. Once a
|
|
10
|
+
// change looks good on probe metrics, run a focused claude audit for the
|
|
11
|
+
// few repos that matter to confirm end-to-end cost behavior.
|
|
12
|
+
//
|
|
13
|
+
// Usage: node scripts/agent-eval/probe-sweep.mjs [--tool=context|explore|trace] [--repos=a,b,c]
|
|
14
|
+
import { pathToFileURL } from 'node:url';
|
|
15
|
+
import { resolve } from 'node:path';
|
|
16
|
+
|
|
17
|
+
const args = Object.fromEntries(
|
|
18
|
+
process.argv.slice(2).map(a => a.startsWith('--') ? a.slice(2).split('=') : [a, true])
|
|
19
|
+
);
|
|
20
|
+
const TOOL = args.tool ?? 'context';
|
|
21
|
+
|
|
22
|
+
const load = (rel) => import(pathToFileURL(resolve(rel)).href);
|
|
23
|
+
const idx = await load('dist/index.js');
|
|
24
|
+
const tools = await load('dist/mcp/tools.js');
|
|
25
|
+
const SpecShip = idx.default?.default ?? idx.default ?? idx.SpecShip;
|
|
26
|
+
const ToolHandler = tools.ToolHandler ?? tools.default?.ToolHandler;
|
|
27
|
+
|
|
28
|
+
// Each entry: repo, query, optional 2nd arg for trace (from, to).
|
|
29
|
+
// The query is the same prompt used in the real claude audits, so probe
|
|
30
|
+
// output is directly comparable to the agent's would-be input.
|
|
31
|
+
const SWEEP = [
|
|
32
|
+
// Small realworld template repos (the loss cases from the cross-language sweep)
|
|
33
|
+
{ id: 'gin-rw', repo: '/tmp/specship-corpus/gin-realworld', q: 'How does this Gin app route a request through its middleware chain to a handler?' },
|
|
34
|
+
{ id: 'go-mux', repo: '/tmp/specship-corpus/go-mux', q: 'How does this gorilla/mux app route a request to its handler?' },
|
|
35
|
+
{ id: 'fastapi-rw', repo: '/tmp/specship-corpus/fastapi-realworld', q: 'How does FastAPI route a request through its dependencies to a handler?' },
|
|
36
|
+
{ id: 'spring-pc', repo: '/tmp/specship-corpus/spring-petclinic', q: 'How does Spring route an HTTP request to a controller method?' },
|
|
37
|
+
{ id: 'axum-rw', repo: '/tmp/specship-corpus/rust-axum-realworld', q: 'How does Axum route a request to its handler in this app?' },
|
|
38
|
+
{ id: 'express-rw', repo: '/tmp/specship-corpus/express-realworld', q: 'How does this Express app route a request through middleware to a handler?' },
|
|
39
|
+
{ id: 'kotlin-pc', repo: '/tmp/specship-corpus/kotlin-petclinic', q: 'How does the Kotlin Spring app route an HTTP request to its handler?' },
|
|
40
|
+
{ id: 'flask-mb', repo: '/tmp/specship-corpus/flask-microblog', q: 'How does this Flask app route a request to a view function?' },
|
|
41
|
+
{ id: 'vapor-tpl', repo: '/tmp/specship-corpus/vapor-template', q: 'How does Vapor route an HTTP request to its handler?' },
|
|
42
|
+
{ id: 'cpp-leveldb', repo: '/tmp/specship-corpus/cpp-leveldb', q: 'How does LevelDB handle a Put operation through to disk?' },
|
|
43
|
+
{ id: 'lualine', repo: '/tmp/specship-corpus/lualine.nvim', q: 'How does lualine assemble and render the statusline?' },
|
|
44
|
+
{ id: 'drupal-admin', repo: '/tmp/specship-corpus/drupal-admintoolbar', q: 'How does the Drupal admin toolbar module render its toolbar?' },
|
|
45
|
+
{ id: 'svelte-rw', repo: '/tmp/specship-corpus/svelte-realworld', q: 'How does this SvelteKit app route a request to a handler?' },
|
|
46
|
+
{ id: 'react-rw', repo: '/tmp/specship-corpus/react-realworld', q: 'How does this React app fetch and display articles?' },
|
|
47
|
+
{ id: 'rails-rw', repo: '/tmp/specship-corpus/rails-realworld', q: 'How does Rails route a request to a controller action?' },
|
|
48
|
+
{ id: 'flask-rest', repo: '/tmp/specship-corpus/flask-restful-realworld', q: 'How does Flask-RESTful route a request to a resource method?' },
|
|
49
|
+
{ id: 'laravel-rw', repo: '/tmp/specship-corpus/laravel-realworld', q: 'How does Laravel route a request to the controller method?' },
|
|
50
|
+
{ id: 'aspnet-rw', repo: '/tmp/specship-corpus/aspnet-realworld', q: 'How does ASP.NET route a request to the controller action?' },
|
|
51
|
+
// The iter7 wins/ties (to make sure we don't regress)
|
|
52
|
+
{ id: 'cobra', repo: '/tmp/specship-corpus/cobra', q: 'How does cobra parse commands and flags?' },
|
|
53
|
+
{ id: 'sinatra', repo: '/tmp/specship-corpus/sinatra', q: 'How does sinatra route a request to its handler?' },
|
|
54
|
+
{ id: 'slim', repo: '/tmp/specship-corpus/slim', q: 'How does slim route a request and apply middleware?' },
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
// Detect signals in response text — these are the levers we've added that
|
|
58
|
+
// otherwise only show up via "agent ran X more tool calls" downstream.
|
|
59
|
+
const detect = (text) => ({
|
|
60
|
+
hasEntryPoints: /^### Entry Points/m.test(text),
|
|
61
|
+
hasRelatedSymbols: /^### Related Symbols/m.test(text),
|
|
62
|
+
hasFlowTrace: /^## Inline flow trace/m.test(text),
|
|
63
|
+
hasRouteManifest: /^## Routing manifest/m.test(text),
|
|
64
|
+
hasTopHandler: /^### Top handler file/m.test(text),
|
|
65
|
+
hasSmallRepoTail: /This project is small/.test(text),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const filterRepos = args.repos ? new Set(String(args.repos).split(',')) : null;
|
|
69
|
+
const subjects = SWEEP.filter(s => !filterRepos || filterRepos.has(s.id));
|
|
70
|
+
|
|
71
|
+
const t0 = Date.now();
|
|
72
|
+
const rows = [];
|
|
73
|
+
for (const s of subjects) {
|
|
74
|
+
try {
|
|
75
|
+
const cg = SpecShip.openSync(s.repo);
|
|
76
|
+
const handler = new ToolHandler(cg);
|
|
77
|
+
const t1 = Date.now();
|
|
78
|
+
const res = await handler.execute('specship_' + TOOL,
|
|
79
|
+
TOOL === 'context' ? { task: s.q } :
|
|
80
|
+
TOOL === 'explore' ? { query: s.q } : { from: 'main', to: 'main' });
|
|
81
|
+
const text = res.content?.[0]?.text ?? '';
|
|
82
|
+
const signals = detect(text);
|
|
83
|
+
rows.push({
|
|
84
|
+
id: s.id,
|
|
85
|
+
ms: Date.now() - t1,
|
|
86
|
+
chars: text.length,
|
|
87
|
+
lines: text.split('\n').length,
|
|
88
|
+
...signals,
|
|
89
|
+
});
|
|
90
|
+
try { cg.close?.(); } catch {}
|
|
91
|
+
} catch (e) {
|
|
92
|
+
rows.push({ id: s.id, error: String(e).slice(0, 80) });
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Pretty-print as a compact table.
|
|
97
|
+
const fmt = (r) =>
|
|
98
|
+
r.error
|
|
99
|
+
? ` ${r.id.padEnd(13)} ERROR: ${r.error}`
|
|
100
|
+
: ` ${r.id.padEnd(13)} ${String(r.chars).padStart(6)}c ${String(r.lines).padStart(4)}L ${String(r.ms).padStart(4)}ms` +
|
|
101
|
+
` ${r.hasEntryPoints ? 'EP ' : ' '}` +
|
|
102
|
+
`${r.hasFlowTrace ? 'TRC ' : ' '}` +
|
|
103
|
+
`${r.hasRouteManifest ? 'MAN ' : ' '}` +
|
|
104
|
+
`${r.hasTopHandler ? 'HND ' : ' '}` +
|
|
105
|
+
`${r.hasSmallRepoTail ? 'TAIL' : ' '}`;
|
|
106
|
+
console.log(`=== probe-sweep tool=${TOOL} n=${subjects.length} (${Date.now() - t0}ms total) ===`);
|
|
107
|
+
console.log(' id chars lines ms signals');
|
|
108
|
+
console.log(' ' + '-'.repeat(56));
|
|
109
|
+
for (const r of rows) console.log(fmt(r));
|
|
110
|
+
|
|
111
|
+
// Sum + medians for the size pillar
|
|
112
|
+
const sizes = rows.filter(r => !r.error).map(r => r.chars);
|
|
113
|
+
sizes.sort((a, b) => a - b);
|
|
114
|
+
const median = sizes[Math.floor(sizes.length / 2)];
|
|
115
|
+
const sum = sizes.reduce((a, b) => a + b, 0);
|
|
116
|
+
console.log(` ${'-'.repeat(64)}`);
|
|
117
|
+
console.log(` median=${median}c total=${sum}c ` +
|
|
118
|
+
`manifest=${rows.filter(r => r.hasRouteManifest).length}/${rows.filter(r => !r.error).length} ` +
|
|
119
|
+
`top-handler=${rows.filter(r => r.hasTopHandler).length}/${rows.filter(r => !r.error).length}`);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Probe specship_trace against an index using the built dist.
|
|
3
|
+
// Usage: node probe-trace.mjs <repo-with-.specship> <from> <to>
|
|
4
|
+
import { pathToFileURL } from 'node:url';
|
|
5
|
+
import { resolve } from 'node:path';
|
|
6
|
+
|
|
7
|
+
const [, , repo, from, to] = process.argv;
|
|
8
|
+
if (!repo || !from || !to) { console.error('usage: probe-trace.mjs <repo> <from> <to>'); process.exit(1); }
|
|
9
|
+
|
|
10
|
+
const load = async (rel) => import(pathToFileURL(resolve(rel)).href);
|
|
11
|
+
const idx = await load('dist/index.js');
|
|
12
|
+
const tools = await load('dist/mcp/tools.js');
|
|
13
|
+
const SpecShip = idx.default?.default ?? idx.default ?? idx.SpecShip;
|
|
14
|
+
const ToolHandler = tools.ToolHandler ?? tools.default?.ToolHandler;
|
|
15
|
+
|
|
16
|
+
const cg = SpecShip.openSync(repo);
|
|
17
|
+
const h = new ToolHandler(cg);
|
|
18
|
+
const res = await h.execute('specship_trace', { from, to });
|
|
19
|
+
console.log(res.content?.[0]?.text ?? '(no text)');
|
|
20
|
+
try { cg.close?.(); } catch {}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Headless Claude Code run against a repo with specship MCP, capturing the
|
|
3
|
+
# full stream-json so we can see tool calls + token usage. Complements the
|
|
4
|
+
# interactive itrun.sh: headless gives a clean per-tool breakdown + exact
|
|
5
|
+
# tokens/cost, but defaults to the general-purpose subagent (not Explore).
|
|
6
|
+
# To force the Explore path, ask for it in the prompt.
|
|
7
|
+
#
|
|
8
|
+
# Usage: run-agent.sh <repo-path> <label> "<prompt>"
|
|
9
|
+
# Env: AGENT_EVAL_OUT (default /tmp/agent-eval), CG_BIN (specship dist binary)
|
|
10
|
+
set -uo pipefail
|
|
11
|
+
|
|
12
|
+
REPO="$1"; LABEL="$2"; PROMPT="$3"
|
|
13
|
+
CG_BIN="${CG_BIN:-$(command -v specship || echo /usr/local/bin/specship)}"
|
|
14
|
+
OUT_DIR="${AGENT_EVAL_OUT:-/tmp/agent-eval}"; mkdir -p "$OUT_DIR"
|
|
15
|
+
OUT="$OUT_DIR/run-${LABEL}.jsonl"
|
|
16
|
+
|
|
17
|
+
MCP_CONFIG=$(cat <<JSON
|
|
18
|
+
{"mcpServers":{"specship":{"command":"${CG_BIN}","args":["serve","--mcp","--path","${REPO}"]}}}
|
|
19
|
+
JSON
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
echo "→ running [$LABEL] in $REPO"
|
|
23
|
+
cd "$REPO" || exit 1
|
|
24
|
+
|
|
25
|
+
claude -p "$PROMPT" \
|
|
26
|
+
--output-format stream-json --verbose \
|
|
27
|
+
--permission-mode bypassPermissions \
|
|
28
|
+
--model opus \
|
|
29
|
+
--max-budget-usd 2 \
|
|
30
|
+
--strict-mcp-config --mcp-config "$MCP_CONFIG" \
|
|
31
|
+
> "$OUT" 2>"$OUT_DIR/run-${LABEL}.err"
|
|
32
|
+
|
|
33
|
+
echo "exit: $? | wrote $OUT ($(wc -l < "$OUT") lines)"
|
|
34
|
+
node "$(cd "$(dirname "$0")" && pwd)/parse-run.mjs" "$OUT" 2>/dev/null || true
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# With/without A/B (and optional interactive) eval for a specship version on a
|
|
3
|
+
# repo. Specship is the ONLY variable: both arms launch claude with
|
|
4
|
+
# --strict-mcp-config — with = specship-only MCP (pointed at $CG_BIN),
|
|
5
|
+
# without = empty MCP. Built-in Read/Grep/Bash stay available in both arms.
|
|
6
|
+
#
|
|
7
|
+
# Usage: run-all.sh <repo-path> "<question>" [headless|tmux|all]
|
|
8
|
+
# Env: CG_BIN specship binary (default: command -v specship)
|
|
9
|
+
# AGENT_EVAL_OUT output dir (default: /tmp/agent-eval)
|
|
10
|
+
set -uo pipefail
|
|
11
|
+
|
|
12
|
+
REPO="${1:?usage: run-all.sh <repo-path> \"<question>\" [headless|tmux|all]}"
|
|
13
|
+
Q="${2:?question required}"
|
|
14
|
+
MODE="${3:-headless}"
|
|
15
|
+
CG_BIN="${CG_BIN:-$(command -v specship)}"
|
|
16
|
+
OUT="${AGENT_EVAL_OUT:-/tmp/agent-eval}"
|
|
17
|
+
HARNESS="$(cd "$(dirname "$0")" && pwd)"
|
|
18
|
+
mkdir -p "$OUT"
|
|
19
|
+
|
|
20
|
+
[ -n "$CG_BIN" ] || { echo "no specship binary on PATH (set CG_BIN)"; exit 1; }
|
|
21
|
+
[ -d "$REPO/.specship" ] || { echo "no .specship index at $REPO — index it first"; exit 1; }
|
|
22
|
+
case "$MODE" in headless|tmux|all) ;; *) echo "mode must be headless|tmux|all (got '$MODE')"; exit 1;; esac
|
|
23
|
+
|
|
24
|
+
# MCP config files (path form avoids inline-JSON quoting through tmux).
|
|
25
|
+
cat > "$OUT/mcp-specship.json" <<JSON
|
|
26
|
+
{"mcpServers":{"specship":{"command":"$CG_BIN","args":["serve","--mcp","--path","$REPO"]}}}
|
|
27
|
+
JSON
|
|
28
|
+
echo '{"mcpServers":{}}' > "$OUT/mcp-empty.json"
|
|
29
|
+
|
|
30
|
+
echo "###### specship: $CG_BIN"
|
|
31
|
+
echo "###### repo: $REPO"
|
|
32
|
+
echo "###### question: $Q"
|
|
33
|
+
echo
|
|
34
|
+
|
|
35
|
+
# Headless arm: claude -p with stream-json -> exact tool sequence + tokens/cost.
|
|
36
|
+
headless() {
|
|
37
|
+
local label="$1" cfg="$2"
|
|
38
|
+
echo "############################## HEADLESS [$label] ##############################"
|
|
39
|
+
( cd "$REPO" && claude -p "$Q" \
|
|
40
|
+
--output-format stream-json --verbose \
|
|
41
|
+
--permission-mode bypassPermissions \
|
|
42
|
+
--model opus \
|
|
43
|
+
--max-budget-usd 4 \
|
|
44
|
+
--strict-mcp-config --mcp-config "$cfg" \
|
|
45
|
+
> "$OUT/run-$label.jsonl" 2>"$OUT/run-$label.err" )
|
|
46
|
+
echo "exit $? -> $OUT/run-$label.jsonl ($(wc -l < "$OUT/run-$label.jsonl" | tr -d ' ') lines)"
|
|
47
|
+
tail -2 "$OUT/run-$label.err" 2>/dev/null
|
|
48
|
+
node "$HARNESS/parse-run.mjs" "$OUT/run-$label.jsonl" 2>&1 || true
|
|
49
|
+
echo
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if [ "$MODE" = headless ] || [ "$MODE" = all ]; then
|
|
53
|
+
headless "headless-with" "$OUT/mcp-specship.json"
|
|
54
|
+
headless "headless-without" "$OUT/mcp-empty.json"
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
if [ "$MODE" = tmux ] || [ "$MODE" = all ]; then
|
|
58
|
+
echo "############################## INTERACTIVE [with] ##############################"
|
|
59
|
+
CLAUDE_EXTRA_ARGS="--model opus --strict-mcp-config --mcp-config $OUT/mcp-specship.json" \
|
|
60
|
+
bash "$HARNESS/itrun.sh" "$REPO" "int-with" "$Q" 2>&1 || echo "[itrun WITH failed]"
|
|
61
|
+
echo
|
|
62
|
+
echo "############################## INTERACTIVE [without] ##############################"
|
|
63
|
+
CLAUDE_EXTRA_ARGS="--model opus --strict-mcp-config --mcp-config $OUT/mcp-empty.json" \
|
|
64
|
+
bash "$HARNESS/itrun.sh" "$REPO" "int-without" "$Q" 2>&1 || echo "[itrun WITHOUT failed]"
|
|
65
|
+
echo
|
|
66
|
+
fi
|
|
67
|
+
echo "############################## RUN-ALL COMPLETE ##############################"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Tool-surface ablation — run ONE repo+question under ONE arm.
|
|
3
|
+
#
|
|
4
|
+
# Arms vary (exposed specship tools, trace-first steering). Tools are trimmed
|
|
5
|
+
# SERVER-SIDE via SPECSHIP_MCP_TOOLS in the MCP config's `env` block, so an
|
|
6
|
+
# ablated tool is genuinely absent from ListTools — no deferred-ToolSearch or
|
|
7
|
+
# denied-call confound (which --disallowedTools would introduce). Steering is
|
|
8
|
+
# injected with --append-system-prompt, so no rebuild of the shipped
|
|
9
|
+
# server-instructions is needed to A/B it.
|
|
10
|
+
#
|
|
11
|
+
# A control all tools no steering
|
|
12
|
+
# B steer all tools trace-first
|
|
13
|
+
# C no-explore hide explore trace-first
|
|
14
|
+
# D trace-centric hide explore+context trace-first
|
|
15
|
+
# E control-probe hide explore+context trace-first (caller passes a NON-flow Q)
|
|
16
|
+
#
|
|
17
|
+
# Usage: run-arms.sh <repo-path> "<question>" <A|B|C|D|E> [run-id]
|
|
18
|
+
set -uo pipefail
|
|
19
|
+
REPO="${1:?repo path}"; Q="${2:?question}"; ARM="${3:?arm A-E}"; RID="${4:-1}"
|
|
20
|
+
CG_BIN="${CG_BIN:-$(command -v specship)}"
|
|
21
|
+
OUT="${ARMS_OUT:-/tmp/arms}/$(basename "$REPO")"
|
|
22
|
+
mkdir -p "$OUT"
|
|
23
|
+
[ -n "$CG_BIN" ] || { echo "no specship binary (set CG_BIN)"; exit 1; }
|
|
24
|
+
[ -d "$REPO/.specship" ] || { echo "no .specship index at $REPO"; exit 1; }
|
|
25
|
+
|
|
26
|
+
STEER='Flow questions ("how does X reach/become Y", "trace the flow", request to handler, state to render): call specship_trace(from,to) FIRST — one call returns the whole path. Use specship_context/search only to locate the two endpoint symbols if you do not know them. Do NOT reconstruct the path with repeated search/callers/explore.'
|
|
27
|
+
KEEP_NO_EXPLORE="trace,search,node,context,callers,callees,impact,files,status"
|
|
28
|
+
KEEP_TRACE_CENTRIC="trace,search,node,callers,callees,impact,files,status"
|
|
29
|
+
|
|
30
|
+
case "$ARM" in
|
|
31
|
+
A|G|H|I) TOOLS=""; STEERING="" ;; # no steering; H = body-trace, I = body-trace + destination callees (sufficiency)
|
|
32
|
+
B|F) TOOLS=""; STEERING="$STEER" ;; # F = B's surface, run on the body-inlining trace build
|
|
33
|
+
C) TOOLS="$KEEP_NO_EXPLORE"; STEERING="$STEER" ;;
|
|
34
|
+
D|E) TOOLS="$KEEP_TRACE_CENTRIC"; STEERING="$STEER" ;;
|
|
35
|
+
*) echo "bad arm '$ARM' (want A|B|C|D|E)"; exit 1 ;;
|
|
36
|
+
esac
|
|
37
|
+
|
|
38
|
+
CFG="$OUT/mcp-$ARM.json"
|
|
39
|
+
if [ -n "$TOOLS" ]; then
|
|
40
|
+
cat > "$CFG" <<JSON
|
|
41
|
+
{"mcpServers":{"specship":{"command":"$CG_BIN","args":["serve","--mcp","--path","$REPO"],"env":{"SPECSHIP_MCP_TOOLS":"$TOOLS"}}}}
|
|
42
|
+
JSON
|
|
43
|
+
else
|
|
44
|
+
cat > "$CFG" <<JSON
|
|
45
|
+
{"mcpServers":{"specship":{"command":"$CG_BIN","args":["serve","--mcp","--path","$REPO"]}}}
|
|
46
|
+
JSON
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
LOG="$OUT/$ARM-r$RID.jsonl"; ERR="$OUT/$ARM-r$RID.err"
|
|
50
|
+
ARGS=( -p "$Q" --output-format stream-json --verbose
|
|
51
|
+
--permission-mode bypassPermissions --model opus --max-budget-usd 4
|
|
52
|
+
--strict-mcp-config --mcp-config "$CFG" )
|
|
53
|
+
[ -n "$STEERING" ] && ARGS+=( --append-system-prompt "$STEERING" )
|
|
54
|
+
|
|
55
|
+
( cd "$REPO" && claude "${ARGS[@]}" > "$LOG" 2>"$ERR" )
|
|
56
|
+
echo "[$(basename "$REPO") $ARM r$RID] exit $? -> $LOG ($(wc -l < "$LOG" | tr -d ' ') lines)"
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Mine the surviving A/B stream-json logs (/tmp/ab-matrix/<Cell>/run-headless-*.jsonl)
|
|
3
|
+
// for what the aggregate matrix can't see: the call SEQUENCE and per-call output SIZE.
|
|
4
|
+
//
|
|
5
|
+
// Answers three questions:
|
|
6
|
+
// 1. Trace adoption — on a flow question, does the with-arm actually call specship_trace?
|
|
7
|
+
// 2. Payload size vs repo size — is trace path-scoped (tiny, size-independent) while
|
|
8
|
+
// explore is breadth-scoped (grows with the repo / over-returns on small repos)?
|
|
9
|
+
// 3. Round-trips — num_turns with vs without (the real wall-clock driver).
|
|
10
|
+
//
|
|
11
|
+
// Usage: node scripts/agent-eval/seq-matrix.mjs [/tmp/ab-matrix]
|
|
12
|
+
import { readFileSync, readdirSync, existsSync } from 'fs';
|
|
13
|
+
import { join } from 'path';
|
|
14
|
+
|
|
15
|
+
const AB = process.argv[2] || '/tmp/ab-matrix';
|
|
16
|
+
const MD = new URL('../../docs/benchmarks/specship-ab-matrix.md', import.meta.url).pathname;
|
|
17
|
+
|
|
18
|
+
// repo -> {lang,size,files} from the published matrix table
|
|
19
|
+
const repoMeta = {};
|
|
20
|
+
if (existsSync(MD)) for (const line of readFileSync(MD, 'utf8').split('\n')) {
|
|
21
|
+
const m = line.match(/^\|\s*([^|]+?)\s*\|\s*(S|M|L)\s*\|\s*`([^`]+)`\s*\|\s*(\d+)\s*\|/);
|
|
22
|
+
if (m) repoMeta[m[3]] = { lang: m[1].trim(), size: m[2], files: +m[4] };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const cgShort = (n) => n.replace('mcp__specship__specship_', '').replace('mcp__specship__', '');
|
|
26
|
+
const tag = (n) => n === 'Read' ? 'R' : n === 'Grep' ? 'G' : n === 'Glob' ? 'Gl'
|
|
27
|
+
: n === 'Bash' ? 'B' : n === 'Task' ? 'Ag' : n === 'ToolSearch' ? 'TS'
|
|
28
|
+
: n.includes('specship') ? cgShort(n) : n;
|
|
29
|
+
|
|
30
|
+
function parse(file) {
|
|
31
|
+
if (!existsSync(file)) return null;
|
|
32
|
+
const lines = readFileSync(file, 'utf8').split('\n').filter(Boolean);
|
|
33
|
+
const calls = []; let result = null, initCg = 0;
|
|
34
|
+
for (const l of lines) {
|
|
35
|
+
let ev; try { ev = JSON.parse(l); } catch { continue; }
|
|
36
|
+
if (ev.type === 'system' && ev.subtype === 'init') initCg = (ev.tools || []).filter(t => /specship/.test(t)).length;
|
|
37
|
+
if (ev.type === 'assistant') for (const b of (ev.message?.content || [])) if (b.type === 'tool_use') {
|
|
38
|
+
const i = b.input || {};
|
|
39
|
+
const q = i.query ?? i.symbol ?? i.task ?? (i.from && i.to ? `${i.from}->${i.to}` : (i.file_path || i.command || ''));
|
|
40
|
+
calls.push({ id: b.id, name: b.name, q: String(q ?? '').slice(0, 38), out: 0 });
|
|
41
|
+
}
|
|
42
|
+
if (ev.type === 'user') for (const b of (ev.message?.content || [])) if (b.type === 'tool_result') {
|
|
43
|
+
const c = b.content;
|
|
44
|
+
const txt = typeof c === 'string' ? c : Array.isArray(c) ? c.map(x => x?.text || '').join('') : '';
|
|
45
|
+
const call = calls.find(k => k.id === b.tool_use_id); if (call) call.out = txt.length;
|
|
46
|
+
}
|
|
47
|
+
if (ev.type === 'result') result = ev;
|
|
48
|
+
}
|
|
49
|
+
const cg = calls.filter(c => c.name.includes('specship'));
|
|
50
|
+
const perTool = {};
|
|
51
|
+
for (const c of cg) { const k = cgShort(c.name); (perTool[k] ??= { n: 0, out: 0 }); perTool[k].n++; perTool[k].out += c.out; }
|
|
52
|
+
const traceIdx = cg.findIndex(c => c.name.includes('trace'));
|
|
53
|
+
const u = result?.usage || {};
|
|
54
|
+
return {
|
|
55
|
+
initCg, cg, perTool,
|
|
56
|
+
cgSeq: cg.map(c => cgShort(c.name)),
|
|
57
|
+
seq: calls.map(c => tag(c.name)),
|
|
58
|
+
reads: calls.filter(c => c.name === 'Read').length,
|
|
59
|
+
greps: calls.filter(c => c.name === 'Grep').length,
|
|
60
|
+
cgOut: cg.reduce((s, c) => s + c.out, 0),
|
|
61
|
+
traceUsed: traceIdx >= 0,
|
|
62
|
+
afterTrace: traceIdx >= 0 ? cg.slice(traceIdx + 1).map(c => cgShort(c.name)) : null,
|
|
63
|
+
turns: result?.num_turns ?? null,
|
|
64
|
+
dur: result?.duration_ms ? Math.round(result.duration_ms / 1000) : null,
|
|
65
|
+
cost: result?.total_cost_usd || 0,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const cells = [];
|
|
70
|
+
for (const d of readdirSync(AB)) {
|
|
71
|
+
const dir = join(AB, d);
|
|
72
|
+
if (!existsSync(join(dir, 'run-headless-with.jsonl'))) continue;
|
|
73
|
+
const log = existsSync(join(AB, d + '.log')) ? readFileSync(join(AB, d + '.log'), 'utf8') : '';
|
|
74
|
+
const repo = (log.match(/repo:\s*\S*\/([^\s/]+)/) || [])[1] || d;
|
|
75
|
+
const question = (log.match(/question:\s*(.+)/) || [])[1] || '';
|
|
76
|
+
cells.push({ cell: d, repo, question, ...(repoMeta[repo] || {}),
|
|
77
|
+
with: parse(join(dir, 'run-headless-with.jsonl')),
|
|
78
|
+
without: parse(join(dir, 'run-headless-without.jsonl')) });
|
|
79
|
+
}
|
|
80
|
+
cells.sort((a, b) => (a.files || 0) - (b.files || 0));
|
|
81
|
+
|
|
82
|
+
const k = (n) => (n / 1000).toFixed(1);
|
|
83
|
+
const pad = (s, n) => String(s).padEnd(n);
|
|
84
|
+
|
|
85
|
+
// ---- per-cell sequence table ----
|
|
86
|
+
console.log('\n=== PER-CELL: with-arm specship sequence + payload (sorted by repo size) ===');
|
|
87
|
+
console.log(pad('repo', 22), pad('files', 6), 'trace', pad('cg-call sequence', 40), pad('cgOutK', 7), 'turns(w/wo)');
|
|
88
|
+
for (const c of cells) {
|
|
89
|
+
const w = c.with;
|
|
90
|
+
console.log(
|
|
91
|
+
pad(c.repo, 22), pad(c.files ?? '?', 6),
|
|
92
|
+
pad(w.traceUsed ? 'YES' : 'no', 5),
|
|
93
|
+
pad(w.cgSeq.join(',') || '(none)', 40),
|
|
94
|
+
pad(k(w.cgOut), 7),
|
|
95
|
+
`${w.turns}/${c.without?.turns}`,
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// ---- trace adoption ----
|
|
100
|
+
const flow = cells; // every matrix question is a canonical flow question by design
|
|
101
|
+
const used = flow.filter(c => c.with.traceUsed);
|
|
102
|
+
console.log(`\n=== TRACE ADOPTION (all ${flow.length} cells are flow questions) ===`);
|
|
103
|
+
console.log(`trace called in ${used.length}/${flow.length} cells`);
|
|
104
|
+
console.log('used trace:', used.map(c => c.repo).join(', ') || '(none)');
|
|
105
|
+
if (used.length) console.log('after-trace follow-ups:', used.map(c => `${c.repo}[${c.with.afterTrace.join(',') || 'none'}]`).join(' '));
|
|
106
|
+
|
|
107
|
+
// ---- payload size by repo-size tier ----
|
|
108
|
+
const tier = (f) => f < 200 ? 'S(<200)' : f < 2000 ? 'M(<2000)' : 'L(>=2000)';
|
|
109
|
+
const byTier = {};
|
|
110
|
+
for (const c of cells) { (byTier[tier(c.files || 0)] ??= []).push(c.with.cgOut); }
|
|
111
|
+
console.log('\n=== with-arm TOTAL specship payload by repo-size tier ===');
|
|
112
|
+
for (const t of ['S(<200)', 'M(<2000)', 'L(>=2000)']) {
|
|
113
|
+
const a = byTier[t] || []; if (!a.length) continue;
|
|
114
|
+
const avg = a.reduce((s, x) => s + x, 0) / a.length;
|
|
115
|
+
console.log(` ${pad(t, 10)} n=${a.length} avg cgOut=${k(avg)}K range ${k(Math.min(...a))}-${k(Math.max(...a))}K`);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// ---- per-tool usage + avg payload (breadth vs path evidence) ----
|
|
119
|
+
const tot = {};
|
|
120
|
+
for (const c of cells) for (const [name, v] of Object.entries(c.with.perTool)) {
|
|
121
|
+
(tot[name] ??= { n: 0, out: 0 }); tot[name].n += v.n; tot[name].out += v.out;
|
|
122
|
+
}
|
|
123
|
+
console.log('\n=== specship tool usage across all cells (n calls, avg payload/call) ===');
|
|
124
|
+
for (const [name, v] of Object.entries(tot).sort((a, b) => b[1].n - a[1].n)) {
|
|
125
|
+
console.log(` ${pad(name, 10)} calls=${pad(v.n, 4)} avg=${k(v.out / v.n)}K/call total=${k(v.out)}K`);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// ---- round-trips ----
|
|
129
|
+
const sum = (arr, f) => arr.reduce((s, x) => s + (f(x) || 0), 0);
|
|
130
|
+
const wTurns = sum(cells, c => c.with.turns), woTurns = sum(cells, c => c.without?.turns);
|
|
131
|
+
const wCalls = sum(cells, c => c.with.cg.length);
|
|
132
|
+
const tsAll = cells.every(c => c.with.seq[0] === 'TS');
|
|
133
|
+
console.log('\n=== ROUND-TRIPS ===');
|
|
134
|
+
console.log(`turns: with=${wTurns} without=${woTurns} (${((1 - wTurns / woTurns) * 100).toFixed(0)}% fewer with)`);
|
|
135
|
+
console.log(`avg turns/cell: with=${(wTurns / cells.length).toFixed(1)} without=${(woTurns / cells.length).toFixed(1)}`);
|
|
136
|
+
console.log(`total specship calls=${wCalls} (avg ${(wCalls / cells.length).toFixed(1)}/cell)`);
|
|
137
|
+
console.log(`every with-arm opens with a ToolSearch round-trip (deferred tools): ${tsAll ? 'YES — 1 fixed tax/run' : 'no'}`);
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# Build a self-contained SpecShip bundle: an official Node runtime + the
|
|
4
|
+
# compiled app + its production deps, so SpecShip runs with NO system Node and
|
|
5
|
+
# NO native build — node:sqlite is built into the bundled Node. One archive per
|
|
6
|
+
# platform.
|
|
7
|
+
#
|
|
8
|
+
# Because dropping better-sqlite3 left zero native addons, the recipe is pure
|
|
9
|
+
# file-packaging (download the target's Node, copy the app, archive) — so any
|
|
10
|
+
# platform's bundle can be built on any OS. No cross-compile, no native runners.
|
|
11
|
+
#
|
|
12
|
+
# Usage:
|
|
13
|
+
# scripts/build-bundle.sh <target> [node-version]
|
|
14
|
+
# target: darwin-arm64 | darwin-x64 | linux-x64 | linux-arm64
|
|
15
|
+
# | win32-x64 | win32-arm64
|
|
16
|
+
# node-version: e.g. v24.16.0 (default below; pin for reproducible builds)
|
|
17
|
+
#
|
|
18
|
+
# Output:
|
|
19
|
+
# unix: release/specship-<target>.tar.gz (launcher: bin/specship)
|
|
20
|
+
# windows: release/specship-<target>.zip (launcher: bin/specship.cmd)
|
|
21
|
+
set -euo pipefail
|
|
22
|
+
|
|
23
|
+
TARGET="${1:?usage: build-bundle.sh <target> [node-version]}"
|
|
24
|
+
NODE_VERSION="${2:-v24.16.0}"
|
|
25
|
+
|
|
26
|
+
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
27
|
+
OUT="$ROOT/release"
|
|
28
|
+
WORK="$(mktemp -d)"
|
|
29
|
+
trap 'rm -rf "$WORK"' EXIT
|
|
30
|
+
|
|
31
|
+
ARCH="${TARGET##*-}" # x64 | arm64
|
|
32
|
+
OSFAM="${TARGET%-*}" # darwin | linux | win32
|
|
33
|
+
|
|
34
|
+
echo "[bundle] target=${TARGET} node=${NODE_VERSION}"
|
|
35
|
+
|
|
36
|
+
# 1. Download + extract the official Node runtime for the target platform.
|
|
37
|
+
if [ "$OSFAM" = "win32" ]; then
|
|
38
|
+
NODE_DIST="node-${NODE_VERSION}-win-${ARCH}"
|
|
39
|
+
NODE_URL="https://nodejs.org/dist/${NODE_VERSION}/${NODE_DIST}.zip"
|
|
40
|
+
echo "[bundle] downloading ${NODE_URL}"
|
|
41
|
+
curl -fsSL "$NODE_URL" -o "$WORK/node.zip"
|
|
42
|
+
if command -v unzip >/dev/null 2>&1; then
|
|
43
|
+
unzip -q "$WORK/node.zip" -d "$WORK"
|
|
44
|
+
else
|
|
45
|
+
tar -xf "$WORK/node.zip" -C "$WORK" # bsdtar can read zip
|
|
46
|
+
fi
|
|
47
|
+
NODE_BIN="$WORK/${NODE_DIST}/node.exe"
|
|
48
|
+
else
|
|
49
|
+
NODE_DIST="node-${NODE_VERSION}-${TARGET}"
|
|
50
|
+
NODE_URL="https://nodejs.org/dist/${NODE_VERSION}/${NODE_DIST}.tar.gz"
|
|
51
|
+
echo "[bundle] downloading ${NODE_URL}"
|
|
52
|
+
curl -fsSL "$NODE_URL" -o "$WORK/node.tar.gz"
|
|
53
|
+
tar -xzf "$WORK/node.tar.gz" -C "$WORK"
|
|
54
|
+
NODE_BIN="$WORK/${NODE_DIST}/bin/node"
|
|
55
|
+
fi
|
|
56
|
+
[ -f "$NODE_BIN" ] || { echo "[bundle] error: node binary not found ($NODE_BIN)" >&2; exit 1; }
|
|
57
|
+
|
|
58
|
+
# 2. Build the app (compiled JS + copied wasm/schema assets).
|
|
59
|
+
echo "[bundle] building app"
|
|
60
|
+
( cd "$ROOT" && npm run build >/dev/null )
|
|
61
|
+
|
|
62
|
+
# 3. Stage: app + production-only deps (pure JS/wasm → portable across platforms).
|
|
63
|
+
STAGE="$WORK/specship-${TARGET}"
|
|
64
|
+
mkdir -p "$STAGE/lib" "$STAGE/bin"
|
|
65
|
+
cp -R "$ROOT/dist" "$STAGE/lib/dist"
|
|
66
|
+
cp "$ROOT/package.json" "$ROOT/package-lock.json" "$STAGE/lib/"
|
|
67
|
+
echo "[bundle] installing production dependencies"
|
|
68
|
+
( cd "$STAGE/lib" && npm ci --omit=dev --ignore-scripts >/dev/null 2>&1 )
|
|
69
|
+
rm -f "$STAGE/lib/package-lock.json"
|
|
70
|
+
|
|
71
|
+
# 4. Vendored Node + launcher (the launcher uses the bundled Node by relative
|
|
72
|
+
# path, so no system Node is ever needed).
|
|
73
|
+
#
|
|
74
|
+
# `--liftoff-only`: keep tree-sitter's large WASM grammars on V8's Liftoff
|
|
75
|
+
# baseline compiler so they never reach the turboshaft optimizing tier, whose
|
|
76
|
+
# per-compilation Zone arena OOMs the whole process (`Fatal process out of
|
|
77
|
+
# memory: Zone`) on Node >= 22 — even with tens of GB free. The flag is read at
|
|
78
|
+
# V8 engine init so it must be on node's command line; the parse worker inherits
|
|
79
|
+
# it. See issues #293/#298 and src/extraction/wasm-runtime-flags.ts. (The CLI
|
|
80
|
+
# also self-relaunches with this flag when launched without it, so non-bundled
|
|
81
|
+
# runs are covered too; passing it here avoids that extra spawn.)
|
|
82
|
+
if [ "$OSFAM" = "win32" ]; then
|
|
83
|
+
cp "$NODE_BIN" "$STAGE/node.exe"
|
|
84
|
+
printf '@"%%~dp0..\\node.exe" --liftoff-only "%%~dp0..\\lib\\dist\\bin\\specship.js" %%*\r\n' \
|
|
85
|
+
> "$STAGE/bin/specship.cmd"
|
|
86
|
+
else
|
|
87
|
+
cp "$NODE_BIN" "$STAGE/node"
|
|
88
|
+
cat > "$STAGE/bin/specship" <<'LAUNCH'
|
|
89
|
+
#!/bin/sh
|
|
90
|
+
# Resolve symlinks (e.g. the ~/.local/bin/specship link install.sh creates) so
|
|
91
|
+
# we find the real bundle dir, not the symlink's location.
|
|
92
|
+
SELF="$0"
|
|
93
|
+
while [ -L "$SELF" ]; do
|
|
94
|
+
target="$(readlink "$SELF")"
|
|
95
|
+
case "$target" in
|
|
96
|
+
/*) SELF="$target" ;;
|
|
97
|
+
*) SELF="$(dirname "$SELF")/$target" ;;
|
|
98
|
+
esac
|
|
99
|
+
done
|
|
100
|
+
DIR="$(cd "$(dirname "$SELF")/.." && pwd)"
|
|
101
|
+
# --liftoff-only: avoid the V8 turboshaft WASM Zone OOM (issues #293/#298).
|
|
102
|
+
exec "$DIR/node" --liftoff-only "$DIR/lib/dist/bin/specship.js" "$@"
|
|
103
|
+
LAUNCH
|
|
104
|
+
chmod +x "$STAGE/bin/specship"
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
# 5. Archive (.zip for Windows, .tar.gz otherwise).
|
|
108
|
+
mkdir -p "$OUT"
|
|
109
|
+
if [ "$OSFAM" = "win32" ]; then
|
|
110
|
+
ARCHIVE="$OUT/specship-${TARGET}.zip"
|
|
111
|
+
rm -f "$ARCHIVE"
|
|
112
|
+
( cd "$WORK" && zip -rqX "$ARCHIVE" "specship-${TARGET}" )
|
|
113
|
+
else
|
|
114
|
+
ARCHIVE="$OUT/specship-${TARGET}.tar.gz"
|
|
115
|
+
# --no-xattrs: don't embed macOS xattrs that make GNU tar warn on Linux.
|
|
116
|
+
tar --no-xattrs -czf "$ARCHIVE" -C "$WORK" "specship-${TARGET}"
|
|
117
|
+
fi
|
|
118
|
+
echo "[bundle] wrote ${ARCHIVE} ($(du -h "$ARCHIVE" | cut -f1))"
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Compile the HTTP server (`packages/server/src/**`) into the root's
|
|
4
|
+
* `dist/server/` so it ships as part of the single npm tarball.
|
|
5
|
+
*
|
|
6
|
+
* Why this lives at root scope: the publish pipeline (build-bundle.sh →
|
|
7
|
+
* pack-npm.sh) copies the root `dist/` + the root `package.json` into each
|
|
8
|
+
* per-platform tarball. Anything below `dist/server/` rides along; anything
|
|
9
|
+
* NOT below `dist/` is invisible to the published artifact. Shipping the
|
|
10
|
+
* server as its own package would mean a second release flow — this avoids
|
|
11
|
+
* it.
|
|
12
|
+
*
|
|
13
|
+
* Runs `tsc` against `packages/server/tsconfig.json` with `--outDir` pointed
|
|
14
|
+
* at the root's `dist/server/`. The server's own `npm run build` is left
|
|
15
|
+
* untouched so the workspace dev path keeps working.
|
|
16
|
+
*/
|
|
17
|
+
import { execFileSync } from 'node:child_process';
|
|
18
|
+
import { existsSync, statSync } from 'node:fs';
|
|
19
|
+
import path from 'node:path';
|
|
20
|
+
import { fileURLToPath } from 'node:url';
|
|
21
|
+
|
|
22
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
23
|
+
const root = path.resolve(here, '..');
|
|
24
|
+
const serverPkg = path.resolve(root, 'packages', 'server');
|
|
25
|
+
const serverTsconfig = path.join(serverPkg, 'tsconfig.json');
|
|
26
|
+
const outDir = path.join(root, 'dist', 'server');
|
|
27
|
+
|
|
28
|
+
if (!existsSync(serverTsconfig)) {
|
|
29
|
+
console.error(`[build-server-bundle] expected ${serverTsconfig} but not found`);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Prefer the workspace's typescript install so the version is consistent.
|
|
34
|
+
const tscBin = process.platform === 'win32'
|
|
35
|
+
? path.join(root, 'node_modules', '.bin', 'tsc.cmd')
|
|
36
|
+
: path.join(root, 'node_modules', '.bin', 'tsc');
|
|
37
|
+
|
|
38
|
+
if (!existsSync(tscBin)) {
|
|
39
|
+
console.error(`[build-server-bundle] tsc not found at ${tscBin} — run npm install at the repo root first`);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
console.log(`[build-server-bundle] compiling ${path.relative(root, serverPkg)} → ${path.relative(root, outDir)}`);
|
|
44
|
+
|
|
45
|
+
// Use absolute path for --outDir so tsc resolves it the same regardless of cwd.
|
|
46
|
+
execFileSync(
|
|
47
|
+
tscBin,
|
|
48
|
+
['-p', serverTsconfig, '--outDir', outDir, '--declaration', 'false', '--declarationMap', 'false', '--sourceMap', 'false'],
|
|
49
|
+
{ stdio: 'inherit', cwd: serverPkg },
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
// Make the CLI executable (its shebang is preserved by tsc, but the file
|
|
53
|
+
// mode isn't automatic on POSIX).
|
|
54
|
+
import('node:fs').then((m) => {
|
|
55
|
+
try { m.chmodSync(path.join(outDir, 'cli.js'), 0o755); } catch { /* ignore */ }
|
|
56
|
+
// Drop a nested package.json so Node treats every .js file under
|
|
57
|
+
// dist/server/ as ESM — the root package.json has no "type": "module",
|
|
58
|
+
// so without this Node would parse these files as CommonJS and the
|
|
59
|
+
// `import`/`import.meta.url` syntax would throw.
|
|
60
|
+
try {
|
|
61
|
+
m.writeFileSync(
|
|
62
|
+
path.join(outDir, 'package.json'),
|
|
63
|
+
JSON.stringify({ type: 'module' }, null, 2) + '\n',
|
|
64
|
+
);
|
|
65
|
+
} catch (e) {
|
|
66
|
+
console.error('[build-server-bundle] could not write dist/server/package.json:', e);
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// Sanity: the entry points should exist.
|
|
72
|
+
for (const f of ['index.js', 'server.js', 'cli.js']) {
|
|
73
|
+
const p = path.join(outDir, f);
|
|
74
|
+
if (!existsSync(p) || !statSync(p).isFile()) {
|
|
75
|
+
console.error(`[build-server-bundle] expected ${path.relative(root, p)} after compile`);
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
console.log(`[build-server-bundle] OK — dist/server/{index,server,cli}.js present`);
|