@phnx-labs/agents-cli 1.18.6 → 1.19.0
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 +13 -2
- package/README.md +22 -20
- package/dist/commands/browser.js +25 -2
- package/dist/commands/cloud.js +3 -3
- package/dist/commands/computer.d.ts +6 -0
- package/dist/commands/computer.js +477 -0
- package/dist/commands/doctor.js +19 -17
- package/dist/commands/exec.js +37 -59
- package/dist/commands/factory.js +12 -5
- package/dist/commands/import.js +6 -1
- package/dist/commands/mcp.js +9 -4
- package/dist/commands/packages.d.ts +3 -0
- package/dist/commands/packages.js +20 -12
- package/dist/commands/permissions.d.ts +2 -0
- package/dist/commands/permissions.js +20 -1
- package/dist/commands/plugins.d.ts +2 -0
- package/dist/commands/plugins.js +23 -4
- package/dist/commands/profiles.js +1 -1
- package/dist/commands/pty.js +126 -112
- package/dist/commands/pull.js +29 -25
- package/dist/commands/repo.js +24 -26
- package/dist/commands/routines.js +29 -26
- package/dist/commands/secrets.js +66 -73
- package/dist/commands/sessions-tail.js +21 -22
- package/dist/commands/sessions.js +36 -68
- package/dist/commands/setup.js +20 -24
- package/dist/commands/teams.js +30 -39
- package/dist/commands/versions.js +60 -68
- package/dist/commands/worktree.d.ts +20 -0
- package/dist/commands/worktree.js +242 -0
- package/dist/computer.d.ts +2 -0
- package/dist/computer.js +7 -0
- package/dist/index.js +70 -26
- package/dist/lib/agents.d.ts +4 -1
- package/dist/lib/agents.js +23 -5
- package/dist/lib/browser/cdp.d.ts +15 -1
- package/dist/lib/browser/cdp.js +77 -8
- package/dist/lib/browser/chrome.js +17 -24
- package/dist/lib/browser/drivers/ssh.d.ts +1 -0
- package/dist/lib/browser/drivers/ssh.js +20 -8
- package/dist/lib/browser/ipc.js +38 -5
- package/dist/lib/browser/profiles.js +34 -2
- package/dist/lib/browser/runtime-state.d.ts +1 -2
- package/dist/lib/browser/runtime-state.js +11 -3
- package/dist/lib/browser/service.d.ts +5 -0
- package/dist/lib/browser/service.js +32 -4
- package/dist/lib/browser/types.d.ts +1 -1
- package/dist/lib/browser/upload.d.ts +2 -0
- package/dist/lib/browser/upload.js +34 -0
- package/dist/lib/cloud/rush.d.ts +2 -1
- package/dist/lib/cloud/rush.js +28 -9
- package/dist/lib/computer-rpc.d.ts +24 -0
- package/dist/lib/computer-rpc.js +263 -0
- package/dist/lib/daemon.js +7 -7
- package/dist/lib/exec.d.ts +2 -1
- package/dist/lib/exec.js +3 -2
- package/dist/lib/fs-atomic.d.ts +18 -0
- package/dist/lib/fs-atomic.js +76 -0
- package/dist/lib/git.js +2 -4
- package/dist/lib/help.d.ts +15 -0
- package/dist/lib/help.js +41 -0
- package/dist/lib/hooks/match.d.ts +1 -0
- package/dist/lib/hooks/match.js +57 -12
- package/dist/lib/hooks.d.ts +1 -0
- package/dist/lib/hooks.js +27 -10
- package/dist/lib/import.d.ts +1 -0
- package/dist/lib/import.js +7 -0
- package/dist/lib/manifest.js +27 -1
- package/dist/lib/mcp.d.ts +14 -0
- package/dist/lib/mcp.js +79 -14
- package/dist/lib/migrate.js +3 -3
- package/dist/lib/models.js +3 -1
- package/dist/lib/permissions.d.ts +5 -0
- package/dist/lib/permissions.js +35 -0
- package/dist/lib/plugin-marketplace.d.ts +3 -1
- package/dist/lib/plugin-marketplace.js +36 -1
- package/dist/lib/plugins.d.ts +19 -1
- package/dist/lib/plugins.js +99 -8
- package/dist/lib/redact.d.ts +4 -0
- package/dist/lib/redact.js +18 -0
- package/dist/lib/registry.d.ts +2 -0
- package/dist/lib/registry.js +15 -0
- package/dist/lib/sandbox.js +15 -5
- package/dist/lib/secrets/bundles.d.ts +7 -12
- package/dist/lib/secrets/bundles.js +45 -29
- package/dist/lib/secrets/index.js +4 -4
- package/dist/lib/session/cloud.d.ts +2 -0
- package/dist/lib/session/cloud.js +34 -6
- package/dist/lib/session/parse.js +7 -2
- package/dist/lib/session/render.d.ts +4 -1
- package/dist/lib/session/render.js +81 -35
- package/dist/lib/shims.d.ts +5 -2
- package/dist/lib/shims.js +29 -7
- package/dist/lib/state.d.ts +5 -5
- package/dist/lib/state.js +43 -13
- package/dist/lib/teams/agents.js +1 -1
- package/dist/lib/types.d.ts +4 -3
- package/dist/lib/types.js +0 -2
- package/dist/lib/versions.js +65 -40
- package/dist/lib/workflows.d.ts +7 -0
- package/dist/lib/workflows.js +42 -1
- package/npm-shrinkwrap.json +3256 -0
- package/package.json +32 -26
- package/scripts/postinstall.js +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.18.6
|
|
4
|
+
|
|
5
|
+
**Claude**
|
|
6
|
+
|
|
7
|
+
- Add auto permission mode support for Claude runs.
|
|
8
|
+
- Remove a dead automatic mode flag from the Claude command template.
|
|
9
|
+
|
|
10
|
+
**Teams**
|
|
11
|
+
|
|
12
|
+
- Fix the cycle-detection test to accept running or failed teammate status.
|
|
13
|
+
|
|
3
14
|
## 1.18.5
|
|
4
15
|
|
|
5
16
|
**Browser**
|
|
@@ -246,7 +257,7 @@
|
|
|
246
257
|
**~/.agents split into .history/ and .cache/ buckets**
|
|
247
258
|
|
|
248
259
|
- Durable runtime state (sessions, versions, runs, teams/agents, trash, backups) moves to ~/.agents/.history/.
|
|
249
|
-
- Regenerable runtime state (shims, packages, cloud, logs,
|
|
260
|
+
- Regenerable runtime state (shims, packages, cloud, logs, companion, helpers, browser runtime, fetch cache, dot-files) moves to ~/.agents/.cache/.
|
|
250
261
|
- Single-line gitignore for backing up ~/.agents/ — no more per-subdir cherry-picking.
|
|
251
262
|
|
|
252
263
|
**Browser: profiles fold into agents.yaml + many new automation commands**
|
|
@@ -334,7 +345,7 @@
|
|
|
334
345
|
|
|
335
346
|
- Added `--json` flag to `agents sessions list` and `agents sessions` for programmatic use
|
|
336
347
|
- Output is a JSON array of session metadata (id, shortId, agent, version, account, project, cwd, filePath, topic, messageCount, tokenCount, timestamp)
|
|
337
|
-
- Enables the
|
|
348
|
+
- Enables the Companion VS Code extension's "Agents: Session Resume" and "Agents: Session Trace" pickers
|
|
338
349
|
|
|
339
350
|
**OpenClaw workspace-aware sessions**
|
|
340
351
|
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<a href="https://github.com/NousResearch/hermes-agent" title="Hermes Agent"><img src="assets/harnesses/hermes.png" height="32" alt="Hermes Agent" /></a>
|
|
30
30
|
</p>
|
|
31
31
|
|
|
32
|
-
https://
|
|
32
|
+
https://agents-cli.sh/demo.mp4
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
npm install -g @phnx-labs/agents-cli
|
|
@@ -133,10 +133,10 @@ agents run claude "refactor auth module" --mode edit --fallback codex,gemini
|
|
|
133
133
|
|
|
134
134
|
```bash
|
|
135
135
|
# Picks the signed-in account you haven't used recently.
|
|
136
|
-
agents run claude "summarize recent commits" --
|
|
136
|
+
agents run claude "summarize recent commits" --strategy balanced
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
`--
|
|
139
|
+
`--strategy balanced` spreads work across available versions of the same agent -- useful when you have multiple accounts and want to avoid burning through one.
|
|
140
140
|
|
|
141
141
|
### Chain agents
|
|
142
142
|
|
|
@@ -156,7 +156,7 @@ agents run claude "review this diff" --acp --json
|
|
|
156
156
|
|
|
157
157
|
`--acp` routes through the [Agent Client Protocol](https://agentclientprotocol.com/) so you get a unified event stream -- `agent_message_chunk`, `tool_call`, `plan_update`, `stop_reason` -- instead of writing a parser per CLI. File writes and shell commands flow through agents-cli, which means `--mode plan` becomes a real sandbox: the write RPC is denied, not just unused.
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
ACP adapters are documented for claude, codex, gemini, cursor, opencode, and openclaw. Other harnesses keep running on the direct-exec path.
|
|
160
160
|
|
|
161
161
|
---
|
|
162
162
|
|
|
@@ -181,7 +181,7 @@ agents sessions a1b2c3d4 --last 3 --include user
|
|
|
181
181
|
|
|
182
182
|
Interactive picker when you're in a terminal. Structured output (`--json`, `--markdown`, filtered by role or turn count) when piped.
|
|
183
183
|
|
|
184
|
-
Backed by a SQLite + FTS5 index at `~/.agents
|
|
184
|
+
Backed by a SQLite + FTS5 index at `~/.agents/.history/sessions/sessions.db` with incremental scanning -- warm reads in ~100ms. External tools can consume `--json` output as a programmatic observability layer; see [docs/05-sessions.md](docs/05-sessions.md) for the schema and [docs/06-observability.md](docs/06-observability.md) for the consumption patterns.
|
|
185
185
|
|
|
186
186
|
---
|
|
187
187
|
|
|
@@ -214,7 +214,7 @@ Custom endpoints (Ollama, vLLM) work too -- drop a YAML in `~/.agents/profiles/`
|
|
|
214
214
|
name: local-qwen
|
|
215
215
|
host: { agent: claude }
|
|
216
216
|
env:
|
|
217
|
-
ANTHROPIC_BASE_URL: https://ollama.
|
|
217
|
+
ANTHROPIC_BASE_URL: https://ollama.example.com
|
|
218
218
|
ANTHROPIC_MODEL: qwen3.6:35b
|
|
219
219
|
auth:
|
|
220
220
|
envVar: ANTHROPIC_AUTH_TOKEN
|
|
@@ -402,11 +402,11 @@ Merge order: profile env < `--secrets` < `--env K=V`. A missing keychain item ab
|
|
|
402
402
|
|
|
403
403
|
### Cross-machine sync via iCloud Keychain
|
|
404
404
|
|
|
405
|
-
|
|
405
|
+
Secret bundles sync through iCloud Keychain by default. Sign into the same iCloud account on another Mac (with iCloud Keychain enabled) and the bundle appears there within seconds — no copy-paste, no `.env` files emailed to yourself, no shared secret stores. Pass `--no-icloud-sync` when creating a bundle if it should stay device-local.
|
|
406
406
|
|
|
407
407
|
```bash
|
|
408
408
|
# On laptop:
|
|
409
|
-
agents secrets create npm-tokens
|
|
409
|
+
agents secrets create npm-tokens
|
|
410
410
|
agents secrets add npm-tokens NPM_TOKEN # value lives in iCloud Keychain
|
|
411
411
|
|
|
412
412
|
# On another Mac (same iCloud account):
|
|
@@ -414,7 +414,7 @@ agents secrets list # npm-tokens is already there;
|
|
|
414
414
|
agents run claude "..." --secrets npm-tokens # injects NPM_TOKEN automatically
|
|
415
415
|
```
|
|
416
416
|
|
|
417
|
-
Under the hood,
|
|
417
|
+
Under the hood, synced bundles route writes through a notarized helper app (`AgentsKeychain.app`) that holds the entitlement macOS requires for `kSecAttrSynchronizable`. Bundles created with `--no-icloud-sync` stay device-local.
|
|
418
418
|
|
|
419
419
|
Bundle definitions sync via iCloud Keychain too — no `agents repo push` needed for secrets, no recreate step on each Mac. Nothing about secrets ever lives in plaintext on disk.
|
|
420
420
|
|
|
@@ -467,7 +467,7 @@ A sidecar server holds sessions alive between CLI calls. `screen` renders via xt
|
|
|
467
467
|
|
|
468
468
|
```bash
|
|
469
469
|
# New machine? One command.
|
|
470
|
-
agents
|
|
470
|
+
agents setup
|
|
471
471
|
|
|
472
472
|
# Installs CLIs, registers MCP servers, syncs skills/commands/rules/hooks,
|
|
473
473
|
# sets up shims, configures defaults. Done.
|
|
@@ -490,6 +490,8 @@ Two repos with the same shape, different roles:
|
|
|
490
490
|
|
|
491
491
|
See [docs/00-concepts.md](docs/00-concepts.md) for the full mental model: DotAgents repos, resource kinds, and how resolution works end-to-end.
|
|
492
492
|
|
|
493
|
+
Other useful commands: `agents doctor` checks CLI availability and resource sync drift, `agents usage` shows available quota/rate-limit data for installed agents, `agents import` adopts an existing unmanaged install, `agents trash` lists and restores soft-deleted version directories, and `agents subagents` installs reusable subagent definitions for parent-agent workflows.
|
|
494
|
+
|
|
493
495
|
---
|
|
494
496
|
|
|
495
497
|
## Private skills
|
|
@@ -515,11 +517,11 @@ Extras clone into `~/.agents-system/.repos/<alias>/` and ship the same layout as
|
|
|
515
517
|
|
|
516
518
|
## Security & Privacy
|
|
517
519
|
|
|
518
|
-
**
|
|
520
|
+
**The CLI binary has no built-in telemetry or phone-home path.** Routine commands run locally; explicit features such as cloud dispatch and iCloud Keychain sync send only the data needed for the action you invoke. Here's exactly what `agents-cli` stores locally and why.
|
|
519
521
|
|
|
520
522
|
### Event log
|
|
521
523
|
|
|
522
|
-
Every agent run, version install, browser launch, and secrets access is logged to `~/.agents/logs/events-YYYY-MM-DD.jsonl`. This gives you a complete record of what agents did on your machine.
|
|
524
|
+
Every agent run, version install, browser launch, and secrets access is logged to `~/.agents/.cache/logs/events-YYYY-MM-DD.jsonl`. This gives you a complete record of what agents did on your machine.
|
|
523
525
|
|
|
524
526
|
```bash
|
|
525
527
|
# What gets logged (example event):
|
|
@@ -553,7 +555,7 @@ agents sessions "auth middleware" # Full-text search across all agents
|
|
|
553
555
|
agents sessions --agent claude --since 7d
|
|
554
556
|
```
|
|
555
557
|
|
|
556
|
-
The index lives at `~/.agents/sessions/sessions.db` (SQLite + FTS5). Nothing leaves your machine. See [Sessions](#sessions-across-agents) for full usage.
|
|
558
|
+
The index lives at `~/.agents/.history/sessions/sessions.db` (SQLite + FTS5). Nothing leaves your machine. See [Sessions](#sessions-across-agents) for full usage.
|
|
557
559
|
|
|
558
560
|
### Secrets
|
|
559
561
|
|
|
@@ -564,14 +566,14 @@ agents secrets create my-keys
|
|
|
564
566
|
agents secrets add my-keys API_KEY # Prompts for value, stores in Keychain
|
|
565
567
|
```
|
|
566
568
|
|
|
567
|
-
|
|
569
|
+
By default, secrets sync via iCloud Keychain to your other Macs. With `--no-icloud-sync`, they stay device-local. See [Secrets](#secrets) for full usage.
|
|
568
570
|
|
|
569
571
|
### Summary
|
|
570
572
|
|
|
571
573
|
| Data | Location | Who can read | Opt out |
|
|
572
574
|
|------|----------|--------------|---------|
|
|
573
|
-
| Event log | `~/.agents/logs/` | You only (0600) | `AGENTS_DISABLE_EVENT_LOG=1` |
|
|
574
|
-
| Session index | `~/.agents/sessions/` | You only | Delete the directory |
|
|
575
|
+
| Event log | `~/.agents/.cache/logs/` | You only (0600) | `AGENTS_DISABLE_EVENT_LOG=1` |
|
|
576
|
+
| Session index | `~/.agents/.history/sessions/` | You only | Delete the directory |
|
|
575
577
|
| Secrets | macOS Keychain | You + apps you authorize | Don't use `agents secrets` |
|
|
576
578
|
| Config | `~/.agents/` | You only | N/A |
|
|
577
579
|
|
|
@@ -629,19 +631,19 @@ Your choice. We hand off to the original CLI process — use your existing subsc
|
|
|
629
631
|
|
|
630
632
|
### Does it store my API keys or send telemetry?
|
|
631
633
|
|
|
632
|
-
**No telemetry
|
|
634
|
+
**No CLI telemetry or phone-home.** API keys come from your shell environment or each agent CLI's existing auth, and remote calls only happen when you invoke a feature that requires them, such as cloud dispatch.
|
|
633
635
|
|
|
634
|
-
For full transparency: `agents-cli` keeps a local event log at `~/.agents/logs/` so you can see exactly what agents did on your machine. Logs are owner-readable only (0600) and auto-prune after 30 days. Set `AGENTS_DISABLE_EVENT_LOG=1` to disable. See [Security & Privacy](#security--privacy) for details.
|
|
636
|
+
For full transparency: `agents-cli` keeps a local event log at `~/.agents/.cache/logs/` so you can see exactly what agents did on your machine. Logs are owner-readable only (0600) and auto-prune after 30 days. Set `AGENTS_DISABLE_EVENT_LOG=1` to disable. See [Security & Privacy](#security--privacy) for details.
|
|
635
637
|
|
|
636
638
|
### Which platforms?
|
|
637
639
|
|
|
638
640
|
macOS and Linux. Windows via WSL works but isn't first-class yet.
|
|
639
641
|
|
|
640
|
-
**macOS-only features:** Keychain-based secrets (`agents secrets`, `agents profiles login`) require macOS.
|
|
642
|
+
**macOS-only features:** Keychain-based secrets (`agents secrets`, `agents profiles login`) require macOS. Default iCloud sync for bundles requires macOS + iCloud Keychain enabled; use `--no-icloud-sync` for device-local bundles. On Linux, use environment variables or `.env` files for API keys. Native Linux credential store support is planned.
|
|
641
643
|
|
|
642
644
|
### Do I need Node.js?
|
|
643
645
|
|
|
644
|
-
The installer tries Bun first (faster), falls back to npm. Node
|
|
646
|
+
The installer tries Bun first (faster), falls back to npm. Node 22.5+ required at runtime.
|
|
645
647
|
|
|
646
648
|
### Can I use it in CI?
|
|
647
649
|
|
package/dist/commands/browser.js
CHANGED
|
@@ -9,7 +9,7 @@ import { parseTargetFilter } from '../lib/browser/service.js';
|
|
|
9
9
|
import { sendIPCRequest } from '../lib/browser/ipc.js';
|
|
10
10
|
import { browserTaskPicker } from './browser-picker.js';
|
|
11
11
|
import { isInteractiveTerminal } from './utils.js';
|
|
12
|
-
import { registerCommandGroups } from '../lib/help.js';
|
|
12
|
+
import { registerCommandGroups, setHelpSections } from '../lib/help.js';
|
|
13
13
|
/**
|
|
14
14
|
* Resolve which browser task a command targets. Order:
|
|
15
15
|
* 1. `--task <name>` flag (explicit per-command override)
|
|
@@ -50,7 +50,30 @@ const BROWSER_HELP_GROUPS = [
|
|
|
50
50
|
export function registerBrowserCommand(program) {
|
|
51
51
|
const browser = program
|
|
52
52
|
.command('browser')
|
|
53
|
-
.description('
|
|
53
|
+
.description('Launch and drive browser profiles via the Chrome DevTools Protocol. Power-tool for the `browser` skill.');
|
|
54
|
+
setHelpSections(browser, {
|
|
55
|
+
examples: `
|
|
56
|
+
# List configured browser profiles
|
|
57
|
+
agents browser profiles list
|
|
58
|
+
|
|
59
|
+
# Create a Chrome profile pointed at a CDP endpoint
|
|
60
|
+
agents browser profiles create work --browser chrome --endpoint http://localhost:9222
|
|
61
|
+
|
|
62
|
+
# Start a session against a profile
|
|
63
|
+
agents browser start work
|
|
64
|
+
|
|
65
|
+
# Drive the page
|
|
66
|
+
agents browser navigate https://example.com
|
|
67
|
+
agents browser screenshot
|
|
68
|
+
|
|
69
|
+
# End the session when done
|
|
70
|
+
agents browser done
|
|
71
|
+
`,
|
|
72
|
+
notes: `
|
|
73
|
+
Most agent workflows should use the 'browser' skill instead of raw subcommands.
|
|
74
|
+
The skill wraps profile selection, snapshotting, and tunneling.
|
|
75
|
+
`,
|
|
76
|
+
});
|
|
54
77
|
registerProfilesCommands(browser);
|
|
55
78
|
registerTaskCommands(browser);
|
|
56
79
|
registerCommandGroups(browser, BROWSER_HELP_GROUPS);
|
package/dist/commands/cloud.js
CHANGED
|
@@ -56,13 +56,13 @@ Providers:
|
|
|
56
56
|
|
|
57
57
|
Examples:
|
|
58
58
|
# Dispatch a quick fix to Rush Cloud and stream the output
|
|
59
|
-
agents cloud run "fix the flaky e2e in apps/web/tests/checkout.spec.ts" --provider rush --repo
|
|
59
|
+
agents cloud run "fix the flaky e2e in apps/web/tests/checkout.spec.ts" --provider rush --repo acme/example --branch main
|
|
60
60
|
|
|
61
61
|
# Fire-and-forget (returns the task id, no streaming)
|
|
62
|
-
agents cloud run "bump tailwind to v4 and fix the breaks" --provider rush --repo
|
|
62
|
+
agents cloud run "bump tailwind to v4 and fix the breaks" --provider rush --repo acme/example --no-follow
|
|
63
63
|
|
|
64
64
|
# Multi-repo dispatch: touch both rush and rush-extension in one task
|
|
65
|
-
agents cloud run "rename POST /v1/charge -> /v2/charge across server + extension" --provider rush --repo
|
|
65
|
+
agents cloud run "rename POST /v1/charge -> /v2/charge across server + extension" --provider rush --repo acme/example --repo acme/example-extension
|
|
66
66
|
|
|
67
67
|
# Codex Cloud against a saved environment
|
|
68
68
|
agents cloud run "add pytest fixtures for the new billing module" --provider codex --env env_a1b2c3 --agent codex --timeout 30m
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { resolveHelperExec, resolveSocketPath } from '../lib/computer-rpc.js';
|
|
3
|
+
export declare function registerComputerCommand(program: Command): void;
|
|
4
|
+
export declare function registerComputerSubcommands(program: Command): void;
|
|
5
|
+
export { resolveHelperExec as resolveHelperPath };
|
|
6
|
+
export { resolveSocketPath };
|