@selvakumaresra/specship 0.1.3 → 0.4.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/README.md +2 -2
- package/commands/ss-design-implement.md +84 -0
- package/commands/ss-design-loop.md +125 -0
- package/commands/{cg-drifted.md → ss-drifted.md} +2 -2
- package/commands/{cg-fix.md → ss-fix.md} +1 -1
- package/commands/{cg-implement.md → ss-implement.md} +1 -1
- package/commands/ss-spec-author.md +43 -0
- package/commands/ss-spec-review.md +48 -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 +2085 -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 +462 -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 +419 -0
- package/dist/db/spec-queries.d.ts +101 -0
- package/dist/db/spec-queries.d.ts.map +1 -0
- package/dist/db/spec-queries.js +675 -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/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 +59 -0
- package/dist/extraction/specs/markdown-spec-extractor.d.ts.map +1 -0
- package/dist/extraction/specs/markdown-spec-extractor.js +327 -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/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/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/index.d.ts +551 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1165 -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 +92 -0
- package/dist/installer/index.d.ts.map +1 -0
- package/dist/installer/index.js +416 -0
- package/dist/installer/index.js.map +1 -0
- package/dist/installer/instructions-template.d.ts +35 -0
- package/dist/installer/instructions-template.d.ts.map +1 -0
- package/dist/installer/instructions-template.js +51 -0
- package/dist/installer/instructions-template.js.map +1 -0
- package/dist/installer/targets/claude.d.ts +117 -0
- package/dist/installer/targets/claude.d.ts.map +1 -0
- package/dist/installer/targets/claude.js +736 -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 +256 -0
- package/dist/installer/targets/shared.js.map +1 -0
- package/dist/installer/targets/types.d.ts +84 -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/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/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 +77 -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 +326 -0
- package/dist/mcp/spec-tools.js.map +1 -0
- package/dist/mcp/tools.d.ts +404 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +3087 -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/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/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 +103 -0
- package/dist/resolution/spec-link-resolver.d.ts.map +1 -0
- package/dist/resolution/spec-link-resolver.js +259 -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/index.js +18 -0
- package/dist/server/ingest/ingestor.js +506 -0
- package/dist/server/ingest/parser.js +104 -0
- package/dist/server/ingest/pricing.js +78 -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 +868 -0
- package/dist/server/routes/graph.js +211 -0
- package/dist/server/routes/memory.js +272 -0
- package/dist/server/routes/projects.js +197 -0
- package/dist/server/routes/spec.js +265 -0
- package/dist/server/routes/status.js +112 -0
- package/dist/server/routes/workflow.js +212 -0
- package/dist/server/server.js +206 -0
- package/dist/server/static-handler.js +87 -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 +623 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +108 -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-2GBEK2GM.js +1 -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-2YUJNZ2Y.js +6 -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-45QHGCB4.js +17 -0
- package/dist/web/chunk-4IMMPEYM.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-5BQIOYKW.js +1 -0
- package/dist/web/chunk-5HGWHUJA.js +1 -0
- package/dist/web/chunk-5Y244R4G.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-7RNS77UP.js +1 -0
- package/dist/web/chunk-7SMPKVEP.js +1 -0
- package/dist/web/chunk-A5R3MJMO.js +1 -0
- package/dist/web/chunk-ASZ77FMZ.js +1 -0
- package/dist/web/chunk-AZJVTPLU.js +1 -0
- package/dist/web/chunk-B3YPFY6A.js +1 -0
- package/dist/web/chunk-BLBRMCN2.js +1 -0
- package/dist/web/chunk-BMIAXD2V.js +2 -0
- package/dist/web/chunk-BUXWEHIY.js +1 -0
- package/dist/web/chunk-BYZFQSM6.js +1 -0
- package/dist/web/chunk-D5OCNEJA.js +2 -0
- package/dist/web/chunk-DLQPZWSI.css +1 -0
- package/dist/web/chunk-DTRN7FZR.js +1 -0
- package/dist/web/chunk-DYRFLPJA.js +1 -0
- package/dist/web/chunk-E3J3CXR5.js +1 -0
- package/dist/web/chunk-E44X4RH2.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-EMGMOEVR.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-FGNZDHTL.js +11 -0
- package/dist/web/chunk-FHZHD2ZG.js +1 -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-GR72OOCN.js +1 -0
- package/dist/web/chunk-GRZYXPSO.js +7 -0
- package/dist/web/chunk-GWPVKJIY.js +1 -0
- package/dist/web/chunk-GYGPS3AN.js +1 -0
- package/dist/web/chunk-H7AF7YS4.js +1 -0
- package/dist/web/chunk-HDZDQILN.js +1 -0
- package/dist/web/chunk-HMK6UO6N.js +1 -0
- package/dist/web/chunk-HZA6NEAB.js +1 -0
- package/dist/web/chunk-IHEE5NYJ.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-L37MTFSG.js +3 -0
- package/dist/web/chunk-LB6JPLX2.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-MC4DFIHG.js +1 -0
- package/dist/web/chunk-MVOMVPYB.js +1 -0
- package/dist/web/chunk-N6SS4G6S.js +1 -0
- package/dist/web/chunk-NTBJG6SJ.js +1 -0
- package/dist/web/chunk-NUDB3Q2Y.js +3 -0
- package/dist/web/chunk-NZEZCT65.js +1 -0
- package/dist/web/chunk-OXEF5E3E.js +1 -0
- package/dist/web/chunk-PDN6QYGJ.js +4 -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-QH6CF3M3.js +1 -0
- package/dist/web/chunk-QQ5LD7PI.js +1 -0
- package/dist/web/chunk-QR6L3KAC.js +1 -0
- package/dist/web/chunk-R2DLK4HO.js +1 -0
- package/dist/web/chunk-R5W2MDZN.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-RXKXYF2C.js +1 -0
- package/dist/web/chunk-SBWU7JFC.js +1 -0
- package/dist/web/chunk-SEXBRGYK.js +1 -0
- package/dist/web/chunk-SHPTC4RL.js +1 -0
- package/dist/web/chunk-SUZYBYDW.js +1 -0
- package/dist/web/chunk-SWKJRNYY.js +1 -0
- package/dist/web/chunk-T66XVKGB.js +1 -0
- package/dist/web/chunk-T7AZ65JP.js +1 -0
- package/dist/web/chunk-TCZDVOHD.js +1 -0
- package/dist/web/chunk-TPTITA3V.js +1 -0
- package/dist/web/chunk-TR335633.js +1 -0
- package/dist/web/chunk-UBOZGQNK.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-UYC52MBC.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-WAI2JMZP.js +1 -0
- package/dist/web/chunk-WB6YHOD4.js +1 -0
- package/dist/web/chunk-WBT64AWV.js +1 -0
- package/dist/web/chunk-WCKHQIYN.js +1 -0
- package/dist/web/chunk-WDU3WICG.js +1 -0
- package/dist/web/chunk-WFXJIXZE.js +4 -0
- package/dist/web/chunk-WLIMNDS3.js +1 -0
- package/dist/web/chunk-WTGYRH3Z.js +298 -0
- package/dist/web/chunk-WXTCVDTP.js +1 -0
- package/dist/web/chunk-X2HTISHL.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-YAMRN47K.js +2 -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-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/index.html +145 -0
- package/dist/web/main-ESADRXN2.css +1 -0
- package/dist/web/main-R53HA54V.js +1 -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 +83 -0
- package/dist/workflows/executor.d.ts.map +1 -0
- package/dist/workflows/executor.js +624 -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 +28 -0
- package/dist/workflows/runners/prompt.d.ts.map +1 -0
- package/dist/workflows/runners/prompt.js +212 -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 +51 -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 +11 -0
- package/package.json +7 -3
- package/scripts/offline-install.sh +19 -6
- package/selectors.json +41 -0
- /package/commands/{cg-explore.md → ss-explore.md} +0 -0
- /package/commands/{cg-impact.md → ss-impact.md} +0 -0
- /package/commands/{cg-relink.md → ss-relink.md} +0 -0
- /package/commands/{cg-spec.md → ss-spec.md} +0 -0
- /package/commands/{cg-sync.md → ss-sync.md} +0 -0
- /package/commands/{cg-trace.md → ss-trace.md} +0 -0
package/dist/errors.js
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SpecShip Error Classes
|
|
4
|
+
*
|
|
5
|
+
* Custom error types for better error handling and debugging.
|
|
6
|
+
*
|
|
7
|
+
* @module errors
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { FileError, ParseError, setLogger, silentLogger } from 'specship';
|
|
12
|
+
*
|
|
13
|
+
* // Catch specific error types
|
|
14
|
+
* try {
|
|
15
|
+
* await cg.indexAll();
|
|
16
|
+
* } catch (error) {
|
|
17
|
+
* if (error instanceof FileError) {
|
|
18
|
+
* console.log(`File error at ${error.filePath}: ${error.message}`);
|
|
19
|
+
* } else if (error instanceof ParseError) {
|
|
20
|
+
* console.log(`Parse error at ${error.filePath}:${error.line}`);
|
|
21
|
+
* }
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* // Disable logging for tests
|
|
25
|
+
* setLogger(silentLogger);
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.silentLogger = exports.defaultLogger = exports.ConfigError = exports.VectorError = exports.SearchError = exports.DatabaseError = exports.ParseError = exports.FileError = exports.SpecShipError = void 0;
|
|
30
|
+
exports.setLogger = setLogger;
|
|
31
|
+
exports.getLogger = getLogger;
|
|
32
|
+
exports.logDebug = logDebug;
|
|
33
|
+
exports.logWarn = logWarn;
|
|
34
|
+
exports.logError = logError;
|
|
35
|
+
/**
|
|
36
|
+
* Base error class for all SpecShip errors.
|
|
37
|
+
*
|
|
38
|
+
* All SpecShip-specific errors extend this class, allowing you to catch
|
|
39
|
+
* all SpecShip errors with a single catch block.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* try {
|
|
44
|
+
* await cg.indexAll();
|
|
45
|
+
* } catch (error) {
|
|
46
|
+
* if (error instanceof SpecShipError) {
|
|
47
|
+
* console.log(`SpecShip error [${error.code}]: ${error.message}`);
|
|
48
|
+
* }
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
class SpecShipError extends Error {
|
|
53
|
+
/** Error code for categorization (e.g., 'FILE_ERROR', 'PARSE_ERROR') */
|
|
54
|
+
code;
|
|
55
|
+
/** Additional context about the error */
|
|
56
|
+
context;
|
|
57
|
+
constructor(message, code, context) {
|
|
58
|
+
super(message);
|
|
59
|
+
this.name = 'SpecShipError';
|
|
60
|
+
this.code = code;
|
|
61
|
+
this.context = context;
|
|
62
|
+
// Maintain proper stack trace for V8
|
|
63
|
+
if (Error.captureStackTrace) {
|
|
64
|
+
Error.captureStackTrace(this, this.constructor);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.SpecShipError = SpecShipError;
|
|
69
|
+
/**
|
|
70
|
+
* Error reading or accessing files
|
|
71
|
+
*/
|
|
72
|
+
class FileError extends SpecShipError {
|
|
73
|
+
filePath;
|
|
74
|
+
constructor(message, filePath, cause) {
|
|
75
|
+
super(message, 'FILE_ERROR', { filePath, cause: cause?.message });
|
|
76
|
+
this.name = 'FileError';
|
|
77
|
+
this.filePath = filePath;
|
|
78
|
+
if (cause) {
|
|
79
|
+
this.cause = cause;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.FileError = FileError;
|
|
84
|
+
/**
|
|
85
|
+
* Error parsing source code
|
|
86
|
+
*/
|
|
87
|
+
class ParseError extends SpecShipError {
|
|
88
|
+
filePath;
|
|
89
|
+
line;
|
|
90
|
+
column;
|
|
91
|
+
constructor(message, filePath, options) {
|
|
92
|
+
super(message, 'PARSE_ERROR', {
|
|
93
|
+
filePath,
|
|
94
|
+
line: options?.line,
|
|
95
|
+
column: options?.column,
|
|
96
|
+
cause: options?.cause?.message,
|
|
97
|
+
});
|
|
98
|
+
this.name = 'ParseError';
|
|
99
|
+
this.filePath = filePath;
|
|
100
|
+
this.line = options?.line;
|
|
101
|
+
this.column = options?.column;
|
|
102
|
+
if (options?.cause) {
|
|
103
|
+
this.cause = options.cause;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.ParseError = ParseError;
|
|
108
|
+
/**
|
|
109
|
+
* Error with database operations
|
|
110
|
+
*/
|
|
111
|
+
class DatabaseError extends SpecShipError {
|
|
112
|
+
operation;
|
|
113
|
+
constructor(message, operation, cause) {
|
|
114
|
+
super(message, 'DATABASE_ERROR', { operation, cause: cause?.message });
|
|
115
|
+
this.name = 'DatabaseError';
|
|
116
|
+
this.operation = operation;
|
|
117
|
+
if (cause) {
|
|
118
|
+
this.cause = cause;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.DatabaseError = DatabaseError;
|
|
123
|
+
/**
|
|
124
|
+
* Error with search operations
|
|
125
|
+
*/
|
|
126
|
+
class SearchError extends SpecShipError {
|
|
127
|
+
query;
|
|
128
|
+
constructor(message, query, cause) {
|
|
129
|
+
super(message, 'SEARCH_ERROR', { query, cause: cause?.message });
|
|
130
|
+
this.name = 'SearchError';
|
|
131
|
+
this.query = query;
|
|
132
|
+
if (cause) {
|
|
133
|
+
this.cause = cause;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.SearchError = SearchError;
|
|
138
|
+
/**
|
|
139
|
+
* Error with vector/embedding operations
|
|
140
|
+
*/
|
|
141
|
+
class VectorError extends SpecShipError {
|
|
142
|
+
constructor(message, operation, cause) {
|
|
143
|
+
super(message, 'VECTOR_ERROR', { operation, cause: cause?.message });
|
|
144
|
+
this.name = 'VectorError';
|
|
145
|
+
if (cause) {
|
|
146
|
+
this.cause = cause;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
exports.VectorError = VectorError;
|
|
151
|
+
/**
|
|
152
|
+
* Error with configuration
|
|
153
|
+
*/
|
|
154
|
+
class ConfigError extends SpecShipError {
|
|
155
|
+
constructor(message, details) {
|
|
156
|
+
super(message, 'CONFIG_ERROR', details);
|
|
157
|
+
this.name = 'ConfigError';
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
exports.ConfigError = ConfigError;
|
|
161
|
+
/**
|
|
162
|
+
* Default console-based logger
|
|
163
|
+
*/
|
|
164
|
+
exports.defaultLogger = {
|
|
165
|
+
debug(message, context) {
|
|
166
|
+
if (process.env.SPECSHIP_DEBUG) {
|
|
167
|
+
console.debug(`[SpecShip] ${message}`, context ?? '');
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
warn(message, context) {
|
|
171
|
+
console.warn(`[SpecShip] ${message}`, context ?? '');
|
|
172
|
+
},
|
|
173
|
+
error(message, context) {
|
|
174
|
+
console.error(`[SpecShip] ${message}`, context ?? '');
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Silent logger (no output) - useful for tests
|
|
179
|
+
*/
|
|
180
|
+
exports.silentLogger = {
|
|
181
|
+
debug() { },
|
|
182
|
+
warn() { },
|
|
183
|
+
error() { },
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Current logger instance (can be replaced)
|
|
187
|
+
*/
|
|
188
|
+
let currentLogger = exports.defaultLogger;
|
|
189
|
+
/**
|
|
190
|
+
* Set the global logger
|
|
191
|
+
*/
|
|
192
|
+
function setLogger(logger) {
|
|
193
|
+
currentLogger = logger;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Get the current logger
|
|
197
|
+
*/
|
|
198
|
+
function getLogger() {
|
|
199
|
+
return currentLogger;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Log a debug message
|
|
203
|
+
*/
|
|
204
|
+
function logDebug(message, context) {
|
|
205
|
+
currentLogger.debug(message, context);
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Log a warning message
|
|
209
|
+
*/
|
|
210
|
+
function logWarn(message, context) {
|
|
211
|
+
currentLogger.warn(message, context);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Log an error message
|
|
215
|
+
*/
|
|
216
|
+
function logError(message, context) {
|
|
217
|
+
currentLogger.error(message, context);
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;AAwLH,8BAEC;AAKD,8BAEC;AAKD,4BAEC;AAKD,0BAEC;AAKD,4BAEC;AApND;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,aAAc,SAAQ,KAAK;IACtC,wEAAwE;IAC/D,IAAI,CAAS;IACtB,yCAAyC;IAChC,OAAO,CAA2B;IAE3C,YAAY,OAAe,EAAE,IAAY,EAAE,OAAiC;QAC1E,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,qCAAqC;QACrC,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;CACF;AAjBD,sCAiBC;AAED;;GAEG;AACH,MAAa,SAAU,SAAQ,aAAa;IACjC,QAAQ,CAAS;IAE1B,YAAY,OAAe,EAAE,QAAgB,EAAE,KAAa;QAC1D,KAAK,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;IACH,CAAC;CACF;AAXD,8BAWC;AAED;;GAEG;AACH,MAAa,UAAW,SAAQ,a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EAAE,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,YAAY,GAAW;IAClC,KAAK,KAAU,CAAC;IAChB,IAAI,KAAU,CAAC;IACf,KAAK,KAAU,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,IAAI,aAAa,GAAW,qBAAa,CAAC;AAE1C;;GAEG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,aAAa,GAAG,MAAM,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,SAAgB,SAAS;IACvB,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,SAAgB,QAAQ,CAAC,OAAe,EAAE,OAAiC;IACzE,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO,CAAC,OAAe,EAAE,OAAiC;IACxE,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,SAAgB,QAAQ,CAAC,OAAe,EAAE,OAAiC;IACzE,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ExtractionResult } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Custom extractor for Delphi DFM/FMX form files.
|
|
4
|
+
*
|
|
5
|
+
* DFM/FMX files describe the visual component hierarchy and event handler
|
|
6
|
+
* bindings. They use a simple text format (object/end blocks) that we parse
|
|
7
|
+
* with regex — no tree-sitter grammar exists for this format.
|
|
8
|
+
*
|
|
9
|
+
* Extracted information:
|
|
10
|
+
* - Components as NodeKind `component`
|
|
11
|
+
* - Nesting as EdgeKind `contains`
|
|
12
|
+
* - Event handlers (OnClick = MethodName) as UnresolvedReference → EdgeKind `references`
|
|
13
|
+
*/
|
|
14
|
+
export declare class DfmExtractor {
|
|
15
|
+
private filePath;
|
|
16
|
+
private source;
|
|
17
|
+
private nodes;
|
|
18
|
+
private edges;
|
|
19
|
+
private unresolvedReferences;
|
|
20
|
+
private errors;
|
|
21
|
+
constructor(filePath: string, source: string);
|
|
22
|
+
/**
|
|
23
|
+
* Extract components and event handler references from DFM/FMX source
|
|
24
|
+
*/
|
|
25
|
+
extract(): ExtractionResult;
|
|
26
|
+
/** Create a file node for the DFM form file */
|
|
27
|
+
private createFileNode;
|
|
28
|
+
/** Parse object/end blocks and extract components + event handlers */
|
|
29
|
+
private parseComponents;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=dfm-extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dfm-extractor.d.ts","sourceRoot":"","sources":["../../src/extraction/dfm-extractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,gBAAgB,EAAwC,MAAM,UAAU,CAAC;AAG9F;;;;;;;;;;;GAWG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,oBAAoB,CAA6B;IACzD,OAAO,CAAC,MAAM,CAAyB;gBAE3B,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAK5C;;OAEG;IACH,OAAO,IAAI,gBAAgB;IAuB3B,+CAA+C;IAC/C,OAAO,CAAC,cAAc;IAsBtB,sEAAsE;IACtE,OAAO,CAAC,eAAe;CAgFxB"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DfmExtractor = void 0;
|
|
4
|
+
const tree_sitter_helpers_1 = require("./tree-sitter-helpers");
|
|
5
|
+
/**
|
|
6
|
+
* Custom extractor for Delphi DFM/FMX form files.
|
|
7
|
+
*
|
|
8
|
+
* DFM/FMX files describe the visual component hierarchy and event handler
|
|
9
|
+
* bindings. They use a simple text format (object/end blocks) that we parse
|
|
10
|
+
* with regex — no tree-sitter grammar exists for this format.
|
|
11
|
+
*
|
|
12
|
+
* Extracted information:
|
|
13
|
+
* - Components as NodeKind `component`
|
|
14
|
+
* - Nesting as EdgeKind `contains`
|
|
15
|
+
* - Event handlers (OnClick = MethodName) as UnresolvedReference → EdgeKind `references`
|
|
16
|
+
*/
|
|
17
|
+
class DfmExtractor {
|
|
18
|
+
filePath;
|
|
19
|
+
source;
|
|
20
|
+
nodes = [];
|
|
21
|
+
edges = [];
|
|
22
|
+
unresolvedReferences = [];
|
|
23
|
+
errors = [];
|
|
24
|
+
constructor(filePath, source) {
|
|
25
|
+
this.filePath = filePath;
|
|
26
|
+
this.source = source;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Extract components and event handler references from DFM/FMX source
|
|
30
|
+
*/
|
|
31
|
+
extract() {
|
|
32
|
+
const startTime = Date.now();
|
|
33
|
+
try {
|
|
34
|
+
const fileNode = this.createFileNode();
|
|
35
|
+
this.parseComponents(fileNode.id);
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
this.errors.push({
|
|
39
|
+
message: `DFM extraction error: ${error instanceof Error ? error.message : String(error)}`,
|
|
40
|
+
severity: 'error',
|
|
41
|
+
code: 'parse_error',
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
nodes: this.nodes,
|
|
46
|
+
edges: this.edges,
|
|
47
|
+
unresolvedReferences: this.unresolvedReferences,
|
|
48
|
+
errors: this.errors,
|
|
49
|
+
durationMs: Date.now() - startTime,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/** Create a file node for the DFM form file */
|
|
53
|
+
createFileNode() {
|
|
54
|
+
const lines = this.source.split('\n');
|
|
55
|
+
const id = (0, tree_sitter_helpers_1.generateNodeId)(this.filePath, 'file', this.filePath, 1);
|
|
56
|
+
const fileNode = {
|
|
57
|
+
id,
|
|
58
|
+
kind: 'file',
|
|
59
|
+
name: this.filePath.split('/').pop() || this.filePath,
|
|
60
|
+
qualifiedName: this.filePath,
|
|
61
|
+
filePath: this.filePath,
|
|
62
|
+
language: 'pascal',
|
|
63
|
+
startLine: 1,
|
|
64
|
+
endLine: lines.length,
|
|
65
|
+
startColumn: 0,
|
|
66
|
+
endColumn: lines[lines.length - 1]?.length || 0,
|
|
67
|
+
updatedAt: Date.now(),
|
|
68
|
+
};
|
|
69
|
+
this.nodes.push(fileNode);
|
|
70
|
+
return fileNode;
|
|
71
|
+
}
|
|
72
|
+
/** Parse object/end blocks and extract components + event handlers */
|
|
73
|
+
parseComponents(fileNodeId) {
|
|
74
|
+
const lines = this.source.split('\n');
|
|
75
|
+
const stack = [fileNodeId];
|
|
76
|
+
const objectPattern = /^\s*(object|inherited|inline)\s+(\w+)\s*:\s*(\w+)/;
|
|
77
|
+
const eventPattern = /^\s*(On\w+)\s*=\s*(\w+)\s*$/;
|
|
78
|
+
const endPattern = /^\s*end\s*$/;
|
|
79
|
+
const multiLineStart = /=\s*\(\s*$/;
|
|
80
|
+
const multiLineItemStart = /=\s*<\s*$/;
|
|
81
|
+
let inMultiLine = false;
|
|
82
|
+
let multiLineEndChar = ')';
|
|
83
|
+
for (let i = 0; i < lines.length; i++) {
|
|
84
|
+
const line = lines[i];
|
|
85
|
+
const lineNum = i + 1;
|
|
86
|
+
// Skip multi-line properties
|
|
87
|
+
if (inMultiLine) {
|
|
88
|
+
if (line.trimEnd().endsWith(multiLineEndChar))
|
|
89
|
+
inMultiLine = false;
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
if (multiLineStart.test(line)) {
|
|
93
|
+
inMultiLine = true;
|
|
94
|
+
multiLineEndChar = ')';
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if (multiLineItemStart.test(line)) {
|
|
98
|
+
inMultiLine = true;
|
|
99
|
+
multiLineEndChar = '>';
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
// Component declaration
|
|
103
|
+
const objMatch = line.match(objectPattern);
|
|
104
|
+
if (objMatch) {
|
|
105
|
+
const [, , name, typeName] = objMatch;
|
|
106
|
+
const nodeId = (0, tree_sitter_helpers_1.generateNodeId)(this.filePath, 'component', name, lineNum);
|
|
107
|
+
this.nodes.push({
|
|
108
|
+
id: nodeId,
|
|
109
|
+
kind: 'component',
|
|
110
|
+
name: name,
|
|
111
|
+
qualifiedName: `${this.filePath}#${name}`,
|
|
112
|
+
filePath: this.filePath,
|
|
113
|
+
language: 'pascal',
|
|
114
|
+
startLine: lineNum,
|
|
115
|
+
endLine: lineNum,
|
|
116
|
+
startColumn: 0,
|
|
117
|
+
endColumn: line.length,
|
|
118
|
+
signature: typeName,
|
|
119
|
+
updatedAt: Date.now(),
|
|
120
|
+
});
|
|
121
|
+
this.edges.push({
|
|
122
|
+
source: stack[stack.length - 1],
|
|
123
|
+
target: nodeId,
|
|
124
|
+
kind: 'contains',
|
|
125
|
+
});
|
|
126
|
+
stack.push(nodeId);
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
// Event handler
|
|
130
|
+
const eventMatch = line.match(eventPattern);
|
|
131
|
+
if (eventMatch) {
|
|
132
|
+
const [, , methodName] = eventMatch;
|
|
133
|
+
this.unresolvedReferences.push({
|
|
134
|
+
fromNodeId: stack[stack.length - 1],
|
|
135
|
+
referenceName: methodName,
|
|
136
|
+
referenceKind: 'references',
|
|
137
|
+
line: lineNum,
|
|
138
|
+
column: 0,
|
|
139
|
+
});
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
// Block end
|
|
143
|
+
if (endPattern.test(line)) {
|
|
144
|
+
if (stack.length > 1)
|
|
145
|
+
stack.pop();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
exports.DfmExtractor = DfmExtractor;
|
|
151
|
+
//# sourceMappingURL=dfm-extract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ols across protobuf scaffolding,
|
|
5
|
+
* test mocks, and the hand-written implementation, the FTS ranker often
|
|
6
|
+
* surfaces the generated stubs first because their names are identical
|
|
7
|
+
* to the implementation's name (validated empirically on cosmos-sdk —
|
|
8
|
+
* see project_go_multi_module_audit memory). Generated stubs frequently
|
|
9
|
+
* have no body to trace from, so the agent ends up reading source anyway.
|
|
10
|
+
*
|
|
11
|
+
* This helper is a pure path-based classifier consulted at disambiguation
|
|
12
|
+
* time (findSymbol / findAllSymbols / specship_search formatting), NOT
|
|
13
|
+
* a hard filter — generated nodes are still in the graph and remain
|
|
14
|
+
* reachable; they just rank LAST when there's a real implementation
|
|
15
|
+
* with the same name.
|
|
16
|
+
*
|
|
17
|
+
* Scope: suffix patterns only. Most generated files follow the
|
|
18
|
+
* `<basename>.<tool>.<ext>` convention (`.pb.go`, `_grpc.pb.go`,
|
|
19
|
+
* `.g.dart`, `_pb2.py`), and that covers ~all of what we saw in the
|
|
20
|
+
* Go audit. A future addition would be scanning for the canonical
|
|
21
|
+
* `// Code generated by` header during extraction, for the rare files
|
|
22
|
+
* that defy the suffix convention.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Whether `filePath` looks like a tool-generated source file based on
|
|
26
|
+
* its filename. Path-only — does not read content. The result is a
|
|
27
|
+
* relevance hint for disambiguation, not a hard claim.
|
|
28
|
+
*/
|
|
29
|
+
export declare function isGeneratedFile(filePath: string): boolean;
|
|
30
|
+
//# sourceMappingURL=generated-detection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-detection.d.ts","sourceRoot":"","sources":["../../src/extraction/generated-detection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAgDH;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEzD"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Generated-file detection for symbol-disambiguation down-ranking.
|
|
4
|
+
*
|
|
5
|
+
* When a query like "Send" matches 17 symbols across protobuf scaffolding,
|
|
6
|
+
* test mocks, and the hand-written implementation, the FTS ranker often
|
|
7
|
+
* surfaces the generated stubs first because their names are identical
|
|
8
|
+
* to the implementation's name (validated empirically on cosmos-sdk —
|
|
9
|
+
* see project_go_multi_module_audit memory). Generated stubs frequently
|
|
10
|
+
* have no body to trace from, so the agent ends up reading source anyway.
|
|
11
|
+
*
|
|
12
|
+
* This helper is a pure path-based classifier consulted at disambiguation
|
|
13
|
+
* time (findSymbol / findAllSymbols / specship_search formatting), NOT
|
|
14
|
+
* a hard filter — generated nodes are still in the graph and remain
|
|
15
|
+
* reachable; they just rank LAST when there's a real implementation
|
|
16
|
+
* with the same name.
|
|
17
|
+
*
|
|
18
|
+
* Scope: suffix patterns only. Most generated files follow the
|
|
19
|
+
* `<basename>.<tool>.<ext>` convention (`.pb.go`, `_grpc.pb.go`,
|
|
20
|
+
* `.g.dart`, `_pb2.py`), and that covers ~all of what we saw in the
|
|
21
|
+
* Go audit. A future addition would be scanning for the canonical
|
|
22
|
+
* `// Code generated by` header during extraction, for the rare files
|
|
23
|
+
* that defy the suffix convention.
|
|
24
|
+
*/
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.isGeneratedFile = isGeneratedFile;
|
|
27
|
+
const GENERATED_PATTERNS = [
|
|
28
|
+
// Go — protobuf / gRPC / pulsar
|
|
29
|
+
/\.pb\.go$/,
|
|
30
|
+
/\.pulsar\.go$/,
|
|
31
|
+
/_grpc\.pb\.go$/,
|
|
32
|
+
// Go — mockgen output. Default emits `mock_<src>.go`; many projects
|
|
33
|
+
// (cosmos-sdk uses `expected_*_mocks.go`) rename to `*_mock.go` /
|
|
34
|
+
// `*_mocks.go`. Matching either suffix catches both conventions
|
|
35
|
+
// without false-positive risk on hand-written sources.
|
|
36
|
+
/_mock\.go$/,
|
|
37
|
+
/_mocks\.go$/,
|
|
38
|
+
/^mock_[^/]+\.go$/,
|
|
39
|
+
// TypeScript / JavaScript — common codegen suffixes (Apollo / GraphQL
|
|
40
|
+
// codegen, Prisma, Hasura, ts-proto, gRPC-web, swagger-codegen).
|
|
41
|
+
/\.generated\.[jt]sx?$/,
|
|
42
|
+
/\.gen\.[jt]sx?$/,
|
|
43
|
+
/\.pb\.[jt]s$/,
|
|
44
|
+
/_pb\.[jt]s$/,
|
|
45
|
+
/_grpc_pb\.[jt]s$/,
|
|
46
|
+
// Python — protobuf / gRPC / openapi-codegen
|
|
47
|
+
/_pb2(_grpc)?\.py$/,
|
|
48
|
+
/_pb2\.pyi$/,
|
|
49
|
+
// C++ — protobuf
|
|
50
|
+
/\.pb\.(cc|h)$/,
|
|
51
|
+
// C# — protobuf / gRPC (protoc-gen-csharp puts output under obj/ but
|
|
52
|
+
// many projects also commit *.g.cs and *Grpc.cs siblings)
|
|
53
|
+
/\.g\.cs$/,
|
|
54
|
+
/Grpc\.cs$/,
|
|
55
|
+
// Java — protobuf / gRPC: protoc-gen-java emits `*OuterClass.java`,
|
|
56
|
+
// protoc-gen-grpc-java emits `*Grpc.java`. The XxxImplBase abstract
|
|
57
|
+
// class lives inside Xxx*Grpc.java.
|
|
58
|
+
/OuterClass\.java$/,
|
|
59
|
+
/Grpc\.java$/,
|
|
60
|
+
// Swift — protobuf
|
|
61
|
+
/\.pb\.swift$/,
|
|
62
|
+
// Dart — build_runner / freezed / json_serializable / chopper
|
|
63
|
+
/\.g\.dart$/,
|
|
64
|
+
/\.freezed\.dart$/,
|
|
65
|
+
/\.pb\.dart$/,
|
|
66
|
+
/\.pbgrpc\.dart$/,
|
|
67
|
+
/\.chopper\.dart$/,
|
|
68
|
+
// Rust — common build.rs OUT_DIR outputs are usually outside the source
|
|
69
|
+
// tree, but in-tree generated files often use `*.generated.rs`.
|
|
70
|
+
/\.generated\.rs$/,
|
|
71
|
+
];
|
|
72
|
+
/**
|
|
73
|
+
* Whether `filePath` looks like a tool-generated source file based on
|
|
74
|
+
* its filename. Path-only — does not read content. The result is a
|
|
75
|
+
* relevance hint for disambiguation, not a hard claim.
|
|
76
|
+
*/
|
|
77
|
+
function isGeneratedFile(filePath) {
|
|
78
|
+
return GENERATED_PATTERNS.some((p) => p.test(filePath));
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=generated-detection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-detection.js","sourceRoot":"","sources":["../../src/extraction/generated-detection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAqDH,0CAEC;AArDD,MAAM,kBAAkB,GAA0B;IAChD,gCAAgC;IAChC,WAAW;IACX,eAAe;IACf,gBAAgB;IAChB,oEAAoE;IACpE,kEAAkE;IAClE,gEAAgE;IAChE,uDAAuD;IACvD,YAAY;IACZ,aAAa;IACb,kBAAkB;IAClB,sEAAsE;IACtE,iEAAiE;IACjE,uBAAuB;IACvB,iBAAiB;IACjB,cAAc;IACd,aAAa;IACb,kBAAkB;IAClB,6CAA6C;IAC7C,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;IACjB,eAAe;IACf,qEAAqE;IACrE,0DAA0D;IAC1D,UAAU;IACV,WAAW;IACX,oEAAoE;IACpE,oEAAoE;IACpE,oCAAoC;IACpC,mBAAmB;IACnB,aAAa;IACb,mBAAmB;IACnB,cAAc;IACd,8DAA8D;IAC9D,YAAY;IACZ,kBAAkB;IAClB,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IAClB,wEAAwE;IACxE,gEAAgE;IAChE,kBAAkB;CACnB,CAAC;AAEF;;;;GAIG;AACH,SAAgB,eAAe,CAAC,QAAgB;IAC9C,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grammar Loading and Caching
|
|
3
|
+
*
|
|
4
|
+
* Uses web-tree-sitter (WASM) for universal cross-platform support.
|
|
5
|
+
* Grammars are loaded lazily — only languages actually present in the project
|
|
6
|
+
* are compiled, keeping V8 WASM memory pressure low on large codebases.
|
|
7
|
+
*/
|
|
8
|
+
import { Parser } from 'web-tree-sitter';
|
|
9
|
+
import { Language } from '../types';
|
|
10
|
+
export type GrammarLanguage = Exclude<Language, 'svelte' | 'vue' | 'liquid' | 'yaml' | 'twig' | 'xml' | 'properties' | 'unknown'>;
|
|
11
|
+
/**
|
|
12
|
+
* File extension to Language mapping
|
|
13
|
+
*/
|
|
14
|
+
export declare const EXTENSION_MAP: Record<string, Language>;
|
|
15
|
+
/**
|
|
16
|
+
* Whether a file is one SpecShip can parse, based purely on its extension.
|
|
17
|
+
* This is the single source of truth for "should we index this file" — derived
|
|
18
|
+
* from EXTENSION_MAP so parser support and indexing selection never drift.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isSourceFile(filePath: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Play Framework routes file: the extensionless `conf/routes` (and included
|
|
23
|
+
* `conf/*.routes`). No grammar — route extraction is done by the Play framework
|
|
24
|
+
* resolver, so it's processed through the no-grammar (`yaml`-style) path.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isPlayRoutesFile(filePath: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Initialize the tree-sitter WASM runtime. Must be called before loading grammars.
|
|
29
|
+
* Does NOT load any grammar WASM files — use loadGrammarsForLanguages() for that.
|
|
30
|
+
* Idempotent — safe to call multiple times.
|
|
31
|
+
*/
|
|
32
|
+
export declare function initGrammars(): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Load grammar WASM files for specific languages only.
|
|
35
|
+
* Skips languages that are already loaded or have no WASM grammar.
|
|
36
|
+
* Must be called after initGrammars().
|
|
37
|
+
*/
|
|
38
|
+
export declare function loadGrammarsForLanguages(languages: Language[]): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Load ALL grammar WASM files. Convenience function for tests and
|
|
41
|
+
* backward compatibility. Prefer loadGrammarsForLanguages() in production.
|
|
42
|
+
*/
|
|
43
|
+
export declare function loadAllGrammars(): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Check if grammars have been initialized
|
|
46
|
+
*/
|
|
47
|
+
export declare function isGrammarsInitialized(): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Get a parser for the specified language.
|
|
50
|
+
* Returns synchronously from pre-loaded cache.
|
|
51
|
+
*/
|
|
52
|
+
export declare function getParser(language: Language): Parser | null;
|
|
53
|
+
/**
|
|
54
|
+
* Detect language from file extension
|
|
55
|
+
*/
|
|
56
|
+
export declare function detectLanguage(filePath: string, source?: string): Language;
|
|
57
|
+
/**
|
|
58
|
+
* Check if a language is supported (has a grammar defined).
|
|
59
|
+
* Returns true if the grammar exists, even if not yet loaded.
|
|
60
|
+
*/
|
|
61
|
+
export declare function isLanguageSupported(language: Language): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Check if a grammar has been loaded and is ready for parsing.
|
|
64
|
+
*/
|
|
65
|
+
export declare function isGrammarLoaded(language: Language): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Languages tracked at the file-record level only: parsing emits zero symbol
|
|
68
|
+
* nodes, but the file is still stored (and framework resolvers may add per-file
|
|
69
|
+
* references later, e.g. Drupal routing yml, Spring `@Value` against
|
|
70
|
+
* application.properties). This is the canonical set behind the no-symbol
|
|
71
|
+
* branch in `tree-sitter.ts`; `xml` is intentionally excluded because its
|
|
72
|
+
* MyBatis extractor emits a file node. Callers use this to count such files as
|
|
73
|
+
* indexed rather than skipped, so it must stay in sync with that branch.
|
|
74
|
+
*/
|
|
75
|
+
export declare function isFileLevelOnlyLanguage(language: Language): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Get all supported languages (those with grammar definitions).
|
|
78
|
+
*/
|
|
79
|
+
export declare function getSupportedLanguages(): Language[];
|
|
80
|
+
/**
|
|
81
|
+
* Reset the cached parser for a language to reclaim WASM heap memory.
|
|
82
|
+
* The tree-sitter WASM runtime accumulates fragmented memory over thousands
|
|
83
|
+
* of parses. Deleting and recreating the Parser instance forces the WASM
|
|
84
|
+
* heap to reset, preventing "memory access out of bounds" crashes in
|
|
85
|
+
* large repos.
|
|
86
|
+
*/
|
|
87
|
+
export declare function resetParser(language: Language): void;
|
|
88
|
+
/**
|
|
89
|
+
* Clear parser/grammar caches (useful for testing)
|
|
90
|
+
*/
|
|
91
|
+
export declare function clearParserCache(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Report grammars that failed to load.
|
|
94
|
+
*/
|
|
95
|
+
export declare function getUnavailableGrammarErrors(): Partial<Record<Language, string>>;
|
|
96
|
+
/**
|
|
97
|
+
* Get language display name
|
|
98
|
+
*/
|
|
99
|
+
export declare function getLanguageDisplayName(language: Language): string;
|
|
100
|
+
//# sourceMappingURL=grammars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grammars.d.ts","sourceRoot":"","sources":["../../src/extraction/grammars.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,MAAM,EAA4B,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,YAAY,GAAG,SAAS,CAAC,CAAC;AA8BlI;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAiElD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAKtD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,C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