@rivetkit/engine-envoy-protocol 0.0.0-pr.4976.6ab9cc9 → 0.0.0-raw-fetch-retry.e47ce6c

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 CHANGED
@@ -196,10 +196,13 @@ declare function readSqliteGetPagesRequest(bc: bare.ByteCursor): SqliteGetPagesR
196
196
  declare function writeSqliteGetPagesRequest(bc: bare.ByteCursor, x: SqliteGetPagesRequest): void;
197
197
  type SqliteGetPagesOk = {
198
198
  readonly pages: readonly SqliteFetchedPage[];
199
+ readonly headTxid: u64 | null;
199
200
  };
200
201
  declare function readSqliteGetPagesOk(bc: bare.ByteCursor): SqliteGetPagesOk;
201
202
  declare function writeSqliteGetPagesOk(bc: bare.ByteCursor, x: SqliteGetPagesOk): void;
202
203
  type SqliteErrorResponse = {
204
+ readonly group: string;
205
+ readonly code: string;
203
206
  readonly message: string;
204
207
  };
205
208
  declare function readSqliteErrorResponse(bc: bare.ByteCursor): SqliteErrorResponse;
@@ -223,7 +226,11 @@ type SqliteCommitRequest = {
223
226
  };
224
227
  declare function readSqliteCommitRequest(bc: bare.ByteCursor): SqliteCommitRequest;
225
228
  declare function writeSqliteCommitRequest(bc: bare.ByteCursor, x: SqliteCommitRequest): void;
226
- type SqliteCommitOk = null;
229
+ type SqliteCommitOk = {
230
+ readonly headTxid: u64 | null;
231
+ };
232
+ declare function readSqliteCommitOk(bc: bare.ByteCursor): SqliteCommitOk;
233
+ declare function writeSqliteCommitOk(bc: bare.ByteCursor, x: SqliteCommitOk): void;
227
234
  type SqliteCommitResponse = {
228
235
  readonly tag: "SqliteCommitOk";
229
236
  readonly val: SqliteCommitOk;
@@ -321,6 +328,20 @@ type SqliteExecuteRequest = {
321
328
  };
322
329
  declare function readSqliteExecuteRequest(bc: bare.ByteCursor): SqliteExecuteRequest;
323
330
  declare function writeSqliteExecuteRequest(bc: bare.ByteCursor, x: SqliteExecuteRequest): void;
331
+ type SqliteBatchStatement = {
332
+ readonly sql: string;
333
+ readonly params: readonly SqliteBindParam[] | null;
334
+ };
335
+ declare function readSqliteBatchStatement(bc: bare.ByteCursor): SqliteBatchStatement;
336
+ declare function writeSqliteBatchStatement(bc: bare.ByteCursor, x: SqliteBatchStatement): void;
337
+ type SqliteExecuteBatchRequest = {
338
+ readonly namespaceId: Id;
339
+ readonly actorId: Id;
340
+ readonly generation: SqliteGeneration;
341
+ readonly statements: readonly SqliteBatchStatement[];
342
+ };
343
+ declare function readSqliteExecuteBatchRequest(bc: bare.ByteCursor): SqliteExecuteBatchRequest;
344
+ declare function writeSqliteExecuteBatchRequest(bc: bare.ByteCursor, x: SqliteExecuteBatchRequest): void;
324
345
  type SqliteExecOk = {
325
346
  readonly result: SqliteQueryResult;
326
347
  };
@@ -331,6 +352,11 @@ type SqliteExecuteOk = {
331
352
  };
332
353
  declare function readSqliteExecuteOk(bc: bare.ByteCursor): SqliteExecuteOk;
333
354
  declare function writeSqliteExecuteOk(bc: bare.ByteCursor, x: SqliteExecuteOk): void;
355
+ type SqliteExecuteBatchOk = {
356
+ readonly results: readonly SqliteExecuteResult[];
357
+ };
358
+ declare function readSqliteExecuteBatchOk(bc: bare.ByteCursor): SqliteExecuteBatchOk;
359
+ declare function writeSqliteExecuteBatchOk(bc: bare.ByteCursor, x: SqliteExecuteBatchOk): void;
334
360
  type SqliteExecResponse = {
335
361
  readonly tag: "SqliteExecOk";
336
362
  readonly val: SqliteExecOk;
@@ -349,6 +375,15 @@ type SqliteExecuteResponse = {
349
375
  };
350
376
  declare function readSqliteExecuteResponse(bc: bare.ByteCursor): SqliteExecuteResponse;
351
377
  declare function writeSqliteExecuteResponse(bc: bare.ByteCursor, x: SqliteExecuteResponse): void;
378
+ type SqliteExecuteBatchResponse = {
379
+ readonly tag: "SqliteExecuteBatchOk";
380
+ readonly val: SqliteExecuteBatchOk;
381
+ } | {
382
+ readonly tag: "SqliteErrorResponse";
383
+ readonly val: SqliteErrorResponse;
384
+ };
385
+ declare function readSqliteExecuteBatchResponse(bc: bare.ByteCursor): SqliteExecuteBatchResponse;
386
+ declare function writeSqliteExecuteBatchResponse(bc: bare.ByteCursor, x: SqliteExecuteBatchResponse): void;
352
387
  /**
353
388
  * Core
354
389
  */
@@ -538,11 +573,20 @@ declare function writeMessageId(bc: bare.ByteCursor, x: MessageId): void;
538
573
  */
539
574
  type ToEnvoyRequestStart = {
540
575
  readonly actorId: Id;
576
+ /**
577
+ * Exact actor generation selected by Gateway 3. Legacy Gateway 2 requests
578
+ * omit this and retain highest-live-generation routing.
579
+ */
580
+ readonly actorGeneration: u32 | null;
541
581
  readonly method: string;
542
582
  readonly path: string;
543
583
  readonly headers: ReadonlyMap<string, string>;
544
584
  readonly body: ArrayBuffer | null;
545
585
  readonly stream: boolean;
586
+ /**
587
+ * Whether the gateway can accept a streamed response body.
588
+ */
589
+ readonly responseStream: boolean;
546
590
  };
547
591
  declare function readToEnvoyRequestStart(bc: bare.ByteCursor): ToEnvoyRequestStart;
548
592
  declare function writeToEnvoyRequestStart(bc: bare.ByteCursor, x: ToEnvoyRequestStart): void;
@@ -552,7 +596,49 @@ type ToEnvoyRequestChunk = {
552
596
  };
553
597
  declare function readToEnvoyRequestChunk(bc: bare.ByteCursor): ToEnvoyRequestChunk;
554
598
  declare function writeToEnvoyRequestChunk(bc: bare.ByteCursor, x: ToEnvoyRequestChunk): void;
555
- type ToEnvoyRequestAbort = null;
599
+ /**
600
+ * Cumulative request-body bytes consumed by the actor handler. This restores
601
+ * sender credit without requiring one acknowledgement per chunk.
602
+ */
603
+ type ToRivetRequestBodyWindowUpdate = {
604
+ readonly consumedBytes: u64;
605
+ };
606
+ declare function readToRivetRequestBodyWindowUpdate(bc: bare.ByteCursor): ToRivetRequestBodyWindowUpdate;
607
+ declare function writeToRivetRequestBodyWindowUpdate(bc: bare.ByteCursor, x: ToRivetRequestBodyWindowUpdate): void;
608
+ /**
609
+ * The actor handler no longer wants request-body bytes. The HTTP response may
610
+ * still continue normally.
611
+ */
612
+ type ToRivetRequestBodyCancel = null;
613
+ declare enum HttpStreamAbortReasonKind {
614
+ Unknown = "Unknown",
615
+ Cancelled = "Cancelled",
616
+ HandlerError = "HandlerError",
617
+ InternalError = "InternalError"
618
+ }
619
+ declare function readHttpStreamAbortReasonKind(bc: bare.ByteCursor): HttpStreamAbortReasonKind;
620
+ declare function writeHttpStreamAbortReasonKind(bc: bare.ByteCursor, x: HttpStreamAbortReasonKind): void;
621
+ type HttpStreamAbortReason = {
622
+ readonly kind: HttpStreamAbortReasonKind;
623
+ readonly detail: string | null;
624
+ };
625
+ declare function readHttpStreamAbortReason(bc: bare.ByteCursor): HttpStreamAbortReason;
626
+ declare function writeHttpStreamAbortReason(bc: bare.ByteCursor, x: HttpStreamAbortReason): void;
627
+ type ToEnvoyRequestAbort = {
628
+ /**
629
+ * Exact admission identity. Gateway 3 always sets both fields so Envoy can
630
+ * suppress a delayed RequestStart after an indeterminate handoff.
631
+ */
632
+ readonly actorId: Id | null;
633
+ readonly actorGeneration: u32 | null;
634
+ readonly reason: HttpStreamAbortReason;
635
+ };
636
+ declare function readToEnvoyRequestAbort(bc: bare.ByteCursor): ToEnvoyRequestAbort;
637
+ declare function writeToEnvoyRequestAbort(bc: bare.ByteCursor, x: ToEnvoyRequestAbort): void;
638
+ /**
639
+ * Stop the actor-side request body without cancelling the HTTP response.
640
+ */
641
+ type ToEnvoyRequestBodyCancel = null;
556
642
  type ToRivetResponseStart = {
557
643
  readonly status: u16;
558
644
  readonly headers: ReadonlyMap<string, string>;
@@ -567,12 +653,30 @@ type ToRivetResponseChunk = {
567
653
  };
568
654
  declare function readToRivetResponseChunk(bc: bare.ByteCursor): ToRivetResponseChunk;
569
655
  declare function writeToRivetResponseChunk(bc: bare.ByteCursor, x: ToRivetResponseChunk): void;
570
- type ToRivetResponseAbort = null;
656
+ /**
657
+ * Cumulative response-body bytes consumed by the gateway client. This restores
658
+ * sender credit without requiring one acknowledgement per chunk.
659
+ */
660
+ type ToEnvoyResponseBodyWindowUpdate = {
661
+ readonly consumedBytes: u64;
662
+ };
663
+ declare function readToEnvoyResponseBodyWindowUpdate(bc: bare.ByteCursor): ToEnvoyResponseBodyWindowUpdate;
664
+ declare function writeToEnvoyResponseBodyWindowUpdate(bc: bare.ByteCursor, x: ToEnvoyResponseBodyWindowUpdate): void;
665
+ type ToRivetResponseAbort = {
666
+ readonly reason: HttpStreamAbortReason;
667
+ };
668
+ declare function readToRivetResponseAbort(bc: bare.ByteCursor): ToRivetResponseAbort;
669
+ declare function writeToRivetResponseAbort(bc: bare.ByteCursor, x: ToRivetResponseAbort): void;
571
670
  /**
572
671
  * WebSocket
573
672
  */
574
673
  type ToEnvoyWebSocketOpen = {
575
674
  readonly actorId: Id;
675
+ /**
676
+ * Exact actor generation selected by Gateway 3. Legacy Gateway 2 requests
677
+ * omit this and retain highest-live-generation routing.
678
+ */
679
+ readonly actorGeneration: u32 | null;
576
680
  readonly path: string;
577
681
  readonly headers: ReadonlyMap<string, string>;
578
682
  };
@@ -629,6 +733,12 @@ type ToRivetTunnelMessageKind =
629
733
  } | {
630
734
  readonly tag: "ToRivetResponseAbort";
631
735
  readonly val: ToRivetResponseAbort;
736
+ } | {
737
+ readonly tag: "ToRivetRequestBodyWindowUpdate";
738
+ readonly val: ToRivetRequestBodyWindowUpdate;
739
+ } | {
740
+ readonly tag: "ToRivetRequestBodyCancel";
741
+ readonly val: ToRivetRequestBodyCancel;
632
742
  }
633
743
  /**
634
744
  * WebSocket
@@ -670,6 +780,12 @@ type ToEnvoyTunnelMessageKind =
670
780
  } | {
671
781
  readonly tag: "ToEnvoyRequestAbort";
672
782
  readonly val: ToEnvoyRequestAbort;
783
+ } | {
784
+ readonly tag: "ToEnvoyRequestBodyCancel";
785
+ readonly val: ToEnvoyRequestBodyCancel;
786
+ } | {
787
+ readonly tag: "ToEnvoyResponseBodyWindowUpdate";
788
+ readonly val: ToEnvoyResponseBodyWindowUpdate;
673
789
  }
674
790
  /**
675
791
  * WebSocket
@@ -751,6 +867,12 @@ type ToRivetSqliteExecuteRequest = {
751
867
  };
752
868
  declare function readToRivetSqliteExecuteRequest(bc: bare.ByteCursor): ToRivetSqliteExecuteRequest;
753
869
  declare function writeToRivetSqliteExecuteRequest(bc: bare.ByteCursor, x: ToRivetSqliteExecuteRequest): void;
870
+ type ToRivetSqliteExecuteBatchRequest = {
871
+ readonly requestId: u32;
872
+ readonly data: SqliteExecuteBatchRequest;
873
+ };
874
+ declare function readToRivetSqliteExecuteBatchRequest(bc: bare.ByteCursor): ToRivetSqliteExecuteBatchRequest;
875
+ declare function writeToRivetSqliteExecuteBatchRequest(bc: bare.ByteCursor, x: ToRivetSqliteExecuteBatchRequest): void;
754
876
  type ToRivet = {
755
877
  readonly tag: "ToRivetMetadata";
756
878
  readonly val: ToRivetMetadata;
@@ -784,6 +906,9 @@ type ToRivet = {
784
906
  } | {
785
907
  readonly tag: "ToRivetSqliteExecuteRequest";
786
908
  readonly val: ToRivetSqliteExecuteRequest;
909
+ } | {
910
+ readonly tag: "ToRivetSqliteExecuteBatchRequest";
911
+ readonly val: ToRivetSqliteExecuteBatchRequest;
787
912
  };
788
913
  declare function readToRivet(bc: bare.ByteCursor): ToRivet;
789
914
  declare function writeToRivet(bc: bare.ByteCursor, x: ToRivet): void;
@@ -842,6 +967,12 @@ type ToEnvoySqliteExecuteResponse = {
842
967
  };
843
968
  declare function readToEnvoySqliteExecuteResponse(bc: bare.ByteCursor): ToEnvoySqliteExecuteResponse;
844
969
  declare function writeToEnvoySqliteExecuteResponse(bc: bare.ByteCursor, x: ToEnvoySqliteExecuteResponse): void;
970
+ type ToEnvoySqliteExecuteBatchResponse = {
971
+ readonly requestId: u32;
972
+ readonly data: SqliteExecuteBatchResponse;
973
+ };
974
+ declare function readToEnvoySqliteExecuteBatchResponse(bc: bare.ByteCursor): ToEnvoySqliteExecuteBatchResponse;
975
+ declare function writeToEnvoySqliteExecuteBatchResponse(bc: bare.ByteCursor, x: ToEnvoySqliteExecuteBatchResponse): void;
845
976
  type ToEnvoy = {
846
977
  readonly tag: "ToEnvoyInit";
847
978
  readonly val: ToEnvoyInit;
@@ -872,6 +1003,9 @@ type ToEnvoy = {
872
1003
  } | {
873
1004
  readonly tag: "ToEnvoySqliteExecuteResponse";
874
1005
  readonly val: ToEnvoySqliteExecuteResponse;
1006
+ } | {
1007
+ readonly tag: "ToEnvoySqliteExecuteBatchResponse";
1008
+ readonly val: ToEnvoySqliteExecuteBatchResponse;
875
1009
  };
876
1010
  declare function readToEnvoy(bc: bare.ByteCursor): ToEnvoy;
877
1011
  declare function writeToEnvoy(bc: bare.ByteCursor, x: ToEnvoy): void;
@@ -947,6 +1081,6 @@ declare function readToOutbound(bc: bare.ByteCursor): ToOutbound;
947
1081
  declare function writeToOutbound(bc: bare.ByteCursor, x: ToOutbound): void;
948
1082
  declare function encodeToOutbound(x: ToOutbound, config?: Partial<bare.Config>): Uint8Array;
949
1083
  declare function decodeToOutbound(bytes: Uint8Array): ToOutbound;
950
- declare const VERSION = 4;
1084
+ declare const VERSION = 7;
951
1085
 
952
- export { type ActorCheckpoint, type ActorCommandKeyData, 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 GatewayId, type HibernatingRequest, type Id, type Json, type KvDeleteRangeRequest, 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 PreloadedKv, type PreloadedKvEntry, type ProtocolMetadata, type RequestId, type SqliteBindParam, type SqliteColumnValue, type SqliteCommitOk, type SqliteCommitRequest, type SqliteCommitResponse, type SqliteDirtyPage, type SqliteErrorResponse, type SqliteExecOk, type SqliteExecRequest, type SqliteExecResponse, type SqliteExecuteOk, type SqliteExecuteRequest, type SqliteExecuteResponse, type SqliteExecuteResult, type SqliteFetchedPage, type SqliteGeneration, type SqliteGetPagesOk, type SqliteGetPagesRequest, type SqliteGetPagesResponse, type SqlitePageBytes, type SqlitePgno, type SqliteQueryResult, type SqliteValueBlob, type SqliteValueFloat, type SqliteValueInteger, type SqliteValueNull, type SqliteValueText, StopActorReason, StopCode, type ToEnvoy, type ToEnvoyAckEvents, type ToEnvoyCommands, type ToEnvoyConn, type ToEnvoyConnClose, type ToEnvoyConnPing, type ToEnvoyInit, type ToEnvoyKvResponse, type ToEnvoyPing, type ToEnvoyRequestAbort, type ToEnvoyRequestChunk, type ToEnvoyRequestStart, type ToEnvoySqliteCommitResponse, type ToEnvoySqliteExecResponse, type ToEnvoySqliteExecuteResponse, type ToEnvoySqliteGetPagesResponse, type ToEnvoyTunnelMessage, type ToEnvoyTunnelMessageKind, type ToEnvoyWebSocketClose, type ToEnvoyWebSocketMessage, type ToEnvoyWebSocketOpen, type ToGateway, type ToGatewayPong, type ToOutbound, type ToOutboundActorStart, type ToRivet, type ToRivetAckCommands, type ToRivetEvents, type ToRivetKvRequest, type ToRivetMetadata, type ToRivetPong, type ToRivetResponseAbort, type ToRivetResponseChunk, type ToRivetResponseStart, type ToRivetSqliteCommitRequest, type ToRivetSqliteExecRequest, type ToRivetSqliteExecuteRequest, type ToRivetSqliteGetPagesRequest, type ToRivetStopping, type ToRivetTunnelMessage, type ToRivetTunnelMessageKind, type ToRivetWebSocketClose, type ToRivetWebSocketMessage, type ToRivetWebSocketMessageAck, type ToRivetWebSocketOpen, VERSION, decodeActorCommandKeyData, decodeToEnvoy, decodeToEnvoyConn, decodeToGateway, decodeToOutbound, decodeToRivet, encodeActorCommandKeyData, encodeToEnvoy, encodeToEnvoyConn, encodeToGateway, encodeToOutbound, encodeToRivet, type i64, readActorCheckpoint, readActorCommandKeyData, readActorConfig, readActorIntent, readActorName, readActorState, readActorStateStopped, readCommand, readCommandStartActor, readCommandStopActor, readCommandWrapper, readEvent, readEventActorIntent, readEventActorSetAlarm, readEventActorStateUpdate, readEventWrapper, readGatewayId, readHibernatingRequest, readId, readJson, readKvDeleteRangeRequest, readKvDeleteRequest, readKvErrorResponse, readKvGetRequest, readKvGetResponse, readKvKey, readKvListPrefixQuery, readKvListQuery, readKvListRangeQuery, readKvListRequest, readKvListResponse, readKvMetadata, readKvPutRequest, readKvRequestData, readKvResponseData, readKvValue, readMessageId, readMessageIndex, readPreloadedKv, readPreloadedKvEntry, readProtocolMetadata, readRequestId, readSqliteBindParam, readSqliteColumnValue, readSqliteCommitRequest, readSqliteCommitResponse, readSqliteDirtyPage, readSqliteErrorResponse, readSqliteExecOk, readSqliteExecRequest, readSqliteExecResponse, readSqliteExecuteOk, readSqliteExecuteRequest, readSqliteExecuteResponse, readSqliteExecuteResult, readSqliteFetchedPage, readSqliteGeneration, readSqliteGetPagesOk, readSqliteGetPagesRequest, readSqliteGetPagesResponse, readSqlitePageBytes, readSqlitePgno, readSqliteQueryResult, readSqliteValueBlob, readSqliteValueFloat, readSqliteValueInteger, readSqliteValueText, readStopActorReason, readStopCode, readToEnvoy, readToEnvoyAckEvents, readToEnvoyCommands, readToEnvoyConn, readToEnvoyConnPing, readToEnvoyInit, readToEnvoyKvResponse, readToEnvoyPing, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoySqliteCommitResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetResponseChunk, readToRivetResponseStart, readToRivetSqliteCommitRequest, readToRivetSqliteExecRequest, readToRivetSqliteExecuteRequest, readToRivetSqliteGetPagesRequest, readToRivetTunnelMessage, readToRivetTunnelMessageKind, readToRivetWebSocketClose, readToRivetWebSocketMessage, readToRivetWebSocketMessageAck, readToRivetWebSocketOpen, type u16, type u32, type u64, writeActorCheckpoint, writeActorCommandKeyData, writeActorConfig, writeActorIntent, writeActorName, writeActorState, writeActorStateStopped, writeCommand, writeCommandStartActor, writeCommandStopActor, writeCommandWrapper, writeEvent, writeEventActorIntent, writeEventActorSetAlarm, writeEventActorStateUpdate, writeEventWrapper, writeGatewayId, writeHibernatingRequest, writeId, writeJson, writeKvDeleteRangeRequest, writeKvDeleteRequest, writeKvErrorResponse, writeKvGetRequest, writeKvGetResponse, writeKvKey, writeKvListPrefixQuery, writeKvListQuery, writeKvListRangeQuery, writeKvListRequest, writeKvListResponse, writeKvMetadata, writeKvPutRequest, writeKvRequestData, writeKvResponseData, writeKvValue, writeMessageId, writeMessageIndex, writePreloadedKv, writePreloadedKvEntry, writeProtocolMetadata, writeRequestId, writeSqliteBindParam, writeSqliteColumnValue, writeSqliteCommitRequest, writeSqliteCommitResponse, writeSqliteDirtyPage, writeSqliteErrorResponse, writeSqliteExecOk, writeSqliteExecRequest, writeSqliteExecResponse, writeSqliteExecuteOk, writeSqliteExecuteRequest, writeSqliteExecuteResponse, writeSqliteExecuteResult, writeSqliteFetchedPage, writeSqliteGeneration, writeSqliteGetPagesOk, writeSqliteGetPagesRequest, writeSqliteGetPagesResponse, writeSqlitePageBytes, writeSqlitePgno, writeSqliteQueryResult, writeSqliteValueBlob, writeSqliteValueFloat, writeSqliteValueInteger, writeSqliteValueText, writeStopActorReason, writeStopCode, writeToEnvoy, writeToEnvoyAckEvents, writeToEnvoyCommands, writeToEnvoyConn, writeToEnvoyConnPing, writeToEnvoyInit, writeToEnvoyKvResponse, writeToEnvoyPing, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
1086
+ export { type ActorCheckpoint, type ActorCommandKeyData, 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 GatewayId, type HibernatingRequest, type HttpStreamAbortReason, HttpStreamAbortReasonKind, type Id, type Json, type KvDeleteRangeRequest, 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 PreloadedKv, type PreloadedKvEntry, type ProtocolMetadata, type RequestId, type SqliteBatchStatement, type SqliteBindParam, type SqliteColumnValue, type SqliteCommitOk, type SqliteCommitRequest, type SqliteCommitResponse, type SqliteDirtyPage, type SqliteErrorResponse, type SqliteExecOk, type SqliteExecRequest, type SqliteExecResponse, type SqliteExecuteBatchOk, type SqliteExecuteBatchRequest, type SqliteExecuteBatchResponse, type SqliteExecuteOk, type SqliteExecuteRequest, type SqliteExecuteResponse, type SqliteExecuteResult, type SqliteFetchedPage, type SqliteGeneration, type SqliteGetPagesOk, type SqliteGetPagesRequest, type SqliteGetPagesResponse, type SqlitePageBytes, type SqlitePgno, type SqliteQueryResult, type SqliteValueBlob, type SqliteValueFloat, type SqliteValueInteger, type SqliteValueNull, type SqliteValueText, StopActorReason, StopCode, type ToEnvoy, type ToEnvoyAckEvents, type ToEnvoyCommands, type ToEnvoyConn, type ToEnvoyConnClose, type ToEnvoyConnPing, type ToEnvoyInit, type ToEnvoyKvResponse, type ToEnvoyPing, type ToEnvoyRequestAbort, type ToEnvoyRequestBodyCancel, type ToEnvoyRequestChunk, type ToEnvoyRequestStart, type ToEnvoyResponseBodyWindowUpdate, type ToEnvoySqliteCommitResponse, type ToEnvoySqliteExecResponse, type ToEnvoySqliteExecuteBatchResponse, type ToEnvoySqliteExecuteResponse, type ToEnvoySqliteGetPagesResponse, type ToEnvoyTunnelMessage, type ToEnvoyTunnelMessageKind, type ToEnvoyWebSocketClose, type ToEnvoyWebSocketMessage, type ToEnvoyWebSocketOpen, type ToGateway, type ToGatewayPong, type ToOutbound, type ToOutboundActorStart, type ToRivet, type ToRivetAckCommands, type ToRivetEvents, type ToRivetKvRequest, type ToRivetMetadata, type ToRivetPong, type ToRivetRequestBodyCancel, type ToRivetRequestBodyWindowUpdate, type ToRivetResponseAbort, type ToRivetResponseChunk, type ToRivetResponseStart, type ToRivetSqliteCommitRequest, type ToRivetSqliteExecRequest, type ToRivetSqliteExecuteBatchRequest, type ToRivetSqliteExecuteRequest, type ToRivetSqliteGetPagesRequest, type ToRivetStopping, type ToRivetTunnelMessage, type ToRivetTunnelMessageKind, type ToRivetWebSocketClose, type ToRivetWebSocketMessage, type ToRivetWebSocketMessageAck, type ToRivetWebSocketOpen, VERSION, decodeActorCommandKeyData, decodeToEnvoy, decodeToEnvoyConn, decodeToGateway, decodeToOutbound, decodeToRivet, encodeActorCommandKeyData, encodeToEnvoy, encodeToEnvoyConn, encodeToGateway, encodeToOutbound, encodeToRivet, type i64, readActorCheckpoint, readActorCommandKeyData, readActorConfig, readActorIntent, readActorName, readActorState, readActorStateStopped, readCommand, readCommandStartActor, readCommandStopActor, readCommandWrapper, readEvent, readEventActorIntent, readEventActorSetAlarm, readEventActorStateUpdate, readEventWrapper, readGatewayId, readHibernatingRequest, readHttpStreamAbortReason, readHttpStreamAbortReasonKind, readId, readJson, readKvDeleteRangeRequest, readKvDeleteRequest, readKvErrorResponse, readKvGetRequest, readKvGetResponse, readKvKey, readKvListPrefixQuery, readKvListQuery, readKvListRangeQuery, readKvListRequest, readKvListResponse, readKvMetadata, readKvPutRequest, readKvRequestData, readKvResponseData, readKvValue, readMessageId, readMessageIndex, readPreloadedKv, readPreloadedKvEntry, readProtocolMetadata, readRequestId, readSqliteBatchStatement, readSqliteBindParam, readSqliteColumnValue, readSqliteCommitOk, readSqliteCommitRequest, readSqliteCommitResponse, readSqliteDirtyPage, readSqliteErrorResponse, readSqliteExecOk, readSqliteExecRequest, readSqliteExecResponse, readSqliteExecuteBatchOk, readSqliteExecuteBatchRequest, readSqliteExecuteBatchResponse, readSqliteExecuteOk, readSqliteExecuteRequest, readSqliteExecuteResponse, readSqliteExecuteResult, readSqliteFetchedPage, readSqliteGeneration, readSqliteGetPagesOk, readSqliteGetPagesRequest, readSqliteGetPagesResponse, readSqlitePageBytes, readSqlitePgno, readSqliteQueryResult, readSqliteValueBlob, readSqliteValueFloat, readSqliteValueInteger, readSqliteValueText, readStopActorReason, readStopCode, readToEnvoy, readToEnvoyAckEvents, readToEnvoyCommands, readToEnvoyConn, readToEnvoyConnPing, readToEnvoyInit, readToEnvoyKvResponse, readToEnvoyPing, readToEnvoyRequestAbort, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoyResponseBodyWindowUpdate, readToEnvoySqliteCommitResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteBatchResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetRequestBodyWindowUpdate, readToRivetResponseAbort, readToRivetResponseChunk, readToRivetResponseStart, readToRivetSqliteCommitRequest, readToRivetSqliteExecRequest, readToRivetSqliteExecuteBatchRequest, readToRivetSqliteExecuteRequest, readToRivetSqliteGetPagesRequest, readToRivetTunnelMessage, readToRivetTunnelMessageKind, readToRivetWebSocketClose, readToRivetWebSocketMessage, readToRivetWebSocketMessageAck, readToRivetWebSocketOpen, type u16, type u32, type u64, writeActorCheckpoint, writeActorCommandKeyData, writeActorConfig, writeActorIntent, writeActorName, writeActorState, writeActorStateStopped, writeCommand, writeCommandStartActor, writeCommandStopActor, writeCommandWrapper, writeEvent, writeEventActorIntent, writeEventActorSetAlarm, writeEventActorStateUpdate, writeEventWrapper, writeGatewayId, writeHibernatingRequest, writeHttpStreamAbortReason, writeHttpStreamAbortReasonKind, writeId, writeJson, writeKvDeleteRangeRequest, writeKvDeleteRequest, writeKvErrorResponse, writeKvGetRequest, writeKvGetResponse, writeKvKey, writeKvListPrefixQuery, writeKvListQuery, writeKvListRangeQuery, writeKvListRequest, writeKvListResponse, writeKvMetadata, writeKvPutRequest, writeKvRequestData, writeKvResponseData, writeKvValue, writeMessageId, writeMessageIndex, writePreloadedKv, writePreloadedKvEntry, writeProtocolMetadata, writeRequestId, writeSqliteBatchStatement, writeSqliteBindParam, writeSqliteColumnValue, writeSqliteCommitOk, writeSqliteCommitRequest, writeSqliteCommitResponse, writeSqliteDirtyPage, writeSqliteErrorResponse, writeSqliteExecOk, writeSqliteExecRequest, writeSqliteExecResponse, writeSqliteExecuteBatchOk, writeSqliteExecuteBatchRequest, writeSqliteExecuteBatchResponse, writeSqliteExecuteOk, writeSqliteExecuteRequest, writeSqliteExecuteResponse, writeSqliteExecuteResult, writeSqliteFetchedPage, writeSqliteGeneration, writeSqliteGetPagesOk, writeSqliteGetPagesRequest, writeSqliteGetPagesResponse, writeSqlitePageBytes, writeSqlitePgno, writeSqliteQueryResult, writeSqliteValueBlob, writeSqliteValueFloat, writeSqliteValueInteger, writeSqliteValueText, writeStopActorReason, writeStopCode, writeToEnvoy, writeToEnvoyAckEvents, writeToEnvoyCommands, writeToEnvoyConn, writeToEnvoyConnPing, writeToEnvoyInit, writeToEnvoyKvResponse, writeToEnvoyPing, writeToEnvoyRequestAbort, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoyResponseBodyWindowUpdate, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteBatchResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetRequestBodyWindowUpdate, writeToRivetResponseAbort, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteBatchRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
package/dist/index.js CHANGED
@@ -463,18 +463,24 @@ function write7(bc, x) {
463
463
  }
464
464
  function readSqliteGetPagesOk(bc) {
465
465
  return {
466
- pages: read7(bc)
466
+ pages: read7(bc),
467
+ headTxid: read2(bc)
467
468
  };
468
469
  }
469
470
  function writeSqliteGetPagesOk(bc, x) {
470
471
  write7(bc, x.pages);
472
+ write2(bc, x.headTxid);
471
473
  }
472
474
  function readSqliteErrorResponse(bc) {
473
475
  return {
476
+ group: bare.readString(bc),
477
+ code: bare.readString(bc),
474
478
  message: bare.readString(bc)
475
479
  };
476
480
  }
477
481
  function writeSqliteErrorResponse(bc, x) {
482
+ bare.writeString(bc, x.group);
483
+ bare.writeString(bc, x.code);
478
484
  bare.writeString(bc, x.message);
479
485
  }
480
486
  function readSqliteGetPagesResponse(bc) {
@@ -540,12 +546,20 @@ function writeSqliteCommitRequest(bc, x) {
540
546
  write2(bc, x.expectedGeneration);
541
547
  write2(bc, x.expectedHeadTxid);
542
548
  }
549
+ function readSqliteCommitOk(bc) {
550
+ return {
551
+ headTxid: read2(bc)
552
+ };
553
+ }
554
+ function writeSqliteCommitOk(bc, x) {
555
+ write2(bc, x.headTxid);
556
+ }
543
557
  function readSqliteCommitResponse(bc) {
544
558
  const offset = bc.offset;
545
559
  const tag = bare.readU8(bc);
546
560
  switch (tag) {
547
561
  case 0:
548
- return { tag: "SqliteCommitOk", val: null };
562
+ return { tag: "SqliteCommitOk", val: readSqliteCommitOk(bc) };
549
563
  case 1:
550
564
  return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
551
565
  default: {
@@ -558,6 +572,7 @@ function writeSqliteCommitResponse(bc, x) {
558
572
  switch (x.tag) {
559
573
  case "SqliteCommitOk": {
560
574
  bare.writeU8(bc, 0);
575
+ writeSqliteCommitOk(bc, x.val);
561
576
  break;
562
577
  }
563
578
  case "SqliteErrorResponse": {
@@ -838,6 +853,47 @@ function writeSqliteExecuteRequest(bc, x) {
838
853
  bare.writeString(bc, x.sql);
839
854
  write14(bc, x.params);
840
855
  }
856
+ function readSqliteBatchStatement(bc) {
857
+ return {
858
+ sql: bare.readString(bc),
859
+ params: read14(bc)
860
+ };
861
+ }
862
+ function writeSqliteBatchStatement(bc, x) {
863
+ bare.writeString(bc, x.sql);
864
+ write14(bc, x.params);
865
+ }
866
+ function read15(bc) {
867
+ const len = bare.readUintSafe(bc);
868
+ if (len === 0) {
869
+ return [];
870
+ }
871
+ const result = [readSqliteBatchStatement(bc)];
872
+ for (let i = 1; i < len; i++) {
873
+ result[i] = readSqliteBatchStatement(bc);
874
+ }
875
+ return result;
876
+ }
877
+ function write15(bc, x) {
878
+ bare.writeUintSafe(bc, x.length);
879
+ for (let i = 0; i < x.length; i++) {
880
+ writeSqliteBatchStatement(bc, x[i]);
881
+ }
882
+ }
883
+ function readSqliteExecuteBatchRequest(bc) {
884
+ return {
885
+ namespaceId: readId(bc),
886
+ actorId: readId(bc),
887
+ generation: readSqliteGeneration(bc),
888
+ statements: read15(bc)
889
+ };
890
+ }
891
+ function writeSqliteExecuteBatchRequest(bc, x) {
892
+ writeId(bc, x.namespaceId);
893
+ writeId(bc, x.actorId);
894
+ writeSqliteGeneration(bc, x.generation);
895
+ write15(bc, x.statements);
896
+ }
841
897
  function readSqliteExecOk(bc) {
842
898
  return {
843
899
  result: readSqliteQueryResult(bc)
@@ -854,6 +910,31 @@ function readSqliteExecuteOk(bc) {
854
910
  function writeSqliteExecuteOk(bc, x) {
855
911
  writeSqliteExecuteResult(bc, x.result);
856
912
  }
913
+ function read16(bc) {
914
+ const len = bare.readUintSafe(bc);
915
+ if (len === 0) {
916
+ return [];
917
+ }
918
+ const result = [readSqliteExecuteResult(bc)];
919
+ for (let i = 1; i < len; i++) {
920
+ result[i] = readSqliteExecuteResult(bc);
921
+ }
922
+ return result;
923
+ }
924
+ function write16(bc, x) {
925
+ bare.writeUintSafe(bc, x.length);
926
+ for (let i = 0; i < x.length; i++) {
927
+ writeSqliteExecuteResult(bc, x[i]);
928
+ }
929
+ }
930
+ function readSqliteExecuteBatchOk(bc) {
931
+ return {
932
+ results: read16(bc)
933
+ };
934
+ }
935
+ function writeSqliteExecuteBatchOk(bc, x) {
936
+ write16(bc, x.results);
937
+ }
857
938
  function readSqliteExecResponse(bc) {
858
939
  const offset = bc.offset;
859
940
  const tag = bare.readU8(bc);
@@ -910,6 +991,34 @@ function writeSqliteExecuteResponse(bc, x) {
910
991
  }
911
992
  }
912
993
  }
994
+ function readSqliteExecuteBatchResponse(bc) {
995
+ const offset = bc.offset;
996
+ const tag = bare.readU8(bc);
997
+ switch (tag) {
998
+ case 0:
999
+ return { tag: "SqliteExecuteBatchOk", val: readSqliteExecuteBatchOk(bc) };
1000
+ case 1:
1001
+ return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
1002
+ default: {
1003
+ bc.offset = offset;
1004
+ throw new bare.BareError(offset, "invalid tag");
1005
+ }
1006
+ }
1007
+ }
1008
+ function writeSqliteExecuteBatchResponse(bc, x) {
1009
+ switch (x.tag) {
1010
+ case "SqliteExecuteBatchOk": {
1011
+ bare.writeU8(bc, 0);
1012
+ writeSqliteExecuteBatchOk(bc, x.val);
1013
+ break;
1014
+ }
1015
+ case "SqliteErrorResponse": {
1016
+ bare.writeU8(bc, 1);
1017
+ writeSqliteErrorResponse(bc, x.val);
1018
+ break;
1019
+ }
1020
+ }
1021
+ }
913
1022
  var StopCode = /* @__PURE__ */ ((StopCode2) => {
914
1023
  StopCode2["Ok"] = "Ok";
915
1024
  StopCode2["Error"] = "Error";
@@ -949,19 +1058,19 @@ function readActorName(bc) {
949
1058
  function writeActorName(bc, x) {
950
1059
  writeJson(bc, x.metadata);
951
1060
  }
952
- function read15(bc) {
1061
+ function read17(bc) {
953
1062
  return bare.readBool(bc) ? bare.readString(bc) : null;
954
1063
  }
955
- function write15(bc, x) {
1064
+ function write17(bc, x) {
956
1065
  bare.writeBool(bc, x != null);
957
1066
  if (x != null) {
958
1067
  bare.writeString(bc, x);
959
1068
  }
960
1069
  }
961
- function read16(bc) {
1070
+ function read18(bc) {
962
1071
  return bare.readBool(bc) ? bare.readData(bc) : null;
963
1072
  }
964
- function write16(bc, x) {
1073
+ function write18(bc, x) {
965
1074
  bare.writeBool(bc, x != null);
966
1075
  if (x != null) {
967
1076
  bare.writeData(bc, x);
@@ -970,16 +1079,16 @@ function write16(bc, x) {
970
1079
  function readActorConfig(bc) {
971
1080
  return {
972
1081
  name: bare.readString(bc),
973
- key: read15(bc),
1082
+ key: read17(bc),
974
1083
  createTs: bare.readI64(bc),
975
- input: read16(bc)
1084
+ input: read18(bc)
976
1085
  };
977
1086
  }
978
1087
  function writeActorConfig(bc, x) {
979
1088
  bare.writeString(bc, x.name);
980
- write15(bc, x.key);
1089
+ write17(bc, x.key);
981
1090
  bare.writeI64(bc, x.createTs);
982
- write16(bc, x.input);
1091
+ write18(bc, x.input);
983
1092
  }
984
1093
  function readActorCheckpoint(bc) {
985
1094
  return {
@@ -1022,12 +1131,12 @@ function writeActorIntent(bc, x) {
1022
1131
  function readActorStateStopped(bc) {
1023
1132
  return {
1024
1133
  code: readStopCode(bc),
1025
- message: read15(bc)
1134
+ message: read17(bc)
1026
1135
  };
1027
1136
  }
1028
1137
  function writeActorStateStopped(bc, x) {
1029
1138
  writeStopCode(bc, x.code);
1030
- write15(bc, x.message);
1139
+ write17(bc, x.message);
1031
1140
  }
1032
1141
  function readActorState(bc) {
1033
1142
  const offset = bc.offset;
@@ -1137,7 +1246,7 @@ function writePreloadedKvEntry(bc, x) {
1137
1246
  writeKvValue(bc, x.value);
1138
1247
  writeKvMetadata(bc, x.metadata);
1139
1248
  }
1140
- function read17(bc) {
1249
+ function read19(bc) {
1141
1250
  const len = bare.readUintSafe(bc);
1142
1251
  if (len === 0) {
1143
1252
  return [];
@@ -1148,7 +1257,7 @@ function read17(bc) {
1148
1257
  }
1149
1258
  return result;
1150
1259
  }
1151
- function write17(bc, x) {
1260
+ function write19(bc, x) {
1152
1261
  bare.writeUintSafe(bc, x.length);
1153
1262
  for (let i = 0; i < x.length; i++) {
1154
1263
  writePreloadedKvEntry(bc, x[i]);
@@ -1156,13 +1265,13 @@ function write17(bc, x) {
1156
1265
  }
1157
1266
  function readPreloadedKv(bc) {
1158
1267
  return {
1159
- entries: read17(bc),
1268
+ entries: read19(bc),
1160
1269
  requestedGetKeys: read0(bc),
1161
1270
  requestedPrefixes: read0(bc)
1162
1271
  };
1163
1272
  }
1164
1273
  function writePreloadedKv(bc, x) {
1165
- write17(bc, x.entries);
1274
+ write19(bc, x.entries);
1166
1275
  write0(bc, x.requestedGetKeys);
1167
1276
  write0(bc, x.requestedPrefixes);
1168
1277
  }
@@ -1176,7 +1285,7 @@ function writeHibernatingRequest(bc, x) {
1176
1285
  writeGatewayId(bc, x.gatewayId);
1177
1286
  writeRequestId(bc, x.requestId);
1178
1287
  }
1179
- function read18(bc) {
1288
+ function read20(bc) {
1180
1289
  const len = bare.readUintSafe(bc);
1181
1290
  if (len === 0) {
1182
1291
  return [];
@@ -1187,16 +1296,16 @@ function read18(bc) {
1187
1296
  }
1188
1297
  return result;
1189
1298
  }
1190
- function write18(bc, x) {
1299
+ function write20(bc, x) {
1191
1300
  bare.writeUintSafe(bc, x.length);
1192
1301
  for (let i = 0; i < x.length; i++) {
1193
1302
  writeHibernatingRequest(bc, x[i]);
1194
1303
  }
1195
1304
  }
1196
- function read19(bc) {
1305
+ function read21(bc) {
1197
1306
  return bare.readBool(bc) ? readPreloadedKv(bc) : null;
1198
1307
  }
1199
- function write19(bc, x) {
1308
+ function write21(bc, x) {
1200
1309
  bare.writeBool(bc, x != null);
1201
1310
  if (x != null) {
1202
1311
  writePreloadedKv(bc, x);
@@ -1205,14 +1314,14 @@ function write19(bc, x) {
1205
1314
  function readCommandStartActor(bc) {
1206
1315
  return {
1207
1316
  config: readActorConfig(bc),
1208
- hibernatingRequests: read18(bc),
1209
- preloadedKv: read19(bc)
1317
+ hibernatingRequests: read20(bc),
1318
+ preloadedKv: read21(bc)
1210
1319
  };
1211
1320
  }
1212
1321
  function writeCommandStartActor(bc, x) {
1213
1322
  writeActorConfig(bc, x.config);
1214
- write18(bc, x.hibernatingRequests);
1215
- write19(bc, x.preloadedKv);
1323
+ write20(bc, x.hibernatingRequests);
1324
+ write21(bc, x.preloadedKv);
1216
1325
  }
1217
1326
  var StopActorReason = /* @__PURE__ */ ((StopActorReason2) => {
1218
1327
  StopActorReason2["SleepIntent"] = "SleepIntent";
@@ -1369,7 +1478,16 @@ function writeMessageId(bc, x) {
1369
1478
  writeRequestId(bc, x.requestId);
1370
1479
  writeMessageIndex(bc, x.messageIndex);
1371
1480
  }
1372
- function read20(bc) {
1481
+ function read22(bc) {
1482
+ return bare.readBool(bc) ? bare.readU32(bc) : null;
1483
+ }
1484
+ function write22(bc, x) {
1485
+ bare.writeBool(bc, x != null);
1486
+ if (x != null) {
1487
+ bare.writeU32(bc, x);
1488
+ }
1489
+ }
1490
+ function read23(bc) {
1373
1491
  const len = bare.readUintSafe(bc);
1374
1492
  const result = /* @__PURE__ */ new Map();
1375
1493
  for (let i = 0; i < len; i++) {
@@ -1383,7 +1501,7 @@ function read20(bc) {
1383
1501
  }
1384
1502
  return result;
1385
1503
  }
1386
- function write20(bc, x) {
1504
+ function write23(bc, x) {
1387
1505
  bare.writeUintSafe(bc, x.size);
1388
1506
  for (const kv of x) {
1389
1507
  bare.writeString(bc, kv[0]);
@@ -1393,20 +1511,24 @@ function write20(bc, x) {
1393
1511
  function readToEnvoyRequestStart(bc) {
1394
1512
  return {
1395
1513
  actorId: readId(bc),
1514
+ actorGeneration: read22(bc),
1396
1515
  method: bare.readString(bc),
1397
1516
  path: bare.readString(bc),
1398
- headers: read20(bc),
1399
- body: read16(bc),
1400
- stream: bare.readBool(bc)
1517
+ headers: read23(bc),
1518
+ body: read18(bc),
1519
+ stream: bare.readBool(bc),
1520
+ responseStream: bare.readBool(bc)
1401
1521
  };
1402
1522
  }
1403
1523
  function writeToEnvoyRequestStart(bc, x) {
1404
1524
  writeId(bc, x.actorId);
1525
+ write22(bc, x.actorGeneration);
1405
1526
  bare.writeString(bc, x.method);
1406
1527
  bare.writeString(bc, x.path);
1407
- write20(bc, x.headers);
1408
- write16(bc, x.body);
1528
+ write23(bc, x.headers);
1529
+ write18(bc, x.body);
1409
1530
  bare.writeBool(bc, x.stream);
1531
+ bare.writeBool(bc, x.responseStream);
1410
1532
  }
1411
1533
  function readToEnvoyRequestChunk(bc) {
1412
1534
  return {
@@ -1418,18 +1540,102 @@ function writeToEnvoyRequestChunk(bc, x) {
1418
1540
  bare.writeData(bc, x.body);
1419
1541
  bare.writeBool(bc, x.finish);
1420
1542
  }
1543
+ function readToRivetRequestBodyWindowUpdate(bc) {
1544
+ return {
1545
+ consumedBytes: bare.readU64(bc)
1546
+ };
1547
+ }
1548
+ function writeToRivetRequestBodyWindowUpdate(bc, x) {
1549
+ bare.writeU64(bc, x.consumedBytes);
1550
+ }
1551
+ var HttpStreamAbortReasonKind = /* @__PURE__ */ ((HttpStreamAbortReasonKind2) => {
1552
+ HttpStreamAbortReasonKind2["Unknown"] = "Unknown";
1553
+ HttpStreamAbortReasonKind2["Cancelled"] = "Cancelled";
1554
+ HttpStreamAbortReasonKind2["HandlerError"] = "HandlerError";
1555
+ HttpStreamAbortReasonKind2["InternalError"] = "InternalError";
1556
+ return HttpStreamAbortReasonKind2;
1557
+ })(HttpStreamAbortReasonKind || {});
1558
+ function readHttpStreamAbortReasonKind(bc) {
1559
+ const offset = bc.offset;
1560
+ const tag = bare.readU8(bc);
1561
+ switch (tag) {
1562
+ case 0:
1563
+ return "Unknown" /* Unknown */;
1564
+ case 1:
1565
+ return "Cancelled" /* Cancelled */;
1566
+ case 2:
1567
+ return "HandlerError" /* HandlerError */;
1568
+ case 3:
1569
+ return "InternalError" /* InternalError */;
1570
+ default: {
1571
+ bc.offset = offset;
1572
+ throw new bare.BareError(offset, "invalid tag");
1573
+ }
1574
+ }
1575
+ }
1576
+ function writeHttpStreamAbortReasonKind(bc, x) {
1577
+ switch (x) {
1578
+ case "Unknown" /* Unknown */: {
1579
+ bare.writeU8(bc, 0);
1580
+ break;
1581
+ }
1582
+ case "Cancelled" /* Cancelled */: {
1583
+ bare.writeU8(bc, 1);
1584
+ break;
1585
+ }
1586
+ case "HandlerError" /* HandlerError */: {
1587
+ bare.writeU8(bc, 2);
1588
+ break;
1589
+ }
1590
+ case "InternalError" /* InternalError */: {
1591
+ bare.writeU8(bc, 3);
1592
+ break;
1593
+ }
1594
+ }
1595
+ }
1596
+ function readHttpStreamAbortReason(bc) {
1597
+ return {
1598
+ kind: readHttpStreamAbortReasonKind(bc),
1599
+ detail: read17(bc)
1600
+ };
1601
+ }
1602
+ function writeHttpStreamAbortReason(bc, x) {
1603
+ writeHttpStreamAbortReasonKind(bc, x.kind);
1604
+ write17(bc, x.detail);
1605
+ }
1606
+ function read24(bc) {
1607
+ return bare.readBool(bc) ? readId(bc) : null;
1608
+ }
1609
+ function write24(bc, x) {
1610
+ bare.writeBool(bc, x != null);
1611
+ if (x != null) {
1612
+ writeId(bc, x);
1613
+ }
1614
+ }
1615
+ function readToEnvoyRequestAbort(bc) {
1616
+ return {
1617
+ actorId: read24(bc),
1618
+ actorGeneration: read22(bc),
1619
+ reason: readHttpStreamAbortReason(bc)
1620
+ };
1621
+ }
1622
+ function writeToEnvoyRequestAbort(bc, x) {
1623
+ write24(bc, x.actorId);
1624
+ write22(bc, x.actorGeneration);
1625
+ writeHttpStreamAbortReason(bc, x.reason);
1626
+ }
1421
1627
  function readToRivetResponseStart(bc) {
1422
1628
  return {
1423
1629
  status: bare.readU16(bc),
1424
- headers: read20(bc),
1425
- body: read16(bc),
1630
+ headers: read23(bc),
1631
+ body: read18(bc),
1426
1632
  stream: bare.readBool(bc)
1427
1633
  };
1428
1634
  }
1429
1635
  function writeToRivetResponseStart(bc, x) {
1430
1636
  bare.writeU16(bc, x.status);
1431
- write20(bc, x.headers);
1432
- write16(bc, x.body);
1637
+ write23(bc, x.headers);
1638
+ write18(bc, x.body);
1433
1639
  bare.writeBool(bc, x.stream);
1434
1640
  }
1435
1641
  function readToRivetResponseChunk(bc) {
@@ -1442,17 +1648,35 @@ function writeToRivetResponseChunk(bc, x) {
1442
1648
  bare.writeData(bc, x.body);
1443
1649
  bare.writeBool(bc, x.finish);
1444
1650
  }
1651
+ function readToEnvoyResponseBodyWindowUpdate(bc) {
1652
+ return {
1653
+ consumedBytes: bare.readU64(bc)
1654
+ };
1655
+ }
1656
+ function writeToEnvoyResponseBodyWindowUpdate(bc, x) {
1657
+ bare.writeU64(bc, x.consumedBytes);
1658
+ }
1659
+ function readToRivetResponseAbort(bc) {
1660
+ return {
1661
+ reason: readHttpStreamAbortReason(bc)
1662
+ };
1663
+ }
1664
+ function writeToRivetResponseAbort(bc, x) {
1665
+ writeHttpStreamAbortReason(bc, x.reason);
1666
+ }
1445
1667
  function readToEnvoyWebSocketOpen(bc) {
1446
1668
  return {
1447
1669
  actorId: readId(bc),
1670
+ actorGeneration: read22(bc),
1448
1671
  path: bare.readString(bc),
1449
- headers: read20(bc)
1672
+ headers: read23(bc)
1450
1673
  };
1451
1674
  }
1452
1675
  function writeToEnvoyWebSocketOpen(bc, x) {
1453
1676
  writeId(bc, x.actorId);
1677
+ write22(bc, x.actorGeneration);
1454
1678
  bare.writeString(bc, x.path);
1455
- write20(bc, x.headers);
1679
+ write23(bc, x.headers);
1456
1680
  }
1457
1681
  function readToEnvoyWebSocketMessage(bc) {
1458
1682
  return {
@@ -1464,10 +1688,10 @@ function writeToEnvoyWebSocketMessage(bc, x) {
1464
1688
  bare.writeData(bc, x.data);
1465
1689
  bare.writeBool(bc, x.binary);
1466
1690
  }
1467
- function read21(bc) {
1691
+ function read25(bc) {
1468
1692
  return bare.readBool(bc) ? bare.readU16(bc) : null;
1469
1693
  }
1470
- function write21(bc, x) {
1694
+ function write25(bc, x) {
1471
1695
  bare.writeBool(bc, x != null);
1472
1696
  if (x != null) {
1473
1697
  bare.writeU16(bc, x);
@@ -1475,13 +1699,13 @@ function write21(bc, x) {
1475
1699
  }
1476
1700
  function readToEnvoyWebSocketClose(bc) {
1477
1701
  return {
1478
- code: read21(bc),
1479
- reason: read15(bc)
1702
+ code: read25(bc),
1703
+ reason: read17(bc)
1480
1704
  };
1481
1705
  }
1482
1706
  function writeToEnvoyWebSocketClose(bc, x) {
1483
- write21(bc, x.code);
1484
- write15(bc, x.reason);
1707
+ write25(bc, x.code);
1708
+ write17(bc, x.reason);
1485
1709
  }
1486
1710
  function readToRivetWebSocketOpen(bc) {
1487
1711
  return {
@@ -1511,14 +1735,14 @@ function writeToRivetWebSocketMessageAck(bc, x) {
1511
1735
  }
1512
1736
  function readToRivetWebSocketClose(bc) {
1513
1737
  return {
1514
- code: read21(bc),
1515
- reason: read15(bc),
1738
+ code: read25(bc),
1739
+ reason: read17(bc),
1516
1740
  hibernate: bare.readBool(bc)
1517
1741
  };
1518
1742
  }
1519
1743
  function writeToRivetWebSocketClose(bc, x) {
1520
- write21(bc, x.code);
1521
- write15(bc, x.reason);
1744
+ write25(bc, x.code);
1745
+ write17(bc, x.reason);
1522
1746
  bare.writeBool(bc, x.hibernate);
1523
1747
  }
1524
1748
  function readToRivetTunnelMessageKind(bc) {
@@ -1530,14 +1754,18 @@ function readToRivetTunnelMessageKind(bc) {
1530
1754
  case 1:
1531
1755
  return { tag: "ToRivetResponseChunk", val: readToRivetResponseChunk(bc) };
1532
1756
  case 2:
1533
- return { tag: "ToRivetResponseAbort", val: null };
1757
+ return { tag: "ToRivetResponseAbort", val: readToRivetResponseAbort(bc) };
1534
1758
  case 3:
1535
- return { tag: "ToRivetWebSocketOpen", val: readToRivetWebSocketOpen(bc) };
1759
+ return { tag: "ToRivetRequestBodyWindowUpdate", val: readToRivetRequestBodyWindowUpdate(bc) };
1536
1760
  case 4:
1537
- return { tag: "ToRivetWebSocketMessage", val: readToRivetWebSocketMessage(bc) };
1761
+ return { tag: "ToRivetRequestBodyCancel", val: null };
1538
1762
  case 5:
1539
- return { tag: "ToRivetWebSocketMessageAck", val: readToRivetWebSocketMessageAck(bc) };
1763
+ return { tag: "ToRivetWebSocketOpen", val: readToRivetWebSocketOpen(bc) };
1540
1764
  case 6:
1765
+ return { tag: "ToRivetWebSocketMessage", val: readToRivetWebSocketMessage(bc) };
1766
+ case 7:
1767
+ return { tag: "ToRivetWebSocketMessageAck", val: readToRivetWebSocketMessageAck(bc) };
1768
+ case 8:
1541
1769
  return { tag: "ToRivetWebSocketClose", val: readToRivetWebSocketClose(bc) };
1542
1770
  default: {
1543
1771
  bc.offset = offset;
@@ -1559,25 +1787,35 @@ function writeToRivetTunnelMessageKind(bc, x) {
1559
1787
  }
1560
1788
  case "ToRivetResponseAbort": {
1561
1789
  bare.writeU8(bc, 2);
1790
+ writeToRivetResponseAbort(bc, x.val);
1562
1791
  break;
1563
1792
  }
1564
- case "ToRivetWebSocketOpen": {
1793
+ case "ToRivetRequestBodyWindowUpdate": {
1565
1794
  bare.writeU8(bc, 3);
1795
+ writeToRivetRequestBodyWindowUpdate(bc, x.val);
1796
+ break;
1797
+ }
1798
+ case "ToRivetRequestBodyCancel": {
1799
+ bare.writeU8(bc, 4);
1800
+ break;
1801
+ }
1802
+ case "ToRivetWebSocketOpen": {
1803
+ bare.writeU8(bc, 5);
1566
1804
  writeToRivetWebSocketOpen(bc, x.val);
1567
1805
  break;
1568
1806
  }
1569
1807
  case "ToRivetWebSocketMessage": {
1570
- bare.writeU8(bc, 4);
1808
+ bare.writeU8(bc, 6);
1571
1809
  writeToRivetWebSocketMessage(bc, x.val);
1572
1810
  break;
1573
1811
  }
1574
1812
  case "ToRivetWebSocketMessageAck": {
1575
- bare.writeU8(bc, 5);
1813
+ bare.writeU8(bc, 7);
1576
1814
  writeToRivetWebSocketMessageAck(bc, x.val);
1577
1815
  break;
1578
1816
  }
1579
1817
  case "ToRivetWebSocketClose": {
1580
- bare.writeU8(bc, 6);
1818
+ bare.writeU8(bc, 8);
1581
1819
  writeToRivetWebSocketClose(bc, x.val);
1582
1820
  break;
1583
1821
  }
@@ -1602,12 +1840,16 @@ function readToEnvoyTunnelMessageKind(bc) {
1602
1840
  case 1:
1603
1841
  return { tag: "ToEnvoyRequestChunk", val: readToEnvoyRequestChunk(bc) };
1604
1842
  case 2:
1605
- return { tag: "ToEnvoyRequestAbort", val: null };
1843
+ return { tag: "ToEnvoyRequestAbort", val: readToEnvoyRequestAbort(bc) };
1606
1844
  case 3:
1607
- return { tag: "ToEnvoyWebSocketOpen", val: readToEnvoyWebSocketOpen(bc) };
1845
+ return { tag: "ToEnvoyRequestBodyCancel", val: null };
1608
1846
  case 4:
1609
- return { tag: "ToEnvoyWebSocketMessage", val: readToEnvoyWebSocketMessage(bc) };
1847
+ return { tag: "ToEnvoyResponseBodyWindowUpdate", val: readToEnvoyResponseBodyWindowUpdate(bc) };
1610
1848
  case 5:
1849
+ return { tag: "ToEnvoyWebSocketOpen", val: readToEnvoyWebSocketOpen(bc) };
1850
+ case 6:
1851
+ return { tag: "ToEnvoyWebSocketMessage", val: readToEnvoyWebSocketMessage(bc) };
1852
+ case 7:
1611
1853
  return { tag: "ToEnvoyWebSocketClose", val: readToEnvoyWebSocketClose(bc) };
1612
1854
  default: {
1613
1855
  bc.offset = offset;
@@ -1629,20 +1871,30 @@ function writeToEnvoyTunnelMessageKind(bc, x) {
1629
1871
  }
1630
1872
  case "ToEnvoyRequestAbort": {
1631
1873
  bare.writeU8(bc, 2);
1874
+ writeToEnvoyRequestAbort(bc, x.val);
1632
1875
  break;
1633
1876
  }
1634
- case "ToEnvoyWebSocketOpen": {
1877
+ case "ToEnvoyRequestBodyCancel": {
1635
1878
  bare.writeU8(bc, 3);
1879
+ break;
1880
+ }
1881
+ case "ToEnvoyResponseBodyWindowUpdate": {
1882
+ bare.writeU8(bc, 4);
1883
+ writeToEnvoyResponseBodyWindowUpdate(bc, x.val);
1884
+ break;
1885
+ }
1886
+ case "ToEnvoyWebSocketOpen": {
1887
+ bare.writeU8(bc, 5);
1636
1888
  writeToEnvoyWebSocketOpen(bc, x.val);
1637
1889
  break;
1638
1890
  }
1639
1891
  case "ToEnvoyWebSocketMessage": {
1640
- bare.writeU8(bc, 4);
1892
+ bare.writeU8(bc, 6);
1641
1893
  writeToEnvoyWebSocketMessage(bc, x.val);
1642
1894
  break;
1643
1895
  }
1644
1896
  case "ToEnvoyWebSocketClose": {
1645
- bare.writeU8(bc, 5);
1897
+ bare.writeU8(bc, 7);
1646
1898
  writeToEnvoyWebSocketClose(bc, x.val);
1647
1899
  break;
1648
1900
  }
@@ -1666,7 +1918,7 @@ function readToEnvoyPing(bc) {
1666
1918
  function writeToEnvoyPing(bc, x) {
1667
1919
  bare.writeI64(bc, x.ts);
1668
1920
  }
1669
- function read22(bc) {
1921
+ function read26(bc) {
1670
1922
  const len = bare.readUintSafe(bc);
1671
1923
  const result = /* @__PURE__ */ new Map();
1672
1924
  for (let i = 0; i < len; i++) {
@@ -1680,26 +1932,26 @@ function read22(bc) {
1680
1932
  }
1681
1933
  return result;
1682
1934
  }
1683
- function write22(bc, x) {
1935
+ function write26(bc, x) {
1684
1936
  bare.writeUintSafe(bc, x.size);
1685
1937
  for (const kv of x) {
1686
1938
  bare.writeString(bc, kv[0]);
1687
1939
  writeActorName(bc, kv[1]);
1688
1940
  }
1689
1941
  }
1690
- function read23(bc) {
1691
- return bare.readBool(bc) ? read22(bc) : null;
1942
+ function read27(bc) {
1943
+ return bare.readBool(bc) ? read26(bc) : null;
1692
1944
  }
1693
- function write23(bc, x) {
1945
+ function write27(bc, x) {
1694
1946
  bare.writeBool(bc, x != null);
1695
1947
  if (x != null) {
1696
- write22(bc, x);
1948
+ write26(bc, x);
1697
1949
  }
1698
1950
  }
1699
- function read24(bc) {
1951
+ function read28(bc) {
1700
1952
  return bare.readBool(bc) ? readJson(bc) : null;
1701
1953
  }
1702
- function write24(bc, x) {
1954
+ function write28(bc, x) {
1703
1955
  bare.writeBool(bc, x != null);
1704
1956
  if (x != null) {
1705
1957
  writeJson(bc, x);
@@ -1707,13 +1959,13 @@ function write24(bc, x) {
1707
1959
  }
1708
1960
  function readToRivetMetadata(bc) {
1709
1961
  return {
1710
- prepopulateActorNames: read23(bc),
1711
- metadata: read24(bc)
1962
+ prepopulateActorNames: read27(bc),
1963
+ metadata: read28(bc)
1712
1964
  };
1713
1965
  }
1714
1966
  function writeToRivetMetadata(bc, x) {
1715
- write23(bc, x.prepopulateActorNames);
1716
- write24(bc, x.metadata);
1967
+ write27(bc, x.prepopulateActorNames);
1968
+ write28(bc, x.metadata);
1717
1969
  }
1718
1970
  function readToRivetEvents(bc) {
1719
1971
  const len = bare.readUintSafe(bc);
@@ -1732,7 +1984,7 @@ function writeToRivetEvents(bc, x) {
1732
1984
  writeEventWrapper(bc, x[i]);
1733
1985
  }
1734
1986
  }
1735
- function read25(bc) {
1987
+ function read29(bc) {
1736
1988
  const len = bare.readUintSafe(bc);
1737
1989
  if (len === 0) {
1738
1990
  return [];
@@ -1743,7 +1995,7 @@ function read25(bc) {
1743
1995
  }
1744
1996
  return result;
1745
1997
  }
1746
- function write25(bc, x) {
1998
+ function write29(bc, x) {
1747
1999
  bare.writeUintSafe(bc, x.length);
1748
2000
  for (let i = 0; i < x.length; i++) {
1749
2001
  writeActorCheckpoint(bc, x[i]);
@@ -1751,11 +2003,11 @@ function write25(bc, x) {
1751
2003
  }
1752
2004
  function readToRivetAckCommands(bc) {
1753
2005
  return {
1754
- lastCommandCheckpoints: read25(bc)
2006
+ lastCommandCheckpoints: read29(bc)
1755
2007
  };
1756
2008
  }
1757
2009
  function writeToRivetAckCommands(bc, x) {
1758
- write25(bc, x.lastCommandCheckpoints);
2010
+ write29(bc, x.lastCommandCheckpoints);
1759
2011
  }
1760
2012
  function readToRivetPong(bc) {
1761
2013
  return {
@@ -1817,6 +2069,16 @@ function writeToRivetSqliteExecuteRequest(bc, x) {
1817
2069
  bare.writeU32(bc, x.requestId);
1818
2070
  writeSqliteExecuteRequest(bc, x.data);
1819
2071
  }
2072
+ function readToRivetSqliteExecuteBatchRequest(bc) {
2073
+ return {
2074
+ requestId: bare.readU32(bc),
2075
+ data: readSqliteExecuteBatchRequest(bc)
2076
+ };
2077
+ }
2078
+ function writeToRivetSqliteExecuteBatchRequest(bc, x) {
2079
+ bare.writeU32(bc, x.requestId);
2080
+ writeSqliteExecuteBatchRequest(bc, x.data);
2081
+ }
1820
2082
  function readToRivet(bc) {
1821
2083
  const offset = bc.offset;
1822
2084
  const tag = bare.readU8(bc);
@@ -1843,6 +2105,8 @@ function readToRivet(bc) {
1843
2105
  return { tag: "ToRivetSqliteExecRequest", val: readToRivetSqliteExecRequest(bc) };
1844
2106
  case 10:
1845
2107
  return { tag: "ToRivetSqliteExecuteRequest", val: readToRivetSqliteExecuteRequest(bc) };
2108
+ case 11:
2109
+ return { tag: "ToRivetSqliteExecuteBatchRequest", val: readToRivetSqliteExecuteBatchRequest(bc) };
1846
2110
  default: {
1847
2111
  bc.offset = offset;
1848
2112
  throw new bare.BareError(offset, "invalid tag");
@@ -1905,6 +2169,11 @@ function writeToRivet(bc, x) {
1905
2169
  writeToRivetSqliteExecuteRequest(bc, x.val);
1906
2170
  break;
1907
2171
  }
2172
+ case "ToRivetSqliteExecuteBatchRequest": {
2173
+ bare.writeU8(bc, 11);
2174
+ writeToRivetSqliteExecuteBatchRequest(bc, x.val);
2175
+ break;
2176
+ }
1908
2177
  }
1909
2178
  }
1910
2179
  function encodeToRivet(x, config) {
@@ -1963,11 +2232,11 @@ function writeToEnvoyCommands(bc, x) {
1963
2232
  }
1964
2233
  function readToEnvoyAckEvents(bc) {
1965
2234
  return {
1966
- lastEventCheckpoints: read25(bc)
2235
+ lastEventCheckpoints: read29(bc)
1967
2236
  };
1968
2237
  }
1969
2238
  function writeToEnvoyAckEvents(bc, x) {
1970
- write25(bc, x.lastEventCheckpoints);
2239
+ write29(bc, x.lastEventCheckpoints);
1971
2240
  }
1972
2241
  function readToEnvoyKvResponse(bc) {
1973
2242
  return {
@@ -2019,6 +2288,16 @@ function writeToEnvoySqliteExecuteResponse(bc, x) {
2019
2288
  bare.writeU32(bc, x.requestId);
2020
2289
  writeSqliteExecuteResponse(bc, x.data);
2021
2290
  }
2291
+ function readToEnvoySqliteExecuteBatchResponse(bc) {
2292
+ return {
2293
+ requestId: bare.readU32(bc),
2294
+ data: readSqliteExecuteBatchResponse(bc)
2295
+ };
2296
+ }
2297
+ function writeToEnvoySqliteExecuteBatchResponse(bc, x) {
2298
+ bare.writeU32(bc, x.requestId);
2299
+ writeSqliteExecuteBatchResponse(bc, x.data);
2300
+ }
2022
2301
  function readToEnvoy(bc) {
2023
2302
  const offset = bc.offset;
2024
2303
  const tag = bare.readU8(bc);
@@ -2043,6 +2322,8 @@ function readToEnvoy(bc) {
2043
2322
  return { tag: "ToEnvoySqliteExecResponse", val: readToEnvoySqliteExecResponse(bc) };
2044
2323
  case 9:
2045
2324
  return { tag: "ToEnvoySqliteExecuteResponse", val: readToEnvoySqliteExecuteResponse(bc) };
2325
+ case 10:
2326
+ return { tag: "ToEnvoySqliteExecuteBatchResponse", val: readToEnvoySqliteExecuteBatchResponse(bc) };
2046
2327
  default: {
2047
2328
  bc.offset = offset;
2048
2329
  throw new bare.BareError(offset, "invalid tag");
@@ -2101,6 +2382,11 @@ function writeToEnvoy(bc, x) {
2101
2382
  writeToEnvoySqliteExecuteResponse(bc, x.val);
2102
2383
  break;
2103
2384
  }
2385
+ case "ToEnvoySqliteExecuteBatchResponse": {
2386
+ bare.writeU8(bc, 10);
2387
+ writeToEnvoySqliteExecuteBatchResponse(bc, x.val);
2388
+ break;
2389
+ }
2104
2390
  }
2105
2391
  }
2106
2392
  function encodeToEnvoy(x, config) {
@@ -2307,8 +2593,9 @@ function decodeToOutbound(bytes) {
2307
2593
  function assert(condition, message) {
2308
2594
  if (!condition) throw new Error(message ?? "Assertion failed");
2309
2595
  }
2310
- var VERSION = 4;
2596
+ var VERSION = 7;
2311
2597
  export {
2598
+ HttpStreamAbortReasonKind,
2312
2599
  StopActorReason,
2313
2600
  StopCode,
2314
2601
  VERSION,
@@ -2342,6 +2629,8 @@ export {
2342
2629
  readEventWrapper,
2343
2630
  readGatewayId,
2344
2631
  readHibernatingRequest,
2632
+ readHttpStreamAbortReason,
2633
+ readHttpStreamAbortReasonKind,
2345
2634
  readId,
2346
2635
  readJson,
2347
2636
  readKvDeleteRangeRequest,
@@ -2366,8 +2655,10 @@ export {
2366
2655
  readPreloadedKvEntry,
2367
2656
  readProtocolMetadata,
2368
2657
  readRequestId,
2658
+ readSqliteBatchStatement,
2369
2659
  readSqliteBindParam,
2370
2660
  readSqliteColumnValue,
2661
+ readSqliteCommitOk,
2371
2662
  readSqliteCommitRequest,
2372
2663
  readSqliteCommitResponse,
2373
2664
  readSqliteDirtyPage,
@@ -2375,6 +2666,9 @@ export {
2375
2666
  readSqliteExecOk,
2376
2667
  readSqliteExecRequest,
2377
2668
  readSqliteExecResponse,
2669
+ readSqliteExecuteBatchOk,
2670
+ readSqliteExecuteBatchRequest,
2671
+ readSqliteExecuteBatchResponse,
2378
2672
  readSqliteExecuteOk,
2379
2673
  readSqliteExecuteRequest,
2380
2674
  readSqliteExecuteResponse,
@@ -2401,10 +2695,13 @@ export {
2401
2695
  readToEnvoyInit,
2402
2696
  readToEnvoyKvResponse,
2403
2697
  readToEnvoyPing,
2698
+ readToEnvoyRequestAbort,
2404
2699
  readToEnvoyRequestChunk,
2405
2700
  readToEnvoyRequestStart,
2701
+ readToEnvoyResponseBodyWindowUpdate,
2406
2702
  readToEnvoySqliteCommitResponse,
2407
2703
  readToEnvoySqliteExecResponse,
2704
+ readToEnvoySqliteExecuteBatchResponse,
2408
2705
  readToEnvoySqliteExecuteResponse,
2409
2706
  readToEnvoySqliteGetPagesResponse,
2410
2707
  readToEnvoyTunnelMessage,
@@ -2422,10 +2719,13 @@ export {
2422
2719
  readToRivetKvRequest,
2423
2720
  readToRivetMetadata,
2424
2721
  readToRivetPong,
2722
+ readToRivetRequestBodyWindowUpdate,
2723
+ readToRivetResponseAbort,
2425
2724
  readToRivetResponseChunk,
2426
2725
  readToRivetResponseStart,
2427
2726
  readToRivetSqliteCommitRequest,
2428
2727
  readToRivetSqliteExecRequest,
2728
+ readToRivetSqliteExecuteBatchRequest,
2429
2729
  readToRivetSqliteExecuteRequest,
2430
2730
  readToRivetSqliteGetPagesRequest,
2431
2731
  readToRivetTunnelMessage,
@@ -2452,6 +2752,8 @@ export {
2452
2752
  writeEventWrapper,
2453
2753
  writeGatewayId,
2454
2754
  writeHibernatingRequest,
2755
+ writeHttpStreamAbortReason,
2756
+ writeHttpStreamAbortReasonKind,
2455
2757
  writeId,
2456
2758
  writeJson,
2457
2759
  writeKvDeleteRangeRequest,
@@ -2476,8 +2778,10 @@ export {
2476
2778
  writePreloadedKvEntry,
2477
2779
  writeProtocolMetadata,
2478
2780
  writeRequestId,
2781
+ writeSqliteBatchStatement,
2479
2782
  writeSqliteBindParam,
2480
2783
  writeSqliteColumnValue,
2784
+ writeSqliteCommitOk,
2481
2785
  writeSqliteCommitRequest,
2482
2786
  writeSqliteCommitResponse,
2483
2787
  writeSqliteDirtyPage,
@@ -2485,6 +2789,9 @@ export {
2485
2789
  writeSqliteExecOk,
2486
2790
  writeSqliteExecRequest,
2487
2791
  writeSqliteExecResponse,
2792
+ writeSqliteExecuteBatchOk,
2793
+ writeSqliteExecuteBatchRequest,
2794
+ writeSqliteExecuteBatchResponse,
2488
2795
  writeSqliteExecuteOk,
2489
2796
  writeSqliteExecuteRequest,
2490
2797
  writeSqliteExecuteResponse,
@@ -2511,10 +2818,13 @@ export {
2511
2818
  writeToEnvoyInit,
2512
2819
  writeToEnvoyKvResponse,
2513
2820
  writeToEnvoyPing,
2821
+ writeToEnvoyRequestAbort,
2514
2822
  writeToEnvoyRequestChunk,
2515
2823
  writeToEnvoyRequestStart,
2824
+ writeToEnvoyResponseBodyWindowUpdate,
2516
2825
  writeToEnvoySqliteCommitResponse,
2517
2826
  writeToEnvoySqliteExecResponse,
2827
+ writeToEnvoySqliteExecuteBatchResponse,
2518
2828
  writeToEnvoySqliteExecuteResponse,
2519
2829
  writeToEnvoySqliteGetPagesResponse,
2520
2830
  writeToEnvoyTunnelMessage,
@@ -2532,10 +2842,13 @@ export {
2532
2842
  writeToRivetKvRequest,
2533
2843
  writeToRivetMetadata,
2534
2844
  writeToRivetPong,
2845
+ writeToRivetRequestBodyWindowUpdate,
2846
+ writeToRivetResponseAbort,
2535
2847
  writeToRivetResponseChunk,
2536
2848
  writeToRivetResponseStart,
2537
2849
  writeToRivetSqliteCommitRequest,
2538
2850
  writeToRivetSqliteExecRequest,
2851
+ writeToRivetSqliteExecuteBatchRequest,
2539
2852
  writeToRivetSqliteExecuteRequest,
2540
2853
  writeToRivetSqliteGetPagesRequest,
2541
2854
  writeToRivetTunnelMessage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/engine-envoy-protocol",
3
- "version": "0.0.0-pr.4976.6ab9cc9",
3
+ "version": "0.0.0-raw-fetch-retry.e47ce6c",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,6 +21,7 @@
21
21
  ],
22
22
  "scripts": {
23
23
  "build": "tsup src/index.ts",
24
+ "test": "vitest run",
24
25
  "clean": "rm -rf dist",
25
26
  "check-types": "tsc --noEmit"
26
27
  },
@@ -31,6 +32,12 @@
31
32
  "devDependencies": {
32
33
  "@types/node": "^20.19.13",
33
34
  "tsup": "^8.5.0",
34
- "typescript": "^5.9.2"
35
+ "typescript": "^5.9.2",
36
+ "vitest": "^3.2.4"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/rivet-dev/actors.git",
41
+ "directory": "engine/sdks/typescript/envoy-protocol"
35
42
  }
36
43
  }