@phnx-labs/agents-cli 1.19.2 → 1.20.3
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 +140 -0
- package/README.md +72 -12
- package/dist/browser.js +0 -0
- package/dist/commands/browser.js +88 -16
- package/dist/commands/cli.d.ts +14 -0
- package/dist/commands/cli.js +244 -0
- package/dist/commands/cloud.js +1 -1
- package/dist/commands/commands.js +27 -10
- package/dist/commands/computer.js +18 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +2 -2
- package/dist/commands/exec.js +38 -18
- package/dist/commands/factory.d.ts +3 -14
- package/dist/commands/factory.js +3 -3
- package/dist/commands/feedback.d.ts +7 -0
- package/dist/commands/feedback.js +89 -0
- package/dist/commands/helper.d.ts +12 -0
- package/dist/commands/helper.js +87 -0
- package/dist/commands/hooks.js +89 -10
- package/dist/commands/mcp.js +166 -10
- package/dist/commands/packages.js +196 -27
- package/dist/commands/permissions.js +21 -6
- package/dist/commands/plugins.js +11 -4
- package/dist/commands/profiles.d.ts +8 -0
- package/dist/commands/profiles.js +118 -5
- package/dist/commands/prune.js +39 -160
- package/dist/commands/pull.js +58 -5
- package/dist/commands/routines.js +107 -14
- package/dist/commands/rules.js +8 -4
- package/dist/commands/secrets-migrate.d.ts +24 -0
- package/dist/commands/secrets-migrate.js +198 -0
- package/dist/commands/secrets-sync.d.ts +11 -0
- package/dist/commands/secrets-sync.js +155 -0
- package/dist/commands/secrets.js +79 -46
- package/dist/commands/sessions.d.ts +28 -0
- package/dist/commands/sessions.js +98 -33
- package/dist/commands/setup.d.ts +1 -0
- package/dist/commands/setup.js +37 -28
- package/dist/commands/skills.js +25 -8
- package/dist/commands/subagents.js +69 -49
- package/dist/commands/teams.js +61 -10
- package/dist/commands/utils.d.ts +33 -0
- package/dist/commands/utils.js +139 -0
- package/dist/commands/versions.d.ts +4 -3
- package/dist/commands/versions.js +134 -130
- package/dist/commands/view.d.ts +6 -0
- package/dist/commands/view.js +175 -19
- package/dist/commands/workflows.js +29 -6
- package/dist/computer.js +0 -0
- package/dist/index.js +38 -6
- package/dist/lib/acp/client.js +6 -1
- package/dist/lib/acp/harnesses.js +8 -0
- package/dist/lib/agents.d.ts +4 -0
- package/dist/lib/agents.js +125 -34
- package/dist/lib/auto-pull-worker.js +18 -1
- package/dist/lib/browser/cdp.d.ts +8 -1
- package/dist/lib/browser/cdp.js +40 -3
- package/dist/lib/browser/chrome.d.ts +13 -0
- package/dist/lib/browser/chrome.js +46 -3
- package/dist/lib/browser/domain-skills.d.ts +51 -0
- package/dist/lib/browser/domain-skills.js +157 -0
- package/dist/lib/browser/drivers/local.js +45 -4
- package/dist/lib/browser/drivers/ssh.js +2 -2
- package/dist/lib/browser/ipc.d.ts +8 -1
- package/dist/lib/browser/ipc.js +37 -28
- package/dist/lib/browser/profiles.d.ts +16 -3
- package/dist/lib/browser/profiles.js +44 -4
- package/dist/lib/browser/service.d.ts +3 -0
- package/dist/lib/browser/service.js +40 -5
- package/dist/lib/browser/types.d.ts +11 -4
- package/dist/lib/cli-resources.d.ts +137 -0
- package/dist/lib/cli-resources.js +477 -0
- package/dist/lib/cloud/factory.d.ts +1 -1
- package/dist/lib/cloud/factory.js +1 -1
- package/dist/lib/cloud/rush.js +5 -5
- package/dist/lib/command-skills.js +0 -2
- package/dist/lib/computer-rpc.d.ts +3 -0
- package/dist/lib/computer-rpc.js +53 -0
- package/dist/lib/daemon.js +20 -0
- package/dist/lib/events.d.ts +16 -2
- package/dist/lib/events.js +33 -2
- package/dist/lib/exec.d.ts +42 -13
- package/dist/lib/exec.js +127 -33
- package/dist/lib/help.js +11 -5
- package/dist/lib/hooks/cache.d.ts +38 -0
- package/dist/lib/hooks/cache.js +242 -0
- package/dist/lib/hooks/profile.d.ts +33 -0
- package/dist/lib/hooks/profile.js +129 -0
- package/dist/lib/hooks.d.ts +0 -10
- package/dist/lib/hooks.js +246 -11
- package/dist/lib/mcp.d.ts +15 -0
- package/dist/lib/mcp.js +46 -0
- package/dist/lib/migrate.js +1 -1
- package/dist/lib/overdue.d.ts +26 -0
- package/dist/lib/overdue.js +101 -0
- package/dist/lib/permissions.d.ts +13 -0
- package/dist/lib/permissions.js +55 -1
- package/dist/lib/plugin-marketplace.js +1 -1
- package/dist/lib/plugins.js +15 -1
- package/dist/lib/profiles-presets.d.ts +26 -0
- package/dist/lib/profiles-presets.js +216 -0
- package/dist/lib/profiles.d.ts +34 -0
- package/dist/lib/profiles.js +112 -1
- package/dist/lib/resources/mcp.js +37 -0
- package/dist/lib/resources.d.ts +1 -1
- package/dist/lib/rotate.js +10 -4
- package/dist/lib/routines-format.d.ts +47 -0
- package/dist/lib/routines-format.js +194 -0
- package/dist/lib/routines.d.ts +8 -2
- package/dist/lib/routines.js +34 -14
- package/dist/lib/runner.js +83 -15
- package/dist/lib/scheduler.js +8 -1
- 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/_CodeSignature/CodeResources +1 -9
- package/dist/lib/secrets/bundles.d.ts +34 -17
- package/dist/lib/secrets/bundles.js +210 -36
- package/dist/lib/secrets/index.d.ts +49 -30
- package/dist/lib/secrets/index.js +126 -115
- package/dist/lib/secrets/install-helper.d.ts +45 -0
- package/dist/lib/secrets/install-helper.js +165 -0
- package/dist/lib/secrets/linux.js +4 -4
- package/dist/lib/secrets/sync.d.ts +56 -0
- package/dist/lib/secrets/sync.js +180 -0
- package/dist/lib/session/active.d.ts +8 -0
- package/dist/lib/session/active.js +3 -2
- package/dist/lib/session/db.d.ts +0 -4
- package/dist/lib/session/db.js +0 -26
- package/dist/lib/session/parse.d.ts +1 -0
- package/dist/lib/session/parse.js +44 -0
- package/dist/lib/session/render.js +4 -4
- package/dist/lib/session/types.d.ts +2 -2
- package/dist/lib/session/types.js +1 -1
- package/dist/lib/shims.d.ts +5 -2
- package/dist/lib/shims.js +70 -38
- package/dist/lib/state.d.ts +14 -2
- package/dist/lib/state.js +51 -20
- package/dist/lib/teams/agents.d.ts +5 -4
- package/dist/lib/teams/agents.js +48 -22
- package/dist/lib/teams/api.d.ts +2 -1
- package/dist/lib/teams/api.js +4 -3
- package/dist/lib/teams/parsers.d.ts +1 -1
- package/dist/lib/teams/parsers.js +153 -3
- package/dist/lib/teams/summarizer.js +18 -2
- package/dist/lib/teams/worktree.js +14 -3
- package/dist/lib/types.d.ts +63 -4
- package/dist/lib/types.js +8 -3
- package/dist/lib/usage.d.ts +27 -2
- package/dist/lib/usage.js +100 -17
- package/dist/lib/versions.d.ts +45 -3
- package/dist/lib/versions.js +455 -60
- package/package.json +15 -14
- package/scripts/install-helper.js +97 -0
- package/scripts/postinstall.js +16 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/embedded.provisionprofile +0 -0
- package/npm-shrinkwrap.json +0 -3162
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phnx-labs/agents-cli",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "One CLI for all your AI coding agents - versions, config, cloud dispatch, sessions, and teams",
|
|
3
|
+
"version": "1.20.3",
|
|
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",
|
|
7
7
|
"exports": {
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"dist/**/*.js",
|
|
25
25
|
"dist/**/*.d.ts",
|
|
26
26
|
"dist/lib/secrets/Agents CLI.app/**",
|
|
27
|
-
"npm-shrinkwrap.json",
|
|
28
27
|
"scripts/postinstall.js",
|
|
28
|
+
"scripts/install-helper.js",
|
|
29
29
|
"CHANGELOG.md",
|
|
30
30
|
"README.md",
|
|
31
31
|
"LICENSE"
|
|
32
32
|
],
|
|
33
33
|
"publishConfig": {
|
|
34
|
-
"provenance":
|
|
34
|
+
"provenance": false
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
@@ -59,6 +59,8 @@
|
|
|
59
59
|
"gemini",
|
|
60
60
|
"cursor",
|
|
61
61
|
"opencode",
|
|
62
|
+
"grok",
|
|
63
|
+
"xai",
|
|
62
64
|
"mcp",
|
|
63
65
|
"skills",
|
|
64
66
|
"ai",
|
|
@@ -72,14 +74,14 @@
|
|
|
72
74
|
"npm": ">=9"
|
|
73
75
|
},
|
|
74
76
|
"dependencies": {
|
|
75
|
-
"@inquirer/prompts": "
|
|
77
|
+
"@inquirer/prompts": "8.5.1",
|
|
76
78
|
"@types/proper-lockfile": "4.1.4",
|
|
77
79
|
"@xterm/headless": "6.0.0",
|
|
78
80
|
"@zed-industries/agent-client-protocol": "0.4.5",
|
|
79
81
|
"chalk": "5.6.2",
|
|
80
|
-
"commander": "
|
|
81
|
-
"croner": "
|
|
82
|
-
"diff": "
|
|
82
|
+
"commander": "15.0.0",
|
|
83
|
+
"croner": "10.0.1",
|
|
84
|
+
"diff": "9.0.0",
|
|
83
85
|
"marked": "15.0.12",
|
|
84
86
|
"marked-terminal": "7.3.0",
|
|
85
87
|
"node-pty": "1.1.0",
|
|
@@ -87,15 +89,14 @@
|
|
|
87
89
|
"proper-lockfile": "4.1.2",
|
|
88
90
|
"simple-git": "3.36.0",
|
|
89
91
|
"smol-toml": "1.6.1",
|
|
90
|
-
"yaml": "2.
|
|
92
|
+
"yaml": "2.9.0"
|
|
91
93
|
},
|
|
92
94
|
"devDependencies": {
|
|
93
|
-
"@types/diff": "
|
|
95
|
+
"@types/diff": "8.0.0",
|
|
94
96
|
"@types/marked-terminal": "6.1.1",
|
|
95
|
-
"@types/node": "
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"typescript": "5.9.3",
|
|
97
|
+
"@types/node": "25.9.1",
|
|
98
|
+
"tsx": "4.22.3",
|
|
99
|
+
"typescript": "6.0.3",
|
|
99
100
|
"vitest": "4.1.6"
|
|
100
101
|
}
|
|
101
102
|
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Copy the bundled `Agents CLI.app` to a stable user-scoped path so its
|
|
4
|
+
* keychain ACLs survive future npm installs/updates.
|
|
5
|
+
*
|
|
6
|
+
* Source: dist/lib/secrets/Agents CLI.app (in the installed npm package)
|
|
7
|
+
* bin/Agents CLI.app (in a raw working tree)
|
|
8
|
+
* Destination: ~/Library/Application Support/agents-cli/Agents CLI.app
|
|
9
|
+
*
|
|
10
|
+
* Invoked by scripts/postinstall.js on global install, and by
|
|
11
|
+
* scripts/install.sh for dev installs. Pure Node, no agents-cli imports,
|
|
12
|
+
* so it runs before the package's TS is wired up.
|
|
13
|
+
*
|
|
14
|
+
* macOS only — silently no-ops on other platforms so postinstall stays clean.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { spawnSync } from 'child_process';
|
|
18
|
+
import * as fs from 'fs';
|
|
19
|
+
import * as os from 'os';
|
|
20
|
+
import * as path from 'path';
|
|
21
|
+
import { fileURLToPath } from 'url';
|
|
22
|
+
|
|
23
|
+
const APP_BUNDLE_NAME = 'Agents CLI.app';
|
|
24
|
+
const INSTALL_DIR_NAME = 'agents-cli';
|
|
25
|
+
|
|
26
|
+
function destAppPath() {
|
|
27
|
+
return path.join(os.homedir(), 'Library', 'Application Support', INSTALL_DIR_NAME, APP_BUNDLE_NAME);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function findSourceApp() {
|
|
31
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
32
|
+
// From scripts/install-helper.js, look in the installed npm layout first
|
|
33
|
+
// (../dist/lib/secrets/...) then a raw repo layout (../bin/...).
|
|
34
|
+
const candidates = [
|
|
35
|
+
path.resolve(here, '..', 'dist', 'lib', 'secrets', APP_BUNDLE_NAME),
|
|
36
|
+
path.resolve(here, '..', 'bin', APP_BUNDLE_NAME),
|
|
37
|
+
];
|
|
38
|
+
for (const c of candidates) {
|
|
39
|
+
if (fs.existsSync(c)) return c;
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function codesignVerify(appPath) {
|
|
45
|
+
const r = spawnSync('codesign', ['--verify', '--deep', '--strict', appPath], {
|
|
46
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
47
|
+
encoding: 'utf-8',
|
|
48
|
+
});
|
|
49
|
+
return { ok: r.status === 0, output: (r.stderr || r.stdout || '').toString().trim() };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function copyAppBundle(src, dest) {
|
|
53
|
+
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
54
|
+
if (fs.existsSync(dest)) fs.rmSync(dest, { recursive: true, force: true });
|
|
55
|
+
const r = spawnSync('cp', ['-R', src, dest], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' });
|
|
56
|
+
if (r.status !== 0) {
|
|
57
|
+
const msg = (r.stderr || r.stdout || '').toString().trim();
|
|
58
|
+
throw new Error(`Failed to copy ${src} -> ${dest}: ${msg || 'unknown error'}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function main() {
|
|
63
|
+
if (process.platform !== 'darwin') return;
|
|
64
|
+
const force = process.argv.includes('--force');
|
|
65
|
+
const dest = destAppPath();
|
|
66
|
+
|
|
67
|
+
if (!force && fs.existsSync(dest) && codesignVerify(dest).ok) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const src = findSourceApp();
|
|
72
|
+
if (!src) {
|
|
73
|
+
// No source bundle to install. Stay silent during postinstall so we don't
|
|
74
|
+
// create noise on Linux/Windows or on builds that intentionally omit the
|
|
75
|
+
// helper. `agents helper install` surfaces a clearer error if a user
|
|
76
|
+
// actually needs the helper.
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
try {
|
|
81
|
+
copyAppBundle(src, dest);
|
|
82
|
+
} catch (err) {
|
|
83
|
+
process.stderr.write(`agents-cli: failed to install Keychain helper: ${err.message}\n`);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const verify = codesignVerify(dest);
|
|
88
|
+
if (!verify.ok) {
|
|
89
|
+
process.stderr.write(
|
|
90
|
+
`agents-cli: installed helper failed codesign verification at ${dest}\n${verify.output}\n`
|
|
91
|
+
);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
process.stdout.write(` Installed Keychain helper: ${dest}\n`);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
main();
|
package/scripts/postinstall.js
CHANGED
|
@@ -7,6 +7,7 @@ import * as fs from 'fs';
|
|
|
7
7
|
import * as path from 'path';
|
|
8
8
|
import * as os from 'os';
|
|
9
9
|
import * as readline from 'readline';
|
|
10
|
+
import { spawnSync } from 'child_process';
|
|
10
11
|
import { fileURLToPath } from 'url';
|
|
11
12
|
|
|
12
13
|
const HOME = os.homedir();
|
|
@@ -14,6 +15,16 @@ const SHIMS_DIR = path.join(HOME, '.agents', '.cache', 'shims');
|
|
|
14
15
|
const SYSTEM_DIR = path.join(HOME, '.agents-system');
|
|
15
16
|
const USER_DIR = path.join(HOME, '.agents');
|
|
16
17
|
const AGENTS_BIN = fileURLToPath(new URL('../dist/index.js', import.meta.url));
|
|
18
|
+
const INSTALL_HELPER_SCRIPT = fileURLToPath(new URL('./install-helper.js', import.meta.url));
|
|
19
|
+
|
|
20
|
+
function installKeychainHelper() {
|
|
21
|
+
if (process.platform !== 'darwin') return;
|
|
22
|
+
if (!fs.existsSync(INSTALL_HELPER_SCRIPT)) return;
|
|
23
|
+
// Sub-process so a hard failure (codesign / spctl missing on a weird host)
|
|
24
|
+
// can't take down the rest of postinstall. install-helper.js stays silent
|
|
25
|
+
// on no-op and emits one stdout line on success.
|
|
26
|
+
spawnSync(process.execPath, [INSTALL_HELPER_SCRIPT], { stdio: 'inherit' });
|
|
27
|
+
}
|
|
17
28
|
|
|
18
29
|
function shellQuote(value) {
|
|
19
30
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
@@ -24,6 +35,7 @@ const isGlobalInstall = process.env.npm_config_global || process.argv.includes('
|
|
|
24
35
|
if (!isGlobalInstall) {
|
|
25
36
|
// Still create user directories for local installs
|
|
26
37
|
fs.mkdirSync(USER_DIR, { recursive: true, mode: 0o700 });
|
|
38
|
+
installKeychainHelper();
|
|
27
39
|
console.log(`
|
|
28
40
|
agents-cli installed locally.
|
|
29
41
|
To complete setup, run: npx agents setup
|
|
@@ -36,6 +48,10 @@ fs.mkdirSync(SHIMS_DIR, { recursive: true });
|
|
|
36
48
|
fs.mkdirSync(SYSTEM_DIR, { recursive: true });
|
|
37
49
|
fs.mkdirSync(USER_DIR, { recursive: true, mode: 0o700 });
|
|
38
50
|
|
|
51
|
+
// Copy the signed macOS Keychain helper to a stable user path so its trusted-app
|
|
52
|
+
// ACLs survive future npm publishes (which re-sign the bundle).
|
|
53
|
+
installKeychainHelper();
|
|
54
|
+
|
|
39
55
|
// One-shot idempotent migrations
|
|
40
56
|
function runMigrations() {
|
|
41
57
|
// 1. Move agents.yaml from system to user repo
|
|
Binary file
|