acpx 0.1.6 → 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 +33 -4
- package/dist/cli.js +1168 -231
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -73,14 +73,20 @@ Copy the block below and paste it into your OpenClaw, Pi, Claude Code, or simila
|
|
|
73
73
|
I want you to use acpx to run coding agents over the Agent Client Protocol
|
|
74
74
|
(ACP) instead of scraping PTY sessions. Please do the following:
|
|
75
75
|
|
|
76
|
-
1. Install
|
|
76
|
+
1. Install acpx globally (recommended) or use npx:
|
|
77
|
+
npm install -g acpx@latest
|
|
78
|
+
|
|
79
|
+
Or without installing:
|
|
80
|
+
npx acpx@latest
|
|
81
|
+
|
|
82
|
+
2. Install the acpx skill so you have the full reference available:
|
|
77
83
|
npx acpx@latest --skill install acpx
|
|
78
84
|
|
|
79
|
-
|
|
85
|
+
3. Read the acpx skill reference so you know every command, flag, and
|
|
80
86
|
workflow pattern:
|
|
81
87
|
https://raw.githubusercontent.com/janitrai/acpx/main/skills/acpx/SKILL.md
|
|
82
88
|
|
|
83
|
-
|
|
89
|
+
4. If you need the full CLI reference with all options and examples:
|
|
84
90
|
https://raw.githubusercontent.com/janitrai/acpx/main/docs/CLI.md
|
|
85
91
|
|
|
86
92
|
From now on, when you need to delegate work to a coding agent, use acpx
|
|
@@ -143,6 +149,8 @@ acpx codex sessions show # inspect cwd session metadata
|
|
|
143
149
|
acpx codex sessions history # show recent turn history
|
|
144
150
|
acpx codex sessions new # create fresh cwd-scoped default session
|
|
145
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
|
|
146
154
|
acpx codex sessions close # close cwd-scoped default session
|
|
147
155
|
acpx codex sessions close api # close cwd-scoped named session
|
|
148
156
|
acpx codex status # local process status for current session
|
|
@@ -175,10 +183,12 @@ acpx codex -s release 'draft release notes from recent commits'
|
|
|
175
183
|
acpx --approve-all codex 'apply the patch and run tests'
|
|
176
184
|
acpx --approve-reads codex 'inspect repo structure and suggest plan' # default mode
|
|
177
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'
|
|
178
187
|
|
|
179
188
|
acpx --cwd ~/repos/backend codex 'review recent auth changes'
|
|
180
189
|
acpx --format text codex 'summarize your findings'
|
|
181
190
|
acpx --format json codex exec 'review changed files'
|
|
191
|
+
acpx --format json --json-strict codex exec 'machine-safe JSON only'
|
|
182
192
|
acpx --format quiet codex 'final recommendation only'
|
|
183
193
|
|
|
184
194
|
acpx --timeout 90 codex 'investigate intermittent test timeout'
|
|
@@ -201,6 +211,8 @@ Supported keys:
|
|
|
201
211
|
{
|
|
202
212
|
"defaultAgent": "codex",
|
|
203
213
|
"defaultPermissions": "approve-all",
|
|
214
|
+
"nonInteractivePermissions": "deny",
|
|
215
|
+
"authPolicy": "skip",
|
|
204
216
|
"ttl": 300,
|
|
205
217
|
"timeout": null,
|
|
206
218
|
"format": "text",
|
|
@@ -225,10 +237,26 @@ acpx codex 'review this PR'
|
|
|
225
237
|
acpx --format json codex exec 'review this PR' \
|
|
226
238
|
| jq -r 'select(.type=="tool_call") | [.status, .title] | @tsv'
|
|
227
239
|
|
|
240
|
+
# json-strict: suppresses non-JSON stderr output (requires --format json)
|
|
241
|
+
acpx --format json --json-strict codex exec 'review this PR'
|
|
242
|
+
|
|
228
243
|
# quiet: final assistant text only
|
|
229
244
|
acpx --format quiet codex 'give me a 3-line summary'
|
|
230
245
|
```
|
|
231
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
|
+
|
|
232
260
|
## Built-in agents and custom servers
|
|
233
261
|
|
|
234
262
|
Built-ins:
|
|
@@ -249,11 +277,12 @@ acpx --agent ./my-custom-acp-server 'do something'
|
|
|
249
277
|
|
|
250
278
|
## Session behavior
|
|
251
279
|
|
|
252
|
-
- 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`).
|
|
253
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)`.
|
|
254
282
|
- If no git root is found, prompts only match an exact `cwd` session (no parent-directory walk).
|
|
255
283
|
- `-s <name>` selects a parallel named session during that directory walk.
|
|
256
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.
|
|
257
286
|
- `sessions close [name]` soft-closes the session: queue owner/processes are terminated, record is kept with `closed: true`.
|
|
258
287
|
- Auto-resume for cwd scope skips sessions marked closed.
|
|
259
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.
|