@descryy/mcp 0.6.0 → 0.7.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 (260) hide show
  1. package/dist/action-handshake.d.ts +8 -75
  2. package/dist/action-handshake.d.ts.map +1 -1
  3. package/dist/action-handshake.js +9 -79
  4. package/dist/action-handshake.js.map +1 -1
  5. package/dist/bin/descry-mcp.d.ts +4 -15
  6. package/dist/bin/descry-mcp.d.ts.map +1 -1
  7. package/dist/bin/descry-mcp.js +12 -42
  8. package/dist/bin/descry-mcp.js.map +1 -1
  9. package/dist/browser/driver.d.ts +59 -224
  10. package/dist/browser/driver.d.ts.map +1 -1
  11. package/dist/browser/driver.js +9 -55
  12. package/dist/browser/driver.js.map +1 -1
  13. package/dist/browser/evidence.d.ts +10 -43
  14. package/dist/browser/evidence.d.ts.map +1 -1
  15. package/dist/browser/evidence.js +20 -54
  16. package/dist/browser/evidence.js.map +1 -1
  17. package/dist/browser/fake-driver.d.ts +4 -16
  18. package/dist/browser/fake-driver.d.ts.map +1 -1
  19. package/dist/browser/fake-driver.js +6 -20
  20. package/dist/browser/fake-driver.js.map +1 -1
  21. package/dist/browser/graph-write.d.ts +4 -45
  22. package/dist/browser/graph-write.d.ts.map +1 -1
  23. package/dist/browser/graph-write.js +8 -53
  24. package/dist/browser/graph-write.js.map +1 -1
  25. package/dist/browser/playwright-driver.d.ts +7 -91
  26. package/dist/browser/playwright-driver.d.ts.map +1 -1
  27. package/dist/browser/playwright-driver.js +40 -194
  28. package/dist/browser/playwright-driver.js.map +1 -1
  29. package/dist/browser/provider.d.ts +5 -34
  30. package/dist/browser/provider.d.ts.map +1 -1
  31. package/dist/browser/provider.js +4 -24
  32. package/dist/browser/provider.js.map +1 -1
  33. package/dist/browser/registry.d.ts +26 -106
  34. package/dist/browser/registry.d.ts.map +1 -1
  35. package/dist/browser/registry.js +20 -77
  36. package/dist/browser/registry.js.map +1 -1
  37. package/dist/browser/scenario-resolve.d.ts +10 -44
  38. package/dist/browser/scenario-resolve.d.ts.map +1 -1
  39. package/dist/browser/scenario-resolve.js +10 -41
  40. package/dist/browser/scenario-resolve.js.map +1 -1
  41. package/dist/browser/scenario-runner.d.ts +12 -70
  42. package/dist/browser/scenario-runner.d.ts.map +1 -1
  43. package/dist/browser/scenario-runner.js +30 -90
  44. package/dist/browser/scenario-runner.js.map +1 -1
  45. package/dist/browser/stack-parser.d.ts +4 -28
  46. package/dist/browser/stack-parser.d.ts.map +1 -1
  47. package/dist/browser/stack-parser.js +12 -39
  48. package/dist/browser/stack-parser.js.map +1 -1
  49. package/dist/browser/tool-support.d.ts +20 -67
  50. package/dist/browser/tool-support.d.ts.map +1 -1
  51. package/dist/browser/tool-support.js +21 -65
  52. package/dist/browser/tool-support.js.map +1 -1
  53. package/dist/browser/url-scheme.d.ts +14 -0
  54. package/dist/browser/url-scheme.d.ts.map +1 -0
  55. package/dist/browser/url-scheme.js +38 -0
  56. package/dist/browser/url-scheme.js.map +1 -0
  57. package/dist/cancellation.d.ts +11 -46
  58. package/dist/cancellation.d.ts.map +1 -1
  59. package/dist/cancellation.js +11 -46
  60. package/dist/cancellation.js.map +1 -1
  61. package/dist/capped.d.ts +9 -33
  62. package/dist/capped.d.ts.map +1 -1
  63. package/dist/capped.js +7 -27
  64. package/dist/capped.js.map +1 -1
  65. package/dist/disclosure-ledger.d.ts +6 -30
  66. package/dist/disclosure-ledger.d.ts.map +1 -1
  67. package/dist/disclosure-ledger.js +4 -26
  68. package/dist/disclosure-ledger.js.map +1 -1
  69. package/dist/index.d.ts +10 -26
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +7 -17
  72. package/dist/index.js.map +1 -1
  73. package/dist/module-trust.d.ts +24 -0
  74. package/dist/module-trust.d.ts.map +1 -0
  75. package/dist/module-trust.js +60 -0
  76. package/dist/module-trust.js.map +1 -0
  77. package/dist/path-confinement.d.ts +31 -0
  78. package/dist/path-confinement.d.ts.map +1 -0
  79. package/dist/path-confinement.js +44 -0
  80. package/dist/path-confinement.js.map +1 -0
  81. package/dist/protocol.d.ts +10 -53
  82. package/dist/protocol.d.ts.map +1 -1
  83. package/dist/protocol.js +14 -60
  84. package/dist/protocol.js.map +1 -1
  85. package/dist/registry.d.ts +10 -58
  86. package/dist/registry.d.ts.map +1 -1
  87. package/dist/registry.js +38 -90
  88. package/dist/registry.js.map +1 -1
  89. package/dist/render.d.ts +42 -11
  90. package/dist/render.d.ts.map +1 -1
  91. package/dist/render.js +74 -10
  92. package/dist/render.js.map +1 -1
  93. package/dist/runtime-registry.d.ts +7 -66
  94. package/dist/runtime-registry.d.ts.map +1 -1
  95. package/dist/runtime-registry.js +39 -114
  96. package/dist/runtime-registry.js.map +1 -1
  97. package/dist/scenarios/index.d.ts +1 -1
  98. package/dist/scenarios/index.d.ts.map +1 -1
  99. package/dist/scenarios/index.js +1 -1
  100. package/dist/scenarios/index.js.map +1 -1
  101. package/dist/scenarios/parse.d.ts +4 -18
  102. package/dist/scenarios/parse.d.ts.map +1 -1
  103. package/dist/scenarios/parse.js +14 -34
  104. package/dist/scenarios/parse.js.map +1 -1
  105. package/dist/scenarios/scenario.d.ts +18 -74
  106. package/dist/scenarios/scenario.d.ts.map +1 -1
  107. package/dist/scenarios/scenario.js +7 -34
  108. package/dist/scenarios/scenario.js.map +1 -1
  109. package/dist/scenarios/storage.d.ts +11 -41
  110. package/dist/scenarios/storage.d.ts.map +1 -1
  111. package/dist/scenarios/storage.js +57 -47
  112. package/dist/scenarios/storage.js.map +1 -1
  113. package/dist/server.d.ts.map +1 -1
  114. package/dist/server.js +37 -17
  115. package/dist/server.js.map +1 -1
  116. package/dist/session.d.ts +67 -259
  117. package/dist/session.d.ts.map +1 -1
  118. package/dist/session.js +69 -250
  119. package/dist/session.js.map +1 -1
  120. package/dist/tools/analyze.d.ts +24 -118
  121. package/dist/tools/analyze.d.ts.map +1 -1
  122. package/dist/tools/analyze.js +44 -166
  123. package/dist/tools/analyze.js.map +1 -1
  124. package/dist/tools/browser-click.d.ts +3 -21
  125. package/dist/tools/browser-click.d.ts.map +1 -1
  126. package/dist/tools/browser-click.js +10 -31
  127. package/dist/tools/browser-click.js.map +1 -1
  128. package/dist/tools/browser-close-session.d.ts +4 -13
  129. package/dist/tools/browser-close-session.d.ts.map +1 -1
  130. package/dist/tools/browser-close-session.js +4 -13
  131. package/dist/tools/browser-close-session.js.map +1 -1
  132. package/dist/tools/browser-fill.d.ts +5 -36
  133. package/dist/tools/browser-fill.d.ts.map +1 -1
  134. package/dist/tools/browser-fill.js +9 -44
  135. package/dist/tools/browser-fill.js.map +1 -1
  136. package/dist/tools/browser-navigate.d.ts +6 -27
  137. package/dist/tools/browser-navigate.d.ts.map +1 -1
  138. package/dist/tools/browser-navigate.js +6 -23
  139. package/dist/tools/browser-navigate.js.map +1 -1
  140. package/dist/tools/browser-run-scenario.d.ts +5 -31
  141. package/dist/tools/browser-run-scenario.d.ts.map +1 -1
  142. package/dist/tools/browser-run-scenario.js +10 -46
  143. package/dist/tools/browser-run-scenario.js.map +1 -1
  144. package/dist/tools/browser-save-scenario.d.ts +3 -28
  145. package/dist/tools/browser-save-scenario.d.ts.map +1 -1
  146. package/dist/tools/browser-save-scenario.js +15 -74
  147. package/dist/tools/browser-save-scenario.js.map +1 -1
  148. package/dist/tools/browser-snapshot.d.ts +6 -39
  149. package/dist/tools/browser-snapshot.d.ts.map +1 -1
  150. package/dist/tools/browser-snapshot.js +4 -31
  151. package/dist/tools/browser-snapshot.js.map +1 -1
  152. package/dist/tools/browser-start-session.d.ts +4 -23
  153. package/dist/tools/browser-start-session.d.ts.map +1 -1
  154. package/dist/tools/browser-start-session.js +33 -55
  155. package/dist/tools/browser-start-session.js.map +1 -1
  156. package/dist/tools/browser-type.d.ts +5 -35
  157. package/dist/tools/browser-type.d.ts.map +1 -1
  158. package/dist/tools/browser-type.js +10 -45
  159. package/dist/tools/browser-type.js.map +1 -1
  160. package/dist/tools/contracts.d.ts +9 -86
  161. package/dist/tools/contracts.d.ts.map +1 -1
  162. package/dist/tools/contracts.js +24 -80
  163. package/dist/tools/contracts.js.map +1 -1
  164. package/dist/tools/cross-pr.d.ts +42 -30
  165. package/dist/tools/cross-pr.d.ts.map +1 -1
  166. package/dist/tools/cross-pr.js +81 -62
  167. package/dist/tools/cross-pr.js.map +1 -1
  168. package/dist/tools/git-diff.d.ts +18 -2
  169. package/dist/tools/git-diff.d.ts.map +1 -1
  170. package/dist/tools/git-diff.js +118 -26
  171. package/dist/tools/git-diff.js.map +1 -1
  172. package/dist/tools/git-history.d.ts +5 -16
  173. package/dist/tools/git-history.d.ts.map +1 -1
  174. package/dist/tools/git-history.js +3 -10
  175. package/dist/tools/git-history.js.map +1 -1
  176. package/dist/tools/history.d.ts +4 -33
  177. package/dist/tools/history.d.ts.map +1 -1
  178. package/dist/tools/history.js +6 -31
  179. package/dist/tools/history.js.map +1 -1
  180. package/dist/tools/impact.d.ts +7 -51
  181. package/dist/tools/impact.d.ts.map +1 -1
  182. package/dist/tools/impact.js +15 -67
  183. package/dist/tools/impact.js.map +1 -1
  184. package/dist/tools/index.d.ts +3 -8
  185. package/dist/tools/index.d.ts.map +1 -1
  186. package/dist/tools/index.js +3 -8
  187. package/dist/tools/index.js.map +1 -1
  188. package/dist/tools/kit.d.ts +66 -113
  189. package/dist/tools/kit.d.ts.map +1 -1
  190. package/dist/tools/kit.js +60 -28
  191. package/dist/tools/kit.js.map +1 -1
  192. package/dist/tools/link-workspace.d.ts +7 -45
  193. package/dist/tools/link-workspace.d.ts.map +1 -1
  194. package/dist/tools/link-workspace.js +10 -48
  195. package/dist/tools/link-workspace.js.map +1 -1
  196. package/dist/tools/lookup.d.ts +4 -14
  197. package/dist/tools/lookup.d.ts.map +1 -1
  198. package/dist/tools/lookup.js +4 -14
  199. package/dist/tools/lookup.js.map +1 -1
  200. package/dist/tools/mark-incident.d.ts +7 -54
  201. package/dist/tools/mark-incident.d.ts.map +1 -1
  202. package/dist/tools/mark-incident.js +15 -68
  203. package/dist/tools/mark-incident.js.map +1 -1
  204. package/dist/tools/observe-runtime.d.ts +27 -210
  205. package/dist/tools/observe-runtime.d.ts.map +1 -1
  206. package/dist/tools/observe-runtime.js +257 -435
  207. package/dist/tools/observe-runtime.js.map +1 -1
  208. package/dist/tools/observe-tests.d.ts +9 -100
  209. package/dist/tools/observe-tests.d.ts.map +1 -1
  210. package/dist/tools/observe-tests.js +24 -152
  211. package/dist/tools/observe-tests.js.map +1 -1
  212. package/dist/tools/pr-analysis.d.ts +18 -2
  213. package/dist/tools/pr-analysis.d.ts.map +1 -1
  214. package/dist/tools/pr-analysis.js +73 -23
  215. package/dist/tools/pr-analysis.js.map +1 -1
  216. package/dist/tools/pre-push.d.ts +68 -16
  217. package/dist/tools/pre-push.d.ts.map +1 -1
  218. package/dist/tools/pre-push.js +98 -35
  219. package/dist/tools/pre-push.js.map +1 -1
  220. package/dist/tools/propagation.d.ts +11 -53
  221. package/dist/tools/propagation.d.ts.map +1 -1
  222. package/dist/tools/propagation.js +14 -57
  223. package/dist/tools/propagation.js.map +1 -1
  224. package/dist/tools/questions.d.ts +13 -63
  225. package/dist/tools/questions.d.ts.map +1 -1
  226. package/dist/tools/questions.js +33 -105
  227. package/dist/tools/questions.js.map +1 -1
  228. package/dist/tools/refusal-fetch.d.ts +4 -40
  229. package/dist/tools/refusal-fetch.d.ts.map +1 -1
  230. package/dist/tools/refusal-fetch.js +4 -40
  231. package/dist/tools/refusal-fetch.js.map +1 -1
  232. package/dist/tools/runtime-incident.d.ts +4 -63
  233. package/dist/tools/runtime-incident.d.ts.map +1 -1
  234. package/dist/tools/runtime-incident.js +10 -87
  235. package/dist/tools/runtime-incident.js.map +1 -1
  236. package/dist/tools/scope.d.ts +7 -25
  237. package/dist/tools/scope.d.ts.map +1 -1
  238. package/dist/tools/scope.js +10 -29
  239. package/dist/tools/scope.js.map +1 -1
  240. package/dist/tools/similar-incidents.d.ts +11 -86
  241. package/dist/tools/similar-incidents.d.ts.map +1 -1
  242. package/dist/tools/similar-incidents.js +7 -71
  243. package/dist/tools/similar-incidents.js.map +1 -1
  244. package/dist/tools/validate.d.ts +14 -69
  245. package/dist/tools/validate.d.ts.map +1 -1
  246. package/dist/tools/validate.js +23 -74
  247. package/dist/tools/validate.js.map +1 -1
  248. package/dist/tools/verification-status.d.ts +9 -64
  249. package/dist/tools/verification-status.d.ts.map +1 -1
  250. package/dist/tools/verification-status.js +9 -62
  251. package/dist/tools/verification-status.js.map +1 -1
  252. package/dist/tools/verify-claim.d.ts +5 -52
  253. package/dist/tools/verify-claim.d.ts.map +1 -1
  254. package/dist/tools/verify-claim.js +6 -56
  255. package/dist/tools/verify-claim.js.map +1 -1
  256. package/dist/transport.d.ts +15 -52
  257. package/dist/transport.d.ts.map +1 -1
  258. package/dist/transport.js +16 -60
  259. package/dist/transport.js.map +1 -1
  260. package/package.json +30 -21
@@ -1,48 +1,14 @@
1
- /**
2
- * `analyze` — read the repository into the graph.
3
- *
4
- * The only tool that writes. Everything else queries what this produced, so its
5
- * disclosures are the ones that matter most: a query cannot report a gap it was
6
- * never told about, and this is where the gaps become known.
7
- *
8
- * ## What is disclosed, and why each one earns its line
9
- *
10
- * - **Sources that would not load.** "No problem found in your Python service"
11
- * and "your Python adapter did not import" are different statements (§20.2).
12
- * - **Sources that loaded and did not claim the repository.** The same
13
- * distinction, one level up: an unanalysed language is *not analysable*, not
14
- * clean.
15
- * - **The resolution each source reached.** A run that degraded to R0 because a
16
- * virtualenv was missing produces a graph that looks identical to a healthy
17
- * one until you read this number. Principle 3 then caps everything above it.
18
- * - **Identity collisions.** Two things arrived under one id. There is no
19
- * correct merge, so the builder reports rather than picks (DEC-024).
20
- * - **Evicted files.** Rows a previous run owned and this one did not re-supply.
21
- * They are gone from the graph; a query over them will now find nothing, and
22
- * nothing would otherwise say why.
23
- * - **The workspace join.** Zero cross-repo joins looks exactly like success — and, on the ordinary
24
- * single-repository run every shipped call actually makes, is the *only* value possible, which is
25
- * narrated too (`crossRepoJoinNote`) rather than left for a reader to infer from `repos.length`.
26
- *
27
- * ## The repo identity warning
28
- *
29
- * With no `.descry/config.json`, `repo` defaults to the directory name — and
30
- * every repo-scoped node id is a hash over it. Clone into a differently-named
31
- * folder and every id changes, which silently destroys incident links and
32
- * `CHANGES_WITH` weights. That is DEC-004's failure arriving through the one
33
- * field a default cannot get right, so it is stated on every unconfigured run.
34
- */
1
+ /** `analyze` — the only tool that writes to the graph. Disclosures matter most: a
2
+ * query can't report a gap it wasn't told about. Discloses: sources that failed or
3
+ * didn't claim the repo (§20.2 — not-analysable ≠ clean), each source's resolution
4
+ * reached (caps reliability, rule 3), id collisions (DEC-024), evicted files, and the
5
+ * cross-repo join count. No config → `repo` defaults to dir name, hashed into every id (DEC-004). */
35
6
  import type { IRBatch, UnresolvedRef } from "@descryy/ir";
36
7
  import type { BuildResult, JoinMetric, StoreCounts } from "@descryy/core";
37
8
  import { type ToolDefinition } from "./kit.ts";
38
9
  import { type DescryConfig } from "../session.ts";
39
- /**
40
- * What one source read, and how well.
41
- *
42
- * `reachedResolution` is the number principle 3 caps everything above it by. A
43
- * run that degraded to R0 because a dependency was missing produces a graph
44
- * that looks identical to a healthy one until this field is read.
45
- */
10
+ /** What one source read, and how well. `reachedResolution` is what rule 3 caps everything
11
+ * above it by — a run degraded to R0 looks identical to a healthy one until this is read. */
46
12
  export interface SourceRun {
47
13
  readonly source: string;
48
14
  readonly files: number;
@@ -50,55 +16,23 @@ export interface SourceRun {
50
16
  readonly edges: number;
51
17
  /** Refusal-ledger rows: gaps this source disclosed rather than guessed at. */
52
18
  readonly unresolved: number;
53
- /**
54
- * Files this source attempted but could not parse — absent from the graph
55
- * entirely, not confirmed clean. Never counted in `files`; see
56
- * `IRBatch.skippedFiles`.
57
- */
19
+ /** Files attempted but not parsed — absent from the graph, not confirmed clean. Never
20
+ * counted in `files`; see `IRBatch.skippedFiles`. */
58
21
  readonly skippedFiles: number;
59
22
  readonly reachedResolution: number;
60
23
  /** Wall-clock time this source took, including the git-history reader. */
61
24
  readonly ms: number;
62
25
  }
63
- /**
64
- * The two batch fields a producer is allowed not to have heard of.
65
- *
66
- * `normaliseBatch` — every batch's gatekeeper on the way to the store — treats
67
- * `skippedFiles` and `unresolved` as absent-means-none, and says why in its own
68
- * comment: absent is what a producer not yet updated to report them sends. That
69
- * is a deliberate compatibility promise to adapters compiled against an older
70
- * `@descryy/ir`, and adapters are versioned and released on their own cadence
71
- * precisely so that can happen.
72
- *
73
- * This function is that promise, applied one layer earlier. `analyze` used to
74
- * read `.length` off both directly, which meant an adapter the Normaliser would
75
- * have happily accepted crashed the run before it ever got there — reported as
76
- * the *adapter* failing, taking a whole language into "not analysable". A real
77
- * shipped adapter did exactly that while returning over a thousand perfectly
78
- * good nodes.
79
- *
80
- * Absent and malformed stay different, which is the line the Normaliser draws
81
- * too: a missing field is an older producer, a field holding a string is a
82
- * broken one, and defaulting the second away would hide a real defect.
83
- */
26
+ /** `skippedFiles`/`unresolved`: absent means an adapter compiled against an older
27
+ * `@descryy/ir`, not malformed — a real adapter once crashed here on `.length` of
28
+ * undefined despite returning 1000+ good nodes. Absent ⇒ old producer; wrong type ⇒ broken, never defaulted away. */
84
29
  export declare function optionalBatchLists(batch: IRBatch): {
85
30
  readonly skippedFiles: IRBatch["skippedFiles"];
86
31
  readonly unresolved: IRBatch["unresolved"];
87
32
  };
88
- /**
89
- * What went wrong, and — the part that was missing — *whose* fault it was.
90
- *
91
- * The original note said "<source> failed while reading this repository" for
92
- * anything thrown anywhere in the loop, including inside Descry's own code
93
- * after the adapter had returned successfully. That is how a `TypeError` thrown
94
- * in this very file came to be reported as an adapter failing: a developer
95
- * reading it would go and debug an adapter that worked.
96
- *
97
- * The distinction is not cosmetic. "That adapter could not read this" tells a
98
- * user to look at their own toolchain; "Descry broke" tells them to report a
99
- * bug. Sending the second as the first spends the user's time on the wrong
100
- * thing and hides the defect from us.
101
- */
33
+ /** Distinguishes "the adapter failed" from "Descry's own code broke handling its
34
+ * output" — before this, a `TypeError` thrown in this file was reported as the
35
+ * adapter failing, sending users to debug working code instead of reporting our bug. */
102
36
  export declare function sourceFailureNote(sourceId: string, error: unknown, phase: "emit" | "engine"): string;
103
37
  export interface AnalyzeData {
104
38
  readonly repo: string;
@@ -147,49 +81,21 @@ export interface AnalyzeData {
147
81
  readonly evictedFiles: number;
148
82
  };
149
83
  }
150
- /**
151
- * §5.4's `refusals` field, for this run only — never the graph's whole
152
- * stored ledger (`refusal_fetch`'s job). `built.unresolved` is what the
153
- * sources this call just read could not resolve, so it is a fresh
154
- * population every run rather than accumulated history, and honestly
155
- * scoped to "what this call found" the way the field's own contract asks.
156
- *
157
- * `undefined` on zero rows — the envelope's `refusals` stays `null` rather
158
- * than carrying a summary with no exemplar or handle to show (matching
159
- * `summariseRefusals`'s own `count === 0` shape one level up).
160
- */
84
+ /** §5.4's `refusals` field for this run only, not the graph's whole ledger
85
+ * (`refusal_fetch`'s job) — a fresh population per call, honestly scoped to what
86
+ * this run found. `undefined` on zero rows so `refusals` stays `null`, not an empty summary. */
161
87
  export declare function refusalSummaryField(unresolved: readonly UnresolvedRef[]): {
162
88
  readonly count: number;
163
89
  readonly exemplar: string;
164
90
  readonly handle: string;
165
91
  } | undefined;
166
- /**
167
- * `Session.config` is read once at process startup and held for the process's
168
- * whole life (session.ts's own header). A write tool — `link_workspace`, or a
169
- * hand edit — changes the file on disk without this process ever knowing, and
170
- * without this check the notes below would tell the agent to add a "sources"
171
- * array that the file has actually had since the write. Comparing the two
172
- * turns a misleading "still not configured" into an accurate "restart to pick
173
- * this up".
174
- */
92
+ /** `Session.config` loads once at startup and is held for the process's life. A write
93
+ * tool (or hand edit) can change the file without this process knowing — comparing
94
+ * on-disk vs loaded turns a misleading "still not configured" into an accurate "restart to pick this up". */
175
95
  export declare function configDriftNote(onDisk: DescryConfig | null, loaded: DescryConfig): string | undefined;
176
- /**
177
- * The single-repo half of the joins disclosure — UAT round 3, second-look
178
- * item's other half.
179
- *
180
- * `build.ts`'s own `NO_CROSS_REPO_JOIN` warning (folded into `notes` just
181
- * above this function's call site) already narrates the alarming case: two
182
- * or more repositories that emitted a workspace-scoped type and none of it
183
- * joined. What it does not narrate is the ordinary case — every `analyze`
184
- * call in the shipped product passes exactly one repository's batches, so
185
- * every entry in `built.crossRepoJoins` has `crossRepoJoinPossible: false`
186
- * and `suppliedByTwoOrMoreRepos: 0` by construction, not by failure. Left
187
- * un-narrated, `{ total: 48, suppliedByTwoOrMoreRepos: 0 }` sitting beside a
188
- * disclosure about 55 unrelated within-repo edges having just succeeded
189
- * reads as a failure of the very thing that disclosure said worked. This
190
- * states outright that one repository was in scope, so a reader is not left
191
- * to infer it from `repos.length` themselves.
192
- */
96
+ /** Single-repo half of the joins disclosure. In the ordinary case — one repo in scope —
97
+ * every join metric's `suppliedByTwoOrMoreRepos: 0` looks like `NO_CROSS_REPO_JOIN`'s
98
+ * failure case; this states outright it's just scope, not a failed join. */
193
99
  export declare function crossRepoJoinNote(joins: readonly JoinMetric[]): string | undefined;
194
100
  export declare const analyzeTool: ToolDefinition;
195
101
  //# sourceMappingURL=analyze.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/tools/analyze.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAa1D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAA4C,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAGzF,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAE9D;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,M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CAAC,CAAC;IACvD,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAC/B,sFAAsF;QACtF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;KAC/B,CAAC;IACF,2FAA2F;IAC3F,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;KAC/B,CAAC;CACH;AAoBD;;iGAEiG;AACjG,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,SAAS,aAAa,EAAE,GACnC;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAI5F;AAED;;8GAE8G;AAC9G,wBAAgB,eAAe,CAC7B,MAAM,EAAE,YAAY,GAAG,IAAI,EAC3B,MAAM,EAAE,YAAY,GACnB,MAAM,GAAG,SAAS,CAcpB;AAED;;6EAE6E;AAC7E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,GAAG,SAAS,CAUlF;AAgaD,eAAO,MAAM,WAAW,EAAE,cAazB,CAAC"}
@@ -1,63 +1,16 @@
1
- /**
2
- * `analyze` — read the repository into the graph.
3
- *
4
- * The only tool that writes. Everything else queries what this produced, so its
5
- * disclosures are the ones that matter most: a query cannot report a gap it was
6
- * never told about, and this is where the gaps become known.
7
- *
8
- * ## What is disclosed, and why each one earns its line
9
- *
10
- * - **Sources that would not load.** "No problem found in your Python service"
11
- * and "your Python adapter did not import" are different statements (§20.2).
12
- * - **Sources that loaded and did not claim the repository.** The same
13
- * distinction, one level up: an unanalysed language is *not analysable*, not
14
- * clean.
15
- * - **The resolution each source reached.** A run that degraded to R0 because a
16
- * virtualenv was missing produces a graph that looks identical to a healthy
17
- * one until you read this number. Principle 3 then caps everything above it.
18
- * - **Identity collisions.** Two things arrived under one id. There is no
19
- * correct merge, so the builder reports rather than picks (DEC-024).
20
- * - **Evicted files.** Rows a previous run owned and this one did not re-supply.
21
- * They are gone from the graph; a query over them will now find nothing, and
22
- * nothing would otherwise say why.
23
- * - **The workspace join.** Zero cross-repo joins looks exactly like success — and, on the ordinary
24
- * single-repository run every shipped call actually makes, is the *only* value possible, which is
25
- * narrated too (`crossRepoJoinNote`) rather than left for a reader to infer from `repos.length`.
26
- *
27
- * ## The repo identity warning
28
- *
29
- * With no `.descry/config.json`, `repo` defaults to the directory name — and
30
- * every repo-scoped node id is a hash over it. Clone into a differently-named
31
- * folder and every id changes, which silently destroys incident links and
32
- * `CHANGES_WITH` weights. That is DEC-004's failure arriving through the one
33
- * field a default cannot get right, so it is stated on every unconfigured run.
34
- */
1
+ /** `analyze` — the only tool that writes to the graph. Disclosures matter most: a
2
+ * query can't report a gap it wasn't told about. Discloses: sources that failed or
3
+ * didn't claim the repo (§20.2 — not-analysable ≠ clean), each source's resolution
4
+ * reached (caps reliability, rule 3), id collisions (DEC-024), evicted files, and the
5
+ * cross-repo join count. No config → `repo` defaults to dir name, hashed into every id (DEC-004). */
35
6
  import { existsSync } from "node:fs";
36
7
  import { applyConfirmedFacts, buildGraph, counts, createConfirmedIncidentSource, createGitSource, mintEdgesFromConfirmedFacts, MINT_PRODUCED_BY, persistGraph, summariseRefusals, } from "@descryy/core";
37
8
  import { answer, ToolInputError } from "./kit.js";
38
9
  import { detectSources, loadSources } from "../registry.js";
39
10
  import { loadConfig } from "../session.js";
40
- /**
41
- * The two batch fields a producer is allowed not to have heard of.
42
- *
43
- * `normaliseBatch` — every batch's gatekeeper on the way to the store — treats
44
- * `skippedFiles` and `unresolved` as absent-means-none, and says why in its own
45
- * comment: absent is what a producer not yet updated to report them sends. That
46
- * is a deliberate compatibility promise to adapters compiled against an older
47
- * `@descryy/ir`, and adapters are versioned and released on their own cadence
48
- * precisely so that can happen.
49
- *
50
- * This function is that promise, applied one layer earlier. `analyze` used to
51
- * read `.length` off both directly, which meant an adapter the Normaliser would
52
- * have happily accepted crashed the run before it ever got there — reported as
53
- * the *adapter* failing, taking a whole language into "not analysable". A real
54
- * shipped adapter did exactly that while returning over a thousand perfectly
55
- * good nodes.
56
- *
57
- * Absent and malformed stay different, which is the line the Normaliser draws
58
- * too: a missing field is an older producer, a field holding a string is a
59
- * broken one, and defaulting the second away would hide a real defect.
60
- */
11
+ /** `skippedFiles`/`unresolved`: absent means an adapter compiled against an older
12
+ * `@descryy/ir`, not malformed — a real adapter once crashed here on `.length` of
13
+ * undefined despite returning 1000+ good nodes. Absent ⇒ old producer; wrong type ⇒ broken, never defaulted away. */
61
14
  export function optionalBatchLists(batch) {
62
15
  const read = (value, field) => {
63
16
  if (value === undefined || value === null)
@@ -72,20 +25,9 @@ export function optionalBatchLists(batch) {
72
25
  unresolved: read(batch.unresolved, "unresolved"),
73
26
  };
74
27
  }
75
- /**
76
- * What went wrong, and — the part that was missing — *whose* fault it was.
77
- *
78
- * The original note said "<source> failed while reading this repository" for
79
- * anything thrown anywhere in the loop, including inside Descry's own code
80
- * after the adapter had returned successfully. That is how a `TypeError` thrown
81
- * in this very file came to be reported as an adapter failing: a developer
82
- * reading it would go and debug an adapter that worked.
83
- *
84
- * The distinction is not cosmetic. "That adapter could not read this" tells a
85
- * user to look at their own toolchain; "Descry broke" tells them to report a
86
- * bug. Sending the second as the first spends the user's time on the wrong
87
- * thing and hides the defect from us.
88
- */
28
+ /** Distinguishes "the adapter failed" from "Descry's own code broke handling its
29
+ * output" — before this, a `TypeError` thrown in this file was reported as the
30
+ * adapter failing, sending users to debug working code instead of reporting our bug. */
89
31
  export function sourceFailureNote(sourceId, error, phase) {
90
32
  const message = error instanceof Error ? error.message : String(error);
91
33
  return phase === "emit"
@@ -112,32 +54,18 @@ const SCHEMA = {
112
54
  },
113
55
  additionalProperties: false,
114
56
  };
115
- /**
116
- * §5.4's `refusals` field, for this run only — never the graph's whole
117
- * stored ledger (`refusal_fetch`'s job). `built.unresolved` is what the
118
- * sources this call just read could not resolve, so it is a fresh
119
- * population every run rather than accumulated history, and honestly
120
- * scoped to "what this call found" the way the field's own contract asks.
121
- *
122
- * `undefined` on zero rows — the envelope's `refusals` stays `null` rather
123
- * than carrying a summary with no exemplar or handle to show (matching
124
- * `summariseRefusals`'s own `count === 0` shape one level up).
125
- */
57
+ /** §5.4's `refusals` field for this run only, not the graph's whole ledger
58
+ * (`refusal_fetch`'s job) — a fresh population per call, honestly scoped to what
59
+ * this run found. `undefined` on zero rows so `refusals` stays `null`, not an empty summary. */
126
60
  export function refusalSummaryField(unresolved) {
127
61
  const summary = summariseRefusals(unresolved);
128
62
  if (summary.count === 0 || summary.exemplar === null || summary.handle === null)
129
63
  return undefined;
130
64
  return { count: summary.count, exemplar: summary.exemplar, handle: summary.handle };
131
65
  }
132
- /**
133
- * `Session.config` is read once at process startup and held for the process's
134
- * whole life (session.ts's own header). A write tool — `link_workspace`, or a
135
- * hand edit — changes the file on disk without this process ever knowing, and
136
- * without this check the notes below would tell the agent to add a "sources"
137
- * array that the file has actually had since the write. Comparing the two
138
- * turns a misleading "still not configured" into an accurate "restart to pick
139
- * this up".
140
- */
66
+ /** `Session.config` loads once at startup and is held for the process's life. A write
67
+ * tool (or hand edit) can change the file without this process knowing — comparing
68
+ * on-disk vs loaded turns a misleading "still not configured" into an accurate "restart to pick this up". */
141
69
  export function configDriftNote(onDisk, loaded) {
142
70
  if (onDisk === null)
143
71
  return undefined;
@@ -152,23 +80,9 @@ export function configDriftNote(onDisk, loaded) {
152
80
  "server for on-disk changes to take effect; the notes below describe the stale, running " +
153
81
  "configuration, not what is actually on disk now.");
154
82
  }
155
- /**
156
- * The single-repo half of the joins disclosure — UAT round 3, second-look
157
- * item's other half.
158
- *
159
- * `build.ts`'s own `NO_CROSS_REPO_JOIN` warning (folded into `notes` just
160
- * above this function's call site) already narrates the alarming case: two
161
- * or more repositories that emitted a workspace-scoped type and none of it
162
- * joined. What it does not narrate is the ordinary case — every `analyze`
163
- * call in the shipped product passes exactly one repository's batches, so
164
- * every entry in `built.crossRepoJoins` has `crossRepoJoinPossible: false`
165
- * and `suppliedByTwoOrMoreRepos: 0` by construction, not by failure. Left
166
- * un-narrated, `{ total: 48, suppliedByTwoOrMoreRepos: 0 }` sitting beside a
167
- * disclosure about 55 unrelated within-repo edges having just succeeded
168
- * reads as a failure of the very thing that disclosure said worked. This
169
- * states outright that one repository was in scope, so a reader is not left
170
- * to infer it from `repos.length` themselves.
171
- */
83
+ /** Single-repo half of the joins disclosure. In the ordinary case — one repo in scope —
84
+ * every join metric's `suppliedByTwoOrMoreRepos: 0` looks like `NO_CROSS_REPO_JOIN`'s
85
+ * failure case; this states outright it's just scope, not a failed join. */
172
86
  export function crossRepoJoinNote(joins) {
173
87
  const singleRepo = joins.filter((j) => !j.crossRepoJoinPossible);
174
88
  if (singleRepo.length === 0)
@@ -188,9 +102,8 @@ async function run(args, ctx) {
188
102
  }
189
103
  const root = await session.root();
190
104
  const notes = [];
191
- // MK-4: analyze is about to rebuild the graph from source regardless, so a
192
- // stale IR schema version is repaired here rather than left to refuse —
193
- // see Session.repairStaleGraph's own doc for why only this tool does this.
105
+ // MK-4: analyze rebuilds from source regardless, so a stale IR schema is repaired
106
+ // here rather than refused — see `Session.repairStaleGraph` for why only this tool does this.
194
107
  const { rebuilt } = session.repairStaleGraph();
195
108
  if (rebuilt) {
196
109
  notes.push("The stored graph was written under an older IR schema version. Its derived tables were " +
@@ -224,10 +137,8 @@ async function run(args, ctx) {
224
137
  }
225
138
  if (session.config.sources.length === 0) {
226
139
  notes.push(
227
- // No example package name here, deliberately, and the boundary lint
228
- // enforces it. Naming one would make this engine know about a specific
229
- // language — the exact inversion `registry.ts` exists to prevent — and the
230
- // list of installed adapters is not something this process can see.
140
+ // No example package name here — naming one would leak a specific language into
141
+ // this engine, the inversion `registry.ts` exists to prevent (rule 1: IR boundary).
231
142
  "No language adapters are configured, so nothing was read from source. Add a \"sources\" " +
232
143
  `array to ${".descry/config.json"} listing the adapter packages to load, as module ` +
233
144
  "specifiers. This engine does not know the name of any adapter: the IR boundary is a " +
@@ -246,30 +157,17 @@ async function run(args, ctx) {
246
157
  };
247
158
  const batches = [];
248
159
  const perSource = [];
249
- /**
250
- * Resolution levels reached by sources that read **source code**.
251
- *
252
- * The floor is drawn from these alone, and the git-history reader is why. It
253
- * reaches R0 and always will: R0 is what reading a commit log *is*, not a
254
- * degradation of it. Folding it into a single graph-wide minimum pinned every
255
- * analyse reply at R0 and therefore at reliability class C — which then
256
- * described a set of directly counted rows as "a behavioural prediction".
257
- *
258
- * DEC-058 already settled the general form of this: an edge carries the
259
- * resolution of *its own evidence*, not of the run, so a graph has no single
260
- * floor and each answer computes its own. This is that rule applied one level
261
- * up. Every source's level is still reported individually in `sources`, and a
262
- * source that fell short of its own declared ceiling is disclosed separately.
263
- */
160
+ /** Resolution floor comes from code-reading sources only — git history is always R0
161
+ * by nature, not degradation; folding it in would cap every reply at class C. DEC-058:
162
+ * an edge carries its own evidence's resolution, not the run's; each source still reported individually. */
264
163
  const codeResolutions = [];
265
164
  const total = applicable.length + (includeHistory ? 1 : 0);
266
165
  let done = 0;
267
166
  for (const entry of applicable) {
268
167
  ctx.progress(`Reading ${entry.source.id}`, done, total);
269
168
  const started = Date.now();
270
- // The adapter's own work and Descry's handling of its result are separate
271
- // phases with separate blame. Folding them into one `try` is what let a
272
- // TypeError in the lines below be reported as the adapter failing.
169
+ // Adapter's own work and Descry's handling of its output are separate phases with
170
+ // separate blame — folding them into one `try` let a `TypeError` here be blamed on the adapter.
273
171
  let batch;
274
172
  try {
275
173
  batch = await entry.source.emit(context);
@@ -293,9 +191,8 @@ async function run(args, ctx) {
293
191
  reachedResolution: batch.reachedResolution,
294
192
  ms: Date.now() - started,
295
193
  });
296
- // The declared ceiling versus what this run actually reached. A gap is the
297
- // honest-degradation case: the adapter can do better and something in this
298
- // repository stopped it.
194
+ // Declared ceiling vs what this run reached — a gap is honest degradation (rule 7):
195
+ // the adapter can do better but something in this repo stopped it.
299
196
  const ceiling = entry.adapter?.capabilities().maxResolution;
300
197
  if (ceiling !== undefined)
301
198
  codeResolutions.push(batch.reachedResolution);
@@ -315,15 +212,12 @@ async function run(args, ctx) {
315
212
  }
316
213
  }
317
214
  catch (error) {
318
- // Reached only when Descry's own handling threw. The adapter already
319
- // returned, so blaming it here would send the user to debug working code.
215
+ // Reached only when Descry's own handling threw — the adapter already returned successfully.
320
216
  notes.push(sourceFailureNote(entry.source.id, error, "engine"));
321
217
  }
322
218
  finally {
323
- // `dispose` is a `LanguageAdapter` obligation, not an `IRSource` one — a
324
- // language server is a long-lived child process and leaking one costs
325
- // hundreds of megabytes per repo. Sources with no processes to release
326
- // (the git reader) have no method and need none.
219
+ // `dispose` is a `LanguageAdapter` obligation, not `IRSource`'s — a leaked language
220
+ // server costs hundreds of MB per repo. Sources with none to release (git reader) need no method.
327
221
  await entry.adapter?.dispose();
328
222
  done += 1;
329
223
  }
@@ -359,13 +253,9 @@ async function run(args, ctx) {
359
253
  notes.push("Git history was skipped by request, so no CHANGES_WITH edges were produced and the blast " +
360
254
  "radius will miss files that historically change together.");
361
255
  }
362
- // Developer-confirmed incidents, re-projected on every analyze.
363
- //
364
- // The record lives in `.descry/config.json` because it is testimony that
365
- // exists nowhere else (DEC-223's storage decision); the graph holds a
366
- // projection. Re-emitting it here is what makes "a rebuild never loses it"
367
- // true rather than merely intended — a store is derived data and every
368
- // derived table is dropped on a schema bump.
256
+ // Developer-confirmed incidents, re-projected every analyze run. The record lives in
257
+ // `.descry/config.json` (testimony, DEC-223) — the graph only holds a derived projection,
258
+ // dropped on every schema bump, so re-emitting here is what keeps a rebuild from losing it.
369
259
  const confirmedIncidents = session.config.confirmedIncidents ?? [];
370
260
  if (confirmedIncidents.length > 0) {
371
261
  const projected = await createConfirmedIncidentSource({
@@ -424,11 +314,9 @@ async function run(args, ctx) {
424
314
  }
425
315
  // --- mint edges from confirmed facts --------------------------------------
426
316
  //
427
- // DEC-223's answer half, minting side (DEC-138) — sequenced after the base
428
- // graph above is already persisted, because a confirmed answer joins
429
- // against a real, stored `API_ENDPOINT` row: `EndpointLookup.node(id)` is
430
- // backed by the SQL reader, not by `built`'s in-memory result, so the
431
- // endpoint has to already exist as a row for the lookup to find it.
317
+ // DEC-223/DEC-138 minting, sequenced after the graph is persisted: a confirmed answer
318
+ // joins against a stored `API_ENDPOINT` row via the SQL-backed `EndpointLookup`, not
319
+ // `built`'s in-memory result, so the row must already exist for the lookup to find it.
432
320
  ctx.progress("Minting edges from confirmed facts", done, total);
433
321
  const provider = session.provider();
434
322
  const { refs: ledgerRefs } = provider.unresolvedRefs();
@@ -438,18 +326,9 @@ async function run(args, ctx) {
438
326
  ...(session.config.workspace === undefined ? {} : { workspace: session.config.workspace }),
439
327
  };
440
328
  const mintResult = mintEdgesFromConfirmedFacts(answered, provider, scope, MINT_PRODUCED_BY, root.commitSha);
441
- // The invalidation key (DEC-015: "producedBy + sourceFiles"). Scoped to
442
- // every file carrying an *askable* ("value-unknown") row this run, not
443
- // only the files a fact happened to answer. That distinction is what makes
444
- // a re-run after a changed or removed answer safe: the run id is derived
445
- // from (producedBy, repo, commitSha, sourceFiles), so a re-run at the same
446
- // commit with the same askable domain lands on the *same* run id, and the
447
- // writer's own self-clean pass (`writer.ts` rule 3) retires whatever this
448
- // run no longer supplies — the edge from a superseded answer does not
449
- // survive next to a new one. Scoping to the *answered* subset instead
450
- // would let a file drop out of `sourceFiles` the moment its one answer was
451
- // removed, and a stale edge for it would then never be found as a
452
- // prior-run to retire at all.
329
+ // Invalidation key (DEC-015: producedBy+sourceFiles), scoped to every *askable* file this
330
+ // run, not just answered ones — else a file dropping its one answer would vanish from
331
+ // sourceFiles and its stale edge could never be found by the writer's self-clean pass to retire.
453
332
  const mintFiles = [
454
333
  ...new Set(ledgerRefs.flatMap((ref) => ref.attrs?.["refusalClass"] === "value-unknown" && typeof ref.file === "string" ? [ref.file] : [])),
455
334
  ].sort();
@@ -499,8 +378,7 @@ async function run(args, ctx) {
499
378
  "changed) — the edges they previously grounded have been retired, not left to coexist with " +
500
379
  "whatever this run minted instead.");
501
380
  }
502
- // No code-reading source ran, so there is no level to report and nothing to
503
- // rest a claim on. R0 rather than a cheerful default.
381
+ // No code-reading source ran — R0, not a cheerful default.
504
382
  const floor = (codeResolutions.length === 0
505
383
  ? 0
506
384
  : Math.min(...codeResolutions));
@@ -1 +1 @@
1
- {"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/tools/analyze.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,MAAM,EACN,6BAA6B,EAC7B,eAAe,EACf,2BAA2B,EAC3B,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,GAClB,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,MAAM,EAAE,cAAc,EAAyC,MAAM,UAAU,CAAC;AAEzF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAqB,MAAM,eAAe,CAAC;AA2B9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAI/C,MAAM,IAAI,GAAG,CAAI,KAAc,EAAE,KAAa,EAAgB,EAAE;QAC9D,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,EAAE,CAAC;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AAC,QAAQ,CAAC,MAAM;gBACpC,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,MAAM;gBACxC,YAAY,EAAE,aAAa,CAAC,YAAY,CAAC,MAAM;aAChD;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAmB;IACzC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,0CAA0C;IACjD,WAAW,EACT,0FAA0F;QAC1F,2FAA2F;QAC3F,4FAA4F;QAC5F,wEAAwE;IAC1E,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
@@ -1,25 +1,7 @@
1
1
  /**
2
- * `browser_click` — click an element the agent has seen.
3
- *
4
- * ## Consent, and why this tool asks for none
5
- *
6
- * `DEC-380` grants consent once, at
7
- * `browser_start_session`, bound to that call's origin. So this tool declares
8
- * `class: "action"` — it does change a running application, and pretending
9
- * otherwise would be the lie — while its `describeAction` returns `undefined`,
10
- * the existing "this particular call has nothing to confirm" path that
11
- * `questions` uses when asked to read rather than write.
12
- *
13
- * The property that makes that safe rather than merely cheap: **a verb cannot
14
- * mint consent for itself.** Called against a session with no consent record,
15
- * it refuses. There is deliberately no path from a click to a token.
16
- *
17
- * ## A ref, never a selector
18
- *
19
- * The element is named by a ref from a snapshot the calling agent actually
20
- * saw. A raw selector would let an agent act on an element it never looked
21
- * at, and a ref from a superseded snapshot refuses rather than resolving
22
- * against whatever now matches — that is the same mistake, arriving later.
2
+ * `browser_click`: clicks a ref the agent has seen from a snapshot, never a
3
+ * raw selector. Consent (DEC-380) is granted once at
4
+ * `browser_start_session` — a verb cannot mint consent for itself, and refuses with none on record. A stale ref (superseded snapshot) also refuses.
23
5
  */
24
6
  import type { BrowserEvidenceReport } from "../browser/evidence.ts";
25
7
  import { type BrowserGraphWrite } from "../browser/graph-write.ts";