@agentproto/cli 0.3.0 → 0.4.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/README.md +17 -17
- package/dist/cli.mjs +22538 -48897
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +11056 -7133
- package/dist/index.mjs.map +1 -1
- package/dist/registry/builtins.mjs +4 -4
- package/dist/registry/manifest.mjs +4 -4
- package/dist/registry/plugins.mjs +4 -4
- package/dist/registry/runtime.mjs +4 -4
- package/dist/util/credentials.mjs +4 -4
- package/package.json +14 -18
- package/skill/agentproto/SKILL.md +26 -26
|
@@ -6,12 +6,12 @@ import matter from 'gray-matter';
|
|
|
6
6
|
import { spawn } from 'child_process';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @agentproto/cli v0.
|
|
9
|
+
* @agentproto/cli v0.4.0
|
|
10
10
|
* The `agentproto` binary — install / run / serve AIP-45 agent CLIs.
|
|
11
11
|
*/
|
|
12
|
-
// Provide a real `require` in the ESM bundle.
|
|
13
|
-
//
|
|
14
|
-
// esbuild's interop shim throws "Dynamic require is not supported".
|
|
12
|
+
// Provide a real `require` in the ESM bundle. Some bundled deps (e.g.
|
|
13
|
+
// gray-matter, node-pty) are CJS and call `require("assert")` or similar;
|
|
14
|
+
// without this esbuild's interop shim throws "Dynamic require is not supported".
|
|
15
15
|
createRequire(import.meta.url);
|
|
16
16
|
var HEADER_RE = /^=== TURN id=([^\s]+) participant=([^\s]+) ts=([^\s]+) ===$/;
|
|
17
17
|
var FileSubstrate = class {
|
|
@@ -2,12 +2,12 @@ import { createRequire } from 'node:module';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* @agentproto/cli v0.
|
|
5
|
+
* @agentproto/cli v0.4.0
|
|
6
6
|
* The `agentproto` binary — install / run / serve AIP-45 agent CLIs.
|
|
7
7
|
*/
|
|
8
|
-
// Provide a real `require` in the ESM bundle.
|
|
9
|
-
//
|
|
10
|
-
// esbuild's interop shim throws "Dynamic require is not supported".
|
|
8
|
+
// Provide a real `require` in the ESM bundle. Some bundled deps (e.g.
|
|
9
|
+
// gray-matter, node-pty) are CJS and call `require("assert")` or similar;
|
|
10
|
+
// without this esbuild's interop shim throws "Dynamic require is not supported".
|
|
11
11
|
createRequire(import.meta.url);
|
|
12
12
|
var PLUGIN_MANIFEST_SCHEMA = "agentproto/plugin/v1";
|
|
13
13
|
var AdapterEntrySchema = z.object({
|
|
@@ -7,12 +7,12 @@ import { pathToFileURL } from 'url';
|
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* @agentproto/cli v0.
|
|
10
|
+
* @agentproto/cli v0.4.0
|
|
11
11
|
* The `agentproto` binary — install / run / serve AIP-45 agent CLIs.
|
|
12
12
|
*/
|
|
13
|
-
// Provide a real `require` in the ESM bundle.
|
|
14
|
-
//
|
|
15
|
-
// esbuild's interop shim throws "Dynamic require is not supported".
|
|
13
|
+
// Provide a real `require` in the ESM bundle. Some bundled deps (e.g.
|
|
14
|
+
// gray-matter, node-pty) are CJS and call `require("assert")` or similar;
|
|
15
|
+
// without this esbuild's interop shim throws "Dynamic require is not supported".
|
|
16
16
|
createRequire(import.meta.url);
|
|
17
17
|
var PLUGIN_MANIFEST_SCHEMA = "agentproto/plugin/v1";
|
|
18
18
|
var AdapterEntrySchema = z.object({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @agentproto/cli v0.
|
|
4
|
+
* @agentproto/cli v0.4.0
|
|
5
5
|
* The `agentproto` binary — install / run / serve AIP-45 agent CLIs.
|
|
6
6
|
*/
|
|
7
|
-
// Provide a real `require` in the ESM bundle.
|
|
8
|
-
//
|
|
9
|
-
// esbuild's interop shim throws "Dynamic require is not supported".
|
|
7
|
+
// Provide a real `require` in the ESM bundle. Some bundled deps (e.g.
|
|
8
|
+
// gray-matter, node-pty) are CJS and call `require("assert")` or similar;
|
|
9
|
+
// without this esbuild's interop shim throws "Dynamic require is not supported".
|
|
10
10
|
createRequire(import.meta.url);
|
|
11
11
|
|
|
12
12
|
// src/registry/runtime.ts
|
|
@@ -4,12 +4,12 @@ import { homedir } from 'os';
|
|
|
4
4
|
import { join, dirname } from 'path';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* @agentproto/cli v0.
|
|
7
|
+
* @agentproto/cli v0.4.0
|
|
8
8
|
* The `agentproto` binary — install / run / serve AIP-45 agent CLIs.
|
|
9
9
|
*/
|
|
10
|
-
// Provide a real `require` in the ESM bundle.
|
|
11
|
-
//
|
|
12
|
-
// esbuild's interop shim throws "Dynamic require is not supported".
|
|
10
|
+
// Provide a real `require` in the ESM bundle. Some bundled deps (e.g.
|
|
11
|
+
// gray-matter, node-pty) are CJS and call `require("assert")` or similar;
|
|
12
|
+
// without this esbuild's interop shim throws "Dynamic require is not supported".
|
|
13
13
|
createRequire(import.meta.url);
|
|
14
14
|
var FILE_VERSION = 1;
|
|
15
15
|
function credentialsPath() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentproto/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "@agentproto/cli — the `agentproto` binary. Install AIP-45 agent CLI adapters, run them locally, or expose them over a tunnel as a long-running daemon. Reference host for hermes / claude-code / opencode / gemini-cli / goose, all driven through @agentproto/driver-agent-cli.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentproto",
|
|
@@ -72,21 +72,17 @@
|
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@clack/prompts": "^1.5.0",
|
|
74
74
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
75
|
+
"@earendil-works/pi-tui": "^0.80.0",
|
|
76
|
+
"chalk": "^5.0.0",
|
|
75
77
|
"cli-highlight": "^2.1.11",
|
|
76
78
|
"gray-matter": "^4.0.3",
|
|
77
|
-
"ink": "^5.0.1",
|
|
78
|
-
"ink-spinner": "^5.0.0",
|
|
79
|
-
"ink-text-input": "^5.0.1",
|
|
80
|
-
"marked": "^14.0.0",
|
|
81
|
-
"marked-terminal": "^7.2.1",
|
|
82
|
-
"react": "^18.3.1",
|
|
83
79
|
"ws": "^8.20.0",
|
|
84
80
|
"zod": "^4.4.3",
|
|
85
|
-
"@agentproto/acp": "0.
|
|
81
|
+
"@agentproto/acp": "0.3.0",
|
|
86
82
|
"@agentproto/adapter-browser": "0.1.0",
|
|
87
83
|
"@agentproto/adapter-kit": "0.1.0",
|
|
88
84
|
"@agentproto/driver": "0.1.2",
|
|
89
|
-
"@agentproto/driver-agent-cli": "0.
|
|
85
|
+
"@agentproto/driver-agent-cli": "0.3.0",
|
|
90
86
|
"@agentproto/model-catalog": "0.2.0",
|
|
91
87
|
"@agentproto/runtime-profile-standard": "0.1.0"
|
|
92
88
|
},
|
|
@@ -94,21 +90,21 @@
|
|
|
94
90
|
"node-pty": "^1.0.0"
|
|
95
91
|
},
|
|
96
92
|
"devDependencies": {
|
|
97
|
-
"@types/marked-terminal": "^6.1.1",
|
|
98
93
|
"@types/node": "^25.6.2",
|
|
99
|
-
"@types/react": "^18.3.0",
|
|
100
94
|
"@types/ws": "^8.18.1",
|
|
101
95
|
"tsup": "^8.5.1",
|
|
102
96
|
"typescript": "^5.9.3",
|
|
103
97
|
"vitest": "^3.2.4",
|
|
104
|
-
"@agentproto/adapter-claude-code": "0.1.
|
|
105
|
-
"@agentproto/adapter-codex": "0.1.
|
|
106
|
-
"@agentproto/adapter-hermes": "0.1.
|
|
107
|
-
"@agentproto/adapter-mastra-agent": "0.1.
|
|
108
|
-
"@agentproto/adapter-
|
|
109
|
-
"@agentproto/adapter-
|
|
98
|
+
"@agentproto/adapter-claude-code": "0.1.1",
|
|
99
|
+
"@agentproto/adapter-codex": "0.1.1",
|
|
100
|
+
"@agentproto/adapter-hermes": "0.1.1",
|
|
101
|
+
"@agentproto/adapter-mastra-agent": "0.1.1",
|
|
102
|
+
"@agentproto/adapter-mastracode": "0.2.0",
|
|
103
|
+
"@agentproto/adapter-mastracode-inprocess": "0.2.0",
|
|
104
|
+
"@agentproto/adapter-openclaw": "0.1.1",
|
|
105
|
+
"@agentproto/adapter-opencode": "0.1.1",
|
|
110
106
|
"@agentproto/agent-runtime": "0.1.0-alpha.0",
|
|
111
|
-
"@agentproto/runtime": "0.
|
|
107
|
+
"@agentproto/runtime": "0.4.0",
|
|
112
108
|
"@agentproto/tooling": "0.1.0-alpha.0"
|
|
113
109
|
},
|
|
114
110
|
"engines": {
|
|
@@ -13,8 +13,8 @@ metadata:
|
|
|
13
13
|
## When to use
|
|
14
14
|
|
|
15
15
|
- Start / check / troubleshoot the agentproto daemon.
|
|
16
|
-
- Spawn or continue a multi-turn agent session (`
|
|
17
|
-
`
|
|
16
|
+
- Spawn or continue a multi-turn agent session (`agent_start`,
|
|
17
|
+
`agent_prompt`).
|
|
18
18
|
- Drive imported MCP tools proxied through the daemon (`mcp_imported_call`).
|
|
19
19
|
- Diagnose why `mcp__agentproto__*` tools are missing from a client session.
|
|
20
20
|
- Author or extend a tool/driver in `@agentproto/driver-agent-cli`.
|
|
@@ -121,22 +121,22 @@ the daemon is connected.
|
|
|
121
121
|
|
|
122
122
|
| Tool | Purpose |
|
|
123
123
|
|------|---------|
|
|
124
|
-
| `
|
|
125
|
-
| `
|
|
126
|
-
| `
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
|
|
131
|
-
**`
|
|
124
|
+
| `adapter_list` | Installed `@agentproto/adapter-*` slugs |
|
|
125
|
+
| `agent_start { adapter, cwd?, prompt?, label?, model? }` | Spawn a long-lived agent session → `{ sessionId }` |
|
|
126
|
+
| `agent_prompt { sessionId, prompt }` | Follow-up turn (queued if session is mid-turn) |
|
|
127
|
+
| `agent_output { sessionId, since?, lastN?, waitForTurnEnd?, timeoutMs? }` | Incremental cursor read; long-poll until turn ends |
|
|
128
|
+
| `agent_kill { sessionId }` | SIGTERM the session |
|
|
129
|
+
| `session_list { kind?, onlyAlive?, status? }` | All sessions |
|
|
130
|
+
|
|
131
|
+
**`agent_output` cursor pattern (eliminates polling):**
|
|
132
132
|
```
|
|
133
133
|
# First call — get initial context + seed cursor
|
|
134
|
-
out =
|
|
134
|
+
out = agent_output { sessionId, lastN: 20 }
|
|
135
135
|
cursor = out.nextCursor
|
|
136
136
|
|
|
137
137
|
# Send prompt, then long-poll for turn end
|
|
138
|
-
|
|
139
|
-
out =
|
|
138
|
+
agent_prompt { sessionId, prompt: "..." }
|
|
139
|
+
out = agent_output { sessionId, since: cursor, waitForTurnEnd: true }
|
|
140
140
|
# out.lines contains only the new lines from that turn
|
|
141
141
|
cursor = out.nextCursor
|
|
142
142
|
|
|
@@ -147,10 +147,10 @@ cursor = out.nextCursor
|
|
|
147
147
|
|
|
148
148
|
| Tool | Purpose |
|
|
149
149
|
|------|---------|
|
|
150
|
-
| `
|
|
151
|
-
| `
|
|
152
|
-
| `
|
|
153
|
-
| `
|
|
150
|
+
| `terminal_start { argv, cwd?, cols?, rows?, name? }` | PTY-backed process |
|
|
151
|
+
| `terminal_input { sessionId, text }` | Send keystrokes |
|
|
152
|
+
| `terminal_output { sessionId, lastBytes? }` | Snapshot (base64) |
|
|
153
|
+
| `terminal_kill { sessionId }` | SIGTERM |
|
|
154
154
|
|
|
155
155
|
**Tunnel:**
|
|
156
156
|
|
|
@@ -165,27 +165,27 @@ cursor = out.nextCursor
|
|
|
165
165
|
| Tool | Purpose |
|
|
166
166
|
|------|---------|
|
|
167
167
|
| `mcp_imported_status` | Health of every imported alias |
|
|
168
|
-
| `
|
|
169
|
-
| `
|
|
170
|
-
| `
|
|
168
|
+
| `mcp_imported_list` / `mcp_discovered_list` | Available MCPs |
|
|
169
|
+
| `mcp_import { sourceMcpId, alias? }` / `mcp_imported_remove { id }` | Curate |
|
|
170
|
+
| `mcp_imported_tool_list { alias }` | Tool list from an alias |
|
|
171
171
|
| `mcp_imported_call { alias, toolName, args? }` | Invoke a proxied tool |
|
|
172
172
|
|
|
173
173
|
**Filesystem (workspace-scoped):**
|
|
174
174
|
|
|
175
|
-
`
|
|
175
|
+
`file_read`, `file_write`, `directory_list`, `directory_create`, `file_delete`, `file_info`
|
|
176
176
|
|
|
177
177
|
**Shell (allowlist-gated):**
|
|
178
178
|
|
|
179
179
|
| Tool | Purpose |
|
|
180
180
|
|------|---------|
|
|
181
|
-
| `
|
|
181
|
+
| `command_execute { command, args?, cwd?, stdin?, timeoutMs?, async? }` | Sync by default; `async: true` → returns `{ commandId }` immediately |
|
|
182
182
|
| `get_command_output { commandId }` | Poll stdout/stderr/status of an async command |
|
|
183
183
|
| `cancel_command { commandId }` | SIGTERM a running async command |
|
|
184
184
|
|
|
185
185
|
**Async pattern for long commands (builds, `claude -p`, tests):**
|
|
186
186
|
```
|
|
187
187
|
# Start without blocking MCP transport
|
|
188
|
-
r =
|
|
188
|
+
r = command_execute { command: "pnpm", args: ["test"], async: true }
|
|
189
189
|
commandId = r.commandId
|
|
190
190
|
|
|
191
191
|
# Poll until done
|
|
@@ -201,7 +201,7 @@ out.exitCode, out.stdout, out.stderr
|
|
|
201
201
|
cancel_command { commandId }
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
**Allowlist setup (if
|
|
204
|
+
**Allowlist setup (if command_execute is blocked):**
|
|
205
205
|
```bash
|
|
206
206
|
# Dev preset — one-liner:
|
|
207
207
|
echo '{"version":1,"commands":["claude","gh","pnpm","node","git","npx"]}' > .agentproto/allowed-commands.json
|
|
@@ -213,12 +213,12 @@ The daemon's session tools are **deferred** in Claude Code. Keyword search
|
|
|
213
213
|
finds nothing — use exact-name `select:`:
|
|
214
214
|
|
|
215
215
|
```
|
|
216
|
-
ToolSearch("select:
|
|
216
|
+
ToolSearch("select:mcp__agentproto__agent_start,mcp__agentproto__session_list,mcp__agentproto__agent_output,mcp__agentproto__agent_prompt")
|
|
217
217
|
```
|
|
218
218
|
|
|
219
219
|
## Recovery playbook
|
|
220
220
|
|
|
221
|
-
**"
|
|
221
|
+
**"adapter_list returns empty"** — daemon was restarted but adapters weren't
|
|
222
222
|
re-installed on the global `NODE_PATH`:
|
|
223
223
|
```bash
|
|
224
224
|
agentproto install claude-code
|