@phnx-labs/agents-cli 1.18.3 → 1.18.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,83 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.18.4
4
+
5
+ **Browser**
6
+
7
+ - New canonical shape for action commands: bind the task once per shell via
8
+ `AGENTS_BROWSER_TASK`, then drop the positional `<task>` from every later
9
+ call. The old positional shape still works but emits a one-line deprecation
10
+ warning on stderr — agents and scripts can migrate at their own pace.
11
+ ```bash
12
+ export AGENTS_BROWSER_TASK=$(agents browser start --profile work)
13
+ agents browser navigate https://example.com
14
+ agents browser click 42
15
+ agents browser screenshot
16
+ ```
17
+ Env vars are per-process, so parallel agents in different shells never collide.
18
+ `--task <name>` is supported on every action command as an explicit one-off override.
19
+ - `agents browser start` writes the resolved task name to **stdout** as a
20
+ single line (e.g. `swift-crab-falcon-a3f92b1c`), and routes the human
21
+ commentary ("Started task ... with tab ...", "Tip: export
22
+ AGENTS_BROWSER_TASK=...") to **stderr**. This makes
23
+ `T=$(agents browser start --profile X)` Just Work — no `--quiet` flag needed.
24
+ - Auto-generated task names are now three English words plus an 8-char hex
25
+ suffix, e.g. `swift-crab-falcon-a3f92b1c`. Memorable, distinct, 32 bits of
26
+ entropy so parallel agents never collide. Daemon retries on the (vanishingly
27
+ rare) name clash and rejects explicit `--task <name>` values that already
28
+ exist.
29
+ - `agents browser start --profile <name>` now pre-validates the profile
30
+ locally before touching the daemon. Missing profile prints the list of
31
+ available profiles plus the create-command hint instead of a generic error.
32
+ - `agents browser tab list` is now `agents browser tabs` (top-level), pairing
33
+ cleanly with `agents browser tab focus <id>`. The old `tab list` form is
34
+ removed.
35
+ - `agents browser --help` is reorganized by mental model — *Session lifecycle*,
36
+ *Drive the page*, *Capture evidence* — instead of an alphabetical dump.
37
+ Rare commands stay under a trailing *Commands* section.
38
+ - BREAKING: `agents browser profiles prime` and `agents browser profiles launch`
39
+ are removed. Both were thin duplicates of `start`. For first-run
40
+ onboarding, just `agents browser start --profile <name>` and complete the
41
+ interactive screens in the browser; the user-data-dir persists across
42
+ runs. The daemon's `launch-profile` IPC action is also gone.
43
+ - Named endpoint presets per profile. One profile can now cover the local
44
+ and remote variants of the same app instead of forcing two parallel
45
+ profiles. YAML supports both the legacy `endpoints: [url]` shape and the
46
+ new map form:
47
+ ```yaml
48
+ name: rush
49
+ browser: custom
50
+ electron: true
51
+ endpoints:
52
+ local:
53
+ target: cdp://127.0.0.1:9223
54
+ binary: /Applications/Rush.app/Contents/MacOS/Rush
55
+ mac-mini:
56
+ target: ssh://mac-mini?port=9223
57
+ # no binary — daemon attaches only
58
+ defaultEndpoint: local
59
+ ```
60
+ `agents browser start --profile rush --endpoint mac-mini` picks a specific
61
+ preset; `--endpoint` falls back to `defaultEndpoint` or the first preset.
62
+ Pre-validated client-side so a typo doesn't waste an IPC round-trip.
63
+ Per-endpoint `binary` and `targetFilter` override the profile-level
64
+ fields. `agents browser profiles show` lists every preset, marks the
65
+ default, and shows per-endpoint overrides.
66
+ - The daemon's runtime identity is now `<profile>@<endpoint>` so the same
67
+ profile can run at multiple endpoints concurrently without colliding on
68
+ pid/port files. `agents browser status` and `tasks` show the composite
69
+ name, so you can tell at a glance which variant a task is using.
70
+ - `agents browser screenshot --quality raw` captures pixel-faithful PNG
71
+ (no downscale) for archived QA evidence. Default stays `compressed`
72
+ (JPEG, capped near 100 KB) for chat-injected screenshots.
73
+ - New `agents browser record start` / `agents browser record stop`
74
+ recording verbs. Captures via CDP `Page.startScreencast`, pipes frames
75
+ into ffmpeg (image2pipe → libvpx-vp9) and writes a webm under
76
+ `sessions/<task>/recordings/`. Bounded three ways — `--fps` (default
77
+ 5), `--duration` (hard cap, default 60s), `--max-mb` (default 25);
78
+ whichever fires first auto-finalizes the file. Requires ffmpeg on
79
+ PATH (`brew install ffmpeg`).
80
+
3
81
  ## 1.18.3
4
82
 
5
83
  **Plugins** ([#22](https://github.com/phnx-labs/agents-cli/issues/22))
package/README.md CHANGED
@@ -304,13 +304,20 @@ Give agents access to a real browser — no relay extension, no cloud service, n
304
304
  # Create an isolated profile for automation
305
305
  agents browser profiles create work --browser chrome
306
306
 
307
- # Start a task, navigate, interact
308
- agents browser start --profile work --task login-flow --url https://app.example.com
309
- agents browser refs login-flow # Get interactive element refs
310
- agents browser click login-flow 42 # Click element ref 42
311
- agents browser type login-flow 15 "hello" # Type into element ref 15
312
- agents browser screenshot login-flow # Smart resizing, token-efficient
313
- agents browser done login-flow # Close task's tabs when finished
307
+ # Start a task once, then bind it to this shell — every later command picks it up.
308
+ # `start` writes the resolved name (e.g. `swift-crab-falcon-a3f92b1c`) to stdout
309
+ # and human-friendly commentary to stderr, so $(...) capture stays clean.
310
+ export AGENTS_BROWSER_TASK=$(agents browser start --profile work --url https://app.example.com)
311
+ agents browser refs # Get interactive element refs
312
+ agents browser click 42 # Click element ref 42
313
+ agents browser type 15 "hello" # Type into element ref 15
314
+ agents browser screenshot # Smart resizing, token-efficient
315
+ agents browser tabs # List tabs open for the current task
316
+ agents browser tab focus tab123 # Switch focus to another tab
317
+ agents browser done # Close task's tabs when finished
318
+
319
+ # Need to address a different task in the same shell? Override per call:
320
+ agents browser screenshot --task other-flow
314
321
  ```
315
322
 
316
323
  ### Why this works where Playwright fails