screenci 0.0.67 → 0.0.69
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 +1 -1
- package/dist/cli.d.ts +3 -18
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +105 -154
- package/dist/cli.js.map +1 -1
- package/dist/docs/manifest.d.ts +13 -13
- package/dist/docs/manifest.js +4 -4
- package/dist/docs/manifest.js.map +1 -1
- package/dist/docs/video-sources/studio.video.d.ts +2 -0
- package/dist/docs/video-sources/studio.video.d.ts.map +1 -0
- package/dist/docs/video-sources/studio.video.js +57 -0
- package/dist/docs/video-sources/studio.video.js.map +1 -0
- package/dist/e2e/htmlRasterizer.e2e.d.ts +2 -0
- package/dist/e2e/htmlRasterizer.e2e.d.ts.map +1 -0
- package/dist/e2e/htmlRasterizer.e2e.js +107 -0
- package/dist/e2e/htmlRasterizer.e2e.js.map +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/src/asset.d.ts +141 -53
- package/dist/src/asset.d.ts.map +1 -1
- package/dist/src/asset.js +533 -78
- package/dist/src/asset.js.map +1 -1
- package/dist/src/audio.d.ts +113 -0
- package/dist/src/audio.d.ts.map +1 -0
- package/dist/src/audio.js +204 -0
- package/dist/src/audio.js.map +1 -0
- package/dist/src/changeFocus.d.ts.map +1 -1
- package/dist/src/changeFocus.js +17 -3
- package/dist/src/changeFocus.js.map +1 -1
- package/dist/src/defaults.d.ts +7 -1
- package/dist/src/defaults.d.ts.map +1 -1
- package/dist/src/defaults.js +9 -2
- package/dist/src/defaults.js.map +1 -1
- package/dist/src/events.d.ts +138 -6
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +80 -2
- package/dist/src/events.js.map +1 -1
- package/dist/src/htmlRasterizer.d.ts +110 -0
- package/dist/src/htmlRasterizer.d.ts.map +1 -0
- package/dist/src/htmlRasterizer.js +364 -0
- package/dist/src/htmlRasterizer.js.map +1 -0
- package/dist/src/init.d.ts +17 -0
- package/dist/src/init.d.ts.map +1 -1
- package/dist/src/init.js +127 -7
- package/dist/src/init.js.map +1 -1
- package/dist/src/instrument.d.ts.map +1 -1
- package/dist/src/instrument.js +5 -3
- package/dist/src/instrument.js.map +1 -1
- package/dist/src/linkSession.d.ts +36 -0
- package/dist/src/linkSession.d.ts.map +1 -0
- package/dist/src/linkSession.js +122 -0
- package/dist/src/linkSession.js.map +1 -0
- package/dist/src/mouse.d.ts +4 -0
- package/dist/src/mouse.d.ts.map +1 -1
- package/dist/src/mouse.js +31 -10
- package/dist/src/mouse.js.map +1 -1
- package/dist/src/performance.d.ts +41 -0
- package/dist/src/performance.d.ts.map +1 -0
- package/dist/src/performance.js +49 -0
- package/dist/src/performance.js.map +1 -0
- package/dist/src/recording.d.ts +1 -1
- package/dist/src/recording.d.ts.map +1 -1
- package/dist/src/recordingData.d.ts +2 -2
- package/dist/src/recordingData.d.ts.map +1 -1
- package/dist/src/runtimeContext.d.ts +38 -0
- package/dist/src/runtimeContext.d.ts.map +1 -1
- package/dist/src/runtimeContext.js +25 -0
- package/dist/src/runtimeContext.js.map +1 -1
- package/dist/src/runtimeMode.d.ts +7 -0
- package/dist/src/runtimeMode.d.ts.map +1 -1
- package/dist/src/runtimeMode.js +10 -0
- package/dist/src/runtimeMode.js.map +1 -1
- package/dist/src/types.d.ts +40 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/video.d.ts +34 -1
- package/dist/src/video.d.ts.map +1 -1
- package/dist/src/video.js +120 -19
- package/dist/src/video.js.map +1 -1
- package/dist/src/voices.d.ts +22 -9
- package/dist/src/voices.d.ts.map +1 -1
- package/dist/src/voices.js +6 -24
- package/dist/src/voices.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -2
- package/skills/screenci/SKILL.md +27 -5
- package/skills/screenci/references/init.md +2 -0
- package/skills/screenci/references/record.md +6 -1
package/skills/screenci/SKILL.md
CHANGED
|
@@ -119,16 +119,38 @@ await autoZoom(async () => {
|
|
|
119
119
|
|
|
120
120
|
## Command Notes
|
|
121
121
|
|
|
122
|
+
- `screenci init` (or `npm init screenci`) scaffolds a new project. It can be run at any time, but if the project is already initialized it fails on purpose: it exits with an error like `screenci/ already exists`. That is expected, not a problem to fix. Do not delete the existing project to force a re-init. Continue working with the project that is already there. On a fresh init it also prints a sign-in link (valid for 24 hours) so the user can sign in early, before any recording.
|
|
122
123
|
- `screenci record` runs the recording flow with local Playwright.
|
|
123
|
-
-
|
|
124
|
-
|
|
124
|
+
- `screenci test <playwright args...>` forwards most Playwright test arguments unchanged, while still using `screenci.config.ts`.
|
|
125
|
+
|
|
126
|
+
### Sign in early (do this first)
|
|
127
|
+
|
|
128
|
+
Signing in does not block writing or testing the video, only the final recording. So get it started up front, in parallel with your work:
|
|
129
|
+
|
|
130
|
+
1. Find the sign-in link. A fresh `screenci init` prints one (valid for 24 hours). If you did not just init (the project already exists), run `npx screenci record` once to print the link, or `cat screenci/.screenci/link-session.json` if a session is already cached.
|
|
131
|
+
2. Surface that link to the user verbatim and ask them to open it, sign in, and choose a plan while you build and test the video. Tell them it just needs to be done before the final recording.
|
|
132
|
+
3. Build and test the video as normal (`npx screenci test`) while they sign in.
|
|
133
|
+
4. For the final recording, run `npx screenci record --poll-auth`: if they already signed in it records immediately; otherwise it polls and records automatically once they finish. There is no harm in attempting it before they are done: if it has not happened yet, it just reprints the link (and times out cleanly after a few minutes). Re-prompt the user to sign in and run it again.
|
|
134
|
+
|
|
135
|
+
### Signing in, and why a clean exit may not mean a recording happened
|
|
136
|
+
|
|
137
|
+
`screenci record` needs a `SCREENCI_SECRET`. If one is not set, it does not record yet. Instead it bootstraps sign-in:
|
|
138
|
+
|
|
139
|
+
- When the session is **interactive** (a terminal), `screenci record` prints a one-time auth link, waits for browser sign-in, saves the secret into the configured `envFile` or project `.env`, and then continues recording automatically.
|
|
140
|
+
- When the session is **non-interactive** (no terminal, for example run from an automated agent, a pipe, or CI; or `SCREENCI_NONINTERACTIVE=1`), `screenci record` does **not** wait. It prints the sign-in link and exits cleanly with exit code 0 **without recording**. A clean exit here is a handoff, not a finished recording. Whenever the output contains a sign-in link, treat the run as "needs sign-in," not "done," even though the exit code is 0.
|
|
141
|
+
|
|
142
|
+
How to handle the non-interactive case (this is the common case for agents):
|
|
143
|
+
|
|
144
|
+
1. Surface the printed sign-in link to the user verbatim and ask them to open it, sign in, and choose a plan.
|
|
145
|
+
2. After the user confirms they have signed in, rerun `npx screenci record`. It detects the completed session, saves the secret, and continues recording. The same link can be retried as many times as needed until it completes or expires.
|
|
146
|
+
3. Alternatively, run `npx screenci record --poll-auth` to print the link once and keep polling (every 5 seconds, for up to 5 minutes by default) until sign-in completes, then continue recording automatically in the same run. Use this when you can leave the command running while the user signs in. If the timeout elapses before sign-in, it exits cleanly with the link still valid, so rerun it (or plain `record`) to continue.
|
|
147
|
+
|
|
125
148
|
- To skip sign-in entirely, set `SCREENCI_SECRET` ahead of time (env var or project `.env`).
|
|
126
149
|
- Pending auth state is cached in `.screenci/link-session.json`, so rerunning `record` reuses the same link until it expires or completes.
|
|
127
|
-
- `screenci test <playwright args...>` forwards most Playwright test arguments unchanged, while still using `screenci.config.ts`.
|
|
128
150
|
|
|
129
151
|
## Recording Workflow
|
|
130
152
|
|
|
131
|
-
1. Start from the existing initialized ScreenCI package.
|
|
153
|
+
1. Start from the existing initialized ScreenCI package. Early on, surface the sign-in link to the user (printed by `screenci init`, or by running `npx screenci record` once, or from `screenci/.screenci/link-session.json`) and ask them to sign in while you build the video. The link is valid for 24 hours and only needs to be used before the final recording.
|
|
132
154
|
2. Add or edit `.video.ts` files in `videos/`.
|
|
133
155
|
Remove `videos/example.video.ts` if you are creating new videos and do not need the starter video.
|
|
134
156
|
For narration, define `const narration = createNarration({ ... })` near the top of the file and trigger lines with `await narration.someKey()` when the full line should finish before moving on. Use `await narration.someKey.start()` only when narration should overlap with the next action, and `await narration.someKey.end()` only to close that same active cue later. This is especially important before visible navigation or page changes. Use inline tags like `[pronounce: ...]` and `[short pause]` inside cue text when needed, especially for URLs and domains such as `screenci.com [pronounce: screen see eye dot com]`.
|
|
@@ -150,7 +172,7 @@ await autoZoom(async () => {
|
|
|
150
172
|
```
|
|
151
173
|
|
|
152
174
|
3. Run `npx screenci test` until it passes.
|
|
153
|
-
4.
|
|
175
|
+
4. For the final recording, run `npx screenci record --poll-auth`. If the user already signed in (via the link from step 1) it records immediately; otherwise it polls and continues automatically once they finish, then times out cleanly after a few minutes with the link still valid. A clean exit that printed a sign-in link (exit code 0) does not mean a recording was made: if that happens, re-prompt the user to sign in and run the command again. The link can be retried until it completes.
|
|
154
176
|
5. ScreenCI writes `.screenci/<video-name>/recording.mp4` and `data.json` for each recorded video.
|
|
155
177
|
|
|
156
178
|
## Specific Tasks
|
|
@@ -29,6 +29,8 @@ package.json
|
|
|
29
29
|
|
|
30
30
|
## Notes
|
|
31
31
|
|
|
32
|
+
- `init` can be run at any time, but it is non-destructive and will not re-initialize an existing project. If the project is already initialized (a `screenci/` directory already exists), it fails on purpose and exits with an error like `screenci/ already exists`. That is expected. Do not delete the existing project to force a re-init: continue working with the project that is already there.
|
|
33
|
+
- On a fresh init, the command also prints a sign-in link (valid for 24 hours) and caches it in `screenci/.screenci/link-session.json`. Surface this link to the user early so they can sign in while the video is being built. Sign-in only needs to be completed before the final recording, and a later `screenci record` reuses this same link.
|
|
32
34
|
- Prefer `--yes` for non-interactive setup. Without it, the command prompts for setup choices and defaults the project name to the current directory name when none is provided.
|
|
33
35
|
- The name is used as the ScreenCI project display name. Files are always created in the current directory.
|
|
34
36
|
- `--yes` accepts the defaults.
|
|
@@ -19,11 +19,16 @@ npx screenci record -c screenci.config.ts
|
|
|
19
19
|
- Saves output under `.screenci/<video-name>/`
|
|
20
20
|
- Produces at least `recording.mp4` and `data.json`
|
|
21
21
|
|
|
22
|
+
## Sign In Early
|
|
23
|
+
|
|
24
|
+
Sign-in only blocks the final recording, not authoring or testing. Get it going up front: surface the sign-in link to the user early (printed by `screenci init`, or by running `npx screenci record` once, or read from `screenci/.screenci/link-session.json`) and ask them to sign in while you build the video. The link is valid for 24 hours. For the final recording, prefer `npx screenci record --poll-auth` so it records as soon as sign-in completes. Attempting it before they finish does no harm: it reprints the link and times out cleanly, so re-prompt and run again.
|
|
25
|
+
|
|
22
26
|
## Runtime Behavior
|
|
23
27
|
|
|
24
28
|
- Recording runs with local Playwright.
|
|
25
29
|
- When `SCREENCI_SECRET` is missing in an interactive terminal, `screenci record` prints a one-time auth link, waits for browser sign-in, saves the secret, and then continues.
|
|
26
|
-
- When `SCREENCI_SECRET` is missing in a non-interactive session (no terminal, or `SCREENCI_NONINTERACTIVE=1`), `screenci record` does not wait: it prints the sign-in link and exits. Surface that link to whoever can sign in and choose a plan; rerunning `record` afterwards detects the completed session and continues. Set `SCREENCI_SECRET` ahead of time to skip sign-in entirely.
|
|
30
|
+
- When `SCREENCI_SECRET` is missing in a non-interactive session (no terminal, or `SCREENCI_NONINTERACTIVE=1`), `screenci record` does not wait: it prints the sign-in link and exits cleanly with exit code 0 without recording. A clean exit here is a handoff, not a finished recording, so do not treat exit code 0 as "recording done" when the output contains a sign-in link. Surface that link to whoever can sign in and choose a plan; rerunning `record` afterwards detects the completed session and continues. The link can be retried until it completes or expires. Set `SCREENCI_SECRET` ahead of time to skip sign-in entirely.
|
|
31
|
+
- Use `npx screenci record --poll-auth` to print the link once and keep polling (every 5 seconds, for up to 5 minutes by default) until sign-in completes, then continue recording automatically in the same run, instead of exiting and waiting for a manual rerun. If the timeout elapses first, it exits cleanly with the link still valid so it can be rerun. Override the timeout with `SCREENCI_POLL_AUTH_TIMEOUT_MS` (milliseconds).
|
|
27
32
|
- Pending auth state is cached in `.screenci/link-session.json`, so rerunning `record` reuses the same link until it expires or completes.
|
|
28
33
|
- Playwright arguments can be passed through after the command.
|
|
29
34
|
- When API configuration and `SCREENCI_SECRET` are available, uploads may run after recording.
|