@mrclrchtr/supi-review 11.2.0 → 11.4.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 (172) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +2 -0
  3. package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/package.json +1 -1
  4. package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/child-web-tools.ts +110 -0
  5. package/node_modules/@mrclrchtr/supi-agent-runtime/node_modules/@mrclrchtr/supi-core/src/session.ts +11 -0
  6. package/node_modules/@mrclrchtr/supi-agent-runtime/package.json +2 -2
  7. package/node_modules/@mrclrchtr/supi-agent-runtime/src/debug-retrospective.ts +9 -0
  8. package/node_modules/@mrclrchtr/supi-agent-runtime/src/run.ts +2 -0
  9. package/node_modules/@mrclrchtr/supi-agent-runtime/src/usage.ts +15 -1
  10. package/node_modules/@mrclrchtr/supi-code-intelligence/CHANGELOG.md +30 -0
  11. package/node_modules/@mrclrchtr/supi-code-intelligence/README.md +19 -9
  12. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
  13. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +2 -1
  14. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +3 -1
  15. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/src/declaration-level.ts +34 -0
  16. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +9 -0
  17. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +13 -5
  18. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/package.json +1 -1
  19. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/child-web-tools.ts +110 -0
  20. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-core/src/session.ts +11 -0
  21. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/README.md +40 -3
  22. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
  23. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +2 -1
  24. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +3 -1
  25. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/declaration-level.ts +34 -0
  26. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +9 -0
  27. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +13 -5
  28. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +1 -1
  29. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/child-web-tools.ts +110 -0
  30. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/session.ts +11 -0
  31. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/classes/range.js +2 -2
  32. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/constants.js +30 -0
  33. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
  34. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/node_modules/semver/package.json +1 -1
  35. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/package.json +3 -3
  36. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostic-collection.ts +11 -4
  37. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-diagnostics.ts +77 -6
  38. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-input-admission.ts +149 -0
  39. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client-typescript-project.ts +40 -0
  40. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +151 -44
  41. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/config/tsconfig-scope.ts +10 -0
  42. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/evidence.ts +2 -2
  43. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-typescript-coverage.ts +118 -0
  44. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-symbol.ts +157 -23
  45. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +318 -58
  46. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/manager/typescript-file-local.ts +87 -0
  47. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/provider/semantic-symbol-mapper.ts +22 -17
  48. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registry.ts +68 -6
  49. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-rename.ts +1 -0
  50. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-lsp/src/session/workspace-lsp-runtime.ts +5 -1
  51. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/README.md +2 -2
  52. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
  53. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/api.ts +2 -1
  54. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/capability/types.ts +3 -1
  55. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/declaration-level.ts +34 -0
  56. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/query-result.ts +9 -0
  57. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/src/types.ts +13 -5
  58. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +1 -1
  59. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/child-web-tools.ts +110 -0
  60. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/session.ts +11 -0
  61. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/package.json +3 -3
  62. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm +0 -0
  63. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm.json +9 -1
  64. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm +0 -0
  65. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm.json +9 -1
  66. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/call-sites.ts +40 -25
  67. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/callees.ts +2 -0
  68. package/node_modules/@mrclrchtr/supi-code-intelligence/node_modules/@mrclrchtr/supi-tree-sitter/src/worker/call-context.ts +44 -0
  69. package/node_modules/@mrclrchtr/supi-code-intelligence/package.json +6 -5
  70. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/health/server-status.ts +6 -2
  71. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/helpers.ts +0 -7
  72. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/relations/implementations.ts +5 -0
  73. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/relations/references.ts +5 -0
  74. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/search/exclusions.ts +47 -0
  75. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/search/paths.ts +32 -9
  76. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/anchored-structural.ts +3 -8
  77. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/anchored.ts +4 -20
  78. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/file-merge.ts +162 -0
  79. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/file-outline-omissions.ts +146 -0
  80. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/file-refinement.ts +7 -7
  81. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/file.ts +44 -156
  82. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/identity.ts +1 -1
  83. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/latex-label-container.ts +6 -6
  84. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/latex-section-anchor.ts +6 -6
  85. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/resolution.ts +18 -0
  86. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/symbol.ts +44 -12
  87. package/node_modules/@mrclrchtr/supi-code-intelligence/src/analysis/target/types.ts +38 -7
  88. package/node_modules/@mrclrchtr/supi-code-intelligence/src/api.ts +1 -1
  89. package/node_modules/@mrclrchtr/supi-code-intelligence/src/app/app.ts +9 -3
  90. package/node_modules/@mrclrchtr/supi-code-intelligence/src/extension.ts +17 -11
  91. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/graph/collect.ts +3 -10
  92. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/graph-types.ts +5 -1
  93. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/graph-workflow.ts +6 -4
  94. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/inspect/collect.ts +8 -2
  95. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/inspect/file-point.ts +2 -3
  96. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/inspect-workflow.ts +1 -1
  97. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/collect.ts +54 -16
  98. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/context-sections.ts +2 -3
  99. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/facts.ts +9 -1
  100. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation/workspace-context.ts +3 -0
  101. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation-types.ts +3 -0
  102. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/orientation-workflow.ts +24 -8
  103. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/refactor-identity.ts +76 -0
  104. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/refactor-workflow.ts +14 -16
  105. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/session.ts +87 -12
  106. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/target-store.ts +3 -18
  107. package/node_modules/@mrclrchtr/supi-code-intelligence/src/session/target-workflow.ts +56 -37
  108. package/node_modules/@mrclrchtr/supi-code-intelligence/src/substrate/lsp/recovery.ts +5 -5
  109. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/render.ts +8 -4
  110. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/result.ts +78 -6
  111. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/spec.ts +4 -3
  112. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_find/structured.ts +25 -9
  113. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/details.ts +1 -0
  114. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/display.ts +1 -1
  115. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/guidance.ts +1 -1
  116. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/markdown.ts +11 -6
  117. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/read-next.ts +38 -9
  118. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/reference-selection.ts +30 -0
  119. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/result.ts +25 -118
  120. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/section.ts +137 -0
  121. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/spec.ts +3 -3
  122. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_graph/structured.ts +17 -6
  123. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/display-paths.ts +92 -0
  124. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/file-scope-markdown.ts +3 -2
  125. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/result.ts +4 -2
  126. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/spec.ts +3 -3
  127. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_health/structured-schema.ts +44 -44
  128. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/spec.ts +5 -1
  129. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_inspect/structured.ts +1 -2
  130. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/directory-navigation.ts +20 -31
  131. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/execute.ts +1 -1
  132. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/result.ts +22 -5
  133. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/structured-schema.ts +46 -36
  134. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/structured-workspace.ts +2 -1
  135. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/structured.ts +6 -12
  136. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-format.ts +2 -5
  137. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-output.ts +40 -13
  138. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_orientation/workspace-sections.ts +48 -4
  139. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_apply/result.ts +1 -1
  140. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_plan/result.ts +2 -1
  141. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_refactor_plan/structured.ts +2 -3
  142. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/guidance.ts +1 -1
  143. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/markdown.ts +127 -64
  144. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/result.ts +41 -25
  145. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/code_resolve/structured.ts +49 -18
  146. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/model-budget.ts +2 -2
  147. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/refactor.ts +8 -5
  148. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/structured.ts +8 -5
  149. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/result/types.ts +31 -24
  150. package/node_modules/@mrclrchtr/supi-code-intelligence/src/tool/schemas.ts +5 -5
  151. package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-command.ts +37 -1
  152. package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-overlay.ts +70 -51
  153. package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/status-presentation.ts +108 -0
  154. package/node_modules/@mrclrchtr/supi-code-intelligence/src/ui/tui/common.ts +10 -10
  155. package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
  156. package/node_modules/@mrclrchtr/supi-core/src/child-web-tools.ts +110 -0
  157. package/node_modules/@mrclrchtr/supi-core/src/session.ts +11 -0
  158. package/package.json +5 -4
  159. package/src/config.ts +11 -0
  160. package/src/tool/review_run/child-resources.ts +18 -10
  161. package/src/tool/review_run/child-session.ts +4 -0
  162. package/src/tool/review_run/execute.ts +4 -0
  163. package/src/tool/review_run/execution.ts +3 -0
  164. package/src/tool/review_run/planner.ts +11 -2
  165. package/src/tool/review_run/register.ts +1 -1
  166. package/src/tool/review_run/runner.ts +18 -5
  167. package/src/tool/review_run/schemas.ts +8 -5
  168. package/src/tool/review_run/system-prompt.ts +7 -1
  169. package/src/tool/review_run/workflow.ts +7 -0
  170. package/src/tui/review-command.ts +8 -0
  171. package/src/types.ts +5 -0
  172. package/src/web-access.ts +15 -0
@@ -12,7 +12,11 @@ import {
12
12
  truncateToWidth,
13
13
  } from "@earendil-works/pi-tui";
14
14
  import { BRAILLE_SPINNER_FRAMES } from "@mrclrchtr/supi-core/spinner-frames";
15
- import type { Diagnostic, ProjectServerInfo } from "@mrclrchtr/supi-lsp/api";
15
+ import type {
16
+ Diagnostic,
17
+ DiagnosticEvidenceSummary,
18
+ ProjectServerInfo,
19
+ } from "@mrclrchtr/supi-lsp/api";
16
20
  import type {
17
21
  DiagnosticCheckFile,
18
22
  WorkspaceDiagnosticCheckReport,
@@ -26,16 +30,23 @@ import {
26
30
  import type { WorkspaceStatusSnapshot } from "../analysis/health/status.ts";
27
31
  import type { HealthDiagnosticEntry } from "../session/health-types.ts";
28
32
  import { diagnosticMessageString } from "../substrate/lsp/utils.ts";
33
+ import {
34
+ CiHealthRefreshError,
35
+ presentDiagnosticDetails,
36
+ presentDiagnosticEvidence,
37
+ } from "./status-presentation.ts";
29
38
 
30
39
  /** Passive health facts plus the session's active tool surface. */
31
40
  export interface CiStatusData extends WorkspaceStatusSnapshot {
32
41
  readonly activeTools: readonly string[];
33
42
  readonly diagnosticCheck?: WorkspaceDiagnosticCheckReport;
43
+ /** Compact outcome of the latest health action, never a source of current evidence. */
44
+ readonly healthRefresh?: readonly string[];
34
45
  }
35
46
 
36
- /** Full error/warning messages retain freshness independently from the summary. */
47
+ /** Full messages and file-specific evidence from one passive diagnostic snapshot. */
37
48
  export interface CiDiagnosticDetails {
38
- readonly current: boolean;
49
+ readonly evidence: DiagnosticEvidenceSummary;
39
50
  readonly entries: readonly {
40
51
  readonly file: string;
41
52
  readonly diagnostics: readonly Diagnostic[];
@@ -51,17 +62,23 @@ export interface CiStatusDialogDeps {
51
62
  fetchDetailedDiagnostics?: () => CiDiagnosticDetails | Promise<CiDiagnosticDetails>;
52
63
  onRefresh?: (signal: AbortSignal) => Promise<CiStatusData>;
53
64
  onCheck?: (signal: AbortSignal) => Promise<CiStatusData>;
65
+ onHealth?: (signal: AbortSignal) => Promise<CiStatusData>;
54
66
  }
55
67
 
56
68
  type DiagnosticFile = DiagnosticCheckFile & HealthDiagnosticEntry;
57
69
 
58
70
  type DetailState =
59
71
  | { kind: "loading" }
60
- | { kind: "ready"; diagnostics: readonly Diagnostic[]; current: boolean }
72
+ | { kind: "ready"; diagnostics: readonly Diagnostic[]; evidenceLabel: string }
61
73
  | { kind: "error"; message: string };
62
74
  const MAX_INLINE_MESSAGES = 5;
63
75
  const MAX_OPEN_FILES_SHOWN = 3;
64
76
  const FRAME_ROWS = 6;
77
+ const ACTION_LABELS = {
78
+ reload: { name: "Reload", progress: "reloading" },
79
+ check: { name: "Check", progress: "checking" },
80
+ health: { name: "Refresh health", progress: "refreshing health" },
81
+ };
65
82
  const STATUS_ACTIONS = [
66
83
  "tui.select.cancel",
67
84
  "tui.select.up",
@@ -82,7 +99,8 @@ export class CiStatusDialog {
82
99
  private refreshGeneration = 0;
83
100
  private refreshing = false;
84
101
  private refreshError: string | undefined;
85
- private refreshAction: "reload" | "check" = "reload";
102
+ private healthRefresh: readonly string[] | undefined;
103
+ private refreshAction: "reload" | "check" | "health" = "reload";
86
104
  private refreshController: AbortController | undefined;
87
105
  private disposed = false;
88
106
  private spinner: ReturnType<typeof setInterval> | undefined;
@@ -105,6 +123,7 @@ export class CiStatusDialog {
105
123
  private readonly deps: CiStatusDialogDeps,
106
124
  ) {
107
125
  this.files = diagnosticFiles(data);
126
+ this.healthRefresh = data.healthRefresh;
108
127
  this.selectedFile = this.files[0]?.file;
109
128
  this.keybindings = deps.keybindings ?? getKeybindings();
110
129
  }
@@ -179,19 +198,23 @@ export class CiStatusDialog {
179
198
  return (
180
199
  this.handleScrollInput(input) ||
181
200
  this.handleFileInput(input) ||
201
+ this.handleDiagnosticActionInput(input) ||
182
202
  this.handleShortcutInput(input)
183
203
  );
184
204
  }
185
205
 
206
+ private handleDiagnosticActionInput(input: string): boolean {
207
+ if (this.hasConfiguredAction(input)) return false;
208
+ let action: "check" | "health";
209
+ if (input === "c" || matchesKey(input, "f5")) action = "check";
210
+ else if (input === "h" || matchesKey(input, "f6")) action = "health";
211
+ else return false;
212
+ if (!(action === "check" ? this.deps.onCheck : this.deps.onHealth)) return false;
213
+ void this.reload(action);
214
+ return true;
215
+ }
216
+
186
217
  private handleShortcutInput(input: string): boolean {
187
- if (
188
- this.deps.onCheck &&
189
- (input === "c" || matchesKey(input, "f5")) &&
190
- !this.hasConfiguredAction(input)
191
- ) {
192
- void this.reload(true);
193
- return true;
194
- }
195
218
  if (input === "r" && this.deps.onRefresh) {
196
219
  void this.reload();
197
220
  return true;
@@ -292,7 +315,7 @@ export class CiStatusDialog {
292
315
  this.details = {
293
316
  kind: "ready",
294
317
  diagnostics: entry?.diagnostics ?? [],
295
- current: result.current,
318
+ evidenceLabel: presentDiagnosticDetails(result.evidence, this.data.workspaceRoot, file),
296
319
  };
297
320
  } catch (error) {
298
321
  if (this.disposed || generation !== this.detailGeneration) return;
@@ -301,24 +324,30 @@ export class CiStatusDialog {
301
324
  if (!this.disposed && generation === this.detailGeneration) this.changed();
302
325
  }
303
326
 
304
- private async reload(check = false): Promise<void> {
305
- const collect = check ? this.deps.onCheck : this.deps.onRefresh;
327
+ private async reload(action: "reload" | "check" | "health" = "reload"): Promise<void> {
328
+ const collect = {
329
+ check: this.deps.onCheck,
330
+ health: this.deps.onHealth,
331
+ reload: this.deps.onRefresh,
332
+ }[action];
306
333
  if (this.refreshing || !collect) return;
307
334
  const generation = ++this.refreshGeneration;
308
335
  const navigation = this.navigationGeneration;
309
336
  this.refreshController = new AbortController();
310
- this.refreshAction = check ? "check" : "reload";
337
+ this.refreshAction = action;
311
338
  this.refreshing = true;
312
339
  this.refreshError = undefined;
340
+ this.healthRefresh = undefined;
313
341
  this.collapse();
314
342
  this.changed();
315
343
  try {
316
344
  const data = await collect(this.refreshController.signal);
317
345
  if (this.disposed || generation !== this.refreshGeneration) return;
318
- this.acceptSnapshot(data, check && navigation === this.navigationGeneration);
346
+ this.acceptSnapshot(data, action === "check" && navigation === this.navigationGeneration);
319
347
  } catch (error) {
320
348
  if (this.disposed || generation !== this.refreshGeneration) return;
321
349
  this.refreshError = errorText(error);
350
+ if (error instanceof CiHealthRefreshError) this.healthRefresh = error.healthRefresh;
322
351
  }
323
352
  if (!this.disposed && generation === this.refreshGeneration) {
324
353
  this.refreshing = false;
@@ -329,6 +358,7 @@ export class CiStatusDialog {
329
358
 
330
359
  private acceptSnapshot(data: CiStatusData, check: boolean): void {
331
360
  this.data = data;
361
+ this.healthRefresh = data.healthRefresh;
332
362
  this.files = diagnosticFiles(data);
333
363
  if (!this.files.some((entry) => entry.file === this.selectedFile))
334
364
  this.selectedFile = this.files[0]?.file;
@@ -399,10 +429,7 @@ export class CiStatusDialog {
399
429
  counts.unavailable ? t.fg("warning", `${counts.unavailable} routes unavailable`) : "",
400
430
  this.data.diagnostics.kind === "partial" ? t.fg("warning", "partial snapshot") : "",
401
431
  this.refreshing
402
- ? t.fg(
403
- "accent",
404
- `${this.frame()} ${this.refreshAction === "check" ? "checking" : "reloading"}…`,
405
- )
432
+ ? t.fg("accent", `${this.frame()} ${ACTION_LABELS[this.refreshAction].progress}…`)
406
433
  : "",
407
434
  ]
408
435
  .filter(Boolean)
@@ -417,6 +444,11 @@ export class CiStatusDialog {
417
444
  heading("Capabilities");
418
445
  this.addCapabilities(text);
419
446
  body.addChild(new Spacer(1));
447
+ if (this.healthRefresh) {
448
+ heading("Health action outcome");
449
+ for (const line of this.healthRefresh) text(` ${line}`);
450
+ body.addChild(new Spacer(1));
451
+ }
420
452
  heading("Diagnostic files · tracked-file snapshot (not a workspace-wide check)");
421
453
  this.addProblems(body, width, text);
422
454
  body.addChild(new Spacer(1));
@@ -480,11 +512,7 @@ export class CiStatusDialog {
480
512
  ).replaceAll("\\", "/");
481
513
  const counts = problemCounts(entry);
482
514
  const status =
483
- entry.status === "confirmed" && this.data.diagnostics.kind === "completed"
484
- ? counts
485
- ? ""
486
- : "no errors or warnings (confirmed)"
487
- : entry.status;
515
+ entry.status === "confirmed" && !counts ? "no errors or warnings (confirmed)" : entry.status;
488
516
  text(`${indicator} ${label} ${[counts, status, entry.reason].filter(Boolean).join(" · ")}`);
489
517
  if (entry.file === this.selectedFile)
490
518
  this.expandedRows = body.render(width).length - this.selectedRow;
@@ -521,29 +549,10 @@ export class CiStatusDialog {
521
549
  }
522
550
 
523
551
  private addDiagnosticEvidence(text: (value: string) => void): void {
524
- const observation = this.data.diagnostics;
552
+ const presentation = presentDiagnosticEvidence(this.data.diagnostics);
525
553
  const t = this.deps.theme;
526
- if (observation.kind === "not-requested") return;
527
- const evidence = observation.evidence;
528
- text(
529
- t.fg(
530
- "dim",
531
- ` ${evidence.confirmed}/${evidence.requested} confirmed tracked files · ${evidence.unconfirmed} unconfirmed · ${evidence.failed} failed · ${evidence.removed} removed`,
532
- ),
533
- );
534
- if (observation.kind === "unavailable")
535
- text(t.fg("warning", ` diagnostics unavailable — ${observation.reason}`));
536
- else if (observation.kind === "partial")
537
- text(t.fg("warning", ` diagnostic snapshot is stale or incomplete — ${observation.reason}`));
538
- else if (evidence.confirmed === 0)
539
- text(
540
- t.fg(
541
- "dim",
542
- ` No confirmed tracked files; an empty result does not establish a clean workspace.${this.deps.onCheck ? ` Use ${this.checkShortcut()?.label ?? "the check action"} to check diagnostics.` : ""}`,
543
- ),
544
- );
545
- else if (!observation.entries.length)
546
- text(t.fg("success", ` ✓ no issues in ${evidence.confirmed} confirmed tracked files`));
554
+ if (presentation.counts) text(t.fg("dim", ` ${presentation.counts}`));
555
+ text(t.fg(presentation.tone, ` ${presentation.summary}`));
547
556
  }
548
557
 
549
558
  private addDetails(text: (value: string) => void): void {
@@ -558,7 +567,7 @@ export class CiStatusDialog {
558
567
  text(t.fg("error", ` Details unavailable: ${details.message}`));
559
568
  return;
560
569
  }
561
- if (!details.current) text(t.fg("warning", " Diagnostic details are stale"));
570
+ text(t.fg("dim", ` Details: ${details.evidenceLabel}`));
562
571
  if (!details.diagnostics.length)
563
572
  text(t.fg("dim", " No error or warning messages in this snapshot"));
564
573
  for (const diagnostic of details.diagnostics.slice(0, MAX_INLINE_MESSAGES)) {
@@ -633,8 +642,17 @@ export class CiStatusDialog {
633
642
  ).find(({ input }) => !this.hasConfiguredAction(input));
634
643
  }
635
644
 
645
+ private healthShortcut() {
646
+ return (
647
+ [
648
+ { input: "h", label: "h" },
649
+ { input: "\x1b[17~", label: "F6" },
650
+ ] as const
651
+ ).find(({ input }) => !this.hasConfiguredAction(input));
652
+ }
653
+
636
654
  private refreshFailure(): string {
637
- return `${this.refreshAction === "check" ? "Check" : "Reload"} failed: ${this.refreshError}`;
655
+ return `${ACTION_LABELS[this.refreshAction].name} failed: ${this.refreshError}`;
638
656
  }
639
657
 
640
658
  private controlHints(): string {
@@ -642,6 +660,7 @@ export class CiStatusDialog {
642
660
  return [
643
661
  `${this.keyLabel("tui.select.cancel")} close`,
644
662
  this.deps.onCheck ? `${checkKey?.label ?? "unbound"} check` : "",
663
+ this.deps.onHealth ? `${this.healthShortcut()?.label ?? "unbound"} Refresh health` : "",
645
664
  `${this.keyLabel("tui.select.confirm")} expand`,
646
665
  this.deps.onRefresh && !this.hasConfiguredAction("r") ? "r reload" : "",
647
666
  !this.hasConfiguredAction("a") ? "a collapse" : "",
@@ -0,0 +1,108 @@
1
+ import { resolve } from "node:path";
2
+ import type { DiagnosticEvidenceSummary } from "@mrclrchtr/supi-lsp/api";
3
+ import type {
4
+ HealthDiagnosticObservation,
5
+ HealthWorkflowOutcome,
6
+ } from "../session/health-types.ts";
7
+ import { displayHealthPaths } from "../tool/code_health/display-paths.ts";
8
+ import {
9
+ formatProcessCrashRecovery,
10
+ formatSourceTracking,
11
+ formatStartupRetry,
12
+ } from "../tool/code_health/refresh-outcome.ts";
13
+
14
+ /** Inspector-only wording derived from existing diagnostic evidence, not cache freshness. */
15
+ export function presentDiagnosticEvidence(observation: HealthDiagnosticObservation): {
16
+ counts?: string;
17
+ summary: string;
18
+ tone: "dim" | "warning" | "success";
19
+ } {
20
+ if (observation.kind === "not-requested")
21
+ return { summary: "Diagnostics not requested.", tone: "dim" };
22
+ const evidence = observation.evidence;
23
+ const counts = `${evidence.confirmed}/${evidence.requested} confirmed tracked files · ${evidence.unconfirmed} unconfirmed · ${evidence.failed} failed · ${evidence.removed} removed`;
24
+ if (observation.kind === "unavailable")
25
+ return { counts, summary: `Diagnostics unavailable — ${observation.reason}`, tone: "warning" };
26
+ if (evidence.requested === 0)
27
+ return { counts, summary: "No tracked diagnostic evidence.", tone: "dim" };
28
+ const confirmed =
29
+ evidence.confirmed === evidence.requested &&
30
+ evidence.unconfirmed === 0 &&
31
+ evidence.failed === 0 &&
32
+ evidence.removed === 0;
33
+ if (!confirmed)
34
+ return {
35
+ counts,
36
+ summary: `Diagnostic evidence is incomplete${observation.kind === "partial" ? ` — ${observation.reason}` : "."}`,
37
+ tone: "warning",
38
+ };
39
+ const problems = observation.entries.some((entry) => entry.errors > 0 || entry.warnings > 0);
40
+ const files = `${evidence.confirmed} confirmed tracked file${evidence.confirmed === 1 ? "" : "s"}`;
41
+ return {
42
+ counts,
43
+ summary: problems ? `Errors or warnings reported in ${files}.` : `✓ no issues in ${files}`,
44
+ tone: problems ? "warning" : "success",
45
+ };
46
+ }
47
+
48
+ /** Select only the expanded file's evidence from the same snapshot as its messages. */
49
+ export function presentDiagnosticDetails(
50
+ evidence: DiagnosticEvidenceSummary,
51
+ cwd: string,
52
+ file: string,
53
+ ): string {
54
+ const document = evidence.documents.find(
55
+ (entry) => resolve(cwd, entry.file) === resolve(cwd, file),
56
+ );
57
+ return document?.status ?? "unconfirmed — no file-specific confirmation evidence";
58
+ }
59
+
60
+ /** A failed collection retains action facts separately from the previous coherent evidence view. */
61
+ export class CiHealthRefreshError extends Error {
62
+ readonly healthRefresh: readonly string[] | undefined;
63
+
64
+ constructor(
65
+ stage: string,
66
+ options: { cause: unknown; elapsedMs: number; healthRefresh?: readonly string[] },
67
+ ) {
68
+ const reason = options.cause instanceof Error ? options.cause.message : String(options.cause);
69
+ const elapsed = (Math.max(0, options.elapsedMs) / 1_000).toFixed(1);
70
+ super(`${stage}: ${reason} (${elapsed}s elapsed; previous view retained)`, options);
71
+ this.healthRefresh = options.healthRefresh;
72
+ }
73
+ }
74
+
75
+ /** Present this interaction's action outcome without retaining its diagnostic evidence or history. */
76
+ export function presentHealthRefresh(
77
+ outcome: HealthWorkflowOutcome,
78
+ elapsedMs: number,
79
+ cwd: string,
80
+ ): string[] {
81
+ const elapsed = `${(Math.max(0, elapsedMs) / 1_000).toFixed(1)}s`;
82
+ const prefix = "Refresh health";
83
+ if (outcome.kind !== "completed")
84
+ return [
85
+ `${prefix}: ${outcome.kind === "unavailable" ? "unavailable" : "failed"} (${elapsed}) — ${outcome.kind === "unavailable" ? outcome.reason : outcome.message}`,
86
+ ];
87
+ const attempt = displayHealthPaths(outcome.data, cwd).refresh;
88
+ const status =
89
+ attempt.kind === "completed"
90
+ ? "completed"
91
+ : attempt.kind === "failed"
92
+ ? "failed"
93
+ : "unavailable";
94
+ return [
95
+ `${prefix}: ${status} (${elapsed})${"reason" in attempt ? ` — ${attempt.reason}` : ""}`,
96
+ "Action completion is not diagnostic confirmation.",
97
+ ...(attempt.kind === "completed" || attempt.kind === "failed"
98
+ ? [
99
+ formatProcessCrashRecovery(attempt.processCrashRecovery),
100
+ formatStartupRetry(attempt.startupRetry),
101
+ attempt.restartedClients
102
+ ? `${attempt.restartedClients} diagnostic recovery client(s) restarted`
103
+ : null,
104
+ formatSourceTracking(attempt.sourceTracking),
105
+ ].filter((line): line is string => line !== null)
106
+ : []),
107
+ ];
108
+ }
@@ -310,13 +310,13 @@ export function buildSimpleCompact(data: Record<string, unknown> | undefined, th
310
310
  const confidence = typeof data.confidence === "string" ? data.confidence : "";
311
311
  const dot = theme.fg("dim", "·");
312
312
  const segments = badges.map((badge) => theme.fg("success", theme.bold(badge)));
313
- const unknownNestingCount = data.groupUnknownNestingCount;
313
+ const unknownLevelCount = data.outlineUnknownLevelCount;
314
314
  if (
315
- typeof unknownNestingCount === "number" &&
316
- Number.isInteger(unknownNestingCount) &&
317
- unknownNestingCount > 0
315
+ typeof unknownLevelCount === "number" &&
316
+ Number.isInteger(unknownLevelCount) &&
317
+ unknownLevelCount > 0
318
318
  ) {
319
- segments.push(theme.fg("warning", `${unknownNestingCount} hierarchy unknown`));
319
+ segments.push(theme.fg("warning", `${unknownLevelCount} position unknown`));
320
320
  }
321
321
  if (confidence) {
322
322
  segments.push(`${theme.fg("dim", "confidence")} ${theme.fg("muted", confidence)}`);
@@ -349,13 +349,13 @@ function structuredDetailLines(data: Record<string, unknown>): string[] {
349
349
 
350
350
  lines.push(...inspectSectionStatusLines(data.sections));
351
351
 
352
- const unknownNestingCount = data.groupUnknownNestingCount;
352
+ const unknownLevelCount = data.outlineUnknownLevelCount;
353
353
  if (
354
- typeof unknownNestingCount === "number" &&
355
- Number.isInteger(unknownNestingCount) &&
356
- unknownNestingCount > 0
354
+ typeof unknownLevelCount === "number" &&
355
+ Number.isInteger(unknownLevelCount) &&
356
+ unknownLevelCount > 0
357
357
  ) {
358
- lines.push(`hierarchy unknown: ${unknownNestingCount}`);
358
+ lines.push(`position unknown: ${unknownLevelCount}`);
359
359
  }
360
360
 
361
361
  const checkNext = data.checkNext;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "11.2.0",
3
+ "version": "11.4.0",
4
4
  "description": "Shared settings, configuration, reporting, and session infrastructure",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -0,0 +1,110 @@
1
+ // Session-provided Web tools for SuPi child sessions (Agent Runs and Reviewer Sessions).
2
+ //
3
+ // The loaded supi-web extension answers a synchronous request on the parent event bus.
4
+ // Consumers never depend on supi-web; when it is absent or provides no tools, the
5
+ // request returns undefined and the child simply lacks Web tools.
6
+
7
+ import type { ExtensionAPI, ExtensionFactory } from "@earendil-works/pi-coding-agent";
8
+
9
+ /** Web tools that child sessions may receive when the containing session provides them. */
10
+ export const CHILD_WEB_TOOL_NAMES = [
11
+ "web_fetch_md",
12
+ "web_search",
13
+ "web_docs_search",
14
+ "web_docs_fetch",
15
+ ] as const;
16
+
17
+ /** One session-provided Web tool name. */
18
+ export type ChildWebToolName = (typeof CHILD_WEB_TOOL_NAMES)[number];
19
+
20
+ /**
21
+ * Web tools currently callable in the containing session plus a child-only extension
22
+ * factory that registers them. The factory must not capture the parent session; it may
23
+ * capture plain data such as the containing session's configuration directory.
24
+ */
25
+ export interface ChildWebToolProvision {
26
+ readonly toolNames: readonly ChildWebToolName[];
27
+ /** Register the requested subset of `toolNames` in a child session. */
28
+ readonly createFactory: (toolNames: readonly ChildWebToolName[]) => ExtensionFactory;
29
+ }
30
+
31
+ /** Plain containing-session data supplied with a child Web tool request. */
32
+ export interface ChildWebToolsRequestContext {
33
+ /**
34
+ * Working directory whose SuPi configuration governs Web settings such as Firecrawl.
35
+ * Children with a different cwd (for example a frozen Review Workspace) keep this policy.
36
+ */
37
+ readonly configCwd: string;
38
+ }
39
+
40
+ type EventBusLike = Pick<ExtensionAPI["events"], "on" | "emit">;
41
+
42
+ const REQUEST_CHANNEL = "supi:child-web-tools:request";
43
+ const RESPONSE_CHANNEL = "supi:child-web-tools:response";
44
+
45
+ interface ChildWebToolsRequest extends ChildWebToolsRequestContext {
46
+ readonly requestId: string;
47
+ }
48
+
49
+ interface ChildWebToolsResponse {
50
+ readonly requestId: string;
51
+ readonly provision: ChildWebToolProvision;
52
+ }
53
+
54
+ let nextRequestId = 0;
55
+
56
+ /**
57
+ * Answer child Web tool requests on the parent event bus. The callback must be synchronous
58
+ * because Pi's event bus does not await listeners. Returns an unsubscribe function.
59
+ */
60
+ export function provideChildWebTools(
61
+ events: EventBusLike,
62
+ resolve: (context: ChildWebToolsRequestContext) => ChildWebToolProvision | undefined,
63
+ ): () => void {
64
+ return events.on(REQUEST_CHANNEL, (data) => {
65
+ const request = data as Partial<ChildWebToolsRequest> | undefined;
66
+ if (typeof request?.requestId !== "string" || typeof request.configCwd !== "string") return;
67
+ const { requestId, configCwd } = request;
68
+ const provision = resolve({ configCwd });
69
+ if (!provision || provision.toolNames.length === 0) return;
70
+ events.emit(RESPONSE_CHANNEL, { requestId, provision } satisfies ChildWebToolsResponse);
71
+ });
72
+ }
73
+
74
+ /** Capture the Web tools the containing session currently provides, if any. */
75
+ export function requestChildWebTools(
76
+ events: EventBusLike,
77
+ context: ChildWebToolsRequestContext,
78
+ ): ChildWebToolProvision | undefined {
79
+ const requestId = `child-web-${process.pid}-${++nextRequestId}`;
80
+ let provision: ChildWebToolProvision | undefined;
81
+ const unsubscribe = events.on(RESPONSE_CHANNEL, (data) => {
82
+ const response = data as Partial<ChildWebToolsResponse> | undefined;
83
+ if (response?.requestId === requestId && response.provision) provision = response.provision;
84
+ });
85
+ try {
86
+ events.emit(REQUEST_CHANNEL, { requestId, ...context } satisfies ChildWebToolsRequest);
87
+ } finally {
88
+ unsubscribe();
89
+ }
90
+ return provision;
91
+ }
92
+
93
+ /**
94
+ * Return the Web tools callable in a session under Pi's exposure rules: active `direct`
95
+ * tools, plus registered `codemode` and `deferred` tools. `model-only` and `hidden`
96
+ * tools are not callable.
97
+ */
98
+ export function callableChildWebToolNames(
99
+ pi: Pick<ExtensionAPI, "getAllTools" | "getActiveTools">,
100
+ ): ChildWebToolName[] {
101
+ const active = new Set(pi.getActiveTools());
102
+ const exposures = new Map(
103
+ pi.getAllTools().map((tool) => [tool.name, tool.exposure ?? "direct"] as const),
104
+ );
105
+ return CHILD_WEB_TOOL_NAMES.filter((name) => {
106
+ const exposure = exposures.get(name);
107
+ if (exposure === "direct") return active.has(name);
108
+ return exposure === "codemode" || exposure === "deferred";
109
+ });
110
+ }
@@ -1,5 +1,16 @@
1
1
  // supi-core session domain — session utilities and registries.
2
2
 
3
+ export type {
4
+ ChildWebToolName,
5
+ ChildWebToolProvision,
6
+ ChildWebToolsRequestContext,
7
+ } from "./child-web-tools.ts";
8
+ export {
9
+ CHILD_WEB_TOOL_NAMES,
10
+ callableChildWebToolNames,
11
+ provideChildWebTools,
12
+ requestChildWebTools,
13
+ } from "./child-web-tools.ts";
3
14
  export { createRegistry, createSessionStateRegistry } from "./registry-utils.ts";
4
15
  export type {
5
16
  SessionCapabilitySkill,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-review",
3
- "version": "11.2.0",
3
+ "version": "11.4.0",
4
4
  "description": "Parallel inspection-only reviews of exact Git targets",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,13 +27,14 @@
27
27
  ],
28
28
  "type": "module",
29
29
  "files": [
30
+ "CHANGELOG.md",
30
31
  "src/**/*.ts",
31
32
  "README.md"
32
33
  ],
33
34
  "dependencies": {
34
- "@mrclrchtr/supi-agent-runtime": "11.2.0",
35
- "@mrclrchtr/supi-core": "11.2.0",
36
- "@mrclrchtr/supi-code-intelligence": "11.2.0"
35
+ "@mrclrchtr/supi-agent-runtime": "11.4.0",
36
+ "@mrclrchtr/supi-core": "11.4.0",
37
+ "@mrclrchtr/supi-code-intelligence": "11.4.0"
37
38
  },
38
39
  "bundledDependencies": [
39
40
  "@mrclrchtr/supi-agent-runtime",
package/src/config.ts CHANGED
@@ -22,6 +22,8 @@ export interface ReviewConfig extends Record<string, unknown> {
22
22
  agentToolEnabled: boolean;
23
23
  /** Enable PI codemode scripting and scoped auxiliary models for Reviewer investigation. */
24
24
  reviewerCodemodeEnabled: boolean;
25
+ /** Enable Reviewer Web Access: session-provided Web tools during Reviewer investigation. */
26
+ reviewerWebEnabled: boolean;
25
27
  /** Canonical reviewer model id, or `current` for the active session model. */
26
28
  agentModel: string;
27
29
  /** Canonical Planner model id, or `current` for the active session model. */
@@ -46,6 +48,7 @@ export const REVIEW_CONFIG_SECTION = "review";
46
48
  export const REVIEW_DEFAULTS: ReviewConfig = {
47
49
  agentToolEnabled: true,
48
50
  reviewerCodemodeEnabled: false,
51
+ reviewerWebEnabled: false,
49
52
  agentModel: CURRENT_SESSION_REVIEW_MODEL,
50
53
  plannerModel: CURRENT_SESSION_REVIEW_MODEL,
51
54
  reviewerThinkingLevel: REVIEWER_DEFAULT_THINKING_LEVEL,
@@ -77,6 +80,7 @@ export function loadReviewConfig(cwd: string, homeDir?: string): ReviewConfig {
77
80
  raw.reviewerCodemodeEnabled,
78
81
  REVIEW_DEFAULTS.reviewerCodemodeEnabled,
79
82
  ),
83
+ reviewerWebEnabled: readBoolean(raw.reviewerWebEnabled, REVIEW_DEFAULTS.reviewerWebEnabled),
80
84
  agentModel: readModel(raw.agentModel, REVIEW_DEFAULTS.agentModel),
81
85
  plannerModel: readModel(raw.plannerModel, REVIEW_DEFAULTS.plannerModel),
82
86
  reviewerThinkingLevel: readThinkingLevel(
@@ -138,6 +142,13 @@ export function registerReviewSettings(pi: ExtensionAPI, homeDir?: string): void
138
142
  description:
139
143
  "Enable codemode scripting and auxiliary-model requests during Reviewer investigation; may transmit repository evidence and incur provider costs.",
140
144
  },
145
+ {
146
+ kind: "boolean",
147
+ key: "reviewerWebEnabled",
148
+ label: "Reviewer web access",
149
+ description:
150
+ "Give Reviewers the Web tools this session provides (supi-web) during investigation; queries and URLs reach external services.",
151
+ },
141
152
  {
142
153
  kind: "modelPicker",
143
154
  key: "agentModel",
@@ -4,6 +4,7 @@ import {
4
4
  SettingsManager,
5
5
  } from "@earendil-works/pi-coding-agent";
6
6
  import headlessInspectionProfile from "@mrclrchtr/supi-code-intelligence/headless";
7
+ import type { ChildWebToolProvision } from "@mrclrchtr/supi-core/session";
7
8
 
8
9
  /** Loader and settings manager preconfigured for an isolated child session. */
9
10
  export interface IsolatedChildResources {
@@ -16,6 +17,8 @@ export interface IsolatedChildResourceOptions {
16
17
  headlessInspection?: boolean;
17
18
  /** Load PI codemode only for an explicitly opted-in Reviewer. */
18
19
  codemode?: boolean;
20
+ /** Session-provided Web tools for Reviewer Web Access; omitted means none. */
21
+ webTools?: ChildWebToolProvision;
19
22
  projectTrusted?: boolean;
20
23
  }
21
24
 
@@ -35,21 +38,26 @@ export function createIsolatedChildResources(
35
38
  retry: { enabled: false },
36
39
  });
37
40
  settingsManager.setProjectTrusted(options.projectTrusted ?? false);
41
+ const extensionFactories = [
42
+ ...(options.headlessInspection
43
+ ? [{ name: "supi-code-intelligence-headless", factory: headlessInspectionProfile }]
44
+ : []),
45
+ ...(options.codemode ? [createCodemodeExtension({ models: true, mode: "on" })] : []),
46
+ ...(options.webTools && options.webTools.toolNames.length > 0
47
+ ? [
48
+ {
49
+ name: "supi-web-child",
50
+ factory: options.webTools.createFactory(options.webTools.toolNames),
51
+ },
52
+ ]
53
+ : []),
54
+ ];
38
55
  const loader = new DefaultResourceLoader({
39
56
  cwd,
40
57
  agentDir,
41
58
  settingsManager,
42
59
  noExtensions: true,
43
- ...(options.headlessInspection || options.codemode
44
- ? {
45
- extensionFactories: [
46
- ...(options.headlessInspection
47
- ? [{ name: "supi-code-intelligence-headless", factory: headlessInspectionProfile }]
48
- : []),
49
- ...(options.codemode ? [createCodemodeExtension({ models: true, mode: "on" })] : []),
50
- ],
51
- }
52
- : {}),
60
+ ...(extensionFactories.length > 0 ? { extensionFactories } : {}),
53
61
  noSkills: true,
54
62
  noPromptTemplates: true,
55
63
  noThemes: true,