@phnx-labs/agents-cli 1.22.122 → 1.22.124
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 +288 -0
- package/README.md +49 -10
- package/dist/bootstrap.js +22 -17
- package/dist/cli/command-registry.d.ts +0 -1
- package/dist/cli/command-registry.js +2 -10
- package/dist/commands/auth.js +13 -4
- package/dist/commands/browser.js +3 -4
- package/dist/commands/cloud-transcripts.d.ts +7 -0
- package/dist/commands/cloud-transcripts.js +100 -0
- package/dist/commands/cloud.js +5 -0
- package/dist/commands/computer.d.ts +0 -12
- package/dist/commands/computer.js +14 -124
- package/dist/commands/config.js +5 -4
- package/dist/commands/daemon-index.d.ts +2 -0
- package/dist/commands/daemon-index.js +44 -0
- package/dist/commands/daemon.js +6 -0
- package/dist/commands/doctor.js +3 -4
- package/dist/commands/exec.d.ts +5 -0
- package/dist/commands/exec.js +35 -7
- package/dist/commands/feed-watch.js +12 -0
- package/dist/commands/feed.d.ts +1 -1
- package/dist/commands/feed.js +7 -4
- package/dist/commands/insights.js +3 -1
- package/dist/commands/inspect.js +1 -1
- package/dist/commands/logs.js +2 -1
- package/dist/commands/models.js +1 -1
- package/dist/commands/prune.js +6 -28
- package/dist/commands/ps-roster.d.ts +0 -1
- package/dist/commands/ps-roster.js +2 -21
- package/dist/commands/ps.js +13 -1
- package/dist/commands/recordings.d.ts +2 -0
- package/dist/commands/recordings.js +117 -0
- package/dist/commands/routines.js +1 -1
- package/dist/commands/secrets-passthrough.js +3 -3
- package/dist/commands/send.js +33 -20
- package/dist/commands/sessions-backfill.d.ts +1 -0
- package/dist/commands/sessions-backfill.js +48 -13
- package/dist/commands/sessions-migrate.d.ts +1 -1
- package/dist/commands/sessions-migrate.js +11 -10
- package/dist/commands/sessions-optimize.d.ts +1 -0
- package/dist/commands/sessions-optimize.js +7 -4
- package/dist/commands/sessions-resume.js +8 -1
- package/dist/commands/sessions-stats.d.ts +2 -0
- package/dist/commands/sessions-stats.js +24 -7
- package/dist/commands/sessions.d.ts +5 -11
- package/dist/commands/sessions.js +8 -236
- package/dist/commands/setup-computer.js +1 -2
- package/dist/commands/setup.js +1 -1
- package/dist/commands/teams.js +2 -2
- package/dist/commands/testdata/feed-hub.d.ts +1 -0
- package/dist/commands/testdata/feed-hub.js +11 -0
- package/dist/commands/trash.d.ts +0 -1
- package/dist/commands/trash.js +74 -10
- package/dist/lib/accounting/usage-sync.js +7 -0
- package/dist/lib/agent-modes.d.ts +1 -1
- package/dist/lib/agent-modes.js +11 -5
- package/dist/lib/auth-mint.d.ts +4 -0
- package/dist/lib/auth-mint.js +6 -4
- package/dist/lib/browser/native-history.test-fixture.d.ts +12 -0
- package/dist/lib/browser/native-history.test-fixture.js +43 -0
- package/dist/lib/browser/paths.d.ts +5 -0
- package/dist/lib/browser/paths.js +7 -1
- package/dist/lib/browser/sessions-list.d.ts +28 -1
- package/dist/lib/browser/sessions-list.js +137 -25
- package/dist/lib/channels/providers/rush.d.ts +2 -1
- package/dist/lib/channels/providers/rush.js +2 -2
- package/dist/lib/channels/providers/session.d.ts +1 -0
- package/dist/lib/channels/providers/session.js +23 -12
- package/dist/lib/channels/registry.d.ts +9 -2
- package/dist/lib/channels/send.d.ts +5 -10
- package/dist/lib/channels/send.js +88 -50
- package/dist/lib/cloud/rush.d.ts +6 -0
- package/dist/lib/cloud/rush.js +18 -3
- package/dist/lib/computer-client.d.ts +19 -0
- package/dist/lib/computer-client.js +104 -0
- package/dist/lib/config-keys.d.ts +5 -1
- package/dist/lib/config-keys.js +14 -11
- package/dist/lib/daemon/auth-sync-service.js +13 -0
- package/dist/lib/daemon/daemon.js +20 -8
- package/dist/lib/daemon/owner-device-delivery-service.d.ts +10 -0
- package/dist/lib/daemon/owner-device-delivery-service.js +28 -0
- package/dist/lib/daemon-services.d.ts +2 -1
- package/dist/lib/daemon-services.js +17 -5
- package/dist/lib/device-config.d.ts +4 -1
- package/dist/lib/device-config.js +57 -7
- package/dist/lib/devices/doctor-findings.d.ts +2 -3
- package/dist/lib/devices/doctor-findings.js +10 -19
- package/dist/lib/event-provenance.d.ts +1 -0
- package/dist/lib/event-provenance.js +2 -0
- package/dist/lib/exec.d.ts +1 -0
- package/dist/lib/exec.js +20 -15
- package/dist/lib/feed/pr-status.d.ts +5 -1
- package/dist/lib/feed/pr-status.js +44 -3
- package/dist/lib/feed/tool-activity.js +9 -6
- package/dist/lib/feed/tools.d.ts +4 -1
- package/dist/lib/feed/tools.js +8 -11
- package/dist/lib/feed-broadcast.d.ts +5 -3
- package/dist/lib/feed-broadcast.js +47 -36
- package/dist/lib/fleet-shared-state.d.ts +5 -0
- package/dist/lib/fleet-shared-state.js +8 -0
- package/dist/lib/github/project-prs.d.ts +4 -1
- package/dist/lib/github/project-prs.js +18 -5
- package/dist/lib/help.d.ts +1 -0
- package/dist/lib/help.js +8 -0
- package/dist/lib/helper-versions.js +1 -1
- package/dist/lib/hosts/passthrough.js +5 -8
- package/dist/lib/hosts/remote-cmd.d.ts +2 -7
- package/dist/lib/hosts/remote-cmd.js +14 -22
- package/dist/lib/hosts/routing-flag.d.ts +22 -0
- package/dist/lib/hosts/routing-flag.js +127 -14
- package/dist/lib/identity/index.d.ts +22 -0
- package/dist/lib/identity/index.js +3 -0
- package/dist/lib/installations/migrate.d.ts +7 -0
- package/dist/lib/installations/migrate.js +101 -88
- package/dist/lib/installations/versions.js +2 -2
- package/dist/lib/launch-identity.d.ts +6 -1
- package/dist/lib/launch-identity.js +12 -2
- package/dist/lib/menubar/install-menubar.d.ts +1 -0
- package/dist/lib/menubar/install-menubar.js +8 -5
- package/dist/lib/menubar/snapshot.js +2 -3
- package/dist/lib/notify.d.ts +7 -14
- package/dist/lib/notify.js +29 -75
- package/dist/lib/owner-message.d.ts +4 -6
- package/dist/lib/owner-message.js +12 -11
- package/dist/lib/owner-notify-tokens.d.ts +49 -0
- package/dist/lib/owner-notify-tokens.js +214 -0
- package/dist/lib/owner-notify.d.ts +75 -0
- package/dist/lib/owner-notify.js +144 -0
- package/dist/lib/recordings/config.d.ts +11 -0
- package/dist/lib/recordings/config.js +54 -0
- package/dist/lib/recordings/identity.d.ts +12 -0
- package/dist/lib/recordings/identity.js +57 -0
- package/dist/lib/recordings/ledger.d.ts +16 -0
- package/dist/lib/recordings/ledger.js +141 -0
- package/dist/lib/recordings/model.d.ts +29 -0
- package/dist/lib/recordings/model.js +28 -0
- package/dist/lib/recordings/pipeline.d.ts +44 -0
- package/dist/lib/recordings/pipeline.js +272 -0
- package/dist/lib/recordings/process.d.ts +17 -0
- package/dist/lib/recordings/process.js +94 -0
- package/dist/lib/recordings/service.d.ts +15 -0
- package/dist/lib/recordings/service.js +45 -0
- package/dist/lib/recordings/settle.d.ts +21 -0
- package/dist/lib/recordings/settle.js +92 -0
- package/dist/lib/recordings/transcode.d.ts +13 -0
- package/dist/lib/recordings/transcode.js +44 -0
- package/dist/lib/reminders.d.ts +0 -1
- package/dist/lib/reminders.js +1 -1
- package/dist/lib/reserved-stores.d.ts +3 -0
- package/dist/lib/reserved-stores.js +13 -0
- package/dist/lib/routine-notify-owner.d.ts +3 -23
- package/dist/lib/routine-notify-owner.js +26 -107
- package/dist/lib/rush-api.d.ts +1 -0
- package/dist/lib/rush-api.js +1 -0
- package/dist/lib/session/active.d.ts +18 -2
- package/dist/lib/session/active.js +47 -37
- package/dist/lib/session/cloud.js +18 -45
- package/dist/lib/session/db.d.ts +2 -0
- package/dist/lib/session/db.js +13 -4
- package/dist/lib/session/glance-files.d.ts +4 -3
- package/dist/lib/session/glance-files.js +31 -0
- package/dist/lib/session/inject-target.js +12 -2
- package/dist/lib/session/pid-registry.d.ts +2 -0
- package/dist/lib/session/pid-registry.js +6 -2
- package/dist/lib/session/presentation.d.ts +21 -0
- package/dist/lib/session/presentation.js +198 -0
- package/dist/lib/session/projection.js +9 -2
- package/dist/lib/sqlite.d.ts +3 -1
- package/dist/lib/sqlite.js +7 -3
- package/dist/lib/standalone-tools.js +1 -1
- package/dist/lib/startup/command-registry.js +9 -4
- package/dist/lib/state.d.ts +2 -2
- package/dist/lib/state.js +3 -5
- package/dist/lib/terminal/inject.js +1 -1
- package/dist/lib/testdata/owner-notify-api.d.ts +36 -0
- package/dist/lib/testdata/owner-notify-api.js +102 -0
- package/dist/lib/trash.d.ts +14 -0
- package/dist/lib/trash.js +75 -0
- package/dist/lib/types.d.ts +0 -34
- package/package.json +2 -2
- package/dist/commands/feedback.d.ts +0 -2
- package/dist/commands/feedback.js +0 -68
- package/dist/commands/humans.d.ts +0 -2
- package/dist/commands/humans.js +0 -83
- package/dist/commands/modes.d.ts +0 -2
- package/dist/commands/modes.js +0 -134
- package/dist/commands/reminders.d.ts +0 -2
- package/dist/commands/reminders.js +0 -49
- package/dist/lib/channels/owner-forward.d.ts +0 -25
- package/dist/lib/channels/owner-forward.js +0 -78
- package/dist/lib/channels/owner-sink.d.ts +0 -10
- package/dist/lib/channels/owner-sink.js +0 -26
- package/dist/lib/humans.d.ts +0 -12
- package/dist/lib/humans.js +0 -64
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,293 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.22.124
|
|
4
|
+
|
|
5
|
+
- **The one-time `humans.yaml` upload now carries your channels and quiet hours (PHNX-4267).**
|
|
6
|
+
1.22.123 read each channel's `transport` as the channel, but in a real `humans.yaml` that
|
|
7
|
+
field names the delivery provider (`rush`, `openclaw-telegram`) and the `id` names the
|
|
8
|
+
channel, so every channel was dropped: the iMessage handle and the per-severity routing
|
|
9
|
+
never reached your account. It also read `quiet_hours` where the file says `quietHours`.
|
|
10
|
+
The upload now maps channels by `id` and reads `quietHours`. If 1.22.123 already moved
|
|
11
|
+
your file to trash with only the timezone uploaded, put it back at `~/.agents/humans.yaml`
|
|
12
|
+
and the next run uploads the rest. Source: `cli/src/lib/installations/migrate.ts`.
|
|
13
|
+
|
|
14
|
+
- **AGI Menu floor 1.15.9: Home shows the latest artifacts and who made them (PHNX-4269).**
|
|
15
|
+
Installed CLIs now pull AGI Menu 1.15.9. Under Needs you, Home lists what agents on this
|
|
16
|
+
Mac made in the last day, one line per session: the page's title, its kind and age, the
|
|
17
|
+
agent, its status, the session's title and where its terminal is. It reads each live feed
|
|
18
|
+
row's `artifacts`. Source: `cli/src/lib/helper-versions.ts`.
|
|
19
|
+
|
|
20
|
+
- **Session rows report a rendered artifact as its page (PHNX-4269).** `@phnx-labs/sessions-cli`
|
|
21
|
+
0.7.0: when a session writes `plan.md` and `artifacts render` writes `plan.html` beside it,
|
|
22
|
+
the row's `artifacts` list `plan.html` with its `<title>`, last changed when either file was;
|
|
23
|
+
any listed page carries its title. Rule and memory files an agent edits or names
|
|
24
|
+
(`AGENTS.md`, `CLAUDE.md`, `CLAUDE.local.md`, `GEMINI.md`, `MEMORY.md`) are no longer listed.
|
|
25
|
+
The release also stops harness envelopes (`<task-notification>`, `<system-reminder>`) from
|
|
26
|
+
reading as user turns, so a session's title and preview no longer become "Another Claude
|
|
27
|
+
session sent a message", and brings `@phnx-labs/secrets-cli` 0.3.0 in as a sessions-cli
|
|
28
|
+
dependency (session backup). Source: `cli/package.json`.
|
|
29
|
+
|
|
30
|
+
## 1.22.123
|
|
31
|
+
|
|
32
|
+
- **Feed and session watch rows carry a PR's head SHA, title and per-check items,
|
|
33
|
+
and each subagent's model and prompt (PHNX-3939).** On `agents feed watch --json`
|
|
34
|
+
(and `sessions watch --json` for subagents), a live row's `pr` adds `headSha`,
|
|
35
|
+
`title`, and `checkItems` — one `{ name, state, url? }` per check on the head
|
|
36
|
+
commit, `state` being `passed`, `failed`, `running` or `skipped`, a re-run
|
|
37
|
+
check listed once at its latest run, at most 30. They come from the same
|
|
38
|
+
`gh pr view` the row's `checks` verdict already reads; no new GitHub call is
|
|
39
|
+
made. Each `subagents[]` entry adds `model` (the model id its replies report)
|
|
40
|
+
and `prompt` (its first user turn, whitespace-collapsed, at most 400
|
|
41
|
+
characters), read in the existing incremental fold of the child transcript.
|
|
42
|
+
All fields are absent when unknown, so older clients are unaffected.
|
|
43
|
+
Source: `cli/src/lib/feed/pr-status.ts`, `cli/src/lib/session/glance-files.ts`.
|
|
44
|
+
|
|
45
|
+
- **Browser rows on the feed read the engine's native task history (PHNX-4227).**
|
|
46
|
+
`agents feed watch --json`, `agents browser sessions` and the browser picker now
|
|
47
|
+
include tasks recorded in `~/.agents/.history/browser/history.db`, which
|
|
48
|
+
browser-cli 0.1.16+ writes. Values from native history take precedence over
|
|
49
|
+
agents' own `browser_sessions` row, which fills in whatever native history does
|
|
50
|
+
not record.
|
|
51
|
+
- A finished task that captured nothing still has a row.
|
|
52
|
+
- After its tabs close, a task keeps its session link, start time, recorded
|
|
53
|
+
capture counts, and the machine it ran on.
|
|
54
|
+
- Browser rows carry new optional `machine`, `captureDir`, and `capturesRemote`
|
|
55
|
+
fields.
|
|
56
|
+
- Both stores are read-only, and the feed no longer prunes `sessions.db` on
|
|
57
|
+
every refresh.
|
|
58
|
+
- An unreadable history record keeps the existing rows instead of removing them.
|
|
59
|
+
Source: `cli/src/lib/browser/sessions-list.ts`, `cli/src/lib/feed/tool-activity.ts`,
|
|
60
|
+
`cli/src/lib/feed/tools.ts`, `cli/src/lib/sqlite.ts`.
|
|
61
|
+
|
|
62
|
+
- **`agents cloud transcripts` and `agents sessions --cloud` work against the current Rush API (PHNX-4227).**
|
|
63
|
+
Both failed with `cloud-runs list failed (404)` because Rush retired `/api/v1/cloud-runs`.
|
|
64
|
+
They now list your organization's sessions across every project (`GET /o/{org}/sessions`) and
|
|
65
|
+
fetch a transcript as raw NDJSON from `/o/{org}/p/_/sessions/{id}/trajectory`. The organization
|
|
66
|
+
is the one saved in `~/.rush/user.yaml`, else your personal one, as `rush` resolves it. Each run
|
|
67
|
+
is parsed by its captured harness rather than its agent profile name.
|
|
68
|
+
Source: `cli/src/lib/session/cloud.ts`, `cli/src/lib/cloud/rush.ts`.
|
|
69
|
+
|
|
70
|
+
- **`agents cloud transcripts [selector]` reads captured Rush Cloud run transcripts (PHNX-4227).**
|
|
71
|
+
It lists runs, or renders the one matching an id, short id, or id prefix, with
|
|
72
|
+
the same `--json`, `--markdown`, `--no-redact`, `--include`/`--exclude`,
|
|
73
|
+
`--first`/`--last` and `--limit` (default 50) behavior as `agents sessions --cloud`,
|
|
74
|
+
which now runs the same handler and stays registered. A failed login or an
|
|
75
|
+
unmatched or ambiguous selector exits 1 without falling back to local sessions.
|
|
76
|
+
Source: `cli/src/commands/cloud-transcripts.ts`, `cli/src/commands/cloud.ts`.
|
|
77
|
+
|
|
78
|
+
- **`agents daemon index` owns session-index maintenance (PHNX-4227).**
|
|
79
|
+
`agents daemon index roots`, `agents daemon index optimize`, and
|
|
80
|
+
`agents daemon index backfill tools|resources|titles` run the same engines as
|
|
81
|
+
`agents sessions --roots --json`, `sessions optimize`, and `sessions backfill`, in
|
|
82
|
+
the foreground; none of them starts, stops, or restarts the daemon. The backfill
|
|
83
|
+
verbs declare their own filters (`--agent`, `--project`, `--since`, `--until`,
|
|
84
|
+
`--unmanaged`, `--teams`, `--local`, `--fleet`, `--device`, `--json`), so
|
|
85
|
+
`sessions backfill … --help` now lists them too. `daemon index backfill tools
|
|
86
|
+
--device <box>` reaches the backfill coordinator instead of being refused by the
|
|
87
|
+
global `--device` dispatcher, and still drives peers with
|
|
88
|
+
`agents sessions backfill tools --local`, which every released CLI understands.
|
|
89
|
+
A `--since`/`--until` value that is neither a duration nor a date now fails before
|
|
90
|
+
anything is indexed, in both spellings; before, it silently meant "all time".
|
|
91
|
+
The `sessions` spellings are unchanged otherwise.
|
|
92
|
+
Source: `cli/src/commands/daemon-index.ts`, `cli/src/commands/sessions-backfill.ts`,
|
|
93
|
+
`cli/src/commands/sessions-optimize.ts`, `cli/src/lib/hosts/passthrough.ts`.
|
|
94
|
+
|
|
95
|
+
- **`agents feed watch --json` exits cleanly when its reader goes away (PHNX-4227).**
|
|
96
|
+
When the consumer closed the pipe (`| head -n1`, a client that stops reading),
|
|
97
|
+
the Node CLI crashed with an unhandled `EPIPE` stack trace and exit 1, and under
|
|
98
|
+
Bun it kept running and printed a stack trace on every heartbeat. It now ends
|
|
99
|
+
the stream with exit 0 and nothing on stderr, matching `agents sessions watch
|
|
100
|
+
--json`. Any other stdout write failure, such as `ENOSPC`, still exits 1, and a
|
|
101
|
+
hub failure that reconnecting does not recover still fails.
|
|
102
|
+
Source: `cli/src/commands/feed-watch.ts`.
|
|
103
|
+
|
|
104
|
+
- **Browser rows on the feed now act through the standalone `browser` CLI, and the
|
|
105
|
+
AGI Menu floor is 1.14.6 (PHNX-4227).** In `agents feed watch --json`, a live
|
|
106
|
+
browser row's `showCommand` and `closeCommand` now carry `command: "browser"`
|
|
107
|
+
with the same argv minus the `browser` group word (`browser done --task <name>`,
|
|
108
|
+
`browser tab focus <id> --task <name>`). `runOn`, borrowed-tab handling, and the
|
|
109
|
+
rule that computer rows never get a close control are unchanged. `agents menubar`
|
|
110
|
+
now installs AGI Menu 1.14.6 or newer, the first build that runs either command.
|
|
111
|
+
Source: `cli/src/lib/feed/tools.ts`, `cli/src/lib/helper-versions.ts`.
|
|
112
|
+
|
|
113
|
+
- **`agents ps` gains `--bookmarks`, `--routine [name]` and `ps migrations` (PHNX-4227).**
|
|
114
|
+
`ps --bookmarks` and `ps --routine [name]` (also spelled `--routines`) narrow the
|
|
115
|
+
live roster exactly as `sessions --active --bookmarks` / `--routine` do, and compose
|
|
116
|
+
with `--status waiting`, which still exits 1 when a selected session waits.
|
|
117
|
+
`agents ps migrations [--json] [--session <id>]` reads the same migration ledger as
|
|
118
|
+
`agents sessions migrations`; each spelling's empty-ledger hint and `migrate --help`
|
|
119
|
+
name its own group. `agents sessions migrations --json` now prints JSON: before,
|
|
120
|
+
the parent `sessions --json` consumed the flag and the table printed instead.
|
|
121
|
+
Source: `cli/src/commands/ps.ts`, `cli/src/commands/sessions-migrate.ts`.
|
|
122
|
+
|
|
123
|
+
- **`agents insights resources` reports skill and command usage (PHNX-4227).**
|
|
124
|
+
It runs the same report as `agents sessions stats`, which stays registered for
|
|
125
|
+
now: the same flags, the all-time default window, and the same `--json`
|
|
126
|
+
envelope (`schemaVersion: 2`, `kind: "sessions-stats"`). `--agent` works before
|
|
127
|
+
or after `resources`; two different agents exit 1 instead of being merged.
|
|
128
|
+
Source: `cli/src/commands/sessions-stats.ts`, `cli/src/commands/insights.ts`.
|
|
129
|
+
|
|
130
|
+
- **`--device` routing reads option values the way the command parses them (PHNX-4227).**
|
|
131
|
+
A message such as `--text '--device=other'`, `--text -Dx` or `--text --host=other`
|
|
132
|
+
is now delivered as the message instead of being taken as a routing flag, and
|
|
133
|
+
everything after `--` stays positional. A selector placed before the command
|
|
134
|
+
(`agents --device <peer> send …`, `agents -D<peer> send …`) now finds the command
|
|
135
|
+
instead of failing with `unknown command '<peer>'`. Command discovery, the
|
|
136
|
+
routing-selector read and the flag strip before the SSH hop share one scan
|
|
137
|
+
driven by each command's registered Commander options. Repeated selectors keep
|
|
138
|
+
the first value, as before. Separately, the tmux backend now ends `send-keys`
|
|
139
|
+
options with `--`, so text that starts with `-` reaches the pane instead of
|
|
140
|
+
failing with `tmux exited with code 1`; this also applies to `sessions inject`. Source: `cli/src/lib/hosts/routing-flag.ts`,
|
|
141
|
+
`cli/src/lib/hosts/remote-cmd.ts`, `cli/src/bootstrap.ts`, `cli/src/lib/terminal/inject.ts`.
|
|
142
|
+
|
|
143
|
+
- **`agents run <harness> --resume` takes the session picker's filters (PHNX-4227).**
|
|
144
|
+
A bare `--resume` now accepts `--all`, `--teams`, `--since <time>` and
|
|
145
|
+
`-n/--limit <n>` and passes them to the same picker `agents sessions resume`
|
|
146
|
+
uses, so `agents run claude --resume --all --since 7d` matches
|
|
147
|
+
`agents sessions resume --agent claude --all --since 7d`. The defaults are
|
|
148
|
+
unchanged (this project, last 30 days, 200 rows). The four options are refused
|
|
149
|
+
with `--resume <id>` or without `--resume`, and they are removed from the
|
|
150
|
+
command that resumes the chosen session, so they never reach the harness.
|
|
151
|
+
Anything after `--` is still forwarded verbatim. Source:
|
|
152
|
+
`cli/src/commands/exec.ts`, `cli/src/commands/sessions-resume.ts`.
|
|
153
|
+
- **Routing and picker flags inside a short-option cluster are recognized (PHNX-4227).**
|
|
154
|
+
The option-aware scan behind `--device` routing and the resume picker filters now
|
|
155
|
+
walks a short-option cluster the way Commander does, so `-bn5` and `-bn 5` drop
|
|
156
|
+
only the `-n` limit and keep `-b`, and `-bDpeer` routes to `peer`. A cluster that is
|
|
157
|
+
another option's value, or that follows `--`, is left alone. Source:
|
|
158
|
+
`cli/src/lib/hosts/routing-flag.ts`, `cli/src/lib/hosts/remote-cmd.ts`.
|
|
159
|
+
|
|
160
|
+
- **`agents send --channel session` covers every `sessions inject` mode (PHNX-4227).**
|
|
161
|
+
New session-only options: `--pane <id>` (with `--socket <path>`) types into a known
|
|
162
|
+
tmux pane without session lookup and replaces `--to`; `--no-enter` types without
|
|
163
|
+
submitting; `--combined` sends text and Enter as one write. The session channel now
|
|
164
|
+
delivers the text exactly as given, so surrounding spaces and newlines are kept and
|
|
165
|
+
`--text ""` presses Enter alone; other channels still trim. A `--to` prefix that
|
|
166
|
+
matches several live sessions is refused instead of picking one (this also applies
|
|
167
|
+
to `sessions inject`), and the four options are refused on every other channel and
|
|
168
|
+
on `--to owner`. `--json` adds `backend`, `writes` and `confirmed` to the existing
|
|
169
|
+
result fields. Source: `cli/src/commands/send.ts`, `cli/src/lib/channels/send.ts`,
|
|
170
|
+
`cli/src/lib/channels/providers/session.ts`, `cli/src/lib/session/inject-target.ts`.
|
|
171
|
+
|
|
172
|
+
- **A live session's cwd is never an error string, and a Grok row keeps its session id (PHNX-4263).** On Linux, `agents sessions --active` read each process's cwd through `lsof`, which prints `/proc/<pid>/cwd (readlink: Permission denied)` for a process it cannot inspect (a sandboxed or other-user agent), and the CLI published that text as the row's `cwd`. The cwd is now read from `/proc/<pid>/cwd` directly and is unknown when the link cannot be read. A Grok session whose transcript was matched by cwd showed that transcript's topic and state but `sessionId: null`, because the id was read from the file name and Grok's file is `<id>/summary.json`; the id now comes from the index row for that file, for every harness except Claude. Source: `cli/src/lib/session/active.ts`, `cli/src/lib/session/db.ts`.
|
|
173
|
+
|
|
174
|
+
- **A tab that dispatches an agent to another box binds to its session for every harness (PHNX-4263).**
|
|
175
|
+
`agents run --device` now forwards `AGENTS_ORIGIN_DEVICE` (the dispatching machine id)
|
|
176
|
+
beside `AGENTS_ORIGIN_TERMINAL_ID`. The remote run records both in its pid entry as
|
|
177
|
+
`originTerminal`, and the fleet projection adds `{device, terminalId, launchId}` for
|
|
178
|
+
that desktop to the row's `observerTerminals`. Codex and Grok tabs launched with
|
|
179
|
+
`--device auto` no longer stay on "tracking session": before, only Claude got a
|
|
180
|
+
desktop-side observation, because only Claude has a pre-minted session id. A
|
|
181
|
+
`live-terminals.json` agent entry with a `terminalId` and no (or an empty) `sessionId`
|
|
182
|
+
now produces a terminal row instead of being dropped. It is keyed by `terminalId`,
|
|
183
|
+
and no session id is guessed from its cwd. Shell tabs published by the extension
|
|
184
|
+
produce no session row unless an agent runs under them.
|
|
185
|
+
Source: `cli/src/lib/launch-identity.ts`, `cli/src/lib/session/projection.ts`,
|
|
186
|
+
`cli/src/lib/session/active.ts`.
|
|
187
|
+
|
|
188
|
+
- **Owner notifications go through your account (PHNX-4267).** `agents send --to owner`, an
|
|
189
|
+
important or `--blocked` `feed post`, an urgent feed block and a failed routine now post one
|
|
190
|
+
event to rush/api (`POST /me/notifications`), which applies your preferences, quiet hours and
|
|
191
|
+
dedup and delivers by email, Slack DM or iMessage. Edit them in the console Settings page. A
|
|
192
|
+
block is `needs_you` and bypasses quiet hours; a failed routine is `failed`; everything else is
|
|
193
|
+
`message`. Reaching the owner now requires `agents auth login`: a box with no Phoenix session
|
|
194
|
+
(and, on a worker, no device token) reports the send as failed, and `agents doctor` shows the
|
|
195
|
+
critical `owner-not-signed-in` finding (it replaces `owner-sink-unreachable`). `--to owner`
|
|
196
|
+
takes no `--channel`, `--thread` or `--attach`. Source: `cli/src/lib/owner-notify.ts`.
|
|
197
|
+
- **Workers get a scoped device token automatically (PHNX-4267).** The first signed-in personal or
|
|
198
|
+
desktop box mints one `notify`-scoped Phoenix device token per `role=worker` device and pushes
|
|
199
|
+
it into that worker's own `__notify-<worker>__` reserved store on the `auth-sync` tick. It is
|
|
200
|
+
never pushed to a headed device. A worker whose token was rejected or lost gets a replacement;
|
|
201
|
+
a device that leaves the fleet or stops being a worker has its token revoked, and
|
|
202
|
+
`agents auth logout` revokes the tokens that box minted. Source:
|
|
203
|
+
`cli/src/lib/owner-notify-tokens.ts`.
|
|
204
|
+
- **A signed-in Mac sends the iMessages (PHNX-4267).** The new macOS-only `owner-device-delivery`
|
|
205
|
+
daemon service claims queued iMessage deliveries every 15 seconds, sends them through Messages
|
|
206
|
+
and reports each result. Delivery is at-least-once: a sent message whose result report fails is
|
|
207
|
+
sent again after the 5-minute stale-claim window. Source:
|
|
208
|
+
`cli/src/lib/daemon/owner-device-delivery-service.ts`.
|
|
209
|
+
- **`humans.yaml` moves to your account, once (PHNX-4267).** On the first run with a Phoenix
|
|
210
|
+
session, `~/.agents/humans.yaml` is uploaded to your notification preferences (channels, policy,
|
|
211
|
+
quiet hours, timezone, iMessage handle), moved to trash, and its removal committed. Without a
|
|
212
|
+
session the file stays and the upload retries. Transports with no account equivalent (Telegram,
|
|
213
|
+
desktop) are reported and not migrated. `notify.owner` in `agents.yaml` is no longer read.
|
|
214
|
+
Source: `cli/src/lib/installations/migrate.ts`.
|
|
215
|
+
- **`agents trash restore` and `agents trash empty` (PHNX-4267).** `agents restore` moves to
|
|
216
|
+
`agents trash restore <agent>@<version>`. `agents trash empty [--older-than <duration>] [--yes]`
|
|
217
|
+
permanently deletes trashed items, optionally only those trashed before the cutoff; it asks
|
|
218
|
+
first in a terminal and refuses without `--yes` elsewhere. `agents prune cleanup trash`, which
|
|
219
|
+
never deleted anything, is gone. Source: `cli/src/commands/trash.ts`, `cli/src/lib/trash.ts`.
|
|
220
|
+
- **Removed `agents humans`, `agents reminders`, `agents modes` and `agents feedback`
|
|
221
|
+
(PHNX-4267).** The owner's settings live in the console. Reminders still show in the Claude
|
|
222
|
+
statusline from `~/.agents/reminders/reminders.yaml`. The per-harness mode table now prints in
|
|
223
|
+
`agents run --help`. Explicit `--channel` sends and feed `channel:` sinks no longer forward to a
|
|
224
|
+
Mac peer over SSH when this box cannot deliver. Source: `cli/src/lib/startup/command-registry.ts`.
|
|
225
|
+
|
|
226
|
+
### Fixed
|
|
227
|
+
|
|
228
|
+
- `agents browser <verb> --help`, `agents computer <verb> --help` and
|
|
229
|
+
`agents secrets --help` now print the standalone CLI's own help with its real
|
|
230
|
+
options. The global help conventions re-added agents-cli's `-h, --help` to these
|
|
231
|
+
forwarding commands, so they printed a page with no options and agents guessed
|
|
232
|
+
flags (PHNX-4283).
|
|
233
|
+
- The pinned browser engine is now `@phnx-labs/browser-cli` 0.1.16, the release
|
|
234
|
+
that reads the config keys agents-cli writes. Before it, `browser.device` and each
|
|
235
|
+
machine's default browser profile were ignored, so a bare `agents browser start`
|
|
236
|
+
ran on whatever profile the calling box guessed instead of the configured browser.
|
|
237
|
+
|
|
238
|
+
- **Publish finished CleanShot recordings as organization artifacts (PHNX-4287).**
|
|
239
|
+
`agents recordings watch [--dir …]` enables a daemon-owned, restart-safe watcher;
|
|
240
|
+
`list [--json]`, `upload <file>`, and `unwatch` expose its ledger and controls.
|
|
241
|
+
Settled MP4/MOV files are transcoded through ffmpeg without changing the original,
|
|
242
|
+
identity-gated to organization accounts, deduplicated across CleanShot re-exports,
|
|
243
|
+
and published through the standalone artifacts CLI with org-only visibility. Enabling
|
|
244
|
+
the watcher baselines existing files so only newly completed exports auto-publish.
|
|
245
|
+
Source: `cli/src/lib/recordings/`, `cli/src/commands/recordings.ts`.
|
|
246
|
+
|
|
247
|
+
- **AGI Menu gains a Goals tab and two goal preferences (PHNX-4291).** `goals` joins
|
|
248
|
+
the tab ids, and the default tab bar becomes home, goals, projects, sessions, inbox.
|
|
249
|
+
A `menubar.menu.tabOrder` saved before Goals existed still validates and reads back
|
|
250
|
+
with `goals` appended, the same way the menu resolves an order that leaves a tab out.
|
|
251
|
+
`menubar.menu.homeGoals` picks the goal levels Home shows (any of `company`, `week`,
|
|
252
|
+
`myWeek`, `myDay`, no duplicates; default `["company"]`) and rides the snapshot's
|
|
253
|
+
`menuListPreferences`. `menubar.statusbar.goalCountdown` (default `false`) turns on
|
|
254
|
+
the goal countdown beside the menu-bar icon and rides `menuPreferences`. All three
|
|
255
|
+
work with `agents config set/get/list/unset`. Source: `cli/src/lib/device-config.ts`,
|
|
256
|
+
`cli/src/lib/config-keys.ts`, `cli/src/lib/menubar/snapshot.ts`.
|
|
257
|
+
|
|
258
|
+
- **CLI releases now publish from a versioned branch through protected GitHub OIDC.** Push `release/x.y.z` or `release/x.y.z-pre.n`; one GitHub-hosted job behind the `npm-publish` environment derives the exact release-tree attestation from the newest compatible tested proof anywhere in the `main` ancestry, or impact-tests changes since the newest retained proof when packaged inputs or policy drifted. It rejects every diff outside the CLI release-input allowlist from that proof through the release head, rejects every release-branch change outside generated CLI release metadata, builds and install-smokes the bound tarball, creates `v<version>` plus its GitHub release, and publishes the same bytes to npm with provenance only while the remote release branch still names the event commit. Pre-releases use the `next` dist-tag. The former home-base/token publisher and its dead `NPM_TOKEN` auth probe are removed, so there is no stored npm credential or second publisher. Source: `.github/workflows/release.yml`, `cli/scripts/release-ci.sh`, `cli/scripts/release.sh`.
|
|
259
|
+
|
|
260
|
+
### Fixed
|
|
261
|
+
|
|
262
|
+
- Release commits now include the generated HTML command reference alongside the
|
|
263
|
+
JSON and Markdown indexes. CI checks all three on release version bumps, help
|
|
264
|
+
changes, and direct HTML edits. Regenerate with `scripts/generate-reference.sh`,
|
|
265
|
+
use `--check` for a read-only freshness check, or `--out-dir` for a separate preview.
|
|
266
|
+
|
|
267
|
+
### Fixed
|
|
268
|
+
|
|
269
|
+
- AGI Menu updates itself to a new release again. The periodic update checked
|
|
270
|
+
whether the new release was signed before downloading it, so a release not
|
|
271
|
+
yet on disk always failed the check and was skipped as "another install owns
|
|
272
|
+
the helper". It now downloads and verifies the release first, then decides.
|
|
273
|
+
|
|
274
|
+
### Fixed
|
|
275
|
+
|
|
276
|
+
- `agents projects prs --repo … --number …` no longer fails when the shared
|
|
277
|
+
GraphQL budget is spent. The review verdict is GraphQL-only, so it reads
|
|
278
|
+
null and `ciError` says the review status is unavailable; the head and checks
|
|
279
|
+
still come from REST. Any other error still fails the read.
|
|
280
|
+
|
|
281
|
+
### Changed
|
|
282
|
+
|
|
283
|
+
- `agents run` no longer adds a permission flag when you did not choose a mode.
|
|
284
|
+
Without `--mode` or a configured `run.<agent>@*.mode`, the harness's own
|
|
285
|
+
settings decide (for Claude, `permissions.defaultMode` in its settings), the
|
|
286
|
+
same as launching it directly. Set a default for agents-cli runs with
|
|
287
|
+
`agents config set 'run.claude@*.mode' auto`. This also fixes
|
|
288
|
+
`agents run claude#work -- rc`, which Claude refused because
|
|
289
|
+
`--permission-mode plan` came before the `remote-control` verb.
|
|
290
|
+
|
|
3
291
|
## 1.22.122
|
|
4
292
|
|
|
5
293
|
- **`agents monitors` is removed (PHNX-4241).** The command group, the monitor
|
package/README.md
CHANGED
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
|
|
45
45
|
<p align="center"><a href="https://agi-cli.sh/demo.mp4">Watch the full 56-second demo</a></p>
|
|
46
46
|
|
|
47
|
+
<p align="center"><b>Command reference:</b> <a href="cli/docs/command-index.md">every <code>agents</code> command</a> · <a href="cli/docs/command-reference.html">searchable HTML page</a></p>
|
|
48
|
+
|
|
47
49
|
## Quickstart
|
|
48
50
|
|
|
49
51
|
```bash
|
|
@@ -337,7 +339,7 @@ agents sessions --include tools \
|
|
|
337
339
|
# Count pre-indexed static git sites, containing calls, and sessions
|
|
338
340
|
agents sessions --include tools --query 'program:git' --count --fleet --json
|
|
339
341
|
|
|
340
|
-
# Populate historical tool rows once on each device
|
|
342
|
+
# Populate historical tool rows once on each device (same as `agents daemon index backfill tools --fleet`)
|
|
341
343
|
agents sessions backfill tools --fleet
|
|
342
344
|
|
|
343
345
|
# Which skills/commands you actually invoke -- and which installed ones are dead weight
|
|
@@ -367,7 +369,10 @@ agents ps # the live roster (opens the picker on a TTY
|
|
|
367
369
|
agents ps --json --local # this machine only, machine-readable
|
|
368
370
|
agents ps --json -D box-a # one peer, over SSH
|
|
369
371
|
agents ps --status waiting # only agents waiting on you (exit 1 if any)
|
|
372
|
+
agents ps --bookmarks # only bookmarked sessions
|
|
373
|
+
agents ps --routine nightly-review # only one routine's runs (omit the name for all routines)
|
|
370
374
|
agents ps stop|focus|detach|migrate <id> # act on one running agent
|
|
375
|
+
agents ps migrations # where migrated sessions went
|
|
371
376
|
```
|
|
372
377
|
|
|
373
378
|
`agents sessions --active` and its status flags still answer with the same roster; `agents ps` is where the live verbs live from here on ([PHNX-4227](https://linear.app/getrush/issue/PHNX-4227)).
|
|
@@ -418,6 +423,29 @@ Sharing a session uses `agents sessions render <id> -o session.md`, not the raw
|
|
|
418
423
|
|
|
419
424
|
`agents sessions share <id>` goes one step further and publishes that document as a self-contained web page on your own share endpoint, printing the link. It is **unlisted** unless you pass `--public` — 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, and emails are masked on top of the render's own redaction. The slug is `session-<shortId>`, so re-sharing one session updates one URL.
|
|
420
425
|
|
|
426
|
+
### Publish CleanShot recordings
|
|
427
|
+
|
|
428
|
+
The opt-in recordings service turns finished CleanShot exports into organization-only
|
|
429
|
+
artifacts. It watches on the daemon's schedule, waits until the file size has stopped
|
|
430
|
+
changing for 10 seconds, creates a temporary 1080p/30fps H.264 copy, and leaves the
|
|
431
|
+
original untouched. Enabling the watcher establishes a fresh baseline, so existing
|
|
432
|
+
files are not bulk-published; use `upload` to publish an older file explicitly:
|
|
433
|
+
|
|
434
|
+
```bash
|
|
435
|
+
agents recordings watch # use CleanShot's macOS exportPath
|
|
436
|
+
agents recordings watch --dir ~/Movies/Demos # or choose a folder
|
|
437
|
+
agents recordings list # queued, failed, and published rows
|
|
438
|
+
agents recordings upload ./demo.mov # one file through the same pipeline
|
|
439
|
+
agents recordings unwatch
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
Install `ffmpeg` and `@phnx-labs/artifacts-cli`, then sign in to `artifacts` with an
|
|
443
|
+
organization email. Every publish uses `--visibility org --expire never`; public inbox
|
|
444
|
+
identities are refused rather than turning a team recording into a personal artifact.
|
|
445
|
+
CleanShot re-exports such as `… AM 3.mp4` replace the earlier artifact at the same slug.
|
|
446
|
+
The restart-safe ledger is `~/.agents/recordings/ledger.json`. See
|
|
447
|
+
[the recordings guide](cli/docs/recordings.md) for the data flow and failure behavior.
|
|
448
|
+
|
|
421
449
|
### Back up sessions off-box
|
|
422
450
|
|
|
423
451
|
Signed-in Phoenix users can back sessions up without creating a Cloudflare bucket or
|
|
@@ -525,11 +553,12 @@ agents feed answer <key> --choice 0 # first answer wins; route over the recorded
|
|
|
525
553
|
agents feed post --title "Halfway done" "CI green, watching merge" # title + body
|
|
526
554
|
```
|
|
527
555
|
|
|
528
|
-
Important posts
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
556
|
+
Important posts, blocks and `agents send --to owner` reach you through your
|
|
557
|
+
account once you run `agents auth login`: email, Slack and iMessage per the
|
|
558
|
+
preferences in the console Settings page, with quiet hours and dedup applied
|
|
559
|
+
there. Workers get a scoped device token from your signed-in laptop
|
|
560
|
+
automatically, and a signed-in Mac sends the iMessages. Ordinary milestone posts
|
|
561
|
+
remain record-only unless configured.
|
|
533
562
|
|
|
534
563
|
An optional **per-session summarizer** (off by default) adds a daemon-computed
|
|
535
564
|
`goal`, progress `checkpoints`, and a detailed `summaryChecklist` to each session
|
|
@@ -1395,9 +1424,18 @@ agents browser stop --service # browser-scoped alias; next browser
|
|
|
1395
1424
|
agents routines stop # disable/reload only the scheduler service
|
|
1396
1425
|
agents daemon logs -f --level warn --since 1h
|
|
1397
1426
|
agents daemon doctor # one-shot health check; non-zero exit on problems
|
|
1427
|
+
|
|
1428
|
+
agents daemon index roots # transcript directories the indexer scans (JSON)
|
|
1429
|
+
agents daemon index optimize # compact the FTS search index; no rows lost
|
|
1430
|
+
agents daemon index backfill tools --fleet # one-shot historical parse (also: resources, titles)
|
|
1398
1431
|
```
|
|
1399
1432
|
|
|
1400
|
-
|
|
1433
|
+
`agents daemon index` is foreground maintenance of the index the daemon's
|
|
1434
|
+
session-index service keeps current; it never starts or restarts the daemon.
|
|
1435
|
+
Each verb runs the same engine as its `agents sessions` spelling (`--roots`,
|
|
1436
|
+
`optimize`, `backfill`), which keeps working.
|
|
1437
|
+
|
|
1438
|
+
Each hosted responsibility (browser IPC, scheduler, watchdog, recordings, device
|
|
1401
1439
|
probe, self-heal, self-update, account-state refresh, state-dir checks) is an
|
|
1402
1440
|
independent toggle in `~/.agents/daemon/services.yaml`.
|
|
1403
1441
|
Self-update checks npm on its own schedule, installs + verifies a newer
|
|
@@ -1406,9 +1444,10 @@ supervisor relaunches the daemon onto the new code — the daemon used to run
|
|
|
1406
1444
|
with auto-update forced off and only picked up new code on a manual
|
|
1407
1445
|
`agents daemon restart`.
|
|
1408
1446
|
`agents daemon services list` shows every service; `enable|disable <id>` flips
|
|
1409
|
-
one. Missing keys default to enabled
|
|
1447
|
+
one. Missing keys default to enabled except the opt-in `recordings` service. Most services take
|
|
1410
1448
|
effect on the next daemon start; browser IPC is registered even when boot-disabled
|
|
1411
|
-
so browser commands can enable it live
|
|
1449
|
+
so browser commands can enable it live; recordings is also registered while disabled
|
|
1450
|
+
so `agents recordings watch` can enable it live, while the scheduler
|
|
1412
1451
|
re-evaluates on `SIGHUP reload`. Only `agents daemon start|stop|restart` owns the
|
|
1413
1452
|
whole process lifecycle. Browser and routines clients change their own service
|
|
1414
1453
|
state without evicting sibling work.
|
|
@@ -1486,7 +1525,7 @@ Two repos with the same shape, different roles:
|
|
|
1486
1525
|
|
|
1487
1526
|
See [docs/concepts.md](cli/docs/concepts.md) for the full mental model: DotAgents repos, resource kinds, and how resolution works end-to-end.
|
|
1488
1527
|
|
|
1489
|
-
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
|
|
1528
|
+
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, restores (`agents trash restore <agent>@<version>`) and empties (`agents trash empty --older-than 30d`) soft-deleted version directories, and `agents subagents` installs reusable subagent definitions for parent-agent workflows.
|
|
1490
1529
|
|
|
1491
1530
|
---
|
|
1492
1531
|
|
package/dist/bootstrap.js
CHANGED
|
@@ -29,11 +29,12 @@ import { getCliLaunch } from './lib/cli-entry.js';
|
|
|
29
29
|
import { emit, emitFriction, redactArgs } from './lib/feed/events.js';
|
|
30
30
|
import { stampProvenance } from './lib/event-provenance.js';
|
|
31
31
|
import { die } from './lib/format.js';
|
|
32
|
-
import { hasHostRoutingFlag } from './lib/hosts/routing-flag.js';
|
|
32
|
+
import { commandTokenIndex, hasHostRoutingFlag, setArgvCommandTree } from './lib/hosts/routing-flag.js';
|
|
33
33
|
const BRAND = resolveBrandName();
|
|
34
34
|
const program = configureRootCommand(new Command(), BRAND, VERSION);
|
|
35
35
|
registerCommandGroups(program, FRONT_DOOR_COMMAND_GROUPS);
|
|
36
36
|
program.option('--help-all', 'Show help for all commands');
|
|
37
|
+
setArgvCommandTree(program);
|
|
37
38
|
function auditCommandPath(cmd) {
|
|
38
39
|
const parts = [];
|
|
39
40
|
let c = cmd;
|
|
@@ -594,7 +595,7 @@ program.on('command:*', (operands) => {
|
|
|
594
595
|
const { closest, minDist } = closestTopLevelCommand(unknown, KNOWN_TOP_LEVEL_COMMANDS);
|
|
595
596
|
if (minDist === 1 && closest && !RETIRED_TOP_LEVEL_COMMANDS.has(unknown)) {
|
|
596
597
|
const args = process.argv.slice(2);
|
|
597
|
-
args[0] = closest;
|
|
598
|
+
args[commandTokenIndex(args) ?? 0] = closest;
|
|
598
599
|
void (async () => {
|
|
599
600
|
if (LAZY_COMMAND_NAMES.has(closest)) {
|
|
600
601
|
for (const loader of COMMAND_LOADERS[closest] ?? [])
|
|
@@ -633,22 +634,14 @@ if (passedArgs[0] === 'sessions') {
|
|
|
633
634
|
process.argv[nestedVersionIndex + 2] = '--session-version';
|
|
634
635
|
}
|
|
635
636
|
}
|
|
636
|
-
const
|
|
637
|
+
const requestedCommandIndex = commandTokenIndex(passedArgs);
|
|
638
|
+
const requestedCommand = requestedCommandIndex === undefined ? undefined : passedArgs[requestedCommandIndex];
|
|
637
639
|
const verboseStartup = passedArgs.includes('--verbose');
|
|
638
640
|
const helpAllRequested = passedArgs.includes('--help-all');
|
|
639
641
|
const helpOrVersionRequested = passedArgs.some((arg) => arg === '--help' || arg === '-h' || arg === '--version' || arg === '-V');
|
|
640
642
|
const isDocumentationRequest = helpOrVersionRequested || helpAllRequested;
|
|
641
643
|
const brandDisabled = disabledCommandsForActiveBrand();
|
|
642
644
|
const requestedIsDisabled = requestedCommand !== undefined && brandDisabled.has(requestedCommand);
|
|
643
|
-
if (requestedCommand !== undefined &&
|
|
644
|
-
!isDocumentationRequest &&
|
|
645
|
-
!requestedIsDisabled &&
|
|
646
|
-
hasHostRoutingFlag(passedArgs)) {
|
|
647
|
-
const { maybeRunOnHost } = await import('./lib/hosts/passthrough.js');
|
|
648
|
-
if (await maybeRunOnHost(requestedCommand, passedArgs)) {
|
|
649
|
-
process.exit(process.exitCode ?? 0);
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
645
|
const isLazyRequest = requestedCommand !== undefined && LAZY_COMMAND_NAMES.has(requestedCommand);
|
|
653
646
|
const rootHelpRequested = requestedCommand === undefined &&
|
|
654
647
|
(helpAllRequested || passedArgs.includes('--help') || passedArgs.includes('-h') || passedArgs.length === 0);
|
|
@@ -673,17 +666,24 @@ if (isLazyRequest && !requestedIsDisabled) {
|
|
|
673
666
|
for (const loader of COMMAND_LOADERS[requestedCommand])
|
|
674
667
|
await reg(loader);
|
|
675
668
|
}
|
|
676
|
-
|
|
669
|
+
if (requestedCommand !== undefined &&
|
|
670
|
+
!requestedIsUnknown &&
|
|
671
|
+
!isDocumentationRequest &&
|
|
672
|
+
hasHostRoutingFlag(passedArgs)) {
|
|
673
|
+
const { maybeRunOnHost } = await import('./lib/hosts/passthrough.js');
|
|
674
|
+
if (await maybeRunOnHost(requestedCommand, passedArgs)) {
|
|
675
|
+
process.exit(process.exitCode ?? 0);
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
if (requestedIsUnknown && requestedCommand) {
|
|
677
679
|
const candidates = [...KNOWN_TOP_LEVEL_COMMANDS].filter((name) => !brandDisabled.has(name));
|
|
678
680
|
const { closest, minDist } = closestTopLevelCommand(requestedCommand, candidates);
|
|
679
681
|
if (minDist === 1 &&
|
|
680
682
|
closest &&
|
|
681
683
|
!requestedIsDisabled &&
|
|
682
684
|
!RETIRED_TOP_LEVEL_COMMANDS.has(requestedCommand)) {
|
|
683
|
-
passedArgs[
|
|
684
|
-
|
|
685
|
-
if (argvCmdIndex >= 0)
|
|
686
|
-
process.argv[argvCmdIndex] = closest;
|
|
685
|
+
passedArgs[requestedCommandIndex] = closest;
|
|
686
|
+
process.argv[requestedCommandIndex + 2] = closest;
|
|
687
687
|
if (LAZY_COMMAND_NAMES.has(closest)) {
|
|
688
688
|
for (const loader of COMMAND_LOADERS[closest] ?? [])
|
|
689
689
|
await reg(loader);
|
|
@@ -780,6 +780,11 @@ if (process.env.AGENTS_SKIP_MIGRATION !== '1' && !isDocumentationRequest && !isR
|
|
|
780
780
|
}
|
|
781
781
|
catch { }
|
|
782
782
|
}
|
|
783
|
+
else if (fs.existsSync(path.join(getUserAgentsDir(), 'humans.yaml')) &&
|
|
784
|
+
(await import('./lib/identity/client.js')).readSession()) {
|
|
785
|
+
const { migrateHumansToAccount } = await import('./lib/installations/migrate.js');
|
|
786
|
+
await migrateHumansToAccount();
|
|
787
|
+
}
|
|
783
788
|
}
|
|
784
789
|
catch { }
|
|
785
790
|
}
|
|
@@ -9,7 +9,6 @@ export declare const loadPrune: ModuleLoader;
|
|
|
9
9
|
export declare const loadDoctor: ModuleLoader;
|
|
10
10
|
export declare const loadSessions: ModuleLoader;
|
|
11
11
|
export declare const loadTeams: ModuleLoader;
|
|
12
|
-
export declare const loadReminders: ModuleLoader;
|
|
13
12
|
export declare const LAZY_COMMAND_NAMES: ReadonlySet<string>;
|
|
14
13
|
export declare const COMMAND_LOADERS: Record<string, ModuleLoader[]>;
|
|
15
14
|
export declare function buildFullCommandTree(): Promise<Command>;
|
|
@@ -5,7 +5,6 @@ import { configureRootCommand } from '../lib/startup/root-command.js';
|
|
|
5
5
|
export { KNOWN_TOP_LEVEL_COMMANDS, RETIRED_TOP_LEVEL_COMMANDS } from '../lib/startup/command-registry.js';
|
|
6
6
|
const loadView = async () => (await import('../commands/view.js')).registerViewCommand;
|
|
7
7
|
const loadInspect = async () => (await import('../commands/inspect.js')).registerInspectCommand;
|
|
8
|
-
const loadFeedback = async () => (await import('../commands/feedback.js')).registerFeedbackCommand;
|
|
9
8
|
const loadCommands = async () => (await import('../commands/commands.js')).registerCommandsCommands;
|
|
10
9
|
const loadHooks = async () => (await import('../commands/hooks.js')).registerHooksCommands;
|
|
11
10
|
const loadSkills = async () => (await import('../commands/skills.js')).registerSkillsCommands;
|
|
@@ -28,10 +27,8 @@ const loadOpen = async () => (await import('../commands/open.js')).registerOpenC
|
|
|
28
27
|
const loadFork = async () => (await import('../commands/fork.js')).registerForkCommand;
|
|
29
28
|
const loadConfig = async () => (await import('../commands/config.js')).registerConfigCommand;
|
|
30
29
|
const loadModels = async () => (await import('../commands/models.js')).registerModelsCommand;
|
|
31
|
-
const loadModes = async () => (await import('../commands/modes.js')).registerModesCommand;
|
|
32
30
|
export const loadPrune = async () => (await import('../commands/prune.js')).registerPruneCommand;
|
|
33
31
|
const loadTrash = async () => (await import('../commands/trash.js')).registerTrashCommands;
|
|
34
|
-
const loadRestore = async () => (await import('../commands/trash.js')).registerRestoreCommand;
|
|
35
32
|
export const loadDoctor = async () => (await import('../commands/doctor.js')).registerDoctorCommand;
|
|
36
33
|
const loadRoute = async () => (await import('../commands/route.js')).registerRouteCommands;
|
|
37
34
|
const loadHarness = async () => (await import('../commands/harness.js')).registerHarnessCommands;
|
|
@@ -62,12 +59,11 @@ const loadSend = async () => (await import('../commands/send.js')).registerSendC
|
|
|
62
59
|
const loadFeed = async () => (await import('../commands/feed.js')).registerFeedCommand;
|
|
63
60
|
const loadMailboxes = async () => (await import('../commands/mailboxes.js')).registerMailboxesCommand;
|
|
64
61
|
const loadWebhooks = async () => (await import('../commands/webhook.js')).registerWebhooksCommand;
|
|
65
|
-
const loadHumans = async () => (await import('../commands/humans.js')).registerHumansCommands;
|
|
66
62
|
const loadAccounts = async () => (await import('../commands/accounts.js')).registerAccountsCommand;
|
|
67
63
|
const loadDaemon = async () => (await import('../commands/daemon.js')).registerDaemonCommand;
|
|
68
64
|
const loadAuth = async () => (await import('../commands/auth.js')).registerAuthCommand;
|
|
69
65
|
const loadTraces = async () => (await import('../commands/traces.js')).registerTracesCommands;
|
|
70
|
-
|
|
66
|
+
const loadRecordings = async () => (await import('../commands/recordings.js')).registerRecordingsCommand;
|
|
71
67
|
export const LAZY_COMMAND_NAMES = new Set([
|
|
72
68
|
'sessions',
|
|
73
69
|
'teams',
|
|
@@ -78,8 +74,6 @@ export const COMMAND_LOADERS = {
|
|
|
78
74
|
accounts: [loadAccounts],
|
|
79
75
|
view: [loadView],
|
|
80
76
|
inspect: [loadInspect],
|
|
81
|
-
feedback: [loadFeedback],
|
|
82
|
-
reminders: [loadReminders],
|
|
83
77
|
commands: [loadCommands],
|
|
84
78
|
hooks: [loadHooks],
|
|
85
79
|
skills: [loadSkills],
|
|
@@ -111,9 +105,7 @@ export const COMMAND_LOADERS = {
|
|
|
111
105
|
fork: [loadFork],
|
|
112
106
|
config: [loadConfig],
|
|
113
107
|
models: [loadModels],
|
|
114
|
-
modes: [loadModes],
|
|
115
108
|
trash: [loadTrash],
|
|
116
|
-
restore: [loadRestore],
|
|
117
109
|
doctor: [loadDoctor],
|
|
118
110
|
route: [loadRoute],
|
|
119
111
|
routes: [loadRoute],
|
|
@@ -150,10 +142,10 @@ export const COMMAND_LOADERS = {
|
|
|
150
142
|
mailboxes: [loadMailboxes],
|
|
151
143
|
mailbox: [loadMailboxes],
|
|
152
144
|
webhooks: [loadWebhooks],
|
|
153
|
-
humans: [loadHumans],
|
|
154
145
|
daemon: [loadDaemon],
|
|
155
146
|
auth: [loadAuth],
|
|
156
147
|
traces: [loadTraces],
|
|
148
|
+
recordings: [loadRecordings],
|
|
157
149
|
};
|
|
158
150
|
export async function buildFullCommandTree() {
|
|
159
151
|
const packageJson = JSON.parse(readFileSync(fileURLToPath(new URL('../../package.json', import.meta.url)), 'utf8'));
|
package/dist/commands/auth.js
CHANGED
|
@@ -98,10 +98,10 @@ export function registerAuthCommand(program) {
|
|
|
98
98
|
agents auth whoami # who this machine is signed in as
|
|
99
99
|
agents auth space create "Design Team" # start a space
|
|
100
100
|
agents auth space invite ada@example.com # add a teammate
|
|
101
|
-
agents auth logout #
|
|
101
|
+
agents auth logout # sign this machine out; revokes the worker tokens it minted`,
|
|
102
102
|
notes: `Signing in is optional — every local feature works with no account; team spaces are what it unlocks.
|
|
103
103
|
Sign-in is Google-only and opens a Phoenix-branded page; the CLI never sees a password.
|
|
104
|
-
The session lives in this machine's agents state dir, so logging out here signs out
|
|
104
|
+
The session lives in this machine's agents state dir, so logging out here signs out no other device. It does revoke the owner-notify device tokens this machine minted for workers; the next signed-in personal device mints replacements.
|
|
105
105
|
Point at a different backend with PHOENIX_ID_BASE (defaults to the production service).
|
|
106
106
|
Harness worker credentials are minted by \`agents accounts add <harness> [name]\` / \`agents accounts login <harness>#<name>\`, not by this command.`,
|
|
107
107
|
});
|
|
@@ -119,9 +119,18 @@ Harness worker credentials are minted by \`agents accounts add <harness> [name]\
|
|
|
119
119
|
});
|
|
120
120
|
auth
|
|
121
121
|
.command('logout')
|
|
122
|
-
.description("Clear this machine's session
|
|
123
|
-
.action(() => runOrDie(() => {
|
|
122
|
+
.description("Clear this machine's session and revoke the worker owner-notify tokens it minted")
|
|
123
|
+
.action(() => runOrDie(async () => {
|
|
124
124
|
const session = readSession();
|
|
125
|
+
if (session) {
|
|
126
|
+
const { revokeMintedOwnerNotifyTokens } = await import('../lib/owner-notify-tokens.js');
|
|
127
|
+
const tokens = await revokeMintedOwnerNotifyTokens();
|
|
128
|
+
if (tokens.revoked.length > 0)
|
|
129
|
+
console.log(chalk.gray(`Revoked the owner-notify device tokens this machine minted for ${tokens.revoked.join(', ')}.`));
|
|
130
|
+
for (const err of tokens.errors) {
|
|
131
|
+
console.error(chalk.yellow(`Could not revoke the owner-notify token for ${err.device}: ${err.message}. Revoke it in the account's API tokens.`));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
125
134
|
clearSession();
|
|
126
135
|
console.log(session ? chalk.green(`Signed out ${session.email ?? 'this machine'}.`) : chalk.gray('Already signed out.'));
|
|
127
136
|
}));
|
package/dist/commands/browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registerCommandGroups, setHelpSections } from '../lib/help.js';
|
|
1
|
+
import { forwardsHelp, registerCommandGroups, setHelpSections } from '../lib/help.js';
|
|
2
2
|
import { buildBrowserContext } from '../lib/browser/context.js';
|
|
3
3
|
import { recordBrowserAction } from '../lib/browser/record.js';
|
|
4
4
|
import { isBrowserClientError, resolveBrowserBin, runBrowser, } from '../lib/browser-client.js';
|
|
@@ -86,17 +86,16 @@ async function forwardAndExit(opts) {
|
|
|
86
86
|
}
|
|
87
87
|
function registerPassthroughVerbs(program) {
|
|
88
88
|
for (const verb of BROWSER_PASSTHROUGH_VERBS) {
|
|
89
|
-
program
|
|
89
|
+
forwardsHelp(program
|
|
90
90
|
.command(verb.name)
|
|
91
91
|
.description(verb.description)
|
|
92
92
|
.allowUnknownOption(true)
|
|
93
93
|
.allowExcessArguments(true)
|
|
94
|
-
.helpOption(false)
|
|
95
94
|
.action(async (_opts, cmd) => {
|
|
96
95
|
const argv = [verb.name, ...cmd.args];
|
|
97
96
|
const device = verb.name === 'start' ? peekDevice(cmd.args) : undefined;
|
|
98
97
|
await forwardAndExit({ argv, device });
|
|
99
|
-
});
|
|
98
|
+
}));
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
101
|
function registerSessionsCommand(program) {
|