@openclaw/acpx 2026.9.4 → 2026.9.5

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.
@@ -1,10 +1,8 @@
1
- import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { n as createLazyAcpRuntimeProxy } from "./register.runtime-CksaMeEx.js";
3
- import "./config-schema-DN_uAi4R.js";
4
- import { _ as splitCommandParts, c as openAcpxProcessLeaseStateStore, d as ACPX_GATEWAY_INSTANCE_KEY, f as ACPX_GATEWAY_INSTANCE_NAMESPACE, h as normalizeAcpxGatewayInstanceRecord, i as createAcpxProcessLeaseStore, l as readAcpxProcessLeaseIdentity, n as OPENCLAW_ACPX_LEASE_ID_ARG, r as OPENCLAW_GATEWAY_INSTANCE_ID_ARG } from "./process-lease-B83BGiLj.js";
5
- import { i as toAcpMcpServers, n as resolveAcpxPluginRoot, r as resolveOpenClawRoot, t as resolveAcpxPluginConfig } from "./config-D2FTk0K7.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
+ import { n as createLazyAcpRuntimeProxy } from "./register.runtime-CTfxhkFm.mjs";
3
+ import { _ as splitCommandParts, c as openAcpxProcessLeaseStateStore, d as ACPX_GATEWAY_INSTANCE_KEY, f as ACPX_GATEWAY_INSTANCE_NAMESPACE, h as normalizeAcpxGatewayInstanceRecord, i as createAcpxProcessLeaseStore, l as readAcpxProcessLeaseIdentity, n as OPENCLAW_ACPX_LEASE_ID_ARG, r as OPENCLAW_GATEWAY_INSTANCE_ID_ARG } from "./process-lease-B83BGiLj.mjs";
4
+ import { i as toAcpMcpServers, n as resolveAcpxPluginRoot, r as resolveOpenClawRoot, t as resolveAcpxPluginConfig } from "./config-DvCm0_Dp.mjs";
6
5
  import { createRequire } from "node:module";
7
- import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
8
6
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
9
7
  import { isRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
10
8
  import fs from "node:fs";
@@ -13,6 +11,7 @@ import path from "node:path";
13
11
  import fs$1 from "node:fs/promises";
14
12
  import { randomUUID } from "node:crypto";
15
13
  import { escapeRegExp } from "openclaw/plugin-sdk/text-utility-runtime";
14
+ import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
16
15
  import { inspect } from "node:util";
17
16
  import { isPidAlive, runExec } from "openclaw/plugin-sdk/process-runtime";
18
17
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -1298,7 +1297,7 @@ var service_exports = /* @__PURE__ */ __exportAll({
1298
1297
  });
1299
1298
  const ENABLE_STARTUP_PROBE_ENV = "OPENCLAW_ACPX_RUNTIME_STARTUP_PROBE";
1300
1299
  const SKIP_RUNTIME_PROBE_ENV = "OPENCLAW_SKIP_ACPX_RUNTIME_PROBE";
1301
- const loadRuntimeModule = createLazyRuntimeModule(() => import("./runtime-CSNBTQIs.js"));
1300
+ const loadRuntimeModule = createLazyRuntimeModule(() => import("./runtime-Du-YvDnr.mjs"));
1302
1301
  /** Convert ACPX timeout seconds into timer-safe milliseconds. */
1303
1302
  function resolveAcpxTimerTimeoutMs(timeoutSeconds) {
1304
1303
  if (timeoutSeconds === void 0) return;
@@ -1343,6 +1342,10 @@ function createLazyDefaultRuntime(params) {
1343
1342
  }
1344
1343
  return {
1345
1344
  ...createLazyAcpRuntimeProxy(resolveRuntime),
1345
+ async shutdown() {
1346
+ await runtimePromise;
1347
+ await runtime?.shutdown();
1348
+ },
1346
1349
  isHealthy() {
1347
1350
  return runtime?.isHealthy() ?? false;
1348
1351
  }
@@ -1556,7 +1559,10 @@ function createAcpxRuntimeService(params) {
1556
1559
  },
1557
1560
  async stop(_ctx) {
1558
1561
  lifecycleRevision += 1;
1559
- if (runtime) params.backendLifecycle.retract(runtime);
1562
+ if (runtime) {
1563
+ params.backendLifecycle.retract(runtime);
1564
+ await runtime.shutdown();
1565
+ }
1560
1566
  runtime = null;
1561
1567
  }
1562
1568
  };
@@ -1,5 +1,5 @@
1
- import { a as hashAcpxProcessCommand, c as openAcpxProcessLeaseStateStore, l as readAcpxProcessLeaseIdentity, o as normalizeAcpxProcessLease } from "./process-lease-B83BGiLj.js";
2
- import { t as resolveAcpxPluginConfig } from "./config-D2FTk0K7.js";
1
+ import { a as hashAcpxProcessCommand, c as openAcpxProcessLeaseStateStore, l as readAcpxProcessLeaseIdentity, o as normalizeAcpxProcessLease } from "./process-lease-B83BGiLj.mjs";
2
+ import { t as resolveAcpxPluginConfig } from "./config-DvCm0_Dp.mjs";
3
3
  import path from "node:path";
4
4
  import fs from "node:fs/promises";
5
5
  import { archiveLegacyStateSource, asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor-migrations";
@@ -23,7 +23,7 @@ async function legacyRecords(input) {
23
23
  directory,
24
24
  ids
25
25
  };
26
- const { resolveAcpxSessionResource } = await import("./session-resource-UWe7qD3m.js").then((n) => n.n);
26
+ const { resolveAcpxSessionResource } = await import("./session-resource-Dzl0U7kK.mjs").then((n) => n.n);
27
27
  const evidence = await input.context.inspectAcpSessionClaims?.();
28
28
  const { decodeAcpxRuntimeHandleState } = await import("acpx/runtime");
29
29
  return {
@@ -66,7 +66,7 @@ async function migrateRecord(input, directory, oldId, claims, changes, warnings)
66
66
  const raw = asObjectRecord(JSON.parse(sourceBytes));
67
67
  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");
68
68
  requireStoppedPid(raw.pid);
69
- const { resolveAcpxSessionResource } = await import("./session-resource-UWe7qD3m.js").then((n) => n.n);
69
+ const { resolveAcpxSessionResource } = await import("./session-resource-Dzl0U7kK.mjs").then((n) => n.n);
70
70
  const { createFileSessionStore, decodeAcpxRuntimeHandleState, encodeAcpxRuntimeHandleState } = await import("acpx/runtime");
71
71
  const candidates = claims.filter((claim) => matchesClaimRecord(claim, raw, oldId, resolveAcpxSessionResource(claim), decodeAcpxRuntimeHandleState));
72
72
  if (candidates.length !== 1) throw new Error("exactly one current canonical owner claim is required");
@@ -1,5 +1,5 @@
1
- import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { AcpRuntimeError } from "./runtime-api.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
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
5
  //#region extensions/acpx/src/session-resource.ts
@@ -1,4 +1,4 @@
1
- import { c as openAcpxProcessLeaseStateStore, d as ACPX_GATEWAY_INSTANCE_KEY, f as ACPX_GATEWAY_INSTANCE_NAMESPACE, h as normalizeAcpxGatewayInstanceRecord, m as ACPX_LEGACY_PROCESS_LEASE_FILE, o as normalizeAcpxProcessLease, p as ACPX_LEGACY_GATEWAY_INSTANCE_FILE, s as normalizeAcpxProcessLeaseFile } from "./process-lease-B83BGiLj.js";
1
+ import { c as openAcpxProcessLeaseStateStore, d as ACPX_GATEWAY_INSTANCE_KEY, f as ACPX_GATEWAY_INSTANCE_NAMESPACE, h as normalizeAcpxGatewayInstanceRecord, m as ACPX_LEGACY_PROCESS_LEASE_FILE, o as normalizeAcpxProcessLease, p as ACPX_LEGACY_GATEWAY_INSTANCE_FILE, s as normalizeAcpxProcessLeaseFile } from "./.setup/process-lease-B83BGiLj.mjs";
2
2
  import path from "node:path";
3
3
  import fs from "node:fs/promises";
4
4
  import { archiveLegacyStateSource, asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor-migrations";
@@ -137,10 +137,10 @@ const stateMigrations = [{
137
137
  doctorOnly: true,
138
138
  phase: "after-session-repair",
139
139
  async detectLegacyState(input) {
140
- return (await import("./session-owner-migration-D36AH9RC.js")).acpxSessionOwnerMigration.detectLegacyState(input);
140
+ return (await import("./.setup/session-owner-migration-BuKHYP6F.mjs")).acpxSessionOwnerMigration.detectLegacyState(input);
141
141
  },
142
142
  async migrateLegacyState(input) {
143
- return (await import("./session-owner-migration-D36AH9RC.js")).acpxSessionOwnerMigration.migrateLegacyState(input);
143
+ return (await import("./.setup/session-owner-migration-BuKHYP6F.mjs")).acpxSessionOwnerMigration.migrateLegacyState(input);
144
144
  }
145
145
  }];
146
146
  //#endregion
package/dist/index.js CHANGED
@@ -1,14 +1,12 @@
1
- import { t as createAcpxRuntimeService } from "./register.runtime-CksaMeEx.js";
2
- import "./config-schema-DN_uAi4R.js";
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";
1
+ import { t as createAcpxRuntimeService } from "./.setup/register.runtime-CTfxhkFm.mjs";
2
+ 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-EMbd4Hkz.mjs";
4
3
  import { tryDispatchAcpReplyHook } from "openclaw/plugin-sdk/acp-runtime-backend";
5
- import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
6
4
  import { createLazyRuntimeModule, createLazyRuntimeSurface } from "openclaw/plugin-sdk/lazy-runtime";
7
5
  import { resolveNodeHostExecutable } from "openclaw/plugin-sdk/node-host";
8
6
  import { createSessionCatalogNodeHostBindings } from "openclaw/plugin-sdk/session-catalog";
9
7
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
10
8
  //#region extensions/acpx/src/pi-session-catalog-plugin.ts
11
- const loadPiSessionCatalogModule = createLazyRuntimeModule(() => import("./pi-session-catalog-runtime-BrPX6xQV.js"));
9
+ const loadPiSessionCatalogModule = createLazyRuntimeModule(() => import("./.setup/pi-session-catalog-runtime-CbLyvshh.mjs"));
12
10
  function fullConfigCatalogEnabled(config) {
13
11
  if (!isRecord(config) || !isRecord(config.plugins) || !isRecord(config.plugins.entries)) return true;
14
12
  const entry = config.plugins.entries.acpx;
@@ -76,39 +74,17 @@ function registerPiSessionCatalog(api) {
76
74
  * ACPX runtime plugin entry. It registers the embedded ACP backend service and
77
75
  * wires reply-dispatch hooks into the plugin SDK runtime.
78
76
  */
79
- function resolveReplyDispatchTimeoutMs(pluginConfig) {
80
- const timeoutSeconds = pluginConfig?.timeoutSeconds;
81
- return finiteSecondsToTimerSafeMilliseconds(typeof timeoutSeconds === "number" && Number.isFinite(timeoutSeconds) && timeoutSeconds > 0 ? timeoutSeconds : 120) ?? 1;
82
- }
83
- async function tryDispatchAcpReplyHookWithTimeout(event, ctx, timeoutMs) {
84
- const timeoutController = new AbortController();
85
- const timeout = setTimeout(() => timeoutController.abort(), timeoutMs);
86
- timeout.unref?.();
87
- const abortSignal = ctx.abortSignal ? AbortSignal.any([ctx.abortSignal, timeoutController.signal]) : timeoutController.signal;
88
- try {
89
- return await tryDispatchAcpReplyHook(event, {
90
- ...ctx,
91
- abortSignal
92
- });
93
- } finally {
94
- clearTimeout(timeout);
95
- }
96
- }
97
77
  const plugin = {
98
78
  id: "acpx",
99
79
  name: "ACPX Runtime",
100
80
  description: "Embedded ACP runtime backend with plugin-owned session and transport management.",
101
81
  register(api) {
102
- const replyDispatchTimeoutMs = resolveReplyDispatchTimeoutMs(api.pluginConfig);
103
82
  registerPiSessionCatalog(api);
104
83
  api.registerService(createAcpxRuntimeService({
105
84
  pluginConfig: api.pluginConfig,
106
85
  openKeyedStore: (options) => api.runtime.state.openKeyedStore(options)
107
86
  }));
108
- api.on("reply_dispatch", (event, ctx) => tryDispatchAcpReplyHookWithTimeout(event, ctx, replyDispatchTimeoutMs), {
109
- timeoutMs: replyDispatchTimeoutMs,
110
- eligibleDispatchKinds: ["acp"]
111
- });
87
+ api.on("reply_dispatch", tryDispatchAcpReplyHook, { eligibleDispatchKinds: ["acp"] });
112
88
  }
113
89
  };
114
90
  //#endregion
@@ -1,2 +1,2 @@
1
- import { t as createAcpxRuntimeService } from "./register.runtime-CksaMeEx.js";
1
+ import { t as createAcpxRuntimeService } from "./.setup/register.runtime-CTfxhkFm.mjs";
2
2
  export { createAcpxRuntimeService };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "acpx",
3
- "categories": ["runtime", "tools"],
3
+ "categories": ["agent-runtimes"],
4
4
  "backupResources": [
5
5
  {
6
6
  "disposition": "regenerable",
@@ -31,6 +31,32 @@
31
31
  "name": "ACPX Runtime",
32
32
  "description": "OpenClaw ACP runtime backend with plugin-owned session and transport management.",
33
33
  "skills": ["./skills"],
34
+ "configGroups": [
35
+ {
36
+ "id": "agent-runtime",
37
+ "title": "Agent runtime",
38
+ "order": 10,
39
+ "properties": ["cwd", "stateDir", "probeAgent", "agents", "timeoutSeconds"]
40
+ },
41
+ {
42
+ "id": "permissions",
43
+ "title": "Permissions",
44
+ "order": 20,
45
+ "properties": ["permissionMode", "nonInteractivePermissions"]
46
+ },
47
+ {
48
+ "id": "tools-and-mcp-servers",
49
+ "title": "Tools and MCP servers",
50
+ "order": 30,
51
+ "properties": ["pluginToolsMcpBridge", "openClawToolsMcpBridge", "mcpServers"]
52
+ },
53
+ {
54
+ "id": "pi-sessions",
55
+ "title": "Pi sessions",
56
+ "order": 40,
57
+ "properties": ["piSessionCatalog"]
58
+ }
59
+ ],
34
60
  "configSchema": {
35
61
  "type": "object",
36
62
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/acpx",
3
- "version": "2026.9.4",
3
+ "version": "2026.9.5",
4
4
  "description": "OpenClaw ACP runtime backend with plugin-owned session and transport management.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,11 +8,11 @@
8
8
  },
9
9
  "type": "module",
10
10
  "dependencies": {
11
- "@agentclientprotocol/claude-agent-acp": "0.70.0",
12
- "@agentclientprotocol/codex-acp": "1.6.2",
13
- "acpx": "0.13.2",
11
+ "@agentclientprotocol/claude-agent-acp": "0.75.1",
12
+ "@agentclientprotocol/codex-acp": "1.10.0",
13
+ "acpx": "0.16.0",
14
14
  "smol-toml": "1.8.0",
15
- "zod": "4.4.3"
15
+ "zod": "4.5.4"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@openclaw/plugin-sdk": "workspace:*"
@@ -44,10 +44,10 @@
44
44
  ]
45
45
  },
46
46
  "compat": {
47
- "pluginApi": ">=2026.9.4"
47
+ "pluginApi": ">=2026.9.5"
48
48
  },
49
49
  "build": {
50
- "openclawVersion": "2026.9.4",
50
+ "openclawVersion": "2026.9.5",
51
51
  "staticAssets": [
52
52
  {
53
53
  "source": "./src/runtime-internals/mcp-proxy.mjs",
@@ -72,10 +72,12 @@
72
72
  "dist/**",
73
73
  "openclaw.plugin.json",
74
74
  "README.md",
75
+ "assets/icon.png",
76
+ "assets/activity.svg",
75
77
  "skills/**"
76
78
  ],
77
79
  "peerDependencies": {
78
- "openclaw": ">=2026.9.4"
80
+ "openclaw": ">=2026.9.5"
79
81
  },
80
82
  "peerDependenciesMeta": {
81
83
  "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.70.0`
213
- - `codex -> bundled @agentclientprotocol/codex-acp@1.6.2 through OpenClaw's isolated CODEX_HOME wrapper`
212
+ - `claude -> bundled @agentclientprotocol/claude-agent-acp@0.75.1`
213
+ - `codex -> bundled @agentclientprotocol/codex-acp@1.10.0 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`
@@ -1,37 +0,0 @@
1
- import { z } from "zod";
2
- //#region extensions/acpx/src/config-schema.ts
3
- /**
4
- * ACPX plugin configuration schema and public config types. Runtime setup uses
5
- * this file as the single source of truth for validation and defaulting.
6
- */
7
- const ACPX_PERMISSION_MODES = [
8
- "approve-all",
9
- "approve-reads",
10
- "deny-all"
11
- ];
12
- const ACPX_NON_INTERACTIVE_POLICIES = ["deny", "fail"];
13
- const nonEmptyTrimmedString = (message) => z.string({ error: message }).trim().min(1, { error: message });
14
- const McpServerConfigSchema = z.object({
15
- command: nonEmptyTrimmedString("command must be a non-empty string").describe("Command to run the MCP server"),
16
- args: z.array(z.string({ error: "args must be an array of strings" }), { error: "args must be an array of strings" }).optional().describe("Arguments to pass to the command"),
17
- env: z.record(z.string(), z.string({ error: "env values must be strings" }), { error: "env must be an object of strings" }).optional().describe("Environment variables for the MCP server")
18
- });
19
- /** Zod schema for validating raw ACPX plugin config from OpenClaw config. */
20
- const AcpxPluginConfigSchema = z.strictObject({
21
- cwd: nonEmptyTrimmedString("cwd must be a non-empty string").optional(),
22
- stateDir: nonEmptyTrimmedString("stateDir must be a non-empty string").optional(),
23
- probeAgent: nonEmptyTrimmedString("probeAgent must be a non-empty string").optional(),
24
- permissionMode: z.enum(ACPX_PERMISSION_MODES, { error: `permissionMode must be one of: ${ACPX_PERMISSION_MODES.join(", ")}` }).optional(),
25
- nonInteractivePermissions: z.enum(ACPX_NON_INTERACTIVE_POLICIES, { error: `nonInteractivePermissions must be one of: ${ACPX_NON_INTERACTIVE_POLICIES.join(", ")}` }).optional(),
26
- pluginToolsMcpBridge: z.boolean({ error: "pluginToolsMcpBridge must be a boolean" }).optional(),
27
- openClawToolsMcpBridge: z.boolean({ error: "openClawToolsMcpBridge must be a boolean" }).optional(),
28
- timeoutSeconds: z.number({ error: "timeoutSeconds must be a number >= 0.001" }).min(.001, { error: "timeoutSeconds must be a number >= 0.001" }).default(120),
29
- piSessionCatalog: z.strictObject({ enabled: z.boolean({ error: "piSessionCatalog.enabled must be a boolean" }).default(true) }).optional(),
30
- mcpServers: z.record(z.string(), McpServerConfigSchema).optional(),
31
- agents: z.record(z.string(), z.strictObject({
32
- command: nonEmptyTrimmedString("agents.<id>.command must be a non-empty string"),
33
- args: z.array(z.string({ error: "args must be an array of strings" })).optional()
34
- })).optional()
35
- });
36
- //#endregion
37
- export { AcpxPluginConfigSchema as t };