@openclaw/gateway-client 2026.11.3 → 2026.11.5-beta.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/README.md +11 -0
- package/dist/.source-module-urls/64fb00de7b626c888cb871ea7e5171ebc35f3a7ee91800fc2345f930b9e361e7.json +1 -0
- package/dist/browser.d.mts +6 -5
- package/dist/browser.mjs +4 -3
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +224 -235
- package/dist/{protocol-client-Dg5tIB1S.d.mts → protocol-client-DmQZQQS7.d.mts} +2 -5
- package/dist/{protocol-request-CtVhe3Bj.d.mts → protocol-request-CRDNYiYG.d.mts} +2 -0
- package/dist/{readiness-CkF8_J-1.d.mts → readiness-BuLm1Ikf.d.mts} +12 -17
- package/dist/{readiness-CwRz4ZX8.mjs → readiness-C7IsnvXj.mjs} +11 -10
- package/dist/readiness.d.mts +1 -1
- package/dist/readiness.mjs +1 -2
- package/dist/scope-upgrade.d.mts +2 -3
- package/dist/{session-subscriptions-DJ5H6a_1.mjs → session-subscriptions-Bc7A64MY.mjs} +977 -264
- package/dist/{session-subscriptions-Bcq6_wtR.d.mts → session-subscriptions-UQlp58bR.d.mts} +15 -2
- package/dist/{timeouts-F2UKsnjG.mjs → timeouts-BBVOnLnf.mjs} +2 -5
- package/dist/timeouts.mjs +1 -2
- package/package.json +3 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { n as GatewayProtocolRequestOptions } from "./protocol-request-
|
|
1
|
+
import { n as GatewayProtocolRequestOptions } from "./protocol-request-CRDNYiYG.mjs";
|
|
2
|
+
import { ErrorShape, SessionsMessagesSubscribeParams } from "@openclaw/gateway-protocol";
|
|
2
3
|
//#region packages/gateway-client/src/device-auth.d.ts
|
|
3
4
|
declare function normalizeDeviceMetadataForAuth(value?: string | null): string;
|
|
4
5
|
type DeviceAuthPayloadParams = {
|
|
@@ -90,6 +91,7 @@ declare function hasSessionProjectionAcceptedFinal(run: TerminalProjectionRun |
|
|
|
90
91
|
type SessionProjectionGatewayRunEvent = {
|
|
91
92
|
state?: unknown;
|
|
92
93
|
yielded?: unknown;
|
|
94
|
+
suppressErrorNotice?: unknown;
|
|
93
95
|
seq?: unknown;
|
|
94
96
|
deltaText?: unknown;
|
|
95
97
|
replace?: unknown;
|
|
@@ -133,6 +135,7 @@ type SessionProjectionRun = {
|
|
|
133
135
|
stopReason?: string;
|
|
134
136
|
errorKind?: string;
|
|
135
137
|
errorMessage?: string;
|
|
138
|
+
suppressErrorNotice?: boolean;
|
|
136
139
|
};
|
|
137
140
|
type SessionProjectionState = {
|
|
138
141
|
scope: SessionProjectionScope;
|
|
@@ -197,11 +200,21 @@ type GatewaySessionMessageSubscription = {
|
|
|
197
200
|
mode?: "narration";
|
|
198
201
|
includeApprovals?: true;
|
|
199
202
|
approvalReplay?: unknown;
|
|
203
|
+
/** One-shot snapshot owned by the acquisition that requested it. */
|
|
204
|
+
initialHistory?: GatewaySessionInitialHistoryResult;
|
|
205
|
+
};
|
|
206
|
+
type GatewaySessionInitialHistoryResult = {
|
|
207
|
+
ok: true;
|
|
208
|
+
payload: unknown;
|
|
209
|
+
} | {
|
|
210
|
+
ok: false;
|
|
211
|
+
error: ErrorShape;
|
|
200
212
|
};
|
|
201
213
|
type GatewaySessionMessageSubscriptionOptions = {
|
|
202
214
|
agentId?: string | null;
|
|
203
215
|
mode?: "narration";
|
|
204
216
|
includeApprovals?: boolean;
|
|
217
|
+
initialHistory?: SessionsMessagesSubscribeParams["initialHistory"];
|
|
205
218
|
};
|
|
206
219
|
type GatewaySessionMessageSubscriptionCoordinatorOptions = {
|
|
207
220
|
keysEquivalent?: (left: string, right: string) => boolean;
|
|
@@ -223,4 +236,4 @@ declare function getGatewaySessionMessageSubscriptionCoordinator(client: Gateway
|
|
|
223
236
|
declare function resetGatewaySessionMessageSubscriptionCoordinator(client: GatewaySessionMessageRequestClient): void;
|
|
224
237
|
declare function releaseGatewaySessionMessageSubscription(subscription: GatewaySessionMessageSubscription): Promise<void>;
|
|
225
238
|
//#endregion
|
|
226
|
-
export {
|
|
239
|
+
export { isLocallyOptimisticSessionMessage as A, normalizeDeviceMetadataForAuth as B, SessionProjectionRunTransition as C, SessionMessageEnvelope as D, readSessionProjectionFinalMessageIdentity as E, gatewayCredentialScope as F, gatewayOriginScope as I, mergeChatStreamMessage as L, readAssistantStreamSegmentIdentity as M, readSessionMessageIdentity as N, SessionMessageIdentity as O, readSessionMessageSequence as P, buildDeviceAuthPayload as R, SessionProjectionGatewayRunEvent as S, hasSessionProjectionAcceptedFinal as T, projectLiveSessionMessage as _, GatewaySessionMessageSubscriptionCoordinatorOptions as a, isSessionProjectionErrorMessage as b, releaseGatewaySessionMessageSubscription as c, SessionProjectionRun as d, SessionProjectionRunStatus as f, createSessionProjection as g, SessionProjectionState as h, GatewaySessionMessageSubscriptionCoordinator as i, normalizeSessionProjectionRunId as j, SessionProjectionEntry as k, resetGatewaySessionMessageSubscriptionCoordinator as l, SessionProjectionSnapshotOptions as m, GatewaySessionMessageRequestClient as n, GatewaySessionMessageSubscriptionOptions as o, SessionProjectionScope as p, GatewaySessionMessageSubscription as r, getGatewaySessionMessageSubscriptionCoordinator as s, GatewaySessionInitialHistoryResult as t, SessionProjectionEvent as u, reconcileSessionProjectionSnapshot as v, reduceSessionProjectionRunEvent as w, projectSessionTerminalReplyMessage as x, reduceSessionProjection as y, buildDeviceAuthPayloadV3 as z };
|
|
@@ -85,9 +85,6 @@ function getConnectChallengeTimeoutMsFromEnv(env = process.env) {
|
|
|
85
85
|
if (parsed !== void 0) return resolveSafeTimeoutDelayMs(parsed);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
function normalizePositiveTimeoutMs(timeoutMs) {
|
|
89
|
-
return typeof timeoutMs === "number" && Number.isFinite(timeoutMs) && timeoutMs > 0 ? resolveSafeTimeoutDelayMs(timeoutMs) : void 0;
|
|
90
|
-
}
|
|
91
88
|
/** Resolves the client watchdog timeout using explicit, env, then preauth defaults. */
|
|
92
89
|
function resolveConnectChallengeTimeoutMs(timeoutMs, params) {
|
|
93
90
|
const configuredPreauthTimeoutMs = resolvePreauthHandshakeTimeoutMs({
|
|
@@ -108,8 +105,8 @@ function resolvePreauthHandshakeTimeoutMs(params) {
|
|
|
108
105
|
const parsed = parseStrictPositiveInteger(configuredTimeout);
|
|
109
106
|
if (parsed !== void 0) return resolveSafeTimeoutDelayMs(parsed);
|
|
110
107
|
}
|
|
111
|
-
const configured =
|
|
112
|
-
if (configured
|
|
108
|
+
const configured = params?.configuredTimeoutMs;
|
|
109
|
+
if (typeof configured === "number" && Number.isFinite(configured) && configured > 0) return resolveSafeTimeoutDelayMs(configured);
|
|
113
110
|
return DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS;
|
|
114
111
|
}
|
|
115
112
|
//#endregion
|
package/dist/timeouts.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, MAX_CONNECT_CHALLENGE_TIMEOUT_MS, MAX_SAFE_TIMEOUT_DELAY_MS, MIN_CONNECT_CHALLENGE_TIMEOUT_MS, addSafeTimeoutDelayGraceMs, clampConnectChallengeTimeoutMs, clearGatewayConnectTimeout, getConnectChallengeTimeoutMsFromEnv, resolveConnectChallengeTimeoutMs, resolveFiniteTimeoutDelayMs, resolvePreauthHandshakeTimeoutMs, resolveSafeTimeoutDelayMs, startGatewayConnectTimeout };
|
|
1
|
+
export { t as DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, n as DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, r as MAX_CONNECT_CHALLENGE_TIMEOUT_MS, i as MAX_SAFE_TIMEOUT_DELAY_MS, a as MIN_CONNECT_CHALLENGE_TIMEOUT_MS, o as addSafeTimeoutDelayGraceMs, s as clampConnectChallengeTimeoutMs, c as clearGatewayConnectTimeout, l as getConnectChallengeTimeoutMsFromEnv, u as resolveConnectChallengeTimeoutMs, d as resolveFiniteTimeoutDelayMs, f as resolvePreauthHandshakeTimeoutMs, p as resolveSafeTimeoutDelayMs, m as startGatewayConnectTimeout } from "./timeouts-BBVOnLnf.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/gateway-client",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.5-beta.2",
|
|
4
4
|
"description": "Reference WebSocket client for the OpenClaw Gateway protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"client",
|
|
@@ -62,7 +62,8 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@
|
|
65
|
+
"@noble/hashes": "2.4.0",
|
|
66
|
+
"@openclaw/gateway-protocol": "2026.11.5-beta.2",
|
|
66
67
|
"ipaddr.js": "2.5.0",
|
|
67
68
|
"ws": "8.22.0"
|
|
68
69
|
},
|