@descryy/mcp 0.11.5 → 0.11.7

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 (445) hide show
  1. package/dist/action-handshake.d.ts +38 -0
  2. package/dist/action-handshake.d.ts.map +1 -0
  3. package/dist/action-handshake.js +127 -0
  4. package/dist/action-handshake.js.map +1 -0
  5. package/dist/bin/descry-mcp.d.ts +7 -0
  6. package/dist/bin/descry-mcp.d.ts.map +1 -0
  7. package/dist/bin/descry-mcp.js +73 -0
  8. package/dist/bin/descry-mcp.js.map +1 -0
  9. package/dist/browser/auth.d.ts +84 -0
  10. package/dist/browser/auth.d.ts.map +1 -0
  11. package/dist/browser/auth.js +233 -0
  12. package/dist/browser/auth.js.map +1 -0
  13. package/dist/browser/capability-probe.d.ts +109 -0
  14. package/dist/browser/capability-probe.d.ts.map +1 -0
  15. package/dist/browser/capability-probe.js +201 -0
  16. package/dist/browser/capability-probe.js.map +1 -0
  17. package/dist/browser/driver.d.ts +591 -0
  18. package/dist/browser/driver.d.ts.map +1 -0
  19. package/dist/browser/driver.js +116 -0
  20. package/dist/browser/driver.js.map +1 -0
  21. package/dist/browser/evidence.d.ts +28 -0
  22. package/dist/browser/evidence.d.ts.map +1 -0
  23. package/dist/browser/evidence.js +82 -0
  24. package/dist/browser/evidence.js.map +1 -0
  25. package/dist/browser/fake-driver.d.ts +116 -0
  26. package/dist/browser/fake-driver.d.ts.map +1 -0
  27. package/dist/browser/fake-driver.js +416 -0
  28. package/dist/browser/fake-driver.js.map +1 -0
  29. package/dist/browser/fault-attribution.d.ts +178 -0
  30. package/dist/browser/fault-attribution.d.ts.map +1 -0
  31. package/dist/browser/fault-attribution.js +266 -0
  32. package/dist/browser/fault-attribution.js.map +1 -0
  33. package/dist/browser/graph-write.d.ts +45 -0
  34. package/dist/browser/graph-write.d.ts.map +1 -0
  35. package/dist/browser/graph-write.js +103 -0
  36. package/dist/browser/graph-write.js.map +1 -0
  37. package/dist/browser/identity-graph-write.d.ts +55 -0
  38. package/dist/browser/identity-graph-write.d.ts.map +1 -0
  39. package/dist/browser/identity-graph-write.js +45 -0
  40. package/dist/browser/identity-graph-write.js.map +1 -0
  41. package/dist/browser/page-probe.d.ts +81 -0
  42. package/dist/browser/page-probe.d.ts.map +1 -0
  43. package/dist/browser/page-probe.js +202 -0
  44. package/dist/browser/page-probe.js.map +1 -0
  45. package/dist/browser/playwright-driver.d.ts +115 -0
  46. package/dist/browser/playwright-driver.d.ts.map +1 -0
  47. package/dist/browser/playwright-driver.js +1545 -0
  48. package/dist/browser/playwright-driver.js.map +1 -0
  49. package/dist/browser/provider.d.ts +26 -0
  50. package/dist/browser/provider.d.ts.map +1 -0
  51. package/dist/browser/provider.js +14 -0
  52. package/dist/browser/provider.js.map +1 -0
  53. package/dist/browser/reach-recording-session.d.ts +44 -0
  54. package/dist/browser/reach-recording-session.d.ts.map +1 -0
  55. package/dist/browser/reach-recording-session.js +151 -0
  56. package/dist/browser/reach-recording-session.js.map +1 -0
  57. package/dist/browser/reachability.d.ts +168 -0
  58. package/dist/browser/reachability.d.ts.map +1 -0
  59. package/dist/browser/reachability.js +294 -0
  60. package/dist/browser/reachability.js.map +1 -0
  61. package/dist/browser/registry.d.ts +126 -0
  62. package/dist/browser/registry.d.ts.map +1 -0
  63. package/dist/browser/registry.js +177 -0
  64. package/dist/browser/registry.js.map +1 -0
  65. package/dist/browser/scenario-provenance.d.ts +23 -0
  66. package/dist/browser/scenario-provenance.d.ts.map +1 -0
  67. package/dist/browser/scenario-provenance.js +73 -0
  68. package/dist/browser/scenario-provenance.js.map +1 -0
  69. package/dist/browser/scenario-resolve.d.ts +28 -0
  70. package/dist/browser/scenario-resolve.d.ts.map +1 -0
  71. package/dist/browser/scenario-resolve.js +96 -0
  72. package/dist/browser/scenario-resolve.js.map +1 -0
  73. package/dist/browser/scenario-runner.d.ts +72 -0
  74. package/dist/browser/scenario-runner.d.ts.map +1 -0
  75. package/dist/browser/scenario-runner.js +353 -0
  76. package/dist/browser/scenario-runner.js.map +1 -0
  77. package/dist/browser/stack-parser.d.ts +19 -0
  78. package/dist/browser/stack-parser.d.ts.map +1 -0
  79. package/dist/browser/stack-parser.js +85 -0
  80. package/dist/browser/stack-parser.js.map +1 -0
  81. package/dist/browser/tool-support.d.ts +71 -0
  82. package/dist/browser/tool-support.d.ts.map +1 -0
  83. package/dist/browser/tool-support.js +216 -0
  84. package/dist/browser/tool-support.js.map +1 -0
  85. package/dist/browser/url-scheme.d.ts +14 -0
  86. package/dist/browser/url-scheme.d.ts.map +1 -0
  87. package/dist/browser/url-scheme.js +38 -0
  88. package/dist/browser/url-scheme.js.map +1 -0
  89. package/dist/browser/wait-target.d.ts +37 -0
  90. package/dist/browser/wait-target.d.ts.map +1 -0
  91. package/dist/browser/wait-target.js +54 -0
  92. package/dist/browser/wait-target.js.map +1 -0
  93. package/dist/cancellation.d.ts +20 -0
  94. package/dist/cancellation.d.ts.map +1 -0
  95. package/dist/cancellation.js +41 -0
  96. package/dist/cancellation.js.map +1 -0
  97. package/dist/capped.d.ts +39 -0
  98. package/dist/capped.d.ts.map +1 -0
  99. package/dist/capped.js +43 -0
  100. package/dist/capped.js.map +1 -0
  101. package/dist/credential-store.d.ts +22 -0
  102. package/dist/credential-store.d.ts.map +1 -0
  103. package/dist/credential-store.js +33 -0
  104. package/dist/credential-store.js.map +1 -0
  105. package/dist/disclosure-ledger.d.ts +14 -0
  106. package/dist/disclosure-ledger.d.ts.map +1 -0
  107. package/dist/disclosure-ledger.js +18 -0
  108. package/dist/disclosure-ledger.js.map +1 -0
  109. package/dist/evidence/observed-route-evidence.d.ts +25 -0
  110. package/dist/evidence/observed-route-evidence.d.ts.map +1 -0
  111. package/dist/evidence/observed-route-evidence.js +76 -0
  112. package/dist/evidence/observed-route-evidence.js.map +1 -0
  113. package/dist/heap.d.ts +61 -0
  114. package/dist/heap.d.ts.map +1 -0
  115. package/dist/heap.js +82 -0
  116. package/dist/heap.js.map +1 -0
  117. package/dist/heartbeat.d.ts +46 -0
  118. package/dist/heartbeat.d.ts.map +1 -0
  119. package/dist/heartbeat.js +66 -0
  120. package/dist/heartbeat.js.map +1 -0
  121. package/dist/index.d.ts +32 -0
  122. package/dist/index.d.ts.map +1 -0
  123. package/dist/index.js +19 -0
  124. package/dist/index.js.map +1 -0
  125. package/dist/module-trust.d.ts +37 -0
  126. package/dist/module-trust.d.ts.map +1 -0
  127. package/dist/module-trust.js +77 -0
  128. package/dist/module-trust.js.map +1 -0
  129. package/dist/path-confinement.d.ts +31 -0
  130. package/dist/path-confinement.d.ts.map +1 -0
  131. package/dist/path-confinement.js +44 -0
  132. package/dist/path-confinement.js.map +1 -0
  133. package/dist/planner/predict-then-propose.d.ts +134 -0
  134. package/dist/planner/predict-then-propose.d.ts.map +1 -0
  135. package/dist/planner/predict-then-propose.js +138 -0
  136. package/dist/planner/predict-then-propose.js.map +1 -0
  137. package/dist/planner/propose-journey.d.ts +75 -0
  138. package/dist/planner/propose-journey.d.ts.map +1 -0
  139. package/dist/planner/propose-journey.js +96 -0
  140. package/dist/planner/propose-journey.js.map +1 -0
  141. package/dist/protocol.d.ts +57 -0
  142. package/dist/protocol.d.ts.map +1 -0
  143. package/dist/protocol.js +90 -0
  144. package/dist/protocol.js.map +1 -0
  145. package/dist/ready-checks.d.ts +12 -0
  146. package/dist/ready-checks.d.ts.map +1 -0
  147. package/dist/ready-checks.js +43 -0
  148. package/dist/ready-checks.js.map +1 -0
  149. package/dist/registry.d.ts +103 -0
  150. package/dist/registry.d.ts.map +1 -0
  151. package/dist/registry.js +327 -0
  152. package/dist/registry.js.map +1 -0
  153. package/dist/render.d.ts +623 -0
  154. package/dist/render.d.ts.map +1 -0
  155. package/dist/render.js +968 -0
  156. package/dist/render.js.map +1 -0
  157. package/dist/runtime-registry.d.ts +22 -0
  158. package/dist/runtime-registry.d.ts.map +1 -0
  159. package/dist/runtime-registry.js +142 -0
  160. package/dist/runtime-registry.js.map +1 -0
  161. package/dist/sandbox-defaults.d.ts +41 -0
  162. package/dist/sandbox-defaults.d.ts.map +1 -0
  163. package/dist/sandbox-defaults.js +14 -0
  164. package/dist/sandbox-defaults.js.map +1 -0
  165. package/dist/scenarios/browser-run-plan-projection.d.ts +161 -0
  166. package/dist/scenarios/browser-run-plan-projection.d.ts.map +1 -0
  167. package/dist/scenarios/browser-run-plan-projection.js +264 -0
  168. package/dist/scenarios/browser-run-plan-projection.js.map +1 -0
  169. package/dist/scenarios/credential-ref.d.ts +102 -0
  170. package/dist/scenarios/credential-ref.d.ts.map +1 -0
  171. package/dist/scenarios/credential-ref.js +148 -0
  172. package/dist/scenarios/credential-ref.js.map +1 -0
  173. package/dist/scenarios/index.d.ts +7 -0
  174. package/dist/scenarios/index.d.ts.map +1 -0
  175. package/dist/scenarios/index.js +7 -0
  176. package/dist/scenarios/index.js.map +1 -0
  177. package/dist/scenarios/parse.d.ts +18 -0
  178. package/dist/scenarios/parse.d.ts.map +1 -0
  179. package/dist/scenarios/parse.js +212 -0
  180. package/dist/scenarios/parse.js.map +1 -0
  181. package/dist/scenarios/scenario.d.ts +93 -0
  182. package/dist/scenarios/scenario.d.ts.map +1 -0
  183. package/dist/scenarios/scenario.js +27 -0
  184. package/dist/scenarios/scenario.js.map +1 -0
  185. package/dist/scenarios/secret-ref.d.ts +86 -0
  186. package/dist/scenarios/secret-ref.d.ts.map +1 -0
  187. package/dist/scenarios/secret-ref.js +125 -0
  188. package/dist/scenarios/secret-ref.js.map +1 -0
  189. package/dist/scenarios/storage.d.ts +21 -0
  190. package/dist/scenarios/storage.d.ts.map +1 -0
  191. package/dist/scenarios/storage.js +103 -0
  192. package/dist/scenarios/storage.js.map +1 -0
  193. package/dist/server.d.ts +61 -0
  194. package/dist/server.d.ts.map +1 -0
  195. package/dist/server.js +642 -0
  196. package/dist/server.js.map +1 -0
  197. package/dist/session.d.ts +356 -0
  198. package/dist/session.d.ts.map +1 -0
  199. package/dist/session.js +779 -0
  200. package/dist/session.js.map +1 -0
  201. package/dist/tools/alias-kit.d.ts +29 -0
  202. package/dist/tools/alias-kit.d.ts.map +1 -0
  203. package/dist/tools/alias-kit.js +21 -0
  204. package/dist/tools/alias-kit.js.map +1 -0
  205. package/dist/tools/aliases.d.ts +42 -0
  206. package/dist/tools/aliases.d.ts.map +1 -0
  207. package/dist/tools/aliases.js +52 -0
  208. package/dist/tools/aliases.js.map +1 -0
  209. package/dist/tools/analyze-workspace.d.ts +52 -0
  210. package/dist/tools/analyze-workspace.d.ts.map +1 -0
  211. package/dist/tools/analyze-workspace.js +207 -0
  212. package/dist/tools/analyze-workspace.js.map +1 -0
  213. package/dist/tools/analyze.d.ts +163 -0
  214. package/dist/tools/analyze.d.ts.map +1 -0
  215. package/dist/tools/analyze.js +724 -0
  216. package/dist/tools/analyze.js.map +1 -0
  217. package/dist/tools/browser-click.d.ts +18 -0
  218. package/dist/tools/browser-click.d.ts.map +1 -0
  219. package/dist/tools/browser-click.js +110 -0
  220. package/dist/tools/browser-click.js.map +1 -0
  221. package/dist/tools/browser-close-session.d.ts +39 -0
  222. package/dist/tools/browser-close-session.d.ts.map +1 -0
  223. package/dist/tools/browser-close-session.js +120 -0
  224. package/dist/tools/browser-close-session.js.map +1 -0
  225. package/dist/tools/browser-fill.d.ts +18 -0
  226. package/dist/tools/browser-fill.d.ts.map +1 -0
  227. package/dist/tools/browser-fill.js +117 -0
  228. package/dist/tools/browser-fill.js.map +1 -0
  229. package/dist/tools/browser-navigate.d.ts +15 -0
  230. package/dist/tools/browser-navigate.d.ts.map +1 -0
  231. package/dist/tools/browser-navigate.js +106 -0
  232. package/dist/tools/browser-navigate.js.map +1 -0
  233. package/dist/tools/browser-read.d.ts +33 -0
  234. package/dist/tools/browser-read.d.ts.map +1 -0
  235. package/dist/tools/browser-read.js +105 -0
  236. package/dist/tools/browser-read.js.map +1 -0
  237. package/dist/tools/browser-run-scenario.d.ts +28 -0
  238. package/dist/tools/browser-run-scenario.d.ts.map +1 -0
  239. package/dist/tools/browser-run-scenario.js +238 -0
  240. package/dist/tools/browser-run-scenario.js.map +1 -0
  241. package/dist/tools/browser-save-scenario.d.ts +19 -0
  242. package/dist/tools/browser-save-scenario.d.ts.map +1 -0
  243. package/dist/tools/browser-save-scenario.js +447 -0
  244. package/dist/tools/browser-save-scenario.js.map +1 -0
  245. package/dist/tools/browser-select.d.ts +20 -0
  246. package/dist/tools/browser-select.d.ts.map +1 -0
  247. package/dist/tools/browser-select.js +120 -0
  248. package/dist/tools/browser-select.js.map +1 -0
  249. package/dist/tools/browser-snapshot.d.ts +46 -0
  250. package/dist/tools/browser-snapshot.d.ts.map +1 -0
  251. package/dist/tools/browser-snapshot.js +127 -0
  252. package/dist/tools/browser-snapshot.js.map +1 -0
  253. package/dist/tools/browser-start-session.d.ts +24 -0
  254. package/dist/tools/browser-start-session.d.ts.map +1 -0
  255. package/dist/tools/browser-start-session.js +653 -0
  256. package/dist/tools/browser-start-session.js.map +1 -0
  257. package/dist/tools/browser-submit.d.ts +18 -0
  258. package/dist/tools/browser-submit.d.ts.map +1 -0
  259. package/dist/tools/browser-submit.js +106 -0
  260. package/dist/tools/browser-submit.js.map +1 -0
  261. package/dist/tools/browser-type.d.ts +18 -0
  262. package/dist/tools/browser-type.d.ts.map +1 -0
  263. package/dist/tools/browser-type.js +115 -0
  264. package/dist/tools/browser-type.js.map +1 -0
  265. package/dist/tools/browser-wait-for.d.ts +45 -0
  266. package/dist/tools/browser-wait-for.d.ts.map +1 -0
  267. package/dist/tools/browser-wait-for.js +164 -0
  268. package/dist/tools/browser-wait-for.js.map +1 -0
  269. package/dist/tools/browser.d.ts +69 -0
  270. package/dist/tools/browser.d.ts.map +1 -0
  271. package/dist/tools/browser.js +326 -0
  272. package/dist/tools/browser.js.map +1 -0
  273. package/dist/tools/chain.d.ts +41 -0
  274. package/dist/tools/chain.d.ts.map +1 -0
  275. package/dist/tools/chain.js +101 -0
  276. package/dist/tools/chain.js.map +1 -0
  277. package/dist/tools/change-scope.d.ts +25 -0
  278. package/dist/tools/change-scope.d.ts.map +1 -0
  279. package/dist/tools/change-scope.js +103 -0
  280. package/dist/tools/change-scope.js.map +1 -0
  281. package/dist/tools/code-context.d.ts +83 -0
  282. package/dist/tools/code-context.d.ts.map +1 -0
  283. package/dist/tools/code-context.js +432 -0
  284. package/dist/tools/code-context.js.map +1 -0
  285. package/dist/tools/contracts.d.ts +74 -0
  286. package/dist/tools/contracts.d.ts.map +1 -0
  287. package/dist/tools/contracts.js +214 -0
  288. package/dist/tools/contracts.js.map +1 -0
  289. package/dist/tools/cross-pr.d.ts +178 -0
  290. package/dist/tools/cross-pr.d.ts.map +1 -0
  291. package/dist/tools/cross-pr.js +362 -0
  292. package/dist/tools/cross-pr.js.map +1 -0
  293. package/dist/tools/disclosure.d.ts +75 -0
  294. package/dist/tools/disclosure.d.ts.map +1 -0
  295. package/dist/tools/disclosure.js +325 -0
  296. package/dist/tools/disclosure.js.map +1 -0
  297. package/dist/tools/draw-conclusion.d.ts +55 -0
  298. package/dist/tools/draw-conclusion.d.ts.map +1 -0
  299. package/dist/tools/draw-conclusion.js +243 -0
  300. package/dist/tools/draw-conclusion.js.map +1 -0
  301. package/dist/tools/git-context.d.ts +39 -0
  302. package/dist/tools/git-context.d.ts.map +1 -0
  303. package/dist/tools/git-context.js +374 -0
  304. package/dist/tools/git-context.js.map +1 -0
  305. package/dist/tools/git-diff.d.ts +45 -0
  306. package/dist/tools/git-diff.d.ts.map +1 -0
  307. package/dist/tools/git-diff.js +338 -0
  308. package/dist/tools/git-diff.js.map +1 -0
  309. package/dist/tools/git-history.d.ts +16 -0
  310. package/dist/tools/git-history.d.ts.map +1 -0
  311. package/dist/tools/git-history.js +106 -0
  312. package/dist/tools/git-history.js.map +1 -0
  313. package/dist/tools/history.d.ts +34 -0
  314. package/dist/tools/history.d.ts.map +1 -0
  315. package/dist/tools/history.js +121 -0
  316. package/dist/tools/history.js.map +1 -0
  317. package/dist/tools/impact.d.ts +46 -0
  318. package/dist/tools/impact.d.ts.map +1 -0
  319. package/dist/tools/impact.js +225 -0
  320. package/dist/tools/impact.js.map +1 -0
  321. package/dist/tools/index.d.ts +59 -0
  322. package/dist/tools/index.d.ts.map +1 -0
  323. package/dist/tools/index.js +70 -0
  324. package/dist/tools/index.js.map +1 -0
  325. package/dist/tools/kit.d.ts +165 -0
  326. package/dist/tools/kit.d.ts.map +1 -0
  327. package/dist/tools/kit.js +153 -0
  328. package/dist/tools/kit.js.map +1 -0
  329. package/dist/tools/link-workspace.d.ts +24 -0
  330. package/dist/tools/link-workspace.d.ts.map +1 -0
  331. package/dist/tools/link-workspace.js +131 -0
  332. package/dist/tools/link-workspace.js.map +1 -0
  333. package/dist/tools/lookup.d.ts +19 -0
  334. package/dist/tools/lookup.d.ts.map +1 -0
  335. package/dist/tools/lookup.js +63 -0
  336. package/dist/tools/lookup.js.map +1 -0
  337. package/dist/tools/mark-incident.d.ts +28 -0
  338. package/dist/tools/mark-incident.d.ts.map +1 -0
  339. package/dist/tools/mark-incident.js +171 -0
  340. package/dist/tools/mark-incident.js.map +1 -0
  341. package/dist/tools/merged-browser.d.ts +11 -0
  342. package/dist/tools/merged-browser.d.ts.map +1 -0
  343. package/dist/tools/merged-browser.js +20 -0
  344. package/dist/tools/merged-browser.js.map +1 -0
  345. package/dist/tools/merged-context.d.ts +11 -0
  346. package/dist/tools/merged-context.d.ts.map +1 -0
  347. package/dist/tools/merged-context.js +21 -0
  348. package/dist/tools/merged-context.js.map +1 -0
  349. package/dist/tools/merged-observe.d.ts +13 -0
  350. package/dist/tools/merged-observe.d.ts.map +1 -0
  351. package/dist/tools/merged-observe.js +21 -0
  352. package/dist/tools/merged-observe.js.map +1 -0
  353. package/dist/tools/merged-workspace.d.ts +14 -0
  354. package/dist/tools/merged-workspace.d.ts.map +1 -0
  355. package/dist/tools/merged-workspace.js +21 -0
  356. package/dist/tools/merged-workspace.js.map +1 -0
  357. package/dist/tools/observe-runtime.d.ts +262 -0
  358. package/dist/tools/observe-runtime.d.ts.map +1 -0
  359. package/dist/tools/observe-runtime.js +1966 -0
  360. package/dist/tools/observe-runtime.js.map +1 -0
  361. package/dist/tools/observe-tests.d.ts +57 -0
  362. package/dist/tools/observe-tests.d.ts.map +1 -0
  363. package/dist/tools/observe-tests.js +391 -0
  364. package/dist/tools/observe-tests.js.map +1 -0
  365. package/dist/tools/observe.d.ts +28 -0
  366. package/dist/tools/observe.d.ts.map +1 -0
  367. package/dist/tools/observe.js +291 -0
  368. package/dist/tools/observe.js.map +1 -0
  369. package/dist/tools/pr-analysis.d.ts +189 -0
  370. package/dist/tools/pr-analysis.d.ts.map +1 -0
  371. package/dist/tools/pr-analysis.js +365 -0
  372. package/dist/tools/pr-analysis.js.map +1 -0
  373. package/dist/tools/pre-push.d.ts +168 -0
  374. package/dist/tools/pre-push.d.ts.map +1 -0
  375. package/dist/tools/pre-push.js +416 -0
  376. package/dist/tools/pre-push.js.map +1 -0
  377. package/dist/tools/predict-reach.d.ts +57 -0
  378. package/dist/tools/predict-reach.d.ts.map +1 -0
  379. package/dist/tools/predict-reach.js +183 -0
  380. package/dist/tools/predict-reach.js.map +1 -0
  381. package/dist/tools/propagation.d.ts +37 -0
  382. package/dist/tools/propagation.d.ts.map +1 -0
  383. package/dist/tools/propagation.js +162 -0
  384. package/dist/tools/propagation.js.map +1 -0
  385. package/dist/tools/propose-journey.d.ts +16 -0
  386. package/dist/tools/propose-journey.d.ts.map +1 -0
  387. package/dist/tools/propose-journey.js +132 -0
  388. package/dist/tools/propose-journey.js.map +1 -0
  389. package/dist/tools/prove-reach.d.ts +74 -0
  390. package/dist/tools/prove-reach.d.ts.map +1 -0
  391. package/dist/tools/prove-reach.js +274 -0
  392. package/dist/tools/prove-reach.js.map +1 -0
  393. package/dist/tools/questions.d.ts +30 -0
  394. package/dist/tools/questions.d.ts.map +1 -0
  395. package/dist/tools/questions.js +230 -0
  396. package/dist/tools/questions.js.map +1 -0
  397. package/dist/tools/refusal-fetch.d.ts +35 -0
  398. package/dist/tools/refusal-fetch.d.ts.map +1 -0
  399. package/dist/tools/refusal-fetch.js +123 -0
  400. package/dist/tools/refusal-fetch.js.map +1 -0
  401. package/dist/tools/runtime-incident.d.ts +33 -0
  402. package/dist/tools/runtime-incident.d.ts.map +1 -0
  403. package/dist/tools/runtime-incident.js +67 -0
  404. package/dist/tools/runtime-incident.js.map +1 -0
  405. package/dist/tools/runtime-journey-drive.d.ts +102 -0
  406. package/dist/tools/runtime-journey-drive.d.ts.map +1 -0
  407. package/dist/tools/runtime-journey-drive.js +247 -0
  408. package/dist/tools/runtime-journey-drive.js.map +1 -0
  409. package/dist/tools/scope.d.ts +45 -0
  410. package/dist/tools/scope.d.ts.map +1 -0
  411. package/dist/tools/scope.js +217 -0
  412. package/dist/tools/scope.js.map +1 -0
  413. package/dist/tools/similar-incidents.d.ts +43 -0
  414. package/dist/tools/similar-incidents.d.ts.map +1 -0
  415. package/dist/tools/similar-incidents.js +190 -0
  416. package/dist/tools/similar-incidents.js.map +1 -0
  417. package/dist/tools/validate.d.ts +133 -0
  418. package/dist/tools/validate.d.ts.map +1 -0
  419. package/dist/tools/validate.js +488 -0
  420. package/dist/tools/validate.js.map +1 -0
  421. package/dist/tools/verb.d.ts +46 -0
  422. package/dist/tools/verb.d.ts.map +1 -0
  423. package/dist/tools/verb.js +78 -0
  424. package/dist/tools/verb.js.map +1 -0
  425. package/dist/tools/verification-status.d.ts +38 -0
  426. package/dist/tools/verification-status.d.ts.map +1 -0
  427. package/dist/tools/verification-status.js +203 -0
  428. package/dist/tools/verification-status.js.map +1 -0
  429. package/dist/tools/verify-claim.d.ts +29 -0
  430. package/dist/tools/verify-claim.d.ts.map +1 -0
  431. package/dist/tools/verify-claim.js +218 -0
  432. package/dist/tools/verify-claim.js.map +1 -0
  433. package/dist/tools/workspace.d.ts +28 -0
  434. package/dist/tools/workspace.d.ts.map +1 -0
  435. package/dist/tools/workspace.js +94 -0
  436. package/dist/tools/workspace.js.map +1 -0
  437. package/dist/transport.d.ts +32 -0
  438. package/dist/transport.d.ts.map +1 -0
  439. package/dist/transport.js +85 -0
  440. package/dist/transport.js.map +1 -0
  441. package/dist/workspace-index.d.ts +164 -0
  442. package/dist/workspace-index.d.ts.map +1 -0
  443. package/dist/workspace-index.js +381 -0
  444. package/dist/workspace-index.js.map +1 -0
  445. package/package.json +5 -5
@@ -0,0 +1,365 @@
1
+ /**
2
+ * `pr-analysis` — "what should I test before I open this PR?"
3
+ *
4
+ * The blast radius of a diff, intersected with the tests that cover it. The
5
+ * useful half of the answer is the second list: **what is affected and has no
6
+ * covering test.** A green suite proves nothing about that set, and it is the
7
+ * only part of a PR review that a test run cannot supply.
8
+ *
9
+ * ## `base...head`, three dots
10
+ *
11
+ * `changedFiles` diffs against the merge base rather than the two tips. On a
12
+ * branch a week behind `main`, two dots would fold every change made on `main`
13
+ * since the branch point into "this PR", and the blast radius would belong to
14
+ * somebody else's work. This is stated here as well as at the git call because
15
+ * it is the kind of thing that gets "simplified" later.
16
+ *
17
+ * ## Absence of a test is not evidence of absence
18
+ *
19
+ * `TESTS` edges come from adapters, and every adapter's recall is below 100% by
20
+ * design — precision over recall, when in doubt omit the edge. So "no covering
21
+ * test" means "no test that this graph can link", and the difference is
22
+ * disclosed. Reporting the untested list without it would turn a measured recall
23
+ * gap into a confident accusation.
24
+ *
25
+ * ## One node map, three id lists
26
+ *
27
+ * `affected`, `untested` and `tests` overlap heavily by construction — an
28
+ * affected node with no covering test is in two of them — and each used to
29
+ * carry the whole node inline, so the same fields were serialized up to three
30
+ * times in one reply. `indexPrAnalysisNodes` collapses that: the lists name
31
+ * ids, `nodes` holds each node once. Tool version 2.0.0 for it.
32
+ */
33
+ import { addedLineRanges, changeRisk, gitDiff, gitWorkingTreeChange, NODE_BUDGETS, nodesInFiles, withProminence, } from "@descryy/core";
34
+ import { answer, briefNode, optionalEnum, optionalInteger, descryOwnState, optionalString, ToolInputError, } from "./kit.js";
35
+ import { sizeCapNote } from "../capped.js";
36
+ /**
37
+ * Collapse three overlapping node lists into one map plus three id lists.
38
+ *
39
+ * Order within each list is preserved exactly — it is the ranking the query
40
+ * layer produced, and re-sorting it here would silently change which nodes a
41
+ * caller's own `limit` keeps.
42
+ */
43
+ export function indexPrAnalysisNodes(affected, untested, tests) {
44
+ const nodes = {};
45
+ const remember = (node) => {
46
+ if (nodes[node.id] === undefined)
47
+ nodes[node.id] = briefNode(node);
48
+ return node.id;
49
+ };
50
+ return {
51
+ affected: withProminence(affected.map((entry) => ({
52
+ id: remember(entry.node),
53
+ score: Number(entry.score.toFixed(4)),
54
+ depth: entry.depth,
55
+ }))),
56
+ untested: untested.map(remember),
57
+ tests: tests.map(remember),
58
+ nodes,
59
+ };
60
+ }
61
+ /**
62
+ * `fitToBudget` for `PrAnalysisReport` — harder than a plain list because
63
+ * `nodes` is shared: dropping a trailing id from `affected` only saves bytes
64
+ * if that id is not also named by `untested` or `tests`. So this walks the
65
+ * three id-lists in priority order (`affected`, the point of the tool, first;
66
+ * `tests` last, since it is usually the smallest and least load-bearing),
67
+ * paying each node's cost once, the first time any list names it, and
68
+ * dropping an item the moment its own cost plus its node's first-time cost
69
+ * (if any) would not fit — never partially, and never over budget.
70
+ */
71
+ function fitPrAnalysis(rest, affectedRefs, untestedIds, testIds, nodes, budgetBytes) {
72
+ const scaffoldBytes = Buffer.byteLength(JSON.stringify({ ...rest, affected: [], untested: [], tests: [], nodes: {} }), "utf8");
73
+ let budget = Math.max(budgetBytes - scaffoldBytes, 0);
74
+ const countedIds = new Set();
75
+ const nodeCost = (id) => {
76
+ const node = nodes[id];
77
+ if (node === undefined || countedIds.has(id))
78
+ return 0;
79
+ return Buffer.byteLength(JSON.stringify(id), "utf8") + Buffer.byteLength(JSON.stringify(node), "utf8") + 2;
80
+ };
81
+ function take(items, idOf) {
82
+ const shown = [];
83
+ for (const item of items) {
84
+ const id = idOf(item);
85
+ const cost = Buffer.byteLength(JSON.stringify(item), "utf8") + 1 + nodeCost(id);
86
+ if (cost > budget)
87
+ break;
88
+ budget -= cost;
89
+ countedIds.add(id);
90
+ shown.push(item);
91
+ }
92
+ return { shown, dropped: items.length - shown.length };
93
+ }
94
+ const affectedFit = take(affectedRefs, (a) => a.id);
95
+ const untestedFit = take(untestedIds, (id) => id);
96
+ const testsFit = take(testIds, (id) => id);
97
+ const prunedNodes = {};
98
+ for (const id of countedIds) {
99
+ const node = nodes[id];
100
+ if (node !== undefined)
101
+ prunedNodes[id] = node;
102
+ }
103
+ const notes = [];
104
+ if (affectedFit.dropped > 0) {
105
+ notes.push(sizeCapNote("affected node", affectedFit.shown.length, affectedRefs.length, affectedFit.dropped));
106
+ }
107
+ if (untestedFit.dropped > 0) {
108
+ notes.push(sizeCapNote("untested node", untestedFit.shown.length, untestedIds.length, untestedFit.dropped));
109
+ }
110
+ if (testsFit.dropped > 0) {
111
+ notes.push(sizeCapNote("covering test", testsFit.shown.length, testIds.length, testsFit.dropped));
112
+ }
113
+ const droppedNow = affectedFit.dropped + untestedFit.dropped + testsFit.dropped;
114
+ return {
115
+ data: {
116
+ ...rest,
117
+ affected: affectedFit.shown,
118
+ untested: untestedFit.shown,
119
+ tests: testsFit.shown,
120
+ nodes: prunedNodes,
121
+ },
122
+ notes,
123
+ ...(droppedNow === 0
124
+ ? {}
125
+ : {
126
+ truncatedDetail: {
127
+ shown: affectedFit.shown.length + untestedFit.shown.length + testsFit.shown.length,
128
+ total: affectedRefs.length + untestedIds.length + testIds.length,
129
+ more: null,
130
+ },
131
+ }),
132
+ };
133
+ }
134
+ /** Path to the lines the diff actually added in it — `null` when the patch was
135
+ * withheld (binary, or a size budget), which is not the same as "no lines added". */
136
+ function addedLinesByFile(files) {
137
+ return new Map(files.map((f) => [f.path, f.patch === null ? null : addedLineRanges(f.patch)]));
138
+ }
139
+ /** Does this node's declared range land on a line the diff actually added?
140
+ * `false` for anything unprovable — no range, no file, or a file whose patch
141
+ * was withheld — never assumed true (F5, UAT Phase 5, rule 2). */
142
+ function touchesAddedLine(node, addedByFile) {
143
+ if (node.file === null || node.range === null)
144
+ return false;
145
+ const ranges = addedByFile.get(node.file);
146
+ if (ranges === null || ranges === undefined)
147
+ return false;
148
+ return ranges.some((r) => node.range.startLine <= r.end && node.range.endLine >= r.start);
149
+ }
150
+ const TRIGGERS = ["pre-push", "pr", "nightly"];
151
+ const SCHEMA = {
152
+ type: "object",
153
+ properties: {
154
+ base: {
155
+ type: "string",
156
+ description: "Branch/commit measured against, e.g. \"main\". Required unless workingTree is given.",
157
+ },
158
+ head: { type: "string", description: "The tip being reviewed. Default HEAD." },
159
+ workingTree: {
160
+ type: "string",
161
+ enum: ["unstaged", "staged", "all"],
162
+ description: "Review the working tree instead of two refs. Exclusive with base.",
163
+ },
164
+ includeUntracked: {
165
+ type: "boolean",
166
+ description: "With workingTree, include never-added files. On by default.",
167
+ },
168
+ trigger: {
169
+ type: "string",
170
+ enum: [...TRIGGERS],
171
+ description: "Node budget to use. Default pr (1000).",
172
+ },
173
+ limit: { type: "integer", minimum: 1, description: "Cap on nodes per list. Default 50." },
174
+ },
175
+ additionalProperties: false,
176
+ };
177
+ async function run(args, ctx) {
178
+ // One of the two questions has to be chosen, and neither has a defensible
179
+ // default: guessing would silently change which change set the whole answer
180
+ // describes. This tool's own reasoning is that the diff is what defines a
181
+ // change to review — a working tree *is* a diff, it is simply not a
182
+ // ref-to-ref one, so accepting it completes that principle rather than
183
+ // bending it. Which one ran is stated in the reply.
184
+ const workingTree = optionalString(args, "workingTree");
185
+ const includeUntracked = args["includeUntracked"] !== false;
186
+ const baseArg = optionalString(args, "base");
187
+ if (workingTree === undefined && baseArg === undefined) {
188
+ throw new ToolInputError('Give either "base" (a ref range) or "workingTree" (the change as it stands, uncommitted). ' +
189
+ "There is no defensible default, and guessing one silently changes which change set the " +
190
+ "answer describes.");
191
+ }
192
+ if (workingTree !== undefined && baseArg !== undefined) {
193
+ throw new ToolInputError('"base" and "workingTree" are mutually exclusive — they are two different questions. Ask one.');
194
+ }
195
+ if (workingTree !== undefined && !["unstaged", "staged", "all"].includes(workingTree)) {
196
+ throw new ToolInputError(`"workingTree" must be "unstaged", "staged" or "all" — got "${workingTree}".`);
197
+ }
198
+ const scope = (workingTree ?? "all");
199
+ const mode = baseArg === undefined ? "working-tree" : "range";
200
+ const base = baseArg ?? null;
201
+ const head = base === null ? null : optionalString(args, "head") ?? "HEAD";
202
+ const subject = base === null ? `the working tree (${scope})` : `${base}...${head}`;
203
+ /** Carried into every one of the four reply shapes, so none can omit it. */
204
+ const identity = {
205
+ mode,
206
+ base,
207
+ head,
208
+ ...(base === null ? { workingTree: { scope, includeUntracked } } : {}),
209
+ };
210
+ const trigger = optionalEnum(args, "trigger", TRIGGERS) ?? "pr";
211
+ const limit = optionalInteger(args, "limit", 1) ?? 50;
212
+ const session = ctx.session;
213
+ const stamp = session.provider().baseStamp();
214
+ ctx.progress(`Diffing ${subject}`);
215
+ let diffFiles;
216
+ try {
217
+ diffFiles =
218
+ base === null
219
+ ? (await gitWorkingTreeChange(session.repoPath, {
220
+ scope,
221
+ includeUntracked,
222
+ exclude: descryOwnState(session.config.graph),
223
+ })).files
224
+ : await gitDiff(session.repoPath, base, head);
225
+ }
226
+ catch (error) {
227
+ return answer({
228
+ headline: `Could not diff ${subject}.`,
229
+ state: "refused",
230
+ nameLevel: true,
231
+ resolutionFloor: 0,
232
+ commitSha: stamp.commitSha,
233
+ graphBuiltAt: stamp.graphBuiltAt,
234
+ irSchemaVersion: stamp.irSchemaVersion,
235
+ commitSpread: stamp.commitSpread,
236
+ repoCount: stamp.repoCount,
237
+ notes: [
238
+ (base === null
239
+ ? `git rejected the working-tree read: ${error.message.trim()}.`
240
+ : `git rejected the range: ${error.message.trim()}. Check that "${base}" ` +
241
+ "exists locally — a shallow clone or a missing fetch is the usual cause."),
242
+ ],
243
+ data: { ...identity, files: [] },
244
+ });
245
+ }
246
+ const files = diffFiles.map((f) => f.path);
247
+ const addedByFile = addedLinesByFile(diffFiles);
248
+ const notes = [];
249
+ if (files.length === 0) {
250
+ return answer({
251
+ headline: `${subject} changes no files.`,
252
+ nameLevel: true,
253
+ // 0, not 4. Every other branch of this tool already stamps 0 for the same
254
+ // reason `get_git_diff` does — a live git read is not a graph-traversal
255
+ // claim — and this branch reads *less* than they do, not more. Stamping
256
+ // the strongest tier on the answer that rests on no graph evidence at all
257
+ // was the same leaked default `createResolutionFloor` exists to remove.
258
+ resolutionFloor: 0,
259
+ commitSha: stamp.commitSha,
260
+ graphBuiltAt: stamp.graphBuiltAt,
261
+ irSchemaVersion: stamp.irSchemaVersion,
262
+ commitSpread: stamp.commitSpread,
263
+ repoCount: stamp.repoCount,
264
+ notes: ["An empty diff is a real answer: there is nothing to assess."],
265
+ data: { ...identity, files: [], nodes: {}, affected: [], untested: [], tests: [] },
266
+ });
267
+ }
268
+ ctx.progress(`Resolving ${files.length} changed file(s)`, 1, 3);
269
+ const { nodes, missing } = nodesInFiles(session.store().driver, files);
270
+ if (missing.length > 0) {
271
+ notes.push(`${missing.length} of ${files.length} changed file(s) have no node in the graph ` +
272
+ `(${missing.slice(0, 5).join(", ")}${missing.length > 5 ? ", …" : ""}). They are outside ` +
273
+ "what any configured adapter reads, or the graph predates them. Their impact is absent " +
274
+ "from this analysis and they are not being reported as safe.");
275
+ }
276
+ if (nodes.length === 0) {
277
+ return answer({
278
+ headline: `None of the ${files.length} file(s) changed in ${subject} are in the graph.`,
279
+ state: "refused",
280
+ nameLevel: true,
281
+ resolutionFloor: 0,
282
+ commitSha: stamp.commitSha,
283
+ graphBuiltAt: stamp.graphBuiltAt,
284
+ irSchemaVersion: stamp.irSchemaVersion,
285
+ commitSpread: stamp.commitSpread,
286
+ repoCount: stamp.repoCount,
287
+ notes: [
288
+ ...notes,
289
+ "No blast radius was computed. Run analyze first; if it has already run, its disclosures " +
290
+ "name the languages and paths it could not read.",
291
+ ],
292
+ data: { ...identity, files, missing, nodes: {}, affected: [], untested: [], tests: [] },
293
+ });
294
+ }
295
+ ctx.progress(`Assessing ${nodes.length} changed symbol(s)`, 2, 3);
296
+ // `changeRisk` takes a raw node budget rather than a trigger: the trigger is a
297
+ // scoping concept and the query layer deliberately does not know about it.
298
+ // Translating here keeps the tool's vocabulary the developer's ("this is a
299
+ // PR") and the engine's its own.
300
+ //
301
+ // Seeded from every symbol in a touched file, not only the ones whose range
302
+ // actually intersects an added line (F5, UAT Phase 5) — deliberately: a
303
+ // line-precise seed set would silently lose a deleted file's symbols (no
304
+ // added lines to intersect) and any file whose patch was withheld by the
305
+ // diff's own size budget. `changedSymbols` below reports the precise count;
306
+ // this traversal stays seeded from the broader, disclosed one.
307
+ const risk = changeRisk(session.provider(), nodes.map((n) => n.id), { budget: NODE_BUDGETS[trigger] });
308
+ const changedSymbols = nodes.filter((n) => touchesAddedLine(n, addedByFile)).length;
309
+ notes.push("\"Untested\" means no test is linked to the node in this graph. Adapters omit an edge they " +
310
+ "cannot prove, so a genuinely covered symbol can appear here — treat it as a gap to check, " +
311
+ "not as a proven hole.", `"changedSymbols" counts only nodes whose declared range intersects a line the diff actually ` +
312
+ `added; "symbolsInChangedFiles" (${nodes.length}) counts every node living in a touched ` +
313
+ "file, whichever lines moved — the blast radius below is seeded from that broader set, not " +
314
+ "only from changedSymbols, so a deleted file's callers and a size-capped file's symbols are " +
315
+ "not silently dropped from the analysis.");
316
+ const untested = risk.data.untested;
317
+ const affected = risk.data.affected.filter((entry) => entry.node.type !== "TEST_CASE");
318
+ // One node map, three id lists — see `indexPrAnalysisNodes`. Each list is
319
+ // capped by `limit` *before* indexing, so the map holds only what the reply
320
+ // actually names.
321
+ const lists = indexPrAnalysisNodes(affected.slice(0, limit), untested.slice(0, limit), risk.data.tests.slice(0, limit));
322
+ ctx.progress("Done", 3, 3);
323
+ const restOfReportData = {
324
+ ...identity,
325
+ files,
326
+ missing,
327
+ changedSymbols,
328
+ symbolsInChangedFiles: nodes.length,
329
+ affectedTotal: affected.length,
330
+ untestedTotal: untested.length,
331
+ testsTotal: risk.data.tests.length,
332
+ };
333
+ return {
334
+ result: {
335
+ ...risk,
336
+ data: { ...restOfReportData, ...lists },
337
+ notes: [...risk.notes, ...notes],
338
+ },
339
+ ...(affected.length === 0 ? { state: "empty" } : {}),
340
+ nameLevel: true,
341
+ fitToBudget: (budgetBytes) => fitPrAnalysis(restOfReportData, lists.affected, lists.untested, lists.tests, lists.nodes, budgetBytes),
342
+ headline: `Across ${subject}: ${changedSymbols} changed symbol(s)` +
343
+ (nodes.length > changedSymbols
344
+ ? ` (${nodes.length - changedSymbols} more live in the ${files.length} touched file(s) without being touched themselves)`
345
+ : "") +
346
+ ` affect ${affected.length} other node(s). ${risk.data.tests.length} test(s) cover part of ` +
347
+ `that; ${untested.length} affected node(s) have no covering test in the graph.`,
348
+ };
349
+ }
350
+ export const prAnalysisTool = {
351
+ name: "pr_analysis",
352
+ class: "read",
353
+ tier: "evidence",
354
+ // 2.0.0, not 1.0.1: the three node lists became id lists into a single
355
+ // `nodes` map. Nothing was added or removed from the answer, but a caller
356
+ // that read `affected[0].name` reads `nodes[affected[0].id].name` now, and
357
+ // a version that did not say so would be a silent break.
358
+ version: "2.0.0",
359
+ title: "What this change affects, and what is not covered",
360
+ description: "Diffs a branch against its merge base, computes blast radius, and splits it into tested " +
361
+ "and untested reach. The uncovered list is the point — a passing suite says nothing about it.",
362
+ inputSchema: SCHEMA,
363
+ run,
364
+ };
365
+ //# sourceMappingURL=pr-analysis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pr-analysis.js","sourceRoot":"","sources":["../../src/tools/pr-analysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EACL,eAAe,EACf,UAAU,EACV,OAAO,EACP,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,cAAc,GAGf,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,MAAM,EACN,SAAS,EACT,YAAY,EACZ,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,GAIf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAE,MAAM,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E,UAAU;IAChB,uEAAuE;IACvE,0EAA0E;IAC1E,2EAA2E;IAC3E,yDAAyD;IACzD,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,mDAAmD;IAC1D,WAAW,EACT,0FAA0F;QAC1F,8FAA8F;IAChG,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
@@ -0,0 +1,168 @@
1
+ /**
2
+ * `pre_push` — one call where a developer about to push would otherwise make four.
3
+ *
4
+ * The UAT's own verdict was that in agentic use the gap is composition, not
5
+ * correctness: `scope`, `pr_analysis`, `contracts` and `validate` each answer
6
+ * well, and nothing puts them together at the moment someone actually wants
7
+ * them together. This is that composition, under the tightest budget the
8
+ * scoping tiers define.
9
+ *
10
+ * ## What "under the pre-push tier" actually means, per constituent
11
+ *
12
+ * The plan this comes from said the tier was "honoured by `scope`, `pr_analysis`
13
+ * and `contracts`". Two of those are true and the third is not, and the
14
+ * difference decides what this tool can pass down:
15
+ *
16
+ * - `scope` and `pr_analysis` take a `trigger`, and apply
17
+ * `NODE_BUDGETS["pre-push"]` (200 nodes) to their traversal. Passed straight
18
+ * through.
19
+ * - `contracts` has **no `trigger` and no node budget**, because it does not
20
+ * traverse — it compares every endpoint in the graph. Its expensive half is
21
+ * the shape comparison, and its own schema already names the answer:
22
+ * `pathsOnly` is "the honest choice for a pre-push run". So that is what the
23
+ * tier means here, and this tool sets it.
24
+ * - `validate` has no traversal budget either; it is bounded by `maxFindings`,
25
+ * which this tool tightens rather than leaving at its default 25.
26
+ *
27
+ * ## Why findings are grouped by source and not merged into one ranking
28
+ *
29
+ * A single global ranking would need to say that a contract mismatch outranks
30
+ * an unset environment variable, or the reverse. Descry has no model that
31
+ * supports either claim, and inventing one would be a judgement presented as a
32
+ * measurement — the same reason `contracts` ranks by evidence strength rather
33
+ * than severity. So each source contributes its own top few, and the envelope
34
+ * says plainly that the sources are not ranked against each other.
35
+ *
36
+ * That is still one call, one envelope, and a short read. It just does not
37
+ * pretend to a comparison nobody has made.
38
+ *
39
+ * ## Blocking versus informational
40
+ *
41
+ * `blockingTotal` counts `contracts` and `validate` findings only, and — since
42
+ * UAT round 3, Suggestion 6 — only the ones each tool's own `claim` field
43
+ * marks a `defect`. `scope` and `pr_analysis` answer "what does this change
44
+ * touch" — real, useful, and not a defect, so counting them would make every
45
+ * change with a blast radius look like a failure. A `lead` (`ROUTE_NOT_CALLED`,
46
+ * `SET_BUT_UNDOCUMENTED`) is worth a look but is not provable from the graph
47
+ * alone, so it is counted separately in `leadTotal` rather than folded into
48
+ * the number a git hook branches on. `descry check` exits non-zero on
49
+ * `blockingTotal`, which is why the line has to be drawn here rather than
50
+ * left to the caller.
51
+ *
52
+ * ## Scoped to what you are pushing
53
+ *
54
+ * UAT round 3, B11. `contracts` did not receive the `files` this tool was
55
+ * called with, so `blockingTotal` counted the repository's entire standing
56
+ * backlog rather than the change being pushed — 15 pre-existing
57
+ * `ROUTE_NOT_CALLED` findings for unrelated paths, on a push touching three
58
+ * unrelated files. `contracts` now takes the same `files` this tool was
59
+ * given (it already accepted `paths`, a different axis — a URL template
60
+ * substring, not a source file), so both blocking sources answer about the
61
+ * files in front of the developer. `validate` already took `files`; only the
62
+ * threading into `contracts` was missing.
63
+ *
64
+ * ## Class and tier
65
+ *
66
+ * `read` — it runs four read tools and writes nothing. `evidence` — it reports
67
+ * what those four found and draws no conclusion of its own.
68
+ */
69
+ import { type ToolDefinition } from "./kit.ts";
70
+ export type PrePushSource = "scope" | "pr_analysis" | "contracts" | "validate";
71
+ export interface PrePushSection {
72
+ readonly source: PrePushSource;
73
+ /** `ok`, `empty`, `refused`, `failed` — this constituent's own state, never flattened away. */
74
+ readonly state: string;
75
+ /** How many items this source found in total, before this tool took its top few. */
76
+ readonly total: number;
77
+ /** The top few, in the order that source reported them. */
78
+ readonly shown: readonly unknown[];
79
+ /**
80
+ * True when this source is **the kind that claims something is wrong** —
81
+ * a property of the source, not of what it found this time.
82
+ *
83
+ * **It was called `blocking`, sitting beside a `blockingTotal` that means the
84
+ * other thing.** `contracts` can be `blocking: true` with `total: 0`, and
85
+ * `validate` `blocking: true` with ten leads and a `blockingTotal` of zero,
86
+ * so the obvious consumer arithmetic — sum `total` over the blocking
87
+ * sections — is wrong in both directions. This tool's own test suite made
88
+ * exactly that mistake and passed, because the fixture happened to produce no
89
+ * leads.
90
+ *
91
+ * The name now says which question it answers. The other question — *did this
92
+ * section find anything that blocks?* — is `defects > 0`, and there is no
93
+ * longer a field whose name suggests it answers both.
94
+ */
95
+ readonly claimsFaults: boolean;
96
+ /** Of `total`, how many assert a fault. Zero for a source that claims none. */
97
+ readonly defects: number;
98
+ /** Of `total`, how many are worth a look without asserting one. */
99
+ readonly leads: number;
100
+ /** This source's own headline, kept verbatim. */
101
+ readonly headline: string;
102
+ }
103
+ /**
104
+ * Which change set the coverage section actually described.
105
+ *
106
+ * `pr_analysis` derives its own file list from `base...head` and takes none,
107
+ * deliberately. Three constituents therefore describe the files passed and one
108
+ * describes the branch's committed diff, and in a real run those were 2 files
109
+ * and 25. Both answers were right; presented side by side under one headline
110
+ * they read as one answer about one change.
111
+ *
112
+ * The disclosure explaining that has always been in the reply. It sat below a
113
+ * headline and a section total that both read as though they described the
114
+ * files passed, which is the wrong order for the most common working moment:
115
+ * before a commit, when the git-derived half can see none of the work.
116
+ */
117
+ export interface PrePushCoverage {
118
+ /**
119
+ * What `pr_analysis` answered about: a ref-to-ref diff (`base...head`) when
120
+ * `base` was given, or the working tree (with its scope) when `workingTree`
121
+ * was given instead. Whichever it is, it is not necessarily the file list
122
+ * this tool itself was called with — see `filesOutsideDiff`.
123
+ */
124
+ readonly describes: string;
125
+ /** Files passed that the base diff does not contain — whatever the reason. */
126
+ readonly filesOutsideDiff: readonly string[];
127
+ /**
128
+ * Of those, the ones git reports as modified, staged or untracked.
129
+ *
130
+ * Separated because "not in the diff" has two causes and only one is about
131
+ * timing: uncommitted work the developer can commit, versus a file they named
132
+ * that this branch never touched.
133
+ */
134
+ readonly uncommitted: readonly string[];
135
+ }
136
+ export interface PrePushData {
137
+ readonly files: readonly string[];
138
+ readonly sections: readonly PrePushSection[];
139
+ /**
140
+ * Contract and environment findings that **assert a fault**.
141
+ *
142
+ * The doctrine that keeps `scope` and `pr_analysis` out of this number is the
143
+ * same one that keeps a lead out of it: a change with a large blast radius is
144
+ * not a broken change, and neither is a route no code in this graph calls.
145
+ * Both constituents already knew which of their findings claimed a fault —
146
+ * `validate` in a field, `contracts` in the prose of the finding itself — and
147
+ * this composite flattened them into one count a git hook exits on.
148
+ *
149
+ * "15 blocking findings" and "1 defect, 15 leads" are different sentences and
150
+ * only one is worth acting on. A check that cries wolf is worse than no
151
+ * check, because it also discredits the real findings underneath it.
152
+ */
153
+ readonly blockingTotal: number;
154
+ /** Findings worth a look that assert nothing. Reported, never exited on. */
155
+ readonly leadTotal: number;
156
+ /** The node budget actually applied to the traversing constituents. */
157
+ readonly nodeBudget: number;
158
+ /**
159
+ * What the coverage section was about, when one ran.
160
+ *
161
+ * `null` when neither `base` nor `workingTree` was given: `pr_analysis` is
162
+ * skipped entirely then, and a caveat about a section that did not run is a
163
+ * caveat about nothing.
164
+ */
165
+ readonly coverage: PrePushCoverage | null;
166
+ }
167
+ export declare const prePushTool: ToolDefinition;
168
+ //# sourceMappingURL=pre-push.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pre-push.d.ts","sourceRoot":"","sources":["../../src/tools/pre-push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAKH,OAAO,EASL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAyDlB,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC;AAE/E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,+FAA+F;IAC/F,QAAQ,CAAC,KAAK,EAAE,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