@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
@@ -43,7 +43,7 @@ export function toSessionWatchRow(scope, row) {
43
43
  unwatched: !viewingIn,
44
44
  viewingIn,
45
45
  recovery: resumable
46
- ? { command: 'agents', args: ['sessions', 'resume', row.sessionId, '--device', scope], ...(row.cwd ? { cwd: row.cwd } : {}) }
46
+ ? { command: 'agents', args: ['ps', 'focus', row.sessionId], ...(row.cwd ? { cwd: row.cwd } : {}) }
47
47
  : null,
48
48
  };
49
49
  }
@@ -126,14 +126,13 @@ export function toPreviousSessionWatchRow(scope, session, accounts = listNativeA
126
126
  unwatched: true,
127
127
  viewingIn: null,
128
128
  recovery: resumable
129
- ? { command: 'agents', args: ['sessions', 'resume', session.id, '--device', sourceDevice], ...(session.cwd ? { cwd: session.cwd } : {}) }
129
+ ? { command: 'agents', args: ['ps', 'focus', session.id], ...(session.cwd ? { cwd: session.cwd } : {}) }
130
130
  : null,
131
131
  };
132
132
  }
133
133
  function demoteWatchRow(scope, row) {
134
134
  if (!row.sessionId || row.rowKey === previousSessionWatchRowKey(scope, row.sessionId))
135
135
  return null;
136
- const sourceDevice = row.sourceDevice || scope;
137
136
  return {
138
137
  ...row,
139
138
  context: 'recent',
@@ -145,7 +144,7 @@ function demoteWatchRow(scope, row) {
145
144
  unwatched: true,
146
145
  viewingIn: null,
147
146
  recovery: row.resumable
148
- ? { command: 'agents', args: ['sessions', 'resume', row.sessionId, '--device', sourceDevice], ...(row.cwd ? { cwd: row.cwd } : {}) }
147
+ ? { command: 'agents', args: ['ps', 'focus', row.sessionId], ...(row.cwd ? { cwd: row.cwd } : {}) }
149
148
  : null,
150
149
  };
151
150
  }
@@ -370,7 +369,7 @@ export async function watchLocalSessions(options) {
370
369
  });
371
370
  }
372
371
  function remoteWatchCommand(os) {
373
- const args = ['sessions', 'watch', '--json', '--local'];
372
+ const args = ['ps', 'watch', '--json', '--local'];
374
373
  return remoteShellFor(os) === 'powershell'
375
374
  ? buildWindowsAgentsCommand({ args })
376
375
  : `bash -lc ${shellQuote(`agents ${args.map(shellQuote).join(' ')}`)}`;
@@ -27,7 +27,7 @@ export function parseRemoteActive(stdout, machine) {
27
27
  }
28
28
  export async function gatherRemoteActive(hosts, opts) {
29
29
  const result = await gatherRemoteAgentsJson({
30
- args: ['sessions', '--active', '--json'],
30
+ args: ['ps', '--local', '--json'],
31
31
  noFanoutEnv: NO_FANOUT_ENV,
32
32
  hosts,
33
33
  parse: parseRemoteActive,
@@ -1,5 +1,4 @@
1
1
  import type { SessionMeta } from '@phnx-labs/sessions-cli/reader';
2
- export declare function buildCanonicalResumeCommand(sessionId: string): string[];
3
2
  export declare function resumeSessionInPlace(session: SessionMeta): Promise<void>;
4
3
  export declare function buildSessionRecoveryCommand(session: Pick<SessionMeta, 'id'>, portable?: boolean): string[];
5
4
  export declare function resumeSpawnInvocation(cmd: string[], platform?: NodeJS.Platform): {
@@ -8,14 +8,11 @@ import { composeWin32CommandLine, needsWindowsShell } from '../platform/index.js
8
8
  import { getShimsDir } from '../state.js';
9
9
  import { sessionAgentSupportsResume, sessionRecoveryRunArgs } from './recovery.js';
10
10
  import { sessionOwnerDevice } from './resume-owner.js';
11
- export function buildCanonicalResumeCommand(sessionId) {
12
- return ['agents', 'sessions', 'resume', sessionId];
13
- }
14
11
  export async function resumeSessionInPlace(session) {
15
12
  const owner = sessionOwnerDevice(session);
16
13
  if (owner) {
17
14
  console.error(chalk.red(`Session ${session.shortId} belongs to ${owner} — it cannot resume on this machine.`));
18
- console.error(chalk.gray(` Resume it there: agents sessions resume ${session.id}`));
15
+ console.error(chalk.gray(` Resume it there: agents run auto --resume ${session.id}`));
19
16
  process.exitCode = 1;
20
17
  return;
21
18
  }
@@ -1,4 +1,2 @@
1
1
  import type { SessionMeta } from '@phnx-labs/sessions-cli/reader';
2
- export declare const RESUME_PINNED_ENV = "AGENTS_RESUME_PINNED";
3
- export declare function consumeResumePinned(): boolean;
4
2
  export declare function sessionOwnerDevice(session: Pick<SessionMeta, 'machine'>): string | undefined;
@@ -1,10 +1,4 @@
1
1
  import { isSelfHost } from '../devices/self-host.js';
2
- export const RESUME_PINNED_ENV = 'AGENTS_RESUME_PINNED';
3
- export function consumeResumePinned() {
4
- const pinned = process.env[RESUME_PINNED_ENV] === '1';
5
- delete process.env[RESUME_PINNED_ENV];
6
- return pinned;
7
- }
8
2
  export function sessionOwnerDevice(session) {
9
3
  const owner = session.machine?.trim();
10
4
  if (!owner)
@@ -2,7 +2,7 @@ import type { SessionAgentId, SessionMeta } from '@phnx-labs/sessions-cli/reader
2
2
  import { type ActiveSession } from './active.js';
3
3
  import { loadLocalActiveSessions } from './session-cache.js';
4
4
  import { gatherRemoteList, runOnPeer } from './remote/remote-list.js';
5
- export interface SessionFilterOptions {
5
+ interface SessionFilterOptions {
6
6
  agent?: string;
7
7
  version?: string;
8
8
  sessionVersion?: string;
@@ -42,8 +42,7 @@ export declare function resolveSessionQuery(pool: SessionMeta[], query: string,
42
42
  }): SessionQueryResolution;
43
43
  export declare function filterSessionsByQuery(sessions: SessionMeta[], query: string | undefined, scope?: SessionSearchScope): SessionMeta[];
44
44
  export declare function applyScopeFilters(sessions: SessionMeta[], scope: SessionSearchScope): SessionMeta[];
45
- export declare function scopedContentIndex(sessions: SessionMeta[], query: string, scope?: SessionSearchScope): Map<string, SessionMeta>;
46
- export interface FleetResolveDeps {
45
+ interface FleetResolveDeps {
47
46
  gatherRemoteList: typeof gatherRemoteList;
48
47
  runOnPeer: typeof runOnPeer;
49
48
  }
@@ -51,7 +50,7 @@ interface FleetHit {
51
50
  machine: string;
52
51
  session: SessionMeta;
53
52
  }
54
- export interface FleetSessionCandidate {
53
+ interface FleetSessionCandidate {
55
54
  id: string;
56
55
  hits: FleetHit[];
57
56
  }
@@ -78,7 +77,7 @@ export declare function metadataResolveOutcome(localMatches: SessionMeta[], remo
78
77
  }, selector: string): MetadataResolveOutcome;
79
78
  export declare function isLocallyDefinitiveMatch(session: SessionMeta, self: string): boolean;
80
79
  export declare function preferOwnerAttribution(localMatches: SessionMeta[], remoteSessions: SessionMeta[], self: string): SessionMeta[];
81
- export type LiveMetadataDeps = {
80
+ type LiveMetadataDeps = {
82
81
  loadActive?: typeof loadLocalActiveSessions;
83
82
  loadFleetActive?: () => ActiveSession[];
84
83
  };
@@ -250,7 +250,7 @@ export function applyScopeFilters(sessions, scope) {
250
250
  }
251
251
  return filtered;
252
252
  }
253
- export function scopedContentIndex(sessions, query, scope) {
253
+ function scopedContentIndex(sessions, query, scope) {
254
254
  const hits = searchContentIndex(sessions, query);
255
255
  if (!scope || (!scope.agent && !scope.project && !scope.routine))
256
256
  return hits;
@@ -316,7 +316,7 @@ function indexedRowsForSelector(selector, scope) {
316
316
  return applyScopeFilters(indexed, scope);
317
317
  }
318
318
  export function metadataResolveForwardedArgs(selector, scope) {
319
- const args = ['sessions', '--resolve-safe-v1', selector, '--json', '--all', '--local'];
319
+ const args = ['ps', 'resolve', selector, '--json', '--local'];
320
320
  if (scope.agent)
321
321
  args.push('--agent', scope.agent);
322
322
  if (scope.project)
@@ -1,26 +1 @@
1
- /**
2
- * R2 credential resolution + this machine's stable identity. Two consumers read
3
- * these fields: `agents sessions export --encrypt` / `import` use only the shared
4
- * `R2_SYNC_ENC_KEY` transcript key (`resolveSyncEncKey`), falling back to an
5
- * ephemeral key when no bundle is configured; and the off-box backup target
6
- * (`agents sessions export --to-r2` / `import --from-r2`, RUSH-2437) uses the full
7
- * credential set (account/bucket/access keys/endpoint) to talk to R2 through the
8
- * network client in `./r2.ts`. The `--to-r2`/`--from-r2` paths gate on
9
- * `isSyncConfigured()` and fail loud when the bundle is absent (no silent
10
- * fallback). This is a pure on-demand backup target, NOT the retired R2/CRDT
11
- * background sync. Credentials come from the `r2.backups` secrets bundle (OS
12
- * keychain on macOS, libsecret on Linux) — never from env or disk.
13
- */
14
- export declare const SYNC_BUNDLE = "r2.backups";
15
- export interface R2Config {
16
- accountId: string;
17
- bucket: string;
18
- accessKeyId: string;
19
- secretAccessKey: string;
20
- endpoint: string;
21
- syncEncKey?: string;
22
- }
23
- export declare function clearR2ConfigCache(): void;
24
- export declare function loadR2Config(): R2Config;
25
- export declare function isSyncConfigured(_now?: number): boolean;
26
1
  export { machineId, normalizeHost } from '../../machine-id.js';
@@ -1,63 +1 @@
1
- /**
2
- * R2 credential resolution + this machine's stable identity. Two consumers read
3
- * these fields: `agents sessions export --encrypt` / `import` use only the shared
4
- * `R2_SYNC_ENC_KEY` transcript key (`resolveSyncEncKey`), falling back to an
5
- * ephemeral key when no bundle is configured; and the off-box backup target
6
- * (`agents sessions export --to-r2` / `import --from-r2`, RUSH-2437) uses the full
7
- * credential set (account/bucket/access keys/endpoint) to talk to R2 through the
8
- * network client in `./r2.ts`. The `--to-r2`/`--from-r2` paths gate on
9
- * `isSyncConfigured()` and fail loud when the bundle is absent (no silent
10
- * fallback). This is a pure on-demand backup target, NOT the retired R2/CRDT
11
- * background sync. Credentials come from the `r2.backups` secrets bundle (OS
12
- * keychain on macOS, libsecret on Linux) — never from env or disk.
13
- */
14
- import { readAndResolveBundleEnvSync } from '../../secrets-client.js';
15
- export const SYNC_BUNDLE = 'r2.backups';
16
- function resolveR2Config() {
17
- const { env } = readAndResolveBundleEnvSync(SYNC_BUNDLE, { caller: 'session-transport', agentOnly: true });
18
- const accountId = env.R2_ACCOUNT_ID?.trim();
19
- const bucket = env.R2_BUCKET_NAME?.trim();
20
- const accessKeyId = env.R2_ACCESS_KEY_ID?.trim();
21
- const secretAccessKey = env.R2_SECRET_ACCESS_KEY?.trim();
22
- const syncEncKey = env.R2_SYNC_ENC_KEY?.trim() || undefined;
23
- const missing = [
24
- !accountId && 'R2_ACCOUNT_ID',
25
- !bucket && 'R2_BUCKET_NAME',
26
- !accessKeyId && 'R2_ACCESS_KEY_ID',
27
- !secretAccessKey && 'R2_SECRET_ACCESS_KEY',
28
- ].filter(Boolean);
29
- if (missing.length > 0) {
30
- throw new Error(`Session R2 transport: bundle '${SYNC_BUNDLE}' is missing ${missing.join(', ')}. ` +
31
- `Add them with: agents secrets add ${SYNC_BUNDLE} <KEY>`);
32
- }
33
- return {
34
- accountId: accountId,
35
- bucket: bucket,
36
- accessKeyId: accessKeyId,
37
- secretAccessKey: secretAccessKey,
38
- endpoint: env.R2_ENDPOINT?.trim() || `https://${accountId}.r2.cloudflarestorage.com`,
39
- syncEncKey,
40
- };
41
- }
42
- let cachedConfig = null;
43
- export function clearR2ConfigCache() {
44
- cachedConfig = null;
45
- }
46
- export function loadR2Config() {
47
- if (cachedConfig)
48
- return cachedConfig;
49
- cachedConfig = resolveR2Config();
50
- return cachedConfig;
51
- }
52
- export function isSyncConfigured(_now = Date.now()) {
53
- if (cachedConfig)
54
- return true;
55
- try {
56
- loadR2Config();
57
- return true;
58
- }
59
- catch {
60
- return false;
61
- }
62
- }
63
1
  export { machineId, normalizeHost } from '../../machine-id.js';
@@ -1,4 +1,3 @@
1
1
  export declare const DEFAULT_SESSIONS_DOMAIN = "sessions.agents-cli.sh";
2
2
  export declare const DEFAULT_SESSIONS_WORKER_NAME = "agents-sessions";
3
3
  export declare const DEFAULT_SESSIONS_BUCKET_NAME = "agents-sessions";
4
- export declare function managedSessionsBaseUrl(): string;
@@ -1,6 +1,3 @@
1
1
  export const DEFAULT_SESSIONS_DOMAIN = 'sessions.agents-cli.sh';
2
2
  export const DEFAULT_SESSIONS_WORKER_NAME = 'agents-sessions';
3
3
  export const DEFAULT_SESSIONS_BUCKET_NAME = 'agents-sessions';
4
- export function managedSessionsBaseUrl() {
5
- return `https://${DEFAULT_SESSIONS_DOMAIN}`;
6
- }
@@ -1,5 +1,5 @@
1
1
  export function renderSessionsWorkerScript() {
2
- return `// GENERATED by agents-cli agents sessions — do not edit; edit
2
+ return `// GENERATED by agents setup session-backup — do not edit; edit
3
3
  // src/lib/session/sync/worker-template.ts and re-provision.
4
4
  export const hooks = {
5
5
  verifyPhoenixToken: defaultVerifyPhoenixToken,
@@ -8,20 +8,4 @@ export declare function invocation(bin: string): {
8
8
  prefix: string[];
9
9
  };
10
10
  export declare function runSessions(argv: string[]): Promise<number>;
11
- export declare function usesFilterFlags(args: string[]): boolean;
12
- export declare function usesHostFlag(args: string[]): boolean;
13
- export declare function sessionsBinSupports(bin: string, minVersion: string): boolean;
14
- export declare function sessionsBinSupportsFilters(bin: string): boolean;
15
- export declare function sessionsBinSupportsHost(bin: string): boolean;
16
- export declare function isReadQuery(args: string[], opts?: {
17
- filters?: boolean;
18
- host?: boolean;
19
- }): boolean;
20
- export declare function planDeviceHostRead(args: string[], opts?: {
21
- filters?: boolean;
22
- }): {
23
- device: string;
24
- readArgs: string[];
25
- } | null;
26
11
  export declare function _resetSessionsClientForTest(): void;
27
- export declare const SESSIONS_INSTALL_HINT = "npm i -g @phnx-labs/sessions-cli";
@@ -1,13 +1,9 @@
1
- import { spawn, spawnSync } from 'node:child_process';
1
+ import { spawn } from 'node:child_process';
2
2
  import { existsSync, readFileSync, realpathSync } from 'node:fs';
3
3
  import { createRequire } from 'node:module';
4
4
  import path from 'node:path';
5
5
  import { findInPath } from './agent-spec/agents.js';
6
- import { compareVersions } from './agent-spec/primitives.js';
7
- import { stripRoutingFlags } from './hosts/remote-cmd.js';
8
6
  const INSTALL_HINT = 'npm i -g @phnx-labs/sessions-cli';
9
- const SESSIONS_FILTERS_MIN_VERSION = '0.2.0';
10
- const SESSIONS_HOST_MIN_VERSION = '0.2.1';
11
7
  export class SessionsClientError extends Error {
12
8
  code;
13
9
  constructor(code, message) {
@@ -40,7 +36,6 @@ function dependencySessionsBin() {
40
36
  }
41
37
  return realpathSync(abs);
42
38
  }
43
- // Skip the legacy agents shim to avoid recursive sessions passthrough.
44
39
  export function resolveSessionsBin() {
45
40
  if (cachedBin)
46
41
  return cachedBin;
@@ -80,187 +75,6 @@ export function runSessions(argv) {
80
75
  });
81
76
  });
82
77
  }
83
- const READ_FLAGS = new Set([
84
- '--json',
85
- '--local',
86
- '--no-interactive',
87
- ]);
88
- const FILTER_BOOL_FLAGS = new Set([
89
- '--claude',
90
- '--codex',
91
- '--kimi',
92
- '--antigravity',
93
- '--grok',
94
- '--opencode',
95
- ]);
96
- const FILTER_VALUE_FLAGS = new Set([
97
- '--project',
98
- '--since',
99
- '--until',
100
- '--sort',
101
- ]);
102
- export function usesFilterFlags(args) {
103
- return args.some((arg) => {
104
- if (arg === '-p' || arg === '-a')
105
- return true;
106
- if (FILTER_BOOL_FLAGS.has(arg))
107
- return true;
108
- for (const vf of FILTER_VALUE_FLAGS) {
109
- if (arg === vf || arg.startsWith(`${vf}=`))
110
- return true;
111
- }
112
- return false;
113
- });
114
- }
115
- export function usesHostFlag(args) {
116
- return args.some((arg) => arg === '--host' || arg.startsWith('--host='));
117
- }
118
- let cachedProbedVersion;
119
- function probeSessionsVersion(bin) {
120
- if (cachedProbedVersion !== undefined)
121
- return cachedProbedVersion;
122
- const { command, prefix } = invocation(bin);
123
- const res = spawnSync(command, [...prefix, '--version'], { encoding: 'utf8', timeout: 3000 });
124
- const version = (res.stdout ?? '').trim();
125
- cachedProbedVersion = !res.error && /^\d+\.\d+\.\d+/.test(version) ? version : null;
126
- return cachedProbedVersion;
127
- }
128
- // Failed or old version probes stay in the in-repo engine because an old CLI may treat unknown flags as FTS terms.
129
- export function sessionsBinSupports(bin, minVersion) {
130
- const version = probeSessionsVersion(bin);
131
- return version !== null && compareVersions(version, minVersion) >= 0;
132
- }
133
- export function sessionsBinSupportsFilters(bin) {
134
- return sessionsBinSupports(bin, SESSIONS_FILTERS_MIN_VERSION);
135
- }
136
- export function sessionsBinSupportsHost(bin) {
137
- return sessionsBinSupports(bin, SESSIONS_HOST_MIN_VERSION);
138
- }
139
- const ENGINE_VERBS = new Set([
140
- 'resume',
141
- 'detach',
142
- 'stop',
143
- 'inject',
144
- 'fork',
145
- 'backfill',
146
- 'migrate',
147
- 'share',
148
- 'export',
149
- 'import',
150
- 'optimize',
151
- 'trace',
152
- 'insights',
153
- 'bookmark',
154
- 'tail',
155
- 'watch',
156
- 'preview',
157
- 'focus',
158
- 'render',
159
- 'stats',
160
- 'migrations',
161
- 'export',
162
- ]);
163
- export function isReadQuery(args, opts = {}) {
164
- if (args.length === 0)
165
- return false;
166
- const valueFlags = new Set(['--limit', '--agent']);
167
- const boolFlags = new Set(READ_FLAGS);
168
- if (opts.filters) {
169
- for (const vf of FILTER_VALUE_FLAGS)
170
- valueFlags.add(vf);
171
- for (const bf of FILTER_BOOL_FLAGS)
172
- boolFlags.add(bf);
173
- }
174
- if (opts.host)
175
- valueFlags.add('--host');
176
- for (let i = 0; i < args.length; i++) {
177
- const arg = args[i];
178
- if (opts.filters && (arg === '-a' || arg === '-p')) {
179
- i += 1;
180
- continue;
181
- }
182
- let matchedValue = false;
183
- for (const vf of valueFlags) {
184
- if (arg === vf) {
185
- i += 1;
186
- matchedValue = true;
187
- break;
188
- }
189
- if (arg.startsWith(`${vf}=`)) {
190
- matchedValue = true;
191
- break;
192
- }
193
- }
194
- if (matchedValue)
195
- continue;
196
- if (arg.startsWith('-')) {
197
- if (!boolFlags.has(arg))
198
- return false;
199
- continue;
200
- }
201
- if (ENGINE_VERBS.has(arg))
202
- return false;
203
- }
204
- return true;
205
- }
206
- function scanDeviceFlag(args) {
207
- let count = 0;
208
- let value;
209
- let valueEndIndex;
210
- for (let i = 0; i < args.length; i++) {
211
- const a = args[i];
212
- let matched = false;
213
- let v;
214
- let endIdx = i;
215
- if (a === '--device' || a === '-D') {
216
- matched = true;
217
- v = args[i + 1];
218
- endIdx = i + 1;
219
- }
220
- else if (a.startsWith('--device=')) {
221
- matched = true;
222
- v = a.slice('--device='.length);
223
- }
224
- else if (a.startsWith('-D=')) {
225
- matched = true;
226
- v = a.slice(3);
227
- }
228
- else if (/^-D.+/.test(a)) {
229
- matched = true;
230
- v = a.slice(2);
231
- }
232
- if (matched) {
233
- count += 1;
234
- if (count === 1) {
235
- value = v;
236
- valueEndIndex = endIdx;
237
- }
238
- }
239
- }
240
- return { count, value, valueEndIndex };
241
- }
242
- // Collapse --device to --host only for one unambiguous read; multi/fleet/lifecycle queries remain on in-repo fan-out.
243
- export function planDeviceHostRead(args, opts = {}) {
244
- const { count, value, valueEndIndex } = scanDeviceFlag(args);
245
- if (count !== 1)
246
- return null;
247
- if (value === undefined || value === '' || value.startsWith('-'))
248
- return null;
249
- if (usesHostFlag(args))
250
- return null;
251
- const lower = value.toLowerCase();
252
- if (lower === 'all' || lower === 'fleet')
253
- return null;
254
- const next = valueEndIndex !== undefined ? args[valueEndIndex + 1] : undefined;
255
- if (next !== undefined && !next.startsWith('-'))
256
- return null;
257
- const readArgs = stripRoutingFlags(args, [{ long: 'device', short: 'D', takesValue: true }]);
258
- if (!isReadQuery(readArgs, { filters: opts.filters }))
259
- return null;
260
- return { device: value, readArgs };
261
- }
262
78
  export function _resetSessionsClientForTest() {
263
79
  cachedBin = undefined;
264
- cachedProbedVersion = undefined;
265
80
  }
266
- export const SESSIONS_INSTALL_HINT = INSTALL_HINT;
@@ -1,3 +1,5 @@
1
1
  export declare const KNOWN_TOP_LEVEL_COMMANDS: ReadonlySet<string>;
2
2
  export declare const RETIRED_TOP_LEVEL_COMMANDS: ReadonlySet<string>;
3
+ export declare const REMOVED_TOOL_GROUPS: ReadonlySet<string>;
4
+ export declare function removedToolGroupMessage(group: string, rest: readonly string[]): string | undefined;
3
5
  export declare function isKnownTopLevelCommand(name: string): boolean;
@@ -4,10 +4,10 @@ const LOADED_COMMAND_NAMES = [
4
4
  'remove', 'rm', 'purge', 'update', 'prune', 'import',
5
5
  'routines', 'projects', 'run', '_callback', 'open', 'fork', 'config',
6
6
  'models', 'doctor',
7
- 'harness', 'harnesses', 'secrets', 'menubar', 'sync',
7
+ 'harness', 'harnesses', 'menubar', 'sync',
8
8
  'refresh-rules', 'factory', 'insights', 'trace',
9
- 'watchdog', 'browser', 'computer', 'events',
10
- 'ssh', 'devices', 'fleet', 'repos', 'repo', 'setup', 'uninstall', 'upgrade', 'sessions',
9
+ 'watchdog', 'events',
10
+ 'ssh', 'devices', 'fleet', 'repos', 'repo', 'setup', 'uninstall', 'upgrade',
11
11
  'teams', 'cloud', 'ps', 'send', 'feed',
12
12
  'daemon', 'recordings',
13
13
  ];
@@ -70,6 +70,39 @@ export const RETIRED_TOP_LEVEL_COMMANDS = new Set([
70
70
  'logs',
71
71
  'trash',
72
72
  ]);
73
+ const STANDALONE_TOOL_GROUPS = ['browser', 'computer', 'secrets', 'sessions'];
74
+ const MOVED_SESSIONS_VERBS = {
75
+ resume: 'agents run auto --resume <id>',
76
+ focus: 'agents ps focus',
77
+ stop: 'agents ps stop',
78
+ detach: 'agents ps detach',
79
+ migrate: 'agents ps migrate',
80
+ migrations: 'agents ps migrations',
81
+ preview: 'agents ps preview',
82
+ watch: 'agents ps watch --json',
83
+ inject: 'agents send --channel session --to <id> --text <text>',
84
+ fork: 'agents fork',
85
+ backfill: 'agents daemon index backfill',
86
+ optimize: 'agents daemon index optimize',
87
+ stats: 'agents insights resources',
88
+ insights: 'agents insights',
89
+ 'backup-setup': 'agents setup session-backup',
90
+ };
91
+ export const REMOVED_TOOL_GROUPS = new Set(STANDALONE_TOOL_GROUPS);
92
+ export function removedToolGroupMessage(group, rest) {
93
+ if (!REMOVED_TOOL_GROUPS.has(group))
94
+ return undefined;
95
+ const verb = group === 'sessions' ? rest.find((arg) => Object.hasOwn(MOVED_SESSIONS_VERBS, arg)) : undefined;
96
+ const moved = verb === undefined ? undefined : MOVED_SESSIONS_VERBS[verb];
97
+ if (moved)
98
+ return `error: 'agents sessions ${verb}' was removed; use '${moved}'.`;
99
+ if (group === 'sessions' && rest.some((arg) => arg === '--active' || arg === '--roots')) {
100
+ return rest.includes('--roots')
101
+ ? `error: 'agents sessions --roots' was removed; use 'agents daemon index roots'.`
102
+ : `error: 'agents sessions --active' was removed; use 'agents ps'.`;
103
+ }
104
+ return `error: 'agents ${group}' was removed; use the standalone '${group}' CLI (${group} --help).`;
105
+ }
73
106
  export function isKnownTopLevelCommand(name) {
74
107
  return KNOWN_TOP_LEVEL_COMMANDS.has(name);
75
108
  }
@@ -1,3 +1,2 @@
1
1
  import type { Command } from 'commander';
2
2
  export declare function configureRootCommand(program: Command, name: string, version: string): Command;
3
- export declare function normalizeResumeDeviceArgs(args: string[]): string[];
@@ -8,24 +8,3 @@ export function configureRootCommand(program, name, version) {
8
8
  .helpOption('-h, --help', 'Show help')
9
9
  .addHelpCommand(false);
10
10
  }
11
- export function normalizeResumeDeviceArgs(args) {
12
- if (args[0] !== 'sessions' || args[1] !== 'resume')
13
- return args;
14
- let options = true;
15
- return args.map((arg, index) => {
16
- if (index < 2 || !options)
17
- return arg;
18
- if (arg === '--') {
19
- options = false;
20
- return arg;
21
- }
22
- if (arg === '--device' || arg === '--devices' || arg === '-D')
23
- return '--resume-device';
24
- if (arg.startsWith('--device=') || arg.startsWith('--devices=')) {
25
- return `--resume-device=${arg.slice(arg.indexOf('=') + 1)}`;
26
- }
27
- if (arg.startsWith('-D'))
28
- return `--resume-device=${arg.slice(arg[2] === '=' ? 3 : 2)}`;
29
- return arg;
30
- });
31
- }
@@ -59,7 +59,7 @@ export async function runUmbrellaSync(args) {
59
59
  result.secrets = {
60
60
  pulled: 0,
61
61
  skipped: true,
62
- reason: `no passphrase — set ${SYNC_PASSPHRASE_ENV} or run \`agents secrets vault unlock\` (#366)`,
62
+ reason: `no passphrase — set ${SYNC_PASSPHRASE_ENV} or run \`secrets vault unlock\` (#366)`,
63
63
  errors: [],
64
64
  };
65
65
  log(`secrets: skipped (no passphrase — set ${SYNC_PASSPHRASE_ENV})`);
@@ -10,7 +10,7 @@ export function addressabilityRecoveryHint(session, fallbackId) {
10
10
  const resumeId = sid ?? fallbackId;
11
11
  const shortId = resumeId ? resumeId.slice(0, 8) : '<id>';
12
12
  const device = session.machine ?? machineId();
13
- const resumeCmd = resumeId ? `agents sessions resume ${shortId}` : 'agents sessions resume <id>';
13
+ const resumeCmd = resumeId ? `agents run auto --resume ${shortId}` : 'agents run auto --resume <id>';
14
14
  const tmuxCmd = `agents config set devices.${device}.tmux on`;
15
15
  const interactive = session.context === 'terminal' || !!session.tty;
16
16
  if (session.host === 'ghostty') {
@@ -100,7 +100,7 @@ function shellQuoteHost(value) {
100
100
  }
101
101
  export function buildRotateReplayText(oldSessionId) {
102
102
  return (`Resume previous work by loading session ${oldSessionId}. ` +
103
- `Run \`agents sessions ${oldSessionId}\` to load the transcript, assess current state, then continue working.`);
103
+ `Run \`sessions ${oldSessionId}\` to load the transcript, assess current state, then continue working.`);
104
104
  }
105
105
  export const DEFAULT_ROTATE_READINESS_MS = 60_000;
106
106
  export const DEFAULT_ROTATE_SKIP_COOLDOWN_MS = 30 * 60_000;
@@ -36,7 +36,7 @@ interface ClassifyInput {
36
36
  dormantMs: number;
37
37
  }
38
38
  export declare function classifyTerminal(input: ClassifyInput): StallStatus;
39
- export declare const WATCHDOG_SYSTEM_PROMPT = "You are the watchdog for AI coding agents running in terminals. You are given the idle\nsessions on this machine \u2014 each with its originating TASK, how long it has been idle, and\nthe tail of its transcript. Your one job is to tell, for each one, whether it is\nIDLE-BUT-UNFINISHED (it was given a task, went quiet, and has NOT finished or handed it\noff) or IDLE-AND-DONE (it finished, or it genuinely needs the human). Idle-but-unfinished\nis the dangerous state \u2014 the work is most likely to be silently abandoned \u2014 so those get a\nNUDGE that drives them to finish. Everything else is a SKIP.\n\nRead each transcript before judging \u2014 an agent that already reached a decision needs \"do\nit,\" not \"decide.\" Judge from the task + tail, not from keywords.\n\nNUDGE when the agent went idle and could keep going on its own:\n- It asked permission for an obvious or already-authorized next step\n (\"should I proceed?\", \"want me to continue?\", \"shall I run the tests?\").\n- It asked a question it could answer itself from the available context or a\n reasonable default, or by using a tool it already has.\n- It announced an action (\"I'll run X\", \"let me write Y\") but no tool call followed.\n- It already decided what to do, then stalled without doing it.\n- It paused with the task incomplete and no real blocker.\n\nThe nudge text MUST carry context, not shove:\n- Restate the goal and reference the conclusion the agent ALREADY reached.\n- Give ONE concrete next step \u2014 the specific action, the sensible default, or a TOOL it\n forgot it has (e.g. \"agents computer\" to drive the Mac, \"agents browser\" for the web,\n \"agents ssh <mac> \\\"agents computer \u2026\\\"\" to drive a Mac from another box).\n- Split the ask: drive the reversible, goal-advancing part now; flag only a genuinely\n disruptive sub-step for the human.\n- Tell it to use best judgment and finish end-to-end WITHOUT asking again.\n- Imperative, 1-2 sentences, no emojis, under 240 characters.\n\nSKIP in two distinct cases \u2014 mark which with \"needsHuman\":\n- needsHuman=true \u2014 the agent is genuinely blocked on a human (these belong in the user's\n feed): credentials, auth, login, 2FA, or biometric; an irreversible or outward-facing\n action needing sign-off (force-push, delete prod data, publish/release, spend money,\n send an external message) UNLESS the House Rules below authorize it; a real product or\n intent decision with genuine ambiguity (not a trivial default); or you cannot tell what\n the agent is doing.\n- needsHuman=false \u2014 the task is actually complete (idle-and-done). Leave it alone; do NOT\n poke a finished session.\n\nRespond with ONLY a JSON array (no prose, no code fence). Include \"needsHuman\" on every\nskip:\n[{\"terminalId\":\"<id>\",\"action\":\"nudge\"|\"skip\",\"text\":\"<message or empty>\",\"reason\":\"<brief>\",\"needsHuman\":true|false}]";
39
+ export declare const WATCHDOG_SYSTEM_PROMPT = "You are the watchdog for AI coding agents running in terminals. You are given the idle\nsessions on this machine \u2014 each with its originating TASK, how long it has been idle, and\nthe tail of its transcript. Your one job is to tell, for each one, whether it is\nIDLE-BUT-UNFINISHED (it was given a task, went quiet, and has NOT finished or handed it\noff) or IDLE-AND-DONE (it finished, or it genuinely needs the human). Idle-but-unfinished\nis the dangerous state \u2014 the work is most likely to be silently abandoned \u2014 so those get a\nNUDGE that drives them to finish. Everything else is a SKIP.\n\nRead each transcript before judging \u2014 an agent that already reached a decision needs \"do\nit,\" not \"decide.\" Judge from the task + tail, not from keywords.\n\nNUDGE when the agent went idle and could keep going on its own:\n- It asked permission for an obvious or already-authorized next step\n (\"should I proceed?\", \"want me to continue?\", \"shall I run the tests?\").\n- It asked a question it could answer itself from the available context or a\n reasonable default, or by using a tool it already has.\n- It announced an action (\"I'll run X\", \"let me write Y\") but no tool call followed.\n- It already decided what to do, then stalled without doing it.\n- It paused with the task incomplete and no real blocker.\n\nThe nudge text MUST carry context, not shove:\n- Restate the goal and reference the conclusion the agent ALREADY reached.\n- Give ONE concrete next step \u2014 the specific action, the sensible default, or a TOOL it\n forgot it has (e.g. \"computer\" to drive the Mac, \"browser\" for the web,\n \"agents ssh <mac> \\\"computer \u2026\\\"\" to drive a Mac from another box).\n- Split the ask: drive the reversible, goal-advancing part now; flag only a genuinely\n disruptive sub-step for the human.\n- Tell it to use best judgment and finish end-to-end WITHOUT asking again.\n- Imperative, 1-2 sentences, no emojis, under 240 characters.\n\nSKIP in two distinct cases \u2014 mark which with \"needsHuman\":\n- needsHuman=true \u2014 the agent is genuinely blocked on a human (these belong in the user's\n feed): credentials, auth, login, 2FA, or biometric; an irreversible or outward-facing\n action needing sign-off (force-push, delete prod data, publish/release, spend money,\n send an external message) UNLESS the House Rules below authorize it; a real product or\n intent decision with genuine ambiguity (not a trivial default); or you cannot tell what\n the agent is doing.\n- needsHuman=false \u2014 the task is actually complete (idle-and-done). Leave it alone; do NOT\n poke a finished session.\n\nRespond with ONLY a JSON array (no prose, no code fence). Include \"needsHuman\" on every\nskip:\n[{\"terminalId\":\"<id>\",\"action\":\"nudge\"|\"skip\",\"text\":\"<message or empty>\",\"reason\":\"<brief>\",\"needsHuman\":true|false}]";
40
40
  export declare function composePromptWithPlaybook(basePrompt: string, playbook: string): string;
41
41
  export declare function renderWatchdogPrompt(candidates: WatchdogCandidate[], playbook?: string): string;
42
42
  export declare function parseWatchdogResponse(stdout: string): Decision[];
@@ -37,8 +37,8 @@ NUDGE when the agent went idle and could keep going on its own:
37
37
  The nudge text MUST carry context, not shove:
38
38
  - Restate the goal and reference the conclusion the agent ALREADY reached.
39
39
  - Give ONE concrete next step — the specific action, the sensible default, or a TOOL it
40
- forgot it has (e.g. "agents computer" to drive the Mac, "agents browser" for the web,
41
- "agents ssh <mac> \\"agents computer …\\"" to drive a Mac from another box).
40
+ forgot it has (e.g. "computer" to drive the Mac, "browser" for the web,
41
+ "agents ssh <mac> \\"computer …\\"" to drive a Mac from another box).
42
42
  - Split the ask: drive the reversible, goal-advancing part now; flag only a genuinely
43
43
  disruptive sub-step for the human.
44
44
  - Tell it to use best judgment and finish end-to-end WITHOUT asking again.