@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.
Files changed (307) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +7 -5
  3. package/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
  4. package/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +10 -0
  5. package/node_modules/@mrclrchtr/supi-core/package.json +3 -1
  6. package/node_modules/@mrclrchtr/supi-core/src/api.ts +4 -0
  7. package/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +1 -1
  8. package/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +78 -13
  9. package/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +41 -9
  10. package/node_modules/@mrclrchtr/supi-core/src/retired-packages.ts +152 -0
  11. package/node_modules/@mrclrchtr/supi-core/src/session.ts +3 -0
  12. package/node_modules/@mrclrchtr/supi-core/src/shell-hints.ts +46 -0
  13. package/node_modules/@mrclrchtr/supi-core/src/side-run.ts +46 -0
  14. package/node_modules/@mrclrchtr/supi-core/src/spill.ts +93 -0
  15. package/node_modules/@mrclrchtr/supi-lsp/README.md +6 -2
  16. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
  17. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +10 -0
  18. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +3 -1
  19. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/api.ts +4 -0
  20. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +1 -1
  21. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +78 -13
  22. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +41 -9
  23. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/retired-packages.ts +152 -0
  24. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/session.ts +3 -0
  25. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/shell-hints.ts +46 -0
  26. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/side-run.ts +46 -0
  27. package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/spill.ts +93 -0
  28. package/node_modules/@mrclrchtr/supi-lsp/package.json +8 -8
  29. package/node_modules/@mrclrchtr/supi-lsp/src/api.ts +1 -0
  30. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-cache.ts +102 -47
  31. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-host.ts +8 -0
  32. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-refresh.ts +20 -1
  33. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-request.ts +4 -1
  34. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-timing.ts +14 -1
  35. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-typescript.ts +8 -1
  36. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostics.ts +50 -4
  37. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-disk-stamp.ts +60 -0
  38. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-document-state.ts +3 -0
  39. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-document-sync.ts +21 -1
  40. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-file-state.ts +17 -3
  41. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-input-admission.ts +7 -1
  42. package/node_modules/@mrclrchtr/supi-lsp/src/client/client-semantic-input-barrier.ts +53 -4
  43. package/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +12 -3
  44. package/node_modules/@mrclrchtr/supi-lsp/src/client/transport.ts +24 -8
  45. package/node_modules/@mrclrchtr/supi-lsp/src/config/server-config.ts +5 -0
  46. package/node_modules/@mrclrchtr/supi-lsp/src/config/tsconfig-extends.ts +2 -1
  47. package/node_modules/@mrclrchtr/supi-lsp/src/config/tsconfig-path.ts +2 -2
  48. package/node_modules/@mrclrchtr/supi-lsp/src/config/tsconfig-scope.ts +17 -5
  49. package/node_modules/@mrclrchtr/supi-lsp/src/config/typescript-module.ts +17 -0
  50. package/node_modules/@mrclrchtr/supi-lsp/src/debug-telemetry.ts +64 -0
  51. package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/evidence.ts +42 -0
  52. package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-client-state.ts +2 -17
  53. package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-project-info.ts +3 -0
  54. package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-removal-ledger.ts +52 -0
  55. package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-typescript-coverage.ts +27 -2
  56. package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-symbol.ts +16 -112
  57. package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +561 -103
  58. package/node_modules/@mrclrchtr/supi-lsp/src/manager/typescript-file-local.ts +6 -1
  59. package/node_modules/@mrclrchtr/supi-lsp/src/manager/workspace-symbol-collection.ts +163 -0
  60. package/node_modules/@mrclrchtr/supi-lsp/src/manager/workspace-symbol-row-limit.ts +72 -0
  61. package/node_modules/@mrclrchtr/supi-lsp/src/provider/lsp-semantic-provider.ts +6 -1
  62. package/node_modules/@mrclrchtr/supi-lsp/src/provider/semantic-symbol-mapper.ts +13 -3
  63. package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-controller.ts +11 -0
  64. package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-diagnostic-surface.ts +11 -0
  65. package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-diagnostics.ts +1 -0
  66. package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registry.ts +53 -9
  67. package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-transition-debug.ts +11 -1
  68. package/node_modules/@mrclrchtr/supi-lsp/src/session/workspace-lsp-runtime.ts +2 -0
  69. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
  70. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +10 -0
  71. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +3 -1
  72. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/api.ts +4 -0
  73. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/context/context-tag.ts +1 -1
  74. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +78 -13
  75. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/footer-registry.ts +41 -9
  76. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/retired-packages.ts +152 -0
  77. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/session.ts +3 -0
  78. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/shell-hints.ts +46 -0
  79. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/side-run.ts +46 -0
  80. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/spill.ts +93 -0
  81. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.cjs +50 -75
  82. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.cjs.map +2 -2
  83. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.js +50 -75
  84. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.js.map +2 -2
  85. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.wasm +0 -0
  86. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.wasm.map +6 -6
  87. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/package.json +1 -1
  88. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.cjs +50 -75
  89. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.cjs.map +2 -2
  90. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.cts +7 -7
  91. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.cts.map +1 -1
  92. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.ts +7 -7
  93. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.ts.map +1 -1
  94. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.js +50 -75
  95. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.js.map +2 -2
  96. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.wasm +0 -0
  97. package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.wasm.map +5 -5
  98. package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +5 -5
  99. package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/kotlin/tree-sitter-kotlin.wasm.json +1 -1
  100. package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/latex/tree-sitter-latex.wasm.json +1 -1
  101. package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/sql/tree-sitter-sql.wasm +0 -0
  102. package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/sql/tree-sitter-sql.wasm.json +3 -3
  103. package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm.json +1 -1
  104. package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm.json +1 -1
  105. package/node_modules/@mrclrchtr/supi-tree-sitter/src/session/structural-worker-client.ts +1 -1
  106. package/node_modules/fast-xml-parser/CHANGELOG.md +886 -0
  107. package/node_modules/fast-xml-parser/LICENSE +21 -0
  108. package/node_modules/fast-xml-parser/README.md +204 -0
  109. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +2 -0
  110. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -0
  111. package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
  112. package/node_modules/fast-xml-parser/lib/fxp.d.cts +774 -0
  113. package/node_modules/fast-xml-parser/lib/fxp.min.js +2 -0
  114. package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -0
  115. package/node_modules/fast-xml-parser/lib/fxparser.min.js +2 -0
  116. package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -0
  117. package/node_modules/fast-xml-parser/lib/fxvalidator.min.js +2 -0
  118. package/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -0
  119. package/node_modules/fast-xml-parser/node_modules/@nodable/entities/README.md +92 -0
  120. package/node_modules/fast-xml-parser/node_modules/@nodable/entities/package.json +57 -0
  121. package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/EntityDecoder.js +644 -0
  122. package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/EntityEncoder.js +239 -0
  123. package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/all-entities.js +53 -0
  124. package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/entities.js +1139 -0
  125. package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/entityTries.js +60 -0
  126. package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/index.d.ts +358 -0
  127. package/node_modules/fast-xml-parser/node_modules/@nodable/entities/src/index.js +29 -0
  128. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/CHANGELOG.md +52 -0
  129. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/LICENSE +21 -0
  130. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/README.md +77 -0
  131. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/lib/fxb.cjs +1 -0
  132. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/lib/fxb.d.cts +270 -0
  133. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/lib/fxb.min.js +2 -0
  134. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -0
  135. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/package.json +77 -0
  136. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/fxb.d.ts +270 -0
  137. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/fxb.js +609 -0
  138. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/ignoreAttributes.js +18 -0
  139. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/orderedJs2Xml.js +360 -0
  140. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/prettifyJs2Xml.js +0 -0
  141. package/node_modules/fast-xml-parser/node_modules/fast-xml-builder/src/util.js +23 -0
  142. package/node_modules/fast-xml-parser/node_modules/is-unsafe/LICENSE +21 -0
  143. package/node_modules/fast-xml-parser/node_modules/is-unsafe/README.md +632 -0
  144. package/node_modules/fast-xml-parser/node_modules/is-unsafe/package.json +56 -0
  145. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/html.js +102 -0
  146. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/log.js +98 -0
  147. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/nosql.js +114 -0
  148. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/redos.js +60 -0
  149. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/shell.js +105 -0
  150. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/sql-strict.js +47 -0
  151. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/sql.js +95 -0
  152. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/svg.js +81 -0
  153. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/contexts/xml.js +79 -0
  154. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/index.cjs +27 -0
  155. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/index.d.ts +103 -0
  156. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/index.js +292 -0
  157. package/node_modules/fast-xml-parser/node_modules/is-unsafe/src/util/decode-entities.js +48 -0
  158. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/LICENSE +21 -0
  159. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/README.md +947 -0
  160. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/lib/pem.cjs +1 -0
  161. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/lib/pem.d.cts +725 -0
  162. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/lib/pem.min.js +2 -0
  163. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/lib/pem.min.js.map +1 -0
  164. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/package.json +79 -0
  165. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/src/Expression.js +232 -0
  166. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/src/ExpressionSet.js +225 -0
  167. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/src/Matcher.js +663 -0
  168. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/src/index.d.ts +589 -0
  169. package/node_modules/fast-xml-parser/node_modules/path-expression-matcher/src/index.js +30 -0
  170. package/node_modules/fast-xml-parser/node_modules/strnum/CHANGELOG.md +63 -0
  171. package/node_modules/fast-xml-parser/node_modules/strnum/LICENSE +21 -0
  172. package/node_modules/fast-xml-parser/node_modules/strnum/README.md +113 -0
  173. package/node_modules/fast-xml-parser/node_modules/strnum/node_modules/anynum/LICENSE +21 -0
  174. package/node_modules/fast-xml-parser/node_modules/strnum/node_modules/anynum/README.md +142 -0
  175. package/node_modules/fast-xml-parser/node_modules/strnum/node_modules/anynum/anynum.js +135 -0
  176. package/node_modules/fast-xml-parser/node_modules/strnum/node_modules/anynum/digitTable.js +116 -0
  177. package/node_modules/fast-xml-parser/node_modules/strnum/node_modules/anynum/package.json +42 -0
  178. package/node_modules/fast-xml-parser/node_modules/strnum/package.json +36 -0
  179. package/node_modules/fast-xml-parser/node_modules/strnum/strnum.js +176 -0
  180. package/node_modules/fast-xml-parser/node_modules/xml-naming/LICENSE +21 -0
  181. package/node_modules/fast-xml-parser/node_modules/xml-naming/README.md +287 -0
  182. package/node_modules/fast-xml-parser/node_modules/xml-naming/package.json +56 -0
  183. package/node_modules/fast-xml-parser/node_modules/xml-naming/src/index.d.ts +108 -0
  184. package/node_modules/fast-xml-parser/node_modules/xml-naming/src/index.js +382 -0
  185. package/node_modules/fast-xml-parser/package.json +93 -0
  186. package/node_modules/fast-xml-parser/src/cli/cli.js +97 -0
  187. package/node_modules/fast-xml-parser/src/cli/man.js +17 -0
  188. package/node_modules/fast-xml-parser/src/cli/read.js +43 -0
  189. package/node_modules/fast-xml-parser/src/fxp.d.ts +754 -0
  190. package/node_modules/fast-xml-parser/src/fxp.js +14 -0
  191. package/node_modules/fast-xml-parser/src/ignoreAttributes.js +18 -0
  192. package/node_modules/fast-xml-parser/src/util.js +61 -0
  193. package/node_modules/fast-xml-parser/src/v6/CharsSymbol.js +16 -0
  194. package/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +106 -0
  195. package/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +61 -0
  196. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +69 -0
  197. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +103 -0
  198. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +100 -0
  199. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +154 -0
  200. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +94 -0
  201. package/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
  202. package/node_modules/fast-xml-parser/src/v6/TagPath.js +81 -0
  203. package/node_modules/fast-xml-parser/src/v6/TagPathMatcher.js +13 -0
  204. package/node_modules/fast-xml-parser/src/v6/XMLParser.js +83 -0
  205. package/node_modules/fast-xml-parser/src/v6/Xml2JsParser.js +235 -0
  206. package/node_modules/fast-xml-parser/src/v6/XmlPartReader.js +210 -0
  207. package/node_modules/fast-xml-parser/src/v6/XmlSpecialTagsReader.js +111 -0
  208. package/node_modules/fast-xml-parser/src/v6/inputSource/BufferSource.js +116 -0
  209. package/node_modules/fast-xml-parser/src/v6/inputSource/StringSource.js +121 -0
  210. package/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +105 -0
  211. package/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParser.js +22 -0
  212. package/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParserExt.js +19 -0
  213. package/node_modules/fast-xml-parser/src/v6/valueParsers/currency.js +38 -0
  214. package/node_modules/fast-xml-parser/src/v6/valueParsers/join.js +13 -0
  215. package/node_modules/fast-xml-parser/src/v6/valueParsers/number.js +14 -0
  216. package/node_modules/fast-xml-parser/src/v6/valueParsers/trim.js +6 -0
  217. package/node_modules/fast-xml-parser/src/validator.js +518 -0
  218. package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +6 -0
  219. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +426 -0
  220. package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +164 -0
  221. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +907 -0
  222. package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +77 -0
  223. package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +177 -0
  224. package/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +54 -0
  225. package/package.json +10 -8
  226. package/src/analysis/evidence.ts +331 -73
  227. package/src/analysis/health/diagnostics.ts +66 -18
  228. package/src/analysis/health/evidence-reason.ts +44 -0
  229. package/src/analysis/health/server-status.ts +32 -9
  230. package/src/analysis/health/signals.ts +1 -0
  231. package/src/analysis/instruction-files.ts +11 -7
  232. package/src/analysis/search/exclusions.ts +18 -4
  233. package/src/analysis/search/pattern.ts +3 -3
  234. package/src/analysis/target/anchored.ts +3 -6
  235. package/src/analysis/target/file-outline-omissions.ts +17 -2
  236. package/src/analysis/target/symbol-selection.ts +100 -0
  237. package/src/analysis/target/symbol.ts +83 -49
  238. package/src/analysis/target/types.ts +12 -10
  239. package/src/analysis/workspace/cmake-parser.ts +207 -0
  240. package/src/analysis/workspace/cmake.ts +141 -0
  241. package/src/analysis/workspace/maven.ts +310 -0
  242. package/src/analysis/workspace/membership.ts +100 -26
  243. package/src/analysis/workspace/metadata.ts +6 -1
  244. package/src/analysis/workspace/observe.ts +6 -0
  245. package/src/analysis/workspace/types.ts +11 -3
  246. package/src/app/app.ts +37 -21
  247. package/src/diagnostics/coverage.ts +49 -0
  248. package/src/diagnostics/evidence.ts +10 -2
  249. package/src/extension.ts +1 -2
  250. package/src/headless.ts +4 -2
  251. package/src/session/health-types.ts +2 -0
  252. package/src/session/health-workflow.ts +6 -0
  253. package/src/session/input/common.ts +1 -1
  254. package/src/session/orientation/collect.ts +42 -7
  255. package/src/session/orientation/context-facts.ts +3 -3
  256. package/src/session/orientation/context-sections.ts +13 -15
  257. package/src/session/orientation/facts.ts +5 -8
  258. package/src/session/orientation-types.ts +5 -0
  259. package/src/session/orientation-workflow.ts +12 -17
  260. package/src/session/target-workflow.ts +38 -25
  261. package/src/tool/code_find/render.ts +10 -11
  262. package/src/tool/code_find/result.ts +11 -8
  263. package/src/tool/code_graph/display.ts +5 -6
  264. package/src/tool/code_graph/format.ts +8 -24
  265. package/src/tool/code_graph/result.ts +16 -75
  266. package/src/tool/code_graph/section.ts +21 -33
  267. package/src/tool/code_graph/structured.ts +3 -0
  268. package/src/tool/code_graph/tui.ts +10 -5
  269. package/src/tool/code_health/diagnostic-tui.ts +49 -0
  270. package/src/tool/code_health/guidance.ts +27 -0
  271. package/src/tool/code_health/markdown.ts +63 -9
  272. package/src/tool/code_health/result.ts +20 -9
  273. package/src/tool/code_health/structured-schema.ts +15 -0
  274. package/src/tool/code_health/structured.ts +9 -1
  275. package/src/tool/code_health/tui.ts +33 -40
  276. package/src/tool/code_inspect/result.ts +23 -18
  277. package/src/tool/code_inspect/structured.ts +2 -19
  278. package/src/tool/code_orientation/markdown.ts +6 -1
  279. package/src/tool/code_orientation/result.ts +53 -100
  280. package/src/tool/code_orientation/structured-schema.ts +16 -12
  281. package/src/tool/code_orientation/structured-workspace.ts +13 -7
  282. package/src/tool/code_orientation/structured.ts +31 -39
  283. package/src/tool/code_orientation/workspace-format.ts +4 -10
  284. package/src/tool/code_orientation/workspace-instructions.ts +4 -5
  285. package/src/tool/code_orientation/workspace-observations.ts +2 -2
  286. package/src/tool/code_orientation/workspace-output.ts +16 -7
  287. package/src/tool/code_orientation/workspace-projects.ts +7 -10
  288. package/src/tool/code_orientation/workspace-sections.ts +13 -19
  289. package/src/tool/code_resolve/markdown.ts +4 -46
  290. package/src/tool/code_resolve/result.ts +45 -73
  291. package/src/tool/code_resolve/structured.ts +6 -1
  292. package/src/tool/infra/truncate.ts +2 -16
  293. package/src/tool/result/candidate-selection.ts +157 -0
  294. package/src/tool/result/display.ts +41 -45
  295. package/src/tool/result/errors.ts +1 -0
  296. package/src/tool/result/model-budget.ts +26 -1
  297. package/src/tool/result/refactor.ts +11 -8
  298. package/src/tool/result/structured.ts +2 -1
  299. package/src/tool/result/types.ts +9 -8
  300. package/src/tool/schemas.ts +15 -20
  301. package/src/ui/footer.ts +147 -44
  302. package/src/ui/status-overlay.ts +13 -8
  303. package/src/ui/status-presentation.ts +4 -7
  304. package/src/ui/tui/candidate-selection.ts +40 -95
  305. package/src/ui/tui/common.ts +16 -70
  306. package/src/ui/tui/display.ts +6 -24
  307. package/src/tool/result/candidate-row.ts +0 -49
@@ -9,8 +9,11 @@ import {
9
9
  } from "@mrclrchtr/supi-code-runtime/api";
10
10
  import { isWithinOrEqual } from "@mrclrchtr/supi-core/project";
11
11
  import type { WorkspaceLspRuntimeState } from "@mrclrchtr/supi-lsp/api";
12
- import type { EvidenceListMetadata, EvidencePartialReason } from "../../analysis/evidence.ts";
13
- import { createEvidenceList } from "../../analysis/evidence.ts";
12
+ import {
13
+ type CollectionPartialReason,
14
+ createEvidenceList,
15
+ createPartialEvidenceList,
16
+ } from "../../analysis/evidence.ts";
14
17
  import type { CodeProvider } from "../../analysis/provider.ts";
15
18
  import { toDisplayPath } from "../../analysis/search/paths.ts";
16
19
  import type {
@@ -38,7 +41,7 @@ export interface ListSectionInput<T> {
38
41
  readonly status?: "complete" | "partial";
39
42
  readonly reason?: string | null;
40
43
  readonly unknownRemainder?: boolean;
41
- readonly partialReason?: EvidencePartialReason;
44
+ readonly partialReason?: CollectionPartialReason;
42
45
  readonly errorRanges?: readonly SourceRange[];
43
46
  readonly facts?: (items: readonly T[]) => import("./facts.ts").OrientationFacts;
44
47
  }
@@ -58,19 +61,14 @@ export function appendList<T>(
58
61
  builder: ContextOrientationBuilder,
59
62
  input: ListSectionInput<T>,
60
63
  ): void {
61
- const list = createEvidenceList({
62
- key: input.key,
63
- items: [...input.items],
64
- maxResults: builder.maxResults,
65
- });
66
- const metadata: EvidenceListMetadata = input.unknownRemainder
67
- ? {
68
- ...list.metadata,
69
- totalCount: null,
64
+ const params = { key: input.key, items: [...input.items], maxResults: builder.maxResults };
65
+ const list = input.unknownRemainder
66
+ ? createPartialEvidenceList({
67
+ ...params,
70
68
  partialReason: input.partialReason ?? "filesystem-error",
71
69
  ...(input.reason ? { partialMessage: input.reason } : {}),
72
- }
73
- : list.metadata;
70
+ })
71
+ : createEvidenceList(params);
74
72
  builder.sections.push({
75
73
  key: input.key,
76
74
  title: input.title,
@@ -78,7 +76,7 @@ export function appendList<T>(
78
76
  reason: input.reason ?? null,
79
77
  confidence: input.confidence,
80
78
  provenance: input.provenance,
81
- evidenceLists: [{ ...metadata, key: input.key }],
79
+ evidenceLists: [list.metadata],
82
80
  items: list.items.map((item) => ({ kind: "list-item", text: input.render(item) })),
83
81
  ...(input.facts ? { facts: input.facts(list.items) } : {}),
84
82
  ...(input.errorRanges ? { errorRanges: [...input.errorRanges] } : {}),
@@ -1,4 +1,5 @@
1
1
  import type { SourceRange } from "@mrclrchtr/supi-code-runtime/api";
2
+ import type { EvidenceListFacts } from "../../analysis/evidence.ts";
2
3
 
3
4
  /** Named, selected observations retained independently of their text rendering. */
4
5
  export interface OrientationFacts {
@@ -84,8 +85,7 @@ export interface OrientationFacts {
84
85
  readonly reason: string;
85
86
  }
86
87
  )[];
87
- readonly collectedCount?: number;
88
- readonly omittedCount?: number;
88
+ readonly evidence?: EvidenceListFacts;
89
89
  };
90
90
  readonly recovery?: readonly {
91
91
  readonly operation: string;
@@ -103,22 +103,19 @@ export interface OrientationFacts {
103
103
  readonly startLine: number;
104
104
  readonly endLine: number;
105
105
  }[];
106
- readonly collectedCount: number;
107
- readonly omittedCount: number;
106
+ readonly evidence: EvidenceListFacts;
108
107
  };
109
108
  readonly imports: {
110
109
  readonly status: "complete" | "partial" | "unavailable";
111
110
  readonly reason: string | null;
112
111
  readonly entries: readonly { readonly moduleSpecifier: string }[];
113
- readonly collectedCount: number;
114
- readonly omittedCount: number;
112
+ readonly evidence: EvidenceListFacts;
115
113
  };
116
114
  readonly exports: {
117
115
  readonly status: "complete" | "partial" | "unavailable";
118
116
  readonly reason: string | null;
119
117
  readonly entries: readonly { readonly name: string; readonly kind: string }[];
120
- readonly collectedCount: number;
121
- readonly omittedCount: number;
118
+ readonly evidence: EvidenceListFacts;
122
119
  };
123
120
  };
124
121
  readonly documentation?: readonly string[];
@@ -133,6 +133,11 @@ export interface OrientationResultData {
133
133
  readonly instructions?: InstructionFilesMetadata;
134
134
  /** Collected instruction snippets; separate from mutable session deduplication state. */
135
135
  readonly instructionFiles?: readonly import("../analysis/instruction-files.ts").RenderedInstructionFile[];
136
+ /**
137
+ * Instruction files for the focused directory that the session already has, so they are not
138
+ * repeated. Rendered as one line so an absent section does not read as a discovery failure.
139
+ */
140
+ readonly knownInstructionPaths?: readonly string[];
136
141
  /** Captured generic workspace facts; absent for the unchanged file and symbol paths. */
137
142
  readonly workspace?: import("./orientation/workspace-context.ts").WorkspaceOrientationFacts;
138
143
  readonly target?: Readonly<TargetStoreEntry>;
@@ -3,6 +3,7 @@
3
3
  import { existsSync, statSync } from "node:fs";
4
4
  import { buildArchitectureModel } from "../analysis/architecture/discovery.ts";
5
5
  import type { ArchitectureModel } from "../analysis/architecture/model.ts";
6
+ import { createEvidenceList } from "../analysis/evidence.ts";
6
7
  import {
7
8
  collectInstructionFiles,
8
9
  findInstructionFilesForDirectory,
@@ -148,18 +149,13 @@ async function orientTarget(options: {
148
149
  kind: "kind-mismatch",
149
150
  requestedKind: target.requestedKind,
150
151
  candidates,
151
- totalCount: target.totalCount,
152
- omittedCount: target.omittedCount,
153
- partialReason: target.partialReason,
154
- partialMessage: target.partialMessage,
152
+ candidateEvidence: target.candidateEvidence,
155
153
  }
156
154
  : {
157
155
  kind: "disambiguation",
158
156
  candidates,
159
- totalCount: target.totalCount,
160
- omittedCount: target.omittedCount,
161
- partialReason: target.partialReason,
162
- partialMessage: target.partialMessage,
157
+ candidateEvidence: target.candidateEvidence,
158
+ ...(target.candidateNotes ? { candidateNotes: target.candidateNotes } : {}),
163
159
  };
164
160
  }
165
161
  if (target.kind !== "resolved") return target;
@@ -243,7 +239,7 @@ function addInstructionFiles(
243
239
  ): Awaited<ReturnType<typeof executeOrientation>> {
244
240
  if (!deps.projectTrusted || !isDirectory(focusPath)) return result;
245
241
  const config = loadCodeIntelligenceConfig(deps.cwd, deps.homeDir);
246
- const matches = findInstructionFilesForDirectory({
242
+ const { matches, known } = findInstructionFilesForDirectory({
247
243
  directory: focusPath,
248
244
  cwd: deps.cwd,
249
245
  fileNames: config.instructionFileNames,
@@ -257,7 +253,11 @@ function addInstructionFiles(
257
253
  relativePath: toDisplayPath(deps.cwd, match.absolutePath),
258
254
  })),
259
255
  );
260
- if (!collected) return result;
256
+ // The workspace-root file is in nearly every session's system prompt; naming it adds nothing.
257
+ const knownInstructionPaths = known
258
+ .filter((match) => match.relativeDirectory !== ".")
259
+ .map((match) => toDisplayPath(deps.cwd, match.absolutePath));
260
+ if (!collected) return { ...result, knownInstructionPaths };
261
261
  const items: OrientationItem[] = [];
262
262
  for (const file of collected.files) {
263
263
  items.push(
@@ -280,18 +280,13 @@ function addInstructionFiles(
280
280
  confidence: "unavailable",
281
281
  provenance: [{ source: "filesystem", detail: "configured instruction files" }],
282
282
  evidenceLists: [
283
- {
284
- key: "instructions.files",
285
- totalCount: collected.files.length,
286
- shownCount: collected.files.length,
287
- omittedCount: 0,
288
- partialReason: null,
289
- },
283
+ createEvidenceList({ key: "instructions.files", items: collected.files }).metadata,
290
284
  ],
291
285
  items,
292
286
  };
293
287
  return {
294
288
  ...result,
289
+ knownInstructionPaths,
295
290
  sections: [section, ...result.sections],
296
291
  renderedSections: ["instructions", ...result.renderedSections],
297
292
  instructions: collected.metadata,
@@ -7,6 +7,11 @@
7
7
  // biome-ignore lint/style/noExcessiveLinesPerFile: target workflow keeps anchored, symbol, and file resolution together.
8
8
  import { existsSync } from "node:fs";
9
9
  import type { CodeRequestControl } from "@mrclrchtr/supi-code-runtime/api";
10
+ import {
11
+ createEvidenceList,
12
+ createPartialEvidenceList,
13
+ type EvidenceListMetadata,
14
+ } from "../analysis/evidence.ts";
10
15
  import { withSemanticRequestControl, withStructuralRequestControl } from "../analysis/provider.ts";
11
16
  import { normalizePath, resolveScope } from "../analysis/search/paths.ts";
12
17
  import { resolveAnchoredSymbolTarget } from "../analysis/target/anchored.ts";
@@ -63,8 +68,8 @@ export type TargetWorkflowOutcome =
63
68
  confidence: ResolvedTargetData["confidence"];
64
69
  discoveryProvenance: FileOutlineData["discoveryProvenance"];
65
70
  targets: ReadonlyArray<Readonly<TargetStoreEntry>>;
66
- totalCount: number;
67
- omittedCount: number;
71
+ /** Declaration Evidence list: exact total, visible handles only. */
72
+ targetEvidence: EvidenceListMetadata;
68
73
  unknownLevelCount: number;
69
74
  partial?: FileOutlineData["partial"];
70
75
  notListed: FileOutlineData["notListed"];
@@ -79,7 +84,12 @@ export type TargetWorkflowOutcome =
79
84
  candidates: ReadonlyArray<TargetWorkflowCandidate>;
80
85
  } & TargetCandidateCompleteness)
81
86
  | { kind: "invalid-input"; message: string }
82
- | { kind: "unavailable"; reason: string };
87
+ | {
88
+ kind: "unavailable";
89
+ reason: string;
90
+ /** A provider row limit, not readiness, left the result incomplete. */
91
+ rowLimited?: true;
92
+ };
83
93
 
84
94
  /** Dependencies hidden behind the Workspace code-intelligence session seam. */
85
95
  export interface TargetWorkflowDeps {
@@ -226,20 +236,18 @@ async function resolveSymbolWorkflow(
226
236
  };
227
237
  }
228
238
 
239
+ const structural =
240
+ withStructuralRequestControl(deps.capability.getStructuralProvider(deps.cwd), control) ??
241
+ undefined;
229
242
  const outcome = await resolveSymbolTarget(symbol.query, deps.cwd, provider, {
230
243
  path: scope,
231
244
  kind: symbol.symbolKind,
232
245
  maxResults: policy.maxResults,
233
246
  control,
247
+ structural,
234
248
  });
235
249
  return toWorkflowOutcome(
236
- await refineTargetOutcomeIdentity(
237
- outcome,
238
- deps.cwd,
239
- withStructuralRequestControl(deps.capability.getStructuralProvider(deps.cwd), control) ??
240
- undefined,
241
- control,
242
- ),
250
+ await refineTargetOutcomeIdentity(outcome, deps.cwd, structural, control),
243
251
  policy,
244
252
  deps,
245
253
  );
@@ -293,9 +301,7 @@ function toWorkflowOutcome(
293
301
  policy: TargetWorkflowPolicy,
294
302
  deps: TargetWorkflowDeps,
295
303
  ): TargetWorkflowOutcome {
296
- if (outcome.kind === "unavailable") {
297
- return { kind: "unavailable", reason: outcome.reason };
298
- }
304
+ if (outcome.kind === "unavailable") return outcome;
299
305
  if (outcome.kind === "error") {
300
306
  return { kind: "invalid-input", message: outcome.message };
301
307
  }
@@ -328,18 +334,13 @@ function toWorkflowOutcome(
328
334
  kind: "kind-mismatch",
329
335
  requestedKind: outcome.requestedKind,
330
336
  candidates,
331
- totalCount: outcome.totalCount,
332
- omittedCount: outcome.omittedCount,
333
- partialReason: outcome.partialReason,
334
- partialMessage: outcome.partialMessage,
337
+ candidateEvidence: outcome.candidateEvidence,
335
338
  }
336
339
  : {
337
340
  kind: "disambiguation",
338
341
  candidates,
339
- totalCount: outcome.totalCount,
340
- omittedCount: outcome.omittedCount,
341
- partialReason: outcome.partialReason,
342
- partialMessage: outcome.partialMessage,
342
+ candidateEvidence: outcome.candidateEvidence,
343
+ ...(outcome.candidateNotes ? { candidateNotes: outcome.candidateNotes } : {}),
343
344
  };
344
345
  }
345
346
 
@@ -348,8 +349,21 @@ function registerFileOutline(
348
349
  deps: TargetWorkflowDeps,
349
350
  maxResults: number,
350
351
  ): TargetWorkflowOutcome {
351
- const totalCount = outline.targets.length;
352
- const visibleTargets = outline.targets.slice(0, Math.max(0, maxResults));
352
+ // A partial outline enumerated what syntax recovery exposed; more may exist.
353
+ const visible = outline.partial
354
+ ? createPartialEvidenceList({
355
+ key: "resolve.targets",
356
+ items: outline.targets,
357
+ maxResults: Math.max(0, maxResults),
358
+ partialReason: "provider-limited",
359
+ partialMessage: outline.partial.reason,
360
+ })
361
+ : createEvidenceList({
362
+ key: "resolve.targets",
363
+ items: outline.targets,
364
+ maxResults: Math.max(0, maxResults),
365
+ });
366
+ const visibleTargets = visible.items;
353
367
  const fingerprint = computeFileFingerprint(outline.file);
354
368
  const fileFingerprint = fingerprint.kind === "ok" ? fingerprint.fingerprint : "unfingerprinted";
355
369
  const targets = visibleTargets.map((target) =>
@@ -361,8 +375,7 @@ function registerFileOutline(
361
375
  confidence: outline.confidence,
362
376
  discoveryProvenance: Object.freeze([...outline.discoveryProvenance]),
363
377
  targets: Object.freeze(targets),
364
- totalCount,
365
- omittedCount: totalCount - targets.length,
378
+ targetEvidence: visible.metadata,
366
379
  unknownLevelCount: outline.unknownLevelCount,
367
380
  ...(outline.partial ? { partial: outline.partial } : {}),
368
381
  notListed: outline.notListed,
@@ -6,7 +6,7 @@ import {
6
6
  } from "../../analysis/evidence.ts";
7
7
  import {
8
8
  type AutomaticPathExclusionDisplay,
9
- describeExcludedPath,
9
+ describeExcludedPathExamples,
10
10
  } from "../../analysis/search/exclusions.ts";
11
11
  import { renderStructuredEmptyState, renderStructuredMatches } from "./markdown.ts";
12
12
  import type { FindResultAssembly } from "./result.ts";
@@ -55,21 +55,22 @@ function renderSemantic(assembly: FindResultAssembly, evidence: EvidenceListMeta
55
55
  }
56
56
  const disclosure = renderEvidenceListMetadataDisclosure(evidence);
57
57
  if (disclosure) lines.push(disclosure);
58
- const exclusionDisclosure = renderAutomaticPathExclusionDisclosure(
59
- assembly.details.automaticPathExclusion,
60
- );
58
+ const exclusionDisclosure = renderAutomaticPathExclusionDisclosure(assembly, evidence);
61
59
  if (exclusionDisclosure) lines.push(exclusionDisclosure);
62
60
  return lines.join("\n");
63
61
  }
64
62
 
65
63
  function renderAutomaticPathExclusionDisclosure(
66
- exclusion: AutomaticPathExclusionDisplay | undefined,
64
+ assembly: FindResultAssembly,
65
+ evidence: EvidenceListMetadata,
67
66
  ): string | null {
67
+ // A provider-limited disclosure already carries the provider's exclusion sentence.
68
+ if (evidence.partialMessage) return null;
69
+ const exclusion: AutomaticPathExclusionDisplay | undefined =
70
+ assembly.details.automaticPathExclusion;
68
71
  if (!exclusion || exclusion.excludedCount <= 0) return null;
69
72
  const noun = `workspace-symbol result${exclusion.excludedCount === 1 ? "" : "s"}`;
70
- const examples = exclusion.examples.length
71
- ? ` Excluded path examples: ${exclusion.examples.map(describeExcludedPath).join(", ")}.`
72
- : "";
73
+ const examples = describeExcludedPathExamples(exclusion);
73
74
  return `_Automatic path policy excluded ${exclusion.excludedCount} ${noun}.${examples}_`;
74
75
  }
75
76
 
@@ -85,9 +86,7 @@ function renderEmptySemantic(assembly: FindResultAssembly, evidence: EvidenceLis
85
86
  ];
86
87
  const disclosure = renderEvidenceListMetadataDisclosure(evidence);
87
88
  if (disclosure) lines.push("", disclosure);
88
- const exclusionDisclosure = renderAutomaticPathExclusionDisclosure(
89
- assembly.details.automaticPathExclusion,
90
- );
89
+ const exclusionDisclosure = renderAutomaticPathExclusionDisclosure(assembly, evidence);
91
90
  if (exclusionDisclosure) lines.push("", exclusionDisclosure);
92
91
  lines.push("", "Document-level semantic symbols can differ from the workspace index.");
93
92
  const fileQuery = assembly.assembled.actions.find(
@@ -65,11 +65,9 @@ export function assembleFindWorkflowResult(
65
65
  createToolDisplaySection({
66
66
  key: `find.${outcome.data.kind}`,
67
67
  title: outcome.data.kind === "semantic" ? "Symbols" : "Matches",
68
- items: findItems(outcome.data),
69
- totalCount: evidence.metadata.totalCount,
70
- omittedCount: evidence.metadata.omittedCount,
71
- partialReason: evidence.metadata.partialReason,
72
- format: (item) => formatFindDisplayItem(outcome.data.kind, item),
68
+ items: findItems(outcome.data).slice(0, evidence.metadata.shownCount),
69
+ evidence: evidence.metadata,
70
+ format: (item: unknown) => formatFindDisplayItem(outcome.data.kind, item),
73
71
  }),
74
72
  ];
75
73
 
@@ -79,8 +77,8 @@ export function assembleFindWorkflowResult(
79
77
  key: "find.excludedPaths",
80
78
  title: "Excluded path examples",
81
79
  items: exclusion.examples,
82
- totalCount: exclusion.examples.length,
83
- omittedCount: 0,
80
+ evidence: createEvidenceList({ key: "find.excludedPaths", items: exclusion.examples })
81
+ .metadata,
84
82
  format: describeExcludedPath,
85
83
  }),
86
84
  );
@@ -178,7 +176,12 @@ function createFindEvidence(outcome: Extract<FindWorkflowOutcome, { kind: "compl
178
176
  const providerLimited =
179
177
  outcome.data.partialReason !== null && outcome.data.partialMetadata?.exclusionOnly !== true;
180
178
  const evidence = providerLimited
181
- ? createPartialEvidenceList({ ...params, partialReason: "provider-limited" })
179
+ ? createPartialEvidenceList({
180
+ ...params,
181
+ partialReason: "provider-limited",
182
+ // Names the provider's cause and next step, as target selection does.
183
+ ...(outcome.data.partialReason ? { partialMessage: outcome.data.partialReason } : {}),
184
+ })
182
185
  : createEvidenceList(params);
183
186
  return { total: outcome.data.symbols.length, metadata: evidence.metadata };
184
187
  }
@@ -1,3 +1,4 @@
1
+ import { createEvidenceList } from "../../analysis/evidence.ts";
1
2
  import type { CallEntry, ReferenceEntry } from "../../analysis/relations/types.ts";
2
3
  import { toDisplayPath } from "../../analysis/search/paths.ts";
3
4
  import { createToolDisplaySection } from "../result/display.ts";
@@ -20,6 +21,7 @@ export function graphDisplaySection(
20
21
  key: `graph.${section.rel}`,
21
22
  title: section.rel,
22
23
  items: [],
24
+ evidence: createEvidenceList({ key: `graph.${section.rel}`, items: [] }).metadata,
23
25
  format: () => "",
24
26
  }),
25
27
  fileGroups: [],
@@ -30,11 +32,8 @@ export function graphDisplaySection(
30
32
  key: `graph.${section.rel}`,
31
33
  title: section.rel,
32
34
  items,
33
- totalCount: section.evidence.metadata.totalCount,
34
- omittedCount: section.evidence.metadata.omittedCount,
35
- partialReason: section.evidence.metadata.partialReason,
36
- partialMessage: section.evidence.metadata.partialMessage,
37
- format: (item) => {
35
+ evidence: section.evidence.metadata,
36
+ format: (item: CallEntry | ReferenceEntry) => {
38
37
  const site = `L${item.line}:${item.character}`;
39
38
  if (section.rel !== "callees") return site;
40
39
  const call = item as CallEntry;
@@ -42,7 +41,7 @@ export function graphDisplaySection(
42
41
  },
43
42
  });
44
43
  const groups = new Map<string, string[]>();
45
- for (let index = 0; index < display.shownCount; index++) {
44
+ for (let index = 0; index < display.lines.length; index++) {
46
45
  const file = toDisplayPath(cwd, items[index].file);
47
46
  const rows = groups.get(file) ?? [];
48
47
  rows.push(display.lines[index]);
@@ -1,38 +1,22 @@
1
- import type { EvidenceListMetadata } from "../../analysis/evidence.ts";
1
+ import { describeEvidenceList, type EvidenceListFacts } from "../../analysis/evidence.ts";
2
2
 
3
- /** Format graph counts and all known limits in one place. */
3
+ /** Canonical evidence phrase for one graph list, plus its external-location count. */
4
4
  export function formatGraphEvidence(
5
- metadata: Omit<EvidenceListMetadata, "partialReason"> & { partialReason: string | null },
6
- noun: "locations" | "call sites" | "candidates",
5
+ facts: EvidenceListFacts,
6
+ noun: "locations" | "call sites",
7
7
  externalCount = 0,
8
8
  ): string {
9
- const { shownCount, totalCount, omittedCount, partialReason, invalidLocationCount } = metadata;
10
- const count = totalCount ?? shownCount;
11
- const label = count === 1 ? singularGraphNoun(noun) : noun;
12
- let text =
13
- totalCount === null
14
- ? `${shownCount} ${label} shown${omittedCount ? `; ${omittedCount} collected omitted` : ""}; more may exist — ${partialReason}`
15
- : omittedCount
16
- ? `${shownCount} of ${totalCount} ${label} shown; ${omittedCount} omitted`
17
- : `${totalCount} ${label}`;
18
- if (externalCount > 0)
19
- text += `; ${externalCount} external location${externalCount === 1 ? "" : "s"}`;
20
- if (metadata.partialMessage) text += ` — ${metadata.partialMessage}`;
21
- if (invalidLocationCount) {
22
- const invalidNoun = invalidLocationCount === 1 ? "location" : "locations";
23
- text += `; ${invalidLocationCount} invalid provider ${invalidNoun} omitted (invalid-provider-location)`;
24
- }
25
- return text;
9
+ const text = describeEvidenceList(facts, { one: singularGraphNoun(noun), other: noun });
10
+ if (externalCount === 0) return text;
11
+ return `${text}; ${externalCount} external location${externalCount === 1 ? "" : "s"}`;
26
12
  }
27
13
 
28
- function singularGraphNoun(noun: "locations" | "call sites" | "candidates"): string {
14
+ function singularGraphNoun(noun: "locations" | "call sites"): string {
29
15
  switch (noun) {
30
16
  case "locations":
31
17
  return "location";
32
18
  case "call sites":
33
19
  return "call site";
34
- case "candidates":
35
- return "candidate";
36
20
  }
37
21
  }
38
22
 
@@ -1,5 +1,5 @@
1
1
  import type { ConfidenceMode } from "@mrclrchtr/supi-code-runtime/api";
2
- import type { EvidenceList, EvidenceListMetadata } from "../../analysis/evidence.ts";
2
+ import type { EvidenceList } from "../../analysis/evidence.ts";
3
3
  import { toDisplayPath } from "../../analysis/search/paths.ts";
4
4
  import type { GraphSection } from "../../session/graph-types.ts";
5
5
  import {
@@ -8,12 +8,9 @@ import {
8
8
  type ResultProvenance,
9
9
  type ToolResultAssembly,
10
10
  } from "../result/assembly.ts";
11
- import { formatCandidateRow, formatPartialCandidateDisclosure } from "../result/candidate-row.ts";
12
- import { createToolDisplaySection } from "../result/display.ts";
13
11
  import type { ToolDisplaySection } from "../result/types.ts";
14
12
  import type { GraphDetails, GraphFileGroup, GraphSectionDetails } from "./details.ts";
15
13
  import { graphDisplaySection } from "./display.ts";
16
- import { formatGraphEvidence } from "./format.ts";
17
14
  import { graphReadNext } from "./read-next.ts";
18
15
  import { type AssembledGraphSection, assembleGraphSection } from "./section.ts";
19
16
  import { structuredGraphCandidates, structuredGraphResult } from "./structured.ts";
@@ -155,6 +152,7 @@ function graphConfidence(sections: readonly AssembledGraphSection[]): Confidence
155
152
  }
156
153
 
157
154
  import type { CodeIntelResult, CodeIntelToolExecCtx } from "../../types/index.ts";
155
+ import { assembleCandidateSelection } from "../result/candidate-selection.ts";
158
156
  import { searchErrorResult } from "../result/errors.ts";
159
157
  import { renderGraphResult } from "./markdown.ts";
160
158
 
@@ -203,88 +201,31 @@ export function finishGraphResult(outcome: GraphOutcome, cwd: string): CodeIntel
203
201
  }
204
202
 
205
203
  function finishGraphCandidates(
206
- input: Extract<GraphOutcome, { kind: "disambiguation" | "kind-mismatch" }>,
204
+ outcome: Extract<GraphOutcome, { kind: "disambiguation" | "kind-mismatch" }>,
207
205
  cwd: string,
208
206
  ): CodeIntelResult {
209
- const outcome = {
210
- ...input,
211
- candidates: input.candidates.map((candidate) => ({
212
- ...candidate,
213
- file: toDisplayPath(cwd, candidate.file),
214
- })),
215
- };
216
- const lines = [
217
- outcome.kind === "kind-mismatch"
218
- ? `**No target matched provider kind \`${outcome.requestedKind}\`. Near matches:**`
219
- : "**Target is ambiguous. Choose one candidate handle:**",
220
- "",
221
- ];
222
- for (const candidate of outcome.candidates) {
223
- lines.push(
224
- `- \`${candidate.targetId}\` — ${candidate.name} (\`${candidate.kind ?? "unknown"}\`) at ${candidate.file}:${candidate.line}:${candidate.character}`,
225
- );
226
- }
227
- const evidence = graphCandidateEvidence(outcome);
228
- lines.push(
229
- "",
230
- formatPartialCandidateDisclosure(evidence) ?? formatGraphEvidence(evidence, "candidates"),
231
- );
232
- if (outcome.kind === "kind-mismatch") {
233
- lines.push(
234
- "",
235
- "Retry without `symbolKind`, use an observed provider kind, or choose a handle.",
236
- );
237
- }
238
- const displaySections = [
239
- createToolDisplaySection({
240
- key: "graph.candidates",
241
- title: "Candidates",
242
- items: outcome.candidates,
243
- totalCount: evidence.totalCount,
244
- omittedCount: evidence.omittedCount,
245
- partialReason: evidence.partialReason,
246
- partialMessage: evidence.partialMessage,
247
- format: (candidate) => formatCandidateRow(candidate, "handle-first"),
248
- }),
249
- ];
250
- const nextQueries =
251
- outcome.kind === "kind-mismatch"
252
- ? ["Retry without symbolKind, use an observed provider kind, or choose a near-match handle"]
253
- : ["Choose one candidate handle, or narrow the symbol selector with scope or symbolKind"];
254
- const message =
255
- outcome.kind === "kind-mismatch"
256
- ? `No target matched provider kind ${outcome.requestedKind}.`
257
- : "The target is ambiguous.";
207
+ const selection = assembleCandidateSelection({ outcome, key: "graph.candidates", cwd });
208
+ const nextQueries = [...selection.nextQueries];
258
209
  return {
259
- ...searchErrorResult(lines.join("\n"), {
210
+ ...searchErrorResult(selection.content, {
260
211
  confidence: "semantic",
261
- evidenceLists: [evidence],
212
+ evidenceLists: [selection.evidence],
262
213
  nextQueries,
263
- status: outcome.kind === "disambiguation" ? "disambiguation" : "invalid-input",
264
- message,
265
- displaySections,
214
+ status: selection.status,
215
+ message: selection.message,
216
+ displaySections: selection.displaySections,
266
217
  }),
267
- structuredContent: structuredGraphCandidates(outcome, evidence, { message, nextQueries }),
268
- };
269
- }
270
-
271
- function graphCandidateEvidence(
272
- outcome: Extract<GraphOutcome, { kind: "disambiguation" | "kind-mismatch" }>,
273
- ): EvidenceListMetadata {
274
- return {
275
- key: "graph.candidates",
276
- totalCount: outcome.totalCount,
277
- shownCount: outcome.candidates.length,
278
- omittedCount: outcome.omittedCount,
279
- partialReason: outcome.partialReason,
280
- partialMessage: outcome.partialMessage,
218
+ structuredContent: structuredGraphCandidates(
219
+ { ...outcome, candidates: [...selection.candidates] },
220
+ selection.evidence,
221
+ { message: selection.message, nextQueries },
222
+ ),
281
223
  };
282
224
  }
283
225
 
284
226
  function hasHiddenDisplayEvidence(assembly: GraphResultAssembly): boolean {
285
227
  return assembly.sections.some(
286
228
  (section, index) =>
287
- section.kind === "ok" &&
288
- assembly.displaySections[index].shownCount < section.evidence.items.length,
229
+ section.kind === "ok" && assembly.displaySections[index].displayOmittedCount > 0,
289
230
  );
290
231
  }