@rivetkit/engine-envoy-protocol 2.3.6 → 2.3.8

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
@@ -578,16 +578,41 @@ type ToEnvoyRequestStart = {
578
578
  readonly headers: ReadonlyMap<string, string>;
579
579
  readonly body: ArrayBuffer | null;
580
580
  readonly stream: boolean;
581
+ readonly maxBodySize: u64;
581
582
  };
582
583
  declare function readToEnvoyRequestStart(bc: bare.ByteCursor): ToEnvoyRequestStart;
583
584
  declare function writeToEnvoyRequestStart(bc: bare.ByteCursor, x: ToEnvoyRequestStart): void;
584
585
  type ToEnvoyRequestChunk = {
585
586
  readonly body: ArrayBuffer;
586
587
  readonly finish: boolean;
588
+ readonly maxBodySize: u64;
587
589
  };
588
590
  declare function readToEnvoyRequestChunk(bc: bare.ByteCursor): ToEnvoyRequestChunk;
589
591
  declare function writeToEnvoyRequestChunk(bc: bare.ByteCursor, x: ToEnvoyRequestChunk): void;
590
- type ToEnvoyRequestAbort = null;
592
+ declare enum HttpStreamAbortReasonKind {
593
+ Unknown = "Unknown",
594
+ ClientDisconnect = "ClientDisconnect",
595
+ HandlerError = "HandlerError",
596
+ IdleTimeout = "IdleTimeout",
597
+ Overloaded = "Overloaded",
598
+ BodyTooLarge = "BodyTooLarge",
599
+ OutOfMemory = "OutOfMemory",
600
+ Shutdown = "Shutdown",
601
+ InternalError = "InternalError"
602
+ }
603
+ declare function readHttpStreamAbortReasonKind(bc: bare.ByteCursor): HttpStreamAbortReasonKind;
604
+ declare function writeHttpStreamAbortReasonKind(bc: bare.ByteCursor, x: HttpStreamAbortReasonKind): void;
605
+ type HttpStreamAbortReason = {
606
+ readonly kind: HttpStreamAbortReasonKind;
607
+ readonly detail: string | null;
608
+ };
609
+ declare function readHttpStreamAbortReason(bc: bare.ByteCursor): HttpStreamAbortReason;
610
+ declare function writeHttpStreamAbortReason(bc: bare.ByteCursor, x: HttpStreamAbortReason): void;
611
+ type ToEnvoyRequestAbort = {
612
+ readonly reason: HttpStreamAbortReason;
613
+ };
614
+ declare function readToEnvoyRequestAbort(bc: bare.ByteCursor): ToEnvoyRequestAbort;
615
+ declare function writeToEnvoyRequestAbort(bc: bare.ByteCursor, x: ToEnvoyRequestAbort): void;
591
616
  type ToRivetResponseStart = {
592
617
  readonly status: u16;
593
618
  readonly headers: ReadonlyMap<string, string>;
@@ -602,7 +627,11 @@ type ToRivetResponseChunk = {
602
627
  };
603
628
  declare function readToRivetResponseChunk(bc: bare.ByteCursor): ToRivetResponseChunk;
604
629
  declare function writeToRivetResponseChunk(bc: bare.ByteCursor, x: ToRivetResponseChunk): void;
605
- type ToRivetResponseAbort = null;
630
+ type ToRivetResponseAbort = {
631
+ readonly reason: HttpStreamAbortReason;
632
+ };
633
+ declare function readToRivetResponseAbort(bc: bare.ByteCursor): ToRivetResponseAbort;
634
+ declare function writeToRivetResponseAbort(bc: bare.ByteCursor, x: ToRivetResponseAbort): void;
606
635
  /**
607
636
  * WebSocket
608
637
  */
@@ -1000,6 +1029,6 @@ declare function readToOutbound(bc: bare.ByteCursor): ToOutbound;
1000
1029
  declare function writeToOutbound(bc: bare.ByteCursor, x: ToOutbound): void;
1001
1030
  declare function encodeToOutbound(x: ToOutbound, config?: Partial<bare.Config>): Uint8Array;
1002
1031
  declare function decodeToOutbound(bytes: Uint8Array): ToOutbound;
1003
- declare const VERSION = 6;
1032
+ declare const VERSION = 8;
1004
1033
 
1005
- 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 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 ToEnvoyRequestChunk, type ToEnvoyRequestStart, 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 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, 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, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoySqliteCommitResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteBatchResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, 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, 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, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteBatchResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteBatchRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
1034
+ 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 ToEnvoyRequestChunk, type ToEnvoyRequestStart, 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 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, readToEnvoySqliteCommitResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteBatchResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, 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, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteBatchResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseAbort, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteBatchRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
package/dist/index.js CHANGED
@@ -1506,7 +1506,8 @@ function readToEnvoyRequestStart(bc) {
1506
1506
  path: bare.readString(bc),
1507
1507
  headers: read22(bc),
1508
1508
  body: read18(bc),
1509
- stream: bare.readBool(bc)
1509
+ stream: bare.readBool(bc),
1510
+ maxBodySize: bare.readU64(bc)
1510
1511
  };
1511
1512
  }
1512
1513
  function writeToEnvoyRequestStart(bc, x) {
@@ -1516,16 +1517,117 @@ function writeToEnvoyRequestStart(bc, x) {
1516
1517
  write22(bc, x.headers);
1517
1518
  write18(bc, x.body);
1518
1519
  bare.writeBool(bc, x.stream);
1520
+ bare.writeU64(bc, x.maxBodySize);
1519
1521
  }
1520
1522
  function readToEnvoyRequestChunk(bc) {
1521
1523
  return {
1522
1524
  body: bare.readData(bc),
1523
- finish: bare.readBool(bc)
1525
+ finish: bare.readBool(bc),
1526
+ maxBodySize: bare.readU64(bc)
1524
1527
  };
1525
1528
  }
1526
1529
  function writeToEnvoyRequestChunk(bc, x) {
1527
1530
  bare.writeData(bc, x.body);
1528
1531
  bare.writeBool(bc, x.finish);
1532
+ bare.writeU64(bc, x.maxBodySize);
1533
+ }
1534
+ var HttpStreamAbortReasonKind = /* @__PURE__ */ ((HttpStreamAbortReasonKind2) => {
1535
+ HttpStreamAbortReasonKind2["Unknown"] = "Unknown";
1536
+ HttpStreamAbortReasonKind2["ClientDisconnect"] = "ClientDisconnect";
1537
+ HttpStreamAbortReasonKind2["HandlerError"] = "HandlerError";
1538
+ HttpStreamAbortReasonKind2["IdleTimeout"] = "IdleTimeout";
1539
+ HttpStreamAbortReasonKind2["Overloaded"] = "Overloaded";
1540
+ HttpStreamAbortReasonKind2["BodyTooLarge"] = "BodyTooLarge";
1541
+ HttpStreamAbortReasonKind2["OutOfMemory"] = "OutOfMemory";
1542
+ HttpStreamAbortReasonKind2["Shutdown"] = "Shutdown";
1543
+ HttpStreamAbortReasonKind2["InternalError"] = "InternalError";
1544
+ return HttpStreamAbortReasonKind2;
1545
+ })(HttpStreamAbortReasonKind || {});
1546
+ function readHttpStreamAbortReasonKind(bc) {
1547
+ const offset = bc.offset;
1548
+ const tag = bare.readU8(bc);
1549
+ switch (tag) {
1550
+ case 0:
1551
+ return "Unknown" /* Unknown */;
1552
+ case 1:
1553
+ return "ClientDisconnect" /* ClientDisconnect */;
1554
+ case 2:
1555
+ return "HandlerError" /* HandlerError */;
1556
+ case 3:
1557
+ return "IdleTimeout" /* IdleTimeout */;
1558
+ case 4:
1559
+ return "Overloaded" /* Overloaded */;
1560
+ case 5:
1561
+ return "BodyTooLarge" /* BodyTooLarge */;
1562
+ case 6:
1563
+ return "OutOfMemory" /* OutOfMemory */;
1564
+ case 7:
1565
+ return "Shutdown" /* Shutdown */;
1566
+ case 8:
1567
+ return "InternalError" /* InternalError */;
1568
+ default: {
1569
+ bc.offset = offset;
1570
+ throw new bare.BareError(offset, "invalid tag");
1571
+ }
1572
+ }
1573
+ }
1574
+ function writeHttpStreamAbortReasonKind(bc, x) {
1575
+ switch (x) {
1576
+ case "Unknown" /* Unknown */: {
1577
+ bare.writeU8(bc, 0);
1578
+ break;
1579
+ }
1580
+ case "ClientDisconnect" /* ClientDisconnect */: {
1581
+ bare.writeU8(bc, 1);
1582
+ break;
1583
+ }
1584
+ case "HandlerError" /* HandlerError */: {
1585
+ bare.writeU8(bc, 2);
1586
+ break;
1587
+ }
1588
+ case "IdleTimeout" /* IdleTimeout */: {
1589
+ bare.writeU8(bc, 3);
1590
+ break;
1591
+ }
1592
+ case "Overloaded" /* Overloaded */: {
1593
+ bare.writeU8(bc, 4);
1594
+ break;
1595
+ }
1596
+ case "BodyTooLarge" /* BodyTooLarge */: {
1597
+ bare.writeU8(bc, 5);
1598
+ break;
1599
+ }
1600
+ case "OutOfMemory" /* OutOfMemory */: {
1601
+ bare.writeU8(bc, 6);
1602
+ break;
1603
+ }
1604
+ case "Shutdown" /* Shutdown */: {
1605
+ bare.writeU8(bc, 7);
1606
+ break;
1607
+ }
1608
+ case "InternalError" /* InternalError */: {
1609
+ bare.writeU8(bc, 8);
1610
+ break;
1611
+ }
1612
+ }
1613
+ }
1614
+ function readHttpStreamAbortReason(bc) {
1615
+ return {
1616
+ kind: readHttpStreamAbortReasonKind(bc),
1617
+ detail: read17(bc)
1618
+ };
1619
+ }
1620
+ function writeHttpStreamAbortReason(bc, x) {
1621
+ writeHttpStreamAbortReasonKind(bc, x.kind);
1622
+ write17(bc, x.detail);
1623
+ }
1624
+ function readToEnvoyRequestAbort(bc) {
1625
+ return {
1626
+ reason: readHttpStreamAbortReason(bc)
1627
+ };
1628
+ }
1629
+ function writeToEnvoyRequestAbort(bc, x) {
1630
+ writeHttpStreamAbortReason(bc, x.reason);
1529
1631
  }
1530
1632
  function readToRivetResponseStart(bc) {
1531
1633
  return {
@@ -1551,6 +1653,14 @@ function writeToRivetResponseChunk(bc, x) {
1551
1653
  bare.writeData(bc, x.body);
1552
1654
  bare.writeBool(bc, x.finish);
1553
1655
  }
1656
+ function readToRivetResponseAbort(bc) {
1657
+ return {
1658
+ reason: readHttpStreamAbortReason(bc)
1659
+ };
1660
+ }
1661
+ function writeToRivetResponseAbort(bc, x) {
1662
+ writeHttpStreamAbortReason(bc, x.reason);
1663
+ }
1554
1664
  function readToEnvoyWebSocketOpen(bc) {
1555
1665
  return {
1556
1666
  actorId: readId(bc),
@@ -1639,7 +1749,7 @@ function readToRivetTunnelMessageKind(bc) {
1639
1749
  case 1:
1640
1750
  return { tag: "ToRivetResponseChunk", val: readToRivetResponseChunk(bc) };
1641
1751
  case 2:
1642
- return { tag: "ToRivetResponseAbort", val: null };
1752
+ return { tag: "ToRivetResponseAbort", val: readToRivetResponseAbort(bc) };
1643
1753
  case 3:
1644
1754
  return { tag: "ToRivetWebSocketOpen", val: readToRivetWebSocketOpen(bc) };
1645
1755
  case 4:
@@ -1668,6 +1778,7 @@ function writeToRivetTunnelMessageKind(bc, x) {
1668
1778
  }
1669
1779
  case "ToRivetResponseAbort": {
1670
1780
  bare.writeU8(bc, 2);
1781
+ writeToRivetResponseAbort(bc, x.val);
1671
1782
  break;
1672
1783
  }
1673
1784
  case "ToRivetWebSocketOpen": {
@@ -1711,7 +1822,7 @@ function readToEnvoyTunnelMessageKind(bc) {
1711
1822
  case 1:
1712
1823
  return { tag: "ToEnvoyRequestChunk", val: readToEnvoyRequestChunk(bc) };
1713
1824
  case 2:
1714
- return { tag: "ToEnvoyRequestAbort", val: null };
1825
+ return { tag: "ToEnvoyRequestAbort", val: readToEnvoyRequestAbort(bc) };
1715
1826
  case 3:
1716
1827
  return { tag: "ToEnvoyWebSocketOpen", val: readToEnvoyWebSocketOpen(bc) };
1717
1828
  case 4:
@@ -1738,6 +1849,7 @@ function writeToEnvoyTunnelMessageKind(bc, x) {
1738
1849
  }
1739
1850
  case "ToEnvoyRequestAbort": {
1740
1851
  bare.writeU8(bc, 2);
1852
+ writeToEnvoyRequestAbort(bc, x.val);
1741
1853
  break;
1742
1854
  }
1743
1855
  case "ToEnvoyWebSocketOpen": {
@@ -2450,8 +2562,9 @@ function decodeToOutbound(bytes) {
2450
2562
  function assert(condition, message) {
2451
2563
  if (!condition) throw new Error(message ?? "Assertion failed");
2452
2564
  }
2453
- var VERSION = 6;
2565
+ var VERSION = 8;
2454
2566
  export {
2567
+ HttpStreamAbortReasonKind,
2455
2568
  StopActorReason,
2456
2569
  StopCode,
2457
2570
  VERSION,
@@ -2485,6 +2598,8 @@ export {
2485
2598
  readEventWrapper,
2486
2599
  readGatewayId,
2487
2600
  readHibernatingRequest,
2601
+ readHttpStreamAbortReason,
2602
+ readHttpStreamAbortReasonKind,
2488
2603
  readId,
2489
2604
  readJson,
2490
2605
  readKvDeleteRangeRequest,
@@ -2549,6 +2664,7 @@ export {
2549
2664
  readToEnvoyInit,
2550
2665
  readToEnvoyKvResponse,
2551
2666
  readToEnvoyPing,
2667
+ readToEnvoyRequestAbort,
2552
2668
  readToEnvoyRequestChunk,
2553
2669
  readToEnvoyRequestStart,
2554
2670
  readToEnvoySqliteCommitResponse,
@@ -2571,6 +2687,7 @@ export {
2571
2687
  readToRivetKvRequest,
2572
2688
  readToRivetMetadata,
2573
2689
  readToRivetPong,
2690
+ readToRivetResponseAbort,
2574
2691
  readToRivetResponseChunk,
2575
2692
  readToRivetResponseStart,
2576
2693
  readToRivetSqliteCommitRequest,
@@ -2602,6 +2719,8 @@ export {
2602
2719
  writeEventWrapper,
2603
2720
  writeGatewayId,
2604
2721
  writeHibernatingRequest,
2722
+ writeHttpStreamAbortReason,
2723
+ writeHttpStreamAbortReasonKind,
2605
2724
  writeId,
2606
2725
  writeJson,
2607
2726
  writeKvDeleteRangeRequest,
@@ -2666,6 +2785,7 @@ export {
2666
2785
  writeToEnvoyInit,
2667
2786
  writeToEnvoyKvResponse,
2668
2787
  writeToEnvoyPing,
2788
+ writeToEnvoyRequestAbort,
2669
2789
  writeToEnvoyRequestChunk,
2670
2790
  writeToEnvoyRequestStart,
2671
2791
  writeToEnvoySqliteCommitResponse,
@@ -2688,6 +2808,7 @@ export {
2688
2808
  writeToRivetKvRequest,
2689
2809
  writeToRivetMetadata,
2690
2810
  writeToRivetPong,
2811
+ writeToRivetResponseAbort,
2691
2812
  writeToRivetResponseChunk,
2692
2813
  writeToRivetResponseStart,
2693
2814
  writeToRivetSqliteCommitRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/engine-envoy-protocol",
3
- "version": "2.3.6",
3
+ "version": "2.3.8",
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,7 @@
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"
35
37
  }
36
38
  }