@quolu/lattice 0.69.5 → 0.71.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.ja.md +5 -1
- package/package.json +1 -1
- package/sensor/dist/bin/lattice-sensor.js +746 -323
- package/sensor/dist/bin/viewer-gate.d.ts +17 -0
- package/sensor/dist/bin/viewer-gate.d.ts.map +1 -0
- package/sensor/dist/bin/viewer-gate.js +31 -0
- package/sensor/dist/bin/viewer-gate.js.map +1 -0
- package/sensor/dist/context/formatter.d.ts +7 -1
- package/sensor/dist/context/formatter.d.ts.map +1 -1
- package/sensor/dist/context/formatter.js +12 -6
- package/sensor/dist/context/formatter.js.map +1 -1
- package/sensor/dist/context/index.d.ts +12 -0
- package/sensor/dist/context/index.d.ts.map +1 -1
- package/sensor/dist/context/index.js +103 -16
- package/sensor/dist/context/index.js.map +1 -1
- package/sensor/dist/db/index.d.ts +23 -2
- package/sensor/dist/db/index.d.ts.map +1 -1
- package/sensor/dist/db/index.js +109 -31
- package/sensor/dist/db/index.js.map +1 -1
- package/sensor/dist/db/migrations.d.ts +1 -1
- package/sensor/dist/db/migrations.d.ts.map +1 -1
- package/sensor/dist/db/migrations.js +68 -1
- package/sensor/dist/db/migrations.js.map +1 -1
- package/sensor/dist/db/queries.d.ts +583 -6
- package/sensor/dist/db/queries.d.ts.map +1 -1
- package/sensor/dist/db/queries.js +1425 -57
- package/sensor/dist/db/queries.js.map +1 -1
- package/sensor/dist/db/schema.sql +27 -4
- package/sensor/dist/db/sqlite-adapter.d.ts +2 -0
- package/sensor/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/sensor/dist/db/sqlite-adapter.js +56 -7
- package/sensor/dist/db/sqlite-adapter.js.map +1 -1
- package/sensor/dist/db/synthesis-stage.d.ts +12 -0
- package/sensor/dist/db/synthesis-stage.d.ts.map +1 -0
- package/sensor/dist/db/synthesis-stage.js +93 -0
- package/sensor/dist/db/synthesis-stage.js.map +1 -0
- package/sensor/dist/db/wal-valve.d.ts +32 -12
- package/sensor/dist/db/wal-valve.d.ts.map +1 -1
- package/sensor/dist/db/wal-valve.js +65 -22
- package/sensor/dist/db/wal-valve.js.map +1 -1
- package/sensor/dist/db/wsl-shared-index.d.ts +53 -0
- package/sensor/dist/db/wsl-shared-index.d.ts.map +1 -0
- package/sensor/dist/db/wsl-shared-index.js +121 -0
- package/sensor/dist/db/wsl-shared-index.js.map +1 -0
- package/sensor/dist/directory.d.ts +126 -2
- package/sensor/dist/directory.d.ts.map +1 -1
- package/sensor/dist/directory.js +285 -16
- package/sensor/dist/directory.js.map +1 -1
- package/sensor/dist/errors.d.ts +14 -0
- package/sensor/dist/errors.d.ts.map +1 -1
- package/sensor/dist/errors.js +16 -1
- package/sensor/dist/errors.js.map +1 -1
- package/sensor/dist/extraction/cfml-extractor.d.ts +1 -0
- package/sensor/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/sensor/dist/extraction/cfml-extractor.js +15 -3
- package/sensor/dist/extraction/cfml-extractor.js.map +1 -1
- package/sensor/dist/extraction/dfm-extractor.d.ts.map +1 -1
- package/sensor/dist/extraction/dfm-extractor.js +14 -10
- package/sensor/dist/extraction/dfm-extractor.js.map +1 -1
- package/sensor/dist/extraction/extraction-version.d.ts +1 -1
- package/sensor/dist/extraction/extraction-version.d.ts.map +1 -1
- package/sensor/dist/extraction/extraction-version.js +3 -1
- package/sensor/dist/extraction/extraction-version.js.map +1 -1
- package/sensor/dist/extraction/function-ref.d.ts +6 -4
- package/sensor/dist/extraction/function-ref.d.ts.map +1 -1
- package/sensor/dist/extraction/function-ref.js +35 -14
- package/sensor/dist/extraction/function-ref.js.map +1 -1
- package/sensor/dist/extraction/generated-detection.d.ts +48 -12
- package/sensor/dist/extraction/generated-detection.d.ts.map +1 -1
- package/sensor/dist/extraction/generated-detection.js +176 -11
- package/sensor/dist/extraction/generated-detection.js.map +1 -1
- package/sensor/dist/extraction/grammars.d.ts +38 -0
- package/sensor/dist/extraction/grammars.d.ts.map +1 -1
- package/sensor/dist/extraction/grammars.js +115 -3
- package/sensor/dist/extraction/grammars.js.map +1 -1
- package/sensor/dist/extraction/index.d.ts +218 -14
- package/sensor/dist/extraction/index.d.ts.map +1 -1
- package/sensor/dist/extraction/index.js +887 -175
- package/sensor/dist/extraction/index.js.map +1 -1
- package/sensor/dist/extraction/languages/c-cpp.d.ts +58 -0
- package/sensor/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/sensor/dist/extraction/languages/c-cpp.js +310 -19
- package/sensor/dist/extraction/languages/c-cpp.js.map +1 -1
- package/sensor/dist/extraction/languages/dart.d.ts.map +1 -1
- package/sensor/dist/extraction/languages/dart.js +8 -3
- package/sensor/dist/extraction/languages/dart.js.map +1 -1
- package/sensor/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/sensor/dist/extraction/languages/erlang.js +58 -22
- package/sensor/dist/extraction/languages/erlang.js.map +1 -1
- package/sensor/dist/extraction/languages/javascript.js +1 -1
- package/sensor/dist/extraction/languages/javascript.js.map +1 -1
- package/sensor/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/sensor/dist/extraction/languages/kotlin.js +169 -36
- package/sensor/dist/extraction/languages/kotlin.js.map +1 -1
- package/sensor/dist/extraction/languages/lua.d.ts.map +1 -1
- package/sensor/dist/extraction/languages/lua.js +4 -1
- package/sensor/dist/extraction/languages/lua.js.map +1 -1
- package/sensor/dist/extraction/languages/objc.d.ts.map +1 -1
- package/sensor/dist/extraction/languages/objc.js +4 -0
- package/sensor/dist/extraction/languages/objc.js.map +1 -1
- package/sensor/dist/extraction/languages/python.d.ts.map +1 -1
- package/sensor/dist/extraction/languages/python.js +71 -0
- package/sensor/dist/extraction/languages/python.js.map +1 -1
- package/sensor/dist/extraction/languages/rust.d.ts +20 -0
- package/sensor/dist/extraction/languages/rust.d.ts.map +1 -1
- package/sensor/dist/extraction/languages/rust.js +50 -20
- package/sensor/dist/extraction/languages/rust.js.map +1 -1
- package/sensor/dist/extraction/languages/scala.d.ts.map +1 -1
- package/sensor/dist/extraction/languages/scala.js +18 -3
- package/sensor/dist/extraction/languages/scala.js.map +1 -1
- package/sensor/dist/extraction/languages/swift.d.ts +15 -0
- package/sensor/dist/extraction/languages/swift.d.ts.map +1 -1
- package/sensor/dist/extraction/languages/swift.js +50 -0
- package/sensor/dist/extraction/languages/swift.js.map +1 -1
- package/sensor/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/sensor/dist/extraction/languages/typescript.js +9 -2
- package/sensor/dist/extraction/languages/typescript.js.map +1 -1
- package/sensor/dist/extraction/liquid-extractor.d.ts +18 -0
- package/sensor/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/sensor/dist/extraction/liquid-extractor.js +98 -22
- package/sensor/dist/extraction/liquid-extractor.js.map +1 -1
- package/sensor/dist/extraction/mybatis-extractor.d.ts.map +1 -1
- package/sensor/dist/extraction/mybatis-extractor.js +6 -4
- package/sensor/dist/extraction/mybatis-extractor.js.map +1 -1
- package/sensor/dist/extraction/parse-pool.d.ts +7 -0
- package/sensor/dist/extraction/parse-pool.d.ts.map +1 -1
- package/sensor/dist/extraction/parse-pool.js +20 -1
- package/sensor/dist/extraction/parse-pool.js.map +1 -1
- package/sensor/dist/extraction/syntax-tokens.d.ts +103 -0
- package/sensor/dist/extraction/syntax-tokens.d.ts.map +1 -0
- package/sensor/dist/extraction/syntax-tokens.js +381 -0
- package/sensor/dist/extraction/syntax-tokens.js.map +1 -0
- package/sensor/dist/extraction/tree-sitter-helpers.d.ts +5 -0
- package/sensor/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/sensor/dist/extraction/tree-sitter-helpers.js +17 -0
- package/sensor/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/sensor/dist/extraction/tree-sitter-types.d.ts +31 -3
- package/sensor/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/sensor/dist/extraction/tree-sitter.d.ts +101 -18
- package/sensor/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/sensor/dist/extraction/tree-sitter.js +928 -134
- package/sensor/dist/extraction/tree-sitter.js.map +1 -1
- package/sensor/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/sensor/dist/file-limits.d.ts +40 -0
- package/sensor/dist/file-limits.d.ts.map +1 -0
- package/sensor/dist/file-limits.js +147 -0
- package/sensor/dist/file-limits.js.map +1 -0
- package/sensor/dist/graph/branch-guards.d.ts +265 -0
- package/sensor/dist/graph/branch-guards.d.ts.map +1 -0
- package/sensor/dist/graph/branch-guards.js +2325 -0
- package/sensor/dist/graph/branch-guards.js.map +1 -0
- package/sensor/dist/graph/dead-code.d.ts +251 -0
- package/sensor/dist/graph/dead-code.d.ts.map +1 -0
- package/sensor/dist/graph/dead-code.js +776 -0
- package/sensor/dist/graph/dead-code.js.map +1 -0
- package/sensor/dist/graph/dynamic-boundary-report.d.ts +121 -0
- package/sensor/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
- package/sensor/dist/graph/dynamic-boundary-report.js +283 -0
- package/sensor/dist/graph/dynamic-boundary-report.js.map +1 -0
- package/sensor/dist/graph/index.d.ts +4 -0
- package/sensor/dist/graph/index.d.ts.map +1 -1
- package/sensor/dist/graph/index.js +16 -1
- package/sensor/dist/graph/index.js.map +1 -1
- package/sensor/dist/graph/named-symbol-flow.d.ts +125 -0
- package/sensor/dist/graph/named-symbol-flow.d.ts.map +1 -0
- package/sensor/dist/graph/named-symbol-flow.js +552 -0
- package/sensor/dist/graph/named-symbol-flow.js.map +1 -0
- package/sensor/dist/graph/queries.d.ts.map +1 -1
- package/sensor/dist/graph/queries.js +2 -0
- package/sensor/dist/graph/queries.js.map +1 -1
- package/sensor/dist/graph/symbol-lookup.d.ts +83 -0
- package/sensor/dist/graph/symbol-lookup.d.ts.map +1 -0
- package/sensor/dist/graph/symbol-lookup.js +181 -0
- package/sensor/dist/graph/symbol-lookup.js.map +1 -0
- package/sensor/dist/graph/traversal.d.ts +9 -0
- package/sensor/dist/graph/traversal.d.ts.map +1 -1
- package/sensor/dist/graph/traversal.js +62 -36
- package/sensor/dist/graph/traversal.js.map +1 -1
- package/sensor/dist/graph/type-hierarchy.d.ts +155 -0
- package/sensor/dist/graph/type-hierarchy.d.ts.map +1 -0
- package/sensor/dist/graph/type-hierarchy.js +382 -0
- package/sensor/dist/graph/type-hierarchy.js.map +1 -0
- package/sensor/dist/index.d.ts +272 -10
- package/sensor/dist/index.d.ts.map +1 -1
- package/sensor/dist/index.js +510 -34
- package/sensor/dist/index.js.map +1 -1
- package/sensor/dist/mcp/answer-freshness.d.ts +10 -0
- package/sensor/dist/mcp/answer-freshness.d.ts.map +1 -0
- package/sensor/dist/mcp/answer-freshness.js +68 -0
- package/sensor/dist/mcp/answer-freshness.js.map +1 -0
- package/sensor/dist/mcp/daemon-manager.d.ts +1 -1
- package/sensor/dist/mcp/daemon-manager.d.ts.map +1 -1
- package/sensor/dist/mcp/daemon-manager.js +17 -1
- package/sensor/dist/mcp/daemon-manager.js.map +1 -1
- package/sensor/dist/mcp/daemon-paths.d.ts +8 -0
- package/sensor/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/sensor/dist/mcp/daemon-paths.js +65 -2
- package/sensor/dist/mcp/daemon-paths.js.map +1 -1
- package/sensor/dist/mcp/daemon-registry.d.ts +17 -4
- package/sensor/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/sensor/dist/mcp/daemon-registry.js +133 -23
- package/sensor/dist/mcp/daemon-registry.js.map +1 -1
- package/sensor/dist/mcp/daemon.d.ts +26 -13
- package/sensor/dist/mcp/daemon.d.ts.map +1 -1
- package/sensor/dist/mcp/daemon.js +126 -32
- package/sensor/dist/mcp/daemon.js.map +1 -1
- package/sensor/dist/mcp/dynamic-boundaries.d.ts +1 -10
- package/sensor/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
- package/sensor/dist/mcp/dynamic-boundaries.js +46 -42
- package/sensor/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/sensor/dist/mcp/engine.d.ts +31 -9
- package/sensor/dist/mcp/engine.d.ts.map +1 -1
- package/sensor/dist/mcp/engine.js +190 -79
- package/sensor/dist/mcp/engine.js.map +1 -1
- package/sensor/dist/mcp/explore-dedup.d.ts +140 -0
- package/sensor/dist/mcp/explore-dedup.d.ts.map +1 -0
- package/sensor/dist/mcp/explore-dedup.js +239 -0
- package/sensor/dist/mcp/explore-dedup.js.map +1 -0
- package/sensor/dist/mcp/explore-diagnostics.d.ts +289 -0
- package/sensor/dist/mcp/explore-diagnostics.d.ts.map +1 -0
- package/sensor/dist/mcp/explore-diagnostics.js +558 -0
- package/sensor/dist/mcp/explore-diagnostics.js.map +1 -0
- package/sensor/dist/mcp/explore-session-state.d.ts +217 -0
- package/sensor/dist/mcp/explore-session-state.d.ts.map +1 -0
- package/sensor/dist/mcp/explore-session-state.js +322 -0
- package/sensor/dist/mcp/explore-session-state.js.map +1 -0
- package/sensor/dist/mcp/index-freshness-worker.d.ts +2 -0
- package/sensor/dist/mcp/index-freshness-worker.d.ts.map +1 -0
- package/sensor/dist/mcp/index-freshness-worker.js +30 -0
- package/sensor/dist/mcp/index-freshness-worker.js.map +1 -0
- package/sensor/dist/mcp/index-freshness.d.ts +7 -0
- package/sensor/dist/mcp/index-freshness.d.ts.map +1 -0
- package/sensor/dist/mcp/index-freshness.js +94 -0
- package/sensor/dist/mcp/index-freshness.js.map +1 -0
- package/sensor/dist/mcp/index.d.ts +3 -1
- package/sensor/dist/mcp/index.d.ts.map +1 -1
- package/sensor/dist/mcp/index.js +109 -12
- package/sensor/dist/mcp/index.js.map +1 -1
- package/sensor/dist/mcp/liveness-watchdog.d.ts +4 -1
- package/sensor/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/sensor/dist/mcp/liveness-watchdog.js +11 -2
- package/sensor/dist/mcp/liveness-watchdog.js.map +1 -1
- package/sensor/dist/mcp/project-lifecycle.d.ts +9 -0
- package/sensor/dist/mcp/project-lifecycle.d.ts.map +1 -0
- package/sensor/dist/mcp/project-lifecycle.js +182 -0
- package/sensor/dist/mcp/project-lifecycle.js.map +1 -0
- package/sensor/dist/mcp/proxy.d.ts.map +1 -1
- package/sensor/dist/mcp/proxy.js +15 -1
- package/sensor/dist/mcp/proxy.js.map +1 -1
- package/sensor/dist/mcp/query-pool.d.ts +2 -2
- package/sensor/dist/mcp/query-pool.d.ts.map +1 -1
- package/sensor/dist/mcp/query-pool.js +9 -7
- package/sensor/dist/mcp/query-pool.js.map +1 -1
- package/sensor/dist/mcp/query-worker.js +2 -2
- package/sensor/dist/mcp/query-worker.js.map +1 -1
- package/sensor/dist/mcp/server-instructions.d.ts +2 -2
- package/sensor/dist/mcp/server-instructions.d.ts.map +1 -1
- package/sensor/dist/mcp/server-instructions.js +13 -6
- package/sensor/dist/mcp/server-instructions.js.map +1 -1
- package/sensor/dist/mcp/session.d.ts +16 -0
- package/sensor/dist/mcp/session.d.ts.map +1 -1
- package/sensor/dist/mcp/session.js +36 -13
- package/sensor/dist/mcp/session.js.map +1 -1
- package/sensor/dist/mcp/startup-handshake.d.ts +3 -1
- package/sensor/dist/mcp/startup-handshake.d.ts.map +1 -1
- package/sensor/dist/mcp/startup-handshake.js +10 -2
- package/sensor/dist/mcp/startup-handshake.js.map +1 -1
- package/sensor/dist/mcp/tools.d.ts +496 -38
- package/sensor/dist/mcp/tools.d.ts.map +1 -1
- package/sensor/dist/mcp/tools.js +4021 -772
- package/sensor/dist/mcp/tools.js.map +1 -1
- package/sensor/dist/mcp/writer-lock.d.ts +61 -0
- package/sensor/dist/mcp/writer-lock.d.ts.map +1 -0
- package/sensor/dist/mcp/writer-lock.js +260 -0
- package/sensor/dist/mcp/writer-lock.js.map +1 -0
- package/sensor/dist/project-config.d.ts +23 -0
- package/sensor/dist/project-config.d.ts.map +1 -1
- package/sensor/dist/project-config.js +39 -2
- package/sensor/dist/project-config.js.map +1 -1
- package/sensor/dist/resolution/alias-binding.d.ts +56 -0
- package/sensor/dist/resolution/alias-binding.d.ts.map +1 -0
- package/sensor/dist/resolution/alias-binding.js +127 -0
- package/sensor/dist/resolution/alias-binding.js.map +1 -0
- package/sensor/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/sensor/dist/resolution/c-fnptr-synthesizer.js +21 -19
- package/sensor/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/sensor/dist/resolution/callback-synthesizer.d.ts +23 -1
- package/sensor/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/sensor/dist/resolution/callback-synthesizer.js +356 -155
- package/sensor/dist/resolution/callback-synthesizer.js.map +1 -1
- package/sensor/dist/resolution/cpp-constructor.d.ts +4 -0
- package/sensor/dist/resolution/cpp-constructor.d.ts.map +1 -0
- package/sensor/dist/resolution/cpp-constructor.js +123 -0
- package/sensor/dist/resolution/cpp-constructor.js.map +1 -0
- package/sensor/dist/resolution/cpp-macro-visibility.d.ts +12 -0
- package/sensor/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
- package/sensor/dist/resolution/cpp-macro-visibility.js +342 -0
- package/sensor/dist/resolution/cpp-macro-visibility.js.map +1 -0
- package/sensor/dist/resolution/expo-router-synthesizer.d.ts +32 -0
- package/sensor/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
- package/sensor/dist/resolution/expo-router-synthesizer.js +189 -0
- package/sensor/dist/resolution/expo-router-synthesizer.js.map +1 -0
- package/sensor/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/sensor/dist/resolution/frameworks/csharp.js +96 -2
- package/sensor/dist/resolution/frameworks/csharp.js.map +1 -1
- package/sensor/dist/resolution/frameworks/expo-router.d.ts +189 -0
- package/sensor/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
- package/sensor/dist/resolution/frameworks/expo-router.js +785 -0
- package/sensor/dist/resolution/frameworks/expo-router.js.map +1 -0
- package/sensor/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/sensor/dist/resolution/frameworks/express.js +251 -16
- package/sensor/dist/resolution/frameworks/express.js.map +1 -1
- package/sensor/dist/resolution/frameworks/index.d.ts +5 -0
- package/sensor/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/sensor/dist/resolution/frameworks/index.js +29 -1
- package/sensor/dist/resolution/frameworks/index.js.map +1 -1
- package/sensor/dist/resolution/frameworks/java.d.ts.map +1 -1
- package/sensor/dist/resolution/frameworks/java.js +79 -47
- package/sensor/dist/resolution/frameworks/java.js.map +1 -1
- package/sensor/dist/resolution/frameworks/laravel.d.ts.map +1 -1
- package/sensor/dist/resolution/frameworks/laravel.js +294 -4
- package/sensor/dist/resolution/frameworks/laravel.js.map +1 -1
- package/sensor/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
- package/sensor/dist/resolution/frameworks/nestjs.js +6 -14
- package/sensor/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/sensor/dist/resolution/frameworks/nextjs.d.ts +76 -0
- package/sensor/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
- package/sensor/dist/resolution/frameworks/nextjs.js +328 -0
- package/sensor/dist/resolution/frameworks/nextjs.js.map +1 -0
- package/sensor/dist/resolution/frameworks/object-literal.d.ts +32 -0
- package/sensor/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
- package/sensor/dist/resolution/frameworks/object-literal.js +139 -0
- package/sensor/dist/resolution/frameworks/object-literal.js.map +1 -0
- package/sensor/dist/resolution/frameworks/package-deps.d.ts +14 -0
- package/sensor/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
- package/sensor/dist/resolution/frameworks/package-deps.js +78 -0
- package/sensor/dist/resolution/frameworks/package-deps.js.map +1 -0
- package/sensor/dist/resolution/frameworks/python.d.ts.map +1 -1
- package/sensor/dist/resolution/frameworks/python.js +166 -0
- package/sensor/dist/resolution/frameworks/python.js.map +1 -1
- package/sensor/dist/resolution/frameworks/react-native.d.ts +26 -0
- package/sensor/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/sensor/dist/resolution/frameworks/react-native.js +153 -14
- package/sensor/dist/resolution/frameworks/react-native.js.map +1 -1
- package/sensor/dist/resolution/frameworks/react-router.d.ts +46 -0
- package/sensor/dist/resolution/frameworks/react-router.d.ts.map +1 -0
- package/sensor/dist/resolution/frameworks/react-router.js +187 -0
- package/sensor/dist/resolution/frameworks/react-router.js.map +1 -0
- package/sensor/dist/resolution/frameworks/react.d.ts +2 -1
- package/sensor/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/sensor/dist/resolution/frameworks/react.js +188 -139
- package/sensor/dist/resolution/frameworks/react.js.map +1 -1
- package/sensor/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/sensor/dist/resolution/frameworks/svelte.js +6 -1
- package/sensor/dist/resolution/frameworks/svelte.js.map +1 -1
- package/sensor/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
- package/sensor/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
- package/sensor/dist/resolution/frameworks/sveltekit-router.js +156 -0
- package/sensor/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
- package/sensor/dist/resolution/frameworks/swift.d.ts.map +1 -1
- package/sensor/dist/resolution/frameworks/swift.js +140 -99
- package/sensor/dist/resolution/frameworks/swift.js.map +1 -1
- package/sensor/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
- package/sensor/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
- package/sensor/dist/resolution/frameworks/tanstack-router.js +437 -0
- package/sensor/dist/resolution/frameworks/tanstack-router.js.map +1 -0
- package/sensor/dist/resolution/frameworks/vue-router.d.ts +82 -0
- package/sensor/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
- package/sensor/dist/resolution/frameworks/vue-router.js +377 -0
- package/sensor/dist/resolution/frameworks/vue-router.js.map +1 -0
- package/sensor/dist/resolution/import-resolver.d.ts +38 -0
- package/sensor/dist/resolution/import-resolver.d.ts.map +1 -1
- package/sensor/dist/resolution/import-resolver.js +394 -28
- package/sensor/dist/resolution/import-resolver.js.map +1 -1
- package/sensor/dist/resolution/index.d.ts +89 -25
- package/sensor/dist/resolution/index.d.ts.map +1 -1
- package/sensor/dist/resolution/index.js +573 -148
- package/sensor/dist/resolution/index.js.map +1 -1
- package/sensor/dist/resolution/js-builtins.d.ts +13 -0
- package/sensor/dist/resolution/js-builtins.d.ts.map +1 -0
- package/sensor/dist/resolution/js-builtins.js +46 -0
- package/sensor/dist/resolution/js-builtins.js.map +1 -0
- package/sensor/dist/resolution/name-matcher.d.ts +99 -22
- package/sensor/dist/resolution/name-matcher.d.ts.map +1 -1
- package/sensor/dist/resolution/name-matcher.js +2220 -86
- package/sensor/dist/resolution/name-matcher.js.map +1 -1
- package/sensor/dist/resolution/next-router-synthesizer.d.ts +27 -0
- package/sensor/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
- package/sensor/dist/resolution/next-router-synthesizer.js +113 -0
- package/sensor/dist/resolution/next-router-synthesizer.js.map +1 -0
- package/sensor/dist/resolution/path-aliases.d.ts +6 -4
- package/sensor/dist/resolution/path-aliases.d.ts.map +1 -1
- package/sensor/dist/resolution/path-aliases.js +125 -17
- package/sensor/dist/resolution/path-aliases.js.map +1 -1
- package/sensor/dist/resolution/react-router-synthesizer.d.ts +33 -0
- package/sensor/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
- package/sensor/dist/resolution/react-router-synthesizer.js +126 -0
- package/sensor/dist/resolution/react-router-synthesizer.js.map +1 -0
- package/sensor/dist/resolution/resolver-pool.d.ts +2 -0
- package/sensor/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/sensor/dist/resolution/resolver-pool.js +4 -0
- package/sensor/dist/resolution/resolver-pool.js.map +1 -1
- package/sensor/dist/resolution/strip-comments.d.ts +6 -0
- package/sensor/dist/resolution/strip-comments.d.ts.map +1 -1
- package/sensor/dist/resolution/strip-comments.js +58 -0
- package/sensor/dist/resolution/strip-comments.js.map +1 -1
- package/sensor/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
- package/sensor/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
- package/sensor/dist/resolution/sveltekit-synthesizer.js +173 -0
- package/sensor/dist/resolution/sveltekit-synthesizer.js.map +1 -0
- package/sensor/dist/resolution/swift-type-visibility.d.ts +52 -0
- package/sensor/dist/resolution/swift-type-visibility.d.ts.map +1 -0
- package/sensor/dist/resolution/swift-type-visibility.js +328 -0
- package/sensor/dist/resolution/swift-type-visibility.js.map +1 -0
- package/sensor/dist/resolution/synth-utils.d.ts +26 -0
- package/sensor/dist/resolution/synth-utils.d.ts.map +1 -0
- package/sensor/dist/resolution/synth-utils.js +75 -0
- package/sensor/dist/resolution/synth-utils.js.map +1 -0
- package/sensor/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
- package/sensor/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
- package/sensor/dist/resolution/tanstack-router-synthesizer.js +114 -0
- package/sensor/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
- package/sensor/dist/resolution/tier-synthesizer.d.ts +54 -0
- package/sensor/dist/resolution/tier-synthesizer.d.ts.map +1 -0
- package/sensor/dist/resolution/tier-synthesizer.js +1294 -0
- package/sensor/dist/resolution/tier-synthesizer.js.map +1 -0
- package/sensor/dist/resolution/types.d.ts +78 -2
- package/sensor/dist/resolution/types.d.ts.map +1 -1
- package/sensor/dist/resolution/types.js +64 -0
- package/sensor/dist/resolution/types.js.map +1 -1
- package/sensor/dist/resolution/vue-router-synthesizer.d.ts +30 -0
- package/sensor/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
- package/sensor/dist/resolution/vue-router-synthesizer.js +115 -0
- package/sensor/dist/resolution/vue-router-synthesizer.js.map +1 -0
- package/sensor/dist/search/identifier-segments.d.ts +10 -0
- package/sensor/dist/search/identifier-segments.d.ts.map +1 -1
- package/sensor/dist/search/identifier-segments.js +29 -0
- package/sensor/dist/search/identifier-segments.js.map +1 -1
- package/sensor/dist/search/query-paths.d.ts +106 -0
- package/sensor/dist/search/query-paths.d.ts.map +1 -0
- package/sensor/dist/search/query-paths.js +513 -0
- package/sensor/dist/search/query-paths.js.map +1 -0
- package/sensor/dist/search/query-utils.d.ts +22 -2
- package/sensor/dist/search/query-utils.d.ts.map +1 -1
- package/sensor/dist/search/query-utils.js +56 -16
- package/sensor/dist/search/query-utils.js.map +1 -1
- package/sensor/dist/sync/watch-policy.d.ts +14 -0
- package/sensor/dist/sync/watch-policy.d.ts.map +1 -1
- package/sensor/dist/sync/watch-policy.js +19 -0
- package/sensor/dist/sync/watch-policy.js.map +1 -1
- package/sensor/dist/sync/watcher.d.ts +74 -35
- package/sensor/dist/sync/watcher.d.ts.map +1 -1
- package/sensor/dist/sync/watcher.js +281 -99
- package/sensor/dist/sync/watcher.js.map +1 -1
- package/sensor/dist/telemetry/index.d.ts +4 -2
- package/sensor/dist/telemetry/index.d.ts.map +1 -1
- package/sensor/dist/telemetry/index.js +92 -41
- package/sensor/dist/telemetry/index.js.map +1 -1
- package/sensor/dist/types.d.ts +18 -2
- package/sensor/dist/types.d.ts.map +1 -1
- package/sensor/dist/types.js +2 -0
- package/sensor/dist/types.js.map +1 -1
- package/sensor/dist/ui-server/api/deadcode.d.ts +84 -0
- package/sensor/dist/ui-server/api/deadcode.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/deadcode.js +136 -0
- package/sensor/dist/ui-server/api/deadcode.js.map +1 -0
- package/sensor/dist/ui-server/api/effects.d.ts +94 -0
- package/sensor/dist/ui-server/api/effects.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/effects.js +527 -0
- package/sensor/dist/ui-server/api/effects.js.map +1 -0
- package/sensor/dist/ui-server/api/entrypoints.d.ts +92 -0
- package/sensor/dist/ui-server/api/entrypoints.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/entrypoints.js +361 -0
- package/sensor/dist/ui-server/api/entrypoints.js.map +1 -0
- package/sensor/dist/ui-server/api/events.d.ts +183 -0
- package/sensor/dist/ui-server/api/events.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/events.js +430 -0
- package/sensor/dist/ui-server/api/events.js.map +1 -0
- package/sensor/dist/ui-server/api/file.d.ts +66 -0
- package/sensor/dist/ui-server/api/file.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/file.js +235 -0
- package/sensor/dist/ui-server/api/file.js.map +1 -0
- package/sensor/dist/ui-server/api/filecode.d.ts +126 -0
- package/sensor/dist/ui-server/api/filecode.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/filecode.js +205 -0
- package/sensor/dist/ui-server/api/filecode.js.map +1 -0
- package/sensor/dist/ui-server/api/flow.d.ts +226 -0
- package/sensor/dist/ui-server/api/flow.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/flow.js +612 -0
- package/sensor/dist/ui-server/api/flow.js.map +1 -0
- package/sensor/dist/ui-server/api/hierarchy.d.ts +81 -0
- package/sensor/dist/ui-server/api/hierarchy.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/hierarchy.js +92 -0
- package/sensor/dist/ui-server/api/hierarchy.js.map +1 -0
- package/sensor/dist/ui-server/api/index.d.ts +90 -0
- package/sensor/dist/ui-server/api/index.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/index.js +332 -0
- package/sensor/dist/ui-server/api/index.js.map +1 -0
- package/sensor/dist/ui-server/api/map.d.ts +256 -0
- package/sensor/dist/ui-server/api/map.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/map.js +760 -0
- package/sensor/dist/ui-server/api/map.js.map +1 -0
- package/sensor/dist/ui-server/api/node.d.ts +81 -0
- package/sensor/dist/ui-server/api/node.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/node.js +388 -0
- package/sensor/dist/ui-server/api/node.js.map +1 -0
- package/sensor/dist/ui-server/api/nodes.d.ts +25 -0
- package/sensor/dist/ui-server/api/nodes.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/nodes.js +45 -0
- package/sensor/dist/ui-server/api/nodes.js.map +1 -0
- package/sensor/dist/ui-server/api/program.d.ts +139 -0
- package/sensor/dist/ui-server/api/program.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/program.js +315 -0
- package/sensor/dist/ui-server/api/program.js.map +1 -0
- package/sensor/dist/ui-server/api/respond.d.ts +76 -0
- package/sensor/dist/ui-server/api/respond.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/respond.js +186 -0
- package/sensor/dist/ui-server/api/respond.js.map +1 -0
- package/sensor/dist/ui-server/api/route-roots.d.ts +39 -0
- package/sensor/dist/ui-server/api/route-roots.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/route-roots.js +96 -0
- package/sensor/dist/ui-server/api/route-roots.js.map +1 -0
- package/sensor/dist/ui-server/api/routes.d.ts +59 -0
- package/sensor/dist/ui-server/api/routes.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/routes.js +108 -0
- package/sensor/dist/ui-server/api/routes.js.map +1 -0
- package/sensor/dist/ui-server/api/screens.d.ts +117 -0
- package/sensor/dist/ui-server/api/screens.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/screens.js +611 -0
- package/sensor/dist/ui-server/api/screens.js.map +1 -0
- package/sensor/dist/ui-server/api/search.d.ts +29 -0
- package/sensor/dist/ui-server/api/search.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/search.js +232 -0
- package/sensor/dist/ui-server/api/search.js.map +1 -0
- package/sensor/dist/ui-server/api/session.d.ts +52 -0
- package/sensor/dist/ui-server/api/session.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/session.js +196 -0
- package/sensor/dist/ui-server/api/session.js.map +1 -0
- package/sensor/dist/ui-server/api/source.d.ts +200 -0
- package/sensor/dist/ui-server/api/source.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/source.js +422 -0
- package/sensor/dist/ui-server/api/source.js.map +1 -0
- package/sensor/dist/ui-server/api/stats.d.ts +27 -0
- package/sensor/dist/ui-server/api/stats.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/stats.js +164 -0
- package/sensor/dist/ui-server/api/stats.js.map +1 -0
- package/sensor/dist/ui-server/api/steps.d.ts +274 -0
- package/sensor/dist/ui-server/api/steps.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/steps.js +1544 -0
- package/sensor/dist/ui-server/api/steps.js.map +1 -0
- package/sensor/dist/ui-server/api/trail-store.d.ts +142 -0
- package/sensor/dist/ui-server/api/trail-store.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/trail-store.js +325 -0
- package/sensor/dist/ui-server/api/trail-store.js.map +1 -0
- package/sensor/dist/ui-server/api/trails.d.ts +163 -0
- package/sensor/dist/ui-server/api/trails.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/trails.js +369 -0
- package/sensor/dist/ui-server/api/trails.js.map +1 -0
- package/sensor/dist/ui-server/api/when.d.ts +133 -0
- package/sensor/dist/ui-server/api/when.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/when.js +275 -0
- package/sensor/dist/ui-server/api/when.js.map +1 -0
- package/sensor/dist/ui-server/api/wire.d.ts +179 -0
- package/sensor/dist/ui-server/api/wire.d.ts.map +1 -0
- package/sensor/dist/ui-server/api/wire.js +231 -0
- package/sensor/dist/ui-server/api/wire.js.map +1 -0
- package/sensor/dist/ui-server/assets.d.ts +40 -0
- package/sensor/dist/ui-server/assets.d.ts.map +1 -0
- package/sensor/dist/ui-server/assets.js +110 -0
- package/sensor/dist/ui-server/assets.js.map +1 -0
- package/sensor/dist/ui-server/constants.d.ts +32 -0
- package/sensor/dist/ui-server/constants.d.ts.map +1 -0
- package/sensor/dist/ui-server/constants.js +35 -0
- package/sensor/dist/ui-server/constants.js.map +1 -0
- package/sensor/dist/ui-server/highlight/index.d.ts +113 -0
- package/sensor/dist/ui-server/highlight/index.d.ts.map +1 -0
- package/sensor/dist/ui-server/highlight/index.js +307 -0
- package/sensor/dist/ui-server/highlight/index.js.map +1 -0
- package/sensor/dist/ui-server/highlight/languages.d.ts +36 -0
- package/sensor/dist/ui-server/highlight/languages.d.ts.map +1 -0
- package/sensor/dist/ui-server/highlight/languages.js +50 -0
- package/sensor/dist/ui-server/highlight/languages.js.map +1 -0
- package/sensor/dist/ui-server/index.d.ts +92 -0
- package/sensor/dist/ui-server/index.d.ts.map +1 -0
- package/sensor/dist/ui-server/index.js +399 -0
- package/sensor/dist/ui-server/index.js.map +1 -0
- package/sensor/dist/ui-server/open-browser.d.ts +31 -0
- package/sensor/dist/ui-server/open-browser.d.ts.map +1 -0
- package/sensor/dist/ui-server/open-browser.js +79 -0
- package/sensor/dist/ui-server/open-browser.js.map +1 -0
- package/sensor/dist/ui-server/security.d.ts +127 -0
- package/sensor/dist/ui-server/security.d.ts.map +1 -0
- package/sensor/dist/ui-server/security.js +332 -0
- package/sensor/dist/ui-server/security.js.map +1 -0
- package/sensor/dist/ui-server/static.d.ts +45 -0
- package/sensor/dist/ui-server/static.d.ts.map +1 -0
- package/sensor/dist/ui-server/static.js +165 -0
- package/sensor/dist/ui-server/static.js.map +1 -0
- package/sensor/dist/utils.d.ts +14 -2
- package/sensor/dist/utils.d.ts.map +1 -1
- package/sensor/dist/utils.js +25 -10
- package/sensor/dist/utils.js.map +1 -1
- package/src/cli-help.mjs +4 -2
- package/src/sensor-adapter.mjs +5 -1
- package/src/todo-cli.mjs +88 -11
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type LatticeSensor from '../index';
|
|
7
7
|
import type { QueryPool } from './query-pool';
|
|
8
|
+
import { WslSharedIndexError } from '../db/wsl-shared-index';
|
|
8
9
|
export declare function __setLoadLatticeSensorForTests(cls: typeof import('../index').default | null): void;
|
|
9
10
|
import type { PendingFile } from '../sync';
|
|
11
|
+
import { type AnswerFile } from './answer-freshness';
|
|
12
|
+
import { ExploreSessionState, type ExploreEmission, type ExploreLineRange } from './explore-session-state';
|
|
10
13
|
/**
|
|
11
14
|
* An expected, recoverable "lattice sensor can't serve this" condition — most
|
|
12
15
|
* importantly a project with no index. The dispatch catch converts these to
|
|
@@ -23,9 +26,12 @@ export declare class NotIndexedError extends Error {
|
|
|
23
26
|
/**
|
|
24
27
|
* A security refusal (sensitive system path). Stays `isError: true` WITHOUT
|
|
25
28
|
* retry guidance — abandoning this path is the desired agent reaction.
|
|
29
|
+
*
|
|
30
|
+
* Defined in `../errors` so non-MCP read sinks (the `lattice sensor ui` server) can
|
|
31
|
+
* enforce the same refusal without importing this module; re-exported here
|
|
32
|
+
* because this is where every existing caller imports it from.
|
|
26
33
|
*/
|
|
27
|
-
export
|
|
28
|
-
}
|
|
34
|
+
export { PathRefusalError } from '../errors';
|
|
29
35
|
/**
|
|
30
36
|
* ADR 0049 Decision 5②: a genuine malfunction opening the default project's
|
|
31
37
|
* index — DB open failure, schema mismatch, integrity error, or lock
|
|
@@ -105,19 +111,368 @@ export interface ExploreOutputBudget {
|
|
|
105
111
|
includeAdditionalFiles: boolean;
|
|
106
112
|
/** Include the "Complete source code is included above…" reminder. */
|
|
107
113
|
includeCompletenessSignal: boolean;
|
|
108
|
-
/** Include the explore-budget reminder at the end. */
|
|
109
|
-
includeBudgetNote: boolean;
|
|
110
114
|
/**
|
|
111
|
-
*
|
|
112
|
-
* the
|
|
113
|
-
* the sort, which on tiny repos still lets one slip into the top N (e.g.
|
|
114
|
-
* cobra's `command_test.go` displaced `args.go` and contributed ~10KB of
|
|
115
|
-
* pure noise to "How does cobra parse commands?"). Off by default; on
|
|
116
|
-
* for the very-tiny tier where one slip dominates the budget.
|
|
115
|
+
* Include the advisory exploration-guidance note at the end. Purely
|
|
116
|
+
* advisory — the server NEVER rejects or rate-limits extra explore calls.
|
|
117
117
|
*/
|
|
118
|
-
|
|
118
|
+
includeBudgetNote: boolean;
|
|
119
119
|
}
|
|
120
120
|
export declare function getExploreOutputBudget(fileCount: number): ExploreOutputBudget;
|
|
121
|
+
/**
|
|
122
|
+
* How strongly a match on a symbol of this kind corroborates that its FILE is
|
|
123
|
+
* what the query is about.
|
|
124
|
+
*
|
|
125
|
+
* 1.0 a callable or a type — the unit an architecture question is about
|
|
126
|
+
* ~0.5 a member of a type, or the file node itself (a path match, not a
|
|
127
|
+
* symbol match)
|
|
128
|
+
* ~0.3 a variable / constant — as often a name collision as a definition
|
|
129
|
+
* 0.15 a parameter — essentially never the subject of a question
|
|
130
|
+
*
|
|
131
|
+
* Unlisted kinds fall back to `DEFAULT_RELEVANCE_KIND_WEIGHT`, so a NodeKind
|
|
132
|
+
* added later is neither free nor fatal.
|
|
133
|
+
*/
|
|
134
|
+
export declare const RELEVANCE_KIND_WEIGHT: Readonly<Record<string, number>>;
|
|
135
|
+
export declare const EXPLORE_ALLOCATION: {
|
|
136
|
+
/**
|
|
137
|
+
* A file whose weight is under this fraction of the top file's gets no source.
|
|
138
|
+
*
|
|
139
|
+
* Calibrated between the two shapes the fixtures pin: the #1500 generated CRUD
|
|
140
|
+
* lands at 10–11% of the top weight (penalised twice — once into the score by
|
|
141
|
+
* `rankPenalty`, once again here) and must cliff; a genuinely peripheral but
|
|
142
|
+
* hand-written flow file — `payslip_builder.go`, the direct callee of the
|
|
143
|
+
* workflow entry — lands at 25% and must NOT. Everything in between is a
|
|
144
|
+
* judgement call the agent can undo for ~0 cost, because a cliffed file is
|
|
145
|
+
* still NAMED in the response and one follow-up explore fetches it.
|
|
146
|
+
*/
|
|
147
|
+
readonly CLIFF_FRACTION: 0.15;
|
|
148
|
+
/**
|
|
149
|
+
* Ceiling on the cliff, in the same units as `SCORE_FLOOR_MAX` — and for the
|
|
150
|
+
* same reason. A file whose weight clears a full-strength direct match is never
|
|
151
|
+
* incidental, so no amount of concentration elsewhere may zero it: one
|
|
152
|
+
* overwhelming top file (a 99-scoring god-file among score-10 peers) otherwise
|
|
153
|
+
* puts the cliff at 14.9 and silences every peer the score floor had just
|
|
154
|
+
* deliberately admitted. The cliff is a RELATIVE prune of weak evidence, not a
|
|
155
|
+
* second admission gate — the score floor already owns admission.
|
|
156
|
+
*/
|
|
157
|
+
readonly CLIFF_MAX: 10;
|
|
158
|
+
/**
|
|
159
|
+
* Floor on a useful reservation — every admitted file gets this much before
|
|
160
|
+
* the proportional split divides the rest. Under it a slice can't hold one
|
|
161
|
+
* complete method, and a fragment is strictly worse than a pointer: it forces
|
|
162
|
+
* the Read this tool exists to prevent.
|
|
163
|
+
*
|
|
164
|
+
* It is a FLOOR, not a second cliff. Cliffing the starved file instead
|
|
165
|
+
* cascades: removing the smallest raises everyone else's share by so little
|
|
166
|
+
* that the next-smallest starves too, and a query with two dominant files ate
|
|
167
|
+
* six legitimately-ranked peers one at a time. Concentration is the relative
|
|
168
|
+
* cliff's job; this only keeps a served file's slice usable.
|
|
169
|
+
*/
|
|
170
|
+
readonly MIN_CHARS: 700;
|
|
171
|
+
/**
|
|
172
|
+
* Safety valve, as a fraction of the envelope. Not the primary guard any more —
|
|
173
|
+
* the proportional split is — so this only has to stop a pathological
|
|
174
|
+
* single-file response.
|
|
175
|
+
*
|
|
176
|
+
* It does not apply to a file the query NAMED — one that defines a symbol the
|
|
177
|
+
* query spelled, or that the query named by path. The valve hedges against a
|
|
178
|
+
* mis-ranked dominant file, and a file the agent asked for by name is not
|
|
179
|
+
* one. It also never redistributed: a clamped file's excess was simply left
|
|
180
|
+
* unreserved, and the carry-forward only moves reservations, so nobody could
|
|
181
|
+
* spend it. On express, "response.js res.send res.json res.render …" admits
|
|
182
|
+
* one file, clamps it at 9,100 with 3,700 of the pool unreserved, and cuts
|
|
183
|
+
* the named `send` body at 55 of 97 lines in a 10.9K response to a 13K budget.
|
|
184
|
+
*/
|
|
185
|
+
readonly MAX_SHARE: 0.7;
|
|
186
|
+
/**
|
|
187
|
+
* Markdown overhead charged per rendered file (header + fences + blank lines),
|
|
188
|
+
* matching the render loop's own `+ 200` accounting. Held out of the pool
|
|
189
|
+
* before the split so the reservations plus their overhead fit the envelope —
|
|
190
|
+
* without this the last file's reservation is always the one that doesn't fit.
|
|
191
|
+
*/
|
|
192
|
+
readonly FILE_OVERHEAD: 200;
|
|
193
|
+
/**
|
|
194
|
+
* Flow-spine files are weighted up and are exempt from the cliff. Clipping the
|
|
195
|
+
* spine causes the Read fallback (it IS the answer to a flow question);
|
|
196
|
+
* clipping a peripheral file does not. This makes the existing advisory spine
|
|
197
|
+
* handling — `hasSpine`, `SPINE_CEILING` — strict at the allocation layer.
|
|
198
|
+
*/
|
|
199
|
+
readonly SPINE_WEIGHT_BOOST: 2;
|
|
200
|
+
/**
|
|
201
|
+
* Slack allowed on the whole-file rule: a file a little over its reservation
|
|
202
|
+
* still ships WHOLE rather than as clusters, because slicing off that last
|
|
203
|
+
* sliver saves ~1% of the envelope and costs a Read — the trade the whole-file
|
|
204
|
+
* rule exists to refuse. Proportional (with an absolute ceiling) because a
|
|
205
|
+
* "sliver" is relative: a flat 800 is 15% of a 5K reservation but 31% of a 2.5K
|
|
206
|
+
* one, and at the small end that overshoot is exactly what the file below then
|
|
207
|
+
* loses.
|
|
208
|
+
*/
|
|
209
|
+
readonly WHOLE_FILE_GRACE_FRACTION: 0.15;
|
|
210
|
+
readonly WHOLE_FILE_GRACE_MAX: 800;
|
|
211
|
+
/**
|
|
212
|
+
* A reservation that already covers this fraction of a file BUYS THE WHOLE
|
|
213
|
+
* FILE (CG-21), even though the file is bigger than the reservation.
|
|
214
|
+
*
|
|
215
|
+
* The grace above is calibrated as a *sliver* — it only rescues a file that
|
|
216
|
+
* essentially fits. Below it there is a hole the render loop cannot fill:
|
|
217
|
+
* express's `lib/utils.js` (5,293 B) was the TOP-ranked file, reserved 3,870,
|
|
218
|
+
* declined the whole-file render at a 4,450 grace bound, and then spent 583 on
|
|
219
|
+
* a three-symbol cluster render. The other 3,287 chars of its reservation were
|
|
220
|
+
* neither redistributed nor delivered — the envelope shrank by a third against
|
|
221
|
+
* an unchanged budget and the agent Read the file back four times.
|
|
222
|
+
*
|
|
223
|
+
* So the rule is not "does the file fit the reservation" but "has the
|
|
224
|
+
* reservation already bought most of the file": at 0.6 the loop pays at most
|
|
225
|
+
* two-thirds of a reservation extra to avoid losing the whole thing, and it
|
|
226
|
+
* spends bytes it was going to spend anyway on a file that already earned
|
|
227
|
+
* them. Below the fraction the shortfall is real — the file is several times
|
|
228
|
+
* its reservation, clustering is the right answer, and the carry-forward
|
|
229
|
+
* (`reservedSoFar`/`sourceSpent` in the render loop) hands whatever it cannot
|
|
230
|
+
* spend to the next file down.
|
|
231
|
+
*/
|
|
232
|
+
readonly WHOLE_FILE_BUY_FRACTION: 0.6;
|
|
233
|
+
/**
|
|
234
|
+
* The buy rule's overshoot is funded from ONE pool for the whole response,
|
|
235
|
+
* sized as this fraction of the envelope — deliberately the same 15% as
|
|
236
|
+
* `WHOLE_FILE_GRACE_FRACTION`, one level up: the grace is a sliver of a
|
|
237
|
+
* FILE's reservation, this is a sliver of the RESPONSE's envelope.
|
|
238
|
+
*
|
|
239
|
+
* Per-file funding is the version that fails, and it fails the same way the
|
|
240
|
+
* bug being fixed does. The merit test is a RATIO, so wherever several files
|
|
241
|
+
* sit near it they all qualify, and N independent overshoots inflate the
|
|
242
|
+
* response until the render ceiling drops whatever is last. Measured on the
|
|
243
|
+
* #1500 payroll fixture: three files bought whole and `payslip_builder.go` —
|
|
244
|
+
* the file that computes the payslip the question asks about, rank #6 — was
|
|
245
|
+
* dropped entirely so three higher-ranked files could each ship their final
|
|
246
|
+
* sliver. A dropped section is strictly worse than a clustered one, so one
|
|
247
|
+
* shared pool, spent in rank order, is the bound that matters.
|
|
248
|
+
*/
|
|
249
|
+
readonly WHOLE_FILE_BUY_OVERSHOOT_FRACTION: 0.15;
|
|
250
|
+
};
|
|
251
|
+
/** One candidate file's allocation inputs, in final rank order. */
|
|
252
|
+
export interface ExploreAllocationCandidate {
|
|
253
|
+
path: string;
|
|
254
|
+
/** Post-`rankPenalty` relevance score from the ranking pass. */
|
|
255
|
+
score: number;
|
|
256
|
+
/**
|
|
257
|
+
* How much this file's BYTES are worth, independent of how well it matched.
|
|
258
|
+
* Ranking answers "is this file about the query"; allocation answers "will
|
|
259
|
+
* these bytes teach the agent anything". Generated CRUD can legitimately rank
|
|
260
|
+
* (it name-collides on every domain word) while its bytes stay mechanical
|
|
261
|
+
* boilerplate the agent gains nothing from reading — so `rankPenalty` is
|
|
262
|
+
* applied a SECOND time here. That is what finally sinks the #1500 generated
|
|
263
|
+
* layer below the cliff: it survived CG-10's single penalty because the sort's
|
|
264
|
+
* leading keys (entry-point, graph mass) are structural, and a big densely
|
|
265
|
+
* self-referential generated file scores well on both.
|
|
266
|
+
*/
|
|
267
|
+
worth: number;
|
|
268
|
+
/**
|
|
269
|
+
* Carries a symbol on the rendered flow spine — or an exact target (a
|
|
270
|
+
* qualified name, a line anchor), which is the answer by the same argument.
|
|
271
|
+
*/
|
|
272
|
+
spine: boolean;
|
|
273
|
+
/**
|
|
274
|
+
* The query named this file by PATH (see query-paths.ts). Pinned files are
|
|
275
|
+
* never cliffed or trimmed, and weigh at least as much as the strongest
|
|
276
|
+
* candidate — the agent asked for the file itself, so starving it on text/
|
|
277
|
+
* graph scores (which a pure-path query doesn't produce) defeats the ask.
|
|
278
|
+
*/
|
|
279
|
+
pinned?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* The query named a symbol this file defines (the named-first sort tier). Like
|
|
282
|
+
* a pinned file, it is exempt from the `MAX_SHARE` valve: its proportional
|
|
283
|
+
* share stands, bounded only by the pool.
|
|
284
|
+
*/
|
|
285
|
+
named?: boolean;
|
|
286
|
+
}
|
|
287
|
+
export interface ExploreAllocation {
|
|
288
|
+
/** path → chars of source it may render. Only holds admitted files. */
|
|
289
|
+
allowances: Map<string, number>;
|
|
290
|
+
/** Files the cliff zeroed, in rank order — pointers, not bytes. */
|
|
291
|
+
cliffed: string[];
|
|
292
|
+
/** The weight threshold the cliff fired at (0 when nothing was cliffed). */
|
|
293
|
+
cliffAt: number;
|
|
294
|
+
/** Chars actually split among the admitted files. */
|
|
295
|
+
pool: number;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Split `budget.maxOutputChars` across ranked candidates in proportion to
|
|
299
|
+
* relevance, with a hard relative cliff.
|
|
300
|
+
*
|
|
301
|
+
* `candidates` must arrive in FINAL RANK ORDER — `maxFiles` is applied to the
|
|
302
|
+
* survivors of the cliff, in that order, so cliffing genuinely hands a slot to
|
|
303
|
+
* the next file down rather than leaving it unused.
|
|
304
|
+
*
|
|
305
|
+
* Tier invariant (`getExploreOutputBudget`): a larger tier must never allow less
|
|
306
|
+
* per file than a smaller one. It holds here by construction — every bound is a
|
|
307
|
+
* fraction of `maxOutputChars` or of `maxCharsPerFile`, both monotonic across
|
|
308
|
+
* tiers — except `MIN_CHARS`, which is an absolute floor and so identical at
|
|
309
|
+
* every tier.
|
|
310
|
+
*/
|
|
311
|
+
export declare function allocateExploreBudget(candidates: readonly ExploreAllocationCandidate[], budget: ExploreOutputBudget, maxFiles: number): ExploreAllocation;
|
|
312
|
+
type ElidedSymbolRef = {
|
|
313
|
+
name: string;
|
|
314
|
+
kind: string;
|
|
315
|
+
startLine: number;
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* Indexed symbols whose definition starts strictly between two rendered
|
|
319
|
+
* spans. The hole is what a trim dropped; naming them is what lets the agent
|
|
320
|
+
* follow up by name instead of guessing (#1711).
|
|
321
|
+
*/
|
|
322
|
+
export declare function symbolsBetweenRanges(nodes: ReadonlyArray<{
|
|
323
|
+
name: string;
|
|
324
|
+
kind: string;
|
|
325
|
+
startLine: number;
|
|
326
|
+
endLine: number;
|
|
327
|
+
}>, fromEnd: number, toStart: number): ElidedSymbolRef[];
|
|
328
|
+
/**
|
|
329
|
+
* Symbols in `candidates` whose start line is not covered by any emitted range.
|
|
330
|
+
* Used to bias the per-file header toward what the trim dropped (#1711).
|
|
331
|
+
*/
|
|
332
|
+
export declare function symbolsNotInRanges(candidates: ReadonlyArray<ElidedSymbolRef>, ranges: ReadonlyArray<ExploreLineRange>): ElidedSymbolRef[];
|
|
333
|
+
/**
|
|
334
|
+
* Gap marker between two non-contiguous slices of one file.
|
|
335
|
+
*
|
|
336
|
+
* Bare `... (gap) ...` told the agent something was missing but not WHAT —
|
|
337
|
+
* and the footer then asked it to re-explore "with its exact name", which is
|
|
338
|
+
* circular when the missing names *are* the question (#1711). When the hole
|
|
339
|
+
* holds indexed symbols, list them as `name (file:line)` (same shape the
|
|
340
|
+
* flow / blast-radius lines already use).
|
|
341
|
+
*/
|
|
342
|
+
export declare function formatGapMarker(filePath: string, elided: ReadonlyArray<ElidedSymbolRef>): string;
|
|
343
|
+
/**
|
|
344
|
+
* Join rendered parts with gap markers that name whatever the trim skipped.
|
|
345
|
+
*
|
|
346
|
+
* `spareChars` is what naming may cost beyond bare markers. Cluster selection
|
|
347
|
+
* prices every join between clusters as a bare marker, and on a long path each
|
|
348
|
+
* named gap runs to several hundred chars, so unbounded naming overran the
|
|
349
|
+
* file's reservation and the ceiling trim then dropped SOURCE to pay for the
|
|
350
|
+
* names: vscode's `rpcProtocol.ts` went from ~5,200 chars of the RPCProtocol
|
|
351
|
+
* body to a 222-char stub. A gap the spare can't cover stays bare; the file
|
|
352
|
+
* header still lists the symbols the trim dropped.
|
|
353
|
+
*/
|
|
354
|
+
export declare function joinPartsWithNamedGaps(filePath: string, parts: ReadonlyArray<{
|
|
355
|
+
range: ExploreLineRange;
|
|
356
|
+
text: string;
|
|
357
|
+
}>, nodes: ReadonlyArray<{
|
|
358
|
+
name: string;
|
|
359
|
+
kind: string;
|
|
360
|
+
startLine: number;
|
|
361
|
+
endLine: number;
|
|
362
|
+
}>, spareChars?: number): string;
|
|
363
|
+
/**
|
|
364
|
+
* Prefer symbols the trim dropped when filling the per-file header's named
|
|
365
|
+
* slots, so `+N more` is less likely to hide the answer (#1711). Frequency
|
|
366
|
+
* still breaks ties among the preferred / remaining groups.
|
|
367
|
+
*/
|
|
368
|
+
export declare function biasHeaderSymbols(symbols: readonly string[], elided: ReadonlyArray<ElidedSymbolRef>, cap: number): {
|
|
369
|
+
shown: string[];
|
|
370
|
+
omitted: number;
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* The notes that stand in for the epilogue, or close a truncated response, in
|
|
374
|
+
* two wordings each. `complete` says the source above is complete; `trimmed` is
|
|
375
|
+
* used when a section it vouches for was trimmed (see `elidedWantedSpans`) and
|
|
376
|
+
* drops that claim, keeping the guarantee that is still true. Each trimmed
|
|
377
|
+
* wording is no longer than its complete one: the epilogue floor (`lost`) and
|
|
378
|
+
* the cut note's fit test (`cut`) are sized before the render knows which of the
|
|
379
|
+
* two it will need.
|
|
380
|
+
*/
|
|
381
|
+
export declare const EXPLORE_FALLBACK_NOTES: {
|
|
382
|
+
readonly lost: {
|
|
383
|
+
readonly complete: "> (Trailing pointer list omitted for size. The source above is complete and verbatim — treat it as already Read. For anything this call did not cover, run another lattice_sensor_explore with the specific names rather than reading those files.)";
|
|
384
|
+
readonly trimmed: "> (Trailing pointer list omitted for size. The source above is verbatim — treat it as already Read. For symbols its gap markers name, and anything else not covered, run another lattice_sensor_explore with those names rather than reading.)";
|
|
385
|
+
};
|
|
386
|
+
readonly cut: {
|
|
387
|
+
readonly complete: "\n\n> (Trailing notes omitted for size. The source above is complete and verbatim — treat it as already Read. For anything this call did not cover, run another lattice_sensor_explore with the specific names rather than reading those files.)";
|
|
388
|
+
readonly trimmed: "\n\n> (Trailing notes omitted for size. The source above is verbatim — treat it as already Read. For symbols its gap markers name, and anything else not covered, run another lattice_sensor_explore with those names rather than reading.)";
|
|
389
|
+
};
|
|
390
|
+
readonly truncated: {
|
|
391
|
+
readonly complete: "\n\n... (output truncated to budget; the source above is complete and verbatim — treat it as already Read. For any area not covered, run another lattice_sensor_explore with the specific names — do NOT Read these files.)";
|
|
392
|
+
readonly trimmed: "\n\n... (output truncated to budget; the source above is verbatim — treat it as already Read. For names its gap markers list, or any area not covered, run another lattice_sensor_explore — do NOT Read these files.)";
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* One symbol a file section set out to deliver: a cluster member, or a symbol
|
|
397
|
+
* of the per-symbol (focused/skeleton) view. Completeness is judged against
|
|
398
|
+
* these, not against the file — explore never promises whole files, only the
|
|
399
|
+
* symbols it selected for each one.
|
|
400
|
+
*/
|
|
401
|
+
export type ExploreWantedSpan = {
|
|
402
|
+
name: string;
|
|
403
|
+
kind: string;
|
|
404
|
+
start: number;
|
|
405
|
+
end: number;
|
|
406
|
+
importance: number;
|
|
407
|
+
spine: boolean;
|
|
408
|
+
/** The indexed qualified name (`SQLCompiler::as_sql`), when the span is a node. */
|
|
409
|
+
qualifiedName?: string;
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* The wanted spans a section did NOT deliver in full: some line of the span is
|
|
413
|
+
* in neither what this call sent nor what an earlier call already sent (a
|
|
414
|
+
* back-referenced span counts — the agent holds that copy).
|
|
415
|
+
*
|
|
416
|
+
* Derived from the emitted ranges rather than from a flag each trim site has to
|
|
417
|
+
* remember to set. The oversize-spine window set none until #2068, which is how
|
|
418
|
+
* a 62-line slice of vscode's 968-line `rpcProtocol.ts` went out under "Complete
|
|
419
|
+
* source … do NOT re-read them". Whatever elides source — a member shrink, a
|
|
420
|
+
* ceiling window, a dropped cluster, the per-symbol view, a path added later —
|
|
421
|
+
* shows up here.
|
|
422
|
+
*
|
|
423
|
+
* Most relevant first (spine, then importance), then source order.
|
|
424
|
+
*/
|
|
425
|
+
export declare function elidedWantedSpans(wanted: ReadonlyArray<ExploreWantedSpan>, delivered: ReadonlyArray<ExploreLineRange>): ExploreWantedSpan[];
|
|
426
|
+
/** A rendered file whose section is missing some of what it set out to deliver. */
|
|
427
|
+
export type ExplorePartialFile = {
|
|
428
|
+
filePath: string;
|
|
429
|
+
elided: ReadonlyArray<ExploreWantedSpan>;
|
|
430
|
+
};
|
|
431
|
+
/**
|
|
432
|
+
* The shortest trailing slice of each path that no other path in `paths`
|
|
433
|
+
* ends with: `extHostExtensionService.ts` alone when it is the only one,
|
|
434
|
+
* `node/extHostExtensionService.ts` beside `common/extHostExtensionService.ts`.
|
|
435
|
+
*/
|
|
436
|
+
export declare function shortestUniqueSuffixes(paths: ReadonlyArray<string>): Map<string, string>;
|
|
437
|
+
/**
|
|
438
|
+
* The large tiers' completeness note (`includeCompletenessSignal`), as
|
|
439
|
+
* candidates from most to least specific. The epilogue fit keeps the first
|
|
440
|
+
* one that fits the room left (CG-26).
|
|
441
|
+
*
|
|
442
|
+
* "Complete" is claimed only when no section elided anything it set out to
|
|
443
|
+
* deliver. Otherwise the note keeps the guarantee that is still true (every
|
|
444
|
+
* block shown is verbatim; treat it as already Read), names the trimmed files
|
|
445
|
+
* and the most relevant elided symbols as room allows, and sends the agent to
|
|
446
|
+
* another lattice_sensor_explore for them. It never offers Read: explore output must
|
|
447
|
+
* not tell the agent to Read (AGENTS.md).
|
|
448
|
+
*/
|
|
449
|
+
export declare function exploreCompletenessNotes(filesIncluded: number, trimmed: ReadonlyArray<ExplorePartialFile>,
|
|
450
|
+
/** Every path the response can name (sections and pointer list); labels are unique among them. */
|
|
451
|
+
knownPaths: ReadonlyArray<string>): string[];
|
|
452
|
+
/**
|
|
453
|
+
* Fit the completeness note and the pointer list into the room the response has
|
|
454
|
+
* left (CG-26). Returns the note (a candidate block, or none), the pointer
|
|
455
|
+
* block, and the room that remains.
|
|
456
|
+
*
|
|
457
|
+
* The note is one of `noteCandidates`, most specific first. A complete-source
|
|
458
|
+
* note keeps the precedence it always had and goes first. A note that YIELDS (a
|
|
459
|
+
* trimmed one) gives way to the pointer list, which names files the response
|
|
460
|
+
* does not show at all, while what a trimmed section elided is already named in
|
|
461
|
+
* its own gap markers and header. It leaves the list's header and first entry
|
|
462
|
+
* when that much could fit, and its optional detail never costs an entry the
|
|
463
|
+
* least specific candidate would have left.
|
|
464
|
+
*/
|
|
465
|
+
export declare function fitExploreEpilogue(opts: {
|
|
466
|
+
room: number;
|
|
467
|
+
noteCandidates: ReadonlyArray<readonly string[]>;
|
|
468
|
+
noteYields: boolean;
|
|
469
|
+
pointerEntries: readonly string[];
|
|
470
|
+
pointerOmitted: number;
|
|
471
|
+
}): {
|
|
472
|
+
note: string[];
|
|
473
|
+
pointers: string[];
|
|
474
|
+
room: number;
|
|
475
|
+
};
|
|
121
476
|
/**
|
|
122
477
|
* Per-file staleness banner emitted at the top of a tool response when the
|
|
123
478
|
* file watcher has pending events for files referenced by the response.
|
|
@@ -140,6 +495,8 @@ export declare function formatStaleFooter(stale: PendingFile[]): string;
|
|
|
140
495
|
* already names the operator remedy (`lattice sensor sync . --json` / git hooks).
|
|
141
496
|
*/
|
|
142
497
|
export declare function formatDegradedBanner(reason: string | null): string;
|
|
498
|
+
/** Re-armed watches are not proof of freshness until their full scan commits. */
|
|
499
|
+
export declare function formatRecoveringBanner(): string;
|
|
143
500
|
/**
|
|
144
501
|
* MCP Tool definition
|
|
145
502
|
*/
|
|
@@ -153,6 +510,12 @@ export interface ToolDefinition {
|
|
|
153
510
|
};
|
|
154
511
|
/** Behavioral hints for clients (see {@link ToolAnnotations}). */
|
|
155
512
|
annotations?: ToolAnnotations;
|
|
513
|
+
/**
|
|
514
|
+
* MCP `_meta` on the tool definition. `anthropic/alwaysLoad: true` makes
|
|
515
|
+
* Claude Code load the tool at session start instead of deferring it behind
|
|
516
|
+
* its tool search (https://code.claude.com/docs/en/mcp#exempt-a-server-from-deferral).
|
|
517
|
+
*/
|
|
518
|
+
_meta?: Record<string, unknown>;
|
|
156
519
|
}
|
|
157
520
|
/**
|
|
158
521
|
* MCP ToolAnnotations — behavioral hints a client MAY use to decide how, or
|
|
@@ -194,6 +557,18 @@ export interface ToolResult {
|
|
|
194
557
|
text: string;
|
|
195
558
|
}>;
|
|
196
559
|
isError?: boolean;
|
|
560
|
+
/**
|
|
561
|
+
* INTERNAL side-channel (CG-17): what a `lattice_sensor_explore` call actually put
|
|
562
|
+
* on the wire — files, line ranges, bytes. It rides the result because the
|
|
563
|
+
* call may have run on a query-pool worker, while the session state it feeds
|
|
564
|
+
* lives on the main thread. {@link ToolHandler.execute} records it and DELETES
|
|
565
|
+
* it, so nothing here ever reaches the client. Keyed by
|
|
566
|
+
* {@link EXPLORE_EMISSION_KEY}; the two must stay in sync.
|
|
567
|
+
*/
|
|
568
|
+
_cgExploreEmission?: ExploreEmission;
|
|
569
|
+
/** Internal structured provenance, preserved by query workers and stripped by execute. */
|
|
570
|
+
_cgAnswerFiles?: AnswerFile[];
|
|
571
|
+
structuredContent?: Record<string, unknown>;
|
|
197
572
|
}
|
|
198
573
|
/**
|
|
199
574
|
* All LatticeSensor MCP tools
|
|
@@ -212,6 +587,27 @@ export declare const tools: ToolDefinition[];
|
|
|
212
587
|
* note in a description only adds once `cg` is loaded; the schemas are static).
|
|
213
588
|
*/
|
|
214
589
|
export declare function getStaticTools(): ToolDefinition[];
|
|
590
|
+
/**
|
|
591
|
+
* How many explicit-`projectPath` projects a handler keeps open at once
|
|
592
|
+
* (#1835). Each cached project may hold a file watcher, a writer lock and a
|
|
593
|
+
* SQLite connection, so the cache is bounded LRU: opening one more than this
|
|
594
|
+
* closes the least recently used. Small on purpose — a session that queries
|
|
595
|
+
* many repositories still leaks nothing; it only pays a reopen + catch-up.
|
|
596
|
+
*/
|
|
597
|
+
export declare const MAX_CACHED_PROJECTS = 8;
|
|
598
|
+
/**
|
|
599
|
+
* Engine-side lifecycle for a project the ToolHandler opened for an explicit
|
|
600
|
+
* `projectPath` (#1835). `activate` gives it the same treatment the default
|
|
601
|
+
* project gets — a file watcher while it stays open and a catch-up sync — and
|
|
602
|
+
* returns the catch-up promise, which the handler awaits (time-boxed) before
|
|
603
|
+
* calls against that project. `release` runs after active calls drain, so the
|
|
604
|
+
* engine can release shared ownership safely on LRU eviction or shutdown.
|
|
605
|
+
*/
|
|
606
|
+
export interface ProjectLifecycle {
|
|
607
|
+
open(root: string, open: () => LatticeSensor): LatticeSensor;
|
|
608
|
+
activate(cg: LatticeSensor): Promise<void>;
|
|
609
|
+
release(cg: LatticeSensor): void | Promise<void>;
|
|
610
|
+
}
|
|
215
611
|
/**
|
|
216
612
|
* Tool handler that executes tools against a LatticeSensor instance
|
|
217
613
|
*
|
|
@@ -221,25 +617,46 @@ export declare function getStaticTools(): ToolDefinition[];
|
|
|
221
617
|
export declare class ToolHandler {
|
|
222
618
|
private cg;
|
|
223
619
|
private projectCache;
|
|
620
|
+
private projectLifecycle;
|
|
621
|
+
private projectGates;
|
|
622
|
+
private activeCalls;
|
|
623
|
+
private closing;
|
|
624
|
+
private pendingCloses;
|
|
625
|
+
private closeWaiters;
|
|
224
626
|
private defaultProjectHint;
|
|
627
|
+
private knownSubprojects;
|
|
628
|
+
private knownSubprojectsBase;
|
|
629
|
+
private defaultOpenFailure;
|
|
225
630
|
private worktreeMismatchCache;
|
|
226
631
|
private catchUpGate;
|
|
632
|
+
private onDatabaseReopened;
|
|
227
633
|
private queryPool;
|
|
228
634
|
private openFailure;
|
|
229
635
|
private executionMode;
|
|
230
636
|
constructor(cg: LatticeSensor | null);
|
|
231
637
|
/**
|
|
232
638
|
* Engine-only: attach (or detach with null) the worker-thread query pool. The
|
|
233
|
-
*
|
|
639
|
+
* engine sets this after resolving its default project; the workers each
|
|
234
640
|
* hold their own WAL read connection and run {@link executeReadTool}. A
|
|
235
641
|
* worker's own ToolHandler never has a pool, so there is no nested off-loading.
|
|
236
642
|
*/
|
|
237
643
|
setQueryPool(pool: QueryPool | null): void;
|
|
644
|
+
/**
|
|
645
|
+
* Engine-only: own the lifecycle (watcher, catch-up, writer lock) of every
|
|
646
|
+
* project this handler opens for an explicit `projectPath` (#1835).
|
|
647
|
+
*/
|
|
648
|
+
setProjectLifecycle(lifecycle: ProjectLifecycle | null): void;
|
|
238
649
|
/**
|
|
239
650
|
* Update the default LatticeSensor instance (e.g. after lazy initialization).
|
|
240
651
|
* A successful open supersedes any previously recorded open failure.
|
|
241
652
|
*/
|
|
242
653
|
setDefaultLatticeSensor(cg: LatticeSensor): void;
|
|
654
|
+
/**
|
|
655
|
+
* Engine-only: record why the default project failed to open (#995), so a
|
|
656
|
+
* call that needs it answers with that fix rather than "no project loaded".
|
|
657
|
+
* `null` clears it.
|
|
658
|
+
*/
|
|
659
|
+
setDefaultOpenFailure(err: WslSharedIndexError | null): void;
|
|
243
660
|
/**
|
|
244
661
|
* ADR 0049 Decision 5②: record that the DEFAULT project's index failed to
|
|
245
662
|
* open for a reason OTHER than "no .lattice/sensor/ found" — the engine calls
|
|
@@ -269,6 +686,12 @@ export declare class ToolHandler {
|
|
|
269
686
|
* stale data, which is what would have happened without the gate.
|
|
270
687
|
*/
|
|
271
688
|
setCatchUpGate(p: Promise<void> | null): void;
|
|
689
|
+
/**
|
|
690
|
+
* Engine-only: called after a tool call's {@link freshen} reopened a database
|
|
691
|
+
* that was replaced on disk (#1902). The engine decides whether a catch-up
|
|
692
|
+
* sync is its to run (only for the instance it watches and writes).
|
|
693
|
+
*/
|
|
694
|
+
setOnDatabaseReopened(fn: ((cg: LatticeSensor) => void) | null): void;
|
|
272
695
|
/**
|
|
273
696
|
* Await the catch-up gate, but no longer than the configured timeout (#905).
|
|
274
697
|
* If the reconcile settles first, we got the fully-reconciled answer. If the
|
|
@@ -284,6 +707,14 @@ export declare class ToolHandler {
|
|
|
284
707
|
* Used only to make the "no default project" error actionable.
|
|
285
708
|
*/
|
|
286
709
|
setDefaultProjectHint(searchedPath: string): void;
|
|
710
|
+
/**
|
|
711
|
+
* Engine-only: record the indexed sub-projects the workspace down-scan saw
|
|
712
|
+
* when it could not adopt a default project (#1606/#1607). An empty list
|
|
713
|
+
* clears any previous note.
|
|
714
|
+
*/
|
|
715
|
+
setKnownSubprojects(roots: string[], base: string): void;
|
|
716
|
+
/** One message line naming the indexed sub-projects, or '' when none known. */
|
|
717
|
+
private formatKnownSubprojects;
|
|
287
718
|
/**
|
|
288
719
|
* Whether a default LatticeSensor instance is available
|
|
289
720
|
*/
|
|
@@ -316,6 +747,9 @@ export declare class ToolHandler {
|
|
|
316
747
|
* similar to how git finds .git/ directories.
|
|
317
748
|
*/
|
|
318
749
|
private getLatticeSensor;
|
|
750
|
+
private awaitProjectGate;
|
|
751
|
+
/** Never evict a graph while a tool call or its timed-out reconcile uses it. */
|
|
752
|
+
private trimProjects;
|
|
319
753
|
/**
|
|
320
754
|
* Heal a long-lived connection whose `.lattice/sensor/` was removed and recreated
|
|
321
755
|
* at the same path (a worktree recreated, or `rm -rf .lattice/sensor` + re-init)
|
|
@@ -330,7 +764,7 @@ export declare class ToolHandler {
|
|
|
330
764
|
/**
|
|
331
765
|
* Close all cached project connections
|
|
332
766
|
*/
|
|
333
|
-
closeAll(): void
|
|
767
|
+
closeAll(): Promise<void>;
|
|
334
768
|
/**
|
|
335
769
|
* Validate that a value is a non-empty string within length bounds.
|
|
336
770
|
*
|
|
@@ -404,11 +838,40 @@ export declare class ToolHandler {
|
|
|
404
838
|
* would needlessly push the agent back to Read.
|
|
405
839
|
*/
|
|
406
840
|
private isFileStaleOnDisk;
|
|
841
|
+
private answerResult;
|
|
407
842
|
private withStalenessNotice;
|
|
408
843
|
/**
|
|
409
|
-
* Execute a tool by name
|
|
844
|
+
* Execute a tool by name.
|
|
845
|
+
*
|
|
846
|
+
* `sessionState` is the CALLER's per-session explore history (CG-17). The
|
|
847
|
+
* daemon shares one ToolHandler across every connected session, so this state
|
|
848
|
+
* cannot live on the handler — each session owns one and hands it in, which is
|
|
849
|
+
* what keeps two sessions on one daemon from ever seeing each other's calls.
|
|
850
|
+
* Omit it (the CLI does) and explore behaves exactly as before, untracked.
|
|
851
|
+
*/
|
|
852
|
+
execute(toolName: string, args: Record<string, unknown>, sessionState?: ExploreSessionState): Promise<ToolResult>;
|
|
853
|
+
/**
|
|
854
|
+
* Attach the caller's session view to an explore call's args (CG-17), on a
|
|
855
|
+
* COPY so the caller's object is never mutated. Nothing else sees it: a
|
|
856
|
+
* non-explore tool, or a caller with no session state, gets the args
|
|
857
|
+
* unchanged and pays nothing.
|
|
858
|
+
*
|
|
859
|
+
* A client that spells the internal key itself is stripped rather than
|
|
860
|
+
* trusted — the view decides what source a later call may withhold, so it has
|
|
861
|
+
* to come from the server's own record, never from the wire.
|
|
862
|
+
*/
|
|
863
|
+
private withSessionView;
|
|
864
|
+
/**
|
|
865
|
+
* Record an explore call's emission into the caller's session state and strip
|
|
866
|
+
* it from the result (CG-17).
|
|
867
|
+
*
|
|
868
|
+
* Unconditional strip: the property is internal, so it comes off even when
|
|
869
|
+
* there is no session state to record it into (the CLI path) — that is what
|
|
870
|
+
* keeps the agent-facing response byte-identical. Recording is wrapped
|
|
871
|
+
* because a bookkeeping bug must never fail a tool call that already
|
|
872
|
+
* succeeded.
|
|
410
873
|
*/
|
|
411
|
-
|
|
874
|
+
private takeExploreEmission;
|
|
412
875
|
/**
|
|
413
876
|
* Run a single read tool to completion and return its raw {@link ToolResult},
|
|
414
877
|
* classifying expected failures the same way {@link execute}'s catch does so
|
|
@@ -462,6 +925,12 @@ export declare class ToolHandler {
|
|
|
462
925
|
* for ordinary static edges. Used by trace + the node trail so a synthesized
|
|
463
926
|
* hop reads as "registered via onUpdate at App.tsx:3148", not a bare arrow.
|
|
464
927
|
*/
|
|
928
|
+
/**
|
|
929
|
+
* The branch conditions a flow hop's call site runs under, read from the
|
|
930
|
+
* caller's source now (`graph/branch-guards.ts`); '' when unconditional,
|
|
931
|
+
* unreadable, or the grammar for that language is not loaded.
|
|
932
|
+
*/
|
|
933
|
+
private whenLabel;
|
|
465
934
|
private synthEdgeNote;
|
|
466
935
|
/**
|
|
467
936
|
* Flow-from-named-symbols: an agent's lattice_sensor_explore query is a bag of
|
|
@@ -511,12 +980,13 @@ export declare class ToolHandler {
|
|
|
511
980
|
*/
|
|
512
981
|
private buildPolymorphicBoundaries;
|
|
513
982
|
/**
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
* are marked
|
|
983
|
+
* Render the candidate shortlist for a dispatch site as one line.
|
|
984
|
+
*
|
|
985
|
+
* The shortlist itself is `shortlistBoundaryCandidates` in
|
|
986
|
+
* `../graph/dynamic-boundary-report` — shared with the viewer's end cap, so
|
|
987
|
+
* "candidates for key `save`" names the same symbols in both places. Symbols
|
|
988
|
+
* the agent already named are marked: that is the "you were right, here's the
|
|
989
|
+
* wiring" case.
|
|
520
990
|
*/
|
|
521
991
|
private boundaryCandidates;
|
|
522
992
|
/**
|
|
@@ -637,22 +1107,8 @@ export declare class ToolHandler {
|
|
|
637
1107
|
* Returns the best match and a note about alternatives if any.
|
|
638
1108
|
*/
|
|
639
1109
|
/**
|
|
640
|
-
* Check if a node matches a symbol query
|
|
641
|
-
*
|
|
642
|
-
* Accepts simple names (`run`) and three flavors of qualifier:
|
|
643
|
-
* - dotted `Session.request` (TS/JS/Python)
|
|
644
|
-
* - colon-pair `stage_apply::run` (Rust, C++, Ruby)
|
|
645
|
-
* - slash `configurator/stage_apply` (path-ish)
|
|
646
|
-
*
|
|
647
|
-
* Multi-level qualifiers compose: `crate::configurator::stage_apply::run`
|
|
648
|
-
* works. Rust path prefixes (`crate`, `super`, `self`) are stripped so
|
|
649
|
-
* the canonical `crate::module::symbol` form resolves.
|
|
650
|
-
*
|
|
651
|
-
* Resolution order, last part must always equal `node.name`:
|
|
652
|
-
* 1. Suffix-match against `qualifiedName` (handles class-scoped methods
|
|
653
|
-
* where the extractor builds the qualified name from the AST stack)
|
|
654
|
-
* 2. File-path containment (handles file-derived modules in Rust/
|
|
655
|
-
* Python — `stage_apply::run` matches a `run` in `stage_apply.rs`)
|
|
1110
|
+
* Check if a node matches a symbol query — see `matchesSymbol` in
|
|
1111
|
+
* `../graph/symbol-lookup`, which owns the rules.
|
|
656
1112
|
*/
|
|
657
1113
|
private matchesSymbol;
|
|
658
1114
|
/**
|
|
@@ -667,6 +1123,9 @@ export declare class ToolHandler {
|
|
|
667
1123
|
/**
|
|
668
1124
|
* Find ALL symbols matching a name. Used by callers/callees/impact to aggregate
|
|
669
1125
|
* results across all matching symbols (e.g., multiple classes with an `execute` method).
|
|
1126
|
+
*
|
|
1127
|
+
* The resolution itself lives in `../graph/named-symbol-flow`, so the Flow
|
|
1128
|
+
* strip and `lattice_sensor_explore` resolve a written name to the same nodes.
|
|
670
1129
|
*/
|
|
671
1130
|
private findAllSymbols;
|
|
672
1131
|
/**
|
|
@@ -695,5 +1154,4 @@ export declare class ToolHandler {
|
|
|
695
1154
|
private textResult;
|
|
696
1155
|
private errorResult;
|
|
697
1156
|
}
|
|
698
|
-
export {};
|
|
699
1157
|
//# sourceMappingURL=tools.d.ts.map
|