@phnx-labs/agents-cli 1.23.16 → 1.23.18
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 +75 -0
- package/README.md +140 -165
- package/dist/bootstrap.js +10 -16
- package/dist/cli/command-registry.d.ts +1 -2
- package/dist/cli/command-registry.js +1 -10
- package/dist/commands/accounts.js +7 -7
- package/dist/commands/cloud-transcripts.d.ts +0 -1
- package/dist/commands/cloud-transcripts.js +2 -2
- package/dist/commands/cloud.js +1 -1
- package/dist/commands/config.js +0 -4
- package/dist/commands/cost.js +1 -1
- package/dist/commands/daemon-index.js +0 -1
- package/dist/commands/detach.d.ts +1 -1
- package/dist/commands/detach.js +5 -5
- package/dist/commands/exec.js +10 -22
- package/dist/commands/feed.d.ts +1 -1
- package/dist/commands/feed.js +3 -3
- package/dist/commands/focus.d.ts +1 -4
- package/dist/commands/focus.js +12 -13
- package/dist/commands/fork.d.ts +0 -1
- package/dist/commands/fork.js +7 -16
- package/dist/commands/harness-wizard.js +1 -1
- package/dist/commands/harness.js +1 -1
- package/dist/commands/insights.d.ts +0 -1
- package/dist/commands/insights.js +3 -7
- package/dist/commands/open.js +1 -1
- package/dist/commands/output.js +1 -1
- package/dist/commands/profiles.d.ts +1 -1
- package/dist/commands/profiles.js +2 -2
- package/dist/commands/projects.js +1 -1
- package/dist/commands/prune.js +1 -1
- package/dist/commands/ps.d.ts +0 -1
- package/dist/commands/ps.js +63 -18
- package/dist/commands/routines.js +1 -1
- package/dist/commands/send.js +1 -1
- package/dist/commands/sessions-backfill.d.ts +0 -1
- package/dist/commands/sessions-backfill.js +3 -6
- package/dist/commands/sessions-browser.d.ts +0 -10
- package/dist/commands/sessions-browser.js +19 -25
- package/dist/commands/sessions-migrate.d.ts +2 -2
- package/dist/commands/sessions-migrate.js +13 -13
- package/dist/commands/sessions-optimize.d.ts +0 -1
- package/dist/commands/sessions-optimize.js +0 -3
- package/dist/commands/sessions-picker.js +11 -11
- package/dist/commands/sessions-resume.d.ts +16 -15
- package/dist/commands/sessions-resume.js +101 -269
- package/dist/commands/sessions-stats.d.ts +0 -1
- package/dist/commands/sessions-stats.js +5 -8
- package/dist/commands/sessions-stop.d.ts +1 -1
- package/dist/commands/sessions-stop.js +6 -6
- package/dist/commands/sessions-trace.d.ts +1 -1
- package/dist/commands/sessions-trace.js +40 -17
- package/dist/commands/sessions-watch.js +2 -2
- package/dist/commands/sessions.test-fixture.d.ts +1 -0
- package/dist/commands/sessions.test-fixture.js +14 -0
- package/dist/commands/setup-browser.js +4 -4
- package/dist/commands/setup-computer.js +4 -4
- package/dist/commands/setup-fleet.js +1 -1
- package/dist/commands/setup-preferences.js +1 -1
- package/dist/commands/{sessions-backup-setup.d.ts → setup-session-backup.d.ts} +2 -2
- package/dist/commands/{sessions-backup-setup.js → setup-session-backup.js} +8 -8
- package/dist/commands/setup.js +3 -1
- package/dist/commands/ssh.js +4 -5
- package/dist/commands/sync.js +1 -1
- package/dist/commands/teams.js +2 -2
- package/dist/commands/utils.d.ts +0 -1
- package/dist/commands/utils.js +0 -10
- package/dist/index.js +0 -71
- package/dist/lib/accounting/rotate.js +1 -1
- package/dist/lib/analytics/mix-commands.js +1 -1
- package/dist/lib/auth-mint.js +2 -2
- package/dist/lib/browser-client.d.ts +0 -1
- package/dist/lib/browser-client.js +0 -3
- package/dist/lib/cloud/antigravity.js +1 -1
- package/dist/lib/cloud/cursor.js +3 -3
- package/dist/lib/cloudflare/creds.js +2 -2
- package/dist/lib/computer/context.d.ts +4 -21
- package/dist/lib/computer/context.js +3 -24
- package/dist/lib/computer/policy.d.ts +0 -10
- package/dist/lib/computer/policy.js +0 -28
- package/dist/lib/computer-client.d.ts +0 -44
- package/dist/lib/computer-client.js +17 -121
- package/dist/lib/config-keys.d.ts +1 -1
- package/dist/lib/config-keys.js +0 -3
- package/dist/lib/crabbox/cli.js +1 -1
- package/dist/lib/device-config.js +5 -28
- package/dist/lib/devices/connect.d.ts +1 -1
- package/dist/lib/devices/connect.js +3 -6
- package/dist/lib/devices/doctor-findings.d.ts +2 -1
- package/dist/lib/devices/doctor-findings.js +4 -4
- package/dist/lib/exec.js +1 -1
- package/dist/lib/feed/activity.js +1 -1
- package/dist/lib/fleet/apply.js +1 -1
- package/dist/lib/help.d.ts +0 -1
- package/dist/lib/help.js +2 -10
- package/dist/lib/hosts/option.js +1 -1
- package/dist/lib/hosts/passthrough.d.ts +0 -1
- package/dist/lib/hosts/passthrough.js +2 -26
- package/dist/lib/hosts/reconnect.js +5 -5
- package/dist/lib/hosts/remote-cmd.d.ts +3 -5
- package/dist/lib/hosts/remote-cmd.js +15 -20
- package/dist/lib/hosts/remote-session-id.js +1 -1
- package/dist/lib/installations/active-check.js +1 -1
- package/dist/lib/installations/migrate.js +4 -15
- package/dist/lib/installations/versions.js +1 -1
- package/dist/lib/launch-log.js +3 -6
- package/dist/lib/owner-notify.d.ts +1 -6
- package/dist/lib/owner-notify.js +0 -2
- package/dist/lib/paths.d.ts +0 -1
- package/dist/lib/paths.js +0 -8
- package/dist/lib/permissions.js +1 -1
- package/dist/lib/redact.d.ts +0 -1
- package/dist/lib/redact.js +0 -4
- package/dist/lib/remote-agents-json.d.ts +3 -1
- package/dist/lib/remote-agents-json.js +8 -6
- package/dist/lib/reserved-stores.js +1 -1
- package/dist/lib/scheduling/routines.d.ts +0 -1
- package/dist/lib/scheduling/routines.js +1 -1
- package/dist/lib/session/active.d.ts +1 -1
- package/dist/lib/session/db.js +3 -3
- package/dist/lib/session/detached.d.ts +0 -1
- package/dist/lib/session/detached.js +0 -23
- package/dist/lib/session/discover.d.ts +2 -2
- package/dist/lib/session/presentation.d.ts +0 -7
- package/dist/lib/session/presentation.js +4 -4
- package/dist/lib/session/projection.js +1 -1
- package/dist/lib/session/remote/remote-list.d.ts +2 -0
- package/dist/lib/session/remote/remote-list.js +3 -2
- package/dist/lib/session/remote/watch.js +4 -5
- package/dist/lib/session/remote-active.js +1 -1
- package/dist/lib/session/resume-command.d.ts +0 -1
- package/dist/lib/session/resume-command.js +1 -4
- package/dist/lib/session/resume-owner.d.ts +0 -2
- package/dist/lib/session/resume-owner.js +0 -6
- package/dist/lib/session/selection.d.ts +4 -5
- package/dist/lib/session/selection.js +2 -2
- package/dist/lib/session/sync/config.d.ts +0 -25
- package/dist/lib/session/sync/config.js +0 -62
- package/dist/lib/session/sync/managed-config.d.ts +0 -1
- package/dist/lib/session/sync/managed-config.js +0 -3
- package/dist/lib/session/sync/worker-template.js +1 -1
- package/dist/lib/sessions-client.d.ts +0 -16
- package/dist/lib/sessions-client.js +1 -187
- package/dist/lib/startup/command-registry.d.ts +2 -0
- package/dist/lib/startup/command-registry.js +36 -3
- package/dist/lib/startup/root-command.d.ts +0 -1
- package/dist/lib/startup/root-command.js +0 -21
- package/dist/lib/sync-umbrella.js +1 -1
- package/dist/lib/terminal/resolve.js +1 -1
- package/dist/lib/watchdog/rotate.js +1 -1
- package/dist/lib/watchdog/watchdog.d.ts +1 -1
- package/dist/lib/watchdog/watchdog.js +2 -2
- package/package.json +1 -1
- package/dist/commands/browser.d.ts +0 -7
- package/dist/commands/browser.js +0 -139
- package/dist/commands/computer.d.ts +0 -48
- package/dist/commands/computer.js +0 -244
- package/dist/commands/resume.d.ts +0 -23
- package/dist/commands/resume.js +0 -158
- package/dist/commands/secrets-passthrough.d.ts +0 -3
- package/dist/commands/secrets-passthrough.js +0 -52
- package/dist/commands/sessions-bookmark.d.ts +0 -2
- package/dist/commands/sessions-bookmark.js +0 -92
- package/dist/commands/sessions-export.d.ts +0 -31
- package/dist/commands/sessions-export.js +0 -409
- package/dist/commands/sessions-import.d.ts +0 -6
- package/dist/commands/sessions-import.js +0 -343
- package/dist/commands/sessions-inject.d.ts +0 -14
- package/dist/commands/sessions-inject.js +0 -143
- package/dist/commands/sessions-picker-factory.d.ts +0 -24
- package/dist/commands/sessions-picker-factory.js +0 -59
- package/dist/commands/sessions-render.d.ts +0 -11
- package/dist/commands/sessions-render.js +0 -119
- package/dist/commands/sessions-share.d.ts +0 -15
- package/dist/commands/sessions-share.js +0 -171
- package/dist/commands/sessions.d.ts +0 -122
- package/dist/commands/sessions.js +0 -1760
- package/dist/lib/address.d.ts +0 -39
- package/dist/lib/address.js +0 -128
- package/dist/lib/computer/record.d.ts +0 -6
- package/dist/lib/computer/record.js +0 -25
- package/dist/lib/openclaw-keychain.d.ts +0 -43
- package/dist/lib/openclaw-keychain.js +0 -227
- package/dist/lib/session/bundle.d.ts +0 -76
- package/dist/lib/session/bundle.js +0 -146
- package/dist/lib/session/remote/remote-bundle.d.ts +0 -7
- package/dist/lib/session/remote/remote-bundle.js +0 -40
- package/dist/lib/session/remote/remote.d.ts +0 -35
- package/dist/lib/session/remote/remote.js +0 -198
- package/dist/lib/session/remote-bundle.d.ts +0 -1
- package/dist/lib/session/remote-bundle.js +0 -1
- package/dist/lib/session/remote.d.ts +0 -1
- package/dist/lib/session/remote.js +0 -1
- package/dist/lib/session/sync/agents.d.ts +0 -24
- package/dist/lib/session/sync/agents.js +0 -0
- package/dist/lib/session/sync/backend.d.ts +0 -22
- package/dist/lib/session/sync/backend.js +0 -44
- package/dist/lib/session/sync/managed-key.d.ts +0 -5
- package/dist/lib/session/sync/managed-key.js +0 -87
- package/dist/lib/session/sync/net-client.d.ts +0 -29
- package/dist/lib/session/sync/net-client.js +0 -87
- package/dist/lib/session/sync/r2.d.ts +0 -20
- package/dist/lib/session/sync/r2.js +0 -103
- package/dist/lib/session/sync/transcript-crypto.d.ts +0 -41
- package/dist/lib/session/sync/transcript-crypto.js +0 -115
package/README.md
CHANGED
|
@@ -77,7 +77,7 @@ stays put).
|
|
|
77
77
|
|
|
78
78
|
**Learn (concepts):** [Loop + graph engineering](https://agi-cli.sh/learn/loop-and-graph-engineering) · [Teams as graph engineering](https://agi-cli.sh/learn/teams-graph-engineering) · [Sessions · index + cross-device](https://agi-cli.sh/learn/sessions-index) · [Distributed fleet execution](https://agi-cli.sh/learn/distributed-fleet). Also: [harness engineering](https://agi-cli.sh/learn/harness-engineering) · [visual longform](https://share.agents-cli.sh/muqsitnawaz/agents-loop-and-graph-engineering).
|
|
79
79
|
|
|
80
|
-
Already installed? `agents upgrade` updates agi-cli itself to the latest version (`agents upgrade 1.2.3` for a specific version or dist-tag, `-y` to skip the confirm prompt). The command is `upgrade` on every platform -- do not reach for `agents update`, which updates an installed **agent harness**, not agi-cli
|
|
80
|
+
Already installed? `agents upgrade` updates agi-cli itself to the latest version (`agents upgrade 1.2.3` for a specific version or dist-tag, `-y` to skip the confirm prompt). The command is `upgrade` on every platform -- do not reach for `agents update`, which updates an installed **agent harness**, not agi-cli.
|
|
81
81
|
|
|
82
82
|
Source: [github.com/phnx-labs/agi-cli](https://github.com/phnx-labs/agi-cli)
|
|
83
83
|
|
|
@@ -140,7 +140,7 @@ agents routines add nightly-payments-audit \
|
|
|
140
140
|
agents doctor
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
`agents insights perf` reads a disposable warehouse at `~/.agents/.cache/perf/perf.db` -- hook, command, and run timing rollups, deletable any time. `agents insights`
|
|
143
|
+
`agents insights perf` reads a disposable warehouse at `~/.agents/.cache/perf/perf.db` -- hook, command, and run timing rollups, deletable any time. `agents insights` is deterministic and offline: it caches per-session facets, compares harnesses, and ranks actions by evidence count -- no model call unless you pass `--narrative`. Routines put any of this on a cron ([Routines](#routines)); the menu bar is the always-on control surface for the fleet these commands drive ([Menu bar](#menu-bar)).
|
|
144
144
|
|
|
145
145
|
---
|
|
146
146
|
|
|
@@ -294,61 +294,59 @@ ACP adapters are documented for claude, codex, cursor, opencode, openclaw, and g
|
|
|
294
294
|
## Sessions across agents
|
|
295
295
|
|
|
296
296
|
<p align="center">
|
|
297
|
-
<img src="assets/sessions.svg" alt="
|
|
297
|
+
<img src="assets/sessions.svg" alt="sessions: search transcripts across Claude, Codex, legacy Gemini, and OpenCode at once, plus a live panel showing each running session's state (working / waiting / idle)." width="100%" />
|
|
298
298
|
</p>
|
|
299
299
|
|
|
300
300
|
|
|
301
|
-
When you run multiple agents, conversations scatter across tools. Session search brings them together.
|
|
301
|
+
When you run multiple agents, conversations scatter across tools. Session search brings them together. Searching and reading transcripts is the standalone **`sessions` CLI** (`@phnx-labs/sessions-cli`, installed by `agents setup tools`); agents-cli keeps the index it reads current.
|
|
302
302
|
|
|
303
303
|
```bash
|
|
304
304
|
# Where was that auth conversation? Search Claude Code, Codex, legacy Gemini, OpenCode at once.
|
|
305
|
-
|
|
305
|
+
sessions "auth middleware"
|
|
306
306
|
|
|
307
307
|
# Filter by agent, project, or time window
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
sessions --agent codex --since 7d
|
|
309
|
+
sessions --project my-app
|
|
310
310
|
|
|
311
311
|
# Read a full conversation
|
|
312
|
-
|
|
312
|
+
sessions a1b2c3d4 --markdown
|
|
313
313
|
|
|
314
314
|
# Render a shareable, redacted Markdown transcript with the session preview on top
|
|
315
|
-
|
|
315
|
+
sessions render a1b2c3d4 -o session.md
|
|
316
316
|
|
|
317
317
|
# Or publish it as a link in one step (unlisted + redacted by default)
|
|
318
|
-
|
|
318
|
+
sessions share a1b2c3d4
|
|
319
319
|
|
|
320
320
|
# Visualize a session as a trajectory -- tool-call waterfall, timing, stalls, errors
|
|
321
321
|
agents trace a1b2c3d4 # opens the HTML (a person at a terminal)
|
|
322
322
|
agents trace a1b2c3d4 --text --errors-only # compact text an agent reads in-context
|
|
323
|
-
agents
|
|
323
|
+
agents trace a1b2c3d4 --json # the versioned sessions-trace envelope
|
|
324
324
|
|
|
325
325
|
# Just the last 3 turns, user messages only
|
|
326
|
-
|
|
326
|
+
sessions a1b2c3d4 --last 3 --include user
|
|
327
327
|
|
|
328
|
-
# Search indexed tool calls
|
|
328
|
+
# Search indexed tool calls (same index)
|
|
329
329
|
sessions --include tools --query 'program:git input:merge' --query 'program:gh output:CONFLICT' --json
|
|
330
330
|
sessions --include tools --query 'program:git' --count --host box1,box2 --json
|
|
331
331
|
|
|
332
|
-
# Populate historical tool rows once on each device
|
|
333
|
-
agents
|
|
332
|
+
# Populate historical tool rows once on each device
|
|
333
|
+
agents daemon index backfill tools --fleet
|
|
334
334
|
|
|
335
335
|
# Which skills/commands you actually invoke -- and which installed ones are dead weight
|
|
336
|
-
agents
|
|
337
|
-
agents
|
|
338
|
-
agents
|
|
336
|
+
agents insights resources
|
|
337
|
+
agents insights resources --zero # only the never-invoked (dead weight)
|
|
338
|
+
agents daemon index backfill resources # fold historical sessions into the usage index
|
|
339
339
|
|
|
340
340
|
# Friction, owner corrections, repeated recipes, and ranked actions across harnesses
|
|
341
|
-
agents
|
|
342
|
-
agents
|
|
343
|
-
# Top-level alias
|
|
344
|
-
agents insights --since 7d
|
|
341
|
+
agents insights --since 30d
|
|
342
|
+
agents insights --agent claude --agent codex --json
|
|
345
343
|
```
|
|
346
344
|
|
|
347
|
-
`
|
|
345
|
+
`agents insights` is deterministic and offline by default. It caches per-session facets, compares harnesses, and emits an actions table with evidence counts plus shortened sample session ids. `--narrative` is opt-in and receives aggregates only, never raw transcripts.
|
|
348
346
|
|
|
349
347
|
Interactive picker when you're in a terminal. Structured output (`--json`, `--markdown`, filtered by role or turn count) when piped.
|
|
350
348
|
|
|
351
|
-
Backed by a SQLite + FTS5 index at `~/.agents/.history/sessions/sessions.db` with incremental scanning -- warm reads in ~100ms. Tool-call evidence is redacted and bounded before it is cached. agents writes the tool index (`agents
|
|
349
|
+
Backed by a SQLite + FTS5 index at `~/.agents/.history/sessions/sessions.db` with incremental scanning -- warm reads in ~100ms. Tool-call evidence is redacted and bounded before it is cached. agents writes the tool index (`agents daemon index backfill tools` performs the one-time historical parse, while normal incremental scans index new and changed sessions); the standalone `sessions --include tools` reads it, including `--count` over the ordered static Bash program sites. This uses relational SQLite rows and literal FTS5 only, with no embeddings, vector database, or model calls. External tools can consume `--json` output as a programmatic observability layer; see [docs/sessions.md](cli/docs/sessions.md) for the schemas and [docs/observability.md](cli/docs/observability.md) for the consumption patterns.
|
|
352
350
|
|
|
353
351
|
### Live state, and catching up fast
|
|
354
352
|
|
|
@@ -363,55 +361,47 @@ agents ps --bookmarks # only bookmarked sessions
|
|
|
363
361
|
agents ps --routine nightly-review # only one routine's runs (omit the name for all routines)
|
|
364
362
|
agents ps stop|focus|detach|migrate <id> # act on one running agent
|
|
365
363
|
agents ps migrations # where migrated sessions went
|
|
364
|
+
agents ps --status working # actively producing work (fleet-wide)
|
|
365
|
+
agents ps --status idle # stopped between turns
|
|
366
|
+
agents ps --status orphaned # agent outlived its terminal client
|
|
367
|
+
agents ps focus a1b2c3d4 # jump back into one — attach in place, or recover
|
|
368
|
+
agents ps focus ag-claude-a1b2c3d4 # or by its tmux alias
|
|
366
369
|
```
|
|
367
370
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
```bash
|
|
371
|
-
agents sessions --active # every live run across the fleet, with state
|
|
372
|
-
agents sessions --working # actively producing work (fleet-wide)
|
|
373
|
-
agents sessions --idle # stopped between turns (fleet-wide)
|
|
374
|
-
agents sessions --orphan # agent outlived its terminal client
|
|
375
|
-
agents sessions --crashed # terminal and agent disappeared uncleanly
|
|
376
|
-
agents sessions resume a1b2c3d4 # jump back into one — attach in place, or recover
|
|
377
|
-
agents sessions resume ag-claude-a1b2c3d4 # or by its tmux alias
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
On a terminal, `agents sessions --active` (and a bare `agents sessions`) open the **interactive session browser** — one filter you drive with single keys, re-pulled live across the fleet:
|
|
371
|
+
On a terminal, a bare `sessions` opens the **interactive session browser** — one filter you drive with single keys:
|
|
381
372
|
|
|
382
373
|
| key | filters by | flag it mirrors |
|
|
383
374
|
|---|---|---|
|
|
384
|
-
| `s` | search text
|
|
385
|
-
| `r` | running only | `--active` |
|
|
386
|
-
| `b` | bookmarks only | `--bookmarks` |
|
|
387
|
-
| `*` | bookmark / unbookmark the highlighted session | `agents sessions bookmark <id>` |
|
|
388
|
-
| `f` | focus the highlighted session | `agents sessions resume <id>` |
|
|
389
|
-
| `c` | team sessions | `--team` (alias: `--teams`) |
|
|
375
|
+
| `s` | search text (title + full text) | positional query |
|
|
390
376
|
| `a` | agent (cycles) | `-a` |
|
|
391
|
-
| `d` | device (cycles) | `--
|
|
377
|
+
| `d` | device (cycles) | `--machine` |
|
|
378
|
+
| `t` | one team | `--in-team` |
|
|
379
|
+
| `c` | team-spawned sessions | `--teams` |
|
|
380
|
+
| `b` | bookmarks only | `--bookmarks` |
|
|
381
|
+
| `*` | bookmark / unbookmark the highlighted session | `sessions bookmark <id>` |
|
|
392
382
|
| `p` | this repo ↔ all dirs | `--all` |
|
|
393
383
|
| `w` | time window | `--since` |
|
|
394
384
|
| `tab` | toggle the preview pane | — |
|
|
395
|
-
| `⏎` | resume
|
|
396
|
-
| `y` | copy the equivalent command |
|
|
385
|
+
| `⏎` | resume | `agents run <agent> --resume <id>` |
|
|
386
|
+
| `y` | copy the equivalent `sessions …` command | — |
|
|
397
387
|
|
|
398
|
-
**Bookmark the sessions you keep coming back to.** `*` marks the highlighted row (a `★` shows in the listing), `b` narrows to bookmarks, and `
|
|
388
|
+
**Bookmark the sessions you keep coming back to.** `*` marks the highlighted row (a `★` shows in the listing), `b` narrows to bookmarks, and `sessions bookmark <id>` / `sessions --bookmarks` do the same outside a TTY. Bookmarks live in `~/.agents/.history/bookmarks.json` keyed by session id, so they survive a reindex of the session cache. They're per-machine — session sync carries transcripts, not this file.
|
|
399
389
|
|
|
400
|
-
**A session that lost its host says so.** When an editor window or an SSH connection goes down hard, the agent it owned used to simply disappear from
|
|
390
|
+
**A session that lost its host says so.** When an editor window or an SSH connection goes down hard, the agent it owned used to simply disappear from the live roster; when an agent outlived its window in tmux, it reported a plain `idle`. Both now carry their own status: `✗ crashed` (the host went down and took the agent with it) and `◍ orphan` (still alive, but no client is attached — nothing is showing it). Read from tmux's attached-client count and the editor window's registry heartbeat, so a deliberate `agents ps detach` is never mistaken for one, and a session that is still *working* headlessly is left alone.
|
|
401
391
|
|
|
402
|
-
Filters **stack** (they AND together), the active set shows in the header, and the highlighted row **previews
|
|
392
|
+
Filters **stack** (they AND together), the active set shows in the header, and the highlighted row **previews beside the list** (`tab` toggles it) — prompt, activity, last response, plus a links line where the worked-on ticket and the PR the session opened are **clickable** (OSC 8 hyperlinks: the ticket jumps to Linear, the `PR#` to GitHub, in terminals that support them). The Linear workspace is resolved from `LINEAR_WORKSPACE` or the linear-cli config, so tickets stay plain text when it's unknown. Because the filters map to flags, the view you build by hand is a real command: press `y` to get the exact `sessions …` line — explore interactively, hand the line to an agent. Piped output, `--json`, or `--no-interactive` keep the plain listing for scripts. Peek without opening the browser with `sessions preview <uuid-or-8-char-id>` (`--json` for its digest).
|
|
403
393
|
|
|
404
394
|
| before — preview hidden | after — preview open + clickable links |
|
|
405
395
|
| --- | --- |
|
|
406
396
|
|  |  |
|
|
407
397
|
|
|
408
|
-
Each live session resolves to `working`, `waiting_input` (with why -- a question, a plan review, or a permission prompt), `idle`, or a lifecycle state such as `orphaned`, `crashed`, `closed`, `abandoned`, `queued`, or `unknown`.
|
|
398
|
+
Each live session resolves to `working`, `waiting_input` (with why -- a question, a plan review, or a permission prompt), `idle`, or a lifecycle state such as `orphaned`, `crashed`, `closed`, `abandoned`, `queued`, or `unknown`. Narrow `agents ps` to one with `--status <state>`. The fleet fan-out is already the default; `--local` opts out. Rows also carry badges for the PR, worktree, and ticket. `agents ps focus [selector]` accepts agent/version, device, time, team, project, skill/plugin, bookmark, and live-state filters (`--working`, `--idle`, `--waiting`, `--orphan`, `--crashed`, `--closed`, `--abandoned`, `--queued`, `--unknown`). A unique id or `ag-<agent>-<shortid>` tmux alias resolves directly; an agent/version or text selector always opens the preview picker. Immediately before attach it checks the tmux pane process: a living pane is joined in place, while a dead/missing pane enters recovery instead of showing tmux's `Pane is dead` screen.
|
|
409
399
|
|
|
410
|
-
Landing on a session cold? `
|
|
400
|
+
Landing on a session cold? `sessions preview <id>` prints a catch-up card: an inferred title, what was asked, the files changed, failures, a histogram of which tools did the work, and the latest response -- the signals to reload a task in seconds.
|
|
411
401
|
|
|
412
|
-
Sharing a session uses `
|
|
402
|
+
Sharing a session uses `sessions render <id> -o session.md`, not the raw harness JSONL. The document starts with that same preview, then presents user and assistant turns, fenced commands, structured tool arguments, and bounded tool output. Credential-shaped values and local home paths are redacted by default; `--no-redact` is for local-only inspection.
|
|
413
403
|
|
|
414
|
-
`
|
|
404
|
+
`sessions share <id>` goes one step further and publishes that document as a self-contained web page through the standalone `artifacts` CLI, printing the link. Secrets and emails are masked before the page is written. The slug is `session-<shortId>`, so re-sharing one session updates one URL. The agents-cli spelling, `sessions share <id>`, publishes the page **unlisted** unless you pass `--public` (with `--label <text>` as its gallery title): a transcript carries file paths, command output, and error text that a plan does not, so it stays out of your public gallery by default.
|
|
415
405
|
|
|
416
406
|
### Publish CleanShot recordings
|
|
417
407
|
|
|
@@ -442,9 +432,9 @@ Signed-in Phoenix users can back sessions up without creating a Cloudflare bucke
|
|
|
442
432
|
an `r2.backups` secrets bundle:
|
|
443
433
|
|
|
444
434
|
```bash
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
435
|
+
sessions export --since 30d --to-r2
|
|
436
|
+
sessions import --from-r2 --dry-run
|
|
437
|
+
sessions import --from-r2
|
|
448
438
|
```
|
|
449
439
|
|
|
450
440
|
The managed path encrypts every transcript body locally with AES-256-GCM before
|
|
@@ -455,8 +445,8 @@ Phoenix-operated infrastructure stores the recovery key. Use `--byo` with your o
|
|
|
455
445
|
`r2.backups` bundle and `R2_SYNC_ENC_KEY` when Phoenix must never possess the key:
|
|
456
446
|
|
|
457
447
|
```bash
|
|
458
|
-
|
|
459
|
-
|
|
448
|
+
sessions export --since 30d --to-r2 --byo
|
|
449
|
+
sessions import --from-r2 --byo
|
|
460
450
|
```
|
|
461
451
|
|
|
462
452
|
Both targets are on-demand backups only; neither enables background session sync.
|
|
@@ -468,42 +458,37 @@ and conversation previews. These commands use the same picker and account filter
|
|
|
468
458
|
|
|
469
459
|
```bash
|
|
470
460
|
ag run claude --resume
|
|
471
|
-
agents sessions resume --agent claude
|
|
472
|
-
|
|
473
461
|
ag run claude#work --resume
|
|
474
|
-
agents sessions resume --agent claude --account work
|
|
475
462
|
```
|
|
476
463
|
|
|
477
464
|
Resume restores the conversation's account, model, mode and working directory with
|
|
478
465
|
the currently installed harness. Updating that binary does not select a different
|
|
479
|
-
account.
|
|
480
|
-
VSCodium. If only archived context remains, the CLI asks before starting a new
|
|
466
|
+
account. If only archived context remains, the CLI asks before starting a new
|
|
481
467
|
conversation from it; a missing transcript fails before launching an agent.
|
|
482
468
|
|
|
483
469
|
|
|
484
470
|
Pick up any past conversation and drop it back into a terminal:
|
|
485
471
|
|
|
486
472
|
```bash
|
|
487
|
-
agents
|
|
488
|
-
agents
|
|
489
|
-
agents
|
|
490
|
-
agents
|
|
491
|
-
agents
|
|
492
|
-
agents run auto --resume 019fd0c8-b3e9-77a2-a1a4-444698c4d897 # adapt if its account is unavailable
|
|
473
|
+
agents ps focus # multi-select; each opens as a tab in this terminal
|
|
474
|
+
agents ps focus "auth middleware" # pre-filter the pool, then choose
|
|
475
|
+
agents ps focus --device zion # pick from one machine's live sessions
|
|
476
|
+
agents ps focus 019fd0c8-b3e9-77a2-a1a4-444698c4d897 # original harness/version/device/mode
|
|
477
|
+
agents run auto --resume 019fd0c8-b3e9-77a2-a1a4-444698c4d897 # scripted continue; adapts if its account is unavailable
|
|
493
478
|
```
|
|
494
479
|
|
|
495
|
-
`agents
|
|
480
|
+
`agents run <agent> --resume` with no id opens a picker and reopens the selected sessions as tabs in whatever terminal you're in -- auto-detected across iTerm, Ghostty, tmux, and the VSCodium agent-terminal. `agents run auto --resume <id>` resumes one session without requiring you to name its harness: exact IDs take a local SQLite fast path, then resolve fleet-wide and recover on the source device. If the origin version is installed, signed in, healthy, and still owns the indexed transcript, its isolated home performs native resume. Claude launches that native resume from the original project directory recorded before the first turn, so its `projects/<cwd-key>` lookup reaches the conversation even when the session later changed directories. When that origin login is usage-limited but the home still owns the transcript, resume stays native and rotates to a healthy injectable provider account of the **same harness**. `/continue <id>` is the last-resort fallback — a signed-out, revoked, trashed, backup-only, or same-number-reinstalled origin, or a limited origin whose transcript is no longer in that home — and still authenticates as a healthy same-harness account (injecting a provider credential when that is the pick, so it never launches the exhausted native login). It never native-resumes from a different isolated home. Back them with **tmux** (`tmux.enabled`) and the runs turn durable: detach, close your editor, reboot the GUI -- `agents ps focus <id>` reattaches the still-running session.
|
|
496
481
|
|
|
497
482
|
### Send an agent to the background — and bring it back
|
|
498
483
|
|
|
499
|
-
Running 30 agents and drowning in terminal tabs? `agents
|
|
484
|
+
Running 30 agents and drowning in terminal tabs? `agents ps detach <id>` stops a session's interactive process and keeps it working **headless** in the background -- it drives its task to done unattended, no tab, lower cost. `agents ps focus <id>` brings it back through the same origin-device recovery decision: native resume in the owned account home, or an explicitly chosen same-harness `/continue` replay when native context is unavailable.
|
|
500
485
|
|
|
501
486
|
```
|
|
502
|
-
agents
|
|
503
|
-
agents
|
|
487
|
+
agents ps detach a1b2c3d4 # go headless in the background, keep working
|
|
488
|
+
agents ps focus a1b2c3d4 # bring it back interactively, right here
|
|
504
489
|
```
|
|
505
490
|
|
|
506
|
-
Both are agent-agnostic -- they route through the same `agents run --resume` path (native resume for Claude/Codex, `/continue` replay for the rest). `agents
|
|
491
|
+
Both are agent-agnostic -- they route through the same `agents run <agent> --resume` path (native resume for Claude/Codex, `/continue` replay for the rest). `agents ps` shows each session's **owner** (the human who launched it, resolved from the tailnet identity, or `-` for an unresolved local run) and its `presence` -- `attached` (you're watching it), `background` (running headless), or `parked` (its background run finished) -- so the menu bar and AGI EXT show who is running what, and where. In AGI EXT, **Agents: Detach** (`Cmd/Ctrl+K B`) and **Agents: Attach** (`Cmd/Ctrl+K A`) do the same over the focused terminal.
|
|
507
492
|
|
|
508
493
|
---
|
|
509
494
|
|
|
@@ -512,7 +497,7 @@ Both are agent-agnostic -- they route through the same `agents run --resume` pat
|
|
|
512
497
|
Running agents aren't fire-and-forget. Steer them mid-run without opening their terminals.
|
|
513
498
|
|
|
514
499
|
<p align="center">
|
|
515
|
-
<img src="assets/fleet-control.svg" alt="agents
|
|
500
|
+
<img src="assets/fleet-control.svg" alt="agents ps infers live state (working, waiting, idle); watchdog injects Continue into the exact stalled split; message reaches a running agent at its next tool call" width="100%" />
|
|
516
501
|
</p>
|
|
517
502
|
|
|
518
503
|
### Message a running agent
|
|
@@ -545,8 +530,7 @@ agents feed post --title "Halfway done" "CI green, watching merge" # title + bo
|
|
|
545
530
|
|
|
546
531
|
Important posts, blocks and `agents send --to owner` reach you through your
|
|
547
532
|
account once you run `agents auth login`: email, Slack and iMessage per the
|
|
548
|
-
preferences in the console Settings page, with
|
|
549
|
-
there. Workers get a scoped device token from your signed-in laptop
|
|
533
|
+
preferences in the console Settings page, with dedup applied there. Workers get a scoped device token from your signed-in laptop
|
|
550
534
|
automatically. rush/api sends the iMessages from Rush's own number to the phone
|
|
551
535
|
number you confirmed in Settings, so no Mac is involved. Ordinary milestone posts
|
|
552
536
|
remain record-only unless configured.
|
|
@@ -690,16 +674,16 @@ Profile YAML has no secrets -- safe to `agents repo push` to a shared repo. `age
|
|
|
690
674
|
## Run on your own machines
|
|
691
675
|
|
|
692
676
|
<p align="center">
|
|
693
|
-
<img src="assets/hosts.svg" alt="agents
|
|
677
|
+
<img src="assets/hosts.svg" alt="agents devices: dispatch agents run and config commands to another machine over plain SSH (no daemon); the Tailscale fleet is auto-discovered." width="100%" />
|
|
694
678
|
</p>
|
|
695
679
|
|
|
696
680
|
|
|
697
681
|
Dispatch any read-only or config command -- and `agents run` itself -- to another machine over SSH. No daemon.
|
|
698
682
|
|
|
699
683
|
```bash
|
|
700
|
-
# Enroll a machine (
|
|
701
|
-
agents
|
|
702
|
-
agents
|
|
684
|
+
# Enroll a machine by hand (Tailscale nodes register with `agents devices sync`, below)
|
|
685
|
+
agents devices add gpu-box me@gpu-box.example.com
|
|
686
|
+
agents devices show gpu-box # the resolved profile: address, user, auth
|
|
703
687
|
|
|
704
688
|
# Run there instead of locally
|
|
705
689
|
agents run claude --device gpu-box "profile this build" # headless: follows live by default
|
|
@@ -722,7 +706,6 @@ agents doctor claude@latest # diagnose only the newest installed ver
|
|
|
722
706
|
agents doctor claude@oldest # diagnose only the oldest installed version
|
|
723
707
|
agents doctor claude@pinned # diagnose the global-default (pinned) version
|
|
724
708
|
agents doctor claude@all # diagnose all versions, including isolated copies
|
|
725
|
-
agents doctor claude@latest --fix # auto-fix the newest installed version
|
|
726
709
|
agents doctor claude@latest --device mac-mini # diagnose newest claude on mac-mini
|
|
727
710
|
agents doctor --devices # readiness matrix for every registered device
|
|
728
711
|
agents doctor --devices --json # machine-readable fleet readiness
|
|
@@ -761,11 +744,9 @@ agents ssh mac-mini # hardened SSH: fails fast if offline,
|
|
|
761
744
|
# backspace, colors & clear work on the remote
|
|
762
745
|
scp mac-mini:/abs/log.json /tmp/ # fleet file transfer; host:path or abs local
|
|
763
746
|
scp -r /tmp/src/ yosemite-s0:~/dst/ # ~ and $HOME expand on the REMOTE, never locally
|
|
764
|
-
agents hosts list # devices show up here too (one host pool)
|
|
765
|
-
agents hosts add mac-mini --cap gpu # tag a device for capability routing (`--device` + `--cap gpu`)
|
|
766
747
|
|
|
767
|
-
#
|
|
768
|
-
agents cloud run "nightly benchmark" --device gpu-box --agent claude # task in cloud
|
|
748
|
+
# Devices as a task backend + scheduled placement
|
|
749
|
+
agents cloud run "nightly benchmark" --device gpu-box --agent claude # task in cloud list AND devices ps
|
|
769
750
|
agents routines add nightly -s "0 2 * * *" -a claude -p "run the sweep" --run-on gpu-box
|
|
770
751
|
```
|
|
771
752
|
|
|
@@ -806,7 +787,7 @@ email) and naming which harnesses use it — the fast way to see which accounts
|
|
|
806
787
|
and healthy across every machine. Scope either with `--agents <csv>` / `--device <csv>`, and
|
|
807
788
|
add `--json` for the machine-readable per-host rows.
|
|
808
789
|
|
|
809
|
-
**
|
|
790
|
+
**Devices** (`agents devices`) are your machines: Tailscale nodes ingested by `agents devices sync` plus any added by hand, in one registry that every `--device` flag resolves against. On `--device` runs every `agents run` option is either forwarded (`--effort --env --timeout --loop …`), rejected loud (`--secrets` never crosses SSH implicitly), or consumed locally — nothing silently drops. See [docs/concepts.md](cli/docs/concepts.md#devices-placement-and-projects).
|
|
810
791
|
|
|
811
792
|
Every `--device` command rides the shared SSH transport so host resolution,
|
|
812
793
|
identity checks, environment forwarding, reconnect behavior, and multiplexing cannot
|
|
@@ -1041,49 +1022,47 @@ ordinary [resource architecture](cli/docs/resources.md).
|
|
|
1041
1022
|
## Browser
|
|
1042
1023
|
|
|
1043
1024
|
<p align="center">
|
|
1044
|
-
<img src="assets/browser.svg" alt="
|
|
1025
|
+
<img src="assets/browser.svg" alt="browser drives your real, already-installed Chrome over CDP — the CLI issues start / refs / click / type / screenshot; the browser exposes numbered element refs and returns a token-efficient screenshot. Same fingerprint, same IP, so sites can't detect automation — it works where Playwright gets blocked." width="100%" />
|
|
1045
1026
|
</p>
|
|
1046
1027
|
|
|
1047
|
-
Give agents access to a real browser — no relay extension, no cloud service, no Playwright getting blocked.
|
|
1028
|
+
Give agents access to a real browser — no relay extension, no cloud service, no Playwright getting blocked. Browser driving is the standalone **`browser` CLI** (`@phnx-labs/browser-cli`; `agents setup browser` or `agents clis install browser` installs it).
|
|
1048
1029
|
|
|
1049
1030
|
Each device declares its own browsers in its own `devices/<machine>/agents.yaml`.
|
|
1050
1031
|
The fleet registry is the union of those files: a name declared by one device is
|
|
1051
1032
|
identity-bearing (the daemon tunnels to that device); a name declared by several
|
|
1052
|
-
is fungible (use the local one). `--device` is only valid on `
|
|
1033
|
+
is fungible (use the local one). `--device` is only valid on `browser start`;
|
|
1053
1034
|
later verbs resolve the device from the task.
|
|
1054
1035
|
|
|
1055
1036
|
```bash
|
|
1056
|
-
#
|
|
1057
|
-
# browser
|
|
1058
|
-
|
|
1059
|
-
# Chrome > Brave > Comet. The auto-picked profile is saved as "auto-chrome".
|
|
1060
|
-
export AGENTS_BROWSER_TASK=$(agents browser start --url https://app.example.com)
|
|
1037
|
+
# Omit --profile to use this machine's default (`browser use <name>` sets it;
|
|
1038
|
+
# `browser profiles seed` creates a <browser>-local profile per installed browser).
|
|
1039
|
+
export AGENTS_BROWSER_TASK=$(browser start --url https://app.example.com)
|
|
1061
1040
|
|
|
1062
1041
|
# Or pin a named profile to a specific browser (chrome, comet, brave, chromium,
|
|
1063
1042
|
# edge, or custom) when you want isolation from auto-detect.
|
|
1064
|
-
|
|
1043
|
+
browser profiles create work --browser chrome
|
|
1065
1044
|
# `start` writes the resolved name (e.g. `swift-crab-falcon-a3f92b1c`) to stdout
|
|
1066
1045
|
# and human-friendly commentary to stderr, so $(...) capture stays clean.
|
|
1067
|
-
export AGENTS_BROWSER_TASK=$(
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1046
|
+
export AGENTS_BROWSER_TASK=$(browser start --profile work --url https://app.example.com)
|
|
1047
|
+
browser refs # Get interactive element refs
|
|
1048
|
+
browser click 42 # Click element ref 42
|
|
1049
|
+
browser type 15 --text "hello" # Type into element ref 15
|
|
1050
|
+
browser screenshot # Smart resizing, token-efficient
|
|
1051
|
+
browser record start --fps 10 --duration 40
|
|
1073
1052
|
# Drive the page, then finalize a playable WebM under the task's recordings/ dir.
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1053
|
+
browser record stop
|
|
1054
|
+
browser tabs # List tabs open for the current task
|
|
1055
|
+
browser tab focus tab123 # Switch focus to another tab
|
|
1056
|
+
browser done # Close task's tabs when finished
|
|
1078
1057
|
|
|
1079
1058
|
# Need to address a different task in the same shell? Override per call:
|
|
1080
|
-
|
|
1059
|
+
browser screenshot --task other-flow
|
|
1081
1060
|
|
|
1082
1061
|
# Repeated observe/action loops: one Node process and daemon socket stay warm.
|
|
1083
1062
|
printf '%s\n' \
|
|
1084
1063
|
'{"action":"screenshot","path":"/tmp/page.jpg"}' \
|
|
1085
1064
|
'{"action":"click","atX":320,"atY":540}' \
|
|
1086
|
-
|
|
|
1065
|
+
| browser stream --task "$AGENTS_BROWSER_TASK"
|
|
1087
1066
|
```
|
|
1088
1067
|
|
|
1089
1068
|
Recording resolves ffmpeg automatically. It reuses a usable binary on `PATH` or
|
|
@@ -1095,7 +1074,7 @@ automatic path cannot run, the error names the exact manual install command.
|
|
|
1095
1074
|
|
|
1096
1075
|
Playwright and Puppeteer spin up fresh browser instances with automation flags. Sites like LinkedIn, Google, and most finance apps detect and block them immediately.
|
|
1097
1076
|
|
|
1098
|
-
`
|
|
1077
|
+
`browser` launches your existing residential Chrome (or Brave, Edge, Chromium) on your machine via CDP. Same browser fingerprint, same IP, same everything. Sites can't detect automation because you're using the same browser you'd use manually.
|
|
1099
1078
|
|
|
1100
1079
|
### Token-efficient automation
|
|
1101
1080
|
|
|
@@ -1106,8 +1085,8 @@ The CLI handles the mechanical work so agents don't burn tokens on low-level bro
|
|
|
1106
1085
|
Multiple agents can run browser tasks simultaneously without stepping on each other. Each profile gets its own user data directory, cookies, and state. One agent logs into your work Slack, another into your personal email — no conflicts, no shared state.
|
|
1107
1086
|
|
|
1108
1087
|
```bash
|
|
1109
|
-
|
|
1110
|
-
|
|
1088
|
+
browser profiles create work-slack --browser chrome
|
|
1089
|
+
browser profiles create personal-gmail --browser chrome
|
|
1111
1090
|
# Two agents, two profiles, no interference
|
|
1112
1091
|
```
|
|
1113
1092
|
|
|
@@ -1116,7 +1095,7 @@ agents browser profiles create personal-gmail --browser chrome
|
|
|
1116
1095
|
Attach a [secrets bundle](#secrets) to a profile. The agent can log in without credentials in plaintext, and every secret access is recorded in the session log.
|
|
1117
1096
|
|
|
1118
1097
|
```bash
|
|
1119
|
-
|
|
1098
|
+
browser profiles create bank --browser chrome --secrets bank-creds
|
|
1120
1099
|
```
|
|
1121
1100
|
|
|
1122
1101
|
### Electron apps
|
|
@@ -1124,7 +1103,7 @@ agents browser profiles create bank --browser chrome --secrets bank-creds
|
|
|
1124
1103
|
Control Electron apps (Slack, Discord, VS Code, your own app) with custom binaries:
|
|
1125
1104
|
|
|
1126
1105
|
```bash
|
|
1127
|
-
|
|
1106
|
+
browser profiles create slack \
|
|
1128
1107
|
--browser custom \
|
|
1129
1108
|
--binary "/Applications/Slack.app/Contents/MacOS/Slack" \
|
|
1130
1109
|
--electron
|
|
@@ -1139,21 +1118,21 @@ or an explicit pick). Later verbs reject `--device`.
|
|
|
1139
1118
|
|
|
1140
1119
|
```bash
|
|
1141
1120
|
# Local CDP (discovers WebSocket URL automatically)
|
|
1142
|
-
|
|
1121
|
+
browser profiles create local-debug \
|
|
1143
1122
|
--browser chrome \
|
|
1144
1123
|
--endpoint "http://localhost:9222"
|
|
1145
1124
|
|
|
1146
1125
|
# Bind a task to a fleet device at start; later verbs resolve it from the task
|
|
1147
|
-
|
|
1148
|
-
|
|
1126
|
+
browser start --task post --device zion --url https://x.com/
|
|
1127
|
+
browser screenshot --task post
|
|
1149
1128
|
|
|
1150
1129
|
# Explicit SSH endpoint, declared on the machine that owns the browser
|
|
1151
|
-
|
|
1130
|
+
browser profiles create staging \
|
|
1152
1131
|
--browser chrome \
|
|
1153
1132
|
--endpoint "ssh://deploy@staging.example.com?port=9222"
|
|
1154
1133
|
|
|
1155
1134
|
# Cloud browser services (BrowserBase, Steel, etc.)
|
|
1156
|
-
|
|
1135
|
+
browser profiles create cloud \
|
|
1157
1136
|
--browser chrome \
|
|
1158
1137
|
--endpoint "wss://connect.browserbase.com?apiKey=..."
|
|
1159
1138
|
```
|
|
@@ -1235,7 +1214,7 @@ agents harness add deepinfra --account deepinfra
|
|
|
1235
1214
|
```
|
|
1236
1215
|
|
|
1237
1216
|
Mixing `accounts add <harness>` with `--provider` fails loud as ambiguous. One
|
|
1238
|
-
provider account **is** one `
|
|
1217
|
+
provider account **is** one `secrets` bundle -- `accounts add` creates it
|
|
1239
1218
|
with secrets policy `never`, so a background launch never raises Touch ID.
|
|
1240
1219
|
Harness-native OAuth stays where the harness put it and is never copied.
|
|
1241
1220
|
|
|
@@ -1262,7 +1241,7 @@ The `connect` / `name` / `label` / `mint` / `attach` / `detach` / `switch` /
|
|
|
1262
1241
|
|
|
1263
1242
|
## Secrets
|
|
1264
1243
|
|
|
1265
|
-
Secrets are the standalone **`secrets` CLI** (`@phnx-labs/secrets-cli`). agi-cli does not ship the engine
|
|
1244
|
+
Secrets are the standalone **`secrets` CLI** (`@phnx-labs/secrets-cli`). agi-cli does not ship the engine; it resolves bundles through `secrets` when a run asks for them.
|
|
1266
1245
|
|
|
1267
1246
|
```bash
|
|
1268
1247
|
# Install (pick one — no extra env vars)
|
|
@@ -1282,7 +1261,7 @@ agents run claude "charge a test card" --secrets prod-stripe
|
|
|
1282
1261
|
|
|
1283
1262
|
> **Platform:** macOS Keychain, Linux libsecret / file store. On Windows (non-WSL), use environment variables or a `.env` file instead.
|
|
1284
1263
|
|
|
1285
|
-
The macOS broker is **not** the agents daemon. It is `secrets _agent-run` (started by `secrets start` or on first unlock), socket under `$SECRETS_HOME/.cache/helpers/secrets-agent
|
|
1264
|
+
The macOS broker is **not** the agents daemon. It is `secrets _agent-run` (started by `secrets start` or on first unlock), socket under `$SECRETS_HOME/.cache/helpers/secrets-agent/`. Linux has no broker. `agents daemon` never hosts it.
|
|
1286
1265
|
|
|
1287
1266
|
<p align="center">
|
|
1288
1267
|
<img src="assets/secrets.svg" alt="How agi-cli secrets work: bundle definitions live in the macOS Keychain alongside their values, agi-cli resolves at runtime and injects the env into the child process" width="100%" />
|
|
@@ -1299,12 +1278,12 @@ through `api.prix.dev` — no copy-paste, no `.env` files emailed to yourself:
|
|
|
1299
1278
|
|
|
1300
1279
|
```bash
|
|
1301
1280
|
# On laptop:
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1281
|
+
secrets create npm-tokens
|
|
1282
|
+
secrets add npm-tokens NPM_TOKEN # value lives in the local keychain/file store
|
|
1283
|
+
secrets push npm-tokens # encrypt + upload
|
|
1305
1284
|
|
|
1306
1285
|
# On another machine:
|
|
1307
|
-
|
|
1286
|
+
secrets pull npm-tokens # decrypt + restore locally
|
|
1308
1287
|
agents run claude "..." --secrets npm-tokens # injects NPM_TOKEN automatically
|
|
1309
1288
|
```
|
|
1310
1289
|
|
|
@@ -1312,12 +1291,12 @@ Nothing about a secret's value ever lives in plaintext on disk, on either end.
|
|
|
1312
1291
|
|
|
1313
1292
|
### Per-secret metadata and rotation
|
|
1314
1293
|
|
|
1315
|
-
Tag each secret with `--type`, `--expires`, and `--note` so the bundle is self-documenting. `--expires` is always future-dated (`YYYY-MM-DD`); past or same-day values are rejected. Use `
|
|
1294
|
+
Tag each secret with `--type`, `--expires`, and `--note` so the bundle is self-documenting. `--expires` is always future-dated (`YYYY-MM-DD`); past or same-day values are rejected. Use `secrets rotate <bundle> <key>` to refresh a credential — `add` only creates new keys, `rotate` replaces the value and preserves metadata unless overridden.
|
|
1316
1295
|
|
|
1317
1296
|
```bash
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1297
|
+
secrets add prod STRIPE_API_KEY --type api-key --expires 2027-01-15 --note "Live key, owner: payments-team"
|
|
1298
|
+
secrets rotate prod STRIPE_API_KEY --note "rotated after suspected leak"
|
|
1299
|
+
secrets list # EXPIRING column flags secrets due in the next 30 days
|
|
1321
1300
|
```
|
|
1322
1301
|
|
|
1323
1302
|
---
|
|
@@ -1367,7 +1346,7 @@ some of it is planned (RUSH-2290), and the section marks what is landed vs inten
|
|
|
1367
1346
|
|
|
1368
1347
|
### Daemon
|
|
1369
1348
|
|
|
1370
|
-
Routines,
|
|
1349
|
+
Routines, the watchdog pass, and the session index all run inside one always-on
|
|
1371
1350
|
daemon per device. `agents daemon` is its runtime surface:
|
|
1372
1351
|
|
|
1373
1352
|
```bash
|
|
@@ -1382,11 +1361,10 @@ agents daemon disable # persist daemon.enabled: false -- nothing auto-sta
|
|
|
1382
1361
|
agents daemon enable # clear the kill switch
|
|
1383
1362
|
|
|
1384
1363
|
agents daemon reload # SIGHUP -- reload jobs, re-evaluate scheduler.enabled, no restart
|
|
1385
|
-
agents daemon services # health of every hosted service (
|
|
1364
|
+
agents daemon services # health of every hosted service (scheduler, watchdog, ...)
|
|
1386
1365
|
agents daemon services list # every toggleable service and its current on/off state
|
|
1387
1366
|
agents daemon services enable scheduler
|
|
1388
|
-
agents daemon services disable
|
|
1389
|
-
agents browser stop --service # browser-scoped alias; next browser action requiring IPC re-enables it
|
|
1367
|
+
agents daemon services disable watchdog # stop the watchdog pass without stopping the daemon
|
|
1390
1368
|
agents routines stop # disable/reload only the scheduler service
|
|
1391
1369
|
agents daemon logs -f --level warn --since 1h
|
|
1392
1370
|
agents daemon logs --level error --since 1h # each restart, with what was running when it happened
|
|
@@ -1400,11 +1378,9 @@ agents daemon index backfill tools --fleet # one-shot historical parse (also: r
|
|
|
1400
1378
|
|
|
1401
1379
|
`agents daemon index` is foreground maintenance of the index the daemon's
|
|
1402
1380
|
session-index service keeps current; it never starts or restarts the daemon.
|
|
1403
|
-
Each verb runs the same engine as its `agents sessions` spelling (`--roots`,
|
|
1404
|
-
`optimize`, `backfill`), which keeps working.
|
|
1405
1381
|
|
|
1406
|
-
Each hosted responsibility (
|
|
1407
|
-
|
|
1382
|
+
Each hosted responsibility (scheduler, watchdog, recordings, device probe,
|
|
1383
|
+
self-heal, self-update, account-state refresh, state-dir checks) is an
|
|
1408
1384
|
independent toggle in `~/.agents/daemon/services.yaml`.
|
|
1409
1385
|
Self-update checks npm on its own schedule, installs + verifies a newer
|
|
1410
1386
|
agents-cli with the same primitives `agents upgrade` uses, then exits so the OS
|
|
@@ -1413,12 +1389,12 @@ with auto-update forced off and only picked up new code on a manual
|
|
|
1413
1389
|
`agents daemon restart`.
|
|
1414
1390
|
`agents daemon services list` shows every service; `enable|disable <id>` flips
|
|
1415
1391
|
one. Missing keys default to enabled except the opt-in `recordings` service. Most services take
|
|
1416
|
-
effect on the next daemon start;
|
|
1417
|
-
so browser commands can enable it live; recordings is also registered while disabled
|
|
1392
|
+
effect on the next daemon start; recordings is registered while disabled
|
|
1418
1393
|
so `agents recordings watch` can enable it live, while the scheduler
|
|
1419
1394
|
re-evaluates on `SIGHUP reload`. Only `agents daemon start|stop|restart` owns the
|
|
1420
|
-
whole process lifecycle.
|
|
1421
|
-
state without evicting sibling work.
|
|
1395
|
+
whole process lifecycle. The routines and recordings commands change their own
|
|
1396
|
+
service state without evicting sibling work. Browser IPC is not a daemon service:
|
|
1397
|
+
the standalone `browser` CLI runs its own (`browser stop --service`).
|
|
1422
1398
|
|
|
1423
1399
|
There is no `agents daemon jobs` -- scheduled work is always `agents routines`
|
|
1424
1400
|
(see `agents routines stats` for per-routine failure detail). `disable` is a
|
|
@@ -1441,7 +1417,7 @@ artifacts auth login # Phoenix ID device-code sign-in
|
|
|
1441
1417
|
artifacts share plan.html # publish the HTML and print the link
|
|
1442
1418
|
```
|
|
1443
1419
|
|
|
1444
|
-
`
|
|
1420
|
+
`sessions share <id>` (the standalone sessions CLI) renders a session transcript to
|
|
1445
1421
|
HTML locally, then shells out to `artifacts share` to publish it, so a conversation
|
|
1446
1422
|
becomes a shareable link the same way any other artifact does.
|
|
1447
1423
|
|
|
@@ -1484,12 +1460,12 @@ Two repos with the same shape, different roles:
|
|
|
1484
1460
|
|
|
1485
1461
|
| Repo | Role | Owner |
|
|
1486
1462
|
|---|---|---|
|
|
1487
|
-
| `~/.agents
|
|
1463
|
+
| `~/.agents/.system/` | **System repo** — core/built-in skills, commands, hooks, rules, MCP configs, permissions, and profiles that ship with `agi-cli`. The defaults every install gets. | Maintained upstream at [phnx-labs/.agents](https://github.com/phnx-labs/.agents) (formerly `.agents-system`) |
|
|
1488
1464
|
| `~/.agents/` | **User repo** — your personal additions and overrides. This is what `agents repo push`/`pull` syncs. | You |
|
|
1489
1465
|
|
|
1490
1466
|
**Version pinning:** `agents.yaml` at project root pins which agent version to use (like `.nvmrc` for Node).
|
|
1491
1467
|
|
|
1492
|
-
**Resource resolution:** When syncing resources (commands, skills, rules, hooks, MCP, permissions), the order is **project > user > system**. A `.agents/` directory at project root wins, then `~/.agents/`, then `~/.agents
|
|
1468
|
+
**Resource resolution:** When syncing resources (commands, skills, rules, hooks, MCP, permissions), the order is **project > user > system**. A `.agents/` directory at project root wins, then `~/.agents/`, then `~/.agents/.system/`. Same-named resources higher in the chain override lower ones; everything else unions in. Run `agents view --merged` to see the effective skills, commands, MCP servers, hooks, rules, plugins, workflows, and subagents, with each row tagged by its winning layer.
|
|
1493
1469
|
|
|
1494
1470
|
See [docs/concepts.md](cli/docs/concepts.md) for the full mental model: DotAgents repos, resource kinds, and how resolution works end-to-end.
|
|
1495
1471
|
|
|
@@ -1520,7 +1496,7 @@ The helper itself is AGI Menu, developed in
|
|
|
1520
1496
|
signed, notarized build on this repo's `menubar/v<x.y.z>` releases; the CLI
|
|
1521
1497
|
downloads and verifies it on demand, so nothing is built on your machine.
|
|
1522
1498
|
|
|
1523
|
-
The dropdown surfaces a **NEEDS YOU** queue (agents waiting on a question, a plan review, or a permission prompt), the running roster, and a routines summary -- the same live state as `agents
|
|
1499
|
+
The dropdown surfaces a **NEEDS YOU** queue (agents waiting on a question, a plan review, or a permission prompt), the running roster, and a routines summary -- the same live state as `agents ps`, one click away.
|
|
1524
1500
|
|
|
1525
1501
|
### Quick-issue bar (⌘⇧O)
|
|
1526
1502
|
|
|
@@ -1551,7 +1527,7 @@ agents repo disable acme # Stop merging without deleting
|
|
|
1551
1527
|
agents repo remove acme # Unregister and delete the clone
|
|
1552
1528
|
```
|
|
1553
1529
|
|
|
1554
|
-
Extras clone into `~/.agents
|
|
1530
|
+
Extras clone into `~/.agents-<alias>/` and ship the same layout as the primary (`skills/`, `commands/`, `hooks/`, `rules/`). Their contents merge into agent version homes after the primary's — so `~/.agents/` always wins on name collisions. `agents skills list` shows which repo each skill came from.
|
|
1555
1531
|
|
|
1556
1532
|
---
|
|
1557
1533
|
|
|
@@ -1591,13 +1567,13 @@ Every agent run, version install, browser launch, and secrets access is logged t
|
|
|
1591
1567
|
Conversations with Claude, Codex, legacy Gemini, and other agents scatter across their native storage. Session search indexes them locally so you can find any conversation:
|
|
1592
1568
|
|
|
1593
1569
|
```bash
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
sessions --include tools --query 'program:git' --json
|
|
1597
|
-
agents
|
|
1570
|
+
sessions "auth middleware" # Full-text search across all agents
|
|
1571
|
+
sessions --agent claude --since 7d
|
|
1572
|
+
sessions --include tools --query 'program:git' --json
|
|
1573
|
+
agents daemon index backfill tools --fleet
|
|
1598
1574
|
```
|
|
1599
1575
|
|
|
1600
|
-
The index lives at `~/.agents/.history/sessions/sessions.db` (SQLite + FTS5). Tool-call evidence is stored redacted and bounded; the standalone `sessions --include tools` searches it, reading another box over SSH with `--host`. Historical tool parsing is explicit via `agents
|
|
1576
|
+
The index lives at `~/.agents/.history/sessions/sessions.db` (SQLite + FTS5). Tool-call evidence is stored redacted and bounded; the standalone `sessions --include tools` searches it, reading another box over SSH with `--host`. Historical tool parsing is explicit via `agents daemon index backfill tools`; searches never parse transcripts. See [Sessions](#sessions-across-agents) for full usage.
|
|
1601
1577
|
|
|
1602
1578
|
### Secrets
|
|
1603
1579
|
|
|
@@ -1606,8 +1582,8 @@ in the OS keychain or an encrypted file store — never in plaintext files.
|
|
|
1606
1582
|
Bundle definitions live alongside their values.
|
|
1607
1583
|
|
|
1608
1584
|
```bash
|
|
1609
|
-
|
|
1610
|
-
|
|
1585
|
+
secrets create my-keys
|
|
1586
|
+
secrets add my-keys API_KEY # Prompts for value, stores in the keychain/file backend
|
|
1611
1587
|
```
|
|
1612
1588
|
|
|
1613
1589
|
Move a bundle to another machine with `secrets push`/`secrets pull` (encrypted
|
|
@@ -1619,14 +1595,14 @@ round trip through `api.prix.dev`). See [Secrets](#secrets) for full usage.
|
|
|
1619
1595
|
|------|----------|--------------|---------|
|
|
1620
1596
|
| Event log | `~/.agents/.cache/logs/` | You only (0600) | `AGENTS_DISABLE_EVENT_LOG=1` |
|
|
1621
1597
|
| Session index | `~/.agents/.history/sessions/` | You only | Delete the directory |
|
|
1622
|
-
| Secrets | OS keychain / encrypted file store | You + apps you authorize | Don't use `
|
|
1598
|
+
| Secrets | OS keychain / encrypted file store | You + apps you authorize | Don't use `secrets` |
|
|
1623
1599
|
| Config | `~/.agents/` | You only | N/A |
|
|
1624
1600
|
|
|
1625
1601
|
---
|
|
1626
1602
|
|
|
1627
1603
|
## Compatibility
|
|
1628
1604
|
|
|
1629
|
-
Which DotAgents resources each agent CLI can load. Source of truth: [src/lib/agents.ts](cli/src/lib/agents.ts) (`capabilities`); gates use `supports(agent, cap, version)` from [src/lib/capabilities.ts](cli/src/lib/capabilities.ts). Full matrix also in [docs/concepts.md](cli/docs/concepts.md).
|
|
1605
|
+
Which DotAgents resources each agent CLI can load. Source of truth: [src/lib/agent-spec/agents.ts](cli/src/lib/agent-spec/agents.ts) (`capabilities`); gates use `supports(agent, cap, version)` from [src/lib/capabilities.ts](cli/src/lib/capabilities.ts). Full matrix also in [docs/concepts.md](cli/docs/concepts.md).
|
|
1630
1606
|
|
|
1631
1607
|
> **Gemini CLI is hard-deprecated.** Google retired it for free, Pro, and Ultra tiers on **June 18, 2026** (announced at Google I/O 2026); the `gemini` command no longer serves requests on those tiers. agi-cli keeps the legacy `gemini` id only so old sessions/config can still be read. `agents add gemini`, `agents import gemini`, and `agents sync gemini` fail and point to **Antigravity CLI** (`antigravity`), Google's official successor — see [the transition notice](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/).
|
|
1632
1608
|
|
|
@@ -1642,12 +1618,11 @@ Which DotAgents resources each agent CLI can load. Source of truth: [src/lib/age
|
|
|
1642
1618
|
| Copilot | yes | no | yes | no | yes | yes | no | no | `AGENTS.md` | no |
|
|
1643
1619
|
| Amp | yes | no | yes | no | yes | yes | no | no | `AGENTS.md` | no |
|
|
1644
1620
|
| Goose | yes | no | yes | no | no | no | no | no | `AGENTS.md` | no |
|
|
1645
|
-
| Roo Code | yes | no | yes | no | yes | yes | no | no | `AGENTS.md` | no |
|
|
1646
1621
|
| Droid | yes | yes | yes | >= 0.57.5 | >= 0.26.0 | yes | yes | yes | `AGENTS.md` | no |
|
|
1647
1622
|
|
|
1648
1623
|
**Legend:** `yes` / `no` = synced or skipped at install time. `skills ($name)` = no file-based slash-command dir; behavior ships as a generated skill invoked with `$command`. `IDE + skills ($name)` = an IDE command file plus a generated skill for the CLI. `gateway` = OpenClaw resolves slash commands at runtime, not from synced files. Version suffixes are enforced at sync time — out-of-range versions are skipped with a clear message.
|
|
1649
1624
|
|
|
1650
|
-
**Host CLIs** (`agents
|
|
1625
|
+
**Host CLIs** (`agents clis`) are separate: YAML manifests under `~/.agents/clis/` install binaries onto your PATH (`gh`, `higgsfield`, etc.). They are not copied into per-agent version homes.
|
|
1651
1626
|
|
|
1652
1627
|
### agi-cli features (not agent-native resources)
|
|
1653
1628
|
|
|
@@ -1660,7 +1635,7 @@ Which DotAgents resources each agent CLI can load. Source of truth: [src/lib/age
|
|
|
1660
1635
|
| Grok Build | -- | yes | yes |
|
|
1661
1636
|
| Antigravity | -- | yes | -- |
|
|
1662
1637
|
| Copilot | -- | -- | yes |
|
|
1663
|
-
| OpenClaw, Amp, Goose
|
|
1638
|
+
| OpenClaw, Amp, Goose | -- | -- | -- |
|
|
1664
1639
|
|
|
1665
1640
|
### Version-gated sync
|
|
1666
1641
|
|
|
@@ -1696,7 +1671,7 @@ Same approach as nvm, pyenv, and rbenv — battle-tested by millions of develope
|
|
|
1696
1671
|
|
|
1697
1672
|
### How do I share my agent setup with my team?
|
|
1698
1673
|
|
|
1699
|
-
Add a `.agents/` directory at your project root with your skills, hooks, rules, and commands. Resources merge automatically: project > user (`~/.agents/`) > system (`~/.agents
|
|
1674
|
+
Add a `.agents/` directory at your project root with your skills, hooks, rules, and commands. Resources merge automatically: project > user (`~/.agents/`) > system (`~/.agents/.system/`). Commit it with your repo and teammates get the same agent environment.
|
|
1700
1675
|
|
|
1701
1676
|
### Do I need to write separate rules for each agent (CLAUDE.md, .cursorrules, etc.)?
|
|
1702
1677
|
|
|
@@ -1716,7 +1691,7 @@ For full transparency: `agi-cli` keeps a local event log at `~/.agents/.cache/lo
|
|
|
1716
1691
|
|
|
1717
1692
|
macOS and Linux. Windows via WSL works but isn't first-class yet.
|
|
1718
1693
|
|
|
1719
|
-
**
|
|
1694
|
+
**Secrets:** the standalone `secrets` CLI is cross-platform — macOS Keychain, Linux libsecret, or the `file` backend everywhere, including Windows (non-WSL) via environment variables or a `.env` file as a fallback when neither native store applies.
|
|
1720
1695
|
|
|
1721
1696
|
Interactive runs spawn directly by default. Enable `tmux.enabled` on a device to
|
|
1722
1697
|
give each run an addressable pane for `agents send --channel session`, injection, and `agents
|
|
@@ -1738,7 +1713,7 @@ To update on demand instead of waiting for the prompt, run `agents upgrade` (add
|
|
|
1738
1713
|
|
|
1739
1714
|
### What happens to my config when I switch versions?
|
|
1740
1715
|
|
|
1741
|
-
Each version has its own isolated config directory. Switching just repoints a symlink — your per-version config stays untouched. On first migration (if you had a real `~/.claude/` directory before using agi-cli), that gets backed up once to `~/.agents
|
|
1716
|
+
Each version has its own isolated config directory. Switching just repoints a symlink — your per-version config stays untouched. On first migration (if you had a real `~/.claude/` directory before using agi-cli), that gets backed up once to `~/.agents/.history/backups/`.
|
|
1742
1717
|
|
|
1743
1718
|
### Does session search use RAG or semantic search?
|
|
1744
1719
|
|
|
@@ -1750,7 +1725,7 @@ Profiles (experimental — available by default). Works with LiteLLM Proxy, Olla
|
|
|
1750
1725
|
|
|
1751
1726
|
### Can I add support for a new agent?
|
|
1752
1727
|
|
|
1753
|
-
Agents are defined in [src/lib/agents.ts](cli/src/lib/agents.ts) -- each is a config object declaring commands dir, rules file, and capabilities. PRs welcome.
|
|
1728
|
+
Agents are defined in [src/lib/agent-spec/agents.ts](cli/src/lib/agent-spec/agents.ts) -- each is a config object declaring commands dir, rules file, and capabilities. PRs welcome.
|
|
1754
1729
|
|
|
1755
1730
|
### What's the relationship to Phoenix Labs / Rush?
|
|
1756
1731
|
|
|
@@ -1762,9 +1737,9 @@ Agents are defined in [src/lib/agents.ts](cli/src/lib/agents.ts) -- each is a co
|
|
|
1762
1737
|
|
|
1763
1738
|
| Path | What |
|
|
1764
1739
|
|---|---|
|
|
1765
|
-
| [`cli`](cli) | **The CLI** (this README) — version management, config sync,
|
|
1740
|
+
| [`cli`](cli) | **The CLI** (this README) — version management, config sync, the session index and live roster, teams, cloud, fleet; fronts the standalone `sessions`, `browser`, `secrets`, and `computer` CLIs. |
|
|
1766
1741
|
| [phnx-labs/agi-ext](https://github.com/phnx-labs/agi-ext) | **AGI EXT** — the VS Code extension (agent terminals as tabs + the Fleet dashboard). Moved to its own repo (RUSH-3189); separate product, own publish identity. |
|
|
1767
|
-
| `@phnx-labs/computer-cli` | The engine behind `
|
|
1742
|
+
| `@phnx-labs/computer-cli` | The engine behind `computer`, published separately (`npm i -g @phnx-labs/computer-cli`): the Swift macOS Accessibility daemon, the C#/.NET Windows UI Automation daemon, and an install-free **VNC/RFB** backend for a Linux GUI desktop (`computer --vnc <host:port> screenshot` — coordinate-based screenshot/click/type/key/scroll against any x11vnc/Xvnc server). agents-cli supplies the app allow list, `--device` fleet resolution, and the action history. |
|
|
1768
1743
|
| [`packages/session-tracker`](packages/session-tracker) | The `SessionStart` hook that writes live-session state **AGI EXT** reads back (agi-ext `src/core/liveSession.ts`) — not the CLI, which reads transcripts. |
|
|
1769
1744
|
|
|
1770
1745
|
## Contributing
|
|
@@ -1772,7 +1747,7 @@ Agents are defined in [src/lib/agents.ts](cli/src/lib/agents.ts) -- each is a co
|
|
|
1772
1747
|
```bash
|
|
1773
1748
|
git clone https://github.com/phnx-labs/agi-cli
|
|
1774
1749
|
cd agi-cli/cli
|
|
1775
|
-
bun install &&
|
|
1750
|
+
bun install && scripts/build.sh --here # build + run the suite on this machine
|
|
1776
1751
|
```
|
|
1777
1752
|
|
|
1778
1753
|
Commands live in [`cli/src/commands/`](cli/src/commands/), libraries in
|