@descryy/mcp 0.11.4 → 0.11.5

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 (441) hide show
  1. package/package.json +7 -7
  2. package/dist/action-handshake.d.ts +0 -38
  3. package/dist/action-handshake.d.ts.map +0 -1
  4. package/dist/action-handshake.js +0 -127
  5. package/dist/action-handshake.js.map +0 -1
  6. package/dist/bin/descry-mcp.d.ts +0 -7
  7. package/dist/bin/descry-mcp.d.ts.map +0 -1
  8. package/dist/bin/descry-mcp.js +0 -72
  9. package/dist/bin/descry-mcp.js.map +0 -1
  10. package/dist/browser/auth.d.ts +0 -84
  11. package/dist/browser/auth.d.ts.map +0 -1
  12. package/dist/browser/auth.js +0 -233
  13. package/dist/browser/auth.js.map +0 -1
  14. package/dist/browser/capability-probe.d.ts +0 -109
  15. package/dist/browser/capability-probe.d.ts.map +0 -1
  16. package/dist/browser/capability-probe.js +0 -201
  17. package/dist/browser/capability-probe.js.map +0 -1
  18. package/dist/browser/driver.d.ts +0 -591
  19. package/dist/browser/driver.d.ts.map +0 -1
  20. package/dist/browser/driver.js +0 -116
  21. package/dist/browser/driver.js.map +0 -1
  22. package/dist/browser/evidence.d.ts +0 -28
  23. package/dist/browser/evidence.d.ts.map +0 -1
  24. package/dist/browser/evidence.js +0 -82
  25. package/dist/browser/evidence.js.map +0 -1
  26. package/dist/browser/fake-driver.d.ts +0 -116
  27. package/dist/browser/fake-driver.d.ts.map +0 -1
  28. package/dist/browser/fake-driver.js +0 -416
  29. package/dist/browser/fake-driver.js.map +0 -1
  30. package/dist/browser/fault-attribution.d.ts +0 -178
  31. package/dist/browser/fault-attribution.d.ts.map +0 -1
  32. package/dist/browser/fault-attribution.js +0 -266
  33. package/dist/browser/fault-attribution.js.map +0 -1
  34. package/dist/browser/graph-write.d.ts +0 -45
  35. package/dist/browser/graph-write.d.ts.map +0 -1
  36. package/dist/browser/graph-write.js +0 -103
  37. package/dist/browser/graph-write.js.map +0 -1
  38. package/dist/browser/identity-graph-write.d.ts +0 -55
  39. package/dist/browser/identity-graph-write.d.ts.map +0 -1
  40. package/dist/browser/identity-graph-write.js +0 -45
  41. package/dist/browser/identity-graph-write.js.map +0 -1
  42. package/dist/browser/page-probe.d.ts +0 -81
  43. package/dist/browser/page-probe.d.ts.map +0 -1
  44. package/dist/browser/page-probe.js +0 -202
  45. package/dist/browser/page-probe.js.map +0 -1
  46. package/dist/browser/playwright-driver.d.ts +0 -114
  47. package/dist/browser/playwright-driver.d.ts.map +0 -1
  48. package/dist/browser/playwright-driver.js +0 -1518
  49. package/dist/browser/playwright-driver.js.map +0 -1
  50. package/dist/browser/provider.d.ts +0 -26
  51. package/dist/browser/provider.d.ts.map +0 -1
  52. package/dist/browser/provider.js +0 -14
  53. package/dist/browser/provider.js.map +0 -1
  54. package/dist/browser/reach-recording-session.d.ts +0 -44
  55. package/dist/browser/reach-recording-session.d.ts.map +0 -1
  56. package/dist/browser/reach-recording-session.js +0 -151
  57. package/dist/browser/reach-recording-session.js.map +0 -1
  58. package/dist/browser/reachability.d.ts +0 -168
  59. package/dist/browser/reachability.d.ts.map +0 -1
  60. package/dist/browser/reachability.js +0 -294
  61. package/dist/browser/reachability.js.map +0 -1
  62. package/dist/browser/registry.d.ts +0 -126
  63. package/dist/browser/registry.d.ts.map +0 -1
  64. package/dist/browser/registry.js +0 -177
  65. package/dist/browser/registry.js.map +0 -1
  66. package/dist/browser/scenario-provenance.d.ts +0 -23
  67. package/dist/browser/scenario-provenance.d.ts.map +0 -1
  68. package/dist/browser/scenario-provenance.js +0 -73
  69. package/dist/browser/scenario-provenance.js.map +0 -1
  70. package/dist/browser/scenario-resolve.d.ts +0 -28
  71. package/dist/browser/scenario-resolve.d.ts.map +0 -1
  72. package/dist/browser/scenario-resolve.js +0 -96
  73. package/dist/browser/scenario-resolve.js.map +0 -1
  74. package/dist/browser/scenario-runner.d.ts +0 -72
  75. package/dist/browser/scenario-runner.d.ts.map +0 -1
  76. package/dist/browser/scenario-runner.js +0 -353
  77. package/dist/browser/scenario-runner.js.map +0 -1
  78. package/dist/browser/stack-parser.d.ts +0 -19
  79. package/dist/browser/stack-parser.d.ts.map +0 -1
  80. package/dist/browser/stack-parser.js +0 -85
  81. package/dist/browser/stack-parser.js.map +0 -1
  82. package/dist/browser/tool-support.d.ts +0 -71
  83. package/dist/browser/tool-support.d.ts.map +0 -1
  84. package/dist/browser/tool-support.js +0 -216
  85. package/dist/browser/tool-support.js.map +0 -1
  86. package/dist/browser/url-scheme.d.ts +0 -14
  87. package/dist/browser/url-scheme.d.ts.map +0 -1
  88. package/dist/browser/url-scheme.js +0 -38
  89. package/dist/browser/url-scheme.js.map +0 -1
  90. package/dist/browser/wait-target.d.ts +0 -37
  91. package/dist/browser/wait-target.d.ts.map +0 -1
  92. package/dist/browser/wait-target.js +0 -54
  93. package/dist/browser/wait-target.js.map +0 -1
  94. package/dist/cancellation.d.ts +0 -20
  95. package/dist/cancellation.d.ts.map +0 -1
  96. package/dist/cancellation.js +0 -41
  97. package/dist/cancellation.js.map +0 -1
  98. package/dist/capped.d.ts +0 -39
  99. package/dist/capped.d.ts.map +0 -1
  100. package/dist/capped.js +0 -43
  101. package/dist/capped.js.map +0 -1
  102. package/dist/credential-store.d.ts +0 -22
  103. package/dist/credential-store.d.ts.map +0 -1
  104. package/dist/credential-store.js +0 -33
  105. package/dist/credential-store.js.map +0 -1
  106. package/dist/disclosure-ledger.d.ts +0 -14
  107. package/dist/disclosure-ledger.d.ts.map +0 -1
  108. package/dist/disclosure-ledger.js +0 -18
  109. package/dist/disclosure-ledger.js.map +0 -1
  110. package/dist/evidence/observed-route-evidence.d.ts +0 -25
  111. package/dist/evidence/observed-route-evidence.d.ts.map +0 -1
  112. package/dist/evidence/observed-route-evidence.js +0 -76
  113. package/dist/evidence/observed-route-evidence.js.map +0 -1
  114. package/dist/heap.d.ts +0 -61
  115. package/dist/heap.d.ts.map +0 -1
  116. package/dist/heap.js +0 -82
  117. package/dist/heap.js.map +0 -1
  118. package/dist/heartbeat.d.ts +0 -46
  119. package/dist/heartbeat.d.ts.map +0 -1
  120. package/dist/heartbeat.js +0 -66
  121. package/dist/heartbeat.js.map +0 -1
  122. package/dist/index.d.ts +0 -32
  123. package/dist/index.d.ts.map +0 -1
  124. package/dist/index.js +0 -19
  125. package/dist/index.js.map +0 -1
  126. package/dist/module-trust.d.ts +0 -37
  127. package/dist/module-trust.d.ts.map +0 -1
  128. package/dist/module-trust.js +0 -77
  129. package/dist/module-trust.js.map +0 -1
  130. package/dist/path-confinement.d.ts +0 -31
  131. package/dist/path-confinement.d.ts.map +0 -1
  132. package/dist/path-confinement.js +0 -44
  133. package/dist/path-confinement.js.map +0 -1
  134. package/dist/planner/predict-then-propose.d.ts +0 -134
  135. package/dist/planner/predict-then-propose.d.ts.map +0 -1
  136. package/dist/planner/predict-then-propose.js +0 -138
  137. package/dist/planner/predict-then-propose.js.map +0 -1
  138. package/dist/planner/propose-journey.d.ts +0 -75
  139. package/dist/planner/propose-journey.d.ts.map +0 -1
  140. package/dist/planner/propose-journey.js +0 -96
  141. package/dist/planner/propose-journey.js.map +0 -1
  142. package/dist/protocol.d.ts +0 -57
  143. package/dist/protocol.d.ts.map +0 -1
  144. package/dist/protocol.js +0 -90
  145. package/dist/protocol.js.map +0 -1
  146. package/dist/registry.d.ts +0 -103
  147. package/dist/registry.d.ts.map +0 -1
  148. package/dist/registry.js +0 -327
  149. package/dist/registry.js.map +0 -1
  150. package/dist/render.d.ts +0 -623
  151. package/dist/render.d.ts.map +0 -1
  152. package/dist/render.js +0 -968
  153. package/dist/render.js.map +0 -1
  154. package/dist/runtime-registry.d.ts +0 -22
  155. package/dist/runtime-registry.d.ts.map +0 -1
  156. package/dist/runtime-registry.js +0 -142
  157. package/dist/runtime-registry.js.map +0 -1
  158. package/dist/sandbox-defaults.d.ts +0 -41
  159. package/dist/sandbox-defaults.d.ts.map +0 -1
  160. package/dist/sandbox-defaults.js +0 -14
  161. package/dist/sandbox-defaults.js.map +0 -1
  162. package/dist/scenarios/browser-run-plan-projection.d.ts +0 -161
  163. package/dist/scenarios/browser-run-plan-projection.d.ts.map +0 -1
  164. package/dist/scenarios/browser-run-plan-projection.js +0 -264
  165. package/dist/scenarios/browser-run-plan-projection.js.map +0 -1
  166. package/dist/scenarios/credential-ref.d.ts +0 -102
  167. package/dist/scenarios/credential-ref.d.ts.map +0 -1
  168. package/dist/scenarios/credential-ref.js +0 -148
  169. package/dist/scenarios/credential-ref.js.map +0 -1
  170. package/dist/scenarios/index.d.ts +0 -7
  171. package/dist/scenarios/index.d.ts.map +0 -1
  172. package/dist/scenarios/index.js +0 -7
  173. package/dist/scenarios/index.js.map +0 -1
  174. package/dist/scenarios/parse.d.ts +0 -18
  175. package/dist/scenarios/parse.d.ts.map +0 -1
  176. package/dist/scenarios/parse.js +0 -212
  177. package/dist/scenarios/parse.js.map +0 -1
  178. package/dist/scenarios/scenario.d.ts +0 -93
  179. package/dist/scenarios/scenario.d.ts.map +0 -1
  180. package/dist/scenarios/scenario.js +0 -27
  181. package/dist/scenarios/scenario.js.map +0 -1
  182. package/dist/scenarios/secret-ref.d.ts +0 -86
  183. package/dist/scenarios/secret-ref.d.ts.map +0 -1
  184. package/dist/scenarios/secret-ref.js +0 -125
  185. package/dist/scenarios/secret-ref.js.map +0 -1
  186. package/dist/scenarios/storage.d.ts +0 -21
  187. package/dist/scenarios/storage.d.ts.map +0 -1
  188. package/dist/scenarios/storage.js +0 -103
  189. package/dist/scenarios/storage.js.map +0 -1
  190. package/dist/server.d.ts +0 -61
  191. package/dist/server.d.ts.map +0 -1
  192. package/dist/server.js +0 -651
  193. package/dist/server.js.map +0 -1
  194. package/dist/session.d.ts +0 -356
  195. package/dist/session.d.ts.map +0 -1
  196. package/dist/session.js +0 -779
  197. package/dist/session.js.map +0 -1
  198. package/dist/tools/alias-kit.d.ts +0 -29
  199. package/dist/tools/alias-kit.d.ts.map +0 -1
  200. package/dist/tools/alias-kit.js +0 -21
  201. package/dist/tools/alias-kit.js.map +0 -1
  202. package/dist/tools/aliases.d.ts +0 -42
  203. package/dist/tools/aliases.d.ts.map +0 -1
  204. package/dist/tools/aliases.js +0 -52
  205. package/dist/tools/aliases.js.map +0 -1
  206. package/dist/tools/analyze-workspace.d.ts +0 -52
  207. package/dist/tools/analyze-workspace.d.ts.map +0 -1
  208. package/dist/tools/analyze-workspace.js +0 -207
  209. package/dist/tools/analyze-workspace.js.map +0 -1
  210. package/dist/tools/analyze.d.ts +0 -163
  211. package/dist/tools/analyze.d.ts.map +0 -1
  212. package/dist/tools/analyze.js +0 -724
  213. package/dist/tools/analyze.js.map +0 -1
  214. package/dist/tools/browser-click.d.ts +0 -18
  215. package/dist/tools/browser-click.d.ts.map +0 -1
  216. package/dist/tools/browser-click.js +0 -110
  217. package/dist/tools/browser-click.js.map +0 -1
  218. package/dist/tools/browser-close-session.d.ts +0 -39
  219. package/dist/tools/browser-close-session.d.ts.map +0 -1
  220. package/dist/tools/browser-close-session.js +0 -120
  221. package/dist/tools/browser-close-session.js.map +0 -1
  222. package/dist/tools/browser-fill.d.ts +0 -18
  223. package/dist/tools/browser-fill.d.ts.map +0 -1
  224. package/dist/tools/browser-fill.js +0 -117
  225. package/dist/tools/browser-fill.js.map +0 -1
  226. package/dist/tools/browser-navigate.d.ts +0 -15
  227. package/dist/tools/browser-navigate.d.ts.map +0 -1
  228. package/dist/tools/browser-navigate.js +0 -104
  229. package/dist/tools/browser-navigate.js.map +0 -1
  230. package/dist/tools/browser-read.d.ts +0 -33
  231. package/dist/tools/browser-read.d.ts.map +0 -1
  232. package/dist/tools/browser-read.js +0 -113
  233. package/dist/tools/browser-read.js.map +0 -1
  234. package/dist/tools/browser-run-scenario.d.ts +0 -28
  235. package/dist/tools/browser-run-scenario.d.ts.map +0 -1
  236. package/dist/tools/browser-run-scenario.js +0 -225
  237. package/dist/tools/browser-run-scenario.js.map +0 -1
  238. package/dist/tools/browser-save-scenario.d.ts +0 -19
  239. package/dist/tools/browser-save-scenario.d.ts.map +0 -1
  240. package/dist/tools/browser-save-scenario.js +0 -447
  241. package/dist/tools/browser-save-scenario.js.map +0 -1
  242. package/dist/tools/browser-select.d.ts +0 -20
  243. package/dist/tools/browser-select.d.ts.map +0 -1
  244. package/dist/tools/browser-select.js +0 -120
  245. package/dist/tools/browser-select.js.map +0 -1
  246. package/dist/tools/browser-snapshot.d.ts +0 -46
  247. package/dist/tools/browser-snapshot.d.ts.map +0 -1
  248. package/dist/tools/browser-snapshot.js +0 -127
  249. package/dist/tools/browser-snapshot.js.map +0 -1
  250. package/dist/tools/browser-start-session.d.ts +0 -24
  251. package/dist/tools/browser-start-session.d.ts.map +0 -1
  252. package/dist/tools/browser-start-session.js +0 -640
  253. package/dist/tools/browser-start-session.js.map +0 -1
  254. package/dist/tools/browser-submit.d.ts +0 -18
  255. package/dist/tools/browser-submit.d.ts.map +0 -1
  256. package/dist/tools/browser-submit.js +0 -106
  257. package/dist/tools/browser-submit.js.map +0 -1
  258. package/dist/tools/browser-type.d.ts +0 -18
  259. package/dist/tools/browser-type.d.ts.map +0 -1
  260. package/dist/tools/browser-type.js +0 -115
  261. package/dist/tools/browser-type.js.map +0 -1
  262. package/dist/tools/browser-wait-for.d.ts +0 -45
  263. package/dist/tools/browser-wait-for.d.ts.map +0 -1
  264. package/dist/tools/browser-wait-for.js +0 -150
  265. package/dist/tools/browser-wait-for.js.map +0 -1
  266. package/dist/tools/browser.d.ts +0 -69
  267. package/dist/tools/browser.d.ts.map +0 -1
  268. package/dist/tools/browser.js +0 -386
  269. package/dist/tools/browser.js.map +0 -1
  270. package/dist/tools/chain.d.ts +0 -41
  271. package/dist/tools/chain.d.ts.map +0 -1
  272. package/dist/tools/chain.js +0 -105
  273. package/dist/tools/chain.js.map +0 -1
  274. package/dist/tools/change-scope.d.ts +0 -25
  275. package/dist/tools/change-scope.d.ts.map +0 -1
  276. package/dist/tools/change-scope.js +0 -110
  277. package/dist/tools/change-scope.js.map +0 -1
  278. package/dist/tools/code-context.d.ts +0 -83
  279. package/dist/tools/code-context.d.ts.map +0 -1
  280. package/dist/tools/code-context.js +0 -444
  281. package/dist/tools/code-context.js.map +0 -1
  282. package/dist/tools/contracts.d.ts +0 -74
  283. package/dist/tools/contracts.d.ts.map +0 -1
  284. package/dist/tools/contracts.js +0 -196
  285. package/dist/tools/contracts.js.map +0 -1
  286. package/dist/tools/cross-pr.d.ts +0 -178
  287. package/dist/tools/cross-pr.d.ts.map +0 -1
  288. package/dist/tools/cross-pr.js +0 -370
  289. package/dist/tools/cross-pr.js.map +0 -1
  290. package/dist/tools/disclosure.d.ts +0 -75
  291. package/dist/tools/disclosure.d.ts.map +0 -1
  292. package/dist/tools/disclosure.js +0 -307
  293. package/dist/tools/disclosure.js.map +0 -1
  294. package/dist/tools/draw-conclusion.d.ts +0 -55
  295. package/dist/tools/draw-conclusion.d.ts.map +0 -1
  296. package/dist/tools/draw-conclusion.js +0 -259
  297. package/dist/tools/draw-conclusion.js.map +0 -1
  298. package/dist/tools/git-context.d.ts +0 -39
  299. package/dist/tools/git-context.d.ts.map +0 -1
  300. package/dist/tools/git-context.js +0 -385
  301. package/dist/tools/git-context.js.map +0 -1
  302. package/dist/tools/git-diff.d.ts +0 -45
  303. package/dist/tools/git-diff.d.ts.map +0 -1
  304. package/dist/tools/git-diff.js +0 -338
  305. package/dist/tools/git-diff.js.map +0 -1
  306. package/dist/tools/git-history.d.ts +0 -16
  307. package/dist/tools/git-history.d.ts.map +0 -1
  308. package/dist/tools/git-history.js +0 -106
  309. package/dist/tools/git-history.js.map +0 -1
  310. package/dist/tools/history.d.ts +0 -34
  311. package/dist/tools/history.d.ts.map +0 -1
  312. package/dist/tools/history.js +0 -121
  313. package/dist/tools/history.js.map +0 -1
  314. package/dist/tools/impact.d.ts +0 -46
  315. package/dist/tools/impact.d.ts.map +0 -1
  316. package/dist/tools/impact.js +0 -225
  317. package/dist/tools/impact.js.map +0 -1
  318. package/dist/tools/index.d.ts +0 -59
  319. package/dist/tools/index.d.ts.map +0 -1
  320. package/dist/tools/index.js +0 -70
  321. package/dist/tools/index.js.map +0 -1
  322. package/dist/tools/kit.d.ts +0 -165
  323. package/dist/tools/kit.d.ts.map +0 -1
  324. package/dist/tools/kit.js +0 -153
  325. package/dist/tools/kit.js.map +0 -1
  326. package/dist/tools/link-workspace.d.ts +0 -24
  327. package/dist/tools/link-workspace.d.ts.map +0 -1
  328. package/dist/tools/link-workspace.js +0 -131
  329. package/dist/tools/link-workspace.js.map +0 -1
  330. package/dist/tools/lookup.d.ts +0 -19
  331. package/dist/tools/lookup.d.ts.map +0 -1
  332. package/dist/tools/lookup.js +0 -63
  333. package/dist/tools/lookup.js.map +0 -1
  334. package/dist/tools/mark-incident.d.ts +0 -28
  335. package/dist/tools/mark-incident.d.ts.map +0 -1
  336. package/dist/tools/mark-incident.js +0 -188
  337. package/dist/tools/mark-incident.js.map +0 -1
  338. package/dist/tools/merged-browser.d.ts +0 -11
  339. package/dist/tools/merged-browser.d.ts.map +0 -1
  340. package/dist/tools/merged-browser.js +0 -20
  341. package/dist/tools/merged-browser.js.map +0 -1
  342. package/dist/tools/merged-context.d.ts +0 -11
  343. package/dist/tools/merged-context.d.ts.map +0 -1
  344. package/dist/tools/merged-context.js +0 -21
  345. package/dist/tools/merged-context.js.map +0 -1
  346. package/dist/tools/merged-observe.d.ts +0 -13
  347. package/dist/tools/merged-observe.d.ts.map +0 -1
  348. package/dist/tools/merged-observe.js +0 -21
  349. package/dist/tools/merged-observe.js.map +0 -1
  350. package/dist/tools/merged-workspace.d.ts +0 -14
  351. package/dist/tools/merged-workspace.d.ts.map +0 -1
  352. package/dist/tools/merged-workspace.js +0 -21
  353. package/dist/tools/merged-workspace.js.map +0 -1
  354. package/dist/tools/observe-runtime.d.ts +0 -262
  355. package/dist/tools/observe-runtime.d.ts.map +0 -1
  356. package/dist/tools/observe-runtime.js +0 -1901
  357. package/dist/tools/observe-runtime.js.map +0 -1
  358. package/dist/tools/observe-tests.d.ts +0 -57
  359. package/dist/tools/observe-tests.d.ts.map +0 -1
  360. package/dist/tools/observe-tests.js +0 -368
  361. package/dist/tools/observe-tests.js.map +0 -1
  362. package/dist/tools/observe.d.ts +0 -28
  363. package/dist/tools/observe.d.ts.map +0 -1
  364. package/dist/tools/observe.js +0 -330
  365. package/dist/tools/observe.js.map +0 -1
  366. package/dist/tools/pr-analysis.d.ts +0 -189
  367. package/dist/tools/pr-analysis.d.ts.map +0 -1
  368. package/dist/tools/pr-analysis.js +0 -374
  369. package/dist/tools/pr-analysis.js.map +0 -1
  370. package/dist/tools/pre-push.d.ts +0 -168
  371. package/dist/tools/pre-push.d.ts.map +0 -1
  372. package/dist/tools/pre-push.js +0 -416
  373. package/dist/tools/pre-push.js.map +0 -1
  374. package/dist/tools/predict-reach.d.ts +0 -57
  375. package/dist/tools/predict-reach.d.ts.map +0 -1
  376. package/dist/tools/predict-reach.js +0 -159
  377. package/dist/tools/predict-reach.js.map +0 -1
  378. package/dist/tools/propagation.d.ts +0 -37
  379. package/dist/tools/propagation.d.ts.map +0 -1
  380. package/dist/tools/propagation.js +0 -162
  381. package/dist/tools/propagation.js.map +0 -1
  382. package/dist/tools/propose-journey.d.ts +0 -16
  383. package/dist/tools/propose-journey.d.ts.map +0 -1
  384. package/dist/tools/propose-journey.js +0 -121
  385. package/dist/tools/propose-journey.js.map +0 -1
  386. package/dist/tools/prove-reach.d.ts +0 -74
  387. package/dist/tools/prove-reach.d.ts.map +0 -1
  388. package/dist/tools/prove-reach.js +0 -286
  389. package/dist/tools/prove-reach.js.map +0 -1
  390. package/dist/tools/questions.d.ts +0 -30
  391. package/dist/tools/questions.d.ts.map +0 -1
  392. package/dist/tools/questions.js +0 -232
  393. package/dist/tools/questions.js.map +0 -1
  394. package/dist/tools/refusal-fetch.d.ts +0 -35
  395. package/dist/tools/refusal-fetch.d.ts.map +0 -1
  396. package/dist/tools/refusal-fetch.js +0 -123
  397. package/dist/tools/refusal-fetch.js.map +0 -1
  398. package/dist/tools/runtime-incident.d.ts +0 -33
  399. package/dist/tools/runtime-incident.d.ts.map +0 -1
  400. package/dist/tools/runtime-incident.js +0 -67
  401. package/dist/tools/runtime-incident.js.map +0 -1
  402. package/dist/tools/runtime-journey-drive.d.ts +0 -102
  403. package/dist/tools/runtime-journey-drive.d.ts.map +0 -1
  404. package/dist/tools/runtime-journey-drive.js +0 -247
  405. package/dist/tools/runtime-journey-drive.js.map +0 -1
  406. package/dist/tools/scope.d.ts +0 -45
  407. package/dist/tools/scope.d.ts.map +0 -1
  408. package/dist/tools/scope.js +0 -217
  409. package/dist/tools/scope.js.map +0 -1
  410. package/dist/tools/similar-incidents.d.ts +0 -43
  411. package/dist/tools/similar-incidents.d.ts.map +0 -1
  412. package/dist/tools/similar-incidents.js +0 -203
  413. package/dist/tools/similar-incidents.js.map +0 -1
  414. package/dist/tools/validate.d.ts +0 -133
  415. package/dist/tools/validate.d.ts.map +0 -1
  416. package/dist/tools/validate.js +0 -520
  417. package/dist/tools/validate.js.map +0 -1
  418. package/dist/tools/verb.d.ts +0 -46
  419. package/dist/tools/verb.d.ts.map +0 -1
  420. package/dist/tools/verb.js +0 -78
  421. package/dist/tools/verb.js.map +0 -1
  422. package/dist/tools/verification-status.d.ts +0 -38
  423. package/dist/tools/verification-status.d.ts.map +0 -1
  424. package/dist/tools/verification-status.js +0 -203
  425. package/dist/tools/verification-status.js.map +0 -1
  426. package/dist/tools/verify-claim.d.ts +0 -29
  427. package/dist/tools/verify-claim.d.ts.map +0 -1
  428. package/dist/tools/verify-claim.js +0 -220
  429. package/dist/tools/verify-claim.js.map +0 -1
  430. package/dist/tools/workspace.d.ts +0 -28
  431. package/dist/tools/workspace.d.ts.map +0 -1
  432. package/dist/tools/workspace.js +0 -101
  433. package/dist/tools/workspace.js.map +0 -1
  434. package/dist/transport.d.ts +0 -32
  435. package/dist/transport.d.ts.map +0 -1
  436. package/dist/transport.js +0 -85
  437. package/dist/transport.js.map +0 -1
  438. package/dist/workspace-index.d.ts +0 -164
  439. package/dist/workspace-index.d.ts.map +0 -1
  440. package/dist/workspace-index.js +0 -381
  441. package/dist/workspace-index.js.map +0 -1
@@ -1,133 +0,0 @@
1
- /**
2
- * `validate` — §15 static validation: env/config checks.
3
- * Omits a var unless its read fails-on-absence AND declaration surface is complete
4
- * (18/107 wrong findings measured otherwise); refuses rather than `ok` when no reads
5
- * exist. Pass `files` for NEW_READ_UNDECLARED — catches accessor-shape-independent reads.
6
- * Add `changedLines` (from get_git_diff's patch) to verify against an added line rather
7
- * than a file scope, and get `defect` instead of `lead` back for it — see C2, UAT phase 4. */
8
- import type { AttributeFinding, AttributeReport, ConfigGraph, ConfigReadSite, EnvClaim, EnvEvidence, EnvFindingKind, EnvReport, MigrationIntegrityFinding, MigrationIntegrityReport, ObservedRouteFinding, OrmRegistrationFinding, OrmRegistrationReport, RollbackFinding, RollbackReport } from "@descryy/core";
9
- import type { ResolutionLevel } from "@descryy/ir";
10
- import { type ToolDefinition } from "./kit.ts";
11
- /** One env/config finding. `claim` distinguishes `defect` (code contradiction) from
12
- * `lead` (worth a look) — conflating them caused 18/107 wrong findings on two repos. */
13
- export interface EnvFindingReport {
14
- readonly kind: EnvFindingKind;
15
- readonly name: string;
16
- readonly claim: EnvClaim;
17
- readonly detail: string;
18
- /** Every location the finding rests on. Never empty. */
19
- readonly evidence: readonly EnvEvidence[];
20
- readonly resolution: ResolutionLevel;
21
- }
22
- /** A variable and how much of the repo depends on it (§15.3's third check feeding
23
- * the first). Only variables with a computable dependent set appear — unknown ≠ zero. */
24
- export interface ConfigDependencyReport {
25
- readonly name: string;
26
- /** A lower bound, never a total. */
27
- readonly dependents: number | null;
28
- /** True when the traversal's budget stopped it short. */
29
- readonly truncated: boolean;
30
- /** Up to three read sites. */
31
- readonly readAt: readonly ConfigReadSite[];
32
- /** A few dependent files, for a reader who wants to look. */
33
- readonly sample: readonly string[];
34
- }
35
- export interface ValidateData {
36
- readonly findings: readonly EnvFindingReport[];
37
- /** The count before `maxFindings` capped it — P27's disclosed remainder (§4 technique 5). */
38
- readonly findingsTotal: number;
39
- readonly surfaces: EnvReport["surfaces"];
40
- readonly reads: EnvReport["reads"];
41
- /** Null when no read existed at all, so the coverage guard could not be evaluated. */
42
- readonly coverage: EnvReport["coverage"];
43
- /** Declared and read nowhere. A dead-configuration lead, not a finding. */
44
- readonly declaredNeverRead: number;
45
- /** False when no adapter supplied environment reads — otherwise "no missing
46
- * variables" would misstate code that was never read as clean. */
47
- readonly readsAvailable: boolean;
48
- readonly configGraph: {
49
- readonly counts: ConfigGraph["counts"];
50
- /** True when the graph carried at least one resolved import edge. */
51
- readonly importsAvailable: boolean;
52
- /** The ten most-depended-on variables that had a computable dependent set. */
53
- readonly mostDependedOn: readonly ConfigDependencyReport[];
54
- };
55
- readonly rollback: {
56
- readonly findings: readonly RollbackFinding[];
57
- /** The count before `maxFindings` capped it — P27's disclosed remainder (§4 technique 5). */
58
- readonly findingsTotal: number;
59
- readonly examined: RollbackReport["examined"];
60
- /** Operations this check declined to report, by reason. The size of what it did not say. */
61
- readonly withheld: RollbackReport["withheld"];
62
- /** False when no source supplied migration operations. */
63
- readonly ran: boolean;
64
- /** Named in plain words when `ran` is false. */
65
- readonly blockers: readonly string[];
66
- };
67
- /** §"attribute read, type doesn't declare it" — always a defect (graph-provable
68
- * contradiction between two producers), never a lead. */
69
- readonly attributeExistence: {
70
- readonly findings: readonly AttributeFinding[];
71
- readonly findingsTotal: number;
72
- readonly examined: AttributeReport["examined"];
73
- /** False when no READS edge onto a type-like node carried field-existence info at all. */
74
- readonly ran: boolean;
75
- };
76
- /** §"migration outside its directory, or broken revision chain" — both always
77
- * defects, both graph-provable. */
78
- readonly migrationIntegrity: {
79
- readonly findings: readonly MigrationIntegrityFinding[];
80
- readonly findingsTotal: number;
81
- readonly examined: MigrationIntegrityReport["examined"];
82
- readonly migrationsDirectory: string | null;
83
- /** False when no module in the graph carried migration revision attrs. */
84
- readonly ran: boolean;
85
- readonly withheld: MigrationIntegrityReport["withheld"];
86
- };
87
- /** §"ORM model inherits the declarative base but no __init__.py in its package
88
- * reaches its module" — always a lead, never a defect: a model registered by an
89
- * explicit scan rather than by import, or deliberately excluded from migrations,
90
- * triggers this without being a bug. See `orm-registration.ts`'s header. */
91
- readonly ormRegistration: {
92
- readonly findings: readonly OrmRegistrationFinding[];
93
- readonly findingsTotal: number;
94
- readonly examined: OrmRegistrationReport["examined"];
95
- /** False when no MODEL node in the graph carried an outgoing INHERITS edge. */
96
- readonly ran: boolean;
97
- readonly withheld: OrmRegistrationReport["withheld"];
98
- };
99
- /** §"an observed HTTP response against a path no route serves" — UAT phase 5 §5
100
- * (D2). Always a lead: a status code and path alone can never rule out a
101
- * legitimately missing resource. See `@descryy/core`'s `observed-routes.ts`. */
102
- readonly observedRoutes: {
103
- readonly findings: readonly ObservedRouteFinding[];
104
- readonly findingsTotal: number;
105
- readonly examined: number;
106
- /** False when no evidence database exists yet, or it holds no NETWORK_RESPONSE/
107
- * HTTP_ERROR events — never created here: this is a read tool. */
108
- readonly ran: boolean;
109
- };
110
- }
111
- /** The minimal shape every one of `validate`'s finding sources satisfies — enough
112
- * for a composer to count and rank without knowing which producer emitted an item. */
113
- export interface ValidateFinding {
114
- readonly claim: "defect" | "lead";
115
- readonly detail: string;
116
- }
117
- /**
118
- * Flattens every one of `validate`'s finding sources into one array: the
119
- * top-level env array plus the nested reports (`rollback`, `attributeExistence`,
120
- * `migrationIntegrity`, `ormRegistration`, `observedRoutes`).
121
- *
122
- * `validate` publishes findings across several separate sub-objects because
123
- * each check examines a different kind of evidence and discloses its own
124
- * `ran`/`examined`/`withheld` detail alongside its findings. A composer that
125
- * reads only one of them silently drops the rest — the exact failure UAT
126
- * phase 5 §4 found in `pre_push`, which read `data.findings` and nothing
127
- * else. This function is the one place that knows the full list, so a new
128
- * sub-check added here is inherited by every composer automatically instead
129
- * of requiring a second, easily-forgotten edit at each call site.
130
- */
131
- export declare function collectValidateFindings(data: ValidateData): readonly ValidateFinding[];
132
- export declare const validateTool: ToolDefinition;
133
- //# sourceMappingURL=validate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/tools/validate.ts"],"names":[],"mappings":"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"}
@@ -1,520 +0,0 @@
1
- /**
2
- * `validate` — §15 static validation: env/config checks.
3
- * Omits a var unless its read fails-on-absence AND declaration surface is complete
4
- * (18/107 wrong findings measured otherwise); refuses rather than `ok` when no reads
5
- * exist. Pass `files` for NEW_READ_UNDECLARED — catches accessor-shape-independent reads.
6
- * Add `changedLines` (from get_git_diff's patch) to verify against an added line rather
7
- * than a file scope, and get `defect` instead of `lead` back for it — see C2, UAT phase 4. */
8
- import { existsSync } from "node:fs";
9
- import { join } from "node:path";
10
- import { buildConfigGraph, checkAttributeExistence, checkEnvironment, checkMigrationIntegrity, checkObservedRoutes, checkOrmModelRegistration, checkRollbackReadiness, declaredRoutesFrom, scanConfigSurfaces, scanMigrations, } from "@descryy/core";
11
- import { EvidenceStore } from "@descryy/runtime-evidence-store";
12
- import { extractObservedRouteEvidence } from "../evidence/observed-route-evidence.js";
13
- import { optionalInteger, optionalStringArray, ToolInputError, } from "./kit.js";
14
- import { DEFAULT_EVIDENCE_RELATIVE_PATH } from "./observe-runtime.js";
15
- import { capBySize, sizeCapNote } from "../capped.js";
16
- /**
17
- * `fitToBudget` for `ValidateData` — six independently-`maxFindings`-capped
18
- * finding lists, none sharing a payload with another, so shrinking is only
19
- * ever dropping trailing rows from one list at a time. Trimmed in an order
20
- * that spends the budget on the two lists this tool exists to catch last:
21
- * `observedRoutes`, `ormRegistration` and `rollback` are always leads, worth
22
- * a look but never a graph-provable contradiction; `attributeExistence` and
23
- * `migrationIntegrity` are always defects; `findings` (env) mixes both and is
24
- * kept longest because it is the check's own headline count.
25
- */
26
- function fitValidate(rest, budgetBytes) {
27
- const scaffoldBytes = Buffer.byteLength(JSON.stringify({
28
- ...rest,
29
- findings: [],
30
- rollback: { ...rest.rollback, findings: [] },
31
- attributeExistence: { ...rest.attributeExistence, findings: [] },
32
- migrationIntegrity: { ...rest.migrationIntegrity, findings: [] },
33
- ormRegistration: { ...rest.ormRegistration, findings: [] },
34
- observedRoutes: { ...rest.observedRoutes, findings: [] },
35
- }), "utf8");
36
- let budget = Math.max(budgetBytes - scaffoldBytes, 0);
37
- const spend = (items) => {
38
- const fit = capBySize(items, budget, 0);
39
- budget = Math.max(budget - Buffer.byteLength(JSON.stringify(fit.shown), "utf8"), 0);
40
- return fit;
41
- };
42
- const observedRoutesFit = spend(rest.observedRoutes.findings);
43
- const ormRegistrationFit = spend(rest.ormRegistration.findings);
44
- const rollbackFit = spend(rest.rollback.findings);
45
- const migrationIntegrityFit = spend(rest.migrationIntegrity.findings);
46
- const attributeExistenceFit = spend(rest.attributeExistence.findings);
47
- const findingsFit = spend(rest.findings);
48
- const notes = [];
49
- const noteIfDropped = (noun, fit, before) => {
50
- if (fit.droppedForSize > 0)
51
- notes.push(sizeCapNote(noun, fit.shown.length, before, fit.droppedForSize));
52
- };
53
- noteIfDropped("env/config finding", findingsFit, rest.findings.length);
54
- noteIfDropped("rollback finding", rollbackFit, rest.rollback.findings.length);
55
- noteIfDropped("attribute-existence finding", attributeExistenceFit, rest.attributeExistence.findings.length);
56
- noteIfDropped("migration-integrity finding", migrationIntegrityFit, rest.migrationIntegrity.findings.length);
57
- noteIfDropped("ORM-registration finding", ormRegistrationFit, rest.ormRegistration.findings.length);
58
- noteIfDropped("observed-route finding", observedRoutesFit, rest.observedRoutes.findings.length);
59
- const droppedNow = findingsFit.droppedForSize +
60
- rollbackFit.droppedForSize +
61
- attributeExistenceFit.droppedForSize +
62
- migrationIntegrityFit.droppedForSize +
63
- ormRegistrationFit.droppedForSize +
64
- observedRoutesFit.droppedForSize;
65
- const shownNow = findingsFit.shown.length +
66
- rollbackFit.shown.length +
67
- attributeExistenceFit.shown.length +
68
- migrationIntegrityFit.shown.length +
69
- ormRegistrationFit.shown.length +
70
- observedRoutesFit.shown.length;
71
- const totalBefore = rest.findings.length +
72
- rest.rollback.findings.length +
73
- rest.attributeExistence.findings.length +
74
- rest.migrationIntegrity.findings.length +
75
- rest.ormRegistration.findings.length +
76
- rest.observedRoutes.findings.length;
77
- return {
78
- data: {
79
- ...rest,
80
- findings: findingsFit.shown,
81
- rollback: { ...rest.rollback, findings: rollbackFit.shown },
82
- attributeExistence: { ...rest.attributeExistence, findings: attributeExistenceFit.shown },
83
- migrationIntegrity: { ...rest.migrationIntegrity, findings: migrationIntegrityFit.shown },
84
- ormRegistration: { ...rest.ormRegistration, findings: ormRegistrationFit.shown },
85
- observedRoutes: { ...rest.observedRoutes, findings: observedRoutesFit.shown },
86
- },
87
- notes,
88
- ...(droppedNow === 0 ? {} : { truncatedDetail: { shown: shownNow, total: totalBefore, more: null } }),
89
- };
90
- }
91
- /**
92
- * Flattens every one of `validate`'s finding sources into one array: the
93
- * top-level env array plus the nested reports (`rollback`, `attributeExistence`,
94
- * `migrationIntegrity`, `ormRegistration`, `observedRoutes`).
95
- *
96
- * `validate` publishes findings across several separate sub-objects because
97
- * each check examines a different kind of evidence and discloses its own
98
- * `ran`/`examined`/`withheld` detail alongside its findings. A composer that
99
- * reads only one of them silently drops the rest — the exact failure UAT
100
- * phase 5 §4 found in `pre_push`, which read `data.findings` and nothing
101
- * else. This function is the one place that knows the full list, so a new
102
- * sub-check added here is inherited by every composer automatically instead
103
- * of requiring a second, easily-forgotten edit at each call site.
104
- */
105
- export function collectValidateFindings(data) {
106
- return [
107
- ...data.findings,
108
- ...data.rollback.findings,
109
- ...data.attributeExistence.findings,
110
- ...data.migrationIntegrity.findings,
111
- ...data.ormRegistration.findings,
112
- ...data.observedRoutes.findings,
113
- ];
114
- }
115
- const SCHEMA = {
116
- type: "object",
117
- properties: {
118
- files: {
119
- type: "array",
120
- items: { type: "string" },
121
- description: "Restrict the code side to these repo-relative files — the scoped-subgraph run. " +
122
- "Configuration files are always read in full, because a declaration is repository-wide. " +
123
- "Also enables a second, stronger env-var rule (NEW_READ_UNDECLARED): a variable read in " +
124
- "one of these files and declared nowhere is reported regardless of whether the accessor " +
125
- "fails on absence, catching a case the default rule structurally cannot.",
126
- },
127
- coverageFloor: {
128
- type: "number",
129
- minimum: 0,
130
- maximum: 1,
131
- description: "Fraction of required variables the repository must declare somewhere before any " +
132
- "missing-variable finding is emitted. Default 0.6. Lowering it trades precision for " +
133
- "recall on a repository whose configuration lives outside the code.",
134
- },
135
- maxFindings: {
136
- type: "integer",
137
- minimum: 1,
138
- description: "Cap on findings returned. Default 25; overflow is disclosed, not dropped.",
139
- },
140
- changedLines: {
141
- type: "array",
142
- items: {
143
- type: "object",
144
- properties: {
145
- file: {
146
- type: "string",
147
- description: "A repo-relative path, matching one entry of \"files\".",
148
- },
149
- ranges: {
150
- type: "array",
151
- items: {
152
- type: "object",
153
- properties: {
154
- start: { type: "integer", minimum: 1 },
155
- end: { type: "integer", minimum: 1 },
156
- },
157
- required: ["start", "end"],
158
- additionalProperties: false,
159
- },
160
- description: "1-based, inclusive line ranges this file's diff actually added.",
161
- },
162
- },
163
- required: ["file", "ranges"],
164
- additionalProperties: false,
165
- },
166
- description: "Which lines the diff actually added, per file — e.g. from get_git_diff's patch text run " +
167
- "through addedLineRanges. Sharpens NEW_READ_UNDECLARED (which \"files\" alone already " +
168
- "enables) from \"in a file this call scoped to\" to \"on a line this diff actually added\": " +
169
- "without it, a pre-existing undeclared read in a file you touched for an unrelated reason is " +
170
- "reported as a lead rather than a defect, because this call cannot tell it apart from a read " +
171
- "the change just introduced. A file named in \"files\" but absent here is treated the same as " +
172
- "when this argument is omitted entirely, for that file only.",
173
- },
174
- },
175
- additionalProperties: false,
176
- };
177
- /** `changedLines`' wire shape ({ file, ranges }[], JSON-schema-friendly) into the
178
- * `Map` `checkEnvironment` takes. Malformed input is refused, not silently dropped —
179
- * a caller that thinks it narrowed the check and did not is worse off than one who
180
- * never tried. */
181
- function parseChangedLines(args) {
182
- const raw = args["changedLines"];
183
- if (raw === undefined)
184
- return undefined;
185
- if (!Array.isArray(raw)) {
186
- throw new ToolInputError('"changedLines" must be an array of { file, ranges }.');
187
- }
188
- const map = new Map();
189
- for (const entry of raw) {
190
- if (typeof entry !== "object" || entry === null) {
191
- throw new ToolInputError('Each "changedLines" entry must be an object with "file" and "ranges".');
192
- }
193
- const row = entry;
194
- const file = row["file"];
195
- const ranges = row["ranges"];
196
- if (typeof file !== "string" || file === "" || !Array.isArray(ranges)) {
197
- throw new ToolInputError('Each "changedLines" entry needs a non-empty "file" and a "ranges" array.');
198
- }
199
- const parsedRanges = [];
200
- for (const range of ranges) {
201
- const r = typeof range === "object" && range !== null ? range : null;
202
- const start = r?.["start"];
203
- const end = r?.["end"];
204
- if (typeof start !== "number" || typeof end !== "number") {
205
- throw new ToolInputError(`"changedLines" entry for "${file}" has a range that is not { start, end }.`);
206
- }
207
- parsedRanges.push({ start, end });
208
- }
209
- map.set(file, parsedRanges);
210
- }
211
- return map;
212
- }
213
- /**
214
- * UAT phase 5 §5 (D2): reads `observe_runtime`'s own evidence database, if one
215
- * already exists, and checks its `NETWORK_RESPONSE`/`HTTP_ERROR` evidence
216
- * against the graph's declared routes.
217
- *
218
- * Never creates the database — this is a read tool, and `observe_runtime` (an
219
- * action tool) is the only thing with a legitimate reason to write one.
220
- */
221
- function readObservedRoutes(repoPath, provider) {
222
- const evidencePath = join(repoPath, DEFAULT_EVIDENCE_RELATIVE_PATH);
223
- if (!existsSync(evidencePath)) {
224
- return {
225
- findings: [],
226
- examined: 0,
227
- ran: false,
228
- note: `No evidence database exists yet at ${evidencePath} — observe_runtime has not run against ` +
229
- "this repository. observedRoutes did not run.",
230
- };
231
- }
232
- const store = new EvidenceStore({ path: evidencePath });
233
- try {
234
- const events = [
235
- ...store.query({ executionId: null, eventType: "NETWORK_REQUEST" }),
236
- ...store.query({ executionId: null, eventType: "NETWORK_RESPONSE" }),
237
- ...store.query({ executionId: null, eventType: "HTTP_ERROR" }),
238
- ];
239
- const observed = extractObservedRouteEvidence(events);
240
- if (observed.length === 0) {
241
- return {
242
- findings: [],
243
- examined: 0,
244
- ran: false,
245
- note: "The evidence database exists but holds no NETWORK_RESPONSE/HTTP_ERROR evidence with a " +
246
- "usable method, URL and status. observedRoutes did not run.",
247
- };
248
- }
249
- const result = checkObservedRoutes(observed, declaredRoutesFrom(provider));
250
- return { findings: result.findings, examined: result.examined, ran: true, note: null };
251
- }
252
- finally {
253
- store.close();
254
- }
255
- }
256
- async function run(args, ctx) {
257
- const files = optionalStringArray(args, "files");
258
- const maxFindings = optionalInteger(args, "maxFindings", 1);
259
- const rawFloor = args["coverageFloor"];
260
- const coverageFloor = typeof rawFloor === "number" && rawFloor >= 0 && rawFloor <= 1 ? rawFloor : undefined;
261
- const changedLines = parseChangedLines(args);
262
- ctx.progress("Reading configuration files");
263
- const scan = scanConfigSurfaces(ctx.session.repoPath);
264
- ctx.progress("Cross-checking against environment reads in the graph");
265
- const provider = ctx.session.provider();
266
- const checked = checkEnvironment(provider, scan, {
267
- ...(files === undefined ? {} : { files }),
268
- ...(maxFindings === undefined ? {} : { maxFindings }),
269
- ...(coverageFloor === undefined ? {} : { coverageFloor }),
270
- ...(changedLines === undefined ? {} : { changedLines }),
271
- });
272
- ctx.progress("Tracing what depends on each configuration variable");
273
- const configGraph = buildConfigGraph(provider, scan);
274
- ctx.progress("Reading migrations for destructive operations");
275
- const rollback = checkRollbackReadiness(provider, scanMigrations(ctx.session.repoPath), {
276
- ...(files === undefined ? {} : { files }),
277
- ...(maxFindings === undefined ? {} : { maxFindings }),
278
- });
279
- ctx.progress("Checking attribute reads against declared types");
280
- const attributeExistence = checkAttributeExistence(provider, {
281
- ...(files === undefined ? {} : { files }),
282
- ...(maxFindings === undefined ? {} : { maxFindings }),
283
- });
284
- ctx.progress("Checking migration location and revision chain");
285
- const migrationIntegrity = checkMigrationIntegrity(provider, {
286
- ...(files === undefined ? {} : { files }),
287
- ...(maxFindings === undefined ? {} : { maxFindings }),
288
- });
289
- ctx.progress("Checking ORM models are reached by their package's __init__");
290
- const ormRegistration = checkOrmModelRegistration(provider, {
291
- ...(files === undefined ? {} : { files }),
292
- ...(maxFindings === undefined ? {} : { maxFindings }),
293
- });
294
- ctx.progress("Checking observed HTTP responses against declared routes");
295
- const observedRoutes = readObservedRoutes(ctx.session.repoPath, provider);
296
- const report = checked.data;
297
- const defects = report.findings.filter((f) => f.claim === "defect").length +
298
- attributeExistence.data.findings.length +
299
- migrationIntegrity.data.findings.length;
300
- const leads = report.findings.length - report.findings.filter((f) => f.claim === "defect").length;
301
- // Nothing compared at all: no config files, reads, migrations, attribute reads,
302
- // or migration revisions — any one alone is a real answer, none of them is not.
303
- const nothingToCheck = report.surfaces.length === 0 &&
304
- !report.readsAvailable &&
305
- !rollback.data.ran &&
306
- !attributeExistence.data.ran &&
307
- !migrationIntegrity.data.ran &&
308
- !ormRegistration.data.ran &&
309
- !observedRoutes.ran;
310
- // A `files` scope matching zero FILE nodes means those files were never read into
311
- // the graph (bad path, or unparsed) — not "read and clean". Same collapse as
312
- // `contracts(paths)`, one level down.
313
- const filesMatchedNothing = files !== undefined && report.reads.filesWithReads + report.reads.filesWithoutReads === 0;
314
- // Leads and rollback findings are worth a look; defects are what this tool exists
315
- // to catch. Never blur the two into one count (see EnvFindingReport.claim).
316
- const otherFindings = leads + rollback.data.findings.length + ormRegistration.data.findings.length + observedRoutes.findings.length;
317
- // A "Clean" verdict from a files scope matching nothing would misreport "checked,
318
- // fine" when nothing was read. Only pure-Clean is downgraded — real findings from
319
- // unscoped checks still surface.
320
- const falseClean = filesMatchedNothing && defects === 0 && otherFindings === 0;
321
- const verdict = falseClean
322
- ? "not checked"
323
- : defects > 0
324
- ? `${defects} defect(s) found`
325
- : otherFindings > 0
326
- ? `No defects; ${otherFindings} lead(s)/rollback finding(s) to review`
327
- : "Clean";
328
- const scopeNotes = filesMatchedNothing
329
- ? [
330
- `0 of the ${(files ?? []).length} named file(s) matched a FILE node this graph's read side ` +
331
- "considered — either the path is wrong, or the file was never read into the graph. The " +
332
- "environment-read half of this report has nothing to say about them; it is not evidence " +
333
- "they are clean.",
334
- ]
335
- : [];
336
- // render.ts requires truncatedDetail whenever truncated=true. `truncated` folds 5
337
- // independently-truncatable sources; shown/total cover the finding lists a
338
- // maxFindings cap acts on — configGraph's own truncation stays prose-only.
339
- // `observedRoutes` has no cap of its own (bounded by evidence volume, not by
340
- // this tool), so it contributes the same count to both.
341
- const shown = report.findings.length +
342
- rollback.data.findings.length +
343
- attributeExistence.data.findings.length +
344
- migrationIntegrity.data.findings.length +
345
- ormRegistration.data.findings.length +
346
- observedRoutes.findings.length;
347
- const total = report.findingsTotal +
348
- rollback.data.findingsTotal +
349
- attributeExistence.data.findingsTotal +
350
- migrationIntegrity.data.findingsTotal +
351
- ormRegistration.data.findingsTotal +
352
- observedRoutes.findings.length;
353
- const truncated = checked.truncated ||
354
- rollback.truncated ||
355
- attributeExistence.truncated ||
356
- migrationIntegrity.truncated ||
357
- ormRegistration.truncated ||
358
- configGraph.truncated;
359
- const truncatedDetail = truncated
360
- ? { shown, total: Math.max(total, shown), more: null }
361
- : undefined;
362
- const validateData = {
363
- findings: report.findings.map((f) => ({
364
- kind: f.kind,
365
- name: f.name,
366
- claim: f.claim,
367
- detail: f.detail,
368
- evidence: f.evidence,
369
- resolution: f.resolution,
370
- })),
371
- findingsTotal: report.findingsTotal,
372
- surfaces: report.surfaces,
373
- reads: report.reads,
374
- coverage: report.coverage,
375
- declaredNeverRead: report.declaredNeverRead,
376
- readsAvailable: report.readsAvailable,
377
- // §15.3's third check feeds the first. Only variables with a computable
378
- // dependent set are carried — unknown count is not a zero, not worth a row.
379
- configGraph: {
380
- counts: configGraph.data.counts,
381
- importsAvailable: configGraph.data.importsAvailable,
382
- mostDependedOn: configGraph.data.variables
383
- .filter((v) => v.dependents !== null && v.dependents > 0)
384
- .slice(0, 10)
385
- .map((v) => ({
386
- name: v.name,
387
- dependents: v.dependents,
388
- truncated: v.dependentsTruncated,
389
- readAt: v.readAt.slice(0, 3),
390
- sample: v.dependentSample,
391
- })),
392
- },
393
- rollback: {
394
- findings: rollback.data.findings,
395
- findingsTotal: rollback.data.findingsTotal,
396
- examined: rollback.data.examined,
397
- withheld: rollback.data.withheld,
398
- ran: rollback.data.ran,
399
- blockers: rollback.data.blockers,
400
- },
401
- attributeExistence: {
402
- findings: attributeExistence.data.findings,
403
- findingsTotal: attributeExistence.data.findingsTotal,
404
- examined: attributeExistence.data.examined,
405
- ran: attributeExistence.data.ran,
406
- },
407
- migrationIntegrity: {
408
- findings: migrationIntegrity.data.findings,
409
- findingsTotal: migrationIntegrity.data.findingsTotal,
410
- examined: migrationIntegrity.data.examined,
411
- migrationsDirectory: migrationIntegrity.data.migrationsDirectory,
412
- ran: migrationIntegrity.data.ran,
413
- withheld: migrationIntegrity.data.withheld,
414
- },
415
- ormRegistration: {
416
- findings: ormRegistration.data.findings,
417
- findingsTotal: ormRegistration.data.findingsTotal,
418
- examined: ormRegistration.data.examined,
419
- ran: ormRegistration.data.ran,
420
- withheld: ormRegistration.data.withheld,
421
- },
422
- observedRoutes: {
423
- findings: observedRoutes.findings,
424
- findingsTotal: observedRoutes.findings.length,
425
- examined: observedRoutes.examined,
426
- ran: observedRoutes.ran,
427
- },
428
- };
429
- return {
430
- result: {
431
- ...checked,
432
- data: validateData,
433
- // Every check's disclosures reach the reader — dropping one half silently
434
- // is the degradation rule 7 exists to prevent.
435
- notes: [
436
- ...scopeNotes,
437
- ...(observedRoutes.note === null ? [] : [observedRoutes.note]),
438
- ...checked.notes,
439
- ...rollback.notes,
440
- ...attributeExistence.notes,
441
- ...migrationIntegrity.notes,
442
- ...ormRegistration.notes,
443
- ...configGraph.notes,
444
- ],
445
- truncated,
446
- stamp: {
447
- ...checked.stamp,
448
- resolutionFloor: Math.min(checked.stamp.resolutionFloor, rollback.stamp.resolutionFloor, attributeExistence.stamp.resolutionFloor, migrationIntegrity.stamp.resolutionFloor, ormRegistration.stamp.resolutionFloor, configGraph.stamp.resolutionFloor),
449
- },
450
- },
451
- // §11A.5's canonical name-level fact (exists or not) — the one claim R2 supports
452
- // at class A. Value shape is never asserted here.
453
- nameLevel: true,
454
- fitToBudget: (budgetBytes) => fitValidate(validateData, budgetBytes),
455
- ...(truncatedDetail === undefined ? {} : { truncatedDetail }),
456
- ...(nothingToCheck
457
- ? { state: "refused" }
458
- : falseClean
459
- ? { state: "empty" }
460
- : {}),
461
- headline: nothingToCheck
462
- ? "No configuration files, environment reads, migrations or attribute reads were found, so " +
463
- "there was nothing to check."
464
- : falseClean
465
- ? `0 of the ${(files ?? []).length} named file(s) matched anything on the read side. Not ` +
466
- "checked, not clean."
467
- : `${verdict}. ${report.surfaces.length} configuration file(s) declare ` +
468
- `${countDeclared(report.surfaces)} variable(s); ` +
469
- `${report.reads.required} variable(s) are read through an accessor that fails when unset; ` +
470
- `${rollback.data.examined.operations} destructive migration operation(s) examined; ` +
471
- `${attributeExistence.data.examined.readEdgesExamined} attribute read(s) checked against ` +
472
- `a declared type; ${migrationIntegrity.data.examined.modulesWithRevision} migration(s) ` +
473
- "checked for location and revision-chain integrity; " +
474
- `${ormRegistration.data.examined.candidates} ORM model(s) inheriting a declarative base ` +
475
- "checked for package-import reachability; " +
476
- `${observedRoutes.examined} observed HTTP response(s) checked against declared routes.`,
477
- };
478
- }
479
- function countDeclared(surfaces) {
480
- return surfaces.reduce((total, s) => total + s.declared, 0);
481
- }
482
- export const validateTool = {
483
- name: "validate",
484
- class: "read",
485
- tier: "conclusion",
486
- // 1.1.0 (C2, UAT phase 4): without "changedLines", NEW_READ_UNDECLARED for a
487
- // pre-existing read in a "files"-scoped file is now a `lead`, worded without
488
- // an authorship claim, where it used to be a `defect` calling it "a new read
489
- // this change introduces" — a claim `files` alone never supported. A caller
490
- // that passes "changedLines" gets the stronger `defect` back, now genuinely
491
- // verified against an added line rather than assumed from file scope.
492
- version: "1.1.0",
493
- title: "Environment and configuration checks",
494
- description: "Cross-check the environment variables the code requires against the ones this repository " +
495
- "declares. Reports a variable only when the code reads it with no fallback and no " +
496
- "configuration file declares it, and only when the repository's declaration surface is " +
497
- "complete enough for that absence to mean something — a variable supplied by a secrets " +
498
- "manager or a platform is disclosed with a count, never reported as missing. Pass \"files\" " +
499
- "(the diff you are about to push) to also catch a variable your change reads that no " +
500
- "declaration surface declares, regardless of whether the accessor fails on absence — the " +
501
- "usual shape on a codebase where almost no read is required; without \"changedLines\" this is " +
502
- "reported as a lead, because a file-scoped read cannot yet be told apart from one the diff never " +
503
- "touched. Pass \"changedLines\" (from get_git_diff's patch text) to sharpen it to a defect, " +
504
- "verified against a line the diff actually added. Also reports variables set in " +
505
- "one configuration file and documented in no example file, stated as a lead rather than a " +
506
- "defect. Two further checks, both always defects because both are provable from the graph " +
507
- "alone: an attribute read on a value whose declared type does not name it (from a READS " +
508
- "edge's attrs.unresolvedFields), and a migration whose location or declared parent revision " +
509
- "disagrees with the rest of the project's migrations (from attrs.migrationRevision, " +
510
- "migrationDownRevision and migrationDir). Both are silent wherever the producer supplied no " +
511
- "signal — absence of the attrs key is never read as a clean result. A fifth check reports a " +
512
- "class inheriting an ORM declarative base (a MODEL node with an INHERITS edge) whose own " +
513
- "module no __init__.py in its package reaches, directly or transitively — the shape behind a " +
514
- "model silently missing from Base.metadata and having its table dropped by the next " +
515
- "autogenerate. Always a lead, never a defect: an explicit scan/glob registration or a " +
516
- "deliberately excluded model triggers it without being a bug.",
517
- inputSchema: SCHEMA,
518
- run,
519
- };
520
- //# sourceMappingURL=validate.js.map