@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,216 +0,0 @@
1
- /** What the seven browser tools share — kept in one place because the parts that repeat
2
- * are the parts that must not drift: how a dead session is reported, how consent is
3
- * checked, how a reply is stamped. Seven copies of a refusal is seven chances for one to
4
- * say something slightly different about the same state. */
5
- import { answer } from "../tools/kit.js";
6
- import { evidenceNotes, evidenceReport } from "./evidence.js";
7
- import { graphWriteNotes, writeBrowserObservations, NO_GRAPH_WRITE } from "./graph-write.js";
8
- export function browserStamp(ctx) {
9
- try {
10
- const stamp = ctx.session.provider().baseStamp();
11
- return {
12
- commitSha: stamp.commitSha,
13
- graphBuiltAt: stamp.graphBuiltAt,
14
- irSchemaVersion: stamp.irSchemaVersion,
15
- commitSpread: stamp.commitSpread,
16
- repoCount: stamp.repoCount,
17
- note: null,
18
- };
19
- }
20
- catch {
21
- return {
22
- commitSha: null,
23
- graphBuiltAt: null,
24
- irSchemaVersion: 0,
25
- commitSpread: 0,
26
- repoCount: 0,
27
- note: "This repository has no graph, so the reply carries no commit stamp. What the browser observed is " +
28
- "still real; nothing here has been related to your code. Run analyze to connect the two.",
29
- };
30
- }
31
- }
32
- /** Every browser reply, stamped identically. `resolutionFloor: 4` on success — R4 is
33
- * "observed at runtime", exactly what this call saw; a refusal/failure observed nothing,
34
- * so stamps R0 — describing this reply's evidence, not the tool's best case. */
35
- export function browserAnswer(options) {
36
- const stamp = browserStamp(options.ctx);
37
- const observed = (options.state ?? "ok") === "ok";
38
- const notes = stamp.note === null ? [...options.notes] : [...options.notes, stamp.note];
39
- return answer({
40
- headline: options.headline,
41
- data: options.data,
42
- resolutionFloor: observed ? 4 : 0,
43
- commitSha: stamp.commitSha,
44
- graphBuiltAt: stamp.graphBuiltAt,
45
- irSchemaVersion: stamp.irSchemaVersion,
46
- commitSpread: stamp.commitSpread,
47
- repoCount: stamp.repoCount,
48
- notes,
49
- // A browser observation is a fact about names and structure on a page —
50
- // "a button called Delete is here" — not about a program's types.
51
- nameLevel: true,
52
- ...(options.state === undefined || options.state === "ok" ? {} : { state: options.state }),
53
- ...(options.fitToBudget === undefined ? {} : { fitToBudget: options.fitToBudget }),
54
- });
55
- }
56
- /** Looks a session up, or says exactly why it can't be used. The three dead states stay
57
- * apart — "never had it", "timed out, here's what it saw", "crashed" send a caller to
58
- * three different things; only the last is `failed`. */
59
- export async function useSession(registry, sessionId) {
60
- const used = await registry.use(sessionId);
61
- if (used.ok)
62
- return { ok: true, entry: used.entry };
63
- if (used.kind === "unknown") {
64
- return { ok: false, dead: { state: "refused", headline: `No browser session "${sessionId}".`, notes: [used.reason], evidence: emptyEvidence() } };
65
- }
66
- const evidence = evidenceReport(used.reaped.observation);
67
- const carried = evidence.consoleErrors.length + evidence.failedRequests.length > 0
68
- ? ["Everything the session had observed but not yet reported is included here rather than discarded."]
69
- : [];
70
- return {
71
- ok: false,
72
- dead: {
73
- // A crash is something breaking; a reap is Descry tidying up — the five states keep those apart.
74
- state: used.kind === "crashed" ? "failed" : "refused",
75
- headline: used.kind === "crashed" ? `Browser session ${sessionId} crashed.` : `Browser session ${sessionId} is gone.`,
76
- notes: [used.reason, ...carried],
77
- evidence,
78
- },
79
- };
80
- }
81
- /** Drains page evidence, relates it to the graph, and returns both in one place — every
82
- * evidence-bearing tool routes through this so the R4 write can't silently not happen.
83
- * No graph correlates nothing and says so; that's real, not "found no connection". */
84
- export async function observeAndCorrelate(ctx, entry) {
85
- const observation = await entry.page.drainEvidence();
86
- // C3. The one place in a tool call where a drained observation and the
87
- // session's record of its own failures are both in hand. The recording
88
- // decorator could not do this — it may not drain — so every action failure
89
- // arrives here still attributed from the error and the clock alone, which is
90
- // `undetermined` for any bare timeout. Re-decided against this drain,
91
- // narrowed to each failure's own window. Before `evidenceReport`, so the
92
- // reply and the reachability report cannot disagree about the same drain.
93
- entry.reach.refineFailures(observation, entry.consentedOrigin);
94
- const evidence = evidenceReport(observation);
95
- let graph = NO_GRAPH_WRITE;
96
- const notes = [];
97
- if (observation.requests.length > 0) {
98
- try {
99
- const commitSha = ctx.session.provider().baseStamp().commitSha;
100
- graph = writeBrowserObservations({
101
- driver: ctx.session.store().driver,
102
- repo: ctx.session.config.repo,
103
- runId: entry.runId,
104
- // An edge records the commit the app was built from, so a reader can tell if code
105
- // moved since. Without it, the observation is real but undatable against source, so not written.
106
- commitSha: commitSha ?? "",
107
- repoRoot: ctx.session.repoPath,
108
- requests: observation.requests,
109
- });
110
- notes.push(...graphWriteNotes(graph, observation.requests));
111
- }
112
- catch {
113
- notes.push("This repository has no graph open, so nothing the browser observed was related to your code. The " +
114
- "observations below are real; they are simply unconnected. Run analyze to connect them.");
115
- }
116
- }
117
- return { evidence, graph, notes: [...evidenceNotes(evidence), ...notes] };
118
- }
119
- export function emptyEvidence() {
120
- return { consoleErrors: [], failedRequests: [], pendingRequests: [], totalRequests: 0, actions: [], unsettled: [], evidenceWarnings: [] };
121
- }
122
- export function reportOf(observation) {
123
- return evidenceReport(observation);
124
- }
125
- /** Does the session's environment profile permit changing the application? Reads DEC-270's
126
- * `safetyLevel` (same field `observe_runtime` consults), not a per-tool flag — two "safe"
127
- * notions could disagree. No profile ⇒ null; consent and profile are independent, both must pass. */
128
- export function mutationRefusal(entry) {
129
- if (entry.profile === null)
130
- return null;
131
- if (entry.profile.safetyLevel !== "readOnly")
132
- return null;
133
- return (`Environment profile "${entry.profile.name}" declares safetyLevel "readOnly", which does not permit ` +
134
- "changing the application. Clicking, typing, filling, choosing an option and submitting a form can all " +
135
- "change data, so they are refused; browser_navigate, browser_snapshot and browser_wait_for read or wait " +
136
- "on the page without changing it and remain available. This is a fact about the profile you supplied, " +
137
- "not about the page — the session's own consent is intact and does not override it.");
138
- }
139
- /** Is `url` inside the origin this session was consented for? The consent ruling's one
140
- * hard bound — checked here, not in each verb, so a future eighth tool can't forget it. */
141
- export function withinConsent(entry, url) {
142
- try {
143
- return new URL(url).origin === entry.consentedOrigin;
144
- }
145
- catch {
146
- return false;
147
- }
148
- }
149
- /** Everything a snapshot could not reach, said out loud. Rule 7: a fallback the caller is not
150
- * told about is the same as not having tried. Empty when every document was read, nothing was
151
- * withheld, and no reveal pass ran — silence then means "nothing to disclose", not "not checked". */
152
- export function reachNotes(snapshot) {
153
- const notes = [];
154
- const unread = snapshot.frames.filter((f) => !f.enumerated);
155
- for (const frame of unread) {
156
- const label = frame.frame === null ? "the page" : (frame.frame.name ?? frame.frame.url ?? frame.frame.id);
157
- notes.push(`Not read: ${label}. ${frame.reason ?? "no reason was recorded, which is itself a gap."}`);
158
- }
159
- const framed = snapshot.frames.filter((f) => f.enumerated && f.frame !== null && f.elements > 0);
160
- if (framed.length > 0) {
161
- notes.push(`${framed.map((f) => `${f.elements} element(s) in ${f.frame?.name ?? f.frame?.url ?? f.frame?.id}`).join(", ")}. ` +
162
- "Elements inside a frame can be clicked, typed and filled by ref in this session, but carry no " +
163
- "selector and so cannot be saved into a scenario — the scenario format has no field to name a frame.");
164
- }
165
- if (snapshot.shadow.piercedElements > 0) {
166
- notes.push(`${snapshot.shadow.piercedElements} element(s) came from inside an open shadow root.`);
167
- }
168
- if (snapshot.shadow.ambiguousInDocument > 0) {
169
- notes.push(`${snapshot.shadow.ambiguousInDocument} shadow-root element(s) have no selector: their hook is unique ` +
170
- "inside their own component but not on the page, so any selector here would match the wrong instance.");
171
- }
172
- if (snapshot.shadow.probed && snapshot.shadow.suspectedClosedHosts > 0) {
173
- notes.push(`${snapshot.shadow.suspectedClosedHosts} custom element(s) expose no shadow root and hold no children — ` +
174
- "the signature of a closed shadow root, which no API can confirm. If this page has controls that do " +
175
- "not appear above, they are most likely inside those. Suspected, not asserted.");
176
- }
177
- if (!snapshot.shadow.probed) {
178
- notes.push("The closed-shadow-root probe did not run here, so nothing above says whether this page has any.");
179
- }
180
- if (snapshot.hidden.withheld > 0) {
181
- notes.push(`${snapshot.hidden.withheld} element(s) match the interactive query but the page renders them nowhere — ` +
182
- "a collapsed menu, a closed dialog, an inactive tab panel or `<canvas>` fallback content. They are left " +
183
- "out above because listing them would name controls that are not on the screen. Something this page can " +
184
- "open may reveal them; nothing here asserts it will.");
185
- }
186
- if (snapshot.hidden.untested > 0) {
187
- notes.push(`${snapshot.hidden.untested} element(s) could not be tested for whether the page renders them at all, so ` +
188
- "they are listed on trust and the withheld count above is a floor rather than a total.");
189
- }
190
- const reveal = snapshot.reveal;
191
- if (reveal !== null) {
192
- if (reveal.reason !== null)
193
- notes.push(`Reveal was incomplete: ${reveal.reason}`);
194
- if (reveal.containersScrolled > 0) {
195
- notes.push(`${reveal.containersScrolled} scrollable container(s) on this page were scrolled as well as the page ` +
196
- "itself. A list inside one does not move when the window does, so anything above that came from one " +
197
- "was out of reach of a page scroll alone.");
198
- }
199
- notes.push(`Reveal scrolled the page ${reveal.passes} time(s), leaving it at y=${reveal.finalScrollY}` +
200
- (reveal.revealedElements > 0 ? `, and ${reveal.revealedElements} element(s) exist above only because of it` : "") +
201
- ".");
202
- if (reveal.recycledElements > 0) {
203
- notes.push(`${reveal.recycledElements} element(s) that were on the page before scrolling are gone from it now — ` +
204
- "this list recycles its rows, so no single snapshot can hold all of them. They are counted rather " +
205
- "than listed because a ref to an element the page has destroyed would not work.");
206
- }
207
- if (reveal.stoppedAtCap) {
208
- notes.push("Reveal stopped at its pass cap while the page was still growing — there is more below that was not read.");
209
- }
210
- if (reveal.framesNotScrolled.length > 0) {
211
- notes.push(`Reveal scrolls the main document only; below-the-fold content in ${reveal.framesNotScrolled.join(", ")} was not reached.`);
212
- }
213
- }
214
- return notes;
215
- }
216
- //# sourceMappingURL=tool-support.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-support.js","sourceRoot":"","sources":["../../src/browser/tool-support.ts"],"names":[],"mappings":"AAAA;;;6DAG6D;AAE7D,OAAO,EAAE,MAAM,EAAoB,MAAM,iBAAiB,CAAC;AAG3D,OAAO,EAAE,aAAa,EAAE,cAAc,EAA8B,MAAM,eAAe,CAAC;AAE1F,OAAO,EA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AAiB,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QACzI,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Which URL schemes `browser_start_session` may open (A-F7). `file:`/`data:` resolve
3
- * `.origin` to `"null"`, so same-origin containment passes for every local file (e.g.
4
- * `file:///etc/passwd` reads back as inside consent). Only http:/https: trusted by
5
- * default; opt in extras via `DESCRY_ALLOW_BROWSER_URL_SCHEMES`. */
6
- export declare const ALLOW_BROWSER_URL_SCHEMES_ENV_VAR = "DESCRY_ALLOW_BROWSER_URL_SCHEMES";
7
- export type UrlSchemeDecision = {
8
- readonly allowed: true;
9
- } | {
10
- readonly allowed: false;
11
- readonly reason: string;
12
- };
13
- export declare function checkUrlScheme(url: URL): UrlSchemeDecision;
14
- //# sourceMappingURL=url-scheme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"url-scheme.d.ts","sourceRoot":"","sources":["../../src/browser/url-scheme.ts"],"names":[],"mappings":"AAAA;;;;oEAIoE;AAEpE,eAAO,MAAM,iCAAiC,qCAAqC,CAAC;AAepF,MAAM,MAAM,iBAAiB,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;AAOlH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,iBAAiB,CAa1D"}
@@ -1,38 +0,0 @@
1
- /**
2
- * Which URL schemes `browser_start_session` may open (A-F7). `file:`/`data:` resolve
3
- * `.origin` to `"null"`, so same-origin containment passes for every local file (e.g.
4
- * `file:///etc/passwd` reads back as inside consent). Only http:/https: trusted by
5
- * default; opt in extras via `DESCRY_ALLOW_BROWSER_URL_SCHEMES`. */
6
- export const ALLOW_BROWSER_URL_SCHEMES_ENV_VAR = "DESCRY_ALLOW_BROWSER_URL_SCHEMES";
7
- const DEFAULT_ALLOWED_SCHEMES = new Set(["http:", "https:"]);
8
- function operatorAllowedSchemes() {
9
- const raw = process.env[ALLOW_BROWSER_URL_SCHEMES_ENV_VAR];
10
- if (raw === undefined || raw.trim() === "")
11
- return DEFAULT_ALLOWED_SCHEMES;
12
- const extra = raw
13
- .split(",")
14
- .map((s) => s.trim())
15
- .filter((s) => s !== "")
16
- .map((s) => (s.endsWith(":") ? s : `${s}:`));
17
- return new Set([...DEFAULT_ALLOWED_SCHEMES, ...extra]);
18
- }
19
- /** The one exception: `about:blank` carries no content (no hazard like `file:`/`data:`)
20
- * and is the standard pre-navigation target for browser automation. Other `about:`
21
- * URLs (`about:config`, …) can expose browser-internal state and are excluded. */
22
- const INERT_TARGET = "about:blank";
23
- export function checkUrlScheme(url) {
24
- if (url.href === INERT_TARGET)
25
- return { allowed: true };
26
- const allowed = operatorAllowedSchemes();
27
- if (allowed.has(url.protocol))
28
- return { allowed: true };
29
- return {
30
- allowed: false,
31
- reason: `"${url.href}" uses the "${url.protocol}" scheme, which this tool does not open by default. Same-origin ` +
32
- "containment (the check every other browser tool relies on) does not hold for a file: or data: URL — " +
33
- 'both resolve to the origin "null", so a session opened on one would treat every local file as inside ' +
34
- `consent. Only http: and https: are allowed by default; set ${ALLOW_BROWSER_URL_SCHEMES_ENV_VAR} ` +
35
- '(e.g. "file") in this server\'s own environment to add a scheme deliberately.',
36
- };
37
- }
38
- //# sourceMappingURL=url-scheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"url-scheme.js","sourceRoot":"","sources":["../../src/browser/url-scheme.ts"],"names":[],"mappings":"AAAA;;;;oEAIoE;AAEpE,MAAM,CAAC,MAAM,iCAAiC,GAAG,kCAAkC,CAAC;AAEpF,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE7D,SAAS,sBAAsB;IAC7B,MAAM,GAAG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*
3
- * Its own module because the fake driver and the real one must agree on the answer
4
- * exactly — a matcher copied into both is two matchers, and the contract test would
5
- * then be asserting that each implementation agrees with itself.
6
- *
7
- * A target names an element the way a snapshot presents one (role, accessible name) and
8
- * never a selector. That is the same rule every other verb obeys, held for the same
9
- * reason: an agent waiting on a raw selector is waiting on something it has not seen and
10
- * cannot describe, and whatever then matches it is an element nobody inspected.
11
- *
12
- * Matching is exact, case-insensitive, after trimming — no substring fallback. Rule 2:
13
- * a loose match turns "the thing I meant appeared" into "something like it did", and the
14
- * agent acts on the difference. A wait that times out returns the page's real contents,
15
- * so a too-strict target is visible rather than silent.
16
- *
17
- * Rule 1: nothing here names a language, a framework or a file extension. */
18
- import type { SnapshotElement } from "./driver.ts";
19
- /** At least one of the two must be given; `waitFor` refuses an empty target rather than
20
- * matching the first element on the page. */
21
- export interface WaitForTarget {
22
- readonly role?: string;
23
- readonly name?: string;
24
- }
25
- export declare function isEmptyWaitTarget(target: WaitForTarget): boolean;
26
- export declare function matchesWaitTarget(element: SnapshotElement, target: WaitForTarget): boolean;
27
- /** For a reply a person reads. Says which fields were actually constraining, so a
28
- * timeout names the target that was waited on rather than a tidied version of it. */
29
- export declare function describeWaitTarget(target: WaitForTarget): string;
30
- /** Matches the fake driver's, so the contract's timing assertions mean the same on both. */
31
- export declare const WAIT_POLL_INTERVAL_MS = 25;
32
- export declare const WAIT_TIMEOUT_DEFAULT_MS = 5000;
33
- export declare const WAIT_TIMEOUT_MAX_MS = 30000;
34
- /** A ceiling a caller cannot remove. `waitFor` is the one verb whose whole job is to block,
35
- * so an unbounded value here is how one pathological page stops a whole run. */
36
- export declare function clampWaitTimeout(requested: number | undefined): number;
37
- //# sourceMappingURL=wait-target.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wait-target.d.ts","sourceRoot":"","sources":["../../src/browser/wait-target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;8EAgB8E;AAE9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;8CAC8C;AAC9C,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAEhE;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAK1F;AAED;sFACsF;AACtF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAKhE;AAED,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,uBAAuB,OAAQ,CAAC;AAC7C,eAAO,MAAM,mBAAmB,QAAS,CAAC;AAE1C;iFACiF;AACjF,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAGtE"}
@@ -1,54 +0,0 @@
1
- /** What `waitFor` is waiting for, and how a candidate is judged against it.
2
- *
3
- * Its own module because the fake driver and the real one must agree on the answer
4
- * exactly — a matcher copied into both is two matchers, and the contract test would
5
- * then be asserting that each implementation agrees with itself.
6
- *
7
- * A target names an element the way a snapshot presents one (role, accessible name) and
8
- * never a selector. That is the same rule every other verb obeys, held for the same
9
- * reason: an agent waiting on a raw selector is waiting on something it has not seen and
10
- * cannot describe, and whatever then matches it is an element nobody inspected.
11
- *
12
- * Matching is exact, case-insensitive, after trimming — no substring fallback. Rule 2:
13
- * a loose match turns "the thing I meant appeared" into "something like it did", and the
14
- * agent acts on the difference. A wait that times out returns the page's real contents,
15
- * so a too-strict target is visible rather than silent.
16
- *
17
- * Rule 1: nothing here names a language, a framework or a file extension. */
18
- function normalise(value) {
19
- return value.trim().toLowerCase();
20
- }
21
- export function isEmptyWaitTarget(target) {
22
- return (target.role ?? "").trim() === "" && (target.name ?? "").trim() === "";
23
- }
24
- export function matchesWaitTarget(element, target) {
25
- if (isEmptyWaitTarget(target))
26
- return false;
27
- if (target.role !== undefined && target.role.trim() !== "" && normalise(element.role) !== normalise(target.role))
28
- return false;
29
- if (target.name !== undefined && target.name.trim() !== "" && normalise(element.name) !== normalise(target.name))
30
- return false;
31
- return true;
32
- }
33
- /** For a reply a person reads. Says which fields were actually constraining, so a
34
- * timeout names the target that was waited on rather than a tidied version of it. */
35
- export function describeWaitTarget(target) {
36
- const parts = [];
37
- if (target.role !== undefined && target.role.trim() !== "")
38
- parts.push(`role "${target.role}"`);
39
- if (target.name !== undefined && target.name.trim() !== "")
40
- parts.push(`name "${target.name}"`);
41
- return parts.length === 0 ? "an unspecified element" : parts.join(", ");
42
- }
43
- /** Matches the fake driver's, so the contract's timing assertions mean the same on both. */
44
- export const WAIT_POLL_INTERVAL_MS = 25;
45
- export const WAIT_TIMEOUT_DEFAULT_MS = 5_000;
46
- export const WAIT_TIMEOUT_MAX_MS = 30_000;
47
- /** A ceiling a caller cannot remove. `waitFor` is the one verb whose whole job is to block,
48
- * so an unbounded value here is how one pathological page stops a whole run. */
49
- export function clampWaitTimeout(requested) {
50
- if (requested === undefined || !Number.isFinite(requested))
51
- return WAIT_TIMEOUT_DEFAULT_MS;
52
- return Math.max(0, Math.min(WAIT_TIMEOUT_MAX_MS, Math.trunc(requested)));
53
- }
54
- //# sourceMappingURL=wait-target.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wait-target.js","sourceRoot":"","sources":["../../src/browser/wait-target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;8EAgB8E;AAW9E,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAqB;IACrD,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAA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AC5F,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,CAAC;AAC7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAE1C;iFACiF;AACjF,MAAM,UAAU,gBAAgB,CAAC,SAA6B;IAC5D,IAAI,SAAS,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,uBAAuB,CAAC;IAC3F,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC"}
@@ -1,20 +0,0 @@
1
- /** What a tool does when the caller has already gone. `notifications/cancelled` stops the
2
- * server from waiting, not the work itself — a browser or process would keep running
3
- * unless released. Three rules: release only what this call started (never a caller's own
4
- * state), keep evidence already witnessed, never render a cancelled run as clean. State is
5
- * `refused` (a fact about Descry stopping) not `empty` (which would falsely say it looked and found nothing). */
6
- /** The reply state for a call that stopped because its signal was aborted. */
7
- export declare const CANCELLED_STATE: "refused";
8
- export declare function cancellationHeadline(what: string): string;
9
- /** @param stopped What this call stopped doing, in the caller's terms.
10
- * @param released What it tore down, if anything — omitted when nothing was released;
11
- * claiming a teardown that didn't happen is as false as hiding one that did. */
12
- export declare function cancellationNotes(stopped: string, released?: string): readonly string[];
13
- /** A promise that settles when the signal aborts, plus a way to stop listening.
14
- * `Promise.race` leaves the loser pending forever, so an unremoved listener leaks on a
15
- * signal that outlives the call — callers race then dispose in a `finally`. */
16
- export declare function whenAborted(signal: AbortSignal): {
17
- readonly promise: Promise<void>;
18
- dispose(): void;
19
- };
20
- //# sourceMappingURL=cancellation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cancellation.d.ts","sourceRoot":"","sources":["../src/cancellation.ts"],"names":[],"mappings":"AAAA;;;;kHAIkH;AAElH,8EAA8E;AAC9E,eAAO,MAAM,eAAe,EAAG,SAAkB,CAAC;AAElD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;iFAEiF;AACjF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAMvF;AAED;;gFAEgF;AAChF,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAAC,OAAO,IAAI,IAAI,CAAA;CAAE,CAgBrG"}
@@ -1,41 +0,0 @@
1
- /** What a tool does when the caller has already gone. `notifications/cancelled` stops the
2
- * server from waiting, not the work itself — a browser or process would keep running
3
- * unless released. Three rules: release only what this call started (never a caller's own
4
- * state), keep evidence already witnessed, never render a cancelled run as clean. State is
5
- * `refused` (a fact about Descry stopping) not `empty` (which would falsely say it looked and found nothing). */
6
- /** The reply state for a call that stopped because its signal was aborted. */
7
- export const CANCELLED_STATE = "refused";
8
- export function cancellationHeadline(what) {
9
- return `The call was cancelled; ${what}.`;
10
- }
11
- /** @param stopped What this call stopped doing, in the caller's terms.
12
- * @param released What it tore down, if anything — omitted when nothing was released;
13
- * claiming a teardown that didn't happen is as false as hiding one that did. */
14
- export function cancellationNotes(stopped, released) {
15
- return [
16
- `This call was cancelled before it finished. ${stopped} Nothing here is a finding about your ` +
17
- "application: the run stopped, it did not conclude.",
18
- ...(released === undefined ? [] : [released]),
19
- ];
20
- }
21
- /** A promise that settles when the signal aborts, plus a way to stop listening.
22
- * `Promise.race` leaves the loser pending forever, so an unremoved listener leaks on a
23
- * signal that outlives the call — callers race then dispose in a `finally`. */
24
- export function whenAborted(signal) {
25
- if (signal.aborted)
26
- return { promise: Promise.resolve(), dispose: () => { } };
27
- let onAbort = () => { };
28
- const promise = new Promise((resolve) => {
29
- onAbort = () => {
30
- resolve();
31
- };
32
- signal.addEventListener("abort", onAbort, { once: true });
33
- });
34
- return {
35
- promise,
36
- dispose: () => {
37
- signal.removeEventListener("abort", onAbort);
38
- },
39
- };
40
- }
41
- //# sourceMappingURL=cancellation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cancellation.js","sourceRoot":"","sources":["../src/cancellation.ts"],"names":[],"mappings":"AAAA;;;;kHAIkH;AAElH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,eAAe,GAAG,SAAkB,CAAC;AAElD,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAO,2BAA2B,IAAI,GAAG,CAAC;AAC5C,CAAC;AAED;;iFAEiF;AACjF,MAAM,UAAU,iBAAiB,CAAC,OAAe,EAAE,QAAiB;IAClE,OAAO;QACL,+CAA+C,OAAO,wCAAwC;YAC5F,oDAAoD;QACtD,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;KAC9C,CAAC;AACJ,CAAC;AAED;;gFAEgF;AAChF,MAAM,UAAU,WAAW,CAAC,MAAmB;IAC7C,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC;IAE7E,IAAI,OAAO,GAAe,GAAG,EAAE,GAAE,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QAC5C,OAAO,GAAG,GAAG,EAAE;YACb,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IACH,OAAO;QACL,OAAO;QACP,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/capped.d.ts DELETED
@@ -1,39 +0,0 @@
1
- /** `capped(items, limit) → { shown, detail }`, B6's fix. Three tools used to compute a list cut
2
- * three different ways; two left `render.ts` filling the gap with a `{shown:-1,total:-1}`
3
- * sentinel — worse than nothing, since it passes a presence check and poisons arithmetic. Now the
4
- * slice and the fact it happened are computed together, so a tool can't hold one without the other. */
5
- import type { TruncationDetail } from "./render.ts";
6
- export interface Capped<T> {
7
- /** The first `limit` items, in their original order. */
8
- readonly shown: readonly T[];
9
- /** `null` when nothing was withheld; otherwise the same `{shown, total}` shape `render.ts` puts
10
- * on the wire, so a tool can pass it straight through as `truncatedDetail`. */
11
- readonly detail: TruncationDetail | null;
12
- }
13
- /** Slices `items` to `limit` and reports the cost in the same call. A negative/fractional `limit`
14
- * is treated as zero rather than thrown — defensive only, callers already validate at the schema
15
- * boundary. */
16
- export declare function capped<T>(items: readonly T[], limit: number): Capped<T>;
17
- export interface SizeCapped<T> {
18
- /** A prefix of `items`, shorter exactly when `droppedForSize > 0`. */
19
- readonly shown: readonly T[];
20
- /** How many trailing items this call dropped — on top of whatever `capped()` already dropped
21
- * for `limit` before this ran. Zero means the `limit`-capped list already fit. */
22
- readonly droppedForSize: number;
23
- }
24
- /**
25
- * `fitToBudget`'s common case: a tool whose reply is a fixed scaffold plus one already-`limit`-
26
- * capped list of self-contained rows, none of which carries a droppable payload of its own — so
27
- * the only way to shrink is to drop trailing rows, exactly as `applyReplySizeBudget` does for
28
- * `get_git_diff`'s files, minus the per-row withholding that has nothing to withhold here.
29
- *
30
- * `scaffoldBytes` is the serialized cost of everything in `data` except this list (pass `[]` for
31
- * the list when measuring it) — the caller's to compute, because only it knows its own shape.
32
- * Never assumes it can spend the whole `budgetBytes` on the list alone.
33
- */
34
- export declare function capBySize<T>(items: readonly T[], budgetBytes: number, scaffoldBytes: number): SizeCapped<T>;
35
- /** The disclosure sentence for `capBySize`'s drop — appended to a tool's other notes only when
36
- * `droppedForSize > 0`; a silent drop is exactly the failure `render.ts`'s `fitToBudget` guards
37
- * against with `DisclosureError`. */
38
- export declare function sizeCapNote(noun: string, shownNow: number, shownBefore: number, droppedForSize: number): string;
39
- //# sourceMappingURL=capped.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capped.d.ts","sourceRoot":"","sources":["../src/capped.ts"],"names":[],"mappings":"AAAA;;;wGAGwG;AAIxG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,wDAAwD;IACxD,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;IAC7B;oFACgF;IAChF,QAAQ,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC1C;AAED;;gBAEgB;AAChB,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAKvE;AAED,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;IAC7B;uFACmF;IACnF,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAS3G;AAED;;sCAEsC;AACtC,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAK/G"}
package/dist/capped.js DELETED
@@ -1,43 +0,0 @@
1
- /** `capped(items, limit) → { shown, detail }`, B6's fix. Three tools used to compute a list cut
2
- * three different ways; two left `render.ts` filling the gap with a `{shown:-1,total:-1}`
3
- * sentinel — worse than nothing, since it passes a presence check and poisons arithmetic. Now the
4
- * slice and the fact it happened are computed together, so a tool can't hold one without the other. */
5
- import { applyReplySizeBudget } from "@descryy/core";
6
- /** Slices `items` to `limit` and reports the cost in the same call. A negative/fractional `limit`
7
- * is treated as zero rather than thrown — defensive only, callers already validate at the schema
8
- * boundary. */
9
- export function capped(items, limit) {
10
- const bound = Number.isFinite(limit) && limit > 0 ? Math.floor(limit) : 0;
11
- const shown = items.slice(0, bound);
12
- if (shown.length >= items.length)
13
- return { shown, detail: null };
14
- return { shown, detail: { shown: shown.length, total: items.length, more: null } };
15
- }
16
- /**
17
- * `fitToBudget`'s common case: a tool whose reply is a fixed scaffold plus one already-`limit`-
18
- * capped list of self-contained rows, none of which carries a droppable payload of its own — so
19
- * the only way to shrink is to drop trailing rows, exactly as `applyReplySizeBudget` does for
20
- * `get_git_diff`'s files, minus the per-row withholding that has nothing to withhold here.
21
- *
22
- * `scaffoldBytes` is the serialized cost of everything in `data` except this list (pass `[]` for
23
- * the list when measuring it) — the caller's to compute, because only it knows its own shape.
24
- * Never assumes it can spend the whole `budgetBytes` on the list alone.
25
- */
26
- export function capBySize(items, budgetBytes, scaffoldBytes) {
27
- const result = applyReplySizeBudget(items, {
28
- maxTotalBytes: Math.max(budgetBytes - scaffoldBytes, 0),
29
- overheadBytes: 0,
30
- sizeOf: (item) => Buffer.byteLength(JSON.stringify(item) ?? "null", "utf8") + 1,
31
- hasPayload: () => false,
32
- withhold: (item) => item,
33
- });
34
- return { shown: result.items, droppedForSize: result.droppedCount };
35
- }
36
- /** The disclosure sentence for `capBySize`'s drop — appended to a tool's other notes only when
37
- * `droppedForSize > 0`; a silent drop is exactly the failure `render.ts`'s `fitToBudget` guards
38
- * against with `DisclosureError`. */
39
- export function sizeCapNote(noun, shownNow, shownBefore, droppedForSize) {
40
- return (`${droppedForSize} further ${noun}(s), already within the "limit" cap, were dropped to fit the ` +
41
- `reply's overall size budget — ${shownNow} of the ${shownBefore} that limit allowed are shown here.`);
42
- }
43
- //# sourceMappingURL=capped.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capped.js","sourceRoot":"","sources":["../src/capped.ts"],"names":[],"mappings":"AAAA;;;wGAGwG;AAExG,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAYrD;;gBAEgB;AAChB,MAAM,UAAU,MAAM,CAAI,KAAmB,EAAE,KAAa;IAC1D,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACpC,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM;QAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACjE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;AACrF,CAAC;AAUD;;;;;;;;;GASG;AACH,MAAM,UAAU,SAAS,CAAI,KAAmB,EAAE,WAAmB,EAAE,aAAqB;IAC1F,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,EAAE;QACzC,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,aAAa,EAAE,CAAC,CAAC;QACvD,aAAa,EAAE,CAAC;QAChB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC;QAC/E,UAAU,EAAE,GAAG,EAAE,CAAC,KAAK;QACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI;KACzB,CAAC,CAAC;IACH,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;AACtE,CAAC;AAED;;sCAEsC;AACtC,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,QAAgB,EAAE,WAAmB,EAAE,cAAsB;IACrG,OAAO,CACL,GAAG,cAAc,YAAY,IAAI,+DAA+D;QAChG,iCAAiC,QAAQ,WAAW,WAAW,qCAAqC,CACrG,CAAC;AACJ,CAAC"}
@@ -1,22 +0,0 @@
1
- import type { CredentialStoreLike } from "./scenarios/index.ts";
2
- export interface CredentialStoreOptions {
3
- /** Overrides the documented default (`~/.descry/credentials`) — for isolation in a test,
4
- * never in production use, where the shared, documented location is the point: a
5
- * credential stored once via `descry credential set` must be the same store a later
6
- * `descry-mcp` process reads. */
7
- readonly baseDir?: string;
8
- }
9
- /** The full three-method shape (`store`/`retrieve`/`delete`) — `CredentialStoreLike` only
10
- * needs `retrieve` for a scenario replay, but `descry credential set` needs `store` too, and
11
- * both callers share one factory rather than each constructing `EncryptedFileCredentialStore`
12
- * directly. */
13
- export interface WritableCredentialStore extends CredentialStoreLike {
14
- store(credentialRef: string, secret: string): Promise<void>;
15
- delete(credentialRef: string): Promise<void>;
16
- }
17
- /** Constructs the real, at-rest credential store — AES-256-GCM file backing, documented
18
- * default location. Every real `descry-mcp` process calls this once at startup
19
- * (`bin/descry-mcp.ts`) and sets it on the `Session`; `descry credential set` calls it to
20
- * write into the exact same store. */
21
- export declare function createDefaultCredentialStore(options?: CredentialStoreOptions): WritableCredentialStore;
22
- //# sourceMappingURL=credential-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"credential-store.d.ts","sourceRoot":"","sources":["../src/credential-store.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,WAAW,sBAAsB;IACrC;;;sCAGkC;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;gBAGgB;AAChB,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAClE,KAAK,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9C;AAED;;;uCAGuC;AACvC,wBAAgB,4BAA4B,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,uBAAuB,CAEtG"}
@@ -1,33 +0,0 @@
1
- /**
2
- * The real credential store a running `descry-mcp` server uses, not a test double.
3
- *
4
- * `Session.credentialStore` (`session.ts`) has been settable since the round that added
5
- * `${credential:NAME}` scenario references, but nothing outside a test ever set it — every
6
- * real server left it `undefined`, so `${credential:...}` refused unconditionally no matter
7
- * what a person had stored. RG-1(4)'s remaining gap.
8
- *
9
- * `descry-runtime`'s `EncryptedFileCredentialStore` (`@descryy/runtime-environment-profile`,
10
- * already one of this package's nine runtime dependencies — see `descry-core`'s CLAUDE.md,
11
- * "Repo split") is the store: AES-256-GCM at rest, one file per credential named by the
12
- * SHA-256 hash of its ref, key at `<baseDir>/master.key`, both directory and key chmod'd
13
- * owner-only. Documented default location: `~/.descry/credentials` (`homedir()`, joined with
14
- * `.descry/credentials` — see that package's own header for why this is a disclosed fallback
15
- * rather than a real OS keychain, DEC-270). `baseDir` is exposed here, not hidden, so a test —
16
- * or a future caller with a reason to isolate the store — can point it elsewhere without
17
- * reaching past this module into the runtime package directly.
18
- *
19
- * This module is the one place `@descryy/mcp` constructs the real store; `bin/descry-mcp.ts`
20
- * is the one place a real server calls it. `@descryy/cli`'s `descry credential set` (
21
- * `packages/cli/src/commands/credential.ts`) calls it too, through this package's own export
22
- * surface (`index.ts`) rather than adding a second, redundant dependency on the runtime
23
- * package for a CLI that otherwise has no reason to know it exists.
24
- */
25
- import { EncryptedFileCredentialStore } from "@descryy/runtime-environment-profile";
26
- /** Constructs the real, at-rest credential store — AES-256-GCM file backing, documented
27
- * default location. Every real `descry-mcp` process calls this once at startup
28
- * (`bin/descry-mcp.ts`) and sets it on the `Session`; `descry credential set` calls it to
29
- * write into the exact same store. */
30
- export function createDefaultCredentialStore(options) {
31
- return new EncryptedFileCredentialStore(options);
32
- }
33
- //# sourceMappingURL=credential-store.js.map