@phnx-labs/agents-cli 1.23.17 → 1.23.18

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 (204) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/README.md +140 -165
  3. package/dist/bootstrap.js +10 -16
  4. package/dist/cli/command-registry.d.ts +1 -2
  5. package/dist/cli/command-registry.js +1 -10
  6. package/dist/commands/accounts.js +7 -7
  7. package/dist/commands/cloud-transcripts.d.ts +0 -1
  8. package/dist/commands/cloud-transcripts.js +2 -2
  9. package/dist/commands/cloud.js +1 -1
  10. package/dist/commands/config.js +0 -4
  11. package/dist/commands/cost.js +1 -1
  12. package/dist/commands/daemon-index.js +0 -1
  13. package/dist/commands/detach.d.ts +1 -1
  14. package/dist/commands/detach.js +5 -5
  15. package/dist/commands/exec.js +10 -22
  16. package/dist/commands/feed.d.ts +1 -1
  17. package/dist/commands/feed.js +3 -3
  18. package/dist/commands/focus.d.ts +1 -4
  19. package/dist/commands/focus.js +12 -13
  20. package/dist/commands/fork.d.ts +0 -1
  21. package/dist/commands/fork.js +7 -16
  22. package/dist/commands/harness-wizard.js +1 -1
  23. package/dist/commands/harness.js +1 -1
  24. package/dist/commands/insights.d.ts +0 -1
  25. package/dist/commands/insights.js +3 -7
  26. package/dist/commands/open.js +1 -1
  27. package/dist/commands/output.js +1 -1
  28. package/dist/commands/profiles.d.ts +1 -1
  29. package/dist/commands/profiles.js +2 -2
  30. package/dist/commands/projects.js +1 -1
  31. package/dist/commands/prune.js +1 -1
  32. package/dist/commands/ps.d.ts +0 -1
  33. package/dist/commands/ps.js +63 -18
  34. package/dist/commands/routines.js +1 -1
  35. package/dist/commands/send.js +1 -1
  36. package/dist/commands/sessions-backfill.d.ts +0 -1
  37. package/dist/commands/sessions-backfill.js +3 -6
  38. package/dist/commands/sessions-browser.d.ts +0 -10
  39. package/dist/commands/sessions-browser.js +19 -25
  40. package/dist/commands/sessions-migrate.d.ts +2 -2
  41. package/dist/commands/sessions-migrate.js +13 -13
  42. package/dist/commands/sessions-optimize.d.ts +0 -1
  43. package/dist/commands/sessions-optimize.js +0 -3
  44. package/dist/commands/sessions-picker.js +11 -11
  45. package/dist/commands/sessions-resume.d.ts +16 -15
  46. package/dist/commands/sessions-resume.js +101 -269
  47. package/dist/commands/sessions-stats.d.ts +0 -1
  48. package/dist/commands/sessions-stats.js +5 -8
  49. package/dist/commands/sessions-stop.d.ts +1 -1
  50. package/dist/commands/sessions-stop.js +6 -6
  51. package/dist/commands/sessions-trace.d.ts +1 -1
  52. package/dist/commands/sessions-trace.js +40 -17
  53. package/dist/commands/sessions-watch.js +2 -2
  54. package/dist/commands/sessions.test-fixture.d.ts +1 -0
  55. package/dist/commands/sessions.test-fixture.js +14 -0
  56. package/dist/commands/setup-browser.js +4 -4
  57. package/dist/commands/setup-computer.js +4 -4
  58. package/dist/commands/setup-fleet.js +1 -1
  59. package/dist/commands/setup-preferences.js +1 -1
  60. package/dist/commands/{sessions-backup-setup.d.ts → setup-session-backup.d.ts} +2 -2
  61. package/dist/commands/{sessions-backup-setup.js → setup-session-backup.js} +8 -8
  62. package/dist/commands/setup.js +3 -1
  63. package/dist/commands/ssh.js +4 -5
  64. package/dist/commands/sync.js +1 -1
  65. package/dist/commands/teams.js +2 -2
  66. package/dist/commands/utils.d.ts +0 -1
  67. package/dist/commands/utils.js +0 -10
  68. package/dist/index.js +0 -71
  69. package/dist/lib/analytics/mix-commands.js +1 -1
  70. package/dist/lib/auth-mint.js +2 -2
  71. package/dist/lib/browser-client.d.ts +0 -1
  72. package/dist/lib/browser-client.js +0 -3
  73. package/dist/lib/cloud/antigravity.js +1 -1
  74. package/dist/lib/cloud/cursor.js +3 -3
  75. package/dist/lib/cloudflare/creds.js +2 -2
  76. package/dist/lib/computer/context.d.ts +4 -21
  77. package/dist/lib/computer/context.js +3 -24
  78. package/dist/lib/computer/policy.d.ts +0 -10
  79. package/dist/lib/computer/policy.js +0 -28
  80. package/dist/lib/computer-client.d.ts +0 -44
  81. package/dist/lib/computer-client.js +17 -121
  82. package/dist/lib/config-keys.d.ts +1 -1
  83. package/dist/lib/config-keys.js +0 -3
  84. package/dist/lib/crabbox/cli.js +1 -1
  85. package/dist/lib/device-config.js +5 -28
  86. package/dist/lib/devices/connect.d.ts +1 -1
  87. package/dist/lib/devices/connect.js +3 -6
  88. package/dist/lib/devices/doctor-findings.d.ts +2 -1
  89. package/dist/lib/devices/doctor-findings.js +4 -4
  90. package/dist/lib/exec.js +1 -1
  91. package/dist/lib/feed/activity.js +1 -1
  92. package/dist/lib/fleet/apply.js +1 -1
  93. package/dist/lib/help.d.ts +0 -1
  94. package/dist/lib/help.js +2 -10
  95. package/dist/lib/hosts/option.js +1 -1
  96. package/dist/lib/hosts/passthrough.d.ts +0 -1
  97. package/dist/lib/hosts/passthrough.js +2 -26
  98. package/dist/lib/hosts/reconnect.js +5 -5
  99. package/dist/lib/hosts/remote-cmd.d.ts +3 -5
  100. package/dist/lib/hosts/remote-cmd.js +15 -20
  101. package/dist/lib/hosts/remote-session-id.js +1 -1
  102. package/dist/lib/installations/active-check.js +1 -1
  103. package/dist/lib/installations/migrate.js +4 -15
  104. package/dist/lib/installations/versions.js +1 -1
  105. package/dist/lib/launch-log.js +3 -6
  106. package/dist/lib/owner-notify.d.ts +1 -6
  107. package/dist/lib/owner-notify.js +0 -2
  108. package/dist/lib/paths.d.ts +0 -1
  109. package/dist/lib/paths.js +0 -8
  110. package/dist/lib/permissions.js +1 -1
  111. package/dist/lib/redact.d.ts +0 -1
  112. package/dist/lib/redact.js +0 -4
  113. package/dist/lib/remote-agents-json.d.ts +3 -1
  114. package/dist/lib/remote-agents-json.js +8 -6
  115. package/dist/lib/reserved-stores.js +1 -1
  116. package/dist/lib/scheduling/routines.d.ts +0 -1
  117. package/dist/lib/scheduling/routines.js +1 -1
  118. package/dist/lib/session/active.d.ts +1 -1
  119. package/dist/lib/session/db.js +3 -3
  120. package/dist/lib/session/detached.d.ts +0 -1
  121. package/dist/lib/session/detached.js +0 -23
  122. package/dist/lib/session/discover.d.ts +2 -2
  123. package/dist/lib/session/presentation.d.ts +0 -7
  124. package/dist/lib/session/presentation.js +4 -4
  125. package/dist/lib/session/projection.js +1 -1
  126. package/dist/lib/session/remote/remote-list.d.ts +2 -0
  127. package/dist/lib/session/remote/remote-list.js +3 -2
  128. package/dist/lib/session/remote/watch.js +4 -5
  129. package/dist/lib/session/remote-active.js +1 -1
  130. package/dist/lib/session/resume-command.d.ts +0 -1
  131. package/dist/lib/session/resume-command.js +1 -4
  132. package/dist/lib/session/resume-owner.d.ts +0 -2
  133. package/dist/lib/session/resume-owner.js +0 -6
  134. package/dist/lib/session/selection.d.ts +4 -5
  135. package/dist/lib/session/selection.js +2 -2
  136. package/dist/lib/session/sync/config.d.ts +0 -25
  137. package/dist/lib/session/sync/config.js +0 -62
  138. package/dist/lib/session/sync/managed-config.d.ts +0 -1
  139. package/dist/lib/session/sync/managed-config.js +0 -3
  140. package/dist/lib/session/sync/worker-template.js +1 -1
  141. package/dist/lib/sessions-client.d.ts +0 -16
  142. package/dist/lib/sessions-client.js +1 -187
  143. package/dist/lib/startup/command-registry.d.ts +2 -0
  144. package/dist/lib/startup/command-registry.js +36 -3
  145. package/dist/lib/startup/root-command.d.ts +0 -1
  146. package/dist/lib/startup/root-command.js +0 -21
  147. package/dist/lib/sync-umbrella.js +1 -1
  148. package/dist/lib/terminal/resolve.js +1 -1
  149. package/dist/lib/watchdog/rotate.js +1 -1
  150. package/dist/lib/watchdog/watchdog.d.ts +1 -1
  151. package/dist/lib/watchdog/watchdog.js +2 -2
  152. package/package.json +1 -1
  153. package/dist/commands/browser.d.ts +0 -7
  154. package/dist/commands/browser.js +0 -139
  155. package/dist/commands/computer.d.ts +0 -48
  156. package/dist/commands/computer.js +0 -244
  157. package/dist/commands/resume.d.ts +0 -23
  158. package/dist/commands/resume.js +0 -158
  159. package/dist/commands/secrets-passthrough.d.ts +0 -3
  160. package/dist/commands/secrets-passthrough.js +0 -52
  161. package/dist/commands/sessions-bookmark.d.ts +0 -2
  162. package/dist/commands/sessions-bookmark.js +0 -92
  163. package/dist/commands/sessions-export.d.ts +0 -31
  164. package/dist/commands/sessions-export.js +0 -409
  165. package/dist/commands/sessions-import.d.ts +0 -6
  166. package/dist/commands/sessions-import.js +0 -343
  167. package/dist/commands/sessions-inject.d.ts +0 -14
  168. package/dist/commands/sessions-inject.js +0 -143
  169. package/dist/commands/sessions-picker-factory.d.ts +0 -24
  170. package/dist/commands/sessions-picker-factory.js +0 -59
  171. package/dist/commands/sessions-render.d.ts +0 -11
  172. package/dist/commands/sessions-render.js +0 -119
  173. package/dist/commands/sessions-share.d.ts +0 -15
  174. package/dist/commands/sessions-share.js +0 -171
  175. package/dist/commands/sessions.d.ts +0 -122
  176. package/dist/commands/sessions.js +0 -1760
  177. package/dist/lib/address.d.ts +0 -39
  178. package/dist/lib/address.js +0 -128
  179. package/dist/lib/computer/record.d.ts +0 -6
  180. package/dist/lib/computer/record.js +0 -25
  181. package/dist/lib/openclaw-keychain.d.ts +0 -43
  182. package/dist/lib/openclaw-keychain.js +0 -227
  183. package/dist/lib/session/bundle.d.ts +0 -76
  184. package/dist/lib/session/bundle.js +0 -146
  185. package/dist/lib/session/remote/remote-bundle.d.ts +0 -7
  186. package/dist/lib/session/remote/remote-bundle.js +0 -40
  187. package/dist/lib/session/remote/remote.d.ts +0 -35
  188. package/dist/lib/session/remote/remote.js +0 -198
  189. package/dist/lib/session/remote-bundle.d.ts +0 -1
  190. package/dist/lib/session/remote-bundle.js +0 -1
  191. package/dist/lib/session/remote.d.ts +0 -1
  192. package/dist/lib/session/remote.js +0 -1
  193. package/dist/lib/session/sync/agents.d.ts +0 -24
  194. package/dist/lib/session/sync/agents.js +0 -0
  195. package/dist/lib/session/sync/backend.d.ts +0 -22
  196. package/dist/lib/session/sync/backend.js +0 -44
  197. package/dist/lib/session/sync/managed-key.d.ts +0 -5
  198. package/dist/lib/session/sync/managed-key.js +0 -87
  199. package/dist/lib/session/sync/net-client.d.ts +0 -29
  200. package/dist/lib/session/sync/net-client.js +0 -87
  201. package/dist/lib/session/sync/r2.d.ts +0 -20
  202. package/dist/lib/session/sync/r2.js +0 -103
  203. package/dist/lib/session/sync/transcript-crypto.d.ts +0 -41
  204. package/dist/lib/session/sync/transcript-crypto.js +0 -115
package/dist/bootstrap.js CHANGED
@@ -4,7 +4,7 @@ import * as fs from 'fs';
4
4
  import * as path from 'path';
5
5
  import { fileURLToPath } from 'url';
6
6
  import { detectDevBuild } from './lib/startup/dev-build.js';
7
- import { configureRootCommand, normalizeResumeDeviceArgs } from './lib/startup/root-command.js';
7
+ import { configureRootCommand } from './lib/startup/root-command.js';
8
8
  import { bootMark } from './lib/boot-profile.js';
9
9
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
10
  const packageJsonPath = path.join(__dirname, '..', 'package.json');
@@ -21,7 +21,7 @@ if (IS_DEV_BUILD) {
21
21
  if (process.env.AGENTS_CLI_DISABLE_AUTO_UPDATE === undefined)
22
22
  process.env.AGENTS_CLI_DISABLE_AUTO_UPDATE = '1';
23
23
  }
24
- import { COMMAND_LOADERS, LAZY_COMMAND_NAMES, KNOWN_TOP_LEVEL_COMMANDS, RETIRED_TOP_LEVEL_COMMANDS, registerAllCommands, } from './cli/command-registry.js';
24
+ import { COMMAND_LOADERS, LAZY_COMMAND_NAMES, KNOWN_TOP_LEVEL_COMMANDS, RETIRED_TOP_LEVEL_COMMANDS, removedToolGroupMessage, registerAllCommands, } from './cli/command-registry.js';
25
25
  import { closestTopLevelCommand } from './lib/startup/spellcheck.js';
26
26
  import { applyGlobalHelpConventions, FRONT_DOOR_COMMAND_GROUPS, registerCommandGroups, setCompactRootHelp, } from './lib/help.js';
27
27
  import { renderWhatsNew } from './lib/whats-new.js';
@@ -621,22 +621,16 @@ program.on('command:*', (operands) => {
621
621
  }
622
622
  process.exit(1);
623
623
  });
624
- const passedArgs = normalizeResumeDeviceArgs(process.argv.slice(2));
625
- process.argv.splice(2, process.argv.length - 2, ...passedArgs);
626
- if (passedArgs[0] === 'sessions') {
627
- const nestedVersionIndex = passedArgs.indexOf('--version', 1);
628
- if (nestedVersionIndex >= 0) {
629
- const nestedVersion = passedArgs[nestedVersionIndex + 1];
630
- if (!nestedVersion || nestedVersion.startsWith('-')) {
631
- console.error("error: option '--version <version>' argument missing");
632
- process.exit(1);
633
- }
634
- passedArgs[nestedVersionIndex] = '--session-version';
635
- process.argv[nestedVersionIndex + 2] = '--session-version';
636
- }
637
- }
624
+ const passedArgs = process.argv.slice(2);
638
625
  const requestedCommandIndex = commandTokenIndex(passedArgs);
639
626
  const requestedCommand = requestedCommandIndex === undefined ? undefined : passedArgs[requestedCommandIndex];
627
+ const removedGroupMessage = requestedCommand === undefined
628
+ ? undefined
629
+ : removedToolGroupMessage(requestedCommand, passedArgs.slice(requestedCommandIndex + 1));
630
+ if (removedGroupMessage) {
631
+ console.error(removedGroupMessage);
632
+ process.exit(1);
633
+ }
640
634
  const verboseStartup = passedArgs.includes('--verbose');
641
635
  const helpAllRequested = passedArgs.includes('--help-all');
642
636
  const helpOrVersionRequested = passedArgs.some((arg) => arg === '--help' || arg === '-h' || arg === '--version' || arg === '-V');
@@ -1,5 +1,5 @@
1
1
  import { Command } from 'commander';
2
- export { KNOWN_TOP_LEVEL_COMMANDS, RETIRED_TOP_LEVEL_COMMANDS } from '../lib/startup/command-registry.js';
2
+ export { KNOWN_TOP_LEVEL_COMMANDS, RETIRED_TOP_LEVEL_COMMANDS, removedToolGroupMessage } from '../lib/startup/command-registry.js';
3
3
  export type Registrar = (program: Command) => void;
4
4
  export type ModuleLoader = () => Promise<Registrar>;
5
5
  export declare const loadVersions: ModuleLoader;
@@ -7,7 +7,6 @@ export declare const loadUpdate: ModuleLoader;
7
7
  export declare const loadRun: ModuleLoader;
8
8
  export declare const loadPrune: ModuleLoader;
9
9
  export declare const loadDoctor: ModuleLoader;
10
- export declare const loadSessions: ModuleLoader;
11
10
  export declare const loadTeams: ModuleLoader;
12
11
  export declare const LAZY_COMMAND_NAMES: ReadonlySet<string>;
13
12
  export declare const COMMAND_LOADERS: Record<string, ModuleLoader[]>;
@@ -2,7 +2,7 @@ import { Command } from 'commander';
2
2
  import { readFileSync } from 'node:fs';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  import { configureRootCommand } from '../lib/startup/root-command.js';
5
- export { KNOWN_TOP_LEVEL_COMMANDS, RETIRED_TOP_LEVEL_COMMANDS } from '../lib/startup/command-registry.js';
5
+ export { KNOWN_TOP_LEVEL_COMMANDS, RETIRED_TOP_LEVEL_COMMANDS, removedToolGroupMessage } from '../lib/startup/command-registry.js';
6
6
  const loadView = async () => (await import('../commands/view.js')).registerViewCommand;
7
7
  const loadInspect = async () => (await import('../commands/inspect.js')).registerInspectCommand;
8
8
  const loadCommands = async () => (await import('../commands/commands.js')).registerCommandsCommands;
@@ -29,7 +29,6 @@ const loadModels = async () => (await import('../commands/models.js')).registerM
29
29
  export const loadPrune = async () => (await import('../commands/prune.js')).registerPruneCommand;
30
30
  export const loadDoctor = async () => (await import('../commands/doctor.js')).registerDoctorCommand;
31
31
  const loadHarness = async () => (await import('../commands/harness.js')).registerHarnessCommands;
32
- const loadSecrets = async () => (await import('../commands/secrets-passthrough.js')).registerSecretsCommands;
33
32
  const loadMenubar = async () => (await import('../commands/menubar.js')).registerMenubarCommands;
34
33
  const loadSync = async () => (await import('../commands/sync.js')).registerSyncCommand;
35
34
  const loadRefreshRules = async () => (await import('../commands/refresh-rules.js')).registerRefreshRulesCommand;
@@ -37,15 +36,12 @@ const loadFactory = async () => (await import('../commands/factory.js')).registe
37
36
  const loadInsights = async () => (await import('../commands/insights.js')).registerInsightsCommand;
38
37
  const loadTrace = async () => (await import('../commands/sessions-trace.js')).registerTraceCommand;
39
38
  const loadWatchdog = async () => (await import('../commands/watchdog.js')).registerWatchdogCommand;
40
- const loadBrowser = async () => (await import('../commands/browser.js')).registerBrowserCommand;
41
- const loadComputer = async () => (await import('../commands/computer.js')).registerComputerCommand;
42
39
  const loadEvents = async () => (await import('../commands/events.js')).registerEventsCommand;
43
40
  const loadSsh = async () => (await import('../commands/ssh.js')).registerSshCommands;
44
41
  const loadRepo = async () => (await import('../commands/repo.js')).registerRepoCommands;
45
42
  const loadSetup = async () => (await import('../commands/setup.js')).registerSetupCommand;
46
43
  const loadUninstall = async () => (await import('../commands/uninstall.js')).registerUninstallCommands;
47
44
  const loadUpgrade = async () => (await import('../commands/upgrade.js')).registerUpgradeCommand;
48
- export const loadSessions = async () => (await import('../commands/sessions.js')).registerSessionsCommands;
49
45
  export const loadTeams = async () => (await import('../commands/teams.js')).registerTeamsCommands;
50
46
  const loadCloud = async () => (await import('../commands/cloud.js')).registerCloudCommands;
51
47
  const loadPs = async () => (await import('../commands/ps.js')).registerPsCommand;
@@ -56,7 +52,6 @@ const loadDaemon = async () => (await import('../commands/daemon.js')).registerD
56
52
  const loadAuth = async () => (await import('../commands/auth.js')).registerAuthCommand;
57
53
  const loadRecordings = async () => (await import('../commands/recordings.js')).registerRecordingsCommand;
58
54
  export const LAZY_COMMAND_NAMES = new Set([
59
- 'sessions',
60
55
  'teams',
61
56
  'cloud',
62
57
  ]);
@@ -94,7 +89,6 @@ export const COMMAND_LOADERS = {
94
89
  doctor: [loadDoctor],
95
90
  harness: [loadHarness],
96
91
  harnesses: [loadHarness],
97
- secrets: [loadSecrets],
98
92
  menubar: [loadMenubar],
99
93
  sync: [loadSync],
100
94
  'refresh-rules': [loadRefreshRules],
@@ -102,8 +96,6 @@ export const COMMAND_LOADERS = {
102
96
  insights: [loadInsights],
103
97
  trace: [loadTrace],
104
98
  watchdog: [loadWatchdog],
105
- browser: [loadBrowser],
106
- computer: [loadComputer],
107
99
  events: [loadEvents],
108
100
  ssh: [loadSsh],
109
101
  devices: [loadSsh],
@@ -113,7 +105,6 @@ export const COMMAND_LOADERS = {
113
105
  setup: [loadSetup],
114
106
  uninstall: [loadUninstall],
115
107
  upgrade: [loadUpgrade],
116
- sessions: [loadSessions],
117
108
  teams: [loadTeams],
118
109
  cloud: [loadCloud],
119
110
  ps: [loadPs],
@@ -75,7 +75,7 @@ async function secretFromBundle(raw) {
75
75
  catch (err) {
76
76
  if (!isSecretsClientError(err, 'NOT_FOUND'))
77
77
  throw err;
78
- throw new Error(`Secrets bundle '${bundle}' not found. List bundles with 'agents secrets list'.`);
78
+ throw new Error(`Secrets bundle '${bundle}' not found. List bundles with 'secrets list'.`);
79
79
  }
80
80
  if (!(key in vars)) {
81
81
  const available = Object.keys(vars).join(', ') || '(none)';
@@ -89,7 +89,7 @@ async function secretFromBundle(raw) {
89
89
  if (!isSecretsClientError(err, 'LOCKED'))
90
90
  throw err;
91
91
  throw new Error(`Secrets bundle '${bundle}' is not unlocked for a prompt-free read. ` +
92
- `Unlock it first with 'agents secrets unlock ${bundle}', then retry.`);
92
+ `Unlock it first with 'secrets unlock ${bundle}', then retry.`);
93
93
  }
94
94
  }
95
95
  async function promptAccountSecret(message) {
@@ -317,7 +317,7 @@ export function registerAccountsCommand(program) {
317
317
  agents accounts list claude
318
318
  agents accounts list --json
319
319
  agents accounts list --fleet`,
320
- notes: 'One row per account per harness: the account name, its usage bars (`*` stale), then nothing at all when the account is healthy. A state worth acting on trails the row — `rate-limited` (the usage snapshot via `deriveUsageStatusFromSnapshot`/`applyUsageHonesty`, never a probe 429), `expired`/`revoked`/`missing`, partial fleet coverage (`usable on 3 of 5 boxes`), then the exact repair command. `live`, `unverified`, `ready` and `per-device` are the ordinary cases and print nothing. For the identity behind an account use `agents accounts view <name>`; for per-device state use `--fleet`; for everything use `--json`. Reserved credential stores are not listed here; `agents secrets` is the place those show.',
320
+ notes: 'One row per account per harness: the account name, its usage bars (`*` stale), then nothing at all when the account is healthy. A state worth acting on trails the row — `rate-limited` (the usage snapshot via `deriveUsageStatusFromSnapshot`/`applyUsageHonesty`, never a probe 429), `expired`/`revoked`/`missing`, partial fleet coverage (`usable on 3 of 5 boxes`), then the exact repair command. `live`, `unverified`, `ready` and `per-device` are the ordinary cases and print nothing. For the identity behind an account use `agents accounts view <name>`; for per-device state use `--fleet`; for everything use `--json`. Reserved credential stores are not listed here; `secrets` is the place those show.',
321
321
  });
322
322
  const addCmd = accounts.command('add <target> [name]')
323
323
  .description('Add an account. Harness form: add <harness> [name] runs the native login in a fresh credential slot and provisions workers. Provider form: add <name> --provider <p> --auth <t> stores a durable credential.')
@@ -327,7 +327,7 @@ agents accounts list --fleet`,
327
327
  .option('--provider <provider>', `Provider form: credential provider (${listAccountProviders().join(', ')})`)
328
328
  .option('--auth <type>', 'Provider form: api-key | setup-token | bearer-token')
329
329
  .option('--base-url <url>', 'Provider form: optional endpoint override stored with the account')
330
- .option('--from-secrets <bundle:key>', 'Provider form: import from an existing agents secrets entry')
330
+ .option('--from-secrets <bundle:key>', 'Provider form: import from an existing `secrets` bundle entry')
331
331
  .option('--json', 'Machine-readable result (never includes a credential)')
332
332
  .action(async (target, name, o, command) => {
333
333
  await runAccountsAction(command, async () => {
@@ -497,7 +497,7 @@ agents accounts migrate --dry-run --device worker-1`,
497
497
  });
498
498
  accounts.command('set-key <name>')
499
499
  .description('Rotate an account credential without changing its identity')
500
- .option('--from-secrets <bundle:key>', 'Import from an existing agents secrets entry')
500
+ .option('--from-secrets <bundle:key>', 'Import from an existing `secrets` bundle entry')
501
501
  .action(async (name, o, command) => {
502
502
  await runAccountsAction(command, async () => {
503
503
  const account = findAccount(name);
@@ -530,7 +530,7 @@ agents accounts migrate --dry-run --device worker-1`,
530
530
  throw new Error(`Unknown ${selector.agent} account '${selector.name}'.`);
531
531
  }
532
532
  const account = unified.kind === 'provider'
533
- ? { ...publicAccount(inspectAccount(unified.name)), custody: 'agents secrets (policy never)', attached: accountBindings(unified.id, meta) }
533
+ ? { ...publicAccount(inspectAccount(unified.name)), custody: 'secrets (policy never)', attached: accountBindings(unified.id, meta) }
534
534
  : { ...unified, custody: `${unified.agent} (not stored by agents-cli)`, attached: accountBindings(unified.id, meta) };
535
535
  if (o.json || command.optsWithGlobals().json)
536
536
  return console.log(JSON.stringify(account, null, 2));
@@ -669,6 +669,6 @@ agents run claude#work
669
669
  agents accounts logout claude
670
670
  agents accounts migrate --dry-run
671
671
  agents accounts migrate --apply`,
672
- notes: 'An account is a credential SLOT, not an installation: `accounts add <harness> [name]` runs the native login in a fresh HOME-shaped slot of the one managed install, registers the fleet-wide row, and mints the durable worker credential (claude: setup-token; codex/grok/cursor/opencode: --api-key or a prompt) in one step. Headed devices only — workers are provisioned automatically. `accounts login <harness>#<name>` re-auths into the same slot and re-mints; `accounts default <harness> [name]` is the one default write path. Native account records contain metadata only; harness-owned OAuth credentials are never copied. Provider accounts are explicit portable bundles with policy never. Harness-native OAuth sign-out is `agents accounts logout <harness>` (API-key accounts use `accounts remove`). Leftover per-account installations fold with `agents accounts migrate --dry-run|--apply`. Synced vault unlock is `agents secrets vault unlock`.',
672
+ notes: 'An account is a credential SLOT, not an installation: `accounts add <harness> [name]` runs the native login in a fresh HOME-shaped slot of the one managed install, registers the fleet-wide row, and mints the durable worker credential (claude: setup-token; codex/grok/cursor/opencode: --api-key or a prompt) in one step. Headed devices only — workers are provisioned automatically. `accounts login <harness>#<name>` re-auths into the same slot and re-mints; `accounts default <harness> [name]` is the one default write path. Native account records contain metadata only; harness-owned OAuth credentials are never copied. Provider accounts are explicit portable bundles with policy never. Harness-native OAuth sign-out is `agents accounts logout <harness>` (API-key accounts use `accounts remove`). Leftover per-account installations fold with `agents accounts migrate --dry-run|--apply`. Synced vault unlock is `secrets vault unlock`.',
673
673
  });
674
674
  }
@@ -3,5 +3,4 @@ import type { TranscriptRenderOptions } from '../lib/session/presentation.js';
3
3
  export interface CloudTranscriptsOptions extends TranscriptRenderOptions {
4
4
  limit?: string;
5
5
  }
6
- export declare function runCloudTranscripts(query: string | undefined, options: CloudTranscriptsOptions): Promise<void>;
7
6
  export declare function registerCloudTranscriptsCommand(cloud: Command): void;
@@ -2,7 +2,7 @@ import chalk from 'chalk';
2
2
  import { setHelpSections } from '../lib/help.js';
3
3
  import { interruptibleSpinner } from '../lib/spinner.js';
4
4
  const DEFAULT_LIMIT = '50';
5
- export async function runCloudTranscripts(query, options) {
5
+ async function runCloudTranscripts(query, options) {
6
6
  const { discoverCloudSessions, ensureCloudSessionCached } = await import('../lib/session/cloud.js');
7
7
  const { buildFilterOptions, printSessionTable, resolveViewMode, renderSession } = await import('../lib/session/presentation.js');
8
8
  let filterOpts;
@@ -93,7 +93,7 @@ export function registerCloudTranscriptsCommand(cloud) {
93
93
  notes: `
94
94
  - Reads Rush Cloud runs through your \`rush login\` session (~/.rush/user.yaml). A failed login or an unmatched or ambiguous selector exits 1; it never falls back to local sessions.
95
95
  - Every render fetches the run's transcript again and rewrites its copy under the agents cache.
96
- - Same output as \`agents sessions --cloud\`. \`agents cloud list/status/logs\` cover the run jobs, not their transcripts.
96
+ - \`agents cloud list/status/logs\` cover the run jobs, not their transcripts.
97
97
  `,
98
98
  });
99
99
  }
@@ -127,7 +127,7 @@ Examples:
127
127
  # Codex Cloud
128
128
  agents cloud run "add auth tests" --provider codex --env env_abc123
129
129
 
130
- # One of your own machines (agents hosts / agents devices), over SSH
130
+ # One of your own machines (agents devices), over SSH
131
131
  agents cloud run "run the nightly benchmark" --device gpu-box --agent claude
132
132
  agents cloud run "rebuild the index" --device gpu --any --remote-cwd ~/proj
133
133
 
@@ -92,7 +92,6 @@ function parseValue(key, parsed, raw) {
92
92
  return raw.trim();
93
93
  case 'browser.profile':
94
94
  case 'browser.viewer':
95
- case 'computer.host':
96
95
  return raw.trim();
97
96
  }
98
97
  const unhandled = property;
@@ -395,9 +394,6 @@ function* listDeviceConfigEntries(device) {
395
394
  continue;
396
395
  key = `${prefix}browser.viewer`;
397
396
  break;
398
- case 'computer.host':
399
- key = `${prefix}computer.host`;
400
- break;
401
397
  default:
402
398
  continue;
403
399
  }
@@ -68,7 +68,7 @@ async function costAction(options) {
68
68
  return;
69
69
  }
70
70
  if (totalSessions === 0) {
71
- console.log(chalk.gray('No sessions with cost data found. Run `agents sessions --all` to index, then retry.'));
71
+ console.log(chalk.gray('No sessions with cost data found. Run `sessions --all` to index, then retry.'));
72
72
  return;
73
73
  }
74
74
  const out = [];
@@ -21,7 +21,6 @@ export function registerDaemonIndexCommand(daemonCmd) {
21
21
  `,
22
22
  notes: `
23
23
  - The daemon's session-index service keeps new and changed sessions current on its own; these verbs are explicit maintenance on top of it.
24
- - Each verb is the same engine as its \`agents sessions\` spelling (\`--roots\`, \`optimize\`, \`backfill\`).
25
24
  `,
26
25
  });
27
26
  const roots = index
@@ -1,4 +1,4 @@
1
1
  import type { Command } from 'commander';
2
2
  import type { ActiveSession } from '../lib/session/active.js';
3
- export declare function registerDetachCommand(program: Command, group?: 'sessions' | 'ps'): void;
3
+ export declare function registerDetachCommand(program: Command): void;
4
4
  export declare function stopInteractive(s: ActiveSession, socket?: string): Promise<void>;
@@ -12,7 +12,7 @@ import { getLogsDir } from '../lib/state.js';
12
12
  import { runOnPeer } from '../lib/session/remote-list.js';
13
13
  import { buildBackgroundArgv, resolveDetachTarget, resolveOne } from './detach-core.js';
14
14
  import { setHelpSections } from '../lib/help.js';
15
- export function registerDetachCommand(program, group = 'sessions') {
15
+ export function registerDetachCommand(program) {
16
16
  const cmd = program
17
17
  .command('detach')
18
18
  .argument('<id>', 'Short or full id of the live session to background')
@@ -24,10 +24,10 @@ export function registerDetachCommand(program, group = 'sessions') {
24
24
  setHelpSections(cmd, {
25
25
  examples: `
26
26
  # Background a live session: its terminal closes, the agent keeps working headless
27
- agents ${group} detach 4b2f1a9c
27
+ agents ps detach 4b2f1a9c
28
28
 
29
29
  # Bring it back into a terminal later
30
- agents sessions resume 4b2f1a9c
30
+ agents ps focus 4b2f1a9c
31
31
  `,
32
32
  });
33
33
  }
@@ -111,7 +111,7 @@ async function detachAction(id, opts = {}) {
111
111
  const short = target.sessionId.slice(0, 8);
112
112
  if (target.kind === 'remote') {
113
113
  console.log(chalk.gray(`${short} lives on ${target.machine} — detaching it there over SSH…`));
114
- const rc = await runOnPeer(['sessions', 'detach', target.sessionId, '--local'], target.machine);
114
+ const rc = await runOnPeer(['ps', 'detach', target.sessionId, '--local'], target.machine);
115
115
  if (rc === 'no-target') {
116
116
  console.error(chalk.red(`Can't reach ${target.machine} to detach ${short}.`));
117
117
  process.exitCode = 1;
@@ -133,6 +133,6 @@ async function detachAction(id, opts = {}) {
133
133
  detachedAtMs: Date.now(),
134
134
  });
135
135
  console.log(chalk.green(`◒ Backgrounded ${agent} ${short}`) +
136
- chalk.gray(` — running headless (pid ${pid}). Bring it back: agents sessions resume ${short}`));
136
+ chalk.gray(` — running headless (pid ${pid}). Bring it back: agents ps focus ${short}`));
137
137
  console.log(chalk.gray(` logs: ${logFile}`));
138
138
  }
@@ -420,7 +420,7 @@ export function registerRunCommand(program) {
420
420
  .option('-e, --effort <effort>', 'Reasoning effort: low | medium | high | xhigh | max | auto (claude and codex only)', 'auto')
421
421
  .option('--model <model>', 'Cost tier (cheap|default|best|ultra) or a concrete model id; tiers resolve per harness+version to a supported model')
422
422
  .option('--env <key=value>', 'Pass environment variable to the agent (repeatable, e.g., --env DEBUG=1 --env API_KEY=xyz)', (val, prev) => [...prev, val], [])
423
- .option('--secrets <bundle>', 'Inject a secrets bundle (repeatable). Values resolve from macOS Keychain at run time. See `agents secrets`.', (val, prev) => [...prev, val], [])
423
+ .option('--secrets <bundle>', 'Inject a secrets bundle (repeatable). Values resolve from macOS Keychain at run time. See `secrets --help`.', (val, prev) => [...prev, val], [])
424
424
  .option('--no-auto-secrets', 'Skip auto-injection of secrets declared by a workflow\'s frontmatter `secrets:` field. Has no effect on bare-agent runs.')
425
425
  .option('--secrets-keys <keys>', 'Inject only this comma-separated subset of keys from --secrets bundles (e.g. KEY1,KEY2). Missing keys are an error. Applies to all --secrets bundles on this run.')
426
426
  .option('--allow-expired', 'Inject secrets even if their expiry date has passed (overrides the pre-run expiry abort).')
@@ -443,9 +443,9 @@ export function registerRunCommand(program) {
443
443
  .option('--since <time>', 'With a bare --resume: only sessions newer than this (default 30d; e.g. 2h, 7d, 4w, or ISO date)')
444
444
  .option('-n, --limit <n>', 'With a bare --resume: maximum sessions loaded into the picker (default 200)')
445
445
  .option('--session-id <id>', 'Force a NEW conversation to use this exact session UUID (Claude only). This CREATES a session — to resume an existing one, use --resume.', parseExplicitSessionId)
446
- .option('--name <slug>', 'Name the run — seeds the session label so it shows up as `<name>` in `agents sessions` and resolves by it (and `agents events logs <name>` for --device runs) instead of an opaque id. An agent-generated title later refines the label; your name shows until then. Optional.')
446
+ .option('--name <slug>', 'Name the run — seeds the session label so it shows up as `<name>` in `sessions` and `agents ps` and resolves by it (and `agents events logs <name>` for --device runs) instead of an opaque id. An agent-generated title later refines the label; your name shows until then. Optional.')
447
447
  .option('--notify', 'Post a desktop notification when a headless run finishes. Fired by this process on exit, so it survives whatever launched the run (the menu bar dispatching it, a terminal you closed).')
448
- .option('--terminal [backend]', "Open this run in a real terminal tab instead of here. Without a value the terminal is detected from your live sessions (`agents sessions --active` host), so it lands where you already work — Ghostty for a Ghostty user, iTerm for an iTerm user. Name one to force it: iterm | ghostty | terminal | tmux | vscodium-agent. This is how the menu bar's New Session opens.")
448
+ .option('--terminal [backend]', "Open this run in a real terminal tab instead of here. Without a value the terminal is detected from your live sessions (`agents ps` host), so it lands where you already work — Ghostty for a Ghostty user, iTerm for an iTerm user. Name one to force it: iterm | ghostty | terminal | tmux | vscodium-agent. This is how the menu bar's New Session opens.")
449
449
  .option('--verbose', 'Show detailed execution logs')
450
450
  .option('--raw', 'Keep this interactive run direct when the device has opted into tmux wrapping. A no-op under the default tmux-off configuration; equivalent to AGENTS_NO_TMUX=1.')
451
451
  .option('--no-tmux', 'Keep this run direct when tmux wrapping is enabled for the device. Same effect as --raw / AGENTS_NO_TMUX=1; it is a no-op under the default tmux-off configuration.')
@@ -618,15 +618,15 @@ ${formatModeSupportTable().split('\n').map((line) => ` ${line}`).join('\n
618
618
  Fallback: --fallback codex,antigravity retries on rate-limit failure via /continue handoff. Each entry accepts @version.
619
619
 
620
620
  Cloud placement: --cloud sends the run to the agent's native vendor cloud
621
- (claude→rush, codex→codex, droid→factory, antigravity→antigravity) — the
621
+ (claude→rush, codex→codex, cursor→cursor, droid→factory, antigravity→antigravity) — the
622
622
  same dispatch as agents cloud run --agent <agent>, tracked by agents
623
623
  cloud list/status/logs/cancel/message. --provider overrides the routing;
624
624
  --repo/--branch/--cloud-env refine the task. Agents without a native
625
- cloud (kimi, grok, cursor, opencode, …) fail loud unless --provider is
625
+ cloud (kimi, grok, opencode, …) fail loud unless --provider is
626
626
  given. --cloud is mutually exclusive with --device/--lease and with
627
627
  local-run flags (--loop, --resume, --secrets, --terminal, …).
628
628
 
629
- Resume: --resume <id> resolves full IDs locally first, then fleet-wide, and recovers on the source device with its cwd/mode. Resume preserves the conversation account and uses the installed binary; starting a new conversation from archived context requires an explicit choice. agents sessions resume <id> infers the harness too. A bare --resume opens the session picker for the last 30 days of this project (up to 200 rows); --all widens it to every directory and lifts the 30d window, --teams adds team-spawned sessions, --since <time> and -n/--limit <n> set the window and row cap. These four only filter the picker: they are refused next to --resume <id> or without --resume.
629
+ Resume: --resume <id> resolves full IDs locally first, then fleet-wide, and recovers on the source device with its cwd/mode. Resume preserves the conversation account and uses the installed binary; starting a new conversation from archived context requires an explicit choice. With auto as the agent (agents run auto --resume <id>) the harness is inferred from the session; a named agent must match it. A bare --resume opens the session picker for the last 30 days of this project (up to 200 rows); --all widens it to every directory and lifts the 30d window, --teams adds team-spawned sessions, --since <time> and -n/--limit <n> set the window and row cap. These four only filter the picker: they are refused next to --resume <id> or without --resume.
630
630
 
631
631
  Passthrough: everything after -- is forwarded verbatim to the underlying agent CLI.
632
632
  agents run kimi -- --plan --some-native-flag value
@@ -781,7 +781,7 @@ ${formatModeSupportTable().split('\n').map((line) => ` ${line}`).join('\n
781
781
  const { sessionsResumeAction } = await import('./sessions-resume.js');
782
782
  const { toRemotePortable } = await import('../lib/project-root.js');
783
783
  const device = options.host || options.device || options.on || options.computer;
784
- await sessionsResumeAction(undefined, prompt, {
784
+ await sessionsResumeAction({
785
785
  agent: normalizedAgentSpec.split('#')[0] === RUN_AUTO_KEYWORD ? undefined : normalizedAgentSpec.split('#')[0],
786
786
  account: options.account,
787
787
  model: options.model,
@@ -832,19 +832,7 @@ ${formatModeSupportTable().split('\n').map((line) => ` ${line}`).join('\n
832
832
  let resolvedRecoveryTarget;
833
833
  if (typeof options.resume === 'string' && options.resume.trim()) {
834
834
  const selector = options.resume.trim();
835
- const injectedSource = (() => {
836
- try {
837
- const parsed = JSON.parse(process.env.AGENTS_RESUME_SOURCE_JSON ?? 'null');
838
- return parsed?.id === selector ? parsed : undefined;
839
- }
840
- catch {
841
- return undefined;
842
- }
843
- })();
844
- delete process.env.AGENTS_RESUME_SOURCE_JSON;
845
- const outcome = injectedSource
846
- ? { kind: 'resolved', session: injectedSource }
847
- : await (await import('../lib/session/selection.js')).resolveSessionMetadataValue(selector, { agent: runBaseAgentId ?? undefined });
835
+ const outcome = await (await import('../lib/session/selection.js')).resolveSessionMetadataValue(selector, { agent: runBaseAgentId ?? undefined });
848
836
  if (outcome.kind === 'partial') {
849
837
  const offline = outcome.failedPeers;
850
838
  console.error(chalk.yellow(`Warning: ${offline.length} device(s) unreachable, not checked: ${offline.join(', ')}`));
@@ -864,7 +852,7 @@ ${formatModeSupportTable().split('\n').map((line) => ` ${line}`).join('\n
864
852
  const [requestedAgent] = normalizedAgentSpec.split('#')[0].split('@');
865
853
  if (!autoHarnessRequested && requestedAgent !== resolvedResumeSource.agent) {
866
854
  console.error(chalk.red(`Session ${resolvedResumeSource.shortId} belongs to ${resolvedResumeSource.agent}, not ${requestedAgent}. ` +
867
- `Use: agents sessions resume ${resolvedResumeSource.id}`));
855
+ `Use: agents run auto --resume ${resolvedResumeSource.id}`));
868
856
  process.exit(1);
869
857
  }
870
858
  if (command.getOptionValueSource('mode') === 'default') {
@@ -1513,7 +1501,7 @@ ${formatModeSupportTable().split('\n').map((line) => ` ${line}`).join('\n
1513
1501
  if (options.follow === false) {
1514
1502
  const handle = task.name ?? task.id;
1515
1503
  console.log(chalk.green(`Dispatched to ${host.name}${task.name ? ` as "${task.name}"` : ''}.`) + '\n' +
1516
- chalk.gray(` Status: agents sessions ${handle}`) + chalk.gray(' (compact digest — use this)') + '\n' +
1504
+ chalk.gray(` Status: agents ps preview ${handle}`) + chalk.gray(' (compact digest — use this)') + '\n' +
1517
1505
  chalk.gray(` Raw log: agents events logs ${handle} -f`) + chalk.gray(' (heavy, only if needed)'));
1518
1506
  process.exit(0);
1519
1507
  }
@@ -3,7 +3,7 @@ import { type OpenBlock } from '../lib/feed/feed.js';
3
3
  import { type OutcomeGroup, type SessionOutcomeHint } from '../lib/feed-outcome.js';
4
4
  import { filterBlocksForFeed } from '../lib/ask-classifier.js';
5
5
  import { type FeedSessionSignal } from '../lib/feed-ranking.js';
6
- export declare const FEED_POST_HELP = "\nExamples:\n # Title (subject) + body. Phone broadcasts put title first, body after a\n # blank line, then a \"Sent from agent/session on host\" footer.\n agents feed post --title \"CHANGELOG pushed\" \"Watching CI and mac-mini E2E\"\n agents feed post --title \"Cover ready\" \"render at ./out/cover.png\" --attach ./out/cover.png\n agents feed post --title \"Ready for review\" \"PR opened, waiting on prix-cloud\" --json\n\n # Worth interrupting someone over - reaches sinks gated on minLevel: important:\n agents feed post --title \"npm token expired\" \"Cannot publish the release\" --level important\n\n # Also raise a local desktop banner on THIS machine (same notifier as run\n # --notify), on top of any configured broadcast - useful when you are at the box:\n agents feed post --title \"Build green\" \"all checks passed\" --notify\n\n # Stuck: opens a needs-you block and always broadcasts at important:\n agents feed post --title \"Force-push denied\" \"git-guard blocked PR #1749\" --blocked\n agents feed post --title \"Publish or wait?\" \"npm publish now or after review\" --blocked --option publish --option wait\n agents feed post --title \"Delete preview env?\" \"stale preview still running\" --blocked --default \"leave it\"\n\n # Exhaust self-serve FIRST. A block is for what you genuinely cannot do:\n # a credential only the user holds, a decision only they can make, an\n # approval only they can give. Not \"should I do the obvious next step?\".\n\n # Outside a run, pass the session explicitly:\n agents feed post --title \"Manual note\" \"context for the next agent\" --session 00998b0e-2d15-4d2f-a58b-974a886c9b47\n\nIdentity (session, agent, host, runtime, pid, launchId) is stamped automatically\nand rides the phone footer of feed.broadcast {message}. Domain facts (tickets,\nPRs) are not CLI flags - the ticket is joined from the session index at post\ntime. No em-dashes in title/body - they are scrubbed on the way out.\n\nConfigure where a post is mirrored under feed.broadcast in agents.yaml - see\ndocs/observability.md. A channel sink may set message: with placeholders such\nas {message} and {ticket}; a missing placeholder skips that sink. A milestone is always recorded, but it does not reach\nthe owner when the sink has minLevel: important. Add --level important for a\nphone-worthy successful update. Use --blocked only when work cannot continue.\nWith no sinks configured, an important post or a block reaches the owner through\nyour account (agents auth login); a block is a needs_you event and bypasses\nquiet hours. The account's preferences pick email, Slack or iMessage.\n";
6
+ export declare const FEED_POST_HELP = "\nExamples:\n # Title (subject) + body. Phone broadcasts put title first, body after a\n # blank line, then a \"Sent from agent/session on host\" footer.\n agents feed post --title \"CHANGELOG pushed\" \"Watching CI and mac-mini E2E\"\n agents feed post --title \"Cover ready\" \"render at ./out/cover.png\" --attach ./out/cover.png\n agents feed post --title \"Ready for review\" \"PR opened, waiting on prix-cloud\" --json\n\n # Worth interrupting someone over - reaches sinks gated on minLevel: important:\n agents feed post --title \"npm token expired\" \"Cannot publish the release\" --level important\n\n # Also raise a local desktop banner on THIS machine (same notifier as run\n # --notify), on top of any configured broadcast - useful when you are at the box:\n agents feed post --title \"Build green\" \"all checks passed\" --notify\n\n # Stuck: opens a needs-you block and always broadcasts at important:\n agents feed post --title \"Force-push denied\" \"git-guard blocked PR #1749\" --blocked\n agents feed post --title \"Publish or wait?\" \"npm publish now or after review\" --blocked --option publish --option wait\n agents feed post --title \"Delete preview env?\" \"stale preview still running\" --blocked --default \"leave it\"\n\n # Exhaust self-serve FIRST. A block is for what you genuinely cannot do:\n # a credential only the user holds, a decision only they can make, an\n # approval only they can give. Not \"should I do the obvious next step?\".\n\n # Outside a run, pass the session explicitly:\n agents feed post --title \"Manual note\" \"context for the next agent\" --session 00998b0e-2d15-4d2f-a58b-974a886c9b47\n\nIdentity (session, agent, host, runtime, pid, launchId) is stamped automatically\nand rides the phone footer of feed.broadcast {message}. Domain facts (tickets,\nPRs) are not CLI flags - the ticket is joined from the session index at post\ntime. No em-dashes in title/body - they are scrubbed on the way out.\n\nConfigure where a post is mirrored under feed.broadcast in agents.yaml - see\ndocs/observability.md. A channel sink may set message: with placeholders such\nas {message} and {ticket}; a missing placeholder skips that sink. A milestone is always recorded, but it does not reach\nthe owner when the sink has minLevel: important. Add --level important for a\nphone-worthy successful update. Use --blocked only when work cannot continue.\nWith no sinks configured, an important post or a block reaches the owner through\nyour account (agents auth login); a block is a needs_you event. The account's\npreferences pick email, Slack or iMessage.\n";
7
7
  export declare function formatFeedMastheadRight(blocks: OpenBlock[]): string;
8
8
  export declare function formatFeedReplyHint(block: Pick<OpenBlock, 'host' | 'sessionId' | 'generation' | 'ts'>): string;
9
9
  export declare function parseRemoteFeed(stdout: string, machine: string): OpenBlock[];
@@ -62,8 +62,8 @@ as {message} and {ticket}; a missing placeholder skips that sink. A milestone is
62
62
  the owner when the sink has minLevel: important. Add --level important for a
63
63
  phone-worthy successful update. Use --blocked only when work cannot continue.
64
64
  With no sinks configured, an important post or a block reaches the owner through
65
- your account (agents auth login); a block is a needs_you event and bypasses
66
- quiet hours. The account's preferences pick email, Slack or iMessage.
65
+ your account (agents auth login); a block is a needs_you event. The account's
66
+ preferences pick email, Slack or iMessage.
67
67
  `;
68
68
  const FEED_NO_FANOUT_ENV = 'AGENTS_FEED_LOCAL';
69
69
  export function formatFeedMastheadRight(blocks) {
@@ -217,7 +217,7 @@ function renderBlock(b, localHost, indent = '') {
217
217
  }
218
218
  if (b.needy) {
219
219
  console.log(`${indent} ${chalk.yellow('needy:')} ${b.needy.askCountLastHour}/${b.needy.threshold} asks in the last hour`);
220
- console.log(`${indent} ${chalk.dim(`inspect: ag sessions ${b.sessionId}`)}`);
220
+ console.log(`${indent} ${chalk.dim(`inspect: sessions ${b.sessionId}`)}`);
221
221
  }
222
222
  if (!b.answer && !b.parkedAt && b.kind !== 'control') {
223
223
  console.log(`${indent} ${chalk.dim(formatFeedReplyHint(b))}`);
@@ -46,10 +46,7 @@ interface FocusOptions {
46
46
  export declare function inheritFocusOptions(child: FocusOptions, parent?: Command): FocusOptions;
47
47
  export declare function mergeFocusHosts(opts: FocusOptions): string[];
48
48
  export declare function focusHeader(statuses: LiveStatusFilter[], hosts: string[]): string;
49
- export declare function registerFocusCommand(program: Command, opts?: {
50
- group?: 'sessions' | 'ps';
51
- hidden?: boolean;
52
- }): void;
49
+ export declare function registerFocusCommand(program: Command): void;
53
50
  export declare function selectFallback(attachOnly: boolean | undefined): UnreachableFallback;
54
51
  export declare function focusAction(id: string | undefined, opts: FocusOptions): Promise<void>;
55
52
  export declare function isAttachableLiveSession(session: ActiveSession): boolean;
@@ -57,10 +57,9 @@ export function focusHeader(statuses, hosts) {
57
57
  function statusWord(status) {
58
58
  return status === 'orphaned' ? 'orphaned' : status;
59
59
  }
60
- export function registerFocusCommand(program, opts = {}) {
61
- const group = opts.group ?? 'sessions';
60
+ export function registerFocusCommand(program) {
62
61
  const cmd = program
63
- .command('focus', { hidden: opts.hidden ?? true })
62
+ .command('focus')
64
63
  .argument('[selector]', 'Session id/prefix, agent@version, or topic/path search')
65
64
  .option('--launch-id <id>', 'Target the run by its launcher AGENT_LAUNCH_ID instead of a session id (resolved from this machine\'s hook records)')
66
65
  .option('--local', 'Only this machine (skip the cross-host sweep)')
@@ -105,22 +104,22 @@ export function registerFocusCommand(program, opts = {}) {
105
104
  setHelpSections(cmd, {
106
105
  examples: `
107
106
  # Focus a session directly (attach a living pane, otherwise recover it)
108
- agents ${group} focus a1b2c3d4
107
+ agents ps focus a1b2c3d4
109
108
 
110
109
  # Multi-select live sessions; each opens as a tab in this terminal
111
- agents ${group} focus
110
+ agents ps focus
112
111
 
113
112
  # Scope the picker to one device's orphaned sessions
114
- agents ${group} focus --orphan --device yosemite-s0
113
+ agents ps focus --orphan --device yosemite-s0
115
114
 
116
115
  # Resolve latest on yosemite-s0, then pick from that version's sessions
117
- agents ${group} focus claude@latest --device yosemite-s0
116
+ agents ps focus claude@latest --device yosemite-s0
118
117
 
119
118
  # Attach only — refuse if nothing is joinable
120
- agents ${group} focus a1b2c3d4 --attach-only
119
+ agents ps focus a1b2c3d4 --attach-only
121
120
 
122
121
  # Pick from live sessions on this machine only
123
- agents ${group} focus --local
122
+ agents ps focus --local
124
123
  `,
125
124
  notes: `
126
125
  - space toggles a session, enter opens the selected set; a single check + enter opens just one.
@@ -152,7 +151,7 @@ export async function focusAction(id, opts) {
152
151
  if (!resolved) {
153
152
  console.error(chalk.red(`No session recorded for launch id ${opts.launchId} on ${machineId()}.`));
154
153
  console.error(chalk.gray(' The run may have failed before its SessionStart hook fired.'));
155
- console.error(chalk.gray(' Look for it: agents sessions --active'));
154
+ console.error(chalk.gray(' Look for it: agents ps'));
156
155
  process.exitCode = 1;
157
156
  return;
158
157
  }
@@ -278,7 +277,7 @@ export async function focusAction(id, opts) {
278
277
  }
279
278
  if (activeById.size === 0) {
280
279
  const scope = describeScope(statuses, hosts);
281
- console.log(chalk.gray(`No live sessions to focus${scope}. To resume a past one: agents sessions resume`));
280
+ console.log(chalk.gray(`No live sessions to focus${scope}. To resume a past one: agents run auto --resume`));
282
281
  return;
283
282
  }
284
283
  const header = focusHeader(statuses, hosts);
@@ -398,7 +397,7 @@ export async function focusResolvedSession(meta, liveById, self, fallback, attac
398
397
  if (reconnectReattach) {
399
398
  console.error(chalk.yellow(`\nWarning: ${meta.shortId}'s pane is gone (reboot, tmux crash, or agent exited).`));
400
399
  console.error(chalk.gray(` Prior context is in the transcript — starting recovery.\n` +
401
- ` To see what happened: agents sessions preview ${meta.shortId}`));
400
+ ` To see what happened: agents ps preview ${meta.shortId}`));
402
401
  }
403
402
  const remote = sessionProcessHost(meta, self);
404
403
  if (remote) {
@@ -607,7 +606,7 @@ const resumeInNewTab = async (s, remote) => {
607
606
  console.log(line);
608
607
  else {
609
608
  console.error(chalk.red(line));
610
- console.error(chalk.gray(` Resume it in this terminal instead: agents sessions resume ${meta.id}`));
609
+ console.error(chalk.gray(` Resume it in this terminal instead: agents run auto --resume ${meta.id}`));
611
610
  process.exitCode = 1;
612
611
  }
613
612
  };
@@ -14,6 +14,5 @@ export interface ForkDeps {
14
14
  };
15
15
  }
16
16
  export declare function runFork(sessionArg: string, options: ForkOptions, deps?: ForkDeps): Promise<void>;
17
- export declare function registerSessionsForkCommand(sessionsCmd: Command): void;
18
17
  export declare function registerForkCommand(program: Command): void;
19
18
  export {};
@@ -6,7 +6,7 @@ import { buildForkRecap, forkLabelFor } from '../lib/session/fork.js';
6
6
  function defaultDeps() {
7
7
  return {
8
8
  runPreview: (sub) => {
9
- const p = getCliLaunch(['sessions', 'preview', ...sub]);
9
+ const p = getCliLaunch(['ps', 'preview', ...sub]);
10
10
  const r = spawnSync(p.command, p.args, { encoding: 'utf-8', stdio: ['ignore', 'pipe', 'inherit'] });
11
11
  return { status: r.status, stdout: r.stdout ?? '' };
12
12
  },
@@ -20,16 +20,16 @@ function defaultDeps() {
20
20
  const FORK_HELP = {
21
21
  examples: `
22
22
  # Fork a session by (partial) id — launches a same-harness sibling seeded with a recap
23
- agents sessions fork 4f3a9c21
23
+ agents fork 4f3a9c21
24
24
 
25
25
  # Name the fork's session label
26
- agents sessions fork 4f3a9c21 --name "try redis instead"
26
+ agents fork 4f3a9c21 --name "try redis instead"
27
27
 
28
28
  # Place the sibling on a fleet worker instead of here
29
- agents sessions fork 4f3a9c21 --device auto
29
+ agents fork 4f3a9c21 --device auto
30
30
 
31
31
  # Open the sibling in a fresh terminal tab where you work
32
- agents sessions fork 4f3a9c21 --terminal
32
+ agents fork 4f3a9c21 --terminal
33
33
  `,
34
34
  notes: `
35
35
  - 'resume' continues the SAME conversation; 'fork' launches a NEW same-harness
@@ -93,8 +93,8 @@ export async function runFork(sessionArg, options, deps = defaultDeps()) {
93
93
  const child = deps.launch(runArgs);
94
94
  process.exitCode = child.status ?? 0;
95
95
  }
96
- export function registerSessionsForkCommand(sessionsCmd) {
97
- const cmd = sessionsCmd
96
+ export function registerForkCommand(program) {
97
+ const cmd = program
98
98
  .command('fork <session>')
99
99
  .description('Branch a session into a new same-harness sibling, seeded with a recap so it continues the work. The original is untouched.')
100
100
  .option('--name <label>', 'Session label for the fork (default: "fork of <original>")')
@@ -103,12 +103,3 @@ export function registerSessionsForkCommand(sessionsCmd) {
103
103
  setHelpSections(cmd, FORK_HELP);
104
104
  cmd.action((session, options) => runFork(session, options));
105
105
  }
106
- export function registerForkCommand(program) {
107
- const cmd = program
108
- .command('fork <session>', { hidden: true })
109
- .description('Alias for `agents sessions fork` — branch a session into a new same-harness sibling.')
110
- .option('--name <label>', 'Session label for the fork (default: "fork of <original>")')
111
- .option('--device <host>', 'Place the sibling on a fleet device (name or "auto"); defaults to here')
112
- .option('--terminal [backend]', 'Open the sibling in a real terminal tab (iterm | ghostty | terminal | tmux | vscodium-agent) instead of in-place');
113
- cmd.action((session, options) => runFork(session, options));
114
- }
@@ -71,7 +71,7 @@ async function askKeySource(io, draft, provider) {
71
71
  message: `How should '${provider}' get its key?`,
72
72
  choices: [
73
73
  { name: 'Type a key now', value: TYPE_NOW },
74
- { name: 'Use an existing agents secrets bundle', value: FROM_SECRETS },
74
+ { name: 'Use an existing secrets bundle', value: FROM_SECRETS },
75
75
  ],
76
76
  })
77
77
  : TYPE_NOW;