@openclaw/acpx 2026.11.1 → 2026.11.2

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.
@@ -6,7 +6,7 @@ import { fileURLToPath } from "node:url";
6
6
  import { formatPluginConfigIssue } from "openclaw/plugin-sdk/extension-shared";
7
7
  import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
8
8
  import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
9
- // extensions/acpx/src/config-schema.ts
9
+ //#region extensions/acpx/src/config-schema.ts
10
10
  /**
11
11
  * ACPX plugin configuration schema and public config types. Runtime setup uses
12
12
  * this file as the single source of truth for validation and defaulting.
@@ -55,12 +55,14 @@ const AcpxPluginConfigSchema = z.strictObject({
55
55
  args: z.array(z.string({ error: "args must be an array of strings" })).optional()
56
56
  })).optional()
57
57
  });
58
- // extensions/acpx/src/codex-adapter.ts
58
+ //#endregion
59
+ //#region extensions/acpx/src/codex-adapter.ts
59
60
  const CODEX_ACP_PACKAGE = "@agentclientprotocol/codex-acp";
60
61
  const CODEX_ACP_BIN = "codex-acp";
61
62
  const LEGACY_CODEX_ACP_PACKAGE = "@zed-industries/codex-acp";
62
63
  const OPENCLAW_CODEX_CONFIG_ARG = "--openclaw-codex-config";
63
- // extensions/acpx/src/command-line.ts
64
+ //#endregion
65
+ //#region extensions/acpx/src/command-line.ts
64
66
  /** Match ACPX's persisted argv identity; scalar records keep their original bytes. */
65
67
  function renderAgentCommand(command) {
66
68
  return typeof command === "string" ? command : command.map((part) => /^[A-Za-z0-9_@%+=:,./^~-]+$/.test(part) ? part : JSON.stringify(part)).join(" ");
@@ -182,7 +184,8 @@ function resolveAgentCommand(params) {
182
184
  if (!normalizedAgentName) return;
183
185
  return splitCommandParts(params.agentRegistry.resolve(normalizedAgentName));
184
186
  }
185
- // extensions/acpx/src/config.ts
187
+ //#endregion
188
+ //#region extensions/acpx/src/config.ts
186
189
  const MANAGED_MCP_BRIDGES = [[
187
190
  "pluginToolsMcpBridge",
188
191
  "openclaw-plugin-tools",
@@ -338,4 +341,5 @@ function resolveAcpxPluginConfig(params) {
338
341
  agents
339
342
  };
340
343
  }
344
+ //#endregion
341
345
  export { isClaudeAcpCommand as a, renderAgentCommand as c, CODEX_ACP_BIN as d, CODEX_ACP_PACKAGE as f, AcpxNativeAgentsSchema as g, ACPX_NATIVE_AGENT_IDS as h, toAcpMcpServers as i, resolveAgentCommand as l, OPENCLAW_CODEX_CONFIG_ARG as m, resolveAcpxPluginRoot as n, isCodexAcpCommand as o, LEGACY_CODEX_ACP_PACKAGE as p, resolveOpenClawRoot as r, isOpenClawBridgeCommand as s, resolveAcpxPluginConfig as t, splitCommandParts as u };
@@ -7,7 +7,7 @@ import { DEFAULT_PLUGIN_APPROVAL_TIMEOUT_MS } from "openclaw/plugin-sdk/approval
7
7
  import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
8
8
  import { resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
9
9
  import { appendSessionTranscriptMessageByIdentityStrict } from "openclaw/plugin-sdk/session-transcript-runtime";
10
- // extensions/acpx/src/harness-attempt.ts
10
+ //#region extensions/acpx/src/harness-attempt.ts
11
11
  async function runAcpHarnessAttempt(params) {
12
12
  const { input, runtime } = params;
13
13
  if (!input.agentId || !input.sessionKey) throw new Error("ACP chat requires an owned OpenClaw session");
@@ -364,4 +364,5 @@ async function runAcpHarnessAttempt(params) {
364
364
  }
365
365
  };
366
366
  }
367
+ //#endregion
367
368
  export { runAcpHarnessAttempt };
@@ -1,4 +1,4 @@
1
- import { c as PI_SESSION_READ_COMMAND, i as PI_LOCAL_SESSION_HOST_ID, l as PI_TERMINAL_RESUME_COMMAND, n as piSessionStore, o as PI_SESSIONS_LIST_COMMAND, r as piSessionStoreAvailable, s as PI_SESSION_ID_PATTERN, t as piAcpSessionStoreRoot } from "./pi-session-paths-Co5515li.mjs";
1
+ import { c as PI_SESSION_READ_COMMAND, i as PI_LOCAL_SESSION_HOST_ID, l as PI_TERMINAL_RESUME_COMMAND, n as piSessionStore, o as PI_SESSIONS_LIST_COMMAND, r as piSessionStoreAvailable, s as PI_SESSION_ID_PATTERN, t as piAcpSessionStoreRoot } from "./pi-session-paths-CIvyk6KB.mjs";
2
2
  import { parseDateFirstTimestampMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
3
3
  import { createReadStream } from "node:fs";
4
4
  import path from "node:path";
@@ -14,7 +14,7 @@ import { safeParseJson, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utili
14
14
  import fs$1 from "node:fs/promises";
15
15
  import { runTasksWithConcurrency } from "openclaw/plugin-sdk/concurrency-runtime";
16
16
  import { isPathStrictlyInside } from "openclaw/plugin-sdk/file-access-runtime";
17
- // extensions/acpx/src/pi-session-store.ts
17
+ //#region extensions/acpx/src/pi-session-store.ts
18
18
  const MAX_DISCOVERY_FILES = 1e4;
19
19
  const SUMMARY_SCAN_BATCH_SIZE = 100;
20
20
  const MAX_SUMMARY_CACHE_ENTRIES = 256;
@@ -337,7 +337,8 @@ async function readPiSessionById(threadId, env) {
337
337
  throw new Error("Pi session is unavailable", { cause: error });
338
338
  }
339
339
  }
340
- // extensions/acpx/src/pi-session-catalog.ts
340
+ //#endregion
341
+ //#region extensions/acpx/src/pi-session-catalog.ts
341
342
  const MAX_SEARCH_LENGTH = 500;
342
343
  const isExactPiSessionCursor = sessionCatalogPaging.isExactCursor;
343
344
  function textFromContent(content) {
@@ -530,7 +531,8 @@ async function readLocalPiTranscriptPage(value) {
530
531
  ...page
531
532
  };
532
533
  }
533
- // extensions/acpx/src/pi-session-upstream-activity.ts
534
+ //#endregion
535
+ //#region extensions/acpx/src/pi-session-upstream-activity.ts
534
536
  function readFilePath(probe) {
535
537
  return isRecord(probe.upstreamRef) && typeof probe.upstreamRef.filePath === "string" ? probe.upstreamRef.filePath : void 0;
536
538
  }
@@ -580,7 +582,8 @@ async function checkPiUpstreamActivity(probes) {
580
582
  } catch {}
581
583
  return outcomes;
582
584
  }
583
- // extensions/acpx/src/pi-session-catalog-runtime.ts
585
+ //#endregion
586
+ //#region extensions/acpx/src/pi-session-catalog-runtime.ts
584
587
  const NODE_TIMEOUT_MS = 2e4;
585
588
  const ACPX_BACKEND_ID = "acpx";
586
589
  const PI_ACP_AGENT_ID = "pi";
@@ -714,4 +717,5 @@ function createPiSessionCatalogRuntime(api) {
714
717
  checkUpstreamActivity: (probes, policy) => checkPiUpstreamActivity(probes.filter((probe) => probe.hostId !== "gateway" || policy?.allowProcessHomeFallback !== false || !piSessionStore(process.env).usesProcessHomeFallback))
715
718
  }, isExactPiSessionCursor);
716
719
  }
720
+ //#endregion
717
721
  export { createPiSessionCatalogRuntime, listLocalPiSessionPage as listPiSessions, readLocalPiTranscriptPage as readPiSession, requireLocalPiSession };
@@ -2,14 +2,15 @@ import { readFileSync, statSync } from "node:fs";
2
2
  import path from "node:path";
3
3
  import { isRecord, normalizeBoundedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import os from "node:os";
5
- // extensions/acpx/src/pi-session-catalog-shared.ts
5
+ //#region extensions/acpx/src/pi-session-catalog-shared.ts
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
9
  const PI_SESSIONS_CAPABILITY = "pi-sessions";
10
10
  const PI_LOCAL_SESSION_HOST_ID = "gateway";
11
11
  const PI_SESSION_ID_PATTERN = /^(?!-)[A-Za-z0-9._:-]{1,256}$/u;
12
- // extensions/acpx/src/pi-session-paths.ts
12
+ //#endregion
13
+ //#region extensions/acpx/src/pi-session-paths.ts
13
14
  function piHome(env) {
14
15
  return (process.platform === "win32" ? env.USERPROFILE?.trim() : env.HOME?.trim()) || os.homedir();
15
16
  }
@@ -79,4 +80,5 @@ function piSessionStoreAvailable(env, store) {
79
80
  return false;
80
81
  }
81
82
  }
83
+ //#endregion
82
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,6 +1,6 @@
1
1
  import { getAcpRuntimeBackend, registerAcpRuntimeBackend, unregisterAcpRuntimeBackend } from "openclaw/plugin-sdk/acp-runtime-backend";
2
2
  import { createLazyRuntimeMethodBinder, createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
3
- // extensions/acpx/src/runtime-proxy.ts
3
+ //#region extensions/acpx/src/runtime-proxy.ts
4
4
  /** Start an ACP turn through a lazy runtime resolver without awaiting resolution up front. */
5
5
  function lazyStartRuntimeTurn(resolveRuntime, input) {
6
6
  const turnPromise = resolveRuntime().then((runtime) => runtime.startTurn(input));
@@ -46,13 +46,14 @@ function createLazyAcpRuntimeProxy(resolveRuntime) {
46
46
  close: bind((runtime) => runtime.close.bind(runtime))
47
47
  };
48
48
  }
49
- // extensions/acpx/register.runtime.ts
49
+ //#endregion
50
+ //#region extensions/acpx/register.runtime.ts
50
51
  /**
51
52
  * Lazy ACPX runtime service registration. The plugin exposes an ACP backend
52
53
  * immediately, then imports the heavier service only when a session needs it.
53
54
  */
54
55
  const ACPX_BACKEND_ID = "acpx";
55
- const loadServiceModule = createLazyRuntimeModule(() => import("./service-ChAbEe-N.mjs"));
56
+ const loadServiceModule = createLazyRuntimeModule(() => import("./service-D_e2JAUG.mjs"));
56
57
  function unregisterOwnedRuntime(runtime) {
57
58
  if (runtime && getAcpRuntimeBackend(ACPX_BACKEND_ID)?.runtime === runtime) unregisterAcpRuntimeBackend(ACPX_BACKEND_ID);
58
59
  }
@@ -192,4 +193,5 @@ function createAcpxRuntimeService(params = {}) {
192
193
  }
193
194
  };
194
195
  }
196
+ //#endregion
195
197
  export { createAcpxRuntimeService as t };
@@ -1,5 +1,5 @@
1
1
  import "node:module";
2
- // \0rolldown/runtime.js
2
+ //#region \0rolldown/runtime.js
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -24,7 +24,8 @@ var __copyProps = (to, from, except, desc) => {
24
24
  return to;
25
25
  };
26
26
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
27
- // packages/normalization-core/src/record-coerce.ts
27
+ //#endregion
28
+ //#region packages/normalization-core/src/record-coerce.ts
28
29
  /** Type guard for non-array object records at browser-safe boundaries. */
29
30
  function isRecord(value) {
30
31
  return value !== null && typeof value === "object" && !Array.isArray(value);
@@ -33,7 +34,8 @@ function isRecord(value) {
33
34
  function asNullableRecord(value) {
34
35
  return isRecord(value) ? value : null;
35
36
  }
36
- // src/config/channel-config-normalization.ts
37
+ //#endregion
38
+ //#region src/config/channel-config-normalization.ts
37
39
  /** Applies one channel-specific doctor migration to every object-shaped account. */
38
40
  function normalizeChannelAccounts(params) {
39
41
  const rawAccounts = asNullableRecord(params.entry.accounts);
@@ -109,7 +111,8 @@ function normalizeChannelConfigEntries(params) {
109
111
  changes
110
112
  };
111
113
  }
112
- // src/plugin-sdk/legacy-webhook-listener-migration.ts
114
+ //#endregion
115
+ //#region src/plugin-sdk/legacy-webhook-listener-migration.ts
113
116
  /** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
114
117
  function createLegacyWebhookListenerDoctorContract(params) {
115
118
  const portKey = params.portKey ?? "webhookPort";
@@ -179,8 +182,10 @@ function createLegacyWebhookListenerDoctorContract(params) {
179
182
  }
180
183
  };
181
184
  }
182
- // \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
185
+ //#endregion
186
+ //#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
183
187
  var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
184
188
  import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
185
189
  __reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
190
+ //#endregion
186
191
  export { __exportAll as n, runtime_doctor_migrations_exports as t };
@@ -1,7 +1,7 @@
1
- import { a as isClaudeAcpCommand, c as renderAgentCommand, d as CODEX_ACP_BIN, f as CODEX_ACP_PACKAGE, i as toAcpMcpServers, l as resolveAgentCommand, m as OPENCLAW_CODEX_CONFIG_ARG, n as resolveAcpxPluginRoot, o as isCodexAcpCommand, p as LEGACY_CODEX_ACP_PACKAGE, r as resolveOpenClawRoot, s as isOpenClawBridgeCommand, t as resolveAcpxPluginConfig, u as splitCommandParts } from "./config-CE-ej7LM.mjs";
1
+ import { a as isClaudeAcpCommand, c as renderAgentCommand, d as CODEX_ACP_BIN, f as CODEX_ACP_PACKAGE, i as toAcpMcpServers, l as resolveAgentCommand, m as OPENCLAW_CODEX_CONFIG_ARG, n as resolveAcpxPluginRoot, o as isCodexAcpCommand, p as LEGACY_CODEX_ACP_PACKAGE, r as resolveOpenClawRoot, s as isOpenClawBridgeCommand, t as resolveAcpxPluginConfig, u as splitCommandParts } from "./config-D0ATuiVJ.mjs";
2
2
  import { AcpRuntimeError } from "../runtime-api.js";
3
- import { t as resolveAcpxSessionResource } from "./session-resource-Cv-RAA6y.mjs";
4
- import { a as hashAcpxProcessCommand, adoptAcpxStateDirectory, c as withAcpxLeaseArgs, d as normalizeAcpxGatewayInstanceRecord, i as createAcpxProcessLeaseStore, l as ACPX_GATEWAY_INSTANCE_KEY, n as OPENCLAW_ACPX_LEASE_ID_ARG, o as openAcpxProcessLeaseStateStore, r as OPENCLAW_GATEWAY_INSTANCE_ID_ARG, s as readAcpxProcessLeaseIdentity, t as ACPX_PROBE_LEASE_SESSION_KEY, u as ACPX_GATEWAY_INSTANCE_NAMESPACE } from "./session-owner-migration-DNwxBa5P.mjs";
3
+ import { t as resolveAcpxSessionResource } from "./session-resource-DKJsUJPu.mjs";
4
+ import { a as hashAcpxProcessCommand, adoptAcpxStateDirectory, c as withAcpxLeaseArgs, d as normalizeAcpxGatewayInstanceRecord, i as createAcpxProcessLeaseStore, l as ACPX_GATEWAY_INSTANCE_KEY, n as OPENCLAW_ACPX_LEASE_ID_ARG, o as openAcpxProcessLeaseStateStore, r as OPENCLAW_GATEWAY_INSTANCE_ID_ARG, s as readAcpxProcessLeaseIdentity, t as ACPX_PROBE_LEASE_SESSION_KEY, u as ACPX_GATEWAY_INSTANCE_NAMESPACE } from "./session-owner-migration-BA3DJKb2.mjs";
5
5
  import { createRequire } from "node:module";
6
6
  import { finiteSecondsToTimerSafeMilliseconds, parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
7
7
  import fs from "node:fs";
@@ -22,7 +22,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
22
22
  import { isDeepStrictEqual } from "node:util";
23
23
  import { redactSensitiveText } from "openclaw/plugin-sdk/security-runtime";
24
24
  import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
25
- // extensions/acpx/src/adapter-wrapper-script.ts
25
+ //#region extensions/acpx/src/adapter-wrapper-script.ts
26
26
  const RUN_CONFIGURED_COMMAND_SENTINEL = "--openclaw-run-configured";
27
27
  const DIAGNOSTIC_REDACTION_RULES = [
28
28
  {
@@ -489,7 +489,8 @@ child.on("close", () => {
489
489
  main();
490
490
  `;
491
491
  }
492
- // extensions/acpx/src/codex-trust-config.ts
492
+ //#endregion
493
+ //#region extensions/acpx/src/codex-trust-config.ts
493
494
  function stripTomlComment(line) {
494
495
  let quote = null;
495
496
  let escaping = false;
@@ -684,7 +685,8 @@ function renderIsolatedCodexConfig(params) {
684
685
  ""
685
686
  ].filter((line, index, lines) => !(line === "" && lines[index - 1] === "")).join("\n");
686
687
  }
687
- // extensions/acpx/src/codex-auth-bridge.ts
688
+ //#endregion
689
+ //#region extensions/acpx/src/codex-auth-bridge.ts
688
690
  /**
689
691
  * Prepares isolated Codex and Claude ACP wrapper commands for ACPX. The bridge
690
692
  * copies safe auth/config state into plugin-owned homes and redacts diagnostics.
@@ -1008,7 +1010,8 @@ async function prepareAcpxCodexAuthConfig(params) {
1008
1010
  }
1009
1011
  };
1010
1012
  }
1011
- // extensions/acpx/src/process-reaper.ts
1013
+ //#endregion
1014
+ //#region extensions/acpx/src/process-reaper.ts
1012
1015
  /**
1013
1016
  * ACPX process ownership checks and cleanup. The reaper only terminates
1014
1017
  * OpenClaw-owned wrapper trees after validating paths, packages, and lease ids.
@@ -1292,7 +1295,8 @@ async function reapStaleOpenClawOwnedAcpxOrphans(params) {
1292
1295
  terminatedPids: await terminatePids(uniquePids(orphanTrees.flatMap((tree) => tree.toReversed())), params.assertCurrent)
1293
1296
  };
1294
1297
  }
1295
- // extensions/acpx/src/model-ref.ts
1298
+ //#endregion
1299
+ //#region extensions/acpx/src/model-ref.ts
1296
1300
  function withAcpxSessionOptions(input) {
1297
1301
  const model = input.model?.trim() || input.sessionOptions?.model;
1298
1302
  const sessionOptions = model ? {
@@ -1331,7 +1335,8 @@ async function ensureSessionWithModelRef(ensureSession, input) {
1331
1335
  };
1332
1336
  }
1333
1337
  }
1334
- // extensions/acpx/src/runtime-generations.ts
1338
+ //#endregion
1339
+ //#region extensions/acpx/src/runtime-generations.ts
1335
1340
  var AcpxGenerationRegistry = class {
1336
1341
  constructor(sessionStore, delegate, createDelegate) {
1337
1342
  this.sessionStore = sessionStore;
@@ -1456,7 +1461,8 @@ var AcpxGenerationRegistry = class {
1456
1461
  this.isolatedSessionResources.clear();
1457
1462
  }
1458
1463
  };
1459
- // extensions/acpx/src/runtime-probe.ts
1464
+ //#endregion
1465
+ //#region extensions/acpx/src/runtime-probe.ts
1460
1466
  var AcpxRuntimeProbe = class {
1461
1467
  constructor(params) {
1462
1468
  this.params = params;
@@ -1489,7 +1495,8 @@ var AcpxRuntimeProbe = class {
1489
1495
  await this.tail;
1490
1496
  }
1491
1497
  };
1492
- // extensions/acpx/src/runtime-session-store.ts
1498
+ //#endregion
1499
+ //#region extensions/acpx/src/runtime-session-store.ts
1493
1500
  /** Generation-bound persistence and process-lease metadata for ACPX resets. */
1494
1501
  function withOpenClawLeaseSessionMetadata(record, lease) {
1495
1502
  return {
@@ -1631,7 +1638,8 @@ function createResetAwareSessionStore(baseStore, params) {
1631
1638
  }
1632
1639
  };
1633
1640
  }
1634
- // extensions/acpx/src/runtime-process-cleanup.ts
1641
+ //#endregion
1642
+ //#region extensions/acpx/src/runtime-process-cleanup.ts
1635
1643
  /** Capture OpenClaw wrapper cleanup ownership before a backend close can yield. */
1636
1644
  async function prepareAcpxProcessCleanup(params) {
1637
1645
  const { leaseStore, gatewayInstanceId, wrapperRoot } = params;
@@ -1678,7 +1686,8 @@ async function prepareAcpxProcessCleanup(params) {
1678
1686
  });
1679
1687
  };
1680
1688
  }
1681
- // extensions/acpx/src/session-owner.ts
1689
+ //#endregion
1690
+ //#region extensions/acpx/src/session-owner.ts
1682
1691
  function requireAcpxOwnerMigration(sessionKey) {
1683
1692
  throw new AcpRuntimeError("ACP_SESSION_INIT_FAILED", `ACP session "${sessionKey}" has an unqualified or unverifiable backend locator. Stop the Gateway and run "openclaw doctor --fix" to migrate ownership without losing history, then restart.`, { detailCode: "SESSION_OWNER_MIGRATION_REQUIRED" });
1684
1693
  }
@@ -1707,7 +1716,8 @@ function toAcpxResourceInput(input) {
1707
1716
  }
1708
1717
  };
1709
1718
  }
1710
- // extensions/acpx/src/runtime.ts
1719
+ //#endregion
1720
+ //#region extensions/acpx/src/runtime.ts
1711
1721
  /**
1712
1722
  * OpenClaw ACPX runtime adapter. It wraps the upstream acpx runtime with
1713
1723
  * OpenClaw session metadata, lease tracking, model scoping, and cleanup policy.
@@ -2444,7 +2454,8 @@ var AcpxRuntime$1 = class {
2444
2454
  });
2445
2455
  }
2446
2456
  };
2447
- // extensions/acpx/src/service.ts
2457
+ //#endregion
2458
+ //#region extensions/acpx/src/service.ts
2448
2459
  const ENABLE_STARTUP_PROBE_ENV = "OPENCLAW_ACPX_RUNTIME_STARTUP_PROBE";
2449
2460
  const SKIP_RUNTIME_PROBE_ENV = "OPENCLAW_SKIP_ACPX_RUNTIME_PROBE";
2450
2461
  const MAX_ACPX_TOKIO_WORKER_THREADS = 8;
@@ -2665,4 +2676,5 @@ function createAcpxRuntimeService(params) {
2665
2676
  }
2666
2677
  };
2667
2678
  }
2679
+ //#endregion
2668
2680
  export { createAcpxRuntimeService };
@@ -1,12 +1,12 @@
1
- import { t as runtime_doctor_migrations_exports } from "./runtime-doctor-migrations-CSvRANPN.mjs";
2
- import { c as renderAgentCommand, t as resolveAcpxPluginConfig, u as splitCommandParts } from "./config-CE-ej7LM.mjs";
1
+ import { t as runtime_doctor_migrations_exports } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
2
+ import { c as renderAgentCommand, t as resolveAcpxPluginConfig, u as splitCommandParts } from "./config-D0ATuiVJ.mjs";
3
3
  import path from "node:path";
4
4
  import { asFiniteNumber, asOptionalObjectRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { createHash } from "node:crypto";
6
6
  import fs from "node:fs/promises";
7
7
  import { isDeepStrictEqual } from "node:util";
8
8
  import { movePathWithCopyFallback } from "openclaw/plugin-sdk/security-runtime";
9
- // extensions/acpx/src/state.ts
9
+ //#region extensions/acpx/src/state.ts
10
10
  const ACPX_PROCESS_LEASE_NAMESPACE = "process-leases";
11
11
  const ACPX_PROCESS_LEASE_MAX_ENTRIES = 4096;
12
12
  const ACPX_GATEWAY_INSTANCE_NAMESPACE = "gateway-instance";
@@ -20,7 +20,8 @@ function normalizeAcpxGatewayInstanceRecord(value) {
20
20
  createdAt: Math.trunc(asFiniteNumber(record?.createdAt) ?? 0)
21
21
  };
22
22
  }
23
- // extensions/acpx/src/process-lease.ts
23
+ //#endregion
24
+ //#region extensions/acpx/src/process-lease.ts
24
25
  const OPENCLAW_ACPX_LEASE_ID_ARG = "--openclaw-acpx-lease-id";
25
26
  const OPENCLAW_GATEWAY_INSTANCE_ID_ARG = "--openclaw-gateway-instance-id";
26
27
  /** Synthetic session identity for generated-wrapper health probes. */
@@ -118,7 +119,8 @@ function withAcpxLeaseArgs(params) {
118
119
  params.gatewayInstanceId
119
120
  ];
120
121
  }
121
- // extensions/acpx/src/session-owner-migration.ts
122
+ //#endregion
123
+ //#region extensions/acpx/src/session-owner-migration.ts
122
124
  function openStateDirectoryMarker(input) {
123
125
  return input.openKeyedStore({
124
126
  namespace: "state-directory-migration",
@@ -228,7 +230,7 @@ async function legacyRecords(input, directory = sessionDirectory(input)) {
228
230
  directory,
229
231
  ids
230
232
  };
231
- const { resolveAcpxSessionResource } = await import("./session-resource-Cv-RAA6y.mjs").then((n) => n.n);
233
+ const { resolveAcpxSessionResource } = await import("./session-resource-DKJsUJPu.mjs").then((n) => n.n);
232
234
  const evidence = await input.context.inspectAcpSessionClaims?.();
233
235
  const { decodeAcpxRuntimeHandleState } = await import("acpx/runtime");
234
236
  return {
@@ -271,7 +273,7 @@ async function migrateRecord(input, directory, oldId, claims, changes, warnings)
271
273
  const raw = (0, runtime_doctor_migrations_exports.asObjectRecord)(JSON.parse((0, runtime_doctor_migrations_exports.decodeUtf8Input)(sourceBytes, `ACP record ${sourcePath}`)));
272
274
  if (!raw || raw.acpx_record_id !== oldId || typeof raw.name !== "string" || !raw.name.trim() || raw.name !== oldId && !oldId.startsWith(`${raw.name}:oneshot:`)) throw new Error("record ID/name is not a recognized ACPX locator");
273
275
  requireStoppedPid(raw.pid);
274
- const { resolveAcpxSessionResource } = await import("./session-resource-Cv-RAA6y.mjs").then((n) => n.n);
276
+ const { resolveAcpxSessionResource } = await import("./session-resource-DKJsUJPu.mjs").then((n) => n.n);
275
277
  const { createFileSessionStore, decodeAcpxRuntimeHandleState, encodeAcpxRuntimeHandleState } = await import("acpx/runtime");
276
278
  const candidates = claims.filter((claim) => matchesClaimRecord(claim, raw, oldId, resolveAcpxSessionResource(claim), decodeAcpxRuntimeHandleState));
277
279
  if (candidates.length !== 1) throw new Error("exactly one current owner claim is required");
@@ -428,4 +430,5 @@ const acpxSessionOwnerMigration = {
428
430
  };
429
431
  }
430
432
  };
433
+ //#endregion
431
434
  export { hashAcpxProcessCommand as a, acpxSessionOwnerMigration, adoptAcpxStateDirectory, withAcpxLeaseArgs as c, normalizeAcpxGatewayInstanceRecord as d, createAcpxProcessLeaseStore as i, ACPX_GATEWAY_INSTANCE_KEY as l, OPENCLAW_ACPX_LEASE_ID_ARG as n, openAcpxProcessLeaseStateStore as o, OPENCLAW_GATEWAY_INSTANCE_ID_ARG as r, readAcpxProcessLeaseIdentity as s, ACPX_PROBE_LEASE_SESSION_KEY as t, ACPX_GATEWAY_INSTANCE_NAMESPACE as u };
@@ -1,8 +1,8 @@
1
- import { n as __exportAll } from "./runtime-doctor-migrations-CSvRANPN.mjs";
1
+ import { n as __exportAll } from "./runtime-doctor-migrations-hxP-CXX7.mjs";
2
2
  import { AcpRuntimeError } from "../runtime-api.js";
3
3
  import { createHash } from "node:crypto";
4
4
  import { normalizeAgentId, parseAgentSessionKey } from "openclaw/plugin-sdk/routing";
5
- // extensions/acpx/src/session-resource.ts
5
+ //#region extensions/acpx/src/session-resource.ts
6
6
  var session_resource_exports = /* @__PURE__ */ __exportAll({ resolveAcpxSessionResource: () => resolveAcpxSessionResource });
7
7
  /** Logical OpenClaw keys stay intact; only bare backend resource names need a namespace. */
8
8
  function resolveAcpxSessionResource(target) {
@@ -13,4 +13,5 @@ function resolveAcpxSessionResource(target) {
13
13
  if (encodedOwner) return sessionKey;
14
14
  return `openclaw-owner-v1-${createHash("sha256").update(JSON.stringify([agentId, sessionKey])).digest("hex")}`;
15
15
  }
16
+ //#endregion
16
17
  export { session_resource_exports as n, resolveAcpxSessionResource as t };
@@ -1,5 +1,5 @@
1
- import { t as runtime_doctor_migrations_exports } from "./.setup/runtime-doctor-migrations-CSvRANPN.mjs";
2
- // extensions/acpx/doctor-contract-api.ts
1
+ import { t as runtime_doctor_migrations_exports } from "./.setup/runtime-doctor-migrations-hxP-CXX7.mjs";
2
+ //#region extensions/acpx/doctor-contract-api.ts
3
3
  const ACPX_CONFIG_PATH = [
4
4
  "plugins",
5
5
  "entries",
@@ -40,13 +40,14 @@ const stateMigrations = [{
40
40
  doctorOnly: true,
41
41
  phase: "after-session-repair",
42
42
  async collectBackupResources(input) {
43
- return (await import("./.setup/session-owner-migration-DNwxBa5P.mjs")).acpxSessionOwnerMigration.collectBackupResources(input);
43
+ return (await import("./.setup/session-owner-migration-BA3DJKb2.mjs")).acpxSessionOwnerMigration.collectBackupResources(input);
44
44
  },
45
45
  async detectLegacyState(input) {
46
- return (await import("./.setup/session-owner-migration-DNwxBa5P.mjs")).acpxSessionOwnerMigration.detectLegacyState(input);
46
+ return (await import("./.setup/session-owner-migration-BA3DJKb2.mjs")).acpxSessionOwnerMigration.detectLegacyState(input);
47
47
  },
48
48
  async migrateLegacyState(input) {
49
- return (await import("./.setup/session-owner-migration-DNwxBa5P.mjs")).acpxSessionOwnerMigration.migrateLegacyState(input);
49
+ return (await import("./.setup/session-owner-migration-BA3DJKb2.mjs")).acpxSessionOwnerMigration.migrateLegacyState(input);
50
50
  }
51
51
  }];
52
+ //#endregion
52
53
  export { legacyConfigRules, normalizeCompatibilityConfig, stateMigrations };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { t as createAcpxRuntimeService } from "./.setup/register.runtime-vh7Rwnmk.mjs";
2
- import { g as AcpxNativeAgentsSchema, h as ACPX_NATIVE_AGENT_IDS, t as resolveAcpxPluginConfig } from "./.setup/config-CE-ej7LM.mjs";
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 "./.setup/pi-session-paths-Co5515li.mjs";
1
+ import { t as createAcpxRuntimeService } from "./.setup/register.runtime-D685iYx-.mjs";
2
+ import { g as AcpxNativeAgentsSchema, h as ACPX_NATIVE_AGENT_IDS, t as resolveAcpxPluginConfig } from "./.setup/config-D0ATuiVJ.mjs";
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 "./.setup/pi-session-paths-CIvyk6KB.mjs";
4
4
  import { createAgentRegistry } from "acpx/agent-registry";
5
5
  import { tryDispatchAcpReplyHook } from "openclaw/plugin-sdk/acp-runtime-backend";
6
6
  import { createLazyRuntimeModule, createLazyRuntimeSurface } from "openclaw/plugin-sdk/lazy-runtime";
@@ -8,7 +8,7 @@ import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number
8
8
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { resolveNodeHostExecutable } from "openclaw/plugin-sdk/node-host";
10
10
  import { createSessionCatalogNodeHostBindings } from "openclaw/plugin-sdk/session-catalog";
11
- // extensions/acpx/src/native-agents.ts
11
+ //#region extensions/acpx/src/native-agents.ts
12
12
  function isAcpxNativeAgentEnabled(flags, agent) {
13
13
  return AcpxNativeAgentsSchema.parse(flags)?.[agent] !== false;
14
14
  }
@@ -25,7 +25,8 @@ function listAcpxNativeAgents(rawConfig, agents) {
25
25
  enabled: enabled?.[agent.id] !== false
26
26
  }));
27
27
  }
28
- // extensions/acpx/src/harness.ts
28
+ //#endregion
29
+ //#region extensions/acpx/src/harness.ts
29
30
  const LOCAL_TOOL_REQUIREMENTS = [
30
31
  "ls",
31
32
  "read",
@@ -203,7 +204,7 @@ function createAcpAgentHarness(params) {
203
204
  if (inspection?.launch.kind !== "installed") throw new Error(`${params.label} is not installed; refresh the model catalog`);
204
205
  const runtime = await runtimeFor(input.workspaceDir);
205
206
  generation.signal.throwIfAborted();
206
- const { runAcpHarnessAttempt } = await import("./.setup/harness-attempt-Bgcm-zBR.mjs");
207
+ const { runAcpHarnessAttempt } = await import("./.setup/harness-attempt-lu4_bMfd.mjs");
207
208
  return await runAcpHarnessAttempt({
208
209
  input,
209
210
  runtime,
@@ -243,8 +244,9 @@ function createAcpAgentHarness(params) {
243
244
  }
244
245
  };
245
246
  }
246
- // extensions/acpx/src/pi-session-catalog-plugin.ts
247
- const loadPiSessionCatalogModule = createLazyRuntimeModule(() => import("./.setup/pi-session-catalog-runtime-Cdf46b05.mjs"));
247
+ //#endregion
248
+ //#region extensions/acpx/src/pi-session-catalog-plugin.ts
249
+ const loadPiSessionCatalogModule = createLazyRuntimeModule(() => import("./.setup/pi-session-catalog-runtime-BAM1pEMw.mjs"));
248
250
  function fullConfigCatalogEnabled(config) {
249
251
  if (!isRecord(config) || !isRecord(config.plugins) || !isRecord(config.plugins.entries)) return true;
250
252
  const entry = config.plugins.entries.acpx;
@@ -306,7 +308,8 @@ function registerPiSessionCatalog(api) {
306
308
  for (const command of nodeHost.commands) api.registerNodeHostCommand(command);
307
309
  for (const policy of nodeHost.policies) api.registerNodeInvokePolicy(policy);
308
310
  }
309
- // extensions/acpx/index.ts
311
+ //#endregion
312
+ //#region extensions/acpx/index.ts
310
313
  /**
311
314
  * ACPX runtime plugin entry. It registers the embedded ACP backend service and
312
315
  * wires reply-dispatch hooks into the plugin SDK runtime.
@@ -363,4 +366,5 @@ const plugin = {
363
366
  api.on("reply_dispatch", tryDispatchAcpReplyHook, { eligibleDispatchKinds: ["acp"] });
364
367
  }
365
368
  };
369
+ //#endregion
366
370
  export { plugin as default };
@@ -1 +1,2 @@
1
- export { t as createAcpxRuntimeService } from "./.setup/register.runtime-vh7Rwnmk.mjs";
1
+ import { t as createAcpxRuntimeService } from "./.setup/register.runtime-D685iYx-.mjs";
2
+ export { createAcpxRuntimeService };
package/dist/setup-api.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
2
2
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
3
- // extensions/acpx/setup-api.ts
3
+ //#region extensions/acpx/setup-api.ts
4
4
  /**
5
5
  * ACPX setup plugin entry. It auto-enables setup when ACP config already points
6
6
  * at the embedded ACPX runtime backend.
@@ -16,4 +16,5 @@ var setup_api_default = definePluginEntry({
16
16
  });
17
17
  }
18
18
  });
19
+ //#endregion
19
20
  export { setup_api_default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/acpx",
3
- "version": "2026.11.1",
3
+ "version": "2026.11.2",
4
4
  "description": "OpenClaw ACP runtime backend with plugin-owned session and transport management.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,10 +45,10 @@
45
45
  ]
46
46
  },
47
47
  "compat": {
48
- "pluginApi": ">=2026.11.1"
48
+ "pluginApi": ">=2026.11.2"
49
49
  },
50
50
  "build": {
51
- "openclawVersion": "2026.11.1"
51
+ "openclawVersion": "2026.11.2"
52
52
  },
53
53
  "release": {
54
54
  "publishToClawHub": true,
@@ -68,7 +68,7 @@
68
68
  "skills/**"
69
69
  ],
70
70
  "peerDependencies": {
71
- "openclaw": ">=2026.11.1"
71
+ "openclaw": ">=2026.11.2"
72
72
  },
73
73
  "peerDependenciesMeta": {
74
74
  "openclaw": {
@@ -1 +0,0 @@
1
- {"version":3,"entries":[{"output":"doctor-contract-api.js","source":"extensions/acpx/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/acpx/index.ts"},{"output":"register.runtime.js","source":"extensions/acpx/register.runtime.ts"},{"output":"runtime-api.js","source":"extensions/acpx/runtime-api.ts"},{"output":"setup-api.js","source":"extensions/acpx/setup-api.ts"}],"chunks":[{"output":".setup/config-CE-ej7LM.mjs","sha256":"24aa07079f114e9acdbbfdbe03577f13f46cd1f649596cf9873e0ac1a41aaa1d","facadeSource":null,"sources":["extensions/acpx/src/codex-adapter.ts","extensions/acpx/src/command-line.ts","extensions/acpx/src/config-schema.ts","extensions/acpx/src/config.ts"]},{"output":".setup/harness-attempt-Bgcm-zBR.mjs","sha256":"0a5ba2c691385969d3888be9d17579234f42576f317d734f0eee11c014f12dfa","facadeSource":"extensions/acpx/src/harness-attempt.ts","sources":["extensions/acpx/src/harness-attempt.ts"]},{"output":".setup/pi-session-catalog-runtime-Cdf46b05.mjs","sha256":"adc84d40792189b528b26dcfe1fae66b632345639e20e222f566f5efa5c38599","facadeSource":"extensions/acpx/src/pi-session-catalog-runtime.ts","sources":["extensions/acpx/src/pi-session-catalog-runtime.ts","extensions/acpx/src/pi-session-catalog.ts","extensions/acpx/src/pi-session-store.ts","extensions/acpx/src/pi-session-upstream-activity.ts"]},{"output":".setup/pi-session-paths-Co5515li.mjs","sha256":"5a1b1204e4ad3d63cbe0d4f8742aac8d59408d90ebf28bdd4c30465600047095","facadeSource":null,"sources":["extensions/acpx/src/pi-session-catalog-shared.ts","extensions/acpx/src/pi-session-paths.ts"]},{"output":".setup/register.runtime-vh7Rwnmk.mjs","sha256":"12fbd0ff2f83dee8210b17eff5098b26ef5f542134cb51e242329485430ff73b","facadeSource":null,"sources":["extensions/acpx/register.runtime.ts","extensions/acpx/src/runtime-proxy.ts"]},{"output":".setup/runtime-doctor-migrations-CSvRANPN.mjs","sha256":"0f9941caf2101d12539e47fd11f7da27fd330dd82bf8e80cdc11d8fd81ae2c6f","facadeSource":null,"sources":["packages/normalization-core/src/record-coerce.ts","src/config/channel-config-normalization.ts","src/plugin-sdk/legacy-webhook-listener-migration.ts"]},{"output":".setup/service-ChAbEe-N.mjs","sha256":"0cb4bcb51516d79da3e9021fc953dcb9b2a9f99b41cb736d2cc5ee89cb3cc95d","facadeSource":"extensions/acpx/src/service.ts","sources":["extensions/acpx/src/adapter-wrapper-script.ts","extensions/acpx/src/codex-auth-bridge.ts","extensions/acpx/src/codex-trust-config.ts","extensions/acpx/src/model-ref.ts","extensions/acpx/src/process-reaper.ts","extensions/acpx/src/runtime-generations.ts","extensions/acpx/src/runtime-probe.ts","extensions/acpx/src/runtime-process-cleanup.ts","extensions/acpx/src/runtime-session-store.ts","extensions/acpx/src/runtime.ts","extensions/acpx/src/service.ts","extensions/acpx/src/session-owner.ts"]},{"output":".setup/session-owner-migration-DNwxBa5P.mjs","sha256":"6345ef669b08b1d217e809dbeec0bc7fcc29ad09c0e4e573a4c01236183b20f3","facadeSource":"extensions/acpx/src/session-owner-migration.ts","sources":["extensions/acpx/src/process-lease.ts","extensions/acpx/src/session-owner-migration.ts","extensions/acpx/src/state.ts"]},{"output":".setup/session-resource-Cv-RAA6y.mjs","sha256":"8205fcb304c39a18d6f62ca4951d5f42effbdafdbc4e1879a274f8f3c146d430","facadeSource":null,"sources":["extensions/acpx/src/session-resource.ts"]},{"output":"doctor-contract-api.js","sha256":"e554c4685c070e04028f8972d7afcc413b185a9a3e641ab978a9519f324e4981","facadeSource":"extensions/acpx/doctor-contract-api.ts","sources":["extensions/acpx/doctor-contract-api.ts"]},{"output":"index.js","sha256":"bf706b687675d07e7696515e532ec72b32bcce6325fef1141448e31553de36b1","facadeSource":"extensions/acpx/index.ts","sources":["extensions/acpx/index.ts","extensions/acpx/src/harness.ts","extensions/acpx/src/native-agents.ts","extensions/acpx/src/pi-session-catalog-plugin.ts"]},{"output":"register.runtime.js","sha256":"517ee3938ec98816c3dee8bd7392205834de693a64a810bb8240172d0847a9e4","facadeSource":"extensions/acpx/register.runtime.ts","sources":[]},{"output":"runtime-api.js","sha256":"fc9734d9dfabafe7281fca6ede1415215a44ac03bd0aa798fce919d11ae68605","facadeSource":"extensions/acpx/runtime-api.ts","sources":[]},{"output":"setup-api.js","sha256":"8251d1074687501cbbb6aee52f51d74113118f5c93570733c3a2544f9beeac31","facadeSource":"extensions/acpx/setup-api.ts","sources":["extensions/acpx/setup-api.ts"]}],"unrenderedSources":["extensions/acpx/runtime-api.ts"]}