@phnx-labs/agents-cli 1.22.47 → 1.22.49
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 +401 -17
- package/README.md +66 -32
- package/dist/bootstrap.js +4 -2
- package/dist/cli/command-registry.d.ts +1 -0
- package/dist/cli/command-registry.js +2 -0
- package/dist/commands/accounts.d.ts +58 -0
- package/dist/commands/accounts.js +206 -32
- package/dist/commands/artifacts.js +7 -6
- package/dist/commands/attach.js +1 -1
- package/dist/commands/browser.js +501 -103
- package/dist/commands/config.d.ts +0 -1
- package/dist/commands/config.js +0 -20
- package/dist/commands/daemon.d.ts +21 -0
- package/dist/commands/daemon.js +147 -12
- package/dist/commands/exec.js +52 -15
- package/dist/commands/focus.d.ts +14 -0
- package/dist/commands/focus.js +48 -5
- package/dist/commands/go.d.ts +3 -0
- package/dist/commands/go.js +16 -3
- package/dist/commands/inspect.js +2 -2
- package/dist/commands/lease.d.ts +1 -1
- package/dist/commands/lease.js +4 -3
- package/dist/commands/mailboxes.js +4 -3
- package/dist/commands/menubar.js +11 -4
- package/dist/commands/projects.d.ts +16 -1
- package/dist/commands/projects.js +58 -64
- package/dist/commands/resume.js +1 -1
- package/dist/commands/route.js +4 -4
- package/dist/commands/routines.js +3 -2
- package/dist/commands/run-broadcast.d.ts +1 -1
- package/dist/commands/run-broadcast.js +1 -1
- package/dist/commands/sessions-picker.d.ts +22 -0
- package/dist/commands/sessions-picker.js +48 -9
- package/dist/commands/sessions-trace.js +1 -1
- package/dist/commands/sessions.js +1 -0
- package/dist/commands/setup-secrets.js +23 -0
- package/dist/commands/share.d.ts +20 -5
- package/dist/commands/share.js +152 -52
- package/dist/commands/ssh.js +54 -7
- package/dist/commands/traces.d.ts +2 -0
- package/dist/commands/traces.js +184 -0
- package/dist/commands/view.d.ts +1 -1
- package/dist/commands/view.js +17 -34
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/lib/accounting/usage.d.ts +14 -3
- package/dist/lib/accounting/usage.js +64 -18
- package/dist/lib/agent-spec/agents.js +11 -9
- package/dist/lib/browser/drivers/ssh.d.ts +16 -2
- package/dist/lib/browser/drivers/ssh.js +36 -9
- package/dist/lib/browser/ipc.js +8 -3
- package/dist/lib/browser/profiles.d.ts +35 -101
- package/dist/lib/browser/profiles.js +130 -301
- package/dist/lib/browser/registry.d.ts +39 -0
- package/dist/lib/browser/registry.js +149 -0
- package/dist/lib/browser/remote-control.d.ts +8 -6
- package/dist/lib/browser/remote-control.js +8 -6
- package/dist/lib/browser/resolve-target.d.ts +68 -0
- package/dist/lib/browser/resolve-target.js +250 -0
- package/dist/lib/browser/runtime-state.d.ts +40 -16
- package/dist/lib/browser/runtime-state.js +92 -25
- package/dist/lib/browser/service.d.ts +28 -9
- package/dist/lib/browser/service.js +139 -62
- package/dist/lib/browser/task-index.d.ts +70 -0
- package/dist/lib/browser/task-index.js +180 -0
- package/dist/lib/byok-usage.js +2 -2
- package/dist/lib/claude-statusline.d.ts +29 -0
- package/dist/lib/claude-statusline.js +139 -0
- package/dist/lib/cloud/host.d.ts +1 -1
- package/dist/lib/cloud/host.js +1 -1
- package/dist/lib/cloud/rush.js +1 -1
- package/dist/lib/computer/computer-rpc.js +2 -2
- package/dist/lib/computer/download.d.ts +15 -15
- package/dist/lib/computer/download.js +35 -98
- package/dist/lib/computer/ssh-tunnel.d.ts +0 -3
- package/dist/lib/computer/ssh-tunnel.js +12 -22
- package/dist/lib/config-keys.d.ts +2 -8
- package/dist/lib/config-keys.js +2 -13
- package/dist/lib/crabbox/cli.d.ts +1 -1
- package/dist/lib/crabbox/cli.js +2 -2
- package/dist/lib/crabbox/lease.d.ts +9 -0
- package/dist/lib/crabbox/lease.js +70 -15
- package/dist/lib/crabbox/runtimes.js +1 -1
- package/dist/lib/daemon/account-state-daemon-service.d.ts +16 -0
- package/dist/lib/daemon/account-state-daemon-service.js +26 -0
- package/dist/lib/daemon/browser-ipc-service.d.ts +20 -0
- package/dist/lib/daemon/browser-ipc-service.js +46 -0
- package/dist/lib/daemon/daemon.d.ts +3 -0
- package/dist/lib/daemon/daemon.js +212 -444
- package/dist/lib/daemon/device-probe-service.d.ts +26 -0
- package/dist/lib/daemon/device-probe-service.js +47 -0
- package/dist/lib/daemon/keychain-reap-service.d.ts +17 -0
- package/dist/lib/daemon/keychain-reap-service.js +32 -0
- package/dist/lib/daemon/monitor-engine-service.d.ts +22 -0
- package/dist/lib/daemon/monitor-engine-service.js +29 -0
- package/dist/lib/daemon/secrets-broker-service.d.ts +20 -0
- package/dist/lib/daemon/secrets-broker-service.js +66 -0
- package/dist/lib/daemon/self-heal-service.d.ts +27 -0
- package/dist/lib/daemon/self-heal-service.js +48 -0
- package/dist/lib/daemon/service.d.ts +102 -0
- package/dist/lib/daemon/service.js +98 -0
- package/dist/lib/daemon/session-index-service.d.ts +22 -0
- package/dist/lib/daemon/session-index-service.js +40 -0
- package/dist/lib/daemon/state-dir-check-service.d.ts +43 -0
- package/dist/lib/daemon/state-dir-check-service.js +63 -0
- package/dist/lib/daemon/supervisor.d.ts +87 -0
- package/dist/lib/daemon/supervisor.js +298 -0
- package/dist/lib/daemon/watchdog-service.d.ts +19 -0
- package/dist/lib/daemon/watchdog-service.js +40 -0
- package/dist/lib/daemon-health.d.ts +15 -0
- package/dist/lib/daemon-health.js +29 -5
- package/dist/lib/daemon-services.d.ts +8 -1
- package/dist/lib/daemon-services.js +55 -0
- package/dist/lib/daemon-ticks.d.ts +13 -2
- package/dist/lib/daemon-ticks.js +20 -18
- package/dist/lib/device-config.d.ts +0 -2
- package/dist/lib/device-config.js +1 -23
- package/dist/lib/devices/registry.d.ts +1 -1
- package/dist/lib/devices/registry.js +1 -1
- package/dist/lib/devices/stats-cache.d.ts +20 -0
- package/dist/lib/devices/stats-cache.js +49 -5
- package/dist/lib/devices/worker-pick.d.ts +48 -0
- package/dist/lib/devices/worker-pick.js +113 -0
- package/dist/lib/exec.d.ts +67 -13
- package/dist/lib/exec.js +85 -29
- package/dist/lib/harness/adapters/cursor.js +8 -11
- package/dist/lib/helper-download.d.ts +108 -0
- package/dist/lib/helper-download.js +194 -0
- package/dist/lib/helper-versions.d.ts +52 -0
- package/dist/lib/helper-versions.js +58 -0
- package/dist/lib/hooks/cache.js +11 -0
- package/dist/lib/hooks/install.js +2 -2
- package/dist/lib/hosts/credentials.d.ts +1 -1
- package/dist/lib/hosts/credentials.js +1 -1
- package/dist/lib/hosts/dispatch.d.ts +7 -1
- package/dist/lib/hosts/dispatch.js +24 -5
- package/dist/lib/hosts/passthrough.d.ts +8 -15
- package/dist/lib/hosts/passthrough.js +19 -16
- package/dist/lib/hosts/providers/devices.d.ts +1 -1
- package/dist/lib/hosts/providers/devices.js +1 -1
- package/dist/lib/hosts/reconnect.d.ts +179 -21
- package/dist/lib/hosts/reconnect.js +266 -45
- package/dist/lib/installations/migrate.d.ts +4 -5
- package/dist/lib/installations/migrate.js +6 -7
- package/dist/lib/installations/shims.d.ts +1 -1
- package/dist/lib/installations/shims.js +23 -13
- package/dist/lib/installations/versions.js +25 -2
- package/dist/lib/linear-autoclose.d.ts +1 -1
- package/dist/lib/linear-autoclose.js +1 -1
- package/dist/lib/loop.d.ts +2 -2
- package/dist/lib/loop.js +1 -1
- package/dist/lib/menubar/download-menubar.d.ts +47 -0
- package/dist/lib/menubar/download-menubar.js +60 -0
- package/dist/lib/menubar/install-menubar.d.ts +31 -7
- package/dist/lib/menubar/install-menubar.js +79 -21
- package/dist/lib/menubar/notify-desktop.d.ts +3 -3
- package/dist/lib/menubar/notify-desktop.js +6 -6
- package/dist/lib/model-tiers.d.ts +1 -1
- package/dist/lib/project-probe.d.ts +1 -1
- package/dist/lib/project-probe.js +1 -1
- package/dist/lib/project-pull.d.ts +1 -1
- package/dist/lib/project-pull.js +2 -2
- package/dist/lib/projects.d.ts +1 -1
- package/dist/lib/projects.js +1 -1
- package/dist/lib/sandbox.js +6 -7
- package/dist/lib/secrets/download-keychain.d.ts +47 -0
- package/dist/lib/secrets/download-keychain.js +70 -0
- package/dist/lib/secrets/install-helper.d.ts +20 -1
- package/dist/lib/secrets/install-helper.js +44 -3
- package/dist/lib/session/active.js +17 -1
- package/dist/lib/session/db.d.ts +11 -1
- package/dist/lib/session/db.js +138 -6
- package/dist/lib/session/discover.d.ts +21 -1
- package/dist/lib/session/discover.js +33 -5
- package/dist/lib/session/highlights.d.ts +49 -1
- package/dist/lib/session/highlights.js +95 -0
- package/dist/lib/session/host-link.d.ts +16 -2
- package/dist/lib/session/host-link.js +7 -1
- package/dist/lib/session/parse.js +33 -1
- package/dist/lib/session/remote/remote-list.d.ts +9 -0
- package/dist/lib/session/remote/remote-list.js +19 -2
- package/dist/lib/session/remote/watch.js +11 -2
- package/dist/lib/session/session-cache.d.ts +53 -0
- package/dist/lib/session/session-cache.js +88 -0
- package/dist/lib/session/state.js +1 -1
- package/dist/lib/session/tool-calls.d.ts +2 -0
- package/dist/lib/session/tool-calls.js +1 -1
- package/dist/lib/session/trajectory-html.d.ts +5 -1
- package/dist/lib/session/trajectory-html.js +42 -22
- package/dist/lib/session/trajectory-text.js +9 -2
- package/dist/lib/session/trajectory.js +53 -4
- package/dist/lib/session/types.d.ts +15 -0
- package/dist/lib/sha256-asset.d.ts +26 -0
- package/dist/lib/sha256-asset.js +41 -0
- package/dist/lib/share/backend.d.ts +95 -0
- package/dist/lib/share/backend.js +139 -0
- package/dist/lib/share/delete.d.ts +6 -2
- package/dist/lib/share/delete.js +8 -9
- package/dist/lib/share/html.d.ts +22 -0
- package/dist/lib/share/html.js +88 -0
- package/dist/lib/share/provision.d.ts +18 -4
- package/dist/lib/share/provision.js +38 -4
- package/dist/lib/share/publish.d.ts +39 -15
- package/dist/lib/share/publish.js +55 -26
- package/dist/lib/share/worker-template.js +171 -11
- package/dist/lib/sqlite.js +16 -3
- package/dist/lib/ssh-exec.d.ts +65 -0
- package/dist/lib/ssh-exec.js +120 -4
- package/dist/lib/startup/command-registry.js +1 -1
- package/dist/lib/startup/dev-build.js +3 -3
- package/dist/lib/state.d.ts +1 -1
- package/dist/lib/state.js +7 -3
- package/dist/lib/subagents-registry.js +1 -1
- package/dist/lib/terminal/index.d.ts +1 -1
- package/dist/lib/terminal/types.d.ts +1 -1
- package/dist/lib/terminal/types.js +1 -1
- package/dist/lib/tmux/orphan-reap.js +1 -1
- package/dist/lib/tmux/session.js +31 -0
- package/dist/lib/traces/backend.d.ts +29 -0
- package/dist/lib/traces/backend.js +46 -0
- package/dist/lib/traces/classify.d.ts +52 -0
- package/dist/lib/traces/classify.js +72 -0
- package/dist/lib/traces/config.d.ts +10 -0
- package/dist/lib/traces/config.js +2 -0
- package/dist/lib/traces/provision.d.ts +19 -0
- package/dist/lib/traces/provision.js +30 -0
- package/dist/lib/traces/sync.d.ts +150 -0
- package/dist/lib/traces/sync.js +447 -0
- package/dist/lib/traces/worker-template.d.ts +4 -0
- package/dist/lib/traces/worker-template.js +159 -0
- package/dist/lib/types.d.ts +18 -19
- package/dist/lib/types.js +14 -0
- package/dist/lib/usage-refresh.d.ts +1 -1
- package/dist/lib/usage-refresh.js +11 -8
- package/dist/lib/workflows.d.ts +1 -1
- package/package.json +4 -6
- package/dist/lib/menubar/MenubarHelper.app/Contents/CodeResources +0 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/Info.plist +0 -24
- package/dist/lib/menubar/MenubarHelper.app/Contents/MacOS/MenubarHelper +0 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/Resources/AppIcon.icns +0 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/_CodeSignature/CodeResources +0 -128
- package/dist/lib/secrets/Agents CLI.app/Contents/CodeResources +0 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/Info.plist +0 -26
- package/dist/lib/secrets/Agents CLI.app/Contents/MacOS/Agents CLI +0 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/Resources/AppIcon.icns +0 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/_CodeSignature/CodeResources +0 -135
- package/dist/lib/secrets/Agents CLI.app/Contents/embedded.provisionprofile +0 -0
- package/dist/lib/usage-fleet.d.ts +0 -32
- package/dist/lib/usage-fleet.js +0 -125
package/README.md
CHANGED
|
@@ -56,7 +56,8 @@ agents run claude "explain this repo" # run any agent on your existing subscrip
|
|
|
56
56
|
|
|
57
57
|
Everything here — and every other command in this README — is free and needs no account; the optional `agents auth login` exists only for [team spaces](#sign-in). `agents setup` is interactive and idempotent -- safe to re-run on any machine. Once core setup exists, it opens a status-aware menu for browser, computer, secrets, fleet, share, watchdog, and device preferences; each choice delegates to the same wizard available under `agents setup <capability>`. In CI or another non-TTY, bare setup prints the checklist without prompting. The `agi-cli.sh` one-liner installs this same canonical `@phnx-labs/agents-cli` package. Prefer bun? `bun install -g @phnx-labs/agents-cli` works too.
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
The command surface teaches setup through `agents setup` and group-level `--help`.
|
|
60
|
+
The durable system model starts at [`cli/docs/README.md`](cli/docs/README.md).
|
|
60
61
|
|
|
61
62
|
**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).
|
|
62
63
|
|
|
@@ -336,7 +337,7 @@ agents insights --since 7d
|
|
|
336
337
|
|
|
337
338
|
Interactive picker when you're in a terminal. Structured output (`--json`, `--markdown`, filtered by role or turn count) when piped.
|
|
338
339
|
|
|
339
|
-
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; repeated `--query` clauses must match distinct calls in one session. Tool queries read SQLite only: `agents sessions backfill tools` performs the one-time historical parse, while normal incremental scans index new and changed sessions. The index stores ordered static Bash program sites, so `--count` reports occurrences, containing tool calls, and distinct sessions without reparsing. `--fleet` executes one origin partition per device, so synced mirrors cannot duplicate compact evidence or counts returned over SSH; transcript bodies stay on their origin machine. 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](
|
|
340
|
+
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; repeated `--query` clauses must match distinct calls in one session. Tool queries read SQLite only: `agents sessions backfill tools` performs the one-time historical parse, while normal incremental scans index new and changed sessions. The index stores ordered static Bash program sites, so `--count` reports occurrences, containing tool calls, and distinct sessions without reparsing. `--fleet` executes one origin partition per device, so synced mirrors cannot duplicate compact evidence or counts returned over SSH; transcript bodies stay on their origin machine. 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.
|
|
340
341
|
|
|
341
342
|
### Live state, and catching up fast
|
|
342
343
|
|
|
@@ -492,7 +493,7 @@ agents fleet apply --no-login # skip login propagation
|
|
|
492
493
|
|
|
493
494
|
`agents fleet apply` probes every target over the existing SSH transport, then reconciles it to the profile: installs missing agents, upgrades `agi-cli`, syncs the named config scopes, and **propagates logins** so a host signed in once seeds the fleet -- turning "6 hosts x 8 harnesses = 48 OAuth flows" into one. Portable credential files (claude, codex, grok, kimi, opencode, droid, antigravity) stream to each target over encrypted SSH stdin, never shell-interpolated, and land at `0600`. **Honest boundary:** macOS keychain-bound tokens (claude, antigravity on a Mac target) can't be extracted -- those surface as a one-time manual login, never faked. `--plan` / `--dry-run` shows the full matrix without touching anything.
|
|
494
495
|
|
|
495
|
-
See [docs/fleet.md](
|
|
496
|
+
See [docs/fleet.md](cli/docs/fleet.md) for the manifest schema and reconcile semantics.
|
|
496
497
|
|
|
497
498
|
---
|
|
498
499
|
|
|
@@ -709,9 +710,11 @@ email) and naming which harnesses use it — the fast way to see which accounts
|
|
|
709
710
|
and healthy across every machine. Scope either with `--agents <csv>` / `--device <csv>`, and
|
|
710
711
|
add `--json` for the machine-readable per-host rows.
|
|
711
712
|
|
|
712
|
-
**Hosts** (`agents hosts`) are git-synced dispatch targets in `agents.yaml`; **devices** (`agents devices`) are your Tailscale machines in a local registry. Both ride SSH and feed one host pool: devices appear in `agents hosts list` and capability routing without a second enrollment. 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](
|
|
713
|
+
**Hosts** (`agents hosts`) are git-synced dispatch targets in `agents.yaml`; **devices** (`agents devices`) are your Tailscale machines in a local registry. Both ride SSH and feed one host pool: devices appear in `agents hosts list` and capability routing without a second enrollment. 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--hosts).
|
|
713
714
|
|
|
714
|
-
Every `--device` command rides
|
|
715
|
+
Every `--device` command rides the shared SSH transport so host resolution,
|
|
716
|
+
identity checks, environment forwarding, reconnect behavior, and multiplexing cannot
|
|
717
|
+
drift between callers. See [fleet architecture](cli/docs/fleet.md).
|
|
715
718
|
|
|
716
719
|
---
|
|
717
720
|
|
|
@@ -736,7 +739,7 @@ agents teams status auth-feature # Who's working, what they changed, what the
|
|
|
736
739
|
|
|
737
740
|
Teammates run detached -- close your terminal, they keep working. Check in with `teams status`, glance at a teammate's summary with `teams logs <name>` (add `--full` for the raw output), clean up with `teams disband`.
|
|
738
741
|
|
|
739
|
-
Team state is observable via `agents teams list --json` / `agents teams status --json` (compact by default; add `--verbose` for the full per-teammate shape). External tools join it with `sessions --json` (teammates get `isTeamOrigin: true`) and `cloud list --json` (for `--cloud` teammates) to build a unified fleet view. See [docs/observability.md](
|
|
742
|
+
Team state is observable via `agents teams list --json` / `agents teams status --json` (compact by default; add `--verbose` for the full per-teammate shape). External tools join it with `sessions --json` (teammates get `isTeamOrigin: true`) and `cloud list --json` (for `--cloud` teammates) to build a unified fleet view. See [docs/observability.md](cli/docs/observability.md).
|
|
740
743
|
|
|
741
744
|
---
|
|
742
745
|
|
|
@@ -907,7 +910,9 @@ agents setup mine toggle jack --enable teams
|
|
|
907
910
|
agents setup mine remove jack --purge
|
|
908
911
|
```
|
|
909
912
|
|
|
910
|
-
Under the hood, `init`
|
|
913
|
+
Under the hood, `init` creates a pass-through shim that selects a brand configuration;
|
|
914
|
+
it does not fork the execution engine. Curated resources still resolve through the
|
|
915
|
+
ordinary [resource architecture](cli/docs/resources.md).
|
|
911
916
|
|
|
912
917
|
> Branded builds are free for personal and commercial use alike. New versions ship under FSL-1.1-Apache-2.0: every user and company may use, modify, and redistribute; only offering agents-cli itself as a competing commercial product or service is barred, and each version automatically becomes Apache-2.0 two years after release.
|
|
913
918
|
|
|
@@ -921,15 +926,21 @@ Under the hood, `init` drops a pure pass-through shim in `~/.agents/.cache/shims
|
|
|
921
926
|
|
|
922
927
|
Give agents access to a real browser — no relay extension, no cloud service, no Playwright getting blocked.
|
|
923
928
|
|
|
929
|
+
Each device declares its own browsers in its own `devices/<machine>/agents.yaml`.
|
|
930
|
+
The fleet registry is the union of those files: a name declared by one device is
|
|
931
|
+
identity-bearing (the daemon tunnels to that device); a name declared by several
|
|
932
|
+
is fungible (use the local one). `--device` is only valid on `agents browser start`;
|
|
933
|
+
later verbs resolve the device from the task.
|
|
934
|
+
|
|
924
935
|
```bash
|
|
925
936
|
# First run: omit --profile and we auto-pick the first installed Chromium-family
|
|
926
937
|
# browser. macOS prefers Chrome > Brave > Edge > Chromium > Comet; Linux prefers
|
|
927
938
|
# Chrome > Chromium > Brave > Edge; Windows prefers Edge (always preinstalled) >
|
|
928
|
-
# Chrome > Brave > Comet. The auto-picked profile is saved as "
|
|
939
|
+
# Chrome > Brave > Comet. The auto-picked profile is saved as "auto-chrome".
|
|
929
940
|
export AGENTS_BROWSER_TASK=$(agents browser start --url https://app.example.com)
|
|
930
941
|
|
|
931
942
|
# Or pin a named profile to a specific browser (chrome, comet, brave, chromium,
|
|
932
|
-
# edge, or custom) when you want isolation from
|
|
943
|
+
# edge, or custom) when you want isolation from auto-detect.
|
|
933
944
|
agents browser profiles create work --browser chrome
|
|
934
945
|
# `start` writes the resolved name (e.g. `swift-crab-falcon-a3f92b1c`) to stdout
|
|
935
946
|
# and human-friendly commentary to stderr, so $(...) capture stays clean.
|
|
@@ -993,7 +1004,10 @@ agents browser profiles create slack \
|
|
|
993
1004
|
|
|
994
1005
|
### Remote browsers
|
|
995
1006
|
|
|
996
|
-
|
|
1007
|
+
Identity-bearing names tunnel automatically: declare `comet-local` only on the
|
|
1008
|
+
machine that holds the logins, and every other box reaches it through the
|
|
1009
|
+
daemon. `--device` on `start` binds a task to a specific box (fungible names,
|
|
1010
|
+
or an explicit pick). Later verbs reject `--device`.
|
|
997
1011
|
|
|
998
1012
|
```bash
|
|
999
1013
|
# Local CDP (discovers WebSocket URL automatically)
|
|
@@ -1001,7 +1015,11 @@ agents browser profiles create local-debug \
|
|
|
1001
1015
|
--browser chrome \
|
|
1002
1016
|
--endpoint "http://localhost:9222"
|
|
1003
1017
|
|
|
1004
|
-
#
|
|
1018
|
+
# Bind a task to a fleet device at start; later verbs resolve it from the task
|
|
1019
|
+
agents browser start --task post --device zion --url https://x.com/
|
|
1020
|
+
agents browser screenshot --task post
|
|
1021
|
+
|
|
1022
|
+
# Explicit SSH endpoint, declared on the machine that owns the browser
|
|
1005
1023
|
agents browser profiles create staging \
|
|
1006
1024
|
--browser chrome \
|
|
1007
1025
|
--endpoint "ssh://deploy@staging.example.com?port=9222"
|
|
@@ -1120,7 +1138,7 @@ agents routines add daily-digest \
|
|
|
1120
1138
|
--schedule "0 9 * * 1-5" \
|
|
1121
1139
|
--agent claude \
|
|
1122
1140
|
--project-anchor agents-cli \
|
|
1123
|
-
--cwd
|
|
1141
|
+
--cwd cli \
|
|
1124
1142
|
--prompt "Review yesterday's PRs and summarize key changes"
|
|
1125
1143
|
|
|
1126
1144
|
agents routines list # All jobs + next run times
|
|
@@ -1152,7 +1170,7 @@ Jobs run sandboxed -- agents only see directories and tools you explicitly allow
|
|
|
1152
1170
|
decides where the body runs. The reliability contract (execution anchor + `--cwd`,
|
|
1153
1171
|
readiness that saves a blocked routine paused, and the `blocked`/`skipped` run
|
|
1154
1172
|
statuses) is specified in
|
|
1155
|
-
[docs/specifications.md §Routine execution & readiness](
|
|
1173
|
+
[docs/specifications.md §Routine execution & readiness](cli/docs/specifications.md#routine-execution--readiness);
|
|
1156
1174
|
some of it is planned (RUSH-2290), and the section marks what is landed vs intended.
|
|
1157
1175
|
|
|
1158
1176
|
### Daemon
|
|
@@ -1232,8 +1250,13 @@ Sources: a command's stdout (`--watch` / `--poll`), an HTTP endpoint (`--poll-ht
|
|
|
1232
1250
|
## Share
|
|
1233
1251
|
|
|
1234
1252
|
```bash
|
|
1235
|
-
#
|
|
1253
|
+
# Signed in? Just publish — no Cloudflare setup.
|
|
1254
|
+
agents auth login
|
|
1255
|
+
agents artifacts share plan.html --visibility unlisted # → https://share.agents-cli.sh/<handle>/<slug>-<id>
|
|
1256
|
+
|
|
1257
|
+
# Or provision your own Cloudflare R2 (~$0).
|
|
1236
1258
|
agents artifacts setup # once: provision bucket + Worker on your CF
|
|
1259
|
+
agents traces setup # provision the private traces Worker + R2 bucket
|
|
1237
1260
|
agents artifacts share plan.html --slug fleet --expire 30d # → https://<base>/fleet
|
|
1238
1261
|
agents artifacts share plan.html --label "Q3 fleet plan" --meta kind=plan # human title + structured metadata
|
|
1239
1262
|
agents artifacts share plan.html --json # URL object for plan-render hooks
|
|
@@ -1244,18 +1267,26 @@ agents artifacts unshare fleet # take a published l
|
|
|
1244
1267
|
```
|
|
1245
1268
|
|
|
1246
1269
|
`agents artifacts share` closes the loop: an agent makes work (a plan, a viz, a report),
|
|
1247
|
-
publishes it, and you open the link to see it.
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1270
|
+
publishes it, and you open the link to see it. **Signed-in users** publish to the
|
|
1271
|
+
already-live managed endpoint (`share.agents-cli.sh/<handle>/…`) with the Phoenix session — no
|
|
1272
|
+
Cloudflare account, bucket, or write token — and `share status` / `list` / `revisions`
|
|
1273
|
+
/ `unshare` talk to that same endpoint. The handle is the local-part of the signed-in
|
|
1274
|
+
email (`muqsitnawaz@gmail.com` → `muqsitnawaz`); the page slug is readable plus a
|
|
1275
|
+
short view-id. HTML is stored as one object: local images are inlined, `file://` TOC
|
|
1276
|
+
links become in-page hashes, so the published page is actually viewable. `--visibility unlisted` (hidden aliases
|
|
1277
|
+
`--unlisted` / `--private`) is a capability URL: GET still works, the gallery hides it,
|
|
1278
|
+
and the Worker sends `X-Robots-Tag: noindex`. **BYO Cloudflare** remains: `setup` reads
|
|
1279
|
+
a Cloudflare API token from your `cloudflare.com` secrets bundle (or `--token`), creates
|
|
1280
|
+
an R2 bucket, uploads a tiny Worker, and enables the free `*.workers.dev` subdomain (or
|
|
1281
|
+
maps `--domain share.example.com` when the token owns the zone). Writes are bearer-gated
|
|
1282
|
+
**through** the Worker (Phoenix bearer or static `WRITE_TOKEN`); reads are **public**, so
|
|
1283
|
+
a link outlives the agent. R2 has zero egress + a 10 GB free tier, so BYO is still
|
|
1284
|
+
effectively free.
|
|
1254
1285
|
|
|
1255
1286
|
**Fleet mode:** provision one endpoint, then every fleet / cloud / ephemeral agent
|
|
1256
1287
|
publishes through it with a shared write token — `agents artifacts share join <baseUrl>` uses an
|
|
1257
1288
|
existing endpoint with no provisioning. `--expire 30d|12h|<date>` auto-expires a link.
|
|
1258
|
-
`--json` emits `{ url, coverUrl, expiresAt, label, labelSource }` so plan-render automation can
|
|
1289
|
+
`--json` emits `{ url, coverUrl, expiresAt, visibility, unlisted?, label, labelSource }` so plan-render automation can
|
|
1259
1290
|
publish the rendered HTML and post the returned link without scraping terminal text.
|
|
1260
1291
|
|
|
1261
1292
|
**Every share carries provenance and a title.** Agent/session/host/repo/date are
|
|
@@ -1274,7 +1305,7 @@ full URL, `<user>/<slug>`, or a bare slug (resolved against your own namespace);
|
|
|
1274
1305
|
targets at once are fine. It also deletes the sibling `<slug>.png` OG cover by default
|
|
1275
1306
|
(`--keep-cover` opts out) and verifies the page actually 404s before reporting success —
|
|
1276
1307
|
the Worker's delete is idempotent, so `{"ok":true}` alone is never proof.
|
|
1277
|
-
See [
|
|
1308
|
+
See the publication boundary in [observability](cli/docs/observability.md).
|
|
1278
1309
|
|
|
1279
1310
|
---
|
|
1280
1311
|
|
|
@@ -1323,9 +1354,9 @@ Two repos with the same shape, different roles:
|
|
|
1323
1354
|
|
|
1324
1355
|
**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.
|
|
1325
1356
|
|
|
1326
|
-
See [docs/concepts.md](
|
|
1357
|
+
See [docs/concepts.md](cli/docs/concepts.md) for the full mental model: DotAgents repos, resource kinds, and how resolution works end-to-end.
|
|
1327
1358
|
|
|
1328
|
-
Other useful commands: `agents doctor` checks CLI availability and resource sync drift, `agents view` shows per-account quota/rate-limit data for installed agents, `agents config budget` shows cross-vendor spend caps and current spend-to-cap (and enforces pre-flight estimates + a hard-cap kill-switch on every run — see [docs/observability.md](
|
|
1359
|
+
Other useful commands: `agents doctor` checks CLI availability and resource sync drift, `agents view` shows per-account quota/rate-limit data for installed agents, `agents config budget` shows cross-vendor spend caps and current spend-to-cap (and enforces pre-flight estimates + a hard-cap kill-switch on every run — see [docs/observability.md](cli/docs/observability.md#budget-guardrails-agents-budget)), `agents import` adopts an existing unmanaged install, `agents trash` lists and restores soft-deleted version directories, and `agents subagents` installs reusable subagent definitions for parent-agent workflows.
|
|
1329
1360
|
|
|
1330
1361
|
---
|
|
1331
1362
|
|
|
@@ -1448,7 +1479,7 @@ By default, secrets sync via iCloud Keychain to your other Macs. With `--no-iclo
|
|
|
1448
1479
|
|
|
1449
1480
|
## Compatibility
|
|
1450
1481
|
|
|
1451
|
-
Which DotAgents resources each agent CLI can load. Source of truth: [src/lib/agents.ts](
|
|
1482
|
+
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).
|
|
1452
1483
|
|
|
1453
1484
|
> **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/).
|
|
1454
1485
|
|
|
@@ -1576,7 +1607,7 @@ Profiles (experimental — available by default). Works with LiteLLM Proxy, Olla
|
|
|
1576
1607
|
|
|
1577
1608
|
### Can I add support for a new agent?
|
|
1578
1609
|
|
|
1579
|
-
Agents are defined in [src/lib/agents.ts](
|
|
1610
|
+
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.
|
|
1580
1611
|
|
|
1581
1612
|
### What's the relationship to Phoenix Labs / Rush?
|
|
1582
1613
|
|
|
@@ -1588,20 +1619,23 @@ Agents are defined in [src/lib/agents.ts](apps/cli/src/lib/agents.ts) -- each is
|
|
|
1588
1619
|
|
|
1589
1620
|
| Path | What |
|
|
1590
1621
|
|---|---|
|
|
1591
|
-
| [`
|
|
1592
|
-
| [
|
|
1622
|
+
| [`cli`](cli) | **The CLI** (this README) — version management, config sync, sessions, teams, cloud, browser, computer, secrets. |
|
|
1623
|
+
| [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. |
|
|
1593
1624
|
| [`native/computer-mac`](native/computer-mac) · [`native/computer-win`](native/computer-win) | Native backends behind `agents computer` — Swift (macOS Accessibility + screen capture) and C#/.NET (Windows UI Automation). |
|
|
1594
|
-
| [`packages/session-tracker`](packages/session-tracker) | The `SessionStart` hook that writes live-session state **AGI EXT** reads back (`
|
|
1625
|
+
| [`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. |
|
|
1595
1626
|
|
|
1596
1627
|
## Contributing
|
|
1597
1628
|
|
|
1598
1629
|
```bash
|
|
1599
1630
|
git clone https://github.com/phnx-labs/agi-cli
|
|
1600
|
-
cd agi-cli/
|
|
1631
|
+
cd agi-cli/cli
|
|
1601
1632
|
bun install && bun run build && bun test
|
|
1602
1633
|
```
|
|
1603
1634
|
|
|
1604
|
-
Commands in [`
|
|
1635
|
+
Commands live in [`cli/src/commands/`](cli/src/commands/), libraries in
|
|
1636
|
+
[`cli/src/lib/`](cli/src/lib/), and tests sit beside their sources. [AGENTS.md](AGENTS.md)
|
|
1637
|
+
is the canonical engineering guide; [`cli/docs/README.md`](cli/docs/README.md) is the
|
|
1638
|
+
architecture index.
|
|
1605
1639
|
|
|
1606
1640
|
## License
|
|
1607
1641
|
|
package/dist/bootstrap.js
CHANGED
|
@@ -473,8 +473,10 @@ async function installResolvedPackage(metadata) {
|
|
|
473
473
|
// getKeychainHelperPath() still repairs it on the next secret operation).
|
|
474
474
|
if (process.platform === 'darwin') {
|
|
475
475
|
try {
|
|
476
|
-
const {
|
|
477
|
-
|
|
476
|
+
const { ensureKeychainHelperInstalledAsync } = await import('./lib/secrets/install-helper.js');
|
|
477
|
+
// Async + download-capable: an upgrade to a tarball that dropped the
|
|
478
|
+
// bundle fetches the verified release asset instead of no-op'ing.
|
|
479
|
+
await ensureKeychainHelperInstalledAsync({ forceReinstall: true });
|
|
478
480
|
}
|
|
479
481
|
catch {
|
|
480
482
|
// Non-fatal.
|
|
@@ -91,6 +91,7 @@ export declare const loadHumans: ModuleLoader;
|
|
|
91
91
|
export declare const loadAccounts: ModuleLoader;
|
|
92
92
|
export declare const loadDaemon: ModuleLoader;
|
|
93
93
|
export declare const loadAuth: ModuleLoader;
|
|
94
|
+
export declare const loadTraces: ModuleLoader;
|
|
94
95
|
/**
|
|
95
96
|
* Commands whose modules pull in the SQLite-backed session/cloud stack. They are
|
|
96
97
|
* registered AFTER `applyGlobalHelpConventions` (mirroring main's order: help
|
|
@@ -94,6 +94,7 @@ export const loadHumans = async () => (await import('../commands/humans.js')).re
|
|
|
94
94
|
export const loadAccounts = async () => (await import('../commands/accounts.js')).registerAccountsCommand;
|
|
95
95
|
export const loadDaemon = async () => (await import('../commands/daemon.js')).registerDaemonCommand;
|
|
96
96
|
export const loadAuth = async () => (await import('../commands/auth.js')).registerAuthCommand;
|
|
97
|
+
export const loadTraces = async () => (await import('../commands/traces.js')).registerTracesCommands;
|
|
97
98
|
/**
|
|
98
99
|
* Commands whose modules pull in the SQLite-backed session/cloud stack. They are
|
|
99
100
|
* registered AFTER `applyGlobalHelpConventions` (mirroring main's order: help
|
|
@@ -211,6 +212,7 @@ export const COMMAND_LOADERS = {
|
|
|
211
212
|
humans: [loadHumans],
|
|
212
213
|
daemon: [loadDaemon],
|
|
213
214
|
auth: [loadAuth],
|
|
215
|
+
traces: [loadTraces],
|
|
214
216
|
};
|
|
215
217
|
/**
|
|
216
218
|
* Register every module in {@link COMMAND_LOADERS} onto one fresh program and
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Command } from 'commander';
|
|
2
2
|
import type { AgentId } from '../lib/types.js';
|
|
3
|
+
import { collectRunCandidates, type RotateCandidate } from '../lib/accounting/rotate.js';
|
|
3
4
|
import { type Profile } from '../lib/profiles.js';
|
|
4
5
|
import { type UnifiedAccount } from '../lib/account-registry.js';
|
|
5
6
|
export declare function nativeIdentityFromSource(raw: string): Promise<{
|
|
@@ -26,10 +27,67 @@ type AttachTarget = {
|
|
|
26
27
|
* `agent@version`, or a known harness id.
|
|
27
28
|
*/
|
|
28
29
|
export declare function classifyAttachTarget(target: string): AttachTarget;
|
|
30
|
+
/**
|
|
31
|
+
* Persist the attached setup-token to a per-version `.oauth_token` file so an
|
|
32
|
+
* INTERACTIVE Claude launch on a keychain-less Linux worker can authenticate from it.
|
|
33
|
+
* Headless runs inject the token via `buildExecEnv`, but an interactive launch defers to
|
|
34
|
+
* the per-version login (`claudeAdapter.applyExecConfigEnv`), and the shim's Linux fallback
|
|
35
|
+
* (`claudeAdapter.shimConfigEnvBash`) reads exactly this file. Without writing it, a
|
|
36
|
+
* freshly-attached setup-token was invisible to interactive runs on a worker. macOS keeps
|
|
37
|
+
* the credential in the keychain, so `resolveClaudeSetupToken` returns null there and this
|
|
38
|
+
* is a no-op off Linux.
|
|
39
|
+
*/
|
|
40
|
+
export declare function writeClaudeInteractiveOauthToken(target: AttachTarget, targetAgent: AgentId): void;
|
|
29
41
|
export declare function parseBundleKey(raw: string): {
|
|
30
42
|
bundle: string;
|
|
31
43
|
key: string;
|
|
32
44
|
};
|
|
45
|
+
/** Pure text renderer for `agents accounts list` — grouped, column-aligned, labels first-class. */
|
|
46
|
+
export declare function renderAccountList(records: {
|
|
47
|
+
name: string;
|
|
48
|
+
provider: string;
|
|
49
|
+
auth: string;
|
|
50
|
+
}[], native: {
|
|
51
|
+
agent: AgentId;
|
|
52
|
+
name?: string;
|
|
53
|
+
display: string;
|
|
54
|
+
versions: string[];
|
|
55
|
+
}[]): string;
|
|
56
|
+
/** One labelable signed-in identity, folded across every version it is signed into. */
|
|
57
|
+
export interface LabelIdentity {
|
|
58
|
+
identityKey: string;
|
|
59
|
+
email: string | null;
|
|
60
|
+
versions: string[];
|
|
61
|
+
isDefault: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Fold signed-in run candidates into distinct identities — the unit a label
|
|
65
|
+
* binds to. The same account signed into several versions is ONE row, so a
|
|
66
|
+
* multi-version single-account harness never demands a selector. Candidates
|
|
67
|
+
* with no stable identity (no accountKey, no email) are dropped: there is
|
|
68
|
+
* nothing durable for a label to bind to. Default-version identity first.
|
|
69
|
+
*/
|
|
70
|
+
export declare function groupLabelIdentities(candidates: Pick<RotateCandidate, 'version' | 'email' | 'accountKey'>[], defaultVersion: string | null): LabelIdentity[];
|
|
71
|
+
export type LabelSelection = {
|
|
72
|
+
kind: 'selected';
|
|
73
|
+
identity: LabelIdentity;
|
|
74
|
+
} | {
|
|
75
|
+
kind: 'ambiguous';
|
|
76
|
+
identities: LabelIdentity[];
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Resolve which signed-in login a bare-harness `accounts label` call means.
|
|
80
|
+
* `collect` is injectable (the `resolveRunVersion` pattern) so tests drive the
|
|
81
|
+
* real selection path against fixture candidates.
|
|
82
|
+
*/
|
|
83
|
+
export declare function resolveLabelIdentity(agent: AgentId, accountSelector: string | undefined, collect?: typeof collectRunCandidates): Promise<LabelSelection>;
|
|
84
|
+
/**
|
|
85
|
+
* Body of `accounts label`, exported with the injectable candidate collector
|
|
86
|
+
* so tests exercise everything but the TTY prompt itself.
|
|
87
|
+
*/
|
|
88
|
+
export declare function runAccountsLabel(source: string, label: string | undefined, opts: {
|
|
89
|
+
account?: string;
|
|
90
|
+
}, collect?: typeof collectRunCandidates): Promise<void>;
|
|
33
91
|
/** Named accounts that `set-default` / `switch` can pin for this harness. */
|
|
34
92
|
export declare function listSwitchableAccounts(agent: AgentId): Promise<UnifiedAccount[]>;
|
|
35
93
|
/**
|