@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,29 +1,7 @@
1
1
  /**
2
- * `impact` — "what breaks if I change this, what covers it, have we seen it before?"
3
- *
4
- * §18's tool-name list is deliberately not a build list ("the tool names are
5
- * implementation details") — but three of the functions it names were already
6
- * built and correct in the query layer with no MCP tool ever calling them:
7
- * `impactOf` (blast radius — find_dependents/find_callers/find_usages),
8
- * `testsCovering` (find_tests) and `rootCauseSearch` (find_related_incidents,
9
- * find_fix_patterns). This wires all three under one call, the same way
10
- * `validate` bundles env, rollback and the config graph — a developer asking
11
- * "what does changing this touch" wants the blast radius, what already tests
12
- * it and what has broken near it before in one answer, not three round trips.
13
- *
14
- * A fourth, `traceApi` (find_dependencies read the other direction, or "how
15
- * does this reach that"), runs only when a second node is given — it answers
16
- * a different question (a path between two specific symbols) and forcing it
17
- * into every call would mean walking the graph for a question nobody asked.
18
- *
19
- * ## Direction, and why the default is structural rather than data-carrying
20
- *
21
- * `propagation` already owns PROPAGATES_TO/READS/WRITES/RETURNS — what data
22
- * carries. This tool defaults to CALLS, IMPORTS, IMPLEMENTS, INHERITS,
23
- * USES_API and SERVES_API — what structure depends on what. The two tools
24
- * answer different questions over the same primitives; a caller after "who
25
- * calls this" should never have to remember that CALLS lives in a tool named
26
- * for propagation.
2
+ * `impact` wires §18's `impactOf`/`testsCovering`/`rootCauseSearch` (blast
3
+ * radius, tests, incidents) into one call, plus `traceApi` when `to` is
4
+ * given. Defaults to structural edges (CALLS/IMPORTS/IMPLEMENTS/INHERITS/USES_API/SERVES_API) — data-flow is `propagation`'s job.
27
5
  */
28
6
  import { impactOf, rootCauseSearch, testsCovering, traceApi, withProminence } from "@descryy/core";
29
7
  import { briefNode, optionalBoolean, optionalEnum, optionalInteger, optionalString, optionalStringArray, ToolInputError, } from "./kit.js";
@@ -133,16 +111,9 @@ async function run(args, ctx) {
133
111
  let path = null;
134
112
  const pathNotes = [];
135
113
  if (to !== undefined) {
136
- // `to` is documented as "a node id, symbol or path", so each shape is
137
- // tried in that order. `resolveOneNode` returns on `nodeId` without
138
- // falling through, so one call cannot cover all three: passing a symbol
139
- // as `nodeId` fails with "no node with id …" rather than looking it up by
140
- // name. This resolved a symbol only, and a caller passing the id the
141
- // schema explicitly invites got "did not resolve" — the same
142
- // prose-disagrees-with-behaviour class as the `confirmToken` incident,
143
- // and one the schema/prose gate cannot see, because the schema and the
144
- // prose agreed with each other while the handler was narrower than both.
145
- // (DEC-398.)
114
+ // `to` is documented as "node id, symbol or path"; each shape is tried in
115
+ // order since `resolveOneNode` is single-shot (a symbol passed as
116
+ // `nodeId` fails rather than falling through to a name lookup). (DEC-398.)
146
117
  const target = firstResolved(ctx.session, [{ nodeId: to }, { symbol: to }, { file: to }]) ??
147
118
  resolveOneNode(ctx.session, { symbol: to, file: undefined });
148
119
  if (target.node === null) {
@@ -176,22 +147,9 @@ async function run(args, ctx) {
176
147
  "That is not a finding that nothing depends on it — a producer for these edges may not run in " +
177
148
  "this graph. This probe is local to one node and does not choose between the causes.");
178
149
  }
179
- // The floor is the weakest evidence **behind the answer**, and a sub-query
180
- // that returned nothing is not behind it.
181
- //
182
- // `tests` and `related` each stamp R0 when they examined nothing — correctly,
183
- // since "no test covers this" and "no incident resembles this" are facts
184
- // established by looking at no edges. Folding those R0s into a `Math.min`
185
- // made every reply on a graph with no TESTS and no INCIDENT edges report
186
- // `resolutionFloor: 0`, which caps the whole answer at reliability C no
187
- // matter what the impact walk actually crossed.
188
- //
189
- // Measured, and it took a real browser to see it: the first-ever execution of
190
- // `browser.conformance.test.ts` traced a genuine path over an edge witnessed
191
- // at runtime — `resolution: 4`, with an `observedByRun` — and the reply still
192
- // said R0, because the fixture graph is sparse enough that both other
193
- // sub-queries legitimately found nothing. Every prior unit test used a graph
194
- // rich enough to hide it. (`DEC-399`.)
150
+ // Floor is the weakest evidence *behind the answer* — a sub-query that
151
+ // found nothing (R0) isn't behind it, else a sparse graph always caps
152
+ // reliability C regardless of what the impact walk actually crossed. (DEC-399.)
195
153
  const contributing = [
196
154
  impact.stamp.resolutionFloor,
197
155
  ...(tests.data.length > 0 ? [tests.stamp.resolutionFloor] : []),
@@ -216,19 +174,16 @@ async function run(args, ctx) {
216
174
  edgeTypesPresent: [...present].sort(),
217
175
  },
218
176
  stamp: { ...impact.stamp, resolutionFloor },
219
- // `impact.truncated` is the query layer's own internal cap; it says
220
- // nothing about this tool's own `limit` slice of `affected`, which can
221
- // cap further still — the same gap history.ts had (P27).
177
+ // `impact.truncated` is the query layer's own cap; it says nothing
178
+ // about this tool's own `limit` slice of `affected` (same gap history.ts had, P27).
222
179
  truncated: impact.truncated || tests.truncated || related.truncated || shownAffected.length < affected.length,
223
180
  notes,
224
181
  },
225
182
  nameLevel: false,
226
183
  ...(analysed ? (affected.length === 0 ? { state: "empty" } : {}) : { state: "refused" }),
227
- // `affected` is the primary collection this tool exists to report — tests/
228
- // related can also be independently capped, but a single shown/total pair
229
- // cannot honestly describe three different lists, so this covers the one
230
- // §4's TruncationDetail doc calls "the primary collection" and leaves the
231
- // other two to the boolean above and their own prose notes.
184
+ // `affected` is the primary collection this tool reports — tests/related
185
+ // can also be capped, but one shown/total pair can't describe three
186
+ // lists, so this covers only the primary one (§4's TruncationDetail).
232
187
  ...(shownAffected.length < affected.length
233
188
  ? { truncatedDetail: { shown: shownAffected.length, total: affected.length, more: null } }
234
189
  : {}),
@@ -242,14 +197,7 @@ async function run(args, ctx) {
242
197
  `${related.data.length > 0 ? `; ${related.data.length} related incident(s)/fix(es)` : ""}.`,
243
198
  };
244
199
  }
245
- /**
246
- * The first criteria shape that resolves to a real node, or null if none does.
247
- *
248
- * Exists because `resolveOneNode` is single-shot by design — it answers for the
249
- * one criterion it is given and returns a headline explaining that criterion's
250
- * failure. A parameter documented as accepting several shapes needs each tried
251
- * before the caller is told nothing matched.
252
- */
200
+ /** First criteria shape that resolves, or null. `resolveOneNode` is single-shot per criterion, so a parameter documented as accepting several shapes needs each tried before reporting no match. */
253
201
  function firstResolved(session, attempts) {
254
202
  for (const criteria of attempts) {
255
203
  const found = resolveOneNode(session, criteria);
@@ -1 +1 @@
1
- {"version":3,"file":"impact.js","sourceRoot":"","sources":["../../src/tools/impact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGnG,OAAO,EACL,SAAS,EACT,eAAe,EACf,YAAY,EACZ,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,cAAc,GAKf,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkE7C,wEAAwE;AACxE,MAAM,qBAAqB,GAAwB;IACjD,OAAO;IACP,SAAS;IACT,YAAY;IACZ,UAAU;IACV,UAAU;IACV,YAAY;CACb,CAAC;AAEF,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;QACvE,MAAM,EAAE;YACN,IAAI,EAAE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- * The commands of blueprint §1.11, in the order a developer meets them.
3
- *
4
- * `analyze` first because nothing else works without it, then the three
5
- * questions asked of an existing graph, then `contracts` — which is declared,
6
- * described and honestly unavailable. See `contracts.ts` for why it is here
7
- * rather than omitted.
8
- */
1
+ /** The commands of blueprint §1.11, in the order a developer meets them: `analyze` first
2
+ * (nothing else works without it), then the three questions asked of an existing graph,
3
+ * then `contracts` — declared, described, and honestly unavailable (see `contracts.ts`). */
9
4
  import type { ToolDefinition } from "./kit.ts";
10
5
  export declare const TOOLS: readonly ToolDefinition[];
11
6
  export declare const TOOLS_BY_NAME: ReadonlyMap<string, ToolDefinition>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAgCH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,KAAK,EAAE,SAAS,cAAc,EAoC1C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAE7D,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EACV,SAAS,EACT,cAAc,EACd,QAAQ,EACR,WAAW,EACX,cAAc,GACf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAO7C,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,mBA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M,sBAAsB,CAAC;AAC9B,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EACV,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxF,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC3G,YAAY,EACV,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5F,YAAY,EACV,sBAAsB,EACtB,+BAA+B,GAChC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,11 +1,6 @@
1
- /**
2
- * The commands of blueprint §1.11, in the order a developer meets them.
3
- *
4
- * `analyze` first because nothing else works without it, then the three
5
- * questions asked of an existing graph, then `contracts` — which is declared,
6
- * described and honestly unavailable. See `contracts.ts` for why it is here
7
- * rather than omitted.
8
- */
1
+ /** The commands of blueprint §1.11, in the order a developer meets them: `analyze` first
2
+ * (nothing else works without it), then the three questions asked of an existing graph,
3
+ * then `contracts` — declared, described, and honestly unavailable (see `contracts.ts`). */
9
4
  import { analyzeTool } from "./analyze.js";
10
5
  import { browserClickTool } from "./browser-click.js";
11
6
  import { browserCloseSessionTool } from "./browser-close-session.js";
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 +1,11 @@
1
- /**
2
- * What every tool is handed and what every tool may return.
3
- *
4
- * The return type is `ToolAnswer`, never content. A tool produces an *answer*;
5
- * `render.ts` is the only thing that turns an answer into a reply, and it
6
- * attaches the staleness stamp, the reliability cap and the disclosures on the
7
- * way. A tool physically cannot ship a result with the caveats stripped off.
8
- */
1
+ /** What every tool is handed and returns. A tool produces a `ToolAnswer`, never content —
2
+ * `render.ts` alone turns it into a reply, attaching the staleness stamp, reliability cap and
3
+ * disclosures. A tool cannot ship a result with the caveats stripped off. */
9
4
  import type { ResolutionLevel, ResultState, ToolClass } from "@descryy/ir";
10
5
  import type { ReplyFit, ToolAnswer, ToolTier, TruncationDetail, WitnessedEvidence } from "../render.ts";
11
6
  import type { Session } from "../session.ts";
12
- /**
13
- * Streaming narration — §22.2's primary UX, at the protocol level.
14
- *
15
- * A no-op when the client did not send a progress token, which is the common
16
- * case for a scripted call. Tools call it unconditionally; deciding whether
17
- * anybody is listening is not their job.
18
- */
7
+ /** Streaming narration, §22.2. A no-op when the client sent no progress token; tools call it
8
+ * unconditionally and leave "is anyone listening" to the caller. */
19
9
  export type Progress = (message: string, current?: number, total?: number) => void;
20
10
  export interface ToolContext {
21
11
  readonly session: Session;
@@ -26,74 +16,25 @@ export interface ToolDefinition {
26
16
  readonly name: string;
27
17
  readonly title: string;
28
18
  readonly description: string;
29
- /**
30
- * DEC-278's three classes, and the assignment for all fourteen endpoints is
31
- * tabulated in `ai-tool-contract.md` §8 rather than re-derived here.
32
- *
33
- * The line is deliberately **not** "does it write bytes". It is *can this
34
- * call's effect change a later finding without the developer having said
35
- * so.* `analyze` re-derives from code already on disk and `link_workspace`
36
- * records where that code is, so neither can introduce a claim the
37
- * repository does not already contain — both are `stateful-read`.
38
- * `questions` writes a `ConfirmedFact`: human testimony that becomes a graph
39
- * input, feeds `humanAsserted`, and is capped at reliability class B by
40
- * DEC-223 precisely because it rests on one unaudited assertion. It is the
41
- * only `action`, and the only class §4's two-call handshake gates.
42
- *
43
- * Required, and deliberately given no default — the same reasoning as
44
- * `reliabilityCap`'s `nameLevel`. A tool author who has not thought about
45
- * which class they are in is exactly the author who would inherit the wrong
46
- * one, and the wrong one here is a mutating endpoint silently treated as
47
- * pure.
48
- *
49
- * The type lives in `@descryy/ir` because the desktop lane and the AI layer
50
- * read the same three names; restating the union here would be a second
51
- * source of truth for one vocabulary.
52
- */
19
+ /** DEC-278's three classes (`ai-tool-contract.md` §8). Not "does it write bytes" but "can this
20
+ * change a later finding unannounced" — `questions` is the only `action`, gated by §4's
21
+ * handshake, capped at reliability B by DEC-223. No default: unset silently treats writes as pure. */
53
22
  readonly class: ToolClass;
54
- /**
55
- * MK-5 — does this tool's output state a conclusion about the user's code,
56
- * or report a fact about the graph? Required and undefaulted, the same
57
- * reasoning as `class` just above: three tools (`validate`, `contracts`,
58
- * `cross_pr`) already refuse rather than over-claim and never return raw
59
- * candidates — an author who has not thought about which one theirs is
60
- * would be exactly the author to leave it defaulted to the safer-sounding
61
- * one. See `ToolTier`'s own doc in `../render.ts` for why the type lives
62
- * there and not here.
63
- */
23
+ /** MK-5 — does the output state a conclusion, or just a graph fact? Required, undefaulted, same
24
+ * reasoning as `class`. See `ToolTier` in `../render.ts` for why the type lives there. */
64
25
  readonly tier: ToolTier;
65
- /**
66
- * Contract §6, rule 8. Every tool starts at `"1.0.0"` — none has shipped a
67
- * behaviour change yet — and a future bump is what invalidates the golden
68
- * investigations that depended on the old behaviour (`ai-layer-plan.md` §9
69
- * layer 4).
70
- */
26
+ /** Contract §6 rule 8. Starts at `"1.0.0"`; a future bump invalidates golden investigations
27
+ * that depended on the old behaviour (`ai-layer-plan.md` §9 layer 4). */
71
28
  readonly version: string;
72
29
  readonly inputSchema: Record<string, unknown>;
73
30
  run(args: Record<string, unknown>, ctx: ToolContext): Promise<ToolAnswer<unknown>>;
74
- /**
75
- * Required when, and only when, `class === "action"` — `action-handshake.ts`
76
- * throws at mint time if an action-class tool omits it (a registry bug, not
77
- * a caller mistake). Absent on `read`/`stateful-read` tools; TypeScript
78
- * cannot express "required iff this other field equals X", so it stays
79
- * optional here and the constraint is enforced at the one call site that
80
- * needs it, `tool-classes.test.ts` for the static half.
81
- *
82
- * Returns the plain-English "willDo" description of what confirming this
83
- * call would do, or `undefined` when *this particular call* has nothing to
84
- * confirm — `questions` with no `answer` argument is a pure read of the
85
- * open-question queue, and gating that behind a token would make the tool
86
- * unable to answer the first question asked of it.
87
- */
31
+ /** Required iff `class === "action"` (enforced in `action-handshake.ts` and
32
+ * `tool-classes.test.ts`, not by the type). Returns the "willDo" text, or `undefined` when this
33
+ * call has nothing to confirm (e.g. `questions` with no `answer`). */
88
34
  describeAction?(args: Record<string, unknown>, ctx: ToolContext): string | undefined | Promise<string | undefined>;
89
35
  }
90
- /**
91
- * An argument the caller can fix.
92
- *
93
- * Distinct from a thrown `Error`, which is a bug here. This becomes an `isError`
94
- * tool result the agent can read and retry from; a bug becomes a JSON-RPC
95
- * internal error, which it cannot.
96
- */
36
+ /** An argument the caller can fix — distinct from a thrown `Error` (a bug here). This becomes an
37
+ * `isError` result the agent can read and retry from; a bug becomes an unreadable JSON-RPC error. */
97
38
  export declare class ToolInputError extends Error {
98
39
  constructor(message: string);
99
40
  }
@@ -103,14 +44,8 @@ export declare function optionalStringArray(args: Record<string, unknown>, key:
103
44
  export declare function optionalInteger(args: Record<string, unknown>, key: string, min: number): number | undefined;
104
45
  export declare function optionalEnum<T extends string>(args: Record<string, unknown>, key: string, allowed: readonly T[]): T | undefined;
105
46
  export declare function optionalBoolean(args: Record<string, unknown>, key: string): boolean | undefined;
106
- /**
107
- * Wrap data that did not come from the query layer in the same envelope.
108
- *
109
- * `analyze` is the case: it writes rather than reads, so it has no
110
- * `QueryResult`, and it would be the natural place for the disclosure discipline
111
- * to leak. It uses this instead, so its reply carries the same stamp and the
112
- * same rules as every query's.
113
- */
47
+ /** Wraps data that did not come from the query layer in the same envelope — e.g. `analyze`, which
48
+ * writes rather than reads and has no `QueryResult`, so its reply still carries the same stamp. */
114
49
  export declare function answer<T>(options: {
115
50
  readonly headline: string;
116
51
  readonly data: T;
@@ -133,27 +68,13 @@ export declare function answer<T>(options: {
133
68
  };
134
69
  /** See `render.ts`'s `ToolAnswer.fitToBudget` — how this tool shrinks to the reply ceiling. */
135
70
  readonly fitToBudget?: (budgetBytes: number) => ReplyFit<T>;
136
- /**
137
- * See `render.ts`'s `ToolAnswer.runtimeEvidence`. Supplied only by a tool
138
- * that watched a real running application, on a path where it really did —
139
- * omitted everywhere else, which is sixteen of the seventeen tools and every
140
- * refusal.
141
- */
71
+ /** See `render.ts`'s `ToolAnswer.runtimeEvidence`. Set only by a tool that actually watched a
72
+ * running app; omitted everywhere else, including every refusal. */
142
73
  readonly runtimeEvidence?: WitnessedEvidence;
143
74
  }): ToolAnswer<T>;
144
- /**
145
- * An IR node as it appears in a tool reply.
146
- *
147
- * The four optional fields are optional in the payload too, not `null` — a
148
- * node with no file omits the key rather than carrying an empty one, which is
149
- * what keeps a 1,000-node reply affordable. A caller must therefore test for
150
- * presence, not for null.
151
- *
152
- * `language` is the IR node's own field passed through verbatim. Nothing here
153
- * or above reads it, branches on it, or knows any value it can take (rule 1);
154
- * it travels because a developer reading the reply is entitled to see which
155
- * adapter's evidence a row rests on.
156
- */
75
+ /** An IR node as it appears in a reply. Optional fields are omitted, not `null`, keeping a
76
+ * 1,000-node reply affordable — callers test for presence. `language` passes through verbatim;
77
+ * nothing here reads or branches on it (rule 1 — no language name above the IR boundary). */
157
78
  export interface BriefNode {
158
79
  readonly id: string;
159
80
  readonly type: string;
@@ -164,16 +85,9 @@ export interface BriefNode {
164
85
  readonly language?: string;
165
86
  readonly resolution: number;
166
87
  }
167
- /**
168
- * What a tool returns when the symbol, path or id it was given resolved to
169
- * nothing, or to more than one thing.
170
- *
171
- * Shared by `impact` and `propagation`, because both go through
172
- * `resolveOneNode` and both refuse the same way: no answer is computed, and
173
- * the candidates come back so the caller can narrow rather than guess. An
174
- * empty `candidates` means nothing matched at all; two or more means the name
175
- * was ambiguous. One is impossible — that is the case that resolves.
176
- */
88
+ /** Returned when a symbol/path/id resolved to nothing or to more than one thing (shared by
89
+ * `impact` and `propagation` via `resolveOneNode`): empty `candidates` means no match, two or
90
+ * more means ambiguous — one is impossible, that case resolves. */
177
91
  export interface NodeCandidates {
178
92
  readonly candidates: readonly BriefNode[];
179
93
  }
@@ -190,4 +104,43 @@ export declare function briefNode(node: {
190
104
  language: string | null;
191
105
  resolution: number;
192
106
  }): BriefNode;
107
+ /**
108
+ * Descry's own state inside this repository, which is not the developer's
109
+ * uncommitted change.
110
+ *
111
+ * ## Two paths, not one, and the second is the one that bit
112
+ *
113
+ * The first version derived this from the configured graph path alone. That is
114
+ * right for a single repository, where the graph sits in this repo's own
115
+ * `.descry/` — and wrong the moment two repositories share one graph, which is
116
+ * exactly what `link_workspace` produces:
117
+ *
118
+ * ```json
119
+ * // sherpa-backend/.descry/config.json
120
+ * "graph": "/home/…/sherpa-frontend/.descry/graph.db"
121
+ * ```
122
+ *
123
+ * The derived exclusion then pointed into the *other* repository, and this
124
+ * repository's own `.descry/config.json` was excluded by nothing. Measured on a
125
+ * real workspace: it was reported as the developer's uncommitted work. Not an
126
+ * edge case — every shared-graph workspace has it.
127
+ *
128
+ * `.descry/evidence.db` escaped only because that repository's `.gitignore`
129
+ * happened to carry `*.db`. **The exclusion must not depend on the user having
130
+ * gitignored anything**, which is what that near-miss shows: a tool's own state
131
+ * is excluded because it is the tool's, not because someone tidied up.
132
+ *
133
+ * ## Why the graph path is still consulted
134
+ *
135
+ * It is configurable, so it can be moved out of `.descry/` and stay inside the
136
+ * repository. A path outside the repository costs nothing to list — it is not
137
+ * in this working tree — and is kept rather than special-cased, because the
138
+ * test for "is this path inside this repo" is the kind that is subtly wrong on
139
+ * symlinks and relative paths.
140
+ *
141
+ * Returned as directory prefixes matched at a segment boundary by the git
142
+ * helpers, so `.descry` excludes `.descry/config.json` and leaves
143
+ * `src/.descryfile.py` alone.
144
+ */
145
+ export declare function descryO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E,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,SAAS,CAUZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAWnE"}
package/dist/tools/kit.js CHANGED
@@ -1,28 +1,18 @@
1
- /**
2
- * What every tool is handed and what every tool may return.
3
- *
4
- * The return type is `ToolAnswer`, never content. A tool produces an *answer*;
5
- * `render.ts` is the only thing that turns an answer into a reply, and it
6
- * attaches the staleness stamp, the reliability cap and the disclosures on the
7
- * way. A tool physically cannot ship a result with the caveats stripped off.
8
- */
9
- /**
10
- * An argument the caller can fix.
11
- *
12
- * Distinct from a thrown `Error`, which is a bug here. This becomes an `isError`
13
- * tool result the agent can read and retry from; a bug becomes a JSON-RPC
14
- * internal error, which it cannot.
15
- */
1
+ /** What every tool is handed and returns. A tool produces a `ToolAnswer`, never content —
2
+ * `render.ts` alone turns it into a reply, attaching the staleness stamp, reliability cap and
3
+ * disclosures. A tool cannot ship a result with the caveats stripped off. */
4
+ import { dirname } from "node:path";
5
+ import { CONFIG_RELATIVE_PATH } from "../session.js";
6
+ /** An argument the caller can fix — distinct from a thrown `Error` (a bug here). This becomes an
7
+ * `isError` result the agent can read and retry from; a bug becomes an unreadable JSON-RPC error. */
16
8
  export class ToolInputError extends Error {
17
9
  constructor(message) {
18
10
  super(message);
19
11
  this.name = "ToolInputError";
20
12
  }
21
13
  }
22
- // --- argument reading -------------------------------------------------------
23
- // Hand-written rather than schema-validated. The surface is five tools with
24
- // about a dozen arguments between them; a validator would be a dependency and a
25
- // second source of truth for the schemas already declared to the client.
14
+ // Hand-written, not schema-validated: a validator would be a second source of truth for the
15
+ // schemas already declared to the client.
26
16
  export function optionalString(args, key) {
27
17
  const value = args[key];
28
18
  if (value === undefined || value === null)
@@ -72,15 +62,8 @@ export function optionalBoolean(args, key) {
72
62
  throw new ToolInputError(`"${key}" must be a boolean`);
73
63
  return value;
74
64
  }
75
- // --- building answers -------------------------------------------------------
76
- /**
77
- * Wrap data that did not come from the query layer in the same envelope.
78
- *
79
- * `analyze` is the case: it writes rather than reads, so it has no
80
- * `QueryResult`, and it would be the natural place for the disclosure discipline
81
- * to leak. It uses this instead, so its reply carries the same stamp and the
82
- * same rules as every query's.
83
- */
65
+ /** Wraps data that did not come from the query layer in the same envelope — e.g. `analyze`, which
66
+ * writes rather than reads and has no `QueryResult`, so its reply still carries the same stamp. */
84
67
  export function answer(options) {
85
68
  const result = {
86
69
  data: options.data,
@@ -117,4 +100,53 @@ export function briefNode(node) {
117
100
  resolution: node.resolution,
118
101
  };
119
102
  }
103
+ /**
104
+ * Descry's own state inside this repository, which is not the developer's
105
+ * uncommitted change.
106
+ *
107
+ * ## Two paths, not one, and the second is the one that bit
108
+ *
109
+ * The first version derived this from the configured graph path alone. That is
110
+ * right for a single repository, where the graph sits in this repo's own
111
+ * `.descry/` — and wrong the moment two repositories share one graph, which is
112
+ * exactly what `link_workspace` produces:
113
+ *
114
+ * ```json
115
+ * // sherpa-backend/.descry/config.json
116
+ * "graph": "/home/…/sherpa-frontend/.descry/graph.db"
117
+ * ```
118
+ *
119
+ * The derived exclusion then pointed into the *other* repository, and this
120
+ * repository's own `.descry/config.json` was excluded by nothing. Measured on a
121
+ * real workspace: it was reported as the developer's uncommitted work. Not an
122
+ * edge case — every shared-graph workspace has it.
123
+ *
124
+ * `.descry/evidence.db` escaped only because that repository's `.gitignore`
125
+ * happened to carry `*.db`. **The exclusion must not depend on the user having
126
+ * gitignored anything**, which is what that near-miss shows: a tool's own state
127
+ * is excluded because it is the tool's, not because someone tidied up.
128
+ *
129
+ * ## Why the graph path is still consulted
130
+ *
131
+ * It is configurable, so it can be moved out of `.descry/` and stay inside the
132
+ * repository. A path outside the repository costs nothing to list — it is not
133
+ * in this working tree — and is kept rather than special-cased, because the
134
+ * test for "is this path inside this repo" is the kind that is subtly wrong on
135
+ * symlinks and relative paths.
136
+ *
137
+ * Returned as directory prefixes matched at a segment boundary by the git
138
+ * helpers, so `.descry` excludes `.descry/config.json` and leaves
139
+ * `src/.descryfile.py` alone.
140
+ */
141
+ export function descryOwnState(graphPath) {
142
+ // This repository's own state directory, always — whatever the graph does.
143
+ const out = new Set([dirname(CONFIG_RELATIVE_PATH)]);
144
+ if (graphPath !== ":memory:" && graphPath !== "") {
145
+ const normalised = graphPath.replace(/\\/g, "/").replace(/^\.\//, "");
146
+ const slash = normalised.lastIndexOf("/");
147
+ // The directory, not the file: SQLite writes `-wal` and `-shm` beside it.
148
+ out.add(slash === -1 ? normalised : normalised.slice(0, slash));
149
+ }
150
+ return [...out];
151
+ }
120
152
  //# sourceMappingURL=kit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"kit.js","sourceRoot":"","sources":["../../src/tools/kit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAyFH;;;;;;GAMG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAED,+EAA+E;AAC/E,4EAA4E;AAC5E,gFAAgF;AAChF,yEAAyE;AAEzE,MAAM,UAAU,cAAc,CAAC,IAA6B,EAAE,GAAW;IACvE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5D,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,MAAM,IAAI,cAAc,CAAC,IAAI,GAAG,oBAAoB,CAAC,CAAC;IACrF,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAA6B,EAAE,GAAW;IACvE,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC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