@openclaw/acpx 2026.8.1-beta.3 → 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 +6 -3
- package/dist/{pi-session-catalog-runtime-BIu-8uRZ.js → pi-session-catalog-runtime-g6A6ADEf.js} +35 -33
- package/dist/{register.runtime-Dj29TKFy.js → register.runtime-DFRkXzZ_.js} +2 -2
- package/dist/register.runtime.js +1 -1
- package/dist/{runtime-BmOxa15I.js → runtime-mnaLaFBR.js} +16 -19
- package/dist/{service-PRlUtXMf.js → service-BFWEiHbQ.js} +2 -2
- package/package.json +7 -7
- package/skills/acp-router/SKILL.md +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createAcpxRuntimeService } from "./register.runtime-
|
|
1
|
+
import { t as createAcpxRuntimeService } from "./register.runtime-DFRkXzZ_.js";
|
|
2
2
|
import "./config-schema-DN_uAi4R.js";
|
|
3
3
|
import { a as PI_SESSIONS_CAPABILITY, c as PI_SESSION_READ_COMMAND, l as PI_TERMINAL_RESUME_COMMAND, o as PI_SESSIONS_LIST_COMMAND, r as piSessionStoreAvailable, s as PI_SESSION_ID_PATTERN } from "./pi-session-paths-EMbd4Hkz.js";
|
|
4
4
|
import { tryDispatchAcpReplyHook } from "openclaw/plugin-sdk/acp-runtime-backend";
|
|
@@ -8,7 +8,7 @@ import { resolveNodeHostExecutable } from "openclaw/plugin-sdk/node-host";
|
|
|
8
8
|
import { createSessionCatalogNodeHostBindings } from "openclaw/plugin-sdk/session-catalog";
|
|
9
9
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
//#region extensions/acpx/src/pi-session-catalog-plugin.ts
|
|
11
|
-
const loadPiSessionCatalogModule = createLazyRuntimeModule(() => import("./pi-session-catalog-runtime-
|
|
11
|
+
const loadPiSessionCatalogModule = createLazyRuntimeModule(() => import("./pi-session-catalog-runtime-g6A6ADEf.js"));
|
|
12
12
|
function fullConfigCatalogEnabled(config) {
|
|
13
13
|
if (!isRecord(config) || !isRecord(config.plugins) || !isRecord(config.plugins.entries)) return true;
|
|
14
14
|
const entry = config.plugins.entries.acpx;
|
|
@@ -105,7 +105,10 @@ const plugin = {
|
|
|
105
105
|
pluginConfig: api.pluginConfig,
|
|
106
106
|
openKeyedStore: (options) => api.runtime.state.openKeyedStore(options)
|
|
107
107
|
}));
|
|
108
|
-
api.on("reply_dispatch", (event, ctx) => tryDispatchAcpReplyHookWithTimeout(event, ctx, replyDispatchTimeoutMs), {
|
|
108
|
+
api.on("reply_dispatch", (event, ctx) => tryDispatchAcpReplyHookWithTimeout(event, ctx, replyDispatchTimeoutMs), {
|
|
109
|
+
timeoutMs: replyDispatchTimeoutMs,
|
|
110
|
+
eligibleDispatchKinds: ["acp"]
|
|
111
|
+
});
|
|
109
112
|
}
|
|
110
113
|
};
|
|
111
114
|
//#endregion
|
package/dist/{pi-session-catalog-runtime-BIu-8uRZ.js → pi-session-catalog-runtime-g6A6ADEf.js}
RENAMED
|
@@ -8,8 +8,9 @@ import path from "node:path";
|
|
|
8
8
|
import fs$1 from "node:fs/promises";
|
|
9
9
|
import process from "node:process";
|
|
10
10
|
import { resolveAcpSessionAvailability } from "openclaw/plugin-sdk/acp-runtime";
|
|
11
|
-
import {
|
|
11
|
+
import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
12
12
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
13
|
+
import { runTasksWithConcurrency } from "openclaw/plugin-sdk/concurrency-runtime";
|
|
13
14
|
import { isPathStrictlyInside } from "openclaw/plugin-sdk/file-access-runtime";
|
|
14
15
|
//#region extensions/acpx/src/pi-session-timestamp.ts
|
|
15
16
|
/** Preserve Pi JSONL's date-first string contract while accepting numeric millisecond values. */
|
|
@@ -95,38 +96,30 @@ async function realpathOrResolve(value) {
|
|
|
95
96
|
return path.resolve(value);
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
|
-
async function mapConcurrent(values, limit, mapper) {
|
|
99
|
-
const results = [];
|
|
100
|
-
results.length = values.length;
|
|
101
|
-
let nextIndex = 0;
|
|
102
|
-
const workers = Array.from({ length: Math.min(limit, values.length) }, async () => {
|
|
103
|
-
while (nextIndex < values.length) {
|
|
104
|
-
const index = nextIndex++;
|
|
105
|
-
results[index] = await mapper(values[index]);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
await Promise.all(workers);
|
|
109
|
-
return results;
|
|
110
|
-
}
|
|
111
99
|
async function scanPiFileCandidates(env) {
|
|
112
100
|
const { root, files } = await discoverPiSessionFiles(env);
|
|
113
101
|
const configuredAcpRoot = piAcpSessionStoreRoot(env);
|
|
114
102
|
const acpRoot = configuredAcpRoot ? await realpathOrResolve(configuredAcpRoot) : void 0;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
103
|
+
const { results: candidates } = await runTasksWithConcurrency({
|
|
104
|
+
tasks: files.map((file) => async () => {
|
|
105
|
+
try {
|
|
106
|
+
const stats = await fs$1.stat(file);
|
|
107
|
+
return stats.isFile() ? {
|
|
108
|
+
file,
|
|
109
|
+
storeRoot: root,
|
|
110
|
+
identity: `${String(stats.dev)}:${String(stats.ino)}:${String(stats.birthtimeMs)}`,
|
|
111
|
+
mtimeMs: stats.mtimeMs,
|
|
112
|
+
size: stats.size,
|
|
113
|
+
resumable: acpRoot ? isPathStrictlyInside(acpRoot, file) : false
|
|
114
|
+
} : void 0;
|
|
115
|
+
} catch {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
}),
|
|
119
|
+
limit: IO_CONCURRENCY,
|
|
120
|
+
throwOnError: true
|
|
121
|
+
});
|
|
122
|
+
return candidates.filter((candidate) => candidate !== void 0).toSorted((left, right) => right.mtimeMs - left.mtimeMs);
|
|
130
123
|
}
|
|
131
124
|
async function piFileCandidates(env) {
|
|
132
125
|
const store = piSessionStore(env);
|
|
@@ -323,7 +316,11 @@ async function listPiSummaryPage(env, params) {
|
|
|
323
316
|
const matches = [];
|
|
324
317
|
const needle = params.searchTerm?.toLocaleLowerCase();
|
|
325
318
|
for (let index = 0; index < candidates.length && matches.length < target; index += SUMMARY_SCAN_BATCH_SIZE) {
|
|
326
|
-
const summaries = await
|
|
319
|
+
const { results: summaries } = await runTasksWithConcurrency({
|
|
320
|
+
tasks: candidates.slice(index, index + SUMMARY_SCAN_BATCH_SIZE).map((candidate) => () => readPiSessionSummary(candidate)),
|
|
321
|
+
limit: IO_CONCURRENCY,
|
|
322
|
+
throwOnError: true
|
|
323
|
+
});
|
|
327
324
|
for (const summary of summaries) if (summary && summaryMatches(summary, needle)) {
|
|
328
325
|
matches.push(summary);
|
|
329
326
|
if (matches.length >= target) break;
|
|
@@ -337,7 +334,12 @@ async function listPiSummaryPage(env, params) {
|
|
|
337
334
|
async function findPiSummary(threadId, env) {
|
|
338
335
|
const candidates = await piFileCandidates(env);
|
|
339
336
|
for (let index = 0; index < candidates.length; index += SUMMARY_SCAN_BATCH_SIZE) {
|
|
340
|
-
const
|
|
337
|
+
const { results: summaries } = await runTasksWithConcurrency({
|
|
338
|
+
tasks: candidates.slice(index, index + SUMMARY_SCAN_BATCH_SIZE).map((candidate) => () => readPiSessionSummary(candidate)),
|
|
339
|
+
limit: IO_CONCURRENCY,
|
|
340
|
+
throwOnError: true
|
|
341
|
+
});
|
|
342
|
+
const match = summaries.find((summary) => summary?.threadId === threadId);
|
|
341
343
|
if (match) return match;
|
|
342
344
|
}
|
|
343
345
|
}
|
|
@@ -754,7 +756,7 @@ async function createAdoptedPiSession(params) {
|
|
|
754
756
|
key: sessionCatalogAdoptedSessionKey(PI_ADOPTED_SESSION_KEY_PREFIX, params.threadId),
|
|
755
757
|
agentId: params.agentId,
|
|
756
758
|
recoverMatchingInitialEntry: true,
|
|
757
|
-
...params.session.name ? {
|
|
759
|
+
...params.session.name ? { displayName: params.session.name } : {},
|
|
758
760
|
...params.session.cwd ? { spawnedCwd: params.session.cwd } : {},
|
|
759
761
|
initialEntry: {
|
|
760
762
|
acpBackendId: ACPX_BACKEND_ID,
|
|
@@ -856,7 +858,7 @@ function createPiSessionCatalogRuntime(api) {
|
|
|
856
858
|
sessionUnavailable: "Pi session is unavailable"
|
|
857
859
|
},
|
|
858
860
|
continuation: {
|
|
859
|
-
resolveAgentId: (agentId) =>
|
|
861
|
+
resolveAgentId: (agentId) => resolveSessionAgentIdsStrict({
|
|
860
862
|
config: api.config,
|
|
861
863
|
agentId
|
|
862
864
|
}).sessionAgentId,
|
|
@@ -43,7 +43,7 @@ function createLazyAcpRuntimeProxy(resolveRuntime) {
|
|
|
43
43
|
await (await resolveRuntime()).setMode(input);
|
|
44
44
|
},
|
|
45
45
|
async setConfigOption(input) {
|
|
46
|
-
await (await resolveRuntime()).setConfigOption(input);
|
|
46
|
+
return await (await resolveRuntime()).setConfigOption(input);
|
|
47
47
|
},
|
|
48
48
|
async doctor() {
|
|
49
49
|
return await (await resolveRuntime()).doctor();
|
|
@@ -66,7 +66,7 @@ function createLazyAcpRuntimeProxy(resolveRuntime) {
|
|
|
66
66
|
* immediately, then imports the heavier service only when a session needs it.
|
|
67
67
|
*/
|
|
68
68
|
const ACPX_BACKEND_ID = "acpx";
|
|
69
|
-
const loadServiceModule = createLazyRuntimeModule(() => import("./service-
|
|
69
|
+
const loadServiceModule = createLazyRuntimeModule(() => import("./service-BFWEiHbQ.js"));
|
|
70
70
|
function unregisterOwnedRuntime(runtime) {
|
|
71
71
|
if (runtime && getAcpRuntimeBackend(ACPX_BACKEND_ID)?.runtime === runtime) unregisterAcpRuntimeBackend(ACPX_BACKEND_ID);
|
|
72
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 };
|
|
@@ -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;
|
|
@@ -1011,7 +1012,7 @@ var AcpxRuntime = class {
|
|
|
1011
1012
|
}
|
|
1012
1013
|
async setConfigOption(input) {
|
|
1013
1014
|
const snapshot = await this.loadOperationSnapshotForHandle(input.handle);
|
|
1014
|
-
await this.runWithProcessLeaseForHandle(input.handle, snapshot.record, () => this.setConfigOptionUnlocked(input, snapshot));
|
|
1015
|
+
return await this.runWithProcessLeaseForHandle(input.handle, snapshot.record, () => this.setConfigOptionUnlocked(input, snapshot));
|
|
1015
1016
|
}
|
|
1016
1017
|
async setConfigOptionUnlocked(input, snapshot) {
|
|
1017
1018
|
const { command } = snapshot;
|
|
@@ -1024,38 +1025,34 @@ var AcpxRuntime = class {
|
|
|
1024
1025
|
const classification = classifyCodexAcpModelRequest(input.value);
|
|
1025
1026
|
if (classification.kind === "unsupported") failUnsupportedCodexAcpModel(input.value);
|
|
1026
1027
|
const { override } = classification;
|
|
1027
|
-
|
|
1028
|
+
const modelResult = override.model ? await delegate.setConfigOption({
|
|
1028
1029
|
...input,
|
|
1029
1030
|
key: "model",
|
|
1030
1031
|
value: override.model
|
|
1031
|
-
});
|
|
1032
|
-
if (override.reasoningEffort) await delegate.setConfigOption({
|
|
1032
|
+
}) : void 0;
|
|
1033
|
+
if (override.reasoningEffort) return await delegate.setConfigOption({
|
|
1033
1034
|
...input,
|
|
1034
1035
|
key: "reasoning_effort",
|
|
1035
1036
|
value: override.reasoningEffort
|
|
1036
1037
|
});
|
|
1037
|
-
return;
|
|
1038
|
+
return modelResult;
|
|
1038
1039
|
}
|
|
1039
1040
|
if (key === "thinking" || key === "thought_level" || key === "reasoning_effort") {
|
|
1040
1041
|
const classification = classifyCodexAcpModelRequest(void 0, input.value);
|
|
1041
1042
|
const reasoningEffort = classification.kind === "override" ? classification.override.reasoningEffort : void 0;
|
|
1042
|
-
if (!reasoningEffort)
|
|
1043
|
-
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({
|
|
1044
1045
|
...input,
|
|
1045
1046
|
key: "reasoning_effort",
|
|
1046
1047
|
value: reasoningEffort
|
|
1047
1048
|
});
|
|
1048
|
-
return;
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
|
-
if (isClaudeAcpCommand(command) && key === "model") {
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
return;
|
|
1057
|
-
}
|
|
1058
|
-
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);
|
|
1059
1056
|
}
|
|
1060
1057
|
async cancel(input) {
|
|
1061
1058
|
const snapshot = await this.loadOperationSnapshotForHandle(input.handle);
|
|
@@ -1,4 +1,4 @@
|
|
|
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
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";
|
|
@@ -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;
|
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.
|
|
11
|
+
"@agentclientprotocol/claude-agent-acp": "0.70.0",
|
|
12
|
+
"@agentclientprotocol/codex-acp": "1.6.2",
|
|
13
13
|
"acpx": "0.13.1",
|
|
14
|
-
"smol-toml": "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`
|