@descryy/mcp 0.11.3 → 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 +20 -20
  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 -570
  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 -1479
  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 -143
  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 -17
  99. package/dist/capped.d.ts.map +0 -1
  100. package/dist/capped.js +0 -15
  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 -319
  149. package/dist/registry.js.map +0 -1
  150. package/dist/render.d.ts +0 -580
  151. package/dist/render.d.ts.map +0 -1
  152. package/dist/render.js +0 -867
  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 -541
  193. package/dist/server.js.map +0 -1
  194. package/dist/session.d.ts +0 -243
  195. package/dist/session.d.ts.map +0 -1
  196. package/dist/session.js +0 -602
  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 -206
  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 -622
  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 -416
  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 -321
  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 -288
  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 -364
  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 -86
  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 -250
  355. package/dist/tools/observe-runtime.d.ts.map +0 -1
  356. package/dist/tools/observe-runtime.js +0 -1753
  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 -299
  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 -103
  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 -186
  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 -179
  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 -442
  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,25 +0,0 @@
1
- /**
2
- * Reduces raw runtime `Evidence` rows to the `{ method, path, status }` triples
3
- * `checkObservedRoutes` (`@descryy/core`) reads — the mcp-package half of UAT
4
- * phase 5 §5 (D2): the language-agnostic check reads only structured fields,
5
- * never a framework's own log line, so this is the one place that reads a
6
- * `NETWORK_RESPONSE`/`HTTP_ERROR` payload's shape at all.
7
- *
8
- * Two sources feed one triple, because `method` is not always on the same
9
- * event as `status`:
10
- *
11
- * - The browser network collector (`@descryy/runtime-browser`) splits a
12
- * request into `NETWORK_REQUEST` (carries `method`) and `NETWORK_RESPONSE`/
13
- * `HTTP_ERROR` (carries `status`), joined by `requestId` or, failing that,
14
- * `url` — the identical join `playwright-driver.ts`'s own `collect()`
15
- * performs for the `browser_*` tools' evidence.
16
- * - A future backend-log promotion (`descry-runtime`'s own per-language
17
- * adapters — not built; see UAT phase 5 §5's fix plan) is free to carry
18
- * `method` on the same event as `status`, since an access-log line already
19
- * has both — read first, before falling back to the join, so that shape
20
- * costs nothing extra to support once it exists.
21
- */
22
- import type { Evidence } from "@descryy/runtime-contracts";
23
- import type { ObservedRouteEvidence } from "@descryy/core";
24
- export declare function extractObservedRouteEvidence(items: readonly Evidence[]): readonly ObservedRouteEvidence[];
25
- //# sourceMappingURL=observed-route-evidence.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"observed-route-evidence.d.ts","sourceRoot":"","sources":["../../src/evidence/observed-route-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAc3D,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,SAAS,qBAAqB,EAAE,CAqCzG"}
@@ -1,76 +0,0 @@
1
- /**
2
- * Reduces raw runtime `Evidence` rows to the `{ method, path, status }` triples
3
- * `checkObservedRoutes` (`@descryy/core`) reads — the mcp-package half of UAT
4
- * phase 5 §5 (D2): the language-agnostic check reads only structured fields,
5
- * never a framework's own log line, so this is the one place that reads a
6
- * `NETWORK_RESPONSE`/`HTTP_ERROR` payload's shape at all.
7
- *
8
- * Two sources feed one triple, because `method` is not always on the same
9
- * event as `status`:
10
- *
11
- * - The browser network collector (`@descryy/runtime-browser`) splits a
12
- * request into `NETWORK_REQUEST` (carries `method`) and `NETWORK_RESPONSE`/
13
- * `HTTP_ERROR` (carries `status`), joined by `requestId` or, failing that,
14
- * `url` — the identical join `playwright-driver.ts`'s own `collect()`
15
- * performs for the `browser_*` tools' evidence.
16
- * - A future backend-log promotion (`descry-runtime`'s own per-language
17
- * adapters — not built; see UAT phase 5 §5's fix plan) is free to carry
18
- * `method` on the same event as `status`, since an access-log line already
19
- * has both — read first, before falling back to the join, so that shape
20
- * costs nothing extra to support once it exists.
21
- */
22
- function stringField(payload, key) {
23
- if (typeof payload !== "object" || payload === null)
24
- return undefined;
25
- const value = payload[key];
26
- return typeof value === "string" ? value : undefined;
27
- }
28
- function numberField(payload, key) {
29
- if (typeof payload !== "object" || payload === null)
30
- return undefined;
31
- const value = payload[key];
32
- return typeof value === "number" ? value : undefined;
33
- }
34
- export function extractObservedRouteEvidence(items) {
35
- const methodByRequestId = new Map();
36
- const methodByUrl = new Map();
37
- for (const item of items) {
38
- if (item.eventType !== "NETWORK_REQUEST")
39
- continue;
40
- const method = stringField(item.payload, "method");
41
- const url = stringField(item.payload, "url");
42
- if (method === undefined)
43
- continue;
44
- if (item.requestId !== null)
45
- methodByRequestId.set(item.requestId, method);
46
- if (url !== undefined)
47
- methodByUrl.set(url, method);
48
- }
49
- const results = [];
50
- for (const item of items) {
51
- if (item.eventType !== "NETWORK_RESPONSE" && item.eventType !== "HTTP_ERROR")
52
- continue;
53
- const status = numberField(item.payload, "status");
54
- if (status === undefined)
55
- continue;
56
- const url = stringField(item.payload, "url");
57
- if (url === undefined)
58
- continue;
59
- const method = stringField(item.payload, "method") ??
60
- (item.requestId !== null ? methodByRequestId.get(item.requestId) : undefined) ??
61
- methodByUrl.get(url);
62
- if (method === undefined)
63
- continue;
64
- let path;
65
- try {
66
- path = new URL(url).pathname;
67
- }
68
- catch {
69
- // Not a URL this check can reason about — never guessed at.
70
- continue;
71
- }
72
- results.push({ method, path, status });
73
- }
74
- return results;
75
- }
76
- //# sourceMappingURL=observed-route-evidence.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"observed-route-evidence.js","sourceRoot":"","sources":["../../src/evidence/observed-route-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,SAAS,WAAW,CAAC,OAAgB,EAAE,GAAW;IAChD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACtE,MAAM,KAAK,GAAI,OAAmC,CAAC,GAAG,CAAC,CAAC;IACxD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,SAAS,WAAW,CAAC,OAAgB,EAAE,GAAW;IAChD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACtE,MAAM,KAAK,GAAI,OAAmC,CAAC,GAAG,CAAC,CAAC;IACxD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,KAA0B;IACrE,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkB,CAAC;IACpD,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC9C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,SAAS,KAAK,iBAAiB;YAAE,SAAS;QACnD,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACnD,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC7C,IAAI,MAAM,KAAK,SAAS;YAAE,SAAS;QACnC,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI;YAAE,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC3E,IAAI,GAAG,KAAK,SAAS;YAAE,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,OAAO,GAA4B,EAAE,CAAC;IAC5C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,SAAS,KAAK,kBAAkB,IAAI,IAAI,CAAC,SAAS,KAAK,YAAY;YAAE,SAAS;QACvF,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACnD,IAAI,MAAM,KAAK,SAAS;YAAE,SAAS;QACnC,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC7C,IAAI,GAAG,KAAK,SAAS;YAAE,SAAS;QAEhC,MAAM,MAAM,GACV,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC;YACnC,CAAC,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAC7E,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,MAAM,KAAK,SAAS;YAAE,SAAS;QAEnC,IAAI,IAAY,CAAC;QACjB,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;QAC/B,CAAC;QAAC,MAAM,CAAC;YACP,4DAA4D;YAC5D,SAAS;QACX,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/dist/heap.d.ts DELETED
@@ -1,61 +0,0 @@
1
- /**
2
- * P6-B1 — a fence in front of the V8 heap ceiling, because there is no catch behind it.
3
- *
4
- * `analyze` on a 7,700-file repository hit `FATAL ERROR: JavaScript heap out
5
- * of memory` at V8's default ceiling and the MCP client saw a bare
6
- * `Connection closed`: no state, no disclosure, no hint. A heap-limit abort is
7
- * not a JavaScript exception — `try`/`catch`, `process.on("uncaughtException")`
8
- * and `process.on("exit")` all fail to run, because V8 calls `abort()` rather
9
- * than unwinding. So there is nothing to catch, and "report the OOM" has to
10
- * mean "notice the wall before hitting it".
11
- *
12
- * That is what this module is: a reading of the ceiling actually in force and
13
- * the bytes actually live, checked at the points where the caller's peak
14
- * occurs, so an unrecoverable abort becomes a recoverable `failed` reply that
15
- * names the phase and the remedy.
16
- *
17
- * ## Why a ratio, and why this one
18
- *
19
- * `heap_size_limit` is V8's hard ceiling; `heapUsed` is what survives the last
20
- * collection plus whatever has been allocated since. The gap between "the
21
- * guard could still run" and "the process is already dead" is one allocation,
22
- * so the threshold has to leave room for the phase about to start, not for the
23
- * next statement. The default is a starting value in the sense CLAUDE.md means
24
- * — build against it, tune from data — and deliberately overridable, because a
25
- * run refused at 90% that would have finished at 97% is a cost this guard
26
- * imposes rather than prevents.
27
- */
28
- /** Fraction of the heap ceiling past which the next large phase is refused rather than attempted. */
29
- export declare const HEAP_ABORT_RATIO = 0.9;
30
- export declare const HEAP_RATIO_ENV_VAR = "DESCRY_HEAP_ABORT_RATIO";
31
- export interface HeapReading {
32
- /** Live bytes as of the last collection, plus anything allocated since. */
33
- readonly usedBytes: number;
34
- /** V8's hard ceiling — what `--max-old-space-size` sets. */
35
- readonly limitBytes: number;
36
- /** `usedBytes / limitBytes`, precomputed so callers cannot derive it two ways. */
37
- readonly ratio: number;
38
- }
39
- /** The ceiling and the usage of the process this is called in. */
40
- export declare function readHeap(): HeapReading;
41
- /**
42
- * The threshold in force, honouring `DESCRY_HEAP_ABORT_RATIO`.
43
- *
44
- * An unreadable or out-of-range override falls back to the default rather than
45
- * disabling the guard: a typo in an env var must not silently restore the
46
- * bare-`Connection closed` behaviour this module exists to remove. Setting it
47
- * to `1` is the documented way to turn the guard off, and that is an explicit
48
- * act rather than a typo.
49
- */
50
- export declare function abortRatio(): number;
51
- /**
52
- * `null` when there is headroom; otherwise the sentence to refuse with.
53
- *
54
- * The recommendation doubles the ceiling in force rather than adding a fixed
55
- * margin: the run failed at the current size, so a hint that lands near it
56
- * sends the operator round the same loop a second time. `phase` is the caller's
57
- * own name for the step about to start — a heap failure with no phase named is
58
- * a failure the operator cannot act on differently from the crash it replaced.
59
- */
60
- export declare function heapGuard(reading: HeapReading, phase: string): string | null;
61
- //# sourceMappingURL=heap.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"heap.d.ts","sourceRoot":"","sources":["../src/heap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,qGAAqG;AACrG,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,eAAO,MAAM,kBAAkB,4BAA4B,CAAC;AAI5D,MAAM,WAAW,WAAW;IAC1B,2EAA2E;IAC3E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,kFAAkF;IAClF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,kEAAkE;AAClE,wBAAgB,QAAQ,IAAI,WAAW,CAKtC;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAMnC;AAID;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAe5E"}
package/dist/heap.js DELETED
@@ -1,82 +0,0 @@
1
- /**
2
- * P6-B1 — a fence in front of the V8 heap ceiling, because there is no catch behind it.
3
- *
4
- * `analyze` on a 7,700-file repository hit `FATAL ERROR: JavaScript heap out
5
- * of memory` at V8's default ceiling and the MCP client saw a bare
6
- * `Connection closed`: no state, no disclosure, no hint. A heap-limit abort is
7
- * not a JavaScript exception — `try`/`catch`, `process.on("uncaughtException")`
8
- * and `process.on("exit")` all fail to run, because V8 calls `abort()` rather
9
- * than unwinding. So there is nothing to catch, and "report the OOM" has to
10
- * mean "notice the wall before hitting it".
11
- *
12
- * That is what this module is: a reading of the ceiling actually in force and
13
- * the bytes actually live, checked at the points where the caller's peak
14
- * occurs, so an unrecoverable abort becomes a recoverable `failed` reply that
15
- * names the phase and the remedy.
16
- *
17
- * ## Why a ratio, and why this one
18
- *
19
- * `heap_size_limit` is V8's hard ceiling; `heapUsed` is what survives the last
20
- * collection plus whatever has been allocated since. The gap between "the
21
- * guard could still run" and "the process is already dead" is one allocation,
22
- * so the threshold has to leave room for the phase about to start, not for the
23
- * next statement. The default is a starting value in the sense CLAUDE.md means
24
- * — build against it, tune from data — and deliberately overridable, because a
25
- * run refused at 90% that would have finished at 97% is a cost this guard
26
- * imposes rather than prevents.
27
- */
28
- import { getHeapStatistics } from "node:v8";
29
- /** Fraction of the heap ceiling past which the next large phase is refused rather than attempted. */
30
- export const HEAP_ABORT_RATIO = 0.9;
31
- export const HEAP_RATIO_ENV_VAR = "DESCRY_HEAP_ABORT_RATIO";
32
- const BYTES_PER_MIB = 1024 * 1024;
33
- /** The ceiling and the usage of the process this is called in. */
34
- export function readHeap() {
35
- const stats = getHeapStatistics();
36
- const limitBytes = stats.heap_size_limit;
37
- const usedBytes = stats.used_heap_size;
38
- return { usedBytes, limitBytes, ratio: limitBytes === 0 ? 0 : usedBytes / limitBytes };
39
- }
40
- /**
41
- * The threshold in force, honouring `DESCRY_HEAP_ABORT_RATIO`.
42
- *
43
- * An unreadable or out-of-range override falls back to the default rather than
44
- * disabling the guard: a typo in an env var must not silently restore the
45
- * bare-`Connection closed` behaviour this module exists to remove. Setting it
46
- * to `1` is the documented way to turn the guard off, and that is an explicit
47
- * act rather than a typo.
48
- */
49
- export function abortRatio() {
50
- const raw = process.env[HEAP_RATIO_ENV_VAR];
51
- if (raw === undefined)
52
- return HEAP_ABORT_RATIO;
53
- const parsed = Number(raw);
54
- if (!Number.isFinite(parsed) || parsed <= 0 || parsed > 1)
55
- return HEAP_ABORT_RATIO;
56
- return parsed;
57
- }
58
- const mib = (bytes) => Math.round(bytes / BYTES_PER_MIB);
59
- /**
60
- * `null` when there is headroom; otherwise the sentence to refuse with.
61
- *
62
- * The recommendation doubles the ceiling in force rather than adding a fixed
63
- * margin: the run failed at the current size, so a hint that lands near it
64
- * sends the operator round the same loop a second time. `phase` is the caller's
65
- * own name for the step about to start — a heap failure with no phase named is
66
- * a failure the operator cannot act on differently from the crash it replaced.
67
- */
68
- export function heapGuard(reading, phase) {
69
- if (reading.ratio < abortRatio())
70
- return null;
71
- const inForceMib = mib(reading.limitBytes);
72
- const recommendedMib = inForceMib * 2;
73
- return (`${phase} was stopped before it started: ${mib(reading.usedBytes)} MiB of this process's ` +
74
- `${inForceMib} MiB heap ceiling is already in use (${Math.round(reading.ratio * 100)}%), and ` +
75
- "this phase allocates more than the remainder. Nothing was written to the graph, and this is " +
76
- "not a statement about your code — it is this process running out of room to hold it. Raise " +
77
- `the ceiling and re-run: NODE_OPTIONS="--max-old-space-size=${recommendedMib}" on the Descry ` +
78
- `server process. To attempt it anyway, set ${HEAP_RATIO_ENV_VAR}=1 — the guard is what turns ` +
79
- "an unrecoverable abort into this message, so without it the failure surfaces as a closed " +
80
- "connection with no reason attached.");
81
- }
82
- //# sourceMappingURL=heap.js.map
package/dist/heap.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"heap.js","sourceRoot":"","sources":["../src/heap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,qGAAqG;AACrG,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAEpC,MAAM,CAAC,MAAM,kBAAkB,GAAG,yBAAyB,CAAC;AAE5D,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;AAWlC,kEAAkE;AAClE,MAAM,UAAU,QAAQ;IACtB,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAClC,MAAM,UAAU,GAAG,KAAK,CAAC,eAAe,CAAC;IACzC,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC;IACvC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,UAAU,EAAE,CAAC;AACzF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU;IACxB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC5C,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,gBAAgB,CAAC;IAC/C,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC;QAAE,OAAO,gBAAgB,CAAC;IACnF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,GAAG,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,aAAa,CAAC,CAAC;AAEzE;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,OAAoB,EAAE,KAAa;IAC3D,IAAI,OAAO,CAAC,KAAK,GAAG,UAAU,EAAE;QAAE,OAAO,IAAI,CAAC;IAE9C,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3C,MAAM,cAAc,GAAG,UAAU,GAAG,CAAC,CAAC;IACtC,OAAO,CACL,GAAG,KAAK,mCAAmC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,yBAAyB;QAC1F,GAAG,UAAU,wCAAwC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,UAAU;QAC9F,8FAA8F;QAC9F,6FAA6F;QAC7F,8DAA8D,cAAc,kBAAkB;QAC9F,6CAA6C,kBAAkB,+BAA+B;QAC9F,2FAA2F;QAC3F,qCAAqC,CACtC,CAAC;AACJ,CAAC"}
@@ -1,46 +0,0 @@
1
- /**
2
- * P6-B2 — a periodic progress beat for the duration of one long awaited step.
3
- *
4
- * `analyze` on a 7,700-file repository reliably exceeded the calling client's
5
- * timeout even with the heap ceiling raised, and completed only when driven
6
- * over stdio with no client-side timeout at all. It was not hung; it emitted
7
- * one `notifications/progress` frame per *source*, so on a repo with a single
8
- * language adapter the whole multi-minute read fell between two frames. MCP
9
- * clients reset a request's timeout when a progress frame arrives for it, so a
10
- * correct run and a wedged one were indistinguishable from the outside, and
11
- * the timeout fired on the correct one.
12
- *
13
- * ## What this is not
14
- *
15
- * It does not make anything faster, and it is not a guarantee: resetting a
16
- * timeout on progress is a client behaviour, not something the protocol
17
- * obliges. That is why the elapsed time goes *in* the message rather than the
18
- * beat being a bare ping — a caller reading the frames can see the step
19
- * advancing rather than being asserted to. Honest degradation (rule 7) cuts
20
- * both ways here: this discloses that work is ongoing, it does not claim
21
- * progress it cannot measure. The adapter is opaque while it runs, so the
22
- * count of files done is not available to report and none is invented.
23
- */
24
- /** Interval between beats while a step is running. Well inside the 60s default most clients use. */
25
- export declare const HEARTBEAT_MS = 15000;
26
- export declare const HEARTBEAT_ENV_VAR = "DESCRY_PROGRESS_HEARTBEAT_MS";
27
- /**
28
- * The interval in force, honouring `DESCRY_PROGRESS_HEARTBEAT_MS`.
29
- *
30
- * A zero, a negative or an unreadable value falls back to the default rather
31
- * than being taken literally: zero is a busy loop and not a plausible way to
32
- * ask for one, so reading it as "the operator meant to disable beats" would
33
- * turn a typo into the exact silence this module removes.
34
- */
35
- export declare function heartbeatMs(): number;
36
- /**
37
- * Run `work`, beating `label` plus elapsed seconds every `intervalMs` until it
38
- * settles.
39
- *
40
- * The timer is cleared in a `finally`, so a step that throws stops beating on
41
- * the same tick it fails — a beat outliving its step would report a run that
42
- * has already finished or died. `unref()` keeps a pending beat from holding
43
- * the process open on its own.
44
- */
45
- export declare function withHeartbeat<T>(label: string, beat: (message: string) => void, work: () => Promise<T>, intervalMs?: number): Promise<T>;
46
- //# sourceMappingURL=heartbeat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"heartbeat.d.ts","sourceRoot":"","sources":["../src/heartbeat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,oGAAoG;AACpG,eAAO,MAAM,YAAY,QAAS,CAAC;AAEnC,eAAO,MAAM,iBAAiB,iCAAiC,CAAC;AAEhE;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAMpC;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,CAAC,EACnC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EAC/B,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACtB,UAAU,GAAE,MAAsB,GACjC,OAAO,CAAC,CAAC,CAAC,CAWZ"}
package/dist/heartbeat.js DELETED
@@ -1,66 +0,0 @@
1
- /**
2
- * P6-B2 — a periodic progress beat for the duration of one long awaited step.
3
- *
4
- * `analyze` on a 7,700-file repository reliably exceeded the calling client's
5
- * timeout even with the heap ceiling raised, and completed only when driven
6
- * over stdio with no client-side timeout at all. It was not hung; it emitted
7
- * one `notifications/progress` frame per *source*, so on a repo with a single
8
- * language adapter the whole multi-minute read fell between two frames. MCP
9
- * clients reset a request's timeout when a progress frame arrives for it, so a
10
- * correct run and a wedged one were indistinguishable from the outside, and
11
- * the timeout fired on the correct one.
12
- *
13
- * ## What this is not
14
- *
15
- * It does not make anything faster, and it is not a guarantee: resetting a
16
- * timeout on progress is a client behaviour, not something the protocol
17
- * obliges. That is why the elapsed time goes *in* the message rather than the
18
- * beat being a bare ping — a caller reading the frames can see the step
19
- * advancing rather than being asserted to. Honest degradation (rule 7) cuts
20
- * both ways here: this discloses that work is ongoing, it does not claim
21
- * progress it cannot measure. The adapter is opaque while it runs, so the
22
- * count of files done is not available to report and none is invented.
23
- */
24
- /** Interval between beats while a step is running. Well inside the 60s default most clients use. */
25
- export const HEARTBEAT_MS = 15_000;
26
- export const HEARTBEAT_ENV_VAR = "DESCRY_PROGRESS_HEARTBEAT_MS";
27
- /**
28
- * The interval in force, honouring `DESCRY_PROGRESS_HEARTBEAT_MS`.
29
- *
30
- * A zero, a negative or an unreadable value falls back to the default rather
31
- * than being taken literally: zero is a busy loop and not a plausible way to
32
- * ask for one, so reading it as "the operator meant to disable beats" would
33
- * turn a typo into the exact silence this module removes.
34
- */
35
- export function heartbeatMs() {
36
- const raw = process.env[HEARTBEAT_ENV_VAR];
37
- if (raw === undefined)
38
- return HEARTBEAT_MS;
39
- const parsed = Number(raw);
40
- if (!Number.isFinite(parsed) || parsed <= 0)
41
- return HEARTBEAT_MS;
42
- return parsed;
43
- }
44
- /**
45
- * Run `work`, beating `label` plus elapsed seconds every `intervalMs` until it
46
- * settles.
47
- *
48
- * The timer is cleared in a `finally`, so a step that throws stops beating on
49
- * the same tick it fails — a beat outliving its step would report a run that
50
- * has already finished or died. `unref()` keeps a pending beat from holding
51
- * the process open on its own.
52
- */
53
- export async function withHeartbeat(label, beat, work, intervalMs = heartbeatMs()) {
54
- const started = Date.now();
55
- const timer = setInterval(() => {
56
- beat(`${label} — still running, ${Math.round((Date.now() - started) / 1000)}s elapsed`);
57
- }, intervalMs);
58
- timer.unref?.();
59
- try {
60
- return await work();
61
- }
62
- finally {
63
- clearInterval(timer);
64
- }
65
- }
66
- //# sourceMappingURL=heartbeat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"heartbeat.js","sourceRoot":"","sources":["../src/heartbeat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,oGAAoG;AACpG,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC;AAEnC,MAAM,CAAC,MAAM,iBAAiB,GAAG,8BAA8B,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC3C,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,YAAY,CAAC;IAC3C,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC;QAAE,OAAO,YAAY,CAAC;IACjE,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,KAAa,EACb,IAA+B,EAC/B,IAAsB,EACtB,aAAqB,WAAW,EAAE;IAElC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QAC7B,IAAI,CAAC,GAAG,KAAK,qBAAqB,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1F,CAAC,EAAE,UAAU,CAAC,CAAC;IACf,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;IAChB,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,EAAE,CAAC;IACtB,CAAC;YAAS,CAAC;QACT,aAAa,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,32 +0,0 @@
1
- /** `@descryy/mcp` — the agent-facing front door. A thin wrapper over the query layer
2
- * (DEC-002): every consumer goes through here and nothing touches storage directly —
3
- * which is why tools hold a `Session`, not a driver. */
4
- export { createMcpServer } from "./server.ts";
5
- export type { McpServer, McpServerOptions } from "./server.ts";
6
- export { Session, loadConfig, writeConfig, writeSources, ConfigError, CONFIG_RELATIVE_PATH, DEFAULT_GRAPH_RELATIVE_PATH, } from "./session.ts";
7
- export type { DescryConfig, SessionOptions, ConfigPatch } from "./session.ts";
8
- export { loadSources, detectSources, normaliseSpec } from "./registry.ts";
9
- export type { SourceSpec, LoadedSource, SourceLoadFailure, RegistryResult } from "./registry.ts";
10
- /** The real, at-rest credential store — see the module's own header for why this is the one
11
- * place `@descryy/cli` reaches this without depending on `@descryy/runtime-environment-profile`
12
- * itself. */
13
- export { createDefaultCredentialStore } from "./credential-store.ts";
14
- export type { CredentialStoreOptions, WritableCredentialStore } from "./credential-store.ts";
15
- export { renderAnswer, renderFailed, renderHandshake, renderTimedOut, renderToolError, DisclosureError, TOOL_TIERS, } from "./render.ts";
16
- export type { AnswerEnvelope, CallToolResult, Provenance, ResultState, ToolAnswer, ToolTier, TruncationDetail, } from "./render.ts";
17
- export { TOOLS, TOOLS_BY_NAME, ToolInputError, resolveOneNode } from "./tools/index.ts";
18
- export type { BriefNode, NodeCandidates, Progress, ToolContext, ToolDefinition, } from "./tools/index.ts";
19
- /** The shape each tool puts in `AnswerEnvelope.data`. `data` is `unknown` in the envelope
20
- * by design, but an AI caller can't rely on an unwritten shape — each type here describes
21
- * what its tool returns today; genuinely conditional payloads are unions, not `unknown`. */
22
- export type { AffectedRef, AnalyzeData, BlockedCheck, CoChangedFile, ConfigDependencyReport, ContractPathFinding, ContractShapeMismatchReport, ContractShapeStatus, ContractsData, CrossPrData, CrossPrEmptyDiff, CrossPrGitFailure, CrossPrReport, EnvFindingReport, HiddenDependencyCheck, HiddenDependencyFinding, HistoryData, HistoryFile, HistoryFileResolved, HistoryFileUnresolved, HistoryReport, ImpactData, ImpactReport, ImpactedNode, LinkWorkspaceData, MarkIncidentData, LinkedRepo, OverlapCheck, OverlapReportChecked, PrAnalysisData, PrAnalysisEmptyDiff, PrAnalysisGitFailure, PrAnalysisLists, PrAnalysisRange, PrAnalysisReport, PrAnalysisUnresolved, PropagationData, PropagationReport, QuestionsData, ReachedNode, RelatedNode, ScopeData, ScopeNotSeeded, ScopeReport, ScopeTierCount, ScopedNodeReport, SimilarIncidentReport, SimilarIncidentSignalReport, SimilarIncidentsData, SourceRun, SupersededCheck, TracedPath, ValidateData, } from "./tools/index.ts";
23
- export { serveStdio, guardStdout, createLineReader } from "./transport.ts";
24
- export type { Transport, StdioOptions } from "./transport.ts";
25
- export { PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, negotiateVersion, parseMessage, ProtocolError, } from "./protocol.ts";
26
- export type { RpcRequest, RpcNotification, RpcResponse, RpcMessage, RpcId } from "./protocol.ts";
27
- /** The scenario format — storage, schema, refusals. Re-exported here so `descry check`
28
- * doesn't reach past the package boundary — a second reader importing the relative path
29
- * could drift from this one the day the schema changes. */
30
- export { MIN_READABLE_SCHEMA_VERSION, SCENARIO_SCHEMA_VERSION, isSecretRef, isUnverifying, parseScenario, readSecretRef, referencedVariables, resolveSecretText, secretRefFor, serializeScenario, scenariosDirectory, scenarioPath, listScenarios, ScenarioListError, readScenario, writeScenario, projectScenarioToRunPlan, projectRunPlanToScenario, } from "./scenarios/index.ts";
31
- export type { CredentialStoreLike, Scenario, SecretEnvironment, SecretRef, SecretResolution, ScenarioStep, ScenarioAssertion, ScenarioAssertionKind, ScenarioActionKind, ScenarioParseResult, TargetDescriptor, ProjectedStep, ProjectedStepKind, ProjectedBrowserRunPlan, ProjectionRefusal, ScenarioProjection, PlanProjection, RawProjectedStep, ScenarioMeta, } from "./scenarios/index.ts";
32
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;yDAEyD;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE9E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1E,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEjG;;cAEc;AACd,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAE7F,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,cAAc,EACd,eAAe,EACf,eAAe,EACf,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACV,QAAQ,EACR,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxF,YAAY,EACV,SAAS,EACT,cAAc,EACd,QAAQ,EACR,WAAW,EACX,cAAc,GACf,MAAM,kBAAkB,CAAC;AAE1B;;6FAE6F;AAC7F,YAAY,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,EACX,SAAS,EACT,cAAc,EACd,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,EACpB,SAAS,EACT,eAAe,EACf,UAAU,EACV,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,YAAY,EACZ,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEjG;;4DAE4D;AAC5D,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,mBAAmB,EACnB,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,sBAAsB,CAAC"}
package/dist/index.js DELETED
@@ -1,19 +0,0 @@
1
- /** `@descryy/mcp` — the agent-facing front door. A thin wrapper over the query layer
2
- * (DEC-002): every consumer goes through here and nothing touches storage directly —
3
- * which is why tools hold a `Session`, not a driver. */
4
- export { createMcpServer } from "./server.js";
5
- export { Session, loadConfig, writeConfig, writeSources, ConfigError, CONFIG_RELATIVE_PATH, DEFAULT_GRAPH_RELATIVE_PATH, } from "./session.js";
6
- export { loadSources, detectSources, normaliseSpec } from "./registry.js";
7
- /** The real, at-rest credential store — see the module's own header for why this is the one
8
- * place `@descryy/cli` reaches this without depending on `@descryy/runtime-environment-profile`
9
- * itself. */
10
- export { createDefaultCredentialStore } from "./credential-store.js";
11
- export { renderAnswer, renderFailed, renderHandshake, renderTimedOut, renderToolError, DisclosureError, TOOL_TIERS, } from "./render.js";
12
- export { TOOLS, TOOLS_BY_NAME, ToolInputError, resolveOneNode } from "./tools/index.js";
13
- export { serveStdio, guardStdout, createLineReader } from "./transport.js";
14
- export { PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, negotiateVersion, parseMessage, ProtocolError, } from "./protocol.js";
15
- /** The scenario format — storage, schema, refusals. Re-exported here so `descry check`
16
- * doesn't reach past the package boundary — a second reader importing the relative path
17
- * could drift from this one the day the schema changes. */
18
- export { MIN_READABLE_SCHEMA_VERSION, SCENARIO_SCHEMA_VERSION, isSecretRef, isUnverifying, parseScenario, readSecretRef, referencedVariables, resolveSecretText, secretRefFor, serializeScenario, scenariosDirectory, scenarioPath, listScenarios, ScenarioListError, readScenario, writeScenario, projectScenarioToRunPlan, projectRunPlanToScenario, } from "./scenarios/index.js";
19
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;yDAEyD;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG1E;;cAEc;AACd,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAGrE,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,cAAc,EACd,eAAe,EACf,eAAe,EACf,UAAU,GACX,MAAM,aAAa,CAAC;AAWrB,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAoExF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAG3E,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,YAAY,EACZ,aAAa,GACd,MAAM,eAAe,CAAC;AAGvB;;4DAE4D;AAC5D,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC"}
@@ -1,37 +0,0 @@
1
- /**
2
- * Gates `import()` of caller-named specifiers (A-F1/A-F2, three ungated call sites). Refuses path-like specifiers (exact bytes, no install step) by default.
3
- * Also refuses a bare specifier resolved into the scanned repo's own git-tracked `node_modules` (real `npm install` leaves it untracked) — a repo can otherwise ship a payload merely by being cloned.
4
- * Escape hatches: `DESCRY_ALLOW_PATH_ADAPTER_MODULES=1`, `DESCRY_ALLOW_TRACKED_NODE_MODULES=1` (server env only, never repo-set).
5
- */
6
- export declare const ALLOW_PATH_MODULES_ENV_VAR = "DESCRY_ALLOW_PATH_ADAPTER_MODULES";
7
- export declare const ALLOW_TRACKED_NODE_MODULES_ENV_VAR = "DESCRY_ALLOW_TRACKED_NODE_MODULES";
8
- export type ModuleTrustDecision = {
9
- readonly allowed: true;
10
- } | {
11
- readonly allowed: false;
12
- readonly reason: string;
13
- };
14
- /** Path-like: relative/absolute/drive-absolute/home-relative path, or any URL-scheme specifier (`file:`, `http:`, `data:`, …) — names exact bytes, not an installed package. Everything else resolves normally. */
15
- export declare function isPathLikeSpecifier(specifier: string): boolean;
16
- /**
17
- * Whether `resolvedAbsolutePath` sits inside `repoPath` — never true for a path that
18
- * merely shares a prefix (`/home/user/repo-other` is not inside `/home/user/repo`).
19
- *
20
- * UAT phase 5 §1b: `resolveFromRepo` anchors `createRequire` at the repo's own
21
- * `package.json` and lets Node's ordinary CJS algorithm walk the entire ancestor
22
- * chain — `repo/node_modules` → `$HOME/node_modules` → `/node_modules`. A stray
23
- * install anywhere above the repository wins over what the repository (or the
24
- * server) actually intended, and nothing previously distinguished "found inside
25
- * the repo" from "found somewhere Node's upward walk happened to land". This is
26
- * the containment test `resolveRepoAdapterModule` uses to draw that line.
27
- */
28
- export declare function resolvesInsideRepo(repoPath: string, resolvedAbsolutePath: string): boolean;
29
- /** Decides if `specifier` may be `import()`-ed; never throws — each call site turns a refusal into its own existing failure channel (`SourceLoadFailure`, etc.). */
30
- export declare function checkModuleTrust(specifier: string): ModuleTrustDecision;
31
- /** Follow-up to `checkModuleTrust`: refuses a bare specifier resolved into the scanned repo's own git-tracked `node_modules` (real `npm install` leaves it untracked) — closes a payload-via-commit gap. A `null` git-tracked check (no `.git`) is allowed, not refused: the exploit needs a clone, and a non-git directory is a real workflow this check has no history to verify either way. */
32
- export declare function checkRepoResolvedModuleTrust(options: {
33
- readonly specifier: string;
34
- readonly repoPath: string;
35
- readonly resolvedAbsolutePath: string;
36
- }): Promise<ModuleTrustDecision>;
37
- //# sourceMappingURL=module-trust.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"module-trust.d.ts","sourceRoot":"","sources":["../src/module-trust.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,eAAO,MAAM,0BAA0B,sCAAsC,CAAC;AAC9E,eAAO,MAAM,kCAAkC,sCAAsC,CAAC;AAEtF,MAAM,MAAM,mBAAmB,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpH,mNAAmN;AACnN,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAK9D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAG1F;AAOD,oKAAoK;AACpK,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,CAYvE;AAOD,kYAAkY;AAClY,wBAAsB,4BAA4B,CAAC,OAAO,EAAE;IAC1D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAiB/B"}
@@ -1,77 +0,0 @@
1
- /**
2
- * Gates `import()` of caller-named specifiers (A-F1/A-F2, three ungated call sites). Refuses path-like specifiers (exact bytes, no install step) by default.
3
- * Also refuses a bare specifier resolved into the scanned repo's own git-tracked `node_modules` (real `npm install` leaves it untracked) — a repo can otherwise ship a payload merely by being cloned.
4
- * Escape hatches: `DESCRY_ALLOW_PATH_ADAPTER_MODULES=1`, `DESCRY_ALLOW_TRACKED_NODE_MODULES=1` (server env only, never repo-set).
5
- */
6
- import { sep } from "node:path";
7
- import { isPathTrackedByGit } from "@descryy/core";
8
- export const ALLOW_PATH_MODULES_ENV_VAR = "DESCRY_ALLOW_PATH_ADAPTER_MODULES";
9
- export const ALLOW_TRACKED_NODE_MODULES_ENV_VAR = "DESCRY_ALLOW_TRACKED_NODE_MODULES";
10
- /** Path-like: relative/absolute/drive-absolute/home-relative path, or any URL-scheme specifier (`file:`, `http:`, `data:`, …) — names exact bytes, not an installed package. Everything else resolves normally. */
11
- export function isPathLikeSpecifier(specifier) {
12
- if (specifier.startsWith(".") || specifier.startsWith("/") || specifier.startsWith("~"))
13
- return true;
14
- if (/^[a-zA-Z]:[\\/]/.test(specifier))
15
- return true;
16
- if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(specifier))
17
- return true;
18
- return false;
19
- }
20
- /**
21
- * Whether `resolvedAbsolutePath` sits inside `repoPath` — never true for a path that
22
- * merely shares a prefix (`/home/user/repo-other` is not inside `/home/user/repo`).
23
- *
24
- * UAT phase 5 §1b: `resolveFromRepo` anchors `createRequire` at the repo's own
25
- * `package.json` and lets Node's ordinary CJS algorithm walk the entire ancestor
26
- * chain — `repo/node_modules` → `$HOME/node_modules` → `/node_modules`. A stray
27
- * install anywhere above the repository wins over what the repository (or the
28
- * server) actually intended, and nothing previously distinguished "found inside
29
- * the repo" from "found somewhere Node's upward walk happened to land". This is
30
- * the containment test `resolveRepoAdapterModule` uses to draw that line.
31
- */
32
- export function resolvesInsideRepo(repoPath, resolvedAbsolutePath) {
33
- const root = repoPath.endsWith(sep) ? repoPath : `${repoPath}${sep}`;
34
- return resolvedAbsolutePath.startsWith(root);
35
- }
36
- function pathModulesAllowed() {
37
- const value = process.env[ALLOW_PATH_MODULES_ENV_VAR];
38
- return value === "1" || value === "true";
39
- }
40
- /** Decides if `specifier` may be `import()`-ed; never throws — each call site turns a refusal into its own existing failure channel (`SourceLoadFailure`, etc.). */
41
- export function checkModuleTrust(specifier) {
42
- if (!isPathLikeSpecifier(specifier))
43
- return { allowed: true };
44
- if (pathModulesAllowed())
45
- return { allowed: true };
46
- return {
47
- allowed: false,
48
- reason: `"${specifier}" names a file path or URL rather than an installed package. Loading one executes ` +
49
- "arbitrary code with no further confirmation, and this specifier can come from a scanned repository's " +
50
- "own configuration or from a tool call — neither is necessarily something the operator running this " +
51
- `server chose. Refused by default; set ${ALLOW_PATH_MODULES_ENV_VAR}=1 in this server's own environment ` +
52
- "to allow it, and only do that for adapters and configuration you, the operator, trust.",
53
- };
54
- }
55
- function trackedNodeModulesAllowed() {
56
- const value = process.env[ALLOW_TRACKED_NODE_MODULES_ENV_VAR];
57
- return value === "1" || value === "true";
58
- }
59
- /** Follow-up to `checkModuleTrust`: refuses a bare specifier resolved into the scanned repo's own git-tracked `node_modules` (real `npm install` leaves it untracked) — closes a payload-via-commit gap. A `null` git-tracked check (no `.git`) is allowed, not refused: the exploit needs a clone, and a non-git directory is a real workflow this check has no history to verify either way. */
60
- export async function checkRepoResolvedModuleTrust(options) {
61
- if (trackedNodeModulesAllowed())
62
- return { allowed: true };
63
- const tracked = await isPathTrackedByGit(options.repoPath, options.resolvedAbsolutePath);
64
- if (tracked !== true)
65
- return { allowed: true };
66
- return {
67
- allowed: false,
68
- reason: `"${options.specifier}" resolved to ${options.resolvedAbsolutePath}, inside ${options.repoPath}'s own ` +
69
- "node_modules — but that file is committed to this repository's own git history, not installed by a " +
70
- "package manager (a real `npm install` leaves node_modules untracked, almost universally). A " +
71
- "repository that commits its own node_modules can deliver arbitrary code to anyone who merely clones " +
72
- `it, with no npm install step at all. Refused by default; set ${ALLOW_TRACKED_NODE_MODULES_ENV_VAR}=1 ` +
73
- "in this server's own environment to allow it, and only do that for a repository whose committed " +
74
- "node_modules you, the operator, trust.",
75
- };
76
- }
77
- //# sourceMappingURL=module-trust.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"module-trust.js","sourceRoot":"","sources":["../src/module-trust.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,CAAC,MAAM,0BAA0B,GAAG,mCAAmC,CAAC;AAC9E,MAAM,CAAC,MAAM,kCAAkC,GAAG,mCAAmC,CAAC;AAItF,mNAAmN;AACnN,MAAM,UAAU,mBAAmB,CAAC,SAAiB;IACnD,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACrG,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IACnD,IAAI,2BAA2B,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7D,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAgB,EAAE,oBAA4B;IAC/E,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,GAAG,GAAG,EAAE,CAAC;IACrE,OAAO,oBAAoB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACtD,OAAO,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,MAAM,CAAC;AAC3C,CAAC;AAED,oKAAoK;AACpK,MAAM,UAAU,gBAAgB,CAAC,SAAiB;IAChD,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC9D,IAAI,kBAAkB,EAAE;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACnD,OAAO;QACL,OAAO,EAAE,KAAK;QACd,MAAM,EACJ,IAAI,SAAS,oFAAoF;YACjG,uGAAuG;YACvG,qGAAqG;YACrG,yCAAyC,0BAA0B,sCAAsC;YACzG,wFAAwF;KAC3F,CAAC;AACJ,CAAC;AAED,SAAS,yBAAyB;IAChC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;IAC9D,OAAO,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,MAAM,CAAC;AAC3C,CAAC;AAED,kYAAkY;AAClY,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,OAIlD;IACC,IAAI,yBAAyB,EAAE;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAE1D,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACzF,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAE/C,OAAO;QACL,OAAO,EAAE,KAAK;QACd,MAAM,EACJ,IAAI,OAAO,CAAC,SAAS,iBAAiB,OAAO,CAAC,oBAAoB,YAAY,OAAO,CAAC,QAAQ,SAAS;YACvG,qGAAqG;YACrG,8FAA8F;YAC9F,sGAAsG;YACtG,gEAAgE,kCAAkC,KAAK;YACvG,kGAAkG;YAClG,wCAAwC;KAC3C,CAAC;AACJ,CAAC"}
@@ -1,31 +0,0 @@
1
- /**
2
- * Confines a caller-named path to a set of roots, with a disclosed, operator-set
3
- * escape hatch (A-F6). Generalizes two `observe-runtime.ts` call sites with no such
4
- * check: `evidencePath` (relative joined onto repo root with no re-check — `..`
5
- * escaped it) and `attach.logFilePath` (read in full every poll, unchecked). */
6
- export type PathConfinementDecision = {
7
- readonly allowed: true;
8
- readonly resolved: string;
9
- } | {
10
- readonly allowed: false;
11
- readonly reason: string;
12
- };
13
- export interface PathConfinementOptions {
14
- /** The path as configured, absolute or relative. Relative is resolved against `process.cwd()` — callers that mean "relative to the repo" must join it themselves before calling this. */
15
- readonly candidate: string;
16
- /** Confined when the resolved candidate is under any of these. */
17
- readonly allowedRoots: readonly string[];
18
- /** Set to `"1"` or `"true"` in this server's own environment to bypass confinement. */
19
- readonly envVar: string;
20
- /** What the value is, for the refusal message — e.g. `"evidencePath"`. */
21
- readonly what: string;
22
- }
23
- export declare function checkPathConfinement(options: PathConfinementOptions): PathConfinementDecision;
24
- export type SensitivePathDecision = {
25
- readonly sensitive: false;
26
- } | {
27
- readonly sensitive: true;
28
- readonly reason: string;
29
- };
30
- export declare function checkNotSensitivePath(candidate: string, envVar: string): SensitivePathDecision;
31
- //# sourceMappingURL=path-confinement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path-confinement.d.ts","sourceRoot":"","sources":["../src/path-confinement.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAIhF,MAAM,MAAM,uBAAuB,GAC/B;IAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAOzD,MAAM,WAAW,sBAAsB;IACrC,yLAAyL;IACzL,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,uFAAuF;IACvF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,uBAAuB,CAe7F;AAQD,MAAM,MAAM,qBAAqB,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1H,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,qBAAqB,CAY9F"}