@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.
- package/CHANGELOG.md +66 -0
- package/README.md +140 -165
- package/dist/bootstrap.js +10 -16
- package/dist/cli/command-registry.d.ts +1 -2
- package/dist/cli/command-registry.js +1 -10
- package/dist/commands/accounts.js +7 -7
- package/dist/commands/cloud-transcripts.d.ts +0 -1
- package/dist/commands/cloud-transcripts.js +2 -2
- package/dist/commands/cloud.js +1 -1
- package/dist/commands/config.js +0 -4
- package/dist/commands/cost.js +1 -1
- package/dist/commands/daemon-index.js +0 -1
- package/dist/commands/detach.d.ts +1 -1
- package/dist/commands/detach.js +5 -5
- package/dist/commands/exec.js +10 -22
- package/dist/commands/feed.d.ts +1 -1
- package/dist/commands/feed.js +3 -3
- package/dist/commands/focus.d.ts +1 -4
- package/dist/commands/focus.js +12 -13
- package/dist/commands/fork.d.ts +0 -1
- package/dist/commands/fork.js +7 -16
- package/dist/commands/harness-wizard.js +1 -1
- package/dist/commands/harness.js +1 -1
- package/dist/commands/insights.d.ts +0 -1
- package/dist/commands/insights.js +3 -7
- package/dist/commands/open.js +1 -1
- package/dist/commands/output.js +1 -1
- package/dist/commands/profiles.d.ts +1 -1
- package/dist/commands/profiles.js +2 -2
- package/dist/commands/projects.js +1 -1
- package/dist/commands/prune.js +1 -1
- package/dist/commands/ps.d.ts +0 -1
- package/dist/commands/ps.js +63 -18
- package/dist/commands/routines.js +1 -1
- package/dist/commands/send.js +1 -1
- package/dist/commands/sessions-backfill.d.ts +0 -1
- package/dist/commands/sessions-backfill.js +3 -6
- package/dist/commands/sessions-browser.d.ts +0 -10
- package/dist/commands/sessions-browser.js +19 -25
- package/dist/commands/sessions-migrate.d.ts +2 -2
- package/dist/commands/sessions-migrate.js +13 -13
- package/dist/commands/sessions-optimize.d.ts +0 -1
- package/dist/commands/sessions-optimize.js +0 -3
- package/dist/commands/sessions-picker.js +11 -11
- package/dist/commands/sessions-resume.d.ts +16 -15
- package/dist/commands/sessions-resume.js +101 -269
- package/dist/commands/sessions-stats.d.ts +0 -1
- package/dist/commands/sessions-stats.js +5 -8
- package/dist/commands/sessions-stop.d.ts +1 -1
- package/dist/commands/sessions-stop.js +6 -6
- package/dist/commands/sessions-trace.d.ts +1 -1
- package/dist/commands/sessions-trace.js +40 -17
- package/dist/commands/sessions-watch.js +2 -2
- package/dist/commands/sessions.test-fixture.d.ts +1 -0
- package/dist/commands/sessions.test-fixture.js +14 -0
- package/dist/commands/setup-browser.js +4 -4
- package/dist/commands/setup-computer.js +4 -4
- package/dist/commands/setup-fleet.js +1 -1
- package/dist/commands/setup-preferences.js +1 -1
- package/dist/commands/{sessions-backup-setup.d.ts → setup-session-backup.d.ts} +2 -2
- package/dist/commands/{sessions-backup-setup.js → setup-session-backup.js} +8 -8
- package/dist/commands/setup.js +3 -1
- package/dist/commands/ssh.js +4 -5
- package/dist/commands/sync.js +1 -1
- package/dist/commands/teams.js +2 -2
- package/dist/commands/utils.d.ts +0 -1
- package/dist/commands/utils.js +0 -10
- package/dist/index.js +0 -71
- package/dist/lib/analytics/mix-commands.js +1 -1
- package/dist/lib/auth-mint.js +2 -2
- package/dist/lib/browser-client.d.ts +0 -1
- package/dist/lib/browser-client.js +0 -3
- package/dist/lib/cloud/antigravity.js +1 -1
- package/dist/lib/cloud/cursor.js +3 -3
- package/dist/lib/cloudflare/creds.js +2 -2
- package/dist/lib/computer/context.d.ts +4 -21
- package/dist/lib/computer/context.js +3 -24
- package/dist/lib/computer/policy.d.ts +0 -10
- package/dist/lib/computer/policy.js +0 -28
- package/dist/lib/computer-client.d.ts +0 -44
- package/dist/lib/computer-client.js +17 -121
- package/dist/lib/config-keys.d.ts +1 -1
- package/dist/lib/config-keys.js +0 -3
- package/dist/lib/crabbox/cli.js +1 -1
- package/dist/lib/device-config.js +5 -28
- package/dist/lib/devices/connect.d.ts +1 -1
- package/dist/lib/devices/connect.js +3 -6
- package/dist/lib/devices/doctor-findings.d.ts +2 -1
- package/dist/lib/devices/doctor-findings.js +4 -4
- package/dist/lib/exec.js +1 -1
- package/dist/lib/feed/activity.js +1 -1
- package/dist/lib/fleet/apply.js +1 -1
- package/dist/lib/help.d.ts +0 -1
- package/dist/lib/help.js +2 -10
- package/dist/lib/hosts/option.js +1 -1
- package/dist/lib/hosts/passthrough.d.ts +0 -1
- package/dist/lib/hosts/passthrough.js +2 -26
- package/dist/lib/hosts/reconnect.js +5 -5
- package/dist/lib/hosts/remote-cmd.d.ts +3 -5
- package/dist/lib/hosts/remote-cmd.js +15 -20
- package/dist/lib/hosts/remote-session-id.js +1 -1
- package/dist/lib/installations/active-check.js +1 -1
- package/dist/lib/installations/migrate.js +4 -15
- package/dist/lib/installations/versions.js +1 -1
- package/dist/lib/launch-log.js +3 -6
- package/dist/lib/owner-notify.d.ts +1 -6
- package/dist/lib/owner-notify.js +0 -2
- package/dist/lib/paths.d.ts +0 -1
- package/dist/lib/paths.js +0 -8
- package/dist/lib/permissions.js +1 -1
- package/dist/lib/redact.d.ts +0 -1
- package/dist/lib/redact.js +0 -4
- package/dist/lib/remote-agents-json.d.ts +3 -1
- package/dist/lib/remote-agents-json.js +8 -6
- package/dist/lib/reserved-stores.js +1 -1
- package/dist/lib/scheduling/routines.d.ts +0 -1
- package/dist/lib/scheduling/routines.js +1 -1
- package/dist/lib/session/active.d.ts +1 -1
- package/dist/lib/session/db.js +3 -3
- package/dist/lib/session/detached.d.ts +0 -1
- package/dist/lib/session/detached.js +0 -23
- package/dist/lib/session/discover.d.ts +2 -2
- package/dist/lib/session/presentation.d.ts +0 -7
- package/dist/lib/session/presentation.js +4 -4
- package/dist/lib/session/projection.js +1 -1
- package/dist/lib/session/remote/remote-list.d.ts +2 -0
- package/dist/lib/session/remote/remote-list.js +3 -2
- package/dist/lib/session/remote/watch.js +4 -5
- package/dist/lib/session/remote-active.js +1 -1
- package/dist/lib/session/resume-command.d.ts +0 -1
- package/dist/lib/session/resume-command.js +1 -4
- package/dist/lib/session/resume-owner.d.ts +0 -2
- package/dist/lib/session/resume-owner.js +0 -6
- package/dist/lib/session/selection.d.ts +4 -5
- package/dist/lib/session/selection.js +2 -2
- package/dist/lib/session/sync/config.d.ts +0 -25
- package/dist/lib/session/sync/config.js +0 -62
- package/dist/lib/session/sync/managed-config.d.ts +0 -1
- package/dist/lib/session/sync/managed-config.js +0 -3
- package/dist/lib/session/sync/worker-template.js +1 -1
- package/dist/lib/sessions-client.d.ts +0 -16
- package/dist/lib/sessions-client.js +1 -187
- package/dist/lib/startup/command-registry.d.ts +2 -0
- package/dist/lib/startup/command-registry.js +36 -3
- package/dist/lib/startup/root-command.d.ts +0 -1
- package/dist/lib/startup/root-command.js +0 -21
- package/dist/lib/sync-umbrella.js +1 -1
- package/dist/lib/terminal/resolve.js +1 -1
- package/dist/lib/watchdog/rotate.js +1 -1
- package/dist/lib/watchdog/watchdog.d.ts +1 -1
- package/dist/lib/watchdog/watchdog.js +2 -2
- package/package.json +1 -1
- package/dist/commands/browser.d.ts +0 -7
- package/dist/commands/browser.js +0 -139
- package/dist/commands/computer.d.ts +0 -48
- package/dist/commands/computer.js +0 -244
- package/dist/commands/resume.d.ts +0 -23
- package/dist/commands/resume.js +0 -158
- package/dist/commands/secrets-passthrough.d.ts +0 -3
- package/dist/commands/secrets-passthrough.js +0 -52
- package/dist/commands/sessions-bookmark.d.ts +0 -2
- package/dist/commands/sessions-bookmark.js +0 -92
- package/dist/commands/sessions-export.d.ts +0 -31
- package/dist/commands/sessions-export.js +0 -409
- package/dist/commands/sessions-import.d.ts +0 -6
- package/dist/commands/sessions-import.js +0 -343
- package/dist/commands/sessions-inject.d.ts +0 -14
- package/dist/commands/sessions-inject.js +0 -143
- package/dist/commands/sessions-picker-factory.d.ts +0 -24
- package/dist/commands/sessions-picker-factory.js +0 -59
- package/dist/commands/sessions-render.d.ts +0 -11
- package/dist/commands/sessions-render.js +0 -119
- package/dist/commands/sessions-share.d.ts +0 -15
- package/dist/commands/sessions-share.js +0 -171
- package/dist/commands/sessions.d.ts +0 -122
- package/dist/commands/sessions.js +0 -1760
- package/dist/lib/address.d.ts +0 -39
- package/dist/lib/address.js +0 -128
- package/dist/lib/computer/record.d.ts +0 -6
- package/dist/lib/computer/record.js +0 -25
- package/dist/lib/openclaw-keychain.d.ts +0 -43
- package/dist/lib/openclaw-keychain.js +0 -227
- package/dist/lib/session/bundle.d.ts +0 -76
- package/dist/lib/session/bundle.js +0 -146
- package/dist/lib/session/remote/remote-bundle.d.ts +0 -7
- package/dist/lib/session/remote/remote-bundle.js +0 -40
- package/dist/lib/session/remote/remote.d.ts +0 -35
- package/dist/lib/session/remote/remote.js +0 -198
- package/dist/lib/session/remote-bundle.d.ts +0 -1
- package/dist/lib/session/remote-bundle.js +0 -1
- package/dist/lib/session/remote.d.ts +0 -1
- package/dist/lib/session/remote.js +0 -1
- package/dist/lib/session/sync/agents.d.ts +0 -24
- package/dist/lib/session/sync/agents.js +0 -0
- package/dist/lib/session/sync/backend.d.ts +0 -22
- package/dist/lib/session/sync/backend.js +0 -44
- package/dist/lib/session/sync/managed-key.d.ts +0 -5
- package/dist/lib/session/sync/managed-key.js +0 -87
- package/dist/lib/session/sync/net-client.d.ts +0 -29
- package/dist/lib/session/sync/net-client.js +0 -87
- package/dist/lib/session/sync/r2.d.ts +0 -20
- package/dist/lib/session/sync/r2.js +0 -103
- package/dist/lib/session/sync/transcript-crypto.d.ts +0 -41
- 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
|
|
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 =
|
|
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 '
|
|
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 '
|
|
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; `
|
|
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
|
|
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
|
|
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: '
|
|
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 `
|
|
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
|
-
|
|
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
|
-
-
|
|
96
|
+
- \`agents cloud list/status/logs\` cover the run jobs, not their transcripts.
|
|
97
97
|
`,
|
|
98
98
|
});
|
|
99
99
|
}
|
package/dist/commands/cloud.js
CHANGED
|
@@ -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
|
|
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
|
|
package/dist/commands/config.js
CHANGED
|
@@ -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
|
}
|
package/dist/commands/cost.js
CHANGED
|
@@ -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 `
|
|
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
|
|
3
|
+
export declare function registerDetachCommand(program: Command): void;
|
|
4
4
|
export declare function stopInteractive(s: ActiveSession, socket?: string): Promise<void>;
|
package/dist/commands/detach.js
CHANGED
|
@@ -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
|
|
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
|
|
27
|
+
agents ps detach 4b2f1a9c
|
|
28
28
|
|
|
29
29
|
# Bring it back into a terminal later
|
|
30
|
-
agents
|
|
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(['
|
|
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
|
|
136
|
+
chalk.gray(` — running headless (pid ${pid}). Bring it back: agents ps focus ${short}`));
|
|
137
137
|
console.log(chalk.gray(` logs: ${logFile}`));
|
|
138
138
|
}
|
package/dist/commands/exec.js
CHANGED
|
@@ -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 `
|
|
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
|
|
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
|
|
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,
|
|
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
|
|
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(
|
|
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
|
|
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
|
|
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
|
|
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
|
}
|
package/dist/commands/feed.d.ts
CHANGED
|
@@ -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
|
|
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[];
|
package/dist/commands/feed.js
CHANGED
|
@@ -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
|
|
66
|
-
|
|
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:
|
|
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))}`);
|
package/dist/commands/focus.d.ts
CHANGED
|
@@ -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
|
|
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;
|
package/dist/commands/focus.js
CHANGED
|
@@ -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
|
|
61
|
-
const group = opts.group ?? 'sessions';
|
|
60
|
+
export function registerFocusCommand(program) {
|
|
62
61
|
const cmd = program
|
|
63
|
-
.command('focus'
|
|
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
|
|
107
|
+
agents ps focus a1b2c3d4
|
|
109
108
|
|
|
110
109
|
# Multi-select live sessions; each opens as a tab in this terminal
|
|
111
|
-
agents
|
|
110
|
+
agents ps focus
|
|
112
111
|
|
|
113
112
|
# Scope the picker to one device's orphaned sessions
|
|
114
|
-
agents
|
|
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
|
|
116
|
+
agents ps focus claude@latest --device yosemite-s0
|
|
118
117
|
|
|
119
118
|
# Attach only — refuse if nothing is joinable
|
|
120
|
-
agents
|
|
119
|
+
agents ps focus a1b2c3d4 --attach-only
|
|
121
120
|
|
|
122
121
|
# Pick from live sessions on this machine only
|
|
123
|
-
agents
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
};
|
package/dist/commands/fork.d.ts
CHANGED
|
@@ -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 {};
|
package/dist/commands/fork.js
CHANGED
|
@@ -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(['
|
|
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
|
|
23
|
+
agents fork 4f3a9c21
|
|
24
24
|
|
|
25
25
|
# Name the fork's session label
|
|
26
|
-
agents
|
|
26
|
+
agents fork 4f3a9c21 --name "try redis instead"
|
|
27
27
|
|
|
28
28
|
# Place the sibling on a fleet worker instead of here
|
|
29
|
-
agents
|
|
29
|
+
agents fork 4f3a9c21 --device auto
|
|
30
30
|
|
|
31
31
|
# Open the sibling in a fresh terminal tab where you work
|
|
32
|
-
agents
|
|
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
|
|
97
|
-
const cmd =
|
|
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
|
|
74
|
+
{ name: 'Use an existing secrets bundle', value: FROM_SECRETS },
|
|
75
75
|
],
|
|
76
76
|
})
|
|
77
77
|
: TYPE_NOW;
|