@phnx-labs/agents-cli 1.23.13 → 1.23.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +30 -59
  3. package/dist/cli/command-registry.js +0 -24
  4. package/dist/commands/accounts.js +3 -3
  5. package/dist/commands/daemon.js +5 -147
  6. package/dist/commands/doctor.js +7 -0
  7. package/dist/commands/events-logs.d.ts +2 -0
  8. package/dist/commands/{logs.js → events-logs.js} +28 -127
  9. package/dist/commands/events.js +3 -1
  10. package/dist/commands/exec.d.ts +0 -1
  11. package/dist/commands/exec.js +3 -11
  12. package/dist/commands/feed.d.ts +1 -1
  13. package/dist/commands/feed.js +4 -7
  14. package/dist/commands/mcp.js +1 -1
  15. package/dist/commands/menubar.js +12 -226
  16. package/dist/commands/projects.js +1 -2
  17. package/dist/commands/{trash.d.ts → prune-trash.d.ts} +1 -1
  18. package/dist/commands/{trash.js → prune-trash.js} +8 -8
  19. package/dist/commands/prune.js +3 -1
  20. package/dist/commands/send.js +2 -5
  21. package/dist/commands/sessions.js +1 -1
  22. package/dist/commands/ssh.js +2 -2
  23. package/dist/commands/utils.d.ts +1 -5
  24. package/dist/commands/utils.js +1 -7
  25. package/dist/lib/agent-spec/agents.d.ts +0 -2
  26. package/dist/lib/agent-spec/agents.js +0 -12
  27. package/dist/lib/agent-spec/index.d.ts +0 -4
  28. package/dist/lib/agent-spec/index.js +0 -4
  29. package/dist/lib/commands.d.ts +1 -5
  30. package/dist/lib/commands.js +2 -69
  31. package/dist/lib/comms-render.d.ts +0 -7
  32. package/dist/lib/comms-render.js +0 -41
  33. package/dist/lib/config-keys.d.ts +1 -1
  34. package/dist/lib/config-keys.js +8 -0
  35. package/dist/lib/daemon/daemon.js +1 -6
  36. package/dist/lib/daemon-services.d.ts +1 -1
  37. package/dist/lib/daemon-services.js +0 -5
  38. package/dist/lib/device-config.d.ts +2 -0
  39. package/dist/lib/device-config.js +81 -8
  40. package/dist/lib/devices/doctor-findings.d.ts +6 -1
  41. package/dist/lib/devices/doctor-findings.js +34 -1
  42. package/dist/lib/git.d.ts +1 -0
  43. package/dist/lib/git.js +5 -0
  44. package/dist/lib/hooks/install.d.ts +0 -7
  45. package/dist/lib/hooks/install.js +0 -55
  46. package/dist/lib/hosts/passthrough.js +2 -4
  47. package/dist/lib/hosts/progress.js +2 -2
  48. package/dist/lib/hosts/remote-cmd.js +0 -1
  49. package/dist/lib/installations/migrate.d.ts +1 -0
  50. package/dist/lib/installations/migrate.js +18 -1
  51. package/dist/lib/installations/versions.js +2 -2
  52. package/dist/lib/loop.js +1 -1
  53. package/dist/lib/mailbox-target.d.ts +0 -31
  54. package/dist/lib/mailbox-target.js +0 -37
  55. package/dist/lib/mcp-lookup.d.ts +7 -0
  56. package/dist/lib/mcp-lookup.js +71 -0
  57. package/dist/lib/mcp.d.ts +0 -8
  58. package/dist/lib/mcp.js +0 -47
  59. package/dist/lib/menubar/install-menubar.d.ts +0 -15
  60. package/dist/lib/menubar/install-menubar.js +24 -118
  61. package/dist/lib/menubar/resolve-version.d.ts +9 -10
  62. package/dist/lib/menubar/resolve-version.js +70 -30
  63. package/dist/lib/paths.d.ts +0 -1
  64. package/dist/lib/paths.js +0 -18
  65. package/dist/lib/plugins/skills.d.ts +0 -10
  66. package/dist/lib/plugins/skills.js +2 -165
  67. package/dist/lib/project-pull.js +1 -2
  68. package/dist/lib/resources.d.ts +1 -1
  69. package/dist/lib/routines-project.js +1 -1
  70. package/dist/lib/session/local-tmux-attach.js +2 -2
  71. package/dist/lib/startup/command-registry.js +20 -7
  72. package/dist/lib/teams/agents.js +1 -1
  73. package/dist/lib/triggers/webhook.d.ts +2 -59
  74. package/dist/lib/triggers/webhook.js +2 -422
  75. package/package.json +2 -1
  76. package/dist/commands/funnel.d.ts +0 -2
  77. package/dist/commands/funnel.js +0 -77
  78. package/dist/commands/logs.d.ts +0 -2
  79. package/dist/commands/mailboxes.d.ts +0 -2
  80. package/dist/commands/mailboxes.js +0 -400
  81. package/dist/commands/message.d.ts +0 -2
  82. package/dist/commands/message.js +0 -259
  83. package/dist/commands/packages-materialize.d.ts +0 -6
  84. package/dist/commands/packages-materialize.js +0 -90
  85. package/dist/commands/packages.d.ts +0 -5
  86. package/dist/commands/packages.js +0 -763
  87. package/dist/commands/route.d.ts +0 -2
  88. package/dist/commands/route.js +0 -259
  89. package/dist/commands/testdata/feed-hub.d.ts +0 -1
  90. package/dist/commands/testdata/feed-hub.js +0 -11
  91. package/dist/commands/tmux.d.ts +0 -7
  92. package/dist/commands/tmux.js +0 -529
  93. package/dist/commands/traces.d.ts +0 -2
  94. package/dist/commands/traces.js +0 -204
  95. package/dist/commands/webhook.d.ts +0 -5
  96. package/dist/commands/webhook.js +0 -105
  97. package/dist/lib/agent-spec/materialize.d.ts +0 -3
  98. package/dist/lib/agent-spec/materialize.js +0 -277
  99. package/dist/lib/agent-spec/package-resolve.d.ts +0 -4
  100. package/dist/lib/agent-spec/package-resolve.js +0 -231
  101. package/dist/lib/agent-spec/package-schema.d.ts +0 -3
  102. package/dist/lib/agent-spec/package-schema.js +0 -136
  103. package/dist/lib/agent-spec/package-types.d.ts +0 -94
  104. package/dist/lib/agent-spec/package-types.js +0 -10
  105. package/dist/lib/daemon/testdata/process-view-daemon.d.ts +0 -1
  106. package/dist/lib/daemon/testdata/process-view-daemon.js +0 -12
  107. package/dist/lib/daemon/testdata/process-view-start.d.ts +0 -1
  108. package/dist/lib/daemon/testdata/process-view-start.js +0 -41
  109. package/dist/lib/daemon/webhook-receiver-service.d.ts +0 -8
  110. package/dist/lib/daemon/webhook-receiver-service.js +0 -16
  111. package/dist/lib/daemon-webhooks.d.ts +0 -48
  112. package/dist/lib/daemon-webhooks.js +0 -177
  113. package/dist/lib/funnel.d.ts +0 -6
  114. package/dist/lib/funnel.js +0 -31
  115. package/dist/lib/net-close.d.ts +0 -2
  116. package/dist/lib/net-close.js +0 -20
  117. package/dist/lib/packages/output-home.d.ts +0 -9
  118. package/dist/lib/packages/output-home.js +0 -89
  119. package/dist/lib/registry.d.ts +0 -65
  120. package/dist/lib/registry.js +0 -432
  121. package/dist/lib/routers.d.ts +0 -25
  122. package/dist/lib/routers.js +0 -122
  123. package/dist/lib/run-trace-sync.d.ts +0 -7
  124. package/dist/lib/run-trace-sync.js +0 -35
  125. package/dist/lib/session/testdata/pid-registry-namespace.d.ts +0 -1
  126. package/dist/lib/session/testdata/pid-registry-namespace.js +0 -25
  127. package/dist/lib/session/testdata/process-view-namespace.d.ts +0 -1
  128. package/dist/lib/session/testdata/process-view-namespace.js +0 -56
  129. package/dist/lib/session/testdata/process-view-private.d.ts +0 -1
  130. package/dist/lib/session/testdata/process-view-private.js +0 -11
  131. package/dist/lib/testdata/daemon-health-writer.d.ts +0 -1
  132. package/dist/lib/testdata/daemon-health-writer.js +0 -8
  133. package/dist/lib/testdata/owner-notify-api.d.ts +0 -23
  134. package/dist/lib/testdata/owner-notify-api.js +0 -82
  135. package/dist/lib/testdata/refresh-coordinator-worker.d.ts +0 -1
  136. package/dist/lib/testdata/refresh-coordinator-worker.js +0 -23
  137. package/dist/lib/traces/backend.d.ts +0 -8
  138. package/dist/lib/traces/backend.js +0 -33
  139. package/dist/lib/traces/classify.d.ts +0 -40
  140. package/dist/lib/traces/classify.js +0 -70
  141. package/dist/lib/traces/config.d.ts +0 -2
  142. package/dist/lib/traces/config.js +0 -2
  143. package/dist/lib/traces/insights.d.ts +0 -30
  144. package/dist/lib/traces/insights.js +0 -198
  145. package/dist/lib/traces/phenotype.d.ts +0 -18
  146. package/dist/lib/traces/phenotype.js +0 -335
  147. package/dist/lib/traces/provision.d.ts +0 -16
  148. package/dist/lib/traces/provision.js +0 -25
  149. package/dist/lib/traces/schema2-build.d.ts +0 -28
  150. package/dist/lib/traces/schema2-build.js +0 -496
  151. package/dist/lib/traces/schema2-danger.d.ts +0 -7
  152. package/dist/lib/traces/schema2-danger.js +0 -123
  153. package/dist/lib/traces/schema2.d.ts +0 -139
  154. package/dist/lib/traces/schema2.js +0 -20
  155. package/dist/lib/traces/segments.d.ts +0 -73
  156. package/dist/lib/traces/segments.js +0 -236
  157. package/dist/lib/traces/sync.d.ts +0 -197
  158. package/dist/lib/traces/sync.js +0 -654
  159. package/dist/lib/traces/worker-template.d.ts +0 -1
  160. package/dist/lib/traces/worker-template.js +0 -292
  161. package/dist/lib/triggers/handlers.d.ts +0 -66
  162. package/dist/lib/triggers/handlers.js +0 -383
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.23.14
4
+
5
+ - **Removed dead and duplicate commands (PHNX-4227, owner decision 2026-10-11).**
6
+ The command index drops from 486 to 425 entries. Removed outright, with no
7
+ aliases: `agents route`/`routes` (and the `routers` resource kind), `registry`,
8
+ `packages` (incl. `packages materialize`), `search`, `install`, `tmux`,
9
+ `message`, `mailboxes`/`mailbox`, `traces` (and the trace auto-sync after runs,
10
+ important feed posts and owner sends, with `--no-trace-sync` and
11
+ `AGENTS_NO_TRACE_SYNC`), `webhooks serve`, `daemon webhooks`, and
12
+ `daemon funnel` (with the `webhook-receiver` daemon service and
13
+ `~/.agents/webhooks/*.yml` handlers). Replacements: `plugins add`, `skills add`
14
+ and `mcp add` install resources; `send --channel mailbox|session` reaches a
15
+ running agent and `cloud message` a cloud task; `routines webhook` fires
16
+ trigger routines from a payload.
17
+ - **`agents logs` is now `agents events logs`, and `agents trash` is now
18
+ `agents prune trash list|restore|empty`.** The audit, stats and rotate verbs
19
+ were already under `events`. Output from a run dispatched with `--device` is
20
+ read with `agents events logs <id>` (or `--device <name>` to pick one, `-f` to
21
+ follow); `agents devices ps` lists those runs. Help, skills and docs that still
22
+ pointed at the long-gone `agents hosts ps|logs|stop` now name these commands.
23
+ - **AGI Menu has no setup commands any more.** `agents menubar` is hidden and
24
+ keeps only the `snapshot`, `update`, `restart` and `disable` verbs AGI Menu
25
+ calls; `setup`, `enable`, `status` and `doctor` are gone. Any `agents` command
26
+ on a Mac installs or heals the login item, `agents doctor` reports duplicate,
27
+ stale, replaced or ad-hoc-signed helpers as `menubar` warnings with the fix,
28
+ and the new device-scoped `menubar.enabled` key (default true) replaces the
29
+ `menubar.disabled` sentinel. An existing sentinel migrates to
30
+ `menubar.enabled=false` on upgrade. Source: `cli/src/commands/menubar.ts`,
31
+ `cli/src/lib/menubar/install-menubar.ts`.
32
+
33
+ - **AGI Menu's Home order, session filter and due-date sort persist (PHNX-4326).** `menubar.menu.ticketSort` now takes `due` (the new default: overdue first, then the soonest due, undated by priority), `newest` and `oldest`, and `menubar.menu.ticketGroup` takes `due`. Three keys the menu kept only until quit are now synced: `homeSections` (Home's sections in order, `-` hiding one), `sessionFilter` (the filter Home's Open sessions and the Sessions tab share) and `artifactApps` (`<kind>=<bundle id>`). Each is validated at write time. Source: `cli/src/lib/device-config.ts`.
34
+
35
+ - **`agents menubar update` no longer fails with "release list: HTTP 403" (PHNX-4326).** The newest AGI Menu build was found through `api.github.com`, whose unauthenticated limit is 60 requests an hour per IP. Once a shared IP used that up, update checks reported HTTP 403 even with a newer build published. The CLI now uses only plain github.com, which the asset download already used. One git `ls-refs` request lists the `menubar/v*` tags, then a HEAD of the newest tag's `MenubarHelper.app.zip` and `.sha256` confirms both are published, so a draft or a half-uploaded tag is never picked. The 12-hour cache and the floor behave as before. Source: `cli/src/lib/menubar/resolve-version.ts`.
36
+
37
+ - **The npm package no longer ships test fixtures.** `dist/**/testdata/**` (12 files, including the
38
+ owner-notify fake API server) is excluded from the published tarball; nothing outside tests loads
39
+ them. Source: `cli/package.json`.
40
+
3
41
  ## 1.23.13
4
42
 
5
43
  - **`agents setup` without a terminal exits 0 when setup worked (PHNX-4227).** Outside a TTY it printed the onboarding checklist and exited 1 if any capability was unconfigured: browser, fleet, watchdog, preferences and so on. Every headless install, such as a Rush pod image build, has those unset by design, so the build had to tolerate a failing `agents setup`. It now exits 1 only when core setup (the system repo) is missing. `agents setup status` still exits 1 for any missing capability. Source: `cli/src/commands/setup.ts`.
package/README.md CHANGED
@@ -56,7 +56,7 @@ agents setup tools # install/upgrade the standalone sessions
56
56
  agents run claude "explain this repo" # run any agent on your existing subscription
57
57
  ```
58
58
 
59
- Everything here — and every other command in this README — is free and needs no account; the optional `agents auth login` unlocks the hosted surfaces — [team spaces](#sign-in) and managed trace sync (`agents traces sync` with no Cloudflare setup). `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, term, fleet, 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.
59
+ Everything here — and every other command in this README — is free and needs no account; the optional `agents auth login` unlocks the hosted surfaces — [team spaces](#sign-in) and owner notifications. `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, term, fleet, 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.
60
60
 
61
61
  The command surface teaches setup through `agents setup` and group-level `--help`.
62
62
  The durable system model starts at [`cli/docs/README.md`](cli/docs/README.md).
@@ -136,8 +136,8 @@ agents skills add ~/skills/payments-review --agents claude
136
136
  agents routines add nightly-payments-audit \
137
137
  --schedule "0 2 * * *" --agent claude --prompt "Audit payments/* for regressions"
138
138
 
139
- # Steer the fleet this loop runs on from the menu bar
140
- agents menubar setup
139
+ # Check the fleet this loop runs on, AGI Menu included
140
+ agents doctor
141
141
  ```
142
142
 
143
143
  `agents insights perf` reads a disposable warehouse at `~/.agents/.cache/perf/perf.db` -- hook, command, and run timing rollups, deletable any time. `agents insights` (alias `agents sessions insights`) is deterministic and offline: it caches per-session facets, compares harnesses, and ranks actions by evidence count -- no model call unless you pass `--narrative`. Routines put any of this on a cron ([Routines](#routines)); the menu bar is the always-on control surface for the fleet these commands drive ([Menu bar](#menu-bar)).
@@ -148,7 +148,7 @@ agents menubar setup
148
148
 
149
149
  ```bash
150
150
  # Set up the Notion MCP server once.
151
- agents install mcp:com.notion/mcp
151
+ agents mcp add notion uvx notion-mcp --agents claude,codex,antigravity,cursor
152
152
 
153
153
  # It's now registered with Claude Code, Codex, Antigravity, and Cursor.
154
154
  agents mcp list
@@ -156,8 +156,6 @@ agents mcp list
156
156
 
157
157
  Skills, slash commands, rules, hooks, and permissions work the same way -- install once in `~/.agents/`, synced to every agent's native format automatically.
158
158
 
159
- A schema-v3 `agent.yaml` package materializes into an ephemeral Claude, Codex, or OpenCode home for Factory / Prix Cloud workers (`agents packages materialize ./reviewer --harness codex --harness-version 0.42.0 --output-home "$OUTPUT_HOME" --json`) -- it never writes the live user home.
160
-
161
159
  ```bash
162
160
  agents skills add gh:yourteam/python-expert # Knowledge pack -> all agents
163
161
  agents commands add gh:yourteam/commands # Slash commands -> all agents
@@ -494,7 +492,7 @@ agents sessions resume 019fd0c8-b3e9-77a2-a1a4-444698c4d897 # original harness/
494
492
  agents run auto --resume 019fd0c8-b3e9-77a2-a1a4-444698c4d897 # adapt if its account is unavailable
495
493
  ```
496
494
 
497
- `agents sessions resume` reopens several sessions in whatever terminal you're in -- auto-detected across iTerm, Ghostty, tmux, and the VSCodium agent-terminal, or forced with `--iterm` / `--ghostty` / `--tmux` / `--vscodium`. `agents sessions resume <id>` resumes one session without requiring you to name its harness: exact IDs take a local SQLite fast path, then resolve fleet-wide and recover on the source device. If the origin version is installed, signed in, healthy, and still owns the indexed transcript, its isolated home performs native resume. Claude launches that native resume from the original project directory recorded before the first turn, so its `projects/<cwd-key>` lookup reaches the conversation even when the session later changed directories. When that origin login is usage-limited but the home still owns the transcript, resume stays native and rotates to a healthy injectable provider account of the **same harness**. `/continue <id>` is the last-resort fallback — a signed-out, revoked, trashed, backup-only, or same-number-reinstalled origin, or a limited origin whose transcript is no longer in that home — and still authenticates as a healthy same-harness account (injecting a provider credential when that is the pick, so it never launches the exhausted native login). It never native-resumes from a different isolated home. Back them with **tmux** and the runs turn durable: detach, close your editor, reboot the GUI -- the session is still alive to `agents tmux attach`. The whole `agents tmux` subsystem (persistent multiplexer sessions that survive editor restarts and can be shared with other tools) sits underneath.
495
+ `agents sessions resume` reopens several sessions in whatever terminal you're in -- auto-detected across iTerm, Ghostty, tmux, and the VSCodium agent-terminal, or forced with `--iterm` / `--ghostty` / `--tmux` / `--vscodium`. `agents sessions resume <id>` resumes one session without requiring you to name its harness: exact IDs take a local SQLite fast path, then resolve fleet-wide and recover on the source device. If the origin version is installed, signed in, healthy, and still owns the indexed transcript, its isolated home performs native resume. Claude launches that native resume from the original project directory recorded before the first turn, so its `projects/<cwd-key>` lookup reaches the conversation even when the session later changed directories. When that origin login is usage-limited but the home still owns the transcript, resume stays native and rotates to a healthy injectable provider account of the **same harness**. `/continue <id>` is the last-resort fallback — a signed-out, revoked, trashed, backup-only, or same-number-reinstalled origin, or a limited origin whose transcript is no longer in that home — and still authenticates as a healthy same-harness account (injecting a provider credential when that is the pick, so it never launches the exhausted native login). It never native-resumes from a different isolated home. Back them with **tmux** (`tmux.enabled`) and the runs turn durable: detach, close your editor, reboot the GUI -- `agents focus` or `agents sessions resume` reattaches the still-running session.
498
496
 
499
497
  ### Send an agent to the background — and bring it back
500
498
 
@@ -520,11 +518,11 @@ Running agents aren't fire-and-forget. Steer them mid-run without opening their
520
518
  ### Message a running agent
521
519
 
522
520
  ```bash
523
- # Delivered at the agent's next tool call — no restart, no lost context.
524
- agents message tester "also cover the null case"
521
+ # Queued in the agent's mailbox, read at its next tool call — no restart, no lost context.
522
+ agents send --channel mailbox --to <session-id> --text "also cover the null case" --from orchestrator
525
523
  ```
526
524
 
527
- `agents message <target> <text>` reaches any running agent by name or id -- a live local run, a teammate, a loop agent, or a cloud task -- and the text lands at its next tool call. Tag the sender with `--from <who>`.
525
+ The `mailbox` channel of `agents send` queues a note for a running agent by session id, and the text lands at its next tool call. A cloud task takes `agents cloud message <id> <text>`.
528
526
 
529
527
  To type straight into an agent's terminal instead -- a "continue" for one that stalled at a prompt -- use the `session` channel of `agents send`. The id is anything `agents ps` shows (session id or prefix, the `<shortid>` of an `ag-<agent>-<shortid>` tmux name, or a `%pane`); add `--device <name>` for a session on another box.
530
528
 
@@ -565,7 +563,7 @@ agents config set summarizer.baseUrl http://localhost:11434 # Ollama / vLLM /
565
563
  agents config set summarizer.model qwen2.5:3b
566
564
  ```
567
565
 
568
- Top-level questions and waiting notifications publish one atomic open-block record per session, including the mailbox id, host, runtime, and every answer option. The default view collapses agents under the **outcome** they serve (Linear ticket, PR, worktree slug, or Unassigned) so a 1,100-agent fleet reads as dozens of deliverables. Answered, resumed, and stopped blocks clear automatically; Task subagents are excluded. The rendered reply command uses the same mailbox id with `agents message`, so the decision routes back to the agent that asked it.
566
+ Top-level questions and waiting notifications publish one atomic open-block record per session, including the mailbox id, host, runtime, and every answer option. The default view collapses agents under the **outcome** they serve (Linear ticket, PR, worktree slug, or Unassigned) so a 1,100-agent fleet reads as dozens of deliverables. Answered, resumed, and stopped blocks clear automatically; Task subagents are excluded. The rendered reply command uses the same mailbox id with `agents send --channel mailbox`, so the decision routes back to the agent that asked it.
569
567
 
570
568
  ### Auto-nudge stalls
571
569
 
@@ -689,30 +687,6 @@ Profile YAML has no secrets -- safe to `agents repo push` to a shared repo. `age
689
687
 
690
688
  ---
691
689
 
692
- ## Named routers
693
-
694
- A **router** is a reusable, task-typed allowlist -- which harnesses, which models/tiers per harness, and which linked accounts a task may be routed to. It's a generalization of a profile: a profile is a router pinned to one harness and one account.
695
-
696
- ```bash
697
- # Scope a router to two harnesses, capped at a tier
698
- agents route add research --harness gemini,kimi --tier cheap,default # alias: create
699
-
700
- # Narrow one harness's model set
701
- agents route allow research kimi kimi-k2
702
-
703
- # Only these accounts are eligible when routing under this router
704
- agents route link-account research gemini personal
705
- agents route link-account research kimi work
706
-
707
- agents route view research # alias: show
708
- agents route rename research prod # rename a router, preserving its config
709
- agents route list --json
710
- ```
711
-
712
- Router YAML has no secrets -- safe to `agents repo push` to a shared repo. Harness ids and model/tier tokens are validated on `add`/`allow`: an unknown harness or an unverifiable model id fails loud and writes nothing. Routers resolve as a layered resource (project > user > system, same as profiles). The old verbs `create`/`show` remain as aliases.
713
-
714
- ---
715
-
716
690
  ## Run on your own machines
717
691
 
718
692
  <p align="center">
@@ -736,11 +710,11 @@ agents run claude --device auto "…" # same — auto is
736
710
  agents view kimi --device all # fan out across every registered device (grouped-by-OS roster)
737
711
  agents insights output --device all # per-device burn vs shipped output across the fleet
738
712
  agents view --device all --json # machine-readable fleet inventory
739
- agents hosts ps # list dispatched runs + terminal status
740
- agents hosts stop <id> # terminate a hung/detached run (alias: kill)
741
- agents logs --device gpu-box # pick a dispatched run — concise summary by default
742
- agents logs <id> --full # the full raw transcript / stdout (token-heavy)
743
- agents logs <id> -f # re-attach to a running one and follow
713
+ agents devices ps # list dispatched runs + terminal status
714
+ agents devices stop <id> # terminate a hung/detached run (alias: kill)
715
+ agents events logs --device gpu-box # pick a dispatched run — concise summary by default
716
+ agents events logs <id> --full # the full raw transcript / stdout (token-heavy)
717
+ agents events logs <id> -f # re-attach to a running one and follow
744
718
  agents view claude --device gpu-box # inspect the remote install
745
719
  agents sync --device gpu-box # make the remote machine current
746
720
  agents doctor claude # diagnose every installed claude version
@@ -877,7 +851,7 @@ evidence, so re-adding the same name needs `teams remove <team> <name>` first.
877
851
 
878
852
  ## Cloud
879
853
 
880
- Some work shouldn't tie up your laptop. `agents cloud run` hands a task to a managed provider that clones the repo, plans, implements, tests, and opens a PR -- while your terminal stays free. The `host` provider dispatches the same way onto machines you own: `agents cloud run "…" --device gpu-box` (tasks track in `agents cloud ps` and `agents hosts ps` alike).
854
+ Some work shouldn't tie up your laptop. `agents cloud run` hands a task to a managed provider that clones the repo, plans, implements, tests, and opens a PR -- while your terminal stays free. The `host` provider dispatches the same way onto machines you own: `agents cloud run "…" --device gpu-box` (tasks track in `agents cloud ps` and `agents devices ps` alike).
881
855
 
882
856
  <p align="center">
883
857
  <img src="assets/cloud.svg" alt="agents cloud run dispatches one prompt to a managed provider (Rush, Codex, Cursor, Factory, or Antigravity) that runs while you keep working" width="100%" />
@@ -1188,7 +1162,7 @@ agents browser profiles create cloud \
1188
1162
 
1189
1163
  ## Sign in
1190
1164
 
1191
- Signing in is **optional**. Every local feature — `agents run`, sessions, teams, fleet dispatch, secrets, browser, computer — works with no account. Signing in unlocks the hosted surfaces: **team spaces** (`agents auth space`) and **managed trace sync** — `agents traces sync` publishes to our storage with **zero Cloudflare setup**. `agents auth` signs this machine in to **Phoenix ID**, the Phoenix Labs account layer behind these hosted surfaces. Sign-in is Google-only and runs a device-code flow: the CLI shows a code, your browser confirms it, and the CLI picks the session up.
1165
+ Signing in is **optional**. Every local feature — `agents run`, sessions, teams, fleet dispatch, secrets, browser, computer — works with no account. Signing in unlocks the hosted surfaces: **team spaces** (`agents auth space`) and **owner notifications** (`agents send --to owner`). `agents auth` signs this machine in to **Phoenix ID**, the Phoenix Labs account layer behind these hosted surfaces. Sign-in is Google-only and runs a device-code flow: the CLI shows a code, your browser confirms it, and the CLI picks the session up.
1192
1166
 
1193
1167
  ```bash
1194
1168
  agents auth login # shows a code, opens a Phoenix-branded page
@@ -1375,13 +1349,12 @@ agents routines add nightly-drain --schedule "0 3 * * *" --agent claude \
1375
1349
  agents routines devices nightly-drain --set yosemite-s0 # one schedule owner
1376
1350
  agents routines list --device yosemite-s0 # query another device
1377
1351
 
1378
- # Signed webhook trigger: Linear issue labeled "agent" fires a routine
1352
+ # Event trigger: a Linear issue labeled "agent" fires a routine
1379
1353
  agents routines add agent-labeled-issue --on linear:Issue --action update \
1380
1354
  --team-key RUSH --label agent --agent claude \
1381
1355
  --cwd '~' \
1382
1356
  --prompt "Work the Linear issue that was just labeled agent"
1383
- agents daemon webhooks add --secrets-bundle webhooks --port 8787 # supervised receiver: /hooks/linear, /hooks/github
1384
- agents daemon funnel up yosemite-s0 --local-port 8787 --port 443 # public HTTPS ingress
1357
+ agents routines webhook --source linear --event Issue --file payload.json # fire matches for one payload
1385
1358
  ```
1386
1359
 
1387
1360
  Jobs run sandboxed -- agents only see directories and tools you explicitly allow.
@@ -1520,7 +1493,7 @@ Two repos with the same shape, different roles:
1520
1493
 
1521
1494
  See [docs/concepts.md](cli/docs/concepts.md) for the full mental model: DotAgents repos, resource kinds, and how resolution works end-to-end.
1522
1495
 
1523
- 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.
1496
+ 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 prune trash` lists, restores (`agents prune trash restore <agent>@<version>`) and empties (`agents prune trash empty --older-than 30d`) soft-deleted version directories, and `agents subagents` installs reusable subagent definitions for parent-agent workflows.
1524
1497
 
1525
1498
  ---
1526
1499
 
@@ -1529,20 +1502,18 @@ Other useful commands: `agents doctor` checks CLI availability and resource sync
1529
1502
  On macOS, `agi-cli` puts a status item in your menu bar -- a live glance at what your agents are doing, plus a Spotlight-style bar for filing work without breaking focus.
1530
1503
 
1531
1504
  ```bash
1532
- agents menubar setup # configure end-to-end: one instance, started at login
1533
- agents menubar status # is it installed and running?
1505
+ agents doctor # AGI Menu duplicates, stale or replaced helper, signing
1506
+ agents config set menubar.enabled false # turn it off on this Mac (true turns it back on)
1534
1507
  ```
1535
1508
 
1536
- There is only ever **one** agents mark: the helper takes a lock at launch, so a
1537
- second copy surfaces the running one's menu and exits instead of adding a
1538
- duplicate icon. `agents menubar setup` is the recovery command when a machine is
1539
- already wrong -- it ends any duplicate, installs the bundle, wires the login
1540
- item, and verifies exactly one helper came back up.
1509
+ The CLI installs and heals AGI Menu on its own: any `agents` command on a Mac
1510
+ installs the login item when it is missing and `menubar.enabled` is true. There is
1511
+ only ever **one** agents mark: the helper takes a lock at launch, so a second copy
1512
+ surfaces the running one's menu and exits instead of adding a duplicate icon.
1513
+ `agents doctor` names any duplicate or stale helper with the exact fix.
1541
1514
 
1542
- AGI Menu has its own update controls: `agents menubar update --check` checks the
1543
- app release, `agents menubar update` installs it, and
1544
- `agents config set menubar.autoUpdate false` disables the default twice-daily
1545
- automatic checks. See [AGI Menu updates](cli/docs/menubar.md#app-updates).
1515
+ AGI Menu updates itself about twice a day; `agents config set menubar.autoUpdate
1516
+ false` turns that off. See [AGI Menu updates](cli/docs/menubar.md#app-updates).
1546
1517
 
1547
1518
  The helper itself is AGI Menu, developed in
1548
1519
  [phnx-labs/agi-menu](https://github.com/phnx-labs/agi-menu) and published as a
@@ -1713,7 +1684,7 @@ Claude Code, Codex CLI, Antigravity, Grok Build, and others each have their own
1713
1684
 
1714
1685
  ### Is it free?
1715
1686
 
1716
- Yes — every feature, with no account and no signup. `agents run`, sessions, teams, fleet dispatch, secrets, browser, and computer automation all work the moment you install. The optional `agents auth login` unlocks the hosted surfaces — team spaces (`agents auth space`) and managed trace sync (`agents traces sync`, no Cloudflare setup); there are no paid tiers. This developer tool is entirely free because we believe developers should have the best tools — fast and robust — so they can create the best products for their users.
1687
+ Yes — every feature, with no account and no signup. `agents run`, sessions, teams, fleet dispatch, secrets, browser, and computer automation all work the moment you install. The optional `agents auth login` unlocks the hosted surfaces — team spaces (`agents auth space`) and owner notifications (`agents send --to owner`); there are no paid tiers. This developer tool is entirely free because we believe developers should have the best tools — fast and robust — so they can create the best products for their users.
1717
1688
 
1718
1689
  ### Is this like `nvm` / `mise` / `asdf` for AI agents?
1719
1690
 
@@ -1748,7 +1719,7 @@ macOS and Linux. Windows via WSL works but isn't first-class yet.
1748
1719
  **macOS-only features:** `agents accounts add` requires macOS. `agents secrets` itself is cross-platform — macOS Keychain, Linux libsecret, or the `file` backend everywhere, including Windows (non-WSL) via environment variables or a `.env` file as a fallback when neither native store applies.
1749
1720
 
1750
1721
  Interactive runs spawn directly by default. Enable `tmux.enabled` on a device to
1751
- give each run an addressable pane for `agents message`, injection, and `agents
1722
+ give each run an addressable pane for `agents send --channel session`, injection, and `agents
1752
1723
  focus`; tmux-backed runs require tmux 3.2 or newer.
1753
1724
 
1754
1725
  ### Do I need Node.js?
@@ -19,7 +19,6 @@ const loadWorkflows = async () => (await import('../commands/workflows.js')).reg
19
19
  export const loadVersions = async () => (await import('../commands/versions.js')).registerVersionsCommands;
20
20
  export const loadUpdate = async () => (await import('../commands/update.js')).registerUpdateCommand;
21
21
  const loadImport = async () => (await import('../commands/import.js')).registerImportCommand;
22
- const loadPackages = async () => (await import('../commands/packages.js')).registerPackagesCommands;
23
22
  const loadRoutines = async () => (await import('../commands/routines.js')).registerRoutinesCommands;
24
23
  const loadProjects = async () => (await import('../commands/projects.js')).registerProjectsCommands;
25
24
  export const loadRun = async () => (await import('../commands/exec.js')).registerRunCommand;
@@ -28,9 +27,7 @@ const loadFork = async () => (await import('../commands/fork.js')).registerForkC
28
27
  const loadConfig = async () => (await import('../commands/config.js')).registerConfigCommand;
29
28
  const loadModels = async () => (await import('../commands/models.js')).registerModelsCommand;
30
29
  export const loadPrune = async () => (await import('../commands/prune.js')).registerPruneCommand;
31
- const loadTrash = async () => (await import('../commands/trash.js')).registerTrashCommands;
32
30
  export const loadDoctor = async () => (await import('../commands/doctor.js')).registerDoctorCommand;
33
- const loadRoute = async () => (await import('../commands/route.js')).registerRouteCommands;
34
31
  const loadHarness = async () => (await import('../commands/harness.js')).registerHarnessCommands;
35
32
  const loadSecrets = async () => (await import('../commands/secrets-passthrough.js')).registerSecretsCommands;
36
33
  const loadMenubar = async () => (await import('../commands/menubar.js')).registerMenubarCommands;
@@ -39,11 +36,9 @@ const loadRefreshRules = async () => (await import('../commands/refresh-rules.js
39
36
  const loadFactory = async () => (await import('../commands/factory.js')).registerFactoryCommands;
40
37
  const loadInsights = async () => (await import('../commands/insights.js')).registerInsightsCommand;
41
38
  const loadTrace = async () => (await import('../commands/sessions-trace.js')).registerTraceCommand;
42
- const loadTmux = async () => (await import('../commands/tmux.js')).registerTmuxCommands;
43
39
  const loadWatchdog = async () => (await import('../commands/watchdog.js')).registerWatchdogCommand;
44
40
  const loadBrowser = async () => (await import('../commands/browser.js')).registerBrowserCommand;
45
41
  const loadComputer = async () => (await import('../commands/computer.js')).registerComputerCommand;
46
- const loadLogs = async () => (await import('../commands/logs.js')).registerLogsCommand;
47
42
  const loadEvents = async () => (await import('../commands/events.js')).registerEventsCommand;
48
43
  const loadSsh = async () => (await import('../commands/ssh.js')).registerSshCommands;
49
44
  const loadRepo = async () => (await import('../commands/repo.js')).registerRepoCommands;
@@ -53,22 +48,17 @@ const loadUpgrade = async () => (await import('../commands/upgrade.js')).registe
53
48
  export const loadSessions = async () => (await import('../commands/sessions.js')).registerSessionsCommands;
54
49
  export const loadTeams = async () => (await import('../commands/teams.js')).registerTeamsCommands;
55
50
  const loadCloud = async () => (await import('../commands/cloud.js')).registerCloudCommands;
56
- const loadMessage = async () => (await import('../commands/message.js')).registerMessageCommand;
57
51
  const loadPs = async () => (await import('../commands/ps.js')).registerPsCommand;
58
52
  const loadSend = async () => (await import('../commands/send.js')).registerSendCommand;
59
53
  const loadFeed = async () => (await import('../commands/feed.js')).registerFeedCommand;
60
- const loadMailboxes = async () => (await import('../commands/mailboxes.js')).registerMailboxesCommand;
61
- const loadWebhooks = async () => (await import('../commands/webhook.js')).registerWebhooksCommand;
62
54
  const loadAccounts = async () => (await import('../commands/accounts.js')).registerAccountsCommand;
63
55
  const loadDaemon = async () => (await import('../commands/daemon.js')).registerDaemonCommand;
64
56
  const loadAuth = async () => (await import('../commands/auth.js')).registerAuthCommand;
65
- const loadTraces = async () => (await import('../commands/traces.js')).registerTracesCommands;
66
57
  const loadRecordings = async () => (await import('../commands/recordings.js')).registerRecordingsCommand;
67
58
  export const LAZY_COMMAND_NAMES = new Set([
68
59
  'sessions',
69
60
  'teams',
70
61
  'cloud',
71
- 'message',
72
62
  ]);
73
63
  export const COMMAND_LOADERS = {
74
64
  accounts: [loadAccounts],
@@ -93,10 +83,6 @@ export const COMMAND_LOADERS = {
93
83
  update: [loadUpdate],
94
84
  prune: [loadVersions, loadPrune],
95
85
  import: [loadImport],
96
- registry: [loadPackages],
97
- search: [loadPackages],
98
- install: [loadPackages],
99
- packages: [loadPackages],
100
86
  routines: [loadRoutines],
101
87
  projects: [loadProjects],
102
88
  run: [loadRun],
@@ -105,10 +91,7 @@ export const COMMAND_LOADERS = {
105
91
  fork: [loadFork],
106
92
  config: [loadConfig],
107
93
  models: [loadModels],
108
- trash: [loadTrash],
109
94
  doctor: [loadDoctor],
110
- route: [loadRoute],
111
- routes: [loadRoute],
112
95
  harness: [loadHarness],
113
96
  harnesses: [loadHarness],
114
97
  secrets: [loadSecrets],
@@ -118,11 +101,9 @@ export const COMMAND_LOADERS = {
118
101
  factory: [loadFactory],
119
102
  insights: [loadInsights],
120
103
  trace: [loadTrace],
121
- tmux: [loadTmux],
122
104
  watchdog: [loadWatchdog],
123
105
  browser: [loadBrowser],
124
106
  computer: [loadComputer],
125
- logs: [loadLogs],
126
107
  events: [loadEvents],
127
108
  ssh: [loadSsh],
128
109
  devices: [loadSsh],
@@ -135,16 +116,11 @@ export const COMMAND_LOADERS = {
135
116
  sessions: [loadSessions],
136
117
  teams: [loadTeams],
137
118
  cloud: [loadCloud],
138
- message: [loadMessage],
139
119
  ps: [loadPs],
140
120
  send: [loadSend],
141
121
  feed: [loadFeed],
142
- mailboxes: [loadMailboxes],
143
- mailbox: [loadMailboxes],
144
- webhooks: [loadWebhooks],
145
122
  daemon: [loadDaemon],
146
123
  auth: [loadAuth],
147
- traces: [loadTraces],
148
124
  recordings: [loadRecordings],
149
125
  };
150
126
  export async function buildFullCommandTree() {
@@ -468,7 +468,7 @@ agents accounts default claude --json`,
468
468
  if (plan.totals.slots + plan.totals.trash + plan.totals.deferred > 0) {
469
469
  console.log();
470
470
  console.log('Dry-run: nothing written. Re-run with --apply to execute.');
471
- console.log('Restore a trashed install with: agents trash restore <agent>@<label>');
471
+ console.log('Restore a trashed install with: agents prune trash restore <agent>@<label>');
472
472
  }
473
473
  return;
474
474
  }
@@ -486,14 +486,14 @@ agents accounts default claude --json`,
486
486
  console.log();
487
487
  console.log(`Wrote manifest: ${result.manifestPath}`);
488
488
  console.log(`Re-indexed ${result.sessionsReindexed} session path${result.sessionsReindexed === 1 ? '' : 's'}.`);
489
- console.log('Restore a trashed install with: agents trash restore <agent>@<label>');
489
+ console.log('Restore a trashed install with: agents prune trash restore <agent>@<label>');
490
490
  });
491
491
  });
492
492
  setHelpSections(migrateCmd, {
493
493
  examples: `agents accounts migrate --dry-run
494
494
  agents accounts migrate --apply
495
495
  agents accounts migrate --dry-run --device worker-1`,
496
- notes: 'Folds leftover per-account installations (the old connect homes) into one managed install plus a HOME-shaped slot per identity. Empty logged-out homes and duplicate identities go to trash (agents trash restore reverses). A busy home is deferred, never moved. --apply is required to write; this upgrade only prints the dry-run report. Native OAuth files stay on this device inside the moved home.',
496
+ notes: 'Folds leftover per-account installations (the old connect homes) into one managed install plus a HOME-shaped slot per identity. Empty logged-out homes and duplicate identities go to trash (agents prune trash restore reverses). A busy home is deferred, never moved. --apply is required to write; this upgrade only prints the dry-run report. Native OAuth files stay on this device inside the moved home.',
497
497
  });
498
498
  accounts.command('set-key <name>')
499
499
  .description('Rotate an account credential without changing its identity')
@@ -13,10 +13,7 @@ import { listJobs, getLatestRun } from '../lib/scheduling/routines.js';
13
13
  import { JobScheduler } from '../lib/scheduler.js';
14
14
  import { followFile } from '../lib/log-follow.js';
15
15
  import { parseDuration } from '../lib/hooks/cache.js';
16
- import { registerFunnelCommand } from './funnel.js';
17
16
  import { registerDaemonIndexCommand } from './daemon-index.js';
18
- import { DEFAULT_WEBHOOK_PORT, DEFAULT_WEBHOOK_RATE_LIMIT, addHostedReceiver, getDaemonWebhooksConfigPath, hostedReceiverPort, readDaemonWebhooksConfig, removeHostedReceiver, } from '../lib/daemon-webhooks.js';
19
- import { parseFunnelPort } from '../lib/funnel.js';
20
17
  function startDaemonClean() {
21
18
  try {
22
19
  return startDaemon();
@@ -504,134 +501,6 @@ async function runDoctor(opts) {
504
501
  console.log(` ${chalk.red('✗')} ${p}`);
505
502
  process.exitCode = 1;
506
503
  }
507
- function requirePositiveInt(raw, label) {
508
- const parsed = Number.parseInt(raw, 10);
509
- if (!Number.isInteger(parsed) || parsed <= 0) {
510
- console.error(chalk.red(`${label} must be a positive integer (got '${raw}').`));
511
- process.exit(1);
512
- }
513
- return parsed;
514
- }
515
- function registerWebhooksSubcommand(parent) {
516
- const webhooks = parent
517
- .command('webhooks')
518
- .description('Signed webhook receivers this box hosts as a supervised daemon service.')
519
- .option('--json', 'Emit as JSON')
520
- .action((opts, command) => {
521
- runWebhooksList(command.optsWithGlobals().json === true);
522
- });
523
- setHelpSections(webhooks, {
524
- examples: `
525
- # What this box hosts today
526
- agents daemon webhooks list
527
-
528
- # Host a receiver on the default port, signing secrets from a bundle
529
- agents daemon webhooks add --secrets-bundle linear-webhook
530
-
531
- # A second receiver on its own port, publicly exposed via Tailscale Funnel
532
- agents daemon webhooks add --secrets-bundle gh-webhook --port 8788 --funnel-port 443
533
-
534
- # Apply the change (the running daemon rebinds on restart)
535
- agents daemon restart
536
-
537
- # Stop hosting the receiver bound to a port
538
- agents daemon webhooks remove 8788
539
- `,
540
- notes: `
541
- The bundle must hold GITHUB_WEBHOOK_SECRET and/or LINEAR_WEBHOOK_SECRET
542
- ('agents secrets add <bundle> LINEAR_WEBHOOK_SECRET'). The daemon reads it
543
- headlessly through the standalone 'secrets' CLI, so a hosted receiver needs
544
- no AGENTS_SECRETS_PASSPHRASE and no nohup. A LOCKED bundle fails that receiver
545
- loud in 'agents daemon logs' rather than binding unverified ingress.
546
-
547
- Port is the identity: a second 'add' on the same port edits that receiver.
548
- Funnel ports are limited by Tailscale to 443, 8443, and 10000.
549
- `,
550
- });
551
- webhooks
552
- .command('list')
553
- .description('List the receivers declared for this box.')
554
- .option('--json', 'Emit as JSON')
555
- .action((opts, command) => {
556
- runWebhooksList(command.optsWithGlobals().json === true || opts.json === true);
557
- });
558
- webhooks
559
- .command('add')
560
- .description('Declare a receiver on this box. Replaces any receiver already on the same port.')
561
- .requiredOption('--secrets-bundle <name>', 'agents secrets bundle holding GITHUB_WEBHOOK_SECRET and/or LINEAR_WEBHOOK_SECRET')
562
- .option('-p, --port <n>', `Local bind port (default ${DEFAULT_WEBHOOK_PORT})`)
563
- .option('--rate-limit <n>', `Accepted deliveries per source per minute (default ${DEFAULT_WEBHOOK_RATE_LIMIT})`)
564
- .option('--funnel-port <n>', 'Expose publicly on this Tailscale Funnel port (443 | 8443 | 10000)')
565
- .action((opts) => {
566
- const receiver = { bundle: opts.secretsBundle };
567
- if (opts.port !== undefined)
568
- receiver.port = requirePositiveInt(opts.port, '--port');
569
- if (opts.rateLimit !== undefined)
570
- receiver.rateLimit = requirePositiveInt(opts.rateLimit, '--rate-limit');
571
- if (opts.funnelPort !== undefined) {
572
- try {
573
- receiver.funnel = { publicPort: parseFunnelPort(opts.funnelPort) };
574
- }
575
- catch (err) {
576
- console.error(chalk.red(err.message));
577
- process.exit(1);
578
- }
579
- }
580
- addHostedReceiver(receiver);
581
- const port = hostedReceiverPort(receiver);
582
- console.log(chalk.green(`Hosting a webhook receiver on 127.0.0.1:${port}`) + chalk.gray(` (bundle ${receiver.bundle})`));
583
- if (receiver.funnel)
584
- console.log(chalk.gray(` public: Tailscale Funnel :${receiver.funnel.publicPort} → localhost:${port}`));
585
- console.log(chalk.gray(` config: ${getDaemonWebhooksConfigPath()}`));
586
- console.log(chalk.gray(isDaemonRunning()
587
- ? ' run `agents daemon restart` to bind it'
588
- : ' run `agents daemon start` to bind it'));
589
- });
590
- webhooks
591
- .command('remove <port>')
592
- .description('Stop hosting the receiver bound to this port.')
593
- .action((portArg) => {
594
- const port = requirePositiveInt(portArg, 'port');
595
- const removed = removeHostedReceiver(port);
596
- if (!removed) {
597
- console.error(chalk.red(`No receiver declared on port ${port}. Run 'agents daemon webhooks list'.`));
598
- process.exit(1);
599
- }
600
- console.log(chalk.green(`Removed the webhook receiver on port ${port}.`));
601
- if (removed.funnel) {
602
- console.log(chalk.yellow(` public ingress is still up on :${removed.funnel.publicPort} — take it down:`));
603
- console.log(chalk.gray(` agents daemon funnel down <host> --port ${removed.funnel.publicPort}`));
604
- }
605
- if (isDaemonRunning())
606
- console.log(chalk.gray(' run `agents daemon restart` to release the port'));
607
- });
608
- }
609
- function runWebhooksList(json) {
610
- const { receivers } = readDaemonWebhooksConfig();
611
- if (json) {
612
- console.log(JSON.stringify(receivers.map((r) => ({
613
- bundle: r.bundle,
614
- port: hostedReceiverPort(r),
615
- rateLimit: r.rateLimit ?? DEFAULT_WEBHOOK_RATE_LIMIT,
616
- funnelPort: r.funnel?.publicPort ?? null,
617
- })), null, 2));
618
- return;
619
- }
620
- if (receivers.length === 0) {
621
- console.log(chalk.gray('No webhook receivers declared on this box — the daemon binds nothing.'));
622
- console.log(chalk.gray('Add one: agents daemon webhooks add --secrets-bundle <name>'));
623
- return;
624
- }
625
- console.log(chalk.bold('Hosted webhook receivers'));
626
- for (const r of receivers) {
627
- const port = hostedReceiverPort(r);
628
- const funnel = r.funnel ? chalk.cyan(` public :${r.funnel.publicPort}`) : chalk.gray(' localhost only');
629
- console.log(` 127.0.0.1:${String(port).padEnd(6)} ${chalk.gray(`bundle ${r.bundle}`)}${funnel}`);
630
- console.log(chalk.gray(` endpoints: /hooks/github, /hooks/linear, /hooks/slack · ${r.rateLimit ?? DEFAULT_WEBHOOK_RATE_LIMIT}/min per source`));
631
- }
632
- console.log(chalk.gray(`\nConfig: ${getDaemonWebhooksConfigPath()}`));
633
- console.log(chalk.gray('Changes take effect on the next daemon restart.'));
634
- }
635
504
  export function registerDaemonCommand(program) {
636
505
  const cmd = program
637
506
  .command('daemon')
@@ -670,14 +539,6 @@ export function registerDaemonCommand(program) {
670
539
  agents daemon services enable account-state
671
540
  agents daemon services restart account-state
672
541
 
673
- # Host a signed webhook receiver here, supervised and restarted on crash
674
- agents daemon webhooks add --secrets-bundle linear-webhook
675
- agents daemon webhooks list
676
-
677
- # Manage public ingress for daemon-world webhook receivers
678
- agents daemon funnel status yosemite-s0
679
- agents daemon funnel up yosemite-s0 --local-port 8787 --port 443
680
-
681
542
  # Tail the daemon's own log, warnings and up, from the last hour
682
543
  agents daemon logs -f --level warn --since 1h
683
544
 
@@ -696,7 +557,7 @@ export function registerDaemonCommand(program) {
696
557
  always. Use 'agents routines stats' for per-routine failure detail.
697
558
 
698
559
  'disable' is a persisted kill switch: it stops routines/add,
699
- routines/start, routines/catchup, and webhook triggers from auto-starting
560
+ routines/start, and routines/catchup from auto-starting
700
561
  the daemon (daemon.enabled: false in ~/.agents/devices/<host>/agents.yaml).
701
562
  'agents daemon start' still starts it explicitly, same as
702
563
  'systemctl start' on a disabled unit.
@@ -713,8 +574,8 @@ export function registerDaemonCommand(program) {
713
574
  'agents daemon services enable|disable|restart <id>' applies live (no
714
575
  daemon restart) for supervisor-managed services that were registered at
715
576
  boot. The inline scheduler re-evaluates its toggle on every reload as
716
- well. A boot-disabled service other than webhook-receiver still needs
717
- an operator 'agents daemon restart'. 'agents
577
+ well. Any other boot-disabled service still needs an operator
578
+ 'agents daemon restart'. 'agents
718
579
  daemon services' names which case you're in per row.
719
580
  `,
720
581
  });
@@ -788,7 +649,7 @@ export function registerDaemonCommand(program) {
788
649
  .description('Clear the daemon.enabled kill switch. Does not start the daemon by itself.')
789
650
  .action(() => {
790
651
  setConfigValue('daemon.enabled', true);
791
- console.log(chalk.green('daemon.enabled: true') + chalk.gray(' — auto-start surfaces (routines add/start/catchup, webhooks) may bring the daemon up again'));
652
+ console.log(chalk.green('daemon.enabled: true') + chalk.gray(' — auto-start surfaces (routines add/start/catchup) may bring the daemon up again'));
792
653
  });
793
654
  cmd.command('disable')
794
655
  .description('Persist daemon.enabled: false — nothing auto-starts the daemon until re-enabled. Does not stop a running daemon.')
@@ -837,8 +698,7 @@ export function registerDaemonCommand(program) {
837
698
  notes: `
838
699
  A service disabled at daemon boot is normally not registered on the
839
700
  supervisor, so enabling it needs an operator restart. The inline
840
- scheduler applies enable/disable on reload; webhook-receiver still
841
- requires 'agents daemon restart'. Each row in
701
+ scheduler applies enable/disable on reload. Each row in
842
702
  the plain-text view names which case it is; 'supervised: true/false' does
843
703
  the same in --json.
844
704
  `,
@@ -918,8 +778,6 @@ export function registerDaemonCommand(program) {
918
778
  ? chalk.green(`Restart requested for '${service}'.`) + chalk.gray(' Confirm: agents daemon services')
919
779
  : chalk.yellow('Reload signal not delivered (unsupported on this platform, or the daemon just exited).'));
920
780
  });
921
- registerWebhooksSubcommand(cmd);
922
- registerFunnelCommand(cmd);
923
781
  registerDaemonIndexCommand(cmd);
924
782
  const logsCmd = cmd.command('logs')
925
783
  .description('Read the daemon\'s own log: lifecycle, every service tick, slow sections, event-loop stalls, and per-minute vitals (not routine run output).')
@@ -1191,6 +1191,12 @@ export function registerDoctorCommand(program) {
1191
1191
  const localName = machineId();
1192
1192
  const duplicateHooks = inspectDuplicateVersionHooks(cwd);
1193
1193
  const ambiguousPins = findAmbiguousDevicePins(cwd);
1194
+ const menubar = process.platform === 'darwin'
1195
+ ? await import('../lib/menubar/install-menubar.js').then((m) => ({
1196
+ status: m.getMenubarStatus(),
1197
+ report: m.buildMenubarDoctorReport(),
1198
+ }))
1199
+ : undefined;
1194
1200
  const signIn = {};
1195
1201
  await Promise.all(Object.entries(clis)
1196
1202
  .filter(([, e]) => e.installed)
@@ -1231,6 +1237,7 @@ export function registerDoctorCommand(program) {
1231
1237
  isolatedVersions,
1232
1238
  ownerSignedIn: resolveOwnerCredential() !== null,
1233
1239
  leakedDaemons: findLeakedDaemons(),
1240
+ menubar,
1234
1241
  });
1235
1242
  if (opts.json) {
1236
1243
  const overviewPayload = {
@@ -0,0 +1,2 @@
1
+ import type { Command } from 'commander';
2
+ export declare function registerEventsLogsCommand(events: Command): void;