@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.
@@ -6,12 +6,12 @@ import matter from 'gray-matter';
6
6
  import { spawn } from 'child_process';
7
7
 
8
8
  /**
9
- * @agentproto/cli v0.3.0
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. Bundling the Ink stack pulls in
13
- // CJS deps (e.g. signal-exit@3) that call `require("assert")`; without this
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.3.0
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. Bundling the Ink stack pulls in
9
- // CJS deps (e.g. signal-exit@3) that call `require("assert")`; without this
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.3.0
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. Bundling the Ink stack pulls in
14
- // CJS deps (e.g. signal-exit@3) that call `require("assert")`; without this
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.3.0
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. Bundling the Ink stack pulls in
8
- // CJS deps (e.g. signal-exit@3) that call `require("assert")`; without this
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.3.0
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. Bundling the Ink stack pulls in
11
- // CJS deps (e.g. signal-exit@3) that call `require("assert")`; without this
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.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.2.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.2.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.0",
105
- "@agentproto/adapter-codex": "0.1.0",
106
- "@agentproto/adapter-hermes": "0.1.0",
107
- "@agentproto/adapter-mastra-agent": "0.1.0",
108
- "@agentproto/adapter-openclaw": "0.1.0",
109
- "@agentproto/adapter-opencode": "0.1.0",
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.3.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 (`start_agent_session`,
17
- `prompt_agent_session`).
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
- | `list_adapters` | Installed `@agentproto/adapter-*` slugs |
125
- | `start_agent_session { adapter, cwd?, prompt?, label?, model? }` | Spawn a long-lived agent session → `{ sessionId }` |
126
- | `prompt_agent_session { sessionId, prompt }` | Follow-up turn (queued if session is mid-turn) |
127
- | `get_agent_session_output { sessionId, since?, lastN?, waitForTurnEnd?, timeoutMs? }` | Incremental cursor read; long-poll until turn ends |
128
- | `kill_agent_session { sessionId }` | SIGTERM the session |
129
- | `list_sessions { kind?, onlyAlive?, status? }` | All sessions |
130
-
131
- **`get_agent_session_output` cursor pattern (eliminates polling):**
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 = get_agent_session_output { sessionId, lastN: 20 }
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
- prompt_agent_session { sessionId, prompt: "..." }
139
- out = get_agent_session_output { sessionId, since: cursor, waitForTurnEnd: true }
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
- | `start_terminal_session { argv, cwd?, cols?, rows?, name? }` | PTY-backed process |
151
- | `write_terminal_input { sessionId, text }` | Send keystrokes |
152
- | `read_terminal_output { sessionId, lastBytes? }` | Snapshot (base64) |
153
- | `kill_terminal_session { sessionId }` | SIGTERM |
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
- | `list_imported_mcps` / `list_discovered_mcps` | Available MCPs |
169
- | `import_mcp { sourceMcpId, alias? }` / `remove_imported_mcp { id }` | Curate |
170
- | `mcp_imported_list_tools { alias }` | Tool list from an alias |
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
- `read_file`, `write_file`, `list_directory`, `create_directory`, `delete_file`, `get_file_info`
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
- | `execute_command { command, args?, cwd?, stdin?, timeoutMs?, async? }` | Sync by default; `async: true` → returns `{ commandId }` immediately |
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 = execute_command { command: "pnpm", args: ["test"], async: true }
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 execute_command is blocked):**
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:mcp__agentproto__start_agent_session,mcp__agentproto__list_sessions,mcp__agentproto__get_agent_session_output,mcp__agentproto__prompt_agent_session")
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
- **"list_adapters returns empty"** — daemon was restarted but adapters weren't
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