@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.
- package/README.md +35 -0
- package/dist/browser.d.mts +13 -4
- package/dist/browser.mjs +3 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +247 -126
- package/dist/{protocol-client-DbX7wQED.d.mts → protocol-client-DZ7F1DIs.d.mts} +14 -5
- package/dist/{readiness-uQKoJkl5.d.mts → readiness-B99dV5nY.d.mts} +44 -25
- package/dist/readiness.d.mts +1 -1
- package/dist/{session-subscriptions-DwU8T0CH.mjs → session-subscriptions-DrOaOXNR.mjs} +417 -115
- package/dist/{session-subscriptions-C3M4jnCd.d.mts → session-subscriptions-yRMtCvZZ.d.mts} +27 -15
- package/package.json +2 -2
|
@@ -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(
|
|
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,
|
|
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
|
+
"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.
|
|
65
|
+
"@openclaw/gateway-protocol": "2026.9.5",
|
|
66
66
|
"ipaddr.js": "2.5.0",
|
|
67
67
|
"ws": "8.21.3"
|
|
68
68
|
},
|