@phnx-labs/agents-cli 1.22.46 → 1.22.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/CHANGELOG.md +663 -0
  2. package/LICENSE +102 -182
  3. package/README.md +96 -49
  4. package/dist/bootstrap.js +4 -2
  5. package/dist/cli/command-registry.d.ts +2 -1
  6. package/dist/cli/command-registry.js +6 -2
  7. package/dist/commands/accounts.d.ts +58 -0
  8. package/dist/commands/accounts.js +243 -25
  9. package/dist/commands/artifacts.js +7 -6
  10. package/dist/commands/attach.js +1 -1
  11. package/dist/commands/auth.js +7 -5
  12. package/dist/commands/browser-sessions-picker.js +9 -7
  13. package/dist/commands/browser.js +711 -62
  14. package/dist/commands/config.d.ts +0 -1
  15. package/dist/commands/config.js +26 -24
  16. package/dist/commands/cost.d.ts +1 -1
  17. package/dist/commands/daemon.d.ts +21 -0
  18. package/dist/commands/daemon.js +147 -12
  19. package/dist/commands/detach.d.ts +13 -0
  20. package/dist/commands/detach.js +11 -8
  21. package/dist/commands/exec.js +107 -53
  22. package/dist/commands/feed-watch.d.ts +2 -0
  23. package/dist/commands/feed-watch.js +28 -0
  24. package/dist/commands/feed.js +27 -0
  25. package/dist/commands/feedback.js +3 -19
  26. package/dist/commands/focus.d.ts +14 -0
  27. package/dist/commands/focus.js +48 -5
  28. package/dist/commands/go.d.ts +3 -0
  29. package/dist/commands/go.js +16 -3
  30. package/dist/commands/insights.d.ts +1 -1
  31. package/dist/commands/insights.js +2 -2
  32. package/dist/commands/inspect.js +2 -2
  33. package/dist/commands/lease.d.ts +1 -1
  34. package/dist/commands/lease.js +7 -6
  35. package/dist/commands/mailboxes.js +4 -3
  36. package/dist/commands/menubar.js +11 -4
  37. package/dist/commands/projects.d.ts +16 -1
  38. package/dist/commands/projects.js +58 -64
  39. package/dist/commands/resume.js +1 -1
  40. package/dist/commands/route.js +4 -4
  41. package/dist/commands/routines.js +4 -3
  42. package/dist/commands/run-broadcast.d.ts +1 -1
  43. package/dist/commands/run-broadcast.js +1 -1
  44. package/dist/commands/sessions-picker-factory.d.ts +2 -1
  45. package/dist/commands/sessions-picker-factory.js +1 -1
  46. package/dist/commands/sessions-picker.d.ts +22 -0
  47. package/dist/commands/sessions-picker.js +48 -9
  48. package/dist/commands/sessions-stop.d.ts +24 -0
  49. package/dist/commands/sessions-stop.js +66 -0
  50. package/dist/commands/sessions-trace.d.ts +82 -0
  51. package/dist/commands/sessions-trace.js +387 -0
  52. package/dist/commands/sessions.js +5 -0
  53. package/dist/commands/setup-secrets.js +23 -0
  54. package/dist/commands/share.d.ts +20 -5
  55. package/dist/commands/share.js +152 -52
  56. package/dist/commands/ssh.d.ts +15 -0
  57. package/dist/commands/ssh.js +243 -18
  58. package/dist/commands/teams.js +34 -2
  59. package/dist/commands/traces.d.ts +2 -0
  60. package/dist/commands/traces.js +184 -0
  61. package/dist/commands/view.d.ts +2 -0
  62. package/dist/commands/view.js +32 -62
  63. package/dist/commands/watchdog.js +9 -14
  64. package/dist/index.d.ts +1 -0
  65. package/dist/index.js +5 -0
  66. package/dist/lib/account-capabilities.d.ts +4 -0
  67. package/dist/lib/account-capabilities.js +13 -9
  68. package/dist/lib/account-registry.d.ts +2 -0
  69. package/dist/lib/account-registry.js +30 -2
  70. package/dist/lib/accounting/rotate.d.ts +9 -0
  71. package/dist/lib/accounting/rotate.js +12 -2
  72. package/dist/lib/accounting/usage.d.ts +84 -6
  73. package/dist/lib/accounting/usage.js +293 -75
  74. package/dist/lib/agent-modes.js +29 -1
  75. package/dist/lib/agent-spec/agents.d.ts +4 -3
  76. package/dist/lib/agent-spec/agents.js +25 -15
  77. package/dist/lib/analytics/mix-commands.d.ts +1 -1
  78. package/dist/lib/analytics/mix-commands.js +2 -2
  79. package/dist/lib/auth-health.d.ts +13 -3
  80. package/dist/lib/auth-health.js +50 -8
  81. package/dist/lib/browser/devices.d.ts +19 -0
  82. package/dist/lib/browser/devices.js +23 -0
  83. package/dist/lib/browser/drivers/ssh.d.ts +16 -2
  84. package/dist/lib/browser/drivers/ssh.js +36 -9
  85. package/dist/lib/browser/ipc.d.ts +1 -1
  86. package/dist/lib/browser/ipc.js +40 -9
  87. package/dist/lib/browser/profiles.d.ts +104 -65
  88. package/dist/lib/browser/profiles.js +277 -165
  89. package/dist/lib/browser/registry.d.ts +39 -0
  90. package/dist/lib/browser/registry.js +149 -0
  91. package/dist/lib/browser/remote-control.d.ts +28 -2
  92. package/dist/lib/browser/remote-control.js +35 -3
  93. package/dist/lib/browser/resolve-target.d.ts +68 -0
  94. package/dist/lib/browser/resolve-target.js +250 -0
  95. package/dist/lib/browser/runtime-state.d.ts +44 -11
  96. package/dist/lib/browser/runtime-state.js +98 -15
  97. package/dist/lib/browser/service.d.ts +65 -9
  98. package/dist/lib/browser/service.js +196 -61
  99. package/dist/lib/browser/sessions-list.d.ts +1 -3
  100. package/dist/lib/browser/sessions-list.js +3 -16
  101. package/dist/lib/browser/task-index.d.ts +70 -0
  102. package/dist/lib/browser/task-index.js +180 -0
  103. package/dist/lib/browser/types.d.ts +12 -1
  104. package/dist/lib/byok-usage.js +2 -2
  105. package/dist/lib/claude-statusline.d.ts +29 -0
  106. package/dist/lib/claude-statusline.js +139 -0
  107. package/dist/lib/cloud/host.d.ts +1 -1
  108. package/dist/lib/cloud/host.js +1 -1
  109. package/dist/lib/cloud/rush.js +1 -1
  110. package/dist/lib/codex-policy.d.ts +11 -1
  111. package/dist/lib/codex-policy.js +20 -5
  112. package/dist/lib/computer/computer-rpc.js +2 -2
  113. package/dist/lib/computer/download.d.ts +15 -15
  114. package/dist/lib/computer/download.js +35 -98
  115. package/dist/lib/computer/ssh-tunnel.d.ts +0 -3
  116. package/dist/lib/computer/ssh-tunnel.js +12 -22
  117. package/dist/lib/config-keys.d.ts +6 -11
  118. package/dist/lib/config-keys.js +18 -19
  119. package/dist/lib/crabbox/cli.d.ts +1 -1
  120. package/dist/lib/crabbox/cli.js +2 -2
  121. package/dist/lib/crabbox/lease.d.ts +9 -0
  122. package/dist/lib/crabbox/lease.js +70 -15
  123. package/dist/lib/crabbox/runtimes.js +1 -1
  124. package/dist/lib/daemon/account-state-daemon-service.d.ts +16 -0
  125. package/dist/lib/daemon/account-state-daemon-service.js +26 -0
  126. package/dist/lib/daemon/browser-ipc-service.d.ts +20 -0
  127. package/dist/lib/daemon/browser-ipc-service.js +46 -0
  128. package/dist/lib/daemon/daemon.d.ts +3 -0
  129. package/dist/lib/daemon/daemon.js +212 -444
  130. package/dist/lib/daemon/device-probe-service.d.ts +26 -0
  131. package/dist/lib/daemon/device-probe-service.js +47 -0
  132. package/dist/lib/daemon/keychain-reap-service.d.ts +17 -0
  133. package/dist/lib/daemon/keychain-reap-service.js +32 -0
  134. package/dist/lib/daemon/monitor-engine-service.d.ts +22 -0
  135. package/dist/lib/daemon/monitor-engine-service.js +29 -0
  136. package/dist/lib/daemon/runner.js +15 -2
  137. package/dist/lib/daemon/secrets-broker-service.d.ts +20 -0
  138. package/dist/lib/daemon/secrets-broker-service.js +66 -0
  139. package/dist/lib/daemon/self-heal-service.d.ts +27 -0
  140. package/dist/lib/daemon/self-heal-service.js +48 -0
  141. package/dist/lib/daemon/service.d.ts +102 -0
  142. package/dist/lib/daemon/service.js +98 -0
  143. package/dist/lib/daemon/session-index-service.d.ts +22 -0
  144. package/dist/lib/daemon/session-index-service.js +40 -0
  145. package/dist/lib/daemon/state-dir-check-service.d.ts +43 -0
  146. package/dist/lib/daemon/state-dir-check-service.js +63 -0
  147. package/dist/lib/daemon/supervisor.d.ts +87 -0
  148. package/dist/lib/daemon/supervisor.js +298 -0
  149. package/dist/lib/daemon/watchdog-service.d.ts +19 -0
  150. package/dist/lib/daemon/watchdog-service.js +40 -0
  151. package/dist/lib/daemon-health.d.ts +15 -0
  152. package/dist/lib/daemon-health.js +29 -5
  153. package/dist/lib/daemon-services.d.ts +8 -1
  154. package/dist/lib/daemon-services.js +55 -0
  155. package/dist/lib/daemon-ticks.d.ts +13 -2
  156. package/dist/lib/daemon-ticks.js +22 -20
  157. package/dist/lib/device-config.d.ts +25 -10
  158. package/dist/lib/device-config.js +90 -39
  159. package/dist/lib/devices/config-migration.d.ts +7 -0
  160. package/dist/lib/devices/config-migration.js +67 -3
  161. package/dist/lib/devices/health.d.ts +27 -2
  162. package/dist/lib/devices/health.js +39 -9
  163. package/dist/lib/devices/interactive-host.d.ts +15 -0
  164. package/dist/lib/devices/interactive-host.js +53 -0
  165. package/dist/lib/devices/registry.d.ts +61 -4
  166. package/dist/lib/devices/registry.js +94 -38
  167. package/dist/lib/devices/stats-cache.d.ts +26 -0
  168. package/dist/lib/devices/stats-cache.js +59 -7
  169. package/dist/lib/devices/worker-pick.d.ts +48 -0
  170. package/dist/lib/devices/worker-pick.js +113 -0
  171. package/dist/lib/exec.d.ts +70 -14
  172. package/dist/lib/exec.js +110 -38
  173. package/dist/lib/feed/answer.d.ts +29 -0
  174. package/dist/lib/feed/answer.js +145 -0
  175. package/dist/lib/feed/attention.d.ts +83 -0
  176. package/dist/lib/feed/attention.js +0 -0
  177. package/dist/lib/feed/feed.d.ts +109 -0
  178. package/dist/lib/feed/feed.js +154 -3
  179. package/dist/lib/feed/pr-status.d.ts +14 -0
  180. package/dist/lib/feed/pr-status.js +47 -0
  181. package/dist/lib/feed/watch.d.ts +59 -0
  182. package/dist/lib/feed/watch.js +180 -0
  183. package/dist/lib/fleet/capture.js +6 -0
  184. package/dist/lib/fleet/remote-login.js +8 -3
  185. package/dist/lib/fleet/types.d.ts +17 -0
  186. package/dist/lib/harness/adapter.d.ts +11 -0
  187. package/dist/lib/harness/adapters/claude.js +38 -24
  188. package/dist/lib/harness/adapters/codex.js +2 -4
  189. package/dist/lib/harness/adapters/cursor.js +8 -11
  190. package/dist/lib/helper-download.d.ts +108 -0
  191. package/dist/lib/helper-download.js +194 -0
  192. package/dist/lib/helper-versions.d.ts +52 -0
  193. package/dist/lib/helper-versions.js +58 -0
  194. package/dist/lib/hooks/cache.js +19 -0
  195. package/dist/lib/hooks/install.js +2 -2
  196. package/dist/lib/hooks/match.d.ts +3 -0
  197. package/dist/lib/hooks/match.js +25 -0
  198. package/dist/lib/hosts/credentials.d.ts +1 -1
  199. package/dist/lib/hosts/credentials.js +1 -1
  200. package/dist/lib/hosts/dispatch.d.ts +7 -1
  201. package/dist/lib/hosts/dispatch.js +24 -5
  202. package/dist/lib/hosts/passthrough.d.ts +8 -15
  203. package/dist/lib/hosts/passthrough.js +35 -16
  204. package/dist/lib/hosts/providers/devices.d.ts +1 -1
  205. package/dist/lib/hosts/providers/devices.js +1 -1
  206. package/dist/lib/hosts/reconnect.d.ts +179 -21
  207. package/dist/lib/hosts/reconnect.js +266 -45
  208. package/dist/lib/hosts/registry.js +7 -0
  209. package/dist/lib/installations/migrate.d.ts +4 -5
  210. package/dist/lib/installations/migrate.js +6 -7
  211. package/dist/lib/installations/shims.d.ts +1 -1
  212. package/dist/lib/installations/shims.js +23 -13
  213. package/dist/lib/installations/versions.js +25 -2
  214. package/dist/lib/linear-autoclose.d.ts +1 -1
  215. package/dist/lib/linear-autoclose.js +1 -1
  216. package/dist/lib/loop.d.ts +2 -2
  217. package/dist/lib/loop.js +1 -1
  218. package/dist/lib/menubar/download-menubar.d.ts +47 -0
  219. package/dist/lib/menubar/download-menubar.js +60 -0
  220. package/dist/lib/menubar/install-menubar.d.ts +44 -7
  221. package/dist/lib/menubar/install-menubar.js +105 -23
  222. package/dist/lib/menubar/notify-desktop.d.ts +3 -3
  223. package/dist/lib/menubar/notify-desktop.js +6 -6
  224. package/dist/lib/model-tiers.d.ts +1 -1
  225. package/dist/lib/open-url.d.ts +60 -2
  226. package/dist/lib/open-url.js +167 -12
  227. package/dist/lib/project-probe.d.ts +1 -1
  228. package/dist/lib/project-probe.js +1 -1
  229. package/dist/lib/project-pull.d.ts +1 -1
  230. package/dist/lib/project-pull.js +2 -2
  231. package/dist/lib/projects.d.ts +1 -1
  232. package/dist/lib/projects.js +1 -1
  233. package/dist/lib/refresh-coordinator.d.ts +1 -1
  234. package/dist/lib/refresh-coordinator.js +1 -1
  235. package/dist/lib/sandbox.js +6 -7
  236. package/dist/lib/secrets/download-keychain.d.ts +47 -0
  237. package/dist/lib/secrets/download-keychain.js +70 -0
  238. package/dist/lib/secrets/install-helper.d.ts +20 -1
  239. package/dist/lib/secrets/install-helper.js +44 -3
  240. package/dist/lib/session/active.d.ts +67 -0
  241. package/dist/lib/session/active.js +86 -2
  242. package/dist/lib/session/db.d.ts +11 -1
  243. package/dist/lib/session/db.js +142 -8
  244. package/dist/lib/session/discover.d.ts +23 -1
  245. package/dist/lib/session/discover.js +44 -10
  246. package/dist/lib/session/highlights.d.ts +49 -1
  247. package/dist/lib/session/highlights.js +95 -0
  248. package/dist/lib/session/host-link.d.ts +16 -2
  249. package/dist/lib/session/host-link.js +7 -1
  250. package/dist/lib/session/parse.js +33 -1
  251. package/dist/lib/session/prompt.d.ts +35 -0
  252. package/dist/lib/session/prompt.js +56 -0
  253. package/dist/lib/session/remote/remote-list.d.ts +9 -0
  254. package/dist/lib/session/remote/remote-list.js +19 -2
  255. package/dist/lib/session/remote/watch.d.ts +1 -1
  256. package/dist/lib/session/remote/watch.js +17 -3
  257. package/dist/lib/session/render.js +7 -3
  258. package/dist/lib/session/session-cache.d.ts +53 -0
  259. package/dist/lib/session/session-cache.js +93 -1
  260. package/dist/lib/session/state.js +1 -1
  261. package/dist/lib/session/tool-calls.d.ts +2 -0
  262. package/dist/lib/session/tool-calls.js +1 -1
  263. package/dist/lib/session/trajectory-compare.d.ts +47 -0
  264. package/dist/lib/session/trajectory-compare.js +116 -0
  265. package/dist/lib/session/trajectory-html.d.ts +19 -0
  266. package/dist/lib/session/trajectory-html.js +770 -0
  267. package/dist/lib/session/trajectory-lineage.d.ts +92 -0
  268. package/dist/lib/session/trajectory-lineage.js +195 -0
  269. package/dist/lib/session/trajectory-text.d.ts +37 -0
  270. package/dist/lib/session/trajectory-text.js +284 -0
  271. package/dist/lib/session/trajectory.d.ts +102 -0
  272. package/dist/lib/session/trajectory.js +384 -0
  273. package/dist/lib/session/types.d.ts +15 -0
  274. package/dist/lib/sha256-asset.d.ts +26 -0
  275. package/dist/lib/sha256-asset.js +41 -0
  276. package/dist/lib/share/backend.d.ts +95 -0
  277. package/dist/lib/share/backend.js +139 -0
  278. package/dist/lib/share/delete.d.ts +6 -2
  279. package/dist/lib/share/delete.js +8 -9
  280. package/dist/lib/share/html.d.ts +22 -0
  281. package/dist/lib/share/html.js +88 -0
  282. package/dist/lib/share/provision.d.ts +18 -4
  283. package/dist/lib/share/provision.js +38 -4
  284. package/dist/lib/share/publish.d.ts +39 -15
  285. package/dist/lib/share/publish.js +55 -26
  286. package/dist/lib/share/worker-template.js +171 -11
  287. package/dist/lib/sqlite.js +16 -3
  288. package/dist/lib/ssh-exec.d.ts +65 -0
  289. package/dist/lib/ssh-exec.js +120 -4
  290. package/dist/lib/startup/command-registry.d.ts +3 -1
  291. package/dist/lib/startup/command-registry.js +6 -3
  292. package/dist/lib/startup/dev-build.js +3 -3
  293. package/dist/lib/state.d.ts +2 -2
  294. package/dist/lib/state.js +11 -5
  295. package/dist/lib/subagents-registry.js +1 -1
  296. package/dist/lib/teams/agents.js +9 -0
  297. package/dist/lib/terminal/index.d.ts +1 -1
  298. package/dist/lib/terminal/inject.d.ts +19 -0
  299. package/dist/lib/terminal/inject.js +19 -9
  300. package/dist/lib/terminal/types.d.ts +1 -1
  301. package/dist/lib/terminal/types.js +1 -1
  302. package/dist/lib/tmux/orphan-reap.js +1 -1
  303. package/dist/lib/tmux/session.d.ts +46 -13
  304. package/dist/lib/tmux/session.js +204 -27
  305. package/dist/lib/traces/backend.d.ts +29 -0
  306. package/dist/lib/traces/backend.js +46 -0
  307. package/dist/lib/traces/classify.d.ts +52 -0
  308. package/dist/lib/traces/classify.js +72 -0
  309. package/dist/lib/traces/config.d.ts +10 -0
  310. package/dist/lib/traces/config.js +2 -0
  311. package/dist/lib/traces/provision.d.ts +19 -0
  312. package/dist/lib/traces/provision.js +30 -0
  313. package/dist/lib/traces/sync.d.ts +150 -0
  314. package/dist/lib/traces/sync.js +447 -0
  315. package/dist/lib/traces/worker-template.d.ts +4 -0
  316. package/dist/lib/traces/worker-template.js +159 -0
  317. package/dist/lib/types.d.ts +34 -19
  318. package/dist/lib/types.js +14 -0
  319. package/dist/lib/usage-backoff.d.ts +2 -1
  320. package/dist/lib/usage-backoff.js +60 -19
  321. package/dist/lib/usage-refresh.d.ts +18 -4
  322. package/dist/lib/usage-refresh.js +68 -19
  323. package/dist/lib/watchdog/log.d.ts +1 -1
  324. package/dist/lib/watchdog/log.js +1 -1
  325. package/dist/lib/watchdog/runner.d.ts +36 -45
  326. package/dist/lib/watchdog/runner.js +150 -119
  327. package/dist/lib/watchdog/service.d.ts +0 -1
  328. package/dist/lib/watchdog/service.js +0 -1
  329. package/dist/lib/watchdog/watchdog-agent.d.ts +38 -0
  330. package/dist/lib/watchdog/watchdog-agent.js +59 -0
  331. package/dist/lib/watchdog/watchdog.d.ts +11 -2
  332. package/dist/lib/watchdog/watchdog.js +37 -104
  333. package/dist/lib/workflows.d.ts +1 -1
  334. package/package.json +5 -7
  335. package/dist/commands/usage.d.ts +0 -27
  336. package/dist/commands/usage.js +0 -96
  337. package/dist/lib/menubar/MenubarHelper.app/Contents/CodeResources +0 -0
  338. package/dist/lib/menubar/MenubarHelper.app/Contents/Info.plist +0 -24
  339. package/dist/lib/menubar/MenubarHelper.app/Contents/MacOS/MenubarHelper +0 -0
  340. package/dist/lib/menubar/MenubarHelper.app/Contents/Resources/AppIcon.icns +0 -0
  341. package/dist/lib/menubar/MenubarHelper.app/Contents/_CodeSignature/CodeResources +0 -128
  342. package/dist/lib/secrets/Agents CLI.app/Contents/CodeResources +0 -0
  343. package/dist/lib/secrets/Agents CLI.app/Contents/Info.plist +0 -24
  344. package/dist/lib/secrets/Agents CLI.app/Contents/MacOS/Agents CLI +0 -0
  345. package/dist/lib/secrets/Agents CLI.app/Contents/_CodeSignature/CodeResources +0 -123
  346. package/dist/lib/secrets/Agents CLI.app/Contents/embedded.provisionprofile +0 -0
  347. package/dist/lib/usage-fleet.d.ts +0 -32
  348. package/dist/lib/usage-fleet.js +0 -125
package/README.md CHANGED
@@ -54,9 +54,10 @@ agents setup status # readiness for browser, computer, fleet,
54
54
  agents run claude "explain this repo" # run any agent on your existing subscription
55
55
  ```
56
56
 
57
- `agents setup` is interactive and idempotent -- safe to re-run on any machine. Once core setup exists, it opens a status-aware menu for browser, computer, secrets, fleet, share, watchdog, and device preferences; each choice delegates to the same wizard available under `agents setup <capability>`. In CI or another non-TTY, bare setup prints the checklist without prompting. The `agi-cli.sh` one-liner installs this same canonical `@phnx-labs/agents-cli` package. Prefer bun? `bun install -g @phnx-labs/agents-cli` works too.
57
+ Everything here — and every other command in this README — is free and needs no account; the optional `agents auth login` exists only for [team spaces](#sign-in). `agents setup` is interactive and idempotent -- safe to re-run on any machine. Once core setup exists, it opens a status-aware menu for browser, computer, secrets, fleet, share, watchdog, and device preferences; each choice delegates to the same wizard available under `agents setup <capability>`. In CI or another non-TTY, bare setup prints the checklist without prompting. The `agi-cli.sh` one-liner installs this same canonical `@phnx-labs/agents-cli` package. Prefer bun? `bun install -g @phnx-labs/agents-cli` works too.
58
58
 
59
- Full path -- installing harnesses, logging in, smoke-testing `agents teams`, and setting up your own fleet: [`apps/cli/docs/QUICKSTART.md`](apps/cli/docs/QUICKSTART.md).
59
+ The command surface teaches setup through `agents setup` and group-level `--help`.
60
+ The durable system model starts at [`cli/docs/README.md`](cli/docs/README.md).
60
61
 
61
62
  **Learn (concepts):** [Loop + graph engineering](https://agi-cli.sh/learn/loop-and-graph-engineering) · [Teams as graph engineering](https://agi-cli.sh/learn/teams-graph-engineering) · [Sessions · index + cross-device](https://agi-cli.sh/learn/sessions-index) · [Distributed fleet execution](https://agi-cli.sh/learn/distributed-fleet). Also: [harness engineering](https://agi-cli.sh/learn/harness-engineering) · [visual longform](https://share.agents-cli.sh/muqsitnawaz/agents-loop-and-graph-engineering).
62
63
 
@@ -224,8 +225,8 @@ Supports plan (read-only), edit, auto, and skip modes, effort levels, JSON outpu
224
225
  Treat `skip` as a last-resort escape hatch. In direct-exec runs (without `--acp`),
225
226
  agi-cli forwards the harness's native no-prompt flag; it does not add another
226
227
  safety layer. Prefer `auto` where it adds a safer automatic policy (smart classifier
227
- on Claude/Copilot, native high-auto mode on Droid, or interactive Kimi), or `edit`
228
- everywhere else. For headless Kimi, `edit`, `auto`, and `skip` all use the same
228
+ on Claude/Copilot, never-prompt over a sandbox on Codex, native high-auto mode on
229
+ Droid, or interactive Kimi), or `edit` everywhere else. For headless Kimi, `edit`, `auto`, and `skip` all use the same
229
230
  already-auto-approved `-p` behavior, so prefer `edit` rather than signaling a blanket
230
231
  bypass. Harnesses without a native bypass flag reject direct-exec `skip`.
231
232
 
@@ -247,11 +248,13 @@ permission requests at the ACP protocol layer: it selects `allow_always` when of
247
248
  otherwise the first permission option offered by the server. The same last-resort
248
249
  warning applies.
249
250
 
250
- Codex has no native smart-classifier mode, so `agents run codex --mode auto` resolves
251
- to sandboxed `edit` and can still prompt. When `--mode` is omitted for Codex, the same
252
- safe writable mode is used: the workspace, `~/.agents`, and regenerable toolchain caches
253
- are writable; network access is enabled; and approvals are requested on demand. An
254
- explicit `--mode plan` keeps the filesystem read-only while leaving network access on.
251
+ Codex has three managed permission profiles rather than a smart classifier. `edit`
252
+ and `auto` share one sandbox the workspace, `~/.agents`, and regenerable toolchain
253
+ caches are writable, and network access is enabled and differ only in approvals:
254
+ `edit` requests them on demand, while `auto` never prompts, so a sandbox-denied
255
+ command fails and the agent works around it instead of stopping on a dialog nobody
256
+ is watching. When `--mode` is omitted for Codex, `edit` is used. An explicit
257
+ `--mode plan` keeps the filesystem read-only while leaving network access on.
255
258
  `agents run codex --mode skip` is different:
256
259
  it bypasses approvals **and** removes the sandbox. `full` remains an alias for `skip`,
257
260
  but new scripts should use the explicit `skip` name.
@@ -295,6 +298,11 @@ agents sessions render a1b2c3d4 -o session.md
295
298
  # Or publish it as a link in one step (unlisted + redacted by default)
296
299
  agents sessions share a1b2c3d4
297
300
 
301
+ # Visualize a session as a trajectory -- tool-call waterfall, timing, stalls, errors
302
+ agents trace a1b2c3d4 # opens the HTML (a person at a terminal)
303
+ agents trace a1b2c3d4 --text --errors-only # compact text an agent reads in-context
304
+ agents sessions trace a1b2c3d4 --json # the versioned sessions-trace envelope
305
+
298
306
  # Just the last 3 turns, user messages only
299
307
  agents sessions a1b2c3d4 --last 3 --include user
300
308
 
@@ -329,7 +337,7 @@ agents insights --since 7d
329
337
 
330
338
  Interactive picker when you're in a terminal. Structured output (`--json`, `--markdown`, filtered by role or turn count) when piped.
331
339
 
332
- Backed by a SQLite + FTS5 index at `~/.agents/.history/sessions/sessions.db` with incremental scanning -- warm reads in ~100ms. Tool-call evidence is redacted and bounded before it is cached; repeated `--query` clauses must match distinct calls in one session. Tool queries read SQLite only: `agents sessions backfill tools` performs the one-time historical parse, while normal incremental scans index new and changed sessions. The index stores ordered static Bash program sites, so `--count` reports occurrences, containing tool calls, and distinct sessions without reparsing. `--fleet` executes one origin partition per device, so synced mirrors cannot duplicate compact evidence or counts returned over SSH; transcript bodies stay on their origin machine. This uses relational SQLite rows and literal FTS5 only, with no embeddings, vector database, or model calls. External tools can consume `--json` output as a programmatic observability layer; see [docs/sessions.md](apps/cli/docs/sessions.md) for the schemas and [docs/observability.md](apps/cli/docs/observability.md) for the consumption patterns.
340
+ Backed by a SQLite + FTS5 index at `~/.agents/.history/sessions/sessions.db` with incremental scanning -- warm reads in ~100ms. Tool-call evidence is redacted and bounded before it is cached; repeated `--query` clauses must match distinct calls in one session. Tool queries read SQLite only: `agents sessions backfill tools` performs the one-time historical parse, while normal incremental scans index new and changed sessions. The index stores ordered static Bash program sites, so `--count` reports occurrences, containing tool calls, and distinct sessions without reparsing. `--fleet` executes one origin partition per device, so synced mirrors cannot duplicate compact evidence or counts returned over SSH; transcript bodies stay on their origin machine. This uses relational SQLite rows and literal FTS5 only, with no embeddings, vector database, or model calls. External tools can consume `--json` output as a programmatic observability layer; see [docs/sessions.md](cli/docs/sessions.md) for the schemas and [docs/observability.md](cli/docs/observability.md) for the consumption patterns.
333
341
 
334
342
  ### Live state, and catching up fast
335
343
 
@@ -434,6 +442,8 @@ agents feed --flat # one row per agent (legacy)
434
442
  agents feed --device mac-mini # scope the view to one or more hosts
435
443
  agents feed --local # skip the SSH fan-out
436
444
  agents feed --json # blocks stamped with their outcome key
445
+ agents feed watch --json # versioned agents + attention + activity NDJSON
446
+ agents feed answer <key> --choice 0 # first answer wins; route over the recorded reply rail
437
447
  agents feed post --title "Halfway done" "CI green, watching merge" # title + body
438
448
  ```
439
449
 
@@ -483,7 +493,7 @@ agents fleet apply --no-login # skip login propagation
483
493
 
484
494
  `agents fleet apply` probes every target over the existing SSH transport, then reconciles it to the profile: installs missing agents, upgrades `agi-cli`, syncs the named config scopes, and **propagates logins** so a host signed in once seeds the fleet -- turning "6 hosts x 8 harnesses = 48 OAuth flows" into one. Portable credential files (claude, codex, grok, kimi, opencode, droid, antigravity) stream to each target over encrypted SSH stdin, never shell-interpolated, and land at `0600`. **Honest boundary:** macOS keychain-bound tokens (claude, antigravity on a Mac target) can't be extracted -- those surface as a one-time manual login, never faked. `--plan` / `--dry-run` shows the full matrix without touching anything.
485
495
 
486
- See [docs/fleet.md](apps/cli/docs/fleet.md) for the manifest schema and reconcile semantics.
496
+ See [docs/fleet.md](cli/docs/fleet.md) for the manifest schema and reconcile semantics.
487
497
 
488
498
  ---
489
499
 
@@ -600,7 +610,7 @@ agents hosts check gpu-box # reachable? which agi-cli version?
600
610
 
601
611
  # Run there instead of locally
602
612
  agents run claude --device gpu-box "profile this build" # headless: follows live by default
603
- agents run claude --device gpu-box # no prompt → interactive TTY over SSH (tmux-backed)
613
+ agents run claude --device gpu-box # no prompt → direct interactive TTY over SSH
604
614
  agents accounts sync work --device gpu-box # portable provider account only; native OAuth stays local
605
615
  agents run claude --device auto "…" # affinity-pick host from 14d usage (harness stays claude)
606
616
  agents run claude --device auto "…" # same — auto is a host value, not a harness name
@@ -638,10 +648,12 @@ agents devices sync # ingest `tailscale status`
638
648
  agents devices ignore ipad # sync the dismissal via agents.yaml fleet.discovery
639
649
  agents repo push user # carry device decisions to the other machines
640
650
  agents repo pull user # pull and reconcile them into this machine's registry
641
- agents devices list # fleet + headroom: load, mem, idle/busy which box has room (cache-first)
651
+ agents devices list # spec (cores/RAM/disk) + load/mem/disk + headroom + role + description
642
652
  agents devices list --live # force a live probe of every device (alias of --refresh)
643
- agents devices list --full # add per-device cores and free/total RAM
653
+ agents devices list --full # add per-device free/total RAM detail
644
654
  agents devices list --no-stats # instant: names/addresses only, skip the probe
655
+ agents devices describe mac-mini "signing + notarize box" # one-line purpose, synced + shown in the list
656
+ agents devices ignored # dismissed nodes — when, and which machine dismissed them
645
657
  agents devices config zion interactive.host zion # the device agents show YOU artifacts on (★ in the list)
646
658
  agents devices config mac-mini agents.max-concurrent 4 # per-device settings (tracked devices/<name>/agents.yaml)
647
659
  agents devices config mac-mini scheduler.enabled off # bare `devices config <name>` opens a settings menu (TTY)
@@ -698,9 +710,11 @@ email) and naming which harnesses use it — the fast way to see which accounts
698
710
  and healthy across every machine. Scope either with `--agents <csv>` / `--device <csv>`, and
699
711
  add `--json` for the machine-readable per-host rows.
700
712
 
701
- **Hosts** (`agents hosts`) are git-synced dispatch targets in `agents.yaml`; **devices** (`agents devices`) are your Tailscale machines in a local registry. Both ride SSH and feed one host pool: devices appear in `agents hosts list` and capability routing without a second enrollment. On `--device` runs every `agents run` option is either forwarded (`--effort --env --timeout --loop …`), rejected loud (`--secrets` never crosses SSH implicitly), or consumed locally — nothing silently drops. See [docs/concepts.md](apps/cli/docs/concepts.md#devices--hosts).
713
+ **Hosts** (`agents hosts`) are git-synced dispatch targets in `agents.yaml`; **devices** (`agents devices`) are your Tailscale machines in a local registry. Both ride SSH and feed one host pool: devices appear in `agents hosts list` and capability routing without a second enrollment. On `--device` runs every `agents run` option is either forwarded (`--effort --env --timeout --loop …`), rejected loud (`--secrets` never crosses SSH implicitly), or consumed locally — nothing silently drops. See [docs/concepts.md](cli/docs/concepts.md#devices--hosts).
702
714
 
703
- Every `--device` command rides one multiplexed SSH engine, tuned for driving a fleet from a small laptop: the first call to a machine opens a control socket and every later call reuses it (no repeat TCP+auth handshake), connections carry keepalive so a dropped link dies in ~45 s instead of zombying, and following a remote run polls in a single round-trip per cycle. Measured against a Tailscale-relayed host: repeated calls **~6–7× faster**, dispatch readiness **~2×**, and the follow loop **~21× faster with 50% fewer local ssh spawns**. Design: [docs/ssh-transport.md](apps/cli/docs/ssh-transport.md) · reproduce: `node scripts/bench-ssh.mjs <host>`.
715
+ Every `--device` command rides the shared SSH transport so host resolution,
716
+ identity checks, environment forwarding, reconnect behavior, and multiplexing cannot
717
+ drift between callers. See [fleet architecture](cli/docs/fleet.md).
704
718
 
705
719
  ---
706
720
 
@@ -725,7 +739,7 @@ agents teams status auth-feature # Who's working, what they changed, what the
725
739
 
726
740
  Teammates run detached -- close your terminal, they keep working. Check in with `teams status`, glance at a teammate's summary with `teams logs <name>` (add `--full` for the raw output), clean up with `teams disband`.
727
741
 
728
- Team state is observable via `agents teams list --json` / `agents teams status --json` (compact by default; add `--verbose` for the full per-teammate shape). External tools join it with `sessions --json` (teammates get `isTeamOrigin: true`) and `cloud list --json` (for `--cloud` teammates) to build a unified fleet view. See [docs/observability.md](apps/cli/docs/observability.md).
742
+ Team state is observable via `agents teams list --json` / `agents teams status --json` (compact by default; add `--verbose` for the full per-teammate shape). External tools join it with `sessions --json` (teammates get `isTeamOrigin: true`) and `cloud list --json` (for `--cloud` teammates) to build a unified fleet view. See [docs/observability.md](cli/docs/observability.md).
729
743
 
730
744
  ---
731
745
 
@@ -814,7 +828,7 @@ tools:
814
828
  ---
815
829
  ```
816
830
 
817
- Workflows that need to write — post PR comments, edit files, send Slack — should run with `--mode edit`, or `--mode auto` on Claude Code and GitHub Copilot. Reserve `--mode skip` (legacy alias: `full`) for last-resort bypasses. `agents run` defaults to `--mode plan` for other harnesses; Codex defaults to its safe writable profile. An explicit Codex `--mode plan` is read-only with network access.
831
+ Workflows that need to write — post PR comments, edit files, send Slack — should run with `--mode edit`, or `--mode auto` on Claude Code, GitHub Copilot, and Codex. Reserve `--mode skip` (legacy alias: `full`) for last-resort bypasses. `agents run` defaults to `--mode plan` for other harnesses; Codex defaults to its safe writable profile. An explicit Codex `--mode plan` is read-only with network access.
818
832
 
819
833
  Resolution is project > user > system: a `<repo>/.agents/workflows/<name>/` overrides a same-named workflow in `~/.agents/workflows/`. Commit project workflows with your repo so teammates get the same pipeline.
820
834
 
@@ -896,9 +910,11 @@ agents setup mine toggle jack --enable teams
896
910
  agents setup mine remove jack --purge
897
911
  ```
898
912
 
899
- 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).
913
+ Under the hood, `init` creates a pass-through shim that selects a brand configuration;
914
+ it does not fork the execution engine. Curated resources still resolve through the
915
+ ordinary [resource architecture](cli/docs/resources.md).
900
916
 
901
- > Personal use is free and Apache-2.0. Redistributing a branded build commercially will require a license in a future release.
917
+ > Branded builds are free for personal and commercial use alike. New versions ship under FSL-1.1-Apache-2.0: every user and company may use, modify, and redistribute; only offering agents-cli itself as a competing commercial product or service is barred, and each version automatically becomes Apache-2.0 two years after release.
902
918
 
903
919
  ---
904
920
 
@@ -910,15 +926,21 @@ Under the hood, `init` drops a pure pass-through shim in `~/.agents/.cache/shims
910
926
 
911
927
  Give agents access to a real browser — no relay extension, no cloud service, no Playwright getting blocked.
912
928
 
929
+ Each device declares its own browsers in its own `devices/<machine>/agents.yaml`.
930
+ The fleet registry is the union of those files: a name declared by one device is
931
+ identity-bearing (the daemon tunnels to that device); a name declared by several
932
+ is fungible (use the local one). `--device` is only valid on `agents browser start`;
933
+ later verbs resolve the device from the task.
934
+
913
935
  ```bash
914
936
  # First run: omit --profile and we auto-pick the first installed Chromium-family
915
937
  # browser. macOS prefers Chrome > Brave > Edge > Chromium > Comet; Linux prefers
916
938
  # Chrome > Chromium > Brave > Edge; Windows prefers Edge (always preinstalled) >
917
- # Chrome > Brave > Comet. The auto-picked profile is saved as "default" for later runs.
939
+ # Chrome > Brave > Comet. The auto-picked profile is saved as "auto-chrome".
918
940
  export AGENTS_BROWSER_TASK=$(agents browser start --url https://app.example.com)
919
941
 
920
942
  # Or pin a named profile to a specific browser (chrome, comet, brave, chromium,
921
- # edge, or custom) when you want isolation from "default".
943
+ # edge, or custom) when you want isolation from auto-detect.
922
944
  agents browser profiles create work --browser chrome
923
945
  # `start` writes the resolved name (e.g. `swift-crab-falcon-a3f92b1c`) to stdout
924
946
  # and human-friendly commentary to stderr, so $(...) capture stays clean.
@@ -982,7 +1004,10 @@ agents browser profiles create slack \
982
1004
 
983
1005
  ### Remote browsers
984
1006
 
985
- Connect to browsers running anywhere local, SSH tunnels, or cloud services:
1007
+ Identity-bearing names tunnel automatically: declare `comet-local` only on the
1008
+ machine that holds the logins, and every other box reaches it through the
1009
+ daemon. `--device` on `start` binds a task to a specific box (fungible names,
1010
+ or an explicit pick). Later verbs reject `--device`.
986
1011
 
987
1012
  ```bash
988
1013
  # Local CDP (discovers WebSocket URL automatically)
@@ -990,7 +1015,11 @@ agents browser profiles create local-debug \
990
1015
  --browser chrome \
991
1016
  --endpoint "http://localhost:9222"
992
1017
 
993
- # SSH tunnel to a remote machine
1018
+ # Bind a task to a fleet device at start; later verbs resolve it from the task
1019
+ agents browser start --task post --device zion --url https://x.com/
1020
+ agents browser screenshot --task post
1021
+
1022
+ # Explicit SSH endpoint, declared on the machine that owns the browser
994
1023
  agents browser profiles create staging \
995
1024
  --browser chrome \
996
1025
  --endpoint "ssh://deploy@staging.example.com?port=9222"
@@ -1005,7 +1034,7 @@ agents browser profiles create cloud \
1005
1034
 
1006
1035
  ## Sign in
1007
1036
 
1008
- `agents auth` signs this machine in to **Phoenix ID** the Phoenix Labs account layer that spaces and plan tiers hang off. 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.
1037
+ Signing in is **optional**. Every local feature — `agents run`, sessions, teams, fleet dispatch, secrets, browser, computer — works with no account. The one thing an account unlocks is **team spaces**, the hosted surface under `agents auth space`. `agents auth` signs this machine in to **Phoenix ID**, the Phoenix Labs account layer behind team spaces. 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.
1009
1038
 
1010
1039
  ```bash
1011
1040
  agents auth login # shows a code, opens a Phoenix-branded page
@@ -1109,7 +1138,7 @@ agents routines add daily-digest \
1109
1138
  --schedule "0 9 * * 1-5" \
1110
1139
  --agent claude \
1111
1140
  --project-anchor agents-cli \
1112
- --cwd apps/cli \
1141
+ --cwd cli \
1113
1142
  --prompt "Review yesterday's PRs and summarize key changes"
1114
1143
 
1115
1144
  agents routines list # All jobs + next run times
@@ -1141,7 +1170,7 @@ Jobs run sandboxed -- agents only see directories and tools you explicitly allow
1141
1170
  decides where the body runs. The reliability contract (execution anchor + `--cwd`,
1142
1171
  readiness that saves a blocked routine paused, and the `blocked`/`skipped` run
1143
1172
  statuses) is specified in
1144
- [docs/specifications.md §Routine execution & readiness](apps/cli/docs/specifications.md#routine-execution--readiness);
1173
+ [docs/specifications.md §Routine execution & readiness](cli/docs/specifications.md#routine-execution--readiness);
1145
1174
  some of it is planned (RUSH-2290), and the section marks what is landed vs intended.
1146
1175
 
1147
1176
  ### Daemon
@@ -1221,8 +1250,13 @@ Sources: a command's stdout (`--watch` / `--poll`), an HTTP endpoint (`--poll-ht
1221
1250
  ## Share
1222
1251
 
1223
1252
  ```bash
1224
- # Publish an HTML artifact to a public link on your own Cloudflare R2 (~$0).
1253
+ # Signed in? Just publish no Cloudflare setup.
1254
+ agents auth login
1255
+ agents artifacts share plan.html --visibility unlisted # → https://share.agents-cli.sh/<handle>/<slug>-<id>
1256
+
1257
+ # Or provision your own Cloudflare R2 (~$0).
1225
1258
  agents artifacts setup # once: provision bucket + Worker on your CF
1259
+ agents traces setup # provision the private traces Worker + R2 bucket
1226
1260
  agents artifacts share plan.html --slug fleet --expire 30d # → https://<base>/fleet
1227
1261
  agents artifacts share plan.html --label "Q3 fleet plan" --meta kind=plan # human title + structured metadata
1228
1262
  agents artifacts share plan.html --json # URL object for plan-render hooks
@@ -1233,18 +1267,26 @@ agents artifacts unshare fleet # take a published l
1233
1267
  ```
1234
1268
 
1235
1269
  `agents artifacts share` closes the loop: an agent makes work (a plan, a viz, a report),
1236
- publishes it, and you open the link to see it. `setup` reads a Cloudflare API token
1237
- from your `cloudflare.com` secrets bundle (or `--token`), creates an R2 bucket, uploads
1238
- a tiny Worker, and enables the free `*.workers.dev` subdomain (or maps `--domain
1239
- share.example.com` when the token owns the zone). Writes are bearer-gated **through**
1240
- the Worker (its R2 binding does the put, so the client needs no S3 keys); reads are
1241
- **public**, so a link outlives the agent. R2 has zero egress + a 10 GB free tier, so
1242
- this is effectively free.
1270
+ publishes it, and you open the link to see it. **Signed-in users** publish to the
1271
+ already-live managed endpoint (`share.agents-cli.sh/<handle>/…`) with the Phoenix session — no
1272
+ Cloudflare account, bucket, or write token and `share status` / `list` / `revisions`
1273
+ / `unshare` talk to that same endpoint. The handle is the local-part of the signed-in
1274
+ email (`muqsitnawaz@gmail.com` `muqsitnawaz`); the page slug is readable plus a
1275
+ short view-id. HTML is stored as one object: local images are inlined, `file://` TOC
1276
+ links become in-page hashes, so the published page is actually viewable. `--visibility unlisted` (hidden aliases
1277
+ `--unlisted` / `--private`) is a capability URL: GET still works, the gallery hides it,
1278
+ and the Worker sends `X-Robots-Tag: noindex`. **BYO Cloudflare** remains: `setup` reads
1279
+ a Cloudflare API token from your `cloudflare.com` secrets bundle (or `--token`), creates
1280
+ an R2 bucket, uploads a tiny Worker, and enables the free `*.workers.dev` subdomain (or
1281
+ maps `--domain share.example.com` when the token owns the zone). Writes are bearer-gated
1282
+ **through** the Worker (Phoenix bearer or static `WRITE_TOKEN`); reads are **public**, so
1283
+ a link outlives the agent. R2 has zero egress + a 10 GB free tier, so BYO is still
1284
+ effectively free.
1243
1285
 
1244
1286
  **Fleet mode:** provision one endpoint, then every fleet / cloud / ephemeral agent
1245
1287
  publishes through it with a shared write token — `agents artifacts share join <baseUrl>` uses an
1246
1288
  existing endpoint with no provisioning. `--expire 30d|12h|<date>` auto-expires a link.
1247
- `--json` emits `{ url, coverUrl, expiresAt, label, labelSource }` so plan-render automation can
1289
+ `--json` emits `{ url, coverUrl, expiresAt, visibility, unlisted?, label, labelSource }` so plan-render automation can
1248
1290
  publish the rendered HTML and post the returned link without scraping terminal text.
1249
1291
 
1250
1292
  **Every share carries provenance and a title.** Agent/session/host/repo/date are
@@ -1263,7 +1305,7 @@ full URL, `<user>/<slug>`, or a bare slug (resolved against your own namespace);
1263
1305
  targets at once are fine. It also deletes the sibling `<slug>.png` OG cover by default
1264
1306
  (`--keep-cover` opts out) and verifies the page actually 404s before reporting success —
1265
1307
  the Worker's delete is idempotent, so `{"ok":true}` alone is never proof.
1266
- See [docs/share.md](apps/cli/docs/share.md).
1308
+ See the publication boundary in [observability](cli/docs/observability.md).
1267
1309
 
1268
1310
  ---
1269
1311
 
@@ -1312,9 +1354,9 @@ Two repos with the same shape, different roles:
1312
1354
 
1313
1355
  **Resource resolution:** When syncing resources (commands, skills, rules, hooks, MCP, permissions), the order is **project > user > system**. A `.agents/` directory at project root wins, then `~/.agents/`, then `~/.agents-system/`. Same-named resources higher in the chain override lower ones; everything else unions in. Run `agents view --merged` to see the effective skills, commands, MCP servers, hooks, rules, plugins, workflows, and subagents, with each row tagged by its winning layer.
1314
1356
 
1315
- See [docs/concepts.md](apps/cli/docs/concepts.md) for the full mental model: DotAgents repos, resource kinds, and how resolution works end-to-end.
1357
+ See [docs/concepts.md](cli/docs/concepts.md) for the full mental model: DotAgents repos, resource kinds, and how resolution works end-to-end.
1316
1358
 
1317
- Other useful commands: `agents doctor` checks CLI availability and resource sync drift, `agents usage` shows available 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](apps/cli/docs/observability.md#budget-guardrails-agents-budget)), `agents import` adopts an existing unmanaged install, `agents trash` lists and restores soft-deleted version directories, and `agents subagents` installs reusable subagent definitions for parent-agent workflows.
1359
+ Other useful commands: `agents doctor` checks CLI availability and resource sync drift, `agents view` shows per-account quota/rate-limit data for installed agents, `agents config budget` shows cross-vendor spend caps and current spend-to-cap (and enforces pre-flight estimates + a hard-cap kill-switch on every run — see [docs/observability.md](cli/docs/observability.md#budget-guardrails-agents-budget)), `agents import` adopts an existing unmanaged install, `agents trash` lists and restores soft-deleted version directories, and `agents subagents` installs reusable subagent definitions for parent-agent workflows.
1318
1360
 
1319
1361
  ---
1320
1362
 
@@ -1437,7 +1479,7 @@ By default, secrets sync via iCloud Keychain to your other Macs. With `--no-iclo
1437
1479
 
1438
1480
  ## Compatibility
1439
1481
 
1440
- Which DotAgents resources each agent CLI can load. Source of truth: [src/lib/agents.ts](apps/cli/src/lib/agents.ts) (`capabilities`); gates use `supports(agent, cap, version)` from [src/lib/capabilities.ts](apps/cli/src/lib/capabilities.ts). Full matrix also in [docs/concepts.md](apps/cli/docs/concepts.md).
1482
+ Which DotAgents resources each agent CLI can load. Source of truth: [src/lib/agents.ts](cli/src/lib/agents.ts) (`capabilities`); gates use `supports(agent, cap, version)` from [src/lib/capabilities.ts](cli/src/lib/capabilities.ts). Full matrix also in [docs/concepts.md](cli/docs/concepts.md).
1441
1483
 
1442
1484
  > **Gemini CLI is hard-deprecated.** Google retired it for free, Pro, and Ultra tiers on **June 18, 2026** (announced at Google I/O 2026); the `gemini` command no longer serves requests on those tiers. agi-cli keeps the legacy `gemini` id only so old sessions/config can still be read. `agents add gemini`, `agents import gemini`, and `agents sync gemini` fail and point to **Antigravity CLI** (`antigravity`), Google's official successor — see [the transition notice](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/).
1443
1485
 
@@ -1499,7 +1541,7 @@ Claude Code, Codex CLI, Antigravity, Grok Build, and others each have their own
1499
1541
 
1500
1542
  ### Is it free?
1501
1543
 
1502
- Yes. 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.
1544
+ 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` exists only to unlock hosted team spaces (`agents auth space`); 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.
1503
1545
 
1504
1546
  ### Is this like `nvm` / `mise` / `asdf` for AI agents?
1505
1547
 
@@ -1533,7 +1575,9 @@ macOS and Linux. Windows via WSL works but isn't first-class yet.
1533
1575
 
1534
1576
  **macOS-only features:** Keychain-based secrets (`agents secrets`, `agents accounts add`) require macOS. Default iCloud sync for bundles requires macOS + iCloud Keychain enabled; use `--no-icloud-sync` for device-local bundles. On Linux, use environment variables or `.env` files for API keys. Native Linux credential store support is planned.
1535
1577
 
1536
- Interactive tmux-backed runs require tmux 3.2 or newer.
1578
+ Interactive runs spawn directly by default. Enable `tmux.enabled` on a device to
1579
+ give each run an addressable pane for `agents message`, injection, and `agents
1580
+ focus`; tmux-backed runs require tmux 3.2 or newer.
1537
1581
 
1538
1582
  ### Do I need Node.js?
1539
1583
 
@@ -1563,7 +1607,7 @@ Profiles (experimental — available by default). Works with LiteLLM Proxy, Olla
1563
1607
 
1564
1608
  ### Can I add support for a new agent?
1565
1609
 
1566
- Agents are defined in [src/lib/agents.ts](apps/cli/src/lib/agents.ts) -- each is a config object declaring commands dir, rules file, and capabilities. PRs welcome.
1610
+ Agents are defined in [src/lib/agents.ts](cli/src/lib/agents.ts) -- each is a config object declaring commands dir, rules file, and capabilities. PRs welcome.
1567
1611
 
1568
1612
  ### What's the relationship to Phoenix Labs / Rush?
1569
1613
 
@@ -1575,21 +1619,24 @@ Agents are defined in [src/lib/agents.ts](apps/cli/src/lib/agents.ts) -- each is
1575
1619
 
1576
1620
  | Path | What |
1577
1621
  |---|---|
1578
- | [`apps/cli`](apps/cli) | **The CLI** (this README) — version management, config sync, sessions, teams, cloud, browser, computer, secrets. |
1579
- | [`apps/ext`](apps/ext) | **AGI EXT** — a VS Code extension that spawns agent terminals as tabs and adds the Fleet dashboard. A separate product with its own publish identity. |
1622
+ | [`cli`](cli) | **The CLI** (this README) — version management, config sync, sessions, teams, cloud, browser, computer, secrets. |
1623
+ | [phnx-labs/agi-ext](https://github.com/phnx-labs/agi-ext) | **AGI EXT** — the VS Code extension (agent terminals as tabs + the Fleet dashboard). Moved to its own repo (RUSH-3189); separate product, own publish identity. |
1580
1624
  | [`native/computer-mac`](native/computer-mac) · [`native/computer-win`](native/computer-win) | Native backends behind `agents computer` — Swift (macOS Accessibility + screen capture) and C#/.NET (Windows UI Automation). |
1581
- | [`packages/session-tracker`](packages/session-tracker) | The `SessionStart` hook that writes live-session state **AGI EXT** reads back (`apps/ext/src/core/liveSession.ts`) — not the CLI, which reads transcripts. |
1625
+ | [`packages/session-tracker`](packages/session-tracker) | The `SessionStart` hook that writes live-session state **AGI EXT** reads back (agi-ext `src/core/liveSession.ts`) — not the CLI, which reads transcripts. |
1582
1626
 
1583
1627
  ## Contributing
1584
1628
 
1585
1629
  ```bash
1586
1630
  git clone https://github.com/phnx-labs/agi-cli
1587
- cd agi-cli/apps/cli
1631
+ cd agi-cli/cli
1588
1632
  bun install && bun run build && bun test
1589
1633
  ```
1590
1634
 
1591
- Commands in [`apps/cli/src/commands/`](apps/cli/src/commands/), libraries in [`apps/cli/src/lib/`](apps/cli/src/lib/), tests as `*.test.ts` under vitest. [CLAUDE.md](CLAUDE.md) has the full style guide. [docs/landscape.md](apps/cli/docs/landscape.md) covers the competitive landscape.
1635
+ Commands live in [`cli/src/commands/`](cli/src/commands/), libraries in
1636
+ [`cli/src/lib/`](cli/src/lib/), and tests sit beside their sources. [AGENTS.md](AGENTS.md)
1637
+ is the canonical engineering guide; [`cli/docs/README.md`](cli/docs/README.md) is the
1638
+ architecture index.
1592
1639
 
1593
1640
  ## License
1594
1641
 
1595
- Apache-2.0 -- see [LICENSE](./LICENSE).
1642
+ FSL-1.1-Apache-2.0 -- see [LICENSE](./LICENSE). Free for every user and company to use, modify, and redistribute; the only barred use is offering agents-cli itself as a competing commercial product or service. Each version automatically becomes Apache-2.0 two years after its release.
package/dist/bootstrap.js CHANGED
@@ -473,8 +473,10 @@ async function installResolvedPackage(metadata) {
473
473
  // getKeychainHelperPath() still repairs it on the next secret operation).
474
474
  if (process.platform === 'darwin') {
475
475
  try {
476
- const { ensureKeychainHelperInstalled } = await import('./lib/secrets/install-helper.js');
477
- ensureKeychainHelperInstalled({ forceReinstall: true });
476
+ const { ensureKeychainHelperInstalledAsync } = await import('./lib/secrets/install-helper.js');
477
+ // Async + download-capable: an upgrade to a tarball that dropped the
478
+ // bundle fetches the verified release asset instead of no-op'ing.
479
+ await ensureKeychainHelperInstalledAsync({ forceReinstall: true });
478
480
  }
479
481
  catch {
480
482
  // Non-fatal.
@@ -63,8 +63,8 @@ export declare const loadMenubar: ModuleLoader;
63
63
  export declare const loadSync: ModuleLoader;
64
64
  export declare const loadRefreshRules: ModuleLoader;
65
65
  export declare const loadFactory: ModuleLoader;
66
- export declare const loadUsage: ModuleLoader;
67
66
  export declare const loadInsights: ModuleLoader;
67
+ export declare const loadTrace: ModuleLoader;
68
68
  export declare const loadPerf: ModuleLoader;
69
69
  export declare const loadPty: ModuleLoader;
70
70
  export declare const loadTmux: ModuleLoader;
@@ -91,6 +91,7 @@ export declare const loadHumans: ModuleLoader;
91
91
  export declare const loadAccounts: ModuleLoader;
92
92
  export declare const loadDaemon: ModuleLoader;
93
93
  export declare const loadAuth: ModuleLoader;
94
+ export declare const loadTraces: ModuleLoader;
94
95
  /**
95
96
  * Commands whose modules pull in the SQLite-backed session/cloud stack. They are
96
97
  * registered AFTER `applyGlobalHelpConventions` (mirroring main's order: help
@@ -65,8 +65,8 @@ export const loadMenubar = async () => (await import('../commands/menubar.js')).
65
65
  export const loadSync = async () => (await import('../commands/sync.js')).registerSyncCommand;
66
66
  export const loadRefreshRules = async () => (await import('../commands/refresh-rules.js')).registerRefreshRulesCommand;
67
67
  export const loadFactory = async () => (await import('../commands/factory.js')).registerFactoryCommands;
68
- export const loadUsage = async () => (await import('../commands/usage.js')).registerUsageCommand;
69
68
  export const loadInsights = async () => (await import('../commands/insights.js')).registerInsightsCommand;
69
+ export const loadTrace = async () => (await import('../commands/sessions-trace.js')).registerTraceCommand;
70
70
  export const loadPerf = async () => (await import('../commands/perf.js')).registerPerfCommand;
71
71
  export const loadPty = async () => (await import('../commands/pty.js')).registerPtyCommands;
72
72
  export const loadTmux = async () => (await import('../commands/tmux.js')).registerTmuxCommands;
@@ -94,6 +94,7 @@ export const loadHumans = async () => (await import('../commands/humans.js')).re
94
94
  export const loadAccounts = async () => (await import('../commands/accounts.js')).registerAccountsCommand;
95
95
  export const loadDaemon = async () => (await import('../commands/daemon.js')).registerDaemonCommand;
96
96
  export const loadAuth = async () => (await import('../commands/auth.js')).registerAuthCommand;
97
+ export const loadTraces = async () => (await import('../commands/traces.js')).registerTracesCommands;
97
98
  /**
98
99
  * Commands whose modules pull in the SQLite-backed session/cloud stack. They are
99
100
  * registered AFTER `applyGlobalHelpConventions` (mirroring main's order: help
@@ -172,8 +173,10 @@ export const COMMAND_LOADERS = {
172
173
  sync: [loadSync],
173
174
  'refresh-rules': [loadRefreshRules],
174
175
  factory: [loadFactory],
175
- usage: [loadUsage],
176
176
  insights: [loadInsights],
177
+ // `agents trace` is a top-level alias of `agents sessions trace` (precedent:
178
+ // `agents insights` aliases `agents sessions insights`). One implementation.
179
+ trace: [loadTrace],
177
180
  perf: [loadPerf],
178
181
  pty: [loadPty],
179
182
  tmux: [loadTmux],
@@ -209,6 +212,7 @@ export const COMMAND_LOADERS = {
209
212
  humans: [loadHumans],
210
213
  daemon: [loadDaemon],
211
214
  auth: [loadAuth],
215
+ traces: [loadTraces],
212
216
  };
213
217
  /**
214
218
  * Register every module in {@link COMMAND_LOADERS} onto one fresh program and
@@ -1,5 +1,6 @@
1
1
  import type { Command } from 'commander';
2
2
  import type { AgentId } from '../lib/types.js';
3
+ import { collectRunCandidates, type RotateCandidate } from '../lib/accounting/rotate.js';
3
4
  import { type Profile } from '../lib/profiles.js';
4
5
  import { type UnifiedAccount } from '../lib/account-registry.js';
5
6
  export declare function nativeIdentityFromSource(raw: string): Promise<{
@@ -26,10 +27,67 @@ type AttachTarget = {
26
27
  * `agent@version`, or a known harness id.
27
28
  */
28
29
  export declare function classifyAttachTarget(target: string): AttachTarget;
30
+ /**
31
+ * Persist the attached setup-token to a per-version `.oauth_token` file so an
32
+ * INTERACTIVE Claude launch on a keychain-less Linux worker can authenticate from it.
33
+ * Headless runs inject the token via `buildExecEnv`, but an interactive launch defers to
34
+ * the per-version login (`claudeAdapter.applyExecConfigEnv`), and the shim's Linux fallback
35
+ * (`claudeAdapter.shimConfigEnvBash`) reads exactly this file. Without writing it, a
36
+ * freshly-attached setup-token was invisible to interactive runs on a worker. macOS keeps
37
+ * the credential in the keychain, so `resolveClaudeSetupToken` returns null there and this
38
+ * is a no-op off Linux.
39
+ */
40
+ export declare function writeClaudeInteractiveOauthToken(target: AttachTarget, targetAgent: AgentId): void;
29
41
  export declare function parseBundleKey(raw: string): {
30
42
  bundle: string;
31
43
  key: string;
32
44
  };
45
+ /** Pure text renderer for `agents accounts list` — grouped, column-aligned, labels first-class. */
46
+ export declare function renderAccountList(records: {
47
+ name: string;
48
+ provider: string;
49
+ auth: string;
50
+ }[], native: {
51
+ agent: AgentId;
52
+ name?: string;
53
+ display: string;
54
+ versions: string[];
55
+ }[]): string;
56
+ /** One labelable signed-in identity, folded across every version it is signed into. */
57
+ export interface LabelIdentity {
58
+ identityKey: string;
59
+ email: string | null;
60
+ versions: string[];
61
+ isDefault: boolean;
62
+ }
63
+ /**
64
+ * Fold signed-in run candidates into distinct identities — the unit a label
65
+ * binds to. The same account signed into several versions is ONE row, so a
66
+ * multi-version single-account harness never demands a selector. Candidates
67
+ * with no stable identity (no accountKey, no email) are dropped: there is
68
+ * nothing durable for a label to bind to. Default-version identity first.
69
+ */
70
+ export declare function groupLabelIdentities(candidates: Pick<RotateCandidate, 'version' | 'email' | 'accountKey'>[], defaultVersion: string | null): LabelIdentity[];
71
+ export type LabelSelection = {
72
+ kind: 'selected';
73
+ identity: LabelIdentity;
74
+ } | {
75
+ kind: 'ambiguous';
76
+ identities: LabelIdentity[];
77
+ };
78
+ /**
79
+ * Resolve which signed-in login a bare-harness `accounts label` call means.
80
+ * `collect` is injectable (the `resolveRunVersion` pattern) so tests drive the
81
+ * real selection path against fixture candidates.
82
+ */
83
+ export declare function resolveLabelIdentity(agent: AgentId, accountSelector: string | undefined, collect?: typeof collectRunCandidates): Promise<LabelSelection>;
84
+ /**
85
+ * Body of `accounts label`, exported with the injectable candidate collector
86
+ * so tests exercise everything but the TTY prompt itself.
87
+ */
88
+ export declare function runAccountsLabel(source: string, label: string | undefined, opts: {
89
+ account?: string;
90
+ }, collect?: typeof collectRunCandidates): Promise<void>;
33
91
  /** Named accounts that `set-default` / `switch` can pin for this harness. */
34
92
  export declare function listSwitchableAccounts(agent: AgentId): Promise<UnifiedAccount[]>;
35
93
  /**