@clawling/clawchat-plugin-openclaw 2026.9.14-1 → 2026.9.14-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.
- package/dist/src/runtime.js +19 -1
- package/package.json +1 -1
- package/src/runtime.ts +21 -1
package/dist/src/runtime.js
CHANGED
|
@@ -2373,7 +2373,22 @@ export async function startOpenclawClawlingGateway(params) {
|
|
|
2373
2373
|
log?.info?.(`[${accountId}] clawchat-plugin-openclaw skip duplicate stored msg=${turn.messageId}`);
|
|
2374
2374
|
return "skipped";
|
|
2375
2375
|
}
|
|
2376
|
+
if (claimed !== true) {
|
|
2377
|
+
// Fail closed: a claim that could not be decided (store disabled, SQLite
|
|
2378
|
+
// error, a throw converted to undefined by recordConnection) must not
|
|
2379
|
+
// dispatch. Live delivery and device replay can carry the same message,
|
|
2380
|
+
// and the outbound reply path (outbound.ts / reply-dispatcher.ts) already
|
|
2381
|
+
// refuses to send without a claim — so dispatching here only re-ran the
|
|
2382
|
+
// LLM/tools without delivering, or double-replied. Logged at error level
|
|
2383
|
+
// with reason=claim_unavailable so a store outage is visible and is not
|
|
2384
|
+
// mistaken for dedup. Accepted cost: a one-off transient claim failure
|
|
2385
|
+
// drops that message.
|
|
2386
|
+
log?.error?.(`[${accountId}] clawchat-plugin-openclaw inbound skipped msg=${turn.messageId} chat_id=${turn.peer.id} event=${String(env.event)} reason=claim_unavailable result=${String(claimed)}`);
|
|
2387
|
+
return "skipped";
|
|
2388
|
+
}
|
|
2376
2389
|
}
|
|
2390
|
+
// No store wired at all (injected test transport, or store construction
|
|
2391
|
+
// threw at startup — which is itself logged) keeps the store-less pass-through.
|
|
2377
2392
|
return "claimed";
|
|
2378
2393
|
};
|
|
2379
2394
|
const dispatchTurnToAgent = async (turn) => {
|
|
@@ -2730,7 +2745,10 @@ export async function startOpenclawClawlingGateway(params) {
|
|
|
2730
2745
|
// replayed — permanently lost. Claiming first makes it durable; the abort
|
|
2731
2746
|
// check below then returns without dispatching, but the frame is kept.
|
|
2732
2747
|
// `claimInboundTurn` is INSERT OR IGNORE, so a genuine duplicate (same
|
|
2733
|
-
// message_id) is still deduped here exactly once.
|
|
2748
|
+
// message_id) is still deduped here exactly once. The claim fails CLOSED:
|
|
2749
|
+
// only a successful claim proceeds; an undecided claim (store unavailable)
|
|
2750
|
+
// skips with reason=claim_unavailable, because outbound replies also refuse
|
|
2751
|
+
// to send without a claim, so dispatching would only waste the turn.
|
|
2734
2752
|
const claimed = claimInboundTurn(turn);
|
|
2735
2753
|
if (claimed === "skipped")
|
|
2736
2754
|
return "skipped";
|
package/package.json
CHANGED
package/src/runtime.ts
CHANGED
|
@@ -2859,7 +2859,24 @@ export async function startOpenclawClawlingGateway(params: StartGatewayParams):
|
|
|
2859
2859
|
);
|
|
2860
2860
|
return "skipped";
|
|
2861
2861
|
}
|
|
2862
|
+
if (claimed !== true) {
|
|
2863
|
+
// Fail closed: a claim that could not be decided (store disabled, SQLite
|
|
2864
|
+
// error, a throw converted to undefined by recordConnection) must not
|
|
2865
|
+
// dispatch. Live delivery and device replay can carry the same message,
|
|
2866
|
+
// and the outbound reply path (outbound.ts / reply-dispatcher.ts) already
|
|
2867
|
+
// refuses to send without a claim — so dispatching here only re-ran the
|
|
2868
|
+
// LLM/tools without delivering, or double-replied. Logged at error level
|
|
2869
|
+
// with reason=claim_unavailable so a store outage is visible and is not
|
|
2870
|
+
// mistaken for dedup. Accepted cost: a one-off transient claim failure
|
|
2871
|
+
// drops that message.
|
|
2872
|
+
log?.error?.(
|
|
2873
|
+
`[${accountId}] clawchat-plugin-openclaw inbound skipped msg=${turn.messageId} chat_id=${turn.peer.id} event=${String(env.event)} reason=claim_unavailable result=${String(claimed)}`,
|
|
2874
|
+
);
|
|
2875
|
+
return "skipped";
|
|
2876
|
+
}
|
|
2862
2877
|
}
|
|
2878
|
+
// No store wired at all (injected test transport, or store construction
|
|
2879
|
+
// threw at startup — which is itself logged) keeps the store-less pass-through.
|
|
2863
2880
|
return "claimed";
|
|
2864
2881
|
};
|
|
2865
2882
|
|
|
@@ -3265,7 +3282,10 @@ export async function startOpenclawClawlingGateway(params: StartGatewayParams):
|
|
|
3265
3282
|
// replayed — permanently lost. Claiming first makes it durable; the abort
|
|
3266
3283
|
// check below then returns without dispatching, but the frame is kept.
|
|
3267
3284
|
// `claimInboundTurn` is INSERT OR IGNORE, so a genuine duplicate (same
|
|
3268
|
-
// message_id) is still deduped here exactly once.
|
|
3285
|
+
// message_id) is still deduped here exactly once. The claim fails CLOSED:
|
|
3286
|
+
// only a successful claim proceeds; an undecided claim (store unavailable)
|
|
3287
|
+
// skips with reason=claim_unavailable, because outbound replies also refuse
|
|
3288
|
+
// to send without a claim, so dispatching would only waste the turn.
|
|
3269
3289
|
const claimed = claimInboundTurn(turn);
|
|
3270
3290
|
if (claimed === "skipped") return "skipped";
|
|
3271
3291
|
// Findings 2 & 3 — hold ALL group traffic until the in-flight settings pull
|