@phnx-labs/agents-cli 1.20.33 → 1.20.35
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 +29 -0
- package/README.md +32 -2
- package/dist/commands/computer-actions.d.ts +15 -0
- package/dist/commands/computer-actions.js +120 -22
- package/dist/commands/computer.d.ts +23 -0
- package/dist/commands/computer.js +45 -3
- package/dist/commands/cost.js +17 -12
- package/dist/commands/doctor.d.ts +11 -0
- package/dist/commands/doctor.js +108 -14
- package/dist/commands/events.d.ts +16 -0
- package/dist/commands/events.js +173 -0
- package/dist/commands/exec.js +6 -1
- package/dist/commands/hosts.js +28 -24
- package/dist/commands/import.js +1 -1
- package/dist/commands/inspect.d.ts +2 -0
- package/dist/commands/inspect.js +54 -7
- package/dist/commands/logs.d.ts +17 -0
- package/dist/commands/logs.js +139 -0
- package/dist/commands/models.d.ts +3 -0
- package/dist/commands/models.js +27 -8
- package/dist/commands/permissions.js +9 -2
- package/dist/commands/repo.d.ts +34 -0
- package/dist/commands/repo.js +243 -65
- package/dist/commands/resource-view.d.ts +20 -0
- package/dist/commands/resource-view.js +90 -28
- package/dist/commands/rules.js +1 -1
- package/dist/commands/secrets-migrate.js +23 -11
- package/dist/commands/secrets.d.ts +20 -0
- package/dist/commands/secrets.js +93 -17
- package/dist/commands/sessions-resume.d.ts +2 -0
- package/dist/commands/sessions-resume.js +209 -0
- package/dist/commands/sessions-tail.d.ts +10 -0
- package/dist/commands/sessions-tail.js +11 -0
- package/dist/commands/sessions.d.ts +73 -1
- package/dist/commands/sessions.js +273 -53
- package/dist/commands/status.d.ts +12 -0
- package/dist/commands/status.js +81 -0
- package/dist/commands/teams.js +70 -6
- package/dist/commands/versions.js +2 -1
- package/dist/commands/view.d.ts +42 -0
- package/dist/commands/view.js +213 -83
- package/dist/commands/wallet.d.ts +6 -0
- package/dist/commands/wallet.js +22 -5
- package/dist/index.js +61 -32
- package/dist/lib/acp/harnesses.d.ts +1 -1
- package/dist/lib/acp/harnesses.js +2 -2
- package/dist/lib/agents.d.ts +12 -0
- package/dist/lib/agents.js +145 -41
- package/dist/lib/browser/cdp.js +5 -1
- package/dist/lib/browser/chrome.js +20 -0
- package/dist/lib/browser/drivers/ssh.d.ts +27 -0
- package/dist/lib/browser/drivers/ssh.js +94 -19
- package/dist/lib/browser/ipc.d.ts +3 -0
- package/dist/lib/browser/ipc.js +13 -9
- package/dist/lib/browser/service.js +71 -15
- package/dist/lib/daemon.d.ts +35 -0
- package/dist/lib/daemon.js +33 -5
- package/dist/lib/devices/connect.d.ts +3 -2
- package/dist/lib/devices/connect.js +5 -3
- package/dist/lib/doctor-diff.js +29 -2
- package/dist/lib/drift-sync.d.ts +43 -0
- package/dist/lib/drift-sync.js +179 -0
- package/dist/lib/events.d.ts +9 -2
- package/dist/lib/events.js +70 -11
- package/dist/lib/exec.d.ts +15 -0
- package/dist/lib/exec.js +43 -11
- package/dist/lib/hooks.js +8 -2
- package/dist/lib/hosts/dispatch.js +6 -7
- package/dist/lib/hosts/logs.d.ts +16 -0
- package/dist/lib/hosts/logs.js +45 -0
- package/dist/lib/hosts/progress.d.ts +66 -0
- package/dist/lib/hosts/progress.js +125 -17
- package/dist/lib/hosts/ready.d.ts +23 -2
- package/dist/lib/hosts/ready.js +35 -13
- package/dist/lib/hosts/reconcile.d.ts +53 -0
- package/dist/lib/hosts/reconcile.js +81 -0
- package/dist/lib/hosts/tasks.d.ts +8 -0
- package/dist/lib/hosts/tasks.js +14 -0
- package/dist/lib/permissions.d.ts +4 -0
- package/dist/lib/permissions.js +35 -0
- package/dist/lib/picker.d.ts +24 -0
- package/dist/lib/picker.js +124 -0
- package/dist/lib/platform/winpath.d.ts +31 -2
- package/dist/lib/platform/winpath.js +133 -24
- package/dist/lib/plugin-marketplace.d.ts +30 -0
- package/dist/lib/plugin-marketplace.js +215 -2
- package/dist/lib/plugins.d.ts +5 -0
- package/dist/lib/plugins.js +45 -4
- package/dist/lib/pwsh.d.ts +11 -0
- package/dist/lib/pwsh.js +13 -0
- 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/agent.d.ts +42 -1
- package/dist/lib/secrets/agent.js +89 -11
- package/dist/lib/secrets/bundles.js +40 -9
- package/dist/lib/secrets/filestore.js +31 -1
- package/dist/lib/secrets/index.d.ts +33 -1
- package/dist/lib/secrets/index.js +90 -9
- package/dist/lib/secrets/windows.d.ts +74 -0
- package/dist/lib/secrets/windows.js +440 -0
- package/dist/lib/session/active.d.ts +7 -0
- package/dist/lib/session/active.js +11 -3
- package/dist/lib/session/discover.js +94 -0
- package/dist/lib/session/parse.d.ts +6 -0
- package/dist/lib/session/parse.js +283 -2
- package/dist/lib/session/pid-registry.d.ts +21 -0
- package/dist/lib/session/pid-registry.js +80 -0
- package/dist/lib/session/remote-active.d.ts +26 -0
- package/dist/lib/session/remote-active.js +141 -0
- package/dist/lib/session/remote.js +2 -6
- package/dist/lib/session/render.js +1 -1
- package/dist/lib/session/sync/config.d.ts +8 -0
- package/dist/lib/session/sync/config.js +11 -2
- package/dist/lib/session/types.d.ts +1 -1
- package/dist/lib/session/types.js +1 -1
- package/dist/lib/shims.d.ts +30 -2
- package/dist/lib/shims.js +107 -50
- package/dist/lib/ssh-exec.d.ts +26 -3
- package/dist/lib/ssh-exec.js +45 -3
- package/dist/lib/ssh-tunnel.d.ts +24 -5
- package/dist/lib/ssh-tunnel.js +60 -62
- package/dist/lib/staleness/writers/hooks.js +1 -1
- package/dist/lib/startup/command-registry.d.ts +3 -0
- package/dist/lib/startup/command-registry.js +6 -0
- package/dist/lib/sync-status.d.ts +102 -0
- package/dist/lib/sync-status.js +135 -0
- package/dist/lib/teams/agents.d.ts +24 -0
- package/dist/lib/teams/agents.js +30 -1
- package/dist/lib/teams/registry.js +25 -9
- package/dist/lib/terminal/backends/ghostty.d.ts +6 -0
- package/dist/lib/terminal/backends/ghostty.js +69 -0
- package/dist/lib/terminal/backends/index.d.ts +18 -0
- package/dist/lib/terminal/backends/index.js +29 -0
- package/dist/lib/terminal/backends/iterm.d.ts +6 -0
- package/dist/lib/terminal/backends/iterm.js +62 -0
- package/dist/lib/terminal/backends/tmux.d.ts +14 -0
- package/dist/lib/terminal/backends/tmux.js +23 -0
- package/dist/lib/terminal/engine.d.ts +39 -0
- package/dist/lib/terminal/engine.js +54 -0
- package/dist/lib/terminal/index.d.ts +14 -0
- package/dist/lib/terminal/index.js +5 -0
- package/dist/lib/terminal/policy.d.ts +11 -0
- package/dist/lib/terminal/policy.js +11 -0
- package/dist/lib/terminal/quote.d.ts +11 -0
- package/dist/lib/terminal/quote.js +13 -0
- package/dist/lib/terminal/shell.d.ts +6 -0
- package/dist/lib/terminal/shell.js +23 -0
- package/dist/lib/terminal/transport.d.ts +15 -0
- package/dist/lib/terminal/transport.js +40 -0
- package/dist/lib/terminal/types.d.ts +59 -0
- package/dist/lib/terminal/types.js +13 -0
- package/dist/lib/types.d.ts +27 -1
- package/dist/lib/usage.d.ts +30 -0
- package/dist/lib/usage.js +159 -2
- package/dist/lib/versions.d.ts +7 -3
- package/dist/lib/versions.js +10 -5
- package/dist/lib/whats-new.d.ts +9 -0
- package/dist/lib/whats-new.js +35 -0
- package/package.json +1 -1
package/dist/commands/teams.js
CHANGED
|
@@ -2,7 +2,7 @@ import chalk from 'chalk';
|
|
|
2
2
|
import * as fs from 'fs/promises';
|
|
3
3
|
import { addHostOption } from '../lib/hosts/option.js';
|
|
4
4
|
import * as path from 'path';
|
|
5
|
-
import { AgentManager, checkAllClis, getAgentsDir, VALID_TASK_TYPES, } from '../lib/teams/agents.js';
|
|
5
|
+
import { AgentManager, checkAllClis, checkCliSignedIn, getAgentsDir, resolveSignInAdvisory, VALID_TASK_TYPES, } from '../lib/teams/agents.js';
|
|
6
6
|
import { resolveProvider } from '../lib/cloud/registry.js';
|
|
7
7
|
import { runSupervisor } from '../lib/teams/supervisor.js';
|
|
8
8
|
import { handleSpawn, handleStatus, handleStop, handleTasks, toTaskStatusSummary, } from '../lib/teams/api.js';
|
|
@@ -10,6 +10,7 @@ import { createTeam, ensureTeam, getTeam, loadTeams, removeTeam, teamExists, } f
|
|
|
10
10
|
import { setHelpSections } from '../lib/help.js';
|
|
11
11
|
import { createWorktree, isGitRepo, hasUncommittedChanges, removeWorktree, } from '../lib/teams/worktree.js';
|
|
12
12
|
import { isVersionInstalled, resolveVersionAlias, resolveVersionAliasLoose } from '../lib/versions.js';
|
|
13
|
+
import { AGENTS, warnAgentDeprecated } from '../lib/agents.js';
|
|
13
14
|
import { discoverSessions, parseTimeFilter, resolveSessionById } from '../lib/session/discover.js';
|
|
14
15
|
import { buildPreview as buildSessionPreview } from './sessions-picker.js';
|
|
15
16
|
import { parseExecEnv } from '../lib/exec.js';
|
|
@@ -133,7 +134,7 @@ function parseTeammate(spec) {
|
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
die(`Unknown teammate '${spec}'. Available agents: ${VALID_AGENTS.join(', ')}.\n` +
|
|
136
|
-
` Use 'claude', '
|
|
137
|
+
` Use 'claude', 'kimi@latest', 'kimi@0.19.2' (a version from 'agents view'), or a profile name.`);
|
|
137
138
|
}
|
|
138
139
|
function shortId(id) {
|
|
139
140
|
return id.slice(0, 8);
|
|
@@ -183,6 +184,31 @@ export function wireCloudDispatcher(mgr) {
|
|
|
183
184
|
return { cloudSessionId: cloudTask.id };
|
|
184
185
|
});
|
|
185
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Advisory: warn once per agent type of any still-pending (staged `--after`)
|
|
189
|
+
* teammate whose CLI may not be signed in. Warn-only — never blocks `start`.
|
|
190
|
+
* Local teammates only; cloud teammates authenticate through their provider.
|
|
191
|
+
*/
|
|
192
|
+
async function warnUnsignedTeammates(mgr, team) {
|
|
193
|
+
let pending;
|
|
194
|
+
try {
|
|
195
|
+
pending = (await mgr.listByTask(team)).filter((a) => a.status === 'pending' && !a.cloudProvider);
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
return; // team not loadable yet — nothing to warn about
|
|
199
|
+
}
|
|
200
|
+
const seen = new Set();
|
|
201
|
+
for (const a of pending) {
|
|
202
|
+
const agent = a.agentType;
|
|
203
|
+
if (seen.has(agent) || !AGENT_NAMES[agent])
|
|
204
|
+
continue;
|
|
205
|
+
seen.add(agent);
|
|
206
|
+
if (!(await checkCliSignedIn(agent))) {
|
|
207
|
+
console.error(chalk.yellow(`⚠ ${AGENT_NAMES[agent]} may not be signed in (detection is unreliable). Launching anyway.`) +
|
|
208
|
+
chalk.gray(`\n If it fails to start, run \`${AGENTS[agent].cliCommand}\` to log in, or pass --force to silence this.`));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
186
212
|
/** Single-wave start used by `teams start` without --watch. */
|
|
187
213
|
async function runOneWave(mgr, team, json) {
|
|
188
214
|
const launched = await mgr.startReady(team);
|
|
@@ -839,6 +865,7 @@ export function registerTeamsCommands(program) {
|
|
|
839
865
|
.option('--cloud <provider>', `Dispatch to cloud backend instead of local CLI: ${VALID_CLOUD_PROVIDERS.join('|')}`)
|
|
840
866
|
.option('--repo <owner/repo>', 'GitHub repository (required for --cloud rush)')
|
|
841
867
|
.option('--branch <name>', 'Target git branch for cloud dispatch')
|
|
868
|
+
.option('--force', "Skip the advisory 'may not be signed in' warning (detection is unreliable)")
|
|
842
869
|
.option('--json', 'Output machine-readable JSON')
|
|
843
870
|
.action(async (team, teammate, task, opts) => {
|
|
844
871
|
if (!VALID_MODES.includes(opts.mode)) {
|
|
@@ -865,10 +892,18 @@ export function registerTeamsCommands(program) {
|
|
|
865
892
|
}
|
|
866
893
|
}
|
|
867
894
|
const { agent, version, profileName } = parseTeammate(teammate);
|
|
895
|
+
warnAgentDeprecated(agent);
|
|
868
896
|
if (version && !isVersionInstalled(agent, version)) {
|
|
869
897
|
die(`${AGENT_NAMES[agent]} ${version} isn't installed.\n` +
|
|
870
898
|
` Install it: agents add ${agent}@${version}\n` +
|
|
871
|
-
` Or see what's installed: agents view ${agent}`);
|
|
899
|
+
` Or see what's installed (incl. @latest): agents view ${agent}`);
|
|
900
|
+
}
|
|
901
|
+
// Advisory sign-in check: warn but NEVER block. Detection is unreliable
|
|
902
|
+
// for opaque-cred agents, so a false negative must not stop a team. Cloud
|
|
903
|
+
// dispatch authenticates through the provider, not the local CLI — skip it.
|
|
904
|
+
if (!opts.force && !cloudProviderId && !(await checkCliSignedIn(agent))) {
|
|
905
|
+
console.error(chalk.yellow(`⚠ ${AGENT_NAMES[agent]} may not be signed in (detection is unreliable). Adding anyway.`) +
|
|
906
|
+
chalk.gray(`\n If it fails to start, run \`${AGENTS[agent].cliCommand}\` to log in, or pass --force to silence this.`));
|
|
872
907
|
}
|
|
873
908
|
if (opts.name !== undefined) {
|
|
874
909
|
if (!opts.name || !/^[A-Za-z0-9_-]+$/.test(opts.name)) {
|
|
@@ -1139,6 +1174,7 @@ export function registerTeamsCommands(program) {
|
|
|
1139
1174
|
.option('--watch', 'Keep running: poll every --interval seconds, fire new waves, exit when the DAG drains.')
|
|
1140
1175
|
.option('--interval <seconds>', 'Seconds between waves in --watch mode (default 8)', '8')
|
|
1141
1176
|
.option('--max-waves <n>', 'Safety cap on waves in --watch mode (default 1000)', '1000')
|
|
1177
|
+
.option('--force', "Skip the advisory 'may not be signed in' warning for staged teammates (detection is unreliable)")
|
|
1142
1178
|
.action(async (team, opts) => {
|
|
1143
1179
|
const mgr = mkManager();
|
|
1144
1180
|
wireCloudDispatcher(mgr);
|
|
@@ -1148,6 +1184,8 @@ export function registerTeamsCommands(program) {
|
|
|
1148
1184
|
return;
|
|
1149
1185
|
team = picked;
|
|
1150
1186
|
}
|
|
1187
|
+
if (!opts.force && !isJsonMode(opts))
|
|
1188
|
+
await warnUnsignedTeammates(mgr, team);
|
|
1151
1189
|
if (!opts.watch) {
|
|
1152
1190
|
await runOneWave(mgr, team, Boolean(opts.json));
|
|
1153
1191
|
return;
|
|
@@ -1446,19 +1484,45 @@ export function registerTeamsCommands(program) {
|
|
|
1446
1484
|
teams
|
|
1447
1485
|
.command('doctor')
|
|
1448
1486
|
.alias('dr')
|
|
1449
|
-
.description('Check which agents are installed and available to join a team. Verifies CLI paths.')
|
|
1487
|
+
.description('Check which agents are installed and available to join a team. Verifies CLI paths and shows an advisory sign-in hint.')
|
|
1450
1488
|
.option('--json', 'Output machine-readable JSON')
|
|
1451
1489
|
.action(async (opts) => {
|
|
1452
1490
|
const info = checkAllClis();
|
|
1491
|
+
// Advisory enrichment only. Sign-in detection is UNRELIABLE, so it never
|
|
1492
|
+
// changes the authoritative installed/ready column — it annotates. And an
|
|
1493
|
+
// agent that is actually running in a team is treated as signed in
|
|
1494
|
+
// regardless of the probe, so doctor never reports a working agent as
|
|
1495
|
+
// logged out ("don't show wrong stuff").
|
|
1496
|
+
const running = new Set();
|
|
1497
|
+
try {
|
|
1498
|
+
for (const a of await mkManager().listRunning())
|
|
1499
|
+
running.add(a.agentType);
|
|
1500
|
+
}
|
|
1501
|
+
catch { /* no teams yet — leave running empty */ }
|
|
1502
|
+
const auth = {};
|
|
1503
|
+
await Promise.all(Object.entries(info).map(async ([name, entry]) => {
|
|
1504
|
+
const isRunning = running.has(name);
|
|
1505
|
+
const probe = entry.installed && !isRunning ? await checkCliSignedIn(name) : false;
|
|
1506
|
+
auth[name] = resolveSignInAdvisory(entry.installed, isRunning, probe);
|
|
1507
|
+
}));
|
|
1453
1508
|
if (isJsonMode(opts)) {
|
|
1454
|
-
|
|
1509
|
+
const merged = {};
|
|
1510
|
+
for (const [name, entry] of Object.entries(info))
|
|
1511
|
+
merged[name] = { ...entry, ...auth[name] };
|
|
1512
|
+
console.log(JSON.stringify(merged, null, 2));
|
|
1455
1513
|
return;
|
|
1456
1514
|
}
|
|
1457
1515
|
console.log(chalk.bold('Who can join a team:'));
|
|
1458
1516
|
for (const [name, entry] of Object.entries(info)) {
|
|
1459
1517
|
const pretty = AGENT_NAMES[name] || name;
|
|
1460
1518
|
if (entry.installed) {
|
|
1461
|
-
|
|
1519
|
+
const { signedIn, running: isRunning } = auth[name];
|
|
1520
|
+
const hint = isRunning
|
|
1521
|
+
? chalk.gray('in use')
|
|
1522
|
+
: signedIn
|
|
1523
|
+
? chalk.gray('signed in')
|
|
1524
|
+
: chalk.gray('sign-in unverified');
|
|
1525
|
+
console.log(` ${chalk.green('ready')} ${pretty.padEnd(10)} ${chalk.gray(entry.path || '')} ${hint}`);
|
|
1462
1526
|
}
|
|
1463
1527
|
else {
|
|
1464
1528
|
console.log(` ${chalk.red('no ')} ${pretty.padEnd(10)} ${chalk.gray(entry.error || 'not installed')}`);
|
|
@@ -4,7 +4,7 @@ import ora from 'ora';
|
|
|
4
4
|
import * as fs from 'fs';
|
|
5
5
|
import * as path from 'path';
|
|
6
6
|
import { select, confirm, checkbox } from '@inquirer/prompts';
|
|
7
|
-
import { AGENTS, ALL_AGENT_IDS, getAccountEmail, getAccountInfo, agentLabel, } from '../lib/agents.js';
|
|
7
|
+
import { AGENTS, ALL_AGENT_IDS, getAccountEmail, getAccountInfo, agentLabel, warnAgentDeprecated, } from '../lib/agents.js';
|
|
8
8
|
import { formatUsageSummary, getUsageInfoForIdentity, getUsageInfoByIdentity, getUsageLookupKey, } from '../lib/usage.js';
|
|
9
9
|
import { viewAction } from './view.js';
|
|
10
10
|
import { readManifest, writeManifest, createDefaultManifest } from '../lib/manifest.js';
|
|
@@ -273,6 +273,7 @@ export function registerVersionsCommands(program) {
|
|
|
273
273
|
}
|
|
274
274
|
const { agent, version } = parsed;
|
|
275
275
|
const agentConfig = AGENTS[agent];
|
|
276
|
+
warnAgentDeprecated(agent);
|
|
276
277
|
if (!agentConfig.npmPackage && !agentConfig.installScript) {
|
|
277
278
|
console.log(chalk.yellow(`${agentLabel(agentConfig.id)} has no npm package. Install manually.`));
|
|
278
279
|
continue;
|
package/dist/commands/view.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import type { Command } from 'commander';
|
|
10
10
|
import type { AgentId } from '../lib/types.js';
|
|
11
11
|
import { type ProfileSummary } from '../lib/profiles.js';
|
|
12
|
+
type SyncState = 'synced' | 'new' | 'modified' | 'deleted';
|
|
12
13
|
/** Per-section filter flags. When any are true, only those sections render. */
|
|
13
14
|
export interface ViewSectionFilter {
|
|
14
15
|
commands?: boolean;
|
|
@@ -21,12 +22,16 @@ export interface ViewSectionFilter {
|
|
|
21
22
|
promptcuts?: boolean;
|
|
22
23
|
cli?: boolean;
|
|
23
24
|
}
|
|
25
|
+
/** Trim a description to a column-friendly snippet. Strips newlines, collapses whitespace. */
|
|
26
|
+
export declare function summarizeDescription(desc: string | undefined, maxLen?: number): string;
|
|
27
|
+
export declare function descriptionForPrefix(desc: string | undefined, prefix: string): string;
|
|
24
28
|
/** Machine-readable entry for a single installed version. */
|
|
25
29
|
export interface ViewJsonVersion {
|
|
26
30
|
version: string;
|
|
27
31
|
isDefault: boolean;
|
|
28
32
|
signedIn: boolean;
|
|
29
33
|
email: string | null;
|
|
34
|
+
accountId?: string | null;
|
|
30
35
|
plan: string | null;
|
|
31
36
|
usageStatus: 'available' | 'rate_limited' | 'out_of_credits' | null;
|
|
32
37
|
overageCredits?: {
|
|
@@ -40,6 +45,9 @@ export interface ViewJsonVersion {
|
|
|
40
45
|
}>;
|
|
41
46
|
lastActive: string | null;
|
|
42
47
|
path: string;
|
|
48
|
+
/** Present only when --resources / --detailed (or --json with a section
|
|
49
|
+
* flag) is passed: this version's resource inventory with git sync-state. */
|
|
50
|
+
resources?: VersionResourcesJson;
|
|
43
51
|
}
|
|
44
52
|
/** Machine-readable entry for one agent's installed versions. */
|
|
45
53
|
export interface ViewJsonAgent {
|
|
@@ -47,6 +55,37 @@ export interface ViewJsonAgent {
|
|
|
47
55
|
versions: ViewJsonVersion[];
|
|
48
56
|
profiles: ProfileSummary[];
|
|
49
57
|
}
|
|
58
|
+
/** Resource sections that --resources can include in --json output. */
|
|
59
|
+
export type ResourceSection = 'commands' | 'skills' | 'mcp' | 'memory' | 'hooks' | 'workflows' | 'plugins';
|
|
60
|
+
/** One resource entry in `--json --resources` output. */
|
|
61
|
+
export interface ResourceItemJson {
|
|
62
|
+
name: string;
|
|
63
|
+
scope?: 'user' | 'project';
|
|
64
|
+
/** Git sync-state vs ~/.agents. Omitted for project-scoped resources or when
|
|
65
|
+
* ~/.agents isn't a git repo. When queried via --host it reflects the
|
|
66
|
+
* remote's ~/.agents — i.e. per-host resource drift. */
|
|
67
|
+
syncState?: SyncState;
|
|
68
|
+
description?: string;
|
|
69
|
+
/** Skills only, when > 0. */
|
|
70
|
+
ruleCount?: number;
|
|
71
|
+
}
|
|
72
|
+
/** Per-version resource inventory; one key per requested section. */
|
|
73
|
+
export interface VersionResourcesJson {
|
|
74
|
+
commands?: ResourceItemJson[];
|
|
75
|
+
skills?: ResourceItemJson[];
|
|
76
|
+
mcp?: ResourceItemJson[];
|
|
77
|
+
memory?: ResourceItemJson[];
|
|
78
|
+
hooks?: ResourceItemJson[];
|
|
79
|
+
workflows?: ResourceItemJson[];
|
|
80
|
+
plugins?: ResourceItemJson[];
|
|
81
|
+
}
|
|
82
|
+
/** Build the set of resource sections to include in `--json` from the
|
|
83
|
+
* `--resources` / `--detailed` flags, plus (in --json mode) the per-section
|
|
84
|
+
* boolean filters (`--skills` etc.) that plain `--json` historically ignored. */
|
|
85
|
+
export declare function parseResourceSections(options: {
|
|
86
|
+
resources?: string | boolean;
|
|
87
|
+
detailed?: boolean;
|
|
88
|
+
} & ViewSectionFilter, jsonMode: boolean): Set<ResourceSection>;
|
|
50
89
|
/**
|
|
51
90
|
* Prune older installed versions that share an email with a newer installed
|
|
52
91
|
* version. Keeps the highest semver per email, skips the global default (with
|
|
@@ -66,6 +105,9 @@ export declare function viewAction(agentArg?: string, options?: {
|
|
|
66
105
|
prune?: boolean;
|
|
67
106
|
yes?: boolean;
|
|
68
107
|
dryRun?: boolean;
|
|
108
|
+
resources?: string | boolean;
|
|
109
|
+
detailed?: boolean;
|
|
69
110
|
} & ViewSectionFilter): Promise<void>;
|
|
70
111
|
/** Register the `agents view` command. */
|
|
71
112
|
export declare function registerViewCommand(program: Command): void;
|
|
113
|
+
export {};
|