@openclaw/gateway-client 2026.9.1 → 2026.9.3

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,12 +1,12 @@
1
- import { A as readSessionMessageSequence, C as reduceSessionProjection, D as normalizeSessionProjectionRunId, E as SessionMessageIdentity, F as normalizeDeviceMetadataForAuth, M as gatewayOriginScope, N as buildDeviceAuthPayload, O as readAssistantStreamSegmentIdentity, P as buildDeviceAuthPayloadV3, S as reconcileSessionProjectionSnapshot, T as SessionMessageEnvelope, _ as SessionProjectionState, a as GatewaySessionMessageSubscriptionOptions, b as isLocallyOptimisticSessionMessage, c as resetGatewaySessionMessageSubscriptionCoordinator, d as SessionProjectionGatewayRunEvent, f as SessionProjectionRun, g as SessionProjectionSnapshotOptions, h as SessionProjectionScope, i as GatewaySessionMessageSubscriptionCoordinatorOptions, j as gatewayCredentialScope, k as readSessionMessageIdentity, l as SessionProjectionEntry, m as SessionProjectionRunTransition, n as GatewaySessionMessageSubscription, o as getGatewaySessionMessageSubscriptionCoordinator, p as SessionProjectionRunStatus, r as GatewaySessionMessageSubscriptionCoordinator, s as releaseGatewaySessionMessageSubscription, t as GatewaySessionMessageRequestClient, u as SessionProjectionEvent, v as createSessionProjection, w as reduceSessionProjectionRunEvent, x as projectLiveSessionMessage, y as hasSessionProjectionAcceptedFinal } from "./session-subscriptions-D2UdeJ0u.mjs";
1
+ import { A as readAssistantStreamSegmentIdentity, C as isSessionProjectionErrorMessage, D as SessionMessageEnvelope, E as reduceSessionProjectionRunEvent, F as buildDeviceAuthPayload, I as buildDeviceAuthPayloadV3, L as normalizeDeviceMetadataForAuth, M as readSessionMessageSequence, N as gatewayCredentialScope, O as SessionMessageIdentity, P as gatewayOriginScope, S as reduceSessionProjection, T as SessionProjectionRunTransition, _ as hasSessionProjectionAcceptedFinal, a as GatewaySessionMessageSubscriptionOptions, b as readSessionProjectionFinalMessageIdentity, c as resetGatewaySessionMessageSubscriptionCoordinator, d as SessionProjectionRun, f as SessionProjectionRunStatus, g as createSessionProjection, h as SessionProjectionState, i as GatewaySessionMessageSubscriptionCoordinatorOptions, j as readSessionMessageIdentity, k as normalizeSessionProjectionRunId, l as SessionProjectionEntry, m as SessionProjectionSnapshotOptions, n as GatewaySessionMessageSubscription, o as getGatewaySessionMessageSubscriptionCoordinator, p as SessionProjectionScope, r as GatewaySessionMessageSubscriptionCoordinator, s as releaseGatewaySessionMessageSubscription, t as GatewaySessionMessageRequestClient, u as SessionProjectionEvent, v as isLocallyOptimisticSessionMessage, w as SessionProjectionGatewayRunEvent, x as reconcileSessionProjectionSnapshot, y as projectLiveSessionMessage } from "./session-subscriptions-C3M4jnCd.mjs";
2
2
  import { a as GatewayBrowserDeviceTokenStore, c as resolveGatewayConnectScopes, i as GatewayBrowserDeviceTokenRecord, l as selectGatewayConnectAuth, n as GatewayBrowserDeviceAuthPlan, o as GatewayConnectAuthSelection, r as GatewayBrowserDeviceIdentity, s as buildGatewayConnectAuth, t as GatewayBrowserDeviceAuthLifecycle, u as shouldRetryGatewayWithDeviceToken } from "./browser-device-auth-DoPo-sPB.mjs";
3
3
  import { n as GatewayProtocolRequestOptions, r as GatewayProtocolRequestTimeoutError, t as GatewayProtocolRequestError } from "./protocol-request-B5gBmLgq.mjs";
4
4
  import { a as GatewayProtocolTiming, i as GatewayProtocolSocketHandlers, n as GatewayProtocolCloseContext, o as GatewayProtocolRequestTiming, r as GatewayProtocolSocket, t as GatewayProtocolClient } from "./protocol-client-DbX7wQED.mjs";
5
5
  import { DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, resolveSafeTimeoutDelayMs } from "./timeouts.mjs";
6
6
  import { ConnectParams, ErrorShape, EventFrame, HelloOk } from "@openclaw/gateway-protocol";
7
7
  export * from "@openclaw/gateway-protocol/connect-error-details";
8
- export * from "@openclaw/gateway-protocol/client-info";
9
8
  export * from "@openclaw/gateway-protocol/gateway-error-details";
9
+ export * from "@openclaw/gateway-protocol/client-info";
10
10
  export * from "@openclaw/gateway-protocol/startup-unavailable";
11
11
  export * from "@openclaw/gateway-protocol/version";
12
12
  //#region packages/gateway-client/src/reconnect-policy.d.ts
@@ -18,4 +18,4 @@ export declare function shouldPauseGatewayReconnect(params: {
18
18
  clientVersionMismatchIsTerminal?: boolean;
19
19
  }): boolean;
20
20
  //#endregion
21
- export { type ConnectParams, DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, type ErrorShape, type EventFrame, GatewayBrowserDeviceAuthLifecycle, GatewayBrowserDeviceAuthPlan, GatewayBrowserDeviceIdentity, GatewayBrowserDeviceTokenRecord, GatewayBrowserDeviceTokenStore, GatewayConnectAuthSelection, GatewayProtocolClient, type GatewayProtocolCloseContext, GatewayProtocolRequestError, type GatewayProtocolRequestOptions, GatewayProtocolRequestTimeoutError, type GatewayProtocolRequestTiming, type GatewayProtocolSocket, type GatewayProtocolSocketHandlers, type GatewayProtocolTiming, GatewaySessionMessageRequestClient, GatewaySessionMessageSubscription, GatewaySessionMessageSubscriptionCoordinator, GatewaySessionMessageSubscriptionCoordinatorOptions, GatewaySessionMessageSubscriptionOptions, type HelloOk, type SessionMessageEnvelope, type SessionMessageIdentity, SessionProjectionEntry, SessionProjectionEvent, SessionProjectionGatewayRunEvent, SessionProjectionRun, SessionProjectionRunStatus, SessionProjectionRunTransition, SessionProjectionScope, SessionProjectionSnapshotOptions, SessionProjectionState, buildDeviceAuthPayload, buildDeviceAuthPayloadV3, buildGatewayConnectAuth, createSessionProjection, gatewayCredentialScope, gatewayOriginScope, getGatewaySessionMessageSubscriptionCoordinator, hasSessionProjectionAcceptedFinal, isLocallyOptimisticSessionMessage, normalizeDeviceMetadataForAuth, normalizeSessionProjectionRunId, projectLiveSessionMessage, readAssistantStreamSegmentIdentity, readSessionMessageIdentity, readSessionMessageSequence, reconcileSessionProjectionSnapshot, reduceSessionProjection, reduceSessionProjectionRunEvent, releaseGatewaySessionMessageSubscription, resetGatewaySessionMessageSubscriptionCoordinator, resolveGatewayConnectScopes, resolveSafeTimeoutDelayMs, selectGatewayConnectAuth, shouldRetryGatewayWithDeviceToken };
21
+ export { type ConnectParams, DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, type ErrorShape, type EventFrame, GatewayBrowserDeviceAuthLifecycle, GatewayBrowserDeviceAuthPlan, GatewayBrowserDeviceIdentity, GatewayBrowserDeviceTokenRecord, GatewayBrowserDeviceTokenStore, GatewayConnectAuthSelection, GatewayProtocolClient, type GatewayProtocolCloseContext, GatewayProtocolRequestError, type GatewayProtocolRequestOptions, GatewayProtocolRequestTimeoutError, type GatewayProtocolRequestTiming, type GatewayProtocolSocket, type GatewayProtocolSocketHandlers, type GatewayProtocolTiming, GatewaySessionMessageRequestClient, GatewaySessionMessageSubscription, GatewaySessionMessageSubscriptionCoordinator, GatewaySessionMessageSubscriptionCoordinatorOptions, GatewaySessionMessageSubscriptionOptions, type HelloOk, type SessionMessageEnvelope, type SessionMessageIdentity, SessionProjectionEntry, SessionProjectionEvent, type SessionProjectionGatewayRunEvent, SessionProjectionRun, SessionProjectionRunStatus, type SessionProjectionRunTransition, SessionProjectionScope, SessionProjectionSnapshotOptions, SessionProjectionState, buildDeviceAuthPayload, buildDeviceAuthPayloadV3, buildGatewayConnectAuth, createSessionProjection, gatewayCredentialScope, gatewayOriginScope, getGatewaySessionMessageSubscriptionCoordinator, hasSessionProjectionAcceptedFinal, isLocallyOptimisticSessionMessage, isSessionProjectionErrorMessage, normalizeDeviceMetadataForAuth, normalizeSessionProjectionRunId, projectLiveSessionMessage, readAssistantStreamSegmentIdentity, readSessionMessageIdentity, readSessionMessageSequence, readSessionProjectionFinalMessageIdentity, reconcileSessionProjectionSnapshot, reduceSessionProjection, reduceSessionProjectionRunEvent, releaseGatewaySessionMessageSubscription, resetGatewaySessionMessageSubscriptionCoordinator, resolveGatewayConnectScopes, resolveSafeTimeoutDelayMs, selectGatewayConnectAuth, shouldRetryGatewayWithDeviceToken };
package/dist/browser.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { A as buildDeviceAuthPayloadV3, C as gatewayOriginScope, D as selectGatewayConnectAuth, E as resolveGatewayConnectScopes, O as shouldRetryGatewayWithDeviceToken, S as gatewayCredentialScope, T as buildGatewayConnectAuth, _ as shouldPauseGatewayReconnect, a as createSessionProjection, b as GatewayProtocolRequestTimeoutError, c as projectLiveSessionMessage, d as reduceSessionProjectionRunEvent, f as normalizeSessionProjectionRunId, h as readSessionMessageSequence, i as resetGatewaySessionMessageSubscriptionCoordinator, j as normalizeDeviceMetadataForAuth, k as buildDeviceAuthPayload, l as reconcileSessionProjectionSnapshot, m as readSessionMessageIdentity, n as getGatewaySessionMessageSubscriptionCoordinator, o as hasSessionProjectionAcceptedFinal, p as readAssistantStreamSegmentIdentity, r as releaseGatewaySessionMessageSubscription, s as isLocallyOptimisticSessionMessage, t as GatewaySessionMessageSubscriptionCoordinator, u as reduceSessionProjection, v as GatewayProtocolClient, w as GatewayBrowserDeviceAuthLifecycle, y as GatewayProtocolRequestError } from "./session-subscriptions-DT0ZioFT.mjs";
1
+ import { A as shouldRetryGatewayWithDeviceToken, D as buildGatewayConnectAuth, E as GatewayBrowserDeviceAuthLifecycle, M as buildDeviceAuthPayloadV3, N as normalizeDeviceMetadataForAuth, O as resolveGatewayConnectScopes, S as GatewayProtocolRequestTimeoutError, T as gatewayOriginScope, _ as readSessionMessageSequence, a as createSessionProjection, b as GatewayProtocolClient, c as projectLiveSessionMessage, d as reduceSessionProjection, f as reduceSessionProjectionRunEvent, g as readSessionMessageIdentity, h as readAssistantStreamSegmentIdentity, i as resetGatewaySessionMessageSubscriptionCoordinator, j as buildDeviceAuthPayload, k as selectGatewayConnectAuth, l as readSessionProjectionFinalMessageIdentity, m as normalizeSessionProjectionRunId, n as getGatewaySessionMessageSubscriptionCoordinator, o as hasSessionProjectionAcceptedFinal, p as isSessionProjectionErrorMessage, r as releaseGatewaySessionMessageSubscription, s as isLocallyOptimisticSessionMessage, t as GatewaySessionMessageSubscriptionCoordinator, u as reconcileSessionProjectionSnapshot, w as gatewayCredentialScope, x as GatewayProtocolRequestError, y as shouldPauseGatewayReconnect } from "./session-subscriptions-DwU8T0CH.mjs";
2
2
  import { DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, resolveSafeTimeoutDelayMs } from "./timeouts.mjs";
3
3
  export * from "@openclaw/gateway-protocol/connect-error-details";
4
- export * from "@openclaw/gateway-protocol/client-info";
5
4
  export * from "@openclaw/gateway-protocol/gateway-error-details";
5
+ export * from "@openclaw/gateway-protocol/client-info";
6
6
  export * from "@openclaw/gateway-protocol/startup-unavailable";
7
7
  export * from "@openclaw/gateway-protocol/version";
8
- export { DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, GatewayBrowserDeviceAuthLifecycle, GatewayProtocolClient, GatewayProtocolRequestError, GatewayProtocolRequestTimeoutError, GatewaySessionMessageSubscriptionCoordinator, buildDeviceAuthPayload, buildDeviceAuthPayloadV3, buildGatewayConnectAuth, createSessionProjection, gatewayCredentialScope, gatewayOriginScope, getGatewaySessionMessageSubscriptionCoordinator, hasSessionProjectionAcceptedFinal, isLocallyOptimisticSessionMessage, normalizeDeviceMetadataForAuth, normalizeSessionProjectionRunId, projectLiveSessionMessage, readAssistantStreamSegmentIdentity, readSessionMessageIdentity, readSessionMessageSequence, reconcileSessionProjectionSnapshot, reduceSessionProjection, reduceSessionProjectionRunEvent, releaseGatewaySessionMessageSubscription, resetGatewaySessionMessageSubscriptionCoordinator, resolveGatewayConnectScopes, resolveSafeTimeoutDelayMs, selectGatewayConnectAuth, shouldPauseGatewayReconnect, shouldRetryGatewayWithDeviceToken };
8
+ export { DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, GatewayBrowserDeviceAuthLifecycle, GatewayProtocolClient, GatewayProtocolRequestError, GatewayProtocolRequestTimeoutError, GatewaySessionMessageSubscriptionCoordinator, buildDeviceAuthPayload, buildDeviceAuthPayloadV3, buildGatewayConnectAuth, createSessionProjection, gatewayCredentialScope, gatewayOriginScope, getGatewaySessionMessageSubscriptionCoordinator, hasSessionProjectionAcceptedFinal, isLocallyOptimisticSessionMessage, isSessionProjectionErrorMessage, normalizeDeviceMetadataForAuth, normalizeSessionProjectionRunId, projectLiveSessionMessage, readAssistantStreamSegmentIdentity, readSessionMessageIdentity, readSessionMessageSequence, readSessionProjectionFinalMessageIdentity, reconcileSessionProjectionSnapshot, reduceSessionProjection, reduceSessionProjectionRunEvent, releaseGatewaySessionMessageSubscription, resetGatewaySessionMessageSubscriptionCoordinator, resolveGatewayConnectScopes, resolveSafeTimeoutDelayMs, selectGatewayConnectAuth, shouldPauseGatewayReconnect, shouldRetryGatewayWithDeviceToken };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import { A as readSessionMessageSequence, C as reduceSessionProjection, D as normalizeSessionProjectionRunId, E as SessionMessageIdentity, F as normalizeDeviceMetadataForAuth, M as gatewayOriginScope, N as buildDeviceAuthPayload, O as readAssistantStreamSegmentIdentity, P as buildDeviceAuthPayloadV3, S as reconcileSessionProjectionSnapshot, T as SessionMessageEnvelope, _ as SessionProjectionState, a as GatewaySessionMessageSubscriptionOptions, b as isLocallyOptimisticSessionMessage, c as resetGatewaySessionMessageSubscriptionCoordinator, d as SessionProjectionGatewayRunEvent, f as SessionProjectionRun, g as SessionProjectionSnapshotOptions, h as SessionProjectionScope, i as GatewaySessionMessageSubscriptionCoordinatorOptions, j as gatewayCredentialScope, k as readSessionMessageIdentity, l as SessionProjectionEntry, m as SessionProjectionRunTransition, n as GatewaySessionMessageSubscription, o as getGatewaySessionMessageSubscriptionCoordinator, p as SessionProjectionRunStatus, r as GatewaySessionMessageSubscriptionCoordinator, s as releaseGatewaySessionMessageSubscription, t as GatewaySessionMessageRequestClient, u as SessionProjectionEvent, v as createSessionProjection, w as reduceSessionProjectionRunEvent, x as projectLiveSessionMessage, y as hasSessionProjectionAcceptedFinal } from "./session-subscriptions-D2UdeJ0u.mjs";
1
+ import { A as readAssistantStreamSegmentIdentity, C as isSessionProjectionErrorMessage, D as SessionMessageEnvelope, E as reduceSessionProjectionRunEvent, F as buildDeviceAuthPayload, I as buildDeviceAuthPayloadV3, L as normalizeDeviceMetadataForAuth, M as readSessionMessageSequence, N as gatewayCredentialScope, O as SessionMessageIdentity, P as gatewayOriginScope, S as reduceSessionProjection, T as SessionProjectionRunTransition, _ as hasSessionProjectionAcceptedFinal, a as GatewaySessionMessageSubscriptionOptions, b as readSessionProjectionFinalMessageIdentity, c as resetGatewaySessionMessageSubscriptionCoordinator, d as SessionProjectionRun, f as SessionProjectionRunStatus, g as createSessionProjection, h as SessionProjectionState, i as GatewaySessionMessageSubscriptionCoordinatorOptions, j as readSessionMessageIdentity, k as normalizeSessionProjectionRunId, l as SessionProjectionEntry, m as SessionProjectionSnapshotOptions, n as GatewaySessionMessageSubscription, o as getGatewaySessionMessageSubscriptionCoordinator, p as SessionProjectionScope, r as GatewaySessionMessageSubscriptionCoordinator, s as releaseGatewaySessionMessageSubscription, t as GatewaySessionMessageRequestClient, u as SessionProjectionEvent, v as isLocallyOptimisticSessionMessage, w as SessionProjectionGatewayRunEvent, x as reconcileSessionProjectionSnapshot, y as projectLiveSessionMessage } from "./session-subscriptions-C3M4jnCd.mjs";
2
2
  import { a as GatewayBrowserDeviceTokenStore, c as resolveGatewayConnectScopes, i as GatewayBrowserDeviceTokenRecord, l as selectGatewayConnectAuth, n as GatewayBrowserDeviceAuthPlan, o as GatewayConnectAuthSelection, r as GatewayBrowserDeviceIdentity, s as buildGatewayConnectAuth, t as GatewayBrowserDeviceAuthLifecycle, u as shouldRetryGatewayWithDeviceToken } from "./browser-device-auth-DoPo-sPB.mjs";
3
3
  import { i as isGatewayProtocolResponseError } from "./protocol-request-B5gBmLgq.mjs";
4
4
  import { 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 } from "./timeouts.mjs";
5
- import { _ as GatewayClientRequestTimeoutError, a as startGatewayClientWithReadinessWait, b as GatewayClientRequestError, c as waitForEventLoopReady, d as GatewayClient, f as GatewayClientCloseInfo, g as GatewayClientRequestOptions, h as GatewayClientOptions, i as startGatewayClientWhenEventLoopReady, l as DeviceAuthTokenRecord, m as GatewayClientHostDeps, n as GatewayClientStartReadinessOptions, o as EventLoopReadyOptions, p as GatewayClientConnectionMetadata, r as GatewayClientStartable, s as EventLoopReadyResult, t as EventLoopReadyWaiter, u as DeviceIdentity, v as GatewayReconnectPausedInfo, y as isGatewayConnectAssemblyError } from "./readiness-5KjCokrl.mjs";
5
+ import { _ as GatewayClientRequestTimeoutError, a as startGatewayClientWithReadinessWait, b as GatewayClientRequestError, c as waitForEventLoopReady, d as GatewayClient, f as GatewayClientCloseInfo, g as GatewayClientRequestOptions, h as GatewayClientOptions, i as startGatewayClientWhenEventLoopReady, l as DeviceAuthTokenRecord, m as GatewayClientHostDeps, n as GatewayClientStartReadinessOptions, o as EventLoopReadyOptions, p as GatewayClientConnectionMetadata, r as GatewayClientStartable, s as EventLoopReadyResult, t as EventLoopReadyWaiter, u as DeviceIdentity, v as GatewayReconnectPausedInfo, y as isGatewayConnectAssemblyError } from "./readiness-uQKoJkl5.mjs";
6
6
  import { GatewayScopeUpgrade, ScopeUpgradeBinding, ScopeUpgradeOptions, ScopeUpgradeOutcome } from "./scope-upgrade.mjs";
7
7
  //#region packages/gateway-client/src/cloudflare-access.d.ts
8
8
  export declare const CF_ACCESS_CLIENT_ID_HEADER = "CF-Access-Client-Id";
@@ -14,4 +14,4 @@ export type CloudflareAccessCredentials = Readonly<{
14
14
  /** Build only the two headers Cloudflare Access defines for service-token auth. */
15
15
  export declare function buildCloudflareAccessHeaders(credentials: CloudflareAccessCredentials): Record<string, string>;
16
16
  //#endregion
17
- export { DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, DeviceAuthTokenRecord, DeviceIdentity, EventLoopReadyOptions, EventLoopReadyResult, EventLoopReadyWaiter, GatewayBrowserDeviceAuthLifecycle, GatewayBrowserDeviceAuthPlan, GatewayBrowserDeviceIdentity, GatewayBrowserDeviceTokenRecord, GatewayBrowserDeviceTokenStore, GatewayClient, GatewayClientCloseInfo, GatewayClientConnectionMetadata, GatewayClientHostDeps, GatewayClientOptions, GatewayClientRequestError, GatewayClientRequestOptions, GatewayClientRequestTimeoutError, GatewayClientStartReadinessOptions, GatewayClientStartable, GatewayConnectAuthSelection, GatewayReconnectPausedInfo, GatewayScopeUpgrade, GatewaySessionMessageRequestClient, GatewaySessionMessageSubscription, GatewaySessionMessageSubscriptionCoordinator, GatewaySessionMessageSubscriptionCoordinatorOptions, GatewaySessionMessageSubscriptionOptions, MAX_CONNECT_CHALLENGE_TIMEOUT_MS, MAX_SAFE_TIMEOUT_DELAY_MS, MIN_CONNECT_CHALLENGE_TIMEOUT_MS, ScopeUpgradeBinding, ScopeUpgradeOptions, ScopeUpgradeOutcome, type SessionMessageEnvelope, type SessionMessageIdentity, SessionProjectionEntry, SessionProjectionEvent, SessionProjectionGatewayRunEvent, SessionProjectionRun, SessionProjectionRunStatus, SessionProjectionRunTransition, SessionProjectionScope, SessionProjectionSnapshotOptions, SessionProjectionState, addSafeTimeoutDelayGraceMs, buildDeviceAuthPayload, buildDeviceAuthPayloadV3, buildGatewayConnectAuth, clampConnectChallengeTimeoutMs, clearGatewayConnectTimeout, createSessionProjection, gatewayCredentialScope, gatewayOriginScope, getConnectChallengeTimeoutMsFromEnv, getGatewaySessionMessageSubscriptionCoordinator, hasSessionProjectionAcceptedFinal, isGatewayConnectAssemblyError, isGatewayProtocolResponseError, isLocallyOptimisticSessionMessage, normalizeDeviceMetadataForAuth, normalizeSessionProjectionRunId, projectLiveSessionMessage, readAssistantStreamSegmentIdentity, readSessionMessageIdentity, readSessionMessageSequence, reconcileSessionProjectionSnapshot, reduceSessionProjection, reduceSessionProjectionRunEvent, releaseGatewaySessionMessageSubscription, resetGatewaySessionMessageSubscriptionCoordinator, resolveConnectChallengeTimeoutMs, resolveFiniteTimeoutDelayMs, resolveGatewayConnectScopes, resolvePreauthHandshakeTimeoutMs, resolveSafeTimeoutDelayMs, selectGatewayConnectAuth, shouldRetryGatewayWithDeviceToken, startGatewayClientWhenEventLoopReady, startGatewayClientWithReadinessWait, startGatewayConnectTimeout, waitForEventLoopReady };
17
+ export { DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, DeviceAuthTokenRecord, DeviceIdentity, EventLoopReadyOptions, EventLoopReadyResult, EventLoopReadyWaiter, GatewayBrowserDeviceAuthLifecycle, GatewayBrowserDeviceAuthPlan, GatewayBrowserDeviceIdentity, GatewayBrowserDeviceTokenRecord, GatewayBrowserDeviceTokenStore, GatewayClient, GatewayClientCloseInfo, GatewayClientConnectionMetadata, GatewayClientHostDeps, GatewayClientOptions, GatewayClientRequestError, GatewayClientRequestOptions, GatewayClientRequestTimeoutError, GatewayClientStartReadinessOptions, GatewayClientStartable, GatewayConnectAuthSelection, GatewayReconnectPausedInfo, GatewayScopeUpgrade, GatewaySessionMessageRequestClient, GatewaySessionMessageSubscription, GatewaySessionMessageSubscriptionCoordinator, GatewaySessionMessageSubscriptionCoordinatorOptions, GatewaySessionMessageSubscriptionOptions, MAX_CONNECT_CHALLENGE_TIMEOUT_MS, MAX_SAFE_TIMEOUT_DELAY_MS, MIN_CONNECT_CHALLENGE_TIMEOUT_MS, ScopeUpgradeBinding, ScopeUpgradeOptions, ScopeUpgradeOutcome, type SessionMessageEnvelope, type SessionMessageIdentity, SessionProjectionEntry, SessionProjectionEvent, type SessionProjectionGatewayRunEvent, SessionProjectionRun, SessionProjectionRunStatus, type SessionProjectionRunTransition, SessionProjectionScope, SessionProjectionSnapshotOptions, SessionProjectionState, addSafeTimeoutDelayGraceMs, buildDeviceAuthPayload, buildDeviceAuthPayloadV3, buildGatewayConnectAuth, clampConnectChallengeTimeoutMs, clearGatewayConnectTimeout, createSessionProjection, gatewayCredentialScope, gatewayOriginScope, getConnectChallengeTimeoutMsFromEnv, getGatewaySessionMessageSubscriptionCoordinator, hasSessionProjectionAcceptedFinal, isGatewayConnectAssemblyError, isGatewayProtocolResponseError, isLocallyOptimisticSessionMessage, isSessionProjectionErrorMessage, normalizeDeviceMetadataForAuth, normalizeSessionProjectionRunId, projectLiveSessionMessage, readAssistantStreamSegmentIdentity, readSessionMessageIdentity, readSessionMessageSequence, readSessionProjectionFinalMessageIdentity, reconcileSessionProjectionSnapshot, reduceSessionProjection, reduceSessionProjectionRunEvent, releaseGatewaySessionMessageSubscription, resetGatewaySessionMessageSubscriptionCoordinator, resolveConnectChallengeTimeoutMs, resolveFiniteTimeoutDelayMs, resolveGatewayConnectScopes, resolvePreauthHandshakeTimeoutMs, resolveSafeTimeoutDelayMs, selectGatewayConnectAuth, shouldRetryGatewayWithDeviceToken, startGatewayClientWhenEventLoopReady, startGatewayClientWithReadinessWait, startGatewayConnectTimeout, waitForEventLoopReady };
package/dist/index.mjs CHANGED
@@ -1,16 +1,17 @@
1
- import { A as buildDeviceAuthPayloadV3, C as gatewayOriginScope, D as selectGatewayConnectAuth, E as resolveGatewayConnectScopes, O as shouldRetryGatewayWithDeviceToken, S as gatewayCredentialScope, T as buildGatewayConnectAuth, _ as shouldPauseGatewayReconnect, a as createSessionProjection, b as GatewayProtocolRequestTimeoutError, c as projectLiveSessionMessage, d as reduceSessionProjectionRunEvent, f as normalizeSessionProjectionRunId, g as isRecord, h as readSessionMessageSequence, i as resetGatewaySessionMessageSubscriptionCoordinator, j as normalizeDeviceMetadataForAuth, k as buildDeviceAuthPayload, l as reconcileSessionProjectionSnapshot, m as readSessionMessageIdentity, n as getGatewaySessionMessageSubscriptionCoordinator, o as hasSessionProjectionAcceptedFinal, p as readAssistantStreamSegmentIdentity, r as releaseGatewaySessionMessageSubscription, s as isLocallyOptimisticSessionMessage, t as GatewaySessionMessageSubscriptionCoordinator, u as reduceSessionProjection, v as GatewayProtocolClient, w as GatewayBrowserDeviceAuthLifecycle, x as isGatewayProtocolResponseError, y as GatewayProtocolRequestError } from "./session-subscriptions-DT0ZioFT.mjs";
1
+ import { A as shouldRetryGatewayWithDeviceToken, C as isGatewayProtocolResponseError, D as buildGatewayConnectAuth, E as GatewayBrowserDeviceAuthLifecycle, M as buildDeviceAuthPayloadV3, N as normalizeDeviceMetadataForAuth, O as resolveGatewayConnectScopes, S as GatewayProtocolRequestTimeoutError, T as gatewayOriginScope, _ as readSessionMessageSequence, a as createSessionProjection, b as GatewayProtocolClient, c as projectLiveSessionMessage, d as reduceSessionProjection, f as reduceSessionProjectionRunEvent, g as readSessionMessageIdentity, h as readAssistantStreamSegmentIdentity, i as resetGatewaySessionMessageSubscriptionCoordinator, j as buildDeviceAuthPayload, k as selectGatewayConnectAuth, l as readSessionProjectionFinalMessageIdentity, m as normalizeSessionProjectionRunId, n as getGatewaySessionMessageSubscriptionCoordinator, o as hasSessionProjectionAcceptedFinal, p as isSessionProjectionErrorMessage, r as releaseGatewaySessionMessageSubscription, s as isLocallyOptimisticSessionMessage, t as GatewaySessionMessageSubscriptionCoordinator, u as reconcileSessionProjectionSnapshot, v as isRecord, w as gatewayCredentialScope, x as GatewayProtocolRequestError, y as shouldPauseGatewayReconnect } from "./session-subscriptions-DwU8T0CH.mjs";
2
2
  import { 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 } from "./timeouts.mjs";
3
3
  import { rawDataToString } from "./websocket-data.mjs";
4
4
  import { n as startGatewayClientWithReadinessWait, r as waitForEventLoopReady, t as startGatewayClientWhenEventLoopReady } from "./readiness-CrWxd4TI.mjs";
5
5
  import { GatewayScopeUpgrade } from "./scope-upgrade.mjs";
6
+ import { createRequire } from "node:module";
6
7
  import { ConnectErrorDetailCodes, formatConnectErrorMessage, readConnectErrorDetailCode } from "@openclaw/gateway-protocol/connect-error-details";
7
8
  import { GATEWAY_CLIENT_MODES, GATEWAY_CLIENT_NAMES } from "@openclaw/gateway-protocol/client-info";
8
9
  import { resolveGatewayStartupRetryAfterMs } from "@openclaw/gateway-protocol/startup-unavailable";
9
10
  import { MIN_CLIENT_PROTOCOL_VERSION, MIN_NODE_PROTOCOL_VERSION, MIN_PROBE_PROTOCOL_VERSION, PROTOCOL_VERSION } from "@openclaw/gateway-protocol/version";
10
11
  import { randomUUID } from "node:crypto";
11
- import { WebSocket } from "ws";
12
12
  import ipaddr from "ipaddr.js";
13
13
  import { TLSSocket } from "node:tls";
14
+ import path from "node:path";
14
15
  //#region packages/normalization-core/src/string-coerce.ts
15
16
  /** Trims string input and returns null for non-strings or empty strings. */
16
17
  function normalizeNullableString(value) {
@@ -535,6 +536,10 @@ function applyGatewayWebSocketTlsPin(options, expectedFingerprint, normalize = n
535
536
  };
536
537
  }
537
538
  //#endregion
539
+ //#region packages/gateway-client/src/websocket.ts
540
+ const require = createRequire(import.meta.url);
541
+ const { WebSocket } = require(path.join(path.dirname(require.resolve("ws/package.json")), "index.js"));
542
+ //#endregion
538
543
  //#region packages/gateway-client/src/client.ts
539
544
  const DEFAULT_HOST_DEPS = {
540
545
  loadOrCreateDeviceIdentity: () => void 0,
@@ -967,6 +972,7 @@ var GatewayClient = class {
967
972
  buildId: this.opts.clientBuildId,
968
973
  platform,
969
974
  deviceFamily,
975
+ modelIdentifier: useLegacyNodeProtocolEnvelope ? void 0 : this.opts.modelIdentifier,
970
976
  mode: clientMode,
971
977
  instanceId: this.opts.instanceId
972
978
  },
@@ -1343,4 +1349,4 @@ function buildCloudflareAccessHeaders(credentials) {
1343
1349
  };
1344
1350
  }
1345
1351
  //#endregion
1346
- export { CF_ACCESS_CLIENT_ID_HEADER, CF_ACCESS_CLIENT_SECRET_HEADER, DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, GatewayBrowserDeviceAuthLifecycle, GatewayClient, GatewayClientRequestError, GatewayClientRequestTimeoutError, GatewayScopeUpgrade, GatewaySessionMessageSubscriptionCoordinator, MAX_CONNECT_CHALLENGE_TIMEOUT_MS, MAX_SAFE_TIMEOUT_DELAY_MS, MIN_CONNECT_CHALLENGE_TIMEOUT_MS, addSafeTimeoutDelayGraceMs, buildCloudflareAccessHeaders, buildDeviceAuthPayload, buildDeviceAuthPayloadV3, buildGatewayConnectAuth, clampConnectChallengeTimeoutMs, clearGatewayConnectTimeout, createSessionProjection, gatewayCredentialScope, gatewayOriginScope, getConnectChallengeTimeoutMsFromEnv, getGatewaySessionMessageSubscriptionCoordinator, hasSessionProjectionAcceptedFinal, isGatewayConnectAssemblyError, isGatewayProtocolResponseError, isLocallyOptimisticSessionMessage, normalizeDeviceMetadataForAuth, normalizeSessionProjectionRunId, projectLiveSessionMessage, readAssistantStreamSegmentIdentity, readSessionMessageIdentity, readSessionMessageSequence, reconcileSessionProjectionSnapshot, reduceSessionProjection, reduceSessionProjectionRunEvent, releaseGatewaySessionMessageSubscription, resetGatewaySessionMessageSubscriptionCoordinator, resolveConnectChallengeTimeoutMs, resolveFiniteTimeoutDelayMs, resolveGatewayConnectScopes, resolvePreauthHandshakeTimeoutMs, resolveSafeTimeoutDelayMs, selectGatewayConnectAuth, shouldRetryGatewayWithDeviceToken, startGatewayClientWhenEventLoopReady, startGatewayClientWithReadinessWait, startGatewayConnectTimeout, waitForEventLoopReady };
1352
+ export { CF_ACCESS_CLIENT_ID_HEADER, CF_ACCESS_CLIENT_SECRET_HEADER, DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, DEFAULT_PREAUTH_HANDSHAKE_TIMEOUT_MS, GatewayBrowserDeviceAuthLifecycle, GatewayClient, GatewayClientRequestError, GatewayClientRequestTimeoutError, GatewayScopeUpgrade, GatewaySessionMessageSubscriptionCoordinator, MAX_CONNECT_CHALLENGE_TIMEOUT_MS, MAX_SAFE_TIMEOUT_DELAY_MS, MIN_CONNECT_CHALLENGE_TIMEOUT_MS, addSafeTimeoutDelayGraceMs, buildCloudflareAccessHeaders, buildDeviceAuthPayload, buildDeviceAuthPayloadV3, buildGatewayConnectAuth, clampConnectChallengeTimeoutMs, clearGatewayConnectTimeout, createSessionProjection, gatewayCredentialScope, gatewayOriginScope, getConnectChallengeTimeoutMsFromEnv, getGatewaySessionMessageSubscriptionCoordinator, hasSessionProjectionAcceptedFinal, isGatewayConnectAssemblyError, isGatewayProtocolResponseError, isLocallyOptimisticSessionMessage, isSessionProjectionErrorMessage, normalizeDeviceMetadataForAuth, normalizeSessionProjectionRunId, projectLiveSessionMessage, readAssistantStreamSegmentIdentity, readSessionMessageIdentity, readSessionMessageSequence, readSessionProjectionFinalMessageIdentity, reconcileSessionProjectionSnapshot, reduceSessionProjection, reduceSessionProjectionRunEvent, releaseGatewaySessionMessageSubscription, resetGatewaySessionMessageSubscriptionCoordinator, resolveConnectChallengeTimeoutMs, resolveFiniteTimeoutDelayMs, resolveGatewayConnectScopes, resolvePreauthHandshakeTimeoutMs, resolveSafeTimeoutDelayMs, selectGatewayConnectAuth, shouldRetryGatewayWithDeviceToken, startGatewayClientWhenEventLoopReady, startGatewayClientWithReadinessWait, startGatewayConnectTimeout, waitForEventLoopReady };
@@ -96,6 +96,7 @@ type GatewayClientOptions = {
96
96
  clientBuildId?: string;
97
97
  platform?: string;
98
98
  deviceFamily?: string;
99
+ modelIdentifier?: string;
99
100
  mode?: GatewayClientMode;
100
101
  role?: string;
101
102
  scopes?: string[];
@@ -1,2 +1,2 @@
1
- import { a as startGatewayClientWithReadinessWait, i as startGatewayClientWhenEventLoopReady, n as GatewayClientStartReadinessOptions, r as GatewayClientStartable, t as EventLoopReadyWaiter } from "./readiness-5KjCokrl.mjs";
1
+ import { a as startGatewayClientWithReadinessWait, i as startGatewayClientWhenEventLoopReady, n as GatewayClientStartReadinessOptions, r as GatewayClientStartable, t as EventLoopReadyWaiter } from "./readiness-uQKoJkl5.mjs";
2
2
  export { EventLoopReadyWaiter, GatewayClientStartReadinessOptions, GatewayClientStartable, startGatewayClientWhenEventLoopReady, startGatewayClientWithReadinessWait };
@@ -57,6 +57,24 @@ declare function readAssistantStreamSegmentIdentity(message: unknown): {
57
57
  runId?: string;
58
58
  } | undefined;
59
59
  //#endregion
60
+ //#region packages/gateway-client/src/session-projection-run-event.d.ts
61
+ type SessionProjectionGatewayRunEvent = {
62
+ state?: unknown;
63
+ yielded?: unknown;
64
+ seq?: unknown;
65
+ } & Partial<Record<"runId" | "message" | "stopReason" | "errorKind" | "errorMessage", unknown>>;
66
+ type SessionProjectionRunTransition = {
67
+ projection: SessionProjectionState;
68
+ previousRun: SessionProjectionRun | undefined;
69
+ currentRun: SessionProjectionRun | undefined;
70
+ };
71
+ /** Normalizes Gateway run envelopes once for every browser and terminal adapter. */
72
+ declare function reduceSessionProjectionRunEvent(projection: SessionProjectionState, event: SessionProjectionGatewayRunEvent, scope?: SessionProjectionScope): SessionProjectionRunTransition | null;
73
+ //#endregion
74
+ //#region packages/gateway-client/src/session-projection-message-content.d.ts
75
+ /** Diagnostic-only error projections can be retired when their run resumes. */
76
+ declare function isSessionProjectionErrorMessage(message: unknown, errorMessage?: string): boolean;
77
+ //#endregion
60
78
  //#region packages/gateway-client/src/session-projection.d.ts
61
79
  type SessionProjectionScope = {
62
80
  sessionKey?: string;
@@ -71,6 +89,7 @@ type SessionProjectionSnapshotOptions = {
71
89
  type SessionProjectionRunStatus = "streaming" | "completed" | "error" | "aborted" | "timeout" | "yielded";
72
90
  type SessionProjectionRun = {
73
91
  runId: string;
92
+ seq?: number;
74
93
  status: SessionProjectionRunStatus;
75
94
  message?: unknown;
76
95
  acceptedFinalMessageIdentities?: readonly string[];
@@ -78,15 +97,6 @@ type SessionProjectionRun = {
78
97
  errorKind?: string;
79
98
  errorMessage?: string;
80
99
  };
81
- type SessionProjectionGatewayRunEvent = {
82
- state?: unknown;
83
- yielded?: unknown;
84
- } & Partial<Record<"runId" | "message" | "stopReason" | "errorKind" | "errorMessage", unknown>>;
85
- type SessionProjectionRunTransition = {
86
- projection: SessionProjectionState;
87
- previousRun: SessionProjectionRun | undefined;
88
- currentRun: SessionProjectionRun | undefined;
89
- };
90
100
  type SessionProjectionEntry = {
91
101
  message: unknown;
92
102
  identity: SessionMessageIdentity | null;
@@ -129,6 +139,7 @@ type SessionProjectionEvent = ScopedSessionProjectionEvent & ({
129
139
  } | {
130
140
  type: "runDelta";
131
141
  runId: string;
142
+ seq?: number;
132
143
  message?: unknown;
133
144
  } | (Omit<SessionProjectionRun, "acceptedFinalMessageIdentities"> & {
134
145
  type: "runTerminal";
@@ -146,12 +157,11 @@ declare function createSessionProjection(scope?: SessionProjectionScope, message
146
157
  declare function projectLiveSessionMessage(state: SessionProjectionState, message: unknown, envelope?: SessionMessageEnvelope, scope?: SessionProjectionScope): SessionProjectionState;
147
158
  /** Only observed live events and this client's pending turns may survive an older snapshot. */
148
159
  declare function reconcileSessionProjectionSnapshot(state: SessionProjectionState, messages: readonly unknown[], scope?: SessionProjectionScope, options?: SessionProjectionSnapshotOptions): SessionProjectionState;
160
+ declare function readSessionProjectionFinalMessageIdentity(message: unknown): string | null;
149
161
  /** Replayed finals are recognized against this run's bounded canonical terminal history. */
150
162
  declare function hasSessionProjectionAcceptedFinal(run: SessionProjectionRun | undefined, message: unknown): boolean;
151
163
  /** Reduces durable events, snapshots, and transport lifecycle without client-specific policy. */
152
164
  declare function reduceSessionProjection(state: SessionProjectionState, event: SessionProjectionEvent): SessionProjectionState;
153
- /** Normalizes Gateway run envelopes once for every browser and terminal adapter. */
154
- declare function reduceSessionProjectionRunEvent(projection: SessionProjectionState, event: SessionProjectionGatewayRunEvent, scope?: SessionProjectionScope): SessionProjectionRunTransition | null;
155
165
  //#endregion
156
166
  //#region packages/gateway-client/src/session-subscriptions.d.ts
157
167
  type GatewaySessionMessageRequestClient = {
@@ -187,4 +197,4 @@ declare function getGatewaySessionMessageSubscriptionCoordinator(client: Gateway
187
197
  declare function resetGatewaySessionMessageSubscriptionCoordinator(client: GatewaySessionMessageRequestClient): void;
188
198
  declare function releaseGatewaySessionMessageSubscription(subscription: GatewaySessionMessageSubscription): Promise<void>;
189
199
  //#endregion
190
- export { readSessionMessageSequence as A, reduceSessionProjection as C, normalizeSessionProjectionRunId as D, SessionMessageIdentity as E, normalizeDeviceMetadataForAuth as F, gatewayOriginScope as M, buildDeviceAuthPayload as N, readAssistantStreamSegmentIdentity as O, buildDeviceAuthPayloadV3 as P, reconcileSessionProjectionSnapshot as S, SessionMessageEnvelope as T, SessionProjectionState as _, GatewaySessionMessageSubscriptionOptions as a, isLocallyOptimisticSessionMessage as b, resetGatewaySessionMessageSubscriptionCoordinator as c, SessionProjectionGatewayRunEvent as d, SessionProjectionRun as f, SessionProjectionSnapshotOptions as g, SessionProjectionScope as h, GatewaySessionMessageSubscriptionCoordinatorOptions as i, gatewayCredentialScope as j, readSessionMessageIdentity as k, SessionProjectionEntry as l, SessionProjectionRunTransition as m, GatewaySessionMessageSubscription as n, getGatewaySessionMessageSubscriptionCoordinator as o, SessionProjectionRunStatus as p, GatewaySessionMessageSubscriptionCoordinator as r, releaseGatewaySessionMessageSubscription as s, GatewaySessionMessageRequestClient as t, SessionProjectionEvent as u, createSessionProjection as v, reduceSessionProjectionRunEvent as w, projectLiveSessionMessage as x, hasSessionProjectionAcceptedFinal as y };
200
+ export { readAssistantStreamSegmentIdentity as A, isSessionProjectionErrorMessage as C, SessionMessageEnvelope as D, reduceSessionProjectionRunEvent as E, buildDeviceAuthPayload as F, buildDeviceAuthPayloadV3 as I, normalizeDeviceMetadataForAuth as L, readSessionMessageSequence as M, gatewayCredentialScope as N, SessionMessageIdentity as O, gatewayOriginScope as P, reduceSessionProjection as S, SessionProjectionRunTransition as T, hasSessionProjectionAcceptedFinal as _, GatewaySessionMessageSubscriptionOptions as a, readSessionProjectionFinalMessageIdentity as b, resetGatewaySessionMessageSubscriptionCoordinator as c, SessionProjectionRun as d, SessionProjectionRunStatus as f, createSessionProjection as g, SessionProjectionState as h, GatewaySessionMessageSubscriptionCoordinatorOptions as i, readSessionMessageIdentity as j, normalizeSessionProjectionRunId as k, SessionProjectionEntry as l, SessionProjectionSnapshotOptions as m, GatewaySessionMessageSubscription as n, getGatewaySessionMessageSubscriptionCoordinator as o, SessionProjectionScope as p, GatewaySessionMessageSubscriptionCoordinator as r, releaseGatewaySessionMessageSubscription as s, GatewaySessionMessageRequestClient as t, SessionProjectionEvent as u, isLocallyOptimisticSessionMessage as v, SessionProjectionGatewayRunEvent as w, reconcileSessionProjectionSnapshot as x, projectLiveSessionMessage as y };
@@ -1,6 +1,7 @@
1
1
  import { DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS, clearGatewayConnectTimeout, resolveSafeTimeoutDelayMs, startGatewayConnectTimeout } from "./timeouts.mjs";
2
2
  import { ConnectErrorDetailCodes, readConnectErrorDetailCode, readConnectErrorRecoveryAdvice, readPairingConnectErrorDetails } from "@openclaw/gateway-protocol/connect-error-details";
3
3
  import { isGatewayEventFrame, isGatewayResponseFrame } from "@openclaw/gateway-protocol/frame-guards";
4
+ import { GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT } from "@openclaw/gateway-protocol/gateway-error-details";
4
5
  //#region packages/gateway-client/src/device-auth.ts
5
6
  function normalizeDeviceMetadataForAuth(value) {
6
7
  if (typeof value !== "string") return "";
@@ -68,7 +69,7 @@ function selectGatewayConnectAuth(params) {
68
69
  const selectedToken = authToken ?? resolvedDeviceToken;
69
70
  const authBootstrapToken = !authToken && !resolvedDeviceToken && !authPassword ? bootstrapToken : void 0;
70
71
  return {
71
- authToken: selectedToken,
72
+ authToken,
72
73
  authBootstrapToken,
73
74
  authDeviceToken: useRetryToken ? storedToken : void 0,
74
75
  authPassword,
@@ -482,7 +483,8 @@ var GatewayPendingRequests = class {
482
483
  return this.pending.size > 0;
483
484
  }
484
485
  get hasUnboundedPending() {
485
- return [...this.pending.values()].some((pending) => pending.unbounded);
486
+ for (const pending of this.pending.values()) if (pending.unbounded) return true;
487
+ return false;
486
488
  }
487
489
  request(sender, method, params, options) {
488
490
  let id;
@@ -578,8 +580,8 @@ var GatewayPendingRequests = class {
578
580
  pending.reject(error);
579
581
  }
580
582
  flush(error) {
581
- const retired = [...this.pending];
582
- this.pending.clear();
583
+ const retired = this.pending;
584
+ this.pending = /* @__PURE__ */ new Map();
583
585
  this.requestSequence = 0;
584
586
  for (const [id, pending] of retired) {
585
587
  pending.cleanup?.();
@@ -594,9 +596,7 @@ var GatewayPendingRequests = class {
594
596
  finishTiming(id, pending, ok, errorCode) {
595
597
  const endedAtMs = this.opts.nowMs();
596
598
  try {
597
- const onTiming = this.opts.onTiming;
598
- if (onTiming === void 0 || onTiming === null) return;
599
- Reflect.apply(onTiming, this.opts, [{
599
+ this.opts.onTiming?.({
600
600
  id,
601
601
  method: pending.method,
602
602
  ok,
@@ -604,7 +604,7 @@ var GatewayPendingRequests = class {
604
604
  startedAtMs: pending.startedAtMs,
605
605
  endedAtMs,
606
606
  errorCode
607
- }]);
607
+ });
608
608
  } catch (error) {
609
609
  this.opts.onCallbackError?.("request timing", error);
610
610
  }
@@ -945,19 +945,23 @@ var GatewayProtocolClient = class {
945
945
  const decision = this.opts.resolveClose(context);
946
946
  this.requests.flush(decision.pendingError ?? context.connectFailure?.error ?? /* @__PURE__ */ new Error(`gateway closed (${code}): ${reason}`));
947
947
  this.invoke("close", () => this.opts.onClose?.(context, decision));
948
- if (decision.retry && !this.stopped && !this.socket && !this.reconnectSignal) this.scheduleReconnect(decision.reconnectDelayMs ?? context.connectFailure?.reconnectDelayMs);
948
+ if (decision.retry && !this.stopped && !this.socket && !this.reconnectSignal) {
949
+ const error = context.connectFailure?.error;
950
+ const retryAfterMs = error instanceof GatewayProtocolRequestError && error.retryable && error.retryAfterMs !== void 0 && Number.isFinite(error.retryAfterMs) && error.retryAfterMs > 0 ? error.retryAfterMs : void 0;
951
+ this.scheduleReconnect(decision.reconnectDelayMs ?? context.connectFailure?.reconnectDelayMs, retryAfterMs);
952
+ }
949
953
  }
950
954
  handleSocketError(socket, generation, error) {
951
955
  if (!this.isActive(socket, generation) || this.connectSent) return;
952
956
  this.connectFailure = { error };
953
957
  this.opts.onConnectError?.(error);
954
958
  }
955
- scheduleReconnect(overrideMs) {
959
+ scheduleReconnect(overrideMs, minimumMs = 0) {
956
960
  if (overrideMs !== void 0) this.reconnectSupervisor.nextDelayOverrideMs = overrideMs;
957
961
  const retry = this.reconnectSupervisor.next();
958
962
  if (!retry) return;
959
963
  this.reconnectSignal = retry.signal;
960
- sleepWithAbort(retry.delayMs, retry.signal).then(() => {
964
+ sleepWithAbort(overrideMs ?? Math.max(retry.delayMs, minimumMs), retry.signal).then(() => {
961
965
  if (this.reconnectSignal !== retry.signal) return;
962
966
  this.reconnectSignal = null;
963
967
  this.invoke("reconnect", () => this.connect());
@@ -1090,11 +1094,47 @@ function readAssistantStreamSegmentIdentity(message) {
1090
1094
  } : void 0;
1091
1095
  }
1092
1096
  //#endregion
1097
+ //#region packages/gateway-client/src/session-projection-message-content.ts
1098
+ function readSessionMessageDisplayContent(message) {
1099
+ const record = asNullableRecord(message);
1100
+ const content = typeof message === "string" ? message : record?.content;
1101
+ const media = asNullableRecord(record?.["__openclaw"])?.media;
1102
+ let hasNonText = Array.isArray(media) && media.length > 0;
1103
+ const texts = [];
1104
+ for (const block of Array.isArray(content) ? content : [content]) {
1105
+ const entry = asNullableRecord(block);
1106
+ if (entry && entry.type !== "text" && entry.type !== "input_text" && entry.type !== "output_text") {
1107
+ hasNonText ||= entry.type !== "thinking" && entry.type !== "reasoning" && entry.type !== "redacted_thinking";
1108
+ continue;
1109
+ }
1110
+ const text = readSessionProjectionString(entry ? entry.text : block);
1111
+ if (text) texts.push(text);
1112
+ }
1113
+ const fallback = texts.length === 0 ? readSessionProjectionString(record?.text) : null;
1114
+ return {
1115
+ text: fallback ?? texts.join("\n"),
1116
+ hasNonText,
1117
+ usesFallbackText: fallback !== null
1118
+ };
1119
+ }
1120
+ function normalizeChatErrorComparisonText(text) {
1121
+ return text.trim().replace(/^⚠️\s*/u, "").replace(/^Error:\s*/iu, "").replace(/\s+/gu, " ").trim();
1122
+ }
1123
+ /** Diagnostic-only error projections can be retired when their run resumes. */
1124
+ function isSessionProjectionErrorMessage(message, errorMessage) {
1125
+ const role = asNullableRecord(message)?.role;
1126
+ if (typeof role === "string" && role.trim().toLowerCase() !== "assistant") return false;
1127
+ const { text, hasNonText } = readSessionMessageDisplayContent(message);
1128
+ const normalizedText = normalizeChatErrorComparisonText(text);
1129
+ return !hasNonText && (!normalizedText || normalizedText === "[assistant turn failed before producing content]" || normalizedText === GATEWAY_ASSISTANT_ERROR_FALLBACK_TEXT || normalizedText === normalizeChatErrorComparisonText(errorMessage ?? ""));
1130
+ }
1131
+ //#endregion
1093
1132
  //#region packages/gateway-client/src/session-projection-run-event.ts
1094
1133
  function readNonemptyString(value) {
1095
1134
  return typeof value === "string" ? value.trim() || null : null;
1096
1135
  }
1097
- function reduceSessionProjectionRunEventImpl(projection, event, scope = {}) {
1136
+ /** Normalizes Gateway run envelopes once for every browser and terminal adapter. */
1137
+ function reduceSessionProjectionRunEvent(projection, event, scope = {}) {
1098
1138
  const runId = readNonemptyString(event.runId);
1099
1139
  if (!runId || typeof event.state !== "string" || ![
1100
1140
  "delta",
@@ -1108,6 +1148,7 @@ function reduceSessionProjectionRunEventImpl(projection, event, scope = {}) {
1108
1148
  const errorKind = readNonemptyString(event.errorKind);
1109
1149
  const base = {
1110
1150
  runId,
1151
+ seq: typeof event.seq === "number" ? event.seq : void 0,
1111
1152
  ...message === void 0 ? {} : { message },
1112
1153
  scope
1113
1154
  };
@@ -1300,18 +1341,12 @@ function reconcileSessionProjectionSnapshot(state, messages, scope = {}, options
1300
1341
  };
1301
1342
  }
1302
1343
  function hasDisplayableSessionMessage(message) {
1303
- if (typeof message === "string") return message.trim().length > 0;
1304
- const record = asNullableRecord(message);
1305
- if (!record) return false;
1306
- const displayableBlocks = Array.isArray(record.content) && record.content.some((block) => {
1307
- const entry = asNullableRecord(block);
1308
- return entry ? entry.type !== "text" || readSessionProjectionString(entry.text) !== null : typeof block === "string" && block.trim().length > 0;
1309
- });
1310
- const media = asNullableRecord(record["__openclaw"])?.media;
1311
- return Boolean(typeof record.content === "string" && record.content.trim() || displayableBlocks || Array.isArray(media) && media.length > 0);
1344
+ const { text, hasNonText } = readSessionMessageDisplayContent(message);
1345
+ return Boolean(text) || hasNonText;
1312
1346
  }
1313
1347
  function readSessionProjectionFinalMessageIdentity(message) {
1314
- if (!hasDisplayableSessionMessage(message)) return null;
1348
+ const display = readSessionMessageDisplayContent(message);
1349
+ if (!display.text && !display.hasNonText) return null;
1315
1350
  const identity = readSessionMessageIdentity(message);
1316
1351
  if (identity?.externalSource) return `import:${identity.role}:${identity.externalSource}`;
1317
1352
  if (identity?.id && !identity.isImported) return `id:${identity.role}:${identity.id}`;
@@ -1327,7 +1362,8 @@ function readSessionProjectionFinalMessageIdentity(message) {
1327
1362
  metadata?.importedFrom ?? null,
1328
1363
  metadata?.cliSessionId ?? null,
1329
1364
  metadata?.externalId ?? null
1330
- ] : null
1365
+ ] : null,
1366
+ ...display.usesFallbackText ? [record?.text] : []
1331
1367
  ])}`;
1332
1368
  } catch {
1333
1369
  return null;
@@ -1349,18 +1385,24 @@ function retainSessionProjectionRuns(runs) {
1349
1385
  }
1350
1386
  function updateRun(state, incoming) {
1351
1387
  const incomingErrorMessage = readSessionProjectionString(incoming.errorMessage);
1352
- const normalizedIncoming = { ...incoming };
1388
+ const incomingSeq = typeof incoming.seq === "number" && Number.isSafeInteger(incoming.seq) && incoming.seq >= 0 ? incoming.seq : void 0;
1389
+ const normalizedIncoming = {
1390
+ ...incoming,
1391
+ seq: incomingSeq
1392
+ };
1353
1393
  if (incomingErrorMessage) normalizedIncoming.errorMessage = incomingErrorMessage;
1354
1394
  else delete normalizedIncoming.errorMessage;
1355
1395
  const current = state.runs[incoming.runId];
1356
- if (current && current.status !== "streaming") {
1396
+ const resumesErrorProjection = current?.status === "error" && incoming.status === "streaming" && current.seq !== void 0 && incomingSeq !== void 0 && incomingSeq > current.seq && isSessionProjectionErrorMessage(current.message, current.errorMessage);
1397
+ if (current && current.status !== "streaming" && !resumesErrorProjection) {
1357
1398
  const incomingFinalIdentity = readSessionProjectionFinalMessageIdentity(incoming.message);
1358
1399
  const incomingIsFinal = incoming.status === "completed" || incoming.status === "yielded";
1359
1400
  const canRecoverFinal = !hasDisplayableSessionMessage(current.message) || (current.acceptedFinalMessageIdentities?.length ?? 0) > 0;
1360
1401
  const acceptFinal = incomingIsFinal && (current.status === incoming.status || canRecoverFinal) && incomingFinalIdentity !== null && !hasSessionProjectionAcceptedFinal(current, incoming.message);
1361
1402
  const recoverMessage = acceptFinal && !hasDisplayableSessionMessage(current.message);
1362
1403
  const recoverError = readSessionProjectionString(current.errorMessage) === null && incomingErrorMessage !== null;
1363
- if (!acceptFinal && !recoverError) return state;
1404
+ const updateTerminalSequence = incoming.status !== "streaming" && (incomingSeq === void 0 ? current.seq !== void 0 : current.seq === void 0 || incomingSeq > current.seq);
1405
+ if (!acceptFinal && !recoverError && !updateTerminalSequence) return state;
1364
1406
  const firstFinalIdentity = readSessionProjectionFinalMessageIdentity(current.message);
1365
1407
  const previousFinalIdentities = current.acceptedFinalMessageIdentities ?? (firstFinalIdentity ? [firstFinalIdentity] : []);
1366
1408
  return {
@@ -1369,6 +1411,7 @@ function updateRun(state, incoming) {
1369
1411
  ...state.runs,
1370
1412
  [incoming.runId]: {
1371
1413
  ...current,
1414
+ ...updateTerminalSequence ? { seq: incomingSeq } : {},
1372
1415
  ...recoverMessage ? { message: incoming.message } : {},
1373
1416
  ...acceptFinal && incomingFinalIdentity ? { acceptedFinalMessageIdentities: [...previousFinalIdentities, incomingFinalIdentity].slice(-32) } : {},
1374
1417
  ...recoverError && incomingErrorMessage ? {
@@ -1379,17 +1422,18 @@ function updateRun(state, incoming) {
1379
1422
  }
1380
1423
  };
1381
1424
  }
1425
+ const resumedState = resumesErrorProjection ? withEntries(state, state.entries.filter((entry) => !((entry.identity?.runId === incoming.runId || entry.message === current.message) && (asNullableRecord(entry.message)?.stopReason === "error" || entry.message === current.message) && isSessionProjectionErrorMessage(entry.message, current.errorMessage)))) : state;
1382
1426
  const previousRuns = current && current.status === "streaming" && incoming.status !== "streaming" ? Object.fromEntries(Object.entries(state.runs).filter(([runId]) => runId !== incoming.runId)) : state.runs;
1383
1427
  const acceptedFinalIdentity = incoming.status === "completed" || incoming.status === "yielded" ? readSessionProjectionFinalMessageIdentity(incoming.message) : null;
1384
1428
  return {
1385
- ...state,
1429
+ ...resumedState,
1386
1430
  runs: retainSessionProjectionRuns({
1387
1431
  ...previousRuns,
1388
1432
  [incoming.runId]: {
1389
- ...current,
1433
+ ...resumesErrorProjection ? {} : current,
1390
1434
  ...normalizedIncoming,
1391
1435
  ...acceptedFinalIdentity ? { acceptedFinalMessageIdentities: [acceptedFinalIdentity] } : {},
1392
- ...incoming.message === void 0 && current?.message !== void 0 ? { message: current.message } : {}
1436
+ ...!resumesErrorProjection && incoming.message === void 0 && current?.message !== void 0 ? { message: current.message } : {}
1393
1437
  }
1394
1438
  })
1395
1439
  };
@@ -1447,11 +1491,13 @@ function reduceSessionProjection(state, event) {
1447
1491
  }
1448
1492
  case "runDelta": return updateRun(state, {
1449
1493
  runId: event.runId,
1494
+ seq: event.seq,
1450
1495
  status: "streaming",
1451
1496
  ...event.message === void 0 ? {} : { message: event.message }
1452
1497
  });
1453
1498
  case "runTerminal": return updateRun(state, {
1454
1499
  runId: event.runId,
1500
+ seq: event.seq,
1455
1501
  status: event.status,
1456
1502
  ...event.message === void 0 ? {} : { message: event.message },
1457
1503
  ...event.stopReason === void 0 ? {} : { stopReason: event.stopReason },
@@ -1466,10 +1512,6 @@ function reduceSessionProjection(state, event) {
1466
1512
  default: return state;
1467
1513
  }
1468
1514
  }
1469
- /** Normalizes Gateway run envelopes once for every browser and terminal adapter. */
1470
- function reduceSessionProjectionRunEvent(projection, event, scope = {}) {
1471
- return reduceSessionProjectionRunEventImpl(projection, event, scope);
1472
- }
1473
1515
  //#endregion
1474
1516
  //#region packages/gateway-client/src/session-subscriptions.ts
1475
1517
  function sessionSubscriptionParams(key, agentId) {
@@ -1587,34 +1629,26 @@ var GatewaySessionMessageSubscriptionCoordinator = class {
1587
1629
  agentId,
1588
1630
  ready: Promise.resolve({ key }),
1589
1631
  approvalRequest: null,
1590
- approvalResponse: null,
1591
1632
  plainFallback: null,
1592
1633
  canonicalSettled: false,
1593
1634
  handles: /* @__PURE__ */ new Set(),
1594
1635
  pendingOwners: 0,
1595
1636
  release: null
1596
1637
  };
1597
- entry.ready = this.#requestSubscribe(entry, includeApprovals).then((result) => {
1598
- entry.key = result.key;
1599
- entry.canonicalSettled = true;
1600
- if (includeApprovals) entry.approvalResponse = result;
1601
- return result;
1602
- });
1603
- if (includeApprovals) entry.approvalRequest = entry.ready;
1638
+ entry.ready = this.#requestSubscribe(entry, includeApprovals);
1639
+ if (includeApprovals) entry.ready = this.#trackApprovalRequest(entry, entry.ready);
1604
1640
  entry.ready.catch(() => void 0);
1605
1641
  this.#entries.add(entry);
1606
1642
  return entry;
1607
1643
  }
1608
1644
  #acquireCapability(entry, includeApprovals) {
1609
1645
  if (!includeApprovals) {
1610
- if (entry.approvalRequest === entry.ready && !entry.approvalResponse) {
1646
+ if (entry.approvalRequest === entry.ready) {
1611
1647
  if (!entry.plainFallback) {
1612
1648
  const approvalRequest = entry.ready;
1613
1649
  entry.plainFallback = approvalRequest.catch(async (error) => {
1614
1650
  if (this.#retired) throw error;
1615
1651
  const result = await this.#requestSubscribe(entry, false);
1616
- entry.key = result.key;
1617
- entry.canonicalSettled = true;
1618
1652
  entry.ready = Promise.resolve(result);
1619
1653
  if (entry.approvalRequest === approvalRequest) entry.approvalRequest = null;
1620
1654
  return result;
@@ -1624,18 +1658,15 @@ var GatewaySessionMessageSubscriptionCoordinator = class {
1624
1658
  }
1625
1659
  return entry.ready;
1626
1660
  }
1627
- if (entry.approvalResponse) return Promise.resolve(entry.approvalResponse);
1628
1661
  if (entry.approvalRequest) return entry.approvalRequest;
1629
- const upgrade = entry.ready.then(() => this.#requestSubscribe(entry, true)).then((result) => {
1630
- entry.key = result.key;
1631
- entry.approvalResponse = result;
1632
- return result;
1633
- });
1634
- entry.approvalRequest = upgrade;
1635
- upgrade.catch(() => {
1636
- if (entry.approvalRequest === upgrade) entry.approvalRequest = null;
1662
+ return this.#trackApprovalRequest(entry, entry.ready.then(() => this.#requestSubscribe(entry, true)));
1663
+ }
1664
+ #trackApprovalRequest(entry, request) {
1665
+ const tracked = request.finally(() => {
1666
+ if (entry.approvalRequest === tracked) entry.approvalRequest = null;
1637
1667
  });
1638
- return upgrade;
1668
+ entry.approvalRequest = tracked;
1669
+ return tracked;
1639
1670
  }
1640
1671
  async #requestSubscribe(entry, includeApprovals) {
1641
1672
  const params = sessionSubscriptionParams(entry.key, entry.agentId);
@@ -1645,7 +1676,11 @@ var GatewaySessionMessageSubscriptionCoordinator = class {
1645
1676
  } : params, { timeoutMs: DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS }).catch(async (error) => {
1646
1677
  if (!(error instanceof GatewayProtocolRequestTimeoutError) || !error.requestSent || this.#retired) throw error;
1647
1678
  try {
1648
- await this.#client.request(entry.handles.size > 0 ? "sessions.messages.subscribe" : "sessions.messages.unsubscribe", params, { timeoutMs: DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS });
1679
+ const retainedApprovals = [...entry.handles].some((handle) => handle.includeApprovals);
1680
+ await this.#client.request(entry.handles.size > 0 ? "sessions.messages.subscribe" : "sessions.messages.unsubscribe", retainedApprovals ? {
1681
+ ...params,
1682
+ includeApprovals: true
1683
+ } : params, { timeoutMs: DEFAULT_GATEWAY_REQUEST_TIMEOUT_MS });
1649
1684
  } catch (recoveryError) {
1650
1685
  if (!this.#retired) throw new AggregateError([error, recoveryError], "session message subscription recovery failed", { cause: recoveryError });
1651
1686
  }
@@ -1653,8 +1688,10 @@ var GatewaySessionMessageSubscriptionCoordinator = class {
1653
1688
  });
1654
1689
  const response = result && typeof result === "object" ? result : null;
1655
1690
  const responseKey = response && "key" in response ? response.key : void 0;
1691
+ entry.key = typeof responseKey === "string" && responseKey.trim() ? responseKey.trim() : entry.key;
1692
+ entry.canonicalSettled = true;
1656
1693
  return {
1657
- key: typeof responseKey === "string" && responseKey.trim() ? responseKey.trim() : entry.key,
1694
+ key: entry.key,
1658
1695
  ...response && "approvalReplay" in response ? { approvalReplay: response.approvalReplay } : {}
1659
1696
  };
1660
1697
  }
@@ -1690,4 +1727,4 @@ function releaseGatewaySessionMessageSubscription(subscription) {
1690
1727
  return sessionMessageSubscriptionOwners.get(subscription)?.coordinator.release(subscription) ?? Promise.resolve();
1691
1728
  }
1692
1729
  //#endregion
1693
- export { buildDeviceAuthPayloadV3 as A, gatewayOriginScope as C, selectGatewayConnectAuth as D, resolveGatewayConnectScopes as E, shouldRetryGatewayWithDeviceToken as O, gatewayCredentialScope as S, buildGatewayConnectAuth as T, shouldPauseGatewayReconnect as _, createSessionProjection as a, GatewayProtocolRequestTimeoutError as b, projectLiveSessionMessage as c, reduceSessionProjectionRunEvent as d, normalizeSessionProjectionRunId as f, isRecord as g, readSessionMessageSequence as h, resetGatewaySessionMessageSubscriptionCoordinator as i, normalizeDeviceMetadataForAuth as j, buildDeviceAuthPayload as k, reconcileSessionProjectionSnapshot as l, readSessionMessageIdentity as m, getGatewaySessionMessageSubscriptionCoordinator as n, hasSessionProjectionAcceptedFinal as o, readAssistantStreamSegmentIdentity as p, releaseGatewaySessionMessageSubscription as r, isLocallyOptimisticSessionMessage as s, GatewaySessionMessageSubscriptionCoordinator as t, reduceSessionProjection as u, GatewayProtocolClient as v, GatewayBrowserDeviceAuthLifecycle as w, isGatewayProtocolResponseError as x, GatewayProtocolRequestError as y };
1730
+ export { shouldRetryGatewayWithDeviceToken as A, isGatewayProtocolResponseError as C, buildGatewayConnectAuth as D, GatewayBrowserDeviceAuthLifecycle as E, buildDeviceAuthPayloadV3 as M, normalizeDeviceMetadataForAuth as N, resolveGatewayConnectScopes as O, GatewayProtocolRequestTimeoutError as S, gatewayOriginScope as T, readSessionMessageSequence as _, createSessionProjection as a, GatewayProtocolClient as b, projectLiveSessionMessage as c, reduceSessionProjection as d, reduceSessionProjectionRunEvent as f, readSessionMessageIdentity as g, readAssistantStreamSegmentIdentity as h, resetGatewaySessionMessageSubscriptionCoordinator as i, buildDeviceAuthPayload as j, selectGatewayConnectAuth as k, readSessionProjectionFinalMessageIdentity as l, normalizeSessionProjectionRunId as m, getGatewaySessionMessageSubscriptionCoordinator as n, hasSessionProjectionAcceptedFinal as o, isSessionProjectionErrorMessage as p, releaseGatewaySessionMessageSubscription as r, isLocallyOptimisticSessionMessage as s, GatewaySessionMessageSubscriptionCoordinator as t, reconcileSessionProjectionSnapshot as u, isRecord as v, gatewayCredentialScope as w, GatewayProtocolRequestError as x, shouldPauseGatewayReconnect as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/gateway-client",
3
- "version": "2026.9.1",
3
+ "version": "2026.9.3",
4
4
  "description": "Reference WebSocket client for the OpenClaw Gateway protocol",
5
5
  "keywords": [
6
6
  "client",
@@ -62,7 +62,7 @@
62
62
  }
63
63
  },
64
64
  "dependencies": {
65
- "@openclaw/gateway-protocol": "2026.9.1",
65
+ "@openclaw/gateway-protocol": "2026.9.3",
66
66
  "ipaddr.js": "2.5.0",
67
67
  "ws": "8.21.3"
68
68
  },