@descryy/mcp 0.9.1 → 0.11.0

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 (206) hide show
  1. package/dist/browser/auth.d.ts +76 -0
  2. package/dist/browser/auth.d.ts.map +1 -0
  3. package/dist/browser/auth.js +223 -0
  4. package/dist/browser/auth.js.map +1 -0
  5. package/dist/browser/capability-probe.d.ts +109 -0
  6. package/dist/browser/capability-probe.d.ts.map +1 -0
  7. package/dist/browser/capability-probe.js +201 -0
  8. package/dist/browser/capability-probe.js.map +1 -0
  9. package/dist/browser/driver.d.ts +342 -4
  10. package/dist/browser/driver.d.ts.map +1 -1
  11. package/dist/browser/driver.js +79 -1
  12. package/dist/browser/driver.js.map +1 -1
  13. package/dist/browser/evidence.d.ts +3 -0
  14. package/dist/browser/evidence.d.ts.map +1 -1
  15. package/dist/browser/evidence.js +6 -1
  16. package/dist/browser/evidence.js.map +1 -1
  17. package/dist/browser/fake-driver.d.ts +65 -8
  18. package/dist/browser/fake-driver.d.ts.map +1 -1
  19. package/dist/browser/fake-driver.js +235 -8
  20. package/dist/browser/fake-driver.js.map +1 -1
  21. package/dist/browser/fault-attribution.d.ts +178 -0
  22. package/dist/browser/fault-attribution.d.ts.map +1 -0
  23. package/dist/browser/fault-attribution.js +266 -0
  24. package/dist/browser/fault-attribution.js.map +1 -0
  25. package/dist/browser/identity-graph-write.d.ts +55 -0
  26. package/dist/browser/identity-graph-write.d.ts.map +1 -0
  27. package/dist/browser/identity-graph-write.js +45 -0
  28. package/dist/browser/identity-graph-write.js.map +1 -0
  29. package/dist/browser/page-probe.d.ts +81 -0
  30. package/dist/browser/page-probe.d.ts.map +1 -0
  31. package/dist/browser/page-probe.js +202 -0
  32. package/dist/browser/page-probe.js.map +1 -0
  33. package/dist/browser/playwright-driver.d.ts +79 -0
  34. package/dist/browser/playwright-driver.d.ts.map +1 -1
  35. package/dist/browser/playwright-driver.js +1138 -180
  36. package/dist/browser/playwright-driver.js.map +1 -1
  37. package/dist/browser/reach-recording-session.d.ts +44 -0
  38. package/dist/browser/reach-recording-session.d.ts.map +1 -0
  39. package/dist/browser/reach-recording-session.js +143 -0
  40. package/dist/browser/reach-recording-session.js.map +1 -0
  41. package/dist/browser/reachability.d.ts +168 -0
  42. package/dist/browser/reachability.d.ts.map +1 -0
  43. package/dist/browser/reachability.js +294 -0
  44. package/dist/browser/reachability.js.map +1 -0
  45. package/dist/browser/registry.d.ts +24 -0
  46. package/dist/browser/registry.d.ts.map +1 -1
  47. package/dist/browser/registry.js +21 -2
  48. package/dist/browser/registry.js.map +1 -1
  49. package/dist/browser/scenario-provenance.d.ts +1 -1
  50. package/dist/browser/scenario-provenance.d.ts.map +1 -1
  51. package/dist/browser/scenario-provenance.js +15 -1
  52. package/dist/browser/scenario-provenance.js.map +1 -1
  53. package/dist/browser/scenario-runner.d.ts +10 -2
  54. package/dist/browser/scenario-runner.d.ts.map +1 -1
  55. package/dist/browser/scenario-runner.js +77 -9
  56. package/dist/browser/scenario-runner.js.map +1 -1
  57. package/dist/browser/tool-support.d.ts +5 -1
  58. package/dist/browser/tool-support.d.ts.map +1 -1
  59. package/dist/browser/tool-support.js +80 -4
  60. package/dist/browser/tool-support.js.map +1 -1
  61. package/dist/browser/wait-target.d.ts +37 -0
  62. package/dist/browser/wait-target.d.ts.map +1 -0
  63. package/dist/browser/wait-target.js +54 -0
  64. package/dist/browser/wait-target.js.map +1 -0
  65. package/dist/heap.d.ts +61 -0
  66. package/dist/heap.d.ts.map +1 -0
  67. package/dist/heap.js +82 -0
  68. package/dist/heap.js.map +1 -0
  69. package/dist/heartbeat.d.ts +46 -0
  70. package/dist/heartbeat.d.ts.map +1 -0
  71. package/dist/heartbeat.js +66 -0
  72. package/dist/heartbeat.js.map +1 -0
  73. package/dist/index.d.ts +2 -2
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/index.js.map +1 -1
  77. package/dist/planner/predict-then-propose.d.ts +101 -0
  78. package/dist/planner/predict-then-propose.d.ts.map +1 -0
  79. package/dist/planner/predict-then-propose.js +88 -0
  80. package/dist/planner/predict-then-propose.js.map +1 -0
  81. package/dist/planner/propose-journey.d.ts +60 -0
  82. package/dist/planner/propose-journey.d.ts.map +1 -0
  83. package/dist/planner/propose-journey.js +96 -0
  84. package/dist/planner/propose-journey.js.map +1 -0
  85. package/dist/registry.d.ts +10 -1
  86. package/dist/registry.d.ts.map +1 -1
  87. package/dist/registry.js +5 -1
  88. package/dist/registry.js.map +1 -1
  89. package/dist/render.d.ts +4 -4
  90. package/dist/render.js +3 -3
  91. package/dist/scenarios/browser-run-plan-projection.d.ts +143 -0
  92. package/dist/scenarios/browser-run-plan-projection.d.ts.map +1 -0
  93. package/dist/scenarios/browser-run-plan-projection.js +228 -0
  94. package/dist/scenarios/browser-run-plan-projection.js.map +1 -0
  95. package/dist/scenarios/credential-ref.d.ts +102 -0
  96. package/dist/scenarios/credential-ref.d.ts.map +1 -0
  97. package/dist/scenarios/credential-ref.js +148 -0
  98. package/dist/scenarios/credential-ref.js.map +1 -0
  99. package/dist/scenarios/index.d.ts +4 -1
  100. package/dist/scenarios/index.d.ts.map +1 -1
  101. package/dist/scenarios/index.js +4 -1
  102. package/dist/scenarios/index.js.map +1 -1
  103. package/dist/scenarios/parse.d.ts.map +1 -1
  104. package/dist/scenarios/parse.js +42 -9
  105. package/dist/scenarios/parse.js.map +1 -1
  106. package/dist/scenarios/scenario.d.ts +39 -5
  107. package/dist/scenarios/scenario.d.ts.map +1 -1
  108. package/dist/scenarios/scenario.js +15 -2
  109. package/dist/scenarios/scenario.js.map +1 -1
  110. package/dist/scenarios/secret-ref.d.ts +86 -0
  111. package/dist/scenarios/secret-ref.d.ts.map +1 -0
  112. package/dist/scenarios/secret-ref.js +125 -0
  113. package/dist/scenarios/secret-ref.js.map +1 -0
  114. package/dist/server.d.ts +1 -1
  115. package/dist/server.d.ts.map +1 -1
  116. package/dist/server.js +8 -4
  117. package/dist/server.js.map +1 -1
  118. package/dist/session.d.ts +19 -0
  119. package/dist/session.d.ts.map +1 -1
  120. package/dist/session.js +36 -0
  121. package/dist/session.js.map +1 -1
  122. package/dist/tools/analyze-workspace.d.ts +52 -0
  123. package/dist/tools/analyze-workspace.d.ts.map +1 -0
  124. package/dist/tools/analyze-workspace.js +207 -0
  125. package/dist/tools/analyze-workspace.js.map +1 -0
  126. package/dist/tools/analyze.d.ts +50 -4
  127. package/dist/tools/analyze.d.ts.map +1 -1
  128. package/dist/tools/analyze.js +225 -5
  129. package/dist/tools/analyze.js.map +1 -1
  130. package/dist/tools/browser-close-session.d.ts +21 -1
  131. package/dist/tools/browser-close-session.d.ts.map +1 -1
  132. package/dist/tools/browser-close-session.js +71 -7
  133. package/dist/tools/browser-close-session.js.map +1 -1
  134. package/dist/tools/browser-navigate.d.ts +1 -1
  135. package/dist/tools/browser-navigate.d.ts.map +1 -1
  136. package/dist/tools/browser-navigate.js +5 -3
  137. package/dist/tools/browser-navigate.js.map +1 -1
  138. package/dist/tools/browser-run-scenario.d.ts.map +1 -1
  139. package/dist/tools/browser-run-scenario.js +6 -1
  140. package/dist/tools/browser-run-scenario.js.map +1 -1
  141. package/dist/tools/browser-save-scenario.d.ts.map +1 -1
  142. package/dist/tools/browser-save-scenario.js +84 -4
  143. package/dist/tools/browser-save-scenario.js.map +1 -1
  144. package/dist/tools/browser-select.d.ts +20 -0
  145. package/dist/tools/browser-select.d.ts.map +1 -0
  146. package/dist/tools/browser-select.js +120 -0
  147. package/dist/tools/browser-select.js.map +1 -0
  148. package/dist/tools/browser-snapshot.d.ts +17 -1
  149. package/dist/tools/browser-snapshot.d.ts.map +1 -1
  150. package/dist/tools/browser-snapshot.js +18 -5
  151. package/dist/tools/browser-snapshot.js.map +1 -1
  152. package/dist/tools/browser-start-session.d.ts.map +1 -1
  153. package/dist/tools/browser-start-session.js +161 -9
  154. package/dist/tools/browser-start-session.js.map +1 -1
  155. package/dist/tools/browser-submit.d.ts +18 -0
  156. package/dist/tools/browser-submit.d.ts.map +1 -0
  157. package/dist/tools/browser-submit.js +106 -0
  158. package/dist/tools/browser-submit.js.map +1 -0
  159. package/dist/tools/browser-wait-for.d.ts +41 -0
  160. package/dist/tools/browser-wait-for.d.ts.map +1 -0
  161. package/dist/tools/browser-wait-for.js +148 -0
  162. package/dist/tools/browser-wait-for.js.map +1 -0
  163. package/dist/tools/chain.d.ts +41 -0
  164. package/dist/tools/chain.d.ts.map +1 -0
  165. package/dist/tools/chain.js +105 -0
  166. package/dist/tools/chain.js.map +1 -0
  167. package/dist/tools/draw-conclusion.d.ts +44 -0
  168. package/dist/tools/draw-conclusion.d.ts.map +1 -0
  169. package/dist/tools/draw-conclusion.js +250 -0
  170. package/dist/tools/draw-conclusion.js.map +1 -0
  171. package/dist/tools/index.d.ts +7 -0
  172. package/dist/tools/index.d.ts.map +1 -1
  173. package/dist/tools/index.js +16 -0
  174. package/dist/tools/index.js.map +1 -1
  175. package/dist/tools/kit.d.ts +17 -0
  176. package/dist/tools/kit.d.ts.map +1 -1
  177. package/dist/tools/kit.js.map +1 -1
  178. package/dist/tools/observe-runtime.d.ts +17 -0
  179. package/dist/tools/observe-runtime.d.ts.map +1 -1
  180. package/dist/tools/observe-runtime.js +174 -10
  181. package/dist/tools/observe-runtime.js.map +1 -1
  182. package/dist/tools/predict-reach.d.ts +57 -0
  183. package/dist/tools/predict-reach.d.ts.map +1 -0
  184. package/dist/tools/predict-reach.js +159 -0
  185. package/dist/tools/predict-reach.js.map +1 -0
  186. package/dist/tools/propagation.d.ts +8 -3
  187. package/dist/tools/propagation.d.ts.map +1 -1
  188. package/dist/tools/propagation.js +16 -9
  189. package/dist/tools/propagation.js.map +1 -1
  190. package/dist/tools/propose-journey.d.ts +16 -0
  191. package/dist/tools/propose-journey.d.ts.map +1 -0
  192. package/dist/tools/propose-journey.js +121 -0
  193. package/dist/tools/propose-journey.js.map +1 -0
  194. package/dist/tools/runtime-journey-drive.d.ts +102 -0
  195. package/dist/tools/runtime-journey-drive.d.ts.map +1 -0
  196. package/dist/tools/runtime-journey-drive.js +247 -0
  197. package/dist/tools/runtime-journey-drive.js.map +1 -0
  198. package/dist/tools/scope.d.ts +3 -0
  199. package/dist/tools/scope.d.ts.map +1 -1
  200. package/dist/tools/scope.js +33 -6
  201. package/dist/tools/scope.js.map +1 -1
  202. package/dist/workspace-index.d.ts +164 -0
  203. package/dist/workspace-index.d.ts.map +1 -0
  204. package/dist/workspace-index.js +381 -0
  205. package/dist/workspace-index.js.map +1 -0
  206. package/package.json +32 -31
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;mIAImI;;;;;;;;;AAEnI,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIxD,OAAO,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAgEvG,MAAM,eAAe,GAAG,6BAA6B,CAAC;AAEtD,MAAM,UAAU,aAAa,CAAC,KAA0B;IACtD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAC/D,CAAC;AAED;;0DAE0D;AAC1D,SAAS,SAAS,CAAC,MAAgB;IACjC,MAAM,SAAS,GAAG,MAAkC,CAAC;IACrD,OAAO,OAAO,SAAS,CAAC,MAAM,KAAK,UAAU,IAAI,OAAO,SAAS,CAAC,YAAY,KAAK,UAAU;QAC3F,CAAC,CAAE,MAA0B;QAC7B,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IA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,UAAU,aAAa,CACjC,OAAgC,EAChC,IAAc;IAMd,MAAM,UAAU,GAAmB,EAAE,CAAC;IACtC,MAAM,OAAO,GAA+C,EAAE,CAAC;IAC/D,MAAM,QAAQ,GAAwB,EAAE,CAAC;IAEzC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;YAC3B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,SAAS;QACX,CAAC;QACD,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACnD,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAClC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC1E,CAAC;YACD,IAAI,SAAS,CAAC,QAAQ;gBAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;gBAE7C,OAAO,CAAC,IAAI,CAAC;oBACX,MAAM,EAAE,KAAK;oBACb,MAAM,EAAE,gDAAgD;iBACzD,CAAC,CAAC;QACP,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,sBAAsB,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;QACnF,CAAC;IACH,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC3C,CAAC"}
package/dist/render.d.ts CHANGED
@@ -107,7 +107,7 @@ export interface TruncationDetail {
107
107
  * **Presence is the claim, not the count.** A tool constructs this only on a
108
108
  * path where an execution really ran and evidence really came back; omitting
109
109
  * it is how every other tool says "nothing was witnessed here", which is the
110
- * safe default and the one twenty-eight of the thirty tools take. The two
110
+ * safe default and the one thirty-one of the thirty-three tools take. The two
111
111
  * that declare it are `observe_runtime` and `observe_tests` — the two that
112
112
  * run something.
113
113
  *
@@ -366,10 +366,10 @@ export interface AnswerEnvelope<T = unknown> {
366
366
  *
367
367
  * ## `data` is deliberately open, and that is a disclosed gap
368
368
  *
369
- * The envelope's thirteen fields are uniform across all thirty tools, so they
369
+ * The envelope's thirteen fields are uniform across all thirty-three tools, so they
370
370
  * are described exactly. `data` is not: its shape is `ImpactData`, `ScopeData`
371
- * and twenty-eight others, and nothing today derives a JSON Schema from those
372
- * TypeScript types. Hand-writing thirty schemas would put a second description
371
+ * and thirty-one others, and nothing today derives a JSON Schema from those
372
+ * TypeScript types. Hand-writing thirty-three schemas would put a second description
373
373
  * of each shape in a second place with nothing checking the two agree — the
374
374
  * drift this repo has already paid for once with the tool count in prose, and
375
375
  * a schema that is confidently wrong about `data` is worse for a validating
package/dist/render.js CHANGED
@@ -117,10 +117,10 @@ function nullable(schema) {
117
117
  *
118
118
  * ## `data` is deliberately open, and that is a disclosed gap
119
119
  *
120
- * The envelope's thirteen fields are uniform across all thirty tools, so they
120
+ * The envelope's thirteen fields are uniform across all thirty-three tools, so they
121
121
  * are described exactly. `data` is not: its shape is `ImpactData`, `ScopeData`
122
- * and twenty-eight others, and nothing today derives a JSON Schema from those
123
- * TypeScript types. Hand-writing thirty schemas would put a second description
122
+ * and thirty-one others, and nothing today derives a JSON Schema from those
123
+ * TypeScript types. Hand-writing thirty-three schemas would put a second description
124
124
  * of each shape in a second place with nothing checking the two agree — the
125
125
  * drift this repo has already paid for once with the tool count in prose, and
126
126
  * a schema that is confidently wrong about `data` is worse for a validating
@@ -0,0 +1,143 @@
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}`) is
47
+ * resolved before the plan is built, never carried through unresolved —
48
+ * a plan is something about to be driven, and driving an unresolved
49
+ * reference would type its literal characters into the page (see
50
+ * `secret-ref.ts`). An unresolved reference is reported as a refusal
51
+ * naming the step's action and index, not as a defect in the application.
52
+ *
53
+ * ## The round trip
54
+ *
55
+ * `projectScenarioToRunPlan` then `projectRunPlanToScenario` on a scenario
56
+ * that uses only the projectable verbs reproduces the original steps and
57
+ * assertions exactly — see `browser-run-plan-projection.test.ts`. The
58
+ * `anchor` field on an assertion-kind `ProjectedStep` is what makes the
59
+ * reverse direction exact rather than a guess: it is carried straight
60
+ * through from `ScenarioAssertion.afterStep`, never recomputed from
61
+ * position, because a null-anchored (end-of-scenario) assertion and one
62
+ * anchored at the final step are otherwise indistinguishable by position
63
+ * alone once both are the last things a plan does.
64
+ */
65
+ import { type SecretEnvironment } from "./secret-ref.ts";
66
+ import { type Scenario, type TargetDescriptor } from "./scenario.ts";
67
+ /** The seven verbs both formats can express exactly. Order matches `ScenarioActionKind` first, then the two assertion projections. */
68
+ export type ProjectedStepKind = "navigate" | "click" | "type" | "select" | "submit" | "assertVisible" | "assertText";
69
+ /**
70
+ * One step of the shared journey format. `target` is required for every
71
+ * kind except `navigate`, which is why it is nullable rather than absent —
72
+ * an absent field and a null one are different statements throughout this
73
+ * format (see `scenario.ts`).
74
+ */
75
+ export interface ProjectedStep {
76
+ readonly kind: ProjectedStepKind;
77
+ readonly target: TargetDescriptor | null;
78
+ /** `navigate` only. */
79
+ readonly url: string | null;
80
+ /** `type`/`select`'s value (already resolved — never a secret reference), or `assertText`'s expected value. Null for `navigate`, `click`, `submit`, `assertVisible`. */
81
+ readonly text: string | null;
82
+ /**
83
+ * Only meaningful for `assertVisible`/`assertText`: where this assertion
84
+ * is anchored. `"immediate"` — right after the step that precedes it in
85
+ * this same array. `"end"` — after the whole scenario
86
+ * (`ScenarioAssertion.afterStep === null`). Null for every non-assertion
87
+ * kind. Carried through, never inferred from position — see this file's
88
+ * header.
89
+ */
90
+ readonly anchor: "immediate" | "end" | null;
91
+ }
92
+ export interface ProjectedBrowserRunPlan {
93
+ readonly startUrl: string;
94
+ readonly steps: readonly ProjectedStep[];
95
+ }
96
+ /** A verb (or assertion kind) that has no counterpart in the other format, named rather than dropped. */
97
+ export interface ProjectionRefusal {
98
+ readonly ok: false;
99
+ /** The scenario action, assertion kind, or plan step kind that could not be projected. */
100
+ readonly verb: string;
101
+ /** The step or assertion's position in its source array, when the refusal is about one entry. Null for a whole-scenario refusal. */
102
+ readonly index: number | null;
103
+ readonly reason: string;
104
+ }
105
+ export type ScenarioProjection = {
106
+ readonly ok: true;
107
+ readonly plan: ProjectedBrowserRunPlan;
108
+ } | ProjectionRefusal;
109
+ /**
110
+ * `Scenario` → a driveable plan. `env` resolves any `${env:VAR}` text the
111
+ * same way `replayScenario` does — defaulted to `process.env` so every
112
+ * caller that does not inject one behaves like driving the browser
113
+ * directly, and injectable so a test never has to mutate the process.
114
+ */
115
+ export declare function projectScenarioToRunPlan(scenario: Scenario, env?: SecretEnvironment): ScenarioProjection;
116
+ /** A step as a producer that is not this module (the desktop's own `BrowserStep`, for instance) would hand it in — `kind` is a plain string so an unprojectable verb (`waitFor`, `screenshot`, ...) is refused by name at the boundary rather than rejected by the type system before it can be named. */
117
+ export interface RawProjectedStep {
118
+ readonly kind: string;
119
+ readonly target: TargetDescriptor | null;
120
+ readonly url: string | null;
121
+ readonly text: string | null;
122
+ readonly anchor: "immediate" | "end" | null;
123
+ }
124
+ export interface ScenarioMeta {
125
+ readonly name: string;
126
+ readonly description: string | null;
127
+ readonly savedAt: string;
128
+ readonly savedAtCommit: string;
129
+ }
130
+ export type PlanProjection = {
131
+ readonly ok: true;
132
+ readonly scenario: Scenario;
133
+ } | ProjectionRefusal;
134
+ /**
135
+ * A driveable plan → `Scenario`. Total for the seven shared verbs; refuses
136
+ * by name for anything else (`waitFor`, `screenshot`, or any unrecognised
137
+ * kind a caller hands in).
138
+ */
139
+ export declare function projectRunPlanToScenario(plan: {
140
+ readonly startUrl: string;
141
+ readonly steps: readonly RawProjectedStep[];
142
+ }, meta: ScenarioMeta): PlanProjection;
143
+ //# sourceMappingURL=browser-run-plan-projection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-run-plan-projection.d.ts","sourceRoot":"","sources":["../../src/scenarios/browser-run-plan-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAA2B,KAAK,QAAQ,EAA6C,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEzI,sIAAsI;AACtI,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,eAAe,GAAG,YAAY,CAAC;AAIrH;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzC,uBAAuB;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,wKAAwK;IACxK,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK,GAAG,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;CAC1C;AAED,yGAAyG;AACzG,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,0FAA0F;IAC1F,QAAQ,CAA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E,SAAS,gBAAgB,EAAE,CAAA;CAAE,EAAE,IAAI,EAAE,YAAY,GAAG,cAAc,CAkF7J"}
@@ -0,0 +1,228 @@
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}`) is
47
+ * resolved before the plan is built, never carried through unresolved —
48
+ * a plan is something about to be driven, and driving an unresolved
49
+ * reference would type its literal characters into the page (see
50
+ * `secret-ref.ts`). An unresolved reference is reported as a refusal
51
+ * naming the step's action and index, not as a defect in the application.
52
+ *
53
+ * ## The round trip
54
+ *
55
+ * `projectScenarioToRunPlan` then `projectRunPlanToScenario` on a scenario
56
+ * that uses only the projectable verbs reproduces the original steps and
57
+ * assertions exactly — see `browser-run-plan-projection.test.ts`. The
58
+ * `anchor` field on an assertion-kind `ProjectedStep` is what makes the
59
+ * reverse direction exact rather than a guess: it is carried straight
60
+ * through from `ScenarioAssertion.afterStep`, never recomputed from
61
+ * position, because a null-anchored (end-of-scenario) assertion and one
62
+ * anchored at the final step are otherwise indistinguishable by position
63
+ * alone once both are the last things a plan does.
64
+ */
65
+ import { resolveSecretText } from "./secret-ref.js";
66
+ import { SCENARIO_SCHEMA_VERSION } from "./scenario.js";
67
+ const PROJECTED_KINDS = ["navigate", "click", "type", "select", "submit", "assertVisible", "assertText"];
68
+ function refuse(verb, index, reason) {
69
+ return { ok: false, verb, index, reason };
70
+ }
71
+ /**
72
+ * `Scenario` → a driveable plan. `env` resolves any `${env:VAR}` text the
73
+ * same way `replayScenario` does — defaulted to `process.env` so every
74
+ * caller that does not inject one behaves like driving the browser
75
+ * directly, and injectable so a test never has to mutate the process.
76
+ */
77
+ export function projectScenarioToRunPlan(scenario, env = process.env) {
78
+ // One pass builds the real-step projections, keyed by their scenario index,
79
+ // so assertions anchored at that index can be spliced in right after it —
80
+ // mirroring `replayScenario`'s own `evaluateAnchored(index, ...)` timing.
81
+ const realSteps = new Map();
82
+ for (const [index, step] of scenario.steps.entries()) {
83
+ const projected = projectStep(step, index, env);
84
+ if (!projected.ok)
85
+ return projected;
86
+ realSteps.set(index, projected.step);
87
+ }
88
+ const immediateAssertions = new Map();
89
+ const endAssertions = [];
90
+ for (const [index, assertion] of scenario.assertions.entries()) {
91
+ const projected = projectAssertion(assertion, index);
92
+ if (!projected.ok)
93
+ return projected;
94
+ if (assertion.afterStep === null) {
95
+ endAssertions.push(projected.step);
96
+ }
97
+ else {
98
+ const bucket = immediateAssertions.get(assertion.afterStep) ?? [];
99
+ bucket.push(projected.step);
100
+ immediateAssertions.set(assertion.afterStep, bucket);
101
+ }
102
+ }
103
+ const steps = [];
104
+ scenario.steps.forEach((_, index) => {
105
+ steps.push(realSteps.get(index));
106
+ steps.push(...(immediateAssertions.get(index) ?? []));
107
+ });
108
+ steps.push(...endAssertions);
109
+ return { ok: true, plan: { startUrl: scenario.targetUrl, steps } };
110
+ }
111
+ function projectStep(step, index, env) {
112
+ if (step.action === "fill") {
113
+ return refuse("fill", index, `step ${index}: "fill" has no counterpart in the driveable step vocabulary — that vocabulary has only "type", ` +
114
+ "which fires real keystrokes, while fill sets the value directly and fires none. Collapsing one into the " +
115
+ "other would drive the browser differently from what the scenario declared, so this step is refused rather " +
116
+ "than silently narrowed.");
117
+ }
118
+ if (step.action === "navigate") {
119
+ return { ok: true, step: { kind: "navigate", target: null, url: step.url, text: null, anchor: null } };
120
+ }
121
+ const target = step.target;
122
+ if (target === null) {
123
+ return refuse(step.action, index, `step ${index}: "${step.action}" acts on an element and carries no target to project.`);
124
+ }
125
+ if (step.action === "type" || step.action === "select") {
126
+ const resolved = resolveSecretText(step.text ?? "", env);
127
+ if (!resolved.resolved)
128
+ return refuse(step.action, index, `step ${index}: ${resolved.reason}`);
129
+ return { ok: true, step: { kind: step.action, target, url: null, text: resolved.value, anchor: null } };
130
+ }
131
+ // click, submit
132
+ return { ok: true, step: { kind: step.action, target, url: null, text: null, anchor: null } };
133
+ }
134
+ function projectAssertion(assertion, index) {
135
+ const anchor = assertion.afterStep === null ? "end" : "immediate";
136
+ if (assertion.kind === "elementVisible") {
137
+ if (assertion.target === null) {
138
+ return refuse("elementVisible", index, `assertion ${index}: elementVisible names no element to project.`);
139
+ }
140
+ return { ok: true, step: { kind: "assertVisible", target: assertion.target, url: null, text: null, anchor } };
141
+ }
142
+ if (assertion.kind === "textEquals") {
143
+ if (assertion.target === null || assertion.expected === null) {
144
+ return refuse("textEquals", index, `assertion ${index}: textEquals needs both an element and an expected value to project.`);
145
+ }
146
+ return { ok: true, step: { kind: "assertText", target: assertion.target, url: null, text: assertion.expected, anchor } };
147
+ }
148
+ return refuse(assertion.kind, index, `assertion ${index}: "${assertion.kind}" has no counterpart in the driveable step vocabulary — that vocabulary ` +
149
+ "has no step that asserts about the whole page or the run rather than about one element, so this assertion " +
150
+ "is refused rather than dropped.");
151
+ }
152
+ /**
153
+ * A driveable plan → `Scenario`. Total for the seven shared verbs; refuses
154
+ * by name for anything else (`waitFor`, `screenshot`, or any unrecognised
155
+ * kind a caller hands in).
156
+ */
157
+ export function projectRunPlanToScenario(plan, meta) {
158
+ const steps = [];
159
+ const assertions = [];
160
+ let lastStepIndex = -1;
161
+ for (const [index, raw] of plan.steps.entries()) {
162
+ if (!PROJECTED_KINDS.includes(raw.kind)) {
163
+ return refuse(raw.kind, index, `plan step ${index}: "${raw.kind}" has no counterpart in the scenario format — the scenario format has no ` +
164
+ "verb for it, so this step is refused rather than dropped.");
165
+ }
166
+ const kind = raw.kind;
167
+ if (kind === "assertVisible" || kind === "assertText") {
168
+ if (raw.anchor === null) {
169
+ return refuse(kind, index, `plan step ${index}: an assertion step carries no anchor to project.`);
170
+ }
171
+ if (raw.anchor === "immediate" && lastStepIndex === -1) {
172
+ return refuse(kind, index, `plan step ${index}: this assertion is anchored immediately after a step, and no step precedes it — a ` +
173
+ "scenario assertion can only anchor after a real step, or after the whole scenario. Refused rather " +
174
+ "than guessing an anchor.");
175
+ }
176
+ if (raw.target === null) {
177
+ return refuse(kind, index, `plan step ${index}: "${kind}" carries no target to project.`);
178
+ }
179
+ const afterStep = raw.anchor === "end" ? null : lastStepIndex;
180
+ if (kind === "assertVisible") {
181
+ assertions.push({ kind: "elementVisible", afterStep, target: raw.target, expected: null });
182
+ }
183
+ else {
184
+ if (raw.text === null) {
185
+ return refuse(kind, index, `plan step ${index}: "assertText" carries no expected text to project.`);
186
+ }
187
+ assertions.push({ kind: "textEquals", afterStep, target: raw.target, expected: raw.text });
188
+ }
189
+ continue;
190
+ }
191
+ if (kind === "navigate") {
192
+ if (raw.url === null)
193
+ return refuse("navigate", index, `plan step ${index}: "navigate" carries no url to project.`);
194
+ steps.push({ action: "navigate", target: null, url: raw.url, text: null });
195
+ lastStepIndex += 1;
196
+ continue;
197
+ }
198
+ if (raw.target === null)
199
+ return refuse(kind, index, `plan step ${index}: "${kind}" carries no target to project.`);
200
+ if (kind === "type" || kind === "select") {
201
+ if (raw.text === null)
202
+ return refuse(kind, index, `plan step ${index}: "${kind}" carries no text to project.`);
203
+ steps.push({ action: kind, target: raw.target, url: null, text: raw.text });
204
+ lastStepIndex += 1;
205
+ continue;
206
+ }
207
+ // click, submit
208
+ steps.push({ action: kind, target: raw.target, url: null, text: null });
209
+ lastStepIndex += 1;
210
+ }
211
+ if (steps.length === 0) {
212
+ return refuse("(none)", null, "the plan has no driveable steps to project — a scenario needs at least one step.");
213
+ }
214
+ return {
215
+ ok: true,
216
+ scenario: {
217
+ schemaVersion: SCENARIO_SCHEMA_VERSION,
218
+ name: meta.name,
219
+ description: meta.description,
220
+ targetUrl: plan.startUrl,
221
+ savedAt: meta.savedAt,
222
+ savedAtCommit: meta.savedAtCommit,
223
+ steps,
224
+ assertions,
225
+ },
226
+ };
227
+ }
228
+ //# sourceMappingURL=browser-run-plan-projection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-run-plan-projection.js","sourceRoot":"","sources":["../../src/scenarios/browser-run-plan-projection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IAAI,EAAE,KAAK,EAAE,aAAa,KAAK,MAAM,IAAI,+BAA+B,CAAC,CAAC;YAC/G,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;YAC5E,aAAa,IAAI,CAAC,CAAC;YACnB,SAAS;QACX,CAAC;QAED,gBAAgB;QAChB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACxE,aAAa,IAAI,CAAC,CAAC;IACrB,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,kFAAkF,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"}
@@ -0,0 +1,102 @@
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
@@ -0,0 +1 @@
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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