@rivetkit/engine-envoy-protocol 3.0.7 → 3.1.0

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
@@ -600,10 +600,57 @@ type HibernatingRequest = {
600
600
  };
601
601
  declare function readHibernatingRequest(bc: bare.ByteCursor): HibernatingRequest;
602
602
  declare function writeHibernatingRequest(bc: bare.ByteCursor, x: HibernatingRequest): void;
603
+ /**
604
+ * One individual actor fork in a fork chain: the source actor, its key, and when the fork was
605
+ * made.
606
+ */
607
+ type ActorForkLink = {
608
+ readonly actorId: Id;
609
+ readonly key: string | null;
610
+ readonly forkedAt: i64;
611
+ };
612
+ declare function readActorForkLink(bc: bare.ByteCursor): ActorForkLink;
613
+ declare function writeActorForkLink(bc: bare.ByteCursor, x: ActorForkLink): void;
614
+ /**
615
+ * The individual actor fork an actor's database was copied in. The engine sends it on every
616
+ * start of the forked actor; the runtime runs its fork hook once, on the first start whose
617
+ * `forkId` it has not applied, with the fork input in `ActorConfig.input`.
618
+ */
619
+ type ActorFork = {
620
+ /**
621
+ * Drawn by the fork request: one per fork, never reused.
622
+ */
623
+ readonly forkId: ArrayBuffer;
624
+ /**
625
+ * The source actor.
626
+ */
627
+ readonly actorId: Id;
628
+ /**
629
+ * The source actor's key.
630
+ */
631
+ readonly key: string | null;
632
+ /**
633
+ * When the fork was made, in milliseconds since the epoch: the forked actor's create time.
634
+ */
635
+ readonly forkedAt: i64;
636
+ /**
637
+ * The source's own fork chain, oldest first, without this fork: the engine's record of every
638
+ * individual actor fork behind the source, at most 16 links. The runtime uses it when the
639
+ * copied database does not hold the source's chain, which happens when the source never
640
+ * committed its first start before it was forked again.
641
+ */
642
+ readonly chain: readonly ActorForkLink[];
643
+ };
644
+ declare function readActorFork(bc: bare.ByteCursor): ActorFork;
645
+ declare function writeActorFork(bc: bare.ByteCursor, x: ActorFork): void;
603
646
  type CommandStartActor = {
604
647
  readonly config: ActorConfig;
605
648
  readonly hibernatingRequests: readonly HibernatingRequest[];
606
649
  readonly preloadedKv: PreloadedKv | null;
650
+ /**
651
+ * Set for an actor made by an individual actor fork. Added in v9.
652
+ */
653
+ readonly fork: ActorFork | null;
607
654
  };
608
655
  declare function readCommandStartActor(bc: bare.ByteCursor): CommandStartActor;
609
656
  declare function writeCommandStartActor(bc: bare.ByteCursor, x: CommandStartActor): void;
@@ -633,6 +680,13 @@ declare function writeCommand(bc: bare.ByteCursor, x: Command): void;
633
680
  type CommandWrapper = {
634
681
  readonly checkpoint: ActorCheckpoint;
635
682
  readonly inner: Command;
683
+ /**
684
+ * The volume group of the namespace whose actor state machine sent this command, set for
685
+ * an actor in a group. Actor ids repeat across a namespace and its forks, so pegboard-envoy
686
+ * refuses a command naming another group than its connection's instead of handing it to
687
+ * the other namespace's actor. Never forwarded to the envoy. Added in v9.
688
+ */
689
+ readonly group: ArrayBuffer | null;
636
690
  };
637
691
  declare function readCommandWrapper(bc: bare.ByteCursor): CommandWrapper;
638
692
  declare function writeCommandWrapper(bc: bare.ByteCursor, x: CommandWrapper): void;
@@ -685,6 +739,13 @@ type ToEnvoyRequestStart = {
685
739
  * Whether the gateway can accept a streamed response body.
686
740
  */
687
741
  readonly responseStream: boolean;
742
+ /**
743
+ * The volume group of the namespace the gateway routed this request in, set for an actor
744
+ * in a group. Actor ids repeat across a namespace and its forks, so pegboard-envoy refuses
745
+ * a request naming another group than its connection's instead of handing it to the other
746
+ * namespace's actor. Never forwarded to the envoy. Added in v9.
747
+ */
748
+ readonly group: ArrayBuffer | null;
688
749
  };
689
750
  declare function readToEnvoyRequestStart(bc: bare.ByteCursor): ToEnvoyRequestStart;
690
751
  declare function writeToEnvoyRequestStart(bc: bare.ByteCursor, x: ToEnvoyRequestStart): void;
@@ -777,6 +838,13 @@ type ToEnvoyWebSocketOpen = {
777
838
  readonly actorGeneration: u32 | null;
778
839
  readonly path: string;
779
840
  readonly headers: ReadonlyMap<string, string>;
841
+ /**
842
+ * The volume group of the namespace the gateway routed this request in, set for an actor
843
+ * in a group. Actor ids repeat across a namespace and its forks, so pegboard-envoy refuses
844
+ * a request naming another group than its connection's instead of handing it to the other
845
+ * namespace's actor. Never forwarded to the envoy. Added in v9.
846
+ */
847
+ readonly group: ArrayBuffer | null;
780
848
  };
781
849
  declare function readToEnvoyWebSocketOpen(bc: bare.ByteCursor): ToEnvoyWebSocketOpen;
782
850
  declare function writeToEnvoyWebSocketOpen(bc: bare.ByteCursor, x: ToEnvoyWebSocketOpen): void;
@@ -1116,6 +1184,19 @@ type ToEnvoySqliteExecuteBatchResponse = {
1116
1184
  };
1117
1185
  declare function readToEnvoySqliteExecuteBatchResponse(bc: bare.ByteCursor): ToEnvoySqliteExecuteBatchResponse;
1118
1186
  declare function writeToEnvoySqliteExecuteBatchResponse(bc: bare.ByteCursor, x: ToEnvoySqliteExecuteBatchResponse): void;
1187
+ /**
1188
+ * Asks the engine worker holding generation `generation` of actor `actorId`'s database to make
1189
+ * a quorum of its volume's members prove the volume's tail committed. Engine-internal: pegboard
1190
+ * sends it over UPS to the pegboard-envoy connection the actor's allocation names, when a fork
1191
+ * of the running actor is refused because its tail is unproven, and pegboard-envoy answers it
1192
+ * itself. It never travels on the envoy WebSocket. Added in v9; a v8 receiver cannot take it.
1193
+ */
1194
+ type ToEnvoySqliteProveTail = {
1195
+ readonly actorId: Id;
1196
+ readonly generation: u32;
1197
+ };
1198
+ declare function readToEnvoySqliteProveTail(bc: bare.ByteCursor): ToEnvoySqliteProveTail;
1199
+ declare function writeToEnvoySqliteProveTail(bc: bare.ByteCursor, x: ToEnvoySqliteProveTail): void;
1119
1200
  type ToEnvoy = {
1120
1201
  readonly tag: "ToEnvoyInit";
1121
1202
  readonly val: ToEnvoyInit;
@@ -1158,6 +1239,9 @@ type ToEnvoy = {
1158
1239
  } | {
1159
1240
  readonly tag: "ToEnvoySqliteExecuteBatchResponse";
1160
1241
  readonly val: ToEnvoySqliteExecuteBatchResponse;
1242
+ } | {
1243
+ readonly tag: "ToEnvoySqliteProveTail";
1244
+ readonly val: ToEnvoySqliteProveTail;
1161
1245
  };
1162
1246
  declare function readToEnvoy(bc: bare.ByteCursor): ToEnvoy;
1163
1247
  declare function writeToEnvoy(bc: bare.ByteCursor, x: ToEnvoy): void;
@@ -1233,6 +1317,6 @@ declare function readToOutbound(bc: bare.ByteCursor): ToOutbound;
1233
1317
  declare function writeToOutbound(bc: bare.ByteCursor, x: ToOutbound): void;
1234
1318
  declare function encodeToOutbound(x: ToOutbound, config?: Partial<bare.Config>): Uint8Array;
1235
1319
  declare function decodeToOutbound(bytes: Uint8Array): ToOutbound;
1236
- declare const VERSION = 8;
1320
+ declare const VERSION = 9;
1237
1321
 
1238
- 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 SqliteCommitFinalizeOk, type SqliteCommitFinalizeRequest, type SqliteCommitFinalizeResponse, type SqliteCommitOk, type SqliteCommitRequest, type SqliteCommitResponse, type SqliteCommitStageBeginOk, type SqliteCommitStageBeginRequest, type SqliteCommitStageBeginResponse, type SqliteCommitStageSegmentOk, type SqliteCommitStageSegmentRequest, type SqliteCommitStageSegmentResponse, 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 ToEnvoySqliteCommitFinalizeResponse, type ToEnvoySqliteCommitResponse, type ToEnvoySqliteCommitStageBeginResponse, type ToEnvoySqliteCommitStageSegmentResponse, 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 ToRivetSqliteCommitFinalizeRequest, type ToRivetSqliteCommitRequest, type ToRivetSqliteCommitStageBeginRequest, type ToRivetSqliteCommitStageSegmentRequest, 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, readSqliteCommitFinalizeOk, readSqliteCommitFinalizeRequest, readSqliteCommitFinalizeResponse, readSqliteCommitOk, readSqliteCommitRequest, readSqliteCommitResponse, readSqliteCommitStageBeginOk, readSqliteCommitStageBeginRequest, readSqliteCommitStageBeginResponse, readSqliteCommitStageSegmentOk, readSqliteCommitStageSegmentRequest, readSqliteCommitStageSegmentResponse, 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, readToEnvoySqliteCommitFinalizeResponse, readToEnvoySqliteCommitResponse, readToEnvoySqliteCommitStageBeginResponse, readToEnvoySqliteCommitStageSegmentResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteBatchResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetRequestBodyWindowUpdate, readToRivetResponseAbort, readToRivetResponseChunk, readToRivetResponseStart, readToRivetSqliteCommitFinalizeRequest, readToRivetSqliteCommitRequest, readToRivetSqliteCommitStageBeginRequest, readToRivetSqliteCommitStageSegmentRequest, 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, writeSqliteCommitFinalizeOk, writeSqliteCommitFinalizeRequest, writeSqliteCommitFinalizeResponse, writeSqliteCommitOk, writeSqliteCommitRequest, writeSqliteCommitResponse, writeSqliteCommitStageBeginOk, writeSqliteCommitStageBeginRequest, writeSqliteCommitStageBeginResponse, writeSqliteCommitStageSegmentOk, writeSqliteCommitStageSegmentRequest, writeSqliteCommitStageSegmentResponse, 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, writeToEnvoySqliteCommitFinalizeResponse, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteCommitStageBeginResponse, writeToEnvoySqliteCommitStageSegmentResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteBatchResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetRequestBodyWindowUpdate, writeToRivetResponseAbort, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitFinalizeRequest, writeToRivetSqliteCommitRequest, writeToRivetSqliteCommitStageBeginRequest, writeToRivetSqliteCommitStageSegmentRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteBatchRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
1322
+ export { type ActorCheckpoint, type ActorCommandKeyData, type ActorConfig, type ActorFork, type ActorForkLink, 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 SqliteCommitFinalizeOk, type SqliteCommitFinalizeRequest, type SqliteCommitFinalizeResponse, type SqliteCommitOk, type SqliteCommitRequest, type SqliteCommitResponse, type SqliteCommitStageBeginOk, type SqliteCommitStageBeginRequest, type SqliteCommitStageBeginResponse, type SqliteCommitStageSegmentOk, type SqliteCommitStageSegmentRequest, type SqliteCommitStageSegmentResponse, 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 ToEnvoySqliteCommitFinalizeResponse, type ToEnvoySqliteCommitResponse, type ToEnvoySqliteCommitStageBeginResponse, type ToEnvoySqliteCommitStageSegmentResponse, type ToEnvoySqliteExecResponse, type ToEnvoySqliteExecuteBatchResponse, type ToEnvoySqliteExecuteResponse, type ToEnvoySqliteGetPagesResponse, type ToEnvoySqliteProveTail, 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 ToRivetSqliteCommitFinalizeRequest, type ToRivetSqliteCommitRequest, type ToRivetSqliteCommitStageBeginRequest, type ToRivetSqliteCommitStageSegmentRequest, 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, readActorFork, readActorForkLink, 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, readSqliteCommitFinalizeOk, readSqliteCommitFinalizeRequest, readSqliteCommitFinalizeResponse, readSqliteCommitOk, readSqliteCommitRequest, readSqliteCommitResponse, readSqliteCommitStageBeginOk, readSqliteCommitStageBeginRequest, readSqliteCommitStageBeginResponse, readSqliteCommitStageSegmentOk, readSqliteCommitStageSegmentRequest, readSqliteCommitStageSegmentResponse, 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, readToEnvoySqliteCommitFinalizeResponse, readToEnvoySqliteCommitResponse, readToEnvoySqliteCommitStageBeginResponse, readToEnvoySqliteCommitStageSegmentResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteBatchResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoySqliteProveTail, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetRequestBodyWindowUpdate, readToRivetResponseAbort, readToRivetResponseChunk, readToRivetResponseStart, readToRivetSqliteCommitFinalizeRequest, readToRivetSqliteCommitRequest, readToRivetSqliteCommitStageBeginRequest, readToRivetSqliteCommitStageSegmentRequest, readToRivetSqliteExecRequest, readToRivetSqliteExecuteBatchRequest, readToRivetSqliteExecuteRequest, readToRivetSqliteGetPagesRequest, readToRivetTunnelMessage, readToRivetTunnelMessageKind, readToRivetWebSocketClose, readToRivetWebSocketMessage, readToRivetWebSocketMessageAck, readToRivetWebSocketOpen, type u16, type u32, type u64, writeActorCheckpoint, writeActorCommandKeyData, writeActorConfig, writeActorFork, writeActorForkLink, 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, writeSqliteCommitFinalizeOk, writeSqliteCommitFinalizeRequest, writeSqliteCommitFinalizeResponse, writeSqliteCommitOk, writeSqliteCommitRequest, writeSqliteCommitResponse, writeSqliteCommitStageBeginOk, writeSqliteCommitStageBeginRequest, writeSqliteCommitStageBeginResponse, writeSqliteCommitStageSegmentOk, writeSqliteCommitStageSegmentRequest, writeSqliteCommitStageSegmentResponse, 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, writeToEnvoySqliteCommitFinalizeResponse, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteCommitStageBeginResponse, writeToEnvoySqliteCommitStageSegmentResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteBatchResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoySqliteProveTail, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetRequestBodyWindowUpdate, writeToRivetResponseAbort, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitFinalizeRequest, writeToRivetSqliteCommitRequest, writeToRivetSqliteCommitStageBeginRequest, writeToRivetSqliteCommitStageSegmentRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteBatchRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
package/dist/index.js CHANGED
@@ -1439,7 +1439,52 @@ function writeHibernatingRequest(bc, x) {
1439
1439
  writeGatewayId(bc, x.gatewayId);
1440
1440
  writeRequestId(bc, x.requestId);
1441
1441
  }
1442
+ function readActorForkLink(bc) {
1443
+ return {
1444
+ actorId: readId(bc),
1445
+ key: read17(bc),
1446
+ forkedAt: bare.readI64(bc)
1447
+ };
1448
+ }
1449
+ function writeActorForkLink(bc, x) {
1450
+ writeId(bc, x.actorId);
1451
+ write17(bc, x.key);
1452
+ bare.writeI64(bc, x.forkedAt);
1453
+ }
1442
1454
  function read20(bc) {
1455
+ const len = bare.readUintSafe(bc);
1456
+ if (len === 0) {
1457
+ return [];
1458
+ }
1459
+ const result = [readActorForkLink(bc)];
1460
+ for (let i = 1; i < len; i++) {
1461
+ result[i] = readActorForkLink(bc);
1462
+ }
1463
+ return result;
1464
+ }
1465
+ function write20(bc, x) {
1466
+ bare.writeUintSafe(bc, x.length);
1467
+ for (let i = 0; i < x.length; i++) {
1468
+ writeActorForkLink(bc, x[i]);
1469
+ }
1470
+ }
1471
+ function readActorFork(bc) {
1472
+ return {
1473
+ forkId: bare.readData(bc),
1474
+ actorId: readId(bc),
1475
+ key: read17(bc),
1476
+ forkedAt: bare.readI64(bc),
1477
+ chain: read20(bc)
1478
+ };
1479
+ }
1480
+ function writeActorFork(bc, x) {
1481
+ bare.writeData(bc, x.forkId);
1482
+ writeId(bc, x.actorId);
1483
+ write17(bc, x.key);
1484
+ bare.writeI64(bc, x.forkedAt);
1485
+ write20(bc, x.chain);
1486
+ }
1487
+ function read21(bc) {
1443
1488
  const len = bare.readUintSafe(bc);
1444
1489
  if (len === 0) {
1445
1490
  return [];
@@ -1450,32 +1495,43 @@ function read20(bc) {
1450
1495
  }
1451
1496
  return result;
1452
1497
  }
1453
- function write20(bc, x) {
1498
+ function write21(bc, x) {
1454
1499
  bare.writeUintSafe(bc, x.length);
1455
1500
  for (let i = 0; i < x.length; i++) {
1456
1501
  writeHibernatingRequest(bc, x[i]);
1457
1502
  }
1458
1503
  }
1459
- function read21(bc) {
1504
+ function read22(bc) {
1460
1505
  return bare.readBool(bc) ? readPreloadedKv(bc) : null;
1461
1506
  }
1462
- function write21(bc, x) {
1507
+ function write22(bc, x) {
1463
1508
  bare.writeBool(bc, x != null);
1464
1509
  if (x != null) {
1465
1510
  writePreloadedKv(bc, x);
1466
1511
  }
1467
1512
  }
1513
+ function read23(bc) {
1514
+ return bare.readBool(bc) ? readActorFork(bc) : null;
1515
+ }
1516
+ function write23(bc, x) {
1517
+ bare.writeBool(bc, x != null);
1518
+ if (x != null) {
1519
+ writeActorFork(bc, x);
1520
+ }
1521
+ }
1468
1522
  function readCommandStartActor(bc) {
1469
1523
  return {
1470
1524
  config: readActorConfig(bc),
1471
- hibernatingRequests: read20(bc),
1472
- preloadedKv: read21(bc)
1525
+ hibernatingRequests: read21(bc),
1526
+ preloadedKv: read22(bc),
1527
+ fork: read23(bc)
1473
1528
  };
1474
1529
  }
1475
1530
  function writeCommandStartActor(bc, x) {
1476
1531
  writeActorConfig(bc, x.config);
1477
- write20(bc, x.hibernatingRequests);
1478
- write21(bc, x.preloadedKv);
1532
+ write21(bc, x.hibernatingRequests);
1533
+ write22(bc, x.preloadedKv);
1534
+ write23(bc, x.fork);
1479
1535
  }
1480
1536
  var StopActorReason = /* @__PURE__ */ ((StopActorReason2) => {
1481
1537
  StopActorReason2["SleepIntent"] = "SleepIntent";
@@ -1568,12 +1624,14 @@ function writeCommand(bc, x) {
1568
1624
  function readCommandWrapper(bc) {
1569
1625
  return {
1570
1626
  checkpoint: readActorCheckpoint(bc),
1571
- inner: readCommand(bc)
1627
+ inner: readCommand(bc),
1628
+ group: read18(bc)
1572
1629
  };
1573
1630
  }
1574
1631
  function writeCommandWrapper(bc, x) {
1575
1632
  writeActorCheckpoint(bc, x.checkpoint);
1576
1633
  writeCommand(bc, x.inner);
1634
+ write18(bc, x.group);
1577
1635
  }
1578
1636
  function readActorCommandKeyData(bc) {
1579
1637
  const offset = bc.offset;
@@ -1632,16 +1690,16 @@ function writeMessageId(bc, x) {
1632
1690
  writeRequestId(bc, x.requestId);
1633
1691
  writeMessageIndex(bc, x.messageIndex);
1634
1692
  }
1635
- function read22(bc) {
1693
+ function read24(bc) {
1636
1694
  return bare.readBool(bc) ? bare.readU32(bc) : null;
1637
1695
  }
1638
- function write22(bc, x) {
1696
+ function write24(bc, x) {
1639
1697
  bare.writeBool(bc, x != null);
1640
1698
  if (x != null) {
1641
1699
  bare.writeU32(bc, x);
1642
1700
  }
1643
1701
  }
1644
- function read23(bc) {
1702
+ function read25(bc) {
1645
1703
  const len = bare.readUintSafe(bc);
1646
1704
  const result = /* @__PURE__ */ new Map();
1647
1705
  for (let i = 0; i < len; i++) {
@@ -1655,7 +1713,7 @@ function read23(bc) {
1655
1713
  }
1656
1714
  return result;
1657
1715
  }
1658
- function write23(bc, x) {
1716
+ function write25(bc, x) {
1659
1717
  bare.writeUintSafe(bc, x.size);
1660
1718
  for (const kv of x) {
1661
1719
  bare.writeString(bc, kv[0]);
@@ -1665,24 +1723,26 @@ function write23(bc, x) {
1665
1723
  function readToEnvoyRequestStart(bc) {
1666
1724
  return {
1667
1725
  actorId: readId(bc),
1668
- actorGeneration: read22(bc),
1726
+ actorGeneration: read24(bc),
1669
1727
  method: bare.readString(bc),
1670
1728
  path: bare.readString(bc),
1671
- headers: read23(bc),
1729
+ headers: read25(bc),
1672
1730
  body: read18(bc),
1673
1731
  stream: bare.readBool(bc),
1674
- responseStream: bare.readBool(bc)
1732
+ responseStream: bare.readBool(bc),
1733
+ group: read18(bc)
1675
1734
  };
1676
1735
  }
1677
1736
  function writeToEnvoyRequestStart(bc, x) {
1678
1737
  writeId(bc, x.actorId);
1679
- write22(bc, x.actorGeneration);
1738
+ write24(bc, x.actorGeneration);
1680
1739
  bare.writeString(bc, x.method);
1681
1740
  bare.writeString(bc, x.path);
1682
- write23(bc, x.headers);
1741
+ write25(bc, x.headers);
1683
1742
  write18(bc, x.body);
1684
1743
  bare.writeBool(bc, x.stream);
1685
1744
  bare.writeBool(bc, x.responseStream);
1745
+ write18(bc, x.group);
1686
1746
  }
1687
1747
  function readToEnvoyRequestChunk(bc) {
1688
1748
  return {
@@ -1757,10 +1817,10 @@ function writeHttpStreamAbortReason(bc, x) {
1757
1817
  writeHttpStreamAbortReasonKind(bc, x.kind);
1758
1818
  write17(bc, x.detail);
1759
1819
  }
1760
- function read24(bc) {
1820
+ function read26(bc) {
1761
1821
  return bare.readBool(bc) ? readId(bc) : null;
1762
1822
  }
1763
- function write24(bc, x) {
1823
+ function write26(bc, x) {
1764
1824
  bare.writeBool(bc, x != null);
1765
1825
  if (x != null) {
1766
1826
  writeId(bc, x);
@@ -1768,27 +1828,27 @@ function write24(bc, x) {
1768
1828
  }
1769
1829
  function readToEnvoyRequestAbort(bc) {
1770
1830
  return {
1771
- actorId: read24(bc),
1772
- actorGeneration: read22(bc),
1831
+ actorId: read26(bc),
1832
+ actorGeneration: read24(bc),
1773
1833
  reason: readHttpStreamAbortReason(bc)
1774
1834
  };
1775
1835
  }
1776
1836
  function writeToEnvoyRequestAbort(bc, x) {
1777
- write24(bc, x.actorId);
1778
- write22(bc, x.actorGeneration);
1837
+ write26(bc, x.actorId);
1838
+ write24(bc, x.actorGeneration);
1779
1839
  writeHttpStreamAbortReason(bc, x.reason);
1780
1840
  }
1781
1841
  function readToRivetResponseStart(bc) {
1782
1842
  return {
1783
1843
  status: bare.readU16(bc),
1784
- headers: read23(bc),
1844
+ headers: read25(bc),
1785
1845
  body: read18(bc),
1786
1846
  stream: bare.readBool(bc)
1787
1847
  };
1788
1848
  }
1789
1849
  function writeToRivetResponseStart(bc, x) {
1790
1850
  bare.writeU16(bc, x.status);
1791
- write23(bc, x.headers);
1851
+ write25(bc, x.headers);
1792
1852
  write18(bc, x.body);
1793
1853
  bare.writeBool(bc, x.stream);
1794
1854
  }
@@ -1821,16 +1881,18 @@ function writeToRivetResponseAbort(bc, x) {
1821
1881
  function readToEnvoyWebSocketOpen(bc) {
1822
1882
  return {
1823
1883
  actorId: readId(bc),
1824
- actorGeneration: read22(bc),
1884
+ actorGeneration: read24(bc),
1825
1885
  path: bare.readString(bc),
1826
- headers: read23(bc)
1886
+ headers: read25(bc),
1887
+ group: read18(bc)
1827
1888
  };
1828
1889
  }
1829
1890
  function writeToEnvoyWebSocketOpen(bc, x) {
1830
1891
  writeId(bc, x.actorId);
1831
- write22(bc, x.actorGeneration);
1892
+ write24(bc, x.actorGeneration);
1832
1893
  bare.writeString(bc, x.path);
1833
- write23(bc, x.headers);
1894
+ write25(bc, x.headers);
1895
+ write18(bc, x.group);
1834
1896
  }
1835
1897
  function readToEnvoyWebSocketMessage(bc) {
1836
1898
  return {
@@ -1842,10 +1904,10 @@ function writeToEnvoyWebSocketMessage(bc, x) {
1842
1904
  bare.writeData(bc, x.data);
1843
1905
  bare.writeBool(bc, x.binary);
1844
1906
  }
1845
- function read25(bc) {
1907
+ function read27(bc) {
1846
1908
  return bare.readBool(bc) ? bare.readU16(bc) : null;
1847
1909
  }
1848
- function write25(bc, x) {
1910
+ function write27(bc, x) {
1849
1911
  bare.writeBool(bc, x != null);
1850
1912
  if (x != null) {
1851
1913
  bare.writeU16(bc, x);
@@ -1853,12 +1915,12 @@ function write25(bc, x) {
1853
1915
  }
1854
1916
  function readToEnvoyWebSocketClose(bc) {
1855
1917
  return {
1856
- code: read25(bc),
1918
+ code: read27(bc),
1857
1919
  reason: read17(bc)
1858
1920
  };
1859
1921
  }
1860
1922
  function writeToEnvoyWebSocketClose(bc, x) {
1861
- write25(bc, x.code);
1923
+ write27(bc, x.code);
1862
1924
  write17(bc, x.reason);
1863
1925
  }
1864
1926
  function readToRivetWebSocketOpen(bc) {
@@ -1889,13 +1951,13 @@ function writeToRivetWebSocketMessageAck(bc, x) {
1889
1951
  }
1890
1952
  function readToRivetWebSocketClose(bc) {
1891
1953
  return {
1892
- code: read25(bc),
1954
+ code: read27(bc),
1893
1955
  reason: read17(bc),
1894
1956
  hibernate: bare.readBool(bc)
1895
1957
  };
1896
1958
  }
1897
1959
  function writeToRivetWebSocketClose(bc, x) {
1898
- write25(bc, x.code);
1960
+ write27(bc, x.code);
1899
1961
  write17(bc, x.reason);
1900
1962
  bare.writeBool(bc, x.hibernate);
1901
1963
  }
@@ -2072,7 +2134,7 @@ function readToEnvoyPing(bc) {
2072
2134
  function writeToEnvoyPing(bc, x) {
2073
2135
  bare.writeI64(bc, x.ts);
2074
2136
  }
2075
- function read26(bc) {
2137
+ function read28(bc) {
2076
2138
  const len = bare.readUintSafe(bc);
2077
2139
  const result = /* @__PURE__ */ new Map();
2078
2140
  for (let i = 0; i < len; i++) {
@@ -2086,26 +2148,26 @@ function read26(bc) {
2086
2148
  }
2087
2149
  return result;
2088
2150
  }
2089
- function write26(bc, x) {
2151
+ function write28(bc, x) {
2090
2152
  bare.writeUintSafe(bc, x.size);
2091
2153
  for (const kv of x) {
2092
2154
  bare.writeString(bc, kv[0]);
2093
2155
  writeActorName(bc, kv[1]);
2094
2156
  }
2095
2157
  }
2096
- function read27(bc) {
2097
- return bare.readBool(bc) ? read26(bc) : null;
2158
+ function read29(bc) {
2159
+ return bare.readBool(bc) ? read28(bc) : null;
2098
2160
  }
2099
- function write27(bc, x) {
2161
+ function write29(bc, x) {
2100
2162
  bare.writeBool(bc, x != null);
2101
2163
  if (x != null) {
2102
- write26(bc, x);
2164
+ write28(bc, x);
2103
2165
  }
2104
2166
  }
2105
- function read28(bc) {
2167
+ function read30(bc) {
2106
2168
  return bare.readBool(bc) ? readJson(bc) : null;
2107
2169
  }
2108
- function write28(bc, x) {
2170
+ function write30(bc, x) {
2109
2171
  bare.writeBool(bc, x != null);
2110
2172
  if (x != null) {
2111
2173
  writeJson(bc, x);
@@ -2113,13 +2175,13 @@ function write28(bc, x) {
2113
2175
  }
2114
2176
  function readToRivetMetadata(bc) {
2115
2177
  return {
2116
- prepopulateActorNames: read27(bc),
2117
- metadata: read28(bc)
2178
+ prepopulateActorNames: read29(bc),
2179
+ metadata: read30(bc)
2118
2180
  };
2119
2181
  }
2120
2182
  function writeToRivetMetadata(bc, x) {
2121
- write27(bc, x.prepopulateActorNames);
2122
- write28(bc, x.metadata);
2183
+ write29(bc, x.prepopulateActorNames);
2184
+ write30(bc, x.metadata);
2123
2185
  }
2124
2186
  function readToRivetEvents(bc) {
2125
2187
  const len = bare.readUintSafe(bc);
@@ -2138,7 +2200,7 @@ function writeToRivetEvents(bc, x) {
2138
2200
  writeEventWrapper(bc, x[i]);
2139
2201
  }
2140
2202
  }
2141
- function read29(bc) {
2203
+ function read31(bc) {
2142
2204
  const len = bare.readUintSafe(bc);
2143
2205
  if (len === 0) {
2144
2206
  return [];
@@ -2149,7 +2211,7 @@ function read29(bc) {
2149
2211
  }
2150
2212
  return result;
2151
2213
  }
2152
- function write29(bc, x) {
2214
+ function write31(bc, x) {
2153
2215
  bare.writeUintSafe(bc, x.length);
2154
2216
  for (let i = 0; i < x.length; i++) {
2155
2217
  writeActorCheckpoint(bc, x[i]);
@@ -2157,11 +2219,11 @@ function write29(bc, x) {
2157
2219
  }
2158
2220
  function readToRivetAckCommands(bc) {
2159
2221
  return {
2160
- lastCommandCheckpoints: read29(bc)
2222
+ lastCommandCheckpoints: read31(bc)
2161
2223
  };
2162
2224
  }
2163
2225
  function writeToRivetAckCommands(bc, x) {
2164
- write29(bc, x.lastCommandCheckpoints);
2226
+ write31(bc, x.lastCommandCheckpoints);
2165
2227
  }
2166
2228
  function readToRivetPong(bc) {
2167
2229
  return {
@@ -2437,11 +2499,11 @@ function writeToEnvoyCommands(bc, x) {
2437
2499
  }
2438
2500
  function readToEnvoyAckEvents(bc) {
2439
2501
  return {
2440
- lastEventCheckpoints: read29(bc)
2502
+ lastEventCheckpoints: read31(bc)
2441
2503
  };
2442
2504
  }
2443
2505
  function writeToEnvoyAckEvents(bc, x) {
2444
- write29(bc, x.lastEventCheckpoints);
2506
+ write31(bc, x.lastEventCheckpoints);
2445
2507
  }
2446
2508
  function readToEnvoyKvResponse(bc) {
2447
2509
  return {
@@ -2533,6 +2595,16 @@ function writeToEnvoySqliteExecuteBatchResponse(bc, x) {
2533
2595
  bare.writeU32(bc, x.requestId);
2534
2596
  writeSqliteExecuteBatchResponse(bc, x.data);
2535
2597
  }
2598
+ function readToEnvoySqliteProveTail(bc) {
2599
+ return {
2600
+ actorId: readId(bc),
2601
+ generation: bare.readU32(bc)
2602
+ };
2603
+ }
2604
+ function writeToEnvoySqliteProveTail(bc, x) {
2605
+ writeId(bc, x.actorId);
2606
+ bare.writeU32(bc, x.generation);
2607
+ }
2536
2608
  function readToEnvoy(bc) {
2537
2609
  const offset = bc.offset;
2538
2610
  const tag = bare.readU8(bc);
@@ -2565,6 +2637,8 @@ function readToEnvoy(bc) {
2565
2637
  return { tag: "ToEnvoySqliteExecuteResponse", val: readToEnvoySqliteExecuteResponse(bc) };
2566
2638
  case 13:
2567
2639
  return { tag: "ToEnvoySqliteExecuteBatchResponse", val: readToEnvoySqliteExecuteBatchResponse(bc) };
2640
+ case 14:
2641
+ return { tag: "ToEnvoySqliteProveTail", val: readToEnvoySqliteProveTail(bc) };
2568
2642
  default: {
2569
2643
  bc.offset = offset;
2570
2644
  throw new bare.BareError(offset, "invalid tag");
@@ -2643,6 +2717,11 @@ function writeToEnvoy(bc, x) {
2643
2717
  writeToEnvoySqliteExecuteBatchResponse(bc, x.val);
2644
2718
  break;
2645
2719
  }
2720
+ case "ToEnvoySqliteProveTail": {
2721
+ bare.writeU8(bc, 14);
2722
+ writeToEnvoySqliteProveTail(bc, x.val);
2723
+ break;
2724
+ }
2646
2725
  }
2647
2726
  }
2648
2727
  function encodeToEnvoy(x, config) {
@@ -2849,7 +2928,7 @@ function decodeToOutbound(bytes) {
2849
2928
  function assert(condition, message) {
2850
2929
  if (!condition) throw new Error(message ?? "Assertion failed");
2851
2930
  }
2852
- var VERSION = 8;
2931
+ var VERSION = 9;
2853
2932
  export {
2854
2933
  HttpStreamAbortReasonKind,
2855
2934
  StopActorReason,
@@ -2870,6 +2949,8 @@ export {
2870
2949
  readActorCheckpoint,
2871
2950
  readActorCommandKeyData,
2872
2951
  readActorConfig,
2952
+ readActorFork,
2953
+ readActorForkLink,
2873
2954
  readActorIntent,
2874
2955
  readActorName,
2875
2956
  readActorState,
@@ -2972,6 +3053,7 @@ export {
2972
3053
  readToEnvoySqliteExecuteBatchResponse,
2973
3054
  readToEnvoySqliteExecuteResponse,
2974
3055
  readToEnvoySqliteGetPagesResponse,
3056
+ readToEnvoySqliteProveTail,
2975
3057
  readToEnvoyTunnelMessage,
2976
3058
  readToEnvoyTunnelMessageKind,
2977
3059
  readToEnvoyWebSocketClose,
@@ -3008,6 +3090,8 @@ export {
3008
3090
  writeActorCheckpoint,
3009
3091
  writeActorCommandKeyData,
3010
3092
  writeActorConfig,
3093
+ writeActorFork,
3094
+ writeActorForkLink,
3011
3095
  writeActorIntent,
3012
3096
  writeActorName,
3013
3097
  writeActorState,
@@ -3110,6 +3194,7 @@ export {
3110
3194
  writeToEnvoySqliteExecuteBatchResponse,
3111
3195
  writeToEnvoySqliteExecuteResponse,
3112
3196
  writeToEnvoySqliteGetPagesResponse,
3197
+ writeToEnvoySqliteProveTail,
3113
3198
  writeToEnvoyTunnelMessage,
3114
3199
  writeToEnvoyTunnelMessageKind,
3115
3200
  writeToEnvoyWebSocketClose,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/engine-envoy-protocol",
3
- "version": "3.0.7",
3
+ "version": "3.1.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {