@openclaw/acpx 2026.8.1-beta.2 → 2026.8.1
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/dist/index.js +43 -53
- package/dist/{pi-session-catalog-runtime-BiTQtT7s.js → pi-session-catalog-runtime-g6A6ADEf.js} +200 -531
- package/dist/{pi-session-paths-DgYt8LUg.js → pi-session-paths-EMbd4Hkz.js} +4 -1
- package/dist/{process-reaper-DzVuCxl3.js → process-reaper-DduWm_7N.js} +3 -11
- package/dist/{register.runtime-C29AY8LI.js → register.runtime-DFRkXzZ_.js} +13 -141
- package/dist/register.runtime.js +1 -1
- package/dist/{runtime-BmzHUTK8.js → runtime-mnaLaFBR.js} +20 -20
- package/dist/{service-LTeZyc7q.js → service-BFWEiHbQ.js} +6 -5
- package/package.json +8 -8
- package/skills/acp-router/SKILL.md +2 -2
|
@@ -6,6 +6,9 @@ import path from "node:path";
|
|
|
6
6
|
const PI_SESSIONS_LIST_COMMAND = "acpx.pi.sessions.list.v1";
|
|
7
7
|
const PI_SESSION_READ_COMMAND = "acpx.pi.sessions.read.v1";
|
|
8
8
|
const PI_TERMINAL_RESUME_COMMAND = "acpx.pi.terminal.resume.v1";
|
|
9
|
+
const PI_SESSIONS_CAPABILITY = "pi-sessions";
|
|
10
|
+
const PI_LOCAL_SESSION_HOST_ID = "gateway";
|
|
11
|
+
const PI_SESSION_ID_PATTERN = /^(?!-)[A-Za-z0-9._:-]{1,256}$/u;
|
|
9
12
|
//#endregion
|
|
10
13
|
//#region extensions/acpx/src/pi-session-paths.ts
|
|
11
14
|
function piHome(env) {
|
|
@@ -78,4 +81,4 @@ function piSessionStoreAvailable(env, store) {
|
|
|
78
81
|
}
|
|
79
82
|
}
|
|
80
83
|
//#endregion
|
|
81
|
-
export {
|
|
84
|
+
export { PI_SESSIONS_CAPABILITY as a, PI_SESSION_READ_COMMAND as c, PI_LOCAL_SESSION_HOST_ID as i, PI_TERMINAL_RESUME_COMMAND as l, piSessionStore as n, PI_SESSIONS_LIST_COMMAND as o, piSessionStoreAvailable as r, PI_SESSION_ID_PATTERN as s, piAcpSessionStoreRoot as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as AcpxPluginConfigSchema } from "./config-schema-DN_uAi4R.js";
|
|
2
2
|
import { u as readAcpxProcessLeaseIdentity, v as splitCommandParts } from "./process-lease-Cwvj7WGe.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
|
-
import { formatPluginConfigIssue } from "openclaw/plugin-sdk/extension-shared";
|
|
5
4
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
5
|
import fs from "node:fs";
|
|
7
6
|
import path from "node:path";
|
|
8
|
-
import { runExec } from "openclaw/plugin-sdk/process-runtime";
|
|
7
|
+
import { isPidAlive, runExec } from "openclaw/plugin-sdk/process-runtime";
|
|
9
8
|
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { formatPluginConfigIssue } from "openclaw/plugin-sdk/extension-shared";
|
|
10
10
|
//#region extensions/acpx/src/codex-adapter.ts
|
|
11
11
|
const CODEX_ACP_PACKAGE = "@agentclientprotocol/codex-acp";
|
|
12
12
|
const CODEX_ACP_BIN = "codex-acp";
|
|
@@ -355,14 +355,6 @@ function collectProcessTree(processes, rootPid) {
|
|
|
355
355
|
function uniquePids(processes) {
|
|
356
356
|
return Array.from(new Set(processes.map((processInfo) => processInfo.pid).filter((pid) => Number.isInteger(pid) && pid > 0 && pid !== process.pid)));
|
|
357
357
|
}
|
|
358
|
-
function isProcessAlive(pid) {
|
|
359
|
-
try {
|
|
360
|
-
process.kill(pid, 0);
|
|
361
|
-
return true;
|
|
362
|
-
} catch {
|
|
363
|
-
return false;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
358
|
async function terminatePids(pids, deps) {
|
|
367
359
|
const killProcess = deps?.killProcess ?? ((pid, signal) => process.kill(pid, signal));
|
|
368
360
|
const sleep = deps?.sleep ?? ((ms) => new Promise((resolve) => {
|
|
@@ -375,7 +367,7 @@ async function terminatePids(pids, deps) {
|
|
|
375
367
|
} catch {}
|
|
376
368
|
if (terminated.length === 0) return terminated;
|
|
377
369
|
await sleep(750);
|
|
378
|
-
for (const pid of terminated) if (deps?.killProcess ||
|
|
370
|
+
for (const pid of terminated) if (deps?.killProcess || isPidAlive(pid)) try {
|
|
379
371
|
killProcess(pid, "SIGKILL");
|
|
380
372
|
} catch {}
|
|
381
373
|
return terminated;
|
|
@@ -1,137 +1,14 @@
|
|
|
1
1
|
import { getAcpRuntimeBackend, registerAcpRuntimeBackend, unregisterAcpRuntimeBackend } from "openclaw/plugin-sdk/acp-runtime-backend";
|
|
2
2
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
//#region extensions/acpx/src/runtime-turn.ts
|
|
6
|
-
/**
|
|
7
|
-
* ACPX turn adapters. Modern runtimes can expose startTurn directly; legacy
|
|
8
|
-
* runtimes that only stream runTurn events are adapted to the newer contract.
|
|
9
|
-
*/
|
|
10
|
-
function isCancellationStopReason(stopReason) {
|
|
11
|
-
return stopReason === "cancel" || stopReason === "cancelled" || stopReason === "manual-cancel";
|
|
12
|
-
}
|
|
13
|
-
var LegacyRunTurnEventQueue = class {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.items = [];
|
|
16
|
-
this.waits = [];
|
|
17
|
-
this.closed = false;
|
|
18
|
-
}
|
|
19
|
-
push(item) {
|
|
20
|
-
if (this.closed) return;
|
|
21
|
-
const waiter = this.waits.shift();
|
|
22
|
-
if (waiter) {
|
|
23
|
-
waiter.resolve(item);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
this.items.push(item);
|
|
27
|
-
}
|
|
28
|
-
clear() {
|
|
29
|
-
this.items.length = 0;
|
|
30
|
-
}
|
|
31
|
-
close() {
|
|
32
|
-
if (this.closed) return;
|
|
33
|
-
this.closed = true;
|
|
34
|
-
for (const waiter of this.waits.splice(0)) waiter.resolve(null);
|
|
35
|
-
}
|
|
36
|
-
fail(error) {
|
|
37
|
-
if (this.closed) return;
|
|
38
|
-
this.error = error;
|
|
39
|
-
this.closed = true;
|
|
40
|
-
for (const waiter of this.waits.splice(0)) waiter.reject(error);
|
|
41
|
-
}
|
|
42
|
-
async next() {
|
|
43
|
-
const item = this.items.shift();
|
|
44
|
-
if (item) return item;
|
|
45
|
-
if (this.error) throw toErrorObject(this.error, "Non-Error thrown");
|
|
46
|
-
if (this.closed) return null;
|
|
47
|
-
return await new Promise((resolve, reject) => {
|
|
48
|
-
this.waits.push({
|
|
49
|
-
resolve,
|
|
50
|
-
reject
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
async *iterate() {
|
|
55
|
-
for (;;) {
|
|
56
|
-
const item = await this.next();
|
|
57
|
-
if (!item) return;
|
|
58
|
-
yield item;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
function legacyRunTurnAsStartTurn(runtime, input) {
|
|
63
|
-
const result = createDeferred();
|
|
64
|
-
result.promise.catch(() => {});
|
|
65
|
-
const queue = new LegacyRunTurnEventQueue();
|
|
66
|
-
let resultSettled = false;
|
|
67
|
-
const settleResult = (next) => {
|
|
68
|
-
if (resultSettled) return;
|
|
69
|
-
resultSettled = true;
|
|
70
|
-
result.resolve(next);
|
|
71
|
-
};
|
|
72
|
-
(async () => {
|
|
73
|
-
try {
|
|
74
|
-
for await (const event of runtime.runTurn(input)) {
|
|
75
|
-
if (event.type === "done") {
|
|
76
|
-
settleResult({
|
|
77
|
-
status: event.status ?? (isCancellationStopReason(event.stopReason) ? "cancelled" : "completed"),
|
|
78
|
-
...event.stopReason ? { stopReason: event.stopReason } : {}
|
|
79
|
-
});
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
if (event.type === "error") {
|
|
83
|
-
settleResult({
|
|
84
|
-
status: "failed",
|
|
85
|
-
error: {
|
|
86
|
-
message: event.message,
|
|
87
|
-
...event.code ? { code: event.code } : {},
|
|
88
|
-
...event.detailCode ? { detailCode: event.detailCode } : {},
|
|
89
|
-
...event.retryable === void 0 ? {} : { retryable: event.retryable }
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
queue.push(event);
|
|
95
|
-
}
|
|
96
|
-
settleResult({
|
|
97
|
-
status: "failed",
|
|
98
|
-
error: {
|
|
99
|
-
code: "ACP_TURN_FAILED",
|
|
100
|
-
message: "ACP turn ended without a terminal done event."
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
} catch (error) {
|
|
104
|
-
result.reject(error);
|
|
105
|
-
queue.fail(error);
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
queue.close();
|
|
109
|
-
})();
|
|
110
|
-
return {
|
|
111
|
-
requestId: input.requestId,
|
|
112
|
-
events: queue.iterate(),
|
|
113
|
-
result: result.promise,
|
|
114
|
-
async cancel(inputArgs) {
|
|
115
|
-
await runtime.cancel({
|
|
116
|
-
handle: input.handle,
|
|
117
|
-
reason: inputArgs?.reason
|
|
118
|
-
});
|
|
119
|
-
},
|
|
120
|
-
async closeStream() {
|
|
121
|
-
queue.clear();
|
|
122
|
-
queue.close();
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
/** Start an ACP turn, adapting legacy runTurn-only runtimes when needed. */
|
|
127
|
-
function startRuntimeTurn(runtime, input) {
|
|
128
|
-
return runtime.startTurn?.(input) ?? legacyRunTurnAsStartTurn(runtime, input);
|
|
129
|
-
}
|
|
130
|
-
/** Start an ACP turn through a lazy runtime resolver. */
|
|
3
|
+
//#region extensions/acpx/src/runtime-proxy.ts
|
|
4
|
+
/** Start an ACP turn through a lazy runtime resolver without awaiting resolution up front. */
|
|
131
5
|
function lazyStartRuntimeTurn(resolveRuntime, input) {
|
|
132
|
-
const turnPromise = resolveRuntime().then((runtime) =>
|
|
6
|
+
const turnPromise = resolveRuntime().then((runtime) => runtime.startTurn(input));
|
|
133
7
|
return {
|
|
134
8
|
requestId: input.requestId,
|
|
9
|
+
get promptStarted() {
|
|
10
|
+
return turnPromise.then((turn) => turn.promptStarted);
|
|
11
|
+
},
|
|
135
12
|
events: { async *[Symbol.asyncIterator]() {
|
|
136
13
|
yield* (await turnPromise).events;
|
|
137
14
|
} },
|
|
@@ -144,8 +21,6 @@ function lazyStartRuntimeTurn(resolveRuntime, input) {
|
|
|
144
21
|
}
|
|
145
22
|
};
|
|
146
23
|
}
|
|
147
|
-
//#endregion
|
|
148
|
-
//#region extensions/acpx/src/runtime-proxy.ts
|
|
149
24
|
/** Create an ACP runtime facade backed by an async runtime resolver. */
|
|
150
25
|
function createLazyAcpRuntimeProxy(resolveRuntime) {
|
|
151
26
|
return {
|
|
@@ -159,25 +34,22 @@ function createLazyAcpRuntimeProxy(resolveRuntime) {
|
|
|
159
34
|
yield* (await resolveRuntime()).runTurn(input);
|
|
160
35
|
},
|
|
161
36
|
async getCapabilities(input) {
|
|
162
|
-
return await (await resolveRuntime()).getCapabilities
|
|
37
|
+
return await (await resolveRuntime()).getCapabilities(input);
|
|
163
38
|
},
|
|
164
39
|
async getStatus(input) {
|
|
165
|
-
return await (await resolveRuntime()).getStatus
|
|
40
|
+
return await (await resolveRuntime()).getStatus(input);
|
|
166
41
|
},
|
|
167
42
|
async setMode(input) {
|
|
168
|
-
await (await resolveRuntime()).setMode
|
|
43
|
+
await (await resolveRuntime()).setMode(input);
|
|
169
44
|
},
|
|
170
45
|
async setConfigOption(input) {
|
|
171
|
-
await (await resolveRuntime()).setConfigOption
|
|
46
|
+
return await (await resolveRuntime()).setConfigOption(input);
|
|
172
47
|
},
|
|
173
48
|
async doctor() {
|
|
174
|
-
return await (await resolveRuntime()).doctor
|
|
175
|
-
ok: true,
|
|
176
|
-
message: "ok"
|
|
177
|
-
};
|
|
49
|
+
return await (await resolveRuntime()).doctor();
|
|
178
50
|
},
|
|
179
51
|
async prepareFreshSession(input) {
|
|
180
|
-
await (await resolveRuntime()).prepareFreshSession
|
|
52
|
+
await (await resolveRuntime()).prepareFreshSession(input);
|
|
181
53
|
},
|
|
182
54
|
async cancel(input) {
|
|
183
55
|
await (await resolveRuntime()).cancel(input);
|
|
@@ -194,7 +66,7 @@ function createLazyAcpRuntimeProxy(resolveRuntime) {
|
|
|
194
66
|
* immediately, then imports the heavier service only when a session needs it.
|
|
195
67
|
*/
|
|
196
68
|
const ACPX_BACKEND_ID = "acpx";
|
|
197
|
-
const loadServiceModule = createLazyRuntimeModule(() => import("./service-
|
|
69
|
+
const loadServiceModule = createLazyRuntimeModule(() => import("./service-BFWEiHbQ.js"));
|
|
198
70
|
function unregisterOwnedRuntime(runtime) {
|
|
199
71
|
if (runtime && getAcpRuntimeBackend(ACPX_BACKEND_ID)?.runtime === runtime) unregisterAcpRuntimeBackend(ACPX_BACKEND_ID);
|
|
200
72
|
}
|
package/dist/register.runtime.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createAcpxRuntimeService } from "./register.runtime-
|
|
1
|
+
import { t as createAcpxRuntimeService } from "./register.runtime-DFRkXzZ_.js";
|
|
2
2
|
export { createAcpxRuntimeService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as withAcpxLeaseEnvironment, i as createAcpxProcessLeaseId, o as hashAcpxProcessCommand, t as ACPX_PROBE_LEASE_SESSION_KEY, u as readAcpxProcessLeaseIdentity, v as splitCommandParts } from "./process-lease-Cwvj7WGe.js";
|
|
2
2
|
import { AcpRuntimeError } from "./runtime-api.js";
|
|
3
|
-
import { d as OPENCLAW_CODEX_CONFIG_ARG, l as CODEX_ACP_PACKAGE, n as cleanupOpenClawOwnedAcpxProcessTree, r as isOpenClawLeaseAwareAcpxProcessCommand, t as cleanupOpenClawOwnedAcpxPendingLease } from "./process-reaper-
|
|
3
|
+
import { d as OPENCLAW_CODEX_CONFIG_ARG, l as CODEX_ACP_PACKAGE, n as cleanupOpenClawOwnedAcpxProcessTree, r as isOpenClawLeaseAwareAcpxProcessCommand, t as cleanupOpenClawOwnedAcpxPendingLease } from "./process-reaper-DduWm_7N.js";
|
|
4
4
|
import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
5
5
|
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import path, { resolve } from "node:path";
|
|
@@ -178,7 +178,7 @@ const OPENCLAW_BRIDGE_EXECUTABLE = "openclaw";
|
|
|
178
178
|
const OPENCLAW_BRIDGE_SUBCOMMAND = "acp";
|
|
179
179
|
const CODEX_ACP_AGENT_ID = "codex";
|
|
180
180
|
const CODEX_ACP_OPENCLAW_PREFIX = "openai/";
|
|
181
|
-
const CLAUDE_ACP_OPENCLAW_PREFIX =
|
|
181
|
+
const CLAUDE_ACP_OPENCLAW_PREFIX = /^(?:anthropic|amazon-bedrock)\//i;
|
|
182
182
|
const CODEX_ACP_THINKING_ALIASES = /* @__PURE__ */ new Map([
|
|
183
183
|
["off", void 0],
|
|
184
184
|
["minimal", "low"],
|
|
@@ -341,8 +341,9 @@ function withCodexSessionModel(input, override) {
|
|
|
341
341
|
function normalizeClaudeAcpModelOverride(rawModel) {
|
|
342
342
|
const raw = rawModel?.trim();
|
|
343
343
|
if (!raw) return;
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
const prefix = raw.match(CLAUDE_ACP_OPENCLAW_PREFIX);
|
|
345
|
+
if (!prefix) return raw;
|
|
346
|
+
return raw.slice(prefix[0].length).trim() || void 0;
|
|
346
347
|
}
|
|
347
348
|
function withAcpxSessionOptions(input) {
|
|
348
349
|
const existingOptions = input.sessionOptions;
|
|
@@ -940,6 +941,9 @@ var AcpxRuntime = class {
|
|
|
940
941
|
});
|
|
941
942
|
return {
|
|
942
943
|
requestId: input.requestId,
|
|
944
|
+
get promptStarted() {
|
|
945
|
+
return turnPromise.then(({ turn }) => turn.promptStarted);
|
|
946
|
+
},
|
|
943
947
|
events: { async *[Symbol.asyncIterator]() {
|
|
944
948
|
const { command, turn } = await turnPromise;
|
|
945
949
|
try {
|
|
@@ -1008,7 +1012,7 @@ var AcpxRuntime = class {
|
|
|
1008
1012
|
}
|
|
1009
1013
|
async setConfigOption(input) {
|
|
1010
1014
|
const snapshot = await this.loadOperationSnapshotForHandle(input.handle);
|
|
1011
|
-
await this.runWithProcessLeaseForHandle(input.handle, snapshot.record, () => this.setConfigOptionUnlocked(input, snapshot));
|
|
1015
|
+
return await this.runWithProcessLeaseForHandle(input.handle, snapshot.record, () => this.setConfigOptionUnlocked(input, snapshot));
|
|
1012
1016
|
}
|
|
1013
1017
|
async setConfigOptionUnlocked(input, snapshot) {
|
|
1014
1018
|
const { command } = snapshot;
|
|
@@ -1021,38 +1025,34 @@ var AcpxRuntime = class {
|
|
|
1021
1025
|
const classification = classifyCodexAcpModelRequest(input.value);
|
|
1022
1026
|
if (classification.kind === "unsupported") failUnsupportedCodexAcpModel(input.value);
|
|
1023
1027
|
const { override } = classification;
|
|
1024
|
-
|
|
1028
|
+
const modelResult = override.model ? await delegate.setConfigOption({
|
|
1025
1029
|
...input,
|
|
1026
1030
|
key: "model",
|
|
1027
1031
|
value: override.model
|
|
1028
|
-
});
|
|
1029
|
-
if (override.reasoningEffort) await delegate.setConfigOption({
|
|
1032
|
+
}) : void 0;
|
|
1033
|
+
if (override.reasoningEffort) return await delegate.setConfigOption({
|
|
1030
1034
|
...input,
|
|
1031
1035
|
key: "reasoning_effort",
|
|
1032
1036
|
value: override.reasoningEffort
|
|
1033
1037
|
});
|
|
1034
|
-
return;
|
|
1038
|
+
return modelResult;
|
|
1035
1039
|
}
|
|
1036
1040
|
if (key === "thinking" || key === "thought_level" || key === "reasoning_effort") {
|
|
1037
1041
|
const classification = classifyCodexAcpModelRequest(void 0, input.value);
|
|
1038
1042
|
const reasoningEffort = classification.kind === "override" ? classification.override.reasoningEffort : void 0;
|
|
1039
|
-
if (!reasoningEffort)
|
|
1040
|
-
await delegate.setConfigOption({
|
|
1043
|
+
if (!reasoningEffort) throw new AcpRuntimeError("ACP_BACKEND_UNSUPPORTED_CONTROL", "Clearing Codex reasoning effort on an existing session is unsupported. Choose a supported explicit effort; the current effort is unchanged.");
|
|
1044
|
+
return await delegate.setConfigOption({
|
|
1041
1045
|
...input,
|
|
1042
1046
|
key: "reasoning_effort",
|
|
1043
1047
|
value: reasoningEffort
|
|
1044
1048
|
});
|
|
1045
|
-
return;
|
|
1046
1049
|
}
|
|
1047
1050
|
}
|
|
1048
|
-
if (isClaudeAcpCommand(command) && key === "model") {
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
return;
|
|
1054
|
-
}
|
|
1055
|
-
await delegate.setConfigOption(input);
|
|
1051
|
+
if (isClaudeAcpCommand(command) && key === "model") return await delegate.setConfigOption({
|
|
1052
|
+
...input,
|
|
1053
|
+
value: normalizeClaudeAcpModelOverride(input.value) ?? input.value
|
|
1054
|
+
});
|
|
1055
|
+
return await delegate.setConfigOption(input);
|
|
1056
1056
|
}
|
|
1057
1057
|
async cancel(input) {
|
|
1058
1058
|
const snapshot = await this.loadOperationSnapshotForHandle(input.handle);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { n as createLazyAcpRuntimeProxy } from "./register.runtime-
|
|
1
|
+
import { n as createLazyAcpRuntimeProxy } from "./register.runtime-DFRkXzZ_.js";
|
|
2
2
|
import "./config-schema-DN_uAi4R.js";
|
|
3
3
|
import { _ as quoteCommandPart, a as createAcpxProcessLeaseStore, f as ACPX_GATEWAY_INSTANCE_KEY, g as normalizeAcpxGatewayInstanceRecord, l as openAcpxProcessLeaseStateStore, n as OPENCLAW_ACPX_LEASE_ID_ARG, p as ACPX_GATEWAY_INSTANCE_NAMESPACE, r as OPENCLAW_GATEWAY_INSTANCE_ID_ARG, v as splitCommandParts } from "./process-lease-Cwvj7WGe.js";
|
|
4
|
-
import { a as resolveAcpxPluginConfig, c as CODEX_ACP_BIN, d as OPENCLAW_CODEX_CONFIG_ARG, i as reapStaleOpenClawOwnedAcpxOrphans, l as CODEX_ACP_PACKAGE, n as cleanupOpenClawOwnedAcpxProcessTree, o as resolveAcpxPluginRoot, s as toAcpMcpServers, t as cleanupOpenClawOwnedAcpxPendingLease, u as LEGACY_CODEX_ACP_PACKAGE } from "./process-reaper-
|
|
4
|
+
import { a as resolveAcpxPluginConfig, c as CODEX_ACP_BIN, d as OPENCLAW_CODEX_CONFIG_ARG, i as reapStaleOpenClawOwnedAcpxOrphans, l as CODEX_ACP_PACKAGE, n as cleanupOpenClawOwnedAcpxProcessTree, o as resolveAcpxPluginRoot, s as toAcpMcpServers, t as cleanupOpenClawOwnedAcpxPendingLease, u as LEGACY_CODEX_ACP_PACKAGE } from "./process-reaper-DduWm_7N.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
|
|
7
7
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
8
|
-
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
9
8
|
import { isRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
9
|
import fs from "node:fs";
|
|
11
10
|
import os from "node:os";
|
|
@@ -13,6 +12,7 @@ import path from "node:path";
|
|
|
13
12
|
import fs$1 from "node:fs/promises";
|
|
14
13
|
import { randomUUID } from "node:crypto";
|
|
15
14
|
import { inspect } from "node:util";
|
|
15
|
+
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
16
16
|
import { readJsonFileWithFallback } from "openclaw/plugin-sdk/json-store";
|
|
17
17
|
import { parse, stringify } from "smol-toml";
|
|
18
18
|
//#region extensions/acpx/src/codex-trust-config.ts
|
|
@@ -1021,7 +1021,7 @@ async function prepareAcpxCodexAuthConfig(params) {
|
|
|
1021
1021
|
*/
|
|
1022
1022
|
const ENABLE_STARTUP_PROBE_ENV = "OPENCLAW_ACPX_RUNTIME_STARTUP_PROBE";
|
|
1023
1023
|
const SKIP_RUNTIME_PROBE_ENV = "OPENCLAW_SKIP_ACPX_RUNTIME_PROBE";
|
|
1024
|
-
const loadRuntimeModule = createLazyRuntimeModule(() => import("./runtime-
|
|
1024
|
+
const loadRuntimeModule = createLazyRuntimeModule(() => import("./runtime-mnaLaFBR.js"));
|
|
1025
1025
|
/** Convert ACPX timeout seconds into timer-safe milliseconds. */
|
|
1026
1026
|
function resolveAcpxTimerTimeoutMs(timeoutSeconds) {
|
|
1027
1027
|
if (timeoutSeconds === void 0) return;
|
|
@@ -1046,6 +1046,7 @@ function createLazyDefaultRuntime(params) {
|
|
|
1046
1046
|
openclawToolsMcpBridgeEnabled: params.pluginConfig.openClawToolsMcpBridge,
|
|
1047
1047
|
permissionMode: params.pluginConfig.permissionMode,
|
|
1048
1048
|
nonInteractivePermissions: params.pluginConfig.nonInteractivePermissions,
|
|
1049
|
+
elicitationModes: ["form", "url"],
|
|
1049
1050
|
timeoutMs: resolveAcpxTimerTimeoutMs(params.pluginConfig.timeoutSeconds)
|
|
1050
1051
|
});
|
|
1051
1052
|
return runtime;
|
|
@@ -1260,7 +1261,7 @@ function createAcpxRuntimeService(params) {
|
|
|
1260
1261
|
ctx.logger.info("embedded acpx runtime backend ready");
|
|
1261
1262
|
return;
|
|
1262
1263
|
}
|
|
1263
|
-
const doctorReport = await measureAcpxStartup(ctx, "probe.doctor", () => startedRuntime.doctor
|
|
1264
|
+
const doctorReport = await measureAcpxStartup(ctx, "probe.doctor", () => startedRuntime.doctor());
|
|
1264
1265
|
if (currentRevision !== lifecycleRevision) return;
|
|
1265
1266
|
detailAcpxStartup(ctx, "probe.result", [["healthyCount", 0]]);
|
|
1266
1267
|
ctx.logger.warn(`embedded acpx runtime backend probe failed: ${doctorReport ? formatDoctorFailureMessage(doctorReport) : "backend remained unhealthy after probe"}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/acpx",
|
|
3
|
-
"version": "2026.8.1
|
|
3
|
+
"version": "2026.8.1",
|
|
4
4
|
"description": "OpenClaw ACP runtime backend with plugin-owned session and transport management.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@agentclientprotocol/claude-agent-acp": "0.
|
|
12
|
-
"@agentclientprotocol/codex-acp": "1.
|
|
13
|
-
"acpx": "0.13.
|
|
14
|
-
"smol-toml": "1.
|
|
11
|
+
"@agentclientprotocol/claude-agent-acp": "0.70.0",
|
|
12
|
+
"@agentclientprotocol/codex-acp": "1.6.2",
|
|
13
|
+
"acpx": "0.13.1",
|
|
14
|
+
"smol-toml": "1.8.0",
|
|
15
15
|
"zod": "4.4.3"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
45
|
"compat": {
|
|
46
|
-
"pluginApi": ">=2026.8.1
|
|
46
|
+
"pluginApi": ">=2026.8.1"
|
|
47
47
|
},
|
|
48
48
|
"build": {
|
|
49
|
-
"openclawVersion": "2026.8.1
|
|
49
|
+
"openclawVersion": "2026.8.1",
|
|
50
50
|
"staticAssets": [
|
|
51
51
|
{
|
|
52
52
|
"source": "./src/runtime-internals/mcp-proxy.mjs",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"skills/**"
|
|
75
75
|
],
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"openclaw": ">=2026.8.1
|
|
77
|
+
"openclaw": ">=2026.8.1"
|
|
78
78
|
},
|
|
79
79
|
"peerDependenciesMeta": {
|
|
80
80
|
"openclaw": {
|
|
@@ -209,8 +209,8 @@ ${ACPX_CMD} codex sessions close oc-codex-<conversationId>
|
|
|
209
209
|
Defaults are:
|
|
210
210
|
|
|
211
211
|
- `openclaw -> openclaw acp`
|
|
212
|
-
- `claude -> bundled @agentclientprotocol/claude-agent-acp@0.
|
|
213
|
-
- `codex -> bundled @agentclientprotocol/codex-acp@1.
|
|
212
|
+
- `claude -> bundled @agentclientprotocol/claude-agent-acp@0.70.0`
|
|
213
|
+
- `codex -> bundled @agentclientprotocol/codex-acp@1.6.2 through OpenClaw's isolated CODEX_HOME wrapper`
|
|
214
214
|
- `copilot -> copilot --acp --stdio`
|
|
215
215
|
- `cursor -> cursor-agent acp`
|
|
216
216
|
- `droid -> droid exec --output-format acp`
|