acpx 0.1.5 → 0.1.7
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 +40 -7
- package/dist/cli.js +1168 -231
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="acpx_banner.svg" alt="acpx banner" width="100%" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# acpx
|
|
2
6
|
|
|
7
|
+
[](https://www.npmjs.com/package/acpx)
|
|
8
|
+
[](https://www.npmjs.com/package/acpx)
|
|
9
|
+
[](https://github.com/janitrai/acpx/actions/workflows/ci.yml)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
[](https://nodejs.org)
|
|
12
|
+
|
|
3
13
|
Your agents love acpx! 🤖❤️ They hate having to scrape characters from a PTY session 😤
|
|
4
14
|
|
|
5
15
|
`acpx` is a headless CLI client for the [Agent Client Protocol (ACP)](https://agentclientprotocol.com), so AI agents and orchestrators can talk to coding agents over a structured protocol instead of PTY scraping.
|
|
@@ -63,14 +73,14 @@ Copy the block below and paste it into your OpenClaw, Pi, Claude Code, or simila
|
|
|
63
73
|
I want you to use acpx to run coding agents over the Agent Client Protocol
|
|
64
74
|
(ACP) instead of scraping PTY sessions. Please do the following:
|
|
65
75
|
|
|
66
|
-
1. Install acpx (
|
|
76
|
+
1. Install acpx globally (recommended) or use npx:
|
|
67
77
|
npm install -g acpx@latest
|
|
68
78
|
|
|
69
|
-
Or
|
|
79
|
+
Or without installing:
|
|
70
80
|
npx acpx@latest
|
|
71
81
|
|
|
72
82
|
2. Install the acpx skill so you have the full reference available:
|
|
73
|
-
acpx --skill
|
|
83
|
+
npx acpx@latest --skill install acpx
|
|
74
84
|
|
|
75
85
|
3. Read the acpx skill reference so you know every command, flag, and
|
|
76
86
|
workflow pattern:
|
|
@@ -81,9 +91,9 @@ I want you to use acpx to run coding agents over the Agent Client Protocol
|
|
|
81
91
|
|
|
82
92
|
From now on, when you need to delegate work to a coding agent, use acpx
|
|
83
93
|
instead of spawning raw terminal sessions. For example:
|
|
84
|
-
acpx codex "fix the failing tests"
|
|
85
|
-
acpx claude "refactor the auth module"
|
|
86
|
-
acpx codex exec "one-shot: summarize this repo"
|
|
94
|
+
npx acpx@latest codex "fix the failing tests"
|
|
95
|
+
npx acpx@latest claude "refactor the auth module"
|
|
96
|
+
npx acpx@latest codex exec "one-shot: summarize this repo"
|
|
87
97
|
```
|
|
88
98
|
|
|
89
99
|
## Install
|
|
@@ -139,6 +149,8 @@ acpx codex sessions show # inspect cwd session metadata
|
|
|
139
149
|
acpx codex sessions history # show recent turn history
|
|
140
150
|
acpx codex sessions new # create fresh cwd-scoped default session
|
|
141
151
|
acpx codex sessions new --name api # create fresh named session
|
|
152
|
+
acpx codex sessions ensure # return existing scoped session or create one
|
|
153
|
+
acpx codex sessions ensure --name api # ensure named scoped session
|
|
142
154
|
acpx codex sessions close # close cwd-scoped default session
|
|
143
155
|
acpx codex sessions close api # close cwd-scoped named session
|
|
144
156
|
acpx codex status # local process status for current session
|
|
@@ -171,10 +183,12 @@ acpx codex -s release 'draft release notes from recent commits'
|
|
|
171
183
|
acpx --approve-all codex 'apply the patch and run tests'
|
|
172
184
|
acpx --approve-reads codex 'inspect repo structure and suggest plan' # default mode
|
|
173
185
|
acpx --deny-all codex 'explain what you can do without tool access'
|
|
186
|
+
acpx --non-interactive-permissions fail codex 'fail instead of deny in non-TTY'
|
|
174
187
|
|
|
175
188
|
acpx --cwd ~/repos/backend codex 'review recent auth changes'
|
|
176
189
|
acpx --format text codex 'summarize your findings'
|
|
177
190
|
acpx --format json codex exec 'review changed files'
|
|
191
|
+
acpx --format json --json-strict codex exec 'machine-safe JSON only'
|
|
178
192
|
acpx --format quiet codex 'final recommendation only'
|
|
179
193
|
|
|
180
194
|
acpx --timeout 90 codex 'investigate intermittent test timeout'
|
|
@@ -197,6 +211,8 @@ Supported keys:
|
|
|
197
211
|
{
|
|
198
212
|
"defaultAgent": "codex",
|
|
199
213
|
"defaultPermissions": "approve-all",
|
|
214
|
+
"nonInteractivePermissions": "deny",
|
|
215
|
+
"authPolicy": "skip",
|
|
200
216
|
"ttl": 300,
|
|
201
217
|
"timeout": null,
|
|
202
218
|
"format": "text",
|
|
@@ -221,10 +237,26 @@ acpx codex 'review this PR'
|
|
|
221
237
|
acpx --format json codex exec 'review this PR' \
|
|
222
238
|
| jq -r 'select(.type=="tool_call") | [.status, .title] | @tsv'
|
|
223
239
|
|
|
240
|
+
# json-strict: suppresses non-JSON stderr output (requires --format json)
|
|
241
|
+
acpx --format json --json-strict codex exec 'review this PR'
|
|
242
|
+
|
|
224
243
|
# quiet: final assistant text only
|
|
225
244
|
acpx --format quiet codex 'give me a 3-line summary'
|
|
226
245
|
```
|
|
227
246
|
|
|
247
|
+
JSON events include a stable envelope for correlation:
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"eventVersion": 1,
|
|
252
|
+
"sessionId": "abc123",
|
|
253
|
+
"requestId": "req-42",
|
|
254
|
+
"seq": 7,
|
|
255
|
+
"stream": "prompt",
|
|
256
|
+
"type": "tool_call"
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
228
260
|
## Built-in agents and custom servers
|
|
229
261
|
|
|
230
262
|
Built-ins:
|
|
@@ -245,11 +277,12 @@ acpx --agent ./my-custom-acp-server 'do something'
|
|
|
245
277
|
|
|
246
278
|
## Session behavior
|
|
247
279
|
|
|
248
|
-
- Prompt commands require an existing saved session record (created via `sessions new`).
|
|
280
|
+
- Prompt commands require an existing saved session record (created via `sessions new` or `sessions ensure`).
|
|
249
281
|
- Prompts route by walking up from `cwd` (or `--cwd`) to the nearest git root (inclusive) and selecting the nearest active session matching `(agent command, dir, optional name)`.
|
|
250
282
|
- If no git root is found, prompts only match an exact `cwd` session (no parent-directory walk).
|
|
251
283
|
- `-s <name>` selects a parallel named session during that directory walk.
|
|
252
284
|
- `sessions new [--name <name>]` creates a fresh session for that scope and soft-closes the prior one.
|
|
285
|
+
- `sessions ensure [--name <name>]` is idempotent: it returns an existing scoped session or creates one when missing.
|
|
253
286
|
- `sessions close [name]` soft-closes the session: queue owner/processes are terminated, record is kept with `closed: true`.
|
|
254
287
|
- Auto-resume for cwd scope skips sessions marked closed.
|
|
255
288
|
- Prompt submissions are queue-aware per session. If a prompt is already running, new prompts are queued and drained by the running `acpx` process.
|