@vosjs/cli 0.9.0 → 0.9.2
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/{chunk-6JJETC43.js → chunk-NKUOT5JE.js} +15 -3
- package/dist/chunk-NKUOT5JE.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +43 -3
- package/dist/index.js +11 -1
- package/dist/{run-22RIQESF.js → run-OBJBU7X6.js} +2 -2
- package/package.json +5 -5
- package/schema/actions.schema.json +5 -0
- package/dist/chunk-6JJETC43.js.map +0 -1
- /package/dist/{run-22RIQESF.js.map → run-OBJBU7X6.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -484,7 +484,7 @@ async function cmdCheck(argv) {
|
|
|
484
484
|
return result.ok ? EXIT_OK : EXIT_ERROR;
|
|
485
485
|
}
|
|
486
486
|
async function delegate(argv, viaAlias = false) {
|
|
487
|
-
const { run } = await import("./run-
|
|
487
|
+
const { run } = await import("./run-OBJBU7X6.js");
|
|
488
488
|
if (viaAlias && argv[0]) {
|
|
489
489
|
process.stderr.write(
|
|
490
490
|
`note: "vos voila ${argv[0]}" is now "vos ${argv[0]}".
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Browser } from 'playwright';
|
|
1
|
+
import { Browser, Page } from 'playwright';
|
|
2
2
|
import { CursorTrack, RecordingMeta, ProjectDoc, CursorEvent, TranscriptSegment, Digest } from '@vosjs/studio-core';
|
|
3
3
|
export { Digest } from '@vosjs/studio-core';
|
|
4
4
|
|
|
@@ -112,11 +112,20 @@ type ActionStep = ({
|
|
|
112
112
|
} | {
|
|
113
113
|
do: 'click';
|
|
114
114
|
selector: string;
|
|
115
|
-
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Type into `selector`. The recorder clicks the field first, which is what
|
|
118
|
+
* opens the typing zoom on it; `focus: false` types into the field as it is
|
|
119
|
+
* already focused, for a keystroke that follows earlier typing (a submitting
|
|
120
|
+
* Enter) rather than starting it — a second click there rings a click effect
|
|
121
|
+
* on empty space beside the text.
|
|
122
|
+
*/
|
|
123
|
+
| {
|
|
116
124
|
do: 'type';
|
|
117
125
|
selector: string;
|
|
118
126
|
text: string;
|
|
119
127
|
delayMs?: number;
|
|
128
|
+
focus?: boolean;
|
|
120
129
|
} | {
|
|
121
130
|
do: 'scroll';
|
|
122
131
|
dy: number;
|
|
@@ -149,6 +158,7 @@ type ActionStep = ({
|
|
|
149
158
|
/** Structural validation with actionable messages. Returns [] when valid. */
|
|
150
159
|
declare function validateActions(value: unknown): string[];
|
|
151
160
|
|
|
161
|
+
declare const RECORDING_NAME = "recording.webm";
|
|
152
162
|
interface TakePaths {
|
|
153
163
|
dir: string;
|
|
154
164
|
recording: string;
|
|
@@ -456,6 +466,22 @@ declare function splitCommand(command: string): string[];
|
|
|
456
466
|
/** The walk, as steps the recorder can replay. Pure. */
|
|
457
467
|
declare function convertAgentBrowser(records: AgentBrowserRecord[], opts?: ConvertOptions): ConvertResult;
|
|
458
468
|
|
|
469
|
+
interface TakeServer {
|
|
470
|
+
base: string;
|
|
471
|
+
close: () => void;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Static server over the take dir + generated pages + a POST /save endpoint
|
|
475
|
+
* the in-page encoder/renderer uses to hand bytes back to node. The recording
|
|
476
|
+
* is fetched → blob URL (seekable), but a take-dir VIDEO BACKGROUND
|
|
477
|
+
* (frame.backgroundMedia.key = "/bg.webm") is loaded directly by ON_FRAME and
|
|
478
|
+
* seeked during export — so this serves Range/206 (an HTMLVideoElement hangs
|
|
479
|
+
* forever seeking a naive 200-only static server).
|
|
480
|
+
*/
|
|
481
|
+
declare function startTakeServer(rootDir: string, pages: Record<string, string>): Promise<TakeServer>;
|
|
482
|
+
/** Poll a capture/encode page for window.__done / __error / __progress. */
|
|
483
|
+
declare function waitForPageDone(page: Page, label: string, onProgress: (fraction: number) => void, timeoutMs: number): Promise<Record<string, unknown>>;
|
|
484
|
+
|
|
459
485
|
/**
|
|
460
486
|
* Origin resolution: --origin (or legacy --api) → VOS_ORIGIN → legacy
|
|
461
487
|
* VOS_API_BASE (which historically carried a trailing /api) → https://vos.so.
|
|
@@ -476,6 +502,20 @@ declare function parseVosId(input: string): string;
|
|
|
476
502
|
* Returns null when nothing resolves — callers decide whether auth is needed.
|
|
477
503
|
*/
|
|
478
504
|
declare function resolveCredential(explicit?: string): string | null;
|
|
505
|
+
interface ApiResult {
|
|
506
|
+
status: number;
|
|
507
|
+
body: Record<string, unknown>;
|
|
508
|
+
}
|
|
509
|
+
declare function apiJson(origin: string, path: string, init?: {
|
|
510
|
+
method?: string;
|
|
511
|
+
key?: string | null;
|
|
512
|
+
body?: unknown;
|
|
513
|
+
/** Raw request body (uploads) — used verbatim, with `headers`. */
|
|
514
|
+
raw?: Uint8Array;
|
|
515
|
+
headers?: Record<string, string>;
|
|
516
|
+
}): Promise<ApiResult>;
|
|
517
|
+
/** Human-readable error line for a failed platform response. Never echoes credentials. */
|
|
518
|
+
declare function apiError(what: string, r: ApiResult): string;
|
|
479
519
|
interface SyncState {
|
|
480
520
|
vosId: string;
|
|
481
521
|
/** The hosted version this directory is based on — the next push's base. */
|
|
@@ -504,4 +544,4 @@ interface VersionChange {
|
|
|
504
544
|
summary?: string;
|
|
505
545
|
}
|
|
506
546
|
|
|
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 };
|
|
547
|
+
export { type ActionStep, type ActionsFile, type AgentBrowserRecord, BrowserUnavailableError, type ConvertOptions, type ConvertResult, type DigestOptions, type DigestResult, type LoadedConfig, RECORDING_NAME, type RenderAnimationOptions, type RenderAnimationResult, type RenderResult, type RenderStillOptions, type RenderTakeOptions, type RenderTakeResult, type RenderVideoOptions, type SyncState, type TakeData, type TakePaths, type TakeServer, type VersionChange, apiError, apiJson, configDuration, convertAgentBrowser, digestTake, encodeRecording, launchBrowser, loadTake, loadVosConfig, manifest, parseAgentBrowserLog, parseTranscript, parseVosId, planTake, platformOrigin, previewPages, pullMedia, readSyncState, recordTake, renderAnimation, renderStill, renderTake, renderVideo, resolveCredential, run, splitCommand, startTakeServer, takePaths, validateActions, waitForPageDone, writeSyncState };
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,9 @@ import {
|
|
|
7
7
|
renderVideo
|
|
8
8
|
} from "./chunk-X2BKHZ56.js";
|
|
9
9
|
import {
|
|
10
|
+
RECORDING_NAME,
|
|
11
|
+
apiError,
|
|
12
|
+
apiJson,
|
|
10
13
|
convertAgentBrowser,
|
|
11
14
|
digestTake,
|
|
12
15
|
encodeRecording,
|
|
@@ -24,10 +27,12 @@ import {
|
|
|
24
27
|
resolveCredential,
|
|
25
28
|
run,
|
|
26
29
|
splitCommand,
|
|
30
|
+
startTakeServer,
|
|
27
31
|
takePaths,
|
|
28
32
|
validateActions,
|
|
33
|
+
waitForPageDone,
|
|
29
34
|
writeSyncState
|
|
30
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-NKUOT5JE.js";
|
|
31
36
|
import {
|
|
32
37
|
BrowserUnavailableError,
|
|
33
38
|
launchBrowser
|
|
@@ -37,6 +42,9 @@ import {
|
|
|
37
42
|
} from "./chunk-5BFGODBI.js";
|
|
38
43
|
export {
|
|
39
44
|
BrowserUnavailableError,
|
|
45
|
+
RECORDING_NAME,
|
|
46
|
+
apiError,
|
|
47
|
+
apiJson,
|
|
40
48
|
configDuration,
|
|
41
49
|
convertAgentBrowser,
|
|
42
50
|
digestTake,
|
|
@@ -61,8 +69,10 @@ export {
|
|
|
61
69
|
resolveCredential,
|
|
62
70
|
run,
|
|
63
71
|
splitCommand,
|
|
72
|
+
startTakeServer,
|
|
64
73
|
takePaths,
|
|
65
74
|
validateActions,
|
|
75
|
+
waitForPageDone,
|
|
66
76
|
writeSyncState
|
|
67
77
|
};
|
|
68
78
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vosjs/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
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",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"mediabunny": "^1.27.3",
|
|
50
50
|
"playwright": "^1.49.0",
|
|
51
|
-
"@vosjs/core": "^0.23.1",
|
|
52
|
-
"@vosjs/editor": "^1.3.0",
|
|
53
51
|
"@vosjs/elements": "^0.8.0",
|
|
54
|
-
"@vosjs/
|
|
52
|
+
"@vosjs/editor": "^1.3.0",
|
|
53
|
+
"@vosjs/core": "^0.23.1",
|
|
55
54
|
"@vosjs/shared": "^0.1.0",
|
|
56
|
-
"@vosjs/
|
|
55
|
+
"@vosjs/render-core": "^0.1.0",
|
|
57
56
|
"@vosjs/timeline": "^0.4.0",
|
|
57
|
+
"@vosjs/studio-core": "^0.1.0",
|
|
58
58
|
"@vosjs/tween": "^0.8.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
@@ -115,6 +115,11 @@
|
|
|
115
115
|
"minimum": 0,
|
|
116
116
|
"default": 40
|
|
117
117
|
},
|
|
118
|
+
"focus": {
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"default": true,
|
|
121
|
+
"description": "The recorder clicks the field before typing, and that click is what opens the typing zoom on it. false types into the field as it is already focused: for a keystroke that finishes earlier typing (a submitting Enter) rather than starting it, where a second click rings a click effect on empty space beside the text."
|
|
122
|
+
},
|
|
118
123
|
"id": {
|
|
119
124
|
"type": "string",
|
|
120
125
|
"minLength": 1,
|