@rivetkit/engine-runner-protocol 25.7.2-rc.1 → 25.7.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/package.json +1 -1
- package/dist/index.d.ts +0 -570
- package/dist/index.js +0 -1374
package/package.json
CHANGED
package/dist/index.d.ts
DELETED
|
@@ -1,570 +0,0 @@
|
|
|
1
|
-
import * as bare from '@bare-ts/lib';
|
|
2
|
-
|
|
3
|
-
type i64 = bigint;
|
|
4
|
-
type u16 = number;
|
|
5
|
-
type u32 = number;
|
|
6
|
-
type u64 = bigint;
|
|
7
|
-
type Id = string;
|
|
8
|
-
declare function readId(bc: bare.ByteCursor): Id;
|
|
9
|
-
declare function writeId(bc: bare.ByteCursor, x: Id): void;
|
|
10
|
-
type Json = string;
|
|
11
|
-
declare function readJson(bc: bare.ByteCursor): Json;
|
|
12
|
-
declare function writeJson(bc: bare.ByteCursor, x: Json): void;
|
|
13
|
-
/**
|
|
14
|
-
* Basic types
|
|
15
|
-
*/
|
|
16
|
-
type KvKey = ArrayBuffer;
|
|
17
|
-
declare function readKvKey(bc: bare.ByteCursor): KvKey;
|
|
18
|
-
declare function writeKvKey(bc: bare.ByteCursor, x: KvKey): void;
|
|
19
|
-
type KvValue = ArrayBuffer;
|
|
20
|
-
declare function readKvValue(bc: bare.ByteCursor): KvValue;
|
|
21
|
-
declare function writeKvValue(bc: bare.ByteCursor, x: KvValue): void;
|
|
22
|
-
type KvMetadata = {
|
|
23
|
-
readonly version: ArrayBuffer;
|
|
24
|
-
readonly createTs: i64;
|
|
25
|
-
};
|
|
26
|
-
declare function readKvMetadata(bc: bare.ByteCursor): KvMetadata;
|
|
27
|
-
declare function writeKvMetadata(bc: bare.ByteCursor, x: KvMetadata): void;
|
|
28
|
-
/**
|
|
29
|
-
* Query types
|
|
30
|
-
*/
|
|
31
|
-
type KvListAllQuery = null;
|
|
32
|
-
type KvListRangeQuery = {
|
|
33
|
-
readonly start: KvKey;
|
|
34
|
-
readonly end: KvKey;
|
|
35
|
-
readonly exclusive: boolean;
|
|
36
|
-
};
|
|
37
|
-
declare function readKvListRangeQuery(bc: bare.ByteCursor): KvListRangeQuery;
|
|
38
|
-
declare function writeKvListRangeQuery(bc: bare.ByteCursor, x: KvListRangeQuery): void;
|
|
39
|
-
type KvListPrefixQuery = {
|
|
40
|
-
readonly key: KvKey;
|
|
41
|
-
};
|
|
42
|
-
declare function readKvListPrefixQuery(bc: bare.ByteCursor): KvListPrefixQuery;
|
|
43
|
-
declare function writeKvListPrefixQuery(bc: bare.ByteCursor, x: KvListPrefixQuery): void;
|
|
44
|
-
type KvListQuery = {
|
|
45
|
-
readonly tag: "KvListAllQuery";
|
|
46
|
-
readonly val: KvListAllQuery;
|
|
47
|
-
} | {
|
|
48
|
-
readonly tag: "KvListRangeQuery";
|
|
49
|
-
readonly val: KvListRangeQuery;
|
|
50
|
-
} | {
|
|
51
|
-
readonly tag: "KvListPrefixQuery";
|
|
52
|
-
readonly val: KvListPrefixQuery;
|
|
53
|
-
};
|
|
54
|
-
declare function readKvListQuery(bc: bare.ByteCursor): KvListQuery;
|
|
55
|
-
declare function writeKvListQuery(bc: bare.ByteCursor, x: KvListQuery): void;
|
|
56
|
-
/**
|
|
57
|
-
* Request types
|
|
58
|
-
*/
|
|
59
|
-
type KvGetRequest = {
|
|
60
|
-
readonly keys: readonly KvKey[];
|
|
61
|
-
};
|
|
62
|
-
declare function readKvGetRequest(bc: bare.ByteCursor): KvGetRequest;
|
|
63
|
-
declare function writeKvGetRequest(bc: bare.ByteCursor, x: KvGetRequest): void;
|
|
64
|
-
type KvListRequest = {
|
|
65
|
-
readonly query: KvListQuery;
|
|
66
|
-
readonly reverse: boolean | null;
|
|
67
|
-
readonly limit: u64 | null;
|
|
68
|
-
};
|
|
69
|
-
declare function readKvListRequest(bc: bare.ByteCursor): KvListRequest;
|
|
70
|
-
declare function writeKvListRequest(bc: bare.ByteCursor, x: KvListRequest): void;
|
|
71
|
-
type KvPutRequest = {
|
|
72
|
-
readonly keys: readonly KvKey[];
|
|
73
|
-
readonly values: readonly KvValue[];
|
|
74
|
-
};
|
|
75
|
-
declare function readKvPutRequest(bc: bare.ByteCursor): KvPutRequest;
|
|
76
|
-
declare function writeKvPutRequest(bc: bare.ByteCursor, x: KvPutRequest): void;
|
|
77
|
-
type KvDeleteRequest = {
|
|
78
|
-
readonly keys: readonly KvKey[];
|
|
79
|
-
};
|
|
80
|
-
declare function readKvDeleteRequest(bc: bare.ByteCursor): KvDeleteRequest;
|
|
81
|
-
declare function writeKvDeleteRequest(bc: bare.ByteCursor, x: KvDeleteRequest): void;
|
|
82
|
-
type KvDropRequest = null;
|
|
83
|
-
/**
|
|
84
|
-
* Response types
|
|
85
|
-
*/
|
|
86
|
-
type KvErrorResponse = {
|
|
87
|
-
readonly message: string;
|
|
88
|
-
};
|
|
89
|
-
declare function readKvErrorResponse(bc: bare.ByteCursor): KvErrorResponse;
|
|
90
|
-
declare function writeKvErrorResponse(bc: bare.ByteCursor, x: KvErrorResponse): void;
|
|
91
|
-
type KvGetResponse = {
|
|
92
|
-
readonly keys: readonly KvKey[];
|
|
93
|
-
readonly values: readonly KvValue[];
|
|
94
|
-
readonly metadata: readonly KvMetadata[];
|
|
95
|
-
};
|
|
96
|
-
declare function readKvGetResponse(bc: bare.ByteCursor): KvGetResponse;
|
|
97
|
-
declare function writeKvGetResponse(bc: bare.ByteCursor, x: KvGetResponse): void;
|
|
98
|
-
type KvListResponse = {
|
|
99
|
-
readonly keys: readonly KvKey[];
|
|
100
|
-
readonly values: readonly KvValue[];
|
|
101
|
-
readonly metadata: readonly KvMetadata[];
|
|
102
|
-
};
|
|
103
|
-
declare function readKvListResponse(bc: bare.ByteCursor): KvListResponse;
|
|
104
|
-
declare function writeKvListResponse(bc: bare.ByteCursor, x: KvListResponse): void;
|
|
105
|
-
type KvPutResponse = null;
|
|
106
|
-
type KvDeleteResponse = null;
|
|
107
|
-
type KvDropResponse = null;
|
|
108
|
-
/**
|
|
109
|
-
* Request/Response unions
|
|
110
|
-
*/
|
|
111
|
-
type KvRequestData = {
|
|
112
|
-
readonly tag: "KvGetRequest";
|
|
113
|
-
readonly val: KvGetRequest;
|
|
114
|
-
} | {
|
|
115
|
-
readonly tag: "KvListRequest";
|
|
116
|
-
readonly val: KvListRequest;
|
|
117
|
-
} | {
|
|
118
|
-
readonly tag: "KvPutRequest";
|
|
119
|
-
readonly val: KvPutRequest;
|
|
120
|
-
} | {
|
|
121
|
-
readonly tag: "KvDeleteRequest";
|
|
122
|
-
readonly val: KvDeleteRequest;
|
|
123
|
-
} | {
|
|
124
|
-
readonly tag: "KvDropRequest";
|
|
125
|
-
readonly val: KvDropRequest;
|
|
126
|
-
};
|
|
127
|
-
declare function readKvRequestData(bc: bare.ByteCursor): KvRequestData;
|
|
128
|
-
declare function writeKvRequestData(bc: bare.ByteCursor, x: KvRequestData): void;
|
|
129
|
-
type KvResponseData = {
|
|
130
|
-
readonly tag: "KvErrorResponse";
|
|
131
|
-
readonly val: KvErrorResponse;
|
|
132
|
-
} | {
|
|
133
|
-
readonly tag: "KvGetResponse";
|
|
134
|
-
readonly val: KvGetResponse;
|
|
135
|
-
} | {
|
|
136
|
-
readonly tag: "KvListResponse";
|
|
137
|
-
readonly val: KvListResponse;
|
|
138
|
-
} | {
|
|
139
|
-
readonly tag: "KvPutResponse";
|
|
140
|
-
readonly val: KvPutResponse;
|
|
141
|
-
} | {
|
|
142
|
-
readonly tag: "KvDeleteResponse";
|
|
143
|
-
readonly val: KvDeleteResponse;
|
|
144
|
-
} | {
|
|
145
|
-
readonly tag: "KvDropResponse";
|
|
146
|
-
readonly val: KvDropResponse;
|
|
147
|
-
};
|
|
148
|
-
declare function readKvResponseData(bc: bare.ByteCursor): KvResponseData;
|
|
149
|
-
declare function writeKvResponseData(bc: bare.ByteCursor, x: KvResponseData): void;
|
|
150
|
-
/**
|
|
151
|
-
* Core
|
|
152
|
-
*/
|
|
153
|
-
declare enum StopCode {
|
|
154
|
-
Ok = "Ok",
|
|
155
|
-
Error = "Error"
|
|
156
|
-
}
|
|
157
|
-
declare function readStopCode(bc: bare.ByteCursor): StopCode;
|
|
158
|
-
declare function writeStopCode(bc: bare.ByteCursor, x: StopCode): void;
|
|
159
|
-
type ActorName = {
|
|
160
|
-
readonly metadata: Json;
|
|
161
|
-
};
|
|
162
|
-
declare function readActorName(bc: bare.ByteCursor): ActorName;
|
|
163
|
-
declare function writeActorName(bc: bare.ByteCursor, x: ActorName): void;
|
|
164
|
-
type ActorConfig = {
|
|
165
|
-
readonly name: string;
|
|
166
|
-
readonly key: string | null;
|
|
167
|
-
readonly createTs: i64;
|
|
168
|
-
readonly input: ArrayBuffer | null;
|
|
169
|
-
};
|
|
170
|
-
declare function readActorConfig(bc: bare.ByteCursor): ActorConfig;
|
|
171
|
-
declare function writeActorConfig(bc: bare.ByteCursor, x: ActorConfig): void;
|
|
172
|
-
/**
|
|
173
|
-
* Intent
|
|
174
|
-
*/
|
|
175
|
-
type ActorIntentSleep = null;
|
|
176
|
-
type ActorIntentStop = null;
|
|
177
|
-
type ActorIntent = {
|
|
178
|
-
readonly tag: "ActorIntentSleep";
|
|
179
|
-
readonly val: ActorIntentSleep;
|
|
180
|
-
} | {
|
|
181
|
-
readonly tag: "ActorIntentStop";
|
|
182
|
-
readonly val: ActorIntentStop;
|
|
183
|
-
};
|
|
184
|
-
declare function readActorIntent(bc: bare.ByteCursor): ActorIntent;
|
|
185
|
-
declare function writeActorIntent(bc: bare.ByteCursor, x: ActorIntent): void;
|
|
186
|
-
/**
|
|
187
|
-
* State
|
|
188
|
-
*/
|
|
189
|
-
type ActorStateRunning = null;
|
|
190
|
-
type ActorStateStopped = {
|
|
191
|
-
readonly code: StopCode;
|
|
192
|
-
readonly message: string | null;
|
|
193
|
-
};
|
|
194
|
-
declare function readActorStateStopped(bc: bare.ByteCursor): ActorStateStopped;
|
|
195
|
-
declare function writeActorStateStopped(bc: bare.ByteCursor, x: ActorStateStopped): void;
|
|
196
|
-
type ActorState = {
|
|
197
|
-
readonly tag: "ActorStateRunning";
|
|
198
|
-
readonly val: ActorStateRunning;
|
|
199
|
-
} | {
|
|
200
|
-
readonly tag: "ActorStateStopped";
|
|
201
|
-
readonly val: ActorStateStopped;
|
|
202
|
-
};
|
|
203
|
-
declare function readActorState(bc: bare.ByteCursor): ActorState;
|
|
204
|
-
declare function writeActorState(bc: bare.ByteCursor, x: ActorState): void;
|
|
205
|
-
/**
|
|
206
|
-
* MARK: Events
|
|
207
|
-
*/
|
|
208
|
-
type EventActorIntent = {
|
|
209
|
-
readonly actorId: Id;
|
|
210
|
-
readonly generation: u32;
|
|
211
|
-
readonly intent: ActorIntent;
|
|
212
|
-
};
|
|
213
|
-
declare function readEventActorIntent(bc: bare.ByteCursor): EventActorIntent;
|
|
214
|
-
declare function writeEventActorIntent(bc: bare.ByteCursor, x: EventActorIntent): void;
|
|
215
|
-
type EventActorStateUpdate = {
|
|
216
|
-
readonly actorId: Id;
|
|
217
|
-
readonly generation: u32;
|
|
218
|
-
readonly state: ActorState;
|
|
219
|
-
};
|
|
220
|
-
declare function readEventActorStateUpdate(bc: bare.ByteCursor): EventActorStateUpdate;
|
|
221
|
-
declare function writeEventActorStateUpdate(bc: bare.ByteCursor, x: EventActorStateUpdate): void;
|
|
222
|
-
type EventActorSetAlarm = {
|
|
223
|
-
readonly actorId: Id;
|
|
224
|
-
readonly generation: u32;
|
|
225
|
-
readonly alarmTs: i64 | null;
|
|
226
|
-
};
|
|
227
|
-
declare function readEventActorSetAlarm(bc: bare.ByteCursor): EventActorSetAlarm;
|
|
228
|
-
declare function writeEventActorSetAlarm(bc: bare.ByteCursor, x: EventActorSetAlarm): void;
|
|
229
|
-
type Event = {
|
|
230
|
-
readonly tag: "EventActorIntent";
|
|
231
|
-
readonly val: EventActorIntent;
|
|
232
|
-
} | {
|
|
233
|
-
readonly tag: "EventActorStateUpdate";
|
|
234
|
-
readonly val: EventActorStateUpdate;
|
|
235
|
-
} | {
|
|
236
|
-
readonly tag: "EventActorSetAlarm";
|
|
237
|
-
readonly val: EventActorSetAlarm;
|
|
238
|
-
};
|
|
239
|
-
declare function readEvent(bc: bare.ByteCursor): Event;
|
|
240
|
-
declare function writeEvent(bc: bare.ByteCursor, x: Event): void;
|
|
241
|
-
type EventWrapper = {
|
|
242
|
-
readonly index: i64;
|
|
243
|
-
readonly inner: Event;
|
|
244
|
-
};
|
|
245
|
-
declare function readEventWrapper(bc: bare.ByteCursor): EventWrapper;
|
|
246
|
-
declare function writeEventWrapper(bc: bare.ByteCursor, x: EventWrapper): void;
|
|
247
|
-
type CommandStartActor = {
|
|
248
|
-
readonly actorId: Id;
|
|
249
|
-
readonly generation: u32;
|
|
250
|
-
readonly config: ActorConfig;
|
|
251
|
-
};
|
|
252
|
-
declare function readCommandStartActor(bc: bare.ByteCursor): CommandStartActor;
|
|
253
|
-
declare function writeCommandStartActor(bc: bare.ByteCursor, x: CommandStartActor): void;
|
|
254
|
-
type CommandStopActor = {
|
|
255
|
-
readonly actorId: Id;
|
|
256
|
-
readonly generation: u32;
|
|
257
|
-
};
|
|
258
|
-
declare function readCommandStopActor(bc: bare.ByteCursor): CommandStopActor;
|
|
259
|
-
declare function writeCommandStopActor(bc: bare.ByteCursor, x: CommandStopActor): void;
|
|
260
|
-
type Command = {
|
|
261
|
-
readonly tag: "CommandStartActor";
|
|
262
|
-
readonly val: CommandStartActor;
|
|
263
|
-
} | {
|
|
264
|
-
readonly tag: "CommandStopActor";
|
|
265
|
-
readonly val: CommandStopActor;
|
|
266
|
-
};
|
|
267
|
-
declare function readCommand(bc: bare.ByteCursor): Command;
|
|
268
|
-
declare function writeCommand(bc: bare.ByteCursor, x: Command): void;
|
|
269
|
-
type CommandWrapper = {
|
|
270
|
-
readonly index: i64;
|
|
271
|
-
readonly inner: Command;
|
|
272
|
-
};
|
|
273
|
-
declare function readCommandWrapper(bc: bare.ByteCursor): CommandWrapper;
|
|
274
|
-
declare function writeCommandWrapper(bc: bare.ByteCursor, x: CommandWrapper): void;
|
|
275
|
-
type RequestId = ArrayBuffer;
|
|
276
|
-
declare function readRequestId(bc: bare.ByteCursor): RequestId;
|
|
277
|
-
declare function writeRequestId(bc: bare.ByteCursor, x: RequestId): void;
|
|
278
|
-
/**
|
|
279
|
-
* UUIDv4
|
|
280
|
-
*/
|
|
281
|
-
type MessageId = ArrayBuffer;
|
|
282
|
-
declare function readMessageId(bc: bare.ByteCursor): MessageId;
|
|
283
|
-
declare function writeMessageId(bc: bare.ByteCursor, x: MessageId): void;
|
|
284
|
-
/**
|
|
285
|
-
* Ack
|
|
286
|
-
*/
|
|
287
|
-
type TunnelAck = null;
|
|
288
|
-
/**
|
|
289
|
-
* HTTP
|
|
290
|
-
*/
|
|
291
|
-
type ToClientRequestStart = {
|
|
292
|
-
readonly actorId: Id;
|
|
293
|
-
readonly method: string;
|
|
294
|
-
readonly path: string;
|
|
295
|
-
readonly headers: ReadonlyMap<string, string>;
|
|
296
|
-
readonly body: ArrayBuffer | null;
|
|
297
|
-
readonly stream: boolean;
|
|
298
|
-
};
|
|
299
|
-
declare function readToClientRequestStart(bc: bare.ByteCursor): ToClientRequestStart;
|
|
300
|
-
declare function writeToClientRequestStart(bc: bare.ByteCursor, x: ToClientRequestStart): void;
|
|
301
|
-
type ToClientRequestChunk = {
|
|
302
|
-
readonly body: ArrayBuffer;
|
|
303
|
-
readonly finish: boolean;
|
|
304
|
-
};
|
|
305
|
-
declare function readToClientRequestChunk(bc: bare.ByteCursor): ToClientRequestChunk;
|
|
306
|
-
declare function writeToClientRequestChunk(bc: bare.ByteCursor, x: ToClientRequestChunk): void;
|
|
307
|
-
type ToClientRequestAbort = null;
|
|
308
|
-
type ToServerResponseStart = {
|
|
309
|
-
readonly status: u16;
|
|
310
|
-
readonly headers: ReadonlyMap<string, string>;
|
|
311
|
-
readonly body: ArrayBuffer | null;
|
|
312
|
-
readonly stream: boolean;
|
|
313
|
-
};
|
|
314
|
-
declare function readToServerResponseStart(bc: bare.ByteCursor): ToServerResponseStart;
|
|
315
|
-
declare function writeToServerResponseStart(bc: bare.ByteCursor, x: ToServerResponseStart): void;
|
|
316
|
-
type ToServerResponseChunk = {
|
|
317
|
-
readonly body: ArrayBuffer;
|
|
318
|
-
readonly finish: boolean;
|
|
319
|
-
};
|
|
320
|
-
declare function readToServerResponseChunk(bc: bare.ByteCursor): ToServerResponseChunk;
|
|
321
|
-
declare function writeToServerResponseChunk(bc: bare.ByteCursor, x: ToServerResponseChunk): void;
|
|
322
|
-
type ToServerResponseAbort = null;
|
|
323
|
-
/**
|
|
324
|
-
* WebSocket
|
|
325
|
-
*/
|
|
326
|
-
type ToClientWebSocketOpen = {
|
|
327
|
-
readonly actorId: Id;
|
|
328
|
-
readonly path: string;
|
|
329
|
-
readonly headers: ReadonlyMap<string, string>;
|
|
330
|
-
};
|
|
331
|
-
declare function readToClientWebSocketOpen(bc: bare.ByteCursor): ToClientWebSocketOpen;
|
|
332
|
-
declare function writeToClientWebSocketOpen(bc: bare.ByteCursor, x: ToClientWebSocketOpen): void;
|
|
333
|
-
type ToClientWebSocketMessage = {
|
|
334
|
-
readonly data: ArrayBuffer;
|
|
335
|
-
readonly binary: boolean;
|
|
336
|
-
};
|
|
337
|
-
declare function readToClientWebSocketMessage(bc: bare.ByteCursor): ToClientWebSocketMessage;
|
|
338
|
-
declare function writeToClientWebSocketMessage(bc: bare.ByteCursor, x: ToClientWebSocketMessage): void;
|
|
339
|
-
type ToClientWebSocketClose = {
|
|
340
|
-
readonly code: u16 | null;
|
|
341
|
-
readonly reason: string | null;
|
|
342
|
-
};
|
|
343
|
-
declare function readToClientWebSocketClose(bc: bare.ByteCursor): ToClientWebSocketClose;
|
|
344
|
-
declare function writeToClientWebSocketClose(bc: bare.ByteCursor, x: ToClientWebSocketClose): void;
|
|
345
|
-
type ToServerWebSocketOpen = null;
|
|
346
|
-
type ToServerWebSocketMessage = {
|
|
347
|
-
readonly data: ArrayBuffer;
|
|
348
|
-
readonly binary: boolean;
|
|
349
|
-
};
|
|
350
|
-
declare function readToServerWebSocketMessage(bc: bare.ByteCursor): ToServerWebSocketMessage;
|
|
351
|
-
declare function writeToServerWebSocketMessage(bc: bare.ByteCursor, x: ToServerWebSocketMessage): void;
|
|
352
|
-
type ToServerWebSocketClose = {
|
|
353
|
-
readonly code: u16 | null;
|
|
354
|
-
readonly reason: string | null;
|
|
355
|
-
};
|
|
356
|
-
declare function readToServerWebSocketClose(bc: bare.ByteCursor): ToServerWebSocketClose;
|
|
357
|
-
declare function writeToServerWebSocketClose(bc: bare.ByteCursor, x: ToServerWebSocketClose): void;
|
|
358
|
-
/**
|
|
359
|
-
* To Server
|
|
360
|
-
*/
|
|
361
|
-
type ToServerTunnelMessageKind = {
|
|
362
|
-
readonly tag: "TunnelAck";
|
|
363
|
-
readonly val: TunnelAck;
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* HTTP
|
|
367
|
-
*/
|
|
368
|
-
| {
|
|
369
|
-
readonly tag: "ToServerResponseStart";
|
|
370
|
-
readonly val: ToServerResponseStart;
|
|
371
|
-
} | {
|
|
372
|
-
readonly tag: "ToServerResponseChunk";
|
|
373
|
-
readonly val: ToServerResponseChunk;
|
|
374
|
-
} | {
|
|
375
|
-
readonly tag: "ToServerResponseAbort";
|
|
376
|
-
readonly val: ToServerResponseAbort;
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* WebSocket
|
|
380
|
-
*/
|
|
381
|
-
| {
|
|
382
|
-
readonly tag: "ToServerWebSocketOpen";
|
|
383
|
-
readonly val: ToServerWebSocketOpen;
|
|
384
|
-
} | {
|
|
385
|
-
readonly tag: "ToServerWebSocketMessage";
|
|
386
|
-
readonly val: ToServerWebSocketMessage;
|
|
387
|
-
} | {
|
|
388
|
-
readonly tag: "ToServerWebSocketClose";
|
|
389
|
-
readonly val: ToServerWebSocketClose;
|
|
390
|
-
};
|
|
391
|
-
declare function readToServerTunnelMessageKind(bc: bare.ByteCursor): ToServerTunnelMessageKind;
|
|
392
|
-
declare function writeToServerTunnelMessageKind(bc: bare.ByteCursor, x: ToServerTunnelMessageKind): void;
|
|
393
|
-
type ToServerTunnelMessage = {
|
|
394
|
-
readonly requestId: RequestId;
|
|
395
|
-
readonly messageId: MessageId;
|
|
396
|
-
readonly messageKind: ToServerTunnelMessageKind;
|
|
397
|
-
};
|
|
398
|
-
declare function readToServerTunnelMessage(bc: bare.ByteCursor): ToServerTunnelMessage;
|
|
399
|
-
declare function writeToServerTunnelMessage(bc: bare.ByteCursor, x: ToServerTunnelMessage): void;
|
|
400
|
-
/**
|
|
401
|
-
* To Client
|
|
402
|
-
*/
|
|
403
|
-
type ToClientTunnelMessageKind = {
|
|
404
|
-
readonly tag: "TunnelAck";
|
|
405
|
-
readonly val: TunnelAck;
|
|
406
|
-
}
|
|
407
|
-
/**
|
|
408
|
-
* HTTP
|
|
409
|
-
*/
|
|
410
|
-
| {
|
|
411
|
-
readonly tag: "ToClientRequestStart";
|
|
412
|
-
readonly val: ToClientRequestStart;
|
|
413
|
-
} | {
|
|
414
|
-
readonly tag: "ToClientRequestChunk";
|
|
415
|
-
readonly val: ToClientRequestChunk;
|
|
416
|
-
} | {
|
|
417
|
-
readonly tag: "ToClientRequestAbort";
|
|
418
|
-
readonly val: ToClientRequestAbort;
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* WebSocket
|
|
422
|
-
*/
|
|
423
|
-
| {
|
|
424
|
-
readonly tag: "ToClientWebSocketOpen";
|
|
425
|
-
readonly val: ToClientWebSocketOpen;
|
|
426
|
-
} | {
|
|
427
|
-
readonly tag: "ToClientWebSocketMessage";
|
|
428
|
-
readonly val: ToClientWebSocketMessage;
|
|
429
|
-
} | {
|
|
430
|
-
readonly tag: "ToClientWebSocketClose";
|
|
431
|
-
readonly val: ToClientWebSocketClose;
|
|
432
|
-
};
|
|
433
|
-
declare function readToClientTunnelMessageKind(bc: bare.ByteCursor): ToClientTunnelMessageKind;
|
|
434
|
-
declare function writeToClientTunnelMessageKind(bc: bare.ByteCursor, x: ToClientTunnelMessageKind): void;
|
|
435
|
-
type ToClientTunnelMessage = {
|
|
436
|
-
readonly requestId: RequestId;
|
|
437
|
-
readonly messageId: MessageId;
|
|
438
|
-
readonly messageKind: ToClientTunnelMessageKind;
|
|
439
|
-
/**
|
|
440
|
-
* Should be stripped before sending to the runner.
|
|
441
|
-
*/
|
|
442
|
-
readonly gatewayReplyTo: string | null;
|
|
443
|
-
};
|
|
444
|
-
declare function readToClientTunnelMessage(bc: bare.ByteCursor): ToClientTunnelMessage;
|
|
445
|
-
declare function writeToClientTunnelMessage(bc: bare.ByteCursor, x: ToClientTunnelMessage): void;
|
|
446
|
-
/**
|
|
447
|
-
* MARK: To Server
|
|
448
|
-
*/
|
|
449
|
-
type ToServerInit = {
|
|
450
|
-
readonly name: string;
|
|
451
|
-
readonly version: u32;
|
|
452
|
-
readonly totalSlots: u32;
|
|
453
|
-
readonly lastCommandIdx: i64 | null;
|
|
454
|
-
readonly prepopulateActorNames: ReadonlyMap<string, ActorName> | null;
|
|
455
|
-
readonly metadata: Json | null;
|
|
456
|
-
};
|
|
457
|
-
declare function readToServerInit(bc: bare.ByteCursor): ToServerInit;
|
|
458
|
-
declare function writeToServerInit(bc: bare.ByteCursor, x: ToServerInit): void;
|
|
459
|
-
type ToServerEvents = readonly EventWrapper[];
|
|
460
|
-
declare function readToServerEvents(bc: bare.ByteCursor): ToServerEvents;
|
|
461
|
-
declare function writeToServerEvents(bc: bare.ByteCursor, x: ToServerEvents): void;
|
|
462
|
-
type ToServerAckCommands = {
|
|
463
|
-
readonly lastCommandIdx: i64;
|
|
464
|
-
};
|
|
465
|
-
declare function readToServerAckCommands(bc: bare.ByteCursor): ToServerAckCommands;
|
|
466
|
-
declare function writeToServerAckCommands(bc: bare.ByteCursor, x: ToServerAckCommands): void;
|
|
467
|
-
type ToServerStopping = null;
|
|
468
|
-
type ToServerPing = {
|
|
469
|
-
readonly ts: i64;
|
|
470
|
-
};
|
|
471
|
-
declare function readToServerPing(bc: bare.ByteCursor): ToServerPing;
|
|
472
|
-
declare function writeToServerPing(bc: bare.ByteCursor, x: ToServerPing): void;
|
|
473
|
-
type ToServerKvRequest = {
|
|
474
|
-
readonly actorId: Id;
|
|
475
|
-
readonly requestId: u32;
|
|
476
|
-
readonly data: KvRequestData;
|
|
477
|
-
};
|
|
478
|
-
declare function readToServerKvRequest(bc: bare.ByteCursor): ToServerKvRequest;
|
|
479
|
-
declare function writeToServerKvRequest(bc: bare.ByteCursor, x: ToServerKvRequest): void;
|
|
480
|
-
type ToServer = {
|
|
481
|
-
readonly tag: "ToServerInit";
|
|
482
|
-
readonly val: ToServerInit;
|
|
483
|
-
} | {
|
|
484
|
-
readonly tag: "ToServerEvents";
|
|
485
|
-
readonly val: ToServerEvents;
|
|
486
|
-
} | {
|
|
487
|
-
readonly tag: "ToServerAckCommands";
|
|
488
|
-
readonly val: ToServerAckCommands;
|
|
489
|
-
} | {
|
|
490
|
-
readonly tag: "ToServerStopping";
|
|
491
|
-
readonly val: ToServerStopping;
|
|
492
|
-
} | {
|
|
493
|
-
readonly tag: "ToServerPing";
|
|
494
|
-
readonly val: ToServerPing;
|
|
495
|
-
} | {
|
|
496
|
-
readonly tag: "ToServerKvRequest";
|
|
497
|
-
readonly val: ToServerKvRequest;
|
|
498
|
-
} | {
|
|
499
|
-
readonly tag: "ToServerTunnelMessage";
|
|
500
|
-
readonly val: ToServerTunnelMessage;
|
|
501
|
-
};
|
|
502
|
-
declare function readToServer(bc: bare.ByteCursor): ToServer;
|
|
503
|
-
declare function writeToServer(bc: bare.ByteCursor, x: ToServer): void;
|
|
504
|
-
declare function encodeToServer(x: ToServer, config?: Partial<bare.Config>): Uint8Array;
|
|
505
|
-
declare function decodeToServer(bytes: Uint8Array): ToServer;
|
|
506
|
-
/**
|
|
507
|
-
* MARK: To Client
|
|
508
|
-
*/
|
|
509
|
-
type ProtocolMetadata = {
|
|
510
|
-
readonly runnerLostThreshold: i64;
|
|
511
|
-
};
|
|
512
|
-
declare function readProtocolMetadata(bc: bare.ByteCursor): ProtocolMetadata;
|
|
513
|
-
declare function writeProtocolMetadata(bc: bare.ByteCursor, x: ProtocolMetadata): void;
|
|
514
|
-
type ToClientInit = {
|
|
515
|
-
readonly runnerId: Id;
|
|
516
|
-
readonly lastEventIdx: i64;
|
|
517
|
-
readonly metadata: ProtocolMetadata;
|
|
518
|
-
};
|
|
519
|
-
declare function readToClientInit(bc: bare.ByteCursor): ToClientInit;
|
|
520
|
-
declare function writeToClientInit(bc: bare.ByteCursor, x: ToClientInit): void;
|
|
521
|
-
type ToClientCommands = readonly CommandWrapper[];
|
|
522
|
-
declare function readToClientCommands(bc: bare.ByteCursor): ToClientCommands;
|
|
523
|
-
declare function writeToClientCommands(bc: bare.ByteCursor, x: ToClientCommands): void;
|
|
524
|
-
type ToClientAckEvents = {
|
|
525
|
-
readonly lastEventIdx: i64;
|
|
526
|
-
};
|
|
527
|
-
declare function readToClientAckEvents(bc: bare.ByteCursor): ToClientAckEvents;
|
|
528
|
-
declare function writeToClientAckEvents(bc: bare.ByteCursor, x: ToClientAckEvents): void;
|
|
529
|
-
type ToClientKvResponse = {
|
|
530
|
-
readonly requestId: u32;
|
|
531
|
-
readonly data: KvResponseData;
|
|
532
|
-
};
|
|
533
|
-
declare function readToClientKvResponse(bc: bare.ByteCursor): ToClientKvResponse;
|
|
534
|
-
declare function writeToClientKvResponse(bc: bare.ByteCursor, x: ToClientKvResponse): void;
|
|
535
|
-
type ToClientClose = null;
|
|
536
|
-
type ToClient = {
|
|
537
|
-
readonly tag: "ToClientInit";
|
|
538
|
-
readonly val: ToClientInit;
|
|
539
|
-
} | {
|
|
540
|
-
readonly tag: "ToClientClose";
|
|
541
|
-
readonly val: ToClientClose;
|
|
542
|
-
} | {
|
|
543
|
-
readonly tag: "ToClientCommands";
|
|
544
|
-
readonly val: ToClientCommands;
|
|
545
|
-
} | {
|
|
546
|
-
readonly tag: "ToClientAckEvents";
|
|
547
|
-
readonly val: ToClientAckEvents;
|
|
548
|
-
} | {
|
|
549
|
-
readonly tag: "ToClientKvResponse";
|
|
550
|
-
readonly val: ToClientKvResponse;
|
|
551
|
-
} | {
|
|
552
|
-
readonly tag: "ToClientTunnelMessage";
|
|
553
|
-
readonly val: ToClientTunnelMessage;
|
|
554
|
-
};
|
|
555
|
-
declare function readToClient(bc: bare.ByteCursor): ToClient;
|
|
556
|
-
declare function writeToClient(bc: bare.ByteCursor, x: ToClient): void;
|
|
557
|
-
declare function encodeToClient(x: ToClient, config?: Partial<bare.Config>): Uint8Array;
|
|
558
|
-
declare function decodeToClient(bytes: Uint8Array): ToClient;
|
|
559
|
-
/**
|
|
560
|
-
* MARK: To Gateway
|
|
561
|
-
*/
|
|
562
|
-
type ToGateway = {
|
|
563
|
-
readonly message: ToServerTunnelMessage;
|
|
564
|
-
};
|
|
565
|
-
declare function readToGateway(bc: bare.ByteCursor): ToGateway;
|
|
566
|
-
declare function writeToGateway(bc: bare.ByteCursor, x: ToGateway): void;
|
|
567
|
-
declare function encodeToGateway(x: ToGateway, config?: Partial<bare.Config>): Uint8Array;
|
|
568
|
-
declare function decodeToGateway(bytes: Uint8Array): ToGateway;
|
|
569
|
-
|
|
570
|
-
export { type ActorConfig, type ActorIntent, type ActorIntentSleep, type ActorIntentStop, type ActorName, type ActorState, type ActorStateRunning, type ActorStateStopped, type Command, type CommandStartActor, type CommandStopActor, type CommandWrapper, type Event, type EventActorIntent, type EventActorSetAlarm, type EventActorStateUpdate, type EventWrapper, type Id, type Json, type KvDeleteRequest, type KvDeleteResponse, type KvDropRequest, type KvDropResponse, type KvErrorResponse, type KvGetRequest, type KvGetResponse, type KvKey, type KvListAllQuery, type KvListPrefixQuery, type KvListQuery, type KvListRangeQuery, type KvListRequest, type KvListResponse, type KvMetadata, type KvPutRequest, type KvPutResponse, type KvRequestData, type KvResponseData, type KvValue, type MessageId, type ProtocolMetadata, type RequestId, StopCode, type ToClient, type ToClientAckEvents, type ToClientClose, type ToClientCommands, type ToClientInit, type ToClientKvResponse, type ToClientRequestAbort, type ToClientRequestChunk, type ToClientRequestStart, type ToClientTunnelMessage, type ToClientTunnelMessageKind, type ToClientWebSocketClose, type ToClientWebSocketMessage, type ToClientWebSocketOpen, type ToGateway, type ToServer, type ToServerAckCommands, type ToServerEvents, type ToServerInit, type ToServerKvRequest, type ToServerPing, type ToServerResponseAbort, type ToServerResponseChunk, type ToServerResponseStart, type ToServerStopping, type ToServerTunnelMessage, type ToServerTunnelMessageKind, type ToServerWebSocketClose, type ToServerWebSocketMessage, type ToServerWebSocketOpen, type TunnelAck, decodeToClient, decodeToGateway, decodeToServer, encodeToClient, encodeToGateway, encodeToServer, type i64, readActorConfig, readActorIntent, readActorName, readActorState, readActorStateStopped, readCommand, readCommandStartActor, readCommandStopActor, readCommandWrapper, readEvent, readEventActorIntent, readEventActorSetAlarm, readEventActorStateUpdate, readEventWrapper, readId, readJson, readKvDeleteRequest, readKvErrorResponse, readKvGetRequest, readKvGetResponse, readKvKey, readKvListPrefixQuery, readKvListQuery, readKvListRangeQuery, readKvListRequest, readKvListResponse, readKvMetadata, readKvPutRequest, readKvRequestData, readKvResponseData, readKvValue, readMessageId, readProtocolMetadata, readRequestId, readStopCode, readToClient, readToClientAckEvents, readToClientCommands, readToClientInit, readToClientKvResponse, readToClientRequestChunk, readToClientRequestStart, readToClientTunnelMessage, readToClientTunnelMessageKind, readToClientWebSocketClose, readToClientWebSocketMessage, readToClientWebSocketOpen, readToGateway, readToServer, readToServerAckCommands, readToServerEvents, readToServerInit, readToServerKvRequest, readToServerPing, readToServerResponseChunk, readToServerResponseStart, readToServerTunnelMessage, readToServerTunnelMessageKind, readToServerWebSocketClose, readToServerWebSocketMessage, type u16, type u32, type u64, writeActorConfig, writeActorIntent, writeActorName, writeActorState, writeActorStateStopped, writeCommand, writeCommandStartActor, writeCommandStopActor, writeCommandWrapper, writeEvent, writeEventActorIntent, writeEventActorSetAlarm, writeEventActorStateUpdate, writeEventWrapper, writeId, writeJson, writeKvDeleteRequest, writeKvErrorResponse, writeKvGetRequest, writeKvGetResponse, writeKvKey, writeKvListPrefixQuery, writeKvListQuery, writeKvListRangeQuery, writeKvListRequest, writeKvListResponse, writeKvMetadata, writeKvPutRequest, writeKvRequestData, writeKvResponseData, writeKvValue, writeMessageId, writeProtocolMetadata, writeRequestId, writeStopCode, writeToClient, writeToClientAckEvents, writeToClientCommands, writeToClientInit, writeToClientKvResponse, writeToClientRequestChunk, writeToClientRequestStart, writeToClientTunnelMessage, writeToClientTunnelMessageKind, writeToClientWebSocketClose, writeToClientWebSocketMessage, writeToClientWebSocketOpen, writeToGateway, writeToServer, writeToServerAckCommands, writeToServerEvents, writeToServerInit, writeToServerKvRequest, writeToServerPing, writeToServerResponseChunk, writeToServerResponseStart, writeToServerTunnelMessage, writeToServerTunnelMessageKind, writeToServerWebSocketClose, writeToServerWebSocketMessage };
|