@descryy/mcp 0.5.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 +62 -178
  10. package/dist/browser/driver.d.ts.map +1 -1
  11. package/dist/browser/driver.js +14 -46
  12. package/dist/browser/driver.js.map +1 -1
  13. package/dist/browser/evidence.d.ts +11 -35
  14. package/dist/browser/evidence.d.ts.map +1 -1
  15. package/dist/browser/evidence.js +25 -51
  16. package/dist/browser/evidence.js.map +1 -1
  17. package/dist/browser/fake-driver.d.ts +12 -16
  18. package/dist/browser/fake-driver.d.ts.map +1 -1
  19. package/dist/browser/fake-driver.js +24 -17
  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 +17 -67
  26. package/dist/browser/playwright-driver.d.ts.map +1 -1
  27. package/dist/browser/playwright-driver.js +169 -166
  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 +33 -91
  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 +22 -66
  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 +17 -0
  62. package/dist/capped.d.ts.map +1 -0
  63. package/dist/capped.js +15 -0
  64. package/dist/capped.js.map +1 -0
  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 +79 -11
  90. package/dist/render.d.ts.map +1 -1
  91. package/dist/render.js +126 -14
  92. package/dist/render.js.map +1 -1
  93. package/dist/runtime-registry.d.ts +8 -49
  94. package/dist/runtime-registry.d.ts.map +1 -1
  95. package/dist/runtime-registry.js +72 -63
  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 +55 -13
  115. package/dist/server.js.map +1 -1
  116. package/dist/session.d.ts +69 -239
  117. package/dist/session.d.ts.map +1 -1
  118. package/dist/session.js +76 -231
  119. package/dist/session.js.map +1 -1
  120. package/dist/tools/analyze.d.ts +27 -101
  121. package/dist/tools/analyze.d.ts.map +1 -1
  122. package/dist/tools/analyze.js +58 -148
  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 +102 -55
  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 +38 -51
  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 +17 -63
  161. package/dist/tools/contracts.d.ts.map +1 -1
  162. package/dist/tools/contracts.js +91 -47
  163. package/dist/tools/contracts.js.map +1 -1
  164. package/dist/tools/cross-pr.d.ts +56 -15
  165. package/dist/tools/cross-pr.d.ts.map +1 -1
  166. package/dist/tools/cross-pr.js +141 -38
  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 +143 -23
  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 +258 -436
  207. package/dist/tools/observe-runtime.js.map +1 -1
  208. package/dist/tools/observe-tests.d.ts +9 -88
  209. package/dist/tools/observe-tests.d.ts.map +1 -1
  210. package/dist/tools/observe-tests.js +34 -108
  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 +94 -9
  217. package/dist/tools/pre-push.d.ts.map +1 -1
  218. package/dist/tools/pre-push.js +139 -34
  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 +17 -20
  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 +31 -47
  245. package/dist/tools/validate.d.ts.map +1 -1
  246. package/dist/tools/validate.js +133 -61
  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 +33 -16
@@ -1,46 +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.
24
- *
25
- * ## The repo identity warning
26
- *
27
- * With no `.descry/config.json`, `repo` defaults to the directory name — and
28
- * every repo-scoped node id is a hash over it. Clone into a differently-named
29
- * folder and every id changes, which silently destroys incident links and
30
- * `CHANGES_WITH` weights. That is DEC-004's failure arriving through the one
31
- * field a default cannot get right, so it is stated on every unconfigured run.
32
- */
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). */
33
6
  import type { IRBatch, UnresolvedRef } from "@descryy/ir";
34
- import type { BuildResult, StoreCounts } from "@descryy/core";
7
+ import type { BuildResult, JoinMetric, StoreCounts } from "@descryy/core";
35
8
  import { type ToolDefinition } from "./kit.ts";
36
9
  import { type DescryConfig } from "../session.ts";
37
- /**
38
- * What one source read, and how well.
39
- *
40
- * `reachedResolution` is the number principle 3 caps everything above it by. A
41
- * run that degraded to R0 because a dependency was missing produces a graph
42
- * that looks identical to a healthy one until this field is read.
43
- */
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. */
44
12
  export interface SourceRun {
45
13
  readonly source: string;
46
14
  readonly files: number;
@@ -48,55 +16,23 @@ export interface SourceRun {
48
16
  readonly edges: number;
49
17
  /** Refusal-ledger rows: gaps this source disclosed rather than guessed at. */
50
18
  readonly unresolved: number;
51
- /**
52
- * Files this source attempted but could not parse — absent from the graph
53
- * entirely, not confirmed clean. Never counted in `files`; see
54
- * `IRBatch.skippedFiles`.
55
- */
19
+ /** Files attempted but not parsed — absent from the graph, not confirmed clean. Never
20
+ * counted in `files`; see `IRBatch.skippedFiles`. */
56
21
  readonly skippedFiles: number;
57
22
  readonly reachedResolution: number;
58
23
  /** Wall-clock time this source took, including the git-history reader. */
59
24
  readonly ms: number;
60
25
  }
61
- /**
62
- * The two batch fields a producer is allowed not to have heard of.
63
- *
64
- * `normaliseBatch` — every batch's gatekeeper on the way to the store — treats
65
- * `skippedFiles` and `unresolved` as absent-means-none, and says why in its own
66
- * comment: absent is what a producer not yet updated to report them sends. That
67
- * is a deliberate compatibility promise to adapters compiled against an older
68
- * `@descryy/ir`, and adapters are versioned and released on their own cadence
69
- * precisely so that can happen.
70
- *
71
- * This function is that promise, applied one layer earlier. `analyze` used to
72
- * read `.length` off both directly, which meant an adapter the Normaliser would
73
- * have happily accepted crashed the run before it ever got there — reported as
74
- * the *adapter* failing, taking a whole language into "not analysable". A real
75
- * shipped adapter did exactly that while returning over a thousand perfectly
76
- * good nodes.
77
- *
78
- * Absent and malformed stay different, which is the line the Normaliser draws
79
- * too: a missing field is an older producer, a field holding a string is a
80
- * broken one, and defaulting the second away would hide a real defect.
81
- */
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. */
82
29
  export declare function optionalBatchLists(batch: IRBatch): {
83
30
  readonly skippedFiles: IRBatch["skippedFiles"];
84
31
  readonly unresolved: IRBatch["unresolved"];
85
32
  };
86
- /**
87
- * What went wrong, and — the part that was missing — *whose* fault it was.
88
- *
89
- * The original note said "<source> failed while reading this repository" for
90
- * anything thrown anywhere in the loop, including inside Descry's own code
91
- * after the adapter had returned successfully. That is how a `TypeError` thrown
92
- * in this very file came to be reported as an adapter failing: a developer
93
- * reading it would go and debug an adapter that worked.
94
- *
95
- * The distinction is not cosmetic. "That adapter could not read this" tells a
96
- * user to look at their own toolchain; "Descry broke" tells them to report a
97
- * bug. Sending the second as the first spends the user's time on the wrong
98
- * thing and hides the defect from us.
99
- */
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. */
100
36
  export declare function sourceFailureNote(sourceId: string, error: unknown, phase: "emit" | "engine"): string;
101
37
  export interface AnalyzeData {
102
38
  readonly repo: string;
@@ -128,7 +64,7 @@ export interface AnalyzeData {
128
64
  readonly rejections: number;
129
65
  };
130
66
  /** Per workspace-scoped node type: how many exist and how many two repositories both supplied. */
131
- readonly joins: BuildResult["joins"];
67
+ readonly crossRepoJoins: BuildResult["crossRepoJoins"];
132
68
  readonly written: {
133
69
  readonly nodes: number;
134
70
  readonly edges: number;
@@ -145,31 +81,21 @@ export interface AnalyzeData {
145
81
  readonly evictedFiles: number;
146
82
  };
147
83
  }
148
- /**
149
- * §5.4's `refusals` field, for this run only — never the graph's whole
150
- * stored ledger (`refusal_fetch`'s job). `built.unresolved` is what the
151
- * sources this call just read could not resolve, so it is a fresh
152
- * population every run rather than accumulated history, and honestly
153
- * scoped to "what this call found" the way the field's own contract asks.
154
- *
155
- * `undefined` on zero rows — the envelope's `refusals` stays `null` rather
156
- * than carrying a summary with no exemplar or handle to show (matching
157
- * `summariseRefusals`'s own `count === 0` shape one level up).
158
- */
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. */
159
87
  export declare function refusalSummaryField(unresolved: readonly UnresolvedRef[]): {
160
88
  readonly count: number;
161
89
  readonly exemplar: string;
162
90
  readonly handle: string;
163
91
  } | undefined;
164
- /**
165
- * `Session.config` is read once at process startup and held for the process's
166
- * whole life (session.ts's own header). A write tool — `link_workspace`, or a
167
- * hand edit — changes the file on disk without this process ever knowing, and
168
- * without this check the notes below would tell the agent to add a "sources"
169
- * array that the file has actually had since the write. Comparing the two
170
- * turns a misleading "still not configured" into an accurate "restart to pick
171
- * this up".
172
- */
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". */
173
95
  export declare function configDriftNote(onDisk: DescryConfig | null, loaded: DescryConfig): string | undefined;
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. */
99
+ export declare function crossRepoJoinNote(joins: readonly JoinMetric[]): string | undefined;
174
100
  export declare const analyzeTool: ToolDefinition;
175
101
  //# sourceMappingURL=analyze.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/tools/analyze.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAa1D,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE9D,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,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG;I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,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,61 +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.
24
- *
25
- * ## The repo identity warning
26
- *
27
- * With no `.descry/config.json`, `repo` defaults to the directory name — and
28
- * every repo-scoped node id is a hash over it. Clone into a differently-named
29
- * folder and every id changes, which silently destroys incident links and
30
- * `CHANGES_WITH` weights. That is DEC-004's failure arriving through the one
31
- * field a default cannot get right, so it is stated on every unconfigured run.
32
- */
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). */
33
6
  import { existsSync } from "node:fs";
34
7
  import { applyConfirmedFacts, buildGraph, counts, createConfirmedIncidentSource, createGitSource, mintEdgesFromConfirmedFacts, MINT_PRODUCED_BY, persistGraph, summariseRefusals, } from "@descryy/core";
35
8
  import { answer, ToolInputError } from "./kit.js";
36
9
  import { detectSources, loadSources } from "../registry.js";
37
10
  import { loadConfig } from "../session.js";
38
- /**
39
- * The two batch fields a producer is allowed not to have heard of.
40
- *
41
- * `normaliseBatch` — every batch's gatekeeper on the way to the store — treats
42
- * `skippedFiles` and `unresolved` as absent-means-none, and says why in its own
43
- * comment: absent is what a producer not yet updated to report them sends. That
44
- * is a deliberate compatibility promise to adapters compiled against an older
45
- * `@descryy/ir`, and adapters are versioned and released on their own cadence
46
- * precisely so that can happen.
47
- *
48
- * This function is that promise, applied one layer earlier. `analyze` used to
49
- * read `.length` off both directly, which meant an adapter the Normaliser would
50
- * have happily accepted crashed the run before it ever got there — reported as
51
- * the *adapter* failing, taking a whole language into "not analysable". A real
52
- * shipped adapter did exactly that while returning over a thousand perfectly
53
- * good nodes.
54
- *
55
- * Absent and malformed stay different, which is the line the Normaliser draws
56
- * too: a missing field is an older producer, a field holding a string is a
57
- * broken one, and defaulting the second away would hide a real defect.
58
- */
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. */
59
14
  export function optionalBatchLists(batch) {
60
15
  const read = (value, field) => {
61
16
  if (value === undefined || value === null)
@@ -70,20 +25,9 @@ export function optionalBatchLists(batch) {
70
25
  unresolved: read(batch.unresolved, "unresolved"),
71
26
  };
72
27
  }
73
- /**
74
- * What went wrong, and — the part that was missing — *whose* fault it was.
75
- *
76
- * The original note said "<source> failed while reading this repository" for
77
- * anything thrown anywhere in the loop, including inside Descry's own code
78
- * after the adapter had returned successfully. That is how a `TypeError` thrown
79
- * in this very file came to be reported as an adapter failing: a developer
80
- * reading it would go and debug an adapter that worked.
81
- *
82
- * The distinction is not cosmetic. "That adapter could not read this" tells a
83
- * user to look at their own toolchain; "Descry broke" tells them to report a
84
- * bug. Sending the second as the first spends the user's time on the wrong
85
- * thing and hides the defect from us.
86
- */
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. */
87
31
  export function sourceFailureNote(sourceId, error, phase) {
88
32
  const message = error instanceof Error ? error.message : String(error);
89
33
  return phase === "emit"
@@ -110,32 +54,18 @@ const SCHEMA = {
110
54
  },
111
55
  additionalProperties: false,
112
56
  };
113
- /**
114
- * §5.4's `refusals` field, for this run only — never the graph's whole
115
- * stored ledger (`refusal_fetch`'s job). `built.unresolved` is what the
116
- * sources this call just read could not resolve, so it is a fresh
117
- * population every run rather than accumulated history, and honestly
118
- * scoped to "what this call found" the way the field's own contract asks.
119
- *
120
- * `undefined` on zero rows — the envelope's `refusals` stays `null` rather
121
- * than carrying a summary with no exemplar or handle to show (matching
122
- * `summariseRefusals`'s own `count === 0` shape one level up).
123
- */
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. */
124
60
  export function refusalSummaryField(unresolved) {
125
61
  const summary = summariseRefusals(unresolved);
126
62
  if (summary.count === 0 || summary.exemplar === null || summary.handle === null)
127
63
  return undefined;
128
64
  return { count: summary.count, exemplar: summary.exemplar, handle: summary.handle };
129
65
  }
130
- /**
131
- * `Session.config` is read once at process startup and held for the process's
132
- * whole life (session.ts's own header). A write tool — `link_workspace`, or a
133
- * hand edit — changes the file on disk without this process ever knowing, and
134
- * without this check the notes below would tell the agent to add a "sources"
135
- * array that the file has actually had since the write. Comparing the two
136
- * turns a misleading "still not configured" into an accurate "restart to pick
137
- * this up".
138
- */
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". */
139
69
  export function configDriftNote(onDisk, loaded) {
140
70
  if (onDisk === null)
141
71
  return undefined;
@@ -150,6 +80,19 @@ export function configDriftNote(onDisk, loaded) {
150
80
  "server for on-disk changes to take effect; the notes below describe the stale, running " +
151
81
  "configuration, not what is actually on disk now.");
152
82
  }
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. */
86
+ export function crossRepoJoinNote(joins) {
87
+ const singleRepo = joins.filter((j) => !j.crossRepoJoinPossible);
88
+ if (singleRepo.length === 0)
89
+ return undefined;
90
+ return (`${singleRepo.length} of ${joins.length} join metric(s) — ` +
91
+ `${singleRepo.map((j) => j.type).join(", ")} — reflect one repository in this build's scope. ` +
92
+ "A cross-repo join is not possible here, so 0 is the only value suppliedByTwoOrMoreRepos could " +
93
+ "take for them; this is not the NO_CROSS_REPO_JOIN warning, which is for two or more " +
94
+ "repositories that failed to join.");
95
+ }
153
96
  async function run(args, ctx) {
154
97
  const { session } = ctx;
155
98
  const includeHistory = args["includeHistory"] !== false;
@@ -159,9 +102,8 @@ async function run(args, ctx) {
159
102
  }
160
103
  const root = await session.root();
161
104
  const notes = [];
162
- // MK-4: analyze is about to rebuild the graph from source regardless, so a
163
- // stale IR schema version is repaired here rather than left to refuse —
164
- // 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.
165
107
  const { rebuilt } = session.repairStaleGraph();
166
108
  if (rebuilt) {
167
109
  notes.push("The stored graph was written under an older IR schema version. Its derived tables were " +
@@ -195,10 +137,8 @@ async function run(args, ctx) {
195
137
  }
196
138
  if (session.config.sources.length === 0) {
197
139
  notes.push(
198
- // No example package name here, deliberately, and the boundary lint
199
- // enforces it. Naming one would make this engine know about a specific
200
- // language — the exact inversion `registry.ts` exists to prevent — and the
201
- // 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).
202
142
  "No language adapters are configured, so nothing was read from source. Add a \"sources\" " +
203
143
  `array to ${".descry/config.json"} listing the adapter packages to load, as module ` +
204
144
  "specifiers. This engine does not know the name of any adapter: the IR boundary is a " +
@@ -217,30 +157,17 @@ async function run(args, ctx) {
217
157
  };
218
158
  const batches = [];
219
159
  const perSource = [];
220
- /**
221
- * Resolution levels reached by sources that read **source code**.
222
- *
223
- * The floor is drawn from these alone, and the git-history reader is why. It
224
- * reaches R0 and always will: R0 is what reading a commit log *is*, not a
225
- * degradation of it. Folding it into a single graph-wide minimum pinned every
226
- * analyse reply at R0 and therefore at reliability class C — which then
227
- * described a set of directly counted rows as "a behavioural prediction".
228
- *
229
- * DEC-058 already settled the general form of this: an edge carries the
230
- * resolution of *its own evidence*, not of the run, so a graph has no single
231
- * floor and each answer computes its own. This is that rule applied one level
232
- * up. Every source's level is still reported individually in `sources`, and a
233
- * source that fell short of its own declared ceiling is disclosed separately.
234
- */
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. */
235
163
  const codeResolutions = [];
236
164
  const total = applicable.length + (includeHistory ? 1 : 0);
237
165
  let done = 0;
238
166
  for (const entry of applicable) {
239
167
  ctx.progress(`Reading ${entry.source.id}`, done, total);
240
168
  const started = Date.now();
241
- // The adapter's own work and Descry's handling of its result are separate
242
- // phases with separate blame. Folding them into one `try` is what let a
243
- // 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.
244
171
  let batch;
245
172
  try {
246
173
  batch = await entry.source.emit(context);
@@ -264,9 +191,8 @@ async function run(args, ctx) {
264
191
  reachedResolution: batch.reachedResolution,
265
192
  ms: Date.now() - started,
266
193
  });
267
- // The declared ceiling versus what this run actually reached. A gap is the
268
- // honest-degradation case: the adapter can do better and something in this
269
- // 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.
270
196
  const ceiling = entry.adapter?.capabilities().maxResolution;
271
197
  if (ceiling !== undefined)
272
198
  codeResolutions.push(batch.reachedResolution);
@@ -286,15 +212,12 @@ async function run(args, ctx) {
286
212
  }
287
213
  }
288
214
  catch (error) {
289
- // Reached only when Descry's own handling threw. The adapter already
290
- // 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.
291
216
  notes.push(sourceFailureNote(entry.source.id, error, "engine"));
292
217
  }
293
218
  finally {
294
- // `dispose` is a `LanguageAdapter` obligation, not an `IRSource` one — a
295
- // language server is a long-lived child process and leaking one costs
296
- // hundreds of megabytes per repo. Sources with no processes to release
297
- // (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.
298
221
  await entry.adapter?.dispose();
299
222
  done += 1;
300
223
  }
@@ -330,13 +253,9 @@ async function run(args, ctx) {
330
253
  notes.push("Git history was skipped by request, so no CHANGES_WITH edges were produced and the blast " +
331
254
  "radius will miss files that historically change together.");
332
255
  }
333
- // Developer-confirmed incidents, re-projected on every analyze.
334
- //
335
- // The record lives in `.descry/config.json` because it is testimony that
336
- // exists nowhere else (DEC-223's storage decision); the graph holds a
337
- // projection. Re-emitting it here is what makes "a rebuild never loses it"
338
- // true rather than merely intended — a store is derived data and every
339
- // 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.
340
259
  const confirmedIncidents = session.config.confirmedIncidents ?? [];
341
260
  if (confirmedIncidents.length > 0) {
342
261
  const projected = await createConfirmedIncidentSource({
@@ -386,17 +305,18 @@ async function run(args, ctx) {
386
305
  }
387
306
  for (const warning of built.warnings)
388
307
  notes.push(warning.detail);
308
+ const joinNote = crossRepoJoinNote(built.crossRepoJoins);
309
+ if (joinNote !== undefined)
310
+ notes.push(joinNote);
389
311
  if (built.unresolved.length > 0) {
390
312
  notes.push(`${built.unresolved.length} reference(s) could not be resolved to a target and are recorded ` +
391
313
  "in the ledger rather than guessed at. They are the measured recall gap, not an error.");
392
314
  }
393
315
  // --- mint edges from confirmed facts --------------------------------------
394
316
  //
395
- // DEC-223's answer half, minting side (DEC-138) — sequenced after the base
396
- // graph above is already persisted, because a confirmed answer joins
397
- // against a real, stored `API_ENDPOINT` row: `EndpointLookup.node(id)` is
398
- // backed by the SQL reader, not by `built`'s in-memory result, so the
399
- // 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.
400
320
  ctx.progress("Minting edges from confirmed facts", done, total);
401
321
  const provider = session.provider();
402
322
  const { refs: ledgerRefs } = provider.unresolvedRefs();
@@ -406,18 +326,9 @@ async function run(args, ctx) {
406
326
  ...(session.config.workspace === undefined ? {} : { workspace: session.config.workspace }),
407
327
  };
408
328
  const mintResult = mintEdgesFromConfirmedFacts(answered, provider, scope, MINT_PRODUCED_BY, root.commitSha);
409
- // The invalidation key (DEC-015: "producedBy + sourceFiles"). Scoped to
410
- // every file carrying an *askable* ("value-unknown") row this run, not
411
- // only the files a fact happened to answer. That distinction is what makes
412
- // a re-run after a changed or removed answer safe: the run id is derived
413
- // from (producedBy, repo, commitSha, sourceFiles), so a re-run at the same
414
- // commit with the same askable domain lands on the *same* run id, and the
415
- // writer's own self-clean pass (`writer.ts` rule 3) retires whatever this
416
- // run no longer supplies — the edge from a superseded answer does not
417
- // survive next to a new one. Scoping to the *answered* subset instead
418
- // would let a file drop out of `sourceFiles` the moment its one answer was
419
- // removed, and a stale edge for it would then never be found as a
420
- // 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.
421
332
  const mintFiles = [
422
333
  ...new Set(ledgerRefs.flatMap((ref) => ref.attrs?.["refusalClass"] === "value-unknown" && typeof ref.file === "string" ? [ref.file] : [])),
423
334
  ].sort();
@@ -467,8 +378,7 @@ async function run(args, ctx) {
467
378
  "changed) — the edges they previously grounded have been retired, not left to coexist with " +
468
379
  "whatever this run minted instead.");
469
380
  }
470
- // No code-reading source ran, so there is no level to report and nothing to
471
- // rest a claim on. R0 rather than a cheerful default.
381
+ // No code-reading source ran — R0, not a cheerful default.
472
382
  const floor = (codeResolutions.length === 0
473
383
  ? 0
474
384
  : Math.min(...codeResolutions));
@@ -511,7 +421,7 @@ async function run(args, ctx) {
511
421
  droppedEdges: built.droppedEdges,
512
422
  rejections: built.rejections.length,
513
423
  },
514
- joins: built.joins,
424
+ crossRepoJoins: built.crossRepoJoins,
515
425
  written: {
516
426
  nodes: persisted.nodesWritten,
517
427
  edges: persisted.edgesWritten,
@@ -1 +1 @@
1
- {"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/tools/analyze.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;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;QACrD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,SAAS,CAAC,GAAG,KAAK,uCAAuC,OAAO,KAAK,EAAE,CAAC,CAAC;QACrF,CAAC;QACD,OAAO,KAAqB,CAAC;IAC/B,CAAC,CAAC;IAEF,OAAO;QACL,YAAY,EAAE,IAAI,CAAkC,KAAK,CAAC,YAAY,EAAE,cAAc,CAAC;QACvF,UAAU,EAAE,IAAI,CAAgB,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC;KACh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,CAAC,iBAAiB;gBACvC,aAAa,EAAE,SAAS,CAAC,aAAa;gBACtC,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,MAAM;aAC5C;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM;gBAC/B,QAAQ,EAAE,UAAU,CAAC,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";