@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,38 @@
1
+ /** `verification_status`, §4 technique 6: coverage is a separate axis and call, paid once, only
2
+ * when asked. Wraps `computeVerificationStatus` (the static half). Never names a language (rule
3
+ * 1) — an earlier extension-guessing design tripped the boundary lint, so it now asks each
4
+ * loaded adapter's `ownsPath` instead. Resolves a ref by node id first, then file (the file's own
5
+ * informative `FILE` node when one carries real resolution, else the weakest-resolution member
6
+ * among whatever real (non-stub) evidence exists for that file — a `git-history`-produced FILE
7
+ * node at resolution 0 is a per-touched-file identity marker, not analysis, and must never win by
8
+ * merely being present; see `representativeForFile`) — neither way found means `notExercised`. */
9
+ import type { ResolutionLevel } from "@descryy/ir";
10
+ import { type ToolDefinition } from "./kit.ts";
11
+ export interface VerificationStatusExercisedItem {
12
+ readonly ref: string;
13
+ readonly resolution: ResolutionLevel;
14
+ }
15
+ export interface VerificationStatusData {
16
+ readonly checked: readonly string[];
17
+ readonly exercised: readonly VerificationStatusExercisedItem[];
18
+ readonly notExercised: readonly {
19
+ readonly scope: string;
20
+ readonly reason: string;
21
+ }[];
22
+ /** The runtime half: refs a real test run bore on and how those tests finished. Empty means
23
+ * either "nothing covers this" or "no suite run yet" — the notes disambiguate. */
24
+ readonly verifiedByTests: readonly VerificationStatusTestedItem[];
25
+ }
26
+ export interface VerificationStatusTestedItem {
27
+ readonly ref: string;
28
+ /** `false` when reached via a static `TESTS` edge, not observed directly — the run witnessed the
29
+ * test execute, not that it touched this ref. Carried per item, not just in a disclosure. */
30
+ readonly direct: boolean;
31
+ readonly tests: readonly {
32
+ readonly qualifiedName: string;
33
+ readonly outcome: string;
34
+ readonly runId: string;
35
+ }[];
36
+ }
37
+ export declare const verificationStatusTool: ToolDefinition;
38
+ //# sourceMappingURL=verification-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-status.d.ts","sourceRoot":"","sources":["../../src/tools/verification-status.ts"],"names":[],"mappings":"AAAA;;;;;;;mGAOmG;AAUnG,OAAO,KAAK,EAA4B,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAqBlB,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;CACtC;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,SAAS,+BAA+B,EAAE,CAAC;IAC/D,QAAQ,CAAC,YAAY,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtF;uFACmF;IACnF,QAAQ,CAAC,eAAe,EAAE,SAAS,4BAA4B,EAAE,CAAC;CACnE;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;kGAC8F;IAC9F,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS;QACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KACxB,EAAE,CAAC;CACL;AAyLD,eAAO,MAAM,sBAAsB,EAAE,cAkBpC,CAAC"}
@@ -0,0 +1,203 @@
1
+ /** `verification_status`, §4 technique 6: coverage is a separate axis and call, paid once, only
2
+ * when asked. Wraps `computeVerificationStatus` (the static half). Never names a language (rule
3
+ * 1) — an earlier extension-guessing design tripped the boundary lint, so it now asks each
4
+ * loaded adapter's `ownsPath` instead. Resolves a ref by node id first, then file (the file's own
5
+ * informative `FILE` node when one carries real resolution, else the weakest-resolution member
6
+ * among whatever real (non-stub) evidence exists for that file — a `git-history`-produced FILE
7
+ * node at resolution 0 is a per-touched-file identity marker, not analysis, and must never win by
8
+ * merely being present; see `representativeForFile`) — neither way found means `notExercised`. */
9
+ import { getNode, findNodes, computeVerificationStatus, observedTestCoverage, resolutionOfExercised, } from "@descryy/core";
10
+ import { answer, optionalStringArray, ToolInputError, } from "./kit.js";
11
+ import { loadSources } from "../registry.js";
12
+ const SCHEMA = {
13
+ type: "object",
14
+ properties: {
15
+ refs: {
16
+ type: "array",
17
+ items: { type: "string" },
18
+ minItems: 1,
19
+ description: "Node ids and/or repository-relative file paths to check coverage for — typically ids " +
20
+ "already returned by an earlier call (impact, scope, contracts) that you now want to know " +
21
+ "whether the graph actually reached.",
22
+ },
23
+ },
24
+ required: ["refs"],
25
+ additionalProperties: false,
26
+ };
27
+ /** `git-history` (`packages/core/src/sources/git/source.ts`) emits a `FILE` node at resolution 0,
28
+ * `language: null`, for *every* file it has ever seen touched — a co-change identity marker, not
29
+ * analysis, and it is emitted regardless of what any language adapter separately produced for that
30
+ * same file. `adapter-typescript` (and other language adapters) emit no `FILE`-type node at all,
31
+ * only `FUNCTION`/`CLASS`/etc. So once git-history is configured (the default), that R0 stub is
32
+ * routinely the *only* `FILE`-typed node for a file that a real adapter analysed at R3 — and this
33
+ * function must not let "is a FILE node" stand in for "carries real information about the file". */
34
+ function isInformativeFileNode(n) {
35
+ return n.type === "FILE" && n.resolution > 0;
36
+ }
37
+ /** True for exactly the nodes a resolution-0 `FILE` stub (see `isInformativeFileNode`) covers —
38
+ * used to exclude that stub from the "weakest link" pool below so it can never win by inclusion. */
39
+ function isResolutionZeroFileStub(n) {
40
+ return n.type === "FILE" && n.resolution === 0;
41
+ }
42
+ /** The file's own `FILE` node when it carries real per-file resolution (an adapter or future
43
+ * producer that actually analysed the file as a whole, not a git-history co-change stub) — among
44
+ * ties, the weakest, matching the fallback's convention below. Otherwise, the weakest-resolution
45
+ * node among whatever *real* (non-stub) evidence exists for the file: the same "report the weakest
46
+ * link" convention `resolutionFloor` uses elsewhere in this package, since a file is only as
47
+ * verified as its least-resolved member — but a resolution-0 `FILE` stub must never be allowed to
48
+ * supply that minimum merely by being present alongside real, higher-resolution nodes. Only when a
49
+ * file's *only* evidence is such a stub (nothing else touched it) does this fall back to reporting
50
+ * the stub itself — genuinely honest in that case, since there is nothing else to report. */
51
+ function representativeForFile(nodes) {
52
+ const informativeFileNodes = nodes.filter(isInformativeFileNode);
53
+ if (informativeFileNodes.length > 0) {
54
+ return informativeFileNodes.reduce((weakest, n) => (n.resolution < weakest.resolution ? n : weakest));
55
+ }
56
+ const realNodes = nodes.filter((n) => !isResolutionZeroFileStub(n));
57
+ const pool = realNodes.length > 0 ? realNodes : nodes;
58
+ return pool.reduce((weakest, n) => (n.resolution < weakest.resolution ? n : weakest));
59
+ }
60
+ function resolveRef(driver, ref) {
61
+ const byId = getNode(driver, ref);
62
+ if (byId !== undefined)
63
+ return { ref, language: byId.language, node: byId };
64
+ const inFile = findNodes(driver, { file: ref });
65
+ if (inFile.length > 0) {
66
+ const node = representativeForFile(inFile);
67
+ return { ref, language: node.language, node };
68
+ }
69
+ return { ref, language: null, node: null };
70
+ }
71
+ /** Real capabilities for whichever loaded adapter owns each unresolved ref, via `ownsPath` —
72
+ * never a language name compared here (see module header). */
73
+ async function capabilitiesForUnresolvedRefs(sources, unresolvedRefs, repoPath) {
74
+ const capabilitiesByRef = new Map();
75
+ const failedNotes = [];
76
+ if (unresolvedRefs.length === 0 || sources.length === 0)
77
+ return { capabilitiesByRef, failedNotes };
78
+ const { loaded, failed } = await loadSources(sources, repoPath);
79
+ try {
80
+ for (const ref of unresolvedRefs) {
81
+ const owner = loaded.find((entry) => entry.adapter?.ownsPath?.(ref) === true);
82
+ if (owner?.adapter !== undefined && owner?.adapter !== null) {
83
+ capabilitiesByRef.set(ref, owner.adapter.capabilities());
84
+ }
85
+ }
86
+ }
87
+ finally {
88
+ await Promise.all(loaded.map((entry) => entry.adapter?.dispose()));
89
+ }
90
+ for (const failure of failed) {
91
+ failedNotes.push(`A configured source (${failure.spec.module}) did not import (${failure.reason}), so it could ` +
92
+ "not be asked whether it owns any of this call's unresolved refs.");
93
+ }
94
+ return { capabilitiesByRef, failedNotes };
95
+ }
96
+ async function run(args, ctx) {
97
+ const refs = optionalStringArray(args, "refs") ?? [];
98
+ if (refs.length === 0) {
99
+ throw new ToolInputError('"refs" must name at least one node id or file path — with none, there is nothing to report ' +
100
+ "coverage for, and an empty answer would look like a check that ran");
101
+ }
102
+ const driver = ctx.session.store().driver;
103
+ const base = ctx.session.provider().baseStamp();
104
+ ctx.progress(`Checking coverage for ${refs.length} ref(s)`);
105
+ const resolved = refs.map((ref) => resolveRef(driver, ref));
106
+ const unresolvedRefs = resolved.filter((r) => r.node === null).map((r) => r.ref);
107
+ const { capabilitiesByRef, failedNotes } = await capabilitiesForUnresolvedRefs(ctx.session.config.sources, unresolvedRefs, ctx.session.repoPath);
108
+ const scope = resolved.map((r) => ({
109
+ ref: r.ref,
110
+ language: r.language,
111
+ node: r.node,
112
+ capabilities: r.node === null ? capabilitiesByRef.get(r.ref) : undefined,
113
+ }));
114
+ const status = computeVerificationStatus(scope);
115
+ const exercised = status.exercised.map((entry) => resolutionOfExercised(entry));
116
+ // The runtime half is composed here, not inside computeVerificationStatus (static-only by
117
+ // design) — same posture as observe_runtime. Only resolved refs can be looked up.
118
+ const lookupIds = resolved.filter((r) => r.node !== null).map((r) => r.node.id);
119
+ const coverage = observedTestCoverage(driver, lookupIds);
120
+ const verifiedByTests = resolved.flatMap((r) => {
121
+ if (r.node === null)
122
+ return [];
123
+ const found = coverage.get(r.node.id);
124
+ if (found === undefined)
125
+ return [];
126
+ return [
127
+ {
128
+ ref: r.ref,
129
+ // Every test reaching this ref crossed the same kind of link, so the
130
+ // ref is "direct" only when the caller asked about the test case itself.
131
+ direct: found.tests.every((t) => t.direct),
132
+ tests: found.tests.map((t) => ({
133
+ qualifiedName: t.qualifiedName,
134
+ outcome: t.outcome,
135
+ runId: t.runId,
136
+ })),
137
+ },
138
+ ];
139
+ });
140
+ return answer({
141
+ headline: (exercised.length === refs.length
142
+ ? `All ${refs.length} ref(s) were reached by the graph.`
143
+ : `${exercised.length} of ${refs.length} ref(s) were reached by the graph; ` +
144
+ `${status.notExercised.length} were not — see notExercised for why.`) +
145
+ (verifiedByTests.length > 0
146
+ ? ` ${verifiedByTests.length} of them ${verifiedByTests.length === 1 ? "has" : "have"} an observed test run behind ${verifiedByTests.length === 1 ? "it" : "them"}.`
147
+ : ""),
148
+ data: { checked: refs, exercised, notExercised: status.notExercised, verifiedByTests },
149
+ resolutionFloor: exercised.length === 0 ? 0 : Math.min(...exercised.map((e) => e.resolution)),
150
+ commitSha: base.commitSha,
151
+ graphBuiltAt: base.graphBuiltAt,
152
+ irSchemaVersion: base.irSchemaVersion,
153
+ commitSpread: base.commitSpread,
154
+ repoCount: base.repoCount,
155
+ // A presence/coverage claim ("was this ref reached, and at what resolution")
156
+ // is about identity, not shape — the same class impact/history/similar_incidents
157
+ // already use.
158
+ nameLevel: true,
159
+ notes: [
160
+ ...(status.notExercised.length === 0
161
+ ? []
162
+ : [
163
+ "This tool never names a language for an absent ref — it only asks each configured, " +
164
+ "loaded adapter whether it owns that path. See each notExercised reason for exactly " +
165
+ "what was determined.",
166
+ ]),
167
+ // Two different facts wear the same empty list, and reading one as the
168
+ // other is the whole failure this axis exists to prevent.
169
+ ...(verifiedByTests.length === 0
170
+ ? [
171
+ "No observed test run bears on any of these refs. That is not the same as \"nothing " +
172
+ "tests this\": it is also what you see when no suite has been run through observe_tests " +
173
+ "yet, and this tool cannot tell those apart from the ledger alone.",
174
+ ]
175
+ : [
176
+ "verifiedByTests reports that a test which claims to cover a ref actually ran, and how it " +
177
+ "finished. Where direct is false the claim crosses a static TESTS edge: the run witnessed " +
178
+ "the test executing, not the test touching that ref. An outcome of failed or skipped is " +
179
+ "reported rather than filtered — being covered by a failing test is not being verified.",
180
+ ]),
181
+ ...failedNotes,
182
+ ],
183
+ });
184
+ }
185
+ export const verificationStatusTool = {
186
+ name: "verification_status",
187
+ class: "read",
188
+ tier: "evidence",
189
+ version: "1.0.0",
190
+ title: "Was this actually checked, and at what resolution?",
191
+ description: "Given a list of node ids and/or file paths, report which were actually reached by the graph " +
192
+ "and at what resolution, and which were not — with why, where determinable. Coverage is a " +
193
+ "separate axis from any finding's confidence (§19/§20): use this after another call to learn " +
194
+ "what that call's answer does and does not actually cover, rather than trusting silence as " +
195
+ "coverage. When a session's configured adapters can say whether they own an unreached file, " +
196
+ "real declared capabilities are attached to explain the gap more precisely — see the tool's own " +
197
+ "notes when some refs are not exercised. When a test suite has been run through observe_tests, " +
198
+ "verifiedByTests additionally reports which of these refs a real run bore on and how those tests " +
199
+ "finished — the difference between what the graph could reach and what was actually executed.",
200
+ inputSchema: SCHEMA,
201
+ run,
202
+ };
203
+ //# sourceMappingURL=verification-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-status.js","sourceRoot":"","sources":["../../src/tools/verification-status.ts"],"names":[],"mappings":"AAAA;;;;;;;mGAOmG;AAEnG,OAAO,EACL,OAAO,EACP,SAAS,EACT,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,MAAM,EACN,mBAAmB,EACnB,cAAc,GAGf,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,WAAW,EAAmB,MAAM,gBAAgB,CAAC;AAE9D,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,QAAQ,EAAE,CAAC;YACX,WAAW,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mB;IACpD,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,oDAAoD;IAC3D,WAAW,EACT,8FAA8F;QAC9F,2FAA2F;QAC3F,8FAA8F;QAC9F,4FAA4F;QAC5F,6FAA6F;QAC7F,iGAAiG;QACjG,gGAAgG;QAChG,kGAAkG;QAClG,8FAA8F;IAChG,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
@@ -0,0 +1,29 @@
1
+ /** `verify_claim`, MK-12: offers G1/G2 (`ai-governance-spec.md` §2/§3) as a voluntary lookup — the
2
+ * full pipeline doesn't run here (MK-11). `path` checks a dot-path resolves in a recorded call's
3
+ * result (G1); `target` is a plain substring search (G2-shaped, disclosed as weaker — it can't
4
+ * see whether the string was accepted or rejected). Never returns `confirmed` (MK-11): it
5
+ * enforces nothing, just converts "we cannot check" into "we offered and it declined." */
6
+ import { type ToolDefinition } from "./kit.ts";
7
+ /**
8
+ * Three outcomes, not two (F1/F4, UAT Phase 5): "grounded" and "not grounded" are both
9
+ * verdicts about a claim that was actually checked. A claim with neither `path` nor
10
+ * `target` was never checked at all — reporting it as `notGrounded` would say "this is
11
+ * false" about something nobody looked at, the same `empty`-vs-`refused` confusion the
12
+ * envelope's own five-state contract exists to prevent, one layer further in.
13
+ */
14
+ export type ClaimVerdict = "grounded" | "notGrounded" | "unverifiable";
15
+ export interface VerifyClaimResult {
16
+ readonly statement: string;
17
+ readonly callId: string;
18
+ readonly verdict: ClaimVerdict;
19
+ readonly reason: string;
20
+ }
21
+ export interface VerifyClaimData {
22
+ readonly checked: number;
23
+ readonly grounded: number;
24
+ readonly notGrounded: number;
25
+ readonly unverifiable: number;
26
+ readonly results: readonly VerifyClaimResult[];
27
+ }
28
+ export declare const verifyClaimTool: ToolDefinition;
29
+ //# sourceMappingURL=verify-claim.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-claim.d.ts","sourceRoot":"","sources":["../../src/tools/verify-claim.ts"],"names":[],"mappings":"AAAA;;;;2FAI2F;AAE3F,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAuClB;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,aAAa,GAAG,cAAc,CAAC;AAEvE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAChD;AAgLD,eAAO,MAAM,eAAe,EAAE,cAY7B,CAAC"}
@@ -0,0 +1,218 @@
1
+ /** `verify_claim`, MK-12: offers G1/G2 (`ai-governance-spec.md` §2/§3) as a voluntary lookup — the
2
+ * full pipeline doesn't run here (MK-11). `path` checks a dot-path resolves in a recorded call's
3
+ * result (G1); `target` is a plain substring search (G2-shaped, disclosed as weaker — it can't
4
+ * see whether the string was accepted or rejected). Never returns `confirmed` (MK-11): it
5
+ * enforces nothing, just converts "we cannot check" into "we offered and it declined." */
6
+ import { answer, requiredString, ToolInputError, } from "./kit.js";
7
+ const SCHEMA = {
8
+ type: "object",
9
+ properties: {
10
+ claims: {
11
+ type: "array",
12
+ minItems: 1,
13
+ items: {
14
+ type: "object",
15
+ properties: {
16
+ statement: {
17
+ type: "string",
18
+ description: "The claim's text. Checked for citation, not wording.",
19
+ },
20
+ callId: {
21
+ type: "string",
22
+ description: "The \"id\" field from an earlier reply this session.",
23
+ },
24
+ path: {
25
+ type: "string",
26
+ description: "Dot-path into that call's result, e.g. \"data.affected.0.id\".",
27
+ },
28
+ target: {
29
+ type: "string",
30
+ description: "Literal string that must appear in the call's result.",
31
+ },
32
+ },
33
+ required: ["statement", "callId"],
34
+ additionalProperties: false,
35
+ },
36
+ description: "Draft claims to check. Each needs a path, a target, or both.",
37
+ },
38
+ },
39
+ required: ["claims"],
40
+ additionalProperties: false,
41
+ };
42
+ function readClaims(args) {
43
+ const raw = args["claims"];
44
+ if (!Array.isArray(raw) || raw.length === 0) {
45
+ throw new ToolInputError('"claims" must be a non-empty array — with none, there is nothing to verify');
46
+ }
47
+ return raw.map((entry, index) => {
48
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
49
+ throw new ToolInputError(`claims[${index}] must be an object`);
50
+ }
51
+ const claim = entry;
52
+ const statement = requiredString(claim, "statement");
53
+ const callId = requiredString(claim, "callId");
54
+ const path = claim["path"];
55
+ const target = claim["target"];
56
+ if (path !== undefined && typeof path !== "string")
57
+ throw new ToolInputError(`claims[${index}].path must be a string`);
58
+ if (target !== undefined && typeof target !== "string")
59
+ throw new ToolInputError(`claims[${index}].target must be a string`);
60
+ return {
61
+ statement,
62
+ callId,
63
+ ...(path === undefined ? {} : { path }),
64
+ ...(target === undefined ? {} : { target }),
65
+ };
66
+ });
67
+ }
68
+ /** Dot-path resolution, numeric segments indexing into an array. `undefined` means "does not resolve" — never thrown. */
69
+ function resolvePath(root, path) {
70
+ let current = root;
71
+ for (const segment of path.split(".")) {
72
+ if (current === null || current === undefined)
73
+ return { found: false };
74
+ if (Array.isArray(current)) {
75
+ const index = Number(segment);
76
+ if (!Number.isInteger(index) || index < 0 || index >= current.length)
77
+ return { found: false };
78
+ current = current[index];
79
+ continue;
80
+ }
81
+ if (typeof current !== "object")
82
+ return { found: false };
83
+ if (!Object.hasOwn(current, segment))
84
+ return { found: false };
85
+ current = current[segment];
86
+ }
87
+ return { found: true, value: current };
88
+ }
89
+ /** A target string only ever matches a leaf value, never a key name — so a match inside
90
+ * a node id used as an object key does not count as the target having been "returned". */
91
+ function containsTargetAtValuePosition(node, target) {
92
+ if (node === null || node === undefined)
93
+ return false;
94
+ if (typeof node === "string")
95
+ return node.includes(target);
96
+ if (typeof node === "number" || typeof node === "boolean")
97
+ return String(node) === target || String(node).includes(target);
98
+ if (Array.isArray(node))
99
+ return node.some((item) => containsTargetAtValuePosition(item, target));
100
+ if (typeof node === "object")
101
+ return Object.values(node).some((v) => containsTargetAtValuePosition(v, target));
102
+ return false;
103
+ }
104
+ /** Structural comparison for the case where a claim names both a path and a target: the
105
+ * value actually found at that path must equal the target, not merely co-occur with it
106
+ * somewhere in the same serialized result (F1 — this is the join that was missing). Only
107
+ * scalars can match a string target; an object or array resolved at the path never does,
108
+ * because a single string cannot faithfully assert "this whole structure". */
109
+ function valueMatchesTarget(value, target) {
110
+ if (typeof value === "string")
111
+ return value === target;
112
+ if (typeof value === "number" || typeof value === "boolean")
113
+ return String(value) === target;
114
+ return false;
115
+ }
116
+ function checkClaim(call, claim) {
117
+ if (claim.path !== undefined && claim.target !== undefined) {
118
+ const resolved = resolvePath(call.result, claim.path);
119
+ if (!resolved.found) {
120
+ return { ok: false, reason: `"${claim.path}" does not resolve in ${call.tool}'s recorded result` };
121
+ }
122
+ if (!valueMatchesTarget(resolved.value, claim.target)) {
123
+ return {
124
+ ok: false,
125
+ reason: `"${claim.path}" resolves to ${JSON.stringify(resolved.value)} in ${call.tool}'s recorded result, not "${claim.target}"`,
126
+ };
127
+ }
128
+ return { ok: true, reason: `cites ${call.tool}'s recorded result, where "${claim.path}" resolves to "${claim.target}"` };
129
+ }
130
+ if (claim.path !== undefined) {
131
+ const resolved = resolvePath(call.result, claim.path);
132
+ if (!resolved.found) {
133
+ return { ok: false, reason: `"${claim.path}" does not resolve in ${call.tool}'s recorded result` };
134
+ }
135
+ return { ok: true, reason: `cites ${call.tool}'s recorded result, which has "${claim.path}"` };
136
+ }
137
+ // target only: a substring search, weaker than a path check, and the reason says so —
138
+ // this is not a structural claim about which field the value came from (F1, part 2).
139
+ const target = claim.target;
140
+ if (!containsTargetAtValuePosition(call.result, target)) {
141
+ return { ok: false, reason: `"${target}" does not appear anywhere in ${call.tool}'s recorded result — not part of what that call returned` };
142
+ }
143
+ return {
144
+ ok: true,
145
+ reason: `cites ${call.tool}'s recorded result, which contains "${target}" (a substring match only — no specific field was checked)`,
146
+ };
147
+ }
148
+ function headlineFor(checked, grounded, notGrounded, unverifiable) {
149
+ if (grounded === checked)
150
+ return `All ${checked} claim(s) cite this session's own recorded facts.`;
151
+ const parts = [`${grounded} of ${checked} claim(s) are grounded`];
152
+ if (notGrounded > 0)
153
+ parts.push(`${notGrounded} cite something this session never actually returned`);
154
+ if (unverifiable > 0)
155
+ parts.push(`${unverifiable} could not be checked — no path or target was given`);
156
+ return `${parts.join("; ")}.`;
157
+ }
158
+ async function run(args, ctx) {
159
+ const claims = readClaims(args);
160
+ ctx.progress(`Checking ${claims.length} claim(s) against this session's recorded tool calls`);
161
+ const results = claims.map((claim) => {
162
+ if (claim.path === undefined && claim.target === undefined) {
163
+ return {
164
+ statement: claim.statement,
165
+ callId: claim.callId,
166
+ verdict: "unverifiable",
167
+ reason: 'neither "path" nor "target" was given — a callId alone checks nothing, so this claim was never checked either way',
168
+ };
169
+ }
170
+ const call = ctx.session.recordedCall(claim.callId);
171
+ if (call === undefined) {
172
+ return {
173
+ statement: claim.statement,
174
+ callId: claim.callId,
175
+ verdict: "notGrounded",
176
+ reason: `no recorded tool call with id "${claim.callId}" in this session — either it was never made, or it belongs to a different session's run (G1's own negative control)`,
177
+ };
178
+ }
179
+ const outcome = checkClaim(call, claim);
180
+ return { statement: claim.statement, callId: claim.callId, verdict: outcome.ok ? "grounded" : "notGrounded", reason: outcome.reason };
181
+ });
182
+ const grounded = results.filter((r) => r.verdict === "grounded").length;
183
+ const notGrounded = results.filter((r) => r.verdict === "notGrounded").length;
184
+ const unverifiable = results.filter((r) => r.verdict === "unverifiable").length;
185
+ return answer({
186
+ headline: headlineFor(results.length, grounded, notGrounded, unverifiable),
187
+ data: { checked: results.length, grounded, notGrounded, unverifiable, results },
188
+ // Not a graph query — no resolution level, no commit, no schema version
189
+ // applies. `nameLevel: true` because this checks presence (did this
190
+ // exact text appear), the same axis `verification_status` reports on.
191
+ resolutionFloor: 0,
192
+ commitSha: null,
193
+ graphBuiltAt: null,
194
+ irSchemaVersion: 0,
195
+ // No graph consulted, so no commit spread — 0 says "not a graph question," not a hidden spread.
196
+ commitSpread: 0,
197
+ repoCount: 0,
198
+ nameLevel: true,
199
+ notes: [
200
+ "This tool checks citations against calls made earlier in this same session only — it has no " +
201
+ "memory across separate server processes, and it does not run the full governance pipeline " +
202
+ '(MK-11): "grounded" here means "cites a real, recorded fact," never "confirmed."',
203
+ ],
204
+ });
205
+ }
206
+ export const verifyClaimTool = {
207
+ name: "verify_claim",
208
+ class: "read",
209
+ tier: "evidence",
210
+ version: "1.0.0",
211
+ title: "Does this claim actually cite something this session returned?",
212
+ description: "Check draft claims against what this session's earlier calls actually returned, catching an " +
213
+ "invented path or a target string never actually returned. Voluntary — nothing else reads or " +
214
+ "enforces the result.",
215
+ inputSchema: SCHEMA,
216
+ run,
217
+ };
218
+ //# sourceMappingURL=verify-claim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-claim.js","sourceRoot":"","sources":["../../src/tools/verify-claim.ts"],"names":[],"mappings":"AAAA;;;;2FAI2F;AAE3F,OAAO,EACL,MAAM,EACN,cAAc,EACd,cAAc,GAGf,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,SAAS,EAAE;wB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MAAM,CAAC;IACxE,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,aAAa,CAAC,CAAC,MAAM,CAAC;IAC9E,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,cAAc,CAAC,CAAC,MAAM,CAAC;IAEhF,OAAO,MAAM,CAAC;QACZ,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,CAAC;QAC1E,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE;QAC/E,wEAAwE;QACxE,oEAAoE;QACpE,sEAAsE;QACtE,eAAe,EAAE,CAAC;QAClB,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,CAAC;QAClB,gGAAgG;QAChG,YAAY,EAAE,CAAC;QACf,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,IAAI;QACf,KAAK,EAAE;YACL,8FAA8F;gBAC5F,4FAA4F;gBAC5F,kFAAkF;SACrF;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAmB;IAC7C,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,gEAAgE;IACvE,WAAW,EACT,8FAA8F;QAC9F,8FAA8F;QAC9F,sBAAsB;IACxB,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * `workspace` — merges `analyze`, `analyze_workspace` and `link_workspace`
3
+ * behind one `verb` (documents/plans/mcp-surface-consolidation.md §2, group 1).
4
+ * All three are `stateful-read`/`evidence`, so the merge crosses neither
5
+ * boundary.
6
+ *
7
+ * Dispatch only. Each verb's own `run()` body is untouched and stays in its
8
+ * own module (`analyze.ts` / `analyze-workspace.ts` / `link-workspace.ts`) —
9
+ * this file never holds a second copy of that logic, it only routes to it
10
+ * after `selectVerb` has re-established, per verb, the argument strength a
11
+ * flat union schema loses (`verb.ts`'s own header explains why that is
12
+ * mandatory once a schema covers more than one verb).
13
+ */
14
+ import type { ToolDefinition } from "./kit.ts";
15
+ import type { AnalyzeData } from "./analyze.ts";
16
+ import type { AnalyzeWorkspaceData } from "./analyze-workspace.ts";
17
+ import type { LinkWorkspaceData } from "./link-workspace.ts";
18
+ /**
19
+ * What this tool answers with: one verb's shape, never a merged one.
20
+ *
21
+ * The merge cost this its single concrete output type, and `unknown` would have
22
+ * silently retired `output-shapes.test.ts`'s check that a declared shape is tied
23
+ * to the code producing it. A union keeps that tie: a verb added without its
24
+ * shape here stops compiling.
25
+ */
26
+ export type WorkspaceData = AnalyzeData | AnalyzeWorkspaceData | LinkWorkspaceData;
27
+ export declare const workspaceTool: ToolDefinition;
28
+ //# sourceMappingURL=workspace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/tools/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,UAAU,CAAC;AAM5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,oBAAoB,GACpB,iBAAiB,CAAC;AAyEtB,eAAO,MAAM,aAAa,EAAE,cAW3B,CAAC"}