@vosjs/cli 0.8.4 → 0.9.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/README.md +134 -24
- package/dist/chunk-5BFGODBI.js +83 -0
- package/dist/chunk-5BFGODBI.js.map +1 -0
- package/dist/chunk-6JJETC43.js +7432 -0
- package/dist/chunk-6JJETC43.js.map +1 -0
- package/dist/chunk-A2VSDK3C.js +42 -0
- package/dist/chunk-A2VSDK3C.js.map +1 -0
- package/dist/{chunk-3VPLPEMZ.js → chunk-X2BKHZ56.js} +1 -38
- package/dist/chunk-X2BKHZ56.js.map +1 -0
- package/dist/cli.js +22 -74
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +445 -1
- package/dist/index.js +52 -4
- package/dist/manifest-3LIL5M3F.js +8 -0
- package/dist/manifest-3LIL5M3F.js.map +1 -0
- package/dist/run-22RIQESF.js +9 -0
- package/dist/run-22RIQESF.js.map +1 -0
- package/package.json +17 -6
- package/schema/actions.schema.json +210 -0
- package/schema/channel-specs.json +168 -0
- package/schema/digest.schema.json +218 -0
- package/schema/doc.schema.json +1085 -0
- package/dist/chunk-3VPLPEMZ.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Browser } from 'playwright';
|
|
2
|
+
import { CursorTrack, RecordingMeta, ProjectDoc, CursorEvent, TranscriptSegment, Digest } from '@vosjs/studio-core';
|
|
3
|
+
export { Digest } from '@vosjs/studio-core';
|
|
2
4
|
|
|
3
5
|
interface RenderCommonOptions {
|
|
4
6
|
config: Record<string, unknown>;
|
|
@@ -60,4 +62,446 @@ declare class BrowserUnavailableError extends Error {
|
|
|
60
62
|
*/
|
|
61
63
|
declare function launchBrowser(): Promise<Browser>;
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
/** Entry point — the delegation contract for @vosjs/cli: the host forwards
|
|
66
|
+
every non-engine verb here (`vos <verb>`; `vos voila <verb>` stays a
|
|
67
|
+
hidden alias until public launch). The exported `manifest` (index.ts)
|
|
68
|
+
tells the host which verbs exist and how to summarize them in help. */
|
|
69
|
+
declare function run(argv: string[]): Promise<number>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The verb manifest of the take pipeline and the vos.so verbs — what
|
|
73
|
+
* `vos help` lists under the engine verbs. It kept the shape a separately
|
|
74
|
+
* installed plugin once handed the host (name + host range), so a script
|
|
75
|
+
* reading it keeps working.
|
|
76
|
+
*/
|
|
77
|
+
interface PluginVerb {
|
|
78
|
+
name: string;
|
|
79
|
+
summary: string;
|
|
80
|
+
}
|
|
81
|
+
interface PluginManifest {
|
|
82
|
+
name: string;
|
|
83
|
+
/** Host versions this plugin speaks the run(argv) contract with. */
|
|
84
|
+
hostRange: string;
|
|
85
|
+
verbs: PluginVerb[];
|
|
86
|
+
}
|
|
87
|
+
declare const manifest: PluginManifest;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The action script — the declarative recipe an agent (or human) writes to
|
|
91
|
+
* drive a take. Small on purpose: selectors + a handful of verbs. The recorder
|
|
92
|
+
* executes it with humanized cursor motion and synthesizes the CursorTrack
|
|
93
|
+
* from its own dispatches.
|
|
94
|
+
*/
|
|
95
|
+
interface ActionsFile {
|
|
96
|
+
/** Page to record. `--url` overrides. */
|
|
97
|
+
url?: string;
|
|
98
|
+
/** Recording viewport in CSS px (default 1280x720). */
|
|
99
|
+
viewport?: {
|
|
100
|
+
width: number;
|
|
101
|
+
height: number;
|
|
102
|
+
};
|
|
103
|
+
steps: ActionStep[];
|
|
104
|
+
}
|
|
105
|
+
type ActionStep = ({
|
|
106
|
+
do: 'wait';
|
|
107
|
+
ms: number;
|
|
108
|
+
} | {
|
|
109
|
+
do: 'hover';
|
|
110
|
+
selector: string;
|
|
111
|
+
ms?: number;
|
|
112
|
+
} | {
|
|
113
|
+
do: 'click';
|
|
114
|
+
selector: string;
|
|
115
|
+
} | {
|
|
116
|
+
do: 'type';
|
|
117
|
+
selector: string;
|
|
118
|
+
text: string;
|
|
119
|
+
delayMs?: number;
|
|
120
|
+
} | {
|
|
121
|
+
do: 'scroll';
|
|
122
|
+
dy: number;
|
|
123
|
+
} | {
|
|
124
|
+
do: 'move';
|
|
125
|
+
x: number;
|
|
126
|
+
y: number;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Press-move-release — real edits (drag an element on the stage canvas,
|
|
130
|
+
* slide a range input, move a timeline clip). Start = the selector's center
|
|
131
|
+
* when given, else (x, y); end = (tx, ty); eased over ms (default 700).
|
|
132
|
+
*/
|
|
133
|
+
| {
|
|
134
|
+
do: 'drag';
|
|
135
|
+
selector?: string;
|
|
136
|
+
x?: number;
|
|
137
|
+
y?: number;
|
|
138
|
+
tx: number;
|
|
139
|
+
ty: number;
|
|
140
|
+
ms?: number;
|
|
141
|
+
}) & {
|
|
142
|
+
/**
|
|
143
|
+
* Optional stable identity: anchors in doc.json name a step by this
|
|
144
|
+
* id (else by index), so a step can move or gain neighbours across script
|
|
145
|
+
* edits without breaking the cut anchored to it. Unique when present.
|
|
146
|
+
*/
|
|
147
|
+
id?: string;
|
|
148
|
+
};
|
|
149
|
+
/** Structural validation with actionable messages. Returns [] when valid. */
|
|
150
|
+
declare function validateActions(value: unknown): string[];
|
|
151
|
+
|
|
152
|
+
interface TakePaths {
|
|
153
|
+
dir: string;
|
|
154
|
+
recording: string;
|
|
155
|
+
framesDir: string;
|
|
156
|
+
framesIndex: string;
|
|
157
|
+
cursor: string;
|
|
158
|
+
meta: string;
|
|
159
|
+
actions: string;
|
|
160
|
+
doc: string;
|
|
161
|
+
}
|
|
162
|
+
declare function takePaths(dir: string): TakePaths;
|
|
163
|
+
interface TakeData {
|
|
164
|
+
paths: TakePaths;
|
|
165
|
+
cursor: CursorTrack;
|
|
166
|
+
meta: RecordingMeta;
|
|
167
|
+
actions: ActionsFile | null;
|
|
168
|
+
doc: ProjectDoc | null;
|
|
169
|
+
}
|
|
170
|
+
/** Load a take directory; cursor+meta are required, doc/actions optional. */
|
|
171
|
+
declare function loadTake(dir: string): Promise<TakeData>;
|
|
172
|
+
|
|
173
|
+
interface FrameRec {
|
|
174
|
+
file: string;
|
|
175
|
+
/** ms since t0 */
|
|
176
|
+
tMs: number;
|
|
177
|
+
}
|
|
178
|
+
interface SkippedStep {
|
|
179
|
+
/** index into actions.steps */
|
|
180
|
+
step: number;
|
|
181
|
+
do: string;
|
|
182
|
+
selector: string;
|
|
183
|
+
}
|
|
184
|
+
/** A stretch with no screencast frames — the page pixels did not change. */
|
|
185
|
+
interface FreezeSpan {
|
|
186
|
+
/** seconds into the take */
|
|
187
|
+
from: number;
|
|
188
|
+
to: number;
|
|
189
|
+
ms: number;
|
|
190
|
+
}
|
|
191
|
+
interface RecordResult {
|
|
192
|
+
events: CursorEvent[];
|
|
193
|
+
frames: FrameRec[];
|
|
194
|
+
meta: RecordingMeta;
|
|
195
|
+
/** steps whose selector never became visible — the take continued without them. */
|
|
196
|
+
skipped: SkippedStep[];
|
|
197
|
+
/** the initial goto never reached networkidle (recording proceeded anyway). */
|
|
198
|
+
navTimeout: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Smoothness telemetry: stretches ≥400ms with no visual change. Frozen
|
|
201
|
+
* footage is the #1 enemy of a smooth product video — either the flow should
|
|
202
|
+
* keep motion in frame (animate, hover a preview, scroll) or the doc should
|
|
203
|
+
* trim/speed through these. freezePct = share of the take that is frozen.
|
|
204
|
+
*/
|
|
205
|
+
freezes: FreezeSpan[];
|
|
206
|
+
freezePct: number;
|
|
207
|
+
/** The take reached --max-duration and stopped there; later steps did not run. */
|
|
208
|
+
capped: boolean;
|
|
209
|
+
}
|
|
210
|
+
interface RecordOpts {
|
|
211
|
+
/** Stop the capture at this many seconds (the hosted cap). */
|
|
212
|
+
maxDurationSeconds?: number;
|
|
213
|
+
}
|
|
214
|
+
declare function recordTake(browser: Browser, url: string, actions: ActionsFile, paths: TakePaths, log: (msg: string) => void, opts?: RecordOpts): Promise<RecordResult>;
|
|
215
|
+
|
|
216
|
+
declare function encodeRecording(browser: Browser, takeDir: string, onProgress: (fraction: number) => void): Promise<{
|
|
217
|
+
bytes: number;
|
|
218
|
+
}>;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Reuse: re-time a previous cut onto a NEW recording of the same
|
|
222
|
+
* script. The recorder's `meta.steps` say when each actions.json step ran
|
|
223
|
+
* in BOTH takes, so the old timeline maps onto the new one piecewise —
|
|
224
|
+
* matched step edges are the control points, and any source time in
|
|
225
|
+
* between interpolates. Explicit `anchor`s on camera spans resolve
|
|
226
|
+
* directly against the new steps and win over the map.
|
|
227
|
+
*
|
|
228
|
+
* Report, never guess: every span that
|
|
229
|
+
* could not re-anchor cleanly is NAMED in `flagged` with the reason in
|
|
230
|
+
* words — a vanished step, a skipped selector, a span clamped or dropped
|
|
231
|
+
* at the new take's edge. The agent fixes actions.json and re-runs; the
|
|
232
|
+
* verb never silently invents a cut.
|
|
233
|
+
*
|
|
234
|
+
* Pure functions, no I/O — reuse.test.ts drives them with synthetic
|
|
235
|
+
* step timelines; the browser gate is smoke-recut.ts.
|
|
236
|
+
*/
|
|
237
|
+
|
|
238
|
+
interface ReuseReport {
|
|
239
|
+
/** spans re-timed through an explicit anchor. */
|
|
240
|
+
anchored: number;
|
|
241
|
+
/** spans re-timed through the step map (approximate by nature). */
|
|
242
|
+
mapped: number;
|
|
243
|
+
/** everything that needs a human/agent look, in words. */
|
|
244
|
+
flagged: string[];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
interface PlanSummary {
|
|
248
|
+
doc: ProjectDoc;
|
|
249
|
+
zoomAuto: number;
|
|
250
|
+
zoomManual: number;
|
|
251
|
+
cursorKept: boolean;
|
|
252
|
+
fresh: boolean;
|
|
253
|
+
/** The style fields copied from `--style`'s reference, when given. */
|
|
254
|
+
styleFrom?: string;
|
|
255
|
+
styleFields?: readonly string[];
|
|
256
|
+
/** `--reuse`: what the re-anchor did and what it could not. */
|
|
257
|
+
reuse?: ReuseReport & {
|
|
258
|
+
from: string;
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
interface PlanOptions {
|
|
262
|
+
/**
|
|
263
|
+
* Style transfer at the data layer: a signed-off take whose
|
|
264
|
+
* zoomStyle/zoomParams/speedParams/tiltStyle/frame/cursor/cam/export are
|
|
265
|
+
* copied onto this take BEFORE the planners run, so the auto spans are
|
|
266
|
+
* proposed under the series' camera. The cut (spans, overlays, audio) is
|
|
267
|
+
* never touched; a field absent on the reference is removed here too.
|
|
268
|
+
*/
|
|
269
|
+
style?: {
|
|
270
|
+
from: string;
|
|
271
|
+
doc: ProjectDoc;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* The re-render loop: a PREVIOUS cut of the same script (a
|
|
275
|
+
* re-record's doc.prev.json) applied to this take's NEW footage. Style
|
|
276
|
+
* fields copy over like --style; the human's camera spans and trims
|
|
277
|
+
* re-time through the step map / explicit anchors; output-anchored work
|
|
278
|
+
* (overlays, audio, objects) carries at its output times; auto spans
|
|
279
|
+
* re-plan on the new cursor. The report NAMES whatever could not follow.
|
|
280
|
+
*/
|
|
281
|
+
reuse?: {
|
|
282
|
+
from: string;
|
|
283
|
+
doc: ProjectDoc;
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
declare function planTake(dir: string, opts?: PlanOptions): Promise<PlanSummary>;
|
|
287
|
+
|
|
288
|
+
interface DigestOptions {
|
|
289
|
+
outDir?: string;
|
|
290
|
+
full?: number;
|
|
291
|
+
crop?: number;
|
|
292
|
+
/** Skip the browser passes (moments only; activity null). */
|
|
293
|
+
frames?: boolean;
|
|
294
|
+
transcript?: readonly TranscriptSegment[] | null;
|
|
295
|
+
/** A reference doc whose style fields are REPORTED (never applied here). */
|
|
296
|
+
style?: {
|
|
297
|
+
from: string;
|
|
298
|
+
doc: ProjectDoc;
|
|
299
|
+
} | null;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
interface DigestResult {
|
|
303
|
+
file: string;
|
|
304
|
+
outDir: string;
|
|
305
|
+
digest: Digest;
|
|
306
|
+
bytes: number;
|
|
307
|
+
}
|
|
308
|
+
declare function digestTake(browser: Browser | null, dir: string, opts?: DigestOptions): Promise<DigestResult>;
|
|
309
|
+
/** Accept Whisper's `{segments:[…]}` or a bare `[{start,end,text}]`. */
|
|
310
|
+
declare function parseTranscript(raw: unknown): TranscriptSegment[];
|
|
311
|
+
|
|
312
|
+
interface MediaPullResult {
|
|
313
|
+
downloaded: {
|
|
314
|
+
file: string;
|
|
315
|
+
assetId: string;
|
|
316
|
+
bytes: number;
|
|
317
|
+
}[];
|
|
318
|
+
kept: string[];
|
|
319
|
+
}
|
|
320
|
+
declare function pullMedia(ctx: {
|
|
321
|
+
origin: string;
|
|
322
|
+
key: string | null;
|
|
323
|
+
}, dir: string, doc: ProjectDoc, log: (line: string) => void): Promise<MediaPullResult>;
|
|
324
|
+
|
|
325
|
+
interface DocOverrides {
|
|
326
|
+
/** raw `path=value` expressions from repeated --set. */
|
|
327
|
+
set?: string[];
|
|
328
|
+
/** --frame alias → frame.browserBar.kind. */
|
|
329
|
+
frame?: string;
|
|
330
|
+
/** --background alias → frame.backgroundMedia (kind inferred from the URL,
|
|
331
|
+
* or a backdrop SLUG from GET /api/backdrops, resolved by
|
|
332
|
+
* resolveBackdropSlug before the sync apply). */
|
|
333
|
+
background?: string;
|
|
334
|
+
/** The loop length a resolved backdrop slug brought with it. */
|
|
335
|
+
backgroundDuration?: number;
|
|
336
|
+
/** Platform origin for slug resolution (platformOrigin(flags)). */
|
|
337
|
+
origin?: string;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
interface RenderTakeOptions {
|
|
341
|
+
width?: number;
|
|
342
|
+
height?: number;
|
|
343
|
+
fps?: number;
|
|
344
|
+
format?: 'webm' | 'mp4';
|
|
345
|
+
/** Concurrent chunk renders (timeline sharding); 1 = single-flight. */
|
|
346
|
+
parallel?: number;
|
|
347
|
+
/** OUTPUT-time subrange [start, end) seconds — spot-check a doc edit cheaply. */
|
|
348
|
+
range?: [number, number];
|
|
349
|
+
/** Draft mode: half resolution + low bitrate, for iteration only. */
|
|
350
|
+
draft?: boolean;
|
|
351
|
+
/** Encoder bitrate override (a destination's byte ceiling as a budget). */
|
|
352
|
+
bitrate?: number;
|
|
353
|
+
/** In-memory doc overrides (--set / --frame / --background); lint-gated. */
|
|
354
|
+
overrides?: DocOverrides;
|
|
355
|
+
onPhase?: (phase: string) => void;
|
|
356
|
+
onProgress?: (fraction: number) => void;
|
|
357
|
+
}
|
|
358
|
+
interface RenderTakeResult {
|
|
359
|
+
out: string;
|
|
360
|
+
bytes: number;
|
|
361
|
+
width: number;
|
|
362
|
+
height: number;
|
|
363
|
+
fps: number;
|
|
364
|
+
duration: number;
|
|
365
|
+
zoomSpans: number;
|
|
366
|
+
clicks: number;
|
|
367
|
+
/** Number of chunks rendered (1 unless --parallel raised it). */
|
|
368
|
+
chunks: number;
|
|
369
|
+
/** An audio track was mixed + muxed (doc.audio clips / mic). */
|
|
370
|
+
audio: boolean;
|
|
371
|
+
}
|
|
372
|
+
declare function renderTake(browser: Browser, dir: string, outFile: string, opts: RenderTakeOptions): Promise<RenderTakeResult>;
|
|
373
|
+
|
|
374
|
+
interface RenderAnimationOptions {
|
|
375
|
+
/** Compiled vos animation code (module exporting initVos). */
|
|
376
|
+
animationCode: string;
|
|
377
|
+
/** Directory the page server roots at; chunk artifacts land here too. */
|
|
378
|
+
workDir: string;
|
|
379
|
+
/** Source video file name inside workDir (studio takes), served → blob URL. */
|
|
380
|
+
videoFile?: string;
|
|
381
|
+
/** Token inside animationCode replaced with the video blob URL. */
|
|
382
|
+
videoToken?: string;
|
|
383
|
+
width: number;
|
|
384
|
+
height: number;
|
|
385
|
+
fps: number;
|
|
386
|
+
duration: number;
|
|
387
|
+
format: 'webm' | 'mp4';
|
|
388
|
+
/** Max simultaneous chunk pages; 1 = single-flight (no concat). */
|
|
389
|
+
parallel?: number;
|
|
390
|
+
/**
|
|
391
|
+
* First GLOBAL frame to render (a range render: seek time starts here while
|
|
392
|
+
* output timestamps stay zero-based). duration then covers the range only.
|
|
393
|
+
*/
|
|
394
|
+
frameOffset?: number;
|
|
395
|
+
/** Encoder bitrate override (draft renders); default 10 Mbps. */
|
|
396
|
+
bitrate?: number;
|
|
397
|
+
/**
|
|
398
|
+
* Mix + mux an audio track in the SAME render (single-flight only — audio
|
|
399
|
+
* stays out of chunks by design, mirroring the cloud single-flight path).
|
|
400
|
+
* `producerCode` defines window.__vosAudioProducer__ (render-core);
|
|
401
|
+
* `data` is the lowered composition data (videoToken replaced in-page).
|
|
402
|
+
* `duration` is the FULL timeline — the producer builds the whole mix and
|
|
403
|
+
* the page slices its own frame window, so a range render keeps audio.
|
|
404
|
+
*/
|
|
405
|
+
audio?: {
|
|
406
|
+
producerCode: string;
|
|
407
|
+
data: unknown;
|
|
408
|
+
duration: number;
|
|
409
|
+
};
|
|
410
|
+
onProgress?: (fraction: number) => void;
|
|
411
|
+
}
|
|
412
|
+
interface RenderAnimationResult {
|
|
413
|
+
bytes: Uint8Array;
|
|
414
|
+
totalFrames: number;
|
|
415
|
+
/** Number of chunks actually rendered (1 = single-flight). */
|
|
416
|
+
chunks: number;
|
|
417
|
+
}
|
|
418
|
+
declare function renderAnimation(browser: Browser, opts: RenderAnimationOptions): Promise<RenderAnimationResult>;
|
|
419
|
+
|
|
420
|
+
/** One agent-browser command with its result: the `batch` record shape. */
|
|
421
|
+
interface AgentBrowserRecord {
|
|
422
|
+
command: string[] | string;
|
|
423
|
+
/** Single-command `--json` lines carry `data`; batch records carry `result`. */
|
|
424
|
+
data?: unknown;
|
|
425
|
+
result?: unknown;
|
|
426
|
+
success?: boolean;
|
|
427
|
+
error?: string | null;
|
|
428
|
+
}
|
|
429
|
+
interface ConvertOptions {
|
|
430
|
+
/** Overrides the walk's first `open`. */
|
|
431
|
+
url?: string;
|
|
432
|
+
/** Overrides the walk's `set viewport`. */
|
|
433
|
+
viewport?: {
|
|
434
|
+
width: number;
|
|
435
|
+
height: number;
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
interface ConvertResult {
|
|
439
|
+
actions: ActionsFile;
|
|
440
|
+
/** Every command that became no step, or a different step, with its line. */
|
|
441
|
+
notes: string[];
|
|
442
|
+
/** Commands that produced a step. */
|
|
443
|
+
steps: number;
|
|
444
|
+
/** Reads and session verbs: nothing to replay. */
|
|
445
|
+
ignored: number;
|
|
446
|
+
/** Actions the recorder cannot follow, or that failed in the walk. */
|
|
447
|
+
skipped: number;
|
|
448
|
+
}
|
|
449
|
+
/** Parse a steps.jsonl (or a batch array) into records; malformed lines are named. */
|
|
450
|
+
declare function parseAgentBrowserLog(text: string): {
|
|
451
|
+
records: AgentBrowserRecord[];
|
|
452
|
+
problems: string[];
|
|
453
|
+
};
|
|
454
|
+
/** Shell-style split for a `command` kept as one string: quotes group, backslash escapes. */
|
|
455
|
+
declare function splitCommand(command: string): string[];
|
|
456
|
+
/** The walk, as steps the recorder can replay. Pure. */
|
|
457
|
+
declare function convertAgentBrowser(records: AgentBrowserRecord[], opts?: ConvertOptions): ConvertResult;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Origin resolution: --origin (or legacy --api) → VOS_ORIGIN → legacy
|
|
461
|
+
* VOS_API_BASE (which historically carried a trailing /api) → https://vos.so.
|
|
462
|
+
* Every shape converges on a bare origin; paths below carry the /api prefix.
|
|
463
|
+
*/
|
|
464
|
+
declare function platformOrigin(flags?: {
|
|
465
|
+
origin?: string;
|
|
466
|
+
api?: string;
|
|
467
|
+
}): string;
|
|
468
|
+
/**
|
|
469
|
+
* Accepts a bare vos id, a watch URL (vos.so/vos/{id}), an embed URL
|
|
470
|
+
* (/embed/vos/{id}), or a studio/stage URL (?vos={id}).
|
|
471
|
+
*/
|
|
472
|
+
declare function parseVosId(input: string): string;
|
|
473
|
+
/**
|
|
474
|
+
* The full documented ladder: explicit --key → VOS_API_KEY → the first line
|
|
475
|
+
* of ~/.config/vos/credentials. A vos_rg_ remix grant is just a key here.
|
|
476
|
+
* Returns null when nothing resolves — callers decide whether auth is needed.
|
|
477
|
+
*/
|
|
478
|
+
declare function resolveCredential(explicit?: string): string | null;
|
|
479
|
+
interface SyncState {
|
|
480
|
+
vosId: string;
|
|
481
|
+
/** The hosted version this directory is based on — the next push's base. */
|
|
482
|
+
versionId: string | null;
|
|
483
|
+
pushedAt?: string;
|
|
484
|
+
title?: string;
|
|
485
|
+
slug?: string;
|
|
486
|
+
remixOfId?: string;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* vos.json → legacy push.json ({vosId, versionId}) → legacy meta.json
|
|
490
|
+
* ({id, currentVersionId} — guarded on a string `id` so a take dir's
|
|
491
|
+
* RecordingMeta meta.json is never misread as sync state).
|
|
492
|
+
*/
|
|
493
|
+
declare function readSyncState(dir: string): SyncState | null;
|
|
494
|
+
/** Merge-writes vos.json; the legacy files are left alone (read-only compat). */
|
|
495
|
+
declare function writeSyncState(dir: string, patch: Partial<SyncState> & {
|
|
496
|
+
vosId: string;
|
|
497
|
+
}): SyncState;
|
|
498
|
+
interface VersionChange {
|
|
499
|
+
versionId?: string;
|
|
500
|
+
versionNumber?: number;
|
|
501
|
+
origin?: string;
|
|
502
|
+
label?: string | null;
|
|
503
|
+
note?: string | null;
|
|
504
|
+
summary?: string;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
export { type ActionStep, type ActionsFile, type AgentBrowserRecord, BrowserUnavailableError, type ConvertOptions, type ConvertResult, type DigestOptions, type DigestResult, type LoadedConfig, type RenderAnimationOptions, type RenderAnimationResult, type RenderResult, type RenderStillOptions, type RenderTakeOptions, type RenderTakeResult, type RenderVideoOptions, type SyncState, type TakeData, type TakePaths, type VersionChange, configDuration, convertAgentBrowser, digestTake, encodeRecording, launchBrowser, loadTake, loadVosConfig, manifest, parseAgentBrowserLog, parseTranscript, parseVosId, planTake, platformOrigin, previewPages, pullMedia, readSyncState, recordTake, renderAnimation, renderStill, renderTake, renderVideo, resolveCredential, run, splitCommand, takePaths, validateActions, writeSyncState };
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,68 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
BrowserUnavailableError,
|
|
4
3
|
configDuration,
|
|
5
|
-
launchBrowser,
|
|
6
4
|
loadVosConfig,
|
|
7
5
|
previewPages,
|
|
8
6
|
renderStill,
|
|
9
7
|
renderVideo
|
|
10
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-X2BKHZ56.js";
|
|
9
|
+
import {
|
|
10
|
+
convertAgentBrowser,
|
|
11
|
+
digestTake,
|
|
12
|
+
encodeRecording,
|
|
13
|
+
loadTake,
|
|
14
|
+
parseAgentBrowserLog,
|
|
15
|
+
parseTranscript,
|
|
16
|
+
parseVosId,
|
|
17
|
+
planTake,
|
|
18
|
+
platformOrigin,
|
|
19
|
+
pullMedia,
|
|
20
|
+
readSyncState,
|
|
21
|
+
recordTake,
|
|
22
|
+
renderAnimation,
|
|
23
|
+
renderTake,
|
|
24
|
+
resolveCredential,
|
|
25
|
+
run,
|
|
26
|
+
splitCommand,
|
|
27
|
+
takePaths,
|
|
28
|
+
validateActions,
|
|
29
|
+
writeSyncState
|
|
30
|
+
} from "./chunk-6JJETC43.js";
|
|
31
|
+
import {
|
|
32
|
+
BrowserUnavailableError,
|
|
33
|
+
launchBrowser
|
|
34
|
+
} from "./chunk-A2VSDK3C.js";
|
|
35
|
+
import {
|
|
36
|
+
manifest
|
|
37
|
+
} from "./chunk-5BFGODBI.js";
|
|
11
38
|
export {
|
|
12
39
|
BrowserUnavailableError,
|
|
13
40
|
configDuration,
|
|
41
|
+
convertAgentBrowser,
|
|
42
|
+
digestTake,
|
|
43
|
+
encodeRecording,
|
|
14
44
|
launchBrowser,
|
|
45
|
+
loadTake,
|
|
15
46
|
loadVosConfig,
|
|
47
|
+
manifest,
|
|
48
|
+
parseAgentBrowserLog,
|
|
49
|
+
parseTranscript,
|
|
50
|
+
parseVosId,
|
|
51
|
+
planTake,
|
|
52
|
+
platformOrigin,
|
|
16
53
|
previewPages,
|
|
54
|
+
pullMedia,
|
|
55
|
+
readSyncState,
|
|
56
|
+
recordTake,
|
|
57
|
+
renderAnimation,
|
|
17
58
|
renderStill,
|
|
18
|
-
|
|
59
|
+
renderTake,
|
|
60
|
+
renderVideo,
|
|
61
|
+
resolveCredential,
|
|
62
|
+
run,
|
|
63
|
+
splitCommand,
|
|
64
|
+
takePaths,
|
|
65
|
+
validateActions,
|
|
66
|
+
writeSyncState
|
|
19
67
|
};
|
|
20
68
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vosjs/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.9.0",
|
|
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",
|
|
7
7
|
"author": "vosso",
|
|
8
|
-
"homepage": "https://vos.so/
|
|
8
|
+
"homepage": "https://vos.so/cli",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/vosjs/vos.git",
|
|
@@ -23,7 +23,11 @@
|
|
|
23
23
|
"headless",
|
|
24
24
|
"agent",
|
|
25
25
|
"animation",
|
|
26
|
-
"three"
|
|
26
|
+
"three",
|
|
27
|
+
"screen-recording",
|
|
28
|
+
"product-video",
|
|
29
|
+
"demo",
|
|
30
|
+
"auto-zoom"
|
|
27
31
|
],
|
|
28
32
|
"bin": {
|
|
29
33
|
"vos": "./dist/cli.js"
|
|
@@ -37,13 +41,20 @@
|
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
43
|
"files": [
|
|
40
|
-
"dist"
|
|
44
|
+
"dist",
|
|
45
|
+
"schema"
|
|
41
46
|
],
|
|
42
47
|
"sideEffects": false,
|
|
43
48
|
"dependencies": {
|
|
49
|
+
"mediabunny": "^1.27.3",
|
|
44
50
|
"playwright": "^1.49.0",
|
|
45
|
-
"@vosjs/core": "^0.23.
|
|
51
|
+
"@vosjs/core": "^0.23.1",
|
|
52
|
+
"@vosjs/editor": "^1.3.0",
|
|
46
53
|
"@vosjs/elements": "^0.8.0",
|
|
54
|
+
"@vosjs/render-core": "^0.1.0",
|
|
55
|
+
"@vosjs/shared": "^0.1.0",
|
|
56
|
+
"@vosjs/studio-core": "^0.1.0",
|
|
57
|
+
"@vosjs/timeline": "^0.4.0",
|
|
47
58
|
"@vosjs/tween": "^0.8.1"
|
|
48
59
|
},
|
|
49
60
|
"devDependencies": {
|