@mrclrchtr/supi-code-intelligence 12.0.0 → 13.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 +17 -0
- package/README.md +4 -2
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- 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 +22 -3
- package/node_modules/@mrclrchtr/supi-core/src/retired-packages.ts +152 -0
- package/node_modules/@mrclrchtr/supi-core/src/session.ts +1 -0
- package/node_modules/@mrclrchtr/supi-core/src/shell-hints.ts +46 -0
- package/node_modules/@mrclrchtr/supi-core/src/spill.ts +93 -0
- 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-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 +22 -3
- 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 +1 -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/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 +15 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-request.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostics.ts +46 -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-semantic-input-barrier.ts +53 -4
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +11 -3
- 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 +14 -5
- package/node_modules/@mrclrchtr/supi-lsp/src/config/typescript-module.ts +17 -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-removal-ledger.ts +52 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +40 -20
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/typescript-file-local.ts +6 -1
- 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-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 +17 -2
- 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-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 +22 -3
- 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 +1 -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/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.json +1 -1
- 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/search/pattern.ts +3 -3
- package/src/analysis/target/anchored.ts +3 -6
- package/src/analysis/target/symbol.ts +41 -47
- package/src/analysis/target/types.ts +4 -9
- 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/diagnostics/coverage.ts +49 -0
- package/src/diagnostics/evidence.ts +10 -2
- 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-workflow.ts +4 -19
- package/src/session/target-workflow.ts +25 -18
- package/src/tool/code_find/result.ts +5 -7
- 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/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 +60 -8
- package/src/tool/code_health/result.ts +20 -9
- package/src/tool/code_health/structured-schema.ts +14 -0
- package/src/tool/code_health/structured.ts +7 -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/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 +43 -72
- package/src/tool/infra/truncate.ts +2 -16
- package/src/tool/result/candidate-selection.ts +141 -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 +2 -4
- 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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* global Uint8Array */
|
|
2
|
+
import { buildOptions } from './OptionsBuilder.js';
|
|
3
|
+
import OrderedObjParser from './OrderedObjParser.js';
|
|
4
|
+
import prettify from './node2json.js';
|
|
5
|
+
import { validate } from "../validator.js";
|
|
6
|
+
import XmlNode from './xmlNode.js';
|
|
7
|
+
|
|
8
|
+
export default class XMLParser {
|
|
9
|
+
|
|
10
|
+
constructor(options) {
|
|
11
|
+
this.externalEntities = {};
|
|
12
|
+
this.options = buildOptions(options);
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Parse XML dats to JS object
|
|
17
|
+
* @param {string|Uint8Array} xmlData
|
|
18
|
+
* @param {boolean|Object} validationOption
|
|
19
|
+
*/
|
|
20
|
+
parse(xmlData, validationOption) {
|
|
21
|
+
if (typeof xmlData !== "string" && xmlData.toString) {
|
|
22
|
+
if (xmlData instanceof Uint8Array &&
|
|
23
|
+
!(typeof Buffer !== "undefined" && Buffer.isBuffer(xmlData))) {
|
|
24
|
+
xmlData = new TextDecoder("utf-8", { ignoreBOM: true }).decode(xmlData);
|
|
25
|
+
} else {
|
|
26
|
+
xmlData = xmlData.toString();
|
|
27
|
+
}
|
|
28
|
+
} else if (typeof xmlData !== "string") {
|
|
29
|
+
throw new Error("XML data is accepted in String or Bytes[] form.")
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (validationOption) {
|
|
33
|
+
if (validationOption === true) validationOption = {}; //validate with default options
|
|
34
|
+
|
|
35
|
+
const result = validate(xmlData, validationOption);
|
|
36
|
+
if (result !== true) {
|
|
37
|
+
throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const orderedObjParser = new OrderedObjParser(this.options, this.externalEntities);
|
|
41
|
+
// orderedObjParser.entityDecoder.setExternalEntities(this.externalEntities);
|
|
42
|
+
const orderedResult = orderedObjParser.parseXml(xmlData);
|
|
43
|
+
if (this.options.preserveOrder || orderedResult === undefined) return orderedResult;
|
|
44
|
+
else return prettify(orderedResult, this.options, orderedObjParser.matcher, orderedObjParser.readonlyMatcher);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Add Entity which is not by default supported by this library
|
|
49
|
+
* @param {string} key
|
|
50
|
+
* @param {string} value
|
|
51
|
+
*/
|
|
52
|
+
addEntity(key, value) {
|
|
53
|
+
if (value.indexOf("&") !== -1) {
|
|
54
|
+
throw new Error("Entity value can't have '&'")
|
|
55
|
+
} else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) {
|
|
56
|
+
throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'")
|
|
57
|
+
} else if (value === "&") {
|
|
58
|
+
throw new Error("An entity with value '&' is not permitted");
|
|
59
|
+
} else {
|
|
60
|
+
this.externalEntities[key] = value;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Returns a Symbol that can be used to access the metadata
|
|
66
|
+
* property on a node.
|
|
67
|
+
*
|
|
68
|
+
* If Symbol is not available in the environment, an ordinary property is used
|
|
69
|
+
* and the name of the property is here returned.
|
|
70
|
+
*
|
|
71
|
+
* The XMLMetaData property is only present when `captureMetaData`
|
|
72
|
+
* is true in the options.
|
|
73
|
+
*/
|
|
74
|
+
static getMetaDataSymbol() {
|
|
75
|
+
return XmlNode.getMetaDataSymbol();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import XmlNode from './xmlNode.js';
|
|
4
|
+
import { Matcher } from 'path-expression-matcher';
|
|
5
|
+
|
|
6
|
+
const METADATA_SYMBOL = XmlNode.getMetaDataSymbol();
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Helper function to strip attribute prefix from attribute map
|
|
10
|
+
* @param {object} attrs - Attributes with prefix (e.g., {"@_class": "code"})
|
|
11
|
+
* @param {string} prefix - Attribute prefix to remove (e.g., "@_")
|
|
12
|
+
* @returns {object} Attributes without prefix (e.g., {"class": "code"})
|
|
13
|
+
*/
|
|
14
|
+
function stripAttributePrefix(attrs, prefix) {
|
|
15
|
+
if (!attrs || typeof attrs !== 'object') return {};
|
|
16
|
+
if (!prefix) return attrs;
|
|
17
|
+
|
|
18
|
+
const rawAttrs = {};
|
|
19
|
+
for (const key in attrs) {
|
|
20
|
+
if (key.startsWith(prefix)) {
|
|
21
|
+
const rawName = key.substring(prefix.length);
|
|
22
|
+
rawAttrs[rawName] = attrs[key];
|
|
23
|
+
} else {
|
|
24
|
+
// Attribute without prefix (shouldn't normally happen, but be safe)
|
|
25
|
+
rawAttrs[key] = attrs[key];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return rawAttrs;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @param {array} node
|
|
34
|
+
* @param {any} options
|
|
35
|
+
* @param {Matcher} matcher - Path matcher instance
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
export default function prettify(node, options, matcher, readonlyMatcher) {
|
|
39
|
+
return compress(node, options, matcher, readonlyMatcher);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @param {array} arr
|
|
44
|
+
* @param {object} options
|
|
45
|
+
* @param {Matcher} matcher - Path matcher instance
|
|
46
|
+
* @returns object
|
|
47
|
+
*/
|
|
48
|
+
function compress(arr, options, matcher, readonlyMatcher) {
|
|
49
|
+
let text;
|
|
50
|
+
const compressedObj = {}; //This is intended to be a plain object
|
|
51
|
+
for (let i = 0; i < arr.length; i++) {
|
|
52
|
+
const tagObj = arr[i];
|
|
53
|
+
const property = propName(tagObj);
|
|
54
|
+
|
|
55
|
+
// Push current property to matcher WITH RAW ATTRIBUTES (no prefix)
|
|
56
|
+
if (property !== undefined && property !== options.textNodeName) {
|
|
57
|
+
const rawAttrs = stripAttributePrefix(
|
|
58
|
+
tagObj[":@"] || {},
|
|
59
|
+
options.attributeNamePrefix
|
|
60
|
+
);
|
|
61
|
+
matcher.push(property, rawAttrs);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (property === options.textNodeName) {
|
|
65
|
+
if (text === undefined) text = tagObj[property];
|
|
66
|
+
else text += "" + tagObj[property];
|
|
67
|
+
} else if (property === undefined) {
|
|
68
|
+
continue;
|
|
69
|
+
} else if (tagObj[property]) {
|
|
70
|
+
|
|
71
|
+
let val = compress(tagObj[property], options, matcher, readonlyMatcher);
|
|
72
|
+
const isLeaf = isLeafTag(val, options);
|
|
73
|
+
|
|
74
|
+
if (Object.keys(val).length === 0 && options.alwaysCreateTextNode) {
|
|
75
|
+
val[options.textNodeName] = "";
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (tagObj[":@"]) {
|
|
79
|
+
assignAttributes(val, tagObj[":@"], readonlyMatcher, options);
|
|
80
|
+
} else if (Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode) {
|
|
81
|
+
val = val[options.textNodeName];
|
|
82
|
+
} else if (Object.keys(val).length === 0) {
|
|
83
|
+
if (options.alwaysCreateTextNode) val[options.textNodeName] = "";
|
|
84
|
+
else val = "";
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (tagObj[METADATA_SYMBOL] !== undefined && typeof val === "object" && val !== null) {
|
|
88
|
+
val[METADATA_SYMBOL] = tagObj[METADATA_SYMBOL]; // copy over metadata
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
if (compressedObj[property] !== undefined && Object.prototype.hasOwnProperty.call(compressedObj, property)) {
|
|
93
|
+
if (!Array.isArray(compressedObj[property])) {
|
|
94
|
+
compressedObj[property] = [compressedObj[property]];
|
|
95
|
+
}
|
|
96
|
+
compressedObj[property].push(val);
|
|
97
|
+
} else {
|
|
98
|
+
//TODO: if a node is not an array, then check if it should be an array
|
|
99
|
+
//also determine if it is a leaf node
|
|
100
|
+
|
|
101
|
+
// Pass jPath string or readonlyMatcher based on options.jPath setting
|
|
102
|
+
const jPathOrMatcher = options.jPath ? readonlyMatcher.toString() : readonlyMatcher;
|
|
103
|
+
if (options.isArray(property, jPathOrMatcher, isLeaf)) {
|
|
104
|
+
compressedObj[property] = [val];
|
|
105
|
+
} else {
|
|
106
|
+
compressedObj[property] = val;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Pop property from matcher after processing
|
|
111
|
+
if (property !== undefined && property !== options.textNodeName) {
|
|
112
|
+
matcher.pop();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
// if(text && text.length > 0) compressedObj[options.textNodeName] = text;
|
|
118
|
+
if (typeof text === "string") {
|
|
119
|
+
if (text.length > 0) compressedObj[options.textNodeName] = text;
|
|
120
|
+
} else if (text !== undefined) compressedObj[options.textNodeName] = text;
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
return compressedObj;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function propName(obj) {
|
|
127
|
+
const keys = Object.keys(obj);
|
|
128
|
+
for (let i = 0; i < keys.length; i++) {
|
|
129
|
+
const key = keys[i];
|
|
130
|
+
if (key !== ":@") return key;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function assignAttributes(obj, attrMap, readonlyMatcher, options) {
|
|
135
|
+
if (attrMap) {
|
|
136
|
+
const keys = Object.keys(attrMap);
|
|
137
|
+
const len = keys.length; //don't make it inline
|
|
138
|
+
for (let i = 0; i < len; i++) {
|
|
139
|
+
const atrrName = keys[i]; // This is the PREFIXED name (e.g., "@_class")
|
|
140
|
+
|
|
141
|
+
// Strip prefix for matcher path (for isArray callback)
|
|
142
|
+
const rawAttrName = atrrName.startsWith(options.attributeNamePrefix)
|
|
143
|
+
? atrrName.substring(options.attributeNamePrefix.length)
|
|
144
|
+
: atrrName;
|
|
145
|
+
|
|
146
|
+
// For attributes, we need to create a temporary path
|
|
147
|
+
// Pass jPath string or matcher based on options.jPath setting
|
|
148
|
+
const jPathOrMatcher = options.jPath
|
|
149
|
+
? readonlyMatcher.toString() + "." + rawAttrName
|
|
150
|
+
: readonlyMatcher;
|
|
151
|
+
|
|
152
|
+
if (options.isArray(atrrName, jPathOrMatcher, true, true)) {
|
|
153
|
+
obj[atrrName] = [attrMap[atrrName]];
|
|
154
|
+
} else {
|
|
155
|
+
obj[atrrName] = attrMap[atrrName];
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function isLeafTag(obj, options) {
|
|
162
|
+
const { textNodeName } = options;
|
|
163
|
+
const propCount = Object.keys(obj).length;
|
|
164
|
+
|
|
165
|
+
if (propCount === 0) {
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (
|
|
170
|
+
propCount === 1 &&
|
|
171
|
+
(obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)
|
|
172
|
+
) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
let METADATA_SYMBOL;
|
|
4
|
+
|
|
5
|
+
if (typeof Symbol !== "function") {
|
|
6
|
+
METADATA_SYMBOL = "@@xmlMetadata";
|
|
7
|
+
} else {
|
|
8
|
+
METADATA_SYMBOL = Symbol("XML Node Metadata");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default class XmlNode {
|
|
12
|
+
constructor(tagname) {
|
|
13
|
+
this.tagname = tagname;
|
|
14
|
+
this.child = []; //nested tags, text, cdata, comments in order
|
|
15
|
+
this[":@"] = Object.create(null); //attributes map
|
|
16
|
+
}
|
|
17
|
+
add(key, val) {
|
|
18
|
+
// this.child.push( {name : key, val: val, isCdata: isCdata });
|
|
19
|
+
if (key === "__proto__") key = "#__proto__";
|
|
20
|
+
this.child.push({ [key]: val });
|
|
21
|
+
}
|
|
22
|
+
addChild(node, startIndex) {
|
|
23
|
+
if (node.tagname === "__proto__") node.tagname = "#__proto__";
|
|
24
|
+
if (node[":@"] && Object.keys(node[":@"]).length > 0) {
|
|
25
|
+
this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] });
|
|
26
|
+
} else {
|
|
27
|
+
this.child.push({ [node.tagname]: node.child });
|
|
28
|
+
}
|
|
29
|
+
// if requested, add the startIndex
|
|
30
|
+
this.addStartIndex(startIndex);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
addStartIndex(startIndex) {
|
|
34
|
+
if (startIndex !== undefined) {
|
|
35
|
+
// Note: for now we just overwrite the metadata. If we had more complex metadata,
|
|
36
|
+
// we might need to do an object append here: metadata = { ...metadata, startIndex }
|
|
37
|
+
this.child[this.child.length - 1][METADATA_SYMBOL] = { startIndex };
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
addEndIndex(endIndex) {
|
|
42
|
+
const lastChild = this.child[this.child.length - 1];
|
|
43
|
+
// endIndex is write-once: when updateTag drops a node, the last child is a
|
|
44
|
+
// previously completed sibling whose endIndex must not be overwritten
|
|
45
|
+
if (lastChild !== undefined && lastChild[METADATA_SYMBOL] !== undefined
|
|
46
|
+
&& lastChild[METADATA_SYMBOL].endIndex === undefined) {
|
|
47
|
+
lastChild[METADATA_SYMBOL].endIndex = endIndex;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** symbol used for metadata */
|
|
51
|
+
static getMetaDataSymbol() {
|
|
52
|
+
return METADATA_SYMBOL;
|
|
53
|
+
}
|
|
54
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrclrchtr/supi-code-intelligence",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "LSP and AST navigation, search, diagnostics, and refactoring",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -40,19 +40,21 @@
|
|
|
40
40
|
"gradle-helper/README.md"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"@mrclrchtr/supi-
|
|
48
|
-
"@mrclrchtr/supi-
|
|
49
|
-
"@mrclrchtr/supi-
|
|
43
|
+
"fast-xml-parser": "5.12.0",
|
|
44
|
+
"ignore": "7.0.14",
|
|
45
|
+
"smol-toml": "1.9.1",
|
|
46
|
+
"yaml": "2.9.1",
|
|
47
|
+
"@mrclrchtr/supi-code-runtime": "13.0.0",
|
|
48
|
+
"@mrclrchtr/supi-lsp": "13.0.0",
|
|
49
|
+
"@mrclrchtr/supi-tree-sitter": "13.0.0",
|
|
50
|
+
"@mrclrchtr/supi-core": "13.0.0"
|
|
50
51
|
},
|
|
51
52
|
"bundledDependencies": [
|
|
52
53
|
"@mrclrchtr/supi-code-runtime",
|
|
53
54
|
"@mrclrchtr/supi-core",
|
|
54
55
|
"@mrclrchtr/supi-lsp",
|
|
55
56
|
"@mrclrchtr/supi-tree-sitter",
|
|
57
|
+
"fast-xml-parser",
|
|
56
58
|
"ignore",
|
|
57
59
|
"smol-toml",
|
|
58
60
|
"yaml"
|