@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,264 +0,0 @@
1
- /**
2
- * One journey format, projected both ways — `DEC-NEXT-runtime-journey-is-one-declared-format`.
3
- *
4
- * ## The problem this closes
5
- *
6
- * The MCP `Scenario` (this directory) and the desktop's `BrowserStep`
7
- * (`descry-desktop/packages/session/src/pipeline/browser-drive.ts`) are two
8
- * step vocabularies that both describe "things a browser does in order", and
9
- * until now nothing turned one into the other. A `Scenario`'s
10
- * `TargetDescriptor` — role, name **and** selector together — is the bridge:
11
- * `BrowserStep`'s verbs are selector-only, a strict narrowing of what a
12
- * `TargetDescriptor` carries, so a saved scenario is projectable onto a
13
- * driveable plan without inventing anything.
14
- *
15
- * ## Why the projected type is not `BrowserStep` itself
16
- *
17
- * This package (`descry-core`) cannot depend on `descry-desktop`, and
18
- * `BrowserStep` carries only a `selector`, not the full descriptor. A
19
- * consumer that needs to *drive* a browser (the desktop's
20
- * `browser-adapter.ts`) reads `ProjectedStep.target.selector` and discards
21
- * the rest — that narrowing is the desktop's own, documented where it
22
- * happens. A consumer that needs to go the other way (turn a driven plan
23
- * back into a committed scenario) needs the full descriptor, which a bare
24
- * selector cannot supply — recovering a role and a name from a selector
25
- * alone would be exactly the kind of guess rule 2 forbids. So the
26
- * projection's own carrier (`ProjectedStep`) is deliberately richer than
27
- * `BrowserStep`: it is the one shape both directions can be exact about.
28
- *
29
- * ## What is and is not projectable
30
- *
31
- * Total, both directions: `navigate`, `click`, `type`, `select`, `submit`,
32
- * and the two assertion kinds that are about one element —
33
- * `elementVisible` ⇄ `assertVisible`, `textEquals` ⇄ `assertText`.
34
- *
35
- * Refused by name, forward (`Scenario` → plan): `fill` — `BrowserStep` has
36
- * only `type`, and `type` fires real keystrokes while `fill` sets the value
37
- * directly with none; collapsing one into the other would silently change
38
- * what the driven browser does. `urlEquals`, `noConsoleErrors`,
39
- * `noFailedRequests` — assertions about the whole page or the run, not
40
- * about an element `BrowserStep` can act on or assert against.
41
- *
42
- * Refused by name, reverse (a driven step list → `Scenario`): any kind
43
- * outside the seven above — `waitFor` and `screenshot` are the desktop's
44
- * own verbs with no `Scenario` counterpart at all.
45
- *
46
- * A step whose stored `text` is a secret reference (`${env:VAR}`) or a
47
- * credential reference (`${credential:NAME}`) is resolved before the plan
48
- * is built, never carried through unresolved — a plan is something about to
49
- * be driven, and driving an unresolved reference would type its literal
50
- * characters into the page (see `secret-ref.ts`/`credential-ref.ts`). A
51
- * `${credential:NAME}` is resolved against the `credentials` map a caller
52
- * passes in — this module has no store of its own (RG-1/"signin": the
53
- * desktop resolves names against its own App-configuration secret store, an
54
- * MCP server against `Session.credentialStore`; the caller already knows
55
- * which, and does the async lookup before calling this synchronous
56
- * function — see `resolveEitherRef` for why the two schemes are resolved by
57
- * the same two-step shape, name first, value second, everywhere else in
58
- * this package). An unresolved reference — of either scheme — is reported
59
- * as a refusal
60
- * naming the step's action and index, not as a defect in the application.
61
- *
62
- * ## The round trip
63
- *
64
- * `projectScenarioToRunPlan` then `projectRunPlanToScenario` on a scenario
65
- * that uses only the projectable verbs reproduces the original steps and
66
- * assertions exactly — see `browser-run-plan-projection.test.ts`. The
67
- * `anchor` field on an assertion-kind `ProjectedStep` is what makes the
68
- * reverse direction exact rather than a guess: it is carried straight
69
- * through from `ScenarioAssertion.afterStep`, never recomputed from
70
- * position, because a null-anchored (end-of-scenario) assertion and one
71
- * anchored at the final step are otherwise indistinguishable by position
72
- * alone once both are the last things a plan does.
73
- */
74
- import { resolveSecretText } from "./secret-ref.js";
75
- import { readCredentialRef } from "./credential-ref.js";
76
- import { SCENARIO_SCHEMA_VERSION } from "./scenario.js";
77
- const PROJECTED_KINDS = ["navigate", "click", "type", "select", "submit", "assertVisible", "assertText"];
78
- function refuse(verb, index, reason) {
79
- return { ok: false, verb, index, reason };
80
- }
81
- /**
82
- * `Scenario` → a driveable plan. `env` resolves any `${env:VAR}` text the
83
- * same way `replayScenario` does — defaulted to `process.env` so every
84
- * caller that does not inject one behaves like driving the browser
85
- * directly, and injectable so a test never has to mutate the process.
86
- *
87
- * `credentials` resolves any `${credential:NAME}` text — a plain, already-resolved
88
- * name-to-value map rather than a live `CredentialStoreLike`, because this function is
89
- * synchronous and a real store's `retrieve()` is not: the caller (an MCP tool against
90
- * `Session.credentialStore`, the desktop against its own App-configuration secret store)
91
- * does the async lookup for every name `referencedCredentials` finds before calling this,
92
- * the same "resolve, then build" order `resolveEitherRef` uses everywhere else in this
93
- * package. Defaulted to `{}` — every caller before RG-1/"signin" passed none, and a
94
- * scenario using only `${env:...}` behaves exactly as before.
95
- */
96
- export function projectScenarioToRunPlan(scenario, env = process.env, credentials = {}) {
97
- // One pass builds the real-step projections, keyed by their scenario index,
98
- // so assertions anchored at that index can be spliced in right after it —
99
- // mirroring `replayScenario`'s own `evaluateAnchored(index, ...)` timing.
100
- const realSteps = new Map();
101
- for (const [index, step] of scenario.steps.entries()) {
102
- const projected = projectStep(step, index, env, credentials);
103
- if (!projected.ok)
104
- return projected;
105
- realSteps.set(index, projected.step);
106
- }
107
- const immediateAssertions = new Map();
108
- const endAssertions = [];
109
- for (const [index, assertion] of scenario.assertions.entries()) {
110
- const projected = projectAssertion(assertion, index);
111
- if (!projected.ok)
112
- return projected;
113
- if (assertion.afterStep === null) {
114
- endAssertions.push(projected.step);
115
- }
116
- else {
117
- const bucket = immediateAssertions.get(assertion.afterStep) ?? [];
118
- bucket.push(projected.step);
119
- immediateAssertions.set(assertion.afterStep, bucket);
120
- }
121
- }
122
- const steps = [];
123
- scenario.steps.forEach((_, index) => {
124
- steps.push(realSteps.get(index));
125
- steps.push(...(immediateAssertions.get(index) ?? []));
126
- });
127
- steps.push(...endAssertions);
128
- return { ok: true, plan: { startUrl: scenario.targetUrl, steps } };
129
- }
130
- function projectStep(step, index, env, credentials) {
131
- if (step.action === "fill") {
132
- return refuse("fill", index, `step ${index}: "fill" has no counterpart in the driveable step vocabulary — that vocabulary has only "type", ` +
133
- "which fires real keystrokes, while fill sets the value directly and fires none. Collapsing one into the " +
134
- "other would drive the browser differently from what the scenario declared, so this step is refused rather " +
135
- "than silently narrowed.");
136
- }
137
- if (step.action === "navigate") {
138
- return { ok: true, step: { kind: "navigate", target: null, url: step.url, text: null, anchor: null } };
139
- }
140
- const target = step.target;
141
- if (target === null) {
142
- return refuse(step.action, index, `step ${index}: "${step.action}" acts on an element and carries no target to project.`);
143
- }
144
- if (step.action === "type" || step.action === "select") {
145
- const raw = step.text ?? "";
146
- // `${credential:NAME}` is this scheme's own shape and nothing else recognises it —
147
- // checked first, exactly as `resolveEitherRef` orders the two, so a well-formed
148
- // credential reference is never misreported as a malformed `${env:...}` one.
149
- const credentialRef = readCredentialRef(raw);
150
- if (credentialRef.kind === "ref") {
151
- const value = credentials[credentialRef.name];
152
- if (value === undefined || value === "") {
153
- return refuse(step.action, index, `step ${index}: this step needs the credential "${credentialRef.name}", and nothing was resolved for ` +
154
- "it. Nothing was typed and the projection stopped here: a step that types the literal text of its " +
155
- "own reference would fail against the application and be reported as the application's defect.");
156
- }
157
- return { ok: true, step: { kind: step.action, target, url: null, text: value, anchor: null } };
158
- }
159
- if (credentialRef.kind === "malformed") {
160
- return refuse(step.action, index, `step ${index}: ${credentialRef.message}`);
161
- }
162
- const resolved = resolveSecretText(raw, env);
163
- if (!resolved.resolved)
164
- return refuse(step.action, index, `step ${index}: ${resolved.reason}`);
165
- return { ok: true, step: { kind: step.action, target, url: null, text: resolved.value, anchor: null } };
166
- }
167
- // click, submit
168
- return { ok: true, step: { kind: step.action, target, url: null, text: null, anchor: null } };
169
- }
170
- function projectAssertion(assertion, index) {
171
- const anchor = assertion.afterStep === null ? "end" : "immediate";
172
- if (assertion.kind === "elementVisible") {
173
- if (assertion.target === null) {
174
- return refuse("elementVisible", index, `assertion ${index}: elementVisible names no element to project.`);
175
- }
176
- return { ok: true, step: { kind: "assertVisible", target: assertion.target, url: null, text: null, anchor } };
177
- }
178
- if (assertion.kind === "textEquals") {
179
- if (assertion.target === null || assertion.expected === null) {
180
- return refuse("textEquals", index, `assertion ${index}: textEquals needs both an element and an expected value to project.`);
181
- }
182
- return { ok: true, step: { kind: "assertText", target: assertion.target, url: null, text: assertion.expected, anchor } };
183
- }
184
- return refuse(assertion.kind, index, `assertion ${index}: "${assertion.kind}" has no counterpart in the driveable step vocabulary — that vocabulary ` +
185
- "has no step that asserts about the whole page or the run rather than about one element, so this assertion " +
186
- "is refused rather than dropped.");
187
- }
188
- /**
189
- * A driveable plan → `Scenario`. Total for the seven shared verbs; refuses
190
- * by name for anything else (`waitFor`, `screenshot`, or any unrecognised
191
- * kind a caller hands in).
192
- */
193
- export function projectRunPlanToScenario(plan, meta) {
194
- const steps = [];
195
- const assertions = [];
196
- let lastStepIndex = -1;
197
- for (const [index, raw] of plan.steps.entries()) {
198
- if (!PROJECTED_KINDS.includes(raw.kind)) {
199
- return refuse(raw.kind, index, `plan step ${index}: "${raw.kind}" has no counterpart in the scenario format — the scenario format has no ` +
200
- "verb for it, so this step is refused rather than dropped.");
201
- }
202
- const kind = raw.kind;
203
- if (kind === "assertVisible" || kind === "assertText") {
204
- if (raw.anchor === null) {
205
- return refuse(kind, index, `plan step ${index}: an assertion step carries no anchor to project.`);
206
- }
207
- if (raw.anchor === "immediate" && lastStepIndex === -1) {
208
- return refuse(kind, index, `plan step ${index}: this assertion is anchored immediately after a step, and no step precedes it — a ` +
209
- "scenario assertion can only anchor after a real step, or after the whole scenario. Refused rather " +
210
- "than guessing an anchor.");
211
- }
212
- if (raw.target === null) {
213
- return refuse(kind, index, `plan step ${index}: "${kind}" carries no target to project.`);
214
- }
215
- const afterStep = raw.anchor === "end" ? null : lastStepIndex;
216
- if (kind === "assertVisible") {
217
- assertions.push({ kind: "elementVisible", afterStep, target: raw.target, expected: null });
218
- }
219
- else {
220
- if (raw.text === null) {
221
- return refuse(kind, index, `plan step ${index}: "assertText" carries no expected text to project.`);
222
- }
223
- assertions.push({ kind: "textEquals", afterStep, target: raw.target, expected: raw.text });
224
- }
225
- continue;
226
- }
227
- if (kind === "navigate") {
228
- if (raw.url === null)
229
- return refuse("navigate", index, `plan step ${index}: "navigate" carries no url to project.`);
230
- steps.push({ action: "navigate", target: null, url: raw.url, text: null });
231
- lastStepIndex += 1;
232
- continue;
233
- }
234
- if (raw.target === null)
235
- return refuse(kind, index, `plan step ${index}: "${kind}" carries no target to project.`);
236
- if (kind === "type" || kind === "select") {
237
- if (raw.text === null)
238
- return refuse(kind, index, `plan step ${index}: "${kind}" carries no text to project.`);
239
- steps.push({ action: kind, target: raw.target, url: null, text: raw.text });
240
- lastStepIndex += 1;
241
- continue;
242
- }
243
- // click, submit
244
- steps.push({ action: kind, target: raw.target, url: null, text: null });
245
- lastStepIndex += 1;
246
- }
247
- if (steps.length === 0) {
248
- return refuse("(none)", null, "the plan has no driveable steps to project — a scenario needs at least one step.");
249
- }
250
- return {
251
- ok: true,
252
- scenario: {
253
- schemaVersion: SCENARIO_SCHEMA_VERSION,
254
- name: meta.name,
255
- description: meta.description,
256
- targetUrl: plan.startUrl,
257
- savedAt: meta.savedAt,
258
- savedAtCommit: meta.savedAtCommit,
259
- steps,
260
- assertions,
261
- },
262
- };
263
- }
264
- //# sourceMappingURL=browser-run-plan-projection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser-run-plan-projection.js","sourceRoot":"","sources":["../../src/scenarios/browser-run-plan-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAEH,OAAO,EAAE,iBAAiB,EAA0B,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAmF,MAAM,eAAe,CAAC;AAKzI,MAAM,eAAe,GAAiC,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAA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kF,CAAC,CAAC;IACpH,CAAC;IAED,OAAO;QACL,EAAE,EAAE,IAAI;QACR,QAAQ,EAAE;YACR,aAAa,EAAE,uBAAuB;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,IAAI,CAAC,QAAQ;YACxB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,KAAK;YACL,UAAU;SACX;KACF,CAAC;AACJ,CAAC"}
@@ -1,102 +0,0 @@
1
- /**
2
- * `${credential:NAME}` — a scenario step names a stored credential by
3
- * reference; the credential store holds the value. Lane A1, item 4 of
4
- * `documents/plans/runtime-gap-closure.md` ("Sign-in as a first-class
5
- * step"). Appended to `DEC-NEXT-scenario-format-needs-a-secret-reference.md`
6
- * rather than rewriting it — see that file's own note.
7
- *
8
- * ## Why a second module, not a second branch inside `secret-ref.ts`
9
- *
10
- * `secret-ref.ts`'s own header already reserves this extension point:
11
- * *"A keychain becomes a second scheme with its own prefix and its own
12
- * refusal, not a fallback behind the first one. Nothing about the stored
13
- * file changes when it arrives."* This module is that second scheme,
14
- * `credential:` rather than `keychain:` because the store it resolves
15
- * against (`descry-runtime`'s `CredentialStore`, an at-rest encrypted file
16
- * store today, a real OS keychain later behind the same three-method
17
- * interface) is named for what it is, not for today's backend. Kept in its
18
- * own file rather than added as a branch inside `readSecretRef` so the two
19
- * schemes stay independently resolvable — a caller that only has an
20
- * environment map (`resolveSecretText`) and one that only has a credential
21
- * store (`resolveCredentialText`, here) each fail closed on the scheme they
22
- * cannot serve, rather than one function silently depending on both.
23
- *
24
- * ## What this does not attempt
25
- *
26
- * A step naming `${credential:NAME}` still types the resolved value into a
27
- * field with `type`/`fill`/`select` — the same verbs, the same replay path,
28
- * the same "whole field or none of it" and "empty is refused" rules as
29
- * `secret-ref.ts`. It does **not** add a session-seeding step that logs a
30
- * whole browser context in via a saved storage state mid-replay — that
31
- * would need a driver-level primitive (`packages/mcp/src/browser/driver.ts`,
32
- * `playwright-driver.ts`) to inject cookies into a session already in
33
- * progress, and this lane does not own those files. `auth.ts`'s
34
- * `loadStorageStateFile` already seeds a **new** session at
35
- * `browser_start_session` time; wiring a credential-store-backed profile
36
- * into that call is a smaller, real gap, and is recorded as a handoff in
37
- * `DEC-NEXT-scenario-format-needs-a-secret-reference.md` rather than built
38
- * here by touching a port this lane does not own.
39
- *
40
- * Rule 1: an environment variable is a fact about a process; a credential
41
- * reference is a fact about a name a person chose. Neither module needs to
42
- * know what kind of secret it resolves to.
43
- */
44
- import { type SecretEnvironment } from "./secret-ref.ts";
45
- export type CredentialRef = {
46
- readonly kind: "literal";
47
- readonly text: string;
48
- } | {
49
- readonly kind: "ref";
50
- readonly name: string;
51
- } | {
52
- readonly kind: "malformed";
53
- readonly message: string;
54
- };
55
- /** Reads one stored `text` field for the `credential:` scheme alone. A `${env:...}` reference is
56
- * a literal as far as this function is concerned — `secret-ref.ts`'s `readSecretRef` is what
57
- * resolves that scheme, and a caller resolving both composes the two (see `resolveEitherRef`). */
58
- export declare function readCredentialRef(text: string): CredentialRef;
59
- export declare function isCredentialRef(text: string): boolean;
60
- /** What to write into a file so `name` is resolved from the credential store at replay. */
61
- export declare function credentialRefFor(name: string): string;
62
- /**
63
- * The minimal shape this module needs from a credential store — structurally
64
- * the same three-method interface as `descry-runtime`'s `CredentialStore`
65
- * (`packages/environment-profile/src/credential-store.ts`), restated rather
66
- * than imported: this package does not depend on `descry-runtime` (see
67
- * `descry-core`'s `CLAUDE.md`, "Repo split"), and a structural interface is
68
- * enough — any store satisfying it, real or a test double, resolves here.
69
- */
70
- export interface CredentialStoreLike {
71
- retrieve(credentialRef: string): Promise<string | null>;
72
- }
73
- export type CredentialResolution = {
74
- readonly resolved: true;
75
- readonly value: string;
76
- } | {
77
- readonly resolved: false;
78
- readonly reason: string;
79
- };
80
- /**
81
- * Turns one stored `text` into the string to type, or says why it cannot —
82
- * `secret-ref.ts`'s `resolveSecretText`, restated against a credential store
83
- * instead of an environment map. An unset name and an empty stored value are
84
- * both refusals, for the same reason `resolveSecretText` refuses an empty
85
- * environment variable: an empty password produces a failed login that
86
- * reads exactly like a broken application.
87
- */
88
- export declare function resolveCredentialText(text: string, store: CredentialStoreLike): Promise<CredentialResolution>;
89
- /** Every credential name a scenario's steps reference, in order, deduplicated — the `${credential:...}` counterpart to `secret-ref.ts`'s `referencedVariables`. */
90
- export declare function referencedCredentials(texts: readonly (string | null)[]): readonly string[];
91
- /**
92
- * Resolves a step's stored text against **both** schemes: `${credential:NAME}` checked first
93
- * (this module owns that shape and nothing else recognises it), `${env:VAR}` and plain literals
94
- * delegated to `resolveSecretText` otherwise. One entry point so a caller (`scenario-runner.ts`)
95
- * never has to decide which resolver a given step's text needs — the reference's own prefix
96
- * decides. `store` is optional: a scenario naming `${credential:NAME}` with no store configured
97
- * refuses by name rather than falling through to `resolveSecretText`, which would report it as a
98
- * malformed `${env:...}` reference — a true statement about that resolver and a confusing one
99
- * about this file's own scheme.
100
- */
101
- export declare function resolveEitherRef(text: string, env: SecretEnvironment, store: CredentialStoreLike | undefined): Promise<CredentialResolution>;
102
- //# sourceMappingURL=credential-ref.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"credential-ref.d.ts","sourceRoot":"","sources":["../../src/scenarios/credential-ref.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAS5E,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D;;mGAEmG;AACnG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAgB7D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACzD;AAED,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1D;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA0BnH;AAED,mKAAmK;AACnK,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,SAAS,MAAM,EAAE,CAQ1F;AAED;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,iBAAiB,EACtB,KAAK,EAAE,mBAAmB,GAAG,SAAS,GACrC,OAAO,CAAC,oBAAoB,CAAC,CAiB/B"}
@@ -1,148 +0,0 @@
1
- /**
2
- * `${credential:NAME}` — a scenario step names a stored credential by
3
- * reference; the credential store holds the value. Lane A1, item 4 of
4
- * `documents/plans/runtime-gap-closure.md` ("Sign-in as a first-class
5
- * step"). Appended to `DEC-NEXT-scenario-format-needs-a-secret-reference.md`
6
- * rather than rewriting it — see that file's own note.
7
- *
8
- * ## Why a second module, not a second branch inside `secret-ref.ts`
9
- *
10
- * `secret-ref.ts`'s own header already reserves this extension point:
11
- * *"A keychain becomes a second scheme with its own prefix and its own
12
- * refusal, not a fallback behind the first one. Nothing about the stored
13
- * file changes when it arrives."* This module is that second scheme,
14
- * `credential:` rather than `keychain:` because the store it resolves
15
- * against (`descry-runtime`'s `CredentialStore`, an at-rest encrypted file
16
- * store today, a real OS keychain later behind the same three-method
17
- * interface) is named for what it is, not for today's backend. Kept in its
18
- * own file rather than added as a branch inside `readSecretRef` so the two
19
- * schemes stay independently resolvable — a caller that only has an
20
- * environment map (`resolveSecretText`) and one that only has a credential
21
- * store (`resolveCredentialText`, here) each fail closed on the scheme they
22
- * cannot serve, rather than one function silently depending on both.
23
- *
24
- * ## What this does not attempt
25
- *
26
- * A step naming `${credential:NAME}` still types the resolved value into a
27
- * field with `type`/`fill`/`select` — the same verbs, the same replay path,
28
- * the same "whole field or none of it" and "empty is refused" rules as
29
- * `secret-ref.ts`. It does **not** add a session-seeding step that logs a
30
- * whole browser context in via a saved storage state mid-replay — that
31
- * would need a driver-level primitive (`packages/mcp/src/browser/driver.ts`,
32
- * `playwright-driver.ts`) to inject cookies into a session already in
33
- * progress, and this lane does not own those files. `auth.ts`'s
34
- * `loadStorageStateFile` already seeds a **new** session at
35
- * `browser_start_session` time; wiring a credential-store-backed profile
36
- * into that call is a smaller, real gap, and is recorded as a handoff in
37
- * `DEC-NEXT-scenario-format-needs-a-secret-reference.md` rather than built
38
- * here by touching a port this lane does not own.
39
- *
40
- * Rule 1: an environment variable is a fact about a process; a credential
41
- * reference is a fact about a name a person chose. Neither module needs to
42
- * know what kind of secret it resolves to.
43
- */
44
- import { resolveSecretText } from "./secret-ref.js";
45
- /** `${credential:NAME}` — the credential name is deliberately permissive
46
- * (letters, digits, `-`, `_`, `.`) because a credential ref is a name a
47
- * person or a store assigns, not a POSIX environment variable. */
48
- const REFERENCE = /^\$\{credential:([A-Za-z0-9_.-]+)\}$/;
49
- const LOOKS_LIKE_REFERENCE = /^\$\{credential:[^}]*\}$/;
50
- /** Reads one stored `text` field for the `credential:` scheme alone. A `${env:...}` reference is
51
- * a literal as far as this function is concerned — `secret-ref.ts`'s `readSecretRef` is what
52
- * resolves that scheme, and a caller resolving both composes the two (see `resolveEitherRef`). */
53
- export function readCredentialRef(text) {
54
- const matched = REFERENCE.exec(text);
55
- if (matched !== null)
56
- return { kind: "ref", name: matched[1] };
57
- if (LOOKS_LIKE_REFERENCE.test(text)) {
58
- return {
59
- kind: "malformed",
60
- message: `${JSON.stringify(text)} is written like a credential reference and is not one. The only form is ` +
61
- '"${credential:NAME}", whole field, with the name made of letters, digits, "-", "_" or ".", no other ' +
62
- "text around it. It is refused rather than stored as text on purpose, for the same reason a malformed " +
63
- "${env:...} reference is: typed verbatim into a login form, it would be reported as the application's defect.",
64
- };
65
- }
66
- return { kind: "literal", text };
67
- }
68
- export function isCredentialRef(text) {
69
- return readCredentialRef(text).kind === "ref";
70
- }
71
- /** What to write into a file so `name` is resolved from the credential store at replay. */
72
- export function credentialRefFor(name) {
73
- return `\${credential:${name}}`;
74
- }
75
- /**
76
- * Turns one stored `text` into the string to type, or says why it cannot —
77
- * `secret-ref.ts`'s `resolveSecretText`, restated against a credential store
78
- * instead of an environment map. An unset name and an empty stored value are
79
- * both refusals, for the same reason `resolveSecretText` refuses an empty
80
- * environment variable: an empty password produces a failed login that
81
- * reads exactly like a broken application.
82
- */
83
- export async function resolveCredentialText(text, store) {
84
- const ref = readCredentialRef(text);
85
- if (ref.kind === "literal")
86
- return { resolved: true, value: ref.text };
87
- if (ref.kind === "malformed")
88
- return { resolved: false, reason: ref.message };
89
- const value = await store.retrieve(ref.name);
90
- if (value === null) {
91
- return {
92
- resolved: false,
93
- reason: `this step needs the credential "${ref.name}", and nothing is stored under that name. The scenario was ` +
94
- "saved with a reference instead of the value on purpose — the value is a credential and a scenario is a " +
95
- `committed file. Store it under "${ref.name}" before replaying. Nothing was typed and the replay stopped ` +
96
- "here: a step that types the literal text of its own reference would fail against the application and be " +
97
- "reported as the application's defect.",
98
- };
99
- }
100
- if (value === "") {
101
- return {
102
- resolved: false,
103
- reason: `the credential "${ref.name}" is stored and empty. An empty value is refused rather than typed: an empty ` +
104
- "password produces a failed login that reads exactly like a broken application.",
105
- };
106
- }
107
- return { resolved: true, value };
108
- }
109
- /** Every credential name a scenario's steps reference, in order, deduplicated — the `${credential:...}` counterpart to `secret-ref.ts`'s `referencedVariables`. */
110
- export function referencedCredentials(texts) {
111
- const out = [];
112
- for (const text of texts) {
113
- if (text === null)
114
- continue;
115
- const ref = readCredentialRef(text);
116
- if (ref.kind === "ref" && !out.includes(ref.name))
117
- out.push(ref.name);
118
- }
119
- return out;
120
- }
121
- /**
122
- * Resolves a step's stored text against **both** schemes: `${credential:NAME}` checked first
123
- * (this module owns that shape and nothing else recognises it), `${env:VAR}` and plain literals
124
- * delegated to `resolveSecretText` otherwise. One entry point so a caller (`scenario-runner.ts`)
125
- * never has to decide which resolver a given step's text needs — the reference's own prefix
126
- * decides. `store` is optional: a scenario naming `${credential:NAME}` with no store configured
127
- * refuses by name rather than falling through to `resolveSecretText`, which would report it as a
128
- * malformed `${env:...}` reference — a true statement about that resolver and a confusing one
129
- * about this file's own scheme.
130
- */
131
- export async function resolveEitherRef(text, env, store) {
132
- const asCredential = readCredentialRef(text);
133
- if (asCredential.kind === "ref") {
134
- if (store === undefined) {
135
- return {
136
- resolved: false,
137
- reason: `this step needs the credential "${asCredential.name}", and no credential store is configured for this ` +
138
- "replay. Sign-in-as-profile steps need a credential store wired in by the caller (browser_run_scenario's " +
139
- "own runner); nothing was typed.",
140
- };
141
- }
142
- return resolveCredentialText(text, store);
143
- }
144
- if (asCredential.kind === "malformed")
145
- return { resolved: false, reason: asCredential.message };
146
- return resolveSecretText(text, env);
147
- }
148
- //# sourceMappingURL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;IACxE,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,IAAY,EACZ,GAAsB,EACtB,KAAsC;IAEtC,MAAM,YAAY,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC7C,IAAI,YAAY,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;QAChC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,MAAM,EACJ,mCAAmC,YAAY,CAAC,IAAI,oDAAoD;oBACxG,0GAA0G;oBAC1G,iCAAiC;aACpC,CAAC;QACJ,CAAC;QACD,OAAO,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IACD,IAAI,YAAY,CAAC,IAAI,KAAK,WAAW;QAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC;IAEhG,OAAO,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACtC,CAAC"}
@@ -1,7 +0,0 @@
1
- export { MIN_READABLE_SCHEMA_VERSION, SCENARIO_SCHEMA_VERSION, isUnverifying, type Scenario, type ScenarioStep, type ScenarioAssertion, type ScenarioAssertionKind, type ScenarioActionKind, type TargetDescriptor, } from "./scenario.ts";
2
- export { parseScenario, serializeScenario, type ScenarioParseResult } from "./parse.ts";
3
- export { isSecretRef, readSecretRef, referencedVariables, resolveSecretText, secretRefFor, type SecretEnvironment, type SecretRef, type SecretResolution, } from "./secret-ref.ts";
4
- export { scenariosDirectory, scenarioPath, listScenarios, ScenarioListError, readScenario, writeScenario, } from "./storage.ts";
5
- export { readCredentialRef, isCredentialRef, credentialRefFor, resolveCredentialText, resolveEitherRef, referencedCredentials, type CredentialRef, type CredentialStoreLike, type CredentialResolution, } from "./credential-ref.ts";
6
- export { projectScenarioToRunPlan, projectRunPlanToScenario, type ProjectedStep, type ProjectedStepKind, type ProjectedBrowserRunPlan, type ProjectionRefusal, type ScenarioProjection, type PlanProjection, type RawProjectedStep, type ScenarioMeta, } from "./browser-run-plan-projection.ts";
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scenarios/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,EACL,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,GAClB,MAAM,kCAAkC,CAAC"}
@@ -1,7 +0,0 @@
1
- export { MIN_READABLE_SCHEMA_VERSION, SCENARIO_SCHEMA_VERSION, isUnverifying, } from "./scenario.js";
2
- export { parseScenario, serializeScenario } from "./parse.js";
3
- export { isSecretRef, readSecretRef, referencedVariables, resolveSecretText, secretRefFor, } from "./secret-ref.js";
4
- export { scenariosDirectory, scenarioPath, listScenarios, ScenarioListError, readScenario, writeScenario, } from "./storage.js";
5
- export { readCredentialRef, isCredentialRef, credentialRefFor, resolveCredentialText, resolveEitherRef, referencedCredentials, } from "./credential-ref.js";
6
- export { projectScenarioToRunPlan, projectRunPlanToScenario, } from "./browser-run-plan-projection.js";
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scenarios/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,aAAa,GAOd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAA4B,MAAM,YAAY,CAAC;AACxF,OAAO,EACL,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,GAIb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,GAItB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GASzB,MAAM,kCAAkC,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Reading a stored scenario — validation, and the refusals that are the
3
- * point. Refuses rather than repairs: coercing a missing field to a default
4
- * would let a scenario keep loading after it stopped describing the app, silently, in CI where nobody's watching. Problems collect in one pass, not one throw at a time.
5
- */
6
- import { type Scenario } from "./scenario.ts";
7
- export type ScenarioParseResult = {
8
- readonly valid: true;
9
- readonly scenario: Scenario;
10
- } | {
11
- readonly valid: false;
12
- readonly problems: readonly string[];
13
- };
14
- /** Validates an already-decoded value as a scenario. Version check runs first and short-circuits — reporting field problems against an unsupported schema would be noise about a shape never meant to satisfy it. */
15
- export declare function parseScenario(raw: unknown): ScenarioParseResult;
16
- /** Newline-terminated and two-space indented, so a saved scenario reads as a reviewable diff rather than one long line. */
17
- export declare function serializeScenario(scenario: Scenario): string;
18
- //# sourceMappingURL=parse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/scenarios/parse.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAGL,KAAK,QAAQ,EAMd,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,mBAAmB,GAC3B;IAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAgJpE,qNAAqN;AACrN,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,mBAAmB,CAwE/D;AAED,2HAA2H;AAC3H,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAE5D"}