@vosjs/cli 0.42.0 → 0.43.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.
package/dist/cli.js CHANGED
@@ -511,7 +511,7 @@ async function cmdCheck(argv) {
511
511
  return result.ok ? EXIT_OK : EXIT_ERROR;
512
512
  }
513
513
  async function delegate(argv, viaAlias = false) {
514
- const { run } = await import("./run-WN2IO3WL.js");
514
+ const { run } = await import("./run-ZYROWQ3T.js");
515
515
  if (viaAlias && argv[0]) {
516
516
  process.stderr.write(
517
517
  `note: "vos voila ${argv[0]}" is now "vos ${argv[0]}".
@@ -551,7 +551,7 @@ async function main() {
551
551
  const engine = HELP_ENGINE.split("\n").filter(
552
552
  (l) => l.startsWith(` vos ${cmd} `)
553
553
  );
554
- const { verbHelp } = await import("./run-WN2IO3WL.js");
554
+ const { verbHelp } = await import("./run-ZYROWQ3T.js");
555
555
  const take = verbHelp(cmd);
556
556
  process.stdout.write(
557
557
  `${engine.join("\n")}
@@ -583,7 +583,7 @@ ${take.includes("no such verb") ? "" : take}`
583
583
  main().then(async (code) => {
584
584
  if (code === EXIT_OK) {
585
585
  const verb = process.argv[2] ?? "";
586
- const { HELP } = await import("./run-WN2IO3WL.js");
586
+ const { HELP } = await import("./run-ZYROWQ3T.js");
587
587
  const documented = [
588
588
  ...helpFlagsFor(HELP_ENGINE, verb),
589
589
  ...helpFlagsFor(HELP, verb)
package/dist/index.d.ts CHANGED
@@ -141,6 +141,48 @@ interface MaskRule {
141
141
  text?: string;
142
142
  }
143
143
 
144
+ /**
145
+ * `setup`: the steps that run BEFORE the camera rolls. A sign-in form, a
146
+ * cookie banner, the "choose your editor" modal, an onboarding tour: things
147
+ * a take must get past and must not show. They run after the first
148
+ * navigation and before `Page.startScreencast`, with no cursor synthesis,
149
+ * no pace accounting and nothing written to `meta.steps`. Then the recorder
150
+ * navigates to `url` again and the take begins where the setup left it.
151
+ *
152
+ * A `type` step's `text` may be `{ "env": "DEMO_PASSWORD" }`: resolved at run
153
+ * time, never logged, never stored. The guarantee is narrow and real: the
154
+ * secret is never in a file that travels (`actions.json` is committed and
155
+ * pushed with the take; `meta.json` is read by the digest) and never in the
156
+ * footage. An agent with a shell can still read the variable; that is the
157
+ * maker's decision to make, not this file's to hide.
158
+ */
159
+
160
+ type SetupText = string | {
161
+ env: string;
162
+ };
163
+ type SetupStep = ({
164
+ do: 'wait';
165
+ ms: number;
166
+ } | {
167
+ do: 'click';
168
+ selector: string;
169
+ ms?: number;
170
+ } | {
171
+ do: 'type';
172
+ selector: string;
173
+ text: SetupText;
174
+ ms?: number;
175
+ } | {
176
+ do: 'press';
177
+ key: string;
178
+ ms?: number;
179
+ } | {
180
+ do: 'goto';
181
+ url: string;
182
+ }) & {
183
+ id?: string;
184
+ };
185
+
144
186
  /**
145
187
  * The action script — the declarative recipe an agent (or human) writes to
146
188
  * drive a take. Small on purpose: selectors + a handful of verbs. The recorder
@@ -163,6 +205,15 @@ interface ActionsFile {
163
205
  * copy or numbers: the video must stay true to the product.
164
206
  */
165
207
  mask?: MaskRule[];
208
+ /**
209
+ * Run BEFORE the camera rolls, after the first navigation: a sign-in form,
210
+ * a cookie banner, an onboarding tour. Plain actions with no cursor, no
211
+ * frames, no pace and nothing in `meta.steps`; then the recorder opens
212
+ * `url` again and the take begins where the setup left it. A `type`
213
+ * step's text may be `{ env: 'NAME' }`, read at run time and never logged
214
+ * or stored.
215
+ */
216
+ setup?: SetupStep[];
166
217
  steps: ActionStep[];
167
218
  }
168
219
  type ActionStep = ({
@@ -375,6 +426,8 @@ interface RecordOpts {
375
426
  * re-record would have replaced. A throw closes the context and propagates.
376
427
  */
377
428
  onArrival?: (arrival: Arrival) => Promise<WallVerdict | null | void> | WallVerdict | null | void;
429
+ /** Extra request headers on every request (`--header name=value`). */
430
+ headers?: Record<string, string>;
378
431
  }
379
432
  declare function recordTake(browser: Browser, url: string, actions: ActionsFile, paths: TakePaths, log: (msg: string) => void, opts?: RecordOpts): Promise<RecordResult>;
380
433
 
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
  validateActions,
31
31
  waitForPageDone,
32
32
  writeSyncState
33
- } from "./chunk-7RMULTDM.js";
33
+ } from "./chunk-6PJPGBKH.js";
34
34
  import {
35
35
  BrowserUnavailableError,
36
36
  configDuration,
@@ -5,7 +5,7 @@ import {
5
5
  run,
6
6
  takeBrowserArgs,
7
7
  verbHelp
8
- } from "./chunk-7RMULTDM.js";
8
+ } from "./chunk-6PJPGBKH.js";
9
9
  import "./chunk-FACYY7VV.js";
10
10
  export {
11
11
  HELP,
@@ -14,4 +14,4 @@ export {
14
14
  takeBrowserArgs,
15
15
  verbHelp
16
16
  };
17
- //# sourceMappingURL=run-WN2IO3WL.js.map
17
+ //# sourceMappingURL=run-ZYROWQ3T.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vosjs/cli",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "The vos CLI: record the real product from a scripted browser flow, auto-zoom from the cursor track, cut as data in doc.json, render deterministic video and stills, deliver a release's media per destination spec, and sync with vos.so. One binary, every verb, MIT.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -49,13 +49,13 @@
49
49
  "mediabunny": "^1.55.7",
50
50
  "playwright": "^1.49.0",
51
51
  "@vosjs/core": "^0.25.0",
52
+ "@vosjs/editor": "^1.3.1",
52
53
  "@vosjs/elements": "^0.8.1",
53
54
  "@vosjs/render-core": "^0.2.8",
54
55
  "@vosjs/shared": "^0.4.1",
55
- "@vosjs/editor": "^1.3.1",
56
+ "@vosjs/studio-core": "^0.29.0",
56
57
  "@vosjs/timeline": "^0.4.1",
57
- "@vosjs/tween": "^0.8.2",
58
- "@vosjs/studio-core": "^0.29.0"
58
+ "@vosjs/tween": "^0.8.2"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/node": "^22",
@@ -29,6 +29,51 @@
29
29
  }
30
30
  }
31
31
  },
32
+ "setup": {
33
+ "type": "array",
34
+ "description": "Run BEFORE the camera rolls, after the first navigation: a sign-in form, a cookie banner, an onboarding tour. Plain actions with no cursor, no frames, no pace and nothing in meta.steps; then the recorder opens `url` again and the take begins where the setup left it. A selector that never appears fails the take before anything is recorded (exit 2). A `type` step's text may be { \"env\": \"NAME\" }, read at run time and never logged or stored; a literal typed into a password field is refused, because actions.json is committed and pushed.",
35
+ "items": {
36
+ "type": "object",
37
+ "required": ["do"],
38
+ "additionalProperties": false,
39
+ "properties": {
40
+ "do": {
41
+ "type": "string",
42
+ "enum": ["wait", "click", "type", "press", "goto"]
43
+ },
44
+ "id": { "type": "string" },
45
+ "selector": { "type": "string" },
46
+ "text": {
47
+ "oneOf": [
48
+ { "type": "string" },
49
+ {
50
+ "type": "object",
51
+ "required": ["env"],
52
+ "additionalProperties": false,
53
+ "properties": {
54
+ "env": {
55
+ "type": "string",
56
+ "description": "the environment variable holding the value"
57
+ }
58
+ }
59
+ }
60
+ ]
61
+ },
62
+ "key": {
63
+ "type": "string",
64
+ "description": "press: a Playwright key name (Enter, Tab, Escape)"
65
+ },
66
+ "url": {
67
+ "type": "string",
68
+ "description": "goto: a page to open, for a sign-in that lives elsewhere"
69
+ },
70
+ "ms": {
71
+ "type": "number",
72
+ "description": "wait: the pause; other verbs: the settle after (default 150)"
73
+ }
74
+ }
75
+ }
76
+ },
32
77
  "mask": {
33
78
  "type": "array",
34
79
  "description": "Hidden BEFORE the first frame is captured and kept hidden across navigations and re-renders: what a signed-in account shows that must not ship. The real value is never in a frame, never in the recording, never pushed. `vos record` reports what it still sees afterwards (meta.exposures), and a mask whose selector reached nothing fails --strict.",