@vosjs/cli 0.32.0 → 0.34.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
@@ -495,7 +495,7 @@ async function cmdCheck(argv) {
495
495
  return result.ok ? EXIT_OK : EXIT_ERROR;
496
496
  }
497
497
  async function delegate(argv, viaAlias = false) {
498
- const { run } = await import("./run-PYK3XJNH.js");
498
+ const { run } = await import("./run-EOIIBITT.js");
499
499
  if (viaAlias && argv[0]) {
500
500
  process.stderr.write(
501
501
  `note: "vos voila ${argv[0]}" is now "vos ${argv[0]}".
package/dist/index.d.ts CHANGED
@@ -89,6 +89,22 @@ interface PluginManifest {
89
89
  }
90
90
  declare const manifest: PluginManifest;
91
91
 
92
+ interface PaceReport {
93
+ askedMs: number;
94
+ gestureMs: number;
95
+ wallMs: number;
96
+ /** Wall time neither asked nor a gesture: what the page and the round trips cost. */
97
+ overheadMs: number;
98
+ overheadPct: number;
99
+ /** The steps whose wall ran past their ask plus gesture by more than a third. */
100
+ slow: {
101
+ step: number;
102
+ do: string;
103
+ askedMs: number;
104
+ wallMs: number;
105
+ }[];
106
+ }
107
+
92
108
  /**
93
109
  * The action script — the declarative recipe an agent (or human) writes to
94
110
  * drive a take. Small on purpose: selectors + a handful of verbs. The recorder
@@ -112,9 +128,12 @@ type ActionStep = ({
112
128
  do: 'hover';
113
129
  selector: string;
114
130
  ms?: number;
115
- } | {
131
+ }
132
+ /** `ms` is the settle after the press (default 150). */
133
+ | {
116
134
  do: 'click';
117
135
  selector: string;
136
+ ms?: number;
118
137
  }
119
138
  /**
120
139
  * Type into `selector`. The recorder clicks the field first, which is what
@@ -129,9 +148,14 @@ type ActionStep = ({
129
148
  text: string;
130
149
  delayMs?: number;
131
150
  focus?: boolean;
132
- } | {
151
+ /** the settle after the last character (default 150) */
152
+ ms?: number;
153
+ }
154
+ /** `ms` is the settle after the scroll lands (default 200). */
155
+ | {
133
156
  do: 'scroll';
134
157
  dy: number;
158
+ ms?: number;
135
159
  } | {
136
160
  do: 'move';
137
161
  x: number;
@@ -205,6 +229,8 @@ interface RecordResult {
205
229
  events: CursorEvent[];
206
230
  frames: FrameRec[];
207
231
  meta: RecordingMeta;
232
+ /** The take's pace: what the script asked, what the gestures added, what the page cost. */
233
+ pace: PaceReport;
208
234
  /** steps whose selector never became visible — the take continued without them. */
209
235
  skipped: SkippedStep[];
210
236
  /** the initial goto never reached networkidle (recording proceeded anyway). */
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
  validateActions,
31
31
  waitForPageDone,
32
32
  writeSyncState
33
- } from "./chunk-QJORXTJM.js";
33
+ } from "./chunk-43FCXWNS.js";
34
34
  import {
35
35
  BrowserUnavailableError,
36
36
  configDuration,
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  run
4
- } from "./chunk-QJORXTJM.js";
4
+ } from "./chunk-43FCXWNS.js";
5
5
  import "./chunk-NHKHTIDR.js";
6
6
  export {
7
7
  run
8
8
  };
9
- //# sourceMappingURL=run-PYK3XJNH.js.map
9
+ //# sourceMappingURL=run-EOIIBITT.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vosjs/cli",
3
- "version": "0.32.0",
3
+ "version": "0.34.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",
@@ -53,9 +53,9 @@
53
53
  "@vosjs/elements": "^0.8.1",
54
54
  "@vosjs/render-core": "^0.2.8",
55
55
  "@vosjs/shared": "^0.4.1",
56
- "@vosjs/studio-core": "^0.24.0",
57
- "@vosjs/timeline": "^0.4.1",
58
- "@vosjs/tween": "^0.8.2"
56
+ "@vosjs/studio-core": "^0.25.0",
57
+ "@vosjs/tween": "^0.8.2",
58
+ "@vosjs/timeline": "^0.4.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/node": "^22",
@@ -4,9 +4,7 @@
4
4
  "title": "vosso actions script",
5
5
  "description": "Declarative browser flow executed by `vos record` — the recipe an agent writes after exploring a site. The recorder synthesizes the cursor track from these steps.",
6
6
  "type": "object",
7
- "required": [
8
- "steps"
9
- ],
7
+ "required": ["steps"],
10
8
  "additionalProperties": false,
11
9
  "properties": {
12
10
  "url": {
@@ -16,10 +14,7 @@
16
14
  },
17
15
  "viewport": {
18
16
  "type": "object",
19
- "required": [
20
- "width",
21
- "height"
22
- ],
17
+ "required": ["width", "height"],
23
18
  "additionalProperties": false,
24
19
  "properties": {
25
20
  "width": {
@@ -41,10 +36,7 @@
41
36
  "oneOf": [
42
37
  {
43
38
  "type": "object",
44
- "required": [
45
- "do",
46
- "ms"
47
- ],
39
+ "required": ["do", "ms"],
48
40
  "additionalProperties": false,
49
41
  "properties": {
50
42
  "do": {
@@ -68,10 +60,7 @@
68
60
  },
69
61
  {
70
62
  "type": "object",
71
- "required": [
72
- "do",
73
- "selector"
74
- ],
63
+ "required": ["do", "selector"],
75
64
  "additionalProperties": false,
76
65
  "properties": {
77
66
  "do": {
@@ -100,15 +89,17 @@
100
89
  },
101
90
  {
102
91
  "type": "object",
103
- "required": [
104
- "do",
105
- "selector"
106
- ],
92
+ "required": ["do", "selector"],
107
93
  "additionalProperties": false,
108
94
  "properties": {
109
95
  "do": {
110
96
  "const": "click"
111
97
  },
98
+ "ms": {
99
+ "type": "number",
100
+ "minimum": 0,
101
+ "description": "the settle after the press, ms (default 150): how long the recorder holds before the next step. The script's own wait steps carry the pauses that mean something; this is only the hand lifting."
102
+ },
112
103
  "selector": {
113
104
  "type": "string"
114
105
  },
@@ -126,17 +117,18 @@
126
117
  },
127
118
  {
128
119
  "type": "object",
129
- "required": [
130
- "do",
131
- "selector",
132
- "text"
133
- ],
120
+ "required": ["do", "selector", "text"],
134
121
  "additionalProperties": false,
135
122
  "description": "Typing is a zoom signal — a type step earns a held frame on its field (the click into it opens the span, the camera releases after the last character). ~0.6s+ of typing qualifies, so pace delayMs like a person (60-90ms) for a camera moment.",
136
123
  "properties": {
137
124
  "do": {
138
125
  "const": "type"
139
126
  },
127
+ "ms": {
128
+ "type": "number",
129
+ "minimum": 0,
130
+ "description": "the settle after the last character, ms (default 150)"
131
+ },
140
132
  "selector": {
141
133
  "type": "string"
142
134
  },
@@ -167,15 +159,17 @@
167
159
  },
168
160
  {
169
161
  "type": "object",
170
- "required": [
171
- "do",
172
- "dy"
173
- ],
162
+ "required": ["do", "dy"],
174
163
  "additionalProperties": false,
175
164
  "properties": {
176
165
  "do": {
177
166
  "const": "scroll"
178
167
  },
168
+ "ms": {
169
+ "type": "number",
170
+ "minimum": 0,
171
+ "description": "the settle after the scroll lands, ms (default 200)"
172
+ },
179
173
  "dy": {
180
174
  "type": "number"
181
175
  },
@@ -193,11 +187,7 @@
193
187
  },
194
188
  {
195
189
  "type": "object",
196
- "required": [
197
- "do",
198
- "x",
199
- "y"
200
- ],
190
+ "required": ["do", "x", "y"],
201
191
  "additionalProperties": false,
202
192
  "properties": {
203
193
  "do": {
@@ -225,11 +215,7 @@
225
215
  },
226
216
  {
227
217
  "type": "object",
228
- "required": [
229
- "do",
230
- "tx",
231
- "ty"
232
- ],
218
+ "required": ["do", "tx", "ty"],
233
219
  "additionalProperties": false,
234
220
  "description": "Press-move-release: drag an element, slide a range input, move a clip. Start = selector center when given, else (x, y); end = (tx, ty), eased over ms.",
235
221
  "properties": {