@selvakumaresra/specship 0.1.3 → 0.3.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 +79 -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 +2019 -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/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 +87 -0
- package/dist/installer/index.d.ts.map +1 -0
- package/dist/installer/index.js +415 -0
- package/dist/installer/index.js.map +1 -0
- package/dist/installer/instructions-template.d.ts +18 -0
- package/dist/installer/instructions-template.d.ts.map +1 -0
- package/dist/installer/instructions-template.js +21 -0
- package/dist/installer/instructions-template.js.map +1 -0
- package/dist/installer/targets/claude.d.ts +98 -0
- package/dist/installer/targets/claude.d.ts.map +1 -0
- package/dist/installer/targets/claude.js +639 -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 +62 -0
- package/dist/installer/targets/shared.d.ts.map +1 -0
- package/dist/installer/targets/shared.js +207 -0
- package/dist/installer/targets/shared.js.map +1 -0
- package/dist/installer/targets/types.d.ts +76 -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/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 +3066 -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-2DHIGIOI.js +1 -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-2OKMB4KX.js +2 -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-3SEJX2BK.js +1 -0
- package/dist/web/chunk-42XVAQ6I.js +1 -0
- package/dist/web/chunk-4IMMPEYM.js +1 -0
- package/dist/web/chunk-4N5DWG46.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-AZJVTPLU.js +1 -0
- package/dist/web/chunk-BCZM5AXU.js +1 -0
- package/dist/web/chunk-BLBRMCN2.js +1 -0
- package/dist/web/chunk-BMIAXD2V.js +2 -0
- package/dist/web/chunk-BPECIDVO.js +1 -0
- package/dist/web/chunk-BUXWEHIY.js +1 -0
- package/dist/web/chunk-BYZFQSM6.js +1 -0
- package/dist/web/chunk-DA6SNNAF.js +1 -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-FIJW2UNJ.js +1 -0
- package/dist/web/chunk-FMV5PXRC.js +5 -0
- package/dist/web/chunk-G7VZT5KB.js +3 -0
- package/dist/web/chunk-GRZYXPSO.js +7 -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-JFYVCXK3.js +1 -0
- package/dist/web/chunk-JN6W7HCN.js +17 -0
- package/dist/web/chunk-JT7P3DEK.js +6 -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-LV4G6QFG.js +2 -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-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-RAAMPHPJ.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-TWXZK6XM.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-WDU3WICG.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-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-YAWCRPHV.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-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-WVI3YTDU.js +1 -0
- package/dist/web/media/codicon-LN6W7LCM.ttf +0 -0
- package/dist/web/styles-KSOPUVDA.css +1 -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 +247 -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/package.json +1 -1
- package/scripts/offline-install.sh +19 -6
- /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
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watch Policy
|
|
3
|
+
*
|
|
4
|
+
* Decides whether the live file watcher should run for a given project.
|
|
5
|
+
*
|
|
6
|
+
* Native recursive `fs.watch` is pathologically slow on WSL2 `/mnt/*`
|
|
7
|
+
* drives (NTFS exposed over the 9p/drvfs bridge): setting up the recursive
|
|
8
|
+
* watch walks the directory tree, and every readdir/stat crosses the
|
|
9
|
+
* Windows boundary. Inside an MCP server this stalls the event loop during
|
|
10
|
+
* startup long enough to blow past Claude Code's handshake timeout, so
|
|
11
|
+
* the tools never appear. See issue #199.
|
|
12
|
+
*
|
|
13
|
+
* This module centralizes the on/off decision so the watcher, the MCP
|
|
14
|
+
* server (for diagnostics), and the installer all agree.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Detect whether the current process is running under WSL (Windows
|
|
18
|
+
* Subsystem for Linux). Result is cached after the first call.
|
|
19
|
+
*
|
|
20
|
+
* Checks the WSL-specific env vars first (no I/O), then falls back to
|
|
21
|
+
* `/proc/version`, which contains "microsoft" on WSL kernels.
|
|
22
|
+
*/
|
|
23
|
+
export declare function detectWsl(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Inputs that can be overridden in tests so the decision is deterministic
|
|
26
|
+
* without touching real env vars or `/proc/version`.
|
|
27
|
+
*/
|
|
28
|
+
export interface WatchProbe {
|
|
29
|
+
/** Defaults to `process.env`. */
|
|
30
|
+
env?: NodeJS.ProcessEnv;
|
|
31
|
+
/** Defaults to `detectWsl()`. */
|
|
32
|
+
isWsl?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Decide whether the file watcher should be disabled for a project, and why.
|
|
36
|
+
*
|
|
37
|
+
* Returns a short human-readable reason when watching should be skipped, or
|
|
38
|
+
* `null` when it should run normally.
|
|
39
|
+
*
|
|
40
|
+
* Precedence (first match wins):
|
|
41
|
+
* 1. `SPECSHIP_NO_WATCH=1` → off (explicit opt-out always wins)
|
|
42
|
+
* 2. `SPECSHIP_FORCE_WATCH=1` → on (overrides auto-detection)
|
|
43
|
+
* 3. WSL2 + `/mnt/*` drive → off (recursive fs.watch is too slow; #199)
|
|
44
|
+
*/
|
|
45
|
+
export declare function watchDisabledReason(projectRoot: string, probe?: WatchProbe): string | null;
|
|
46
|
+
/** Test-only: reset the cached WSL detection. */
|
|
47
|
+
export declare function __resetWslCacheForTests(): void;
|
|
48
|
+
//# sourceMappingURL=watch-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-policy.d.ts","sourceRoot":"","sources":["../../src/sync/watch-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAmBnC;AAWD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,iCAAiC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,GAAE,UAAe,GAAG,MAAM,GAAG,IAAI,CAgB9F;AAED,iDAAiD;AACjD,wBAAgB,uBAAuB,IAAI,IAAI,CAG9C"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Watch Policy
|
|
4
|
+
*
|
|
5
|
+
* Decides whether the live file watcher should run for a given project.
|
|
6
|
+
*
|
|
7
|
+
* Native recursive `fs.watch` is pathologically slow on WSL2 `/mnt/*`
|
|
8
|
+
* drives (NTFS exposed over the 9p/drvfs bridge): setting up the recursive
|
|
9
|
+
* watch walks the directory tree, and every readdir/stat crosses the
|
|
10
|
+
* Windows boundary. Inside an MCP server this stalls the event loop during
|
|
11
|
+
* startup long enough to blow past Claude Code's handshake timeout, so
|
|
12
|
+
* the tools never appear. See issue #199.
|
|
13
|
+
*
|
|
14
|
+
* This module centralizes the on/off decision so the watcher, the MCP
|
|
15
|
+
* server (for diagnostics), and the installer all agree.
|
|
16
|
+
*/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.detectWsl = detectWsl;
|
|
52
|
+
exports.watchDisabledReason = watchDisabledReason;
|
|
53
|
+
exports.__resetWslCacheForTests = __resetWslCacheForTests;
|
|
54
|
+
const fs = __importStar(require("fs"));
|
|
55
|
+
const utils_1 = require("../utils");
|
|
56
|
+
let wslChecked = false;
|
|
57
|
+
let wslValue = false;
|
|
58
|
+
/**
|
|
59
|
+
* Detect whether the current process is running under WSL (Windows
|
|
60
|
+
* Subsystem for Linux). Result is cached after the first call.
|
|
61
|
+
*
|
|
62
|
+
* Checks the WSL-specific env vars first (no I/O), then falls back to
|
|
63
|
+
* `/proc/version`, which contains "microsoft" on WSL kernels.
|
|
64
|
+
*/
|
|
65
|
+
function detectWsl() {
|
|
66
|
+
if (wslChecked)
|
|
67
|
+
return wslValue;
|
|
68
|
+
wslChecked = true;
|
|
69
|
+
if (process.platform !== 'linux') {
|
|
70
|
+
wslValue = false;
|
|
71
|
+
return wslValue;
|
|
72
|
+
}
|
|
73
|
+
if (process.env.WSL_DISTRO_NAME || process.env.WSL_INTEROP) {
|
|
74
|
+
wslValue = true;
|
|
75
|
+
return wslValue;
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
const version = fs.readFileSync('/proc/version', 'utf8').toLowerCase();
|
|
79
|
+
wslValue = version.includes('microsoft') || version.includes('wsl');
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
wslValue = false;
|
|
83
|
+
}
|
|
84
|
+
return wslValue;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* True for WSL Windows-drive mounts like `/mnt/c` or `/mnt/d/project`.
|
|
88
|
+
* Deliberately matches only single-letter drive mounts, so genuinely fast
|
|
89
|
+
* Linux mounts such as `/mnt/wsl/...` are not flagged.
|
|
90
|
+
*/
|
|
91
|
+
function isWindowsDriveMount(projectRoot) {
|
|
92
|
+
return /^\/mnt\/[a-z](\/|$)/i.test((0, utils_1.normalizePath)(projectRoot));
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Decide whether the file watcher should be disabled for a project, and why.
|
|
96
|
+
*
|
|
97
|
+
* Returns a short human-readable reason when watching should be skipped, or
|
|
98
|
+
* `null` when it should run normally.
|
|
99
|
+
*
|
|
100
|
+
* Precedence (first match wins):
|
|
101
|
+
* 1. `SPECSHIP_NO_WATCH=1` → off (explicit opt-out always wins)
|
|
102
|
+
* 2. `SPECSHIP_FORCE_WATCH=1` → on (overrides auto-detection)
|
|
103
|
+
* 3. WSL2 + `/mnt/*` drive → off (recursive fs.watch is too slow; #199)
|
|
104
|
+
*/
|
|
105
|
+
function watchDisabledReason(projectRoot, probe = {}) {
|
|
106
|
+
const env = probe.env ?? process.env;
|
|
107
|
+
if (env.SPECSHIP_NO_WATCH === '1') {
|
|
108
|
+
return 'SPECSHIP_NO_WATCH=1 is set';
|
|
109
|
+
}
|
|
110
|
+
if (env.SPECSHIP_FORCE_WATCH === '1') {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
const isWsl = probe.isWsl ?? detectWsl();
|
|
114
|
+
if (isWsl && isWindowsDriveMount(projectRoot)) {
|
|
115
|
+
return 'project is on a WSL2 /mnt/ drive, where recursive fs.watch is too slow to be reliable';
|
|
116
|
+
}
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
/** Test-only: reset the cached WSL detection. */
|
|
120
|
+
function __resetWslCacheForTests() {
|
|
121
|
+
wslChecked = false;
|
|
122
|
+
wslValue = false;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=watch-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-policy.js","sourceRoot":"","sources":["../../src/sync/watch-policy.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeH,8BAmBC;AAiCD,kDAgBC;AAGD,0DAGC;AAvFD,uCAAyB;AACzB,oCAAyC;AAEzC,IAAI,UAAU,GAAG,KAAK,CAAC;AACvB,IAAI,QAAQ,GAAG,KAAK,CAAC;AAErB;;;;;;GAMG;AACH,SAAgB,SAAS;IACvB,IAAI,UAAU;QAAE,OAAO,QAAQ,CAAC;IAChC,UAAU,GAAG,IAAI,CAAC;IAElB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,QAAQ,GAAG,KAAK,CAAC;QACjB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QAC3D,QAAQ,GAAG,IAAI,CAAC;QAChB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;QACvE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtE,CAAC;IAAC,MAAM,CAAC;QACP,QAAQ,GAAG,KAAK,CAAC;IACnB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,WAAmB;IAC9C,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAA,qBAAa,EAAC,WAAW,CAAC,CAAC,CAAC;AACjE,CAAC;AAaD;;;;;;;;;;GAUG;AACH,SAAgB,mBAAmB,CAAC,WAAmB,EAAE,QAAoB,EAAE;IAC7E,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAErC,IAAI,GAAG,CAAC,iBAAiB,KAAK,GAAG,EAAE,CAAC;QAClC,OAAO,4BAA4B,CAAC;IACtC,CAAC;IACD,IAAI,GAAG,CAAC,oBAAoB,KAAK,GAAG,EAAE,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,SAAS,EAAE,CAAC;IACzC,IAAI,KAAK,IAAI,mBAAmB,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9C,OAAO,uFAAuF,CAAC;IACjG,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,iDAAiD;AACjD,SAAgB,uBAAuB;IACrC,UAAU,GAAG,KAAK,CAAC;IACnB,QAAQ,GAAG,KAAK,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Watcher
|
|
3
|
+
*
|
|
4
|
+
* Watches the project directory for file changes and triggers debounced sync
|
|
5
|
+
* operations to keep the code graph up-to-date.
|
|
6
|
+
*
|
|
7
|
+
* Uses Node's built-in `fs.watch` directly (no third-party watcher, no native
|
|
8
|
+
* addon) with a per-platform strategy chosen to keep the open-descriptor /
|
|
9
|
+
* kernel-watch cost BOUNDED rather than growing with the number of files:
|
|
10
|
+
*
|
|
11
|
+
* - macOS / Windows: a SINGLE recursive `fs.watch(root, {recursive:true})`.
|
|
12
|
+
* libuv maps this to one FSEvents stream (macOS) / one
|
|
13
|
+
* ReadDirectoryChangesW handle (Windows), so it costs O(1) descriptors no
|
|
14
|
+
* matter how large the tree. This is the fix for the macOS file-table
|
|
15
|
+
* exhaustion (#644 / #496 / #555 / #628): the previous watcher held one
|
|
16
|
+
* open fd PER WATCHED FILE on macOS (tens of thousands of REG fds), which
|
|
17
|
+
* exhausted `kern.maxfiles` and crashed unrelated processes system-wide.
|
|
18
|
+
*
|
|
19
|
+
* - Linux: recursive `fs.watch` is unsupported, so we watch each (non-ignored)
|
|
20
|
+
* DIRECTORY with one inotify watch — O(directories), NOT O(files). New
|
|
21
|
+
* directories are picked up dynamically and an overall watch cap bounds
|
|
22
|
+
* inotify usage on pathological monorepos (#579). A single inotify watch on
|
|
23
|
+
* a directory already reports create/modify/delete for its children, so
|
|
24
|
+
* per-file watches are never needed.
|
|
25
|
+
*
|
|
26
|
+
* Excluded trees (node_modules/, dist/, .git/, …) are filtered via the
|
|
27
|
+
* indexer's `buildDefaultIgnore` (built-in default-ignore dirs + the project's
|
|
28
|
+
* .gitignore) — on Linux they're never descended into (so they cost no watch),
|
|
29
|
+
* and on macOS/Windows the single recursive stream still covers them but their
|
|
30
|
+
* events are dropped before any sync is scheduled. Either way the watcher's
|
|
31
|
+
* scope matches the indexer's (#276 / #407).
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Options for the file watcher
|
|
35
|
+
*/
|
|
36
|
+
export interface WatchOptions {
|
|
37
|
+
/**
|
|
38
|
+
* Debounce delay in milliseconds.
|
|
39
|
+
* After the last file change, wait this long before triggering sync.
|
|
40
|
+
* Default: 2000ms
|
|
41
|
+
*/
|
|
42
|
+
debounceMs?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Callback when a sync completes (for logging/diagnostics).
|
|
45
|
+
*/
|
|
46
|
+
onSyncComplete?: (result: {
|
|
47
|
+
filesChanged: number;
|
|
48
|
+
durationMs: number;
|
|
49
|
+
}) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Callback when a sync errors (for logging/diagnostics).
|
|
52
|
+
*/
|
|
53
|
+
onSyncError?: (error: Error) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Test-only. When true, `start()` installs NO OS-level fs.watch — the
|
|
56
|
+
* watcher is "inert" and only the {@link __emitWatchEventForTests} /
|
|
57
|
+
* {@link FileWatcher.ingestEventForTests} seam drives its pipeline. This
|
|
58
|
+
* restores the deterministic, OS-free behavior the unit tests need (real
|
|
59
|
+
* FSEvents/inotify delivery races under parallel vitest). Production never
|
|
60
|
+
* sets it.
|
|
61
|
+
*/
|
|
62
|
+
inertForTests?: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Thrown by a `syncFn` to signal that the underlying sync couldn't acquire
|
|
66
|
+
* the cross-process write lock (#449). The watcher treats this as "no
|
|
67
|
+
* progress" — preserves `pendingFiles`, skips `onSyncComplete`, and the
|
|
68
|
+
* `finally` block reschedules. Quiet (debug-only) because a long-running
|
|
69
|
+
* external indexer can hit this every debounce cycle.
|
|
70
|
+
*/
|
|
71
|
+
export declare class LockUnavailableError extends Error {
|
|
72
|
+
constructor(message?: string);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Per-file pending entry — tracks a source file the watcher saw an event for
|
|
76
|
+
* but hasn't yet synced into the index. Exposed via {@link FileWatcher.getPendingFiles}
|
|
77
|
+
* so MCP tool responses can mark stale results without forcing a wait.
|
|
78
|
+
*/
|
|
79
|
+
export interface PendingFile {
|
|
80
|
+
/** Project-relative POSIX path (e.g. "src/foo.ts"). */
|
|
81
|
+
path: string;
|
|
82
|
+
/** Wall-clock ms at the first event we saw for this path since the last sync. */
|
|
83
|
+
firstSeenMs: number;
|
|
84
|
+
/** Wall-clock ms at the most recent event we saw for this path. */
|
|
85
|
+
lastSeenMs: number;
|
|
86
|
+
/**
|
|
87
|
+
* True when a sync is currently in flight that began AFTER this file's most
|
|
88
|
+
* recent event — i.e. the next successful sync will pick it up. False when
|
|
89
|
+
* the file is still in the debounce window (no sync running yet).
|
|
90
|
+
*/
|
|
91
|
+
indexing: boolean;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* FileWatcher monitors a project directory for changes and triggers
|
|
95
|
+
* debounced sync operations via a provided callback.
|
|
96
|
+
*
|
|
97
|
+
* Design goals:
|
|
98
|
+
* - Bounded resource usage: O(1) descriptors on macOS/Windows (one recursive
|
|
99
|
+
* watch), O(directories) inotify watches on Linux — never O(files), which
|
|
100
|
+
* was the system-crashing fd leak on macOS (#644/#496/#555/#628).
|
|
101
|
+
* - Debounced to avoid thrashing on rapid saves
|
|
102
|
+
* - Filters to supported source files by extension
|
|
103
|
+
* - Ignores .specship/ and .git/ regardless of .gitignore
|
|
104
|
+
* - Tracks per-file pending state so MCP tools can flag stale results
|
|
105
|
+
* without blocking on a sync (issue #403)
|
|
106
|
+
*/
|
|
107
|
+
export declare class FileWatcher {
|
|
108
|
+
/** macOS/Windows: the single recursive watcher. Null on Linux. */
|
|
109
|
+
private recursiveWatcher;
|
|
110
|
+
/** Linux: one watcher per watched directory (keyed by absolute path). */
|
|
111
|
+
private dirWatchers;
|
|
112
|
+
/** Set once the per-directory watch cap is hit, so we log only once. */
|
|
113
|
+
private dirCapWarned;
|
|
114
|
+
/** Test-only inert mode: started, but with no OS watcher installed. */
|
|
115
|
+
private inert;
|
|
116
|
+
private debounceTimer;
|
|
117
|
+
/**
|
|
118
|
+
* Files seen by the watcher since the last successful sync — populated on
|
|
119
|
+
* every change event, cleared at the start of a sync, and re-populated by
|
|
120
|
+
* events that arrive mid-sync (or restored on sync failure). Keyed by the
|
|
121
|
+
* same project-relative POSIX path the rest of the codebase uses, so a
|
|
122
|
+
* caller can intersect tool-response file paths against this map cheaply.
|
|
123
|
+
*/
|
|
124
|
+
private pendingFiles;
|
|
125
|
+
/**
|
|
126
|
+
* Wall-clock ms at which the in-flight sync began. Combined with
|
|
127
|
+
* {@link pendingFiles}'s `lastSeenMs`, this distinguishes "still in the
|
|
128
|
+
* debounce window" (lastSeen > syncStarted, sync hasn't started yet for
|
|
129
|
+
* this edit) from "currently being indexed" (lastSeen <= syncStarted).
|
|
130
|
+
*/
|
|
131
|
+
private syncStartedMs;
|
|
132
|
+
private syncing;
|
|
133
|
+
private stopped;
|
|
134
|
+
/**
|
|
135
|
+
* True once the initial watch set is established. Unlike the previous
|
|
136
|
+
* chokidar implementation there is no asynchronous initial "crawl" emitting
|
|
137
|
+
* an `add` per existing file — `fs.watch` only reports changes from the
|
|
138
|
+
* moment it's installed — so this flips to true synchronously at the end of
|
|
139
|
+
* `start()`. The startup reconcile against on-disk state is handled
|
|
140
|
+
* separately by the engine's catch-up sync, not by the watcher.
|
|
141
|
+
*/
|
|
142
|
+
private ready;
|
|
143
|
+
/**
|
|
144
|
+
* Callbacks that resolve when the watch set is established. Used by tests
|
|
145
|
+
* (and any production caller that cares about a clean baseline) to
|
|
146
|
+
* deterministically gate on watcher readiness.
|
|
147
|
+
*/
|
|
148
|
+
private readyWaiters;
|
|
149
|
+
private ignoreMatcher;
|
|
150
|
+
private readonly projectRoot;
|
|
151
|
+
private readonly debounceMs;
|
|
152
|
+
private readonly syncFn;
|
|
153
|
+
private readonly onSyncComplete?;
|
|
154
|
+
private readonly onSyncError?;
|
|
155
|
+
private readonly inertForTests;
|
|
156
|
+
constructor(projectRoot: string, syncFn: () => Promise<{
|
|
157
|
+
filesChanged: number;
|
|
158
|
+
durationMs: number;
|
|
159
|
+
}>, options?: WatchOptions);
|
|
160
|
+
/**
|
|
161
|
+
* Start watching for file changes.
|
|
162
|
+
* Returns true if watching started successfully, false otherwise.
|
|
163
|
+
*/
|
|
164
|
+
start(): boolean;
|
|
165
|
+
/**
|
|
166
|
+
* macOS/Windows: one recursive watcher for the whole tree. O(1) descriptors.
|
|
167
|
+
* `filename` arrives relative to the project root (with subdirectories), so
|
|
168
|
+
* it maps straight to a project-relative path.
|
|
169
|
+
*/
|
|
170
|
+
private startRecursive;
|
|
171
|
+
/**
|
|
172
|
+
* Linux: walk the (non-ignored) tree and watch each directory. One inotify
|
|
173
|
+
* watch per directory reports create/modify/delete for that directory's
|
|
174
|
+
* direct children, so we never watch individual files.
|
|
175
|
+
*/
|
|
176
|
+
private startPerDirectory;
|
|
177
|
+
/**
|
|
178
|
+
* Add an inotify watch for `dir` and recurse into its non-ignored
|
|
179
|
+
* subdirectories. When `markExisting` is true (a directory that appeared
|
|
180
|
+
* AFTER startup), the source files already inside it are recorded as pending
|
|
181
|
+
* — this closes the `mkdir + write` race where files created before the new
|
|
182
|
+
* directory's watch is installed would otherwise be missed until the next
|
|
183
|
+
* full sync. The initial startup walk passes false (the engine's catch-up
|
|
184
|
+
* sync owns the baseline).
|
|
185
|
+
*/
|
|
186
|
+
private watchTree;
|
|
187
|
+
/**
|
|
188
|
+
* Linux per-directory event handler. `filename` is relative to `dir`. A new
|
|
189
|
+
* sub-directory is picked up by extending the watch tree; everything else is
|
|
190
|
+
* routed through the shared change handler.
|
|
191
|
+
*/
|
|
192
|
+
private handleDirEvent;
|
|
193
|
+
/**
|
|
194
|
+
* Shared change handler for both watch strategies. `rel` is a
|
|
195
|
+
* project-relative POSIX path. Applies the ignore + source-file filters and,
|
|
196
|
+
* for a real source change, records it as pending (#403) and schedules a
|
|
197
|
+
* debounced sync.
|
|
198
|
+
*
|
|
199
|
+
* The recursive (macOS/Windows) watcher reports events for ignored trees too
|
|
200
|
+
* (one stream covers the whole repo), so the ignore check here is load-bearing
|
|
201
|
+
* — it drops node_modules/dist/.git churn before any sync is scheduled.
|
|
202
|
+
*/
|
|
203
|
+
private handleChange;
|
|
204
|
+
/** Close and forget the watch for a directory that errored/was removed. */
|
|
205
|
+
private unwatchDir;
|
|
206
|
+
/** Our own dirs are always ignored, regardless of .gitignore. */
|
|
207
|
+
private isAlwaysIgnored;
|
|
208
|
+
/**
|
|
209
|
+
* True for any directory that should NOT be watched (used while building the
|
|
210
|
+
* Linux per-directory watch tree). Tests the directory form of the path so a
|
|
211
|
+
* dir-only ignore rule like `build/` matches.
|
|
212
|
+
*/
|
|
213
|
+
private shouldIgnoreDir;
|
|
214
|
+
/**
|
|
215
|
+
* Stop watching for file changes.
|
|
216
|
+
*/
|
|
217
|
+
stop(): void;
|
|
218
|
+
/**
|
|
219
|
+
* @internal Test-only: feed a synthetic project-relative change through the
|
|
220
|
+
* same filter → pendingFiles → debounced-sync path a real fs.watch event
|
|
221
|
+
* takes. Lets the watcher / staleness-banner suites stay deterministic
|
|
222
|
+
* instead of racing on OS watch-delivery latency. See
|
|
223
|
+
* {@link __emitWatchEventForTests}.
|
|
224
|
+
*/
|
|
225
|
+
ingestEventForTests(relPath: string): void;
|
|
226
|
+
/**
|
|
227
|
+
* Whether the watcher is currently active.
|
|
228
|
+
*/
|
|
229
|
+
isActive(): boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Resolves once the watch set has been installed (or immediately if it
|
|
232
|
+
* already has). Useful for tests that need a deterministic boundary before
|
|
233
|
+
* asserting on `pendingFiles`.
|
|
234
|
+
*
|
|
235
|
+
* Production callers don't need this: `pendingFiles` is read continuously,
|
|
236
|
+
* the staleness banner is always correct (empty or populated), and there is
|
|
237
|
+
* no asynchronous initial-scan window with `fs.watch`.
|
|
238
|
+
*/
|
|
239
|
+
waitUntilReady(timeoutMs?: number): Promise<void>;
|
|
240
|
+
/**
|
|
241
|
+
* Schedule a debounced sync.
|
|
242
|
+
*/
|
|
243
|
+
private scheduleSync;
|
|
244
|
+
/**
|
|
245
|
+
* Flush pending changes by running sync.
|
|
246
|
+
*
|
|
247
|
+
* pendingFiles is NOT cleared at the start of sync — entries are removed
|
|
248
|
+
* only after sync commits successfully, and only for entries whose
|
|
249
|
+
* lastSeenMs <= syncStartedMs. That way, a query that arrives mid-sync
|
|
250
|
+
* still sees the affected files marked stale (the DB hasn't been updated
|
|
251
|
+
* yet), and an event that lands mid-sync persists into the follow-up.
|
|
252
|
+
*
|
|
253
|
+
* On sync failure pendingFiles is left untouched — every edit is still
|
|
254
|
+
* unindexed, and the rescheduled sync will absorb the same set next time.
|
|
255
|
+
*/
|
|
256
|
+
private flush;
|
|
257
|
+
/**
|
|
258
|
+
* Snapshot of files seen by the watcher since the last successful sync.
|
|
259
|
+
*
|
|
260
|
+
* Used by MCP tool responses to mark stale results without blocking on a
|
|
261
|
+
* sync: a tool that returns a hit in `src/foo.ts` while `src/foo.ts` is in
|
|
262
|
+
* this list tells the agent "Read this file directly, the index lags."
|
|
263
|
+
*
|
|
264
|
+
* `indexing` is true when a sync is currently in flight whose start time is
|
|
265
|
+
* AFTER this file's most recent event — i.e. that sync will absorb the
|
|
266
|
+
* edit. False means the file is still inside the debounce window and no
|
|
267
|
+
* sync has started yet (a follow-up call a few hundred ms later may show
|
|
268
|
+
* `indexing: true` or the file may have left the list entirely).
|
|
269
|
+
*
|
|
270
|
+
* Cheap: O(pendingFiles.size), no I/O, no locks.
|
|
271
|
+
*/
|
|
272
|
+
getPendingFiles(): PendingFile[];
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Test-only: synthesize a source-file change for the live watcher running at
|
|
276
|
+
* `projectRoot`, exercising the real filter → pendingFiles → debounced-sync
|
|
277
|
+
* logic without depending on fs.watch delivery timing (which races under
|
|
278
|
+
* parallel vitest). `relPath` is project-relative POSIX (e.g. "src/foo.ts").
|
|
279
|
+
* Returns false if no live watcher is registered for that root (e.g. outside a
|
|
280
|
+
* test runtime, where the registry is intentionally not populated).
|
|
281
|
+
*/
|
|
282
|
+
export declare function __emitWatchEventForTests(projectRoot: string, relPath: string): boolean;
|
|
283
|
+
//# sourceMappingURL=watcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watcher.d.ts","sourceRoot":"","sources":["../../src/sync/watcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAgDH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAEhF;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAErC;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;GAMG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,SAA+D;CAInF;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,WAAW;IACtB,kEAAkE;IAClE,OAAO,CAAC,gBAAgB,CAA6B;IACrD,yEAAyE;IACzE,OAAO,CAAC,WAAW,CAAmC;IACtD,wEAAwE;IACxE,OAAO,CAAC,YAAY,CAAS;IAC7B,uEAAuE;IACvE,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,aAAa,CAA8C;IACnE;;;;;;OAMG;IACH,OAAO,CAAC,YAAY,CAAkE;IACtF;;;;;OAKG;IACH,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB;;;;;;;OAOG;IACH,OAAO,CAAC,KAAK,CAAS;IACtB;;;;OAIG;IACH,OAAO,CAAC,YAAY,CAAyB;IAI7C,OAAO,CAAC,aAAa,CAAuB;IAE5C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8D;IACrF,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAiC;IACjE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAA8B;IAC3D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAU;gBAGtC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,OAAO,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,EACnE,OAAO,GAAE,YAAiB;IAU5B;;;OAGG;IACH,KAAK,IAAI,OAAO;IAmDhB;;;;OAIG;IACH,OAAO,CAAC,cAAc;IActB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;;;;;;;OAQG;IACH,OAAO,CAAC,SAAS;IAyCjB;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAoBtB;;;;;;;;;OASG;IACH,OAAO,CAAC,YAAY;IAkBpB,2EAA2E;IAC3E,OAAO,CAAC,UAAU;IAYlB,iEAAiE;IACjE,OAAO,CAAC,eAAe;IAOvB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAQvB;;OAEG;IACH,IAAI,IAAI,IAAI;IAkCZ;;;;;;OAMG;IACH,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI1C;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;;;;;;;OAQG;IACH,cAAc,CAAC,SAAS,SAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAahD;;OAEG;IACH,OAAO,CAAC,YAAY;IAUpB;;;;;;;;;;;OAWG;YACW,KAAK;IAgDnB;;;;;;;;;;;;;;OAcG;IACH,eAAe,IAAI,WAAW,EAAE;CAYjC;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAKtF"}
|