@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,38 +1,12 @@
1
1
  /**
2
- * What a saved scenario *is* — the schema half of
3
- * `DEC-383`.
4
- *
5
- * This module has no browser in it and imports nothing from the browser port
6
- * deliberately. A scenario is an artifact a person authored and a reviewer
7
- * reads in a diff; whether one can be *replayed* is the runner's question, and
8
- * keeping the two apart is what lets the format be tested without launching
9
- * anything.
10
- *
11
- * ## The one shape decision worth reading before the types
12
- *
13
- * **A step stores no `ref`.** The port's action verbs take a `ref` and that is
14
- * correct — a ref ties an action to a snapshot the agent actually saw. But a
15
- * ref is scoped to the snapshot that issued it, and a replay is always a later
16
- * session, so a stored ref resolves to nothing or, worse, to something else. A
17
- * step therefore stores a `TargetDescriptor` and the runner re-resolves it
18
- * against a fresh snapshot.
19
- *
20
- * All three descriptor fields are required, together, always. Not one of them
21
- * and not a fallback chain: `selector` alone breaks on a markup refactor and
22
- * silently matches the wrong element when a class is reused; `role` + `name`
23
- * alone breaks on a copy change; and "try the selector, else role+name" is the
24
- * dangerous option, because it turns a real disagreement into a quiet
25
- * substitution — which is how a scenario keeps reporting green against a page
26
- * that changed underneath it.
27
- */
2
+ * What a saved scenario is (DEC-383's schema half). No browser import — replayability
3
+ * is the runner's separate question. A step stores a `TargetDescriptor`, never a `ref`
4
+ * (refs are snapshot-scoped, stale by replay). All 3 descriptor fields are required
5
+ * together — a fallback chain would quietly substitute a match instead of disagreeing. */
28
6
  /** Bumped when a stored scenario's shape changes. An integer, never semver: one repository, one reader, nothing to argue about. */
29
7
  export declare const SCENARIO_SCHEMA_VERSION = 1;
30
- /**
31
- * How a step names the element it acts on. Re-resolved at replay against a
32
- * fresh snapshot, and required to match **exactly one** element — zero,
33
- * ambiguous and partial are each a refusal that names which of these three
34
- * fields disagreed and what the page holds now.
35
- */
8
+ /** How a step names its element. Re-resolved at replay against a fresh snapshot,
9
+ * must match exactly one — zero/ambiguous/partial each refuse, naming what disagreed. */
36
10
  export interface TargetDescriptor {
37
11
  readonly role: string;
38
12
  readonly name: string;
@@ -49,20 +23,9 @@ export interface ScenarioStep {
49
23
  /** What to enter. Present for `type` and `fill` alone. `type` appends, `fill` replaces — the runtime's two text verbs, kept distinct here because the stored artifact must say which one a replay should perform. */
50
24
  readonly text: string | null;
51
25
  }
52
- /**
53
- * What the scenario claims about the application.
54
- *
55
- * Kept deliberately small and derived from what a snapshot and a run's
56
- * observations already carry, rather than invented: an assertion the runner
57
- * cannot evaluate from real evidence is a promise the format cannot keep.
58
- *
59
- * `noConsoleErrors` and `noFailedRequests` are worth one note, because they
60
- * interact with `DEC-384`. An *observed* console
61
- * error does not block a push — it is frequently true of a working page. An
62
- * *asserted* absence of console errors that then fails does block, because the
63
- * author opted in and wrote the claim down. Same evidence, different status,
64
- * and the difference is entirely whether a person claimed something about it.
65
- */
26
+ /** What the scenario claims. Kept small, derived only from what a snapshot/run
27
+ * can observe — an assertion the runner can't evaluate is a promise it can't keep.
28
+ * DEC-384: an *observed* console error/failed request doesn't block; an *asserted* one does. */
66
29
  export type ScenarioAssertionKind = "elementVisible" | "textEquals" | "urlEquals" | "noConsoleErrors" | "noFailedRequests";
67
30
  export interface ScenarioAssertion {
68
31
  readonly kind: ScenarioAssertionKind;
@@ -78,38 +41,19 @@ export interface Scenario {
78
41
  readonly name: string;
79
42
  readonly description: string | null;
80
43
  readonly targetUrl: string;
81
- /**
82
- * When this was saved, and the commit it was authored against.
83
- *
84
- * Neither expires anything and neither is checked at replay. They exist so a
85
- * failure can say *the scenario was written against a different revision of
86
- * this application*, which is usually the answer to "why did this break".
87
- * DEC-223 §7's disclosed-non-detection choice, repeated on purpose: building
88
- * an expiry against a population of zero real scenarios would be machinery
89
- * ahead of its evidence, and retrofitting one later needs no schema change
90
- * because the fields are already here.
91
- */
44
+ /** When saved + commit authored against. Neither expires nor is checked at replay —
45
+ * exists to explain "written against a different revision" failures. DEC-223 §7's
46
+ * disclosed-non-detection choice: no expiry machinery until real scenarios exist. */
92
47
  readonly savedAt: string;
93
48
  readonly savedAtCommit: string;
94
49
  readonly steps: readonly ScenarioStep[];
95
- /**
96
- * **Required, and may be empty.** A replay that clicks successfully through a
97
- * broken page and reports success is a false negative with a confident face
98
- * on it, and the runner cannot invent assertions at replay time — it has no
99
- * idea what the author meant to check. So they are stored with the steps.
100
- *
101
- * Empty is storable, because saving an exploration must stay possible. It is
102
- * never `passed`: see `isUnverifying`.
103
- */
50
+ /** Required, may be empty. The runner can't invent assertions at replay — a
51
+ * successful click-through of a broken page with none stored would be a
52
+ * confident false negative. Empty is storable (exploration); never `passed`. */
104
53
  readonly assertions: readonly ScenarioAssertion[];
105
54
  }
106
- /**
107
- * True when a scenario claims nothing, and so can verify nothing.
108
- *
109
- * A replay of one of these that meets no error has established that the steps
110
- * still resolve — real information, and not the same statement as "the
111
- * application is behaving." The exit rule reports it as `unverified`; this is
112
- * the predicate that decides which word is honest.
113
- */
55
+ /** True when a scenario claims nothing, so verifies nothing. A clean replay still
56
+ * proves the steps resolve — real info, not "the app is behaving". Reported as
57
+ * `unverified`. */
114
58
  export declare function isUnverifying(scenario: Scenario): boolean;
115
59
  //# sourceMappingURL=scenario.d.ts.map
@@ -1 +1 @@
1
- {"version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BAAgB,GAChB,YAAY,GACZ,WAAW,GACX,iBAAiB,GACjB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,gLAAgL;IAChL,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,mFAAmF;IACnF,QAAQ,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzC,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;0FAEsF;IACtF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC;;qFAEiF;IACjF,QAAQ,CAAC,UAAU,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACnD;AAED;;oBAEoB;AACpB,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEzD"}
@@ -1,40 +1,13 @@
1
1
  /**
2
- * What a saved scenario *is* — the schema half of
3
- * `DEC-383`.
4
- *
5
- * This module has no browser in it and imports nothing from the browser port
6
- * deliberately. A scenario is an artifact a person authored and a reviewer
7
- * reads in a diff; whether one can be *replayed* is the runner's question, and
8
- * keeping the two apart is what lets the format be tested without launching
9
- * anything.
10
- *
11
- * ## The one shape decision worth reading before the types
12
- *
13
- * **A step stores no `ref`.** The port's action verbs take a `ref` and that is
14
- * correct — a ref ties an action to a snapshot the agent actually saw. But a
15
- * ref is scoped to the snapshot that issued it, and a replay is always a later
16
- * session, so a stored ref resolves to nothing or, worse, to something else. A
17
- * step therefore stores a `TargetDescriptor` and the runner re-resolves it
18
- * against a fresh snapshot.
19
- *
20
- * All three descriptor fields are required, together, always. Not one of them
21
- * and not a fallback chain: `selector` alone breaks on a markup refactor and
22
- * silently matches the wrong element when a class is reused; `role` + `name`
23
- * alone breaks on a copy change; and "try the selector, else role+name" is the
24
- * dangerous option, because it turns a real disagreement into a quiet
25
- * substitution — which is how a scenario keeps reporting green against a page
26
- * that changed underneath it.
27
- */
2
+ * What a saved scenario is (DEC-383's schema half). No browser import — replayability
3
+ * is the runner's separate question. A step stores a `TargetDescriptor`, never a `ref`
4
+ * (refs are snapshot-scoped, stale by replay). All 3 descriptor fields are required
5
+ * together — a fallback chain would quietly substitute a match instead of disagreeing. */
28
6
  /** Bumped when a stored scenario's shape changes. An integer, never semver: one repository, one reader, nothing to argue about. */
29
7
  export const SCENARIO_SCHEMA_VERSION = 1;
30
- /**
31
- * True when a scenario claims nothing, and so can verify nothing.
32
- *
33
- * A replay of one of these that meets no error has established that the steps
34
- * still resolve — real information, and not the same statement as "the
35
- * application is behaving." The exit rule reports it as `unverified`; this is
36
- * the predicate that decides which word is honest.
37
- */
8
+ /** True when a scenario claims nothing, so verifies nothing. A clean replay still
9
+ * proves the steps resolve — real info, not "the app is behaving". Reported as
10
+ * `unverified`. */
38
11
  export function isUnverifying(scenario) {
39
12
  return scenario.assertions.length === 0;
40
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"scenario.js","sourceRoot":"","sources":["../../src/scenarios/scenario.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,mIAAmI;AACnI,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAyFzC;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,QAAkB;IAC9C,OAAO,QAAQ,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC;AAC1C,CAAC"}
1
+ {"version":3,"file":"scenario.js","sourceRoot":"","sources":["../../src/scenarios/scenario.ts"],"names":[],"mappings":"AAAA;;;;0FAI0F;AAE1F,mIAAmI;AACnI,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AA4DzC;;oBAEoB;AACpB,MAAM,UAAU,aAAa,CAAC,QAAkB;IAC9C,OAAO,QAAQ,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC;AAC1C,CAAC"}
@@ -1,51 +1,21 @@
1
1
  /**
2
- * Where a scenario lives on disk — `DEC-383` §1.
3
- *
4
- * **`descry/scenarios/`, committed, and deliberately not `.descry/`.** The
5
- * obvious home was beside `config.json` and `graph.db`, and it is wrong: §7's
6
- * whole point is a run with no agent in it — a pre-push hook and a CI step —
7
- * and CI runs on a fresh checkout. `.descry/` holds a regenerable graph and a
8
- * config naming absolute adapter paths, which is why it is ignored; a scenario
9
- * stored there works locally, vanishes in CI, and reports nothing rather than
10
- * failing.
11
- *
12
- * The split is by kind, not by prefix: `.descry/` for what Descry can rebuild
13
- * or what is true only on this machine, `descry/` for what a person wrote and a
14
- * reviewer should see in a diff.
15
- *
16
- * One file per scenario, so two branches adding scenarios do not conflict and
17
- * each is reviewable on its own.
2
+ * Scenario storage — `DEC-383` §1. Lives in committed `descry/scenarios/`,
3
+ * never `.descry/` (gitignored, regenerable): §7 needs agent-free runs on
4
+ * a fresh CI checkout, where `.descry/` would vanish and fail silently. One file per scenario avoids merge conflicts.
18
5
  */
19
6
  import { type ScenarioParseResult } from "./parse.ts";
20
7
  import type { Scenario } from "./scenario.ts";
21
8
  export declare function scenariosDirectory(repoPath: string): string;
9
+ /** Not the disk-safe path — `readScenario`/`writeScenario` go through `confinedScenarioPath` below. This one is for display messages naming even a refused name. */
22
10
  export declare function scenarioPath(repoPath: string, name: string): string;
23
- /**
24
- * Every saved scenario's name.
25
- *
26
- * A repository with no scenarios returns `[]` — a fact about the repository,
27
- * not a failure to look. Conflating "none saved" with "could not read" is the
28
- * distinction the five reply states exist to keep, applied one layer down.
29
- */
11
+ /** Thrown when the scenarios directory exists but can't be read (permission error, not-a-directory, ...) — a fact about Descry's ability to look, never about count. Must not collapse to `[]` (C-F2): that would teach a false "nothing saved". */
12
+ export declare class ScenarioListError extends Error {
13
+ constructor(dir: string, cause: unknown);
14
+ }
15
+ /** Every saved scenario's name. ENOENT means "nothing has ever been saved" → `[]`; any other read error (permission, not-a-directory) throws `ScenarioListError` instead — the five-reply-states distinction, one layer down. */
30
16
  export declare function listScenarios(repoPath: string): Promise<readonly string[]>;
31
- /**
32
- * Read one scenario.
33
- *
34
- * Never throws: a missing file, unreadable text and a malformed document are
35
- * all refusals carrying the path, because a caller replaying scenarios in CI
36
- * needs to report which file was wrong rather than die on the first one. The
37
- * message distinguishes *nothing is there* from *something is there and is
38
- * wrong* — conflating them sends someone to debug a file that does not exist.
39
- */
17
+ /** Reads one scenario; never throws — missing file, unreadable text, malformed document are all refusals carrying the path, so a CI replay can report which file was wrong rather than die on the first. */
40
18
  export declare function readScenario(repoPath: string, name: string): Promise<ScenarioParseResult>;
41
- /**
42
- * Write one scenario, refusing to store anything this reader could not read
43
- * back.
44
- *
45
- * The validation on the way out is not redundant with the one on the way in.
46
- * A scenario is written once and read on every push afterwards, so a fault
47
- * saved today surfaces at the worst possible moment — during a check somebody
48
- * is waiting on — and by then the session that could have explained it is gone.
49
- */
19
+ /** Writes one scenario, refusing anything this reader couldn't read back. Validating on the way out isn't redundant — a fault saved today surfaces during a push check, long after the session that could explain it is gone. */
50
20
  export declare function writeScenario(repoPath: string, scenario: Scenario): Promise<void>;
51
21
  //# sourceMappingURL=storage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/scenarios/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAAoC,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,KAAK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,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAwB/F;AAED,iOAAiO;AACjO,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAQvF"}
@@ -1,59 +1,76 @@
1
1
  /**
2
- * Where a scenario lives on disk — `DEC-383` §1.
3
- *
4
- * **`descry/scenarios/`, committed, and deliberately not `.descry/`.** The
5
- * obvious home was beside `config.json` and `graph.db`, and it is wrong: §7's
6
- * whole point is a run with no agent in it — a pre-push hook and a CI step —
7
- * and CI runs on a fresh checkout. `.descry/` holds a regenerable graph and a
8
- * config naming absolute adapter paths, which is why it is ignored; a scenario
9
- * stored there works locally, vanishes in CI, and reports nothing rather than
10
- * failing.
11
- *
12
- * The split is by kind, not by prefix: `.descry/` for what Descry can rebuild
13
- * or what is true only on this machine, `descry/` for what a person wrote and a
14
- * reviewer should see in a diff.
15
- *
16
- * One file per scenario, so two branches adding scenarios do not conflict and
17
- * each is reviewable on its own.
2
+ * Scenario storage — `DEC-383` §1. Lives in committed `descry/scenarios/`,
3
+ * never `.descry/` (gitignored, regenerable): §7 needs agent-free runs on
4
+ * a fresh CI checkout, where `.descry/` would vanish and fail silently. One file per scenario avoids merge conflicts.
18
5
  */
19
6
  import { mkdir, readFile, readdir, writeFile } from "node:fs/promises";
20
- import { join } from "node:path";
7
+ import { join, resolve, sep } from "node:path";
21
8
  import { parseScenario, serializeScenario } from "./parse.js";
22
9
  const SCENARIO_SUFFIX = ".scenario.json";
23
10
  export function scenariosDirectory(repoPath) {
24
11
  return join(repoPath, "descry", "scenarios");
25
12
  }
13
+ /** Not the disk-safe path — `readScenario`/`writeScenario` go through `confinedScenarioPath` below. This one is for display messages naming even a refused name. */
26
14
  export function scenarioPath(repoPath, name) {
27
15
  return join(scenariosDirectory(repoPath), `${name}${SCENARIO_SUFFIX}`);
28
16
  }
29
- /**
30
- * Every saved scenario's name.
31
- *
32
- * A repository with no scenarios returns `[]` — a fact about the repository,
33
- * not a failure to look. Conflating "none saved" with "could not read" is the
34
- * distinction the five reply states exist to keep, applied one layer down.
35
- */
17
+ /** Thrown when the scenarios directory exists but can't be read (permission error, not-a-directory, ...) — a fact about Descry's ability to look, never about count. Must not collapse to `[]` (C-F2): that would teach a false "nothing saved". */
18
+ export class ScenarioListError extends Error {
19
+ constructor(dir, cause) {
20
+ const detail = cause instanceof Error ? cause.message : String(cause);
21
+ super(`could not read ${dir} (${detail})`);
22
+ this.name = "ScenarioListError";
23
+ this.cause = cause;
24
+ }
25
+ }
26
+ /** A-F4: name comes straight from tool args; `join` silently normalises `..`, so an unchecked `"../../../etc/passwd"` (or absolute path) escapes `descry/scenarios/`. Reject the shape here, then `confinedScenarioPath` re-checks containment on the resolved path — belt-and-braces, mirroring descry-desktop's write-finding-export. */
27
+ function invalidScenarioNameReason(name) {
28
+ if (name === "")
29
+ return "a scenario name cannot be empty";
30
+ if (name.includes("/") || name.includes("\\")) {
31
+ return `"${name}" is not a valid scenario name — a name may not contain a path separator`;
32
+ }
33
+ if (name === "." || name === "..") {
34
+ return `"${name}" is not a valid scenario name`;
35
+ }
36
+ return null;
37
+ }
38
+ function confinedScenarioPath(repoPath, name) {
39
+ const invalid = invalidScenarioNameReason(name);
40
+ if (invalid !== null)
41
+ throw new Error(invalid);
42
+ const dir = scenariosDirectory(repoPath);
43
+ const path = join(dir, `${name}${SCENARIO_SUFFIX}`);
44
+ const resolvedDir = resolve(dir) + sep;
45
+ // Belt and braces: if this ever resolves outside the scenarios directory, refuse rather than touch it.
46
+ if (!resolve(path).startsWith(resolvedDir)) {
47
+ throw new Error(`refusing to use a scenario path outside ${dir}`);
48
+ }
49
+ return path;
50
+ }
51
+ /** Every saved scenario's name. ENOENT means "nothing has ever been saved" → `[]`; any other read error (permission, not-a-directory) throws `ScenarioListError` instead — the five-reply-states distinction, one layer down. */
36
52
  export async function listScenarios(repoPath) {
53
+ const dir = scenariosDirectory(repoPath);
37
54
  let entries;
38
55
  try {
39
- entries = await readdir(scenariosDirectory(repoPath));
56
+ entries = await readdir(dir);
40
57
  }
41
- catch {
42
- return [];
58
+ catch (error) {
59
+ if (error.code === "ENOENT")
60
+ return [];
61
+ throw new ScenarioListError(dir, error);
43
62
  }
44
63
  return entries.filter((e) => e.endsWith(SCENARIO_SUFFIX)).map((e) => e.slice(0, -SCENARIO_SUFFIX.length));
45
64
  }
46
- /**
47
- * Read one scenario.
48
- *
49
- * Never throws: a missing file, unreadable text and a malformed document are
50
- * all refusals carrying the path, because a caller replaying scenarios in CI
51
- * needs to report which file was wrong rather than die on the first one. The
52
- * message distinguishes *nothing is there* from *something is there and is
53
- * wrong* — conflating them sends someone to debug a file that does not exist.
54
- */
65
+ /** Reads one scenario; never throws — missing file, unreadable text, malformed document are all refusals carrying the path, so a CI replay can report which file was wrong rather than die on the first. */
55
66
  export async function readScenario(repoPath, name) {
56
- const path = scenarioPath(repoPath, name);
67
+ let path;
68
+ try {
69
+ path = confinedScenarioPath(repoPath, name);
70
+ }
71
+ catch (error) {
72
+ return { valid: false, problems: [error.message] };
73
+ }
57
74
  let text;
58
75
  try {
59
76
  text = await readFile(path, "utf8");
@@ -73,21 +90,14 @@ export async function readScenario(repoPath, name) {
73
90
  return result;
74
91
  return { valid: false, problems: result.problems.map((p) => `${path}: ${p}`) };
75
92
  }
76
- /**
77
- * Write one scenario, refusing to store anything this reader could not read
78
- * back.
79
- *
80
- * The validation on the way out is not redundant with the one on the way in.
81
- * A scenario is written once and read on every push afterwards, so a fault
82
- * saved today surfaces at the worst possible moment — during a check somebody
83
- * is waiting on — and by then the session that could have explained it is gone.
84
- */
93
+ /** Writes one scenario, refusing anything this reader couldn't read back. Validating on the way out isn't redundant — a fault saved today surfaces during a push check, long after the session that could explain it is gone. */
85
94
  export async function writeScenario(repoPath, scenario) {
86
95
  const check = parseScenario(scenario);
87
96
  if (!check.valid) {
88
97
  throw new Error(`refusing to save scenario "${scenario.name}": ${check.problems.join("; ")}`);
89
98
  }
99
+ const path = confinedScenarioPath(repoPath, scenario.name);
90
100
  await mkdir(scenariosDirectory(repoPath), { recursive: true });
91
- await writeFile(scenarioPath(repoPath, scenario.name), serializeScenario(scenario), "utf8");
101
+ await writeFile(path, serializeScenario(scenario), "utf8");
92
102
  }
93
103
  //# sourceMappingURL=storage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/scenarios/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAA4B,MAAM,YAAY,CAAC;AAGxF,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAEzC,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IACjD,OAAO,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,IAAY;IACzD,OAAO,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,GAAG,IAAI,GAAG,eAAe,EAAE,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,QAAgB;IAClD,IAAI,OAAiB,CAAC;IACtB,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,E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 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AA0BH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAYhD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAYjD;AAED,MAAM,WAAW,SAAS;IACxB,uFAAuF;IACvF,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,wDAAwD;IACxD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AA4DD,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CAoSpE"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AA6BH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAYhD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAYjD;AAED,MAAM,WAAW,SAAS;IACxB,uFAAuF;IACvF,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,wDAAwD;IACxD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAqED,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CAqUpE"}
package/dist/server.js CHANGED
@@ -25,9 +25,10 @@
25
25
  * content with `isError`, which the model can read and act on. Only genuinely
26
26
  * broken protocol produces an error frame.
27
27
  */
28
+ import { randomUUID } from "node:crypto";
28
29
  import { resolveActionDispatch } from "./action-handshake.js";
29
30
  import { fail, isRequest, negotiateVersion, ok, parseMessage, ProtocolError, RPC_INTERNAL_ERROR, RPC_INVALID_PARAMS, RPC_METHOD_NOT_FOUND, } from "./protocol.js";
30
- import { renderAnswer, renderFailed, renderHandshake, renderTimedOut, renderToolError, TOOL_OUTPUT_SCHEMA, } from "./render.js";
31
+ import { renderAnswer, renderFailed, renderHandshake, renderRefusedInput, renderTimedOut, renderToolError, TOOL_OUTPUT_SCHEMA, } from "./render.js";
31
32
  import { createDisclosureLedger } from "./disclosure-ledger.js";
32
33
  import { TOOLS, TOOLS_BY_NAME, ToolInputError, } from "./tools/index.js";
33
34
  /** Every call's declared budget (§6). Fixed today; per-trigger budgets are P26/P28 work. */
@@ -70,6 +71,15 @@ const SERVER_INSTRUCTIONS = "Descry reads the repository's source into a code gr
70
71
  "both \"nothing matched\" and \"I could not look\" would teach a false fact with no way to " +
71
72
  "detect it — that is why these are distinct. Never read `refused` as \"clean\" or `empty` as " +
72
73
  "\"broken\".\n\n" +
74
+ "**One case is not an answer at all and has its own shape**: a call naming no tool this " +
75
+ "server has — `name` is not a string, or names nothing in the registry — comes back with " +
76
+ "`isError: true` and `{ tool, status: \"error\", message }`, carrying no `state`, no `graph` " +
77
+ "and no `disclosures`. There is no `state` because there is no tool to say `state` about. " +
78
+ "This is narrower than it once was: a *resolved* tool given bad input — a missing required " +
79
+ "field, a value of the wrong type — is a fact about that tool's call and comes back as a " +
80
+ "real `state: \"refused\"` reply instead, with `disclosures` naming what was wrong. Branch " +
81
+ "on `isError` before reading `state` regardless — a caller that only ever sees the second, " +
82
+ "unresolved-tool shape in testing will still be surprised by it in production.\n\n" +
73
83
  "Every reply also carries a `disclosures` list, a `resolutionFloor` and a `reliabilityCap` " +
74
84
  "(A, B or C) inside `graph`. `resolutionFloor` is how much tooling actually ran under the " +
75
85
  "weakest evidence behind the answer, R0 through R4: R0 is syntax only, nothing resolved; R1 " +
@@ -204,9 +214,30 @@ export function createMcpServer(options) {
204
214
  if (tool === undefined) {
205
215
  return renderToolError(name, `no such tool. Available: ${tools.map((t) => t.name).join(", ")}.`);
206
216
  }
217
+ // `tool` is resolved from here on, so any input failure below has a real
218
+ // `ToolDefinition` to render a `state: "refused"` envelope from
219
+ // (`renderRefusedInput`) rather than `renderToolError`'s bare shape —
220
+ // minted here, ahead of the args check, so both that check and a
221
+ // `ToolInputError` thrown later out of `tool.run` share the one
222
+ // `renderOptions()`. Same precedent as B10's `callId`: a call that never
223
+ // reaches `tool.run` still gets one minted (`renderFailed`/`renderTimedOut`
224
+ // already do this for every call but `verify_claim`), and is never passed
225
+ // to `session.recordCallWithId` below, so no gap opens in what a citation
226
+ // can resolve.
227
+ const started = Date.now();
228
+ const callId = name === "verify_claim" ? randomUUID() : session.allocateCallId();
229
+ const renderOptions = () => ({
230
+ toolVersion: tool.version,
231
+ toolClass: tool.class,
232
+ toolTier: tool.tier,
233
+ elapsedMs: Date.now() - started,
234
+ limitMs: CALL_BUDGET_MS,
235
+ disclosureLedger,
236
+ callId,
237
+ });
207
238
  const rawArgs = params["arguments"];
208
239
  if (rawArgs !== undefined && (typeof rawArgs !== "object" || rawArgs === null || Array.isArray(rawArgs))) {
209
- return renderToolError(name, '"arguments" must be an object');
240
+ return renderRefusedInput(name, '"arguments" must be an object', renderOptions());
210
241
  }
211
242
  const args = (rawArgs ?? {});
212
243
  const meta = params["_meta"];
@@ -251,15 +282,21 @@ export function createMcpServer(options) {
251
282
  progress,
252
283
  signal: AbortSignal.any([controller.signal, AbortSignal.timeout(CALL_BUDGET_MS)]),
253
284
  };
254
- const started = Date.now();
255
- const renderOptions = () => ({
256
- toolVersion: tool.version,
257
- toolClass: tool.class,
258
- toolTier: tool.tier,
259
- elapsedMs: Date.now() - started,
260
- limitMs: CALL_BUDGET_MS,
261
- disclosureLedger,
262
- });
285
+ // B10: `started`/`callId`/`renderOptions` are minted above, ahead of the
286
+ // `arguments` shape check, so every envelope this call can produce
287
+ // (refused, handshake, failed, timed-out, or a real answer) carries the
288
+ // exact id `recordCallWithId` will file the record under below — a
289
+ // caller reading `callId` off the reply and citing it in `verify_claim`
290
+ // is citing the id that call is actually recorded as.
291
+ //
292
+ // `verify_claim` itself is the one exception, on the same reasoning as
293
+ // its exclusion from recording just below: it produces no fact for a
294
+ // later claim to cite, so its own `callId` is not drawn from the
295
+ // session's call-id sequence at all — `session.allocateCallId()` is
296
+ // reserved for calls that will actually be recorded under the id it
297
+ // returns. Reusing it here would consume a real id `verify_claim` never
298
+ // gets recorded under, opening a gap in the sequence a caller relies on
299
+ // corresponding exactly to recorded calls.
263
300
  try {
264
301
  // §7's two-call handshake. Decided before any real work starts — a mint
265
302
  // has no I/O to time out on — so this sits outside the try/catch's
@@ -280,8 +317,13 @@ export function createMcpServer(options) {
280
317
  // host receives — not the pre-render outcome, which the host never
281
318
  // sees. `verify_claim` itself is excluded: it produces no fact for a
282
319
  // later claim to cite, only a verdict about other calls' facts.
320
+ //
321
+ // Recorded under `callId` — the same id `rendered.structuredContent`
322
+ // already carries as `callId` — rather than a freshly minted one
323
+ // (B10): the two must be the same value for a citation read off this
324
+ // reply to resolve.
283
325
  if (name !== "verify_claim")
284
- session.recordCall(name, args, rendered.structuredContent);
326
+ session.recordCallWithId(callId, name, args, rendered.structuredContent);
285
327
  return rendered;
286
328
  }
287
329
  catch (error) {
@@ -292,7 +334,7 @@ export function createMcpServer(options) {
292
334
  if (controller.signal.aborted)
293
335
  return null;
294
336
  if (error instanceof ToolInputError)
295
- return renderToolError(name, error.message);
337
+ return renderRefusedInput(name, error.message, renderOptions());
296
338
  if (isAbort(error) || ctx.signal.aborted)
297
339
  return renderTimedOut(name, renderOptions());
298
340
  // Anything else is a bug or an environment failure. It still comes back as
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,IAAI,EACJ,SAAS,EACT,gBAAgB,EAChB,EAAE,EACF,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,GAGrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,cAAc,EACd,eAAe,EACf,kBAAkB,GAEnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EACL,KAAK,EACL,aAAa,EACb,cAAc,GAGf,MAAM,kBAAkB,CAAC;AAG1B,4FAA4F;AAC5F,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEtC,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,CACL,CAAC,KAAK,YAAY,KAA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