@rivetkit/engine-envoy-protocol 0.0.0-pr.4673.8cf118f → 0.0.0-pr.4673.bd7bc7b

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
@@ -276,18 +276,41 @@ type SqliteCommitResponse = {
276
276
  };
277
277
  declare function readSqliteCommitResponse(bc: bare.ByteCursor): SqliteCommitResponse;
278
278
  declare function writeSqliteCommitResponse(bc: bare.ByteCursor, x: SqliteCommitResponse): void;
279
+ type SqliteCommitStageBeginRequest = {
280
+ readonly actorId: Id;
281
+ readonly generation: SqliteGeneration;
282
+ };
283
+ declare function readSqliteCommitStageBeginRequest(bc: bare.ByteCursor): SqliteCommitStageBeginRequest;
284
+ declare function writeSqliteCommitStageBeginRequest(bc: bare.ByteCursor, x: SqliteCommitStageBeginRequest): void;
285
+ type SqliteCommitStageBeginOk = {
286
+ readonly txid: SqliteTxid;
287
+ };
288
+ declare function readSqliteCommitStageBeginOk(bc: bare.ByteCursor): SqliteCommitStageBeginOk;
289
+ declare function writeSqliteCommitStageBeginOk(bc: bare.ByteCursor, x: SqliteCommitStageBeginOk): void;
290
+ type SqliteCommitStageBeginResponse = {
291
+ readonly tag: "SqliteCommitStageBeginOk";
292
+ readonly val: SqliteCommitStageBeginOk;
293
+ } | {
294
+ readonly tag: "SqliteFenceMismatch";
295
+ readonly val: SqliteFenceMismatch;
296
+ } | {
297
+ readonly tag: "SqliteErrorResponse";
298
+ readonly val: SqliteErrorResponse;
299
+ };
300
+ declare function readSqliteCommitStageBeginResponse(bc: bare.ByteCursor): SqliteCommitStageBeginResponse;
301
+ declare function writeSqliteCommitStageBeginResponse(bc: bare.ByteCursor, x: SqliteCommitStageBeginResponse): void;
279
302
  type SqliteCommitStageRequest = {
280
303
  readonly actorId: Id;
281
304
  readonly generation: SqliteGeneration;
282
- readonly stageId: SqliteStageId;
283
- readonly chunkIdx: u16;
284
- readonly dirtyPages: readonly SqliteDirtyPage[];
305
+ readonly txid: SqliteTxid;
306
+ readonly chunkIdx: u32;
307
+ readonly bytes: ArrayBuffer;
285
308
  readonly isLast: boolean;
286
309
  };
287
310
  declare function readSqliteCommitStageRequest(bc: bare.ByteCursor): SqliteCommitStageRequest;
288
311
  declare function writeSqliteCommitStageRequest(bc: bare.ByteCursor, x: SqliteCommitStageRequest): void;
289
312
  type SqliteCommitStageOk = {
290
- readonly chunkIdxCommitted: u16;
313
+ readonly chunkIdxCommitted: u32;
291
314
  };
292
315
  declare function readSqliteCommitStageOk(bc: bare.ByteCursor): SqliteCommitStageOk;
293
316
  declare function writeSqliteCommitStageOk(bc: bare.ByteCursor, x: SqliteCommitStageOk): void;
@@ -307,7 +330,7 @@ type SqliteCommitFinalizeRequest = {
307
330
  readonly actorId: Id;
308
331
  readonly generation: SqliteGeneration;
309
332
  readonly expectedHeadTxid: SqliteTxid;
310
- readonly stageId: SqliteStageId;
333
+ readonly txid: SqliteTxid;
311
334
  readonly newDbSizePages: u32;
312
335
  };
313
336
  declare function readSqliteCommitFinalizeRequest(bc: bare.ByteCursor): SqliteCommitFinalizeRequest;
@@ -737,6 +760,12 @@ type ToRivetSqliteCommitRequest = {
737
760
  };
738
761
  declare function readToRivetSqliteCommitRequest(bc: bare.ByteCursor): ToRivetSqliteCommitRequest;
739
762
  declare function writeToRivetSqliteCommitRequest(bc: bare.ByteCursor, x: ToRivetSqliteCommitRequest): void;
763
+ type ToRivetSqliteCommitStageBeginRequest = {
764
+ readonly requestId: u32;
765
+ readonly data: SqliteCommitStageBeginRequest;
766
+ };
767
+ declare function readToRivetSqliteCommitStageBeginRequest(bc: bare.ByteCursor): ToRivetSqliteCommitStageBeginRequest;
768
+ declare function writeToRivetSqliteCommitStageBeginRequest(bc: bare.ByteCursor, x: ToRivetSqliteCommitStageBeginRequest): void;
740
769
  type ToRivetSqliteCommitStageRequest = {
741
770
  readonly requestId: u32;
742
771
  readonly data: SqliteCommitStageRequest;
@@ -776,6 +805,9 @@ type ToRivet = {
776
805
  } | {
777
806
  readonly tag: "ToRivetSqliteCommitRequest";
778
807
  readonly val: ToRivetSqliteCommitRequest;
808
+ } | {
809
+ readonly tag: "ToRivetSqliteCommitStageBeginRequest";
810
+ readonly val: ToRivetSqliteCommitStageBeginRequest;
779
811
  } | {
780
812
  readonly tag: "ToRivetSqliteCommitStageRequest";
781
813
  readonly val: ToRivetSqliteCommitStageRequest;
@@ -828,6 +860,12 @@ type ToEnvoySqliteCommitResponse = {
828
860
  };
829
861
  declare function readToEnvoySqliteCommitResponse(bc: bare.ByteCursor): ToEnvoySqliteCommitResponse;
830
862
  declare function writeToEnvoySqliteCommitResponse(bc: bare.ByteCursor, x: ToEnvoySqliteCommitResponse): void;
863
+ type ToEnvoySqliteCommitStageBeginResponse = {
864
+ readonly requestId: u32;
865
+ readonly data: SqliteCommitStageBeginResponse;
866
+ };
867
+ declare function readToEnvoySqliteCommitStageBeginResponse(bc: bare.ByteCursor): ToEnvoySqliteCommitStageBeginResponse;
868
+ declare function writeToEnvoySqliteCommitStageBeginResponse(bc: bare.ByteCursor, x: ToEnvoySqliteCommitStageBeginResponse): void;
831
869
  type ToEnvoySqliteCommitStageResponse = {
832
870
  readonly requestId: u32;
833
871
  readonly data: SqliteCommitStageResponse;
@@ -864,6 +902,9 @@ type ToEnvoy = {
864
902
  } | {
865
903
  readonly tag: "ToEnvoySqliteCommitResponse";
866
904
  readonly val: ToEnvoySqliteCommitResponse;
905
+ } | {
906
+ readonly tag: "ToEnvoySqliteCommitStageBeginResponse";
907
+ readonly val: ToEnvoySqliteCommitStageBeginResponse;
867
908
  } | {
868
909
  readonly tag: "ToEnvoySqliteCommitStageResponse";
869
910
  readonly val: ToEnvoySqliteCommitStageResponse;
@@ -947,4 +988,4 @@ declare function encodeToOutbound(x: ToOutbound, config?: Partial<bare.Config>):
947
988
  declare function decodeToOutbound(bytes: Uint8Array): ToOutbound;
948
989
  declare const VERSION = 2;
949
990
 
950
- 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 SqliteCommitFinalizeOk, type SqliteCommitFinalizeRequest, type SqliteCommitFinalizeResponse, type SqliteCommitOk, type SqliteCommitRequest, type SqliteCommitResponse, type SqliteCommitStageOk, type SqliteCommitStageRequest, type SqliteCommitStageResponse, type SqliteCommitTooLarge, type SqliteDirtyPage, type SqliteErrorResponse, type SqliteFenceMismatch, type SqliteFetchedPage, type SqliteGeneration, type SqliteGetPagesOk, type SqliteGetPagesRequest, type SqliteGetPagesResponse, type SqliteMeta, type SqlitePageBytes, type SqlitePgno, type SqliteStageId, type SqliteStageNotFound, type SqliteStartupData, type SqliteTxid, 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 ToEnvoySqliteCommitFinalizeResponse, type ToEnvoySqliteCommitResponse, type ToEnvoySqliteCommitStageResponse, 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 ToRivetSqliteCommitFinalizeRequest, type ToRivetSqliteCommitRequest, type ToRivetSqliteCommitStageRequest, 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, readSqliteCommitFinalizeOk, readSqliteCommitFinalizeRequest, readSqliteCommitFinalizeResponse, readSqliteCommitOk, readSqliteCommitRequest, readSqliteCommitResponse, readSqliteCommitStageOk, readSqliteCommitStageRequest, readSqliteCommitStageResponse, readSqliteCommitTooLarge, readSqliteDirtyPage, readSqliteErrorResponse, readSqliteFenceMismatch, readSqliteFetchedPage, readSqliteGeneration, readSqliteGetPagesOk, readSqliteGetPagesRequest, readSqliteGetPagesResponse, readSqliteMeta, readSqlitePageBytes, readSqlitePgno, readSqliteStageId, readSqliteStageNotFound, readSqliteStartupData, readSqliteTxid, readStopActorReason, readStopCode, readToEnvoy, readToEnvoyAckEvents, readToEnvoyCommands, readToEnvoyConn, readToEnvoyConnPing, readToEnvoyInit, readToEnvoyKvResponse, readToEnvoyPing, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoySqliteCommitFinalizeResponse, readToEnvoySqliteCommitResponse, readToEnvoySqliteCommitStageResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetResponseChunk, readToRivetResponseStart, readToRivetSqliteCommitFinalizeRequest, readToRivetSqliteCommitRequest, readToRivetSqliteCommitStageRequest, 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, writeSqliteCommitFinalizeOk, writeSqliteCommitFinalizeRequest, writeSqliteCommitFinalizeResponse, writeSqliteCommitOk, writeSqliteCommitRequest, writeSqliteCommitResponse, writeSqliteCommitStageOk, writeSqliteCommitStageRequest, writeSqliteCommitStageResponse, writeSqliteCommitTooLarge, writeSqliteDirtyPage, writeSqliteErrorResponse, writeSqliteFenceMismatch, writeSqliteFetchedPage, writeSqliteGeneration, writeSqliteGetPagesOk, writeSqliteGetPagesRequest, writeSqliteGetPagesResponse, writeSqliteMeta, writeSqlitePageBytes, writeSqlitePgno, writeSqliteStageId, writeSqliteStageNotFound, writeSqliteStartupData, writeSqliteTxid, writeStopActorReason, writeStopCode, writeToEnvoy, writeToEnvoyAckEvents, writeToEnvoyCommands, writeToEnvoyConn, writeToEnvoyConnPing, writeToEnvoyInit, writeToEnvoyKvResponse, writeToEnvoyPing, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoySqliteCommitFinalizeResponse, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteCommitStageResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitFinalizeRequest, writeToRivetSqliteCommitRequest, writeToRivetSqliteCommitStageRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
991
+ 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 SqliteCommitFinalizeOk, type SqliteCommitFinalizeRequest, type SqliteCommitFinalizeResponse, type SqliteCommitOk, type SqliteCommitRequest, type SqliteCommitResponse, type SqliteCommitStageBeginOk, type SqliteCommitStageBeginRequest, type SqliteCommitStageBeginResponse, type SqliteCommitStageOk, type SqliteCommitStageRequest, type SqliteCommitStageResponse, type SqliteCommitTooLarge, type SqliteDirtyPage, type SqliteErrorResponse, type SqliteFenceMismatch, type SqliteFetchedPage, type SqliteGeneration, type SqliteGetPagesOk, type SqliteGetPagesRequest, type SqliteGetPagesResponse, type SqliteMeta, type SqlitePageBytes, type SqlitePgno, type SqliteStageId, type SqliteStageNotFound, type SqliteStartupData, type SqliteTxid, 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 ToEnvoySqliteCommitFinalizeResponse, type ToEnvoySqliteCommitResponse, type ToEnvoySqliteCommitStageBeginResponse, type ToEnvoySqliteCommitStageResponse, 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 ToRivetSqliteCommitFinalizeRequest, type ToRivetSqliteCommitRequest, type ToRivetSqliteCommitStageBeginRequest, type ToRivetSqliteCommitStageRequest, 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, readSqliteCommitFinalizeOk, readSqliteCommitFinalizeRequest, readSqliteCommitFinalizeResponse, readSqliteCommitOk, readSqliteCommitRequest, readSqliteCommitResponse, readSqliteCommitStageBeginOk, readSqliteCommitStageBeginRequest, readSqliteCommitStageBeginResponse, readSqliteCommitStageOk, readSqliteCommitStageRequest, readSqliteCommitStageResponse, readSqliteCommitTooLarge, readSqliteDirtyPage, readSqliteErrorResponse, readSqliteFenceMismatch, readSqliteFetchedPage, readSqliteGeneration, readSqliteGetPagesOk, readSqliteGetPagesRequest, readSqliteGetPagesResponse, readSqliteMeta, readSqlitePageBytes, readSqlitePgno, readSqliteStageId, readSqliteStageNotFound, readSqliteStartupData, readSqliteTxid, readStopActorReason, readStopCode, readToEnvoy, readToEnvoyAckEvents, readToEnvoyCommands, readToEnvoyConn, readToEnvoyConnPing, readToEnvoyInit, readToEnvoyKvResponse, readToEnvoyPing, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoySqliteCommitFinalizeResponse, readToEnvoySqliteCommitResponse, readToEnvoySqliteCommitStageBeginResponse, readToEnvoySqliteCommitStageResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetResponseChunk, readToRivetResponseStart, readToRivetSqliteCommitFinalizeRequest, readToRivetSqliteCommitRequest, readToRivetSqliteCommitStageBeginRequest, readToRivetSqliteCommitStageRequest, 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, writeSqliteCommitFinalizeOk, writeSqliteCommitFinalizeRequest, writeSqliteCommitFinalizeResponse, writeSqliteCommitOk, writeSqliteCommitRequest, writeSqliteCommitResponse, writeSqliteCommitStageBeginOk, writeSqliteCommitStageBeginRequest, writeSqliteCommitStageBeginResponse, writeSqliteCommitStageOk, writeSqliteCommitStageRequest, writeSqliteCommitStageResponse, writeSqliteCommitTooLarge, writeSqliteDirtyPage, writeSqliteErrorResponse, writeSqliteFenceMismatch, writeSqliteFetchedPage, writeSqliteGeneration, writeSqliteGetPagesOk, writeSqliteGetPagesRequest, writeSqliteGetPagesResponse, writeSqliteMeta, writeSqlitePageBytes, writeSqlitePgno, writeSqliteStageId, writeSqliteStageNotFound, writeSqliteStartupData, writeSqliteTxid, writeStopActorReason, writeStopCode, writeToEnvoy, writeToEnvoyAckEvents, writeToEnvoyCommands, writeToEnvoyConn, writeToEnvoyConnPing, writeToEnvoyInit, writeToEnvoyKvResponse, writeToEnvoyPing, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoySqliteCommitFinalizeResponse, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteCommitStageBeginResponse, writeToEnvoySqliteCommitStageResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitFinalizeRequest, writeToRivetSqliteCommitRequest, writeToRivetSqliteCommitStageBeginRequest, writeToRivetSqliteCommitStageRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
package/dist/index.js CHANGED
@@ -651,31 +651,84 @@ function writeSqliteCommitResponse(bc, x) {
651
651
  }
652
652
  }
653
653
  }
654
+ function readSqliteCommitStageBeginRequest(bc) {
655
+ return {
656
+ actorId: readId(bc),
657
+ generation: readSqliteGeneration(bc)
658
+ };
659
+ }
660
+ function writeSqliteCommitStageBeginRequest(bc, x) {
661
+ writeId(bc, x.actorId);
662
+ writeSqliteGeneration(bc, x.generation);
663
+ }
664
+ function readSqliteCommitStageBeginOk(bc) {
665
+ return {
666
+ txid: readSqliteTxid(bc)
667
+ };
668
+ }
669
+ function writeSqliteCommitStageBeginOk(bc, x) {
670
+ writeSqliteTxid(bc, x.txid);
671
+ }
672
+ function readSqliteCommitStageBeginResponse(bc) {
673
+ const offset = bc.offset;
674
+ const tag = bare.readU8(bc);
675
+ switch (tag) {
676
+ case 0:
677
+ return { tag: "SqliteCommitStageBeginOk", val: readSqliteCommitStageBeginOk(bc) };
678
+ case 1:
679
+ return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
680
+ case 2:
681
+ return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
682
+ default: {
683
+ bc.offset = offset;
684
+ throw new bare.BareError(offset, "invalid tag");
685
+ }
686
+ }
687
+ }
688
+ function writeSqliteCommitStageBeginResponse(bc, x) {
689
+ switch (x.tag) {
690
+ case "SqliteCommitStageBeginOk": {
691
+ bare.writeU8(bc, 0);
692
+ writeSqliteCommitStageBeginOk(bc, x.val);
693
+ break;
694
+ }
695
+ case "SqliteFenceMismatch": {
696
+ bare.writeU8(bc, 1);
697
+ writeSqliteFenceMismatch(bc, x.val);
698
+ break;
699
+ }
700
+ case "SqliteErrorResponse": {
701
+ bare.writeU8(bc, 2);
702
+ writeSqliteErrorResponse(bc, x.val);
703
+ break;
704
+ }
705
+ }
706
+ }
654
707
  function readSqliteCommitStageRequest(bc) {
655
708
  return {
656
709
  actorId: readId(bc),
657
710
  generation: readSqliteGeneration(bc),
658
- stageId: readSqliteStageId(bc),
659
- chunkIdx: bare.readU16(bc),
660
- dirtyPages: read8(bc),
711
+ txid: readSqliteTxid(bc),
712
+ chunkIdx: bare.readU32(bc),
713
+ bytes: bare.readData(bc),
661
714
  isLast: bare.readBool(bc)
662
715
  };
663
716
  }
664
717
  function writeSqliteCommitStageRequest(bc, x) {
665
718
  writeId(bc, x.actorId);
666
719
  writeSqliteGeneration(bc, x.generation);
667
- writeSqliteStageId(bc, x.stageId);
668
- bare.writeU16(bc, x.chunkIdx);
669
- write8(bc, x.dirtyPages);
720
+ writeSqliteTxid(bc, x.txid);
721
+ bare.writeU32(bc, x.chunkIdx);
722
+ bare.writeData(bc, x.bytes);
670
723
  bare.writeBool(bc, x.isLast);
671
724
  }
672
725
  function readSqliteCommitStageOk(bc) {
673
726
  return {
674
- chunkIdxCommitted: bare.readU16(bc)
727
+ chunkIdxCommitted: bare.readU32(bc)
675
728
  };
676
729
  }
677
730
  function writeSqliteCommitStageOk(bc, x) {
678
- bare.writeU16(bc, x.chunkIdxCommitted);
731
+ bare.writeU32(bc, x.chunkIdxCommitted);
679
732
  }
680
733
  function readSqliteCommitStageResponse(bc) {
681
734
  const offset = bc.offset;
@@ -717,7 +770,7 @@ function readSqliteCommitFinalizeRequest(bc) {
717
770
  actorId: readId(bc),
718
771
  generation: readSqliteGeneration(bc),
719
772
  expectedHeadTxid: readSqliteTxid(bc),
720
- stageId: readSqliteStageId(bc),
773
+ txid: readSqliteTxid(bc),
721
774
  newDbSizePages: bare.readU32(bc)
722
775
  };
723
776
  }
@@ -725,7 +778,7 @@ function writeSqliteCommitFinalizeRequest(bc, x) {
725
778
  writeId(bc, x.actorId);
726
779
  writeSqliteGeneration(bc, x.generation);
727
780
  writeSqliteTxid(bc, x.expectedHeadTxid);
728
- writeSqliteStageId(bc, x.stageId);
781
+ writeSqliteTxid(bc, x.txid);
729
782
  bare.writeU32(bc, x.newDbSizePages);
730
783
  }
731
784
  function readSqliteCommitFinalizeOk(bc) {
@@ -1709,6 +1762,16 @@ function writeToRivetSqliteCommitRequest(bc, x) {
1709
1762
  bare.writeU32(bc, x.requestId);
1710
1763
  writeSqliteCommitRequest(bc, x.data);
1711
1764
  }
1765
+ function readToRivetSqliteCommitStageBeginRequest(bc) {
1766
+ return {
1767
+ requestId: bare.readU32(bc),
1768
+ data: readSqliteCommitStageBeginRequest(bc)
1769
+ };
1770
+ }
1771
+ function writeToRivetSqliteCommitStageBeginRequest(bc, x) {
1772
+ bare.writeU32(bc, x.requestId);
1773
+ writeSqliteCommitStageBeginRequest(bc, x.data);
1774
+ }
1712
1775
  function readToRivetSqliteCommitStageRequest(bc) {
1713
1776
  return {
1714
1777
  requestId: bare.readU32(bc),
@@ -1752,8 +1815,10 @@ function readToRivet(bc) {
1752
1815
  case 8:
1753
1816
  return { tag: "ToRivetSqliteCommitRequest", val: readToRivetSqliteCommitRequest(bc) };
1754
1817
  case 9:
1755
- return { tag: "ToRivetSqliteCommitStageRequest", val: readToRivetSqliteCommitStageRequest(bc) };
1818
+ return { tag: "ToRivetSqliteCommitStageBeginRequest", val: readToRivetSqliteCommitStageBeginRequest(bc) };
1756
1819
  case 10:
1820
+ return { tag: "ToRivetSqliteCommitStageRequest", val: readToRivetSqliteCommitStageRequest(bc) };
1821
+ case 11:
1757
1822
  return { tag: "ToRivetSqliteCommitFinalizeRequest", val: readToRivetSqliteCommitFinalizeRequest(bc) };
1758
1823
  default: {
1759
1824
  bc.offset = offset;
@@ -1807,13 +1872,18 @@ function writeToRivet(bc, x) {
1807
1872
  writeToRivetSqliteCommitRequest(bc, x.val);
1808
1873
  break;
1809
1874
  }
1810
- case "ToRivetSqliteCommitStageRequest": {
1875
+ case "ToRivetSqliteCommitStageBeginRequest": {
1811
1876
  bare.writeU8(bc, 9);
1877
+ writeToRivetSqliteCommitStageBeginRequest(bc, x.val);
1878
+ break;
1879
+ }
1880
+ case "ToRivetSqliteCommitStageRequest": {
1881
+ bare.writeU8(bc, 10);
1812
1882
  writeToRivetSqliteCommitStageRequest(bc, x.val);
1813
1883
  break;
1814
1884
  }
1815
1885
  case "ToRivetSqliteCommitFinalizeRequest": {
1816
- bare.writeU8(bc, 10);
1886
+ bare.writeU8(bc, 11);
1817
1887
  writeToRivetSqliteCommitFinalizeRequest(bc, x.val);
1818
1888
  break;
1819
1889
  }
@@ -1911,6 +1981,16 @@ function writeToEnvoySqliteCommitResponse(bc, x) {
1911
1981
  bare.writeU32(bc, x.requestId);
1912
1982
  writeSqliteCommitResponse(bc, x.data);
1913
1983
  }
1984
+ function readToEnvoySqliteCommitStageBeginResponse(bc) {
1985
+ return {
1986
+ requestId: bare.readU32(bc),
1987
+ data: readSqliteCommitStageBeginResponse(bc)
1988
+ };
1989
+ }
1990
+ function writeToEnvoySqliteCommitStageBeginResponse(bc, x) {
1991
+ bare.writeU32(bc, x.requestId);
1992
+ writeSqliteCommitStageBeginResponse(bc, x.data);
1993
+ }
1914
1994
  function readToEnvoySqliteCommitStageResponse(bc) {
1915
1995
  return {
1916
1996
  requestId: bare.readU32(bc),
@@ -1952,8 +2032,10 @@ function readToEnvoy(bc) {
1952
2032
  case 7:
1953
2033
  return { tag: "ToEnvoySqliteCommitResponse", val: readToEnvoySqliteCommitResponse(bc) };
1954
2034
  case 8:
1955
- return { tag: "ToEnvoySqliteCommitStageResponse", val: readToEnvoySqliteCommitStageResponse(bc) };
2035
+ return { tag: "ToEnvoySqliteCommitStageBeginResponse", val: readToEnvoySqliteCommitStageBeginResponse(bc) };
1956
2036
  case 9:
2037
+ return { tag: "ToEnvoySqliteCommitStageResponse", val: readToEnvoySqliteCommitStageResponse(bc) };
2038
+ case 10:
1957
2039
  return { tag: "ToEnvoySqliteCommitFinalizeResponse", val: readToEnvoySqliteCommitFinalizeResponse(bc) };
1958
2040
  default: {
1959
2041
  bc.offset = offset;
@@ -2003,13 +2085,18 @@ function writeToEnvoy(bc, x) {
2003
2085
  writeToEnvoySqliteCommitResponse(bc, x.val);
2004
2086
  break;
2005
2087
  }
2006
- case "ToEnvoySqliteCommitStageResponse": {
2088
+ case "ToEnvoySqliteCommitStageBeginResponse": {
2007
2089
  bare.writeU8(bc, 8);
2090
+ writeToEnvoySqliteCommitStageBeginResponse(bc, x.val);
2091
+ break;
2092
+ }
2093
+ case "ToEnvoySqliteCommitStageResponse": {
2094
+ bare.writeU8(bc, 9);
2008
2095
  writeToEnvoySqliteCommitStageResponse(bc, x.val);
2009
2096
  break;
2010
2097
  }
2011
2098
  case "ToEnvoySqliteCommitFinalizeResponse": {
2012
- bare.writeU8(bc, 9);
2099
+ bare.writeU8(bc, 10);
2013
2100
  writeToEnvoySqliteCommitFinalizeResponse(bc, x.val);
2014
2101
  break;
2015
2102
  }
@@ -2284,6 +2371,9 @@ export {
2284
2371
  readSqliteCommitOk,
2285
2372
  readSqliteCommitRequest,
2286
2373
  readSqliteCommitResponse,
2374
+ readSqliteCommitStageBeginOk,
2375
+ readSqliteCommitStageBeginRequest,
2376
+ readSqliteCommitStageBeginResponse,
2287
2377
  readSqliteCommitStageOk,
2288
2378
  readSqliteCommitStageRequest,
2289
2379
  readSqliteCommitStageResponse,
@@ -2317,6 +2407,7 @@ export {
2317
2407
  readToEnvoyRequestStart,
2318
2408
  readToEnvoySqliteCommitFinalizeResponse,
2319
2409
  readToEnvoySqliteCommitResponse,
2410
+ readToEnvoySqliteCommitStageBeginResponse,
2320
2411
  readToEnvoySqliteCommitStageResponse,
2321
2412
  readToEnvoySqliteGetPagesResponse,
2322
2413
  readToEnvoyTunnelMessage,
@@ -2338,6 +2429,7 @@ export {
2338
2429
  readToRivetResponseStart,
2339
2430
  readToRivetSqliteCommitFinalizeRequest,
2340
2431
  readToRivetSqliteCommitRequest,
2432
+ readToRivetSqliteCommitStageBeginRequest,
2341
2433
  readToRivetSqliteCommitStageRequest,
2342
2434
  readToRivetSqliteGetPagesRequest,
2343
2435
  readToRivetTunnelMessage,
@@ -2394,6 +2486,9 @@ export {
2394
2486
  writeSqliteCommitOk,
2395
2487
  writeSqliteCommitRequest,
2396
2488
  writeSqliteCommitResponse,
2489
+ writeSqliteCommitStageBeginOk,
2490
+ writeSqliteCommitStageBeginRequest,
2491
+ writeSqliteCommitStageBeginResponse,
2397
2492
  writeSqliteCommitStageOk,
2398
2493
  writeSqliteCommitStageRequest,
2399
2494
  writeSqliteCommitStageResponse,
@@ -2427,6 +2522,7 @@ export {
2427
2522
  writeToEnvoyRequestStart,
2428
2523
  writeToEnvoySqliteCommitFinalizeResponse,
2429
2524
  writeToEnvoySqliteCommitResponse,
2525
+ writeToEnvoySqliteCommitStageBeginResponse,
2430
2526
  writeToEnvoySqliteCommitStageResponse,
2431
2527
  writeToEnvoySqliteGetPagesResponse,
2432
2528
  writeToEnvoyTunnelMessage,
@@ -2448,6 +2544,7 @@ export {
2448
2544
  writeToRivetResponseStart,
2449
2545
  writeToRivetSqliteCommitFinalizeRequest,
2450
2546
  writeToRivetSqliteCommitRequest,
2547
+ writeToRivetSqliteCommitStageBeginRequest,
2451
2548
  writeToRivetSqliteCommitStageRequest,
2452
2549
  writeToRivetSqliteGetPagesRequest,
2453
2550
  writeToRivetTunnelMessage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/engine-envoy-protocol",
3
- "version": "0.0.0-pr.4673.8cf118f",
3
+ "version": "0.0.0-pr.4673.bd7bc7b",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {