acpx 0.1.6 → 0.1.8

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Janitr AI
3
+ Copyright (c) 2025 OpenClaw Team
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -6,10 +6,13 @@
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/acpx.svg)](https://www.npmjs.com/package/acpx)
8
8
  [![npm downloads](https://img.shields.io/npm/dm/acpx.svg)](https://www.npmjs.com/package/acpx)
9
- [![CI](https://github.com/janitrai/acpx/actions/workflows/ci.yml/badge.svg)](https://github.com/janitrai/acpx/actions/workflows/ci.yml)
9
+ [![CI](https://github.com/openclaw/acpx/actions/workflows/ci.yml/badge.svg)](https://github.com/openclaw/acpx/actions/workflows/ci.yml)
10
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
11
  [![Node.js](https://img.shields.io/node/v/acpx.svg)](https://nodejs.org)
12
12
 
13
+ > Alpha notice: `acpx` is in alpha and the CLI/runtime interfaces are likely to change.
14
+ > ACP coverage status: see [ACP Spec Coverage Roadmap](docs/2026-02-19-acp-coverage-roadmap.md).
15
+
13
16
  Your agents love acpx! 🤖❤️ They hate having to scrape characters from a PTY session 😤
14
17
 
15
18
  `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.
@@ -73,15 +76,21 @@ Copy the block below and paste it into your OpenClaw, Pi, Claude Code, or simila
73
76
  I want you to use acpx to run coding agents over the Agent Client Protocol
74
77
  (ACP) instead of scraping PTY sessions. Please do the following:
75
78
 
76
- 1. Install the acpx skill so you have the full reference available:
79
+ 1. Install acpx globally (recommended) or use npx:
80
+ npm install -g acpx@latest
81
+
82
+ Or without installing:
83
+ npx acpx@latest
84
+
85
+ 2. Install the acpx skill so you have the full reference available:
77
86
  npx acpx@latest --skill install acpx
78
87
 
79
- 2. Read the acpx skill reference so you know every command, flag, and
88
+ 3. Read the acpx skill reference so you know every command, flag, and
80
89
  workflow pattern:
81
- https://raw.githubusercontent.com/janitrai/acpx/main/skills/acpx/SKILL.md
90
+ https://raw.githubusercontent.com/openclaw/acpx/main/skills/acpx/SKILL.md
82
91
 
83
- 3. If you need the full CLI reference with all options and examples:
84
- https://raw.githubusercontent.com/janitrai/acpx/main/docs/CLI.md
92
+ 4. If you need the full CLI reference with all options and examples:
93
+ https://raw.githubusercontent.com/openclaw/acpx/main/docs/CLI.md
85
94
 
86
95
  From now on, when you need to delegate work to a coding agent, use acpx
87
96
  instead of spawning raw terminal sessions. For example:
@@ -143,6 +152,8 @@ acpx codex sessions show # inspect cwd session metadata
143
152
  acpx codex sessions history # show recent turn history
144
153
  acpx codex sessions new # create fresh cwd-scoped default session
145
154
  acpx codex sessions new --name api # create fresh named session
155
+ acpx codex sessions ensure # return existing scoped session or create one
156
+ acpx codex sessions ensure --name api # ensure named scoped session
146
157
  acpx codex sessions close # close cwd-scoped default session
147
158
  acpx codex sessions close api # close cwd-scoped named session
148
159
  acpx codex status # local process status for current session
@@ -175,10 +186,12 @@ acpx codex -s release 'draft release notes from recent commits'
175
186
  acpx --approve-all codex 'apply the patch and run tests'
176
187
  acpx --approve-reads codex 'inspect repo structure and suggest plan' # default mode
177
188
  acpx --deny-all codex 'explain what you can do without tool access'
189
+ acpx --non-interactive-permissions fail codex 'fail instead of deny in non-TTY'
178
190
 
179
191
  acpx --cwd ~/repos/backend codex 'review recent auth changes'
180
192
  acpx --format text codex 'summarize your findings'
181
193
  acpx --format json codex exec 'review changed files'
194
+ acpx --format json --json-strict codex exec 'machine-safe JSON only'
182
195
  acpx --format quiet codex 'final recommendation only'
183
196
 
184
197
  acpx --timeout 90 codex 'investigate intermittent test timeout'
@@ -201,6 +214,8 @@ Supported keys:
201
214
  {
202
215
  "defaultAgent": "codex",
203
216
  "defaultPermissions": "approve-all",
217
+ "nonInteractivePermissions": "deny",
218
+ "authPolicy": "skip",
204
219
  "ttl": 300,
205
220
  "timeout": null,
206
221
  "format": "text",
@@ -225,10 +240,29 @@ acpx codex 'review this PR'
225
240
  acpx --format json codex exec 'review this PR' \
226
241
  | jq -r 'select(.type=="tool_call") | [.status, .title] | @tsv'
227
242
 
243
+ # json-strict: suppresses non-JSON stderr output (requires --format json)
244
+ acpx --format json --json-strict codex exec 'review this PR'
245
+
228
246
  # quiet: final assistant text only
229
247
  acpx --format quiet codex 'give me a 3-line summary'
230
248
  ```
231
249
 
250
+ JSON events include a stable envelope for correlation:
251
+
252
+ ```json
253
+ {
254
+ "eventVersion": 1,
255
+ "sessionId": "abc123",
256
+ "requestId": "req-42",
257
+ "seq": 7,
258
+ "stream": "prompt",
259
+ "type": "tool_call"
260
+ }
261
+ ```
262
+
263
+ Session-control JSON payloads (`sessions new|ensure`, `status`) may also include
264
+ `runtimeSessionId` when the adapter exposes a provider-native session ID.
265
+
232
266
  ## Built-in agents and custom servers
233
267
 
234
268
  Built-ins:
@@ -249,11 +283,12 @@ acpx --agent ./my-custom-acp-server 'do something'
249
283
 
250
284
  ## Session behavior
251
285
 
252
- - Prompt commands require an existing saved session record (created via `sessions new`).
286
+ - Prompt commands require an existing saved session record (created via `sessions new` or `sessions ensure`).
253
287
  - 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
288
  - If no git root is found, prompts only match an exact `cwd` session (no parent-directory walk).
255
289
  - `-s <name>` selects a parallel named session during that directory walk.
256
290
  - `sessions new [--name <name>]` creates a fresh session for that scope and soft-closes the prior one.
291
+ - `sessions ensure [--name <name>]` is idempotent: it returns an existing scoped session or creates one when missing.
257
292
  - `sessions close [name]` soft-closes the session: queue owner/processes are terminated, record is kept with `closed: true`.
258
293
  - Auto-resume for cwd scope skips sessions marked closed.
259
294
  - Prompt submissions are queue-aware per session. If a prompt is already running, new prompts are queued and drained by the running `acpx` process.
package/dist/cli.d.ts CHANGED
@@ -10,6 +10,7 @@ type SessionHistoryEntry = {
10
10
  type SessionRecord = {
11
11
  id: string;
12
12
  sessionId: string;
13
+ runtimeSessionId?: string;
13
14
  agentCommand: string;
14
15
  cwd: string;
15
16
  name?: string;