@phnx-labs/agents-cli 1.23.17 → 1.23.19
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 +239 -0
- package/README.md +140 -165
- package/dist/bootstrap.js +11 -17
- 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 +2 -2
- package/dist/commands/config.js +1 -5
- 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 +10 -6
- package/dist/commands/doctor.js +11 -7
- package/dist/commands/exec.d.ts +0 -17
- package/dist/commands/exec.js +26 -72
- package/dist/commands/feed.d.ts +1 -1
- package/dist/commands/feed.js +3 -3
- package/dist/commands/focus.d.ts +11 -6
- package/dist/commands/focus.js +91 -31
- 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-todo.js +10 -5
- package/dist/commands/projects.js +1 -1
- package/dist/commands/prune.js +1 -1
- package/dist/commands/ps.d.ts +8 -3
- package/dist/commands/ps.js +238 -110
- 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.d.ts +0 -7
- package/dist/commands/sessions-picker.js +16 -310
- 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 +8 -8
- 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/account-registry.d.ts +3 -0
- package/dist/lib/account-registry.js +40 -0
- package/dist/lib/accounting/usage-sync.d.ts +1 -0
- package/dist/lib/accounting/usage-sync.js +20 -3
- package/dist/lib/accounting/usage.d.ts +4 -1
- package/dist/lib/accounting/usage.js +38 -6
- package/dist/lib/agent-spec/agents.js +12 -11
- 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/cloud/store.d.ts +5 -1
- package/dist/lib/cloud/store.js +10 -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 +2 -2
- package/dist/lib/config-keys.js +1 -3
- package/dist/lib/crabbox/cli.js +1 -1
- package/dist/lib/daemon/account-state-daemon-service.js +9 -2
- package/dist/lib/daemon/self-update-service.js +1 -1
- package/dist/lib/device-config.d.ts +2 -1
- package/dist/lib/device-config.js +26 -39
- 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/devices/health.d.ts +6 -0
- package/dist/lib/devices/health.js +11 -4
- package/dist/lib/exec.js +1 -1
- package/dist/lib/feed/activity.js +1 -1
- package/dist/lib/feed/watch.js +2 -1
- package/dist/lib/fleet/apply.d.ts +1 -1
- package/dist/lib/fleet/apply.js +6 -3
- package/dist/lib/fleet-shared-state.d.ts +2 -0
- package/dist/lib/fleet-shared-state.js +3 -1
- package/dist/lib/github/project-prs.js +14 -1
- package/dist/lib/help.d.ts +0 -1
- package/dist/lib/help.js +2 -10
- package/dist/lib/helper-versions.js +1 -1
- 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 +5 -4
- 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/project-root.d.ts +1 -0
- package/dist/lib/project-root.js +11 -3
- package/dist/lib/projects.js +2 -2
- package/dist/lib/quick-todo.d.ts +5 -1
- package/dist/lib/quick-todo.js +14 -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 +12 -8
- 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/self-update.d.ts +1 -1
- package/dist/lib/self-update.js +59 -2
- package/dist/lib/session/active.d.ts +1 -1
- package/dist/lib/session/db.js +4 -4
- 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/glance-files.d.ts +21 -0
- package/dist/lib/session/glance-files.js +123 -0
- package/dist/lib/session/presentation.d.ts +3 -7
- package/dist/lib/session/presentation.js +4 -4
- package/dist/lib/session/preview-digest.d.ts +13 -0
- package/dist/lib/session/preview-digest.js +328 -0
- package/dist/lib/session/projection.js +1 -1
- package/dist/lib/session/remote/remote-list.d.ts +5 -2
- package/dist/lib/session/remote/remote-list.js +15 -8
- package/dist/lib/session/remote/watch.d.ts +2 -0
- package/dist/lib/session/remote/watch.js +90 -10
- 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/smart-launch.js +6 -1
- 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/teams/placement-probe.d.ts +2 -0
- package/dist/lib/teams/placement-probe.js +8 -3
- package/dist/lib/terminal/engine.d.ts +2 -0
- package/dist/lib/terminal/engine.js +5 -3
- package/dist/lib/terminal/index.d.ts +1 -1
- package/dist/lib/terminal/index.js +1 -1
- package/dist/lib/terminal/resolve.js +1 -1
- package/dist/lib/terminal/run-surface.d.ts +1 -0
- package/dist/lib/terminal/run-surface.js +9 -0
- 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/onepassword.d.ts +0 -57
- package/dist/lib/onepassword.js +0 -140
- 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';
|
|
@@ -228,7 +228,7 @@ async function installResolvedPackage(metadata) {
|
|
|
228
228
|
try {
|
|
229
229
|
await sweepStaleInstallStaging(packageRoot);
|
|
230
230
|
if (detectPackageManager(packageRoot) === 'bun') {
|
|
231
|
-
await installPackageWithBun(tarball);
|
|
231
|
+
await installPackageWithBun(tarball, deriveGlobalPrefix(packageRoot));
|
|
232
232
|
}
|
|
233
233
|
else {
|
|
234
234
|
await installPackageIntoPrefix(tarball, deriveGlobalPrefix(packageRoot));
|
|
@@ -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
|
|
|
@@ -253,7 +253,7 @@ Examples:
|
|
|
253
253
|
const providerId = options.provider;
|
|
254
254
|
const status = options.status;
|
|
255
255
|
const limit = parseInt(options.limit, 10) || 20;
|
|
256
|
-
const activeTasks = listActiveTasks();
|
|
256
|
+
const activeTasks = listActiveTasks({ includeStale: true });
|
|
257
257
|
if (activeTasks.length > 0) {
|
|
258
258
|
const byProvider = new Map();
|
|
259
259
|
for (const t of activeTasks) {
|
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
|
}
|
|
@@ -420,7 +416,7 @@ export function registerConfigCommand(program) {
|
|
|
420
416
|
agents config set devices.mac-mini.max-agents 4
|
|
421
417
|
agents config set updates.auto off
|
|
422
418
|
agents config set updates.claude.auto off
|
|
423
|
-
agents config set menubar.menu.tabOrder home,goals,sessions,
|
|
419
|
+
agents config set menubar.menu.tabOrder home,goals,sessions,inbox
|
|
424
420
|
agents config set menubar.menu.pinnedProjects '["Rush","AGI Menu"]'
|
|
425
421
|
agents config set menubar.menu.homeGoals company,myDay
|
|
426
422
|
agents config set menubar.statusbar.goalCountdown on
|
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
|
@@ -7,12 +7,12 @@ import { killSession } from '../lib/tmux/index.js';
|
|
|
7
7
|
import { getDefaultSocketPath } from '../lib/tmux/paths.js';
|
|
8
8
|
import { getAgentsInvocation } from '../lib/daemon/daemon.js';
|
|
9
9
|
import { captureProcessStartTime } from '../lib/platform/process.js';
|
|
10
|
-
import { writeDetachRecord } from '../lib/session/detached.js';
|
|
10
|
+
import { clearDetachRecord, writeDetachRecord } from '../lib/session/detached.js';
|
|
11
11
|
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
|
}
|
|
@@ -41,11 +41,15 @@ export async function stopInteractive(s, socket = getDefaultSocketPath()) {
|
|
|
41
41
|
process.kill(s.pid, 'SIGTERM');
|
|
42
42
|
}
|
|
43
43
|
catch {
|
|
44
|
+
if (s.sessionId)
|
|
45
|
+
clearDetachRecord(s.sessionId);
|
|
44
46
|
return;
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
if (s.pid && s.pid > 0)
|
|
48
50
|
await waitForExit(s.pid);
|
|
51
|
+
if (s.sessionId)
|
|
52
|
+
clearDetachRecord(s.sessionId);
|
|
49
53
|
}
|
|
50
54
|
async function waitForExit(pid, timeoutMs = 5000) {
|
|
51
55
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -111,7 +115,7 @@ async function detachAction(id, opts = {}) {
|
|
|
111
115
|
const short = target.sessionId.slice(0, 8);
|
|
112
116
|
if (target.kind === 'remote') {
|
|
113
117
|
console.log(chalk.gray(`${short} lives on ${target.machine} — detaching it there over SSH…`));
|
|
114
|
-
const rc = await runOnPeer(['
|
|
118
|
+
const rc = await runOnPeer(['ps', 'detach', target.sessionId, '--local'], target.machine);
|
|
115
119
|
if (rc === 'no-target') {
|
|
116
120
|
console.error(chalk.red(`Can't reach ${target.machine} to detach ${short}.`));
|
|
117
121
|
process.exitCode = 1;
|
|
@@ -133,6 +137,6 @@ async function detachAction(id, opts = {}) {
|
|
|
133
137
|
detachedAtMs: Date.now(),
|
|
134
138
|
});
|
|
135
139
|
console.log(chalk.green(`◒ Backgrounded ${agent} ${short}`) +
|
|
136
|
-
chalk.gray(` — running headless (pid ${pid}). Bring it back: agents
|
|
140
|
+
chalk.gray(` — running headless (pid ${pid}). Bring it back: agents ps focus ${short}`));
|
|
137
141
|
console.log(chalk.gray(` logs: ${logFile}`));
|
|
138
142
|
}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -14,6 +14,7 @@ import { resolveHost } from '../lib/hosts/registry.js';
|
|
|
14
14
|
import { sshExecAsync } from '../lib/ssh-exec.js';
|
|
15
15
|
import { hostIdentityArgs, sshTargetFor } from '../lib/hosts/types.js';
|
|
16
16
|
import { deviceIdentityArgs } from '../lib/devices/connect.js';
|
|
17
|
+
import { resolveDeviceProfile } from '../lib/devices/resolve-profile.js';
|
|
17
18
|
import { machineId, normalizeHost } from '../lib/session/sync/config.js';
|
|
18
19
|
import { findAmbiguousDevicePins } from '../lib/scheduling/routines.js';
|
|
19
20
|
import { findLeakedDaemons } from '../lib/daemon/leaked-daemons.js';
|
|
@@ -192,12 +193,15 @@ async function resolveFleetTargets(opts) {
|
|
|
192
193
|
const localName = machineId();
|
|
193
194
|
return Object.values(registry)
|
|
194
195
|
.filter((d) => normalizeHost(d.name) !== localName)
|
|
195
|
-
.map((d) =>
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
.map((d) => {
|
|
197
|
+
const platform = resolveDeviceProfile(d).platform;
|
|
198
|
+
return {
|
|
199
|
+
name: d.name,
|
|
200
|
+
sshTarget: d.name,
|
|
201
|
+
os: platform !== 'unknown' ? platform : undefined,
|
|
202
|
+
extraSshArgs: deviceIdentityArgs(d),
|
|
203
|
+
};
|
|
204
|
+
});
|
|
201
205
|
}
|
|
202
206
|
async function probeFleetTarget(target) {
|
|
203
207
|
const forwarded = ['teams', 'doctor', '--json'];
|
|
@@ -1001,7 +1005,7 @@ async function runDevicesCheck(opts, cwd) {
|
|
|
1001
1005
|
const remoteTargets = remoteFleetTargets(planned, self)
|
|
1002
1006
|
.map((t) => ({
|
|
1003
1007
|
name: t.device.name,
|
|
1004
|
-
platform: t.device.platform,
|
|
1008
|
+
platform: resolveDeviceProfile(t.device).platform,
|
|
1005
1009
|
skip: t.skip,
|
|
1006
1010
|
dialTarget: fleetDialTarget(t.device),
|
|
1007
1011
|
extraSshArgs: deviceIdentityArgs(t.device),
|
package/dist/commands/exec.d.ts
CHANGED
|
@@ -128,23 +128,6 @@ export declare function runAutoDefaultsToAffinity(options: {
|
|
|
128
128
|
computer?: string;
|
|
129
129
|
local?: boolean;
|
|
130
130
|
}, env?: NodeJS.ProcessEnv): boolean;
|
|
131
|
-
export declare function bareInteractiveRunDefaultsToDeviceAuto(options: {
|
|
132
|
-
host?: string;
|
|
133
|
-
device?: string;
|
|
134
|
-
on?: string;
|
|
135
|
-
computer?: string;
|
|
136
|
-
resume?: string | boolean;
|
|
137
|
-
lease?: string | boolean;
|
|
138
|
-
box?: string;
|
|
139
|
-
cloud?: boolean;
|
|
140
|
-
local?: boolean;
|
|
141
|
-
}, run: {
|
|
142
|
-
prompt?: string;
|
|
143
|
-
devicePickerRequested?: boolean;
|
|
144
|
-
}, surface: {
|
|
145
|
-
tty: boolean;
|
|
146
|
-
json?: boolean;
|
|
147
|
-
}, env?: NodeJS.ProcessEnv): boolean;
|
|
148
131
|
export declare function hostInteractiveNeedsCorrelationId(runAgent: string, hostSessionId: string | undefined, resumeId: string | undefined): boolean;
|
|
149
132
|
export declare function isInsideGitWorkTree(cwd: string): boolean;
|
|
150
133
|
export declare function gitToplevel(cwd: string): string | null;
|