@phnx-labs/agents-cli 1.23.13 → 1.23.15
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 +47 -0
- package/README.md +30 -59
- package/dist/cli/command-registry.js +0 -24
- package/dist/commands/accounts.js +3 -3
- package/dist/commands/daemon.js +5 -147
- package/dist/commands/doctor.js +7 -0
- package/dist/commands/events-logs.d.ts +2 -0
- package/dist/commands/{logs.js → events-logs.js} +28 -127
- package/dist/commands/events.js +3 -1
- package/dist/commands/exec.d.ts +0 -1
- package/dist/commands/exec.js +3 -11
- package/dist/commands/feed.d.ts +1 -1
- package/dist/commands/feed.js +4 -7
- package/dist/commands/mcp.js +1 -1
- package/dist/commands/menubar.js +12 -226
- package/dist/commands/projects.js +1 -2
- package/dist/commands/{trash.d.ts → prune-trash.d.ts} +1 -1
- package/dist/commands/{trash.js → prune-trash.js} +8 -8
- package/dist/commands/prune.js +3 -1
- package/dist/commands/send.js +2 -5
- package/dist/commands/sessions.js +1 -1
- package/dist/commands/ssh.js +2 -2
- package/dist/commands/utils.d.ts +1 -5
- package/dist/commands/utils.js +1 -7
- package/dist/lib/agent-spec/agents.d.ts +0 -2
- package/dist/lib/agent-spec/agents.js +0 -12
- package/dist/lib/agent-spec/index.d.ts +0 -4
- package/dist/lib/agent-spec/index.js +0 -4
- package/dist/lib/commands.d.ts +1 -5
- package/dist/lib/commands.js +2 -69
- package/dist/lib/comms-render.d.ts +0 -7
- package/dist/lib/comms-render.js +0 -41
- package/dist/lib/config-keys.d.ts +1 -1
- package/dist/lib/config-keys.js +8 -0
- package/dist/lib/daemon/daemon.js +1 -6
- package/dist/lib/daemon-services.d.ts +1 -1
- package/dist/lib/daemon-services.js +0 -5
- package/dist/lib/device-config.d.ts +2 -0
- package/dist/lib/device-config.js +81 -8
- package/dist/lib/devices/doctor-findings.d.ts +6 -1
- package/dist/lib/devices/doctor-findings.js +34 -1
- package/dist/lib/git.d.ts +1 -0
- package/dist/lib/git.js +5 -0
- package/dist/lib/hooks/install.d.ts +0 -7
- package/dist/lib/hooks/install.js +0 -55
- package/dist/lib/hosts/passthrough.js +2 -4
- package/dist/lib/hosts/progress.js +2 -2
- package/dist/lib/hosts/remote-cmd.js +0 -1
- package/dist/lib/installations/migrate.d.ts +1 -0
- package/dist/lib/installations/migrate.js +18 -1
- package/dist/lib/installations/versions.js +2 -2
- package/dist/lib/loop.js +1 -1
- package/dist/lib/mailbox-target.d.ts +0 -31
- package/dist/lib/mailbox-target.js +0 -37
- package/dist/lib/mcp-lookup.d.ts +7 -0
- package/dist/lib/mcp-lookup.js +71 -0
- package/dist/lib/mcp.d.ts +0 -8
- package/dist/lib/mcp.js +0 -47
- package/dist/lib/menubar/install-menubar.d.ts +0 -15
- package/dist/lib/menubar/install-menubar.js +24 -118
- package/dist/lib/menubar/resolve-version.d.ts +9 -10
- package/dist/lib/menubar/resolve-version.js +70 -30
- package/dist/lib/paths.d.ts +0 -1
- package/dist/lib/paths.js +0 -18
- package/dist/lib/plugins/skills.d.ts +0 -10
- package/dist/lib/plugins/skills.js +2 -165
- package/dist/lib/project-pull.js +1 -2
- package/dist/lib/resources.d.ts +1 -1
- package/dist/lib/routines-project.js +1 -1
- package/dist/lib/session/local-tmux-attach.js +2 -2
- package/dist/lib/startup/command-registry.js +20 -7
- package/dist/lib/teams/agents.js +1 -1
- package/dist/lib/teams/placement-probe.d.ts +9 -0
- package/dist/lib/teams/placement-probe.js +20 -15
- package/dist/lib/triggers/webhook.d.ts +2 -59
- package/dist/lib/triggers/webhook.js +2 -422
- package/package.json +2 -1
- package/dist/commands/funnel.d.ts +0 -2
- package/dist/commands/funnel.js +0 -77
- package/dist/commands/logs.d.ts +0 -2
- package/dist/commands/mailboxes.d.ts +0 -2
- package/dist/commands/mailboxes.js +0 -400
- package/dist/commands/message.d.ts +0 -2
- package/dist/commands/message.js +0 -259
- package/dist/commands/packages-materialize.d.ts +0 -6
- package/dist/commands/packages-materialize.js +0 -90
- package/dist/commands/packages.d.ts +0 -5
- package/dist/commands/packages.js +0 -763
- package/dist/commands/route.d.ts +0 -2
- package/dist/commands/route.js +0 -259
- package/dist/commands/testdata/feed-hub.d.ts +0 -1
- package/dist/commands/testdata/feed-hub.js +0 -11
- package/dist/commands/tmux.d.ts +0 -7
- package/dist/commands/tmux.js +0 -529
- package/dist/commands/traces.d.ts +0 -2
- package/dist/commands/traces.js +0 -204
- package/dist/commands/webhook.d.ts +0 -5
- package/dist/commands/webhook.js +0 -105
- package/dist/lib/agent-spec/materialize.d.ts +0 -3
- package/dist/lib/agent-spec/materialize.js +0 -277
- package/dist/lib/agent-spec/package-resolve.d.ts +0 -4
- package/dist/lib/agent-spec/package-resolve.js +0 -231
- package/dist/lib/agent-spec/package-schema.d.ts +0 -3
- package/dist/lib/agent-spec/package-schema.js +0 -136
- package/dist/lib/agent-spec/package-types.d.ts +0 -94
- package/dist/lib/agent-spec/package-types.js +0 -10
- package/dist/lib/daemon/testdata/process-view-daemon.d.ts +0 -1
- package/dist/lib/daemon/testdata/process-view-daemon.js +0 -12
- package/dist/lib/daemon/testdata/process-view-start.d.ts +0 -1
- package/dist/lib/daemon/testdata/process-view-start.js +0 -41
- package/dist/lib/daemon/webhook-receiver-service.d.ts +0 -8
- package/dist/lib/daemon/webhook-receiver-service.js +0 -16
- package/dist/lib/daemon-webhooks.d.ts +0 -48
- package/dist/lib/daemon-webhooks.js +0 -177
- package/dist/lib/funnel.d.ts +0 -6
- package/dist/lib/funnel.js +0 -31
- package/dist/lib/net-close.d.ts +0 -2
- package/dist/lib/net-close.js +0 -20
- package/dist/lib/packages/output-home.d.ts +0 -9
- package/dist/lib/packages/output-home.js +0 -89
- package/dist/lib/registry.d.ts +0 -65
- package/dist/lib/registry.js +0 -432
- package/dist/lib/routers.d.ts +0 -25
- package/dist/lib/routers.js +0 -122
- package/dist/lib/run-trace-sync.d.ts +0 -7
- package/dist/lib/run-trace-sync.js +0 -35
- package/dist/lib/session/testdata/pid-registry-namespace.d.ts +0 -1
- package/dist/lib/session/testdata/pid-registry-namespace.js +0 -25
- package/dist/lib/session/testdata/process-view-namespace.d.ts +0 -1
- package/dist/lib/session/testdata/process-view-namespace.js +0 -56
- package/dist/lib/session/testdata/process-view-private.d.ts +0 -1
- package/dist/lib/session/testdata/process-view-private.js +0 -11
- package/dist/lib/testdata/daemon-health-writer.d.ts +0 -1
- package/dist/lib/testdata/daemon-health-writer.js +0 -8
- package/dist/lib/testdata/owner-notify-api.d.ts +0 -23
- package/dist/lib/testdata/owner-notify-api.js +0 -82
- package/dist/lib/testdata/refresh-coordinator-worker.d.ts +0 -1
- package/dist/lib/testdata/refresh-coordinator-worker.js +0 -23
- package/dist/lib/traces/backend.d.ts +0 -8
- package/dist/lib/traces/backend.js +0 -33
- package/dist/lib/traces/classify.d.ts +0 -40
- package/dist/lib/traces/classify.js +0 -70
- package/dist/lib/traces/config.d.ts +0 -2
- package/dist/lib/traces/config.js +0 -2
- package/dist/lib/traces/insights.d.ts +0 -30
- package/dist/lib/traces/insights.js +0 -198
- package/dist/lib/traces/phenotype.d.ts +0 -18
- package/dist/lib/traces/phenotype.js +0 -335
- package/dist/lib/traces/provision.d.ts +0 -16
- package/dist/lib/traces/provision.js +0 -25
- package/dist/lib/traces/schema2-build.d.ts +0 -28
- package/dist/lib/traces/schema2-build.js +0 -496
- package/dist/lib/traces/schema2-danger.d.ts +0 -7
- package/dist/lib/traces/schema2-danger.js +0 -123
- package/dist/lib/traces/schema2.d.ts +0 -139
- package/dist/lib/traces/schema2.js +0 -20
- package/dist/lib/traces/segments.d.ts +0 -73
- package/dist/lib/traces/segments.js +0 -236
- package/dist/lib/traces/sync.d.ts +0 -197
- package/dist/lib/traces/sync.js +0 -654
- package/dist/lib/traces/worker-template.d.ts +0 -1
- package/dist/lib/traces/worker-template.js +0 -292
- package/dist/lib/triggers/handlers.d.ts +0 -66
- package/dist/lib/triggers/handlers.js +0 -383
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { die, isJsonMode } from '../lib/format.js';
|
|
3
|
-
import { setHelpSections } from '../lib/help.js';
|
|
4
|
-
import { resolveAgentPackage, materializeAgentPackage, AgentPackageError, } from '../lib/agent-spec/index.js';
|
|
5
|
-
import { MaterializeGuardError, PORTABLE_HARNESSES, assertExactHarnessVersion, assertPortableHarness, resolveOutputHome, } from '../lib/packages/output-home.js';
|
|
6
|
-
export { PORTABLE_HARNESSES };
|
|
7
|
-
function printReceipt(receipt, outputHome) {
|
|
8
|
-
console.log(chalk.bold(`Materialized ${receipt.agent.ref} → ${receipt.harness.id}@${receipt.harness.version}`));
|
|
9
|
-
console.log(` digest ${receipt.agent.digest}`);
|
|
10
|
-
console.log(` output home ${outputHome}`);
|
|
11
|
-
for (const entry of receipt.resources) {
|
|
12
|
-
console.log(` ${entry.kind.padEnd(12)} ${entry.name} → ${entry.target}`);
|
|
13
|
-
}
|
|
14
|
-
if (receipt.warnings.length > 0) {
|
|
15
|
-
console.log(chalk.yellow(' warnings'));
|
|
16
|
-
for (const warning of receipt.warnings)
|
|
17
|
-
console.log(chalk.yellow(` ${warning}`));
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function fail(err, json) {
|
|
21
|
-
if (err instanceof MaterializeGuardError || err instanceof AgentPackageError) {
|
|
22
|
-
die(err.message, 1, { json });
|
|
23
|
-
}
|
|
24
|
-
die(err instanceof Error ? err.message : String(err), 1, { json });
|
|
25
|
-
}
|
|
26
|
-
export function registerPortablePackageCommands(program) {
|
|
27
|
-
const packagesCmd = program
|
|
28
|
-
.command('packages')
|
|
29
|
-
.description('Portable agent packages — materialize schema-v3 agent.yaml into an ephemeral harness home');
|
|
30
|
-
setHelpSections(packagesCmd, {
|
|
31
|
-
examples: `
|
|
32
|
-
# Materialize a package into an ephemeral Claude home
|
|
33
|
-
agents packages materialize ./reviewer --harness claude --harness-version 2.1.0 --output-home /tmp/reviewer-claude
|
|
34
|
-
|
|
35
|
-
# Machine-readable receipt for Factory / Prix Cloud
|
|
36
|
-
agents packages materialize ./reviewer --harness codex --harness-version 0.42.0 --output-home "$OUTPUT_HOME" --json
|
|
37
|
-
|
|
38
|
-
# OpenCode worker on a Factory box
|
|
39
|
-
agents packages materialize ./reviewer --harness opencode --harness-version 1.0.0 --output-home "$OUTPUT_HOME" --json
|
|
40
|
-
`,
|
|
41
|
-
notes: `
|
|
42
|
-
Materialize writes only under --output-home. It never mutates ~/.claude,
|
|
43
|
-
~/.codex, or ~/.opencode, never copies secrets, and never execs a harness.
|
|
44
|
-
|
|
45
|
-
Factory usage: point --output-home at the worker's ephemeral home and pass
|
|
46
|
-
--json so the orchestrator can read the receipt (agent ref + digest,
|
|
47
|
-
harness, per-resource targets, warnings).
|
|
48
|
-
`,
|
|
49
|
-
});
|
|
50
|
-
const materializeCmd = packagesCmd
|
|
51
|
-
.command('materialize <package>')
|
|
52
|
-
.description('Materialize a schema-v3 agent.yaml package into an ephemeral Claude, Codex, or OpenCode home')
|
|
53
|
-
.requiredOption('--harness <id>', `Target harness: ${PORTABLE_HARNESSES.join(', ')}`)
|
|
54
|
-
.requiredOption('--harness-version <version>', 'Exact harness version to gate capabilities and stamp on the receipt (not --version: that is the CLI version flag)')
|
|
55
|
-
.requiredOption('--output-home <dir>', 'Ephemeral home to write into (must not escape or target the live user home)')
|
|
56
|
-
.option('--json', 'Emit the materialization receipt as JSON')
|
|
57
|
-
.action((pkg, opts) => {
|
|
58
|
-
const json = isJsonMode(opts);
|
|
59
|
-
try {
|
|
60
|
-
const harness = assertPortableHarness(opts.harness);
|
|
61
|
-
const harnessVersion = assertExactHarnessVersion(opts.harnessVersion);
|
|
62
|
-
const outputHome = resolveOutputHome(opts.outputHome);
|
|
63
|
-
const resolved = resolveAgentPackage(pkg);
|
|
64
|
-
const receipt = materializeAgentPackage(resolved, { harness, harnessVersion, outputHome });
|
|
65
|
-
if (json) {
|
|
66
|
-
console.log(JSON.stringify(receipt, null, 2));
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
printReceipt(receipt, outputHome);
|
|
70
|
-
}
|
|
71
|
-
catch (err) {
|
|
72
|
-
fail(err, json);
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
setHelpSections(materializeCmd, {
|
|
76
|
-
examples: `
|
|
77
|
-
agents packages materialize ./reviewer --harness claude --harness-version 2.1.0 --output-home /tmp/reviewer-claude
|
|
78
|
-
agents packages materialize ./reviewer --harness codex --harness-version 0.42.0 --output-home "$OUTPUT_HOME" --json
|
|
79
|
-
agents packages materialize ./reviewer --harness opencode --harness-version 1.0.0 --output-home "$OUTPUT_HOME" --json
|
|
80
|
-
`,
|
|
81
|
-
notes: `
|
|
82
|
-
Factory / Prix Cloud: materialize into the worker's ephemeral home, then
|
|
83
|
-
exec the harness with HOME=$OUTPUT_HOME. The --json receipt is the handoff.
|
|
84
|
-
|
|
85
|
-
Supported harnesses: claude, codex, opencode. Any other id fails as an
|
|
86
|
-
unsupported capability. A package must be a directory containing agent.yaml
|
|
87
|
-
with schema_version: 3 and an execution block declaring the harness.
|
|
88
|
-
`,
|
|
89
|
-
});
|
|
90
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Command } from 'commander';
|
|
2
|
-
import type { McpPackage } from '../lib/types.js';
|
|
3
|
-
import { type McpCommandSpec } from '../lib/mcp.js';
|
|
4
|
-
export declare function buildMcpPackageCommand(pkg: McpPackage): McpCommandSpec;
|
|
5
|
-
export declare function registerPackagesCommands(program: Command): void;
|