@rivetkit/engine-envoy-protocol 0.0.0-pr.4614.822b57f → 0.0.0-pr.4646.7b563ef
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 +6 -9
- package/dist/index.js +7 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -516,14 +516,12 @@ declare function writeToEnvoyPing(bc: bare.ByteCursor, x: ToEnvoyPing): void;
|
|
|
516
516
|
/**
|
|
517
517
|
* MARK: To Rivet
|
|
518
518
|
*/
|
|
519
|
-
type
|
|
520
|
-
readonly envoyKey: string;
|
|
521
|
-
readonly version: u32;
|
|
519
|
+
type ToRivetMetadata = {
|
|
522
520
|
readonly prepopulateActorNames: ReadonlyMap<string, ActorName> | null;
|
|
523
521
|
readonly metadata: Json | null;
|
|
524
522
|
};
|
|
525
|
-
declare function
|
|
526
|
-
declare function
|
|
523
|
+
declare function readToRivetMetadata(bc: bare.ByteCursor): ToRivetMetadata;
|
|
524
|
+
declare function writeToRivetMetadata(bc: bare.ByteCursor, x: ToRivetMetadata): void;
|
|
527
525
|
type ToRivetEvents = readonly EventWrapper[];
|
|
528
526
|
declare function readToRivetEvents(bc: bare.ByteCursor): ToRivetEvents;
|
|
529
527
|
declare function writeToRivetEvents(bc: bare.ByteCursor, x: ToRivetEvents): void;
|
|
@@ -546,8 +544,8 @@ type ToRivetKvRequest = {
|
|
|
546
544
|
declare function readToRivetKvRequest(bc: bare.ByteCursor): ToRivetKvRequest;
|
|
547
545
|
declare function writeToRivetKvRequest(bc: bare.ByteCursor, x: ToRivetKvRequest): void;
|
|
548
546
|
type ToRivet = {
|
|
549
|
-
readonly tag: "
|
|
550
|
-
readonly val:
|
|
547
|
+
readonly tag: "ToRivetMetadata";
|
|
548
|
+
readonly val: ToRivetMetadata;
|
|
551
549
|
} | {
|
|
552
550
|
readonly tag: "ToRivetEvents";
|
|
553
551
|
readonly val: ToRivetEvents;
|
|
@@ -577,7 +575,6 @@ declare function decodeToRivet(bytes: Uint8Array): ToRivet;
|
|
|
577
575
|
type ProtocolMetadata = {
|
|
578
576
|
readonly envoyLostThreshold: i64;
|
|
579
577
|
readonly actorStopThreshold: i64;
|
|
580
|
-
readonly serverlessDrainGracePeriod: i64 | null;
|
|
581
578
|
readonly maxResponsePayloadSize: u64;
|
|
582
579
|
};
|
|
583
580
|
declare function readProtocolMetadata(bc: bare.ByteCursor): ProtocolMetadata;
|
|
@@ -696,4 +693,4 @@ declare function encodeToOutbound(x: ToOutbound, config?: Partial<bare.Config>):
|
|
|
696
693
|
declare function decodeToOutbound(bytes: Uint8Array): ToOutbound;
|
|
697
694
|
declare const VERSION = 1;
|
|
698
695
|
|
|
699
|
-
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, 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 ToEnvoyTunnelMessage, type ToEnvoyTunnelMessageKind, type ToEnvoyWebSocketClose, type ToEnvoyWebSocketMessage, type ToEnvoyWebSocketOpen, type ToGateway, type ToGatewayPong, type ToOutbound, type ToOutboundActorStart, type ToRivet, type ToRivetAckCommands, type ToRivetEvents, type
|
|
696
|
+
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, 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 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 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, readStopActorReason, readStopCode, readToEnvoy, readToEnvoyAckEvents, readToEnvoyCommands, readToEnvoyConn, readToEnvoyConnPing, readToEnvoyInit, readToEnvoyKvResponse, readToEnvoyPing, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetResponseChunk, readToRivetResponseStart, 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, writeStopActorReason, writeStopCode, writeToEnvoy, writeToEnvoyAckEvents, writeToEnvoyCommands, writeToEnvoyConn, writeToEnvoyConnPing, writeToEnvoyInit, writeToEnvoyKvResponse, writeToEnvoyPing, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
|
package/dist/index.js
CHANGED
|
@@ -1170,17 +1170,13 @@ function write15(bc, x) {
|
|
|
1170
1170
|
writeJson(bc, x);
|
|
1171
1171
|
}
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function readToRivetMetadata(bc) {
|
|
1174
1174
|
return {
|
|
1175
|
-
envoyKey: bare.readString(bc),
|
|
1176
|
-
version: bare.readU32(bc),
|
|
1177
1175
|
prepopulateActorNames: read14(bc),
|
|
1178
1176
|
metadata: read15(bc)
|
|
1179
1177
|
};
|
|
1180
1178
|
}
|
|
1181
|
-
function
|
|
1182
|
-
bare.writeString(bc, x.envoyKey);
|
|
1183
|
-
bare.writeU32(bc, x.version);
|
|
1179
|
+
function writeToRivetMetadata(bc, x) {
|
|
1184
1180
|
write14(bc, x.prepopulateActorNames);
|
|
1185
1181
|
write15(bc, x.metadata);
|
|
1186
1182
|
}
|
|
@@ -1251,7 +1247,7 @@ function readToRivet(bc) {
|
|
|
1251
1247
|
const tag = bare.readU8(bc);
|
|
1252
1248
|
switch (tag) {
|
|
1253
1249
|
case 0:
|
|
1254
|
-
return { tag: "
|
|
1250
|
+
return { tag: "ToRivetMetadata", val: readToRivetMetadata(bc) };
|
|
1255
1251
|
case 1:
|
|
1256
1252
|
return { tag: "ToRivetEvents", val: readToRivetEvents(bc) };
|
|
1257
1253
|
case 2:
|
|
@@ -1272,9 +1268,9 @@ function readToRivet(bc) {
|
|
|
1272
1268
|
}
|
|
1273
1269
|
function writeToRivet(bc, x) {
|
|
1274
1270
|
switch (x.tag) {
|
|
1275
|
-
case "
|
|
1271
|
+
case "ToRivetMetadata": {
|
|
1276
1272
|
bare.writeU8(bc, 0);
|
|
1277
|
-
|
|
1273
|
+
writeToRivetMetadata(bc, x.val);
|
|
1278
1274
|
break;
|
|
1279
1275
|
}
|
|
1280
1276
|
case "ToRivetEvents": {
|
|
@@ -1329,14 +1325,12 @@ function readProtocolMetadata(bc) {
|
|
|
1329
1325
|
return {
|
|
1330
1326
|
envoyLostThreshold: bare.readI64(bc),
|
|
1331
1327
|
actorStopThreshold: bare.readI64(bc),
|
|
1332
|
-
serverlessDrainGracePeriod: read7(bc),
|
|
1333
1328
|
maxResponsePayloadSize: bare.readU64(bc)
|
|
1334
1329
|
};
|
|
1335
1330
|
}
|
|
1336
1331
|
function writeProtocolMetadata(bc, x) {
|
|
1337
1332
|
bare.writeI64(bc, x.envoyLostThreshold);
|
|
1338
1333
|
bare.writeI64(bc, x.actorStopThreshold);
|
|
1339
|
-
write7(bc, x.serverlessDrainGracePeriod);
|
|
1340
1334
|
bare.writeU64(bc, x.maxResponsePayloadSize);
|
|
1341
1335
|
}
|
|
1342
1336
|
function readToEnvoyInit(bc) {
|
|
@@ -1725,8 +1719,8 @@ export {
|
|
|
1725
1719
|
readToRivet,
|
|
1726
1720
|
readToRivetAckCommands,
|
|
1727
1721
|
readToRivetEvents,
|
|
1728
|
-
readToRivetInit,
|
|
1729
1722
|
readToRivetKvRequest,
|
|
1723
|
+
readToRivetMetadata,
|
|
1730
1724
|
readToRivetPong,
|
|
1731
1725
|
readToRivetResponseChunk,
|
|
1732
1726
|
readToRivetResponseStart,
|
|
@@ -1802,8 +1796,8 @@ export {
|
|
|
1802
1796
|
writeToRivet,
|
|
1803
1797
|
writeToRivetAckCommands,
|
|
1804
1798
|
writeToRivetEvents,
|
|
1805
|
-
writeToRivetInit,
|
|
1806
1799
|
writeToRivetKvRequest,
|
|
1800
|
+
writeToRivetMetadata,
|
|
1807
1801
|
writeToRivetPong,
|
|
1808
1802
|
writeToRivetResponseChunk,
|
|
1809
1803
|
writeToRivetResponseStart,
|