@openclaw/acpx 2026.5.31-beta.3 → 2026.6.1-beta.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 CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createAcpxRuntimeService } from "./register.runtime-CzizG0_Q.js";
1
+ import { t as createAcpxRuntimeService } from "./register.runtime-CyVXGMrx.js";
2
2
  import { tryDispatchAcpReplyHook } from "openclaw/plugin-sdk/acp-runtime-backend";
3
3
  //#region extensions/acpx/index.ts
4
4
  const plugin = {
@@ -504,7 +504,9 @@ function isProcessAlive(pid) {
504
504
  }
505
505
  async function terminatePids(pids, deps) {
506
506
  const killProcess = deps?.killProcess ?? ((pid, signal) => process.kill(pid, signal));
507
- const sleep = deps?.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
507
+ const sleep = deps?.sleep ?? ((ms) => new Promise((resolve) => {
508
+ setTimeout(resolve, ms);
509
+ }));
508
510
  const terminated = [];
509
511
  for (const pid of pids) try {
510
512
  killProcess(pid, "SIGTERM");
@@ -524,7 +526,7 @@ async function cleanupOpenClawOwnedAcpxProcessTree(params) {
524
526
  terminatedPids: [],
525
527
  skippedReason: "missing-root"
526
528
  };
527
- let processes = [];
529
+ let processes;
528
530
  try {
529
531
  processes = await (params.deps?.listProcesses ?? listPlatformProcesses)();
530
532
  } catch {
@@ -44,7 +44,7 @@ var LegacyRunTurnEventQueue = class {
44
44
  async next() {
45
45
  const item = this.items.shift();
46
46
  if (item) return item;
47
- if (this.error) throw this.error;
47
+ if (this.error) throw toLintErrorObject(this.error, "Non-Error thrown");
48
48
  if (this.closed) return null;
49
49
  return await new Promise((resolve, reject) => {
50
50
  this.waits.push({
@@ -144,6 +144,13 @@ function lazyStartRuntimeTurn(resolveRuntime, input) {
144
144
  }
145
145
  };
146
146
  }
147
+ function toLintErrorObject(value, fallbackMessage) {
148
+ if (value instanceof Error) return value;
149
+ if (typeof value === "string") return new Error(value);
150
+ const error = new Error(fallbackMessage, { cause: value });
151
+ if (typeof value === "object" && value !== null || typeof value === "function") Object.assign(error, value);
152
+ return error;
153
+ }
147
154
  //#endregion
148
155
  //#region extensions/acpx/src/runtime-proxy.ts
149
156
  function createLazyAcpRuntimeProxy(resolveRuntime) {
@@ -191,7 +198,7 @@ function createLazyAcpRuntimeProxy(resolveRuntime) {
191
198
  const ACPX_BACKEND_ID = "acpx";
192
199
  let serviceModulePromise = null;
193
200
  function loadServiceModule() {
194
- serviceModulePromise ??= import("./service-CNr8QVvs.js");
201
+ serviceModulePromise ??= import("./service-CB8k9TcJ.js");
195
202
  return serviceModulePromise;
196
203
  }
197
204
  async function startRealService(state) {
@@ -1,2 +1,2 @@
1
- import { t as createAcpxRuntimeService } from "./register.runtime-CzizG0_Q.js";
1
+ import { t as createAcpxRuntimeService } from "./register.runtime-CyVXGMrx.js";
2
2
  export { createAcpxRuntimeService };
@@ -1,5 +1,5 @@
1
1
  import { AcpRuntimeError } from "./runtime-api.js";
2
- import { f as hashAcpxProcessCommand, h as splitCommandParts, n as isOpenClawLeaseAwareAcpxProcessCommand, p as withAcpxLeaseEnvironment, t as cleanupOpenClawOwnedAcpxProcessTree, u as createAcpxProcessLeaseId } from "./process-reaper-rnTgvFuQ.js";
2
+ import { f as hashAcpxProcessCommand, h as splitCommandParts, n as isOpenClawLeaseAwareAcpxProcessCommand, p as withAcpxLeaseEnvironment, t as cleanupOpenClawOwnedAcpxProcessTree, u as createAcpxProcessLeaseId } from "./process-reaper-Dr6ilvUG.js";
3
3
  import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  import fs from "node:fs/promises";
@@ -686,7 +686,7 @@ var AcpxRuntime = class {
686
686
  }
687
687
  async close(input) {
688
688
  const record = await this.sessionStore.load(input.handle.acpxRecordId ?? input.handle.sessionKey);
689
- let closeSucceeded = false;
689
+ let closeSucceeded;
690
690
  try {
691
691
  await this.resolveDelegateForLoadedRecord(input.handle, record).close({
692
692
  handle: input.handle,
@@ -1,6 +1,6 @@
1
- import { n as createLazyAcpRuntimeProxy } from "./register.runtime-CzizG0_Q.js";
1
+ import { n as createLazyAcpRuntimeProxy } from "./register.runtime-CyVXGMrx.js";
2
2
  import { registerAcpRuntimeBackend, unregisterAcpRuntimeBackend } from "./runtime-api.js";
3
- import { a as resolveAcpxPluginRoot, c as OPENCLAW_ACPX_LEASE_ID_ENV, d as createAcpxProcessLeaseStore, h as splitCommandParts, i as resolveAcpxPluginConfig, l as OPENCLAW_GATEWAY_INSTANCE_ID_ARG, m as quoteCommandPart, o as toAcpMcpServers, r as reapStaleOpenClawOwnedAcpxOrphans, s as OPENCLAW_ACPX_LEASE_ID_ARG, t as cleanupOpenClawOwnedAcpxProcessTree } from "./process-reaper-rnTgvFuQ.js";
3
+ import { a as resolveAcpxPluginRoot, c as OPENCLAW_ACPX_LEASE_ID_ENV, d as createAcpxProcessLeaseStore, h as splitCommandParts, i as resolveAcpxPluginConfig, l as OPENCLAW_GATEWAY_INSTANCE_ID_ARG, m as quoteCommandPart, o as toAcpMcpServers, r as reapStaleOpenClawOwnedAcpxOrphans, s as OPENCLAW_ACPX_LEASE_ID_ARG, t as cleanupOpenClawOwnedAcpxProcessTree } from "./process-reaper-Dr6ilvUG.js";
4
4
  import { createRequire } from "node:module";
5
5
  import fs from "node:fs/promises";
6
6
  import path from "node:path";
@@ -665,6 +665,35 @@ function buildCodexAcpWrapperScript(installedBinPath) {
665
665
  installedBinPath,
666
666
  stderrLogFileNamePrefix: "codex-acp-wrapper.stderr",
667
667
  envSetup: `const codexHome = fileURLToPath(new URL("./codex-home/", import.meta.url));
668
+ const codexAuthPath = fileURLToPath(new URL("./codex-home/auth.json", import.meta.url));
669
+ const codexApiKey = (process.env.CODEX_API_KEY || process.env.OPENAI_API_KEY || "").trim();
670
+ let shouldWriteCodexApiKeyAuth = false;
671
+ if (codexApiKey) {
672
+ if (!existsSync(codexAuthPath)) {
673
+ shouldWriteCodexApiKeyAuth = true;
674
+ } else {
675
+ try {
676
+ const existingCodexAuth = JSON.parse(readFileSync(codexAuthPath, "utf8"));
677
+ shouldWriteCodexApiKeyAuth =
678
+ !existingCodexAuth ||
679
+ typeof existingCodexAuth !== "object" ||
680
+ typeof existingCodexAuth.OPENAI_API_KEY === "string";
681
+ } catch {
682
+ shouldWriteCodexApiKeyAuth = true;
683
+ }
684
+ }
685
+ }
686
+ if (shouldWriteCodexApiKeyAuth) {
687
+ writeFileSync(
688
+ codexAuthPath,
689
+ JSON.stringify({
690
+ OPENAI_API_KEY: codexApiKey,
691
+ tokens: null,
692
+ last_refresh: null,
693
+ }) + "\\n",
694
+ { mode: 0o600 },
695
+ );
696
+ }
668
697
  const env = {
669
698
  ...process.env,
670
699
  CODEX_HOME: codexHome,
@@ -802,7 +831,7 @@ const SKIP_RUNTIME_PROBE_ENV = "OPENCLAW_SKIP_ACPX_RUNTIME_PROBE";
802
831
  const ACPX_BACKEND_ID = "acpx";
803
832
  let runtimeModulePromise = null;
804
833
  function loadRuntimeModule() {
805
- runtimeModulePromise ??= import("./runtime-CJDn6Jos.js");
834
+ runtimeModulePromise ??= import("./runtime-YZVhuRcK.js");
806
835
  return runtimeModulePromise;
807
836
  }
808
837
  function resolveAcpxTimerTimeoutMs(timeoutSeconds) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/acpx",
3
- "version": "2026.5.31-beta.3",
3
+ "version": "2026.6.1-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/acpx",
9
- "version": "2026.5.31-beta.3",
9
+ "version": "2026.6.1-beta.1",
10
10
  "dependencies": {
11
11
  "@agentclientprotocol/claude-agent-acp": "0.39.0",
12
12
  "@zed-industries/codex-acp": "0.15.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/acpx",
3
- "version": "2026.5.31-beta.3",
3
+ "version": "2026.6.1-beta.1",
4
4
  "description": "OpenClaw ACP runtime backend with plugin-owned session and transport management.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,10 +26,10 @@
26
26
  "minHostVersion": ">=2026.4.25"
27
27
  },
28
28
  "compat": {
29
- "pluginApi": ">=2026.5.31-beta.3"
29
+ "pluginApi": ">=2026.6.1-beta.1"
30
30
  },
31
31
  "build": {
32
- "openclawVersion": "2026.5.31-beta.3",
32
+ "openclawVersion": "2026.6.1-beta.1",
33
33
  "staticAssets": [
34
34
  {
35
35
  "source": "./src/runtime-internals/mcp-proxy.mjs",
@@ -58,7 +58,7 @@
58
58
  "skills/**"
59
59
  ],
60
60
  "peerDependencies": {
61
- "openclaw": ">=2026.5.31-beta.3"
61
+ "openclaw": ">=2026.6.1-beta.1"
62
62
  },
63
63
  "peerDependenciesMeta": {
64
64
  "openclaw": {