@runalabs/rill-cli 0.1.13 → 0.1.15

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.
Files changed (3) hide show
  1. package/README.md +42 -9
  2. package/dist/cli.js +1081 -392
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -19,13 +19,13 @@ rill run cancel <run-id>
19
19
 
20
20
  The first run opens Rill authorization if needed. Save optional website test accounts in Rill Settings using an account name, exact HTTPS origin, username, password, and optional login URL. Login appears in the private video, with masked password inputs; login diagnostics are omitted. MFA, CAPTCHA, external SSO, and unsupported login forms return a blocker.
21
21
 
22
- Cloud recordings are private by default. Closing the terminal disconnects without cancelling. Use `--no-wait` to return after submission, and `--id <same-run-id>` with identical arguments to retry an uncertain submission. Cloud runs use run credits: Free includes 3 per calendar month and Pro includes 20. Buy additional credits from Billing.
22
+ Cloud recordings are private by default. Closing the terminal disconnects without cancelling. Use `--no-wait` to return after submission, and `--id <same-run-id>` with identical arguments to retry an uncertain submission. Cloud runs use run credits: Check your current monthly allowance and balance in Billing; allowances depend on the account entitlement and service configuration. Buy additional credits there.
23
23
 
24
24
  The following local-recording instructions remain available through `record start` and `record stop`.
25
25
 
26
26
  ## Install and verify
27
27
 
28
- Browser recording runs on macOS and Linux. Install Node.js 22+ and Google Chrome or Chromium. Rill encodes recordings remotely by default; local FFmpeg is optional. Chrome stays on your machine and can access localhost. Raw frames upload after recording stops.
28
+ Browser recording runs on macOS, Linux, and Windows. Install Node.js 22+ and Google Chrome or Chromium. Rill encodes recordings remotely by default; local FFmpeg is optional. Chrome stays on your machine and can access localhost. Raw frames upload after recording stops.
29
29
 
30
30
  Then install the scoped package:
31
31
 
@@ -53,7 +53,7 @@ The first response contains `authorizationId`, `verificationUri`, `userCode`, `e
53
53
 
54
54
  ### Interactive login
55
55
 
56
- `rill login` prints a verification URL and device code. Open the URL, sign in, and approve the request. The CLI waits for approval and stores the credential in macOS Keychain or Linux Secret Service using `secret-tool`. Linux needs an available Secret Service keyring; use token authentication on headless machines without one.
56
+ `rill login` prints a verification URL and device code. Open the URL, sign in, and approve the request. The CLI waits for approval and stores the credential in macOS Keychain, Linux Secret Service, or Windows current-user DPAPI using `secret-tool`. Linux needs an available Secret Service keyring; use token authentication on headless machines without one.
57
57
 
58
58
  ### CI and unattended agents
59
59
 
@@ -124,7 +124,7 @@ rill record status <recording-id>
124
124
 
125
125
  Replace the placeholders with start's actual values. This snippet verifies attachment only until you add your flow assertions. Keep the directory for retries and remove it when finished. Playwright documents the [connected-browser disconnect behavior](https://playwright.dev/docs/api/class-browser#browser-close).
126
126
 
127
- Capture follows the first page selected at recording start. Keep the flow in that page: new tabs and popups do not receive complete video and diagnostic coverage. Keep the recorded page open until Rill stops.
127
+ Capture follows the page selected at recording start. Keep the flow in that page: new tabs and popups do not receive complete video and diagnostic coverage. Keep the recorded page open until Rill stops.
128
128
 
129
129
  ### Recording options
130
130
 
@@ -135,12 +135,32 @@ Capture follows the first page selected at recording start. Keep the flow in tha
135
135
  | `--title <title>` | Name the run; defaults to a timestamped title. |
136
136
  | `--description <text>` | Describe what the run demonstrates. |
137
137
  | `--headed` | Show the managed browser; default is headless. |
138
- | `--cdp-url <url>` | Attach to an existing Chromium browser and record its first open page. Navigate that page with your browser tool. |
138
+ | `--cdp-url <url>` | Attach to an existing Chromium CDP endpoint. Select a tab when several are open. |
139
+ | `--tab-id <id>` | Record the stable target ID returned by `record tabs`; requires `--cdp-url`. |
139
140
  | `--width <pixels>` / `--height <pixels>` | Managed viewport; defaults to 1280 × 720. |
140
141
  | `--max-duration <seconds>` | Automatically finalize local capture; defaults to 600. Still call `record stop` to upload. |
141
142
 
142
143
  Rill closes browsers it launches during finalization. Attached browsers remain open.
143
144
 
145
+ ### Record a tab you already use
146
+
147
+ Your Chromium browser must already expose a CDP endpoint; Rill cannot attach to an ordinary unexposed tab. Keep the endpoint local or otherwise access-controlled. This does not launch a second browser, switch tabs automatically or provide Safari/Firefox support.
148
+
149
+ ```bash
150
+ rill record tabs --cdp-url http://127.0.0.1:9222
151
+ rill record start --cdp-url http://127.0.0.1:9222 --tab-id <tab-id> --title "Checkout review"
152
+ # Continue your flow in that exact tab, then finalize/upload:
153
+ rill record stop <recording-id>
154
+ ```
155
+
156
+ Discovery requires no Rill sign-in and returns `tabId`, title and a sanitized URL. Query values, credentials and fragments are removed; embedded data/file URLs are omitted. Tab titles can still contain private content. Start returns the selected `tabId` at the top level and in `browserAttachment`. If only one page is open, `--tab-id` is optional. Several pages without a selection, or a closed/missing ID, fail instead of recording a different page. A tab ID remains tied to that tab across navigation; relist after closing it.
157
+
158
+ Keep automation on the selected target. For Playwright, inspect each page with `context.newCDPSession(page)`, call `Target.getTargetInfo`, match `targetInfo.targetId` to the returned `tabId`, and detach that inspection session. Do not assume `context.pages()[0]` is the recorded tab. `--url` deliberately navigates the selected tab when supplied; omit it to record the page as it is. Capture stays on this tab; popups and other tabs are not fully covered.
159
+
160
+ An older running recorder service cannot honor tab selection. Start detects this and fails before sending capture instructions. Finish active recordings first; the service exits after five idle minutes when it has no retained recoverable captures. For an immediate manual restart, inspect the local `/health` response over the configured Rill socket, verify its recorder PID, and terminate only that idle recorder process. Restarting it interrupts active captures; this release does not restart it automatically.
161
+
162
+ The CDP connection and disconnect behavior follow the [Playwright browser API](https://playwright.dev/docs/api/class-browser#browser-close).
163
+
144
164
  ## Set up a coding agent
145
165
 
146
166
  Install and authenticate the CLI where the agent runs. No separate skill installation is required. Optionally save the following workflow in your agent's project instructions or skill setup; it is also available in the [public agent instructions](https://userill.dev/docs/cli#agents):
@@ -187,6 +207,7 @@ Use `rill --help` or `<command> --help` for supported flags.
187
207
  | `rill connect --email <email> [--no-wait]` | Start or resume account approval. |
188
208
  | `rill connect status <authorization-id>` | Poll a saved approval once; obey `retryAfterSeconds`. |
189
209
  | `rill doctor` | Check prerequisites, API compatibility, and authentication. |
210
+ | `rill record tabs --cdp-url <url>` | List existing Chromium tabs without starting a recording. |
190
211
  | `rill record start [options]` | Start a managed or attached browser recording. |
191
212
  | `rill record stop <recording-id>` | Finalize and upload; supports `--no-wait` and `--no-feedback`. |
192
213
  | `rill record status <recording-id>` | Read remote state first, then local capture for unsubmitted recordings; local completion is `captured`. |
@@ -232,7 +253,7 @@ Lifecycle recovery also distinguishes `unsupported_platform`, `processing_pendin
232
253
  - **Remote upload interrupted or encoding failed:** keep the recording ID and local capture files. Run `rill record status <recording-id>`, then `rill record retry <recording-id>` with the original credential before capture expiry. Retry resumes accepted chunks or requeues the encode without repeating browser actions. A `ready` result needs a share URL before you return it as evidence.
233
254
  - **Duration limit reached:** local capture finalizes automatically. Status reports `captured`, `source: "local"`, and the exact `nextCommand` to upload. It is not a playable share. Run `record stop <recording-id> --no-wait`, then poll status.
234
255
  - **Upload reached 100%:** transfer has finished; encoding/playback processing may continue. `--no-wait` returns after submission with a status command. A polling timeout reports `processing_pending`, not a confirmed processing failure.
235
- - **Windows:** doctor reports `recorder_transport` failure, and local record start rejects before reserving a recording. Use macOS/Linux for browser recording. Windows can use `RILL_TOKEN` with video-only `upload`; setting `RILL_SOCKET` does not add named-pipe/TCP support.
256
+ - **Windows:** Chrome discovery, current-user DPAPI credential storage, and authenticated named-pipe recording are available in CLI 0.1.14. Use remote encoding by default; local encoding requires FFmpeg on PATH. Unset `RILL_SOCKET`; use `RILL_HOME` to isolate recorder identity and credentials. Returned commands use Windows PowerShell quoting.
236
257
  - **Terminal closed:** after upload acceptance, the server finishes independently; retrieve the result with `record status`. Before acceptance, retry from the original machine while its captured frames remain available.
237
258
  - **Local session missing:** `record status` checks remote encoding and recording state. Remote processing/completion takes precedence over retained local artifacts. For captures not submitted, it checks the local recorder. Remote authorization/network errors are surfaced rather than being masked by local readiness. `drafts list` locates local directories, which may be incomplete. There is no `drafts resume` command.
238
259
  - **Share cannot be inspected:** open the complete URL in a browser; ask the owner for a current link if needed.
@@ -259,7 +280,7 @@ Set recorder variables before starting the background recorder; an existing reco
259
280
 
260
281
  ## Sharing and privacy
261
282
 
262
- Ready recordings get an unlisted share link that expires after seven days. In the recording page, copy it, replace it with a fresh link, or stop sharing. Finished recordings can be deleted after a five-second undo window.
283
+ Anonymous and connected-local CLI recordings receive an unlisted link when ready. Anonymous recordings and their links expire seven days after creation; connected-local share links normally expire after seven days. Connecting an account does not make these links private. Signed-in cloud runs and saved screen recordings start private to the workspace; create a share link separately. Guest cloud results are available in the originating browser and through a secure emailed link for seven days. Existing private recordings retain their visibility. In the recording page, create or copy a share link, replace it with a fresh link, or stop sharing. Finished recordings can be deleted after a five-second undo window.
263
284
 
264
285
  Diagnostic redaction targets cookies, credential headers, URL query values, fragments, embedded credentials, and secret-shaped values. Network-body capture defaults off and is controlled by the human-issued credential; the agent cannot enable it for itself. Redaction is best-effort and does not mask the video. Avoid displaying secrets, review evidence before sharing, and treat share URLs as sensitive.
265
286
 
@@ -330,10 +351,22 @@ Progress runs through `uploading` → `queued` → `encoding` → `processing`
330
351
 
331
352
  `rill record start` can begin without sign-in when the server supports anonymous access. The CLI stores the identity in the OS credential store and uses local encoding. Anonymous access includes three successful recordings, at most five minutes and 250 MB each; each recording and its unlisted share link expires seven days after creation. Failed uploads do not consume the successful-recording allowance. Source and service rate limits also apply.
332
353
 
333
- Run `rill connect --email you@example.com` to authorize account access or keep your anonymous recordings. Open the displayed link, sign in, and enter the code yourself. Approval allows creation and reading of your existing and new recordings for 90 days, with automatic renewal of one-hour access tokens. Revoke the connection in Rill's Credentials page to stop access and renewal. Deletion and changes to existing sharing settings are not included.
354
+ Run `rill connect --email you@example.com` to authorize account access or keep your anonymous recordings. Open the displayed link, sign in, and enter the code yourself. Approval allows creation and reading of your existing and new recordings for 90 days, with automatic renewal of one-hour access tokens. Revoke the connection in Settings → Agent access to stop access and renewal. Deletion and changes to existing sharing settings are not included.
334
355
 
335
- Use `rill record list` to list accessible recordings and `rill inspect <recording-id>` for private recording details. `rill inspect <share-url>` continues to work without account access. The existing `rill login` and `RILL_TOKEN` flows remain supported. Local credential storage requires macOS Keychain or Linux Secret Service.
356
+ Use `rill record list` to list accessible recordings and `rill inspect <recording-id>` for private recording details. `rill inspect <share-url>` continues to work without account access. The existing `rill login` and `RILL_TOKEN` flows remain supported. Local credential storage requires macOS Keychain, Linux Secret Service, or Windows current-user DPAPI.
336
357
 
337
358
  ### Check the connected account
338
359
 
339
360
  Run `rill whoami` (or `rill --pretty whoami`) to verify your current identity. JSON output includes status, account email when available, workspace, scopes, and access expiry. It uses RILL_TOKEN when set, otherwise the saved OS credential. Existing access can renew automatically; it never creates an identity or opens an approval flow. Missing credentials return `not_connected` and exit 1. Invalid or revoked credentials return an error.
361
+
362
+ ### Capture time and upload progress (0.1.14)
363
+
364
+ `record start` and active local `record status` return `startedAt`, `stopsAt`, `maxDurationSeconds`, `elapsedSeconds`, and `remainingSeconds`. Use the remaining time to budget retries. After automatic capture stop, status reports `captured` with the stop/upload command; zero remaining time does not mean playback is ready. Fields may be absent for recovered drafts or an older daemon.
365
+
366
+ Remote frame uploads write accepted/total MiB, transfer speed and an approximate remaining transfer time to stderr. Estimates use this attempt's observed transfers, including retry delays, and exclude previously uploaded bytes. They do not estimate queue or encoding time. JSON stdout stays machine readable. Failed local captures offer an explicit cancellation command for their remote slot; local drafts are retained.
367
+
368
+ ### Failed local capture recovery
369
+
370
+ If the local recorder reports a terminal failure without a finalized artifact, `rill record stop <id>` attempts to release its unused server reservation and preserves the capture error. The JSON error uses `local_capture_failed` with `details.reservationReleased`; a failed cleanup includes the status command for the selected API origin.
371
+
372
+ When `record start` is blocked by a recording concurrency slot, it checks the reported blocking recording in the local daemon. A confirmed failed capture with no artifact can release its own unused reservation, then retry creation once with the same request ID. Missing/active local state, retained artifacts, other credentials, Stream uploads, encoding jobs and quota-counted reservations are preserved. Older servers or unavailable networks leave the original quota error and manual recovery guidance intact. Daily upload/storage limits still apply. This change does not resume a failed capture, import missing diagnostics, or add Windows recording support.