@phnx-labs/agents-cli 1.23.28 → 1.23.29
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 +4 -0
- package/README.md +33 -82
- package/dist/bootstrap.js +0 -17
- package/dist/cli/command-registry.js +0 -2
- package/dist/commands/cloud.js +0 -58
- package/dist/commands/config.js +0 -4
- package/dist/commands/daemon-index.js +1 -1
- package/dist/commands/daemon.js +14 -63
- package/dist/commands/doctor.js +0 -12
- package/dist/commands/events.js +1 -1
- package/dist/commands/feed.d.ts +1 -3
- package/dist/commands/feed.js +1 -6
- package/dist/commands/fleet-capture.js +2 -4
- package/dist/commands/focus.d.ts +0 -1
- package/dist/commands/focus.js +2 -4
- package/dist/commands/inspect.d.ts +1 -19
- package/dist/commands/inspect.js +8 -474
- package/dist/commands/mine.js +1 -1
- package/dist/commands/prune.js +2 -64
- package/dist/commands/ps-roster.d.ts +0 -4
- package/dist/commands/ps-roster.js +2 -30
- package/dist/commands/ps.js +1 -4
- package/dist/commands/repo.d.ts +1 -1
- package/dist/commands/repo.js +4 -4
- package/dist/commands/sessions-browser.d.ts +0 -2
- package/dist/commands/sessions-browser.js +2 -32
- package/dist/commands/sessions-optimize.js +3 -4
- package/dist/commands/setup-mine.js +0 -1
- package/dist/commands/ssh.js +8 -9
- package/dist/commands/sync.js +1 -1
- package/dist/commands/update.js +2 -2
- package/dist/commands/watchdog.js +3 -4
- package/dist/lib/accounting/rotate.d.ts +0 -2
- package/dist/lib/accounting/rotate.js +1 -4
- package/dist/lib/agent-spec/agents.d.ts +0 -1
- package/dist/lib/agent-spec/agents.js +0 -8
- package/dist/lib/auth-health.d.ts +0 -1
- package/dist/lib/auth-health.js +0 -3
- package/dist/lib/cli-entry.d.ts +0 -1
- package/dist/lib/cli-entry.js +0 -36
- package/dist/lib/cloud/types.d.ts +0 -2
- package/dist/lib/config-keys.d.ts +1 -1
- package/dist/lib/config-keys.js +1 -4
- package/dist/lib/daemon/daemon.d.ts +0 -4
- package/dist/lib/daemon/daemon.js +6 -202
- package/dist/lib/daemon/heartbeat-service.d.ts +1 -1
- package/dist/lib/daemon/heartbeat-service.js +1 -8
- package/dist/lib/daemon-services.d.ts +1 -1
- package/dist/lib/daemon-services.js +1 -11
- package/dist/lib/device-config.d.ts +0 -2
- package/dist/lib/device-config.js +4 -22
- package/dist/lib/devices/config-migration.js +1 -3
- package/dist/lib/exec.d.ts +2 -5
- package/dist/lib/exec.js +18 -18
- package/dist/lib/factory/snapshot.d.ts +0 -5
- package/dist/lib/factory/snapshot.js +1 -28
- package/dist/lib/feed/events.d.ts +1 -11
- package/dist/lib/feed/events.js +0 -20
- package/dist/lib/feed/feed.d.ts +0 -2
- package/dist/lib/feed-outcome.d.ts +0 -2
- package/dist/lib/feed-outcome.js +0 -5
- package/dist/lib/fleet/capture.d.ts +0 -1
- package/dist/lib/fleet/capture.js +0 -3
- package/dist/lib/fleet/manifest.js +0 -6
- package/dist/lib/fleet/types.d.ts +0 -1
- package/dist/lib/harness/adapter.d.ts +0 -7
- package/dist/lib/harness/adapters/claude.js +0 -18
- package/dist/lib/harness/adapters/codex.js +0 -10
- package/dist/lib/harness/adapters/cursor.js +0 -11
- package/dist/lib/harness/adapters/kimi.js +0 -3
- package/dist/lib/harness/adapters/muse.js +0 -11
- package/dist/lib/harness/index.d.ts +1 -1
- package/dist/lib/harness/index.js +0 -2
- package/dist/lib/hosts/passthrough.js +2 -10
- package/dist/lib/hosts/ready.d.ts +0 -4
- package/dist/lib/hosts/ready.js +0 -9
- package/dist/lib/hosts/reconcile.d.ts +0 -1
- package/dist/lib/hosts/reconcile.js +0 -8
- package/dist/lib/installations/migrate.d.ts +0 -2
- package/dist/lib/installations/migrate.js +0 -145
- package/dist/lib/loop.js +1 -2
- package/dist/lib/menubar/snapshot.d.ts +0 -1
- package/dist/lib/menubar/snapshot.js +1 -4
- package/dist/lib/placement.d.ts +1 -2
- package/dist/lib/placement.js +4 -24
- package/dist/lib/profiles.d.ts +0 -1
- package/dist/lib/profiles.js +0 -6
- package/dist/lib/session/active.d.ts +1 -3
- package/dist/lib/session/active.js +0 -4
- package/dist/lib/session/db.d.ts +0 -1
- package/dist/lib/session/db.js +4 -8
- package/dist/lib/session/discover.d.ts +0 -1
- package/dist/lib/session/discover.js +3 -128
- package/dist/lib/session/live-metadata.js +0 -2
- package/dist/lib/session/presentation.d.ts +0 -1
- package/dist/lib/session/presentation.js +3 -8
- package/dist/lib/session/selection.d.ts +0 -2
- package/dist/lib/session/selection.js +2 -12
- package/dist/lib/staleness/detectors/commands.d.ts +1 -1
- package/dist/lib/staleness/detectors/hooks.d.ts +1 -1
- package/dist/lib/staleness/detectors/mcp.d.ts +1 -1
- package/dist/lib/staleness/detectors/permissions.d.ts +1 -1
- package/dist/lib/staleness/detectors/plugins.d.ts +1 -1
- package/dist/lib/staleness/detectors/rules.d.ts +1 -1
- package/dist/lib/staleness/detectors/skills.d.ts +1 -1
- package/dist/lib/staleness/detectors/subagents.d.ts +1 -1
- package/dist/lib/staleness/detectors/workflows.d.ts +1 -1
- package/dist/lib/staleness/writers/commands.d.ts +1 -1
- package/dist/lib/staleness/writers/hooks.d.ts +1 -1
- package/dist/lib/staleness/writers/mcp.d.ts +1 -1
- package/dist/lib/staleness/writers/permissions.d.ts +1 -1
- package/dist/lib/staleness/writers/plugins.d.ts +1 -1
- package/dist/lib/staleness/writers/rules.d.ts +1 -1
- package/dist/lib/staleness/writers/skills.d.ts +1 -1
- package/dist/lib/staleness/writers/subagents.d.ts +1 -1
- package/dist/lib/staleness/writers/workflows.d.ts +1 -1
- package/dist/lib/startup/command-registry.js +5 -2
- package/dist/lib/state.d.ts +0 -3
- package/dist/lib/state.js +2 -25
- package/dist/lib/types.d.ts +0 -1
- package/dist/lib/watchdog/runner.d.ts +0 -2
- package/dist/lib/watchdog/runner.js +0 -2
- package/package.json +1 -1
- package/scripts/postinstall.js +2 -2
- package/dist/commands/routines.d.ts +0 -14
- package/dist/commands/routines.js +0 -2149
- package/dist/commands/routines.test-fixture.d.ts +0 -52
- package/dist/commands/routines.test-fixture.js +0 -254
- package/dist/lib/catchup.d.ts +0 -19
- package/dist/lib/catchup.js +0 -83
- package/dist/lib/daemon/catchup-service.d.ts +0 -18
- package/dist/lib/daemon/catchup-service.js +0 -21
- package/dist/lib/daemon/runner.d.ts +0 -91
- package/dist/lib/daemon/runner.js +0 -1927
- package/dist/lib/harness/adapters/droid.d.ts +0 -2
- package/dist/lib/harness/adapters/droid.js +0 -14
- package/dist/lib/overdue.d.ts +0 -9
- package/dist/lib/overdue.js +0 -74
- package/dist/lib/routine-activation.d.ts +0 -13
- package/dist/lib/routine-activation.js +0 -117
- package/dist/lib/routine-context.d.ts +0 -59
- package/dist/lib/routine-context.js +0 -181
- package/dist/lib/routine-notify-owner.d.ts +0 -4
- package/dist/lib/routine-notify-owner.js +0 -49
- package/dist/lib/routine-notify.d.ts +0 -17
- package/dist/lib/routine-notify.js +0 -138
- package/dist/lib/routine-process-cleanup.d.ts +0 -9
- package/dist/lib/routine-process-cleanup.js +0 -81
- package/dist/lib/routine-readiness.d.ts +0 -31
- package/dist/lib/routine-readiness.js +0 -256
- package/dist/lib/routines-format.d.ts +0 -7
- package/dist/lib/routines-format.js +0 -127
- package/dist/lib/routines-placement.d.ts +0 -16
- package/dist/lib/routines-placement.js +0 -60
- package/dist/lib/routines-project.d.ts +0 -49
- package/dist/lib/routines-project.js +0 -306
- package/dist/lib/sandbox.d.ts +0 -15
- package/dist/lib/sandbox.js +0 -309
- package/dist/lib/scheduler.d.ts +0 -23
- package/dist/lib/scheduler.js +0 -106
- package/dist/lib/scheduling/routines.d.ts +0 -264
- package/dist/lib/scheduling/routines.js +0 -1292
- package/dist/lib/triggers/webhook.d.ts +0 -26
- package/dist/lib/triggers/webhook.js +0 -181
package/dist/commands/events.js
CHANGED
|
@@ -145,7 +145,7 @@ export function addEventsReadOptions(command) {
|
|
|
145
145
|
command
|
|
146
146
|
.option('--include <families>', `Only these families (comma-sep): ${EVENT_FAMILIES.join(', ')}`)
|
|
147
147
|
.option('--exclude <families>', `Drop these families (comma-sep): ${EVENT_FAMILIES.join(', ')}`)
|
|
148
|
-
.option('--module <name>', 'Only events from this group (e.g. teams, secrets, activity, daemon,
|
|
148
|
+
.option('--module <name>', 'Only events from this group (e.g. teams, secrets, activity, daemon, watchdog, browser)')
|
|
149
149
|
.option('--command <path>', 'Only this command path — prefix match (e.g. "teams create")')
|
|
150
150
|
.option('--event <type>', 'Only this typed event (repeatable, e.g. secrets.get, run.dispatched, pr.opened)', collect, [])
|
|
151
151
|
.option('--agent <name>', 'Only events tagged with this agent')
|
package/dist/commands/feed.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare function prepareLocalFeedBlocks(localBlocks: OpenBlock[], opts: {
|
|
|
21
21
|
dispatch: OpenBlock[];
|
|
22
22
|
filter: ReturnType<typeof filterBlocksForFeed>;
|
|
23
23
|
};
|
|
24
|
-
export declare function formatFeedRuntime(block: Pick<OpenBlock, 'runtime'
|
|
24
|
+
export declare function formatFeedRuntime(block: Pick<OpenBlock, 'runtime'>): string;
|
|
25
25
|
export declare function formatOutcomeHeader(group: OutcomeGroup): string;
|
|
26
26
|
export declare function sessionHintsFromActive(sessions: Array<{
|
|
27
27
|
sessionId?: string;
|
|
@@ -38,8 +38,6 @@ export declare function sessionHintsFromActive(sessions: Array<{
|
|
|
38
38
|
slug?: string;
|
|
39
39
|
};
|
|
40
40
|
host?: string;
|
|
41
|
-
origin?: 'cli' | 'routine';
|
|
42
|
-
routineName?: string;
|
|
43
41
|
}>): SessionOutcomeHint[];
|
|
44
42
|
export declare function isSqliteBusyError(err: unknown): boolean;
|
|
45
43
|
export declare function loadSessionMetasForFeedEnrichment<T>(load: () => Promise<T[]>): Promise<{
|
package/dist/commands/feed.js
CHANGED
|
@@ -225,7 +225,7 @@ function renderBlock(b, localHost, indent = '') {
|
|
|
225
225
|
console.log();
|
|
226
226
|
}
|
|
227
227
|
export function formatFeedRuntime(block) {
|
|
228
|
-
|
|
228
|
+
return {
|
|
229
229
|
ghostty: 'Ghostty',
|
|
230
230
|
iterm: 'iTerm',
|
|
231
231
|
terminal: 'terminal',
|
|
@@ -234,9 +234,6 @@ export function formatFeedRuntime(block) {
|
|
|
234
234
|
code: 'VS Code',
|
|
235
235
|
cursor: 'Cursor',
|
|
236
236
|
}[block.runtime.toLowerCase()] ?? block.runtime;
|
|
237
|
-
if (block.origin !== 'routine')
|
|
238
|
-
return host;
|
|
239
|
-
return `${host} · routine${block.routineName ? `:${block.routineName}` : ''}`;
|
|
240
237
|
}
|
|
241
238
|
export function formatOutcomeHeader(group) {
|
|
242
239
|
const { agents, open, answered, parked } = group.counts;
|
|
@@ -269,8 +266,6 @@ export function sessionHintsFromActive(sessions) {
|
|
|
269
266
|
worktreeSlug: s.worktree?.slug,
|
|
270
267
|
project: s.cwd ? projectKeyFromCwd(s.cwd) : undefined,
|
|
271
268
|
host: s.host,
|
|
272
|
-
origin: s.origin,
|
|
273
|
-
routineName: s.routineName,
|
|
274
269
|
}));
|
|
275
270
|
}
|
|
276
271
|
export function isSqliteBusyError(err) {
|
|
@@ -5,7 +5,6 @@ import { loadDevices } from '../lib/devices/registry.js';
|
|
|
5
5
|
import { readMeta, updateMeta, getDevicePinsPath } from '../lib/state.js';
|
|
6
6
|
import { machineId } from '../lib/machine-id.js';
|
|
7
7
|
import { listBundles, SecretsClientError } from '../lib/secrets-client.js';
|
|
8
|
-
import { listJobs } from '../lib/scheduling/routines.js';
|
|
9
8
|
import { captureFleet } from '../lib/fleet/capture.js';
|
|
10
9
|
function agentsFromPins(names) {
|
|
11
10
|
const self = machineId();
|
|
@@ -58,7 +57,6 @@ async function runCapture(opts) {
|
|
|
58
57
|
defaults,
|
|
59
58
|
agentsByDevice: opts.fromPins ? agentsFromPins(names) : undefined,
|
|
60
59
|
secretsBundles: await captureSecretsBundleNames(),
|
|
61
|
-
routines: listJobs().map((j) => j.name),
|
|
62
60
|
};
|
|
63
61
|
const next = captureFleet(meta.fleet, inputs);
|
|
64
62
|
if (opts.dryRun) {
|
|
@@ -70,13 +68,13 @@ async function runCapture(opts) {
|
|
|
70
68
|
const deviceCount = Object.keys(next.devices === 'all' ? {} : next.devices).length;
|
|
71
69
|
console.log(chalk.green('Captured fleet profile') +
|
|
72
70
|
chalk.gray(` — ${deviceCount} device(s), ${defaults.agents?.length ?? 0} agent(s), ` +
|
|
73
|
-
`${inputs.secretsBundles?.length ?? 0} secret bundle(s)
|
|
71
|
+
`${inputs.secretsBundles?.length ?? 0} secret bundle(s).`));
|
|
74
72
|
console.log(chalk.gray(' Wrote agents.yaml → fleet:. Push it (`agents repo push`) and run `agents fleet apply` on any machine.'));
|
|
75
73
|
}
|
|
76
74
|
export function registerFleetCaptureCommand(devicesCmd) {
|
|
77
75
|
devicesCmd
|
|
78
76
|
.command('capture')
|
|
79
|
-
.description('Snapshot the live environment (roster names, agents, browser, secret-bundle names
|
|
77
|
+
.description('Snapshot the live environment (roster names, agents, browser, secret-bundle names) into agents.yaml fleet:.')
|
|
80
78
|
.option('--dry-run', 'print the fleet: block that would be written, and exit')
|
|
81
79
|
.option('--from-pins', "record THIS machine's pinned agents (peer pins are machine-local and never sync)")
|
|
82
80
|
.option('--device <name>', 'capture a single device')
|
package/dist/commands/focus.d.ts
CHANGED
package/dist/commands/focus.js
CHANGED
|
@@ -29,7 +29,7 @@ import { setHelpSections } from '../lib/help.js';
|
|
|
29
29
|
const INHERITED_FOCUS_OPTIONS = [
|
|
30
30
|
'local', 'device', 'active', 'agent',
|
|
31
31
|
'claude', 'codex', 'kimi', 'antigravity', 'grok', 'opencode',
|
|
32
|
-
'all', 'teams', 'inTeam', '
|
|
32
|
+
'all', 'teams', 'inTeam', 'project', 'skill', 'plugin',
|
|
33
33
|
'since', 'until', 'limit', 'bookmarks', 'unmanaged', 'sort',
|
|
34
34
|
'working', 'idle', 'waiting', 'orphan', 'orphaned', 'crashed',
|
|
35
35
|
'closed', 'abandoned', 'queued', 'unknown',
|
|
@@ -79,7 +79,6 @@ export function registerFocusCommand(program) {
|
|
|
79
79
|
.option('--all', 'Include every directory and all time')
|
|
80
80
|
.option('--teams', 'Include team-spawned sessions')
|
|
81
81
|
.option('--in-team <name>', 'Only one team lineage')
|
|
82
|
-
.option('--routine', 'Only routine-run sessions')
|
|
83
82
|
.option('-p, --project <name>', 'Only a named project')
|
|
84
83
|
.option('--skill <name>', 'Only sessions that invoked this skill')
|
|
85
84
|
.option('--plugin <name>', 'Only sessions that used this plugin')
|
|
@@ -206,7 +205,6 @@ export async function focusAction(id, opts) {
|
|
|
206
205
|
project: opts.project,
|
|
207
206
|
window: opts.since ?? (opts.all || idLookup ? undefined : '30d'),
|
|
208
207
|
until: opts.until,
|
|
209
|
-
routine: opts.routine === true,
|
|
210
208
|
skill: opts.skill,
|
|
211
209
|
plugin: opts.plugin,
|
|
212
210
|
limit: idLookup && limit === 500 ? 5000 : (Number.isFinite(limit) && limit > 0 ? limit : 500),
|
|
@@ -336,7 +334,7 @@ export function dedupeSessionsByLogicalId(rows, self) {
|
|
|
336
334
|
}
|
|
337
335
|
function hasFocusFilters(opts, statuses) {
|
|
338
336
|
return statuses.length > 0 || !!(opts.active || opts.local || opts.device?.length || focusOptionAgent(opts) ||
|
|
339
|
-
opts.all || opts.teams || opts.inTeam || opts.
|
|
337
|
+
opts.all || opts.teams || opts.inTeam || opts.project || opts.skill || opts.plugin ||
|
|
340
338
|
opts.since || opts.until || opts.bookmarks || opts.unmanaged || (opts.sort && opts.sort !== 'recent'));
|
|
341
339
|
}
|
|
342
340
|
function focusSort(value) {
|
|
@@ -2,8 +2,7 @@ import { Command } from 'commander';
|
|
|
2
2
|
import type { ManifestHook } from '../lib/types.js';
|
|
3
3
|
import { type McpYamlConfig } from '../lib/mcp.js';
|
|
4
4
|
import { type PluginResourceGroup } from '../lib/plugins/plugins.js';
|
|
5
|
-
|
|
6
|
-
declare const DRILLABLE_KINDS: readonly ["commands", "skills", "hooks", "mcp", "rules", "plugins", "workflows", "subagents", "routines"];
|
|
5
|
+
declare const DRILLABLE_KINDS: readonly ["commands", "skills", "hooks", "mcp", "rules", "plugins", "workflows", "subagents"];
|
|
7
6
|
type DrillableKind = typeof DRILLABLE_KINDS[number];
|
|
8
7
|
export declare function wrapJoined(prefix: string, items: string[], sep: string, width: number): string[];
|
|
9
8
|
interface ResourceItem {
|
|
@@ -27,7 +26,6 @@ export interface InspectOptions {
|
|
|
27
26
|
plugins?: boolean | string;
|
|
28
27
|
workflows?: boolean | string;
|
|
29
28
|
subagents?: boolean | string;
|
|
30
|
-
routines?: boolean | string;
|
|
31
29
|
command?: string;
|
|
32
30
|
skill?: string;
|
|
33
31
|
hook?: string;
|
|
@@ -35,7 +33,6 @@ export interface InspectOptions {
|
|
|
35
33
|
plugin?: string;
|
|
36
34
|
workflow?: string;
|
|
37
35
|
subagent?: string;
|
|
38
|
-
routine?: string;
|
|
39
36
|
}
|
|
40
37
|
export declare function registerInspectCommand(program: Command): void;
|
|
41
38
|
export interface RepoTarget {
|
|
@@ -45,19 +42,6 @@ export interface RepoTarget {
|
|
|
45
42
|
export declare function resolveRepoTarget(target: string, cwd?: string): RepoTarget | null;
|
|
46
43
|
export declare function inspectRepo(repo: RepoTarget, options: InspectOptions): Promise<void>;
|
|
47
44
|
export declare function collectRepoKind(repo: RepoTarget, kind: DrillableKind): ResourceItem[];
|
|
48
|
-
export interface RoutineLiveState {
|
|
49
|
-
devices: string[];
|
|
50
|
-
materialized: boolean;
|
|
51
|
-
thisDevice: string;
|
|
52
|
-
enabledHere: boolean | null;
|
|
53
|
-
lastStatus: RunMeta['status'] | null;
|
|
54
|
-
lastAt: string | null;
|
|
55
|
-
}
|
|
56
|
-
export declare function compactAge(iso: string | null, now?: Date): string;
|
|
57
|
-
export declare function routineFireLabel(job: JobConfig, now?: Date): string;
|
|
58
|
-
export declare function routineTargetLabel(job: JobConfig): string;
|
|
59
|
-
export declare function routineDescription(job: JobConfig | null, raw: string): string;
|
|
60
|
-
export declare function collectRepoRoutines(repo: RepoTarget, live?: (name: string) => RoutineLiveState, now?: Date): ResourceItem[];
|
|
61
45
|
export declare function pathSize(p: string): {
|
|
62
46
|
bytes: number;
|
|
63
47
|
files: number;
|
|
@@ -92,7 +76,5 @@ export declare function previewFor(kind: DrillableKind, item: ResourceItem, hook
|
|
|
92
76
|
export declare function summarizeHook(hook: ManifestHook): string;
|
|
93
77
|
export declare function summarizeMcp(cfg: McpYamlConfig): string;
|
|
94
78
|
export declare function hookManifestByScript(manifest: Record<string, ManifestHook>): Map<string, ManifestHook>;
|
|
95
|
-
export declare function routineHealthTier(item: ResourceItem): number;
|
|
96
|
-
export declare function routineDarkWarning(items: ResourceItem[]): string | null;
|
|
97
79
|
export declare function hookManifestFromFile(agentsYamlPath: string): Record<string, ManifestHook>;
|
|
98
80
|
export {};
|