@vosjs/cli 0.83.0 → 0.83.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.
@@ -89,6 +89,25 @@ person before recording**; an answer that does neither was not an answer.
89
89
  the product is a real account, and report it at the end so they can
90
90
  delete what was made. A product where creating is cheap (a sandbox, a
91
91
  seeded local instance) needs the ledger written, not asked.
92
+ **Undo it in `teardown`** (`@vosjs/cli` 0.81 and later): the setup verbs,
93
+ run off camera after every rehearsal and take, and when one stops
94
+ early, so no rehearsal leaves a draft behind. When the video itself
95
+ deletes on camera what it made (a key created, then revoked), the
96
+ teardown is the net for a take that stopped before the delete: open it
97
+ with a guard on what the take created (`@vosjs/cli` 0.83 and later),
98
+ so a good take says `teardown: nothing to undo` instead of a failure.
99
+ ```json
100
+ "teardown": [
101
+ { "do": "press", "key": "Escape" },
102
+ { "do": "if", "selector": "[aria-label='Actions for CI deploy']" },
103
+ { "do": "click", "selector": "[aria-label='Actions for CI deploy']" },
104
+ { "do": "click", "selector": "role=menuitem[name='Revoke']" },
105
+ { "do": "click", "selector": "role=alertdialog >> role=button[name='Revoke']" }
106
+ ]
107
+ ```
108
+ A step that fails AFTER the guard is a real leftover: say it to the
109
+ person. Read the account back before you report (a `vos session exec`
110
+ script lists it) and say it holds what it held before.
92
111
  4. **What it SPENDS.** A step that costs something real (a generation, a
93
112
  purchase, a message sent, a deploy) carries `"guard": "spend"` and an
94
113
  `id`. A rehearsal hovers it and never presses it; `vos record` refuses
@@ -154,6 +173,17 @@ person before recording**; an answer that does neither was not an answer.
154
173
  steps as they are. Then the side-effect ledger (pre-flight, 3), then
155
174
  rehearse.
156
175
 
176
+ **Past what `look` reaches, script inside the session.** A state no
177
+ step reaches yet, what the account holds, a check after a flow: write
178
+ an ES module and run `vos session exec <app> script.mjs --url <page>`
179
+ (`@vosjs/cli` 0.81 and later). Its default export gets
180
+ `{ context, page, url, name }` on the profile exactly as `record` opens
181
+ it, and what it returns is printed. **Never open the session's profile
182
+ yourself** (Playwright's `launchPersistentContext`, a bundled Chromium, a
183
+ keychain flag): a browser that cannot read the profile's cookies starts
184
+ them over, the session is signed out for good, and the person signs in
185
+ again. Run one verb at a time on a session; two at once lock the profile.
186
+
157
187
  **Verified the feature with agent-browser already?** Keep that walk and
158
188
  skip the second script. agent-browser's `--json` result does not say
159
189
  what ran (`scroll` answers `{scrolled:true}`), so wrap each call so the
@@ -250,6 +280,12 @@ person before recording**; an answer that does neither was not an answer.
250
280
  flow is broken — fix it, never ship around it. A guarded step records
251
281
  only with `--confirm <id>` (pre-flight, 4). The take auto-encodes and
252
282
  auto-plans.
283
+ **Recording again into a take you already cut** (a fixed step, a longer
284
+ hold, the product changed): add `--reuse` (`@vosjs/cli` 0.81 and later).
285
+ The new footage replaces the old and your cut (zooms, captions, layers,
286
+ cover, sound) is re-timed onto it in the same command; the last line
287
+ names what it kept and what could not follow. Without it the take is
288
+ planned fresh and the cut waits in `doc.prev.json`.
253
289
  (`vos create --actions actions.json out.webm --strict` is the one-shot
254
290
  record+render verb — fine for a quick first pass, but THIS skill's loop
255
291
  reviews frames before rendering, so prefer the separate verbs here.)
@@ -302,9 +338,14 @@ person before recording**; an answer that does neither was not an answer.
302
338
  every zoom span is draggable.
303
339
 
304
340
  6c. **Pushing it to vos.so** (`vos push take`)? Set `still` in `doc.json`
305
- (OUTPUT seconds) to the payoff first, the result the video is about,
306
- never the opening: without one the cover is derived near the start,
307
- usually a zoom on a navigation control under the first caption.
341
+ (OUTPUT seconds) to the payoff BEFORE the first push, the result the
342
+ video is about, never the opening: without one the cover is derived near
343
+ the start, usually a zoom on a navigation control or an empty field
344
+ under the first caption, and moving it after costs a second version.
345
+ `vos plan take --still <t>` writes it and `vos frames take --at-still`
346
+ shows it: look before the push. The push writes
347
+ `take/vos.json`: its `vosId` is the link (`https://vos.so/vos/<vosId>`).
348
+ Read the link there, never from filtered logs or a lookup script.
308
349
 
309
350
  7. **Package for the destination**: `references/destinations.md`.
310
351
 
@@ -383,3 +424,14 @@ when the ask is a release, not one video.
383
424
  - Scripting a signed-in product blind: `vos look` first, then the ledger,
384
425
  then the rehearsal. Guessing selectors from a public page costs a take
385
426
  per guess.
427
+ - Opening a session's profile with your own Playwright: it signed a
428
+ founder's session out minutes after `vos look` had used it. Script
429
+ inside it with `vos session exec`.
430
+ - Recording again into a cut take without `--reuse`: the fresh plan takes
431
+ the cut's place.
432
+ - A teardown that undoes an on-camera delete with no `if` in front of its
433
+ undoing: every good take reports `TEARDOWN FAILED`, and a person learns
434
+ to ignore the line that one day is true.
435
+ - Cutting a caption's `duration` because the plan said it outlasts its
436
+ step: the words then cannot be read. Shorten the words, or give the step
437
+ more `ms` and record again.
@@ -26,6 +26,13 @@ how-tos and the cuts a person had to redo on them.
26
26
  the step in `actions.json`; `vos plan` and `vos join --captions` land
27
27
  each one anchored to its step, so a re-record carries it). One caption
28
28
  is one beat; a step with no caption is part of the beat before it.
29
+ It leaves when its step ends, or once its words are read when that is
30
+ later (17 characters a second, 1.2 to 3 s; `@vosjs/cli` 0.82 and later),
31
+ so a short caption on a quick step never lingers over the next one. A
32
+ caption the plan names as staying past its step has words that outrun
33
+ the beat: shorten them (an edit) or give the step more `ms` (a
34
+ re-record); never cut its `duration`, which takes the time its words
35
+ need to be read.
29
36
 
30
37
  3. **The result is the payoff, and the cold open.** Open on the finished
31
38
  result for a beat (a repeated segment at camera rest,
@@ -129,6 +129,19 @@ vos record --actions actions.json --out take --session acme --dry-run
129
129
  vos record --actions actions.json --out take --session acme --strict --json
130
130
  ```
131
131
 
132
+ Anything else you need from the signed-in browser (what the account holds,
133
+ a state no step reaches yet, a check that a flow cleaned up after itself)
134
+ runs INSIDE the session (`@vosjs/cli` 0.81 and later):
135
+
136
+ ```bash
137
+ vos session exec acme list-keys.mjs --url https://app.example.com/settings/keys
138
+ ```
139
+
140
+ `list-keys.mjs` is an ES module whose default export receives
141
+ `{ context, page, url, name }`, opened exactly as `record` opens the
142
+ profile; what it returns is printed (`result` in `--json`). Never open the
143
+ profile any other way: see the rules below.
144
+
132
145
  `--session` and `--storage-state` are two doors to one take; pass one.
133
146
  No file to mint, nothing in the take, nothing to delete: the profile lives
134
147
  under `~/.config/vos/sessions/` and `vos push` refuses a take that holds a
@@ -191,6 +204,13 @@ show, before anything is pushed further or handed over.
191
204
  mint again and it is a live credential for as long as it sits there.
192
205
  - **A session expires.** When a re-record that worked last week skips its
193
206
  first selector, re-walk the ladder before touching the script.
207
+ - **Never open a session's profile yourself.** Not with Playwright's
208
+ `launchPersistentContext`, not with a bundled Chromium, not with a
209
+ keychain flag patched in. A browser that cannot decrypt the profile's
210
+ cookies starts the store over: measured, one such launch signed a session
211
+ out for the system Chrome too, and the person had to sign in again. Every
212
+ read goes through a vos verb (`look`, `record`, `session exec`), one at a
213
+ time: two verbs on one profile at once lock it.
194
214
  - **A person signing in will use their REAL account**, whatever you asked
195
215
  for: it is the one they have. The recorder looks for you (`@vosjs/cli`
196
216
  0.42 and later): the rehearsal ends with `EXPOSED in the frame`, naming
@@ -232,7 +232,9 @@ shows it): the result the cut is about, never the opening. Without one the
232
232
  cover is derived near the start, usually a zoom on a navigation control
233
233
  under the first caption.
234
234
 
235
- The base comes from `vos.json`. `409 stale_base` → `vos pull`, re-apply on
235
+ The push writes `<take>/vos.json`: its `vosId` is the link
236
+ (`https://vos.so/vos/<vosId>`); read it there, never from filtered logs or
237
+ a lookup script. The base comes from `vos.json`. `409 stale_base` → `vos pull`, re-apply on
236
238
  top, push again. `409 protected_conflict` → keep the human's values unless
237
239
  the ask named that node (`--override <id>` only then). A 400 prints the
238
240
  field and its limit. Then `GET /api/vos/<id>`, follow