@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
|
@@ -10,7 +10,6 @@ interface SessionFilterOptions {
|
|
|
10
10
|
all?: boolean;
|
|
11
11
|
teams?: boolean;
|
|
12
12
|
inTeam?: string;
|
|
13
|
-
routine?: boolean | string;
|
|
14
13
|
since?: string;
|
|
15
14
|
until?: string;
|
|
16
15
|
}
|
|
@@ -29,7 +28,6 @@ export declare function parseAgentFilter(agentName?: string): AgentFilter;
|
|
|
29
28
|
export type SessionSearchScope = {
|
|
30
29
|
agent?: string;
|
|
31
30
|
project?: string;
|
|
32
|
-
routine?: boolean | string;
|
|
33
31
|
};
|
|
34
32
|
interface SessionQueryResolution {
|
|
35
33
|
matches: SessionMeta[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { SESSION_AGENTS, isAgentTmuxAlias,
|
|
2
|
+
import { SESSION_AGENTS, isAgentTmuxAlias, safeTeamText } from '@phnx-labs/sessions-cli/reader';
|
|
3
3
|
import { shortIdFromName } from './active.js';
|
|
4
4
|
import { machineId } from './sync/config.js';
|
|
5
5
|
import { loadLocalActiveSessions, readActiveSessionsCache } from './session-cache.js';
|
|
@@ -238,21 +238,11 @@ export function applyScopeFilters(sessions, scope) {
|
|
|
238
238
|
return true;
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
if (scope.routine) {
|
|
242
|
-
filtered = filtered.filter((session) => session.origin === 'routine');
|
|
243
|
-
if (typeof scope.routine === 'string') {
|
|
244
|
-
const names = [...new Set(filtered.map((session) => session.routineName).filter((name) => !!name))];
|
|
245
|
-
const selected = resolveRoutineName(scope.routine, names);
|
|
246
|
-
filtered = selected
|
|
247
|
-
? filtered.filter((session) => session.routineName === selected)
|
|
248
|
-
: [];
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
241
|
return filtered;
|
|
252
242
|
}
|
|
253
243
|
function scopedContentIndex(sessions, query, scope) {
|
|
254
244
|
const hits = searchContentIndex(sessions, query);
|
|
255
|
-
if (!scope || (!scope.agent && !scope.project
|
|
245
|
+
if (!scope || (!scope.agent && !scope.project))
|
|
256
246
|
return hits;
|
|
257
247
|
const kept = new Map();
|
|
258
248
|
for (const [id, session] of hits) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceDetector } from './types.js';
|
|
2
|
-
export declare const commandsDetectors: Partial<Record<"
|
|
2
|
+
export declare const commandsDetectors: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceDetector>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceDetector } from './types.js';
|
|
2
|
-
export declare const hooksDetectors: Partial<Record<"
|
|
2
|
+
export declare const hooksDetectors: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceDetector>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceDetector } from './types.js';
|
|
2
|
-
export declare const mcpDetectors: Partial<Record<"
|
|
2
|
+
export declare const mcpDetectors: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceDetector>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceDetector } from './types.js';
|
|
2
|
-
export declare const permissionsDetectors: Partial<Record<"
|
|
2
|
+
export declare const permissionsDetectors: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceDetector>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceDetector } from './types.js';
|
|
2
|
-
export declare const pluginsDetectors: Partial<Record<"
|
|
2
|
+
export declare const pluginsDetectors: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceDetector>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceDetector } from './types.js';
|
|
2
|
-
export declare const rulesDetectors: Partial<Record<"
|
|
2
|
+
export declare const rulesDetectors: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceDetector>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ResourceDetector } from './types.js';
|
|
2
2
|
export declare function skillDirsMatch(src: string, dest: string): boolean;
|
|
3
|
-
export declare const skillsDetectors: Partial<Record<"
|
|
3
|
+
export declare const skillsDetectors: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceDetector>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceDetector } from './types.js';
|
|
2
|
-
export declare const subagentsDetectors: Partial<Record<"
|
|
2
|
+
export declare const subagentsDetectors: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceDetector>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceDetector } from './types.js';
|
|
2
|
-
export declare const workflowsDetectors: Partial<Record<"
|
|
2
|
+
export declare const workflowsDetectors: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceDetector>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceWriter } from './types.js';
|
|
2
|
-
export declare const commandsWriters: Partial<Record<"
|
|
2
|
+
export declare const commandsWriters: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceWriter<string[]>>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceWriter } from './types.js';
|
|
2
|
-
export declare const hooksWriters: Partial<Record<"
|
|
2
|
+
export declare const hooksWriters: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceWriter<string[]>>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceWriter } from './types.js';
|
|
2
|
-
export declare const mcpWriters: Partial<Record<"
|
|
2
|
+
export declare const mcpWriters: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceWriter<string[]>>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceWriter } from './types.js';
|
|
2
|
-
export declare const permissionsWriters: Partial<Record<"
|
|
2
|
+
export declare const permissionsWriters: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceWriter<string[]>>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceWriter } from './types.js';
|
|
2
|
-
export declare const pluginsWriters: Partial<Record<"
|
|
2
|
+
export declare const pluginsWriters: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceWriter<string[]>>>;
|
|
@@ -2,4 +2,4 @@ import type { ResourceWriter } from './types.js';
|
|
|
2
2
|
export interface RulesSelection {
|
|
3
3
|
preset: string;
|
|
4
4
|
}
|
|
5
|
-
export declare const rulesWriters: Partial<Record<"
|
|
5
|
+
export declare const rulesWriters: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceWriter<RulesSelection>>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceWriter } from './types.js';
|
|
2
|
-
export declare const skillsWriters: Partial<Record<"
|
|
2
|
+
export declare const skillsWriters: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceWriter<string[]>>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceWriter } from './types.js';
|
|
2
|
-
export declare const subagentsWriters: Partial<Record<"
|
|
2
|
+
export declare const subagentsWriters: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceWriter<string[]>>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ResourceWriter } from './types.js';
|
|
2
|
-
export declare const workflowsWriters: Partial<Record<"
|
|
2
|
+
export declare const workflowsWriters: Partial<Record<"codex" | "antigravity" | "cursor" | "claude" | "opencode" | "openclaw" | "copilot" | "amp" | "goose" | "grok" | "kimi" | "droid" | "hermes" | "muse" | "warp", ResourceWriter<string[]>>>;
|
|
@@ -2,7 +2,7 @@ const LOADED_COMMAND_NAMES = [
|
|
|
2
2
|
'accounts', 'auth', 'view', 'inspect', 'commands', 'hooks', 'skills', 'rules', 'memory',
|
|
3
3
|
'permissions', 'mcp', 'clis', 'subagents', 'plugins', 'workflows', 'add', 'use',
|
|
4
4
|
'remove', 'rm', 'purge', 'update', 'prune', 'import',
|
|
5
|
-
'
|
|
5
|
+
'projects', 'run', '_callback', 'open', 'fork', 'config',
|
|
6
6
|
'models', 'doctor',
|
|
7
7
|
'harness', 'harnesses', 'menubar', 'sync',
|
|
8
8
|
'refresh-rules', 'factory', 'insights', 'trace',
|
|
@@ -12,13 +12,16 @@ const LOADED_COMMAND_NAMES = [
|
|
|
12
12
|
'daemon', 'recordings',
|
|
13
13
|
];
|
|
14
14
|
const INLINE_COMMAND_NAMES = [
|
|
15
|
-
'perms', 'exec', '
|
|
15
|
+
'perms', 'exec', 'check', 'resources', 'hq', '_internal',
|
|
16
16
|
];
|
|
17
17
|
export const KNOWN_TOP_LEVEL_COMMANDS = new Set([
|
|
18
18
|
...LOADED_COMMAND_NAMES,
|
|
19
19
|
...INLINE_COMMAND_NAMES,
|
|
20
20
|
]);
|
|
21
21
|
export const RETIRED_TOP_LEVEL_COMMANDS = new Set([
|
|
22
|
+
'routines',
|
|
23
|
+
'jobs',
|
|
24
|
+
'cron',
|
|
22
25
|
'webhook',
|
|
23
26
|
'org',
|
|
24
27
|
'serve',
|
package/dist/lib/state.d.ts
CHANGED
|
@@ -54,11 +54,8 @@ export declare function getUserPromptcutsPath(): string;
|
|
|
54
54
|
export declare function getHomeDir(): string;
|
|
55
55
|
export declare function getHistoryDir(): string;
|
|
56
56
|
export declare function getCacheDir(): string;
|
|
57
|
-
export declare function getRoutinesDir(): string;
|
|
58
57
|
export declare function getProjectsDir(): string;
|
|
59
58
|
export declare function getDaemonConfigDir(): string;
|
|
60
|
-
export declare function getSystemRoutinesDir(): string;
|
|
61
|
-
export declare function getProjectRoutinesDir(cwd?: string): string | null;
|
|
62
59
|
export declare function getRunsDir(): string;
|
|
63
60
|
export declare function getMailboxRootDir(): string;
|
|
64
61
|
export declare function getFeedDir(): string;
|
package/dist/lib/state.js
CHANGED
|
@@ -31,13 +31,11 @@ const SYSTEM_PERMISSIONS_DIR = path.join(SYSTEM_AGENTS_DIR, 'permissions');
|
|
|
31
31
|
const SYSTEM_SUBAGENTS_DIR = path.join(SYSTEM_AGENTS_DIR, 'subagents');
|
|
32
32
|
const SYSTEM_WORKFLOWS_DIR = path.join(SYSTEM_AGENTS_DIR, 'workflows');
|
|
33
33
|
const SYSTEM_PLUGINS_DIR = path.join(SYSTEM_AGENTS_DIR, 'plugins');
|
|
34
|
-
const SYSTEM_ROUTINES_DIR = path.join(SYSTEM_AGENTS_DIR, 'routines');
|
|
35
34
|
const SYSTEM_PROMPTCUTS_FILE = path.join(SYSTEM_AGENTS_DIR, 'hooks', 'promptcuts.yaml');
|
|
36
35
|
const SYSTEM_MCP_CONFIG_FILE = path.join(SYSTEM_AGENTS_DIR, 'mcp.json');
|
|
37
36
|
const SYSTEM_INSTRUCTIONS_FILE = path.join(SYSTEM_AGENTS_DIR, 'instructions.md');
|
|
38
37
|
const HISTORY_DIR = path.join(USER_AGENTS_DIR, '.history');
|
|
39
38
|
const CACHE_DIR = path.join(USER_AGENTS_DIR, '.cache');
|
|
40
|
-
const ROUTINES_DIR = path.join(USER_AGENTS_DIR, 'routines');
|
|
41
39
|
const TEAMS_DIR = path.join(USER_AGENTS_DIR, 'teams');
|
|
42
40
|
const PROJECTS_DIR = path.join(USER_AGENTS_DIR, 'projects');
|
|
43
41
|
const DAEMON_CONFIG_DIR = path.join(USER_AGENTS_DIR, 'daemon');
|
|
@@ -255,16 +253,8 @@ export function getUserPromptcutsPath() { return USER_PROMPTCUTS_FILE; }
|
|
|
255
253
|
export function getHomeDir() { return HOME; }
|
|
256
254
|
export function getHistoryDir() { return HISTORY_DIR; }
|
|
257
255
|
export function getCacheDir() { return CACHE_DIR; }
|
|
258
|
-
export function getRoutinesDir() { return process.env.AGENTS_ROUTINES_DIR ?? ROUTINES_DIR; }
|
|
259
256
|
export function getProjectsDir() { return process.env.AGENTS_PROJECTS_DIR ?? PROJECTS_DIR; }
|
|
260
257
|
export function getDaemonConfigDir() { return process.env.AGENTS_DAEMON_CONFIG_DIR ?? DAEMON_CONFIG_DIR; }
|
|
261
|
-
export function getSystemRoutinesDir() { return process.env.AGENTS_SYSTEM_ROUTINES_DIR ?? SYSTEM_ROUTINES_DIR; }
|
|
262
|
-
export function getProjectRoutinesDir(cwd = process.cwd()) {
|
|
263
|
-
const projectAgentsDir = getProjectAgentsDir(cwd);
|
|
264
|
-
if (!projectAgentsDir)
|
|
265
|
-
return null;
|
|
266
|
-
return path.join(projectAgentsDir, 'routines');
|
|
267
|
-
}
|
|
268
258
|
export function getRunsDir() { return RUNS_DIR; }
|
|
269
259
|
export function getMailboxRootDir() { return MAILBOX_DIR; }
|
|
270
260
|
export function getFeedDir() { return FEED_DIR; }
|
|
@@ -376,8 +366,6 @@ export function ensureAgentsDir() {
|
|
|
376
366
|
fs.mkdirSync(CACHE_DIR, opts);
|
|
377
367
|
if (!fs.existsSync(PACKAGES_DIR))
|
|
378
368
|
fs.mkdirSync(PACKAGES_DIR, opts);
|
|
379
|
-
if (!fs.existsSync(ROUTINES_DIR))
|
|
380
|
-
fs.mkdirSync(ROUTINES_DIR, opts);
|
|
381
369
|
if (!fs.existsSync(RUNS_DIR))
|
|
382
370
|
fs.mkdirSync(RUNS_DIR, opts);
|
|
383
371
|
if (!fs.existsSync(VERSIONS_DIR))
|
|
@@ -514,7 +502,6 @@ const BESPOKE_DEVICE_KEYS = [
|
|
|
514
502
|
'agents',
|
|
515
503
|
'isolatedAgents',
|
|
516
504
|
'versions',
|
|
517
|
-
'deviceRoutines',
|
|
518
505
|
'deviceConfig',
|
|
519
506
|
'deviceBrowser',
|
|
520
507
|
'deviceFleet',
|
|
@@ -536,6 +523,7 @@ const BESPOKE_DEVICE_KEY_SET = new Set([
|
|
|
536
523
|
const BESPOKE_DEVICE_DOC_KEYS = new Set([
|
|
537
524
|
'agents',
|
|
538
525
|
'isolatedAgents',
|
|
526
|
+
// A device doc written before routines were removed may still carry `routines:`; skip it rather than merge it into meta.
|
|
539
527
|
'routines',
|
|
540
528
|
'config',
|
|
541
529
|
'browser',
|
|
@@ -621,14 +609,13 @@ function serializeCentral(central) {
|
|
|
621
609
|
return healMetaHeader(stringifyDoc(doc));
|
|
622
610
|
}
|
|
623
611
|
export function writeMetaUnlocked(meta) {
|
|
624
|
-
const writesDeviceRoutines = Object.prototype.hasOwnProperty.call(meta, 'deviceRoutines');
|
|
625
612
|
const writesDeviceConfig = Object.prototype.hasOwnProperty.call(meta, 'deviceConfig');
|
|
626
613
|
const writesDeviceBrowser = Object.prototype.hasOwnProperty.call(meta, 'deviceBrowser');
|
|
627
614
|
const writesDeviceFleet = Object.prototype.hasOwnProperty.call(meta, 'deviceFleet');
|
|
628
615
|
const writesDeviceHosts = Object.prototype.hasOwnProperty.call(meta, 'deviceHosts');
|
|
629
616
|
const writesDeviceAccounts = Object.prototype.hasOwnProperty.call(meta, 'deviceAccounts');
|
|
630
617
|
const writesProjectRoot = Object.prototype.hasOwnProperty.call(meta, 'projectRoot');
|
|
631
|
-
const { agents, isolatedAgents, versions,
|
|
618
|
+
const { agents, isolatedAgents, versions, deviceConfig, deviceBrowser, deviceFleet, deviceHosts, deviceAccounts, projectRoot, ...central } = meta;
|
|
632
619
|
const hasAgents = !!agents && Object.keys(agents).length > 0;
|
|
633
620
|
const hasIsolatedAgents = !!isolatedAgents && Object.keys(isolatedAgents).length > 0;
|
|
634
621
|
const pinsPath = getDevicePinsPath();
|
|
@@ -657,10 +644,6 @@ export function writeMetaUnlocked(meta) {
|
|
|
657
644
|
}
|
|
658
645
|
delete doc.agents;
|
|
659
646
|
delete doc.isolatedAgents;
|
|
660
|
-
if (Array.isArray(deviceRoutines))
|
|
661
|
-
doc.routines = deviceRoutines;
|
|
662
|
-
else if (writesDeviceRoutines)
|
|
663
|
-
delete doc.routines;
|
|
664
647
|
const hasDeviceConfig = !!deviceConfig && Object.keys(deviceConfig).length > 0;
|
|
665
648
|
if (hasDeviceConfig)
|
|
666
649
|
doc.config = deviceConfig;
|
|
@@ -834,12 +817,6 @@ function overlayMachineLocal(meta) {
|
|
|
834
817
|
if (native || bindings || homes || pendingConnects || slots)
|
|
835
818
|
meta.deviceAccounts = { ...(native ? { native } : {}), ...(bindings ? { bindings } : {}), ...(homes ? { homes } : {}), ...(pendingConnects ? { pendingConnects } : {}), ...(slots ? { slots } : {}) };
|
|
836
819
|
}
|
|
837
|
-
if (Object.prototype.hasOwnProperty.call(dm, 'routines')) {
|
|
838
|
-
if (!Array.isArray(dm.routines) || dm.routines.some((name) => typeof name !== 'string')) {
|
|
839
|
-
throw new Error(`Device config corrupted at ${devicePath}: routines must be a string list.`);
|
|
840
|
-
}
|
|
841
|
-
meta.deviceRoutines = dm.routines;
|
|
842
|
-
}
|
|
843
820
|
for (const [k, v] of Object.entries(dm)) {
|
|
844
821
|
if (BESPOKE_DEVICE_DOC_KEYS.has(k))
|
|
845
822
|
continue;
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -473,7 +473,6 @@ export interface Meta {
|
|
|
473
473
|
hooks?: Record<string, ManifestHook>;
|
|
474
474
|
deviceBrowser?: Record<string, BrowserProfileConfig>;
|
|
475
475
|
config?: Record<string, unknown>;
|
|
476
|
-
deviceRoutines?: string[];
|
|
477
476
|
deviceConfig?: Record<string, unknown>;
|
|
478
477
|
hosts?: Record<string, HostEntry>;
|
|
479
478
|
deviceHosts?: Record<string, HostEntry>;
|
|
@@ -314,8 +314,6 @@ export async function runWatchdogTick(opts = {}) {
|
|
|
314
314
|
status: session.status,
|
|
315
315
|
startedAtMs: session.startedAtMs,
|
|
316
316
|
lastActivityMs: session.lastActivityMs,
|
|
317
|
-
origin: session.origin,
|
|
318
|
-
routineName: session.routineName,
|
|
319
317
|
machine: session.machine ?? session.provenance?.host,
|
|
320
318
|
owner: session.owner,
|
|
321
319
|
policy,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phnx-labs/agents-cli",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.29",
|
|
4
4
|
"description": "One CLI for all your AI coding agents - versions, config, cloud dispatch, sessions, and teams (now with first-class Grok Build CLI support)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
package/scripts/postinstall.js
CHANGED
|
@@ -311,9 +311,9 @@ async function healLongRunningProcesses() {
|
|
|
311
311
|
d.stopDaemon?.();
|
|
312
312
|
if (enabled) {
|
|
313
313
|
d.startDaemon?.(AGENTS_BIN);
|
|
314
|
-
console.log(' Restarted the
|
|
314
|
+
console.log(' Restarted the agents daemon onto this version.');
|
|
315
315
|
} else {
|
|
316
|
-
console.log(' Stopped the
|
|
316
|
+
console.log(' Stopped the agents daemon (daemon.enabled=false — not restarted).');
|
|
317
317
|
}
|
|
318
318
|
} else if (enabled) {
|
|
319
319
|
d.startDaemon?.(AGENTS_BIN);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Command } from 'commander';
|
|
2
|
-
export { buildRoutineListJson } from '../lib/scheduling/routines.js';
|
|
3
|
-
import type { JobConfig, RunMeta } from '../lib/scheduling/routines.js';
|
|
4
|
-
export declare function formatRunDuration(startedAt: string, completedAt: string | null): string;
|
|
5
|
-
interface RoutineListGroup {
|
|
6
|
-
key: string;
|
|
7
|
-
title: string;
|
|
8
|
-
jobs: JobConfig[];
|
|
9
|
-
local: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function groupRoutineJobsByProject(jobs: JobConfig[], knownProjectNames: Set<string>): RoutineListGroup[];
|
|
12
|
-
export declare function buildRunsJson(runs: RunMeta[]): Record<string, unknown>[];
|
|
13
|
-
export declare function runFailureReason(run: RunMeta): string | null;
|
|
14
|
-
export declare function registerRoutinesCommands(program: Command): void;
|