@openclaw/acpx 2026.5.10-beta.1 → 2026.5.10-beta.3
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/register.runtime.js
CHANGED
|
@@ -2,13 +2,14 @@ import { getAcpRuntimeBackend, registerAcpRuntimeBackend, unregisterAcpRuntimeBa
|
|
|
2
2
|
//#region extensions/acpx/register.runtime.ts
|
|
3
3
|
const ACPX_BACKEND_ID = "acpx";
|
|
4
4
|
const ENABLE_STARTUP_PROBE_ENV = "OPENCLAW_ACPX_RUNTIME_STARTUP_PROBE";
|
|
5
|
+
const SKIP_RUNTIME_PROBE_ENV = "OPENCLAW_SKIP_ACPX_RUNTIME_PROBE";
|
|
5
6
|
let serviceModulePromise = null;
|
|
6
7
|
function loadServiceModule() {
|
|
7
|
-
serviceModulePromise ??= import("./service-
|
|
8
|
+
serviceModulePromise ??= import("./service-DQ72Urx_.js");
|
|
8
9
|
return serviceModulePromise;
|
|
9
10
|
}
|
|
10
11
|
function shouldRunStartupProbe(env = process.env) {
|
|
11
|
-
return env[ENABLE_STARTUP_PROBE_ENV]
|
|
12
|
+
return env[ENABLE_STARTUP_PROBE_ENV] !== "0" && env[SKIP_RUNTIME_PROBE_ENV] !== "1";
|
|
12
13
|
}
|
|
13
14
|
async function startRealService(state) {
|
|
14
15
|
if (state.realRuntime) return state.realRuntime;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { registerAcpRuntimeBackend, unregisterAcpRuntimeBackend } from "./runtime-api.js";
|
|
2
2
|
import { a as OPENCLAW_GATEWAY_INSTANCE_ID_ARG, i as OPENCLAW_ACPX_LEASE_ID_ARG, r as reapStaleOpenClawOwnedAcpxOrphans, s as createAcpxProcessLeaseStore, t as cleanupOpenClawOwnedAcpxProcessTree } from "./process-reaper-DKzgrZt9.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
|
-
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/
|
|
4
|
+
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -12,7 +12,7 @@ import fsSync from "node:fs";
|
|
|
12
12
|
import os from "node:os";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
import { formatPluginConfigIssue } from "openclaw/plugin-sdk/extension-shared";
|
|
15
|
-
import { z } from "
|
|
15
|
+
import { z } from "zod";
|
|
16
16
|
//#region extensions/acpx/src/codex-trust-config.ts
|
|
17
17
|
function stripTomlComment(line) {
|
|
18
18
|
let quote = null;
|
|
@@ -720,6 +720,7 @@ async function prepareAcpxCodexAuthConfig(params) {
|
|
|
720
720
|
//#endregion
|
|
721
721
|
//#region extensions/acpx/src/service.ts
|
|
722
722
|
const ENABLE_STARTUP_PROBE_ENV = "OPENCLAW_ACPX_RUNTIME_STARTUP_PROBE";
|
|
723
|
+
const SKIP_RUNTIME_PROBE_ENV = "OPENCLAW_SKIP_ACPX_RUNTIME_PROBE";
|
|
723
724
|
const ACPX_BACKEND_ID = "acpx";
|
|
724
725
|
let runtimeModulePromise = null;
|
|
725
726
|
function loadRuntimeModule() {
|
|
@@ -834,7 +835,24 @@ function resolveAllowedAgentsProbeAgent(ctx) {
|
|
|
834
835
|
}
|
|
835
836
|
}
|
|
836
837
|
function shouldRunStartupProbe(env = process.env) {
|
|
837
|
-
return env[ENABLE_STARTUP_PROBE_ENV]
|
|
838
|
+
return env[ENABLE_STARTUP_PROBE_ENV] !== "0";
|
|
839
|
+
}
|
|
840
|
+
function shouldProbeRuntimeAtStartup(env = process.env) {
|
|
841
|
+
return shouldRunStartupProbe(env) && env[SKIP_RUNTIME_PROBE_ENV] !== "1";
|
|
842
|
+
}
|
|
843
|
+
async function withStartupProbeTimeout(params) {
|
|
844
|
+
let timeout;
|
|
845
|
+
const timeoutMs = Math.max(1, params.timeoutSeconds * 1e3);
|
|
846
|
+
try {
|
|
847
|
+
return await Promise.race([params.promise, new Promise((_, reject) => {
|
|
848
|
+
timeout = setTimeout(() => {
|
|
849
|
+
reject(/* @__PURE__ */ new Error(`embedded acpx runtime backend startup probe timed out after ${params.timeoutSeconds}s`));
|
|
850
|
+
}, timeoutMs);
|
|
851
|
+
timeout.unref?.();
|
|
852
|
+
})]);
|
|
853
|
+
} finally {
|
|
854
|
+
if (timeout) clearTimeout(timeout);
|
|
855
|
+
}
|
|
838
856
|
}
|
|
839
857
|
async function resolveGatewayInstanceId(stateDir) {
|
|
840
858
|
const filePath = path.join(stateDir, "gateway-instance-id");
|
|
@@ -937,31 +955,33 @@ function createAcpxRuntimeService(params = {}) {
|
|
|
937
955
|
wrapperRoot,
|
|
938
956
|
logger: ctx.logger
|
|
939
957
|
});
|
|
958
|
+
const shouldProbeRuntime = shouldProbeRuntimeAtStartup();
|
|
940
959
|
registerAcpRuntimeBackend({
|
|
941
960
|
id: ACPX_BACKEND_ID,
|
|
942
961
|
runtime,
|
|
943
|
-
...
|
|
962
|
+
...shouldProbeRuntime ? { healthy: () => runtime?.isHealthy() ?? false } : {}
|
|
944
963
|
});
|
|
945
964
|
ctx.logger.info(`embedded acpx runtime backend registered (cwd: ${pluginConfig.cwd})`);
|
|
946
|
-
if (!
|
|
965
|
+
if (!shouldProbeRuntime) return;
|
|
947
966
|
lifecycleRevision += 1;
|
|
948
967
|
const currentRevision = lifecycleRevision;
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
if (currentRevision !== lifecycleRevision) return;
|
|
959
|
-
ctx.logger.warn(`embedded acpx runtime backend probe failed: ${doctorReport ? formatDoctorFailureMessage(doctorReport) : "backend remained unhealthy after probe"}`);
|
|
960
|
-
} catch (err) {
|
|
961
|
-
if (currentRevision !== lifecycleRevision) return;
|
|
962
|
-
ctx.logger.warn(`embedded acpx runtime setup failed: ${formatErrorMessage(err)}`);
|
|
968
|
+
try {
|
|
969
|
+
if (runtime) await withStartupProbeTimeout({
|
|
970
|
+
promise: runtime.probeAvailability(),
|
|
971
|
+
timeoutSeconds: pluginConfig.timeoutSeconds ?? 120
|
|
972
|
+
});
|
|
973
|
+
if (currentRevision !== lifecycleRevision) return;
|
|
974
|
+
if (runtime?.isHealthy()) {
|
|
975
|
+
ctx.logger.info("embedded acpx runtime backend ready");
|
|
976
|
+
return;
|
|
963
977
|
}
|
|
964
|
-
|
|
978
|
+
const doctorReport = await runtime?.doctor?.();
|
|
979
|
+
if (currentRevision !== lifecycleRevision) return;
|
|
980
|
+
ctx.logger.warn(`embedded acpx runtime backend probe failed: ${doctorReport ? formatDoctorFailureMessage(doctorReport) : "backend remained unhealthy after probe"}`);
|
|
981
|
+
} catch (err) {
|
|
982
|
+
if (currentRevision !== lifecycleRevision) return;
|
|
983
|
+
ctx.logger.warn(`embedded acpx runtime setup failed: ${formatErrorMessage(err)}`);
|
|
984
|
+
}
|
|
965
985
|
},
|
|
966
986
|
async stop(_ctx) {
|
|
967
987
|
lifecycleRevision += 1;
|
package/dist/setup-api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
2
|
-
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/
|
|
2
|
+
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/acpx/setup-api.ts
|
|
4
4
|
var setup_api_default = definePluginEntry({
|
|
5
5
|
id: "acpx",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/acpx",
|
|
3
|
-
"version": "2026.5.10-beta.
|
|
3
|
+
"version": "2026.5.10-beta.3",
|
|
4
4
|
"description": "OpenClaw ACP runtime backend",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@agentclientprotocol/claude-agent-acp": "0.33.1",
|
|
12
12
|
"@zed-industries/codex-acp": "0.14.0",
|
|
13
|
-
"acpx": "0.7.0"
|
|
13
|
+
"acpx": "0.7.0",
|
|
14
|
+
"zod": "^4.4.3"
|
|
14
15
|
},
|
|
15
16
|
"devDependencies": {
|
|
16
17
|
"@openclaw/plugin-sdk": "workspace:*"
|
|
@@ -25,10 +26,10 @@
|
|
|
25
26
|
"minHostVersion": ">=2026.4.25"
|
|
26
27
|
},
|
|
27
28
|
"compat": {
|
|
28
|
-
"pluginApi": ">=2026.5.10-beta.
|
|
29
|
+
"pluginApi": ">=2026.5.10-beta.3"
|
|
29
30
|
},
|
|
30
31
|
"build": {
|
|
31
|
-
"openclawVersion": "2026.5.10-beta.
|
|
32
|
+
"openclawVersion": "2026.5.10-beta.3",
|
|
32
33
|
"staticAssets": [
|
|
33
34
|
{
|
|
34
35
|
"source": "./src/runtime-internals/mcp-proxy.mjs",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"skills/**"
|
|
59
60
|
],
|
|
60
61
|
"peerDependencies": {
|
|
61
|
-
"openclaw": ">=2026.5.10-beta.
|
|
62
|
+
"openclaw": ">=2026.5.10-beta.3"
|
|
62
63
|
},
|
|
63
64
|
"peerDependenciesMeta": {
|
|
64
65
|
"openclaw": {
|