@restatedev/restate-sdk 0.6.0 → 0.7.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.
Files changed (63) hide show
  1. package/README.md +12 -2
  2. package/dist/connection/buffered_connection.d.ts +14 -0
  3. package/dist/connection/buffered_connection.d.ts.map +1 -0
  4. package/dist/connection/buffered_connection.js +44 -0
  5. package/dist/connection/buffered_connection.js.map +1 -0
  6. package/dist/connection/embedded_connection.d.ts +2 -4
  7. package/dist/connection/embedded_connection.d.ts.map +1 -1
  8. package/dist/connection/embedded_connection.js +6 -25
  9. package/dist/connection/embedded_connection.js.map +1 -1
  10. package/dist/connection/http_connection.d.ts +1 -1
  11. package/dist/connection/http_connection.d.ts.map +1 -1
  12. package/dist/connection/http_connection.js +14 -14
  13. package/dist/connection/http_connection.js.map +1 -1
  14. package/dist/generated/proto/protocol.d.ts +52 -16
  15. package/dist/generated/proto/protocol.d.ts.map +1 -1
  16. package/dist/generated/proto/protocol.js +293 -74
  17. package/dist/generated/proto/protocol.js.map +1 -1
  18. package/dist/invocation.d.ts +12 -2
  19. package/dist/invocation.d.ts.map +1 -1
  20. package/dist/invocation.js +19 -3
  21. package/dist/invocation.js.map +1 -1
  22. package/dist/io/encoder.d.ts.map +1 -1
  23. package/dist/io/encoder.js +20 -9
  24. package/dist/io/encoder.js.map +1 -1
  25. package/dist/journal.d.ts +2 -1
  26. package/dist/journal.d.ts.map +1 -1
  27. package/dist/journal.js +15 -11
  28. package/dist/journal.js.map +1 -1
  29. package/dist/public_api.js +1 -2
  30. package/dist/public_api.js.map +1 -1
  31. package/dist/restate_context_impl.d.ts.map +1 -1
  32. package/dist/restate_context_impl.js +2 -2
  33. package/dist/restate_context_impl.js.map +1 -1
  34. package/dist/server/base_restate_server.d.ts +1 -1
  35. package/dist/server/base_restate_server.d.ts.map +1 -1
  36. package/dist/server/base_restate_server.js +6 -3
  37. package/dist/server/base_restate_server.js.map +1 -1
  38. package/dist/server/restate_lambda_handler.js +1 -1
  39. package/dist/server/restate_lambda_handler.js.map +1 -1
  40. package/dist/server/restate_server.d.ts +45 -39
  41. package/dist/server/restate_server.d.ts.map +1 -1
  42. package/dist/server/restate_server.js +42 -86
  43. package/dist/server/restate_server.js.map +1 -1
  44. package/dist/state_machine.d.ts +1 -1
  45. package/dist/state_machine.d.ts.map +1 -1
  46. package/dist/state_machine.js +27 -9
  47. package/dist/state_machine.js.map +1 -1
  48. package/dist/types/errors.d.ts +1 -1
  49. package/dist/types/errors.d.ts.map +1 -1
  50. package/dist/types/errors.js +8 -2
  51. package/dist/types/errors.js.map +1 -1
  52. package/dist/types/protocol.d.ts +5 -3
  53. package/dist/types/protocol.d.ts.map +1 -1
  54. package/dist/types/protocol.js +11 -1
  55. package/dist/types/protocol.js.map +1 -1
  56. package/dist/types/types.d.ts.map +1 -1
  57. package/dist/types/types.js +7 -6
  58. package/dist/types/types.js.map +1 -1
  59. package/dist/utils/utils.d.ts +1 -0
  60. package/dist/utils/utils.d.ts.map +1 -1
  61. package/dist/utils/utils.js +26 -1
  62. package/dist/utils/utils.js.map +1 -1
  63. package/package.json +1 -1
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.protoMetadata = exports.Failure = exports.CompleteAwakeableEntryMessage = exports.AwakeableEntryMessage = exports.BackgroundInvokeEntryMessage = exports.InvokeEntryMessage = exports.SleepEntryMessage = exports.ClearStateEntryMessage = exports.SetStateEntryMessage = exports.GetStateEntryMessage = exports.OutputStreamEntryMessage = exports.PollInputStreamEntryMessage = exports.ErrorMessage = exports.SuspensionMessage = exports.CompletionMessage = exports.StartMessage_StateEntry = exports.StartMessage = exports.protobufPackage = void 0;
6
+ exports.protoMetadata = exports.Failure = exports.CompleteAwakeableEntryMessage = exports.AwakeableEntryMessage = exports.BackgroundInvokeEntryMessage = exports.InvokeEntryMessage = exports.SleepEntryMessage = exports.ClearStateEntryMessage = exports.SetStateEntryMessage = exports.GetStateEntryMessage = exports.OutputStreamEntryMessage = exports.PollInputStreamEntryMessage = exports.EndMessage = exports.EntryAckMessage = exports.ErrorMessage = exports.SuspensionMessage = exports.CompletionMessage = exports.StartMessage_StateEntry = exports.StartMessage = exports.protobufPackage = void 0;
7
7
  /* eslint-disable */
8
8
  const long_1 = __importDefault(require("long"));
9
9
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
@@ -425,14 +425,104 @@ exports.ErrorMessage = {
425
425
  return message;
426
426
  },
427
427
  };
428
+ function createBaseEntryAckMessage() {
429
+ return { entryIndex: 0 };
430
+ }
431
+ exports.EntryAckMessage = {
432
+ encode(message, writer = minimal_1.default.Writer.create()) {
433
+ if (message.entryIndex !== 0) {
434
+ writer.uint32(8).uint32(message.entryIndex);
435
+ }
436
+ return writer;
437
+ },
438
+ decode(input, length) {
439
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
440
+ let end = length === undefined ? reader.len : reader.pos + length;
441
+ const message = createBaseEntryAckMessage();
442
+ while (reader.pos < end) {
443
+ const tag = reader.uint32();
444
+ switch (tag >>> 3) {
445
+ case 1:
446
+ if (tag !== 8) {
447
+ break;
448
+ }
449
+ message.entryIndex = reader.uint32();
450
+ continue;
451
+ }
452
+ if ((tag & 7) === 4 || tag === 0) {
453
+ break;
454
+ }
455
+ reader.skipType(tag & 7);
456
+ }
457
+ return message;
458
+ },
459
+ fromJSON(object) {
460
+ return { entryIndex: isSet(object.entryIndex) ? globalThis.Number(object.entryIndex) : 0 };
461
+ },
462
+ toJSON(message) {
463
+ const obj = {};
464
+ if (message.entryIndex !== 0) {
465
+ obj.entryIndex = Math.round(message.entryIndex);
466
+ }
467
+ return obj;
468
+ },
469
+ create(base) {
470
+ return exports.EntryAckMessage.fromPartial(base ?? {});
471
+ },
472
+ fromPartial(object) {
473
+ const message = createBaseEntryAckMessage();
474
+ message.entryIndex = object.entryIndex ?? 0;
475
+ return message;
476
+ },
477
+ };
478
+ function createBaseEndMessage() {
479
+ return {};
480
+ }
481
+ exports.EndMessage = {
482
+ encode(_, writer = minimal_1.default.Writer.create()) {
483
+ return writer;
484
+ },
485
+ decode(input, length) {
486
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
487
+ let end = length === undefined ? reader.len : reader.pos + length;
488
+ const message = createBaseEndMessage();
489
+ while (reader.pos < end) {
490
+ const tag = reader.uint32();
491
+ switch (tag >>> 3) {
492
+ }
493
+ if ((tag & 7) === 4 || tag === 0) {
494
+ break;
495
+ }
496
+ reader.skipType(tag & 7);
497
+ }
498
+ return message;
499
+ },
500
+ fromJSON(_) {
501
+ return {};
502
+ },
503
+ toJSON(_) {
504
+ const obj = {};
505
+ return obj;
506
+ },
507
+ create(base) {
508
+ return exports.EndMessage.fromPartial(base ?? {});
509
+ },
510
+ fromPartial(_) {
511
+ const message = createBaseEndMessage();
512
+ return message;
513
+ },
514
+ };
428
515
  function createBasePollInputStreamEntryMessage() {
429
- return { value: Buffer.alloc(0) };
516
+ return { value: undefined, failure: undefined };
430
517
  }
431
518
  exports.PollInputStreamEntryMessage = {
432
519
  encode(message, writer = minimal_1.default.Writer.create()) {
433
- if (message.value.length !== 0) {
520
+ if (message.value !== undefined) {
434
521
  writer.uint32(114).bytes(message.value);
435
522
  }
523
+ if (message.failure !== undefined) {
524
+ exports.Failure.encode(message.failure, writer.uint32(122).fork()).ldelim();
525
+ }
436
526
  return writer;
437
527
  },
438
528
  decode(input, length) {
@@ -448,6 +538,12 @@ exports.PollInputStreamEntryMessage = {
448
538
  }
449
539
  message.value = reader.bytes();
450
540
  continue;
541
+ case 15:
542
+ if (tag !== 122) {
543
+ break;
544
+ }
545
+ message.failure = exports.Failure.decode(reader, reader.uint32());
546
+ continue;
451
547
  }
452
548
  if ((tag & 7) === 4 || tag === 0) {
453
549
  break;
@@ -457,13 +553,19 @@ exports.PollInputStreamEntryMessage = {
457
553
  return message;
458
554
  },
459
555
  fromJSON(object) {
460
- return { value: isSet(object.value) ? Buffer.from(bytesFromBase64(object.value)) : Buffer.alloc(0) };
556
+ return {
557
+ value: isSet(object.value) ? Buffer.from(bytesFromBase64(object.value)) : undefined,
558
+ failure: isSet(object.failure) ? exports.Failure.fromJSON(object.failure) : undefined,
559
+ };
461
560
  },
462
561
  toJSON(message) {
463
562
  const obj = {};
464
- if (message.value.length !== 0) {
563
+ if (message.value !== undefined) {
465
564
  obj.value = base64FromBytes(message.value);
466
565
  }
566
+ if (message.failure !== undefined) {
567
+ obj.failure = exports.Failure.toJSON(message.failure);
568
+ }
467
569
  return obj;
468
570
  },
469
571
  create(base) {
@@ -471,7 +573,10 @@ exports.PollInputStreamEntryMessage = {
471
573
  },
472
574
  fromPartial(object) {
473
575
  const message = createBasePollInputStreamEntryMessage();
474
- message.value = object.value ?? Buffer.alloc(0);
576
+ message.value = object.value ?? undefined;
577
+ message.failure = (object.failure !== undefined && object.failure !== null)
578
+ ? exports.Failure.fromPartial(object.failure)
579
+ : undefined;
475
580
  return message;
476
581
  },
477
582
  };
@@ -544,7 +649,7 @@ exports.OutputStreamEntryMessage = {
544
649
  },
545
650
  };
546
651
  function createBaseGetStateEntryMessage() {
547
- return { key: Buffer.alloc(0), empty: undefined, value: undefined };
652
+ return { key: Buffer.alloc(0), empty: undefined, value: undefined, failure: undefined };
548
653
  }
549
654
  exports.GetStateEntryMessage = {
550
655
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -557,6 +662,9 @@ exports.GetStateEntryMessage = {
557
662
  if (message.value !== undefined) {
558
663
  writer.uint32(114).bytes(message.value);
559
664
  }
665
+ if (message.failure !== undefined) {
666
+ exports.Failure.encode(message.failure, writer.uint32(122).fork()).ldelim();
667
+ }
560
668
  return writer;
561
669
  },
562
670
  decode(input, length) {
@@ -584,6 +692,12 @@ exports.GetStateEntryMessage = {
584
692
  }
585
693
  message.value = reader.bytes();
586
694
  continue;
695
+ case 15:
696
+ if (tag !== 122) {
697
+ break;
698
+ }
699
+ message.failure = exports.Failure.decode(reader, reader.uint32());
700
+ continue;
587
701
  }
588
702
  if ((tag & 7) === 4 || tag === 0) {
589
703
  break;
@@ -597,6 +711,7 @@ exports.GetStateEntryMessage = {
597
711
  key: isSet(object.key) ? Buffer.from(bytesFromBase64(object.key)) : Buffer.alloc(0),
598
712
  empty: isSet(object.empty) ? empty_1.Empty.fromJSON(object.empty) : undefined,
599
713
  value: isSet(object.value) ? Buffer.from(bytesFromBase64(object.value)) : undefined,
714
+ failure: isSet(object.failure) ? exports.Failure.fromJSON(object.failure) : undefined,
600
715
  };
601
716
  },
602
717
  toJSON(message) {
@@ -610,6 +725,9 @@ exports.GetStateEntryMessage = {
610
725
  if (message.value !== undefined) {
611
726
  obj.value = base64FromBytes(message.value);
612
727
  }
728
+ if (message.failure !== undefined) {
729
+ obj.failure = exports.Failure.toJSON(message.failure);
730
+ }
613
731
  return obj;
614
732
  },
615
733
  create(base) {
@@ -620,6 +738,9 @@ exports.GetStateEntryMessage = {
620
738
  message.key = object.key ?? Buffer.alloc(0);
621
739
  message.empty = (object.empty !== undefined && object.empty !== null) ? empty_1.Empty.fromPartial(object.empty) : undefined;
622
740
  message.value = object.value ?? undefined;
741
+ message.failure = (object.failure !== undefined && object.failure !== null)
742
+ ? exports.Failure.fromPartial(object.failure)
743
+ : undefined;
623
744
  return message;
624
745
  },
625
746
  };
@@ -740,15 +861,18 @@ exports.ClearStateEntryMessage = {
740
861
  },
741
862
  };
742
863
  function createBaseSleepEntryMessage() {
743
- return { wakeUpTime: 0, result: undefined };
864
+ return { wakeUpTime: 0, empty: undefined, failure: undefined };
744
865
  }
745
866
  exports.SleepEntryMessage = {
746
867
  encode(message, writer = minimal_1.default.Writer.create()) {
747
868
  if (message.wakeUpTime !== 0) {
748
869
  writer.uint32(8).uint64(message.wakeUpTime);
749
870
  }
750
- if (message.result !== undefined) {
751
- empty_1.Empty.encode(message.result, writer.uint32(106).fork()).ldelim();
871
+ if (message.empty !== undefined) {
872
+ empty_1.Empty.encode(message.empty, writer.uint32(106).fork()).ldelim();
873
+ }
874
+ if (message.failure !== undefined) {
875
+ exports.Failure.encode(message.failure, writer.uint32(122).fork()).ldelim();
752
876
  }
753
877
  return writer;
754
878
  },
@@ -769,7 +893,13 @@ exports.SleepEntryMessage = {
769
893
  if (tag !== 106) {
770
894
  break;
771
895
  }
772
- message.result = empty_1.Empty.decode(reader, reader.uint32());
896
+ message.empty = empty_1.Empty.decode(reader, reader.uint32());
897
+ continue;
898
+ case 15:
899
+ if (tag !== 122) {
900
+ break;
901
+ }
902
+ message.failure = exports.Failure.decode(reader, reader.uint32());
773
903
  continue;
774
904
  }
775
905
  if ((tag & 7) === 4 || tag === 0) {
@@ -782,7 +912,8 @@ exports.SleepEntryMessage = {
782
912
  fromJSON(object) {
783
913
  return {
784
914
  wakeUpTime: isSet(object.wakeUpTime) ? globalThis.Number(object.wakeUpTime) : 0,
785
- result: isSet(object.result) ? empty_1.Empty.fromJSON(object.result) : undefined,
915
+ empty: isSet(object.empty) ? empty_1.Empty.fromJSON(object.empty) : undefined,
916
+ failure: isSet(object.failure) ? exports.Failure.fromJSON(object.failure) : undefined,
786
917
  };
787
918
  },
788
919
  toJSON(message) {
@@ -790,8 +921,11 @@ exports.SleepEntryMessage = {
790
921
  if (message.wakeUpTime !== 0) {
791
922
  obj.wakeUpTime = Math.round(message.wakeUpTime);
792
923
  }
793
- if (message.result !== undefined) {
794
- obj.result = empty_1.Empty.toJSON(message.result);
924
+ if (message.empty !== undefined) {
925
+ obj.empty = empty_1.Empty.toJSON(message.empty);
926
+ }
927
+ if (message.failure !== undefined) {
928
+ obj.failure = exports.Failure.toJSON(message.failure);
795
929
  }
796
930
  return obj;
797
931
  },
@@ -801,8 +935,9 @@ exports.SleepEntryMessage = {
801
935
  fromPartial(object) {
802
936
  const message = createBaseSleepEntryMessage();
803
937
  message.wakeUpTime = object.wakeUpTime ?? 0;
804
- message.result = (object.result !== undefined && object.result !== null)
805
- ? empty_1.Empty.fromPartial(object.result)
938
+ message.empty = (object.empty !== undefined && object.empty !== null) ? empty_1.Empty.fromPartial(object.empty) : undefined;
939
+ message.failure = (object.failure !== undefined && object.failure !== null)
940
+ ? exports.Failure.fromPartial(object.failure)
806
941
  : undefined;
807
942
  return message;
808
943
  },
@@ -1469,6 +1604,40 @@ exports.protoMetadata = {
1469
1604
  "options": undefined,
1470
1605
  "reservedRange": [],
1471
1606
  "reservedName": [],
1607
+ }, {
1608
+ "name": "EntryAckMessage",
1609
+ "field": [{
1610
+ "name": "entry_index",
1611
+ "number": 1,
1612
+ "label": 1,
1613
+ "type": 13,
1614
+ "typeName": "",
1615
+ "extendee": "",
1616
+ "defaultValue": "",
1617
+ "oneofIndex": 0,
1618
+ "jsonName": "entryIndex",
1619
+ "options": undefined,
1620
+ "proto3Optional": false,
1621
+ }],
1622
+ "extension": [],
1623
+ "nestedType": [],
1624
+ "enumType": [],
1625
+ "extensionRange": [],
1626
+ "oneofDecl": [],
1627
+ "options": undefined,
1628
+ "reservedRange": [],
1629
+ "reservedName": [],
1630
+ }, {
1631
+ "name": "EndMessage",
1632
+ "field": [],
1633
+ "extension": [],
1634
+ "nestedType": [],
1635
+ "enumType": [],
1636
+ "extensionRange": [],
1637
+ "oneofDecl": [],
1638
+ "options": undefined,
1639
+ "reservedRange": [],
1640
+ "reservedName": [],
1472
1641
  }, {
1473
1642
  "name": "PollInputStreamEntryMessage",
1474
1643
  "field": [{
@@ -1483,12 +1652,24 @@ exports.protoMetadata = {
1483
1652
  "jsonName": "value",
1484
1653
  "options": undefined,
1485
1654
  "proto3Optional": false,
1655
+ }, {
1656
+ "name": "failure",
1657
+ "number": 15,
1658
+ "label": 1,
1659
+ "type": 11,
1660
+ "typeName": ".dev.restate.service.protocol.Failure",
1661
+ "extendee": "",
1662
+ "defaultValue": "",
1663
+ "oneofIndex": 0,
1664
+ "jsonName": "failure",
1665
+ "options": undefined,
1666
+ "proto3Optional": false,
1486
1667
  }],
1487
1668
  "extension": [],
1488
1669
  "nestedType": [],
1489
1670
  "enumType": [],
1490
1671
  "extensionRange": [],
1491
- "oneofDecl": [],
1672
+ "oneofDecl": [{ "name": "result", "options": undefined }],
1492
1673
  "options": undefined,
1493
1674
  "reservedRange": [],
1494
1675
  "reservedName": [],
@@ -1565,6 +1746,18 @@ exports.protoMetadata = {
1565
1746
  "jsonName": "value",
1566
1747
  "options": undefined,
1567
1748
  "proto3Optional": false,
1749
+ }, {
1750
+ "name": "failure",
1751
+ "number": 15,
1752
+ "label": 1,
1753
+ "type": 11,
1754
+ "typeName": ".dev.restate.service.protocol.Failure",
1755
+ "extendee": "",
1756
+ "defaultValue": "",
1757
+ "oneofIndex": 0,
1758
+ "jsonName": "failure",
1759
+ "options": undefined,
1760
+ "proto3Optional": false,
1568
1761
  }],
1569
1762
  "extension": [],
1570
1763
  "nestedType": [],
@@ -1647,7 +1840,7 @@ exports.protoMetadata = {
1647
1840
  "options": undefined,
1648
1841
  "proto3Optional": false,
1649
1842
  }, {
1650
- "name": "result",
1843
+ "name": "empty",
1651
1844
  "number": 13,
1652
1845
  "label": 1,
1653
1846
  "type": 11,
@@ -1655,7 +1848,19 @@ exports.protoMetadata = {
1655
1848
  "extendee": "",
1656
1849
  "defaultValue": "",
1657
1850
  "oneofIndex": 0,
1658
- "jsonName": "result",
1851
+ "jsonName": "empty",
1852
+ "options": undefined,
1853
+ "proto3Optional": false,
1854
+ }, {
1855
+ "name": "failure",
1856
+ "number": 15,
1857
+ "label": 1,
1858
+ "type": 11,
1859
+ "typeName": ".dev.restate.service.protocol.Failure",
1860
+ "extendee": "",
1861
+ "defaultValue": "",
1862
+ "oneofIndex": 0,
1863
+ "jsonName": "failure",
1659
1864
  "options": undefined,
1660
1865
  "proto3Optional": false,
1661
1866
  }],
@@ -1663,7 +1868,7 @@ exports.protoMetadata = {
1663
1868
  "nestedType": [],
1664
1869
  "enumType": [],
1665
1870
  "extensionRange": [],
1666
- "oneofDecl": [],
1871
+ "oneofDecl": [{ "name": "result", "options": undefined }],
1667
1872
  "options": undefined,
1668
1873
  "reservedRange": [],
1669
1874
  "reservedName": [],
@@ -1944,80 +2149,92 @@ exports.protoMetadata = {
1944
2149
  "sourceCodeInfo": {
1945
2150
  "location": [{
1946
2151
  "path": [4, 0],
1947
- "span": [23, 0, 43, 1],
2152
+ "span": [21, 0, 41, 1],
1948
2153
  "leadingComments": " Type: 0x0000 + 0\n",
1949
2154
  "trailingComments": "",
1950
2155
  "leadingDetachedComments": [" --- Core frames ---\n"],
1951
2156
  }, {
1952
2157
  "path": [4, 0, 3, 0, 2, 1],
1953
- "span": [28, 4, 20],
2158
+ "span": [26, 4, 20],
1954
2159
  "leadingComments": ' If value is an empty byte array,\n then it means the value is empty and not "missing" (e.g. empty string).\n',
1955
2160
  "trailingComments": "",
1956
2161
  "leadingDetachedComments": [],
1957
2162
  }, {
1958
2163
  "path": [4, 0, 2, 0],
1959
- "span": [32, 2, 15],
2164
+ "span": [30, 2, 15],
1960
2165
  "leadingComments": " Unique id of the invocation. This id is unique across invocations and won't change when replaying the journal.\n",
1961
2166
  "trailingComments": "",
1962
2167
  "leadingDetachedComments": [],
1963
2168
  }, {
1964
2169
  "path": [4, 0, 2, 1],
1965
- "span": [36, 2, 22],
2170
+ "span": [34, 2, 22],
1966
2171
  "leadingComments": " Invocation id that can be used for logging.\n The user can use this id to address this invocation in admin and status introspection apis.\n",
1967
2172
  "trailingComments": "",
1968
2173
  "leadingDetachedComments": [],
1969
2174
  }, {
1970
2175
  "path": [4, 0, 2, 3],
1971
- "span": [41, 2, 36],
2176
+ "span": [39, 2, 36],
1972
2177
  "leadingComments": " protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED\n",
1973
2178
  "trailingComments": "",
1974
2179
  "leadingDetachedComments": [],
1975
2180
  }, {
1976
2181
  "path": [4, 1],
1977
- "span": [47, 0, 55, 1],
1978
- "leadingComments": " Type: 0x0000 + 1\n Note: Acks to custom messages will have the `empty` field filled.\n",
2182
+ "span": [44, 0, 52, 1],
2183
+ "leadingComments": " Type: 0x0000 + 1\n",
1979
2184
  "trailingComments": "",
1980
2185
  "leadingDetachedComments": [],
1981
2186
  }, {
1982
2187
  "path": [4, 2],
1983
- "span": [59, 0, 66, 1],
2188
+ "span": [56, 0, 63, 1],
1984
2189
  "leadingComments": " Type: 0x0000 + 2\n Implementations MUST send this message when suspending an invocation.\n",
1985
2190
  "trailingComments": "",
1986
2191
  "leadingDetachedComments": [],
1987
2192
  }, {
1988
2193
  "path": [4, 2, 2, 0],
1989
- "span": [65, 2, 36],
2194
+ "span": [62, 2, 36],
1990
2195
  "leadingComments": " This list represents any of the entry_index the invocation is waiting on to progress.\n The runtime will resume the invocation as soon as one of the given entry_index is completed.\n This list MUST not be empty.\n False positive, entry_indexes is a valid plural of entry_indices.\n https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/i/index-indexes-indices\n",
1991
2196
  "trailingComments": " protolint:disable:this REPEATED_FIELD_NAMES_PLURALIZED\n",
1992
2197
  "leadingDetachedComments": [],
1993
2198
  }, {
1994
2199
  "path": [4, 3],
1995
- "span": [69, 0, 81, 1],
2200
+ "span": [66, 0, 78, 1],
1996
2201
  "leadingComments": " Type: 0x0000 + 3\n",
1997
2202
  "trailingComments": "",
1998
2203
  "leadingDetachedComments": [],
1999
2204
  }, {
2000
2205
  "path": [4, 3, 2, 0],
2001
- "span": [76, 2, 18],
2206
+ "span": [73, 2, 18],
2002
2207
  "leadingComments": " The code can be:\n * Any of the error codes defined by OutputStreamEntry.failure (see Failure message)\n * JOURNAL_MISMATCH = 32, that is when the SDK cannot replay a journal due to the mismatch between the journal and the actual code.\n * PROTOCOL_VIOLATION = 33, that is when the SDK receives an unexpected message or an expected message variant, given its state.\n\n If 16 < code < 32, or code > 33, the runtime will interpret it as code 2 (UNKNOWN).\n",
2003
2208
  "trailingComments": "",
2004
2209
  "leadingDetachedComments": [],
2005
2210
  }, {
2006
2211
  "path": [4, 3, 2, 1],
2007
- "span": [78, 2, 21],
2212
+ "span": [75, 2, 21],
2008
2213
  "leadingComments": " Contains a concise error message, e.g. Throwable#getMessage() in Java.\n",
2009
2214
  "trailingComments": "",
2010
2215
  "leadingDetachedComments": [],
2011
2216
  }, {
2012
2217
  "path": [4, 3, 2, 2],
2013
- "span": [80, 2, 25],
2218
+ "span": [77, 2, 25],
2014
2219
  "leadingComments": " Contains a verbose error description, e.g. the exception stacktrace.\n",
2015
2220
  "trailingComments": "",
2016
2221
  "leadingDetachedComments": [],
2017
2222
  }, {
2018
2223
  "path": [4, 4],
2019
- "span": [98, 0, 100, 1],
2020
- "leadingComments": " Kind: Completable JournalEntry\n Type: 0x0400 + 0\n",
2224
+ "span": [81, 0, 83, 1],
2225
+ "leadingComments": " Type: 0x0000 + 4\n",
2226
+ "trailingComments": "",
2227
+ "leadingDetachedComments": [],
2228
+ }, {
2229
+ "path": [4, 5],
2230
+ "span": [87, 0, 88, 1],
2231
+ "leadingComments": " Type: 0x0000 + 5\n Implementations MUST send this message when the invocation lifecycle ends.\n",
2232
+ "trailingComments": "",
2233
+ "leadingDetachedComments": [],
2234
+ }, {
2235
+ "path": [4, 6],
2236
+ "span": [106, 0, 111, 1],
2237
+ "leadingComments": " Completable: Yes\n Fallible: No\n Type: 0x0400 + 0\n",
2021
2238
  "trailingComments": "",
2022
2239
  "leadingDetachedComments": [
2023
2240
  " --- Journal Entries ---\n",
@@ -2025,92 +2242,92 @@ exports.protoMetadata = {
2025
2242
  " ------ Input and output ------\n",
2026
2243
  ],
2027
2244
  }, {
2028
- "path": [4, 5],
2029
- "span": [104, 0, 109, 1],
2030
- "leadingComments": " Kind: Non-Completable JournalEntry\n Type: 0x0400 + 1\n",
2245
+ "path": [4, 7],
2246
+ "span": [116, 0, 121, 1],
2247
+ "leadingComments": " Completable: No\n Fallible: No\n Type: 0x0400 + 1\n",
2031
2248
  "trailingComments": "",
2032
2249
  "leadingDetachedComments": [],
2033
2250
  }, {
2034
- "path": [4, 6],
2035
- "span": [115, 0, 122, 1],
2036
- "leadingComments": " Kind: Completable JournalEntry\n Type: 0x0800 + 0\n",
2251
+ "path": [4, 8],
2252
+ "span": [128, 0, 136, 1],
2253
+ "leadingComments": " Completable: Yes\n Fallible: No\n Type: 0x0800 + 0\n",
2037
2254
  "trailingComments": "",
2038
2255
  "leadingDetachedComments": [" ------ State access ------\n"],
2039
2256
  }, {
2040
- "path": [4, 7],
2041
- "span": [126, 0, 129, 1],
2042
- "leadingComments": " Kind: Non-Completable JournalEntry\n Type: 0x0800 + 1\n",
2257
+ "path": [4, 9],
2258
+ "span": [141, 0, 144, 1],
2259
+ "leadingComments": " Completable: No\n Fallible: No\n Type: 0x0800 + 1\n",
2043
2260
  "trailingComments": "",
2044
2261
  "leadingDetachedComments": [],
2045
2262
  }, {
2046
- "path": [4, 8],
2047
- "span": [133, 0, 135, 1],
2048
- "leadingComments": " Kind: Non-Completable JournalEntry\n Type: 0x0800 + 2\n",
2263
+ "path": [4, 10],
2264
+ "span": [149, 0, 151, 1],
2265
+ "leadingComments": " Completable: No\n Fallible: No\n Type: 0x0800 + 2\n",
2049
2266
  "trailingComments": "",
2050
2267
  "leadingDetachedComments": [],
2051
2268
  }, {
2052
- "path": [4, 9],
2053
- "span": [141, 0, 147, 1],
2054
- "leadingComments": " Kind: Completable JournalEntry\n Type: 0x0C00 + 0\n",
2269
+ "path": [4, 11],
2270
+ "span": [158, 0, 167, 1],
2271
+ "leadingComments": " Completable: Yes\n Fallible: No\n Type: 0x0C00 + 0\n",
2055
2272
  "trailingComments": "",
2056
2273
  "leadingDetachedComments": [" ------ Syscalls ------\n"],
2057
2274
  }, {
2058
- "path": [4, 9, 2, 0],
2059
- "span": [144, 2, 26],
2275
+ "path": [4, 11, 2, 0],
2276
+ "span": [161, 2, 26],
2060
2277
  "leadingComments": " Wake up time.\n The time is set as duration since UNIX Epoch.\n",
2061
2278
  "trailingComments": "",
2062
2279
  "leadingDetachedComments": [],
2063
2280
  }, {
2064
- "path": [4, 10],
2065
- "span": [151, 0, 161, 1],
2066
- "leadingComments": " Kind: Completable JournalEntry\n Type: 0x0C00 + 1\n",
2281
+ "path": [4, 12],
2282
+ "span": [172, 0, 182, 1],
2283
+ "leadingComments": " Completable: Yes\n Fallible: Yes\n Type: 0x0C00 + 1\n",
2067
2284
  "trailingComments": "",
2068
2285
  "leadingDetachedComments": [],
2069
2286
  }, {
2070
- "path": [4, 11],
2071
- "span": [165, 0, 176, 1],
2072
- "leadingComments": " Kind: Non-Completable JournalEntry\n Type: 0x0C00 + 2\n",
2287
+ "path": [4, 13],
2288
+ "span": [187, 0, 198, 1],
2289
+ "leadingComments": " Completable: No\n Fallible: Yes\n Type: 0x0C00 + 2\n",
2073
2290
  "trailingComments": "",
2074
2291
  "leadingDetachedComments": [],
2075
2292
  }, {
2076
- "path": [4, 11, 2, 3],
2077
- "span": [175, 2, 25],
2293
+ "path": [4, 13, 2, 3],
2294
+ "span": [197, 2, 25],
2078
2295
  "leadingComments": " Time when this BackgroundInvoke should be executed.\n The time is set as duration since UNIX Epoch.\n If this value is not set, equal to 0, or past in time,\n the runtime will execute this BackgroundInvoke as soon as possible.\n",
2079
2296
  "trailingComments": "",
2080
2297
  "leadingDetachedComments": [],
2081
2298
  }, {
2082
- "path": [4, 12],
2083
- "span": [181, 0, 186, 1],
2084
- "leadingComments": " Kind: Completable JournalEntry\n Type: 0x0C00 + 3\n Awakeables are addressed by an identifier exposed to the user. See the spec for more details.\n",
2299
+ "path": [4, 14],
2300
+ "span": [204, 0, 209, 1],
2301
+ "leadingComments": " Completable: Yes\n Fallible: No\n Type: 0x0C00 + 3\n Awakeables are addressed by an identifier exposed to the user. See the spec for more details.\n",
2085
2302
  "trailingComments": "",
2086
2303
  "leadingDetachedComments": [],
2087
2304
  }, {
2088
- "path": [4, 13],
2089
- "span": [190, 0, 198, 1],
2090
- "leadingComments": " Kind: Non-Completable JournalEntry\n Type: 0x0C00 + 4\n",
2305
+ "path": [4, 15],
2306
+ "span": [214, 0, 222, 1],
2307
+ "leadingComments": " Completable: No\n Fallible: Yes\n Type: 0x0C00 + 4\n",
2091
2308
  "trailingComments": "",
2092
2309
  "leadingDetachedComments": [],
2093
2310
  }, {
2094
- "path": [4, 13, 2, 0],
2095
- "span": [192, 2, 16],
2311
+ "path": [4, 15, 2, 0],
2312
+ "span": [216, 2, 16],
2096
2313
  "leadingComments": " Identifier of the awakeable. See the spec for more details.\n",
2097
2314
  "trailingComments": "",
2098
2315
  "leadingDetachedComments": [],
2099
2316
  }, {
2100
- "path": [4, 14],
2101
- "span": [204, 0, 212, 1],
2317
+ "path": [4, 16],
2318
+ "span": [228, 0, 236, 1],
2102
2319
  "leadingComments": " This failure object carries user visible errors,\n e.g. invocation failure return value or failure result of an InvokeEntryMessage.\n",
2103
2320
  "trailingComments": "",
2104
2321
  "leadingDetachedComments": [" --- Nested messages\n"],
2105
2322
  }, {
2106
- "path": [4, 14, 2, 0],
2107
- "span": [209, 2, 18],
2323
+ "path": [4, 16, 2, 0],
2324
+ "span": [233, 2, 18],
2108
2325
  "leadingComments": " The code should be any of the gRPC error codes,\n as defined here: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md#status-codes-and-their-use-in-grpc\n\n If code > 16, the runtime will interpret it as code 2 (UNKNOWN).\n",
2109
2326
  "trailingComments": "",
2110
2327
  "leadingDetachedComments": [],
2111
2328
  }, {
2112
- "path": [4, 14, 2, 1],
2113
- "span": [211, 2, 21],
2329
+ "path": [4, 16, 2, 1],
2330
+ "span": [235, 2, 21],
2114
2331
  "leadingComments": " Contains a concise error message, e.g. Throwable#getMessage() in Java.\n",
2115
2332
  "trailingComments": "",
2116
2333
  "leadingDetachedComments": [],
@@ -2124,6 +2341,8 @@ exports.protoMetadata = {
2124
2341
  ".dev.restate.service.protocol.CompletionMessage": exports.CompletionMessage,
2125
2342
  ".dev.restate.service.protocol.SuspensionMessage": exports.SuspensionMessage,
2126
2343
  ".dev.restate.service.protocol.ErrorMessage": exports.ErrorMessage,
2344
+ ".dev.restate.service.protocol.EntryAckMessage": exports.EntryAckMessage,
2345
+ ".dev.restate.service.protocol.EndMessage": exports.EndMessage,
2127
2346
  ".dev.restate.service.protocol.PollInputStreamEntryMessage": exports.PollInputStreamEntryMessage,
2128
2347
  ".dev.restate.service.protocol.OutputStreamEntryMessage": exports.OutputStreamEntryMessage,
2129
2348
  ".dev.restate.service.protocol.GetStateEntryMessage": exports.GetStateEntryMessage,