@1agents/acp-service 0.10.11 → 0.11.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 +26 -0
- package/dist/bin/acp-service.js +6 -0
- package/dist/bin/dsh.d.ts +21 -0
- package/dist/bin/dsh.js +171 -0
- package/dist/src/catalog.js +13 -3
- package/dist/src/dsh-archive.d.ts +123 -0
- package/dist/src/dsh-archive.js +99 -0
- package/dist/src/dsh-host-client.d.ts +97 -0
- package/dist/src/dsh-host-client.js +275 -0
- package/dist/src/dsh-registry-file.d.ts +22 -0
- package/dist/src/dsh-registry-file.js +55 -0
- package/dist/src/dsh-session-files.d.ts +7 -0
- package/dist/src/dsh-session-files.js +63 -0
- package/dist/src/dsh.js +1 -1
- package/package.json +4 -4
- package/skills/acp-service/SKILL.md +1 -1
- package/vendor/dsh/README.md +1 -20
- package/vendor/dsh/index.d.ts +1 -4
- package/vendor/dsh/index.js +0 -17
- package/vendor/runtime/README.md +36 -11
- package/vendor/runtime/dist/{agent-registry-DxcyXXqb.js → agent-registry-CsdsVpJb.js} +209 -177
- package/vendor/runtime/dist/agent-registry-CsdsVpJb.js.map +1 -0
- package/vendor/runtime/dist/agent-registry.d.ts +0 -2
- package/vendor/runtime/dist/agent-registry.d.ts.map +1 -1
- package/vendor/runtime/dist/agent-registry.js +1 -1
- package/vendor/runtime/dist/{cli-BKmMxgix.js → cli-B5gQOSDl.js} +33 -14
- package/vendor/runtime/dist/cli-B5gQOSDl.js.map +1 -0
- package/vendor/runtime/dist/cli.d.ts +2 -6
- package/vendor/runtime/dist/cli.d.ts.map +1 -1
- package/vendor/runtime/dist/cli.js +189 -164
- package/vendor/runtime/dist/cli.js.map +1 -1
- package/vendor/runtime/dist/{client-C5zneoBs.d.ts → client-D5y4RXME.d.ts} +4 -12
- package/vendor/runtime/dist/client-D5y4RXME.d.ts.map +1 -0
- package/vendor/runtime/dist/docs-site/CLI.html +19 -21
- package/vendor/runtime/dist/docs-site/VISION.html +3 -2
- package/vendor/runtime/dist/docs-site/agents.html +10 -15
- package/vendor/runtime/dist/docs-site/assets/agents/Apache-2.0.txt +202 -0
- package/vendor/runtime/dist/docs-site/assets/agents/LobeHub-MIT.txt +21 -0
- package/vendor/runtime/dist/docs-site/assets/agents/Mux-AGPL-3.0.txt +661 -0
- package/vendor/runtime/dist/docs-site/assets/agents/README.md +41 -0
- package/vendor/runtime/dist/docs-site/assets/agents/ante.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/antigravity.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/claude.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/codex.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/copilot.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/cursor.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/deepseek-harness.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/devin.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/droid.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/fast-agent.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/fx.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/gemini.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/goose.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/grok-build.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/iflow.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/junie.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/kilocode.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/kimi.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/kiro.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/mcode.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/mux.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/octomind.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/openclaw.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/opencode.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/pi.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/pool.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/qoder.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/qwen.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/trae.png +0 -0
- package/vendor/runtime/dist/docs-site/assets/agents/zeroclaw.png +0 -0
- package/vendor/runtime/dist/docs-site/compare.html +8 -7
- package/vendor/runtime/dist/docs-site/config.html +5 -4
- package/vendor/runtime/dist/docs-site/custom-agents.html +13 -13
- package/vendor/runtime/dist/docs-site/exit-codes.html +4 -3
- package/vendor/runtime/dist/docs-site/flows.html +21 -8
- package/vendor/runtime/dist/docs-site/index.html +7 -6
- package/vendor/runtime/dist/docs-site/install.html +7 -6
- package/vendor/runtime/dist/docs-site/llms.txt +6 -6
- package/vendor/runtime/dist/docs-site/output-formats.html +9 -8
- package/vendor/runtime/dist/docs-site/permissions.html +5 -4
- package/vendor/runtime/dist/docs-site/prompting.html +9 -7
- package/vendor/runtime/dist/docs-site/quickstart.html +5 -4
- package/vendor/runtime/dist/docs-site/releasing.html +9 -8
- package/vendor/runtime/dist/docs-site/runtime-environment.html +28 -5
- package/vendor/runtime/dist/docs-site/runtime-process-lifecycle.html +13 -7
- package/vendor/runtime/dist/docs-site/safe-errors.html +3 -2
- package/vendor/runtime/dist/docs-site/session-control.html +7 -6
- package/vendor/runtime/dist/docs-site/session-watch.html +6 -5
- package/vendor/runtime/dist/docs-site/sessions.html +13 -10
- package/vendor/runtime/dist/docs-site/shared-sessions.html +7 -4
- package/vendor/runtime/dist/{flows-VrII9VKZ.js → flows-CDj5YcTh.js} +136 -68
- package/vendor/runtime/dist/flows-CDj5YcTh.js.map +1 -0
- package/vendor/runtime/dist/flows.d.ts +28 -19
- package/vendor/runtime/dist/flows.d.ts.map +1 -1
- package/vendor/runtime/dist/flows.js +1 -1
- package/vendor/runtime/dist/{invocation-options-DHMZ5Rrb.js → input-file-BsfVGZgn.js} +30 -15
- package/vendor/runtime/dist/input-file-BsfVGZgn.js.map +1 -0
- package/vendor/runtime/dist/{ipc-CNNM5DP_.js → ipc-DfqJsbk6.js} +114 -146
- package/vendor/runtime/dist/ipc-DfqJsbk6.js.map +1 -0
- package/vendor/runtime/dist/{output-DtzXtiBc.js → output-DOIF4iFc.js} +20 -47
- package/vendor/runtime/dist/output-DOIF4iFc.js.map +1 -0
- package/vendor/runtime/dist/{queue-owner-runtime-ehuh3SQU.js → queue-owner-runtime-DHBQbjXo.js} +394 -258
- package/vendor/runtime/dist/queue-owner-runtime-DHBQbjXo.js.map +1 -0
- package/vendor/runtime/dist/runtime.d.ts +37 -36
- package/vendor/runtime/dist/runtime.d.ts.map +1 -1
- package/vendor/runtime/dist/runtime.js +117 -172
- package/vendor/runtime/dist/runtime.js.map +1 -1
- package/vendor/runtime/dist/{session-options-NjpFwf-c.d.ts → session-options-Ci4aw1oD.d.ts} +13 -16
- package/vendor/runtime/dist/session-options-Ci4aw1oD.d.ts.map +1 -0
- package/vendor/runtime/dist/{session-watch-CbKfGRkZ.js → session-watch-DRwFHcWw.js} +5 -6
- package/vendor/runtime/dist/{session-watch-CbKfGRkZ.js.map → session-watch-DRwFHcWw.js.map} +1 -1
- package/vendor/runtime/dist/{watch-BGt4kcE6.js → watch-CUDGkljG.js} +3 -4
- package/vendor/runtime/dist/{watch-BGt4kcE6.js.map → watch-CUDGkljG.js.map} +1 -1
- package/vendor/runtime/package.json +3 -3
- package/vendor/runtime/skills/acpx/SKILL.md +42 -11
- package/vendor/dsh/auto-archive.d.ts +0 -103
- package/vendor/dsh/auto-archive.js +0 -175
- package/vendor/runtime/dist/agent-registry-DxcyXXqb.js.map +0 -1
- package/vendor/runtime/dist/cli-BKmMxgix.js.map +0 -1
- package/vendor/runtime/dist/client-C5zneoBs.d.ts.map +0 -1
- package/vendor/runtime/dist/flows-VrII9VKZ.js.map +0 -1
- package/vendor/runtime/dist/invocation-options-DHMZ5Rrb.js.map +0 -1
- package/vendor/runtime/dist/ipc-CNNM5DP_.js.map +0 -1
- package/vendor/runtime/dist/output-DtzXtiBc.js.map +0 -1
- package/vendor/runtime/dist/queue-owner-runtime-ehuh3SQU.js.map +0 -1
- package/vendor/runtime/dist/session-options-NjpFwf-c.d.ts.map +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Agent logo credits
|
|
2
|
+
|
|
3
|
+
These 40 × 40 PNGs are resized from the sources below. A white background preserves contrast in light and dark themes. Brand names and marks belong to their owners; inclusion identifies launch profiles and does not imply endorsement.
|
|
4
|
+
|
|
5
|
+
- LobeHub icons: copyright (c) 2023 LobeHub; [MIT license](LobeHub-MIT.txt).
|
|
6
|
+
- Ante, fast-agent, Octomind, and ZeroClaw: upstream repositories use [Apache 2.0](Apache-2.0.txt).
|
|
7
|
+
- Mux: upstream repository uses [AGPL 3.0](Mux-AGPL-3.0.txt).
|
|
8
|
+
- Droid, fx, and iFlow: official site favicons; no separate asset license is stated here.
|
|
9
|
+
|
|
10
|
+
| Profile | Source |
|
|
11
|
+
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
12
|
+
| `pi` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/pi.svg) |
|
|
13
|
+
| `openclaw` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/openclaw-color.svg) |
|
|
14
|
+
| `codex` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/openai.svg) |
|
|
15
|
+
| `claude` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/claudecode-color.svg) |
|
|
16
|
+
| `gemini` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/geminicli-color.svg) |
|
|
17
|
+
| `cursor` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/cursor.svg) |
|
|
18
|
+
| `copilot` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/githubcopilot.svg) |
|
|
19
|
+
| `antigravity` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/antigravity-color.svg) |
|
|
20
|
+
| `deepseek-harness` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/deepseek-color.svg) |
|
|
21
|
+
| `devin` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/devin-color.svg) |
|
|
22
|
+
| `goose` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/goose.svg) |
|
|
23
|
+
| `grok-build` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/grok.svg) |
|
|
24
|
+
| `junie` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/junie-color.svg) |
|
|
25
|
+
| `kilocode` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/kilocode.svg) |
|
|
26
|
+
| `kimi` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/kimi-color.svg) |
|
|
27
|
+
| `kiro` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/kiro-color.svg) |
|
|
28
|
+
| `mcode` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/minimax-color.svg) |
|
|
29
|
+
| `opencode` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/opencode.svg) |
|
|
30
|
+
| `pool` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/poolside-color.svg) |
|
|
31
|
+
| `qoder` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/qoder-color.svg) |
|
|
32
|
+
| `qwen` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/qwen-color.svg) |
|
|
33
|
+
| `trae` | [Original](https://raw.githubusercontent.com/lobehub/lobe-icons/8b7bbc433d38437fa2b0cca58ae896917162b812/packages/static-svg/icons/trae-color.svg) |
|
|
34
|
+
| `ante` | [Original](https://raw.githubusercontent.com/AntigmaLabs/ante/e38c7c75a1c7b9fa3a192854392cee151790024b/docs-site/static/assets/antigma-logo.svg) |
|
|
35
|
+
| `droid` | [Original](https://factory.com/favicon.svg) |
|
|
36
|
+
| `fast-agent` | [Original](https://raw.githubusercontent.com/evalstate/fast-agent/3d77d78eee2f9160ca6c290ded47fc47825d2b3d/docs/docs/assets/brand/fast-agent-icon.svg) |
|
|
37
|
+
| `fx` | [Original](https://fx.sh/favicon.png) |
|
|
38
|
+
| `iflow` | [Original](https://cli.iflow.cn/img/favicon.ico) |
|
|
39
|
+
| `mux` | [Original](https://raw.githubusercontent.com/coder/mux/89a8d14e1777f5023bd311d3933c77d86d061f35/docs/favicon.svg) |
|
|
40
|
+
| `octomind` | [Original](https://raw.githubusercontent.com/muvon/octomind/38dfe3e22c5f115b307ef084df7c52c1f23f3edb/assets/octomind-icon.svg) |
|
|
41
|
+
| `zeroclaw` | [Original](https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/4c9edcf33716381b2c3455649cbd0f3e6b3a38b1/apps/tauri/icons/32x32.png) |
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -170,7 +170,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
170
170
|
.doc pre .copy.copied{background:var(--accent);border-color:var(--accent);color:#04121d;opacity:1}
|
|
171
171
|
.doc blockquote{margin:1.4em 0;padding:10px 16px;border-left:3px solid var(--accent);background:var(--accent-soft);border-radius:0 8px 8px 0;color:var(--text)}
|
|
172
172
|
.doc blockquote p:last-child{margin-bottom:0}
|
|
173
|
-
.doc table{
|
|
173
|
+
.doc .table-scroll{overflow-x:auto;margin:1.2em 0}
|
|
174
|
+
.doc table{width:100%;border-collapse:collapse;margin:0;font-size:.92em}
|
|
174
175
|
.doc th,.doc td{border-bottom:1px solid var(--line);padding:9px 10px;text-align:left;vertical-align:top}
|
|
175
176
|
.doc th{font-weight:600;color:var(--ink);background:var(--line-soft);border-bottom:1px solid var(--line)}
|
|
176
177
|
.doc hr{border:0;border-top:1px solid var(--line);margin:2.2em 0}
|
|
@@ -236,12 +237,12 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
236
237
|
</button>
|
|
237
238
|
</div>
|
|
238
239
|
<label class="search"><span>Search</span><input id="doc-search" type="search" placeholder="sessions, flows, json…"></label>
|
|
239
|
-
<nav><section><h2>Start</h2><a class="nav-link" href="./">Overview</a><a class="nav-link" href="install.html">Install</a><a class="nav-link" href="quickstart.html">Quickstart</a></section><section><h2>Agents</h2><a class="nav-link" href="agents.html">Agents</a><a class="nav-link" href="custom-agents.html">Custom agents</a></section><section><h2>Sessions</h2><a class="nav-link" href="sessions.html">Sessions</a><a class="nav-link" href="prompting.html">Prompting</a><a class="nav-link" href="session-control.html">Session control</a></section><section><h2>Output & Policy</h2><a class="nav-link" href="output-formats.html">Output formats</a><a class="nav-link" href="permissions.html">Permissions</a><a class="nav-link" href="config.html">Config</a></section><section><h2>Flows</h2><a class="nav-link" href="flows.html">Flows</a></section><section><h2>Reference</h2><a class="nav-link" href="CLI.html">CLI Reference</a><a class="nav-link" href="exit-codes.html">Exit codes</a><a class="nav-link" href="VISION.html">Vision</a></section></nav>
|
|
240
|
+
<nav><section><h2>Start</h2><a class="nav-link" href="./">Overview</a><a class="nav-link" href="install.html">Install</a><a class="nav-link" href="quickstart.html">Quickstart</a></section><section><h2>Agents</h2><a class="nav-link" href="agents.html">Agents</a><a class="nav-link" href="custom-agents.html">Custom agents</a><a class="nav-link active" href="compare.html">Compare Command</a></section><section><h2>Sessions</h2><a class="nav-link" href="sessions.html">Sessions</a><a class="nav-link" href="prompting.html">Prompting</a><a class="nav-link" href="session-control.html">Session control</a><a class="nav-link" href="session-watch.html">Watching sessions</a></section><section><h2>Output & Policy</h2><a class="nav-link" href="output-formats.html">Output formats</a><a class="nav-link" href="permissions.html">Permissions</a><a class="nav-link" href="config.html">Config</a></section><section><h2>Flows</h2><a class="nav-link" href="flows.html">Flows</a></section><section><h2>Embedding</h2><a class="nav-link" href="shared-sessions.html">Shared sessions</a><a class="nav-link" href="runtime-environment.html">Transient runtime environment</a><a class="nav-link" href="runtime-process-lifecycle.html">Runtime process lifecycle</a></section><section><h2>Reference</h2><a class="nav-link" href="CLI.html">CLI Reference</a><a class="nav-link" href="exit-codes.html">Exit codes</a><a class="nav-link" href="VISION.html">Vision</a></section></nav>
|
|
240
241
|
</aside>
|
|
241
242
|
<main>
|
|
242
243
|
<header class="hero">
|
|
243
244
|
<div class="hero-text">
|
|
244
|
-
<p class="eyebrow">
|
|
245
|
+
<p class="eyebrow">Agents</p>
|
|
245
246
|
<h1>Compare Command</h1>
|
|
246
247
|
</div>
|
|
247
248
|
<div class="hero-meta">
|
|
@@ -264,9 +265,9 @@ acpx compare pi openclaw <span class="hl-flag">--file</span> ./prompt.md -- <spa
|
|
|
264
265
|
<p>With a prompt file, delimiter text is appended to the file's prompt blocks. An empty delimiter preserves every preceding agent and reads the prompt from the file or stdin.</p>
|
|
265
266
|
<h2 id="options"><a class="anchor" href="#options" aria-label="Anchor link">#</a>Options</h2>
|
|
266
267
|
<p><code>compare</code> honors the same global execution controls as <code>exec</code>, including:</p>
|
|
267
|
-
<table><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--cwd <dir></code></td><td>Target workspace. Defaults to the current working directory.</td></tr><tr><td><code>--approve-all</code> / <code>--approve-reads</code> / <code>--deny-all</code></td><td>Permission mode.</td></tr><tr><td><code>--permission-policy <json-or-file></code> / <code>--policy</code></td><td>Per-tool permission policy.</td></tr><tr><td><code>--timeout <sec></code></td><td>Per-agent timeout in seconds.</td></tr><tr><td><code>--non-interactive-permissions <policy></code></td><td>Non-TTY prompt behavior.</td></tr><tr><td><code>--auth-policy <policy></code></td><td>ACP authentication behavior.</td></tr><tr><td><code>--no-fs</code></td><td>Do not advertise filesystem support to agents.</td></tr><tr><td><code>--no-terminal</code></td><td>Do not advertise terminal support to agents.</td></tr><tr><td><code>--prompt-retries <count></code></td><td>Retry failed prompt turns before any side effects are observed.</td></tr><tr><td><code>--model</code>, <code>--allowed-tools</code>, <code>--max-turns</code>, <code>--system-prompt</code></td><td>Session creation options forwarded to compatible agents.</td></tr><tr><td><code>--format <text|json|quiet></code></td><td>Summary output format.</td></tr></tbody></table>
|
|
268
|
+
<div class="table-scroll" role="region" aria-label="Scrollable table" tabindex="0"><table><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--cwd <dir></code></td><td>Target workspace. Defaults to the current working directory.</td></tr><tr><td><code>--approve-all</code> / <code>--approve-reads</code> / <code>--deny-all</code></td><td>Permission mode.</td></tr><tr><td><code>--permission-policy <json-or-file></code> / <code>--policy</code></td><td>Per-tool permission policy.</td></tr><tr><td><code>--timeout <sec></code></td><td>Per-agent timeout in seconds.</td></tr><tr><td><code>--non-interactive-permissions <policy></code></td><td>Non-TTY prompt behavior.</td></tr><tr><td><code>--auth-policy <policy></code></td><td>ACP authentication behavior.</td></tr><tr><td><code>--no-fs</code></td><td>Do not advertise filesystem support to agents.</td></tr><tr><td><code>--no-terminal</code></td><td>Do not advertise terminal support to agents.</td></tr><tr><td><code>--prompt-retries <count></code></td><td>Retry failed prompt turns before any side effects are observed.</td></tr><tr><td><code>--model</code>, <code>--allowed-tools</code>, <code>--max-turns</code>, <code>--system-prompt</code></td><td>Session creation options forwarded to compatible agents.</td></tr><tr><td><code>--format <text|json|quiet></code></td><td>Summary output format.</td></tr></tbody></table></div>
|
|
268
269
|
<p>Command-local options:</p>
|
|
269
|
-
<table><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--json</code></td><td>Alias for <code>--format json</code>.</td></tr><tr><td><code>-f, --file <path></code></td><td>Read prompt text from a file.</td></tr><tr><td><code>--prompt-file <path></code></td><td>Alias for <code>--file</code>.</td></tr></tbody></table>
|
|
270
|
+
<div class="table-scroll" role="region" aria-label="Scrollable table" tabindex="0"><table><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--json</code></td><td>Alias for <code>--format json</code>.</td></tr><tr><td><code>-f, --file <path></code></td><td>Read prompt text from a file.</td></tr><tr><td><code>--prompt-file <path></code></td><td>Alias for <code>--file</code>.</td></tr></tbody></table></div>
|
|
270
271
|
<p><code>--json</code> also selects JSON diagnostics for configuration and prompt-input failures. It works with top-level <code>--json-strict</code> and forces JSON even when another valid <code>--format</code> value is supplied. Without <code>--json</code>, an explicit top-level format takes precedence over a command-local format, which otherwise takes precedence over the configured default. Strict mode still rejects <code>--verbose</code>.</p>
|
|
271
272
|
<p><code>--cwd</code> may appear before or after <code>compare</code>. An explicit command-local value takes precedence over the top-level value. That workspace supplies the project configuration, agent definitions and permission defaults, and anchors relative prompt files, permission-policy files and top-level MCP configuration paths.</p>
|
|
272
273
|
<p>Conflicting permission modes fail the invocation before prompt or policy input is read. Permission counters include observed decisions on failed runs. A known permission failure reports <code>permission_denied</code>; a genuine runtime failure remains <code>error</code> even if a permission request was denied earlier. Completed runs with any denied or cancelled request still report <code>permission_denied</code>.</p>
|
|
@@ -274,7 +275,7 @@ acpx compare pi openclaw <span class="hl-flag">--file</span> ./prompt.md -- <spa
|
|
|
274
275
|
<p>SIGINT, SIGTERM and SIGHUP during execution cancel the active run and wait for its cleanup. Remaining agents are skipped, the summary contains only attempted runs, and acpx exits with code <code>130</code>. Ordinary agent errors and per-agent timeouts remain individual results and allow subsequent agents to run.</p>
|
|
275
276
|
<h2 id="output"><a class="anchor" href="#output" aria-label="Anchor link">#</a>Output</h2>
|
|
276
277
|
<p>Text output includes one row per agent:</p>
|
|
277
|
-
<table><thead><tr><th>Column</th><th>Meaning</th></tr></thead><tbody><tr><td><code>agent</code></td><td>Agent name or raw command token.</td></tr><tr><td><code>status</code></td><td><code>ok</code>, <code>cancelled</code>, <code>permission_denied</code>, or <code>error</code>.</td></tr><tr><td><code>wall_ms</code></td><td>Wall-clock runtime in milliseconds.</td></tr><tr><td><code>input</code></td><td>Input token count from the latest <code>usage_update</code>.</td></tr><tr><td><code>output</code></td><td>Output token count from the latest <code>usage_update</code>.</td></tr><tr><td><code>total</code></td><td>Total token count from the latest <code>usage_update</code>.</td></tr><tr><td><code>permissions</code></td><td>Denied-or-cancelled permission requests over total requests.</td></tr><tr><td><code>stop_reason</code></td><td>ACP <code>session/prompt</code> stop reason, such as <code>end_turn</code>.</td></tr><tr><td><code>final_message</code></td><td>First 200 characters of assistant text output.</td></tr><tr><td><code>error</code></td><td>Error preview for failed runs.</td></tr></tbody></table>
|
|
278
|
+
<div class="table-scroll" role="region" aria-label="Scrollable table" tabindex="0"><table><thead><tr><th>Column</th><th>Meaning</th></tr></thead><tbody><tr><td><code>agent</code></td><td>Agent name or raw command token.</td></tr><tr><td><code>status</code></td><td><code>ok</code>, <code>cancelled</code>, <code>permission_denied</code>, or <code>error</code>.</td></tr><tr><td><code>wall_ms</code></td><td>Wall-clock runtime in milliseconds.</td></tr><tr><td><code>input</code></td><td>Input token count from the latest <code>usage_update</code>.</td></tr><tr><td><code>output</code></td><td>Output token count from the latest <code>usage_update</code>.</td></tr><tr><td><code>total</code></td><td>Total token count from the latest <code>usage_update</code>.</td></tr><tr><td><code>permissions</code></td><td>Denied-or-cancelled permission requests over total requests.</td></tr><tr><td><code>stop_reason</code></td><td>ACP <code>session/prompt</code> stop reason, such as <code>end_turn</code>.</td></tr><tr><td><code>final_message</code></td><td>First 200 characters of assistant text output.</td></tr><tr><td><code>error</code></td><td>Error preview for failed runs.</td></tr></tbody></table></div>
|
|
278
279
|
<p>Token counts use explicitly reported input, output, and total fields from the latest <code>usage_update</code>. Context occupancy (<code>used</code>) and capacity (<code>size</code>) are not token totals. Missing counts appear as <code>-</code> in text output and <code>null</code> in JSON; a missing total is not calculated from input and output counts.</p>
|
|
279
280
|
<p><code>--format json</code> emits an array of rows:</p>
|
|
280
281
|
<pre><code class="language-json"><span class="hl-op">[</span>
|
|
@@ -292,7 +293,7 @@ acpx compare pi openclaw <span class="hl-flag">--file</span> ./prompt.md -- <spa
|
|
|
292
293
|
<span class="hl-prop">"permission_denied"</span><span class="hl-op">:</span> <span class="hl-num">0</span>
|
|
293
294
|
<span class="hl-op">}</span>
|
|
294
295
|
<span class="hl-op">]</span></code></pre>
|
|
295
|
-
<p><code>--format quiet</code> prints one tab-separated <code><agent>\t<status></code> row per agent.</p></article>
|
|
296
|
+
<p><code>--format quiet</code> prints one tab-separated <code><agent>\t<status></code> row per agent.</p><nav class="page-nav" aria-label="Pager"><a class="page-nav-prev" href="custom-agents.html"><small>Previous</small><span>Custom agents</span></a><a class="page-nav-next" href="sessions.html"><small>Next</small><span>Sessions</span></a></nav></article>
|
|
296
297
|
<nav class="toc" aria-label="On this page"><h2>On this page</h2><a class="toc-l2" href="#usage">#Usage</a><a class="toc-l2" href="#options">#Options</a><a class="toc-l2" href="#interruption">#Interruption</a><a class="toc-l2" href="#output">#Output</a></nav>
|
|
297
298
|
</div>
|
|
298
299
|
</main>
|
|
@@ -170,7 +170,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
170
170
|
.doc pre .copy.copied{background:var(--accent);border-color:var(--accent);color:#04121d;opacity:1}
|
|
171
171
|
.doc blockquote{margin:1.4em 0;padding:10px 16px;border-left:3px solid var(--accent);background:var(--accent-soft);border-radius:0 8px 8px 0;color:var(--text)}
|
|
172
172
|
.doc blockquote p:last-child{margin-bottom:0}
|
|
173
|
-
.doc table{
|
|
173
|
+
.doc .table-scroll{overflow-x:auto;margin:1.2em 0}
|
|
174
|
+
.doc table{width:100%;border-collapse:collapse;margin:0;font-size:.92em}
|
|
174
175
|
.doc th,.doc td{border-bottom:1px solid var(--line);padding:9px 10px;text-align:left;vertical-align:top}
|
|
175
176
|
.doc th{font-weight:600;color:var(--ink);background:var(--line-soft);border-bottom:1px solid var(--line)}
|
|
176
177
|
.doc hr{border:0;border-top:1px solid var(--line);margin:2.2em 0}
|
|
@@ -236,7 +237,7 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
236
237
|
</button>
|
|
237
238
|
</div>
|
|
238
239
|
<label class="search"><span>Search</span><input id="doc-search" type="search" placeholder="sessions, flows, json…"></label>
|
|
239
|
-
<nav><section><h2>Start</h2><a class="nav-link" href="./">Overview</a><a class="nav-link" href="install.html">Install</a><a class="nav-link" href="quickstart.html">Quickstart</a></section><section><h2>Agents</h2><a class="nav-link" href="agents.html">Agents</a><a class="nav-link" href="custom-agents.html">Custom agents</a></section><section><h2>Sessions</h2><a class="nav-link" href="sessions.html">Sessions</a><a class="nav-link" href="prompting.html">Prompting</a><a class="nav-link" href="session-control.html">Session control</a></section><section><h2>Output & Policy</h2><a class="nav-link" href="output-formats.html">Output formats</a><a class="nav-link" href="permissions.html">Permissions</a><a class="nav-link active" href="config.html">Config</a></section><section><h2>Flows</h2><a class="nav-link" href="flows.html">Flows</a></section><section><h2>Reference</h2><a class="nav-link" href="CLI.html">CLI Reference</a><a class="nav-link" href="exit-codes.html">Exit codes</a><a class="nav-link" href="VISION.html">Vision</a></section></nav>
|
|
240
|
+
<nav><section><h2>Start</h2><a class="nav-link" href="./">Overview</a><a class="nav-link" href="install.html">Install</a><a class="nav-link" href="quickstart.html">Quickstart</a></section><section><h2>Agents</h2><a class="nav-link" href="agents.html">Agents</a><a class="nav-link" href="custom-agents.html">Custom agents</a><a class="nav-link" href="compare.html">Compare Command</a></section><section><h2>Sessions</h2><a class="nav-link" href="sessions.html">Sessions</a><a class="nav-link" href="prompting.html">Prompting</a><a class="nav-link" href="session-control.html">Session control</a><a class="nav-link" href="session-watch.html">Watching sessions</a></section><section><h2>Output & Policy</h2><a class="nav-link" href="output-formats.html">Output formats</a><a class="nav-link" href="permissions.html">Permissions</a><a class="nav-link active" href="config.html">Config</a></section><section><h2>Flows</h2><a class="nav-link" href="flows.html">Flows</a></section><section><h2>Embedding</h2><a class="nav-link" href="shared-sessions.html">Shared sessions</a><a class="nav-link" href="runtime-environment.html">Transient runtime environment</a><a class="nav-link" href="runtime-process-lifecycle.html">Runtime process lifecycle</a></section><section><h2>Reference</h2><a class="nav-link" href="CLI.html">CLI Reference</a><a class="nav-link" href="exit-codes.html">Exit codes</a><a class="nav-link" href="VISION.html">Vision</a></section></nav>
|
|
240
241
|
</aside>
|
|
241
242
|
<main>
|
|
242
243
|
<header class="hero">
|
|
@@ -285,7 +286,7 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
285
286
|
<span class="hl-prop">"openai_api_key"</span><span class="hl-op">:</span> <span class="hl-str">"sk-…"</span>
|
|
286
287
|
<span class="hl-op">}</span>
|
|
287
288
|
<span class="hl-op">}</span></code></pre>
|
|
288
|
-
<table><thead><tr><th>Key</th><th>Type</th><th>Default</th><th>Notes</th></tr></thead><tbody><tr><td><code>defaultAgent</code></td><td>string</td><td><code>"codex"</code></td><td>Used when top-level <code>prompt</code>, <code>exec</code>, <code>cancel</code>, <code>set*</code>, <code>sessions</code> runs without an explicit agent.</td></tr><tr><td><code>defaultPermissions</code></td><td>enum</td><td><code>"approve-reads"</code></td><td><code>approve-all</code> / <code>approve-reads</code> / <code>deny-all</code>.</td></tr><tr><td><code>nonInteractivePermissions</code></td><td>enum</td><td><code>"deny"</code></td><td><code>deny</code> or <code>fail</code> when no TTY is present.</td></tr><tr><td><code>authPolicy</code></td><td>enum</td><td><code>"skip"</code></td><td>Controls when ACP <code>authenticate</code> is attempted.</td></tr><tr><td><code>ttl</code></td><td>integer</td><td><code>300</code></td><td>Queue owner idle TTL in seconds. <code>0</code> disables idle shutdown.</td></tr><tr><td><code>timeout</code></td><td>number | <code>null</code></td><td><code>null</code></td><td>Default <code>--timeout</code> in seconds (decimal allowed).</td></tr><tr><td><code>format</code></td><td>enum</td><td><code>"text"</code></td><td>Default <code>--format</code>.</td></tr><tr><td><code>mcpServers</code></td><td>array</td><td><code>[]</code></td><td>MCP servers sent to new and loaded ACP sessions. Project values replace global values.</td></tr><tr><td><code>agents</code></td><td>object</td><td><code>{}</code></td><td>Override or add agent commands (see below).</td></tr><tr><td><code>auth</code></td><td>object</td><td><code>{}</code></td><td>ACP auth-method credential map (see below).</td></tr></tbody></table>
|
|
289
|
+
<div class="table-scroll" role="region" aria-label="Scrollable table" tabindex="0"><table><thead><tr><th>Key</th><th>Type</th><th>Default</th><th>Notes</th></tr></thead><tbody><tr><td><code>defaultAgent</code></td><td>string</td><td><code>"codex"</code></td><td>Used when top-level <code>prompt</code>, <code>exec</code>, <code>cancel</code>, <code>set*</code>, <code>sessions</code> runs without an explicit agent.</td></tr><tr><td><code>defaultPermissions</code></td><td>enum</td><td><code>"approve-reads"</code></td><td><code>approve-all</code> / <code>approve-reads</code> / <code>deny-all</code>.</td></tr><tr><td><code>nonInteractivePermissions</code></td><td>enum</td><td><code>"deny"</code></td><td><code>deny</code> or <code>fail</code> when no TTY is present.</td></tr><tr><td><code>authPolicy</code></td><td>enum</td><td><code>"skip"</code></td><td>Controls when ACP <code>authenticate</code> is attempted.</td></tr><tr><td><code>ttl</code></td><td>integer</td><td><code>300</code></td><td>Queue owner idle TTL in seconds. <code>0</code> disables idle shutdown.</td></tr><tr><td><code>timeout</code></td><td>number | <code>null</code></td><td><code>null</code></td><td>Default <code>--timeout</code> in seconds (decimal allowed).</td></tr><tr><td><code>format</code></td><td>enum</td><td><code>"text"</code></td><td>Default <code>--format</code>.</td></tr><tr><td><code>mcpServers</code></td><td>array</td><td><code>[]</code></td><td>MCP servers sent to new and loaded ACP sessions. Project values replace global values.</td></tr><tr><td><code>agents</code></td><td>object</td><td><code>{}</code></td><td>Override or add agent commands (see below).</td></tr><tr><td><code>auth</code></td><td>object</td><td><code>{}</code></td><td>ACP auth-method credential map (see below).</td></tr></tbody></table></div>
|
|
289
290
|
<p>CLI flags always override these values. For example, <code>--approve-all</code> wins over <code>defaultPermissions: "deny-all"</code>.</p>
|
|
290
291
|
<p>Use <code>--mcp-config <path></code> when MCP servers belong to a session or automation job rather than the working tree. The file must contain the same top-level <code>mcpServers</code> array shown above; it replaces the project/global <code>mcpServers</code> value for that invocation. Relative paths resolve from <code>--cwd</code>.</p>
|
|
291
292
|
<p>MCP <code>env</code> and <code>headers</code> entries use <code>{ "name": "…", "value": "…" }</code> pairs. Values are literal strings: empty strings and leading or trailing whitespace are preserved when creating or loading a session. Names must be non-empty and are trimmed.</p>
|
|
@@ -331,7 +332,7 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
331
332
|
<p>Ambient provider env vars like <code>OPENAI_API_KEY</code> are still passed through to child agents in their environment, but they do <strong>not</strong> trigger ACP auth-method selection on their own. This is intentional — it avoids surprise login flows in adapters that interpret an ambient key as "go ahead and authenticate."</p>
|
|
332
333
|
<p>When adding authentication aliases to the child environment, acpx preserves inherited values, including empty strings. On Windows, differently cased names refer to the same environment variable; Unix names remain case sensitive.</p>
|
|
333
334
|
<p>When an adapter advertises auth methods, <code>acpx</code> invokes <code>authenticate</code> if it finds a matching <code>ACPX_AUTH_*</code> environment variable or <code>auth</code> config value. <code>authPolicy</code> controls what happens when no matching credential is available:</p>
|
|
334
|
-
<table><thead><tr><th>Value</th><th>Behavior</th></tr></thead><tbody><tr><td><code>"skip"</code></td><td>Continue without ACP authentication and let the adapter handle auth itself. <strong>(default)</strong></td></tr><tr><td><code>"fail"</code></td><td>Fail immediately instead of continuing without a matching ACP credential.</td></tr></tbody></table>
|
|
335
|
+
<div class="table-scroll" role="region" aria-label="Scrollable table" tabindex="0"><table><thead><tr><th>Value</th><th>Behavior</th></tr></thead><tbody><tr><td><code>"skip"</code></td><td>Continue without ACP authentication and let the adapter handle auth itself. <strong>(default)</strong></td></tr><tr><td><code>"fail"</code></td><td>Fail immediately instead of continuing without a matching ACP credential.</td></tr></tbody></table></div>
|
|
335
336
|
<h2 id="environment-variables"><a class="anchor" href="#environment-variables" aria-label="Anchor link">#</a>Environment variables</h2>
|
|
336
337
|
<p><code>ACPX_CLAUDE_INCLUDE_USER_SETTINGS=1</code> makes built-in <code>claude</code> sessions include Claude Code user settings. By default, they load only project and local settings to avoid globally enabled channel or daemon plugins interfering with spawned ACP sessions.</p>
|
|
337
338
|
<p>Other ACP-relevant behavior:</p>
|
|
@@ -170,7 +170,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
170
170
|
.doc pre .copy.copied{background:var(--accent);border-color:var(--accent);color:#04121d;opacity:1}
|
|
171
171
|
.doc blockquote{margin:1.4em 0;padding:10px 16px;border-left:3px solid var(--accent);background:var(--accent-soft);border-radius:0 8px 8px 0;color:var(--text)}
|
|
172
172
|
.doc blockquote p:last-child{margin-bottom:0}
|
|
173
|
-
.doc table{
|
|
173
|
+
.doc .table-scroll{overflow-x:auto;margin:1.2em 0}
|
|
174
|
+
.doc table{width:100%;border-collapse:collapse;margin:0;font-size:.92em}
|
|
174
175
|
.doc th,.doc td{border-bottom:1px solid var(--line);padding:9px 10px;text-align:left;vertical-align:top}
|
|
175
176
|
.doc th{font-weight:600;color:var(--ink);background:var(--line-soft);border-bottom:1px solid var(--line)}
|
|
176
177
|
.doc hr{border:0;border-top:1px solid var(--line);margin:2.2em 0}
|
|
@@ -236,7 +237,7 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
236
237
|
</button>
|
|
237
238
|
</div>
|
|
238
239
|
<label class="search"><span>Search</span><input id="doc-search" type="search" placeholder="sessions, flows, json…"></label>
|
|
239
|
-
<nav><section><h2>Start</h2><a class="nav-link" href="./">Overview</a><a class="nav-link" href="install.html">Install</a><a class="nav-link" href="quickstart.html">Quickstart</a></section><section><h2>Agents</h2><a class="nav-link" href="agents.html">Agents</a><a class="nav-link active" href="custom-agents.html">Custom agents</a></section><section><h2>Sessions</h2><a class="nav-link" href="sessions.html">Sessions</a><a class="nav-link" href="prompting.html">Prompting</a><a class="nav-link" href="session-control.html">Session control</a></section><section><h2>Output & Policy</h2><a class="nav-link" href="output-formats.html">Output formats</a><a class="nav-link" href="permissions.html">Permissions</a><a class="nav-link" href="config.html">Config</a></section><section><h2>Flows</h2><a class="nav-link" href="flows.html">Flows</a></section><section><h2>Reference</h2><a class="nav-link" href="CLI.html">CLI Reference</a><a class="nav-link" href="exit-codes.html">Exit codes</a><a class="nav-link" href="VISION.html">Vision</a></section></nav>
|
|
240
|
+
<nav><section><h2>Start</h2><a class="nav-link" href="./">Overview</a><a class="nav-link" href="install.html">Install</a><a class="nav-link" href="quickstart.html">Quickstart</a></section><section><h2>Agents</h2><a class="nav-link" href="agents.html">Agents</a><a class="nav-link active" href="custom-agents.html">Custom agents</a><a class="nav-link" href="compare.html">Compare Command</a></section><section><h2>Sessions</h2><a class="nav-link" href="sessions.html">Sessions</a><a class="nav-link" href="prompting.html">Prompting</a><a class="nav-link" href="session-control.html">Session control</a><a class="nav-link" href="session-watch.html">Watching sessions</a></section><section><h2>Output & Policy</h2><a class="nav-link" href="output-formats.html">Output formats</a><a class="nav-link" href="permissions.html">Permissions</a><a class="nav-link" href="config.html">Config</a></section><section><h2>Flows</h2><a class="nav-link" href="flows.html">Flows</a></section><section><h2>Embedding</h2><a class="nav-link" href="shared-sessions.html">Shared sessions</a><a class="nav-link" href="runtime-environment.html">Transient runtime environment</a><a class="nav-link" href="runtime-process-lifecycle.html">Runtime process lifecycle</a></section><section><h2>Reference</h2><a class="nav-link" href="CLI.html">CLI Reference</a><a class="nav-link" href="exit-codes.html">Exit codes</a><a class="nav-link" href="VISION.html">Vision</a></section></nav>
|
|
240
241
|
</aside>
|
|
241
242
|
<main>
|
|
242
243
|
<header class="hero">
|
|
@@ -290,8 +291,9 @@ acpx ci-bot <span class="hl-str">'run validation checks'</span></code></
|
|
|
290
291
|
<h2 id="acp-requirements-for-custom-agents"><a class="anchor" href="#acp-requirements-for-custom-agents" aria-label="Anchor link">#</a>ACP requirements for custom agents</h2>
|
|
291
292
|
<p>A custom agent must:</p>
|
|
292
293
|
<ul>
|
|
293
|
-
<li>Speak ACP over stdio
|
|
294
|
-
<li>Implement
|
|
294
|
+
<li>Speak ACP over stdio.</li>
|
|
295
|
+
<li>Implement <code>initialize</code>, <code>session/new</code>, <code>session/prompt</code>, and <code>session/cancel</code>.</li>
|
|
296
|
+
<li>Advertise optional capabilities honestly. Session reopening requires <code>session/resume</code> or <code>session/load</code>. Closing a remote session requires <code>session/close</code>. Fresh-session-only agents can omit these capabilities.</li>
|
|
295
297
|
<li>Advertise <code>agentCapabilities</code> and model controls honestly. Prefer a categorized model config option for ACP 0.25; existing adapters may continue to return legacy <code>models</code> metadata and implement <code>session/set_model</code>.</li>
|
|
296
298
|
</ul>
|
|
297
299
|
<p><code>fs/*</code> and <code>terminal/*</code> client methods are routed through acpx's permission policy. File operations apply cwd containment checks; terminal commands are not an OS sandbox. See <a href="permissions.html#working-directory-and-filesystem-guardrails">Permissions</a> for the filesystem guarantees and limitations.</p>
|
|
@@ -299,11 +301,8 @@ acpx ci-bot <span class="hl-str">'run validation checks'</span></code></
|
|
|
299
301
|
<p>Some ACP servers require their own project or workspace mapping before they can create a session. If <code>sessions new</code> or <code>sessions ensure</code> fails at <code>session/new</code> for a custom server, verify the server-side project initialization first, then retry with the same cwd and explicit environment you expect the server to see.</p>
|
|
300
302
|
<h2 id="practical-examples"><a class="anchor" href="#practical-examples" aria-label="Anchor link">#</a>Practical examples</h2>
|
|
301
303
|
<p>Local dev server with arguments:</p>
|
|
302
|
-
<pre><code class="language-bash">acpx <span class="hl-flag">--agent</span> <span class="hl-str">'node --inspect ./scripts/dev-acp.mjs --port 5555'</span>
|
|
303
|
-
|
|
304
|
-
<p>Wait — that runs through <code>--agent</code>, so <code>codex</code> would be a positional agent and conflict. The right form is one or the other:</p>
|
|
305
|
-
<pre><code class="language-bash">acpx <span class="hl-flag">--agent</span> <span class="hl-str">'node ./scripts/dev-acp.mjs'</span> sessions new
|
|
306
|
-
acpx <span class="hl-flag">--agent</span> <span class="hl-str">'node ./scripts/dev-acp.mjs'</span> <span class="hl-str">'run a sanity check'</span></code></pre>
|
|
304
|
+
<pre><code class="language-bash">acpx <span class="hl-flag">--agent</span> <span class="hl-str">'node --inspect ./scripts/dev-acp.mjs --port 5555'</span> sessions new
|
|
305
|
+
acpx <span class="hl-flag">--agent</span> <span class="hl-str">'node --inspect ./scripts/dev-acp.mjs --port 5555'</span> <span class="hl-str">'run a sanity check'</span></code></pre>
|
|
307
306
|
<p>Per-repo override with config:</p>
|
|
308
307
|
<p><code><repo>/.acpxrc.json</code>:</p>
|
|
309
308
|
<pre><code class="language-json"><span class="hl-op">{</span>
|
|
@@ -318,11 +317,12 @@ acpx <span class="hl-flag">--agent</span> <span class="hl-str">'node ./scrip
|
|
|
318
317
|
<pre><code class="language-bash">acpx internal sessions new
|
|
319
318
|
acpx internal <span class="hl-str">'review the latest commit'</span>
|
|
320
319
|
acpx internal exec <span class="hl-str">'list TODO comments'</span></code></pre>
|
|
321
|
-
<
|
|
320
|
+
<h3 id="openclaw-checkout"><a class="anchor" href="#openclaw-checkout" aria-label="Anchor link">#</a>OpenClaw checkout</h3>
|
|
321
|
+
<p>On Unix, override the built-in profile to run a source checkout directly. Replace both absolute paths below with your checkout and token file. The bridge starts in the selected project directory, so a relative script path would resolve there.</p>
|
|
322
322
|
<pre><code class="language-json"><span class="hl-op">{</span>
|
|
323
323
|
<span class="hl-prop">"agents"</span><span class="hl-op">:</span> <span class="hl-op">{</span>
|
|
324
324
|
<span class="hl-prop">"openclaw"</span><span class="hl-op">:</span> <span class="hl-op">{</span>
|
|
325
|
-
<span class="hl-prop">"command"</span><span class="hl-op">:</span> <span class="hl-str">"env OPENCLAW_HIDE_BANNER=1 OPENCLAW_SUPPRESS_NOTES=1 node scripts/run-node.mjs acp --url ws://127.0.0.1:18789 --token-file
|
|
325
|
+
<span class="hl-prop">"command"</span><span class="hl-op">:</span> <span class="hl-str">"env OPENCLAW_HIDE_BANNER=1 OPENCLAW_SUPPRESS_NOTES=1 node /path/to/openclaw/scripts/run-node.mjs acp --url ws://127.0.0.1:18789 --token-file /path/to/gateway.token --session agent:main:main"</span>
|
|
326
326
|
<span class="hl-op">}</span>
|
|
327
327
|
<span class="hl-op">}</span>
|
|
328
328
|
<span class="hl-op">}</span></code></pre>
|
|
@@ -341,8 +341,8 @@ acpx internal exec <span class="hl-str">'list TODO comments'</span></cod
|
|
|
341
341
|
</ul>
|
|
342
342
|
<p>The limit counts raw UTF-8 bytes before decoding, excluding the terminating LF but including a preceding CR and other whitespace. It applies to complete messages and unfinished lines alike, regardless of how stdout chunks are split. Multiple individually valid messages can arrive in a combined read larger than the limit.</p>
|
|
343
343
|
<p>Choose a limit large enough for image and other structured responses. Overflow fails the connection with <code>ACP_MESSAGE_TOO_LARGE</code> and explains how to raise or disable the limit; invalid settings fail before an agent process is spawned. A warm owner keeps the setting with which its ACP connection was started, so restart it to pick up a new value or default.</p>
|
|
344
|
-
<p>This is a per-message limit, not a process-memory or model-token budget; decoding and JSON parsing may use more memory than the serialized message size. It does not limit outgoing ACP prompts, queue requests, or shell output capture.</p><nav class="page-nav" aria-label="Pager"><a class="page-nav-prev" href="agents.html"><small>Previous</small><span>Agents</span></a><a class="page-nav-next" href="
|
|
345
|
-
<nav class="toc" aria-label="On this page"><h2>On this page</h2><a class="toc-l2" href="#1-unknown-positional-name">#1. Unknown positional name</a><a class="toc-l2" href="#2-agent-command-escape-hatch">#2. --agent &lt;command&gt; escape hatch</a><a class="toc-l2" href="#3-config-defined-agents">#3. Config-defined agents</a><a class="toc-l2" href="#session-scope-and-the-agent-command">#Session scope and the agent command</a><a class="toc-l2" href="#acp-requirements-for-custom-agents">#ACP requirements for custom agents</a><a class="toc-l3" href="#troubleshooting-session-new">#Troubleshooting session/new</a><a class="toc-l2" href="#practical-examples">#Practical examples</a><a class="toc-l2" href="#see-also">#See also</a><a class="toc-l2" href="#incoming-message-limits">#Incoming message limits</a></nav>
|
|
344
|
+
<p>This is a per-message limit, not a process-memory or model-token budget; decoding and JSON parsing may use more memory than the serialized message size. It does not limit outgoing ACP prompts, queue requests, or shell output capture.</p><nav class="page-nav" aria-label="Pager"><a class="page-nav-prev" href="agents.html"><small>Previous</small><span>Agents</span></a><a class="page-nav-next" href="compare.html"><small>Next</small><span>Compare Command</span></a></nav></article>
|
|
345
|
+
<nav class="toc" aria-label="On this page"><h2>On this page</h2><a class="toc-l2" href="#1-unknown-positional-name">#1. Unknown positional name</a><a class="toc-l2" href="#2-agent-command-escape-hatch">#2. --agent &lt;command&gt; escape hatch</a><a class="toc-l2" href="#3-config-defined-agents">#3. Config-defined agents</a><a class="toc-l2" href="#session-scope-and-the-agent-command">#Session scope and the agent command</a><a class="toc-l2" href="#acp-requirements-for-custom-agents">#ACP requirements for custom agents</a><a class="toc-l3" href="#troubleshooting-session-new">#Troubleshooting session/new</a><a class="toc-l2" href="#practical-examples">#Practical examples</a><a class="toc-l3" href="#openclaw-checkout">#OpenClaw checkout</a><a class="toc-l2" href="#see-also">#See also</a><a class="toc-l2" href="#incoming-message-limits">#Incoming message limits</a></nav>
|
|
346
346
|
</div>
|
|
347
347
|
</main>
|
|
348
348
|
</div>
|
|
@@ -170,7 +170,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
170
170
|
.doc pre .copy.copied{background:var(--accent);border-color:var(--accent);color:#04121d;opacity:1}
|
|
171
171
|
.doc blockquote{margin:1.4em 0;padding:10px 16px;border-left:3px solid var(--accent);background:var(--accent-soft);border-radius:0 8px 8px 0;color:var(--text)}
|
|
172
172
|
.doc blockquote p:last-child{margin-bottom:0}
|
|
173
|
-
.doc table{
|
|
173
|
+
.doc .table-scroll{overflow-x:auto;margin:1.2em 0}
|
|
174
|
+
.doc table{width:100%;border-collapse:collapse;margin:0;font-size:.92em}
|
|
174
175
|
.doc th,.doc td{border-bottom:1px solid var(--line);padding:9px 10px;text-align:left;vertical-align:top}
|
|
175
176
|
.doc th{font-weight:600;color:var(--ink);background:var(--line-soft);border-bottom:1px solid var(--line)}
|
|
176
177
|
.doc hr{border:0;border-top:1px solid var(--line);margin:2.2em 0}
|
|
@@ -236,7 +237,7 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
236
237
|
</button>
|
|
237
238
|
</div>
|
|
238
239
|
<label class="search"><span>Search</span><input id="doc-search" type="search" placeholder="sessions, flows, json…"></label>
|
|
239
|
-
<nav><section><h2>Start</h2><a class="nav-link" href="./">Overview</a><a class="nav-link" href="install.html">Install</a><a class="nav-link" href="quickstart.html">Quickstart</a></section><section><h2>Agents</h2><a class="nav-link" href="agents.html">Agents</a><a class="nav-link" href="custom-agents.html">Custom agents</a></section><section><h2>Sessions</h2><a class="nav-link" href="sessions.html">Sessions</a><a class="nav-link" href="prompting.html">Prompting</a><a class="nav-link" href="session-control.html">Session control</a></section><section><h2>Output & Policy</h2><a class="nav-link" href="output-formats.html">Output formats</a><a class="nav-link" href="permissions.html">Permissions</a><a class="nav-link" href="config.html">Config</a></section><section><h2>Flows</h2><a class="nav-link" href="flows.html">Flows</a></section><section><h2>Reference</h2><a class="nav-link" href="CLI.html">CLI Reference</a><a class="nav-link active" href="exit-codes.html">Exit codes</a><a class="nav-link" href="VISION.html">Vision</a></section></nav>
|
|
240
|
+
<nav><section><h2>Start</h2><a class="nav-link" href="./">Overview</a><a class="nav-link" href="install.html">Install</a><a class="nav-link" href="quickstart.html">Quickstart</a></section><section><h2>Agents</h2><a class="nav-link" href="agents.html">Agents</a><a class="nav-link" href="custom-agents.html">Custom agents</a><a class="nav-link" href="compare.html">Compare Command</a></section><section><h2>Sessions</h2><a class="nav-link" href="sessions.html">Sessions</a><a class="nav-link" href="prompting.html">Prompting</a><a class="nav-link" href="session-control.html">Session control</a><a class="nav-link" href="session-watch.html">Watching sessions</a></section><section><h2>Output & Policy</h2><a class="nav-link" href="output-formats.html">Output formats</a><a class="nav-link" href="permissions.html">Permissions</a><a class="nav-link" href="config.html">Config</a></section><section><h2>Flows</h2><a class="nav-link" href="flows.html">Flows</a></section><section><h2>Embedding</h2><a class="nav-link" href="shared-sessions.html">Shared sessions</a><a class="nav-link" href="runtime-environment.html">Transient runtime environment</a><a class="nav-link" href="runtime-process-lifecycle.html">Runtime process lifecycle</a></section><section><h2>Reference</h2><a class="nav-link" href="CLI.html">CLI Reference</a><a class="nav-link active" href="exit-codes.html">Exit codes</a><a class="nav-link" href="VISION.html">Vision</a></section></nav>
|
|
240
241
|
</aside>
|
|
241
242
|
<main>
|
|
242
243
|
<header class="hero">
|
|
@@ -251,7 +252,7 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
251
252
|
</header>
|
|
252
253
|
<div class="doc-grid">
|
|
253
254
|
<article class="doc"><p><code>acpx</code> uses a small, stable set of exit codes so wrapping scripts can branch on them.</p>
|
|
254
|
-
<table><thead><tr><th>Code</th><th>Meaning</th></tr></thead><tbody><tr><td><code>0</code></td><td>Success</td></tr><tr><td><code>1</code></td><td>Agent / protocol / runtime error</td></tr><tr><td><code>2</code></td><td>CLI usage error (bad flags, conflicting flags, malformed <code>--agent</code>)</td></tr><tr><td><code>3</code></td><td>Timeout (<code>--timeout</code> exceeded)</td></tr><tr><td><code>4</code></td><td>No session found (prompt requires an explicit <code>sessions new</code>)</td></tr><tr><td><code>5</code></td><td>Permission denied (every request denied/cancelled, none approved)</td></tr><tr><td><code>130</code></td><td>Interrupted (<code>SIGINT</code> / <code>SIGTERM</code>)</td></tr></tbody></table>
|
|
255
|
+
<div class="table-scroll" role="region" aria-label="Scrollable table" tabindex="0"><table><thead><tr><th>Code</th><th>Meaning</th></tr></thead><tbody><tr><td><code>0</code></td><td>Success</td></tr><tr><td><code>1</code></td><td>Agent / protocol / runtime error</td></tr><tr><td><code>2</code></td><td>CLI usage error (bad flags, conflicting flags, malformed <code>--agent</code>)</td></tr><tr><td><code>3</code></td><td>Timeout (<code>--timeout</code> exceeded)</td></tr><tr><td><code>4</code></td><td>No session found (prompt requires an explicit <code>sessions new</code>)</td></tr><tr><td><code>5</code></td><td>Permission denied (every request denied/cancelled, none approved)</td></tr><tr><td><code>130</code></td><td>Interrupted (<code>SIGINT</code> / <code>SIGTERM</code>)</td></tr></tbody></table></div>
|
|
255
256
|
<h2 id="notes"><a class="anchor" href="#notes" aria-label="Anchor link">#</a>Notes</h2>
|
|
256
257
|
<ul>
|
|
257
258
|
<li><strong><code>0</code></strong> is also returned by <code>cancel</code> when there is nothing to cancel. The text/JSON output makes the distinction.</li>
|
|
@@ -170,7 +170,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
170
170
|
.doc pre .copy.copied{background:var(--accent);border-color:var(--accent);color:#04121d;opacity:1}
|
|
171
171
|
.doc blockquote{margin:1.4em 0;padding:10px 16px;border-left:3px solid var(--accent);background:var(--accent-soft);border-radius:0 8px 8px 0;color:var(--text)}
|
|
172
172
|
.doc blockquote p:last-child{margin-bottom:0}
|
|
173
|
-
.doc table{
|
|
173
|
+
.doc .table-scroll{overflow-x:auto;margin:1.2em 0}
|
|
174
|
+
.doc table{width:100%;border-collapse:collapse;margin:0;font-size:.92em}
|
|
174
175
|
.doc th,.doc td{border-bottom:1px solid var(--line);padding:9px 10px;text-align:left;vertical-align:top}
|
|
175
176
|
.doc th{font-weight:600;color:var(--ink);background:var(--line-soft);border-bottom:1px solid var(--line)}
|
|
176
177
|
.doc hr{border:0;border-top:1px solid var(--line);margin:2.2em 0}
|
|
@@ -236,7 +237,7 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
236
237
|
</button>
|
|
237
238
|
</div>
|
|
238
239
|
<label class="search"><span>Search</span><input id="doc-search" type="search" placeholder="sessions, flows, json…"></label>
|
|
239
|
-
<nav><section><h2>Start</h2><a class="nav-link" href="./">Overview</a><a class="nav-link" href="install.html">Install</a><a class="nav-link" href="quickstart.html">Quickstart</a></section><section><h2>Agents</h2><a class="nav-link" href="agents.html">Agents</a><a class="nav-link" href="custom-agents.html">Custom agents</a></section><section><h2>Sessions</h2><a class="nav-link" href="sessions.html">Sessions</a><a class="nav-link" href="prompting.html">Prompting</a><a class="nav-link" href="session-control.html">Session control</a></section><section><h2>Output & Policy</h2><a class="nav-link" href="output-formats.html">Output formats</a><a class="nav-link" href="permissions.html">Permissions</a><a class="nav-link" href="config.html">Config</a></section><section><h2>Flows</h2><a class="nav-link active" href="flows.html">Flows</a></section><section><h2>Reference</h2><a class="nav-link" href="CLI.html">CLI Reference</a><a class="nav-link" href="exit-codes.html">Exit codes</a><a class="nav-link" href="VISION.html">Vision</a></section></nav>
|
|
240
|
+
<nav><section><h2>Start</h2><a class="nav-link" href="./">Overview</a><a class="nav-link" href="install.html">Install</a><a class="nav-link" href="quickstart.html">Quickstart</a></section><section><h2>Agents</h2><a class="nav-link" href="agents.html">Agents</a><a class="nav-link" href="custom-agents.html">Custom agents</a><a class="nav-link" href="compare.html">Compare Command</a></section><section><h2>Sessions</h2><a class="nav-link" href="sessions.html">Sessions</a><a class="nav-link" href="prompting.html">Prompting</a><a class="nav-link" href="session-control.html">Session control</a><a class="nav-link" href="session-watch.html">Watching sessions</a></section><section><h2>Output & Policy</h2><a class="nav-link" href="output-formats.html">Output formats</a><a class="nav-link" href="permissions.html">Permissions</a><a class="nav-link" href="config.html">Config</a></section><section><h2>Flows</h2><a class="nav-link active" href="flows.html">Flows</a></section><section><h2>Embedding</h2><a class="nav-link" href="shared-sessions.html">Shared sessions</a><a class="nav-link" href="runtime-environment.html">Transient runtime environment</a><a class="nav-link" href="runtime-process-lifecycle.html">Runtime process lifecycle</a></section><section><h2>Reference</h2><a class="nav-link" href="CLI.html">CLI Reference</a><a class="nav-link" href="exit-codes.html">Exit codes</a><a class="nav-link" href="VISION.html">Vision</a></section></nav>
|
|
240
241
|
</aside>
|
|
241
242
|
<main>
|
|
242
243
|
<header class="hero">
|
|
@@ -269,21 +270,21 @@ acpx flow run ./my-flow.ts <span class="hl-flag">--default-agent</span> claude
|
|
|
269
270
|
acpx <span class="hl-flag">--timeout</span> <span class="hl-num">1800</span> flow run ./my-flow.ts</code></pre>
|
|
270
271
|
<p>What happens:</p>
|
|
271
272
|
<ul>
|
|
272
|
-
<li>The runtime loads the flow module from disk.</li>
|
|
273
|
+
<li>The runtime loads the flow module from disk. A path that does not exist or is not a file fails with <code>Flow file not found: <path></code> or <code>Flow file is not a file: <path></code> before a run directory is created.</li>
|
|
273
274
|
<li>A run id is generated and a run directory is created at <code>~/.acpx/flows/runs/<runId>/</code>.</li>
|
|
274
275
|
<li>Steps execute in topological order. ACP steps reuse one implicit main session by default.</li>
|
|
275
276
|
<li>Run state (graph, ACP transcripts, artifacts, errors) is persisted as the run progresses.</li>
|
|
276
277
|
<li>The runtime exits when the graph terminates or a checkpoint pauses.</li>
|
|
277
278
|
</ul>
|
|
278
279
|
<p>On POSIX systems, run snapshots, projections, artifacts, and event logs use owner-only file permissions (<code>0600</code>); acpx-owned run directories use <code>0700</code>. Existing custom output-root directories keep their permissions. Snapshot writes publish complete files atomically and clean up failed staging writes. Event logs remain append-only and retain their existing ordering and size behavior.</p>
|
|
279
|
-
<p><code>--input-json</code> and <code>--input-file</code> are mutually exclusive ways to provide flow input. <code>--default-agent</code> supplies the default agent profile for <code>acp</code> nodes that do not pin one.</p>
|
|
280
|
+
<p><code>--input-json</code> and <code>--input-file</code> are mutually exclusive ways to provide flow input. Omitting both passes <code>{}</code>; an empty argument is rejected. <code>--default-agent</code> supplies the default agent profile for <code>acp</code> nodes that do not pin one.</p>
|
|
280
281
|
<p>The CLI resolves <code>acpx/flows</code> in the entry module and its imported helpers without rewriting source text or creating files beside the flow. Flows can run from read-only directories. Global <code>--system-prompt</code> and <code>--append-system-prompt</code> flags are forwarded to every ACP node, including isolated sessions.</p>
|
|
281
282
|
<h2 id="parsing-json-output"><a class="anchor" href="#parsing-json-output" aria-label="Anchor link">#</a>Parsing JSON output</h2>
|
|
282
283
|
<p><code>extractJsonObject(text)</code> and <code>parseJsonObject(text, { mode: "compat" })</code> try direct JSON, then a fenced JSON block, then balanced objects or arrays embedded in prose. Compatibility recovery parses candidates as it finds them and bounds the total scanning and parsing work relative to the input length. Large output or many separate malformed candidates do not by themselves prevent extraction.</p>
|
|
283
|
-
<p>Repeatedly malformed or ambiguous prefixes can exhaust that recovery budget, including unmatched opening delimiters before a valid object. In that case the helper throws the usual <code>Could not parse JSON</code> error. Prefer direct or fenced JSON when recovery must not depend on surrounding prose; those parsing paths are unaffected by the compatibility recovery budget. Use <code>parseStrictJsonObject(text)</code> to require direct JSON, or <code>mode: "fenced"</code> to accept direct JSON and fenced blocks without embedded recovery.</p>
|
|
284
|
+
<p>Repeatedly malformed or ambiguous prefixes can exhaust that recovery budget, including unmatched opening delimiters before a valid object. In that case the helper throws the usual <code>Could not parse JSON</code> error. Prefer direct or fenced JSON when recovery must not depend on surrounding prose; those parsing paths are unaffected by the compatibility recovery budget. Use <code>parseStrictJsonObject(text)</code> to require direct JSON, or <code>mode: "fenced"</code> to accept direct JSON and fenced blocks without embedded recovery. Literal triple backticks inside JSON strings do not close the surrounding fence, including when those strings contain escaped quotes or backslashes.</p>
|
|
284
285
|
<h2 id="node-types"><a class="anchor" href="#node-types" aria-label="Anchor link">#</a>Node types</h2>
|
|
285
286
|
<p>Flows are graphs. Each node is one of:</p>
|
|
286
|
-
<table><thead><tr><th>Node</th><th>Purpose</th></tr></thead><tbody><tr><td><code>acp</code></td><td>A model-shaped step — runs an ACP turn against an agent session.</td></tr><tr><td><code>action</code></td><td>A deterministic runtime-owned step — typically a shell command or HTTP call.</td></tr><tr><td><code>compute</code></td><td>A pure local function — shape inputs, route, format, derive values.</td></tr><tr><td><code>decision</code></td><td>A constrained-choice ACP branch — wraps <code>acp</code> + <code>parse</code> + <code>switch</code> for typed routing.</td></tr><tr><td><code>checkpoint</code></td><td>A pause point that requires something outside the runtime (human review, external trigger).</td></tr></tbody></table>
|
|
287
|
+
<div class="table-scroll" role="region" aria-label="Scrollable table" tabindex="0"><table><thead><tr><th>Node</th><th>Purpose</th></tr></thead><tbody><tr><td><code>acp</code></td><td>A model-shaped step — runs an ACP turn against an agent session.</td></tr><tr><td><code>action</code></td><td>A deterministic runtime-owned step — typically a shell command or HTTP call.</td></tr><tr><td><code>compute</code></td><td>A pure local function — shape inputs, route, format, derive values.</td></tr><tr><td><code>decision</code></td><td>A constrained-choice ACP branch — wraps <code>acp</code> + <code>parse</code> + <code>switch</code> for typed routing.</td></tr><tr><td><code>checkpoint</code></td><td>A pause point that requires something outside the runtime (human review, external trigger).</td></tr></tbody></table></div>
|
|
287
288
|
<p>Edges connect nodes. <code>decisionEdge()</code> produces typed edges out of a <code>decision()</code> node so the routing is explicit and replayable.</p>
|
|
288
289
|
<p>The runtime owns:</p>
|
|
289
290
|
<ul>
|
|
@@ -341,6 +342,17 @@ acpx <span class="hl-flag">--timeout</span> <span class="hl-num">1800</span> flo
|
|
|
341
342
|
});</code></pre>
|
|
342
343
|
<p>This fragment assumes an earlier <code>prepare_workspace</code> node returns <code>{ workdir: string }</code> and an edge connects it to this ACP node. A <code>cwd</code> string is a literal path; use a callback to read prior outputs. <code>examples/flows/workdir.flow.ts</code> shows a shell action creating a temporary directory and an ACP node using it.</p>
|
|
343
344
|
<p>Persistent ACP steps reuse a session when their resolved command, explicit argument vector (when supplied), working directory, and session handle match. Different profile names may share a session when those values match. Argument boundaries and empty arguments are significant. Each step snapshots its resolved arguments, so a custom resolver reusing an array cannot change earlier step metadata.</p>
|
|
345
|
+
<h2 id="model-and-session-configuration"><a class="anchor" href="#model-and-session-configuration" aria-label="Anchor link">#</a>Model and session configuration</h2>
|
|
346
|
+
<p>ACP nodes can select a model and ordered adapter configuration options before their first prompt:</p>
|
|
347
|
+
<pre><code class="language-ts">acp({
|
|
348
|
+
modelId: <span class="hl-str">"selected-model"</span>,
|
|
349
|
+
configOptions: [{ configId: <span class="hl-str">"adapter_option"</span>, value: <span class="hl-str">"selected-value"</span> }],
|
|
350
|
+
prompt: () => <span class="hl-str">"Summarize the findings"</span>,
|
|
351
|
+
});</code></pre>
|
|
352
|
+
<p>Global <code>--model</code> and repeatable <code>flow run --config-option <key=value></code> provide run defaults. Library callers use <code>FlowRunnerOptions.sessionOptions.model</code> and <code>FlowRunnerOptions.configOptions</code>. A node's <code>modelId</code> overrides the default; other global session options still apply. The legacy passthrough <code>model</code> field remains inert extension metadata and never selects a model. Run config options execute first, then node options in array order, including repeated IDs. Option IDs and values in flow definitions are opaque strings and are not normalized. A model-related config option executes after model selection and may change the final model.</p>
|
|
353
|
+
<p>For persistent sessions, the first binding pins the effective settings. Later omitted fields inherit that binding; explicit fields must match its requested model or final option values. Use a distinct <code>session.handle</code> for different settings. Reconnecting loads the same ACP session, reapplies the pinned selections, and fails before prompting if they cannot be restored. This also applies when the initial connection ends after configuration but before the first prompt. Isolated sessions apply their own settings independently. Selection rejection or timeout prevents the prompt.</p>
|
|
354
|
+
<p>When a model or config option was requested, bindings in the run bundle include <code>requestedSettings</code> and <code>acceptedSettings</code>; step session snapshots carry the same evidence. The <code>flow run --format json</code> result prints session bindings without these fields; read them from the run bundle. Model evidence distinguishes the requested ID, whether ACP model selection was applied, and the accepted final ID. Without an advertised model catalog, adapters with supported startup-model behavior retain that behavior and report <code>applied: false</code>; other adapters reject the model request. Option evidence records each acknowledged <code>acceptedValue</code> and a <code>reported</code> boolean: <code>true</code> means the value came from the adapter reply catalog; <code>false</code> means the reply acknowledged the request without reporting a value, so <code>acceptedValue</code> echoes the resolved request. These acknowledgements are configuration evidence; inspect adapter prompt-response metadata for provider usage attestation.</p>
|
|
355
|
+
<p>Persistent creation-time controls (<code>session/new</code> and initial model/config selections) are not captured in <code>sessions/*/events.ndjson</code>. Their evidence lives in <code>sessions/*/binding.json</code> and step session snapshots. Later reconnect controls are captured in the event stream; isolated sessions also capture creation controls.</p>
|
|
344
356
|
<h2 id="permissions"><a class="anchor" href="#permissions" aria-label="Anchor link">#</a>Permissions</h2>
|
|
345
357
|
<p>Flows can declare an explicit permission requirement. If a flow needs <code>approve-all</code> and you forget the flag, <code>acpx</code> fails fast before the first step runs and prints the flag to add:</p>
|
|
346
358
|
<pre><code class="language-bash">acpx flow run examples/flows/pr-triage/pr-triage.flow.ts \
|
|
@@ -378,6 +390,7 @@ acpx <span class="hl-flag">--approve-all</span> flow run examples/flows/pr-triag
|
|
|
378
390
|
<p><code>runShell</code> waits for complete stdout and stderr, returns ordinary nonzero exits as results, and returns <code>timedOut: true</code> with partial output when its own deadline expires. Cancellation of the enclosing node rejects instead, after process cleanup; catching that error cannot authorize another managed command. The fields are optional on the shared <code>FlowNodeContext</code> type for compatibility with manually constructed contexts, but <code>FlowRunner</code> supplies the signal to every node and <code>runShell</code> to function actions.</p>
|
|
379
391
|
<p>Arbitrary callback JavaScript cannot be forcibly stopped. Check <code>context.signal</code> before starting your own side effects and after awaits, or use <code>runShell</code> for owned native commands. The runner does not wait forever for an uncooperative callback and does not roll back completed external effects. The PR-triage example uses these boundaries for its commands and file writes.</p>
|
|
380
392
|
<p>A shell action's <code>timeoutMs: 0</code> disables its own deadline; an enclosing node deadline still applies. Node and command deadlines must be finite and no greater than 2,147,483,647 milliseconds. Invalid command deadlines or non-string <code>stdin</code> values are rejected before spawning. On expiry or interruption, acpx cancels active shell commands and waits for termination and output-stream cleanup before reporting cancellation. Cleanup failures are reported instead of silently claiming cleanup succeeded. An executor that resolves after its node has timed out or been interrupted cannot launch a new shell process.</p>
|
|
393
|
+
<p>A shell action whose command, <code>shell</code>, or <code>cwd</code> does not exist fails with the spawn error's <code>ENOENT</code> code; when acpx can tell which piece is missing, the message names it: the working directory, the executable path, or a command that is not on the child <code>PATH</code>.</p>
|
|
381
394
|
<p>A shell node drains its wrapper's final stdout and stderr after exit, waiting for pipe closure for up to 100 milliseconds. Inherited pipes from a surviving descendant do not keep a completed flow's host alive beyond that drain window. While other work keeps the host running, these pipes continue draining without extending the completed result.</p>
|
|
382
395
|
<p>Set <code>maxBufferBytes</code> on the object returned by <code>shell().exec</code> to limit captured stdout and stderr independently. The value is a non-negative safe integer counting UTF-8 bytes; omission preserves unlimited capture, and zero permits empty output only. Overflow fails the action even with <code>allowNonZeroExit</code>, stops retaining output, and waits for the existing process-tree cleanup before returning the error. A timeout or cancellation already in progress keeps its original result.</p>
|
|
383
396
|
<p>On POSIX, cleanup covers the owned process group and descendants discoverable before it is signalled, including descendants that move to another process group while their wrapper is active. Successful command completion still follows the wrapper's exit. A child that deliberately starts a separate session with independent stdio and is reparented before cancellation can outlive the flow, as before; acpx does not provide persistent supervision of escaped daemons.</p>
|
|
@@ -431,8 +444,8 @@ acpx <span class="hl-flag">--approve-all</span> flow run examples/flows/pr-triag
|
|
|
431
444
|
<li><a href="https://github.com/openclaw/acpx/blob/main/docs/2026-03-26-acpx-flow-trace-replay.md">Flow trace replay</a> — replay format spec.</li>
|
|
432
445
|
<li><a href="https://github.com/openclaw/acpx/blob/main/docs/2026-03-28-acpx-flow-permission-requirements.md">Flow permission requirements</a> — fail-fast permission gating.</li>
|
|
433
446
|
<li><a href="https://github.com/openclaw/acpx/tree/main/examples/flows"><code>examples/flows/</code> in the source tree</a> — runnable flow examples and a colocated <code>README</code>.</li>
|
|
434
|
-
</ul><nav class="page-nav" aria-label="Pager"><a class="page-nav-prev" href="config.html"><small>Previous</small><span>Config</span></a><a class="page-nav-next" href="
|
|
435
|
-
<nav class="toc" aria-label="On this page"><h2>On this page</h2><a class="toc-l2" href="#when-to-use-flows">#When to use flows</a><a class="toc-l2" href="#run-a-flow">#Run a flow</a><a class="toc-l2" href="#parsing-json-output">#Parsing JSON output</a><a class="toc-l2" href="#node-types">#Node types</a><a class="toc-l2" href="#authoring-surface">#Authoring surface</a><a class="toc-l2" href="#workspace-isolation">#Workspace isolation</a><a class="toc-l2" href="#permissions">#Permissions</a><a class="toc-l2" href="#run-persistence">#Run persistence</a><a class="toc-l2" href="#timeouts">#Timeouts</a><a class="toc-l2" href="#replay-viewer">#Replay viewer</a><a class="toc-l2" href="#example-flows-in-the-source-tree">#Example flows in the source tree</a><a class="toc-l2" href="#practical-examples">#Practical examples</a><a class="toc-l2" href="#see-also">#See also</a></nav>
|
|
447
|
+
</ul><nav class="page-nav" aria-label="Pager"><a class="page-nav-prev" href="config.html"><small>Previous</small><span>Config</span></a><a class="page-nav-next" href="shared-sessions.html"><small>Next</small><span>Shared sessions</span></a></nav></article>
|
|
448
|
+
<nav class="toc" aria-label="On this page"><h2>On this page</h2><a class="toc-l2" href="#when-to-use-flows">#When to use flows</a><a class="toc-l2" href="#run-a-flow">#Run a flow</a><a class="toc-l2" href="#parsing-json-output">#Parsing JSON output</a><a class="toc-l2" href="#node-types">#Node types</a><a class="toc-l2" href="#authoring-surface">#Authoring surface</a><a class="toc-l2" href="#workspace-isolation">#Workspace isolation</a><a class="toc-l2" href="#model-and-session-configuration">#Model and session configuration</a><a class="toc-l2" href="#permissions">#Permissions</a><a class="toc-l2" href="#run-persistence">#Run persistence</a><a class="toc-l2" href="#timeouts">#Timeouts</a><a class="toc-l2" href="#replay-viewer">#Replay viewer</a><a class="toc-l2" href="#example-flows-in-the-source-tree">#Example flows in the source tree</a><a class="toc-l2" href="#practical-examples">#Practical examples</a><a class="toc-l2" href="#see-also">#See also</a></nav>
|
|
436
449
|
</div>
|
|
437
450
|
</main>
|
|
438
451
|
</div>
|