@rivetkit/engine-envoy-protocol 0.0.0-fix-engine-autospawn-binary-path.bd77b98 → 0.0.0-http-body-streaming.6d1723c

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
@@ -559,7 +559,30 @@ type ToEnvoyRequestChunk = {
559
559
  };
560
560
  declare function readToEnvoyRequestChunk(bc: bare.ByteCursor): ToEnvoyRequestChunk;
561
561
  declare function writeToEnvoyRequestChunk(bc: bare.ByteCursor, x: ToEnvoyRequestChunk): void;
562
- type ToEnvoyRequestAbort = null;
562
+ declare enum HttpStreamAbortReasonKind {
563
+ Unknown = "Unknown",
564
+ ClientDisconnect = "ClientDisconnect",
565
+ HandlerError = "HandlerError",
566
+ IdleTimeout = "IdleTimeout",
567
+ Overloaded = "Overloaded",
568
+ BodyTooLarge = "BodyTooLarge",
569
+ OutOfMemory = "OutOfMemory",
570
+ Shutdown = "Shutdown",
571
+ InternalError = "InternalError"
572
+ }
573
+ declare function readHttpStreamAbortReasonKind(bc: bare.ByteCursor): HttpStreamAbortReasonKind;
574
+ declare function writeHttpStreamAbortReasonKind(bc: bare.ByteCursor, x: HttpStreamAbortReasonKind): void;
575
+ type HttpStreamAbortReason = {
576
+ readonly kind: HttpStreamAbortReasonKind;
577
+ readonly detail: string | null;
578
+ };
579
+ declare function readHttpStreamAbortReason(bc: bare.ByteCursor): HttpStreamAbortReason;
580
+ declare function writeHttpStreamAbortReason(bc: bare.ByteCursor, x: HttpStreamAbortReason): void;
581
+ type ToEnvoyRequestAbort = {
582
+ readonly reason: HttpStreamAbortReason;
583
+ };
584
+ declare function readToEnvoyRequestAbort(bc: bare.ByteCursor): ToEnvoyRequestAbort;
585
+ declare function writeToEnvoyRequestAbort(bc: bare.ByteCursor, x: ToEnvoyRequestAbort): void;
563
586
  type ToRivetResponseStart = {
564
587
  readonly status: u16;
565
588
  readonly headers: ReadonlyMap<string, string>;
@@ -574,7 +597,11 @@ type ToRivetResponseChunk = {
574
597
  };
575
598
  declare function readToRivetResponseChunk(bc: bare.ByteCursor): ToRivetResponseChunk;
576
599
  declare function writeToRivetResponseChunk(bc: bare.ByteCursor, x: ToRivetResponseChunk): void;
577
- type ToRivetResponseAbort = null;
600
+ type ToRivetResponseAbort = {
601
+ readonly reason: HttpStreamAbortReason;
602
+ };
603
+ declare function readToRivetResponseAbort(bc: bare.ByteCursor): ToRivetResponseAbort;
604
+ declare function writeToRivetResponseAbort(bc: bare.ByteCursor, x: ToRivetResponseAbort): void;
578
605
  /**
579
606
  * WebSocket
580
607
  */
@@ -954,6 +981,6 @@ declare function readToOutbound(bc: bare.ByteCursor): ToOutbound;
954
981
  declare function writeToOutbound(bc: bare.ByteCursor, x: ToOutbound): void;
955
982
  declare function encodeToOutbound(x: ToOutbound, config?: Partial<bare.Config>): Uint8Array;
956
983
  declare function decodeToOutbound(bytes: Uint8Array): ToOutbound;
957
- declare const VERSION = 5;
984
+ declare const VERSION = 6;
958
985
 
959
- export { type ActorCheckpoint, type ActorCommandKeyData, type ActorConfig, type ActorIntent, type ActorIntentSleep, type ActorIntentStop, type ActorName, type ActorState, type ActorStateRunning, type ActorStateStopped, type Command, type CommandStartActor, type CommandStopActor, type CommandWrapper, type Event, type EventActorIntent, type EventActorSetAlarm, type EventActorStateUpdate, type EventWrapper, type GatewayId, type HibernatingRequest, type Id, type Json, type KvDeleteRangeRequest, type KvDeleteRequest, type KvDeleteResponse, type KvDropRequest, type KvDropResponse, type KvErrorResponse, type KvGetRequest, type KvGetResponse, type KvKey, type KvListAllQuery, type KvListPrefixQuery, type KvListQuery, type KvListRangeQuery, type KvListRequest, type KvListResponse, type KvMetadata, type KvPutRequest, type KvPutResponse, type KvRequestData, type KvResponseData, type KvValue, type MessageId, type MessageIndex, type PreloadedKv, type PreloadedKvEntry, type ProtocolMetadata, type RequestId, type SqliteBindParam, type SqliteColumnValue, type SqliteCommitOk, type SqliteCommitRequest, type SqliteCommitResponse, type SqliteDirtyPage, type SqliteErrorResponse, type SqliteExecOk, type SqliteExecRequest, type SqliteExecResponse, type SqliteExecuteOk, type SqliteExecuteRequest, type SqliteExecuteResponse, type SqliteExecuteResult, type SqliteFetchedPage, type SqliteGeneration, type SqliteGetPagesOk, type SqliteGetPagesRequest, type SqliteGetPagesResponse, type SqlitePageBytes, type SqlitePgno, type SqliteQueryResult, type SqliteValueBlob, type SqliteValueFloat, type SqliteValueInteger, type SqliteValueNull, type SqliteValueText, StopActorReason, StopCode, type ToEnvoy, type ToEnvoyAckEvents, type ToEnvoyCommands, type ToEnvoyConn, type ToEnvoyConnClose, type ToEnvoyConnPing, type ToEnvoyInit, type ToEnvoyKvResponse, type ToEnvoyPing, type ToEnvoyRequestAbort, type ToEnvoyRequestChunk, type ToEnvoyRequestStart, type ToEnvoySqliteCommitResponse, type ToEnvoySqliteExecResponse, type ToEnvoySqliteExecuteResponse, type ToEnvoySqliteGetPagesResponse, type ToEnvoyTunnelMessage, type ToEnvoyTunnelMessageKind, type ToEnvoyWebSocketClose, type ToEnvoyWebSocketMessage, type ToEnvoyWebSocketOpen, type ToGateway, type ToGatewayPong, type ToOutbound, type ToOutboundActorStart, type ToRivet, type ToRivetAckCommands, type ToRivetEvents, type ToRivetKvRequest, type ToRivetMetadata, type ToRivetPong, type ToRivetResponseAbort, type ToRivetResponseChunk, type ToRivetResponseStart, type ToRivetSqliteCommitRequest, type ToRivetSqliteExecRequest, type ToRivetSqliteExecuteRequest, type ToRivetSqliteGetPagesRequest, type ToRivetStopping, type ToRivetTunnelMessage, type ToRivetTunnelMessageKind, type ToRivetWebSocketClose, type ToRivetWebSocketMessage, type ToRivetWebSocketMessageAck, type ToRivetWebSocketOpen, VERSION, decodeActorCommandKeyData, decodeToEnvoy, decodeToEnvoyConn, decodeToGateway, decodeToOutbound, decodeToRivet, encodeActorCommandKeyData, encodeToEnvoy, encodeToEnvoyConn, encodeToGateway, encodeToOutbound, encodeToRivet, type i64, readActorCheckpoint, readActorCommandKeyData, readActorConfig, readActorIntent, readActorName, readActorState, readActorStateStopped, readCommand, readCommandStartActor, readCommandStopActor, readCommandWrapper, readEvent, readEventActorIntent, readEventActorSetAlarm, readEventActorStateUpdate, readEventWrapper, readGatewayId, readHibernatingRequest, readId, readJson, readKvDeleteRangeRequest, readKvDeleteRequest, readKvErrorResponse, readKvGetRequest, readKvGetResponse, readKvKey, readKvListPrefixQuery, readKvListQuery, readKvListRangeQuery, readKvListRequest, readKvListResponse, readKvMetadata, readKvPutRequest, readKvRequestData, readKvResponseData, readKvValue, readMessageId, readMessageIndex, readPreloadedKv, readPreloadedKvEntry, readProtocolMetadata, readRequestId, readSqliteBindParam, readSqliteColumnValue, readSqliteCommitOk, readSqliteCommitRequest, readSqliteCommitResponse, readSqliteDirtyPage, readSqliteErrorResponse, readSqliteExecOk, readSqliteExecRequest, readSqliteExecResponse, readSqliteExecuteOk, readSqliteExecuteRequest, readSqliteExecuteResponse, readSqliteExecuteResult, readSqliteFetchedPage, readSqliteGeneration, readSqliteGetPagesOk, readSqliteGetPagesRequest, readSqliteGetPagesResponse, readSqlitePageBytes, readSqlitePgno, readSqliteQueryResult, readSqliteValueBlob, readSqliteValueFloat, readSqliteValueInteger, readSqliteValueText, readStopActorReason, readStopCode, readToEnvoy, readToEnvoyAckEvents, readToEnvoyCommands, readToEnvoyConn, readToEnvoyConnPing, readToEnvoyInit, readToEnvoyKvResponse, readToEnvoyPing, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoySqliteCommitResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetResponseChunk, readToRivetResponseStart, readToRivetSqliteCommitRequest, readToRivetSqliteExecRequest, readToRivetSqliteExecuteRequest, readToRivetSqliteGetPagesRequest, readToRivetTunnelMessage, readToRivetTunnelMessageKind, readToRivetWebSocketClose, readToRivetWebSocketMessage, readToRivetWebSocketMessageAck, readToRivetWebSocketOpen, type u16, type u32, type u64, writeActorCheckpoint, writeActorCommandKeyData, writeActorConfig, writeActorIntent, writeActorName, writeActorState, writeActorStateStopped, writeCommand, writeCommandStartActor, writeCommandStopActor, writeCommandWrapper, writeEvent, writeEventActorIntent, writeEventActorSetAlarm, writeEventActorStateUpdate, writeEventWrapper, writeGatewayId, writeHibernatingRequest, writeId, writeJson, writeKvDeleteRangeRequest, writeKvDeleteRequest, writeKvErrorResponse, writeKvGetRequest, writeKvGetResponse, writeKvKey, writeKvListPrefixQuery, writeKvListQuery, writeKvListRangeQuery, writeKvListRequest, writeKvListResponse, writeKvMetadata, writeKvPutRequest, writeKvRequestData, writeKvResponseData, writeKvValue, writeMessageId, writeMessageIndex, writePreloadedKv, writePreloadedKvEntry, writeProtocolMetadata, writeRequestId, writeSqliteBindParam, writeSqliteColumnValue, writeSqliteCommitOk, writeSqliteCommitRequest, writeSqliteCommitResponse, writeSqliteDirtyPage, writeSqliteErrorResponse, writeSqliteExecOk, writeSqliteExecRequest, writeSqliteExecResponse, writeSqliteExecuteOk, writeSqliteExecuteRequest, writeSqliteExecuteResponse, writeSqliteExecuteResult, writeSqliteFetchedPage, writeSqliteGeneration, writeSqliteGetPagesOk, writeSqliteGetPagesRequest, writeSqliteGetPagesResponse, writeSqlitePageBytes, writeSqlitePgno, writeSqliteQueryResult, writeSqliteValueBlob, writeSqliteValueFloat, writeSqliteValueInteger, writeSqliteValueText, writeStopActorReason, writeStopCode, writeToEnvoy, writeToEnvoyAckEvents, writeToEnvoyCommands, writeToEnvoyConn, writeToEnvoyConnPing, writeToEnvoyInit, writeToEnvoyKvResponse, writeToEnvoyPing, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
986
+ 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 SqliteBindParam, type SqliteColumnValue, type SqliteCommitOk, type SqliteCommitRequest, type SqliteCommitResponse, type SqliteDirtyPage, type SqliteErrorResponse, type SqliteExecOk, type SqliteExecRequest, type SqliteExecResponse, type SqliteExecuteOk, type SqliteExecuteRequest, type SqliteExecuteResponse, type SqliteExecuteResult, type SqliteFetchedPage, type SqliteGeneration, type SqliteGetPagesOk, type SqliteGetPagesRequest, type SqliteGetPagesResponse, type SqlitePageBytes, type SqlitePgno, type SqliteQueryResult, type SqliteValueBlob, type SqliteValueFloat, type SqliteValueInteger, type SqliteValueNull, type SqliteValueText, StopActorReason, StopCode, type ToEnvoy, type ToEnvoyAckEvents, type ToEnvoyCommands, type ToEnvoyConn, type ToEnvoyConnClose, type ToEnvoyConnPing, type ToEnvoyInit, type ToEnvoyKvResponse, type ToEnvoyPing, type ToEnvoyRequestAbort, type ToEnvoyRequestChunk, type ToEnvoyRequestStart, type ToEnvoySqliteCommitResponse, type ToEnvoySqliteExecResponse, type ToEnvoySqliteExecuteResponse, type ToEnvoySqliteGetPagesResponse, type ToEnvoyTunnelMessage, type ToEnvoyTunnelMessageKind, type ToEnvoyWebSocketClose, type ToEnvoyWebSocketMessage, type ToEnvoyWebSocketOpen, type ToGateway, type ToGatewayPong, type ToOutbound, type ToOutboundActorStart, type ToRivet, type ToRivetAckCommands, type ToRivetEvents, type ToRivetKvRequest, type ToRivetMetadata, type ToRivetPong, type ToRivetResponseAbort, type ToRivetResponseChunk, type ToRivetResponseStart, type ToRivetSqliteCommitRequest, type ToRivetSqliteExecRequest, type ToRivetSqliteExecuteRequest, type ToRivetSqliteGetPagesRequest, type ToRivetStopping, type ToRivetTunnelMessage, type ToRivetTunnelMessageKind, type ToRivetWebSocketClose, type ToRivetWebSocketMessage, type ToRivetWebSocketMessageAck, type ToRivetWebSocketOpen, VERSION, decodeActorCommandKeyData, decodeToEnvoy, decodeToEnvoyConn, decodeToGateway, decodeToOutbound, decodeToRivet, encodeActorCommandKeyData, encodeToEnvoy, encodeToEnvoyConn, encodeToGateway, encodeToOutbound, encodeToRivet, type i64, readActorCheckpoint, readActorCommandKeyData, readActorConfig, readActorIntent, readActorName, readActorState, readActorStateStopped, readCommand, readCommandStartActor, readCommandStopActor, readCommandWrapper, readEvent, readEventActorIntent, readEventActorSetAlarm, readEventActorStateUpdate, readEventWrapper, readGatewayId, readHibernatingRequest, 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, readSqliteBindParam, readSqliteColumnValue, readSqliteCommitOk, readSqliteCommitRequest, readSqliteCommitResponse, readSqliteDirtyPage, readSqliteErrorResponse, readSqliteExecOk, readSqliteExecRequest, readSqliteExecResponse, readSqliteExecuteOk, readSqliteExecuteRequest, readSqliteExecuteResponse, readSqliteExecuteResult, readSqliteFetchedPage, readSqliteGeneration, readSqliteGetPagesOk, readSqliteGetPagesRequest, readSqliteGetPagesResponse, readSqlitePageBytes, readSqlitePgno, readSqliteQueryResult, readSqliteValueBlob, readSqliteValueFloat, readSqliteValueInteger, readSqliteValueText, readStopActorReason, readStopCode, readToEnvoy, readToEnvoyAckEvents, readToEnvoyCommands, readToEnvoyConn, readToEnvoyConnPing, readToEnvoyInit, readToEnvoyKvResponse, readToEnvoyPing, readToEnvoyRequestAbort, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoySqliteCommitResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetResponseAbort, readToRivetResponseChunk, readToRivetResponseStart, readToRivetSqliteCommitRequest, readToRivetSqliteExecRequest, readToRivetSqliteExecuteRequest, readToRivetSqliteGetPagesRequest, readToRivetTunnelMessage, readToRivetTunnelMessageKind, readToRivetWebSocketClose, readToRivetWebSocketMessage, readToRivetWebSocketMessageAck, readToRivetWebSocketOpen, type u16, type u32, type u64, writeActorCheckpoint, writeActorCommandKeyData, writeActorConfig, writeActorIntent, writeActorName, writeActorState, writeActorStateStopped, writeCommand, writeCommandStartActor, writeCommandStopActor, writeCommandWrapper, writeEvent, writeEventActorIntent, writeEventActorSetAlarm, writeEventActorStateUpdate, writeEventWrapper, writeGatewayId, writeHibernatingRequest, 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, writeSqliteBindParam, writeSqliteColumnValue, writeSqliteCommitOk, writeSqliteCommitRequest, writeSqliteCommitResponse, writeSqliteDirtyPage, writeSqliteErrorResponse, writeSqliteExecOk, writeSqliteExecRequest, writeSqliteExecResponse, writeSqliteExecuteOk, writeSqliteExecuteRequest, writeSqliteExecuteResponse, writeSqliteExecuteResult, writeSqliteFetchedPage, writeSqliteGeneration, writeSqliteGetPagesOk, writeSqliteGetPagesRequest, writeSqliteGetPagesResponse, writeSqlitePageBytes, writeSqlitePgno, writeSqliteQueryResult, writeSqliteValueBlob, writeSqliteValueFloat, writeSqliteValueInteger, writeSqliteValueText, writeStopActorReason, writeStopCode, writeToEnvoy, writeToEnvoyAckEvents, writeToEnvoyCommands, writeToEnvoyConn, writeToEnvoyConnPing, writeToEnvoyInit, writeToEnvoyKvResponse, writeToEnvoyPing, writeToEnvoyRequestAbort, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseAbort, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
package/dist/index.js CHANGED
@@ -1433,6 +1433,104 @@ function writeToEnvoyRequestChunk(bc, x) {
1433
1433
  bare.writeData(bc, x.body);
1434
1434
  bare.writeBool(bc, x.finish);
1435
1435
  }
1436
+ var HttpStreamAbortReasonKind = /* @__PURE__ */ ((HttpStreamAbortReasonKind2) => {
1437
+ HttpStreamAbortReasonKind2["Unknown"] = "Unknown";
1438
+ HttpStreamAbortReasonKind2["ClientDisconnect"] = "ClientDisconnect";
1439
+ HttpStreamAbortReasonKind2["HandlerError"] = "HandlerError";
1440
+ HttpStreamAbortReasonKind2["IdleTimeout"] = "IdleTimeout";
1441
+ HttpStreamAbortReasonKind2["Overloaded"] = "Overloaded";
1442
+ HttpStreamAbortReasonKind2["BodyTooLarge"] = "BodyTooLarge";
1443
+ HttpStreamAbortReasonKind2["OutOfMemory"] = "OutOfMemory";
1444
+ HttpStreamAbortReasonKind2["Shutdown"] = "Shutdown";
1445
+ HttpStreamAbortReasonKind2["InternalError"] = "InternalError";
1446
+ return HttpStreamAbortReasonKind2;
1447
+ })(HttpStreamAbortReasonKind || {});
1448
+ function readHttpStreamAbortReasonKind(bc) {
1449
+ const offset = bc.offset;
1450
+ const tag = bare.readU8(bc);
1451
+ switch (tag) {
1452
+ case 0:
1453
+ return "Unknown" /* Unknown */;
1454
+ case 1:
1455
+ return "ClientDisconnect" /* ClientDisconnect */;
1456
+ case 2:
1457
+ return "HandlerError" /* HandlerError */;
1458
+ case 3:
1459
+ return "IdleTimeout" /* IdleTimeout */;
1460
+ case 4:
1461
+ return "Overloaded" /* Overloaded */;
1462
+ case 5:
1463
+ return "BodyTooLarge" /* BodyTooLarge */;
1464
+ case 6:
1465
+ return "OutOfMemory" /* OutOfMemory */;
1466
+ case 7:
1467
+ return "Shutdown" /* Shutdown */;
1468
+ case 8:
1469
+ return "InternalError" /* InternalError */;
1470
+ default: {
1471
+ bc.offset = offset;
1472
+ throw new bare.BareError(offset, "invalid tag");
1473
+ }
1474
+ }
1475
+ }
1476
+ function writeHttpStreamAbortReasonKind(bc, x) {
1477
+ switch (x) {
1478
+ case "Unknown" /* Unknown */: {
1479
+ bare.writeU8(bc, 0);
1480
+ break;
1481
+ }
1482
+ case "ClientDisconnect" /* ClientDisconnect */: {
1483
+ bare.writeU8(bc, 1);
1484
+ break;
1485
+ }
1486
+ case "HandlerError" /* HandlerError */: {
1487
+ bare.writeU8(bc, 2);
1488
+ break;
1489
+ }
1490
+ case "IdleTimeout" /* IdleTimeout */: {
1491
+ bare.writeU8(bc, 3);
1492
+ break;
1493
+ }
1494
+ case "Overloaded" /* Overloaded */: {
1495
+ bare.writeU8(bc, 4);
1496
+ break;
1497
+ }
1498
+ case "BodyTooLarge" /* BodyTooLarge */: {
1499
+ bare.writeU8(bc, 5);
1500
+ break;
1501
+ }
1502
+ case "OutOfMemory" /* OutOfMemory */: {
1503
+ bare.writeU8(bc, 6);
1504
+ break;
1505
+ }
1506
+ case "Shutdown" /* Shutdown */: {
1507
+ bare.writeU8(bc, 7);
1508
+ break;
1509
+ }
1510
+ case "InternalError" /* InternalError */: {
1511
+ bare.writeU8(bc, 8);
1512
+ break;
1513
+ }
1514
+ }
1515
+ }
1516
+ function readHttpStreamAbortReason(bc) {
1517
+ return {
1518
+ kind: readHttpStreamAbortReasonKind(bc),
1519
+ detail: read15(bc)
1520
+ };
1521
+ }
1522
+ function writeHttpStreamAbortReason(bc, x) {
1523
+ writeHttpStreamAbortReasonKind(bc, x.kind);
1524
+ write15(bc, x.detail);
1525
+ }
1526
+ function readToEnvoyRequestAbort(bc) {
1527
+ return {
1528
+ reason: readHttpStreamAbortReason(bc)
1529
+ };
1530
+ }
1531
+ function writeToEnvoyRequestAbort(bc, x) {
1532
+ writeHttpStreamAbortReason(bc, x.reason);
1533
+ }
1436
1534
  function readToRivetResponseStart(bc) {
1437
1535
  return {
1438
1536
  status: bare.readU16(bc),
@@ -1457,6 +1555,14 @@ function writeToRivetResponseChunk(bc, x) {
1457
1555
  bare.writeData(bc, x.body);
1458
1556
  bare.writeBool(bc, x.finish);
1459
1557
  }
1558
+ function readToRivetResponseAbort(bc) {
1559
+ return {
1560
+ reason: readHttpStreamAbortReason(bc)
1561
+ };
1562
+ }
1563
+ function writeToRivetResponseAbort(bc, x) {
1564
+ writeHttpStreamAbortReason(bc, x.reason);
1565
+ }
1460
1566
  function readToEnvoyWebSocketOpen(bc) {
1461
1567
  return {
1462
1568
  actorId: readId(bc),
@@ -1545,7 +1651,7 @@ function readToRivetTunnelMessageKind(bc) {
1545
1651
  case 1:
1546
1652
  return { tag: "ToRivetResponseChunk", val: readToRivetResponseChunk(bc) };
1547
1653
  case 2:
1548
- return { tag: "ToRivetResponseAbort", val: null };
1654
+ return { tag: "ToRivetResponseAbort", val: readToRivetResponseAbort(bc) };
1549
1655
  case 3:
1550
1656
  return { tag: "ToRivetWebSocketOpen", val: readToRivetWebSocketOpen(bc) };
1551
1657
  case 4:
@@ -1574,6 +1680,7 @@ function writeToRivetTunnelMessageKind(bc, x) {
1574
1680
  }
1575
1681
  case "ToRivetResponseAbort": {
1576
1682
  bare.writeU8(bc, 2);
1683
+ writeToRivetResponseAbort(bc, x.val);
1577
1684
  break;
1578
1685
  }
1579
1686
  case "ToRivetWebSocketOpen": {
@@ -1617,7 +1724,7 @@ function readToEnvoyTunnelMessageKind(bc) {
1617
1724
  case 1:
1618
1725
  return { tag: "ToEnvoyRequestChunk", val: readToEnvoyRequestChunk(bc) };
1619
1726
  case 2:
1620
- return { tag: "ToEnvoyRequestAbort", val: null };
1727
+ return { tag: "ToEnvoyRequestAbort", val: readToEnvoyRequestAbort(bc) };
1621
1728
  case 3:
1622
1729
  return { tag: "ToEnvoyWebSocketOpen", val: readToEnvoyWebSocketOpen(bc) };
1623
1730
  case 4:
@@ -1644,6 +1751,7 @@ function writeToEnvoyTunnelMessageKind(bc, x) {
1644
1751
  }
1645
1752
  case "ToEnvoyRequestAbort": {
1646
1753
  bare.writeU8(bc, 2);
1754
+ writeToEnvoyRequestAbort(bc, x.val);
1647
1755
  break;
1648
1756
  }
1649
1757
  case "ToEnvoyWebSocketOpen": {
@@ -2322,8 +2430,9 @@ function decodeToOutbound(bytes) {
2322
2430
  function assert(condition, message) {
2323
2431
  if (!condition) throw new Error(message ?? "Assertion failed");
2324
2432
  }
2325
- var VERSION = 5;
2433
+ var VERSION = 6;
2326
2434
  export {
2435
+ HttpStreamAbortReasonKind,
2327
2436
  StopActorReason,
2328
2437
  StopCode,
2329
2438
  VERSION,
@@ -2357,6 +2466,8 @@ export {
2357
2466
  readEventWrapper,
2358
2467
  readGatewayId,
2359
2468
  readHibernatingRequest,
2469
+ readHttpStreamAbortReason,
2470
+ readHttpStreamAbortReasonKind,
2360
2471
  readId,
2361
2472
  readJson,
2362
2473
  readKvDeleteRangeRequest,
@@ -2417,6 +2528,7 @@ export {
2417
2528
  readToEnvoyInit,
2418
2529
  readToEnvoyKvResponse,
2419
2530
  readToEnvoyPing,
2531
+ readToEnvoyRequestAbort,
2420
2532
  readToEnvoyRequestChunk,
2421
2533
  readToEnvoyRequestStart,
2422
2534
  readToEnvoySqliteCommitResponse,
@@ -2438,6 +2550,7 @@ export {
2438
2550
  readToRivetKvRequest,
2439
2551
  readToRivetMetadata,
2440
2552
  readToRivetPong,
2553
+ readToRivetResponseAbort,
2441
2554
  readToRivetResponseChunk,
2442
2555
  readToRivetResponseStart,
2443
2556
  readToRivetSqliteCommitRequest,
@@ -2468,6 +2581,8 @@ export {
2468
2581
  writeEventWrapper,
2469
2582
  writeGatewayId,
2470
2583
  writeHibernatingRequest,
2584
+ writeHttpStreamAbortReason,
2585
+ writeHttpStreamAbortReasonKind,
2471
2586
  writeId,
2472
2587
  writeJson,
2473
2588
  writeKvDeleteRangeRequest,
@@ -2528,6 +2643,7 @@ export {
2528
2643
  writeToEnvoyInit,
2529
2644
  writeToEnvoyKvResponse,
2530
2645
  writeToEnvoyPing,
2646
+ writeToEnvoyRequestAbort,
2531
2647
  writeToEnvoyRequestChunk,
2532
2648
  writeToEnvoyRequestStart,
2533
2649
  writeToEnvoySqliteCommitResponse,
@@ -2549,6 +2665,7 @@ export {
2549
2665
  writeToRivetKvRequest,
2550
2666
  writeToRivetMetadata,
2551
2667
  writeToRivetPong,
2668
+ writeToRivetResponseAbort,
2552
2669
  writeToRivetResponseChunk,
2553
2670
  writeToRivetResponseStart,
2554
2671
  writeToRivetSqliteCommitRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/engine-envoy-protocol",
3
- "version": "0.0.0-fix-engine-autospawn-binary-path.bd77b98",
3
+ "version": "0.0.0-http-body-streaming.6d1723c",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {