@descryy/mcp 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/dist/action-handshake.d.ts +8 -75
  2. package/dist/action-handshake.d.ts.map +1 -1
  3. package/dist/action-handshake.js +9 -79
  4. package/dist/action-handshake.js.map +1 -1
  5. package/dist/bin/descry-mcp.d.ts +4 -15
  6. package/dist/bin/descry-mcp.d.ts.map +1 -1
  7. package/dist/bin/descry-mcp.js +12 -42
  8. package/dist/bin/descry-mcp.js.map +1 -1
  9. package/dist/browser/driver.d.ts +59 -224
  10. package/dist/browser/driver.d.ts.map +1 -1
  11. package/dist/browser/driver.js +9 -55
  12. package/dist/browser/driver.js.map +1 -1
  13. package/dist/browser/evidence.d.ts +10 -43
  14. package/dist/browser/evidence.d.ts.map +1 -1
  15. package/dist/browser/evidence.js +20 -54
  16. package/dist/browser/evidence.js.map +1 -1
  17. package/dist/browser/fake-driver.d.ts +4 -16
  18. package/dist/browser/fake-driver.d.ts.map +1 -1
  19. package/dist/browser/fake-driver.js +6 -20
  20. package/dist/browser/fake-driver.js.map +1 -1
  21. package/dist/browser/graph-write.d.ts +4 -45
  22. package/dist/browser/graph-write.d.ts.map +1 -1
  23. package/dist/browser/graph-write.js +8 -53
  24. package/dist/browser/graph-write.js.map +1 -1
  25. package/dist/browser/playwright-driver.d.ts +7 -91
  26. package/dist/browser/playwright-driver.d.ts.map +1 -1
  27. package/dist/browser/playwright-driver.js +40 -194
  28. package/dist/browser/playwright-driver.js.map +1 -1
  29. package/dist/browser/provider.d.ts +5 -34
  30. package/dist/browser/provider.d.ts.map +1 -1
  31. package/dist/browser/provider.js +4 -24
  32. package/dist/browser/provider.js.map +1 -1
  33. package/dist/browser/registry.d.ts +26 -106
  34. package/dist/browser/registry.d.ts.map +1 -1
  35. package/dist/browser/registry.js +20 -77
  36. package/dist/browser/registry.js.map +1 -1
  37. package/dist/browser/scenario-resolve.d.ts +10 -44
  38. package/dist/browser/scenario-resolve.d.ts.map +1 -1
  39. package/dist/browser/scenario-resolve.js +10 -41
  40. package/dist/browser/scenario-resolve.js.map +1 -1
  41. package/dist/browser/scenario-runner.d.ts +12 -70
  42. package/dist/browser/scenario-runner.d.ts.map +1 -1
  43. package/dist/browser/scenario-runner.js +30 -90
  44. package/dist/browser/scenario-runner.js.map +1 -1
  45. package/dist/browser/stack-parser.d.ts +4 -28
  46. package/dist/browser/stack-parser.d.ts.map +1 -1
  47. package/dist/browser/stack-parser.js +12 -39
  48. package/dist/browser/stack-parser.js.map +1 -1
  49. package/dist/browser/tool-support.d.ts +20 -67
  50. package/dist/browser/tool-support.d.ts.map +1 -1
  51. package/dist/browser/tool-support.js +21 -65
  52. package/dist/browser/tool-support.js.map +1 -1
  53. package/dist/browser/url-scheme.d.ts +14 -0
  54. package/dist/browser/url-scheme.d.ts.map +1 -0
  55. package/dist/browser/url-scheme.js +38 -0
  56. package/dist/browser/url-scheme.js.map +1 -0
  57. package/dist/cancellation.d.ts +11 -46
  58. package/dist/cancellation.d.ts.map +1 -1
  59. package/dist/cancellation.js +11 -46
  60. package/dist/cancellation.js.map +1 -1
  61. package/dist/capped.d.ts +9 -33
  62. package/dist/capped.d.ts.map +1 -1
  63. package/dist/capped.js +7 -27
  64. package/dist/capped.js.map +1 -1
  65. package/dist/disclosure-ledger.d.ts +6 -30
  66. package/dist/disclosure-ledger.d.ts.map +1 -1
  67. package/dist/disclosure-ledger.js +4 -26
  68. package/dist/disclosure-ledger.js.map +1 -1
  69. package/dist/index.d.ts +10 -26
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +7 -17
  72. package/dist/index.js.map +1 -1
  73. package/dist/module-trust.d.ts +24 -0
  74. package/dist/module-trust.d.ts.map +1 -0
  75. package/dist/module-trust.js +60 -0
  76. package/dist/module-trust.js.map +1 -0
  77. package/dist/path-confinement.d.ts +31 -0
  78. package/dist/path-confinement.d.ts.map +1 -0
  79. package/dist/path-confinement.js +44 -0
  80. package/dist/path-confinement.js.map +1 -0
  81. package/dist/protocol.d.ts +10 -53
  82. package/dist/protocol.d.ts.map +1 -1
  83. package/dist/protocol.js +14 -60
  84. package/dist/protocol.js.map +1 -1
  85. package/dist/registry.d.ts +10 -58
  86. package/dist/registry.d.ts.map +1 -1
  87. package/dist/registry.js +38 -90
  88. package/dist/registry.js.map +1 -1
  89. package/dist/render.d.ts +42 -11
  90. package/dist/render.d.ts.map +1 -1
  91. package/dist/render.js +74 -10
  92. package/dist/render.js.map +1 -1
  93. package/dist/runtime-registry.d.ts +7 -66
  94. package/dist/runtime-registry.d.ts.map +1 -1
  95. package/dist/runtime-registry.js +39 -114
  96. package/dist/runtime-registry.js.map +1 -1
  97. package/dist/scenarios/index.d.ts +1 -1
  98. package/dist/scenarios/index.d.ts.map +1 -1
  99. package/dist/scenarios/index.js +1 -1
  100. package/dist/scenarios/index.js.map +1 -1
  101. package/dist/scenarios/parse.d.ts +4 -18
  102. package/dist/scenarios/parse.d.ts.map +1 -1
  103. package/dist/scenarios/parse.js +14 -34
  104. package/dist/scenarios/parse.js.map +1 -1
  105. package/dist/scenarios/scenario.d.ts +18 -74
  106. package/dist/scenarios/scenario.d.ts.map +1 -1
  107. package/dist/scenarios/scenario.js +7 -34
  108. package/dist/scenarios/scenario.js.map +1 -1
  109. package/dist/scenarios/storage.d.ts +11 -41
  110. package/dist/scenarios/storage.d.ts.map +1 -1
  111. package/dist/scenarios/storage.js +57 -47
  112. package/dist/scenarios/storage.js.map +1 -1
  113. package/dist/server.d.ts.map +1 -1
  114. package/dist/server.js +37 -17
  115. package/dist/server.js.map +1 -1
  116. package/dist/session.d.ts +67 -259
  117. package/dist/session.d.ts.map +1 -1
  118. package/dist/session.js +69 -250
  119. package/dist/session.js.map +1 -1
  120. package/dist/tools/analyze.d.ts +24 -118
  121. package/dist/tools/analyze.d.ts.map +1 -1
  122. package/dist/tools/analyze.js +44 -166
  123. package/dist/tools/analyze.js.map +1 -1
  124. package/dist/tools/browser-click.d.ts +3 -21
  125. package/dist/tools/browser-click.d.ts.map +1 -1
  126. package/dist/tools/browser-click.js +10 -31
  127. package/dist/tools/browser-click.js.map +1 -1
  128. package/dist/tools/browser-close-session.d.ts +4 -13
  129. package/dist/tools/browser-close-session.d.ts.map +1 -1
  130. package/dist/tools/browser-close-session.js +4 -13
  131. package/dist/tools/browser-close-session.js.map +1 -1
  132. package/dist/tools/browser-fill.d.ts +5 -36
  133. package/dist/tools/browser-fill.d.ts.map +1 -1
  134. package/dist/tools/browser-fill.js +9 -44
  135. package/dist/tools/browser-fill.js.map +1 -1
  136. package/dist/tools/browser-navigate.d.ts +6 -27
  137. package/dist/tools/browser-navigate.d.ts.map +1 -1
  138. package/dist/tools/browser-navigate.js +6 -23
  139. package/dist/tools/browser-navigate.js.map +1 -1
  140. package/dist/tools/browser-run-scenario.d.ts +5 -31
  141. package/dist/tools/browser-run-scenario.d.ts.map +1 -1
  142. package/dist/tools/browser-run-scenario.js +10 -46
  143. package/dist/tools/browser-run-scenario.js.map +1 -1
  144. package/dist/tools/browser-save-scenario.d.ts +3 -28
  145. package/dist/tools/browser-save-scenario.d.ts.map +1 -1
  146. package/dist/tools/browser-save-scenario.js +15 -74
  147. package/dist/tools/browser-save-scenario.js.map +1 -1
  148. package/dist/tools/browser-snapshot.d.ts +6 -39
  149. package/dist/tools/browser-snapshot.d.ts.map +1 -1
  150. package/dist/tools/browser-snapshot.js +4 -31
  151. package/dist/tools/browser-snapshot.js.map +1 -1
  152. package/dist/tools/browser-start-session.d.ts +4 -23
  153. package/dist/tools/browser-start-session.d.ts.map +1 -1
  154. package/dist/tools/browser-start-session.js +33 -55
  155. package/dist/tools/browser-start-session.js.map +1 -1
  156. package/dist/tools/browser-type.d.ts +5 -35
  157. package/dist/tools/browser-type.d.ts.map +1 -1
  158. package/dist/tools/browser-type.js +10 -45
  159. package/dist/tools/browser-type.js.map +1 -1
  160. package/dist/tools/contracts.d.ts +9 -86
  161. package/dist/tools/contracts.d.ts.map +1 -1
  162. package/dist/tools/contracts.js +24 -80
  163. package/dist/tools/contracts.js.map +1 -1
  164. package/dist/tools/cross-pr.d.ts +42 -30
  165. package/dist/tools/cross-pr.d.ts.map +1 -1
  166. package/dist/tools/cross-pr.js +81 -62
  167. package/dist/tools/cross-pr.js.map +1 -1
  168. package/dist/tools/git-diff.d.ts +18 -2
  169. package/dist/tools/git-diff.d.ts.map +1 -1
  170. package/dist/tools/git-diff.js +118 -26
  171. package/dist/tools/git-diff.js.map +1 -1
  172. package/dist/tools/git-history.d.ts +5 -16
  173. package/dist/tools/git-history.d.ts.map +1 -1
  174. package/dist/tools/git-history.js +3 -10
  175. package/dist/tools/git-history.js.map +1 -1
  176. package/dist/tools/history.d.ts +4 -33
  177. package/dist/tools/history.d.ts.map +1 -1
  178. package/dist/tools/history.js +6 -31
  179. package/dist/tools/history.js.map +1 -1
  180. package/dist/tools/impact.d.ts +7 -51
  181. package/dist/tools/impact.d.ts.map +1 -1
  182. package/dist/tools/impact.js +15 -67
  183. package/dist/tools/impact.js.map +1 -1
  184. package/dist/tools/index.d.ts +3 -8
  185. package/dist/tools/index.d.ts.map +1 -1
  186. package/dist/tools/index.js +3 -8
  187. package/dist/tools/index.js.map +1 -1
  188. package/dist/tools/kit.d.ts +66 -113
  189. package/dist/tools/kit.d.ts.map +1 -1
  190. package/dist/tools/kit.js +60 -28
  191. package/dist/tools/kit.js.map +1 -1
  192. package/dist/tools/link-workspace.d.ts +7 -45
  193. package/dist/tools/link-workspace.d.ts.map +1 -1
  194. package/dist/tools/link-workspace.js +10 -48
  195. package/dist/tools/link-workspace.js.map +1 -1
  196. package/dist/tools/lookup.d.ts +4 -14
  197. package/dist/tools/lookup.d.ts.map +1 -1
  198. package/dist/tools/lookup.js +4 -14
  199. package/dist/tools/lookup.js.map +1 -1
  200. package/dist/tools/mark-incident.d.ts +7 -54
  201. package/dist/tools/mark-incident.d.ts.map +1 -1
  202. package/dist/tools/mark-incident.js +15 -68
  203. package/dist/tools/mark-incident.js.map +1 -1
  204. package/dist/tools/observe-runtime.d.ts +27 -210
  205. package/dist/tools/observe-runtime.d.ts.map +1 -1
  206. package/dist/tools/observe-runtime.js +257 -435
  207. package/dist/tools/observe-runtime.js.map +1 -1
  208. package/dist/tools/observe-tests.d.ts +9 -100
  209. package/dist/tools/observe-tests.d.ts.map +1 -1
  210. package/dist/tools/observe-tests.js +24 -152
  211. package/dist/tools/observe-tests.js.map +1 -1
  212. package/dist/tools/pr-analysis.d.ts +18 -2
  213. package/dist/tools/pr-analysis.d.ts.map +1 -1
  214. package/dist/tools/pr-analysis.js +73 -23
  215. package/dist/tools/pr-analysis.js.map +1 -1
  216. package/dist/tools/pre-push.d.ts +68 -16
  217. package/dist/tools/pre-push.d.ts.map +1 -1
  218. package/dist/tools/pre-push.js +98 -35
  219. package/dist/tools/pre-push.js.map +1 -1
  220. package/dist/tools/propagation.d.ts +11 -53
  221. package/dist/tools/propagation.d.ts.map +1 -1
  222. package/dist/tools/propagation.js +14 -57
  223. package/dist/tools/propagation.js.map +1 -1
  224. package/dist/tools/questions.d.ts +13 -63
  225. package/dist/tools/questions.d.ts.map +1 -1
  226. package/dist/tools/questions.js +33 -105
  227. package/dist/tools/questions.js.map +1 -1
  228. package/dist/tools/refusal-fetch.d.ts +4 -40
  229. package/dist/tools/refusal-fetch.d.ts.map +1 -1
  230. package/dist/tools/refusal-fetch.js +4 -40
  231. package/dist/tools/refusal-fetch.js.map +1 -1
  232. package/dist/tools/runtime-incident.d.ts +4 -63
  233. package/dist/tools/runtime-incident.d.ts.map +1 -1
  234. package/dist/tools/runtime-incident.js +10 -87
  235. package/dist/tools/runtime-incident.js.map +1 -1
  236. package/dist/tools/scope.d.ts +7 -25
  237. package/dist/tools/scope.d.ts.map +1 -1
  238. package/dist/tools/scope.js +10 -29
  239. package/dist/tools/scope.js.map +1 -1
  240. package/dist/tools/similar-incidents.d.ts +11 -86
  241. package/dist/tools/similar-incidents.d.ts.map +1 -1
  242. package/dist/tools/similar-incidents.js +7 -71
  243. package/dist/tools/similar-incidents.js.map +1 -1
  244. package/dist/tools/validate.d.ts +14 -69
  245. package/dist/tools/validate.d.ts.map +1 -1
  246. package/dist/tools/validate.js +23 -74
  247. package/dist/tools/validate.js.map +1 -1
  248. package/dist/tools/verification-status.d.ts +9 -64
  249. package/dist/tools/verification-status.d.ts.map +1 -1
  250. package/dist/tools/verification-status.js +9 -62
  251. package/dist/tools/verification-status.js.map +1 -1
  252. package/dist/tools/verify-claim.d.ts +5 -52
  253. package/dist/tools/verify-claim.d.ts.map +1 -1
  254. package/dist/tools/verify-claim.js +6 -56
  255. package/dist/tools/verify-claim.js.map +1 -1
  256. package/dist/transport.d.ts +15 -52
  257. package/dist/transport.d.ts.map +1 -1
  258. package/dist/transport.js +16 -60
  259. package/dist/transport.js.map +1 -1
  260. package/package.json +30 -21
@@ -1 +1 @@
1
- {"version":3,"file":"browser-type.d.ts","sourceRoot":"","sources":["../../src/tools/browser-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnF,OAAO,EAAoC,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAGjF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IACzC,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;CACnC;AAuGD,eAAO,MAAM,eAAe,EAAE,cAiB7B,CAAC"}
1
+ {"version":3,"file":"browser-type.d.ts","sourceRoot":"","sources":["../../src/tools/browser-type.ts"],"names":[],"mappings":"AAAA;;;;+IAI+I;AAE/I,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnF,OAAO,EAAoC,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAGjF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IACzC,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;CACnC;AAoGD,eAAO,MAAM,eAAe,EAAE,cAe7B,CAAC"}
@@ -1,38 +1,8 @@
1
- /**
2
- * `browser_type` — type into a field with real keystrokes.
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.
23
- */
24
- /**
25
- * ## Why this is not the same tool as `browser_fill`
26
- *
27
- * The visible difference is that this appends and `fill` replaces. The
28
- * difference that decides which one is correct for a real page is that **this
29
- * one fires key events and `fill` fires none.** A field that opens an
30
- * autocomplete on keydown, validates per character, or debounces a search as
31
- * you type sees nothing at all from a `fill`. An agent that reaches for
32
- * `fill` on a search box gets a page that was never typed into — a wrong
33
- * answer produced by entirely correct tool code, which is why the schema
34
- * prose below says so rather than describing only the tidy half.
35
- */
1
+ /** `browser_type` — real keystrokes into a field. Consent is granted once, at
2
+ * `browser_start_session` (DEC-380) — `describeAction` returns undefined since a verb can't
3
+ * mint its own consent; called with none on record, it refuses. Takes a ref from a seen
4
+ * snapshot, never a selector — a stale ref refuses rather than resolving elsewhere. Fires
5
+ * real key events, unlike `browser_fill` (which fires none) — needed for autocomplete/validation/debounce fields fill would silently miss. */
36
6
  import { browserAnswer, emptyEvidence, mutationRefusal, observeAndCorrelate, useSession } from "../browser/tool-support.js";
37
7
  import { NO_GRAPH_WRITE } from "../browser/graph-write.js";
38
8
  import { UnknownElementRefError } from "../browser/driver.js";
@@ -70,10 +40,8 @@ async function run(args, ctx) {
70
40
  const sessionId = requiredString(args, "sessionId");
71
41
  const ref = requiredString(args, "ref");
72
42
  const text = requiredString(args, "text");
73
- // Checked before the session is touched, because the point is that nothing
74
- // happens: this verb changes a running application, and the caller has said
75
- // stop. The session itself is left open — it belongs to
76
- // `browser_start_session` and its consent, not to this call.
43
+ // Checked before the session is touched — the point is that nothing happens once the
44
+ // caller says stop. The session stays open; it belongs to `browser_start_session`'s consent, not this call.
77
45
  if (ctx.signal.aborted) {
78
46
  return browserAnswer({
79
47
  ctx,
@@ -94,8 +62,7 @@ async function run(args, ctx) {
94
62
  });
95
63
  }
96
64
  const { entry } = found;
97
- // Consent and safetyLevel are independent and both must pass. Consent was
98
- // granted at session start; this is the other half.
65
+ // Consent and safetyLevel are independent and both must pass — consent was granted at session start.
99
66
  const refused = mutationRefusal(entry);
100
67
  if (refused !== null) {
101
68
  return browserAnswer({
@@ -141,10 +108,8 @@ export const browserTypeTool = {
141
108
  version: "1.0.0",
142
109
  inputSchema: SCHEMA,
143
110
  run,
144
- // Undefined, always: the session this runs in was confirmed at
145
- // browser_start_session, and a verb that could describe — and therefore
146
- // mint — its own consent would be a gate that exists only for callers who
147
- // were not going to abuse it.
111
+ // Undefined, always — consent was confirmed at browser_start_session; a verb that could
112
+ // describe (and thus mint) its own consent is a gate only honest callers would respect.
148
113
  describeAction: () => undefined,
149
114
  };
150
115
  //# sourceMappingURL=browser-type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser-type.js","sourceRoot":"","sources":["../../src/tools/browser-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC5H,OAAO,EAAE,cAAc,EAA0B,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAyC,MAAM,UAAU,CAAC;AAYjF,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qDAAqD;SACnE;QACD,GAAG,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,+FAA+F;gBAC/F,+FAA+F;gBAC/F,8DAA8D;SACjE;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,iGAAiG;gBACjG,sEAAsE;SACzE;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,iGAAiG;gBACjG,kGAAkG;gBAClG,8BAA8B;SACjC;KACF;IACD,QAAQ,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC;IACtC,oBAAoB,EAAE,KAAK;CACnB,CAAC;AAEX,KAAK,UA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,CAAC,KAAK,CAAC,OAAO,CAAC;YACtB,IAAI,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;SACzG,CAAC,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAEvD,OAAO,aAAa,CAAkB;QACpC,GAAG;QACH,QAAQ,EAAE,aAAa,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG;QACjD,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,IAAI,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE;KAC3G,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAmB;IAC7C,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,wCAAwC;IAC/C,WAAW,EAAE,sGAAsG;QACjH,uGAAuG;QACvG,sGAAsG;QACtG,kGAAkG;IACpG,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,MAAM;IACnB,GAAG;IACH,wFAAwF;IACxF,wFAAwF;IACxF,cAAc,EAAE,GAAG,EAAE,CAAC,SAAS;CAChC,CAAC"}
@@ -1,45 +1,7 @@
1
1
  /**
2
- * `contracts` — "does the caller agree with the thing it is calling?"
3
- *
4
- * §13, in two halves that fail independently.
5
- *
6
- * **The path half runs today.** A call that reaches no route, a route nothing
7
- * calls. Name-level facts, so R2 evidence supports them at class A.
8
- *
9
- * **The shape half needs both producers to attach something they do not attach
10
- * yet**, and it names exactly what — see `engine.ts`. It reports
11
- * `refused` with those names rather than an empty mismatch list, because
12
- * "no contract mismatches found" is a false statement when nothing was compared.
13
- *
14
- * ## Why the tool is `ok` when only the path half ran
15
- *
16
- * The path half produced a real answer over real evidence. Marking the whole
17
- * call `refused` because a second check did not run would hide a genuine
18
- * finding behind a caveat about a different question. The shape half's status is
19
- * carried in `data.shapes.ran` and in the blockers, where a reader can act on it.
20
- *
21
- * The one case that *is* `refused` outright: no endpoints in the graph.
22
- * Then neither half looked at anything.
23
- *
24
- * ## A filter matching nothing is not a clean bill of health
25
- *
26
- * UAT round 3, Suggestion 5. `paths: ["/reviews"]` on a repository whose
27
- * `/reviews` route was never parsed as an `API_ROUTE` at all returned
28
- * `state: "ok"`, `"Clean at path level."`, `findings: []` — indistinguishable
29
- * from "checked `/reviews` and it is fine." Zero endpoints matched the filter,
30
- * not zero problems with the endpoint it named. So a `paths` filter that
31
- * matches no `API_ENDPOINT` in the graph now reports `state: "empty"` with an
32
- * explicit count, before the "clean" verdict can be reached at all.
33
- *
34
- * ## Claim: defect versus lead
35
- *
36
- * UAT round 3, Suggestion 6, following `EnvFinding.claim`'s precedent
37
- * (`validate`). `CALL_NOT_SERVED` and every shape mismatch are `defect` —
38
- * provable from this graph (and, for a mismatch, a type checker) alone.
39
- * `ROUTE_NOT_CALLED` is `lead` — a mobile client, another service, or an
40
- * external consumer would not appear in this graph, so "nothing calls it" is
41
- * never provable, only worth a look. This is orthogonal to `prominence`,
42
- * which still orders by evidence strength alone.
2
+ * `contracts` — path half (name-level, R2→A) runs today; shape half (§13)
3
+ * needs producer-attached shapes, reporting `refused` with named blockers
4
+ * rather than an empty list. `defect` is provable here alone; `lead` is not.
43
5
  */
44
6
  import type { ContractCheck, ContractClaim, ContractFindingKind, EndpointKey, NearMissKind, ShapeDifference, ShapeDirection } from "@descryy/core";
45
7
  import type { ResolutionLevel } from "@descryy/ir";
@@ -47,24 +9,11 @@ import { type BriefNode, type ToolDefinition } from "./kit.ts";
47
9
  /** A call that reaches no route, or a route nothing calls. */
48
10
  export interface ContractPathFinding {
49
11
  readonly kind: ContractFindingKind;
50
- /**
51
- * `defect` (provable from this graph alone) or `lead` (needs knowledge
52
- * outside it) — see the module header. Orthogonal to `prominence` below.
53
- */
12
+ /** `defect` (provable from this graph alone) or `lead` (needs outside knowledge) — see module header. */
54
13
  readonly claim: ContractClaim;
55
14
  /** 1-based position in this answer. See {@link ContractPathFinding.prominence} for what orders it. */
56
15
  readonly rank: number;
57
- /**
58
- * `top` / `notable` / `rest`, ordered by **evidence strength** — the
59
- * finding's own `resolution`, strongest first — and not by `claim`.
60
- *
61
- * A call reaching no route and a route nothing calls can each rest on
62
- * strong or weak evidence, and inventing a ranking from `claim` alone would
63
- * be a judgement dressed as a measurement. What the graph does know is how
64
- * well-resolved each finding is, and a reader triaging a list is better
65
- * served by "this one rests on the strongest evidence" than by an invented
66
- * ranking. The tool's own notes say this rather than leaving it inferred.
67
- */
16
+ /** `top`/`notable`/`rest`, ordered by evidence strength (own `resolution`), not `claim` — a claim-based ranking would be judgement dressed as measurement. */
68
17
  readonly prominence: "top" | "notable" | "rest";
69
18
  readonly method: string;
70
19
  /** The normalised path template, not the raw literal. */
@@ -72,12 +21,7 @@ export interface ContractPathFinding {
72
21
  readonly detail: string;
73
22
  /** Lowest resolution among the edges this finding rests on. Caps its class. */
74
23
  readonly resolution: ResolutionLevel;
75
- /**
76
- * Absent when nothing on the other side resembles this endpoint.
77
- *
78
- * Its absence is what separates a typo from a call into a service outside
79
- * this graph — the second is disclosed as unanalysed, never reported broken.
80
- */
24
+ /** Absent when nothing resembles this endpoint on the other side — that gap is disclosed as unanalysed, never reported broken (typo vs. an outside service). */
81
25
  readonly nearMiss?: {
82
26
  readonly kind: NearMissKind;
83
27
  readonly against: EndpointKey;
@@ -100,16 +44,7 @@ export interface ContractShapeMismatchReport {
100
44
  /** Always `"defect"` — see the module header. Carried rather than assumed by a caller. */
101
45
  readonly claim: ContractClaim;
102
46
  }
103
- /**
104
- * The shape half's own status, carried in the payload rather than in the
105
- * envelope.
106
- *
107
- * The call is `ok` when only the path half ran, because the path half produced
108
- * a real answer over real evidence; marking the whole reply degraded because a
109
- * second check did not run would hide a genuine finding behind a caveat about
110
- * a different question. So `ran` is where a reader looks, and `blockers` names
111
- * exactly what has to be attached before it can be true.
112
- */
47
+ /** Shape half's own status, carried in the payload not the envelope; the reply is `ok` when only the path half ran so a real finding isn't hidden behind a caveat. `ran`/`blockers` carry the status. */
113
48
  export interface ContractShapeStatus {
114
49
  readonly ran: boolean;
115
50
  readonly comparable: number;
@@ -122,25 +57,13 @@ export interface ContractShapeStatus {
122
57
  /** Never empty when `ran` is false. */
123
58
  readonly blockers: readonly string[];
124
59
  }
125
- /**
126
- * One shape, always.
127
- *
128
- * The counts in `checked` describe the **whole graph** even when `paths` or
129
- * `files` was given: a denominator that shrank with the filter would make a
130
- * narrow query look like a healthy repository. The two lists describe the
131
- * filter.
132
- */
60
+ /** One shape, always. `checked` counts describe the whole graph even when filtered — a shrinking denominator would make a narrow query look healthy; the two lists describe the filter. */
133
61
  export interface ContractsData {
134
62
  readonly findings: readonly ContractPathFinding[];
135
63
  readonly shapeMismatches: readonly ContractShapeMismatchReport[];
136
64
  readonly checked: ContractCheck["paths"]["checked"];
137
65
  readonly shapes: ContractShapeStatus;
138
- /**
139
- * Unmatched callers with nothing on the provider side resembling them.
140
- *
141
- * Not findings. This is the size of the region the analysis could not speak
142
- * about at all.
143
- */
66
+ /** Unmatched callers with nothing resembling them on the provider side — not findings, the size of the region this analysis couldn't speak about. */
144
67
  readonly unmatchedWithoutNearMiss: number;
145
68
  /** `findings` plus `shapeMismatches` with `claim === "defect"`. What a git hook should branch on. */
146
69
  readonly defects: number;
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,a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AAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;IACjD,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IACrC,0FAA0F;IAC1F,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;CAC/B;AAED,yMAAyM;AACzM,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,wDAAwD;IACxD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,wDAAwD;IACxD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,kFAAkF;IAClF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,2LAA2L;AAC3L,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAClD,QAAQ,CAAC,eAAe,EAAE,SAAS,2BAA2B,EAAE,CAAC;IACjE,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC;IACpD,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,qJAAqJ;IACrJ,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC1C,qGAAqG;IACrG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,oFAAoF;IACpF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAiND,eAAO,MAAM,aAAa,EAAE,cAe3B,CAAC"}
@@ -1,45 +1,7 @@
1
1
  /**
2
- * `contracts` — "does the caller agree with the thing it is calling?"
3
- *
4
- * §13, in two halves that fail independently.
5
- *
6
- * **The path half runs today.** A call that reaches no route, a route nothing
7
- * calls. Name-level facts, so R2 evidence supports them at class A.
8
- *
9
- * **The shape half needs both producers to attach something they do not attach
10
- * yet**, and it names exactly what — see `engine.ts`. It reports
11
- * `refused` with those names rather than an empty mismatch list, because
12
- * "no contract mismatches found" is a false statement when nothing was compared.
13
- *
14
- * ## Why the tool is `ok` when only the path half ran
15
- *
16
- * The path half produced a real answer over real evidence. Marking the whole
17
- * call `refused` because a second check did not run would hide a genuine
18
- * finding behind a caveat about a different question. The shape half's status is
19
- * carried in `data.shapes.ran` and in the blockers, where a reader can act on it.
20
- *
21
- * The one case that *is* `refused` outright: no endpoints in the graph.
22
- * Then neither half looked at anything.
23
- *
24
- * ## A filter matching nothing is not a clean bill of health
25
- *
26
- * UAT round 3, Suggestion 5. `paths: ["/reviews"]` on a repository whose
27
- * `/reviews` route was never parsed as an `API_ROUTE` at all returned
28
- * `state: "ok"`, `"Clean at path level."`, `findings: []` — indistinguishable
29
- * from "checked `/reviews` and it is fine." Zero endpoints matched the filter,
30
- * not zero problems with the endpoint it named. So a `paths` filter that
31
- * matches no `API_ENDPOINT` in the graph now reports `state: "empty"` with an
32
- * explicit count, before the "clean" verdict can be reached at all.
33
- *
34
- * ## Claim: defect versus lead
35
- *
36
- * UAT round 3, Suggestion 6, following `EnvFinding.claim`'s precedent
37
- * (`validate`). `CALL_NOT_SERVED` and every shape mismatch are `defect` —
38
- * provable from this graph (and, for a mismatch, a type checker) alone.
39
- * `ROUTE_NOT_CALLED` is `lead` — a mobile client, another service, or an
40
- * external consumer would not appear in this graph, so "nothing calls it" is
41
- * never provable, only worth a look. This is orthogonal to `prominence`,
42
- * which still orders by evidence strength alone.
2
+ * `contracts` — path half (name-level, R2→A) runs today; shape half (§13)
3
+ * needs producer-attached shapes, reporting `refused` with named blockers
4
+ * rather than an empty list. `defect` is provable here alone; `lead` is not.
43
5
  */
44
6
  import { checkContracts, withProminence } from "@descryy/core";
45
7
  import { briefNode, optionalInteger, optionalStringArray, } from "./kit.js";
@@ -89,10 +51,8 @@ async function run(args, ctx) {
89
51
  });
90
52
  const { paths, shapes } = checked.data;
91
53
  const notes = [...checked.notes];
92
- // Filtering happens after the check rather than before it, so the counts a
93
- // reader sees — how many endpoints exist, how many joined — describe the whole
94
- // graph. A denominator that silently shrinks with the filter would make a
95
- // narrow query look like a healthy repository.
54
+ // Filtering happens after the check so the counts describe the whole graph
55
+ // — a shrinking denominator would make a narrow query look healthy.
96
56
  const matchesPath = (template) => filters === undefined || filters.some((f) => template.includes(f));
97
57
  const findings = paths.findings.filter((f) => matchesPath(f.pathTemplate) && touchesFiles([...f.callers, ...f.routes], fileScope));
98
58
  const mismatches = shapes.mismatches.filter((m) => matchesPath(String(m.endpoint.attrs["pathTemplate"] ?? m.endpoint.name)) &&
@@ -105,20 +65,9 @@ async function run(args, ctx) {
105
65
  notes.push(`Filtered to findings touching ${fileScope.length} named file(s). The counts below describe ` +
106
66
  "the whole graph; the lists describe the filter.");
107
67
  }
108
- // UAT round 3, Suggestion 5: a `paths` filter matching zero endpoints in the
109
- // graph is not a clean result — it means the filter named something this
110
- // graph never parsed as a route or endpoint at all, which is a different
111
- // claim than "checked it and it is fine." Checked against the full,
112
- // unfiltered endpoint set so a filter that matches one clean endpoint (a
113
- // real, checked, empty result) is not confused with one that matches none.
114
- //
115
- // API_ROUTE is checked too, not only API_ENDPOINT: a declared-but-unmounted
116
- // route (ROUTE_NOT_MOUNTED) has no API_ENDPOINT at all by construction — the
117
- // route node is the only thing in this graph that ever named its path — so a
118
- // filter matching only that route must still be treated as "matched
119
- // something real", never collapsed into "0 endpoint(s) matched this
120
- // filter." Precisely the reviews.py case: filtering to "/reviews" must reach
121
- // the finding rather than fall through to this refusal.
68
+ // A `paths` filter matching zero endpoints means it named something never
69
+ // parsed as a route/endpoint — a different claim than "checked, fine."
70
+ // API_ROUTE is checked too: an unmounted route has no API_ENDPOINT at all.
122
71
  let pathsMatchedNothing = false;
123
72
  if (filters !== undefined) {
124
73
  const endpoints = provider.nodesOfType("API_ENDPOINT");
@@ -134,29 +83,19 @@ async function run(args, ctx) {
134
83
  "evidence; which of them is a defect versus a lead is a separate axis (claim), not a ranking.");
135
84
  }
136
85
  // Zero API_ENDPOINT nodes usually means nothing to check — but not when the
137
- // mount check found a real, independently-provable ROUTE_NOT_MOUNTED finding
138
- // with no endpoint anywhere in the graph (a repo whose only declared route is
139
- // an unmounted one). Refusing outright would bury that finding behind a
140
- // refusal about a different question.
86
+ // mount check found an independent ROUTE_NOT_MOUNTED finding with no
87
+ // endpoint in the graph; refusing then would bury a real finding.
141
88
  const nothingToCheck = paths.checked.endpoints === 0 && paths.findingsTotal === 0;
142
- // MK-7: the leading clause, graded on the axis that actually matters —
143
- // `claim`. A lead is worth a look; a defect is the thing this tool exists
144
- // to catch, and every one here is provable from this graph alone —
145
- // `contracts.ts`'s own header on `nearMiss` is what keeps a mere
146
- // typo-shaped call out of the defect count, so a nonzero one is never a
147
- // "maybe".
89
+ // MK-7: graded on `claim` — a lead is worth a look; a defect is provable
90
+ // from this graph alone (`nearMiss` keeps a mere typo out of the count).
148
91
  const verdict = defects > 0
149
92
  ? `${defects} defect(s) found`
150
93
  : leads > 0
151
94
  ? `No defects; ${leads} lead(s) to review`
152
95
  : "Clean at path level";
153
- // Hand-off from Lane 2 (B6): render.ts now refuses to relay a `truncated`
154
- // answer with no `truncatedDetail` rather than substituting a sentinel, so
155
- // this has to be supplied whenever `checked.truncated` is set. `total`
156
- // describes the whole, unfiltered graph — the same convention `checked`
157
- // above already uses — which is an honest upper bound on `shown` since a
158
- // `paths`/`files` filter here can only ever remove items from what core
159
- // already capped, never add to them.
96
+ // render.ts refuses a `truncated` answer with no `truncatedDetail`, so this
97
+ // must be supplied whenever `checked.truncated` is set; `total` is the
98
+ // whole unfiltered graph, an honest upper bound on `shown`.
160
99
  const truncatedDetail = checked.truncated
161
100
  ? { shown: findings.length, total: Math.max(paths.findingsTotal, findings.length), more: null }
162
101
  : undefined;
@@ -172,6 +111,8 @@ async function run(args, ctx) {
172
111
  .sort((a, b) => b.resolution - a.resolution)
173
112
  .map((f) => ({
174
113
  kind: f.kind,
114
+ // Whether this asserts a fault. Carried as a field because the
115
+ // sentence below already said it and nothing could read prose.
175
116
  claim: f.claim,
176
117
  method: f.method,
177
118
  path: f.pathTemplate,
@@ -190,6 +131,10 @@ async function run(args, ctx) {
190
131
  writer: briefNode(m.writer),
191
132
  differences: m.differences,
192
133
  resolution: m.resolution,
134
+ // A field the reading side needs and the writing side does not
135
+ // supply. There is no benign reading of that, so every mismatch is a
136
+ // fault claim — unlike an uncalled route, whose usual explanation is
137
+ // a consumer outside the graph.
193
138
  claim: m.claim,
194
139
  })),
195
140
  checked: paths.checked,
@@ -215,10 +160,9 @@ async function run(args, ctx) {
215
160
  ]
216
161
  : notes,
217
162
  },
218
- // A path finding is a claim about names — this route exists, that one does
219
- // not — which R2 fully supports. A shape mismatch is not, and `engine.ts`
220
- // caps each one individually; this flag governs the answer's own headline
221
- // claim, which is the path half.
163
+ // A path finding is a name-level claim (R2 fully supports); a shape
164
+ // mismatch is not — `engine.ts` caps each individually. This flags the
165
+ // answer's own headline claim, the path half.
222
166
  nameLevel: true,
223
167
  ...(truncatedDetail === undefined ? {} : { truncatedDetail }),
224
168
  ...(nothingToCheck
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/tools/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAY/D,OAAO,EACL,SAAS,EACT,eAAe,EACf,mBAAmB,GAIpB,MAAM,UAAU,CAAC;AA2GlB,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,WAAW,EACT,wFAAwF;gBACxF,wFAAwF;SAC3F;QACD,KAAK,EAAE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,IAAI;QACf,GAAG,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC;QAC7D,GAAG,CAAC,cAAc;YAChB,CAAC,CAAC,EAAE,KAAK,EAAE,SAAkB,EAAE;YAC/B,CAAC,CAAC,mBAAmB;gBACnB,CAAC,CAAC,EAAE,KAAK,EAAE,OAAgB,EAAE;gBAC7B,CAAC,CAAC,EAAE,CAAC;QACT,QAAQ,EAAE,cAAc;YACtB,CAAC,CAAC,sEAAsE;YACxE,CAAC,CAAC,mBAAmB;gBACnB,CAAC,CAAC,4DAA4D;gBAC9D,CAAC,CAAC,GAAG,OAAO,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,OAAO,KAAK,CAAC,OAAO,CAAC,SAAS,yBAAyB;oBAC1F,uBAAuB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,iDAAiD,GAAG;KACpG,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,sCAAsC;IAC7C,WAAW,EACT,6FAA6F;QAC7F,+FAA+F;QAC/F,+FAA+F;QAC/F,6FAA6F;QAC7F,6FAA6F;QAC7F,qCAAqC;IACvC,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
@@ -11,22 +11,20 @@
11
11
  * | hidden dependency | 14.8 | `CHANGES_WITH` edges, already in the graph | **runs** |
12
12
  * | overlap scoring | 14.3 | stored PR scopes | **runs, over whatever is stored** |
13
13
  * | superseded | 14.5 | git blob ids at head and at base's tip | **runs** |
14
- * | migration heads | 14.6 | migration revision + parents | **runs when a producer supplies them; declared blocked otherwise** |
14
+ * | migration heads | 14.6 | base's and head's migration files, read directly from git | **runs** |
15
15
  *
16
16
  * §14.8 is first because it is the one that costs nothing: the edges already
17
17
  * exist, it needs no per-PR storage, and it works at R0 in any language with no
18
18
  * adapter beyond file paths. For a repository whose language has no adapter at
19
19
  * all, this is the check that still fires.
20
20
  *
21
- * **Migration heads is the one check here independent of the diff itself** —
22
- * it reads the migration revision chain the graph already carries, not a
23
- * comparison of base's and head's own migration state, so it can answer even
24
- * on the two early-return paths where the diff never resolves. It was
25
- * declared blocked until a producer emitted `migrationRevision`/
26
- * `migrationDownRevision`/`migrationDir`; now that one does, `blocked` is
27
- * computed per call rather than fixed, and drops this entry the moment the
28
- * input exists — the same "declared, never silently omitted" contract stays,
29
- * it just stops applying to this check.
21
+ * **Migration heads answers the diff-precise question this section once said
22
+ * was out of scope for an MCP tool call** — `readMigrationsAcrossChange`
23
+ * (`sources/migrations/across-change.ts`) reads base's and head's migration
24
+ * files directly with `git ls-tree`/`git show`, so it needs no language
25
+ * adapter and no re-resolution of the graph against two commits. `ran` is
26
+ * false only when neither side has a migration format this producer
27
+ * recognises — never because a producer has not run yet.
30
28
  *
31
29
  * ## Why a check that still cannot run is declared rather than omitted
32
30
  *
@@ -48,7 +46,7 @@
48
46
  * actual conflict — that distinction is left to the migration-integrity
49
47
  * checks in `validate`, which are provable from the graph alone.
50
48
  */
51
- import type { DiffType, HiddenDependencyReport, IncomparablePair, NodeVerdict, OverlapFinding, SupersededReport } from "@descryy/core";
49
+ import type { DiffType, HiddenDependencyReport, MigrationsAcrossChange, IncomparablePair, NodeVerdict, OverlapFinding, SupersededReport } from "@descryy/core";
52
50
  import type { ReliabilityClass } from "@descryy/ir";
53
51
  import { type BriefNode, type ToolDefinition } from "./kit.ts";
54
52
  /**
@@ -125,41 +123,55 @@ export interface SupersededCheck {
125
123
  readonly verdict: NodeVerdict;
126
124
  }[];
127
125
  }
128
- /**
129
- * §14.6 — *"would merging these changes leave more than one migration head?"*
130
- * Independent of the diff succeeding: it reads the migration revision chain
131
- * already in the graph, not a comparison of base's and head's own state.
132
- */
133
- export interface MigrationHeadsCheck {
134
- /** False when no module in the graph carried a migration revision — the producer this check waited for has not run. */
135
- readonly ran: boolean;
136
- /** Revisions with no other migration in this graph naming them as a parent. */
137
- readonly heads: readonly string[];
138
- /** True when there is more than one head — the fork a manual merge revision is needed to resolve. */
139
- readonly verdict: boolean;
140
- readonly disclosure: string;
141
- }
142
126
  /** git rejected the range: no diff-dependent check ran, and `blocked` is all there is to say. */
143
127
  export interface CrossPrGitFailure {
144
128
  readonly blocked: readonly BlockedCheck[];
145
- readonly migrationHeads: MigrationHeadsCheck;
129
+ readonly migrationHeads: MigrationHeadCheck;
146
130
  }
147
131
  /** The diff is empty. A real answer: there is nothing to collide with. */
148
132
  export interface CrossPrEmptyDiff extends CrossPrGitFailure {
149
133
  readonly changedFiles: number;
150
134
  }
151
135
  /**
152
- * The full answer — three checks that can run, one that cannot.
136
+ * §14.6 — the heads this merge would leave.
153
137
  *
154
- * Each check carries its own `ran`, because one check producing a real answer
155
- * is a real answer and burying it behind a caveat about a different question
156
- * is what `contracts.ts` refuses for the same reason.
138
+ * The set is base's migrations plus this change's, because that is the set the
139
+ * migration runner sees after the merge. `ran` is false when neither side had a
140
+ * migration format this producer recognises, which is **not** the same as a
141
+ * clean answer: a repository whose framework declares no DAG cannot have this
142
+ * failure at all, and one whose files were unreadable simply was not read.
157
143
  */
144
+ export interface MigrationHeadCheck {
145
+ readonly ran: boolean;
146
+ /** Base's single head, or null when base has none or already forks. */
147
+ readonly baseHead: string | null;
148
+ /** At most one — either the merged set has a single head or it does not. */
149
+ readonly conflict: MigrationsAcrossChange["report"]["conflict"];
150
+ readonly dependencies: MigrationsAcrossChange["report"]["dependencies"];
151
+ readonly duplicateRevisions: MigrationsAcrossChange["report"]["duplicateRevisions"];
152
+ /** False when any parent list could not be read, so the DAG read is partial. */
153
+ readonly complete: boolean;
154
+ readonly checked: MigrationsAcrossChange["report"]["checked"];
155
+ /** Files declined, with the reason recorded rather than guessed. */
156
+ readonly refused: readonly {
157
+ file: string;
158
+ reason: string;
159
+ }[];
160
+ /**
161
+ * Well-formed migrations sitting where no migration tool looks.
162
+ *
163
+ * Reported separately from the head computation because they are not in it —
164
+ * the runner cannot see them either, so "the merge leaves one head" can be
165
+ * true and incomplete in the same breath.
166
+ */
167
+ readonly misplaced: MigrationsAcrossChange["misplaced"];
168
+ }
158
169
  export interface CrossPrReport extends CrossPrEmptyDiff {
159
170
  readonly resolvedNodes: number;
160
171
  readonly hiddenDependencies: HiddenDependencyCheck;
161
172
  readonly overlaps: OverlapCheck;
162
173
  readonly superseded: SupersededCheck;
174
+ readonly migrationHeads: MigrationHeadCheck;
163
175
  }
164
176
  export type CrossPrData = CrossPrGitFailure | CrossPrEmptyDiff | CrossPrReport;
165
177
  export declare const crossPrTool: ToolDefinition;
@@ -1 +1 @@
1
- {"version":3,"file":"cross-pr.d.ts","sourceRoot":"","sources":["../../src/tools/cross-pr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAaH,OAAO,KAAK,EACV,QAAQ,EACR,sBAAsB,EACtB,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAML,KAAK,SAAS,EAEd,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAIlB;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,QAAQ,CAAC,SAAS,EAAE,SAAS;QAAE,QAAQ,C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