@phnx-labs/agents-cli 1.20.85 → 1.20.87
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 +168 -0
- package/dist/bin/agents +0 -0
- package/dist/commands/events.d.ts +16 -0
- package/dist/commands/events.js +44 -5
- package/dist/commands/models.js +1 -1
- package/dist/commands/sessions-browser.d.ts +18 -0
- package/dist/commands/sessions-browser.js +126 -24
- package/dist/commands/sessions-picker.d.ts +21 -8
- package/dist/commands/sessions-picker.js +88 -11
- package/dist/commands/sessions.d.ts +19 -0
- package/dist/commands/sessions.js +147 -18
- package/dist/commands/ssh.js +59 -1
- package/dist/commands/teams-picker.d.ts +2 -0
- package/dist/commands/teams-picker.js +2 -1
- package/dist/commands/teams.d.ts +4 -1
- package/dist/commands/teams.js +106 -70
- package/dist/commands/view.js +14 -3
- package/dist/index.js +31 -1
- package/dist/lib/claude-account-token.d.ts +12 -0
- package/dist/lib/claude-account-token.js +63 -0
- package/dist/lib/devices/registry.d.ts +25 -0
- package/dist/lib/devices/registry.js +82 -1
- package/dist/lib/events.d.ts +8 -1
- package/dist/lib/events.js +13 -0
- package/dist/lib/exec.js +10 -1
- package/dist/lib/format.d.ts +7 -0
- package/dist/lib/format.js +11 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/MacOS/MenubarHelper +0 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/Resources/AppIcon.icns +0 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/_CodeSignature/CodeResources +2 -2
- package/dist/lib/models.d.ts +21 -0
- package/dist/lib/models.js +133 -4
- package/dist/lib/secrets/Agents CLI.app/Contents/CodeResources +0 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/MacOS/Agents CLI +0 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/Resources/AppIcon.icns +0 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/_CodeSignature/CodeResources +2 -2
- package/dist/lib/session/db.d.ts +21 -0
- package/dist/lib/session/db.js +45 -4
- package/dist/lib/session/parse.d.ts +11 -0
- package/dist/lib/session/parse.js +24 -7
- package/dist/lib/session/remote-list.d.ts +7 -0
- package/dist/lib/session/remote-list.js +8 -4
- package/dist/lib/session/state.d.ts +6 -5
- package/dist/lib/session/state.js +84 -11
- package/dist/lib/session/team-filter.d.ts +22 -3
- package/dist/lib/session/team-filter.js +106 -17
- package/dist/lib/session/types.d.ts +8 -0
- package/dist/lib/signin-badge.d.ts +17 -0
- package/dist/lib/signin-badge.js +19 -0
- package/dist/lib/state.d.ts +2 -0
- package/dist/lib/state.js +2 -0
- package/dist/lib/usage.js +1 -60
- package/package.json +1 -1
package/dist/commands/ssh.js
CHANGED
|
@@ -20,7 +20,7 @@ import { readAndResolveBundleEnv, isHeadlessSecretsContext } from '../lib/secret
|
|
|
20
20
|
import { machineId } from '../lib/session/sync/config.js';
|
|
21
21
|
import { registerFleetCaptureCommand } from './fleet-capture.js';
|
|
22
22
|
import { registerFleetApplyAlias } from './apply.js';
|
|
23
|
-
import { addIgnored, getDevice, loadDevices, loadIgnored, removeDevice, removeIgnored, upsertDevice, writeReachability, } from '../lib/devices/registry.js';
|
|
23
|
+
import { addIgnored, getDevice, loadDevices, loadIgnored, removeDevice, removeIgnored, setAutoLaunchEnabled, setAutoLaunchPreferred, upsertDevice, writeReachability, } from '../lib/devices/registry.js';
|
|
24
24
|
import { collectReachabilityWriteBacks, deviceOnlineState } from '../lib/devices/reachability.js';
|
|
25
25
|
import { addControlToken } from '../lib/serve/token.js';
|
|
26
26
|
import { DEFAULT_SERVE_PORT } from '../lib/serve/server.js';
|
|
@@ -687,6 +687,8 @@ Typical workflow:
|
|
|
687
687
|
agents devices sync --yes # non-interactive: register all non-ignored nodes
|
|
688
688
|
agents devices list # see what's registered
|
|
689
689
|
agents devices ignore ipad165 # dismiss a node so it's never re-suggested
|
|
690
|
+
agents devices disable zion # exclude a device from Factory auto-launch
|
|
691
|
+
agents devices prefer mac-mini # boost a device in Factory auto-launch ranking
|
|
690
692
|
agents devices set win-mini --auth password --bundle muqsit
|
|
691
693
|
agents devices render --write # write ~/.ssh/config.d/agents include
|
|
692
694
|
agents fleet update # roll out latest agents-cli to every online device
|
|
@@ -766,6 +768,62 @@ Typical workflow:
|
|
|
766
768
|
}
|
|
767
769
|
console.log(chalk.green(`No longer ignoring '${name}'`) + chalk.gray(' — run `agents devices sync` to register it.'));
|
|
768
770
|
});
|
|
771
|
+
devicesCmd
|
|
772
|
+
.command('enable <name>')
|
|
773
|
+
.description('Allow a registered device to be auto-picked by Factory agent launches.')
|
|
774
|
+
.action(async (name) => {
|
|
775
|
+
try {
|
|
776
|
+
await mustGetDevice(name);
|
|
777
|
+
await setAutoLaunchEnabled(name, true);
|
|
778
|
+
console.log(chalk.green(`Enabled '${name}'`) + chalk.gray(' for Factory auto-launch.'));
|
|
779
|
+
}
|
|
780
|
+
catch (err) {
|
|
781
|
+
console.error(chalk.red(err.message));
|
|
782
|
+
process.exit(1);
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
devicesCmd
|
|
786
|
+
.command('disable <name>')
|
|
787
|
+
.description('Exclude a registered device from Factory auto-launch. It can still be picked manually via (Pick Host).')
|
|
788
|
+
.action(async (name) => {
|
|
789
|
+
try {
|
|
790
|
+
await mustGetDevice(name);
|
|
791
|
+
await setAutoLaunchEnabled(name, false);
|
|
792
|
+
console.log(chalk.green(`Disabled '${name}'`) + chalk.gray(' for Factory auto-launch.'));
|
|
793
|
+
}
|
|
794
|
+
catch (err) {
|
|
795
|
+
console.error(chalk.red(err.message));
|
|
796
|
+
process.exit(1);
|
|
797
|
+
}
|
|
798
|
+
});
|
|
799
|
+
devicesCmd
|
|
800
|
+
.command('prefer <name>')
|
|
801
|
+
.description('Boost a registered device in Factory auto-launch ranking.')
|
|
802
|
+
.action(async (name) => {
|
|
803
|
+
try {
|
|
804
|
+
await mustGetDevice(name);
|
|
805
|
+
await setAutoLaunchPreferred(name, true);
|
|
806
|
+
console.log(chalk.green(`Preferred '${name}'`) + chalk.gray(' for Factory auto-launch.'));
|
|
807
|
+
}
|
|
808
|
+
catch (err) {
|
|
809
|
+
console.error(chalk.red(err.message));
|
|
810
|
+
process.exit(1);
|
|
811
|
+
}
|
|
812
|
+
});
|
|
813
|
+
devicesCmd
|
|
814
|
+
.command('unprefer <name>')
|
|
815
|
+
.description('Remove the auto-launch preference boost from a device.')
|
|
816
|
+
.action(async (name) => {
|
|
817
|
+
try {
|
|
818
|
+
await mustGetDevice(name);
|
|
819
|
+
await setAutoLaunchPreferred(name, false);
|
|
820
|
+
console.log(chalk.green(`No longer preferring '${name}'`) + chalk.gray(' for Factory auto-launch.'));
|
|
821
|
+
}
|
|
822
|
+
catch (err) {
|
|
823
|
+
console.error(chalk.red(err.message));
|
|
824
|
+
process.exit(1);
|
|
825
|
+
}
|
|
826
|
+
});
|
|
769
827
|
const runList = async (opts = {}) => {
|
|
770
828
|
const reg = await loadDevices();
|
|
771
829
|
const names = Object.keys(reg).sort();
|
|
@@ -132,7 +132,8 @@ export function formatTeamRow(row, nameWidth, compositionWidth) {
|
|
|
132
132
|
const work = workCell(row.agents);
|
|
133
133
|
const runtime = runtimeSpan(t);
|
|
134
134
|
const age = chalk.gray(relTime(t.modified_at));
|
|
135
|
-
const
|
|
135
|
+
const spawnedBy = row.spawnedBy ? chalk.green(`by ${row.spawnedBy}`) : '';
|
|
136
|
+
const middleParts = [status, work, runtime, spawnedBy].filter(Boolean);
|
|
136
137
|
const middle = middleParts.join(chalk.gray(' · '));
|
|
137
138
|
return `${name} ${composition} ${middle}${middle ? chalk.gray(' · ') : ''}${age}`;
|
|
138
139
|
}
|
package/dist/commands/teams.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type { Command } from 'commander';
|
|
|
9
9
|
import { AgentManager, AgentStatus, type TaskType } from '../lib/teams/agents.js';
|
|
10
10
|
import { type TaskInfo } from '../lib/teams/api.js';
|
|
11
11
|
import { type TeamRow } from './teams-picker.js';
|
|
12
|
+
import { type TeamSpawner } from '../lib/session/db.js';
|
|
12
13
|
type TeamRegistry = Record<string, {
|
|
13
14
|
created_at: string;
|
|
14
15
|
description?: string;
|
|
@@ -58,7 +59,9 @@ export declare function decideTeamMessageRoute(status: AgentStatus, hasMessage:
|
|
|
58
59
|
* the teammate itself so we don't need the original --cloud CLI args.
|
|
59
60
|
*/
|
|
60
61
|
export declare function wireCloudDispatcher(mgr: AgentManager): void;
|
|
61
|
-
export declare function buildTeamRowsFromSnapshots(registry: TeamRegistry, agents: TeamListAgentSnapshot[]
|
|
62
|
+
export declare function buildTeamRowsFromSnapshots(registry: TeamRegistry, agents: TeamListAgentSnapshot[],
|
|
63
|
+
/** team name -> the session that spawned it (see teamSpawners). */
|
|
64
|
+
spawners?: Map<string, TeamSpawner>): {
|
|
62
65
|
rows: TeamRow[];
|
|
63
66
|
teams: TaskInfo[];
|
|
64
67
|
names: string[];
|