@openclaw/acpx 2026.10.1-beta.2 → 2026.10.5-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.
@@ -1,3 +1,4 @@
1
+ import { createNativeSessionBindingAuthority } from "openclaw/plugin-sdk/agent-harness-session-runtime";
1
2
  import { randomUUID } from "node:crypto";
2
3
  import { consumeAcpTurnStream } from "openclaw/plugin-sdk/acp-runtime";
3
4
  import { clearActiveEmbeddedRun, emitAgentEvent, resolveAgentHarnessBeforePromptBuildResult, resolveBootstrapContextForRun, setActiveEmbeddedRun } from "openclaw/plugin-sdk/agent-harness-runtime";
@@ -183,6 +184,7 @@ async function runAcpHarnessAttempt(params) {
183
184
  }
184
185
  };
185
186
  const requestId = `${admission.entryId}:acp:${randomUUID()}`;
187
+ const assistantItemId = `${requestId}:acp:assistant`;
186
188
  const turn = {
187
189
  handle,
188
190
  text: [
@@ -226,7 +228,8 @@ async function runAcpHarnessAttempt(params) {
226
228
  stream: "assistant",
227
229
  data: {
228
230
  text,
229
- delta: event.text
231
+ delta: event.text,
232
+ itemId: assistantItemId
230
233
  }
231
234
  };
232
235
  emitAgentEvent({
@@ -287,7 +290,6 @@ async function runAcpHarnessAttempt(params) {
287
290
  }
288
291
  }
289
292
  };
290
- const key = `${requestId}:acp:assistant`;
291
293
  const written = await appendSessionTranscriptMessageByIdentityStrict({
292
294
  ...transcript,
293
295
  config: input.config,
@@ -295,16 +297,13 @@ async function runAcpHarnessAttempt(params) {
295
297
  updateMode: "inline",
296
298
  message: {
297
299
  ...assistant,
298
- idempotencyKey: key
300
+ idempotencyKey: assistantItemId
299
301
  },
300
- prepareMessageAfterIdempotencyCheck: (message) => {
301
- input.hostCapabilities.assertActive();
302
- return message;
303
- }
302
+ preparation: { source: createNativeSessionBindingAuthority([], input.hostCapabilities.assertActive).assertLegacyCurrent }
304
303
  });
305
304
  if (written.kind !== "result") throw new Error("ACP assistant transcript was not committed");
306
305
  assistant = written.result.message;
307
- assistantIdempotencyKey = key;
306
+ assistantIdempotencyKey = assistantItemId;
308
307
  terminalAnchor = written.result.anchor;
309
308
  messages = (await SessionManager.openModelContextAsync(transcript, {
310
309
  cwd: input.workspaceDir,
@@ -53,7 +53,7 @@ function createLazyAcpRuntimeProxy(resolveRuntime) {
53
53
  * immediately, then imports the heavier service only when a session needs it.
54
54
  */
55
55
  const ACPX_BACKEND_ID = "acpx";
56
- const loadServiceModule = createLazyRuntimeModule(() => import("./service-BXgGdE56.mjs"));
56
+ const loadServiceModule = createLazyRuntimeModule(() => import("./service-Be5bqKzR.mjs"));
57
57
  function unregisterOwnedRuntime(runtime) {
58
58
  if (runtime && getAcpRuntimeBackend(ACPX_BACKEND_ID)?.runtime === runtime) unregisterAcpRuntimeBackend(ACPX_BACKEND_ID);
59
59
  }
@@ -1363,7 +1363,7 @@ var AcpxGenerationRegistry = class {
1363
1363
  retired: false,
1364
1364
  activeOperations: 0,
1365
1365
  pendingAdmissions: 0,
1366
- admissionState: "unadmitted",
1366
+ admitted: false,
1367
1367
  activeRecordOperations: /* @__PURE__ */ new Map(),
1368
1368
  closedRecordIds: /* @__PURE__ */ new Set(),
1369
1369
  records: /* @__PURE__ */ new Map(),
@@ -1380,14 +1380,9 @@ var AcpxGenerationRegistry = class {
1380
1380
  generation.pendingAdmissions += 1;
1381
1381
  try {
1382
1382
  return await generation.ensureQueue.enqueue(resource + "\0" + generation.id, async () => {
1383
- try {
1384
- const result = await run(generation);
1385
- generation.admissionState = "admitted";
1386
- return result;
1387
- } catch (error) {
1388
- if (generation.admissionState !== "admitted") generation.admissionState = "failed";
1389
- throw error;
1390
- }
1383
+ const result = await run(generation);
1384
+ generation.admitted = true;
1385
+ return result;
1391
1386
  });
1392
1387
  } finally {
1393
1388
  generation.pendingAdmissions -= 1;
@@ -1422,7 +1417,7 @@ var AcpxGenerationRegistry = class {
1422
1417
  };
1423
1418
  }
1424
1419
  releaseIdleGeneration(generation) {
1425
- if (!generation.retired && (generation.closeCompleted || generation.admissionState === "failed") && generation.pendingAdmissions === 0 && generation.activeOperations === 0 && generation.records.size === 0 && this.generations.get(generation.resource) === generation) {
1420
+ if (!generation.retired && (generation.closeCompleted || !generation.admitted) && generation.pendingAdmissions === 0 && generation.activeOperations === 0 && generation.records.size === 0 && this.generations.get(generation.resource) === generation) {
1426
1421
  generation.retired = true;
1427
1422
  this.generations.delete(generation.resource);
1428
1423
  }
@@ -2117,6 +2112,7 @@ var AcpxRuntime$1 = class {
2117
2112
  agent: input.agent
2118
2113
  });
2119
2114
  this.generationRegistry.assertCurrentGeneration(generation);
2115
+ generation.admitted ||= Boolean(handle);
2120
2116
  return handle ? {
2121
2117
  ...handle,
2122
2118
  sessionKey: input.sessionKey,
@@ -2635,7 +2631,7 @@ function createAcpxRuntimeService(params) {
2635
2631
  try {
2636
2632
  const timeoutSeconds = pluginConfig.timeoutSeconds ?? 120;
2637
2633
  const doctorReport = await measureAcpxStartup(ctx, "probe.availability", () => raceWithTimeout(startedRuntime.doctor(), resolveAcpxTimerTimeoutMs(timeoutSeconds) ?? 1, () => {
2638
- throw new Error(`embedded acpx runtime backend startup probe timed out after ${timeoutSeconds}s`);
2634
+ throw new Error(`embedded acpx runtime backend startup check timed out after ${timeoutSeconds}s`);
2639
2635
  }, { ref: false }));
2640
2636
  if (currentRevision !== lifecycleRevision) return;
2641
2637
  if (doctorReport.ok) {
@@ -2644,7 +2640,7 @@ function createAcpxRuntimeService(params) {
2644
2640
  return;
2645
2641
  }
2646
2642
  ctx.startupTrace?.detail?.("probe.result", [["healthyCount", 0]]);
2647
- ctx.logger.warn(`embedded acpx runtime backend probe failed: ${formatDoctorFailureMessage(doctorReport)}`);
2643
+ ctx.logger.warn(`embedded acpx runtime backend check failed: ${formatDoctorFailureMessage(doctorReport)}`);
2648
2644
  } catch (err) {
2649
2645
  if (currentRevision !== lifecycleRevision) return;
2650
2646
  ctx.startupTrace?.detail?.("probe.result", [["healthyCount", 0]]);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createAcpxRuntimeService } from "./.setup/register.runtime-C0nVOTzT.mjs";
1
+ import { t as createAcpxRuntimeService } from "./.setup/register.runtime-wTF6K7iM.mjs";
2
2
  import { g as AcpxNativeAgentsSchema, h as ACPX_NATIVE_AGENT_IDS, t as resolveAcpxPluginConfig } from "./.setup/config-76krYh6C.mjs";
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 "./.setup/pi-session-paths-CIvyk6KB.mjs";
4
4
  import { createAgentRegistry } from "acpx/agent-registry";
@@ -207,7 +207,7 @@ function createAcpAgentHarness(params) {
207
207
  if (inspection?.launch.kind !== "installed") throw new Error(`${params.label} is not installed; refresh the model catalog`);
208
208
  const runtime = await runtimeFor(input.workspaceDir);
209
209
  generation.signal.throwIfAborted();
210
- const { runAcpHarnessAttempt } = await import("./.setup/harness-attempt-CDXMeP5Z.mjs");
210
+ const { runAcpHarnessAttempt } = await import("./.setup/harness-attempt-CRe4WIFt.mjs");
211
211
  return await runAcpHarnessAttempt({
212
212
  input,
213
213
  runtime,
@@ -1,2 +1,2 @@
1
- import { t as createAcpxRuntimeService } from "./.setup/register.runtime-C0nVOTzT.mjs";
1
+ import { t as createAcpxRuntimeService } from "./.setup/register.runtime-wTF6K7iM.mjs";
2
2
  export { createAcpxRuntimeService };
@@ -194,8 +194,8 @@
194
194
  "help": "Auto-detect Pi sessions on the Gateway and paired nodes, then show them in the sessions sidebar."
195
195
  },
196
196
  "probeAgent": {
197
- "label": "Health Probe Agent",
198
- "help": "Agent id used for the embedded ACP runtime health probe. Defaults to the first `acp.allowedAgents` entry when that allowlist is set, otherwise to the runtime built-in probe agent (codex). Set this explicitly (for example `opencode` or `claude`) when the default probe agent is not installed or not authenticated, so the whole embedded ACP backend does not get marked unavailable.",
197
+ "label": "Health Check Agent",
198
+ "help": "Agent id used for the embedded ACP runtime health check. Defaults to the first `acp.allowedAgents` entry when that allowlist is set, otherwise to the runtime built-in check agent (codex). Set this explicitly (for example `opencode` or `claude`) when the default check agent is not installed or not authenticated, so the whole embedded ACP backend does not get marked unavailable.",
199
199
  "advanced": true
200
200
  },
201
201
  "mcpServers": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/acpx",
3
- "version": "2026.10.1-beta.2",
3
+ "version": "2026.10.5-beta.1",
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.79.0",
12
- "@agentclientprotocol/codex-acp": "1.12.0",
13
- "@openclaw/fs-safe": "0.23.0",
14
- "acpx": "0.19.1",
15
- "smol-toml": "1.8.0",
11
+ "@agentclientprotocol/claude-agent-acp": "0.85.0",
12
+ "@agentclientprotocol/codex-acp": "2.1.1",
13
+ "@openclaw/fs-safe": "0.25.0",
14
+ "acpx": "0.19.4",
15
+ "smol-toml": "1.9.0",
16
16
  "zod": "4.6.5"
17
17
  },
18
18
  "devDependencies": {
@@ -45,10 +45,10 @@
45
45
  ]
46
46
  },
47
47
  "compat": {
48
- "pluginApi": ">=2026.10.1-beta.2"
48
+ "pluginApi": ">=2026.10.5-beta.1"
49
49
  },
50
50
  "build": {
51
- "openclawVersion": "2026.10.1-beta.2"
51
+ "openclawVersion": "2026.10.5-beta.1"
52
52
  },
53
53
  "release": {
54
54
  "publishToClawHub": true,
@@ -68,7 +68,7 @@
68
68
  "skills/**"
69
69
  ],
70
70
  "peerDependencies": {
71
- "openclaw": ">=2026.10.1-beta.2"
71
+ "openclaw": ">=2026.10.5-beta.1"
72
72
  },
73
73
  "peerDependenciesMeta": {
74
74
  "openclaw": {