@openclaw/raft 2026.7.1-beta.2 → 2026.7.1-beta.4

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.
@@ -120,7 +120,7 @@ const MAX_WAKE_BODY_BYTES = 16 * 1024;
120
120
  const WAKE_DEDUPE_TTL_MS = 1440 * 60 * 1e3;
121
121
  const WAKE_DEDUPE_MEMORY_MAX_SIZE = 1e3;
122
122
  const WAKE_DEDUPE_STATE_MAX_ENTRIES = 1e4;
123
- const FORBIDDEN_WAKE_CONTENT_KEYS = new Set([
123
+ const FORBIDDEN_WAKE_CONTENT_KEYS = /* @__PURE__ */ new Set([
124
124
  "body",
125
125
  "content",
126
126
  "message",
@@ -304,30 +304,31 @@ async function startRaftGatewayAccount(ctx, deps = {}) {
304
304
  });
305
305
  const dedupeKey = resolveWakeDedupeKey(payload);
306
306
  if (!dedupeKey) throw new WakeRequestError(400, "Wake payload must include a stable event identity.");
307
+ const dispatched = await wakeQueue.enqueue(ctx.accountId, async () => {
308
+ if (ctx.abortSignal?.aborted) throw new WakeRequestError(503, "Raft Gateway is stopping.");
309
+ const claim = await wakeDedupe.claim(dedupeKey, { namespace: ctx.accountId });
310
+ if (claim.kind === "duplicate") return false;
311
+ if (claim.kind === "inflight") {
312
+ if (await claim.pending) return false;
313
+ throw new WakeRequestError(503, "Raft wake delivery is retrying.");
314
+ }
315
+ try {
316
+ await dispatchRaftWake({ ctx });
317
+ } catch (error) {
318
+ wakeDedupe.release(dedupeKey, {
319
+ namespace: ctx.accountId,
320
+ error
321
+ });
322
+ throw error;
323
+ }
324
+ await wakeDedupe.commit(dedupeKey, { namespace: ctx.accountId });
325
+ return true;
326
+ });
307
327
  sendJson(response, 202, {
308
328
  ok: true,
309
329
  accepted: true,
310
330
  runtimeSession,
311
- ...await wakeQueue.enqueue(ctx.accountId, async () => {
312
- if (ctx.abortSignal?.aborted) throw new WakeRequestError(503, "Raft Gateway is stopping.");
313
- const claim = await wakeDedupe.claim(dedupeKey, { namespace: ctx.accountId });
314
- if (claim.kind === "duplicate") return false;
315
- if (claim.kind === "inflight") {
316
- if (await claim.pending) return false;
317
- throw new WakeRequestError(503, "Raft wake delivery is retrying.");
318
- }
319
- try {
320
- await dispatchRaftWake({ ctx });
321
- } catch (error) {
322
- wakeDedupe.release(dedupeKey, {
323
- namespace: ctx.accountId,
324
- error
325
- });
326
- throw error;
327
- }
328
- await wakeDedupe.commit(dedupeKey, { namespace: ctx.accountId });
329
- return true;
330
- }) ? {} : { duplicate: true }
331
+ ...dispatched ? {} : { duplicate: true }
331
332
  });
332
333
  })().catch((error) => {
333
334
  const statusCode = error instanceof WakeRequestError ? error.statusCode : 500;
@@ -349,7 +350,8 @@ async function startRaftGatewayAccount(ctx, deps = {}) {
349
350
  stopBridge(bridge);
350
351
  };
351
352
  try {
352
- const endpoint = `http://${BRIDGE_HOST}:${await listenLoopback(server)}${WAKE_PATH}`;
353
+ const port = await listenLoopback(server);
354
+ const endpoint = `http://${BRIDGE_HOST}:${port}${WAKE_PATH}`;
353
355
  bridge = (deps.spawnBridge ?? spawnRaftBridge)({
354
356
  profile,
355
357
  endpoint,
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@openclaw/raft",
3
- "version": "2026.7.1-beta.2",
3
+ "version": "2026.7.1-beta.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/raft",
9
- "version": "2026.7.1-beta.2",
9
+ "version": "2026.7.1-beta.4",
10
10
  "dependencies": {
11
11
  "zod": "4.4.3"
12
12
  },
13
13
  "peerDependencies": {
14
- "openclaw": ">=2026.7.1-beta.2"
14
+ "openclaw": ">=2026.7.1-beta.4"
15
15
  },
16
16
  "peerDependenciesMeta": {
17
17
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/raft",
3
- "version": "2026.7.1-beta.2",
3
+ "version": "2026.7.1-beta.4",
4
4
  "description": "OpenClaw Raft channel plugin for Raft CLI wake bridges.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,7 @@
11
11
  "zod": "4.4.3"
12
12
  },
13
13
  "peerDependencies": {
14
- "openclaw": ">=2026.7.1-beta.2"
14
+ "openclaw": ">=2026.7.1-beta.4"
15
15
  },
16
16
  "peerDependenciesMeta": {
17
17
  "openclaw": {
@@ -29,10 +29,10 @@
29
29
  "minHostVersion": ">=2026.6.8"
30
30
  },
31
31
  "compat": {
32
- "pluginApi": ">=2026.7.1-beta.2"
32
+ "pluginApi": ">=2026.7.1-beta.4"
33
33
  },
34
34
  "build": {
35
- "openclawVersion": "2026.7.1-beta.2"
35
+ "openclawVersion": "2026.7.1-beta.4"
36
36
  },
37
37
  "channel": {
38
38
  "id": "raft",