@mrclrchtr/supi-code-intelligence 3.2.0 → 4.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/README.md +154 -435
- package/node_modules/@mrclrchtr/supi-code-runtime/README.md +8 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +2 -4
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +0 -4
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/evidence-badge.ts +3 -2
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +0 -4
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/llm.ts +0 -10
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +19 -15
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +10 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +19 -29
- package/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +7 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +42 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +15 -10
- package/node_modules/@mrclrchtr/supi-core/package.json +2 -4
- package/node_modules/@mrclrchtr/supi-core/src/api.ts +0 -4
- package/node_modules/@mrclrchtr/supi-core/src/evidence-badge.ts +3 -2
- package/node_modules/@mrclrchtr/supi-core/src/index.ts +0 -4
- package/node_modules/@mrclrchtr/supi-core/src/llm.ts +0 -10
- package/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +19 -15
- package/node_modules/@mrclrchtr/supi-lsp/README.md +72 -62
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/README.md +8 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +2 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +0 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/evidence-badge.ts +3 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +0 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/llm.ts +0 -10
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +19 -15
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +10 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +19 -29
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +7 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +42 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +15 -10
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +2 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/api.ts +0 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/evidence-badge.ts +3 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/index.ts +0 -4
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/llm.ts +0 -10
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +19 -15
- package/node_modules/@mrclrchtr/supi-lsp/package.json +4 -5
- package/node_modules/@mrclrchtr/supi-lsp/src/api.ts +9 -9
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +70 -41
- package/node_modules/@mrclrchtr/supi-lsp/src/client/transport.ts +16 -13
- package/node_modules/@mrclrchtr/supi-lsp/src/config/config.ts +2 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/config/lsp-settings.ts +0 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/index.ts +6 -6
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-diagnostics.ts +5 -95
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-recovery.ts +4 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-symbol.ts +44 -6
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +47 -65
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/lsp-semantic-provider.ts +132 -79
- package/node_modules/@mrclrchtr/supi-lsp/src/provider/refactor-planning.ts +6 -14
- package/node_modules/@mrclrchtr/supi-lsp/src/session/readiness.ts +38 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-controller.ts +87 -75
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registration.ts +5 -5
- package/node_modules/@mrclrchtr/supi-lsp/src/session/{service-registry.ts → runtime-registry.ts} +163 -71
- package/node_modules/@mrclrchtr/supi-tree-sitter/README.md +4 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/README.md +8 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +2 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/api.ts +0 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/evidence-badge.ts +3 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/index.ts +0 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/llm.ts +0 -10
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +19 -15
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +10 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +19 -29
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/index.ts +7 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +42 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +15 -10
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +2 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/api.ts +0 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/evidence-badge.ts +3 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/index.ts +0 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/llm.ts +0 -10
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/path-utils.ts +19 -15
- package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +4 -21
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/bash/tree-sitter-bash.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/bash/tree-sitter-bash.wasm.json +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/c/tree-sitter-c.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/c/tree-sitter-c.wasm.json +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/go/tree-sitter-go.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/go/tree-sitter-go.wasm.json +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/javascript/tree-sitter-javascript.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/javascript/tree-sitter-javascript.wasm.json +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/kotlin/tree-sitter-kotlin.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/kotlin/tree-sitter-kotlin.wasm.json +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/python/tree-sitter-python.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/python/tree-sitter-python.wasm.json +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/r/tree-sitter-r.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/r/tree-sitter-r.wasm.json +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/rust/tree-sitter-rust.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/scripts/generate-kotlin-wasm.mjs +6 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/scripts/generate-sql-wasm.mjs +18 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/scripts/vendor-wasm.mjs +17 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/api.ts +2 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/coordinates.ts +20 -41
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/index.ts +2 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/language.ts +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/operation-support.ts +40 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/session/session.ts +9 -7
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/call-sites.ts +6 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/callees.ts +76 -37
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +172 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +225 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +116 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +975 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +224 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +227 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +118 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +350 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +723 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +980 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +97 -0
- package/node_modules/yaml/util.js +2 -0
- package/package.json +9 -8
- package/src/analysis/architecture/discovery.ts +213 -227
- package/src/analysis/architecture/manifest.ts +147 -0
- package/src/analysis/architecture/model.ts +119 -52
- package/src/analysis/architecture/workspace-config.ts +229 -0
- package/src/analysis/{coverage/coverage-warnings.ts → capability/capability-warnings.ts} +41 -78
- package/src/analysis/evidence.ts +22 -5
- package/src/analysis/health/diagnostics.ts +183 -0
- package/src/analysis/health/recovery.ts +39 -0
- package/src/analysis/health/signals.ts +20 -0
- package/src/analysis/instruction-files.ts +60 -48
- package/src/analysis/provider.ts +31 -12
- package/src/analysis/readiness.ts +29 -9
- package/src/{tool/refactor-apply → analysis/refactor}/apply.ts +120 -26
- package/src/analysis/refactor/position.ts +6 -0
- package/src/analysis/refactor/safety.ts +4 -11
- package/src/analysis/references/locations.ts +20 -0
- package/src/analysis/references/semantic-refs.ts +21 -11
- package/src/{tool/graph → analysis/relations}/implementations.ts +27 -23
- package/src/analysis/relations/provider-locations.ts +179 -0
- package/src/{tool/graph → analysis/relations}/references.ts +25 -21
- package/src/{tool/graph → analysis/relations}/types.ts +4 -19
- package/src/analysis/search/ast-scan.ts +376 -0
- package/src/analysis/search/call-name.ts +68 -0
- package/src/analysis/search/deadline.ts +84 -0
- package/src/analysis/search/paths.ts +88 -0
- package/src/analysis/search/pattern.ts +290 -246
- package/src/analysis/target/anchored.ts +72 -27
- package/src/analysis/target/file.ts +292 -132
- package/src/analysis/target/identity.ts +237 -0
- package/src/analysis/target/symbol.ts +169 -86
- package/src/analysis/target/types.ts +36 -4
- package/src/api.ts +21 -4
- package/src/app/app.ts +53 -46
- package/src/extension.ts +68 -66
- package/src/session/capability-adapter.ts +26 -118
- package/src/session/find-types.ts +38 -0
- package/src/session/find-workflow.ts +141 -0
- package/src/session/graph/collect.ts +181 -0
- package/src/session/graph-types.ts +77 -0
- package/src/session/graph-workflow.ts +152 -0
- package/src/session/health-types.ts +134 -0
- package/src/session/health-workflow.ts +341 -0
- package/src/session/input/common.ts +216 -0
- package/src/session/input/health-refactor.ts +169 -0
- package/src/session/input/workflows.ts +211 -0
- package/src/session/inspect/collect.ts +304 -0
- package/src/session/inspect/file-point.ts +69 -0
- package/src/session/inspect-types.ts +78 -0
- package/src/session/inspect-workflow.ts +157 -0
- package/src/session/orientation/collect.ts +718 -0
- package/src/session/orientation/context-facts.ts +319 -0
- package/src/session/orientation/context-sections.ts +352 -0
- package/src/session/orientation-types.ts +97 -0
- package/src/session/orientation-workflow.ts +307 -0
- package/src/session/refactor-plans.ts +1 -1
- package/src/session/refactor-types.ts +51 -0
- package/src/session/refactor-workflow.ts +263 -0
- package/src/session/session.ts +263 -234
- package/src/session/target-candidates.ts +60 -0
- package/src/session/target-input.ts +98 -0
- package/src/session/target-store.ts +132 -29
- package/src/session/target-workflow.ts +254 -302
- package/src/session/workflow-control.ts +35 -0
- package/src/substrate/lsp/lifecycle.ts +9 -22
- package/src/substrate/lsp/maintenance.ts +75 -0
- package/src/substrate/lsp/recovery.ts +41 -25
- package/src/substrate/lsp/settings.ts +1 -10
- package/src/substrate/lsp/state.ts +2 -13
- package/src/tool/find/ast-kinds.ts +35 -0
- package/src/tool/find/execute.ts +22 -113
- package/src/tool/find/markdown.ts +85 -221
- package/src/tool/find/modes.ts +5 -0
- package/src/tool/find/render.ts +57 -0
- package/src/tool/find/tui.ts +1 -1
- package/src/tool/graph/calls-md.ts +17 -30
- package/src/tool/graph/execute.ts +42 -103
- package/src/tool/graph/implementations-md.ts +32 -54
- package/src/tool/graph/markdown-base.ts +73 -196
- package/src/tool/graph/provider-location-md.ts +9 -0
- package/src/tool/graph/references-md.ts +34 -27
- package/src/tool/graph/tui.ts +8 -26
- package/src/tool/guidance.ts +31 -48
- package/src/tool/health/execute.ts +15 -56
- package/src/tool/health/markdown.ts +199 -148
- package/src/tool/health/semantic-state.ts +24 -0
- package/src/tool/health/tui.ts +262 -36
- package/src/tool/infra/error-results.ts +0 -2
- package/src/tool/infra/progress.ts +2 -2
- package/src/tool/infra/workflow-control.ts +11 -0
- package/src/tool/inspect/execute.ts +23 -63
- package/src/tool/inspect/markdown.ts +114 -95
- package/src/tool/inspect/tui.ts +7 -7
- package/src/tool/orientation/execute.ts +50 -37
- package/src/tool/orientation/markdown.ts +26 -31
- package/src/tool/orientation/tui.ts +41 -39
- package/src/tool/refactor-apply/execute.ts +23 -9
- package/src/tool/refactor-apply/tui.ts +7 -3
- package/src/tool/refactor-plan/execute.ts +44 -61
- package/src/tool/refactor-plan/markdown.ts +33 -56
- package/src/tool/refactor-plan/tui.ts +10 -11
- package/src/tool/register.ts +6 -5
- package/src/tool/resolve/execute.ts +23 -69
- package/src/tool/resolve/markdown.ts +125 -114
- package/src/tool/resolve/tui.ts +11 -9
- package/src/tool/result/assembly.ts +125 -0
- package/src/tool/result/errors.ts +20 -34
- package/src/tool/result/find.ts +107 -21
- package/src/tool/result/graph.ts +163 -64
- package/src/tool/result/health.ts +170 -73
- package/src/tool/result/inspect.ts +183 -41
- package/src/tool/result/orientation.ts +118 -16
- package/src/tool/result/refactor.ts +101 -21
- package/src/tool/result/resolve.ts +243 -80
- package/src/tool/result/types.ts +100 -56
- package/src/tool/schemas.ts +160 -231
- package/src/tool/specs.ts +57 -168
- package/src/types/details.ts +2 -4
- package/src/types/execution.ts +6 -15
- package/src/types/index.ts +2 -4
- package/src/types/tool-names.ts +1 -2
- package/src/ui/footer.ts +3 -3
- package/src/ui/markdown/gather.ts +17 -65
- package/src/ui/markdown/overview-data.ts +143 -21
- package/src/ui/markdown/overview.ts +27 -8
- package/src/ui/markdown/types.ts +12 -16
- package/src/ui/status-command.ts +39 -31
- package/src/ui/status-overlay.ts +23 -15
- package/src/ui/tui/common.ts +121 -74
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +0 -31
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +0 -11
- package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/types.ts +0 -2
- package/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +0 -31
- package/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +0 -11
- package/node_modules/@mrclrchtr/supi-core/src/types.ts +0 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +0 -31
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +0 -11
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/types.ts +0 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +0 -31
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +0 -11
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/types.ts +0 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/diagnostic-augmentation.ts +0 -82
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/diagnostic-context.ts +0 -116
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/diagnostic-display.ts +0 -69
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/capability-index.ts +0 -24
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/client-pool.ts +0 -33
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/diagnostic-store.ts +0 -51
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-stale-resync.ts +0 -47
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/recovery-coordinator.ts +0 -37
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/workspace-router.ts +0 -44
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +0 -31
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +0 -11
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/src/types.ts +0 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/abort-utils.ts +0 -31
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +0 -11
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/types.ts +0 -2
- package/src/analysis/brief/directory.ts +0 -324
- package/src/analysis/brief/enrich.ts +0 -157
- package/src/analysis/brief/file.ts +0 -84
- package/src/analysis/brief/inventory.ts +0 -177
- package/src/analysis/brief/main.ts +0 -176
- package/src/analysis/brief/models.ts +0 -75
- package/src/analysis/brief/public-brief.ts +0 -179
- package/src/analysis/brief/summarize.ts +0 -208
- package/src/analysis/brief/types.ts +0 -27
- package/src/analysis/brief/use-case.ts +0 -264
- package/src/analysis/search/ripgrep.ts +0 -558
- package/src/analysis/signals/git.ts +0 -89
- package/src/analysis/signals/project.ts +0 -189
- package/src/analysis/target/bridge.ts +0 -152
- package/src/analysis/target/file-resolution.ts +0 -125
- package/src/analysis/target/planner.ts +0 -92
- package/src/analysis/target/query.ts +0 -74
- package/src/analysis/target/resolve-common.ts +0 -115
- package/src/analysis/target/service.ts +0 -229
- package/src/analysis/tests/likely-tests.ts +0 -174
- package/src/analysis/tests/test-discovery.ts +0 -540
- package/src/analysis/tests/vitest.ts +0 -87
- package/src/app/manager.ts +0 -65
- package/src/substrate/lsp/diagnostic-injection.ts +0 -203
- package/src/substrate/lsp/overrides.ts +0 -132
- package/src/tool/find/orchestrate.ts +0 -317
- package/src/tool/find/semantic-search.ts +0 -128
- package/src/tool/graph/collect-relation.ts +0 -372
- package/src/tool/graph/orchestrate.ts +0 -259
- package/src/tool/health/orchestrate.ts +0 -151
- package/src/tool/health/sections/diagnostics.ts +0 -182
- package/src/tool/health/sections/recovery.ts +0 -89
- package/src/tool/health/sections/signals.ts +0 -89
- package/src/tool/impact/analysis.ts +0 -220
- package/src/tool/impact/change-set-impact.ts +0 -152
- package/src/tool/impact/execute.ts +0 -125
- package/src/tool/impact/file-level-impact.ts +0 -82
- package/src/tool/impact/markdown.ts +0 -283
- package/src/tool/impact/orchestrate.ts +0 -97
- package/src/tool/impact/result.ts +0 -2
- package/src/tool/impact/single-impact.ts +0 -90
- package/src/tool/impact/tui.ts +0 -39
- package/src/tool/impact/types.ts +0 -34
- package/src/tool/infra/cross-field.ts +0 -335
- package/src/tool/infra/pipeline.ts +0 -334
- package/src/tool/infra/readiness-message.ts +0 -5
- package/src/tool/inspect/orchestrate.ts +0 -154
- package/src/tool/orientation/deps.ts +0 -63
- package/src/tool/orientation/mode.ts +0 -139
- package/src/tool/orientation/orchestrate.ts +0 -475
- package/src/tool/orientation/precise-target.ts +0 -253
- package/src/tool/params.ts +0 -15
- package/src/tool/refactor-apply/markdown.ts +0 -118
- package/src/tool/refactor-apply/orchestrate.ts +0 -84
- package/src/tool/refactor-plan/orchestrate.ts +0 -355
- package/src/tool/resolve/orchestrate.ts +0 -38
- package/src/tool/result/impact.ts +0 -50
- package/src/ui/markdown/brief.ts +0 -218
- package/src/ui/message-renderer.ts +0 -121
- package/src/ui/tui/index.ts +0 -37
- /package/src/{tool/graph → analysis/relations}/callees.ts +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const DEFAULT_SEMANTIC_READY_TIMEOUT_MS = 15_000;
|
|
2
|
+
|
|
3
|
+
export type ReadinessValueResult<T> =
|
|
4
|
+
| { kind: "resolved"; value: T }
|
|
5
|
+
| { kind: "timeout" }
|
|
6
|
+
| { kind: "unavailable"; reason: string };
|
|
7
|
+
|
|
8
|
+
/** Await one readiness operation while preserving its concrete success value. */
|
|
9
|
+
export async function raceReadinessValue<T>(
|
|
10
|
+
readiness: Promise<T>,
|
|
11
|
+
timeoutMs: number | undefined,
|
|
12
|
+
): Promise<ReadinessValueResult<T>> {
|
|
13
|
+
const effectiveTimeoutMs = timeoutMs ?? DEFAULT_SEMANTIC_READY_TIMEOUT_MS;
|
|
14
|
+
let timer: ReturnType<typeof setTimeout> | null = null;
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
const value = await Promise.race([
|
|
18
|
+
readiness,
|
|
19
|
+
new Promise<never>((_resolve, reject) => {
|
|
20
|
+
timer = setTimeout(
|
|
21
|
+
() => reject(new Error("semantic-readiness-timeout")),
|
|
22
|
+
effectiveTimeoutMs,
|
|
23
|
+
);
|
|
24
|
+
}),
|
|
25
|
+
]);
|
|
26
|
+
return { kind: "resolved", value };
|
|
27
|
+
} catch (error) {
|
|
28
|
+
if (error instanceof Error && error.message === "semantic-readiness-timeout") {
|
|
29
|
+
return { kind: "timeout" };
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
kind: "unavailable",
|
|
33
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
34
|
+
};
|
|
35
|
+
} finally {
|
|
36
|
+
if (timer) clearTimeout(timer);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// This controller owns session start/shutdown for one cwd:
|
|
4
4
|
// - Creates and disposes the LspManager
|
|
5
|
-
// - Publishes
|
|
5
|
+
// - Publishes WorkspaceLspRuntime states through the existing registry
|
|
6
6
|
// - Exposes the data the umbrella adapter will need later
|
|
7
7
|
//
|
|
8
8
|
// It does NOT import pi event types or ExtensionAPI.
|
|
@@ -19,12 +19,13 @@ import {
|
|
|
19
19
|
registerPendingLspCapabilities,
|
|
20
20
|
unregisterLspCapabilities,
|
|
21
21
|
} from "./runtime-registration.ts";
|
|
22
|
-
import { scanMissingServers, scanProjectCapabilities, startDetectedServers } from "./scanner.ts";
|
|
23
22
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
clearWorkspaceLspRuntime,
|
|
24
|
+
createWorkspaceLspRuntimeOwner,
|
|
25
|
+
setWorkspaceLspRuntimeState,
|
|
26
|
+
type WorkspaceLspRuntime,
|
|
27
|
+
} from "./runtime-registry.ts";
|
|
28
|
+
import { scanMissingServers, scanProjectCapabilities, startDetectedServers } from "./scanner.ts";
|
|
28
29
|
|
|
29
30
|
// ── Types ─────────────────────────────────────────────────────────────
|
|
30
31
|
|
|
@@ -44,10 +45,12 @@ interface LspControllerPending {
|
|
|
44
45
|
kind: "pending";
|
|
45
46
|
}
|
|
46
47
|
|
|
48
|
+
type WorkspaceLspRuntimeOwner = ReturnType<typeof createWorkspaceLspRuntimeOwner>;
|
|
49
|
+
|
|
47
50
|
interface LspControllerReady {
|
|
48
51
|
kind: "ready";
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
runtimeOwner: WorkspaceLspRuntimeOwner;
|
|
53
|
+
workspaceRuntime: WorkspaceLspRuntime;
|
|
51
54
|
projectServers: ProjectServerInfo[];
|
|
52
55
|
detectedServers: DetectedProjectServer[];
|
|
53
56
|
settings: LspSettings;
|
|
@@ -65,10 +68,14 @@ interface LspControllerUnavailable {
|
|
|
65
68
|
|
|
66
69
|
/** Result type from {@link LspRuntimeController.start}. */
|
|
67
70
|
export type LspStartResult =
|
|
68
|
-
| { kind: "ready";
|
|
71
|
+
| { kind: "ready"; runtime: WorkspaceLspRuntime }
|
|
69
72
|
| { kind: "disabled"; message: string }
|
|
70
73
|
| { kind: "unavailable"; reason: string };
|
|
71
74
|
|
|
75
|
+
function supersededStartResult(): LspStartResult {
|
|
76
|
+
return { kind: "unavailable", reason: "LSP startup was superseded by a newer lifecycle event." };
|
|
77
|
+
}
|
|
78
|
+
|
|
72
79
|
// ── Controller ────────────────────────────────────────────────────────
|
|
73
80
|
|
|
74
81
|
/**
|
|
@@ -82,7 +89,7 @@ export type LspStartResult =
|
|
|
82
89
|
* const controller = new LspRuntimeController(cwd);
|
|
83
90
|
* const result = await controller.start();
|
|
84
91
|
* if (result.kind === "ready") {
|
|
85
|
-
* // use
|
|
92
|
+
* // use result.runtime for workspace LSP operations
|
|
86
93
|
* }
|
|
87
94
|
* // later
|
|
88
95
|
* await controller.shutdown();
|
|
@@ -91,13 +98,14 @@ export type LspStartResult =
|
|
|
91
98
|
export class LspRuntimeController {
|
|
92
99
|
readonly #cwd: string;
|
|
93
100
|
#state: LspControllerState;
|
|
94
|
-
#
|
|
101
|
+
#capabilityRuntime: WorkspaceRuntime | null;
|
|
102
|
+
/** Monotonic ownership token for starts, shutdowns, and async warm-up. */
|
|
95
103
|
#readinessGeneration = 0;
|
|
96
104
|
|
|
97
105
|
constructor(cwd: string, runtime?: WorkspaceRuntime) {
|
|
98
106
|
this.#cwd = cwd;
|
|
99
107
|
this.#state = { kind: "initial" };
|
|
100
|
-
this.#
|
|
108
|
+
this.#capabilityRuntime = runtime ?? null;
|
|
101
109
|
}
|
|
102
110
|
|
|
103
111
|
/** The workspace cwd this controller was created for. */
|
|
@@ -110,14 +118,9 @@ export class LspRuntimeController {
|
|
|
110
118
|
return this.#state.kind;
|
|
111
119
|
}
|
|
112
120
|
|
|
113
|
-
/**
|
|
114
|
-
get
|
|
115
|
-
return this.#state.kind === "ready" ? this.#state.
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/** The SessionLspService, only available when state is "ready". */
|
|
119
|
-
get service(): SessionLspService | null {
|
|
120
|
-
return this.#state.kind === "ready" ? this.#state.service : null;
|
|
121
|
+
/** Workspace LSP operations, only available when state is "ready". */
|
|
122
|
+
get workspaceRuntime(): WorkspaceLspRuntime | null {
|
|
123
|
+
return this.#state.kind === "ready" ? this.#state.workspaceRuntime : null;
|
|
121
124
|
}
|
|
122
125
|
|
|
123
126
|
/** Project server info, only available when state is "ready". */
|
|
@@ -139,13 +142,13 @@ export class LspRuntimeController {
|
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
/** The WorkspaceRuntime registered for this session's cwd. */
|
|
142
|
-
get
|
|
143
|
-
return this.#
|
|
145
|
+
get capabilityRuntime(): WorkspaceRuntime | null {
|
|
146
|
+
return this.#capabilityRuntime;
|
|
144
147
|
}
|
|
145
148
|
|
|
146
|
-
/** Attach
|
|
149
|
+
/** Attach the capability broker used for semantic registration. */
|
|
147
150
|
setRuntime(runtime: WorkspaceRuntime): void {
|
|
148
|
-
this.#
|
|
151
|
+
this.#capabilityRuntime = runtime;
|
|
149
152
|
}
|
|
150
153
|
|
|
151
154
|
/**
|
|
@@ -161,10 +164,12 @@ export class LspRuntimeController {
|
|
|
161
164
|
* Returns the start result and updates the controller's state.
|
|
162
165
|
*/
|
|
163
166
|
async start(): Promise<LspStartResult> {
|
|
167
|
+
const generation = ++this.#readinessGeneration;
|
|
164
168
|
clearTsconfigCache();
|
|
165
169
|
|
|
166
170
|
// Restart safety: shut down any existing session before creating a new one
|
|
167
171
|
await this.cleanupExistingSession();
|
|
172
|
+
if (generation !== this.#readinessGeneration) return supersededStartResult();
|
|
168
173
|
|
|
169
174
|
const lspSettings = loadLspSettings(this.#cwd);
|
|
170
175
|
// Note: lspSettings.enabled is ignored — the global switch is deprecated.
|
|
@@ -175,9 +180,9 @@ export class LspRuntimeController {
|
|
|
175
180
|
const config = loadConfig(this.#cwd);
|
|
176
181
|
|
|
177
182
|
try {
|
|
178
|
-
return await this.initializeLspSession(config, lspSettings);
|
|
183
|
+
return await this.initializeLspSession(config, lspSettings, generation);
|
|
179
184
|
} catch (error: unknown) {
|
|
180
|
-
return this.setUnavailable(error);
|
|
185
|
+
return this.setUnavailable(error, generation);
|
|
181
186
|
}
|
|
182
187
|
}
|
|
183
188
|
|
|
@@ -185,18 +190,28 @@ export class LspRuntimeController {
|
|
|
185
190
|
* Shut down any existing LSP session before starting a new one.
|
|
186
191
|
*/
|
|
187
192
|
private async cleanupExistingSession(): Promise<void> {
|
|
188
|
-
this.#readinessGeneration++;
|
|
189
193
|
if (this.#state.kind !== "ready") return;
|
|
190
|
-
await this.#state.
|
|
191
|
-
if (this.#
|
|
192
|
-
|
|
194
|
+
await this.#state.runtimeOwner.shutdown();
|
|
195
|
+
if (this.#capabilityRuntime) unregisterLspCapabilities(this.#capabilityRuntime, this.#cwd);
|
|
196
|
+
clearWorkspaceLspRuntime(this.#cwd);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/** Publish an explicit disabled state when no language-server routes remain enabled. */
|
|
200
|
+
private setDisabled(generation: number): LspStartResult {
|
|
201
|
+
if (generation !== this.#readinessGeneration) return supersededStartResult();
|
|
202
|
+
const message = "All language servers are disabled by configuration.";
|
|
203
|
+
if (this.#capabilityRuntime) unregisterLspCapabilities(this.#capabilityRuntime, this.#cwd);
|
|
204
|
+
this.#state = { kind: "disabled", message };
|
|
205
|
+
setWorkspaceLspRuntimeState(this.#cwd, { kind: "disabled" });
|
|
206
|
+
return { kind: "disabled", message };
|
|
193
207
|
}
|
|
194
208
|
|
|
195
209
|
/** Set controller state to unavailable with the given error. */
|
|
196
|
-
private setUnavailable(error: unknown): LspStartResult {
|
|
210
|
+
private setUnavailable(error: unknown, generation: number): LspStartResult {
|
|
211
|
+
if (generation !== this.#readinessGeneration) return supersededStartResult();
|
|
197
212
|
const reason = error instanceof Error ? error.message : String(error);
|
|
198
213
|
this.#state = { kind: "unavailable", reason };
|
|
199
|
-
|
|
214
|
+
setWorkspaceLspRuntimeState(this.#cwd, { kind: "unavailable", reason });
|
|
200
215
|
return { kind: "unavailable", reason };
|
|
201
216
|
}
|
|
202
217
|
|
|
@@ -207,83 +222,80 @@ export class LspRuntimeController {
|
|
|
207
222
|
private async initializeLspSession(
|
|
208
223
|
config: LspConfig,
|
|
209
224
|
settings: LspSettings,
|
|
225
|
+
generation: number,
|
|
210
226
|
): Promise<LspStartResult> {
|
|
211
|
-
|
|
227
|
+
if (generation !== this.#readinessGeneration) return supersededStartResult();
|
|
228
|
+
clearWorkspaceLspRuntime(this.#cwd);
|
|
229
|
+
if (Object.keys(config.servers).length === 0) return this.setDisabled(generation);
|
|
212
230
|
this.#state = { kind: "pending" };
|
|
213
231
|
|
|
214
232
|
const manager = new LspManager(config, this.#cwd);
|
|
215
233
|
manager.setExcludePatterns(settings.exclude);
|
|
216
|
-
|
|
234
|
+
setWorkspaceLspRuntimeState(this.#cwd, { kind: "pending" });
|
|
217
235
|
|
|
218
236
|
const detectedServers = scanProjectCapabilities(config, this.#cwd);
|
|
219
237
|
manager.registerDetectedServers(detectedServers);
|
|
220
238
|
await startDetectedServers(manager, detectedServers);
|
|
239
|
+
if (generation !== this.#readinessGeneration) {
|
|
240
|
+
await manager.shutdownAll();
|
|
241
|
+
return supersededStartResult();
|
|
242
|
+
}
|
|
221
243
|
|
|
222
244
|
scanWorkspaceSentinels(this.#cwd);
|
|
223
245
|
|
|
224
|
-
const
|
|
225
|
-
|
|
246
|
+
const runtimeOwner = createWorkspaceLspRuntimeOwner(manager);
|
|
247
|
+
const workspaceRuntime = runtimeOwner.runtime;
|
|
248
|
+
setWorkspaceLspRuntimeState(this.#cwd, { kind: "ready", runtime: workspaceRuntime });
|
|
226
249
|
|
|
227
|
-
if (this.#
|
|
228
|
-
registerPendingLspCapabilities(this.#
|
|
250
|
+
if (this.#capabilityRuntime) {
|
|
251
|
+
registerPendingLspCapabilities(this.#capabilityRuntime, this.#cwd, workspaceRuntime);
|
|
229
252
|
}
|
|
230
253
|
|
|
231
|
-
const projectServers =
|
|
254
|
+
const projectServers = workspaceRuntime.getProjectServers();
|
|
232
255
|
|
|
233
256
|
this.#state = {
|
|
234
257
|
kind: "ready",
|
|
235
|
-
|
|
236
|
-
|
|
258
|
+
runtimeOwner,
|
|
259
|
+
workspaceRuntime,
|
|
237
260
|
projectServers,
|
|
238
261
|
detectedServers,
|
|
239
262
|
settings,
|
|
240
263
|
};
|
|
241
264
|
|
|
242
|
-
|
|
243
|
-
void this.promoteSemanticReadiness(manager, detectedServers, readinessGeneration);
|
|
265
|
+
void this.promoteSemanticReadiness(workspaceRuntime, generation);
|
|
244
266
|
|
|
245
|
-
return { kind: "ready",
|
|
267
|
+
return { kind: "ready", runtime: workspaceRuntime };
|
|
246
268
|
}
|
|
247
269
|
|
|
248
270
|
private async promoteSemanticReadiness(
|
|
249
|
-
|
|
250
|
-
detectedServers: DetectedProjectServer[],
|
|
271
|
+
workspaceRuntime: WorkspaceLspRuntime,
|
|
251
272
|
readinessGeneration: number,
|
|
252
273
|
): Promise<void> {
|
|
253
274
|
try {
|
|
254
|
-
await
|
|
275
|
+
const readiness = await workspaceRuntime.waitUntilReadyForWorkspace();
|
|
276
|
+
if (readiness.kind !== "ready") return;
|
|
255
277
|
} catch {
|
|
256
|
-
this.retractPendingCapabilities();
|
|
257
278
|
return;
|
|
258
279
|
}
|
|
259
280
|
|
|
260
|
-
if (
|
|
261
|
-
|
|
262
|
-
this.#state.kind !== "ready" ||
|
|
263
|
-
this.#state.manager !== manager
|
|
264
|
-
) {
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
281
|
+
if (!this.isCurrentRuntime(workspaceRuntime, readinessGeneration)) return;
|
|
282
|
+
if (this.#state.kind !== "ready") return;
|
|
267
283
|
|
|
268
|
-
this.#state.projectServers =
|
|
269
|
-
if (this.#
|
|
270
|
-
markLspCapabilitiesReady(this.#
|
|
284
|
+
this.#state.projectServers = workspaceRuntime.getProjectServers();
|
|
285
|
+
if (this.#capabilityRuntime) {
|
|
286
|
+
markLspCapabilitiesReady(this.#capabilityRuntime, this.#cwd);
|
|
271
287
|
}
|
|
272
288
|
}
|
|
273
289
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
setSessionLspServiceState(this.#cwd, {
|
|
284
|
-
kind: "unavailable",
|
|
285
|
-
reason: "LSP warm-up failed. Check code_health for server status.",
|
|
286
|
-
});
|
|
290
|
+
private isCurrentRuntime(
|
|
291
|
+
workspaceRuntime: WorkspaceLspRuntime,
|
|
292
|
+
readinessGeneration: number,
|
|
293
|
+
): boolean {
|
|
294
|
+
return (
|
|
295
|
+
readinessGeneration === this.#readinessGeneration &&
|
|
296
|
+
this.#state.kind === "ready" &&
|
|
297
|
+
this.#state.workspaceRuntime === workspaceRuntime
|
|
298
|
+
);
|
|
287
299
|
}
|
|
288
300
|
|
|
289
301
|
/**
|
|
@@ -296,16 +308,16 @@ export class LspRuntimeController {
|
|
|
296
308
|
this.#readinessGeneration++;
|
|
297
309
|
clearTsconfigCache();
|
|
298
310
|
|
|
299
|
-
if (this.#
|
|
300
|
-
unregisterLspCapabilities(this.#
|
|
311
|
+
if (this.#capabilityRuntime) {
|
|
312
|
+
unregisterLspCapabilities(this.#capabilityRuntime, this.#cwd);
|
|
301
313
|
}
|
|
302
314
|
|
|
303
315
|
if (this.#cwd) {
|
|
304
|
-
|
|
316
|
+
clearWorkspaceLspRuntime(this.#cwd);
|
|
305
317
|
}
|
|
306
318
|
|
|
307
319
|
if (this.#state.kind === "ready") {
|
|
308
|
-
await this.#state.
|
|
320
|
+
await this.#state.runtimeOwner.shutdown();
|
|
309
321
|
}
|
|
310
322
|
|
|
311
323
|
this.#state = { kind: "initial" };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* LSP-to-runtime capability registration.
|
|
3
3
|
*
|
|
4
|
-
* Adapts a
|
|
4
|
+
* Adapts a WorkspaceLspRuntime into the runtime's SemanticProvider interface
|
|
5
5
|
* and registers/unregisters it with the shared WorkspaceRuntime at session
|
|
6
6
|
* lifecycle boundaries.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { WorkspaceRuntime } from "@mrclrchtr/supi-code-runtime/api";
|
|
10
10
|
import { createLspSemanticProvider } from "../provider/lsp-semantic-provider.ts";
|
|
11
|
-
import type {
|
|
11
|
+
import type { WorkspaceLspRuntime } from "./runtime-registry.ts";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Register LSP capabilities for a workspace cwd in pending state.
|
|
@@ -20,7 +20,7 @@ import type { SessionLspService } from "./service-registry.ts";
|
|
|
20
20
|
export function registerPendingLspCapabilities(
|
|
21
21
|
runtime: WorkspaceRuntime,
|
|
22
22
|
cwd: string,
|
|
23
|
-
service:
|
|
23
|
+
service: WorkspaceLspRuntime,
|
|
24
24
|
): void {
|
|
25
25
|
const provider = createLspSemanticProvider(service);
|
|
26
26
|
runtime.registerSemanticPending(cwd, provider);
|
|
@@ -29,7 +29,7 @@ export function registerPendingLspCapabilities(
|
|
|
29
29
|
/**
|
|
30
30
|
* Register LSP capabilities for a workspace cwd as ready.
|
|
31
31
|
*
|
|
32
|
-
* Wraps
|
|
32
|
+
* Wraps WorkspaceLspRuntime into a SemanticProvider via the existing semantic
|
|
33
33
|
* adapter and publishes it into the shared workspace runtime so that
|
|
34
34
|
* code-intelligence and other consumers can discover semantic analysis
|
|
35
35
|
* availability.
|
|
@@ -37,7 +37,7 @@ export function registerPendingLspCapabilities(
|
|
|
37
37
|
export function registerLspCapabilities(
|
|
38
38
|
runtime: WorkspaceRuntime,
|
|
39
39
|
cwd: string,
|
|
40
|
-
service:
|
|
40
|
+
service: WorkspaceLspRuntime,
|
|
41
41
|
): void {
|
|
42
42
|
const provider = createLspSemanticProvider(service);
|
|
43
43
|
runtime.registerSemantic(cwd, provider);
|