@northtalk/ts 0.3.0 → 0.5.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 (52) hide show
  1. package/README.md +1 -1
  2. package/{base64-DA7UgjG2.js → base64-Dtqaz_0A.js} +3 -3
  3. package/{binary-value-BcHcwVLO.d.ts → binary-value-B3knLdHD.d.ts} +1 -1
  4. package/{capabilities-BCw9uREe.js → capabilities-Bi5Qm6Fr.js} +10 -1
  5. package/{checker-Dmnm2SeU.js → checker-DMI4LiRm.js} +13 -5
  6. package/core-D_9OuTRE.d.ts +22 -0
  7. package/{debug-CY9x_Wsi.d.ts → debug-nN5tQ_p4.d.ts} +479 -45
  8. package/debug.d.ts +2 -2
  9. package/debug.js +1 -1
  10. package/{driver-CwmL5M32.d.ts → driver-Bf-7Roq6.d.ts} +1 -1
  11. package/driver.d.ts +1 -1
  12. package/driver.js +1 -1
  13. package/{encoding-BUhsrLPK.js → encoding-C3Q7pIC9.js} +2 -2
  14. package/{engine-Dj9My1qX.js → engine-BpdGfAND.js} +6 -6
  15. package/{engine-CCzaBIoi.d.ts → engine-CQqt4rTB.d.ts} +2 -2
  16. package/{errors-CPPJmAAh.js → errors-BKJES3Zu.js} +1 -1
  17. package/{group-CnpvKoLw.js → group-Bz2wh72R.js} +5917 -1391
  18. package/http.d.ts +1 -1
  19. package/http.js +3 -3
  20. package/index.d.ts +10 -6
  21. package/index.js +16 -15
  22. package/{inline-grants-Bvk-2aUL.js → inline-grants-Cx0Z9XAt.js} +25 -20
  23. package/{manifest-CeavwKxo.d.ts → manifest-DYAbIyQm.d.ts} +2 -2
  24. package/{manifest-BTwN3NiP.js → manifest-Dw-8Unmf.js} +124 -5
  25. package/message-layer.d.ts +2 -2
  26. package/message-layer.js +2 -2
  27. package/notify.d.ts +1 -1
  28. package/notify.js +1 -1
  29. package/{objects-CawjPfhl.js → objects-BC4fS0vq.js} +1 -1
  30. package/{objects-BdWn56Ia.d.ts → objects-BRcpeXwZ.d.ts} +11 -3
  31. package/package.json +1 -1
  32. package/{readers-C2YMRjC3.js → readers-B5e5bBrY.js} +2 -2
  33. package/{readers-DMCXzY3X.d.ts → readers-L90Hoa97.d.ts} +1 -1
  34. package/{request-pump-binary-Cp3RGZIJ.js → request-pump-binary-BjnyqXV5.js} +4 -4
  35. package/{router-BSREiSux.js → router-BCHEfs4x.js} +5 -5
  36. package/{router-BE5Tbbd7.d.ts → router-CBuMIl6i.d.ts} +2 -2
  37. package/session.d.ts +40 -2
  38. package/session.js +109 -27
  39. package/setup.d.ts +1 -1
  40. package/setup.js +4 -4
  41. package/sha256-9CGf5BS_.js +168 -0
  42. package/sqlite.d.ts +4 -4
  43. package/sqlite.js +26 -20
  44. package/{store-DwESnByX.js → store-DTQa0lyE.js} +2 -2
  45. package/{store-capability-BYghoYSd.js → store-capability-BxXgiRM7.js} +4 -4
  46. package/store.d.ts +2 -2
  47. package/store.js +2 -2
  48. package/{user-capability-kDFbi3sm.js → user-capability-5-IvCeZI.js} +5 -5
  49. package/wasm.d.ts +10 -6
  50. package/wasm.js +51 -27
  51. package/core-D902b5Nu.d.ts +0 -14
  52. package/sha256-B_kyYw3Z.js +0 -124
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.disposable" />
2
2
  //#region src/syntax.d.ts
3
- type SyntaxErrorCode = 'unterminated interpolation' | 'empty interpolation' | 'invalid text escape' | 'invalid text indentation' | 'invalid text delimiter' | 'bad character' | 'unterminated text' | 'bad unit' | 'unexpected token' | 'not a container';
3
+ type SyntaxErrorCode = 'unterminated interpolation' | 'empty interpolation' | 'invalid text escape' | 'invalid text indentation' | 'invalid text delimiter' | 'bad character' | 'unterminated text' | 'bad unit' | 'unit without number' | 'unexpected token' | 'not a container';
4
4
  /** All offsets index the original TS string; line and col count Unicode scalars. */
5
5
  type Trivia = {
6
6
  col: number;
@@ -942,9 +942,12 @@ type Replacement = {
942
942
  end: number;
943
943
  start: number;
944
944
  }[];
945
+ /** Where in `cs` the output so far ends: past the last replaced match. */
946
+ from: number;
945
947
  k: 'replacement';
946
948
  matches: Value[];
947
- pieces: string[];
949
+ /** The output so far: the Text up to `from`, each match replaced. */
950
+ pieces: string;
948
951
  subject: Value;
949
952
  };
950
953
  type Item = Value | Iterator | Replacement | Reader | Receiver | Deadline;
@@ -972,7 +975,6 @@ type Dispatch = {
972
975
  next: number;
973
976
  };
974
977
  type Frame = {
975
- activation?: boolean;
976
978
  body: Body;
977
979
  /** A clause's `clause` charge, added to its first instruction's. */
978
980
  clauseCharge: boolean;
@@ -981,12 +983,106 @@ type Frame = {
981
983
  dispatch: Dispatch | null;
982
984
  handler: string;
983
985
  locals: Value[];
984
- owner?: Frame;
985
986
  pc: number;
986
- /** Inherited by calls and retained recovery/cleanup activations. */
987
+ /** Inherited by calls, and by the policy and cleanup code it runs. */
987
988
  restricted: boolean;
988
989
  stack: Item[];
989
990
  };
991
+ /**
992
+ * A search bound: down to `frame`, and in it only the Unwind Table entries
993
+ * before `entry`, which lie inside the policy or `finally` block that bounds
994
+ * it.
995
+ */
996
+ type Limit = {
997
+ entry: number;
998
+ frame: number;
999
+ };
1000
+ /**
1001
+ * Where a catch search is: the frame and the first entry in it still to test,
1002
+ * the top frame's place, its bound, the frames below `position` it has yet to
1003
+ * charge for leaving, and the entries `skip` says already ran their `finally`
1004
+ * blocks.
1005
+ */
1006
+ type Search = {
1007
+ entry: number;
1008
+ frame: number;
1009
+ limit: Limit | null;
1010
+ position: number;
1011
+ raised: number;
1012
+ skip: Limit | null;
1013
+ };
1014
+ /**
1015
+ * A catch's tests, or a Recovery policy, running in frame `owner`. The failed
1016
+ * frames above it are held aside; the owner's own stack and pc wait in
1017
+ * `ownerStack` and `ownerPc`. `search` goes on from the next entry when the
1018
+ * catch declines.
1019
+ */
1020
+ type DispatchControl = {
1021
+ error: Value;
1022
+ held: Frame[];
1023
+ k: 'dispatch';
1024
+ owner: number;
1025
+ ownerPc: number;
1026
+ ownerStack: Item[];
1027
+ place: number;
1028
+ search: Search;
1029
+ };
1030
+ /**
1031
+ * A `finally` block a cleanup runs: its frame, target, the stack depth it
1032
+ * starts at and its entry. `leave` ends the dispatch under the cleanup, once a
1033
+ * policy's own `finally` blocks have run.
1034
+ */
1035
+ type CleanupStep = {
1036
+ depth: number;
1037
+ entry: number;
1038
+ frame: number;
1039
+ leave: boolean;
1040
+ target: number;
1041
+ };
1042
+ /** What a cleanup does after its last `finally` block. */
1043
+ type Then = {
1044
+ frame: number;
1045
+ k: 'accept';
1046
+ pc: number;
1047
+ stack: Item[];
1048
+ } | {
1049
+ k: 'end';
1050
+ } | {
1051
+ k: 'cancel';
1052
+ } | {
1053
+ args: Value[];
1054
+ attempt: number;
1055
+ frame: number;
1056
+ k: 'transfer';
1057
+ limit: Limit | null;
1058
+ offer: number;
1059
+ offerEntry: number;
1060
+ record: number;
1061
+ } | {
1062
+ k: 'search';
1063
+ search: Search;
1064
+ };
1065
+ /**
1066
+ * `finally` blocks running for `error`, then `then`. `failed` is the logical
1067
+ * size of the operand stack the running block cut from the failed continuation
1068
+ * of frame `failedFrame`, with what each held frame's own block cut; `held`
1069
+ * keeps the failed frames above the running block (chapter 8, Pending cleanup
1070
+ * state). A cancellation holds none.
1071
+ */
1072
+ type CleanupControl = {
1073
+ cleanups: CleanupStep[];
1074
+ error: Value;
1075
+ failed: number;
1076
+ failedFrame: number | null;
1077
+ held: Frame[];
1078
+ k: 'cleanup';
1079
+ /** Whether its `leave` has ended the dispatch under it. */
1080
+ left: boolean;
1081
+ next: number;
1082
+ then: Then;
1083
+ };
1084
+ /** A Run's error control, innermost last (chapter 8, The Unwind Table). */
1085
+ type Control = DispatchControl | CleanupControl;
990
1086
  /**
991
1087
  * What happened in a Run that a Trace records: each raise, caught or not,
992
1088
  * and each clause or branch a guard region skipped, with its error's code or
@@ -1024,6 +1120,8 @@ type RunRecord = {
1024
1120
  args: Value[];
1025
1121
  automatic?: boolean;
1026
1122
  charged: number;
1123
+ /** A metered call's refused `charge`, beside the accepted `charged`. */
1124
+ chargeRefused?: boolean;
1027
1125
  error?: Value;
1028
1126
  id: string;
1029
1127
  kind: 'call';
@@ -1155,6 +1253,8 @@ type Member = {
1155
1253
  call: CallContext | null;
1156
1254
  id: string;
1157
1255
  ms: number;
1256
+ /** Its wait's place in the timer order, taken when it starts (#1752). */
1257
+ order?: number;
1158
1258
  /** A Script reply received before its preempted Join closes. */
1159
1259
  reply?: Resumption;
1160
1260
  /** The checked member instruction retains its destination and owning frame. */
@@ -1200,7 +1300,7 @@ type Resumption = {
1200
1300
  answers: Resumption[];
1201
1301
  k: 'joined';
1202
1302
  } | {
1203
- binds: Value[];
1303
+ binds: number;
1204
1304
  branch: number;
1205
1305
  k: 'event';
1206
1306
  message: Value;
@@ -1250,12 +1350,19 @@ type RunHost = {
1250
1350
  isRevoked?(name: string): boolean;
1251
1351
  /** Whether a name is a Script of the Group. */
1252
1352
  isScript(name: string): boolean;
1353
+ /**
1354
+ * Records a call id as issued, for the Group's lifetime, with whether it
1355
+ * may request charges (Metered Operations).
1356
+ */
1357
+ issue?(id: string, metered?: boolean): void;
1253
1358
  isUnbound?(name: string): boolean;
1254
1359
  /** The object the Script owns, or Nothing. */
1255
1360
  readonly me: Value;
1256
1361
  readonly now: bigint;
1257
1362
  /** The well-known Host Object the Host bound to a name at load. */
1258
1363
  object(name: string): Value | undefined;
1364
+ /** Queues a charge request for an issued call, as `call.requestCharge`. */
1365
+ requestCharge(id: string, fuel: number): ChargeRequest;
1259
1366
  /**
1260
1367
  * Puts a message in the mailbox of a Script, or of an object's nearest
1261
1368
  * Owning Script, or throws ScriptError `mailbox full`; `reply` is the call
@@ -1265,6 +1372,10 @@ type RunHost = {
1265
1372
  send(to: string | ObjectState, message: string, args: Value[], reply: string | null): string | null;
1266
1373
  /** Sends a Command Call with no Handler up the Message Path, as `send` does. */
1267
1374
  sendUp(message: string, args: Value[], reply: string | null): string | null;
1375
+ /** Reserves a Join Member's place among timers, set when the Join suspends. */
1376
+ timerOrder?(): number;
1377
+ /** The next wait's place in the order waits began. */
1378
+ waitOrder?(): number;
1268
1379
  };
1269
1380
  type Receiver = {
1270
1381
  k: 'receiver';
@@ -1316,6 +1427,43 @@ type Outcome = {
1316
1427
  };
1317
1428
  kind: 'cancelled';
1318
1429
  };
1430
+ /**
1431
+ * A Run's state as a save writes it and a restore sets it (save-runs.ts).
1432
+ * Its fields are the Run's own, so a change to one fails to compile here
1433
+ * rather than at save time.
1434
+ */
1435
+ type RunState = {
1436
+ abandoning: string[];
1437
+ alloc: number;
1438
+ calls: number;
1439
+ cancellationAbandons: string[];
1440
+ clause: number;
1441
+ cleanupFrom: number | null;
1442
+ controls: Control[];
1443
+ during: Value;
1444
+ faultAbandons: string[];
1445
+ frames: Frame[];
1446
+ fuel: number;
1447
+ id: string;
1448
+ join: {
1449
+ frame: Frame;
1450
+ members: Member[];
1451
+ start: number;
1452
+ } | null;
1453
+ readonly limits: Limits;
1454
+ offerAttempt: number;
1455
+ openVerdict: boolean;
1456
+ raisedAt: CodePosition | null;
1457
+ records: RunRecord[];
1458
+ resumption: Resumption | null;
1459
+ readonly script: Script$1;
1460
+ segment: number;
1461
+ segmentBase: Value[];
1462
+ suspended: Suspension | null;
1463
+ target: Value;
1464
+ viaFallback: boolean;
1465
+ waitedOn: Suspension | null;
1466
+ };
1319
1467
  declare class Run {
1320
1468
  readonly script: Script$1;
1321
1469
  readonly limits: Limits;
@@ -1371,8 +1519,9 @@ declare class Run {
1371
1519
  persistentState: () => number;
1372
1520
  /** The Script Variables when the Segment began, for rollback (ADR 0006). */
1373
1521
  segmentBase: Value[];
1374
- private cleanups;
1375
- private recoveries;
1522
+ private controls;
1523
+ /** Where its current error was raised, for an errored outcome. */
1524
+ private raisedAt;
1376
1525
  private offerAttempt;
1377
1526
  private outcome;
1378
1527
  private entryError;
@@ -1382,9 +1531,8 @@ declare class Run {
1382
1531
  /** Its entry dispatch reached the Fallback Handler's clauses (ADR 0064). */
1383
1532
  private viaFallback;
1384
1533
  private during;
1385
- private cancellation;
1386
- private cancellationOwners;
1387
- private cleanupFuel;
1534
+ /** Its Fuel when its cancellation cleanup began, if it has been cancelled. */
1535
+ private cleanupFrom;
1388
1536
  /** Calls abandoned when cancellation landed, traced after the cancel Segment. */
1389
1537
  cancellationAbandons: string[];
1390
1538
  rebindCalls(): void;
@@ -1396,6 +1544,13 @@ declare class Run {
1396
1544
  /** A pending call's context: the one suspended on, or an open Join's. */
1397
1545
  pendingCall(id: string): Pick<Member, 'abort' | 'call'> | undefined;
1398
1546
  callAdoptable(id: string): boolean;
1547
+ /**
1548
+ * Settles a charge request for a pending call (Metered Operations): an
1549
+ * affordable one is spent, and one the Run can't pay faults it at the call,
1550
+ * a Join Member at its own site. A suspended Run keeps its committed
1551
+ * Segment; a preempted Join body rolls its open one back.
1552
+ */
1553
+ requestedCharge(id: string, fuel: number): 'accepted' | 'limit';
1399
1554
  /** Reconnect the Host side of a saved suspending Operation. */
1400
1555
  restoredCall(id: string, grantName: string, args: Value[], reissue: boolean): {
1401
1556
  call: Call<unknown>;
@@ -1408,22 +1563,65 @@ declare class Run {
1408
1563
  restore(state: Record<string, unknown>): void;
1409
1564
  /** Validate decoded control after the graph is complete, before Host rebinding. */
1410
1565
  validateSnapshot(knownCode: ReadonlySet<object>): void;
1566
+ /**
1567
+ * The error control's records: each refers to the frames, Unwind Table
1568
+ * entries and offers it names, and they nest as the machine makes them.
1569
+ */
1570
+ private validateControls;
1571
+ /**
1572
+ * The frames as control `i` had them, before the controls after it held
1573
+ * some aside: each later dispatch gives back the frames it holds above its
1574
+ * owner, whose place is its own pc again, and each later cleanup those it
1575
+ * holds above its running block. `pcs` has the places that differ.
1576
+ */
1577
+ private framesAt;
1411
1578
  private validateControl;
1412
1579
  get cancelling(): boolean;
1413
1580
  /** Drop a new Run immediately after dispatch, without entering its body. */
1414
1581
  drop(): void;
1415
1582
  /** Roll back the active Segment and abandon every pending call without unwinding. */
1416
1583
  discard(reason: AbandonReason, betweenSegments?: boolean): string[];
1417
- /** Cancellation lands here; only finally copies are kept for the next turn. */
1584
+ /**
1585
+ * Cancellation lands here: its Segment rolls back, and its `finally`
1586
+ * blocks run, once, innermost first, on the Cleanup Budget; nothing is
1587
+ * unwound (chapter 6, Cancellation and Stop).
1588
+ */
1418
1589
  cancel(betweenSegments?: boolean): void;
1419
- /** Other Runs may have committed since cancellation made this Run ready. */
1420
- beginCleanupSegment(): void;
1421
- /** A parked Run resumes after dispatch, with no resumption instruction. */
1422
- beginReadySegment(): void;
1590
+ /** The index of a cancellation's cleanup among the controls, if it has one. */
1591
+ private cancelControl;
1592
+ /**
1593
+ * Each frame and held frame a cancellation's remaining cleanup needs, with
1594
+ * the size it keeps, or null for a frame it no longer needs (chapter 8,
1595
+ * Pending cleanup state). The running cleanup, and what it calls, keep
1596
+ * their whole stacks; each interrupted stack keeps only the prefix its
1597
+ * `finally` entries need, and an owner or activation none of them needs is
1598
+ * gone. The interrupted dispatch contexts count nothing.
1599
+ */
1600
+ private cancelKept;
1601
+ /**
1602
+ * The stack prefix the `finally` entries of frame `f` covering `place`
1603
+ * need, only those before entry `before` if given, or null when none does.
1604
+ */
1605
+ private finallyPrefix;
1606
+ /** A new Segment: its id moves on, and a rollback returns to here. */
1607
+ private newSegment;
1608
+ /** The same Segment, rolled back to here from now on. */
1609
+ private rebase;
1610
+ /**
1611
+ * Where the Segment stands as the Run is dispatched. A Run that
1612
+ * cancellation made ready rolls back to here, as other Runs may have
1613
+ * committed since. A parked Run resumes after dispatch, with no resumption
1614
+ * instruction, in a new Segment: its park ended the first (chapter 11,
1615
+ * Segment ids).
1616
+ */
1617
+ enterDispatch(how: 'continue' | 'resume' | 'start', cleanupReady: boolean): void;
1423
1618
  park(): boolean;
1424
- private nextCancellationCleanup;
1425
1619
  /** The failed Run’s message for an internally queued error Delivery. */
1426
1620
  setDuring(value: Value): void;
1621
+ /** This Run's state, for a save to write (save-runs.ts). */
1622
+ savedState(): RunState;
1623
+ /** Sets this Run's state from a save, as `savedState` reads it. */
1624
+ restoreState({ script: _, limits: __, ...state }: RunState): void;
1427
1625
  constructor(script: Script$1, entry: Body | Body[], args: Value[], limits?: Limits, code?: Code,
1428
1626
  /** The Selector of a Delivery that may reach a Fallback Handler. */
1429
1627
  fallback?: string);
@@ -1449,7 +1647,12 @@ declare class Run {
1449
1647
  /** Whether a dispatch has a clause left to try after the current one. */
1450
1648
  private static more;
1451
1649
  private get frame();
1452
- /** Tooling-only control views; never part of Inspect or saved state. */
1650
+ /**
1651
+ * Tooling-only control views; never part of Inspect or saved state. The
1652
+ * frames each control retains come first, a dispatch's owner at its own
1653
+ * place, then those it holds aside; then the frames running, where a
1654
+ * policy or a `finally` block runs in a view of its retained owner.
1655
+ */
1453
1656
  debugFrames(): {
1454
1657
  frame: Frame;
1455
1658
  owner?: number;
@@ -1457,6 +1660,12 @@ declare class Run {
1457
1660
  }[];
1458
1661
  /** Charge an instruction, faulting before it does anything if it can't pay. */
1459
1662
  private pay;
1663
+ /** The Fuel the Run has left: of its Cleanup Budget while cancelling. */
1664
+ private fuelLeft;
1665
+ /** The limit a charge the Run can't cover faults on. */
1666
+ private get fuelLimit();
1667
+ /** Spends Fuel the Run can cover; a call's `Take` (call-meter.ts). */
1668
+ private readonly spend;
1460
1669
  private payAmount;
1461
1670
  private pop;
1462
1671
  private popN;
@@ -1485,7 +1694,11 @@ declare class Run {
1485
1694
  get resumingInstruction(): boolean;
1486
1695
  /** Retain a reply while a Fuel Slice has preempted an open Join's body. */
1487
1696
  replyToOpenJoin(id: string, reply: Resumption): boolean;
1488
- /** Replay buffered replies in arrival order once the Join starts waiting. */
1697
+ /**
1698
+ * The replies retained while the Join's body was preempted, replayed in
1699
+ * member start order once it starts waiting, so the earliest-started
1700
+ * member's failure is raised (chapter 5, Joins).
1701
+ */
1489
1702
  takeJoinReplies(): {
1490
1703
  id: string;
1491
1704
  reply: Resumption;
@@ -1557,25 +1770,104 @@ declare class Run {
1557
1770
  * for the frames search leaves, then dispatch there.
1558
1771
  */
1559
1772
  private unwind;
1773
+ /**
1774
+ * Whether no guard or catch in any frame covers the place an error is
1775
+ * raised now, so its search would end the Run. A covering catch whose
1776
+ * tests decline still counts as covering.
1777
+ */
1778
+ private uncovered;
1560
1779
  private unwindNow;
1561
1780
  private activeEntries;
1562
- private realOwner;
1563
1781
  private callWouldExceedDepth;
1564
- private realDepth;
1565
- private searchCatch;
1566
- private entryKey;
1567
- private dispatchEntries;
1568
- private excludeEntry;
1569
- private escapePolicy;
1570
- private withDuring;
1571
- private leaveCleanupSearch;
1572
- private escapeCleanup;
1573
- private exitedCleanups;
1574
- private acceptCatch;
1782
+ private depth;
1783
+ /** The place frame `index` is at: `raised` for the top frame. */
1784
+ private framePc;
1785
+ /**
1786
+ * Whether entry `ei` of frame `index` is one a search or a cleanup may use:
1787
+ * in the frame's own body, inside `limit` at its frame, and not one `skip`
1788
+ * has already done.
1789
+ */
1790
+ private usable;
1791
+ /**
1792
+ * The innermost control bounding an error raised now: a dispatch's policy,
1793
+ * or the `finally` block a cleanup is running.
1794
+ */
1795
+ private limitOf;
1796
+ /**
1797
+ * Searches for a catch from `s`'s frame and entry outward, within its
1798
+ * limit. A covering catch starts its dispatch; an error that escapes its
1799
+ * bound goes on outward from it (chapter 6, Catching).
1800
+ */
1801
+ private search;
1802
+ /**
1803
+ * Starts a catch's tests in frame `owner`: its own operand stack, the
1804
+ * owner's iterator prefix and the error, over the owner's locals. The
1805
+ * failed frames above it are held aside until the dispatch ends.
1806
+ */
1807
+ private beginDispatch;
1808
+ /**
1809
+ * Ends the top dispatch: the owner gets its own stack and place back, and
1810
+ * the held frames return.
1811
+ */
1812
+ private endDispatch;
1813
+ /** `catch-next`: the search goes on outward from the next entry. */
1575
1814
  private nextCatch;
1815
+ /**
1816
+ * `catch-accept`: the exited `finally` blocks run, innermost first, then
1817
+ * the owner goes on after the instruction with the activation's stack.
1818
+ */
1819
+ private acceptCatch;
1820
+ /**
1821
+ * An error escaping a Recovery policy: its original error becomes the new
1822
+ * one's `during`, the policy's exited `finally` blocks and then the
1823
+ * failure's run, and the search goes on outward from the catching `try`,
1824
+ * past its other catches (chapter 6, Catching).
1825
+ */
1826
+ private abortRecovery;
1827
+ /**
1828
+ * The `finally` entries covering each frame's place from the top down to
1829
+ * `low`, innermost first: in `low`, only those before `before`, and none
1830
+ * `skip` has run.
1831
+ */
1832
+ private collect;
1833
+ /** Pushes a cleanup, then runs its first `finally` block or what follows. */
1834
+ private startCleanup;
1835
+ /** Runs the next scheduled `finally` block, or what follows the last. */
1836
+ private nextCleanup;
1837
+ /**
1838
+ * Ends the dispatch under the running cleanup once its policy's own
1839
+ * `finally` blocks have run, and schedules the failure's: down to the
1840
+ * offering frame for a transfer, or to the catching one for an abort.
1841
+ */
1842
+ private leaveDispatch;
1843
+ private addDuring;
1844
+ private withDuring;
1845
+ /** The innermost dispatch, whose failure chain offers are chosen from. */
1846
+ private recovery;
1847
+ /**
1848
+ * The current recovery's failure chain: the innermost dispatch's, or once
1849
+ * a transfer's dispatch has ended, the frames its cleanup is leaving, whose
1850
+ * offers stay eligible until the action is entered.
1851
+ */
1852
+ private chain;
1853
+ /**
1854
+ * Looks `name` up in a failure chain: a dispatch's held frames, its owner at
1855
+ * its place, then the frames below it within its limit; or the Run's
1856
+ * frames. Innermost first, each try's offers in source order; `frames`
1857
+ * counts the frames scanned.
1858
+ */
1576
1859
  private lookupOffer;
1860
+ /**
1861
+ * `choose-offer`: the nearest offer named `name` in the failure chain, with
1862
+ * exactly `count` arguments. Its policy's own `finally` blocks run, then
1863
+ * the failure's down to the offering `try`, then the action is entered.
1864
+ */
1577
1865
  private chooseOffer;
1578
- private advanceTransfer;
1866
+ /**
1867
+ * Enters a chosen action: the frames above its `try` are gone, its
1868
+ * parameters bind at once, and it starts at its entry.
1869
+ */
1870
+ private enterOffer;
1579
1871
  private checkState;
1580
1872
  private returnFrom;
1581
1873
  private callBody;
@@ -1714,8 +2006,11 @@ type SqlRows = {
1714
2006
  readonly rows: readonly (readonly SqlValue[])[];
1715
2007
  };
1716
2008
  /**
1717
- * The Core has checked the Shapes and max, converted params by the chapter 7
1718
- * rules and charged max × perRow. It converts the result, raising `sql` for a
2009
+ * The Core has checked the Shapes and max and converted params by the chapter
2010
+ * 7 rules. query and change call `beforeStep` exactly once immediately before
2011
+ * every SQLite statement step, including the completion check and the probe
2012
+ * past max, and let its LimitReached propagate without stepping (Metered
2013
+ * Operations, SQLite step authorization). The Core converts the result, raising `sql` for a
1719
2014
  * column named twice and `unrepresentable` for a double it can't hold.
1720
2015
  * change, begin, commit and rollback are Segment-bound: they act inside the
1721
2016
  * calling Segment's transaction, which the coordinator publishes or discards.
@@ -1726,17 +2021,17 @@ type SqlRows = {
1726
2021
  */
1727
2022
  type SqliteImpl = {
1728
2023
  begin(call: Call<SqliteBinding>): void;
1729
- change(call: Call<SqliteBinding>, sql: string, params: SqlParams, max: number): SqlRows & {
2024
+ change(call: Call<SqliteBinding>, sql: string, params: SqlParams, max: number, beforeStep: () => void): SqlRows & {
1730
2025
  readonly changes: number;
1731
2026
  };
1732
2027
  commit(call: Call<SqliteBinding>): void;
1733
2028
  /** Called once per Grant. The same database gives the same coordinator. */
1734
2029
  coordinator(database: string): SegmentCoordinator;
1735
- query(call: Call<SqliteBinding>, sql: string, params: SqlParams, max: number): SqlRows;
2030
+ query(call: Call<SqliteBinding>, sql: string, params: SqlParams, max: number, beforeStep: () => void): SqlRows;
1736
2031
  rollback(call: Call<SqliteBinding>): void;
1737
2032
  };
1738
- /** Optional for Hosts. perRow is whole Fuel charged per row of max. */
1739
- declare const sqliteCapability: (impl: SqliteImpl, costs: Costs, perRow: number) => CapabilityDef<SqliteBinding>;
2033
+ /** Optional for Hosts. perStep is whole Fuel charged before each SQLite step. */
2034
+ declare const sqliteCapability: (impl: SqliteImpl, costs: Costs, perStep: number) => CapabilityDef<SqliteBinding>;
1740
2035
  //#endregion
1741
2036
  //#region src/store-capability.d.ts
1742
2037
  /**
@@ -1823,6 +2118,8 @@ type Core = {
1823
2118
  result: RestoreResult;
1824
2119
  };
1825
2120
  sqliteCapability: typeof sqliteCapability;
2121
+ /** Throws `invalid save` or `save mismatch`. */
2122
+ stateFingerprint(save: Uint8Array): Uint8Array;
1826
2123
  storeCapability: typeof storeCapability;
1827
2124
  timerCapability: typeof timerCapability;
1828
2125
  userCapability: typeof userCapability;
@@ -1860,6 +2157,8 @@ type Group = {
1860
2157
  scriptNames(): string[];
1861
2158
  setParent(o: HostObject, parent: HostObject | undefined): void;
1862
2159
  settle(callId: string, s: Settlement): Call<unknown> | undefined;
2160
+ /** Worker. Throws as save() would. */
2161
+ stateFingerprint(): Uint8Array;
1863
2162
  };
1864
2163
  /** A loaded Script's handle. */
1865
2164
  type Script = {
@@ -2031,12 +2330,34 @@ type Call<B, R = Value> = {
2031
2330
  readonly group: Group;
2032
2331
  readonly id: string;
2033
2332
  readonly now: bigint;
2333
+ /**
2334
+ * Queues a request for more Fuel, settled at the end of the Pump that
2335
+ * processes it (Metered Operations). Only a suspending Operation declared
2336
+ * `metering: 'read-only'` may ask, one request at a time.
2337
+ */
2338
+ requestCharge(fuel: number): ChargeRequest;
2034
2339
  readonly runId: string;
2035
2340
  readonly scopeName?: string;
2036
2341
  readonly scriptName: string;
2037
2342
  readonly segmentId: string;
2038
2343
  readonly signal: AbortSignal;
2039
2344
  };
2345
+ /** A queued charge request: its Group-wide id and its outcome. */
2346
+ type ChargeRequest = {
2347
+ readonly id: string;
2348
+ /** Settles at the end of the Pump that processes the request. */
2349
+ readonly result: Promise<ChargeResult>;
2350
+ };
2351
+ type ChargeResult = {
2352
+ readonly call: string;
2353
+ /** The requested amount; only an accepted request spends it. */
2354
+ readonly fuel: number;
2355
+ readonly kind: 'charge result';
2356
+ readonly request: string;
2357
+ readonly status: 'accepted' | 'limit' | 'inactive';
2358
+ };
2359
+ /** How an Operation may charge as it works (Metered Operations). */
2360
+ type Metering = 'read-only' | 'segment-bound';
2040
2361
  /**
2041
2362
  * The JS type a Host function receives for an argument of Shape S (#1420):
2042
2363
  * scalars as their JS forms, Nothing as null, a Host Object as its handle,
@@ -2048,12 +2369,14 @@ type PlainResult<R> = [R] extends [undefined] ? Value : (R extends Shape<infer T
2048
2369
  type PlainArgs<A extends readonly Shape[]> = { -readonly [K in keyof A]: PlainArg<A[K]>; };
2049
2370
  type ImmediateOp<B, A extends readonly Shape[] = Shape[], R = Shape> = OpBase<A, R> & {
2050
2371
  do(call: Call<B, PlainResult<R>>, ...args: PlainArgs<A>): PlainResult<R>;
2372
+ metering?: Metering;
2051
2373
  mode: 'immediate';
2052
2374
  scope?: ScopeDecl;
2053
2375
  segmentBound?: boolean;
2054
2376
  };
2055
2377
  type SuspendingOp<B, A extends readonly Shape[] = Shape[], R = Shape> = OpBase<A, R> & {
2056
2378
  maxPendingMs?: number;
2379
+ metering?: 'read-only';
2057
2380
  mode: 'suspending';
2058
2381
  /**
2059
2382
  * Must honour `call.signal` and settle once it aborts: `drive.close()`
@@ -2071,12 +2394,14 @@ type Operation<B, A extends readonly Shape[] = Shape[], R = Shape> = ImmediateOp
2071
2394
  /** The Core's own form: every argument and result is a Value. */
2072
2395
  type ValueImmediateOp<B> = OpBase & {
2073
2396
  do(call: Call<B>, ...args: Value[]): Value;
2397
+ metering?: Metering;
2074
2398
  mode: 'immediate';
2075
2399
  scope?: ScopeDecl;
2076
2400
  segmentBound?: boolean;
2077
2401
  };
2078
2402
  type ValueSuspendingOp<B> = OpBase & {
2079
2403
  maxPendingMs?: number;
2404
+ metering?: 'read-only';
2080
2405
  mode: 'suspending';
2081
2406
  run?(call: Call<B>, ...args: Value[]): Promise<Value>;
2082
2407
  start?(call: Call<B>, ...args: Value[]): void;
@@ -2576,12 +2901,14 @@ type ScriptSources = {
2576
2901
  };
2577
2902
  type RestoreOptions = GroupOptions & {
2578
2903
  grants(script: string, name: string): Grant<unknown> | undefined;
2904
+ /** With "reload changed", keep each changed Script's mailbox, as Reload's keepMailbox does; ignored otherwise. */
2905
+ keepMailbox?: boolean;
2579
2906
  libraries: readonly Library[];
2580
- onMismatch: 'reject' | 'variables only';
2907
+ onMismatch: 'reject' | 'variables only' | 'reload changed';
2581
2908
  resolve(kind: string, id: string): {
2582
2909
  native: unknown;
2583
2910
  } | undefined;
2584
- /** Native TS external-source snapshots only. Different code requires variables-only policy. */
2911
+ /** Native TS external-source snapshots only. Different code requires a variables-only or Partial Restore. */
2585
2912
  scriptSources?(request: ScriptCodeRequest): ScriptSources | undefined;
2586
2913
  };
2587
2914
  type PendingCall = {
@@ -2600,6 +2927,8 @@ type RestoreResult = {
2600
2927
  disposed: [string, string][];
2601
2928
  droppedMessages: string[];
2602
2929
  pending: PendingCall[];
2930
+ /** The Scripts a Partial Restore rebuilt from their new code, in load order. */
2931
+ reloaded: string[];
2603
2932
  reports: Report[];
2604
2933
  variablesOnly: boolean;
2605
2934
  };
@@ -2641,7 +2970,7 @@ type EffectFailure = {
2641
2970
  segment: string;
2642
2971
  status: 'failed' | 'unknown';
2643
2972
  };
2644
- type Report = AccountingReport | {
2973
+ type Report = AccountingReport | ChargeResult | {
2645
2974
  code: HostErrorCode;
2646
2975
  detail?: string;
2647
2976
  kind: 'host error';
@@ -2801,6 +3130,21 @@ declare class TsGroup implements Group {
2801
3130
  private inputs;
2802
3131
  private deliveries;
2803
3132
  private broadcasts;
3133
+ /**
3134
+ * Each Run's issued call ids' ranges, for the Group's lifetime, with
3135
+ * whether their calls may request charges (Metered Operations).
3136
+ */
3137
+ private issued;
3138
+ /** The last charge request id issued. */
3139
+ private chargeCounter;
3140
+ /** Admitted charge requests whose futures haven't settled, in order. */
3141
+ private charges;
3142
+ /** How many waits have been set: the next wait's order. */
3143
+ private waitOrder;
3144
+ /** Each root's discarded messages, for the Group's lifetime. */
3145
+ private rootDiscards;
3146
+ /** The name a restored Group's save gave it, which its saves keep. */
3147
+ private savedName;
2804
3148
  private saves;
2805
3149
  private lastClock;
2806
3150
  private randomState;
@@ -2826,21 +3170,56 @@ declare class TsGroup implements Group {
2826
3170
  private accountStart;
2827
3171
  private accountEnd;
2828
3172
  private accountDrop;
3173
+ /**
3174
+ * The roots whose work changed since the last accounting tail, which its
3175
+ * next tail reports: as a save holds them, without reporting them.
3176
+ */
3177
+ private changedRoots;
2829
3178
  private flushAccounting;
2830
3179
  /** TS tooling only, outside the embedding interface and Trace parity. */
2831
3180
  debug(): DebugController;
3181
+ /** Fuel an evaluation may spend before it fails. */
3182
+ private static readonly EVALUATION_FUEL;
3183
+ private debugEvaluate;
3184
+ private static refuse;
3185
+ private evaluationHost;
2832
3186
  private advanceDebugPump;
2833
3187
  private attachSession;
2834
3188
  /** Worker. A Fingerprint covers code, declarations and limits, never state. */
2835
3189
  fingerprint(): Uint8Array;
2836
- /** Worker. Host callbacks, bindings and native objects aren't in the bytes. */
2837
- private references;
2838
3190
  save(o?: SaveOptions): Uint8Array;
3191
+ /** Worker. Refused as a save would be, but writes no Trace record. */
3192
+ stateFingerprint(): Uint8Array;
3193
+ private effectsPending;
3194
+ private snapshot;
2839
3195
  /** Build and check the complete replacement before publishing the Group. */
2840
3196
  static restore(bytes: Uint8Array, o: TsRestoreOptions): {
2841
3197
  group: TsGroup;
2842
3198
  result: RestoreResult;
2843
3199
  };
3200
+ /**
3201
+ * A save's second pass: its values, read against the restored Scripts'
3202
+ * code, and every section that holds them.
3203
+ */
3204
+ private readState;
3205
+ /** A unit's code, relative to a Script, as a save names it. */
3206
+ private unitCode;
3207
+ /** Publishes a save's state in the restored Group. */
3208
+ private applyState;
3209
+ /** Restores the wait table: each wait's timers, in the order waits began. */
3210
+ private importWaits;
3211
+ /** A queued Host input from its record, with the Trace line it was given. */
3212
+ private inputOf;
3213
+ /**
3214
+ * Tooling: each of a Script's code units by identity, with its named
3215
+ * functions' Declaration Documentation, so a Session Host can keep it
3216
+ * for Function Values that go stale (chapter 9, `script-units`).
3217
+ */
3218
+ scriptUnitDocs(name: string): [string, Map<string, string>][];
3219
+ /** The code units restored Runs may name. */
3220
+ private knownCode;
3221
+ /** A Library's code a Script imports, by its unit name. */
3222
+ private libraryCode;
2844
3223
  private discardedDecisions;
2845
3224
  private unsettled;
2846
3225
  private restored;
@@ -2849,6 +3228,16 @@ declare class TsGroup implements Group {
2849
3228
  /** Queued, and accepted only before the restored Group's first Pump. */
2850
3229
  settle(id: string, settlement: Settlement): Call<unknown> | undefined;
2851
3230
  private applySettlement;
3231
+ private issuedEligibility;
3232
+ /**
3233
+ * Queues a charge request for an issued call (Metered Operations). A call
3234
+ * the Group never issued is `unknown call`; an ineligible one, an invalid
3235
+ * amount or a second unresolved request is `invalid value`, with no id.
3236
+ */
3237
+ private requestCharge;
3238
+ private drainCharge;
3239
+ private settleCharges;
3240
+ private endFaulted;
2852
3241
  private pendingCall;
2853
3242
  private holders;
2854
3243
  private pendingOperations;
@@ -2877,6 +3266,13 @@ declare class TsGroup implements Group {
2877
3266
  private releaseGrant;
2878
3267
  private releaseGrants;
2879
3268
  private reportStop;
3269
+ /**
3270
+ * A Partial Restore's Reload of a changed Script (ADR 0143). The rest of
3271
+ * the Group sees what a live Reload would give it, but no Host function
3272
+ * runs: this Script's Grants, Segments and scopes were never live here.
3273
+ * Its open Decision recipients are discarded, reported at the first Pump.
3274
+ */
3275
+ private reloadRestored;
2880
3276
  private dropStoppedMailbox;
2881
3277
  private acceptDelivery;
2882
3278
  private recordRefusal;
@@ -2917,6 +3313,12 @@ declare class TsGroup implements Group {
2917
3313
  private settleReply;
2918
3314
  private observe;
2919
3315
  private suspended;
3316
+ /**
3317
+ * What a save keeps of a Run's wait: its order among waits, its Suspension
3318
+ * Point and, once the wait settles, what it waited on.
3319
+ */
3320
+ private markWait;
3321
+ private suspendedWait;
2920
3322
  private checkFunctionGroups;
2921
3323
  /** A queued Delivery: its id now, its line and its mailbox entry at the next Pump. */
2922
3324
  private queueDelivery;
@@ -2968,6 +3370,8 @@ declare class TsGroup implements Group {
2968
3370
  private pumpAtClock;
2969
3371
  private moveDelivery;
2970
3372
  private turn;
3373
+ private handlerOf;
3374
+ private writeEnding;
2971
3375
  private writeCancellationAbandons;
2972
3376
  private callFailed;
2973
3377
  private releaseRecords;
@@ -2976,6 +3380,8 @@ declare class TsGroup implements Group {
2976
3380
  private releaseParked;
2977
3381
  /** A Script's Persistent State: its Script Variables and the messages it holds. */
2978
3382
  private persistentState;
3383
+ /** The logical size of a Script's queued messages, without its Runs. */
3384
+ private mailboxSize;
2979
3385
  /** Worker, and the Host Input `vars`: the Group, read without changing it. */
2980
3386
  private waitView;
2981
3387
  /** A Run's calls and sends that a Rewind leaves done (ADR 0068). */
@@ -3034,6 +3440,16 @@ type DebugSnapshot = Omit<Inspection, 'scripts'> & {
3034
3440
  })[];
3035
3441
  })[];
3036
3442
  };
3443
+ /**
3444
+ * What `evaluate` gave: the body's result, or why it failed. A failure to
3445
+ * compile gives each diagnostic's line in the body, from 1.
3446
+ */
3447
+ type DebugEvaluation = {
3448
+ error: string;
3449
+ line?: number;
3450
+ } | {
3451
+ value: Value;
3452
+ };
3037
3453
  type DebugSource = {
3038
3454
  script?: string;
3039
3455
  statements: number[];
@@ -3044,6 +3460,7 @@ declare class DebugController {
3044
3460
  private readonly read;
3045
3461
  private readonly advance;
3046
3462
  private readonly readSources;
3463
+ private readonly evaluateIn;
3047
3464
  paused: ((pause: DebugPause) => void) | null;
3048
3465
  private breaks;
3049
3466
  private faults;
@@ -3058,18 +3475,35 @@ declare class DebugController {
3058
3475
  private notifying;
3059
3476
  private since;
3060
3477
  private elapsed;
3061
- constructor(read: () => DebugSnapshot, advance: () => PumpResult, readSources: () => DebugSource[]);
3478
+ constructor(read: () => DebugSnapshot, advance: () => PumpResult, readSources: () => DebugSource[], evaluateIn: (body: string, frame: number | undefined) => DebugEvaluation);
3062
3479
  /** Detached lowerings of the code actually loaded, including extensions. */
3063
3480
  sources(): DebugSource[];
3064
3481
  get isPaused(): boolean;
3065
3482
  get current(): DebugPause | null;
3066
3483
  breakAt(instructions: readonly DebugInstruction[]): void;
3067
3484
  clearBreaks(): void;
3485
+ /**
3486
+ * Pause before a raised error unwinds (`error`), only before one no catch
3487
+ * or guard covers (`uncaughtError`), or before a Limit Fault. A catch
3488
+ * whose tests all decline still counts as covering, so `uncaughtError`
3489
+ * can miss an error such a catch lets past, but never stops at one that
3490
+ * is caught.
3491
+ */
3068
3492
  pauseOn(options: {
3069
3493
  error?: boolean;
3070
3494
  limitFault?: boolean;
3495
+ uncaughtError?: boolean;
3071
3496
  }): void;
3072
3497
  snapshot(): DebugSnapshot;
3498
+ /**
3499
+ * Runs a Handler body in the paused Run's Script, where Script Variables
3500
+ * read and write as in any of its Handlers, and the named locals of the
3501
+ * paused Run's frame `frame` (an index into its snapshot's frames, the
3502
+ * innermost by default) read as parameters but can't be assigned. The body
3503
+ * runs at once, alone, and writes no Trace: a send, wait, random draw or
3504
+ * Operation call fails it, as does running out of Fuel.
3505
+ */
3506
+ evaluate(body: string, frame?: number): DebugEvaluation;
3073
3507
  pausedTime(): number;
3074
3508
  resume(): PumpResult;
3075
3509
  step(): PumpResult;
@@ -3088,4 +3522,4 @@ declare class DebugController {
3088
3522
  enter(pause: DebugPause): void;
3089
3523
  }
3090
3524
  //#endregion
3091
- export { isReadable as $, EventEntry as $n, httpCapability as $t, SessionControls as A, Outcome as An, ImmediateOp as At, CausalWork as B, canConvert as Bn, SegmentCoordinator as Bt, Requested as C, LibrarySource as Cn, SyntaxNode as Cr, Cost as Ct, SaveOptions as D, replacementLibraries as Dn, syntaxText as Dr, FireOp as Dt, RunEvent as E, compileLibrary as En, syntaxSelector as Er, FieldShape as Et, TsRestoreOptions as F, callFunction as Fn, PlainResult as Ft, Decimal as G, LoadError as Gn, defineCapability as Gt, RunAncestry as H, HostError as Hn, SegmentLifecycle as Ht, TsScript as I, defaultLimits as In, ReleaseHook as It, bool as J, SendFailedReason as Jn, Group as Jt, Kind as K, MailboxFull as Kn, shape as Kt, Verdict as L, deliver as Ln, ReleaseReason as Lt, Settlement as M, RunRecord as Mn, Operation as Mt, TsGroup as N, Script$1 as Nn, Operations as Nt, ScriptCodeRequest as O, LimitName as On, Grant as Ot, TsGroupOptions as P, UnitLoadError as Pn, PlainArg as Pt, instant as Q, EventBranch as Qn, HttpImpl as Qt, newGroup as R, loadScript as Rn, ScopeDecl as Rt, Report as S, LibraryOptions as Sn, SyntaxErrorCode as Sr, CoordinatedLifecycle as St, RestoreResult as T, codeIdentity as Tn, Trivia as Tr, ErrorDecl as Tt, RunDiscarded as U, HostErrorCode as Un, Shape as Ut, RunAccounting as V, waitUs as Vn, SegmentGrant as Vt, RunStarted as W, LoadDiagnostic as Wn, SuspendingOp as Wt, civilDate as X, BodyKind as Xn, Versions as Xt, bytes as Y, Body as Yn, Script as Yt, dec as Z, CodeUnit as Zn, coreVersions as Zt, Message as _, calendarCapability as _n, Lexer as _r, defineObjectKind as _t, DebugSnapshot as a, SqlParams as an, BindingKind as ar, range as at, PumpResult as b, timerCapability as bn, Token as br, CapabilityDef as bt, CancellationOptions as c, SqliteBinding as cn, LibraryExport as cr, text as ct, Decided as d, LocaleImpl as dn, SemanticName as dr, parseInstant as dt, UserImpl as en, Instruction as er, list as et, Deciding as f, localeCapability as fn, SemanticNode as fr, HostObject as ft, LoadOptions as g, TimerImpl as gn, SourceSpan as gr, PropDef as gt, Inspection as h, Costs as hn, SemanticTree as hr, ObjectKindDef as ht, DebugPause as i, storeCapability as in, Binding as ir, quantity as it, SessionPort as j, Run as jn, LimitReached as jt, ScriptSources as k, Limits as kn, GrantContext as kt, CarryOver as l, SqliteImpl as ln, NameRole as lr, formatInstant as lt, GroupOptions as m, ConsoleImpl as mn, SemanticToken as mr, ObjectKind as mt, DebugFrame as n, StoreImpl as nn, UnwindEntry as nr, nothing as nt, DebugSource as o, SqlRows as on, ExportKind as or, record as ot, EffectFailure as p, CalendarImpl as pn, SemanticScope as pr, ObjectElements as pt, Value as q, ScriptError as qn, Core as qt, DebugInstruction as r, add as rn, disassemble as rr, num as rt, RepeatedEffect as s, SqlValue as sn, FunctionContract as sr, sourceForm as st, DebugController as t, userCapability as tn, Operand as tr, map as tt, Counters as u, sqliteCapability as un, SemanticElement as ur, nowMicros as ut, PendingCall as v, clockCapability as vn, Mode as vr, GrantDecls as vt, RestoreOptions as w, OperationRef as wn, SyntaxRule as wr, EffectResult as wt, PumpedRequest as x, Library as xn, SyntaxElement as xr, CapabilityDefiner as xt, PumpOptions as y, consoleCapability as yn, TokType as yr, Call as yt, restore as z, NotImplementedError as zn, SegmentContext as zt };
3525
+ export { instant as $, Body as $n, Script as $t, ScriptSources as A, compileLibrary as An, syntaxSelector as Ar, FireOp as At, restore as B, defaultLimits as Bn, ReleaseHook as Bt, Report as C, consoleCapability as Cn, TokType as Cr, ChargeRequest as Ct, RunEvent as D, LibrarySource as Dn, SyntaxNode as Dr, EffectResult as Dt, RestoreResult as E, LibraryOptions as En, SyntaxErrorCode as Er, Cost as Et, TsGroupOptions as F, Run as Fn, Metering as Ft, RunStarted as G, waitUs as Gn, SegmentGrant as Gt, RunAccounting as H, loadScript as Hn, ScopeDecl as Ht, TsRestoreOptions as I, RunRecord as In, Operation as It, Value as J, LoadDiagnostic as Jn, SuspendingOp as Jt, Decimal as K, HostError as Kn, SegmentLifecycle as Kt, TsScript as L, Script$1 as Ln, Operations as Lt, SessionPort as M, LimitName as Mn, GrantContext as Mt, Settlement as N, Limits as Nn, ImmediateOp as Nt, SaveOptions as O, OperationRef as On, SyntaxRule as Or, ErrorDecl as Ot, TsGroup as P, Outcome as Pn, LimitReached as Pt, dec as Q, SendFailedReason as Qn, Group as Qt, Verdict as R, UnitLoadError as Rn, PlainArg as Rt, PumpedRequest as S, clockCapability as Sn, Mode as Sr, CapabilityDefiner as St, RestoreOptions as T, Library as Tn, SyntaxElement as Tr, CoordinatedLifecycle as Tt, RunAncestry as U, NotImplementedError as Un, SegmentContext as Ut, CausalWork as V, deliver as Vn, ReleaseReason as Vt, RunDiscarded as W, canConvert as Wn, SegmentCoordinator as Wt, bytes as X, MailboxFull as Xn, shape as Xt, bool as Y, LoadError as Yn, defineCapability as Yt, civilDate as Z, ScriptError as Zn, Core as Zt, LoadOptions as _, CalendarImpl as _n, SemanticScope as _r, PropDef as _t, DebugPause as a, userCapability as an, Operand as ar, quantity as at, PumpOptions as b, TimerImpl as bn, SourceSpan as br, Call as bt, RepeatedEffect as c, storeCapability as cn, Binding as cr, sourceForm as ct, Counters as d, SqlValue as dn, FunctionContract as dr, nowMicros as dt, Versions as en, BodyKind as er, isReadable as et, Decided as f, SqliteBinding as fn, LibraryExport as fr, parseInstant as ft, Inspection as g, localeCapability as gn, SemanticNode as gr, ObjectKindDef as gt, GroupOptions as h, LocaleImpl as hn, SemanticName as hr, ObjectKind as ht, DebugInstruction as i, UserImpl as in, Instruction as ir, num as it, SessionControls as j, replacementLibraries as jn, syntaxText as jr, Grant as jt, ScriptCodeRequest as k, codeIdentity as kn, Trivia as kr, FieldShape as kt, CancellationOptions as l, SqlParams as ln, BindingKind as lr, text as lt, EffectFailure as m, sqliteCapability as mn, SemanticElement as mr, ObjectElements as mt, DebugEvaluation as n, HttpImpl as nn, EventBranch as nr, map as nt, DebugSnapshot as o, StoreImpl as on, UnwindEntry as or, range as ot, Deciding as p, SqliteImpl as pn, NameRole as pr, HostObject as pt, Kind as q, HostErrorCode as qn, Shape as qt, DebugFrame as r, httpCapability as rn, EventEntry as rr, nothing as rt, DebugSource as s, add as sn, disassemble as sr, record as st, DebugController as t, coreVersions as tn, CodeUnit as tr, list as tt, CarryOver as u, SqlRows as un, ExportKind as ur, formatInstant as ut, Message as v, ConsoleImpl as vn, SemanticToken as vr, defineObjectKind as vt, Requested as w, timerCapability as wn, Token as wr, ChargeResult as wt, PumpResult as x, calendarCapability as xn, Lexer as xr, CapabilityDef as xt, PendingCall as y, Costs as yn, SemanticTree as yr, GrantDecls as yt, newGroup as z, callFunction as zn, PlainResult as zt };