@phnx-labs/agents-cli 1.20.72 → 1.20.74

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 (234) hide show
  1. package/CHANGELOG.md +395 -0
  2. package/README.md +40 -4
  3. package/dist/bin/agents +0 -0
  4. package/dist/commands/activity.d.ts +12 -0
  5. package/dist/commands/activity.js +68 -0
  6. package/dist/commands/apply.d.ts +13 -0
  7. package/dist/commands/apply.js +28 -3
  8. package/dist/commands/browser.js +1 -1
  9. package/dist/commands/cloud.js +21 -11
  10. package/dist/commands/doctor.js +21 -5
  11. package/dist/commands/events.d.ts +11 -10
  12. package/dist/commands/events.js +30 -21
  13. package/dist/commands/exec.d.ts +34 -0
  14. package/dist/commands/exec.js +337 -39
  15. package/dist/commands/export.d.ts +11 -0
  16. package/dist/commands/export.js +215 -0
  17. package/dist/commands/feed.d.ts +13 -0
  18. package/dist/commands/feed.js +130 -29
  19. package/dist/commands/hq.d.ts +2 -0
  20. package/dist/commands/hq.js +58 -0
  21. package/dist/commands/import.js +51 -3
  22. package/dist/commands/lease.d.ts +19 -0
  23. package/dist/commands/lease.js +138 -11
  24. package/dist/commands/login.d.ts +2 -0
  25. package/dist/commands/login.js +123 -0
  26. package/dist/commands/logs.js +1 -1
  27. package/dist/commands/mine.d.ts +27 -0
  28. package/dist/commands/mine.js +207 -0
  29. package/dist/commands/monitors.js +79 -49
  30. package/dist/commands/plugins.js +1 -0
  31. package/dist/commands/profiles.js +158 -0
  32. package/dist/commands/repo.js +2 -60
  33. package/dist/commands/resources.d.ts +5 -0
  34. package/dist/commands/resources.js +95 -0
  35. package/dist/commands/routines.d.ts +2 -0
  36. package/dist/commands/routines.js +139 -37
  37. package/dist/commands/secrets.js +234 -47
  38. package/dist/commands/send.d.ts +15 -0
  39. package/dist/commands/send.js +62 -0
  40. package/dist/commands/sessions-tail.d.ts +1 -0
  41. package/dist/commands/sessions-tail.js +20 -9
  42. package/dist/commands/sessions.js +18 -3
  43. package/dist/commands/setup-mine.d.ts +18 -0
  44. package/dist/commands/setup-mine.js +106 -0
  45. package/dist/commands/setup-share.js +2 -2
  46. package/dist/commands/setup.js +9 -2
  47. package/dist/commands/share.d.ts +8 -1
  48. package/dist/commands/share.js +122 -37
  49. package/dist/commands/ssh.d.ts +9 -0
  50. package/dist/commands/ssh.js +196 -26
  51. package/dist/commands/sync.js +1 -1
  52. package/dist/commands/teams.js +11 -2
  53. package/dist/commands/versions.js +36 -5
  54. package/dist/commands/view.js +75 -27
  55. package/dist/index.js +80 -10
  56. package/dist/lib/activity.d.ts +124 -0
  57. package/dist/lib/activity.js +542 -0
  58. package/dist/lib/agents.d.ts +35 -0
  59. package/dist/lib/agents.js +79 -6
  60. package/dist/lib/artifact-actions.d.ts +1 -1
  61. package/dist/lib/artifact-actions.js +1 -1
  62. package/dist/lib/ask-classifier.d.ts +2 -1
  63. package/dist/lib/ask-classifier.js +3 -3
  64. package/dist/lib/auth-health.d.ts +32 -4
  65. package/dist/lib/auth-health.js +40 -1
  66. package/dist/lib/auto-pull.js +8 -1
  67. package/dist/lib/brand.d.ts +40 -0
  68. package/dist/lib/brand.js +122 -0
  69. package/dist/lib/browser/drivers/ssh.js +4 -7
  70. package/dist/lib/browser/service.js +6 -8
  71. package/dist/lib/channels/providers/index.d.ts +2 -0
  72. package/dist/lib/channels/providers/index.js +20 -0
  73. package/dist/lib/channels/providers/mailbox.d.ts +2 -0
  74. package/dist/lib/channels/providers/mailbox.js +26 -0
  75. package/dist/lib/channels/providers/openclaw-telegram.d.ts +2 -0
  76. package/dist/lib/channels/providers/openclaw-telegram.js +34 -0
  77. package/dist/lib/channels/providers/rush.d.ts +6 -0
  78. package/dist/lib/channels/providers/rush.js +55 -0
  79. package/dist/lib/channels/registry.d.ts +42 -0
  80. package/dist/lib/channels/registry.js +20 -0
  81. package/dist/lib/channels/resolve.d.ts +11 -0
  82. package/dist/lib/channels/resolve.js +12 -0
  83. package/dist/lib/cli-resources.d.ts +18 -0
  84. package/dist/lib/cli-resources.js +53 -4
  85. package/dist/lib/cloud/codex.js +6 -3
  86. package/dist/lib/cloud/factory.d.ts +1 -0
  87. package/dist/lib/cloud/factory.js +10 -4
  88. package/dist/lib/cloud/rush.d.ts +3 -1
  89. package/dist/lib/cloud/rush.js +6 -1
  90. package/dist/lib/cloud/types.d.ts +2 -0
  91. package/dist/lib/codex-home.d.ts +35 -0
  92. package/dist/lib/codex-home.js +136 -0
  93. package/dist/lib/config-transfer.d.ts +16 -0
  94. package/dist/lib/config-transfer.js +56 -0
  95. package/dist/lib/crabbox/cli.d.ts +44 -0
  96. package/dist/lib/crabbox/cli.js +120 -20
  97. package/dist/lib/crabbox/lease.d.ts +52 -1
  98. package/dist/lib/crabbox/lease.js +117 -16
  99. package/dist/lib/crabbox/progress.d.ts +31 -0
  100. package/dist/lib/crabbox/progress.js +76 -0
  101. package/dist/lib/crabbox/runtimes.d.ts +4 -0
  102. package/dist/lib/crabbox/runtimes.js +33 -8
  103. package/dist/lib/crabbox/setup-copy.d.ts +87 -0
  104. package/dist/lib/crabbox/setup-copy.js +127 -0
  105. package/dist/lib/daemon.d.ts +5 -5
  106. package/dist/lib/daemon.js +9 -9
  107. package/dist/lib/drive-sync.js +6 -3
  108. package/dist/lib/event-stream.d.ts +36 -0
  109. package/dist/lib/event-stream.js +68 -0
  110. package/dist/lib/events.d.ts +1 -1
  111. package/dist/lib/exec.d.ts +11 -0
  112. package/dist/lib/exec.js +23 -2
  113. package/dist/lib/export.d.ts +72 -0
  114. package/dist/lib/export.js +269 -0
  115. package/dist/lib/feed-policy.d.ts +1 -1
  116. package/dist/lib/feed-policy.js +14 -9
  117. package/dist/lib/feed-ranking.d.ts +32 -0
  118. package/dist/lib/feed-ranking.js +224 -0
  119. package/dist/lib/feed.d.ts +35 -2
  120. package/dist/lib/feed.js +66 -3
  121. package/dist/lib/fleet/auth-sync.d.ts +53 -0
  122. package/dist/lib/fleet/auth-sync.js +92 -0
  123. package/dist/lib/fleet/remote-login.d.ts +187 -0
  124. package/dist/lib/fleet/remote-login.js +556 -0
  125. package/dist/lib/format.d.ts +30 -3
  126. package/dist/lib/format.js +34 -5
  127. package/dist/lib/fs-atomic.d.ts +7 -2
  128. package/dist/lib/fs-atomic.js +8 -12
  129. package/dist/lib/git.d.ts +16 -0
  130. package/dist/lib/git.js +79 -2
  131. package/dist/lib/heal.js +11 -3
  132. package/dist/lib/hosts/progress.d.ts +28 -10
  133. package/dist/lib/hosts/progress.js +79 -22
  134. package/dist/lib/hosts/remote-cmd.js +4 -0
  135. package/dist/lib/hq/floor.d.ts +87 -0
  136. package/dist/lib/hq/floor.js +226 -0
  137. package/dist/lib/import.d.ts +23 -0
  138. package/dist/lib/import.js +74 -2
  139. package/dist/lib/isolation-boundary-report.d.ts +10 -0
  140. package/dist/lib/isolation-boundary-report.js +35 -0
  141. package/dist/lib/menubar/install-menubar.js +14 -20
  142. package/dist/lib/notify.d.ts +1 -0
  143. package/dist/lib/notify.js +3 -3
  144. package/dist/lib/open-url.d.ts +2 -0
  145. package/dist/lib/open-url.js +19 -0
  146. package/dist/lib/openclaw-keychain.d.ts +56 -0
  147. package/dist/lib/openclaw-keychain.js +236 -0
  148. package/dist/lib/overdue.js +10 -0
  149. package/dist/lib/permissions.d.ts +44 -1
  150. package/dist/lib/permissions.js +284 -7
  151. package/dist/lib/project-launch.d.ts +6 -12
  152. package/dist/lib/project-launch.js +13 -228
  153. package/dist/lib/project-resources.d.ts +7 -0
  154. package/dist/lib/project-resources.js +306 -0
  155. package/dist/lib/pty-client.d.ts +27 -0
  156. package/dist/lib/pty-client.js +136 -10
  157. package/dist/lib/refresh.js +14 -10
  158. package/dist/lib/resource-profiles.d.ts +26 -0
  159. package/dist/lib/resource-profiles.js +157 -0
  160. package/dist/lib/resources/permissions.js +7 -1
  161. package/dist/lib/resources/types.d.ts +1 -1
  162. package/dist/lib/resources.d.ts +1 -1
  163. package/dist/lib/resources.js +32 -3
  164. package/dist/lib/routines.d.ts +11 -0
  165. package/dist/lib/routines.js +56 -15
  166. package/dist/lib/runner.d.ts +1 -0
  167. package/dist/lib/runner.js +66 -5
  168. package/dist/lib/secrets/bundles.d.ts +16 -3
  169. package/dist/lib/secrets/bundles.js +206 -37
  170. package/dist/lib/secrets/icloud-import.d.ts +2 -2
  171. package/dist/lib/secrets/icloud-import.js +9 -6
  172. package/dist/lib/secrets/mcp.js +1 -1
  173. package/dist/lib/secrets/vault-age-helper.d.ts +1 -0
  174. package/dist/lib/secrets/vault-age-helper.js +34 -0
  175. package/dist/lib/secrets/vault.d.ts +49 -0
  176. package/dist/lib/secrets/vault.js +397 -0
  177. package/dist/lib/self-heal/checks/path.js +3 -1
  178. package/dist/lib/self-heal/checks/shadowing.js +10 -2
  179. package/dist/lib/self-heal/checks/shims.js +19 -11
  180. package/dist/lib/session/cloud.d.ts +2 -2
  181. package/dist/lib/session/cloud.js +2 -2
  182. package/dist/lib/session/db.d.ts +4 -0
  183. package/dist/lib/session/db.js +44 -7
  184. package/dist/lib/session/discover.d.ts +2 -0
  185. package/dist/lib/session/discover.js +114 -3
  186. package/dist/lib/session/stream-render.d.ts +3 -0
  187. package/dist/lib/session/stream-render.js +130 -0
  188. package/dist/lib/session/types.d.ts +6 -0
  189. package/dist/lib/share/analytics.d.ts +13 -0
  190. package/dist/lib/share/analytics.js +45 -0
  191. package/dist/lib/share/config.d.ts +19 -5
  192. package/dist/lib/share/config.js +44 -8
  193. package/dist/lib/share/provision.d.ts +58 -6
  194. package/dist/lib/share/provision.js +97 -22
  195. package/dist/lib/share/publish.d.ts +36 -13
  196. package/dist/lib/share/publish.js +55 -8
  197. package/dist/lib/share/worker-template.js +83 -17
  198. package/dist/lib/shims.d.ts +35 -0
  199. package/dist/lib/shims.js +159 -13
  200. package/dist/lib/ssh-exec.d.ts +14 -0
  201. package/dist/lib/ssh-exec.js +57 -0
  202. package/dist/lib/staleness/detectors/hooks.js +25 -1
  203. package/dist/lib/staleness/detectors/permissions.js +66 -0
  204. package/dist/lib/staleness/detectors/workflows.js +20 -0
  205. package/dist/lib/staleness/writers/hooks.js +58 -4
  206. package/dist/lib/staleness/writers/permissions.js +2 -2
  207. package/dist/lib/staleness/writers/skills.js +1 -1
  208. package/dist/lib/staleness/writers/sources.d.ts +10 -1
  209. package/dist/lib/staleness/writers/sources.js +68 -1
  210. package/dist/lib/star-nudge.d.ts +45 -0
  211. package/dist/lib/star-nudge.js +91 -0
  212. package/dist/lib/startup/command-registry.d.ts +7 -1
  213. package/dist/lib/startup/command-registry.js +19 -3
  214. package/dist/lib/state.d.ts +2 -0
  215. package/dist/lib/state.js +17 -4
  216. package/dist/lib/subagents-registry.d.ts +2 -0
  217. package/dist/lib/subagents-registry.js +3 -0
  218. package/dist/lib/teams/parsers.js +214 -6
  219. package/dist/lib/teams/supervisor.d.ts +7 -0
  220. package/dist/lib/teams/supervisor.js +2 -1
  221. package/dist/lib/template.d.ts +1 -1
  222. package/dist/lib/template.js +1 -1
  223. package/dist/lib/triggers/webhook.js +36 -3
  224. package/dist/lib/types.d.ts +84 -0
  225. package/dist/lib/uninstall.js +1 -45
  226. package/dist/lib/version.d.ts +40 -0
  227. package/dist/lib/version.js +94 -16
  228. package/dist/lib/versions.d.ts +24 -0
  229. package/dist/lib/versions.js +269 -78
  230. package/dist/lib/workflows.d.ts +2 -0
  231. package/dist/lib/workflows.js +88 -0
  232. package/package.json +2 -1
  233. package/dist/commands/daemon.d.ts +0 -10
  234. package/dist/commands/daemon.js +0 -121
package/CHANGELOG.md CHANGED
@@ -1,5 +1,400 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.20.74
4
+
5
+ - **Project resource manifests are now portable across Windows and POSIX.** The
6
+ managed-resource manifest `.agents-managed.json` recorded its paths with the
7
+ host's native separator, so a sync run on Windows wrote entries like
8
+ `skills\myskill`. That file lives in the version-controlled project `.agents`
9
+ dir and travels between machines, and the cleanup pass matches manifest entries
10
+ with `path.sep` — so a manifest written on Windows silently failed to match on
11
+ macOS or Linux and left previously managed files behind on the next sync (and
12
+ vice versa). Manifest paths are now normalized to POSIX separators on write and
13
+ on read, which also repairs manifests written by earlier Windows builds. Source:
14
+ `apps/cli/src/lib/project-resources.ts`.
15
+
16
+ - **`agents import <agent> --isolated` — bring your existing setup into a sandbox.**
17
+ Isolation was a cold start: a new isolated copy began empty, and the only way to get
18
+ settings into it was by hand. A plain `agents import` is the opposite of what is
19
+ wanted here — it *adopts*, moving `~/.<agent>` into a version home, symlinking the
20
+ original away, setting the global default and creating a shim (and is now refused
21
+ outright for an isolated-only agent). `--isolated` copies instead: your settings land
22
+ in the isolated home, your real config stays exactly where it is, and the version is
23
+ finalized the way `agents add --isolated` does — versioned alias and marker, no
24
+ default, no bare shim, no config symlink. Credentials are skipped by default and
25
+ named in the output rather than silently included, since an isolated copy signs in as
26
+ its own principal; `--with-auth` opts in. Symlinks into `~/.agents` are dropped so the
27
+ copy does not depend on the CLI's tree. Source: `apps/cli/src/lib/import.ts`,
28
+ `apps/cli/src/commands/import.ts`.
29
+
30
+ - **`agents use <agent>@<isolated>` now works, and a bare `agents run <agent>` reaches
31
+ your isolated copy.** Isolated installs were unreachable by name: `resolveVersion`
32
+ ended at the global default, and an isolated install deliberately never becomes one —
33
+ so `agents use` refused, and an isolated-only user had to type the full
34
+ `agents run codex@0.144.6` every time while a bare `agents run codex` fell through to
35
+ whatever `codex` meant on PATH. `use` now records an **isolated default** instead of
36
+ refusing, and resolution falls back to it (`project pin -> global default -> isolated
37
+ default`). Strictly a fallback, so nothing changes for anyone who has a global
38
+ default. The pointer lives in `isolatedAgents:` in `agents.yaml`, never in the global
39
+ `agents:` map — that separation is what keeps `getGlobalDefault` incapable of
40
+ returning an isolated version, and with it the launcher, bare shim, config symlink and
41
+ self-heal `shadowing` check all stay out of reach. It is verified on read and
42
+ re-pointed (or cleared) on removal, so it can never resolve to a version that is gone.
43
+ `agents view` labels it `(isolated default)`. Source: `apps/cli/src/lib/versions.ts`,
44
+ `apps/cli/src/commands/versions.ts`, `apps/cli/src/commands/view.ts`.
45
+
46
+ - **`agents export <agent>[@<version>]` — take an isolated install's config with you.**
47
+ `--isolated` was a one-way door: it builds a self-contained home under the version
48
+ dir and nothing ever brings that work back, so a user who configured a sandboxed copy
49
+ for a week had to copy files by hand to promote it — or to leave. Export is additive
50
+ by default: it copies only paths you don't already have, and a collision is **not**
51
+ silently skipped — the incoming file is written beside yours as
52
+ `<name>.from-agents-cli` so you can `--diff` it and take the parts you want. Your
53
+ files are never modified. `--replace` promotes a sandbox wholesale (yours is moved to
54
+ `backups/<agent>/<ts>`, and it is the only mode that asks for confirmation);
55
+ `--staged` dumps the tree into `~/.<agent>/.agents-export-<ts>/` and activates
56
+ nothing. Every mode strips symlinks pointing back into `~/.agents` so the result
57
+ keeps working after agents-cli is gone, keeps your own symlinks, and writes a receipt
58
+ to `~/.<agent>/.agents-cli-export.json` recording exactly what came from the export —
59
+ which makes "which of these files are mine?" answerable and the whole thing
60
+ reversible. A `~/.<agent>` that agents-cli already adopted is refused, since writing
61
+ there would mutate that version's home rather than your config. File *contents* are
62
+ never auto-merged: the TOML parser here drops comments across parse+stringify, so
63
+ unioning keys would silently delete them. Source: `apps/cli/src/lib/export.ts`,
64
+ `apps/cli/src/commands/export.ts`, `apps/cli/src/lib/config-transfer.ts`.
65
+
66
+ - **An isolated-only agent can no longer be adopted by anything.** `--isolated` used to
67
+ be defined by what it *doesn't* do — no global default, no bare shim, no config
68
+ symlink, no PATH edit — which meant every code path that could adopt an agent had to
69
+ remember to check first. It leaked three times that way. Protection is now derived
70
+ from the `.isolated` markers on disk (`isIsolationProtected`: at least one installed
71
+ version, and every one isolated) and enforced inside the five primitives that can
72
+ cross the boundary — `setGlobalDefault`, `createShim`, `switchConfigSymlink`,
73
+ `switchHomeFileSymlinks`, `adoptShadowingLauncher` — so refusal is a property of the
74
+ code rather than a convention. There is no mode to set and none to forget: installing
75
+ with `--isolated` *is* the opt-in, it is per-agent, and the escape hatch is inherent
76
+ (remove the isolated copies and the agent is ordinary again). `agents add`,
77
+ `agents import` and `doctor --adopt` refuse with guidance rather than a stack trace —
78
+ `import` is additionally checked at its entry point, because it registers the adopted
79
+ install as a normal version *before* adopting, which would otherwise un-protect the
80
+ agent underneath the primitive gate. Clearing a global default stays allowed, since
81
+ removal legitimately clears one as an agent becomes isolated-only. A completeness test
82
+ pins the primitive list and scans for any new ungated mutator. Source:
83
+ `apps/cli/src/lib/shims.ts`, `apps/cli/src/lib/versions.ts`,
84
+ `apps/cli/src/lib/isolation-boundary-report.ts`.
85
+
86
+ - **`agents view` no longer hides your own CLI behind an isolated install.** The listing
87
+ was either/or per agent: any managed version at all suppressed the "Not Managed by
88
+ Agents CLI" block, so a single `agents add <agent>@<v> --isolated` made the user's
89
+ globally-installed CLI disappear from the one command they'd run to confirm
90
+ `--isolated` had left it alone. Nothing on disk was ever touched — the isolation
91
+ boundary holds — but the report read exactly like the damage it was supposed to rule
92
+ out. Isolated copies now render alongside the global install and are tagged
93
+ `9.9.4 (isolated)`; a normal (non-isolated) version still takes the launcher over and
94
+ still suppresses the global row, since that row would just be our own shim. The global
95
+ row is also resolved from PATH now (`getUnmanagedCliState`) instead of from the version
96
+ dirs, which could otherwise report an isolated copy — deliberately unreachable from
97
+ PATH — as `(global)`. Source: `apps/cli/src/commands/view.ts`, `apps/cli/src/lib/agents.ts`.
98
+
99
+ ## 1.20.73
100
+
101
+ - **`agents cli install <binary-cli>` no longer hardcodes `/usr/local/bin` (#1103).**
102
+ Binary-method installs downloaded (and extracted archives) straight into
103
+ `/usr/local/bin`, which fails with `EACCES` on Apple Silicon Macs where that
104
+ directory is root-owned and not user-writable. A new `resolveBinDir()` picks
105
+ the install directory instead: honor `AGENTS_CLI_BIN_DIR` if set, else prefer
106
+ `~/.local/bin` (created on demand — the same XDG user-bin dir shims already
107
+ use), else fall back to `/usr/local/bin` with an actionable error pointing at
108
+ `AGENTS_CLI_BIN_DIR` / `~/.local/bin` instead of a bare `EACCES`. Source:
109
+ `apps/cli/src/lib/cli-resources.ts`, `apps/cli/src/lib/cli-resources.test.ts`.
110
+
111
+ - **Stream host follows over one persistent SSH connection (RUSH-1407).** `run --host` and `hosts logs -f` now follow remote logs with a long-lived `tail -f` stream that reconnects from the saved byte offset and captures the remote `.exit` code without per-cycle SSH spawns. Source: `apps/cli/src/lib/hosts/progress.ts`.
112
+
113
+ - **Reuse warm crabbox boxes from `agents run` (RUSH-1609).** `agents run <agent> "<task>" --box <slug>` now targets an existing warm crabbox box, runs the same bootstrap and credential provisioning as `--lease`, and leaves the box running for reuse across repositories. Source: `apps/cli/src/commands/exec.ts`, `apps/cli/src/lib/crabbox/lease.ts`.
114
+
115
+ - **Show reasoning in Factory progress timelines (RUSH-1634).** Factory detail panes now interleave assistant prose and reasoning summaries with tool calls in the Progress rail, so agent activity explains intent instead of showing only file/tool touches. Source: `apps/factory/src/core/session.summary.ts`, `apps/factory/ui/settings/components/mission-control/Timeline.tsx`.
116
+
117
+ - **Expose an Agents HQ floor snapshot bridge (RUSH-1638).** `agents hq floor --json` now emits a machine-readable floor snapshot that joins live sessions, teams, feed blocks, room placement, ambient events, and command-backed actions for HQ clients. Source: `apps/cli/src/commands/hq.ts`, `apps/cli/src/lib/hq/floor.ts`.
118
+
119
+ - **Menu-bar Quick Dispatch attaches selected screenshots after ticket creation (RUSH-1693).** The helper now uploads every selected quick-capture screenshot to the created Linear issue itself after parsing the `Created RUSH-###` result, instead of relying on the ticket agent to run a second proof-upload command from its prompt. Source: `apps/cli/menubar/Sources/MenubarHelper/AgentsCLI.swift`, `apps/cli/menubar/Sources/MenubarHelper/IssueSelfTest.swift`, `apps/cli/docs/menubar.md`.
120
+
121
+ - **Move supported OpenClaw secrets into Keychain-backed refs (RUSH-175).** `agents secrets openclaw-keychain migrate` now stores supported OpenClaw plaintext credentials in macOS Keychain, rewrites OpenClaw config fields to exec SecretRefs, and refuses to delete top-level env secrets that have no supported SecretRef target. Source: `apps/cli/src/lib/openclaw-keychain.ts`, `apps/cli/src/commands/secrets.ts`, `apps/cli/docs/secrets.md`.
122
+
123
+ - **Provision share workers completely (RUSH-1792).** `agents share setup` now configures the R2 lifecycle rule and sets the Worker `WRITE_TOKEN` through Cloudflare's Workers Secrets API after deploying the R2-bound Worker. Source: `apps/cli/src/lib/share/provision.ts`.
124
+
125
+ - **Extract a reusable share-publish endpoint seam (RUSH-1794).** `agents share <file>` now delegates its authenticated PUT (bearer token, `--slug`, `--expire`) through `publishToEndpoint`, decoupled from config/keychain loading, with a real-HTTP test asserting the wire contract. Source: `apps/cli/src/lib/share/publish.ts`.
126
+
127
+ - **Map the default share domain automatically (RUSH-1796).** `agents share setup` now maps `share.agents-cli.sh` when the Cloudflare token can see the `agents-cli.sh` zone, while keeping the workers.dev endpoint when it cannot and honoring `--domain` overrides. Source: `apps/cli/src/commands/share.ts`, `apps/cli/docs/share.md`.
128
+
129
+ - **Expire shared artifacts end to end (RUSH-1797).** `agents share --expire` now stores
130
+ `expires-at` metadata for the Worker to enforce and `agents share setup` installs a
131
+ managed R2 lifecycle rule so old share objects self-clean. Source:
132
+ `apps/cli/src/lib/share/{publish,provision,worker-template}.ts`.
133
+
134
+ - **`agents share` central mode now follows synced config plus injected write tokens (RUSH-1798).** `agents share join` can bind an existing synced endpoint without reprovisioning, publish reads `SHARE_WRITE_TOKEN` from runtime env before falling back to the local `share` bundle, and agent/team/supported cloud launches propagate the token when it is already available so ephemeral agents can publish durable links with no Cloudflare setup. Source: `apps/cli/src/commands/share.ts`, `apps/cli/src/lib/share/config.ts`, `apps/cli/src/commands/exec.ts`, `apps/cli/src/commands/cloud.ts`, `apps/cli/src/commands/teams.ts`, `apps/cli/src/lib/cloud/rush.ts`, `apps/cli/src/lib/cloud/factory.ts`, `apps/cli/src/lib/cloud/codex.ts`.
135
+
136
+ - **Plan-render auto-publish plumbing (RUSH-1799).** `agents share <file> --json`
137
+ now emits a stable `{ url, coverUrl, expiresAt }` result so plan-render hooks can
138
+ publish rendered HTML and post the returned link without scraping terminal output.
139
+ Source: `apps/cli/src/commands/share.ts`, `apps/cli/src/lib/share/publish.ts`.
140
+
141
+ - Added `agents share` regression coverage for token storage, publish upload headers, expiry metadata, and Cloudflare provisioning request shapes without calling real Cloudflare in CI. Source: `src/lib/share/{config,publish-file,provision}.test.ts`, `src/lib/share/provision.ts`.
142
+
143
+ - `agents repo pull` now fast-forwards the local checkout after fetch
144
+ (`--ff-only` semantics) and reports when it is blocked by local changes or
145
+ local commits instead of leaving the checkout behind origin. The system repo
146
+ uses the same fast-forward path as user and extra repos.
147
+
148
+ - **`agents share` default links are much harder to guess (RUSH-1821).** The random
149
+ tail of an auto-generated share slug is now a 64-bit nonce (`randomBytes(8)`, 16 hex
150
+ chars) instead of the old 24-bit / 6-hex tail — closing a `~16.7M`-possibility space
151
+ that was small enough to brute-force. Since share reads are public (the URL is the only
152
+ capability), the nonce is the whole defense, so it now carries the full 64 bits.
153
+ Passed-in `--slug` values and existing links are unchanged. `docs/share.md` now states
154
+ the security model explicitly (unlisted-not-secret; reads are public; use `--expire`
155
+ for sensitive content; an opt-in auth-gated read is a future option). Source:
156
+ `apps/cli/src/lib/share/publish.ts` (`defaultSlug`), `apps/cli/src/lib/share/publish.test.ts`,
157
+ `apps/cli/docs/share.md`.
158
+
159
+ - **`agents secrets list`/`view` gain `--json` (RUSH-1834).** Agents can now discover which secrets bundles and keys exist as machine-readable JSON before injecting one — `list --json` emits bundle metadata (name, key count, policy, backend, timestamps) and `view <bundle> --json` lists each key with its kind and stored/missing state. Values stay `null` unless `--reveal` (which keeps the same non-TTY `--plaintext` gate and audit event as the human view), so the discovery surface never leaks a secret. Gated on the explicit `--json` flag, not `stdout.isTTY`. Source: `apps/cli/src/commands/secrets.ts`.
160
+
161
+ - **Per-user URL namespaces + privacy-first analytics for `agents share` (RUSH-1835).**
162
+ Shares now publish under the publisher's GitHub username (`share.agents-cli.sh/<user>/<slug>`),
163
+ with `/<user>` rendering a public gallery and legacy flat slugs still resolving. Every HTML
164
+ publish also injects a cookieless Cloudflare Web Analytics beacon (opt out with
165
+ `--no-analytics`). Configure the token during `agents share setup --analytics-token`, and
166
+ check status with `agents share status` / `agents share analytics`. Source:
167
+ `apps/cli/src/commands/share.ts`, `apps/cli/src/lib/share/{publish,analytics,worker-template}.ts`,
168
+ `apps/cli/src/lib/git.ts`, `apps/cli/docs/share.md`.
169
+
170
+ - **Codex no longer breaks on macOS when its versioned `CODEX_HOME` overflows the
171
+ Unix-socket `SUN_LEN` limit.** Codex binds an app-server control socket at
172
+ `$CODEX_HOME/app-server-control/app-server-control.sock`, and macOS caps Unix
173
+ socket paths at 104 bytes (`SUN_LEN`). agents-cli points `CODEX_HOME` at the deep
174
+ versioned home (`~/.agents/.history/versions/codex/<version>/home/.codex`), which
175
+ for a typical user is long enough that the derived socket path exceeds 104 bytes —
176
+ so `codex app-server daemon start` failed with `path must be shorter than
177
+ SUN_LEN` and every codex spawn on macOS died (this took down every OpenClaw agent
178
+ on a mac-mini). Codex exposes no socket-path override and resolves symlinks before
179
+ binding, so a short symlink to the deep home does not help. The codex shims and
180
+ `buildExecEnv` now detect the overflow on macOS and relocate the home once to a
181
+ short real directory under `~/.agents/.codex-homes/<version>/.codex` (leaving a
182
+ symlink behind so the versioned path still resolves), keeping config, auth, and
183
+ state intact. A caller-set `CODEX_HOME` is always respected. Source:
184
+ `apps/cli/src/lib/codex-home.ts` (new), `apps/cli/src/lib/shims.ts`,
185
+ `apps/cli/src/lib/exec.ts`.
186
+
187
+ - **Gate GitHub webhook routines on pull request labels (RUSH-203).** `agents routines add --on github:pull_request` and `agents cloud run --on pr` now preserve GitHub `--action` and `--label` filters, so a UX test routine can fire only when a PR receives `ux-approved`. Source: `apps/cli/src/lib/routines.ts`, `apps/cli/src/lib/triggers/webhook.ts`, `apps/cli/src/commands/routines.ts`, `apps/cli/src/commands/cloud.ts`.
188
+
189
+ - **Remove the deprecated `agents daemon` command tree (RUSH-403).** The legacy `agents daemon start|stop|status|logs` aliases are gone for v2.0; use `agents routines start|stop|status|scheduler-logs` for scheduler controls. Source: `apps/cli/src/lib/startup/command-registry.ts`, `apps/cli/src/index.ts`, `apps/cli/src/lib/daemon.ts`, `apps/cli/docs/03-routines.md`.
190
+
191
+ Added top-level resource profiles via `agents profile use`, filtering synced resources and secrets bundles by the active profile.
192
+ Fixed source-qualified resource profile selectors for permission groups and workflows so `project:`, `user:`, and `system:` patterns match the real resource layer.
193
+ Fixed `resolveResource` to fall through to lower-precedence layers when a higher-layer match is excluded by the active profile, matching `listResources` behavior.
194
+
195
+ - **Support multiple accounts per secrets bundle (RUSH-668).** Secrets bundle keys now accept `BASE.account` names such as `GITHUB_USERNAME.personal`; selected account variants inject as the base env key and conflicting variants fail loud unless narrowed with `--keys`. Source: `apps/cli/src/lib/secrets/bundles.ts`, `apps/cli/docs/secrets.md`.
196
+
197
+ - **Harden synced vault writes (RUSH-682).** Synced secret mutations now lock the vault across the full read-modify-write cycle and persist through an atomic rename, preventing concurrent CLI processes from losing each other's bundle updates. Source: `apps/cli/src/lib/secrets/vault.ts`.
198
+
199
+ ## Features
200
+
201
+ - Added `agents login`, `agents logout`, and `agents whoami` plus `agents secrets create --synced` for age-encrypted synced secrets stored in `~/.agents/vault.age`.
202
+ - Protected synced secrets vaults from accidental replacement: `agents login --create` and `agents login --join <path>` now require `--force` before replacing an existing `vault.age`, and synced bundle writes batch metadata plus stored keys into one vault update.
203
+ - Synced vault encryption now runs without re-executing the `agents` binary, so standalone macOS installs can encrypt and decrypt vault data reliably; new vault writes also use the age library's default scrypt work factor.
204
+
205
+ - **Keep project resources in workspace config (RUSH-705).** Project-scoped commands,
206
+ skills, subagents, and workflows now sync into the current workspace's `.<agent>/`
207
+ directory instead of lingering in global agent version homes. Source:
208
+ `apps/cli/src/lib/project-resources.ts`.
209
+ - **Track Goose workflow subrecipes from first sync (RUSH-705).** Goose workflow
210
+ `.subrecipes/` directories are tracked in the ownership manifest from the first
211
+ sync, preventing workflows from being incorrectly skipped on later syncs. Source:
212
+ `apps/cli/src/lib/project-resources.ts`.
213
+
214
+ - **`agents activity` — an event-sourced view of what agents *did*.** A new append-only, per-session event log (`~/.agents/.history/activity/<sessionId>.jsonl`) records agent-semantic milestones at hook time (plans, PRs, worktrees, sub-agents, artifacts) with no transcript re-parsing. `agents activity` renders the stream newest-first (milestones individually, routine edits collapsed to a count); `agents feed` gains a compact recent-activity lane. Source: `apps/cli/src/lib/activity.ts`, `apps/cli/src/commands/activity.ts`.
215
+
216
+ - **Lease command surface: reuse picker, devices section, step UI, and Tailscale net-mode (RUSH-1922/1923/1924).**
217
+ Wires the command layer onto the merged crabbox-core lib:
218
+ - **Reuse (F3).** On an interactive `agents run … --lease`, a picker lists your
219
+ warm boxes (`ready` + unexpired, most-recently-touched first) and offers
220
+ "Provision a fresh box" / "Always provision fresh (remember for this repo)".
221
+ New flags: `--reuse` (scriptable — auto-pick the freshest warm box, else
222
+ fresh) and `--bare` (skip copying your local `~/.agents` setup onto the box,
223
+ i.e. `copySetup=false`). Headless / `--json` never blocks — it provisions
224
+ fresh unless `--reuse`/`--box` is given. New subcommands `agents lease list`
225
+ (`--json`) and `agents lease stop <slug>`.
226
+ - **Step UI (F2).** The box-side setup now renders as a live checklist —
227
+ each `___PHASE_<name>___` step from the lib's `onStep` stream prints via
228
+ `renderStepLine` (✔ Step — detail (elapsed)). Non-TTY prints one line per
229
+ step; `--json` emits `{phase:"setup",name,elapsedMs}` events. Host-side
230
+ warmup/ready/teardown phases are unchanged.
231
+ - **Devices (F4).** `agents devices` gains a live "Leased boxes (ephemeral ·
232
+ via crabbox)" section computed from `crabboxList()` — never written into the
233
+ device registry. `agents ssh <slug>` now resolves a leased-box slug and
234
+ connects to `crabbox@<tailnet-or-ip>:2222`.
235
+ - **Net-mode (F5).** New `--tailscale` / `--no-tailscale` on `agents run`.
236
+ `netMode = (--tailscale || reuse-context) && !--no-tailscale` (a solo
237
+ one-shot `--lease` stays public) is threaded into the lease so the lib leases
238
+ onto the tailnet. `agents lease setup` now also captures a Tailscale auth key
239
+ (EPHEMERAL, pre-authorized, `tag:crabbox`) into the `tailscale.com` secrets
240
+ bundle as `CRABBOX_TAILSCALE_AUTH_KEY`; when Tailscale is requested with no
241
+ key configured the run falls back to a public lease with an actionable hint.
242
+ The final "box ready/kept" line surfaces the box's tailnet FQDN/IP.
243
+
244
+ Source: `apps/cli/src/commands/exec.ts`, `apps/cli/src/commands/lease.ts`,
245
+ `apps/cli/src/commands/ssh.ts` (+ `*.test.ts`).
246
+
247
+ - Add GitHub Copilot CLI permission sync, writing supported allow rules to `.copilot/permissions-config.json`.
248
+
249
+ - **Lease lifecycle: setup-copy, step progress, and tailscale plumbing (RUSH-1920/1921/1924).** `agents run --lease` gains a library core the command layer wires up: `copySetupToBox` pushes the git-tracked subset of the local `~/.agents` onto the box and refreshes it (never `~/.claude`); the box bootstrap now echoes `___PHASE_<name>___` sentinels parsed into a structured `LeaseStep` stream (`onStep` + `renderStepLine`); and a `netMode: 'tailscale'` path leases boxes onto the tailnet (`--network tailscale -tailscale-tags tag:crabbox`, `CRABBOX_TAILSCALE_AUTH_KEY` from a secrets bundle) with `CrabboxBox.tailscaleIPv4`/`tailscaleFQDN` parsed from box labels. Source: `apps/cli/src/lib/crabbox/setup-copy.ts`, `apps/cli/src/lib/crabbox/progress.ts`, `apps/cli/src/lib/crabbox/lease.ts`, `apps/cli/src/lib/crabbox/cli.ts`.
250
+
251
+ - **`agents cloud run --json` now emits machine-readable failures.** `die()` — the
252
+ shared fatal-exit path — always wrote red text to stderr and left stdout empty,
253
+ so an agent parsing `--json` output saw nothing plus a bare nonzero exit with no
254
+ reason. `die()` gains an optional `{ json, hint }` and, in json mode, prints
255
+ `{"error", "hint"?}` to stdout; a pure `formatDie()` makes the human/agent split
256
+ unit-testable. Every failure path in `cloud run` now threads the resolved
257
+ `--json` flag. Source: `apps/cli/src/lib/format.ts`, `apps/cli/src/commands/cloud.ts`.
258
+ (RUSH-1830)
259
+
260
+ - **Show live Droid quota bars in `agents view` (RUSH-1357).** Factory billing
261
+ limits now render as `S`/`W`/`M` windows for Droid, matching Claude's live-usage
262
+ display. Source: `apps/cli/src/lib/usage.ts`.
263
+
264
+ - **`agents events` is now one unified stream — operational + agent activity.** Agent-semantic events (plans, PRs, worktrees, sub-agents, artifacts) share the event vocabulary and read through the same reader as operational events (secrets, teams, commands), newest-first. `--module activity` shows agent events, `--audit` restricts to operational only, and all existing filters (`--event`, `--agent`, `--since`, `--command`) apply across both. New `readUnifiedEvents` (`apps/cli/src/lib/event-stream.ts`) is the single read surface for higher-level features. Source: `apps/cli/src/lib/events.ts`, `apps/cli/src/lib/activity.ts`, `apps/cli/src/commands/events.ts`.
265
+
266
+ - **The daemon no longer crash-loops on headless Linux when a routine is overdue.**
267
+ On an overdue routine the daemon fires a best-effort desktop notification via
268
+ `notify-send` (Linux) / `osascript` (macOS). A missing notifier binary — the
269
+ default on a headless box without `libnotify-bin` — surfaces as an asynchronous
270
+ `spawn` `'error'` event, not the synchronous throw the surrounding `try/catch`
271
+ expected, so Node re-threw it as an uncaught exception and killed the daemon.
272
+ systemd then restart-looped it every ~10s, which also tore down the browser IPC
273
+ socket (`agents browser start` failed with "Timeout waiting for browser daemon
274
+ socket"). Both notifier spawns now carry an `'error'` listener so the failure is
275
+ swallowed as the "best-effort" contract already promised. Source:
276
+ `apps/cli/src/lib/overdue.ts`, `apps/cli/src/lib/overdue.test.ts`.
277
+
278
+ - **`agents fleet apply` — reconcile the fleet from under the `fleet` verb.** The idempotent reconcile engine already shipped as top-level `agents apply`, but users who reach for `fleet`/`devices` as the noun (`fleet capture`, `fleet login`, `fleet status`) had no matching `fleet apply`. This surfaces the identical command as `agents fleet apply` (and `agents devices apply`) via a shared configurator, so the two can never drift — same flags, same engine, same `--plan`/`--device`/`--only` semantics. Pure discoverability alias; no behavior change to `agents apply`. Source: `apps/cli/src/commands/apply.ts` (`configureApplyCommand`, `registerFleetApplyAlias`), `apps/cli/src/commands/ssh.ts`.
279
+
280
+ - **`agents fleet login` now finds the agent CLIs on the remote box.** The remote drive ran the login command over a non-login SSH shell (`ssh <box> kimi`), where the agents-cli shims (`~/.agents/.cache/shims`) are not on PATH — so `kimi`/`droid`/`codex` were "command not found" and the device-code scrape always timed out. The remote command now prepends the shim dir (resolved on the box via `$HOME`) to PATH so the login program launches. Source: `apps/cli/src/lib/fleet/remote-login.ts`.
281
+
282
+ - **New `agents fleet login` — log agent CLIs into every fleet box over SSH from one browser page.** File-copying one OAuth credential across N machines is fatal: a shared refresh token rotates server-side on first refresh and invalidates the other copies. The durable fix is a per-machine login (one interactive OAuth per agent x box), and this command makes that bearable. It drives each box's device-code flow through the PTY sidecar (`ssh -tt <box> <loginCmd>`), scrapes the verification URL + user code, and surfaces every pending login in ONE local dark/light dashboard with per-code `Authorize` deep-links and TTL countdowns — so you enter codes back-to-back instead of babysitting N terminals. Default mode requests all codes concurrently; `--interactive` walks one box at a time, requesting each code just-in-time so the ~15-min TTL can't expire while you work. Only true device-code flows are driven (droid, codex, kimi); loopback / keychain-bound / uncharacterized agents (claude, gemini, antigravity, opencode, grok) are flagged non-remotable with an honest reason instead of a mis-drive. Flags: `--agents <csv>`, `--devices <csv>`, `--all`, `--interactive`, `--json`. Source: `apps/cli/src/lib/fleet/remote-login.ts`, `apps/cli/src/lib/fleet/auth-sync.ts` (`FLEET_LOGIN_FLOWS`), `apps/cli/src/commands/ssh.ts`, `apps/cli/src/lib/open-url.ts`.
283
+
284
+ - **`agents fleet ping` stops crying wolf on healthy accounts.** The auth matrix
285
+ painted a fully-logged-in fleet as half-broken: `codex`/`grok` (which have no
286
+ in-repo live-probe endpoint) rolled up as an alarming yellow `0/N`, and the
287
+ `--verbose` per-account list painted `expired` **red** — lumped with a real
288
+ `revoked` — even though `expired` is soft and self-refreshes on the CLI's next
289
+ launch (kimi/droid). Both renderers now share one truthful color model
290
+ (`verdictColor` / `authCellColor`): red is reserved for `revoked` (the only
291
+ "re-login now"); `unverified` reads as neutral **gray** "signed in
292
+ (unverifiable)"; `expired`/`rate_limited`/`error` are soft **yellow**; and the
293
+ cell numerator counts signed-in accounts (`live + present`) so a logged-in codex
294
+ fleet reads `1/1`, not `0/1`. Separately, `fleet ping --verbose` now actually
295
+ emits the per-account breakdown: the root program's global `--verbose` was
296
+ shadowing the subcommand flag, so the breakdown was silently unreachable — the
297
+ action now reads the effective value from the merged globals. Source:
298
+ `apps/cli/src/lib/auth-health.ts`, `apps/cli/src/commands/ssh.ts`,
299
+ `apps/cli/src/lib/auth-health.test.ts`.
300
+
301
+ - **Wire allowlist support for ForgeCode and Hermes (RUSH-1748, RUSH-1749).** ForgeCode now receives permission groups as `~/.forge/permissions.yaml` operation-family policies (`read`, `write`, `command`, `url`) for built-in tools; this file is active only when `.forge.toml` has `restricted = true`, and MCP tools bypass it. Hermes now receives command allow rules in `~/.hermes/config.yaml` `command_allowlist` and deny globs in `approvals.deny`, preserving sibling YAML keys such as `mcp_servers` and `hooks`. Source: `apps/cli/src/lib/agents.ts`, `apps/cli/src/lib/permissions.ts`, `apps/cli/src/lib/resources/permissions.ts`, `apps/cli/src/lib/staleness/detectors/permissions.ts`, `apps/cli/docs/{00-concepts,02-resource-sync}.md`.
302
+
303
+ - **`agents run --lease`/`--box` fail fast outside a git repo instead of billing a dead box.** crabbox syncs the working directory to the leased box with `git ls-files`, so from a non-git directory the run died at `build sync file list: exit status 128` — but only *after* provisioning (and billing) the box. `agents run` now checks the working directory is a git repo before provisioning and exits with an actionable message (`… is not a git repository. Run from inside a git repo, or initialize one: (cd <dir> && git init)`). Source: `apps/cli/src/commands/exec.ts`.
304
+
305
+ - **Fix `agents run --lease` setup-copy (and `agents ssh <slug>`) to actually reach the box.** Both used a raw `ssh crabbox@ip:2222`, which fails `publickey` — crabbox provisions a per-lease identity key. They now tunnel through crabbox's own ssh invocation (`crabbox ssh --id <slug> --reclaim`), so the git-tracked `~/.agents` config really lands on a leased box (`agents repo refresh` then materializes it) and `agents ssh <slug>` connects. Verified end-to-end on a real Hetzner box. Source: `apps/cli/src/lib/crabbox/{setup-copy,cli}.ts`, `apps/cli/src/commands/ssh.ts`.
306
+
307
+ - **Fix the Linear `--label` trigger filter matching nothing.** `routines` and
308
+ `monitors` jobs triggered on `linear:Issue` with `--label <name>` never fired:
309
+ the matcher read `data.labels.nodes[].name` (the GraphQL-query connection
310
+ shape), but Linear webhook bodies flatten list relations — `data.labels` is a
311
+ flat array of label objects. The `.nodes` read always yielded `[]`, so every
312
+ label filter silently failed to match. It now reads the flat array. The prior
313
+ unit test fixtured the same wrong shape, so the suite was green while the
314
+ integration was dead; the fixture now uses the real webhook shape and a
315
+ regression test locks it. Source: `apps/cli/src/lib/triggers/webhook.ts`.
316
+
317
+ - **`agents menubar` now works from the Bun single-file binary.** When the CLI runs
318
+ as the compiled Bun executable, `import.meta.url` points inside the virtual
319
+ `/$bunfs/` bundle, so the menu-bar helper couldn't find the shipped
320
+ `MenubarHelper.app` on disk (`bundle source: missing (cannot enable)`) or read its
321
+ own `package.json` (`current version: unknown`, and a perpetual "stale" warning).
322
+ `enable` refused with "no menu-bar helper bundle ships with this install." Version
323
+ and bundle resolution now fall back to the real on-disk install, located by
324
+ following the `agents` launcher symlink, so `enable`/`disable`/`status` behave the
325
+ same whether the CLI runs under Node or the Bun binary. Source:
326
+ `apps/cli/src/lib/version.ts`, `apps/cli/src/lib/menubar/install-menubar.ts`.
327
+
328
+ - Add OpenClaw workflow sync by projecting agents-cli workflows into Lobster `.lobster` files under `.openclaw/workflows/`.
329
+
330
+ - **Fix the PTY sidecar (`agents pty`, interactive `agents teams`, `agents fleet login`) on the macOS standalone binary.** Since the macOS release became a `bun --compile` standalone (#315), the sidecar was spawned AS that binary (`process.execPath pty _server`) — but a Bun standalone cannot `require()` a native addon, so node-pty's `pty.node` failed to load (`Cannot require module ../build/Debug/pty.node`) and every PTY-backed command died with "PTY server failed to start within 5 seconds." `getServerSpawnArgs` now detects the standalone case and runs the sidecar via a real `node` executing the `dist/index.js` that ships beside the binary (where the prebuilt `pty.node` loads from disk), falling back to the binary only when no node / no dist is found. Verified end-to-end against a real compiled Mach-O standalone. Source: `apps/cli/src/lib/pty-client.ts`.
331
+
332
+ - `agents sessions` now indexes routine-run transcripts from durable run history; use `agents sessions --routine --all` or `agents sessions <run-id>` to inspect a routine run with the existing summary view.
333
+
334
+ - **`agents routines add`, `run`, and `runs` now support `--json`.** Previously only
335
+ `list`/`status` emitted JSON, so an agent creating a routine or triggering a run
336
+ had to scrape human strings for the job name / run id. `add` emits
337
+ `{ ok, added, job }`, `run` emits `{ ok, job, runId, logDir }`, and `runs` emits an
338
+ array of run records — all on stdout, with the scheduler-start banner suppressed so
339
+ it never pollutes the JSON stream. Source: `apps/cli/src/commands/routines.ts`.
340
+ (RUSH-1833)
341
+
342
+ - **`agents run <agent>` no longer hangs when launched headless without a prompt.**
343
+ A run with no prompt and no explicit `--interactive` resolves to interactive
344
+ intent — but in a non-TTY shell (a headless agent, a pipe, CI) there is no
345
+ terminal to host the REPL, so it attached a TUI to dead stdin and hung forever.
346
+ It now fails fast with the headless alternatives (`agents run <agent> "<task>"`
347
+ or `agents run <agent> --headless` to read the prompt from stdin). An explicit
348
+ `--interactive` is still honored. Source: `apps/cli/src/commands/exec.ts`,
349
+ `apps/cli/src/lib/exec.ts` (`inferredInteractiveWithoutTty`). (RUSH-1829)
350
+
351
+ - Menu bar routines now include latest run `exitCode` and `failureReason` from `agents routines list --json`, show failed routine reasons inline, label healthy-but-overdue routines as `overdue` instead of `exit 0`, and open the concise logs summary instead of a raw Terminal dump.
352
+
353
+ - Show Droid teammate activity in `agents teams collect` by normalizing stream-json tools, file edits, and final messages.
354
+
355
+ Fix: route remaining specialized direct SSH spawns through the shared hardened SSH baseline.
356
+
357
+ - **Agent feed dispatch now keeps local and remote answer paths separate (RUSH-1472).** `agents feed` only applies stall suppression, default-on-no-answer policy, and dispatch controls to blocks owned by the local machine, so remote feed rows cannot enqueue answers into the wrong local mailbox. Per-block `timeoutMinutes` is honored for approval defaults and decision parking, policy/default answers are tested against the real mailbox spool, block-specific `allowedOperators` restrict high-consequence answers, and urgent notification text is emoji-free. Source: `apps/cli/src/commands/feed.ts`, `apps/cli/src/lib/{ask-classifier,feed,feed-policy,notify}.ts`.
358
+
359
+ - **`agents feed` ranks blocked agents by cost of delay and surfaces runaway/needy control cards (RUSH-1478).** Open blocks are sorted by idle time, downstream blast radius, dollar burn rate, and classifier irreducibility, while silent high-burn/relaunch-loop agents and chronic askers render once as control cards with `ag feed --pause` / `ag feed --kill` actions. Source: `apps/cli/src/lib/feed-ranking.ts`, `apps/cli/src/commands/feed.ts`, `apps/cli/src/lib/feed.ts`.
360
+
361
+ - Make live session follows compact by default: `agents sessions tail` now prints low-noise message/tool/result lines unless `--json` is passed, and `agents logs -f <id>` keeps raw transcript streaming behind `--full`.
362
+
363
+ - **Fix `agents repo refresh` for stale plugin skill shadows.** Full refresh now forces a materialization pass, copies trusted plugin-bundled skills into legacy top-level agent-home skill dirs when those names already matter to the agent, and prunes orphaned top-level skill dirs whose source no longer exists.
364
+
365
+ - `agents run <profile> --lease` now provisions the profile's host runtime and temporary profile config on the leased box without copying base-runtime OAuth credentials when the profile authenticates with its own API key, including OpenCode and Antigravity-hosted profiles.
366
+
367
+ - `agents pty` now starts its sidecar correctly from the standalone CLI binary and includes the spawned command plus recent sidecar log lines when startup fails.
368
+
369
+ - Fixed `agents secrets openclaw-keychain migrate` so OpenClaw Keychain writes no longer expose secret values in process argv, and migration now fails closed when matching plaintext credentials disagree.
370
+
371
+ - `agents share setup` and `agents setup share` now read Cloudflare provisioning credentials from the `cloudflare` secrets bundle and persist the Worker write token as `WRITE_TOKEN` in the `share` bundle, matching the setup/onboarding contract while keeping endpoint config in `agents.yaml` under `share:`.
372
+
373
+ - Fix `agents routines list` and `agents routines view` so a project-layer routine with the same name no longer hides the user-layer `devices` allowlist written by `agents routines devices --set`.
374
+
375
+ - Keep piped CLI output human-readable unless `--json` is passed.
376
+
377
+ - Add `--json` to `agents monitors view` and `agents monitors test`, and send monitor errors to stderr so JSON stdout stays parseable.
378
+
379
+ - Add `--json` output to `agents routines add`, `agents routines run`, and
380
+ `agents routines runs` so scripts can capture routine and run ids without scraping human text.
381
+
382
+ - Fix hook directory sync status so bundled hook directories such as `hooks/tests` copy correctly and no longer appear permanently drifted after sync.
383
+
384
+ - Neutralize residual OSS scrub breadcrumbs by replacing browser/session test fixture hostnames with `remote-host` and removing legacy private product path references from cloud proxy comments.
385
+
386
+ - **Add `agents setup mine` / `agents mine` — white-label the CLI.** Mint your own personally-named binary (e.g. `jack`) that runs every agents verb under your name, with the built-in commands you disable hidden and a per-brand resource profile that curates skills/plugins/MCP/etc. `agents setup mine` is the wizard; `agents mine init/list/toggle/remove` manage brands. Free and Apache-2.0. Source: `apps/cli/src/commands/mine.ts`, `apps/cli/src/lib/brand.ts`.
387
+
388
+ - **One-time "star us on GitHub" nudge after your first successful run.** After a
389
+ user's first successful `agents run` or `agents teams`, agents-cli prints a
390
+ single plain inline line pointing at the repo. Shown at most once ever (claimed
391
+ with an atomic O_EXCL sentinel so concurrent `agents teams` processes can't
392
+ double-print), and skipped for non-TTY, CI, `--json`/`--quiet`, or
393
+ `AGENTS_NO_NUDGE=1`. The `agents teams` call site only nudges on a clean drain
394
+ (no failed teammates). Source: `apps/cli/src/lib/star-nudge.ts`,
395
+ `apps/cli/src/commands/exec.ts`, `apps/cli/src/commands/teams.ts`,
396
+ `apps/cli/src/lib/teams/supervisor.ts`.
397
+
3
398
  ## 1.20.72
4
399
 
5
400
  - **Stop `agents doctor` from reporting phantom drift and `agents prune` from
package/README.md CHANGED
@@ -35,12 +35,16 @@
35
35
 
36
36
  https://agents-cli.sh/demo.mp4
37
37
 
38
+ ## Quickstart
39
+
38
40
  ```bash
39
- npm install -g @phnx-labs/agents-cli
40
- # or
41
- bun install -g @phnx-labs/agents-cli
41
+ npm install -g @phnx-labs/agents-cli # or: curl -fsSL agi-cli.sh | sh
42
+ agents setup # first-time setup -- config + pick your agents
43
+ agents run claude "explain this repo" # run any agent on your existing subscription
42
44
  ```
43
45
 
46
+ `agents setup` is interactive and idempotent -- safe to re-run on a new machine. 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.
47
+
44
48
  Already installed? `agents upgrade` updates agents-cli itself to the latest version (`agents upgrade 1.2.3` for a specific version or dist-tag, `-y` to skip the confirm prompt). The command is `upgrade` on every platform -- there is no `agents update` (on macOS, `agents helper update` is a different command that reinstalls the keychain helper, not agents-cli).
45
49
 
46
50
  Source: [github.com/phnx-labs/agents-cli](https://github.com/phnx-labs/agents-cli)
@@ -604,6 +608,7 @@ Bundle skills, commands, hooks, MCP servers, settings, and permissions under a s
604
608
  # Install from a git URL or local path
605
609
  agents plugins install hivemind@https://github.com/activeloopai/hivemind.git
606
610
  agents plugins install ./my-plugin
611
+ agents plugins add ./my-plugin
607
612
 
608
613
  # Apply to one agent (default version) or all supported
609
614
  agents plugins sync rush-toolkit claude
@@ -646,6 +651,32 @@ Plugins live in the user repo (`~/.agents/plugins/`), not inside any single vers
646
651
 
647
652
  ---
648
653
 
654
+ ## Make it yours
655
+
656
+ White-label the CLI. `agents setup mine` mints a **personally-named binary** — `jack` instead of `agents` — that _is_ agents-cli: same tool, your name, running the exact feature set you choose. Anyone can mint their own; Jack and Pranjal each get an independent brand.
657
+
658
+ ```bash
659
+ agents setup mine # wizard: pick a name, check off what to disable
660
+ agents mine init jack --disable teams cloud # or non-interactively
661
+
662
+ jack run claude "hello" # every agents verb, under your name
663
+ jack --help # help, version, and errors all read "jack"
664
+ ```
665
+
666
+ Manage brands with `agents mine list | toggle | remove`:
667
+
668
+ ```bash
669
+ agents mine toggle jack --disable-plugin rush --disable-skill deploy
670
+ agents mine toggle jack --enable teams
671
+ agents mine remove jack --purge
672
+ ```
673
+
674
+ Under the hood, `init` drops a pure pass-through shim in `~/.agents/.cache/shims/<name>` (already on `PATH`) that sets `AGENTS_BRAND` and forwards every argument to the same binary — nothing is copied or forked. The brand's config lives in `~/.agents/agents.yaml` (`brands.<name>`), so it rides `agents repo push/pull` across your fleet. Disabling a command hides it **only** under that brand; plain `agents` / `ag` keep every command. Curated skills/plugins/MCP ride a per-brand [resource profile](apps/cli/docs/profiles.md). Full reference: [Make it yours](apps/cli/docs/mine.md).
675
+
676
+ > Personal use is free and Apache-2.0. Redistributing a branded build commercially will require a license in a future release.
677
+
678
+ ---
679
+
649
680
  ## Browser
650
681
 
651
682
  <p align="center">
@@ -862,6 +893,7 @@ Sources: a command's stdout (`--watch` / `--poll`), an HTTP endpoint (`--poll-ht
862
893
  # Publish an HTML artifact to a public link on your own Cloudflare R2 (~$0).
863
894
  agents share setup # once: provision bucket + Worker on your CF
864
895
  agents share plan.html --slug fleet --expire 30d # → https://<base>/fleet
896
+ agents share plan.html --json # URL object for plan-render hooks
865
897
  agents share status # show the endpoint
866
898
  ```
867
899
 
@@ -877,6 +909,8 @@ this is effectively free.
877
909
  **Fleet mode:** provision one endpoint, then every fleet / cloud / ephemeral agent
878
910
  publishes through it with a shared write token — `agents share join <baseUrl>` uses an
879
911
  existing endpoint with no provisioning. `--expire 30d|12h|<date>` auto-expires a link.
912
+ `--json` emits `{ url, coverUrl, expiresAt }` so plan-render automation can publish the
913
+ rendered HTML and post the returned link without scraping terminal text.
880
914
  See [docs/share.md](apps/cli/docs/share.md).
881
915
 
882
916
  ---
@@ -924,7 +958,7 @@ Two repos with the same shape, different roles:
924
958
 
925
959
  **Version pinning:** `agents.yaml` at project root pins which agent version to use (like `.nvmrc` for Node).
926
960
 
927
- **Resource resolution:** When syncing resources (commands, skills, rules, hooks, MCP, permissions), the order is **project > user > system**. A `.agents/` directory at project root wins, then `~/.agents/`, then `~/.agents-system/`. Same-named resources higher in the chain override lower ones; everything else unions in.
961
+ **Resource resolution:** When syncing resources (commands, skills, rules, hooks, MCP, permissions), the order is **project > user > system**. A `.agents/` directory at project root wins, then `~/.agents/`, then `~/.agents-system/`. Same-named resources higher in the chain override lower ones; everything else unions in. Run `agents resources --merged` to see the effective skills, commands, MCP servers, hooks, rules, plugins, workflows, and subagents, with each row tagged by its winning layer.
928
962
 
929
963
  See [docs/00-concepts.md](apps/cli/docs/00-concepts.md) for the full mental model: DotAgents repos, resource kinds, and how resolution works end-to-end.
930
964
 
@@ -1151,6 +1185,8 @@ Yes -- `agents run` is non-interactive by default. `--yes` auto-accepts prompts,
1151
1185
 
1152
1186
  The auto-update prompt is suppressed automatically when stdin or stdout isn't a TTY. For headless environments where TTY detection misfires (k8s pods that allocate a PTY for stdout, cloud sandbox factories), set `AGENTS_CLI_DISABLE_AUTO_UPDATE=1` to skip the update check entirely -- no prompt, no network call.
1153
1187
 
1188
+ agents-cli also prints a one-time "star us on GitHub" line after your first successful `agents run`/`agents teams`. It's already skipped in CI, non-TTY, `--json`, and `--quiet` runs; set `AGENTS_NO_NUDGE=1` to suppress it everywhere.
1189
+
1154
1190
  To update on demand instead of waiting for the prompt, run `agents upgrade` (add `-y` to skip the confirmation, or pass a version/dist-tag to install something other than latest).
1155
1191
 
1156
1192
  ### What happens to my config when I switch versions?
package/dist/bin/agents CHANGED
Binary file
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `agents activity` -- the agent-activity lane: a running stream of what agents
3
+ * DID (plan created, PR opened, worktree created, sub-agent spawned, files
4
+ * edited), read from the append-only per-session activity logs.
5
+ *
6
+ * Complements `agents feed` (what agents are WAITING on). Events are emitted at
7
+ * hook time by 11-activity-log.py, so this reader never re-parses transcripts --
8
+ * it tails the logs and collapses routine work to counts, surfacing milestones
9
+ * individually and newest-first.
10
+ */
11
+ import type { Command } from 'commander';
12
+ export declare function registerActivityCommand(program: Command): void;
@@ -0,0 +1,68 @@
1
+ import chalk from 'chalk';
2
+ import { collapseActivity, ensureActivityLogHook, formatActivityLine, readRecentActivity, styleForEvent, tierForEvent, } from '../lib/activity.js';
3
+ /** Wire the activity-log hooks into each hooks-capable version's settings. */
4
+ async function installActivityHooks() {
5
+ const warnings = [];
6
+ const hookInstall = ensureActivityLogHook();
7
+ if (hookInstall.error) {
8
+ warnings.push(hookInstall.error);
9
+ return warnings;
10
+ }
11
+ const [{ iterHooksCapableVersions, parseHookManifest, registerHooksToSettings }, { getVersionHomePath }] = await Promise.all([
12
+ import('../lib/hooks.js'),
13
+ import('../lib/versions.js'),
14
+ ]);
15
+ const manifest = parseHookManifest({ warn: false });
16
+ for (const { agent, version } of iterHooksCapableVersions({ agent: 'claude' })) {
17
+ const result = registerHooksToSettings(agent, getVersionHomePath(agent, version), manifest);
18
+ if (result.errors.length > 0)
19
+ warnings.push(`${agent}@${version}: ${result.errors.join('; ')}`);
20
+ }
21
+ return warnings;
22
+ }
23
+ export function registerActivityCommand(program) {
24
+ program
25
+ .command('activity')
26
+ .description('Recent agent activity -- plans, PRs, worktrees, sub-agents (newest first)')
27
+ .option('--json', 'Emit the raw event list as JSON')
28
+ .option('--all', 'Include routine activity (file edits) inline, not collapsed')
29
+ .option('--milestones', 'Only milestone events (plans, PRs, worktrees, sub-agents)')
30
+ .option('-n, --limit <n>', 'Cap the number of events shown', (v) => parseInt(v, 10), 40)
31
+ .option('--since <minutes>', 'Only events within the last N minutes', (v) => parseInt(v, 10))
32
+ .action(async (opts) => {
33
+ const warnings = await installActivityHooks();
34
+ const sinceMs = typeof opts.since === 'number' && opts.since > 0
35
+ ? Date.now() - opts.since * 60_000
36
+ : undefined;
37
+ let events = readRecentActivity({ sinceMs, limit: opts.limit });
38
+ if (opts.milestones)
39
+ events = events.filter((e) => tierForEvent(e.event) === 'milestone');
40
+ if (opts.json) {
41
+ process.stdout.write(`${JSON.stringify(events, null, 2)}\n`);
42
+ return;
43
+ }
44
+ for (const w of warnings)
45
+ process.stderr.write(chalk.yellow(` ! ${w}\n`));
46
+ if (events.length === 0) {
47
+ process.stdout.write(chalk.gray('No recent agent activity. Events appear here as agents create plans, open PRs, and spawn sub-agents.\n'));
48
+ return;
49
+ }
50
+ const { milestones, counts, subagentCount } = collapseActivity(events);
51
+ process.stdout.write(chalk.bold('\n recent activity\n'));
52
+ const shown = opts.all ? events : milestones;
53
+ for (const ev of shown)
54
+ process.stdout.write(`${formatActivityLine(ev, { showHost: true })}\n`);
55
+ if (!opts.all) {
56
+ const parts = Object.entries(counts)
57
+ .sort((a, b) => b[1] - a[1])
58
+ .map(([event, n]) => `${styleForEvent(event).label} ×${n}`);
59
+ if (parts.length > 0) {
60
+ process.stdout.write(chalk.gray(`\n · ${parts.join(' ')}\n`));
61
+ }
62
+ }
63
+ if (subagentCount > 0) {
64
+ process.stdout.write(chalk.magenta(`\n ⑂ ${subagentCount} sub-agent${subagentCount === 1 ? '' : 's'} spawned\n`));
65
+ }
66
+ process.stdout.write('\n');
67
+ });
68
+ }
@@ -9,4 +9,17 @@
9
9
  import { Command } from 'commander';
10
10
  /** padEnd on the visible width, ignoring chalk color codes. Exported for tests. */
11
11
  export declare function stripPad(s: string, width: number): string;
12
+ /**
13
+ * Attach the reconcile options + action to a command node. Shared by the
14
+ * top-level `agents apply` and its `agents fleet apply` alias so the two can
15
+ * never drift — identical flags, identical engine.
16
+ */
17
+ export declare function configureApplyCommand(cmd: Command): Command;
12
18
  export declare function registerApplyCommand(program: Command): void;
19
+ /**
20
+ * Surface `agents apply` under the fleet command tree as `agents fleet apply`
21
+ * (and `agents devices apply`). Same reconcile engine as the top-level command —
22
+ * a discoverability alias for users who reach for `fleet` as the verb. Kept in
23
+ * lockstep via {@link configureApplyCommand}.
24
+ */
25
+ export declare function registerFleetApplyAlias(devicesCmd: Command): void;