@rivetkit/engine-runner-protocol 2.0.26 → 2.0.27
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/dist/index.d.ts +41 -47
- package/dist/index.js +96 -153
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -30,7 +30,10 @@ declare function readKvValue(bc: bare.ByteCursor): KvValue;
|
|
|
30
30
|
declare function writeKvValue(bc: bare.ByteCursor, x: KvValue): void;
|
|
31
31
|
type KvMetadata = {
|
|
32
32
|
readonly version: ArrayBuffer;
|
|
33
|
-
|
|
33
|
+
/**
|
|
34
|
+
* TODO: Rename to update_ts
|
|
35
|
+
*/
|
|
36
|
+
readonly createTs: i64;
|
|
34
37
|
};
|
|
35
38
|
declare function readKvMetadata(bc: bare.ByteCursor): KvMetadata;
|
|
36
39
|
declare function writeKvMetadata(bc: bare.ByteCursor, x: KvMetadata): void;
|
|
@@ -178,12 +181,6 @@ type ActorConfig = {
|
|
|
178
181
|
};
|
|
179
182
|
declare function readActorConfig(bc: bare.ByteCursor): ActorConfig;
|
|
180
183
|
declare function writeActorConfig(bc: bare.ByteCursor, x: ActorConfig): void;
|
|
181
|
-
type ActorCheckpoint = {
|
|
182
|
-
readonly actorId: Id;
|
|
183
|
-
readonly index: i64;
|
|
184
|
-
};
|
|
185
|
-
declare function readActorCheckpoint(bc: bare.ByteCursor): ActorCheckpoint;
|
|
186
|
-
declare function writeActorCheckpoint(bc: bare.ByteCursor, x: ActorCheckpoint): void;
|
|
187
184
|
/**
|
|
188
185
|
* Intent
|
|
189
186
|
*/
|
|
@@ -254,7 +251,7 @@ type Event = {
|
|
|
254
251
|
declare function readEvent(bc: bare.ByteCursor): Event;
|
|
255
252
|
declare function writeEvent(bc: bare.ByteCursor, x: Event): void;
|
|
256
253
|
type EventWrapper = {
|
|
257
|
-
readonly
|
|
254
|
+
readonly index: i64;
|
|
258
255
|
readonly inner: Event;
|
|
259
256
|
};
|
|
260
257
|
declare function readEventWrapper(bc: bare.ByteCursor): EventWrapper;
|
|
@@ -266,6 +263,7 @@ type HibernatingRequest = {
|
|
|
266
263
|
declare function readHibernatingRequest(bc: bare.ByteCursor): HibernatingRequest;
|
|
267
264
|
declare function writeHibernatingRequest(bc: bare.ByteCursor, x: HibernatingRequest): void;
|
|
268
265
|
type CommandStartActor = {
|
|
266
|
+
readonly actorId: Id;
|
|
269
267
|
readonly generation: u32;
|
|
270
268
|
readonly config: ActorConfig;
|
|
271
269
|
readonly hibernatingRequests: readonly HibernatingRequest[];
|
|
@@ -273,6 +271,7 @@ type CommandStartActor = {
|
|
|
273
271
|
declare function readCommandStartActor(bc: bare.ByteCursor): CommandStartActor;
|
|
274
272
|
declare function writeCommandStartActor(bc: bare.ByteCursor, x: CommandStartActor): void;
|
|
275
273
|
type CommandStopActor = {
|
|
274
|
+
readonly actorId: Id;
|
|
276
275
|
readonly generation: u32;
|
|
277
276
|
};
|
|
278
277
|
declare function readCommandStopActor(bc: bare.ByteCursor): CommandStopActor;
|
|
@@ -287,25 +286,11 @@ type Command = {
|
|
|
287
286
|
declare function readCommand(bc: bare.ByteCursor): Command;
|
|
288
287
|
declare function writeCommand(bc: bare.ByteCursor, x: Command): void;
|
|
289
288
|
type CommandWrapper = {
|
|
290
|
-
readonly
|
|
289
|
+
readonly index: i64;
|
|
291
290
|
readonly inner: Command;
|
|
292
291
|
};
|
|
293
292
|
declare function readCommandWrapper(bc: bare.ByteCursor): CommandWrapper;
|
|
294
293
|
declare function writeCommandWrapper(bc: bare.ByteCursor, x: CommandWrapper): void;
|
|
295
|
-
/**
|
|
296
|
-
* We redeclare this so its top level
|
|
297
|
-
*/
|
|
298
|
-
type ActorCommandKeyData = {
|
|
299
|
-
readonly tag: "CommandStartActor";
|
|
300
|
-
readonly val: CommandStartActor;
|
|
301
|
-
} | {
|
|
302
|
-
readonly tag: "CommandStopActor";
|
|
303
|
-
readonly val: CommandStopActor;
|
|
304
|
-
};
|
|
305
|
-
declare function readActorCommandKeyData(bc: bare.ByteCursor): ActorCommandKeyData;
|
|
306
|
-
declare function writeActorCommandKeyData(bc: bare.ByteCursor, x: ActorCommandKeyData): void;
|
|
307
|
-
declare function encodeActorCommandKeyData(x: ActorCommandKeyData, config?: Partial<bare.Config>): Uint8Array;
|
|
308
|
-
declare function decodeActorCommandKeyData(bytes: Uint8Array): ActorCommandKeyData;
|
|
309
294
|
type MessageId = {
|
|
310
295
|
/**
|
|
311
296
|
* Globally unique ID
|
|
@@ -322,6 +307,7 @@ type MessageId = {
|
|
|
322
307
|
};
|
|
323
308
|
declare function readMessageId(bc: bare.ByteCursor): MessageId;
|
|
324
309
|
declare function writeMessageId(bc: bare.ByteCursor, x: MessageId): void;
|
|
310
|
+
type DeprecatedTunnelAck = null;
|
|
325
311
|
/**
|
|
326
312
|
* HTTP
|
|
327
313
|
*/
|
|
@@ -405,11 +391,14 @@ declare function writeToServerWebSocketClose(bc: bare.ByteCursor, x: ToServerWeb
|
|
|
405
391
|
/**
|
|
406
392
|
* To Server
|
|
407
393
|
*/
|
|
408
|
-
type ToServerTunnelMessageKind =
|
|
394
|
+
type ToServerTunnelMessageKind = {
|
|
395
|
+
readonly tag: "DeprecatedTunnelAck";
|
|
396
|
+
readonly val: DeprecatedTunnelAck;
|
|
397
|
+
}
|
|
409
398
|
/**
|
|
410
399
|
* HTTP
|
|
411
400
|
*/
|
|
412
|
-
{
|
|
401
|
+
| {
|
|
413
402
|
readonly tag: "ToServerResponseStart";
|
|
414
403
|
readonly val: ToServerResponseStart;
|
|
415
404
|
} | {
|
|
@@ -446,11 +435,14 @@ declare function writeToServerTunnelMessage(bc: bare.ByteCursor, x: ToServerTunn
|
|
|
446
435
|
/**
|
|
447
436
|
* To Client
|
|
448
437
|
*/
|
|
449
|
-
type ToClientTunnelMessageKind =
|
|
438
|
+
type ToClientTunnelMessageKind = {
|
|
439
|
+
readonly tag: "DeprecatedTunnelAck";
|
|
440
|
+
readonly val: DeprecatedTunnelAck;
|
|
441
|
+
}
|
|
450
442
|
/**
|
|
451
443
|
* HTTP
|
|
452
444
|
*/
|
|
453
|
-
{
|
|
445
|
+
| {
|
|
454
446
|
readonly tag: "ToClientRequestStart";
|
|
455
447
|
readonly val: ToClientRequestStart;
|
|
456
448
|
} | {
|
|
@@ -481,11 +473,6 @@ type ToClientTunnelMessage = {
|
|
|
481
473
|
};
|
|
482
474
|
declare function readToClientTunnelMessage(bc: bare.ByteCursor): ToClientTunnelMessage;
|
|
483
475
|
declare function writeToClientTunnelMessage(bc: bare.ByteCursor, x: ToClientTunnelMessage): void;
|
|
484
|
-
type ToClientPing = {
|
|
485
|
-
readonly ts: i64;
|
|
486
|
-
};
|
|
487
|
-
declare function readToClientPing(bc: bare.ByteCursor): ToClientPing;
|
|
488
|
-
declare function writeToClientPing(bc: bare.ByteCursor, x: ToClientPing): void;
|
|
489
476
|
/**
|
|
490
477
|
* MARK: To Server
|
|
491
478
|
*/
|
|
@@ -493,6 +480,7 @@ type ToServerInit = {
|
|
|
493
480
|
readonly name: string;
|
|
494
481
|
readonly version: u32;
|
|
495
482
|
readonly totalSlots: u32;
|
|
483
|
+
readonly lastCommandIdx: i64 | null;
|
|
496
484
|
readonly prepopulateActorNames: ReadonlyMap<string, ActorName> | null;
|
|
497
485
|
readonly metadata: Json | null;
|
|
498
486
|
};
|
|
@@ -502,16 +490,16 @@ type ToServerEvents = readonly EventWrapper[];
|
|
|
502
490
|
declare function readToServerEvents(bc: bare.ByteCursor): ToServerEvents;
|
|
503
491
|
declare function writeToServerEvents(bc: bare.ByteCursor, x: ToServerEvents): void;
|
|
504
492
|
type ToServerAckCommands = {
|
|
505
|
-
readonly
|
|
493
|
+
readonly lastCommandIdx: i64;
|
|
506
494
|
};
|
|
507
495
|
declare function readToServerAckCommands(bc: bare.ByteCursor): ToServerAckCommands;
|
|
508
496
|
declare function writeToServerAckCommands(bc: bare.ByteCursor, x: ToServerAckCommands): void;
|
|
509
497
|
type ToServerStopping = null;
|
|
510
|
-
type
|
|
498
|
+
type ToServerPing = {
|
|
511
499
|
readonly ts: i64;
|
|
512
500
|
};
|
|
513
|
-
declare function
|
|
514
|
-
declare function
|
|
501
|
+
declare function readToServerPing(bc: bare.ByteCursor): ToServerPing;
|
|
502
|
+
declare function writeToServerPing(bc: bare.ByteCursor, x: ToServerPing): void;
|
|
515
503
|
type ToServerKvRequest = {
|
|
516
504
|
readonly actorId: Id;
|
|
517
505
|
readonly requestId: u32;
|
|
@@ -532,8 +520,8 @@ type ToServer = {
|
|
|
532
520
|
readonly tag: "ToServerStopping";
|
|
533
521
|
readonly val: ToServerStopping;
|
|
534
522
|
} | {
|
|
535
|
-
readonly tag: "
|
|
536
|
-
readonly val:
|
|
523
|
+
readonly tag: "ToServerPing";
|
|
524
|
+
readonly val: ToServerPing;
|
|
537
525
|
} | {
|
|
538
526
|
readonly tag: "ToServerKvRequest";
|
|
539
527
|
readonly val: ToServerKvRequest;
|
|
@@ -555,6 +543,7 @@ declare function readProtocolMetadata(bc: bare.ByteCursor): ProtocolMetadata;
|
|
|
555
543
|
declare function writeProtocolMetadata(bc: bare.ByteCursor, x: ProtocolMetadata): void;
|
|
556
544
|
type ToClientInit = {
|
|
557
545
|
readonly runnerId: Id;
|
|
546
|
+
readonly lastEventIdx: i64;
|
|
558
547
|
readonly metadata: ProtocolMetadata;
|
|
559
548
|
};
|
|
560
549
|
declare function readToClientInit(bc: bare.ByteCursor): ToClientInit;
|
|
@@ -563,7 +552,7 @@ type ToClientCommands = readonly CommandWrapper[];
|
|
|
563
552
|
declare function readToClientCommands(bc: bare.ByteCursor): ToClientCommands;
|
|
564
553
|
declare function writeToClientCommands(bc: bare.ByteCursor, x: ToClientCommands): void;
|
|
565
554
|
type ToClientAckEvents = {
|
|
566
|
-
readonly
|
|
555
|
+
readonly lastEventIdx: i64;
|
|
567
556
|
};
|
|
568
557
|
declare function readToClientAckEvents(bc: bare.ByteCursor): ToClientAckEvents;
|
|
569
558
|
declare function writeToClientAckEvents(bc: bare.ByteCursor, x: ToClientAckEvents): void;
|
|
@@ -573,9 +562,13 @@ type ToClientKvResponse = {
|
|
|
573
562
|
};
|
|
574
563
|
declare function readToClientKvResponse(bc: bare.ByteCursor): ToClientKvResponse;
|
|
575
564
|
declare function writeToClientKvResponse(bc: bare.ByteCursor, x: ToClientKvResponse): void;
|
|
565
|
+
type ToClientClose = null;
|
|
576
566
|
type ToClient = {
|
|
577
567
|
readonly tag: "ToClientInit";
|
|
578
568
|
readonly val: ToClientInit;
|
|
569
|
+
} | {
|
|
570
|
+
readonly tag: "ToClientClose";
|
|
571
|
+
readonly val: ToClientClose;
|
|
579
572
|
} | {
|
|
580
573
|
readonly tag: "ToClientCommands";
|
|
581
574
|
readonly val: ToClientCommands;
|
|
@@ -588,9 +581,6 @@ type ToClient = {
|
|
|
588
581
|
} | {
|
|
589
582
|
readonly tag: "ToClientTunnelMessage";
|
|
590
583
|
readonly val: ToClientTunnelMessage;
|
|
591
|
-
} | {
|
|
592
|
-
readonly tag: "ToClientPing";
|
|
593
|
-
readonly val: ToClientPing;
|
|
594
584
|
};
|
|
595
585
|
declare function readToClient(bc: bare.ByteCursor): ToClient;
|
|
596
586
|
declare function writeToClient(bc: bare.ByteCursor, x: ToClient): void;
|
|
@@ -606,7 +596,6 @@ type ToRunnerPing = {
|
|
|
606
596
|
};
|
|
607
597
|
declare function readToRunnerPing(bc: bare.ByteCursor): ToRunnerPing;
|
|
608
598
|
declare function writeToRunnerPing(bc: bare.ByteCursor, x: ToRunnerPing): void;
|
|
609
|
-
type ToRunnerClose = null;
|
|
610
599
|
/**
|
|
611
600
|
* We have to re-declare the entire union since BARE will not generate the
|
|
612
601
|
* ser/de for ToClient if it's not a top-level type
|
|
@@ -615,14 +604,20 @@ type ToRunner = {
|
|
|
615
604
|
readonly tag: "ToRunnerPing";
|
|
616
605
|
readonly val: ToRunnerPing;
|
|
617
606
|
} | {
|
|
618
|
-
readonly tag: "
|
|
619
|
-
readonly val:
|
|
607
|
+
readonly tag: "ToClientInit";
|
|
608
|
+
readonly val: ToClientInit;
|
|
609
|
+
} | {
|
|
610
|
+
readonly tag: "ToClientClose";
|
|
611
|
+
readonly val: ToClientClose;
|
|
620
612
|
} | {
|
|
621
613
|
readonly tag: "ToClientCommands";
|
|
622
614
|
readonly val: ToClientCommands;
|
|
623
615
|
} | {
|
|
624
616
|
readonly tag: "ToClientAckEvents";
|
|
625
617
|
readonly val: ToClientAckEvents;
|
|
618
|
+
} | {
|
|
619
|
+
readonly tag: "ToClientKvResponse";
|
|
620
|
+
readonly val: ToClientKvResponse;
|
|
626
621
|
} | {
|
|
627
622
|
readonly tag: "ToClientTunnelMessage";
|
|
628
623
|
readonly val: ToClientTunnelMessage;
|
|
@@ -656,7 +651,6 @@ declare function decodeToGateway(bytes: Uint8Array): ToGateway;
|
|
|
656
651
|
*/
|
|
657
652
|
type ToServerlessServerInit = {
|
|
658
653
|
readonly runnerId: Id;
|
|
659
|
-
readonly runnerProtocolVersion: u16;
|
|
660
654
|
};
|
|
661
655
|
declare function readToServerlessServerInit(bc: bare.ByteCursor): ToServerlessServerInit;
|
|
662
656
|
declare function writeToServerlessServerInit(bc: bare.ByteCursor, x: ToServerlessServerInit): void;
|
|
@@ -669,4 +663,4 @@ declare function writeToServerlessServer(bc: bare.ByteCursor, x: ToServerlessSer
|
|
|
669
663
|
declare function encodeToServerlessServer(x: ToServerlessServer, config?: Partial<bare.Config>): Uint8Array;
|
|
670
664
|
declare function decodeToServerlessServer(bytes: Uint8Array): ToServerlessServer;
|
|
671
665
|
|
|
672
|
-
export { type
|
|
666
|
+
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 DeprecatedTunnelAck, type Event, type EventActorIntent, type EventActorSetAlarm, type EventActorStateUpdate, type EventWrapper, type GatewayId, type HibernatingRequest, 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 MessageIndex, 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 ToGatewayPong, type ToRunner, type ToRunnerPing, 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 ToServerWebSocketMessageAck, type ToServerWebSocketOpen, type ToServerlessServer, type ToServerlessServerInit, decodeToClient, decodeToGateway, decodeToRunner, decodeToServer, decodeToServerlessServer, encodeToClient, encodeToGateway, encodeToRunner, encodeToServer, encodeToServerlessServer, type i64, readActorConfig, readActorIntent, readActorName, readActorState, readActorStateStopped, readCommand, readCommandStartActor, readCommandStopActor, readCommandWrapper, readEvent, readEventActorIntent, readEventActorSetAlarm, readEventActorStateUpdate, readEventWrapper, readGatewayId, readHibernatingRequest, readId, readJson, readKvDeleteRequest, readKvErrorResponse, readKvGetRequest, readKvGetResponse, readKvKey, readKvListPrefixQuery, readKvListQuery, readKvListRangeQuery, readKvListRequest, readKvListResponse, readKvMetadata, readKvPutRequest, readKvRequestData, readKvResponseData, readKvValue, readMessageId, readMessageIndex, readProtocolMetadata, readRequestId, readStopCode, readToClient, readToClientAckEvents, readToClientCommands, readToClientInit, readToClientKvResponse, readToClientRequestChunk, readToClientRequestStart, readToClientTunnelMessage, readToClientTunnelMessageKind, readToClientWebSocketClose, readToClientWebSocketMessage, readToClientWebSocketOpen, readToGateway, readToGatewayPong, readToRunner, readToRunnerPing, readToServer, readToServerAckCommands, readToServerEvents, readToServerInit, readToServerKvRequest, readToServerPing, readToServerResponseChunk, readToServerResponseStart, readToServerTunnelMessage, readToServerTunnelMessageKind, readToServerWebSocketClose, readToServerWebSocketMessage, readToServerWebSocketMessageAck, readToServerWebSocketOpen, readToServerlessServer, readToServerlessServerInit, type u16, type u32, type u64, writeActorConfig, writeActorIntent, writeActorName, writeActorState, writeActorStateStopped, writeCommand, writeCommandStartActor, writeCommandStopActor, writeCommandWrapper, writeEvent, writeEventActorIntent, writeEventActorSetAlarm, writeEventActorStateUpdate, writeEventWrapper, writeGatewayId, writeHibernatingRequest, writeId, writeJson, writeKvDeleteRequest, writeKvErrorResponse, writeKvGetRequest, writeKvGetResponse, writeKvKey, writeKvListPrefixQuery, writeKvListQuery, writeKvListRangeQuery, writeKvListRequest, writeKvListResponse, writeKvMetadata, writeKvPutRequest, writeKvRequestData, writeKvResponseData, writeKvValue, writeMessageId, writeMessageIndex, writeProtocolMetadata, writeRequestId, writeStopCode, writeToClient, writeToClientAckEvents, writeToClientCommands, writeToClientInit, writeToClientKvResponse, writeToClientRequestChunk, writeToClientRequestStart, writeToClientTunnelMessage, writeToClientTunnelMessageKind, writeToClientWebSocketClose, writeToClientWebSocketMessage, writeToClientWebSocketOpen, writeToGateway, writeToGatewayPong, writeToRunner, writeToRunnerPing, writeToServer, writeToServerAckCommands, writeToServerEvents, writeToServerInit, writeToServerKvRequest, writeToServerPing, writeToServerResponseChunk, writeToServerResponseStart, writeToServerTunnelMessage, writeToServerTunnelMessageKind, writeToServerWebSocketClose, writeToServerWebSocketMessage, writeToServerWebSocketMessageAck, writeToServerWebSocketOpen, writeToServerlessServer, writeToServerlessServerInit };
|
package/dist/index.js
CHANGED
|
@@ -49,12 +49,12 @@ function writeKvValue(bc, x) {
|
|
|
49
49
|
function readKvMetadata(bc) {
|
|
50
50
|
return {
|
|
51
51
|
version: bare.readData(bc),
|
|
52
|
-
|
|
52
|
+
createTs: bare.readI64(bc)
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
function writeKvMetadata(bc, x) {
|
|
56
56
|
bare.writeData(bc, x.version);
|
|
57
|
-
bare.writeI64(bc, x.
|
|
57
|
+
bare.writeI64(bc, x.createTs);
|
|
58
58
|
}
|
|
59
59
|
function readKvListRangeQuery(bc) {
|
|
60
60
|
return {
|
|
@@ -421,16 +421,6 @@ function writeActorConfig(bc, x) {
|
|
|
421
421
|
bare.writeI64(bc, x.createTs);
|
|
422
422
|
write6(bc, x.input);
|
|
423
423
|
}
|
|
424
|
-
function readActorCheckpoint(bc) {
|
|
425
|
-
return {
|
|
426
|
-
actorId: readId(bc),
|
|
427
|
-
index: bare.readI64(bc)
|
|
428
|
-
};
|
|
429
|
-
}
|
|
430
|
-
function writeActorCheckpoint(bc, x) {
|
|
431
|
-
writeId(bc, x.actorId);
|
|
432
|
-
bare.writeI64(bc, x.index);
|
|
433
|
-
}
|
|
434
424
|
function readActorIntent(bc) {
|
|
435
425
|
const offset = bc.offset;
|
|
436
426
|
const tag = bare.readU8(bc);
|
|
@@ -576,12 +566,12 @@ function writeEvent(bc, x) {
|
|
|
576
566
|
}
|
|
577
567
|
function readEventWrapper(bc) {
|
|
578
568
|
return {
|
|
579
|
-
|
|
569
|
+
index: bare.readI64(bc),
|
|
580
570
|
inner: readEvent(bc)
|
|
581
571
|
};
|
|
582
572
|
}
|
|
583
573
|
function writeEventWrapper(bc, x) {
|
|
584
|
-
|
|
574
|
+
bare.writeI64(bc, x.index);
|
|
585
575
|
writeEvent(bc, x.inner);
|
|
586
576
|
}
|
|
587
577
|
function readHibernatingRequest(bc) {
|
|
@@ -613,22 +603,26 @@ function write8(bc, x) {
|
|
|
613
603
|
}
|
|
614
604
|
function readCommandStartActor(bc) {
|
|
615
605
|
return {
|
|
606
|
+
actorId: readId(bc),
|
|
616
607
|
generation: bare.readU32(bc),
|
|
617
608
|
config: readActorConfig(bc),
|
|
618
609
|
hibernatingRequests: read8(bc)
|
|
619
610
|
};
|
|
620
611
|
}
|
|
621
612
|
function writeCommandStartActor(bc, x) {
|
|
613
|
+
writeId(bc, x.actorId);
|
|
622
614
|
bare.writeU32(bc, x.generation);
|
|
623
615
|
writeActorConfig(bc, x.config);
|
|
624
616
|
write8(bc, x.hibernatingRequests);
|
|
625
617
|
}
|
|
626
618
|
function readCommandStopActor(bc) {
|
|
627
619
|
return {
|
|
620
|
+
actorId: readId(bc),
|
|
628
621
|
generation: bare.readU32(bc)
|
|
629
622
|
};
|
|
630
623
|
}
|
|
631
624
|
function writeCommandStopActor(bc, x) {
|
|
625
|
+
writeId(bc, x.actorId);
|
|
632
626
|
bare.writeU32(bc, x.generation);
|
|
633
627
|
}
|
|
634
628
|
function readCommand(bc) {
|
|
@@ -661,59 +655,14 @@ function writeCommand(bc, x) {
|
|
|
661
655
|
}
|
|
662
656
|
function readCommandWrapper(bc) {
|
|
663
657
|
return {
|
|
664
|
-
|
|
658
|
+
index: bare.readI64(bc),
|
|
665
659
|
inner: readCommand(bc)
|
|
666
660
|
};
|
|
667
661
|
}
|
|
668
662
|
function writeCommandWrapper(bc, x) {
|
|
669
|
-
|
|
663
|
+
bare.writeI64(bc, x.index);
|
|
670
664
|
writeCommand(bc, x.inner);
|
|
671
665
|
}
|
|
672
|
-
function readActorCommandKeyData(bc) {
|
|
673
|
-
const offset = bc.offset;
|
|
674
|
-
const tag = bare.readU8(bc);
|
|
675
|
-
switch (tag) {
|
|
676
|
-
case 0:
|
|
677
|
-
return { tag: "CommandStartActor", val: readCommandStartActor(bc) };
|
|
678
|
-
case 1:
|
|
679
|
-
return { tag: "CommandStopActor", val: readCommandStopActor(bc) };
|
|
680
|
-
default: {
|
|
681
|
-
bc.offset = offset;
|
|
682
|
-
throw new bare.BareError(offset, "invalid tag");
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
function writeActorCommandKeyData(bc, x) {
|
|
687
|
-
switch (x.tag) {
|
|
688
|
-
case "CommandStartActor": {
|
|
689
|
-
bare.writeU8(bc, 0);
|
|
690
|
-
writeCommandStartActor(bc, x.val);
|
|
691
|
-
break;
|
|
692
|
-
}
|
|
693
|
-
case "CommandStopActor": {
|
|
694
|
-
bare.writeU8(bc, 1);
|
|
695
|
-
writeCommandStopActor(bc, x.val);
|
|
696
|
-
break;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
function encodeActorCommandKeyData(x, config) {
|
|
701
|
-
const fullConfig = config != null ? bare.Config(config) : DEFAULT_CONFIG;
|
|
702
|
-
const bc = new bare.ByteCursor(
|
|
703
|
-
new Uint8Array(fullConfig.initialBufferLength),
|
|
704
|
-
fullConfig
|
|
705
|
-
);
|
|
706
|
-
writeActorCommandKeyData(bc, x);
|
|
707
|
-
return new Uint8Array(bc.view.buffer, bc.view.byteOffset, bc.offset);
|
|
708
|
-
}
|
|
709
|
-
function decodeActorCommandKeyData(bytes) {
|
|
710
|
-
const bc = new bare.ByteCursor(bytes, DEFAULT_CONFIG);
|
|
711
|
-
const result = readActorCommandKeyData(bc);
|
|
712
|
-
if (bc.offset < bc.view.byteLength) {
|
|
713
|
-
throw new bare.BareError(bc.offset, "remaining bytes");
|
|
714
|
-
}
|
|
715
|
-
return result;
|
|
716
|
-
}
|
|
717
666
|
function readMessageId(bc) {
|
|
718
667
|
return {
|
|
719
668
|
gatewayId: readGatewayId(bc),
|
|
@@ -883,18 +832,20 @@ function readToServerTunnelMessageKind(bc) {
|
|
|
883
832
|
const tag = bare.readU8(bc);
|
|
884
833
|
switch (tag) {
|
|
885
834
|
case 0:
|
|
886
|
-
return { tag: "
|
|
835
|
+
return { tag: "DeprecatedTunnelAck", val: null };
|
|
887
836
|
case 1:
|
|
888
|
-
return { tag: "
|
|
837
|
+
return { tag: "ToServerResponseStart", val: readToServerResponseStart(bc) };
|
|
889
838
|
case 2:
|
|
890
|
-
return { tag: "
|
|
839
|
+
return { tag: "ToServerResponseChunk", val: readToServerResponseChunk(bc) };
|
|
891
840
|
case 3:
|
|
892
|
-
return { tag: "
|
|
841
|
+
return { tag: "ToServerResponseAbort", val: null };
|
|
893
842
|
case 4:
|
|
894
|
-
return { tag: "
|
|
843
|
+
return { tag: "ToServerWebSocketOpen", val: readToServerWebSocketOpen(bc) };
|
|
895
844
|
case 5:
|
|
896
|
-
return { tag: "
|
|
845
|
+
return { tag: "ToServerWebSocketMessage", val: readToServerWebSocketMessage(bc) };
|
|
897
846
|
case 6:
|
|
847
|
+
return { tag: "ToServerWebSocketMessageAck", val: readToServerWebSocketMessageAck(bc) };
|
|
848
|
+
case 7:
|
|
898
849
|
return { tag: "ToServerWebSocketClose", val: readToServerWebSocketClose(bc) };
|
|
899
850
|
default: {
|
|
900
851
|
bc.offset = offset;
|
|
@@ -904,37 +855,41 @@ function readToServerTunnelMessageKind(bc) {
|
|
|
904
855
|
}
|
|
905
856
|
function writeToServerTunnelMessageKind(bc, x) {
|
|
906
857
|
switch (x.tag) {
|
|
907
|
-
case "
|
|
858
|
+
case "DeprecatedTunnelAck": {
|
|
908
859
|
bare.writeU8(bc, 0);
|
|
860
|
+
break;
|
|
861
|
+
}
|
|
862
|
+
case "ToServerResponseStart": {
|
|
863
|
+
bare.writeU8(bc, 1);
|
|
909
864
|
writeToServerResponseStart(bc, x.val);
|
|
910
865
|
break;
|
|
911
866
|
}
|
|
912
867
|
case "ToServerResponseChunk": {
|
|
913
|
-
bare.writeU8(bc,
|
|
868
|
+
bare.writeU8(bc, 2);
|
|
914
869
|
writeToServerResponseChunk(bc, x.val);
|
|
915
870
|
break;
|
|
916
871
|
}
|
|
917
872
|
case "ToServerResponseAbort": {
|
|
918
|
-
bare.writeU8(bc,
|
|
873
|
+
bare.writeU8(bc, 3);
|
|
919
874
|
break;
|
|
920
875
|
}
|
|
921
876
|
case "ToServerWebSocketOpen": {
|
|
922
|
-
bare.writeU8(bc,
|
|
877
|
+
bare.writeU8(bc, 4);
|
|
923
878
|
writeToServerWebSocketOpen(bc, x.val);
|
|
924
879
|
break;
|
|
925
880
|
}
|
|
926
881
|
case "ToServerWebSocketMessage": {
|
|
927
|
-
bare.writeU8(bc,
|
|
882
|
+
bare.writeU8(bc, 5);
|
|
928
883
|
writeToServerWebSocketMessage(bc, x.val);
|
|
929
884
|
break;
|
|
930
885
|
}
|
|
931
886
|
case "ToServerWebSocketMessageAck": {
|
|
932
|
-
bare.writeU8(bc,
|
|
887
|
+
bare.writeU8(bc, 6);
|
|
933
888
|
writeToServerWebSocketMessageAck(bc, x.val);
|
|
934
889
|
break;
|
|
935
890
|
}
|
|
936
891
|
case "ToServerWebSocketClose": {
|
|
937
|
-
bare.writeU8(bc,
|
|
892
|
+
bare.writeU8(bc, 7);
|
|
938
893
|
writeToServerWebSocketClose(bc, x.val);
|
|
939
894
|
break;
|
|
940
895
|
}
|
|
@@ -955,16 +910,18 @@ function readToClientTunnelMessageKind(bc) {
|
|
|
955
910
|
const tag = bare.readU8(bc);
|
|
956
911
|
switch (tag) {
|
|
957
912
|
case 0:
|
|
958
|
-
return { tag: "
|
|
913
|
+
return { tag: "DeprecatedTunnelAck", val: null };
|
|
959
914
|
case 1:
|
|
960
|
-
return { tag: "
|
|
915
|
+
return { tag: "ToClientRequestStart", val: readToClientRequestStart(bc) };
|
|
961
916
|
case 2:
|
|
962
|
-
return { tag: "
|
|
917
|
+
return { tag: "ToClientRequestChunk", val: readToClientRequestChunk(bc) };
|
|
963
918
|
case 3:
|
|
964
|
-
return { tag: "
|
|
919
|
+
return { tag: "ToClientRequestAbort", val: null };
|
|
965
920
|
case 4:
|
|
966
|
-
return { tag: "
|
|
921
|
+
return { tag: "ToClientWebSocketOpen", val: readToClientWebSocketOpen(bc) };
|
|
967
922
|
case 5:
|
|
923
|
+
return { tag: "ToClientWebSocketMessage", val: readToClientWebSocketMessage(bc) };
|
|
924
|
+
case 6:
|
|
968
925
|
return { tag: "ToClientWebSocketClose", val: readToClientWebSocketClose(bc) };
|
|
969
926
|
default: {
|
|
970
927
|
bc.offset = offset;
|
|
@@ -974,32 +931,36 @@ function readToClientTunnelMessageKind(bc) {
|
|
|
974
931
|
}
|
|
975
932
|
function writeToClientTunnelMessageKind(bc, x) {
|
|
976
933
|
switch (x.tag) {
|
|
977
|
-
case "
|
|
934
|
+
case "DeprecatedTunnelAck": {
|
|
978
935
|
bare.writeU8(bc, 0);
|
|
936
|
+
break;
|
|
937
|
+
}
|
|
938
|
+
case "ToClientRequestStart": {
|
|
939
|
+
bare.writeU8(bc, 1);
|
|
979
940
|
writeToClientRequestStart(bc, x.val);
|
|
980
941
|
break;
|
|
981
942
|
}
|
|
982
943
|
case "ToClientRequestChunk": {
|
|
983
|
-
bare.writeU8(bc,
|
|
944
|
+
bare.writeU8(bc, 2);
|
|
984
945
|
writeToClientRequestChunk(bc, x.val);
|
|
985
946
|
break;
|
|
986
947
|
}
|
|
987
948
|
case "ToClientRequestAbort": {
|
|
988
|
-
bare.writeU8(bc,
|
|
949
|
+
bare.writeU8(bc, 3);
|
|
989
950
|
break;
|
|
990
951
|
}
|
|
991
952
|
case "ToClientWebSocketOpen": {
|
|
992
|
-
bare.writeU8(bc,
|
|
953
|
+
bare.writeU8(bc, 4);
|
|
993
954
|
writeToClientWebSocketOpen(bc, x.val);
|
|
994
955
|
break;
|
|
995
956
|
}
|
|
996
957
|
case "ToClientWebSocketMessage": {
|
|
997
|
-
bare.writeU8(bc,
|
|
958
|
+
bare.writeU8(bc, 5);
|
|
998
959
|
writeToClientWebSocketMessage(bc, x.val);
|
|
999
960
|
break;
|
|
1000
961
|
}
|
|
1001
962
|
case "ToClientWebSocketClose": {
|
|
1002
|
-
bare.writeU8(bc,
|
|
963
|
+
bare.writeU8(bc, 6);
|
|
1003
964
|
writeToClientWebSocketClose(bc, x.val);
|
|
1004
965
|
break;
|
|
1005
966
|
}
|
|
@@ -1015,14 +976,6 @@ function writeToClientTunnelMessage(bc, x) {
|
|
|
1015
976
|
writeMessageId(bc, x.messageId);
|
|
1016
977
|
writeToClientTunnelMessageKind(bc, x.messageKind);
|
|
1017
978
|
}
|
|
1018
|
-
function readToClientPing(bc) {
|
|
1019
|
-
return {
|
|
1020
|
-
ts: bare.readI64(bc)
|
|
1021
|
-
};
|
|
1022
|
-
}
|
|
1023
|
-
function writeToClientPing(bc, x) {
|
|
1024
|
-
bare.writeI64(bc, x.ts);
|
|
1025
|
-
}
|
|
1026
979
|
function read11(bc) {
|
|
1027
980
|
const len = bare.readUintSafe(bc);
|
|
1028
981
|
const result = /* @__PURE__ */ new Map();
|
|
@@ -1067,6 +1020,7 @@ function readToServerInit(bc) {
|
|
|
1067
1020
|
name: bare.readString(bc),
|
|
1068
1021
|
version: bare.readU32(bc),
|
|
1069
1022
|
totalSlots: bare.readU32(bc),
|
|
1023
|
+
lastCommandIdx: read7(bc),
|
|
1070
1024
|
prepopulateActorNames: read12(bc),
|
|
1071
1025
|
metadata: read13(bc)
|
|
1072
1026
|
};
|
|
@@ -1075,6 +1029,7 @@ function writeToServerInit(bc, x) {
|
|
|
1075
1029
|
bare.writeString(bc, x.name);
|
|
1076
1030
|
bare.writeU32(bc, x.version);
|
|
1077
1031
|
bare.writeU32(bc, x.totalSlots);
|
|
1032
|
+
write7(bc, x.lastCommandIdx);
|
|
1078
1033
|
write12(bc, x.prepopulateActorNames);
|
|
1079
1034
|
write13(bc, x.metadata);
|
|
1080
1035
|
}
|
|
@@ -1095,37 +1050,20 @@ function writeToServerEvents(bc, x) {
|
|
|
1095
1050
|
writeEventWrapper(bc, x[i]);
|
|
1096
1051
|
}
|
|
1097
1052
|
}
|
|
1098
|
-
function read14(bc) {
|
|
1099
|
-
const len = bare.readUintSafe(bc);
|
|
1100
|
-
if (len === 0) {
|
|
1101
|
-
return [];
|
|
1102
|
-
}
|
|
1103
|
-
const result = [readActorCheckpoint(bc)];
|
|
1104
|
-
for (let i = 1; i < len; i++) {
|
|
1105
|
-
result[i] = readActorCheckpoint(bc);
|
|
1106
|
-
}
|
|
1107
|
-
return result;
|
|
1108
|
-
}
|
|
1109
|
-
function write14(bc, x) {
|
|
1110
|
-
bare.writeUintSafe(bc, x.length);
|
|
1111
|
-
for (let i = 0; i < x.length; i++) {
|
|
1112
|
-
writeActorCheckpoint(bc, x[i]);
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
1053
|
function readToServerAckCommands(bc) {
|
|
1116
1054
|
return {
|
|
1117
|
-
|
|
1055
|
+
lastCommandIdx: bare.readI64(bc)
|
|
1118
1056
|
};
|
|
1119
1057
|
}
|
|
1120
1058
|
function writeToServerAckCommands(bc, x) {
|
|
1121
|
-
|
|
1059
|
+
bare.writeI64(bc, x.lastCommandIdx);
|
|
1122
1060
|
}
|
|
1123
|
-
function
|
|
1061
|
+
function readToServerPing(bc) {
|
|
1124
1062
|
return {
|
|
1125
1063
|
ts: bare.readI64(bc)
|
|
1126
1064
|
};
|
|
1127
1065
|
}
|
|
1128
|
-
function
|
|
1066
|
+
function writeToServerPing(bc, x) {
|
|
1129
1067
|
bare.writeI64(bc, x.ts);
|
|
1130
1068
|
}
|
|
1131
1069
|
function readToServerKvRequest(bc) {
|
|
@@ -1153,7 +1091,7 @@ function readToServer(bc) {
|
|
|
1153
1091
|
case 3:
|
|
1154
1092
|
return { tag: "ToServerStopping", val: null };
|
|
1155
1093
|
case 4:
|
|
1156
|
-
return { tag: "
|
|
1094
|
+
return { tag: "ToServerPing", val: readToServerPing(bc) };
|
|
1157
1095
|
case 5:
|
|
1158
1096
|
return { tag: "ToServerKvRequest", val: readToServerKvRequest(bc) };
|
|
1159
1097
|
case 6:
|
|
@@ -1185,9 +1123,9 @@ function writeToServer(bc, x) {
|
|
|
1185
1123
|
bare.writeU8(bc, 3);
|
|
1186
1124
|
break;
|
|
1187
1125
|
}
|
|
1188
|
-
case "
|
|
1126
|
+
case "ToServerPing": {
|
|
1189
1127
|
bare.writeU8(bc, 4);
|
|
1190
|
-
|
|
1128
|
+
writeToServerPing(bc, x.val);
|
|
1191
1129
|
break;
|
|
1192
1130
|
}
|
|
1193
1131
|
case "ToServerKvRequest": {
|
|
@@ -1230,11 +1168,13 @@ function writeProtocolMetadata(bc, x) {
|
|
|
1230
1168
|
function readToClientInit(bc) {
|
|
1231
1169
|
return {
|
|
1232
1170
|
runnerId: readId(bc),
|
|
1171
|
+
lastEventIdx: bare.readI64(bc),
|
|
1233
1172
|
metadata: readProtocolMetadata(bc)
|
|
1234
1173
|
};
|
|
1235
1174
|
}
|
|
1236
1175
|
function writeToClientInit(bc, x) {
|
|
1237
1176
|
writeId(bc, x.runnerId);
|
|
1177
|
+
bare.writeI64(bc, x.lastEventIdx);
|
|
1238
1178
|
writeProtocolMetadata(bc, x.metadata);
|
|
1239
1179
|
}
|
|
1240
1180
|
function readToClientCommands(bc) {
|
|
@@ -1256,11 +1196,11 @@ function writeToClientCommands(bc, x) {
|
|
|
1256
1196
|
}
|
|
1257
1197
|
function readToClientAckEvents(bc) {
|
|
1258
1198
|
return {
|
|
1259
|
-
|
|
1199
|
+
lastEventIdx: bare.readI64(bc)
|
|
1260
1200
|
};
|
|
1261
1201
|
}
|
|
1262
1202
|
function writeToClientAckEvents(bc, x) {
|
|
1263
|
-
|
|
1203
|
+
bare.writeI64(bc, x.lastEventIdx);
|
|
1264
1204
|
}
|
|
1265
1205
|
function readToClientKvResponse(bc) {
|
|
1266
1206
|
return {
|
|
@@ -1279,15 +1219,15 @@ function readToClient(bc) {
|
|
|
1279
1219
|
case 0:
|
|
1280
1220
|
return { tag: "ToClientInit", val: readToClientInit(bc) };
|
|
1281
1221
|
case 1:
|
|
1282
|
-
return { tag: "
|
|
1222
|
+
return { tag: "ToClientClose", val: null };
|
|
1283
1223
|
case 2:
|
|
1284
|
-
return { tag: "
|
|
1224
|
+
return { tag: "ToClientCommands", val: readToClientCommands(bc) };
|
|
1285
1225
|
case 3:
|
|
1286
|
-
return { tag: "
|
|
1226
|
+
return { tag: "ToClientAckEvents", val: readToClientAckEvents(bc) };
|
|
1287
1227
|
case 4:
|
|
1288
|
-
return { tag: "
|
|
1228
|
+
return { tag: "ToClientKvResponse", val: readToClientKvResponse(bc) };
|
|
1289
1229
|
case 5:
|
|
1290
|
-
return { tag: "
|
|
1230
|
+
return { tag: "ToClientTunnelMessage", val: readToClientTunnelMessage(bc) };
|
|
1291
1231
|
default: {
|
|
1292
1232
|
bc.offset = offset;
|
|
1293
1233
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1301,29 +1241,28 @@ function writeToClient(bc, x) {
|
|
|
1301
1241
|
writeToClientInit(bc, x.val);
|
|
1302
1242
|
break;
|
|
1303
1243
|
}
|
|
1304
|
-
case "
|
|
1244
|
+
case "ToClientClose": {
|
|
1305
1245
|
bare.writeU8(bc, 1);
|
|
1246
|
+
break;
|
|
1247
|
+
}
|
|
1248
|
+
case "ToClientCommands": {
|
|
1249
|
+
bare.writeU8(bc, 2);
|
|
1306
1250
|
writeToClientCommands(bc, x.val);
|
|
1307
1251
|
break;
|
|
1308
1252
|
}
|
|
1309
1253
|
case "ToClientAckEvents": {
|
|
1310
|
-
bare.writeU8(bc,
|
|
1254
|
+
bare.writeU8(bc, 3);
|
|
1311
1255
|
writeToClientAckEvents(bc, x.val);
|
|
1312
1256
|
break;
|
|
1313
1257
|
}
|
|
1314
1258
|
case "ToClientKvResponse": {
|
|
1315
|
-
bare.writeU8(bc,
|
|
1259
|
+
bare.writeU8(bc, 4);
|
|
1316
1260
|
writeToClientKvResponse(bc, x.val);
|
|
1317
1261
|
break;
|
|
1318
1262
|
}
|
|
1319
1263
|
case "ToClientTunnelMessage": {
|
|
1320
|
-
bare.writeU8(bc, 4);
|
|
1321
|
-
writeToClientTunnelMessage(bc, x.val);
|
|
1322
|
-
break;
|
|
1323
|
-
}
|
|
1324
|
-
case "ToClientPing": {
|
|
1325
1264
|
bare.writeU8(bc, 5);
|
|
1326
|
-
|
|
1265
|
+
writeToClientTunnelMessage(bc, x.val);
|
|
1327
1266
|
break;
|
|
1328
1267
|
}
|
|
1329
1268
|
}
|
|
@@ -1364,12 +1303,16 @@ function readToRunner(bc) {
|
|
|
1364
1303
|
case 0:
|
|
1365
1304
|
return { tag: "ToRunnerPing", val: readToRunnerPing(bc) };
|
|
1366
1305
|
case 1:
|
|
1367
|
-
return { tag: "
|
|
1306
|
+
return { tag: "ToClientInit", val: readToClientInit(bc) };
|
|
1368
1307
|
case 2:
|
|
1369
|
-
return { tag: "
|
|
1308
|
+
return { tag: "ToClientClose", val: null };
|
|
1370
1309
|
case 3:
|
|
1371
|
-
return { tag: "
|
|
1310
|
+
return { tag: "ToClientCommands", val: readToClientCommands(bc) };
|
|
1372
1311
|
case 4:
|
|
1312
|
+
return { tag: "ToClientAckEvents", val: readToClientAckEvents(bc) };
|
|
1313
|
+
case 5:
|
|
1314
|
+
return { tag: "ToClientKvResponse", val: readToClientKvResponse(bc) };
|
|
1315
|
+
case 6:
|
|
1373
1316
|
return { tag: "ToClientTunnelMessage", val: readToClientTunnelMessage(bc) };
|
|
1374
1317
|
default: {
|
|
1375
1318
|
bc.offset = offset;
|
|
@@ -1384,22 +1327,32 @@ function writeToRunner(bc, x) {
|
|
|
1384
1327
|
writeToRunnerPing(bc, x.val);
|
|
1385
1328
|
break;
|
|
1386
1329
|
}
|
|
1387
|
-
case "
|
|
1330
|
+
case "ToClientInit": {
|
|
1388
1331
|
bare.writeU8(bc, 1);
|
|
1332
|
+
writeToClientInit(bc, x.val);
|
|
1389
1333
|
break;
|
|
1390
1334
|
}
|
|
1391
|
-
case "
|
|
1335
|
+
case "ToClientClose": {
|
|
1392
1336
|
bare.writeU8(bc, 2);
|
|
1337
|
+
break;
|
|
1338
|
+
}
|
|
1339
|
+
case "ToClientCommands": {
|
|
1340
|
+
bare.writeU8(bc, 3);
|
|
1393
1341
|
writeToClientCommands(bc, x.val);
|
|
1394
1342
|
break;
|
|
1395
1343
|
}
|
|
1396
1344
|
case "ToClientAckEvents": {
|
|
1397
|
-
bare.writeU8(bc,
|
|
1345
|
+
bare.writeU8(bc, 4);
|
|
1398
1346
|
writeToClientAckEvents(bc, x.val);
|
|
1399
1347
|
break;
|
|
1400
1348
|
}
|
|
1349
|
+
case "ToClientKvResponse": {
|
|
1350
|
+
bare.writeU8(bc, 5);
|
|
1351
|
+
writeToClientKvResponse(bc, x.val);
|
|
1352
|
+
break;
|
|
1353
|
+
}
|
|
1401
1354
|
case "ToClientTunnelMessage": {
|
|
1402
|
-
bare.writeU8(bc,
|
|
1355
|
+
bare.writeU8(bc, 6);
|
|
1403
1356
|
writeToClientTunnelMessage(bc, x.val);
|
|
1404
1357
|
break;
|
|
1405
1358
|
}
|
|
@@ -1479,13 +1432,11 @@ function decodeToGateway(bytes) {
|
|
|
1479
1432
|
}
|
|
1480
1433
|
function readToServerlessServerInit(bc) {
|
|
1481
1434
|
return {
|
|
1482
|
-
runnerId: readId(bc)
|
|
1483
|
-
runnerProtocolVersion: bare.readU16(bc)
|
|
1435
|
+
runnerId: readId(bc)
|
|
1484
1436
|
};
|
|
1485
1437
|
}
|
|
1486
1438
|
function writeToServerlessServerInit(bc, x) {
|
|
1487
1439
|
writeId(bc, x.runnerId);
|
|
1488
|
-
bare.writeU16(bc, x.runnerProtocolVersion);
|
|
1489
1440
|
}
|
|
1490
1441
|
function readToServerlessServer(bc) {
|
|
1491
1442
|
const offset = bc.offset;
|
|
@@ -1527,20 +1478,16 @@ function decodeToServerlessServer(bytes) {
|
|
|
1527
1478
|
}
|
|
1528
1479
|
export {
|
|
1529
1480
|
StopCode,
|
|
1530
|
-
decodeActorCommandKeyData,
|
|
1531
1481
|
decodeToClient,
|
|
1532
1482
|
decodeToGateway,
|
|
1533
1483
|
decodeToRunner,
|
|
1534
1484
|
decodeToServer,
|
|
1535
1485
|
decodeToServerlessServer,
|
|
1536
|
-
encodeActorCommandKeyData,
|
|
1537
1486
|
encodeToClient,
|
|
1538
1487
|
encodeToGateway,
|
|
1539
1488
|
encodeToRunner,
|
|
1540
1489
|
encodeToServer,
|
|
1541
1490
|
encodeToServerlessServer,
|
|
1542
|
-
readActorCheckpoint,
|
|
1543
|
-
readActorCommandKeyData,
|
|
1544
1491
|
readActorConfig,
|
|
1545
1492
|
readActorIntent,
|
|
1546
1493
|
readActorName,
|
|
@@ -1584,7 +1531,6 @@ export {
|
|
|
1584
1531
|
readToClientCommands,
|
|
1585
1532
|
readToClientInit,
|
|
1586
1533
|
readToClientKvResponse,
|
|
1587
|
-
readToClientPing,
|
|
1588
1534
|
readToClientRequestChunk,
|
|
1589
1535
|
readToClientRequestStart,
|
|
1590
1536
|
readToClientTunnelMessage,
|
|
@@ -1601,7 +1547,7 @@ export {
|
|
|
1601
1547
|
readToServerEvents,
|
|
1602
1548
|
readToServerInit,
|
|
1603
1549
|
readToServerKvRequest,
|
|
1604
|
-
|
|
1550
|
+
readToServerPing,
|
|
1605
1551
|
readToServerResponseChunk,
|
|
1606
1552
|
readToServerResponseStart,
|
|
1607
1553
|
readToServerTunnelMessage,
|
|
@@ -1612,8 +1558,6 @@ export {
|
|
|
1612
1558
|
readToServerWebSocketOpen,
|
|
1613
1559
|
readToServerlessServer,
|
|
1614
1560
|
readToServerlessServerInit,
|
|
1615
|
-
writeActorCheckpoint,
|
|
1616
|
-
writeActorCommandKeyData,
|
|
1617
1561
|
writeActorConfig,
|
|
1618
1562
|
writeActorIntent,
|
|
1619
1563
|
writeActorName,
|
|
@@ -1657,7 +1601,6 @@ export {
|
|
|
1657
1601
|
writeToClientCommands,
|
|
1658
1602
|
writeToClientInit,
|
|
1659
1603
|
writeToClientKvResponse,
|
|
1660
|
-
writeToClientPing,
|
|
1661
1604
|
writeToClientRequestChunk,
|
|
1662
1605
|
writeToClientRequestStart,
|
|
1663
1606
|
writeToClientTunnelMessage,
|
|
@@ -1674,7 +1617,7 @@ export {
|
|
|
1674
1617
|
writeToServerEvents,
|
|
1675
1618
|
writeToServerInit,
|
|
1676
1619
|
writeToServerKvRequest,
|
|
1677
|
-
|
|
1620
|
+
writeToServerPing,
|
|
1678
1621
|
writeToServerResponseChunk,
|
|
1679
1622
|
writeToServerResponseStart,
|
|
1680
1623
|
writeToServerTunnelMessage,
|