@mrclrchtr/supi-code-intelligence 12.0.0 → 14.0.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/CHANGELOG.md +35 -0
- package/README.md +7 -5
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +10 -0
- package/node_modules/@mrclrchtr/supi-core/package.json +3 -1
- package/node_modules/@mrclrchtr/supi-core/src/api.ts +4 -0
- package/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +1 -1
- package/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +78 -13
- package/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +41 -9
- package/node_modules/@mrclrchtr/supi-core/src/retired-packages.ts +152 -0
- package/node_modules/@mrclrchtr/supi-core/src/session.ts +3 -0
- package/node_modules/@mrclrchtr/supi-core/src/shell-hints.ts +46 -0
- package/node_modules/@mrclrchtr/supi-core/src/side-run.ts +46 -0
- package/node_modules/@mrclrchtr/supi-core/src/spill.ts +93 -0
- package/node_modules/@mrclrchtr/supi-lsp/README.md +6 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +10 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +3 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/api.ts +4 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +78 -13
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +41 -9
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/retired-packages.ts +152 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/session.ts +3 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/shell-hints.ts +46 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/side-run.ts +46 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/spill.ts +93 -0
- package/node_modules/@mrclrchtr/supi-lsp/package.json +8 -8
- package/node_modules/@mrclrchtr/supi-lsp/src/api.ts +1 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-cache.ts +102 -47
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-host.ts +8 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-refresh.ts +20 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-request.ts +4 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-timing.ts +14 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-typescript.ts +8 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostics.ts +50 -4
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-disk-stamp.ts +60 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-document-state.ts +3 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-document-sync.ts +21 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-file-state.ts +17 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-input-admission.ts +7 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-semantic-input-barrier.ts +53 -4
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +12 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/client/transport.ts +24 -8
- package/node_modules/@mrclrchtr/supi-lsp/src/config/server-config.ts +5 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/config/tsconfig-extends.ts +2 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/config/tsconfig-path.ts +2 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/config/tsconfig-scope.ts +17 -5
- package/node_modules/@mrclrchtr/supi-lsp/src/config/typescript-module.ts +17 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/debug-telemetry.ts +64 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/evidence.ts +42 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-client-state.ts +2 -17
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-project-info.ts +3 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-removal-ledger.ts +52 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-typescript-coverage.ts +27 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-symbol.ts +16 -112
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +561 -103
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/typescript-file-local.ts +6 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/workspace-symbol-collection.ts +163 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/workspace-symbol-row-limit.ts +72 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/lsp-semantic-provider.ts +6 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/semantic-symbol-mapper.ts +13 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-controller.ts +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-diagnostic-surface.ts +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-diagnostics.ts +1 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registry.ts +53 -9
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-transition-debug.ts +11 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/session/workspace-lsp-runtime.ts +2 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +10 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +3 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/api.ts +4 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +78 -13
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +41 -9
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/retired-packages.ts +152 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/session.ts +3 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/shell-hints.ts +46 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/side-run.ts +46 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/spill.ts +93 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.cjs +50 -75
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.cjs.map +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.js +50 -75
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.js.map +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.wasm.map +6 -6
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.cjs +50 -75
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.cjs.map +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.cts +7 -7
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.cts.map +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.ts +7 -7
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.ts.map +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.js +50 -75
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.js.map +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.wasm.map +5 -5
- package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +5 -5
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/kotlin/tree-sitter-kotlin.wasm.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/latex/tree-sitter-latex.wasm.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/sql/tree-sitter-sql.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/sql/tree-sitter-sql.wasm.json +3 -3
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/session/structural-worker-client.ts +1 -1
- package/node_modules/fast-xml-parser/CHANGELOG.md +886 -0
- package/node_modules/fast-xml-parser/LICENSE +21 -0
- package/node_modules/fast-xml-parser/README.md +204 -0
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
- package/node_modules/fast-xml-parser/lib/fxp.d.cts +774 -0
- package/node_modules/fast-xml-parser/lib/fxp.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -0
- package/node_modules/fast-xml-parser/node_modules/@nodable/entities/README.md +92 -0
- package/node_modules/fast-xml-parser/node_modules/@nodable/entities/package.json +57 -0
- package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/EntityDecoder.js +644 -0
- package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/EntityEncoder.js +239 -0
- package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/all-entities.js +53 -0
- package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/entities.js +1139 -0
- package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/entityTries.js +60 -0
- package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/index.d.ts +358 -0
- package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/index.js +29 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/CHANGELOG.md +52 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/LICENSE +21 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/README.md +77 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/lib/fxb.cjs +1 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/lib/fxb.d.cts +270 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/lib/fxb.min.js +2 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/package.json +77 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/fxb.d.ts +270 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/fxb.js +609 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/ignoreAttributes.js +18 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/orderedJs2Xml.js +360 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/prettifyJs2Xml.js +0 -0
- package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/util.js +23 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/LICENSE +21 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/README.md +632 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/package.json +56 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/html.js +102 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/log.js +98 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/nosql.js +114 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/redos.js +60 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/shell.js +105 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/sql-strict.js +47 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/sql.js +95 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/svg.js +81 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/xml.js +79 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/index.cjs +27 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/index.d.ts +103 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/index.js +292 -0
- package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/util/decode-entities.js +48 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/LICENSE +21 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/README.md +947 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/lib/pem.cjs +1 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/lib/pem.d.cts +725 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/lib/pem.min.js +2 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/lib/pem.min.js.map +1 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/package.json +79 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/src/Expression.js +232 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/src/ExpressionSet.js +225 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/src/Matcher.js +663 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/src/index.d.ts +589 -0
- package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/src/index.js +30 -0
- package/node_modules/fast-xml-parser/node_modules/strnum/CHANGELOG.md +63 -0
- package/node_modules/fast-xml-parser/node_modules/strnum/LICENSE +21 -0
- package/node_modules/fast-xml-parser/node_modules/strnum/README.md +113 -0
- package/node_modules/fast-xml-parser/node_modules/strnum/node_modules/anynum/LICENSE +21 -0
- package/node_modules/fast-xml-parser/node_modules/strnum/node_modules/anynum/README.md +142 -0
- package/node_modules/fast-xml-parser/node_modules/strnum/node_modules/anynum/anynum.js +135 -0
- package/node_modules/fast-xml-parser/node_modules/strnum/node_modules/anynum/digitTable.js +116 -0
- package/node_modules/fast-xml-parser/node_modules/strnum/node_modules/anynum/package.json +42 -0
- package/node_modules/fast-xml-parser/node_modules/strnum/package.json +36 -0
- package/node_modules/fast-xml-parser/node_modules/strnum/strnum.js +176 -0
- package/node_modules/fast-xml-parser/node_modules/xml-naming/LICENSE +21 -0
- package/node_modules/fast-xml-parser/node_modules/xml-naming/README.md +287 -0
- package/node_modules/fast-xml-parser/node_modules/xml-naming/package.json +56 -0
- package/node_modules/fast-xml-parser/node_modules/xml-naming/src/index.d.ts +108 -0
- package/node_modules/fast-xml-parser/node_modules/xml-naming/src/index.js +382 -0
- package/node_modules/fast-xml-parser/package.json +93 -0
- package/node_modules/fast-xml-parser/src/cli/cli.js +97 -0
- package/node_modules/fast-xml-parser/src/cli/man.js +17 -0
- package/node_modules/fast-xml-parser/src/cli/read.js +43 -0
- package/node_modules/fast-xml-parser/src/fxp.d.ts +754 -0
- package/node_modules/fast-xml-parser/src/fxp.js +14 -0
- package/node_modules/fast-xml-parser/src/ignoreAttributes.js +18 -0
- package/node_modules/fast-xml-parser/src/util.js +61 -0
- package/node_modules/fast-xml-parser/src/v6/CharsSymbol.js +16 -0
- package/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +106 -0
- package/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +61 -0
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +69 -0
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +103 -0
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +100 -0
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +154 -0
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +94 -0
- package/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
- package/node_modules/fast-xml-parser/src/v6/TagPath.js +81 -0
- package/node_modules/fast-xml-parser/src/v6/TagPathMatcher.js +13 -0
- package/node_modules/fast-xml-parser/src/v6/XMLParser.js +83 -0
- package/node_modules/fast-xml-parser/src/v6/Xml2JsParser.js +235 -0
- package/node_modules/fast-xml-parser/src/v6/XmlPartReader.js +210 -0
- package/node_modules/fast-xml-parser/src/v6/XmlSpecialTagsReader.js +111 -0
- package/node_modules/fast-xml-parser/src/v6/inputSource/BufferSource.js +116 -0
- package/node_modules/fast-xml-parser/src/v6/inputSource/StringSource.js +121 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +105 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParser.js +22 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParserExt.js +19 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/currency.js +38 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/join.js +13 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/number.js +14 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/trim.js +6 -0
- package/node_modules/fast-xml-parser/src/validator.js +518 -0
- package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +6 -0
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +426 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +164 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +907 -0
- package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +77 -0
- package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +177 -0
- package/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +54 -0
- package/package.json +10 -8
- package/src/analysis/evidence.ts +331 -73
- package/src/analysis/health/diagnostics.ts +66 -18
- package/src/analysis/health/evidence-reason.ts +44 -0
- package/src/analysis/health/server-status.ts +32 -9
- package/src/analysis/health/signals.ts +1 -0
- package/src/analysis/instruction-files.ts +11 -7
- package/src/analysis/search/exclusions.ts +18 -4
- package/src/analysis/search/pattern.ts +3 -3
- package/src/analysis/target/anchored.ts +3 -6
- package/src/analysis/target/file-outline-omissions.ts +17 -2
- package/src/analysis/target/symbol-selection.ts +100 -0
- package/src/analysis/target/symbol.ts +83 -49
- package/src/analysis/target/types.ts +12 -10
- package/src/analysis/workspace/cmake-parser.ts +207 -0
- package/src/analysis/workspace/cmake.ts +141 -0
- package/src/analysis/workspace/maven.ts +310 -0
- package/src/analysis/workspace/membership.ts +100 -26
- package/src/analysis/workspace/metadata.ts +6 -1
- package/src/analysis/workspace/observe.ts +6 -0
- package/src/analysis/workspace/types.ts +11 -3
- package/src/app/app.ts +37 -21
- package/src/diagnostics/coverage.ts +49 -0
- package/src/diagnostics/evidence.ts +10 -2
- package/src/extension.ts +1 -2
- package/src/headless.ts +4 -2
- package/src/session/health-types.ts +2 -0
- package/src/session/health-workflow.ts +6 -0
- package/src/session/input/common.ts +1 -1
- package/src/session/orientation/collect.ts +42 -7
- package/src/session/orientation/context-facts.ts +3 -3
- package/src/session/orientation/context-sections.ts +13 -15
- package/src/session/orientation/facts.ts +5 -8
- package/src/session/orientation-types.ts +5 -0
- package/src/session/orientation-workflow.ts +12 -17
- package/src/session/target-workflow.ts +38 -25
- package/src/tool/code_find/render.ts +10 -11
- package/src/tool/code_find/result.ts +11 -8
- package/src/tool/code_graph/display.ts +5 -6
- package/src/tool/code_graph/format.ts +8 -24
- package/src/tool/code_graph/result.ts +16 -75
- package/src/tool/code_graph/section.ts +21 -33
- package/src/tool/code_graph/structured.ts +3 -0
- package/src/tool/code_graph/tui.ts +10 -5
- package/src/tool/code_health/diagnostic-tui.ts +49 -0
- package/src/tool/code_health/guidance.ts +27 -0
- package/src/tool/code_health/markdown.ts +63 -9
- package/src/tool/code_health/result.ts +20 -9
- package/src/tool/code_health/structured-schema.ts +15 -0
- package/src/tool/code_health/structured.ts +9 -1
- package/src/tool/code_health/tui.ts +33 -40
- package/src/tool/code_inspect/result.ts +23 -18
- package/src/tool/code_inspect/structured.ts +2 -19
- package/src/tool/code_orientation/markdown.ts +6 -1
- package/src/tool/code_orientation/result.ts +53 -100
- package/src/tool/code_orientation/structured-schema.ts +16 -12
- package/src/tool/code_orientation/structured-workspace.ts +13 -7
- package/src/tool/code_orientation/structured.ts +31 -39
- package/src/tool/code_orientation/workspace-format.ts +4 -10
- package/src/tool/code_orientation/workspace-instructions.ts +4 -5
- package/src/tool/code_orientation/workspace-observations.ts +2 -2
- package/src/tool/code_orientation/workspace-output.ts +16 -7
- package/src/tool/code_orientation/workspace-projects.ts +7 -10
- package/src/tool/code_orientation/workspace-sections.ts +13 -19
- package/src/tool/code_resolve/markdown.ts +4 -46
- package/src/tool/code_resolve/result.ts +45 -73
- package/src/tool/code_resolve/structured.ts +6 -1
- package/src/tool/infra/truncate.ts +2 -16
- package/src/tool/result/candidate-selection.ts +157 -0
- package/src/tool/result/display.ts +41 -45
- package/src/tool/result/errors.ts +1 -0
- package/src/tool/result/model-budget.ts +26 -1
- package/src/tool/result/refactor.ts +11 -8
- package/src/tool/result/structured.ts +2 -1
- package/src/tool/result/types.ts +9 -8
- package/src/tool/schemas.ts +15 -20
- package/src/ui/footer.ts +147 -44
- package/src/ui/status-overlay.ts +13 -8
- package/src/ui/status-presentation.ts +4 -7
- package/src/ui/tui/candidate-selection.ts +40 -95
- package/src/ui/tui/common.ts +16 -70
- package/src/ui/tui/display.ts +6 -24
- package/src/tool/result/candidate-row.ts +0 -49
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
describeEvidenceList,
|
|
3
|
+
type EvidenceListMetadata,
|
|
4
|
+
readEvidenceListFacts,
|
|
5
|
+
toEvidenceListFacts,
|
|
6
|
+
} from "../../analysis/evidence.ts";
|
|
1
7
|
import type { ToolDisplaySection } from "./types.ts";
|
|
2
8
|
|
|
3
9
|
/** Maximum number of rows shown for one expanded TUI section. */
|
|
@@ -8,49 +14,53 @@ export const MAX_TUI_DISPLAY_LINE_LENGTH = 240;
|
|
|
8
14
|
|
|
9
15
|
/** Inputs for one bounded structured TUI section. */
|
|
10
16
|
export interface ToolDisplaySectionInput<T> {
|
|
11
|
-
key
|
|
17
|
+
/** Section key; defaults to the evidence key. */
|
|
18
|
+
key?: string;
|
|
12
19
|
title: string;
|
|
20
|
+
/** Rows to show; the view may hide some as Display omissions. */
|
|
13
21
|
items: readonly T[];
|
|
22
|
+
/** Canonical Evidence list metadata this section previews; only constructors produce it. */
|
|
23
|
+
evidence: EvidenceListMetadata;
|
|
14
24
|
format: (item: T) => string;
|
|
15
|
-
totalCount?: number | null;
|
|
16
|
-
omittedCount?: number | null;
|
|
17
|
-
partialReason?: string | null;
|
|
18
|
-
/** Provider explanation for incomplete collection, when available. */
|
|
19
|
-
partialMessage?: string;
|
|
20
25
|
maxItems?: number;
|
|
21
26
|
/** Explicit content-count meaning when display rows are not individual Evidence atoms. */
|
|
22
27
|
preview?: ToolDisplaySection["preview"];
|
|
23
28
|
}
|
|
24
29
|
|
|
25
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Build a bounded, serializable TUI section. Evidence facts are copied
|
|
32
|
+
* unchanged; rows the view cap hides are reported as a separate Display
|
|
33
|
+
* omission and never merged into evidence counts.
|
|
34
|
+
*/
|
|
26
35
|
export function createToolDisplaySection<T>(input: ToolDisplaySectionInput<T>): ToolDisplaySection {
|
|
27
36
|
const maxItems = Math.max(0, input.maxItems ?? MAX_TUI_DISPLAY_ITEMS);
|
|
28
37
|
const items = input.items.slice(0, maxItems);
|
|
29
|
-
const lines = items.map((item) => truncateDisplayText(input.format(item)));
|
|
30
|
-
const displayOmittedCount = Math.max(0, input.items.length - items.length);
|
|
31
|
-
let totalCount: number | null;
|
|
32
|
-
if (input.totalCount === undefined) totalCount = input.items.length;
|
|
33
|
-
else totalCount = input.totalCount;
|
|
34
|
-
const omittedCount =
|
|
35
|
-
totalCount === null
|
|
36
|
-
? input.omittedCount === null || input.omittedCount === undefined
|
|
37
|
-
? displayOmittedCount || null
|
|
38
|
-
: input.omittedCount + displayOmittedCount
|
|
39
|
-
: Math.max(0, totalCount - lines.length);
|
|
40
|
-
|
|
41
38
|
return {
|
|
42
|
-
key: input.key,
|
|
39
|
+
key: input.key ?? input.evidence.key,
|
|
43
40
|
title: input.title,
|
|
44
|
-
lines,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
omittedCount,
|
|
48
|
-
partialReason: input.partialReason ?? null,
|
|
49
|
-
...(input.partialMessage === undefined ? {} : { partialMessage: input.partialMessage }),
|
|
41
|
+
lines: items.map((item) => truncateDisplayText(input.format(item))),
|
|
42
|
+
evidence: toEvidenceListFacts(input.evidence),
|
|
43
|
+
displayOmittedCount: input.items.length - items.length,
|
|
50
44
|
...(input.preview ? { preview: { ...input.preview } } : {}),
|
|
51
45
|
};
|
|
52
46
|
}
|
|
53
47
|
|
|
48
|
+
/** Canonical Display omission phrase, e.g. `5 rows hidden in view`; null when none. */
|
|
49
|
+
export function describeDisplayOmission(count: number, unit = "row"): string | null {
|
|
50
|
+
return count > 0 ? `${count} ${unit}${count === 1 ? "" : "s"} hidden in view` : null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Canonical bounds suffix for one TUI section title, e.g. ` (3 of 5; 2 omitted)`. */
|
|
54
|
+
export function formatDisplaySectionBounds(section: ToolDisplaySection): string {
|
|
55
|
+
const unit = section.preview?.unit;
|
|
56
|
+
const parts = [
|
|
57
|
+
section.preview?.evidenceSummary ?? (unit ? null : describeEvidenceList(section.evidence)),
|
|
58
|
+
unit ? `${section.lines.length} preview ${unit}${section.lines.length === 1 ? "" : "s"}` : null,
|
|
59
|
+
describeDisplayOmission(section.displayOmittedCount, unit ? `preview ${unit}` : "row"),
|
|
60
|
+
].filter((part): part is string => Boolean(part));
|
|
61
|
+
return parts.length ? ` (${parts.join("; ")})` : "";
|
|
62
|
+
}
|
|
63
|
+
|
|
54
64
|
/** Keep structured TUI rows readable without parsing or emitting Markdown. */
|
|
55
65
|
export function truncateDisplayText(
|
|
56
66
|
value: string,
|
|
@@ -72,15 +82,14 @@ export function readToolDisplaySections(value: unknown): ToolDisplaySection[] {
|
|
|
72
82
|
return value.flatMap((entry) => {
|
|
73
83
|
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return [];
|
|
74
84
|
const record = entry as Record<string, unknown>;
|
|
85
|
+
const evidence = readEvidenceListFacts(record.evidence);
|
|
75
86
|
if (
|
|
76
87
|
typeof record.key !== "string" ||
|
|
77
88
|
typeof record.title !== "string" ||
|
|
78
89
|
!Array.isArray(record.lines) ||
|
|
79
90
|
!record.lines.every((line) => typeof line === "string") ||
|
|
80
|
-
!
|
|
81
|
-
!
|
|
82
|
-
!isNullableCount(record.omittedCount) ||
|
|
83
|
-
!isNullableString(record.partialReason)
|
|
91
|
+
!evidence ||
|
|
92
|
+
!isCount(record.displayOmittedCount)
|
|
84
93
|
) {
|
|
85
94
|
return [];
|
|
86
95
|
}
|
|
@@ -92,13 +101,8 @@ export function readToolDisplaySections(value: unknown): ToolDisplaySection[] {
|
|
|
92
101
|
lines: record.lines
|
|
93
102
|
.slice(0, MAX_TUI_DISPLAY_ITEMS)
|
|
94
103
|
.map((line) => truncateDisplayText(line)),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
omittedCount: record.omittedCount,
|
|
98
|
-
partialReason: record.partialReason,
|
|
99
|
-
...(typeof record.partialMessage === "string"
|
|
100
|
-
? { partialMessage: record.partialMessage }
|
|
101
|
-
: {}),
|
|
104
|
+
evidence,
|
|
105
|
+
displayOmittedCount: record.displayOmittedCount,
|
|
102
106
|
...(preview ? { preview } : {}),
|
|
103
107
|
},
|
|
104
108
|
];
|
|
@@ -120,11 +124,3 @@ function readPreview(value: unknown): ToolDisplaySection["preview"] {
|
|
|
120
124
|
function isCount(value: unknown): value is number {
|
|
121
125
|
return typeof value === "number" && Number.isInteger(value) && value >= 0;
|
|
122
126
|
}
|
|
123
|
-
|
|
124
|
-
function isNullableCount(value: unknown): value is number | null {
|
|
125
|
-
return value === null || isCount(value);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function isNullableString(value: unknown): value is string | null {
|
|
129
|
-
return value === null || typeof value === "string";
|
|
130
|
-
}
|
|
@@ -118,6 +118,7 @@ export function healthErrorResult(content: string, reason?: string): CodeIntelRe
|
|
|
118
118
|
serverInventoryAvailable: false,
|
|
119
119
|
serverInventoryScope: "workspace",
|
|
120
120
|
diagnosticObservation: { kind: "not-requested", entries: [] },
|
|
121
|
+
diagnosticCoverage: null,
|
|
121
122
|
refresh: {
|
|
122
123
|
kind: "not-attempted",
|
|
123
124
|
reason: reason ?? content,
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { classifyDiagnosticCoverage, type DiagnosticCoverage } from "../../diagnostics/coverage.ts";
|
|
2
|
+
import type { HealthDiagnosticScope } from "../../session/health-types.ts";
|
|
1
3
|
import type { CodeIntelResult } from "../../types/index.ts";
|
|
4
|
+
import {
|
|
5
|
+
DIAGNOSTIC_NEXT_ACTION,
|
|
6
|
+
isPassiveTrackedSnapshot,
|
|
7
|
+
PASSIVE_SNAPSHOT_NOTE,
|
|
8
|
+
} from "../code_health/guidance.ts";
|
|
2
9
|
import { formatSemanticHealthState } from "../code_health/semantic-state.ts";
|
|
3
10
|
import type { HealthDetails, SearchDetails } from "./types.ts";
|
|
4
11
|
|
|
@@ -168,6 +175,21 @@ function searchFacts(data: SearchDetails): string[] {
|
|
|
168
175
|
return lines;
|
|
169
176
|
}
|
|
170
177
|
|
|
178
|
+
/** Keep the zero-coverage and passive-snapshot guidance when the full markdown is truncated. */
|
|
179
|
+
function coverageNote(
|
|
180
|
+
coverage: DiagnosticCoverage,
|
|
181
|
+
scope: HealthDiagnosticScope,
|
|
182
|
+
refresh: HealthDetails["refresh"],
|
|
183
|
+
): string | null {
|
|
184
|
+
if (coverage === "none") {
|
|
185
|
+
return `No source diagnostics checked; this is not a clean result. Next: ${DIAGNOSTIC_NEXT_ACTION}.`;
|
|
186
|
+
}
|
|
187
|
+
if (coverage === "confirmed" && isPassiveTrackedSnapshot(scope, refresh)) {
|
|
188
|
+
return `${PASSIVE_SNAPSHOT_NOTE}.`;
|
|
189
|
+
}
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
|
|
171
193
|
function healthFacts(data: HealthDetails): string[] {
|
|
172
194
|
const observation = data.diagnosticObservation;
|
|
173
195
|
const lines = [
|
|
@@ -178,10 +200,13 @@ function healthFacts(data: HealthDetails): string[] {
|
|
|
178
200
|
if ("reason" in data.refresh) lines.push(`Refresh reason: ${data.refresh.reason}`);
|
|
179
201
|
if (observation.kind !== "not-requested") {
|
|
180
202
|
const scope = observation.scope;
|
|
203
|
+
const coverage = classifyDiagnosticCoverage(observation);
|
|
181
204
|
lines.push(
|
|
182
205
|
`Diagnostics: ${observation.kind}; ${scope.kind === "file" ? `file=${scope.path}` : `tracked-file snapshot; filter=${scope.filter ?? "none"}; not workspace-wide verification`}.`,
|
|
183
|
-
`Diagnostic coverage: requested=${observation.evidence.requested}, confirmed=${observation.evidence.confirmed}, unconfirmed=${observation.evidence.unconfirmed}, failed=${observation.evidence.failed}, removed=${observation.evidence.removed}.`,
|
|
206
|
+
`Diagnostic coverage: ${coverage}; requested=${observation.evidence.requested}, confirmed=${observation.evidence.confirmed}, unconfirmed=${observation.evidence.unconfirmed}, failed=${observation.evidence.failed}, removed=${observation.evidence.removed}.`,
|
|
184
207
|
);
|
|
208
|
+
const note = coverageNote(coverage, scope, data.refresh);
|
|
209
|
+
if (note) lines.push(note);
|
|
185
210
|
if ("reason" in observation) lines.push(`Diagnostic limitation: ${observation.reason}`);
|
|
186
211
|
if (observation.scopeStatus)
|
|
187
212
|
lines.push(`File scope status: ${JSON.stringify(observation.scopeStatus)}`);
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { FileEdit } from "@mrclrchtr/supi-code-runtime/api";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
createEvidenceList,
|
|
4
|
+
type EvidenceList,
|
|
5
|
+
knownEvidenceCount,
|
|
6
|
+
} from "../../analysis/evidence.ts";
|
|
3
7
|
import type { ApplyResult } from "../../analysis/refactor/apply.ts";
|
|
4
8
|
import { toDisplayPath } from "../../analysis/search/paths.ts";
|
|
5
9
|
import type { RefactorPlan } from "../../session/refactor-plans.ts";
|
|
@@ -74,7 +78,7 @@ export function assembleRefactorPlanDetails(
|
|
|
74
78
|
? ["After applying, use rename_symbol to rename any server-generated names"]
|
|
75
79
|
: []),
|
|
76
80
|
],
|
|
77
|
-
candidateCount: edits.metadata
|
|
81
|
+
candidateCount: knownEvidenceCount(edits.metadata),
|
|
78
82
|
confidence: evidenceSource,
|
|
79
83
|
provenance,
|
|
80
84
|
});
|
|
@@ -86,10 +90,8 @@ export function assembleRefactorPlanDetails(
|
|
|
86
90
|
key: "refactor.edits",
|
|
87
91
|
title: "Proposed edits",
|
|
88
92
|
items: edits.items,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
partialReason: edits.metadata.partialReason,
|
|
92
|
-
format: (edit) => formatEdit(edit, cwd),
|
|
93
|
+
evidence: edits.metadata,
|
|
94
|
+
format: (edit: (typeof edits.items)[number]) => formatEdit(edit, cwd),
|
|
93
95
|
}),
|
|
94
96
|
],
|
|
95
97
|
details: {
|
|
@@ -153,8 +155,9 @@ export function assembleRefactorApplyDetails(
|
|
|
153
155
|
key: "refactor.changedFiles",
|
|
154
156
|
title: "Changed files",
|
|
155
157
|
items: changedFiles,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
evidence: createEvidenceList({ key: "refactor.changedFiles", items: changedFiles })
|
|
159
|
+
.metadata,
|
|
160
|
+
format: (file: string) => file,
|
|
158
161
|
}),
|
|
159
162
|
]
|
|
160
163
|
: [],
|
|
@@ -5,10 +5,11 @@ export const ConfidenceSchema = Type.Enum(["semantic", "structural", "heuristic"
|
|
|
5
5
|
type: "string",
|
|
6
6
|
});
|
|
7
7
|
|
|
8
|
-
/** Canonical evidence counts
|
|
8
|
+
/** Canonical evidence counts and Evidence completeness state; readers never infer completeness. */
|
|
9
9
|
export const EvidenceListSchema = Type.Object(
|
|
10
10
|
{
|
|
11
11
|
key: Type.String(),
|
|
12
|
+
completeness: Type.Enum(["complete", "capped", "partial", "unbounded"], { type: "string" }),
|
|
12
13
|
totalCount: Type.Union([Type.Integer(), Type.Null()]),
|
|
13
14
|
shownCount: Type.Integer(),
|
|
14
15
|
omittedCount: Type.Union([Type.Integer(), Type.Null()]),
|
package/src/tool/result/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ConfidenceMode, SourceRange } from "@mrclrchtr/supi-code-runtime/api";
|
|
2
2
|
import type { CapabilityWarningReport } from "../../analysis/capability/capability-warnings.ts";
|
|
3
|
-
import type { EvidenceListMetadata } from "../../analysis/evidence.ts";
|
|
3
|
+
import type { EvidenceListFacts, EvidenceListMetadata } from "../../analysis/evidence.ts";
|
|
4
4
|
import type { InstructionFilesMetadata } from "../../analysis/instruction-files.ts";
|
|
5
5
|
import type { ReadNextItem } from "../../analysis/read-next.ts";
|
|
6
6
|
import type { AutomaticPathExclusionDisplay } from "../../analysis/search/exclusions.ts";
|
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
StructuredScanSummary,
|
|
11
11
|
} from "../../analysis/search/pattern.ts";
|
|
12
12
|
import type { FileOutlineNotListed } from "../../analysis/target/types.ts";
|
|
13
|
+
import type { DiagnosticCoverage } from "../../diagnostics/coverage.ts";
|
|
13
14
|
import type {
|
|
14
15
|
HealthDiagnosticObservation,
|
|
15
16
|
HealthRefreshState,
|
|
@@ -43,12 +44,10 @@ export interface ToolDisplaySection {
|
|
|
43
44
|
key: string;
|
|
44
45
|
title: string;
|
|
45
46
|
lines: readonly string[];
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/** Provider explanation for incomplete collection, when available. */
|
|
51
|
-
partialMessage?: string;
|
|
47
|
+
/** Canonical Evidence list facts previewed by this section. */
|
|
48
|
+
evidence: EvidenceListFacts;
|
|
49
|
+
/** Rows hidden by the view cap; a Display omission, not an Evidence atom count. */
|
|
50
|
+
displayOmittedCount: number;
|
|
52
51
|
/** Content counts are separate from canonical evidence when rows are grouped or framed. */
|
|
53
52
|
preview?: {
|
|
54
53
|
unit: "group" | "block";
|
|
@@ -143,7 +142,7 @@ export interface ResolveDetails {
|
|
|
143
142
|
/** Strict provider kind that produced a near-match result. */
|
|
144
143
|
requestedKind?: TargetSymbolKind;
|
|
145
144
|
confidence: ConfidenceMode;
|
|
146
|
-
/** Plain workflow
|
|
145
|
+
/** Plain workflow message: the failure for invalid-input and unavailable, the selection reason for candidates. */
|
|
147
146
|
message?: string;
|
|
148
147
|
targetCount: number;
|
|
149
148
|
omittedCount: number;
|
|
@@ -283,6 +282,8 @@ export interface HealthDetails {
|
|
|
283
282
|
serverInventoryScope: "workspace";
|
|
284
283
|
/** Diagnostic result scope and exact evidence boundary for this health call. */
|
|
285
284
|
diagnosticObservation: HealthDiagnosticObservation;
|
|
285
|
+
/** Shared coverage classification of `diagnosticObservation`; null when not requested. */
|
|
286
|
+
diagnosticCoverage: DiagnosticCoverage | null;
|
|
286
287
|
/** Current or most recent refresh, including typed maintenance scope and evidence. */
|
|
287
288
|
refresh: HealthRefreshState;
|
|
288
289
|
structuralAvailable: boolean;
|
package/src/tool/schemas.ts
CHANGED
|
@@ -9,31 +9,28 @@ import { CODE_FIND_AST_KINDS } from "./code_find/ast-kinds.ts";
|
|
|
9
9
|
export const ScopeParam = Type.String({
|
|
10
10
|
description: "Workspace-relative file or directory scope.",
|
|
11
11
|
});
|
|
12
|
-
export const FindScopesParam = Type.Array(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
);
|
|
19
|
-
const FileParam = Type.String({ description: "File path." });
|
|
12
|
+
export const FindScopesParam = Type.Array(Type.String(), {
|
|
13
|
+
description: "One or more workspace-relative search scopes.",
|
|
14
|
+
minItems: 1,
|
|
15
|
+
});
|
|
16
|
+
const FileParam = Type.String();
|
|
20
17
|
export const QueryParam = Type.String({
|
|
21
18
|
description: "Human or code reference to resolve or search for.",
|
|
22
19
|
minLength: 1,
|
|
23
20
|
});
|
|
24
|
-
const LineParam = Type.Integer({
|
|
25
|
-
const CharacterParam = Type.Integer({
|
|
26
|
-
description: "1-based UTF-16 column.",
|
|
27
|
-
minimum: 1,
|
|
28
|
-
});
|
|
21
|
+
const LineParam = Type.Integer({ minimum: 1 });
|
|
22
|
+
const CharacterParam = Type.Integer({ minimum: 1 });
|
|
29
23
|
export const MaxResultsParam = Type.Integer({
|
|
30
24
|
description: "Maximum displayed results.",
|
|
31
25
|
minimum: 1,
|
|
32
26
|
});
|
|
33
27
|
|
|
28
|
+
/** One home for the position convention; the leaf fields stay undescribed. */
|
|
29
|
+
const POSITION_DESCRIPTION = "1-based line and UTF-16 column.";
|
|
30
|
+
|
|
34
31
|
export const SourcePointParam = Type.Object(
|
|
35
32
|
{ file: FileParam, line: LineParam, character: CharacterParam },
|
|
36
|
-
{ additionalProperties: false },
|
|
33
|
+
{ additionalProperties: false, description: POSITION_DESCRIPTION },
|
|
37
34
|
);
|
|
38
35
|
|
|
39
36
|
const SymbolTargetParam = Type.Object(
|
|
@@ -47,10 +44,7 @@ const SymbolTargetParam = Type.Object(
|
|
|
47
44
|
}),
|
|
48
45
|
),
|
|
49
46
|
},
|
|
50
|
-
{
|
|
51
|
-
description: "Semantic symbol query.",
|
|
52
|
-
additionalProperties: false,
|
|
53
|
-
},
|
|
47
|
+
{ additionalProperties: false },
|
|
54
48
|
);
|
|
55
49
|
|
|
56
50
|
/**
|
|
@@ -152,11 +146,12 @@ const RangeParam = Type.Object(
|
|
|
152
146
|
},
|
|
153
147
|
{
|
|
154
148
|
additionalProperties: false,
|
|
155
|
-
description:
|
|
149
|
+
description:
|
|
150
|
+
"Source range with 1-based lines and UTF-16 columns; end is exclusive. Equal start and end mark a cursor position.",
|
|
156
151
|
},
|
|
157
152
|
);
|
|
158
153
|
|
|
159
|
-
const NewNameParam = Type.String({
|
|
154
|
+
const NewNameParam = Type.String({ minLength: 1 });
|
|
160
155
|
const ActionTitleParam = Type.String({
|
|
161
156
|
description:
|
|
162
157
|
"Exact action title from a previous ambiguous result; selects one of several matching actions.",
|
package/src/ui/footer.ts
CHANGED
|
@@ -1,68 +1,171 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* LSP footer
|
|
2
|
+
* LSP footer contribution for code-intelligence.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Shows workspace LSP state on the right side of the footer path line, for
|
|
5
|
+
* example `λ 3✓ ◫43` (three ready routes, 43 tracked files).
|
|
6
|
+
*
|
|
7
|
+
* The text comes from the controller's latest published lifecycle snapshot.
|
|
8
|
+
* Rendering never queries the runtime, because route status can require
|
|
9
|
+
* file-system probes and the footer renders often. The same text is published
|
|
10
|
+
* through Pi's status API so the built-in footer and other custom footers
|
|
11
|
+
* show it too; the SuPi footer skips that same-key status.
|
|
7
12
|
*/
|
|
8
13
|
|
|
9
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
10
|
-
import {
|
|
11
|
-
|
|
14
|
+
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
15
|
+
import {
|
|
16
|
+
FOOTER_INVALIDATE_EVENT,
|
|
17
|
+
type FooterColor,
|
|
18
|
+
type FooterGlyphMode,
|
|
19
|
+
type FooterRenderContext,
|
|
20
|
+
footerContributions,
|
|
21
|
+
} from "@mrclrchtr/supi-core/footer-registry";
|
|
22
|
+
import type { LspRuntimeController } from "@mrclrchtr/supi-lsp/api";
|
|
23
|
+
import {
|
|
24
|
+
classifyProjectServerRoute,
|
|
25
|
+
type ProjectServerRouteState,
|
|
26
|
+
} from "../analysis/health/server-status.ts";
|
|
12
27
|
import { LSP_STATE_CHANGE_EVENT, type LspAdapterState } from "../substrate/lsp/state.ts";
|
|
13
28
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
type CountedState = Exclude<ProjectServerRouteState, "loading">;
|
|
30
|
+
|
|
31
|
+
interface LspFooterGlyphs {
|
|
32
|
+
label: string;
|
|
33
|
+
/** Tracked-file prefix, written directly before the count. */
|
|
34
|
+
files: string;
|
|
35
|
+
states: Record<CountedState, string>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const UNICODE_GLYPHS: LspFooterGlyphs = {
|
|
39
|
+
label: "λ",
|
|
40
|
+
files: "◫",
|
|
41
|
+
states: { ready: "✓", starting: "⟳", recovering: "↻", error: "✗", unavailable: "⊘" },
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const GLYPHS: Record<FooterGlyphMode, LspFooterGlyphs> = {
|
|
45
|
+
// U+F0DCB: Material Design file outline.
|
|
46
|
+
nerd: { ...UNICODE_GLYPHS, files: "\u{F0DCB}" },
|
|
47
|
+
unicode: UNICODE_GLYPHS,
|
|
48
|
+
ascii: {
|
|
49
|
+
label: "lsp",
|
|
50
|
+
files: "f",
|
|
51
|
+
states: { ready: "ok", starting: "~", recovering: "r", error: "x", unavailable: "-" },
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** Display order and color of each counted route state. `loading` counts as starting. */
|
|
56
|
+
const ROUTE_PARTS: ReadonlyArray<{ state: CountedState; color: FooterColor }> = [
|
|
57
|
+
{ state: "ready", color: "success" },
|
|
58
|
+
{ state: "starting", color: "accent" },
|
|
59
|
+
{ state: "recovering", color: "warning" },
|
|
60
|
+
{ state: "error", color: "error" },
|
|
61
|
+
{ state: "unavailable", color: "warning" },
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
const plainContext: FooterRenderContext = { style: (_color, text) => text, glyphMode: "unicode" };
|
|
65
|
+
|
|
66
|
+
type LspFooterController = Pick<
|
|
67
|
+
LspRuntimeController,
|
|
68
|
+
"kind" | "latestLifecycleTransition" | "getConfigurationError"
|
|
69
|
+
>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Build the LSP status text, for example `λ 3✓ 1⟳ 1✗ ◫2`.
|
|
73
|
+
*
|
|
74
|
+
* A controller that could not start shows `✗ config` for a configuration error
|
|
75
|
+
* and `✗ unavailable` otherwise. A disabled or absent controller shows nothing.
|
|
76
|
+
*/
|
|
77
|
+
export function buildLspStatusText(
|
|
78
|
+
lspState: LspAdapterState,
|
|
79
|
+
ctx: FooterRenderContext = plainContext,
|
|
80
|
+
): string | undefined {
|
|
81
|
+
const controller = lspState.controller as LspFooterController | null;
|
|
82
|
+
if (!controller) return undefined;
|
|
83
|
+
const { style } = ctx;
|
|
84
|
+
const glyphs = GLYPHS[ctx.glyphMode];
|
|
85
|
+
const label = style("dim", glyphs.label);
|
|
86
|
+
const failure = glyphs.states.error;
|
|
87
|
+
|
|
88
|
+
if (controller.kind === "unavailable") {
|
|
89
|
+
const cause = controller.getConfigurationError() ? "config" : "unavailable";
|
|
90
|
+
return `${label} ${style("error", `${failure} ${cause}`)}`;
|
|
91
|
+
}
|
|
92
|
+
if (controller.kind !== "ready" && controller.kind !== "pending") return undefined;
|
|
93
|
+
|
|
94
|
+
const servers = controller.latestLifecycleTransition?.projectServers ?? [];
|
|
95
|
+
const counts = countRouteStates(servers);
|
|
96
|
+
const trackedFiles = servers.reduce((sum, server) => sum + server.openFiles.length, 0);
|
|
97
|
+
if (counts.size === 0 && trackedFiles === 0) return undefined;
|
|
98
|
+
|
|
99
|
+
const parts = [label];
|
|
100
|
+
for (const { state, color } of ROUTE_PARTS) {
|
|
101
|
+
const count = counts.get(state);
|
|
102
|
+
if (count) parts.push(style(color, `${count}${glyphs.states[state]}`));
|
|
103
|
+
}
|
|
104
|
+
if (trackedFiles > 0) parts.push(style("dim", `${glyphs.files}${trackedFiles}`));
|
|
105
|
+
return parts.join(" ");
|
|
40
106
|
}
|
|
41
107
|
|
|
42
|
-
|
|
108
|
+
function countRouteStates(
|
|
109
|
+
servers: readonly Parameters<typeof classifyProjectServerRoute>[0][],
|
|
110
|
+
): Map<CountedState, number> {
|
|
111
|
+
const counts = new Map<CountedState, number>();
|
|
112
|
+
for (const server of servers) {
|
|
113
|
+
const state = classifyProjectServerRoute(server);
|
|
114
|
+
// A route that still loads its projects answers queries but is not done yet.
|
|
115
|
+
const counted = state === "loading" ? "starting" : state;
|
|
116
|
+
counts.set(counted, (counts.get(counted) ?? 0) + 1);
|
|
117
|
+
}
|
|
118
|
+
return counts;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// ── Footer contribution ─────────────────────────────────────────────────
|
|
43
122
|
|
|
44
123
|
const FOOTER_KEY = "lsp-status";
|
|
45
124
|
|
|
46
|
-
/** Register the LSP
|
|
125
|
+
/** Register the LSP footer contribution and its Pi status fallback. */
|
|
47
126
|
export function registerLspFooterContribution(
|
|
48
127
|
pi: ExtensionAPI,
|
|
49
128
|
lspState: LspAdapterState,
|
|
50
129
|
): {
|
|
51
130
|
dispose: () => void;
|
|
52
131
|
} {
|
|
132
|
+
let statusUi: ExtensionContext["ui"] | undefined;
|
|
133
|
+
|
|
53
134
|
footerContributions.register({
|
|
54
135
|
key: FOOTER_KEY,
|
|
55
|
-
placement: "
|
|
136
|
+
placement: "path-end",
|
|
56
137
|
priority: 100,
|
|
57
|
-
render: () =>
|
|
58
|
-
const text = buildLspStatusText(lspState);
|
|
59
|
-
if (!text) return "";
|
|
60
|
-
return `| ${text}`;
|
|
61
|
-
},
|
|
138
|
+
render: (ctx) => buildLspStatusText(lspState, ctx) ?? "",
|
|
62
139
|
});
|
|
63
140
|
|
|
64
|
-
|
|
65
|
-
|
|
141
|
+
const publishStatus = () => {
|
|
142
|
+
if (!statusUi) return;
|
|
143
|
+
const theme = statusUi.theme;
|
|
144
|
+
const text = buildLspStatusText(lspState, {
|
|
145
|
+
style: (color, value) => theme.fg(color, value),
|
|
146
|
+
glyphMode: "unicode",
|
|
147
|
+
});
|
|
148
|
+
try {
|
|
149
|
+
statusUi.setStatus(FOOTER_KEY, text);
|
|
150
|
+
} catch {
|
|
151
|
+
// Pi may be shutting down while the status changes.
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
pi.on("session_start", (_event, ctx) => {
|
|
156
|
+
statusUi = ctx.mode === "tui" ? ctx.ui : undefined;
|
|
157
|
+
publishStatus();
|
|
158
|
+
});
|
|
159
|
+
pi.on("session_shutdown", () => {
|
|
160
|
+
statusUi?.setStatus(FOOTER_KEY, undefined);
|
|
161
|
+
statusUi = undefined;
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// Re-render when the runtime publishes a new snapshot.
|
|
165
|
+
const handler = () => {
|
|
166
|
+
publishStatus();
|
|
167
|
+
pi.events.emit(FOOTER_INVALIDATE_EVENT, {});
|
|
168
|
+
};
|
|
66
169
|
lspState.stateChanges.addEventListener(LSP_STATE_CHANGE_EVENT, handler);
|
|
67
170
|
|
|
68
171
|
return {
|
|
@@ -73,7 +176,7 @@ export function registerLspFooterContribution(
|
|
|
73
176
|
};
|
|
74
177
|
}
|
|
75
178
|
|
|
76
|
-
/** Remove the LSP
|
|
179
|
+
/** Remove the LSP footer contribution. */
|
|
77
180
|
export function unregisterLspFooterContribution(): void {
|
|
78
181
|
footerContributions.unregister(FOOTER_KEY);
|
|
79
182
|
}
|
package/src/ui/status-overlay.ts
CHANGED
|
@@ -22,6 +22,7 @@ import type {
|
|
|
22
22
|
WorkspaceDiagnosticCheckReport,
|
|
23
23
|
} from "../analysis/health/check.ts";
|
|
24
24
|
import {
|
|
25
|
+
classifyProjectServerRoute,
|
|
25
26
|
countProjectServerRouteStatuses,
|
|
26
27
|
formatProjectServerCompiler,
|
|
27
28
|
formatProjectServerRoot,
|
|
@@ -405,18 +406,16 @@ export class CiStatusDialog {
|
|
|
405
406
|
private summaryLine(): string {
|
|
406
407
|
const t = this.deps.theme;
|
|
407
408
|
if (this.refreshError) return t.fg("error", this.refreshFailure());
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
).length;
|
|
411
|
-
const
|
|
412
|
-
(server) => server.status === "running" && !server.ready,
|
|
413
|
-
).length;
|
|
409
|
+
const states = this.data.servers.map(classifyProjectServerRoute);
|
|
410
|
+
const ready = states.filter((state) => state === "ready").length;
|
|
411
|
+
const starting = states.filter((state) => state === "starting").length;
|
|
412
|
+
const loading = states.filter((state) => state === "loading").length;
|
|
414
413
|
const counts = countProjectServerRouteStatuses(this.data.servers);
|
|
415
414
|
const entries = this.data.diagnostics.entries;
|
|
416
415
|
const errors = entries.reduce((sum, entry) => sum + entry.errors, 0);
|
|
417
416
|
const warnings = entries.reduce((sum, entry) => sum + entry.warnings, 0);
|
|
418
417
|
return [
|
|
419
|
-
`${ready} ready${starting ? ` · ${starting} starting` : ""}`,
|
|
418
|
+
`${ready} ready${starting ? ` · ${starting} starting` : ""}${loading ? ` · ${loading} loading projects` : ""}`,
|
|
420
419
|
errors ? t.fg("error", countLabel(errors, "error")) : "",
|
|
421
420
|
warnings ? t.fg("warning", countLabel(warnings, "warning")) : "",
|
|
422
421
|
counts.recovering
|
|
@@ -585,7 +584,13 @@ export class CiStatusDialog {
|
|
|
585
584
|
private addServer(server: ProjectServerInfo, text: (value: string) => void): void {
|
|
586
585
|
const t = this.deps.theme;
|
|
587
586
|
const state =
|
|
588
|
-
server.status
|
|
587
|
+
server.status !== "running"
|
|
588
|
+
? server.status
|
|
589
|
+
: !server.ready
|
|
590
|
+
? "starting"
|
|
591
|
+
: server.loadingProjects
|
|
592
|
+
? "loading projects"
|
|
593
|
+
: "ready";
|
|
589
594
|
text(
|
|
590
595
|
t.fg(
|
|
591
596
|
state === "ready" ? "success" : state === "error" ? "error" : "warning",
|