@openclaw/gateway-client 2026.9.3 → 2026.9.5

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.
@@ -56,6 +56,27 @@ declare function readAssistantStreamSegmentIdentity(message: unknown): {
56
56
  itemId: string;
57
57
  runId?: string;
58
58
  } | undefined;
59
+ /** Local turns have no durable transcript metadata beyond their own optional send key. */
60
+ declare function isLocallyOptimisticSessionMessage(message: unknown): boolean;
61
+ type SessionProjectionEntry = {
62
+ message: unknown;
63
+ identity: SessionMessageIdentity | null;
64
+ afterSequence?: number | null;
65
+ live: boolean;
66
+ pending: boolean;
67
+ pendingRunId: string | null;
68
+ };
69
+ //#endregion
70
+ //#region packages/gateway-client/src/session-projection-final-identity.d.ts
71
+ type TerminalProjectionRun = {
72
+ message?: unknown;
73
+ status: string;
74
+ acceptedFinalMessageIdentities?: readonly string[];
75
+ };
76
+ /** Read stable persisted identity first, falling back to canonical display content. */
77
+ declare function readSessionProjectionFinalMessageIdentity(message: unknown): string | null;
78
+ /** Check whether a run has already accepted the same terminal reply. */
79
+ declare function hasSessionProjectionAcceptedFinal(run: TerminalProjectionRun | undefined, message: unknown): boolean;
59
80
  //#endregion
60
81
  //#region packages/gateway-client/src/session-projection-run-event.d.ts
61
82
  type SessionProjectionGatewayRunEvent = {
@@ -93,18 +114,14 @@ type SessionProjectionRun = {
93
114
  status: SessionProjectionRunStatus;
94
115
  message?: unknown;
95
116
  acceptedFinalMessageIdentities?: readonly string[];
117
+ inferredSnapshotTerminal?: {
118
+ entry: SessionProjectionEntry;
119
+ matchedIdentity: SessionMessageIdentity;
120
+ };
96
121
  stopReason?: string;
97
122
  errorKind?: string;
98
123
  errorMessage?: string;
99
124
  };
100
- type SessionProjectionEntry = {
101
- message: unknown;
102
- identity: SessionMessageIdentity | null;
103
- afterSequence?: number | null;
104
- live: boolean;
105
- pending: boolean;
106
- pendingRunId: string | null;
107
- };
108
125
  type SessionProjectionState = {
109
126
  scope: SessionProjectionScope;
110
127
  entries: readonly SessionProjectionEntry[];
@@ -151,15 +168,10 @@ type SessionProjectionEvent = ScopedSessionProjectionEvent & ({
151
168
  } | {
152
169
  type: "reconnected";
153
170
  });
154
- /** Local turns have no durable transcript metadata beyond their own optional send key. */
155
- declare function isLocallyOptimisticSessionMessage(message: unknown): boolean;
156
171
  declare function createSessionProjection(scope?: SessionProjectionScope, messages?: readonly unknown[]): SessionProjectionState;
157
- declare function projectLiveSessionMessage(state: SessionProjectionState, message: unknown, envelope?: SessionMessageEnvelope, scope?: SessionProjectionScope): SessionProjectionState;
172
+ declare function projectLiveSessionMessage(initialState: SessionProjectionState, message: unknown, envelope?: SessionMessageEnvelope, scope?: SessionProjectionScope): SessionProjectionState;
158
173
  /** Only observed live events and this client's pending turns may survive an older snapshot. */
159
174
  declare function reconcileSessionProjectionSnapshot(state: SessionProjectionState, messages: readonly unknown[], scope?: SessionProjectionScope, options?: SessionProjectionSnapshotOptions): SessionProjectionState;
160
- declare function readSessionProjectionFinalMessageIdentity(message: unknown): string | null;
161
- /** Replayed finals are recognized against this run's bounded canonical terminal history. */
162
- declare function hasSessionProjectionAcceptedFinal(run: SessionProjectionRun | undefined, message: unknown): boolean;
163
175
  /** Reduces durable events, snapshots, and transport lifecycle without client-specific policy. */
164
176
  declare function reduceSessionProjection(state: SessionProjectionState, event: SessionProjectionEvent): SessionProjectionState;
165
177
  //#endregion
@@ -197,4 +209,4 @@ declare function getGatewaySessionMessageSubscriptionCoordinator(client: Gateway
197
209
  declare function resetGatewaySessionMessageSubscriptionCoordinator(client: GatewaySessionMessageRequestClient): void;
198
210
  declare function releaseGatewaySessionMessageSubscription(subscription: GatewaySessionMessageSubscription): Promise<void>;
199
211
  //#endregion
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 };
212
+ export { readAssistantStreamSegmentIdentity as A, hasSessionProjectionAcceptedFinal as C, SessionProjectionEntry as D, SessionMessageIdentity as E, buildDeviceAuthPayload as F, buildDeviceAuthPayloadV3 as I, normalizeDeviceMetadataForAuth as L, readSessionMessageSequence as M, gatewayCredentialScope as N, isLocallyOptimisticSessionMessage as O, gatewayOriginScope as P, reduceSessionProjectionRunEvent as S, SessionMessageEnvelope as T, reconcileSessionProjectionSnapshot as _, GatewaySessionMessageSubscriptionOptions as a, SessionProjectionGatewayRunEvent as b, resetGatewaySessionMessageSubscriptionCoordinator as c, SessionProjectionRunStatus as d, SessionProjectionScope as f, projectLiveSessionMessage as g, createSessionProjection as h, GatewaySessionMessageSubscriptionCoordinatorOptions as i, readSessionMessageIdentity as j, normalizeSessionProjectionRunId as k, SessionProjectionEvent as l, SessionProjectionState as m, GatewaySessionMessageSubscription as n, getGatewaySessionMessageSubscriptionCoordinator as o, SessionProjectionSnapshotOptions as p, GatewaySessionMessageSubscriptionCoordinator as r, releaseGatewaySessionMessageSubscription as s, GatewaySessionMessageRequestClient as t, SessionProjectionRun as u, reduceSessionProjection as v, readSessionProjectionFinalMessageIdentity as w, SessionProjectionRunTransition as x, isSessionProjectionErrorMessage as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/gateway-client",
3
- "version": "2026.9.3",
3
+ "version": "2026.9.5",
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.3",
65
+ "@openclaw/gateway-protocol": "2026.9.5",
66
66
  "ipaddr.js": "2.5.0",
67
67
  "ws": "8.21.3"
68
68
  },