@northtalk/ts 0.7.0 → 0.9.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 (54) hide show
  1. package/{binary-value-M8v567iA.d.ts → binary-value-B93hEK7l.d.ts} +1 -1
  2. package/{checker-Coml0Tf9.js → checker-D74oYIhs.js} +21 -16
  3. package/{core-D4qYURer.d.ts → core-BBPI6EhG.d.ts} +1 -1
  4. package/{debug-C_Ob5rkl.d.ts → debug-s6QIovKS.d.ts} +18 -3
  5. package/debug.d.ts +1 -1
  6. package/debug.js +1 -1
  7. package/{driver-CLi_OmyQ.d.ts → driver-D5yrK3Nu.d.ts} +1 -1
  8. package/driver.d.ts +1 -1
  9. package/driver.js +1 -1
  10. package/{encoding-BL2ECJmg.js → encoding-DzVFpg7k.js} +2 -2
  11. package/{engine-DhBk0lTt.js → engine-Bx8B63iQ.js} +6 -6
  12. package/{engine-BBNHy4-F.d.ts → engine-Dy-BCoiw.d.ts} +2 -2
  13. package/{errors-P3ga1I-9.js → errors-CNc-xY_9.js} +35 -4
  14. package/{group-BqccKTWz.js → group-CY4FKhzT.js} +122 -54
  15. package/{http-fetch-DA-NbFIM.js → http-fetch-DnpfiOWK.js} +2 -2
  16. package/http.d.ts +1 -1
  17. package/http.js +4 -4
  18. package/index.d.ts +5 -5
  19. package/index.js +15 -15
  20. package/{lean-CFLJ9VrX.d.ts → lean-Bg_UTRj0.d.ts} +20 -5
  21. package/{lean-BJmLobmd.js → lean-DTCTJUmR.js} +10 -10
  22. package/lean.d.ts +5 -5
  23. package/lean.js +15 -15
  24. package/{manifest-37x-HSxH.js → manifest-DVS1SEmN.js} +3 -3
  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-DE6kRk0r.js → objects-OKVLH190.js} +1 -1
  30. package/{objects-DVlpWsi0.d.ts → objects-q0lnCK-4.d.ts} +2 -1
  31. package/{operations-CGjDlkGU.js → operations-B3XaG7Ve.js} +174 -54
  32. package/package.json +1 -1
  33. package/{peer-capability-elnbQy-J.js → peer-capability-3etyPHs3.js} +7 -5
  34. package/peer.d.ts +8 -1
  35. package/peer.js +29 -12
  36. package/{readers-ChQ0e92c.d.ts → readers-AeB1bJ--.d.ts} +1 -1
  37. package/{readers-yMS1eAOp.js → readers-G1lHqrPl.js} +1 -1
  38. package/{request-pump-binary-BS1J8DF2.js → request-pump-binary-VOPVqRZD.js} +9 -4
  39. package/{router-Bm7A2kjt.js → router-Bdm4KiMG.js} +4 -4
  40. package/{router-D0rf5SkW.d.ts → router-DXoJ_2Z4.d.ts} +2 -2
  41. package/session.d.ts +2 -2
  42. package/session.js +15 -15
  43. package/setup.d.ts +2 -2
  44. package/setup.js +6 -5
  45. package/sqlite.d.ts +2 -2
  46. package/sqlite.js +5 -5
  47. package/{store-D80OlpyG.js → store-BTcyKBLg.js} +2 -2
  48. package/{store-capability-DBLlWaNO.js → store-capability-CBJ6mUoH.js} +3 -3
  49. package/store.d.ts +2 -2
  50. package/store.js +2 -2
  51. package/{user-capability-D6hGa3eF.js → user-capability-DNY2dyjq.js} +3 -3
  52. package/wasm.d.ts +5 -5
  53. package/wasm.js +15 -13
  54. package/{inline-grants-BT2nnfLA.js → zone-rules-DsCJtmlC.js} +88 -5
@@ -1,8 +1,8 @@
1
1
 
2
- import { A as listValues, L as nothing, et as text, t as HostError, v as dec } from "./errors-P3ga1I-9.js";
3
- import { t as defineObjectKind } from "./objects-DE6kRk0r.js";
4
- import { Dt as validComputedMessageName, Tt as shape, bt as defineValueCapability, n as ScriptError } from "./operations-CGjDlkGU.js";
5
- import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-BL2ECJmg.js";
2
+ import { P as listValues, V as nothing, b as dec, it as text, t as HostError } from "./errors-CNc-xY_9.js";
3
+ import { t as defineObjectKind } from "./objects-OKVLH190.js";
4
+ import { Dt as shape, kt as validComputedMessageName, n as ScriptError, xt as defineValueCapability } from "./operations-B3XaG7Ve.js";
5
+ import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-DzVFpg7k.js";
6
6
  //#region src/peer-capability.ts
7
7
  /** The Core-fixed Object Kind of a Peer: no properties, no collection. */
8
8
  const PEER_KIND = "peer";
@@ -65,6 +65,7 @@ const nonEmpty = (fn, v) => {
65
65
  */
66
66
  const peerCapability = (impl, costs) => {
67
67
  for (const name of OPERATIONS) if (!impl || typeof impl[name] !== "function") throw new HostError("invalid value", `Peer needs ${name}`);
68
+ if (impl.release !== void 0 && typeof impl.release !== "function") throw new HostError("invalid value", "Peer release must be a function");
68
69
  const operations = {
69
70
  expose: {
70
71
  mode: "suspending",
@@ -143,7 +144,8 @@ const peerCapability = (impl, costs) => {
143
144
  error: (code) => hostErrors[name]?.includes(code) ?? false,
144
145
  ...name === "expose" || name === "reach" || name === "unexpose" ? { arguments: (args) => nonEmpty(name, args[0]) } : name === "post" || name === "call" ? { arguments: checkRemoteSend } : {}
145
146
  });
146
- return fixed(defineValueCapability("peer", operations));
147
+ const release = impl.release === void 0 ? void 0 : (context) => impl.release(context);
148
+ return fixed(defineValueCapability("peer", operations, void 0, release));
147
149
  };
148
150
  //#endregion
149
151
  export { peerKind as a, peerCapability as i, PEER_KIND as n, PEER_POST as r, PEER_CALL as t };
package/peer.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.disposable" />
2
- import { J as Value, P as TsGroup, rn as PeerImpl } from "./debug-C_Ob5rkl.js";
2
+ import { J as Value, P as TsGroup, an as PeerImpl } from "./debug-s6QIovKS.js";
3
3
  //#region src/peer-message-port.d.ts
4
4
  /** What the link needs of a `MessagePort`, a `Worker` or a worker's `self`. */
5
5
  type PortEndpoint = {
@@ -156,6 +156,11 @@ export declare class PeerRouter {
156
156
  connect(link: PeerLink): void;
157
157
  /** Closes every link. */
158
158
  close(): void;
159
+ /**
160
+ * The wire for a dialled link, or undefined when there is none: the dial
161
+ * found nothing, rejected, or gave a closed link. Only the dial's own
162
+ * rejection is caught, so a fault in what uses the wire still surfaces.
163
+ */
159
164
  private wireFor;
160
165
  /** A link to the Host with this key, dialled if the Host knows its address. */
161
166
  private wireTo;
@@ -165,6 +170,8 @@ export declare class PeerRouter {
165
170
  private arrive;
166
171
  /** The `peerCapability` implementation. */
167
172
  readonly impl: PeerImpl;
173
+ private withdraw;
174
+ private release;
168
175
  private expose;
169
176
  private reach;
170
177
  private send;
package/peer.js CHANGED
@@ -1,9 +1,9 @@
1
1
 
2
- import { L as nothing, N as map, R as num, et as text, i as ScriptError, k as list } from "./errors-P3ga1I-9.js";
2
+ import { H as num, L as map, N as list, V as nothing, i as ScriptError, it as text } from "./errors-CNc-xY_9.js";
3
3
  import { n as toBase64, t as fromBase64 } from "./base64-CDO-a06R.js";
4
- import { r as decodeValue } from "./readers-yMS1eAOp.js";
5
- import { t as encodeValue } from "./encoding-BL2ECJmg.js";
6
- import { a as peerKind } from "./peer-capability-elnbQy-J.js";
4
+ import { r as decodeValue } from "./readers-G1lHqrPl.js";
5
+ import { t as encodeValue } from "./encoding-DzVFpg7k.js";
6
+ import { a as peerKind } from "./peer-capability-3etyPHs3.js";
7
7
  //#region src/peer-message-port.ts
8
8
  /** The largest frame a link sends or reads, in UTF-8 bytes. */
9
9
  const MAX_FRAME$1 = 16777216;
@@ -316,6 +316,7 @@ var Wire = class {
316
316
  for (const answer of waiting) answer(null);
317
317
  }
318
318
  };
319
+ const sameOwner = (a, b) => a.group === b.group && a.scriptName === b.scriptName && a.grantName === b.grantName;
319
320
  /** A Host's side of `peer`: its exposures and the links to other Hosts. */
320
321
  var PeerRouter = class PeerRouter {
321
322
  o;
@@ -376,8 +377,13 @@ var PeerRouter = class PeerRouter {
376
377
  close() {
377
378
  for (const link of this.wires.keys()) link.close();
378
379
  }
380
+ /**
381
+ * The wire for a dialled link, or undefined when there is none: the dial
382
+ * found nothing, rejected, or gave a closed link. Only the dial's own
383
+ * rejection is caught, so a fault in what uses the wire still surfaces.
384
+ */
379
385
  async wireFor(link) {
380
- const got = await link;
386
+ const got = await link.catch(() => void 0);
381
387
  if (!got || got.closed) return;
382
388
  this.connect(got);
383
389
  return this.wires.get(got);
@@ -400,7 +406,7 @@ var PeerRouter = class PeerRouter {
400
406
  }
401
407
  local(identity, secret, message, args, waits) {
402
408
  const held = this.exposures.get(secret);
403
- const script = held && this.group.script(held.script);
409
+ const script = held && this.group.script(held.owner.scriptName);
404
410
  if (!script) return waits ? "not exposed" : void 0;
405
411
  try {
406
412
  if (!waits) {
@@ -466,26 +472,37 @@ var PeerRouter = class PeerRouter {
466
472
  unexpose: (call, exposure) => {
467
473
  const key = typeof exposure === "string" ? this.names.get(exposure) : split(exposure.id)?.[1];
468
474
  const held = key === void 0 ? void 0 : this.exposures.get(key);
469
- if (held && held.script === call.scriptName) {
470
- this.exposures.delete(key);
471
- if (held.name !== void 0) this.names.delete(held.name);
472
- }
475
+ if (held && sameOwner(held.owner, call)) this.withdraw(key, held);
473
476
  },
477
+ release: (context) => this.release(context),
474
478
  reach: (call, address) => this.reach(call, address),
475
479
  post: (call, peer, message, args) => this.send(call, peer, message, args, false),
476
480
  call: (call, peer, message, args) => this.send(call, peer, message, args, true),
477
481
  caller: (call) => (call.delivery === void 0 ? void 0 : this.callers.get(call.delivery)) ?? nothing
478
482
  };
483
+ withdraw(key, held) {
484
+ this.exposures.delete(key);
485
+ if (held.name !== void 0 && this.names.get(held.name) === key) this.names.delete(held.name);
486
+ }
487
+ release(context) {
488
+ if (context.reason === "reload") return;
489
+ for (const [key, held] of this.exposures) if (sameOwner(held.owner, context)) this.withdraw(key, held);
490
+ }
479
491
  expose(call, name) {
480
492
  if (name !== void 0 && this.names.has(name)) {
481
493
  const key = this.names.get(name);
482
- if (this.exposures.get(key).script !== call.scriptName) return call.fail(failure("name in use"));
494
+ if (!sameOwner(this.exposures.get(key).owner, call)) return call.fail(failure("name in use"));
483
495
  return call.answer(this.peerFor(`${this.key}/${key}`));
484
496
  }
485
497
  const key = secret();
498
+ const { grantName, group, scriptName } = call;
486
499
  this.exposures.set(key, {
487
500
  name,
488
- script: call.scriptName
501
+ owner: {
502
+ grantName,
503
+ group,
504
+ scriptName
505
+ }
489
506
  });
490
507
  if (name !== void 0) this.names.set(name, key);
491
508
  call.answer(this.peerFor(`${this.key}/${key}`));
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.disposable" />
2
- import { J as Value } from "./debug-C_Ob5rkl.js";
2
+ import { J as Value } from "./debug-s6QIovKS.js";
3
3
  //#region src/readers.d.ts
4
4
  /** Finds the Host Object a reader names by its kind and id, or none. */
5
5
  type ObjectResolver = (kind: string, id: string) => {
@@ -1,5 +1,5 @@
1
1
 
2
- import { A as listValues, H as quantity, Jt as parseInstant, L as nothing, N as map, T as instant, W as range, Zt as assertScalarText, et as text, f as bytesOf, l as Value, m as civilDate, o as invalidValue, u as bool, v as dec, w as hiddenCodePoint } from "./errors-P3ga1I-9.js";
2
+ import { D as instant, E as hiddenCodePoint, J as range, K as quantity, L as map, P as listValues, Qt as parseInstant, V as nothing, b as dec, f as bytesOf, g as civilDate, it as text, l as Value, o as invalidValue, tn as assertScalarText, u as bool } from "./errors-CNc-xY_9.js";
3
3
  import { t as fromBase64 } from "./base64-CDO-a06R.js";
4
4
  //#region src/readers.ts
5
5
  var Reader = class {
@@ -1,9 +1,9 @@
1
1
 
2
- import { A as listValues, H as quantity, Jt as parseInstant, L as nothing, N as map, R as num, S as functionValue, T as instant, Ut as formatInstant, V as patternValue, W as range, d as bytes, et as text, l as Value, m as civilDate, o as invalidValue, rn as normalizeNFC, u as bool, v as dec, z as objectValue } from "./errors-P3ga1I-9.js";
3
- import { g as decodeUtf8, ot as patternSource } from "./operations-CGjDlkGU.js";
4
- import { _ as viewSource, t as checkSource } from "./checker-Coml0Tf9.js";
2
+ import { D as instant, G as patternValue, H as num, J as range, K as quantity, L as map, P as listValues, Qt as parseInstant, U as objectValue, V as nothing, b as dec, d as bytes, g as civilDate, it as text, l as Value, o as invalidValue, qt as formatInstant, sn as normalizeNFC, u as bool, w as functionValue } from "./errors-CNc-xY_9.js";
3
+ import { g as decodeUtf8, ot as patternSource } from "./operations-B3XaG7Ve.js";
4
+ import { _ as viewSource, t as checkSource } from "./checker-D74oYIhs.js";
5
5
  import { n as toBase64 } from "./base64-CDO-a06R.js";
6
- import { a as fromJson, n as JsonObject, o as isJsonNumber, s as isJsonObject, t as JsonNumber } from "./readers-yMS1eAOp.js";
6
+ import { a as fromJson, n as JsonObject, o as isJsonNumber, s as isJsonObject, t as JsonNumber } from "./readers-G1lHqrPl.js";
7
7
  //#region src/binary-value.ts
8
8
  const coreErrors = /* @__PURE__ */ new WeakSet();
9
9
  const max = 2n ** 64n;
@@ -799,6 +799,11 @@ const envelopeMessages = [
799
799
  name: "refuseWorker",
800
800
  kind: "bool",
801
801
  required: false
802
+ },
803
+ {
804
+ name: "forbidSuspension",
805
+ kind: "bool",
806
+ required: false
802
807
  }
803
808
  ]
804
809
  },
@@ -1,9 +1,9 @@
1
1
 
2
- import { A as listValues, N as map, et as text, i as ScriptError, t as HostError, u as bool } from "./errors-P3ga1I-9.js";
3
- import { Q as sizeOf, ut as compareText } from "./operations-CGjDlkGU.js";
4
- import { t as encodeValue } from "./encoding-BL2ECJmg.js";
2
+ import { L as map, P as listValues, i as ScriptError, it as text, t as HostError, u as bool } from "./errors-CNc-xY_9.js";
3
+ import { Q as sizeOf, ut as compareText } from "./operations-B3XaG7Ve.js";
4
+ import { t as encodeValue } from "./encoding-DzVFpg7k.js";
5
5
  import { n as sha256 } from "./sha256-9CGf5BS_.js";
6
- import { n as hostScriptError } from "./store-capability-DBLlWaNO.js";
6
+ import { n as hostScriptError } from "./store-capability-CBJ6mUoH.js";
7
7
  //#region src/notify/router.ts
8
8
  /**
9
9
  * Whether a commit changed a key's value: compared by the bytes of the Value
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.disposable" />
2
- import { $t as Group, E as RestoreResult, I as TsRestoreOptions, J as Value, Mt as GrantContext, O as SaveOptions, P as TsGroup, bt as Call } from "./debug-C_Ob5rkl.js";
3
- import { t as TsCore } from "./core-D4qYURer.js";
2
+ import { E as RestoreResult, I as TsRestoreOptions, J as Value, Mt as GrantContext, O as SaveOptions, P as TsGroup, bt as Call, tn as Group } from "./debug-s6QIovKS.js";
3
+ import { t as TsCore } from "./core-BBPI6EhG.js";
4
4
  //#region src/notify/router.d.ts
5
5
  /** A Store's four limits on its watches (Store Notifications, Limits). */
6
6
  type WatchLimits = {
package/session.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.disposable" />
2
- import { J as Value } from "./debug-C_Ob5rkl.js";
3
- import { C as Setup, _ as UserPrompt, a as ReplayOptions, c as parseTranscript, d as DebugAction, f as MOCK_ARGUMENTS, g as SourcePlacement, h as SessionHost, i as parseEnvelope, l as replayTranscript, m as SessionEnvironment, n as ObjectReference, o as Replayed, p as Mock, r as SessionObjects, s as TranscriptItem, t as Envelope, u as writeTranscript, v as Waiting } from "./objects-DVlpWsi0.js";
2
+ import { J as Value } from "./debug-s6QIovKS.js";
3
+ import { C as Setup, _ as UserPrompt, a as ReplayOptions, c as parseTranscript, d as DebugAction, f as MOCK_ARGUMENTS, g as SourcePlacement, h as SessionHost, i as parseEnvelope, l as replayTranscript, m as SessionEnvironment, n as ObjectReference, o as Replayed, p as Mock, r as SessionObjects, s as TranscriptItem, t as Envelope, u as writeTranscript, v as Waiting } from "./objects-q0lnCK-4.js";
4
4
  //#region src/session/describe.d.ts
5
5
  /** One declaration of the session source, as `:describe` reads it. */
6
6
  type DeclaredName = {
package/session.js CHANGED
@@ -1,17 +1,17 @@
1
1
 
2
- import { A as listValues, Jt as parseInstant, L as nothing, N as map, Qt as characterBoundaries, R as num, Ut as formatInstant, W as range, cn as builtins, et as text, i as ScriptError, l as Value, n as LoadError, nn as lower, t as HostError, u as bool } from "./errors-P3ga1I-9.js";
3
- import { C as registeredStdlib, T as stdlibSource, a as recordLine, h as defaultLimits, i as restore, l as compileLibrary, o as traceValue } from "./group-BqccKTWz.js";
4
- import { o as stateOf, t as defineObjectKind } from "./objects-DE6kRk0r.js";
5
- import { H as textForm$1, Tt as shape, U as waitUs, bt as defineValueCapability, kt as validStaticMessageName, tt as functionHead, ut as compareText, wt as operationDeclarations, x as integerValue } from "./operations-CGjDlkGU.js";
6
- import { _ as viewSource, c as parseSource, f as declarationDocs, h as leadingDoc, m as functionDoc, s as parseEntry, t as checkSource } from "./checker-Coml0Tf9.js";
7
- import { n as exportManifest, o as shapeData, t as canonicalJSON } from "./manifest-37x-HSxH.js";
8
- import { c as readDisplay, l as readOrderedJSON, r as decodeValue } from "./readers-yMS1eAOp.js";
9
- import { a as clockCapability, i as calendarCapability, n as quoteJSON, o as consoleCapability, t as encodeValue } from "./encoding-BL2ECJmg.js";
10
- import { n as localeCapability, t as userCapability } from "./user-capability-D6hGa3eF.js";
11
- import { r as storeCapability } from "./store-capability-DBLlWaNO.js";
2
+ import { H as num, J as range, L as map, P as listValues, Qt as parseInstant, V as nothing, i as ScriptError, it as text, l as Value, n as LoadError, nn as characterBoundaries, on as lower, pn as builtins, qt as formatInstant, t as HostError, u as bool } from "./errors-CNc-xY_9.js";
3
+ import { C as registeredStdlib, T as stdlibSource, a as recordLine, h as defaultLimits, i as restore, l as compileLibrary, o as traceValue } from "./group-CY4FKhzT.js";
4
+ import { o as stateOf, t as defineObjectKind } from "./objects-OKVLH190.js";
5
+ import { Dt as shape, Et as operationDeclarations, H as textForm$1, U as waitUs, jt as validStaticMessageName, tt as functionHead, ut as compareText, x as integerValue, xt as defineValueCapability } from "./operations-B3XaG7Ve.js";
6
+ import { _ as viewSource, c as parseSource, f as declarationDocs, h as leadingDoc, m as functionDoc, s as parseEntry, t as checkSource } from "./checker-D74oYIhs.js";
7
+ import { n as exportManifest, o as shapeData, t as canonicalJSON } from "./manifest-DVS1SEmN.js";
8
+ import { c as readDisplay, l as readOrderedJSON, r as decodeValue } from "./readers-G1lHqrPl.js";
9
+ import { a as clockCapability, i as calendarCapability, n as quoteJSON, o as consoleCapability, t as encodeValue } from "./encoding-DzVFpg7k.js";
10
+ import { n as localeCapability, t as userCapability } from "./user-capability-DNY2dyjq.js";
11
+ import { r as storeCapability } from "./store-capability-CBJ6mUoH.js";
12
12
  import { buildSetupGroup, capabilityOperations, immutableSetup, shapeOf } from "./setup.js";
13
- import { a as encodeContents, i as decodeContents, o as sessionQuotas, t as StoreContentsError } from "./engine-DhBk0lTt.js";
14
- import { i as memoryStores } from "./store-D80OlpyG.js";
13
+ import { a as encodeContents, i as decodeContents, o as sessionQuotas, t as StoreContentsError } from "./engine-Bx8B63iQ.js";
14
+ import { i as memoryStores } from "./store-BTcyKBLg.js";
15
15
  //#region src/session/objects.ts
16
16
  const externalCollection = () => {
17
17
  throw new Error("external collection callback in replay");
@@ -1227,11 +1227,11 @@ const builtinDocs = {
1227
1227
  },
1228
1228
  "toCivil": {
1229
1229
  "call": "toCivil(i, offset)",
1230
- "gives": "The date-time on the wall clock at `offset` from UTC at the Instant `i`"
1230
+ "gives": "The date-time on the wall clock at the Instant `i`, at `offset` from UTC or under the Zone Rules `offset`"
1231
1231
  },
1232
1232
  "toInstant": {
1233
- "call": "toInstant(c, offset)",
1234
- "gives": "The Instant at which the wall clock at `offset` from UTC reads the date-time `c`"
1233
+ "call": "toInstant(c, offset, disambiguation = nothing)",
1234
+ "gives": "The Instant at which the wall clock, at `offset` from UTC or under the Zone Rules `offset`, reads the date-time `c`"
1235
1235
  },
1236
1236
  "pi": {
1237
1237
  "call": "3.141592653589793238462643383279503",
package/setup.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /// <reference lib="esnext.disposable" />
2
- import { Xt as operationDeclarations } from "./debug-C_Ob5rkl.js";
3
- import { A as shapeOf, C as Setup, D as capabilityOperations, E as buildSetupGroup, M as tsCore, O as immutableSetup, S as OperationSpec, T as ShapeSpec, b as MissingCapabilityError, j as shapeSpec, k as musicalClockOf, w as SetupGroup, x as ObjectRefSpec, y as CaseCore } from "./objects-DVlpWsi0.js";
2
+ import { Qt as operationDeclarations } from "./debug-s6QIovKS.js";
3
+ import { A as shapeOf, C as Setup, D as capabilityOperations, E as buildSetupGroup, M as tsCore, O as immutableSetup, S as OperationSpec, T as ShapeSpec, b as MissingCapabilityError, j as shapeSpec, k as musicalClockOf, w as SetupGroup, x as ObjectRefSpec, y as CaseCore } from "./objects-q0lnCK-4.js";
4
4
  export { CaseCore, MissingCapabilityError, ObjectRefSpec, OperationSpec, Setup, SetupGroup, ShapeSpec, buildSetupGroup, capabilityOperations, immutableSetup, musicalClockOf, operationDeclarations, shapeOf, shapeSpec, tsCore };
package/setup.js CHANGED
@@ -1,9 +1,9 @@
1
1
 
2
- import { n as LoadError } from "./errors-P3ga1I-9.js";
3
- import { i as restore, l as compileLibrary, r as newGroup, u as replacementLibraries } from "./group-BqccKTWz.js";
4
- import { t as defineObjectKind } from "./objects-DE6kRk0r.js";
5
- import { Tt as shape, wt as operationDeclarations } from "./operations-CGjDlkGU.js";
6
- import { r as MUSICAL_CLOCK } from "./encoding-BL2ECJmg.js";
2
+ import { n as LoadError } from "./errors-CNc-xY_9.js";
3
+ import { i as restore, l as compileLibrary, r as newGroup, u as replacementLibraries } from "./group-CY4FKhzT.js";
4
+ import { t as defineObjectKind } from "./objects-OKVLH190.js";
5
+ import { Dt as shape, Et as operationDeclarations } from "./operations-B3XaG7Ve.js";
6
+ import { r as MUSICAL_CLOCK } from "./encoding-DzVFpg7k.js";
7
7
  //#region src/setup.ts
8
8
  const tsCore = {
9
9
  compileLibrary,
@@ -131,6 +131,7 @@ const buildSetupGroup = (setup, capabilities, options) => {
131
131
  return group.load({
132
132
  grants,
133
133
  grantsAsUsed: script.grantsAsUsed,
134
+ ...script.forbidSuspension ? { forbidSuspension: true } : {},
134
135
  name: script.name,
135
136
  source: script.text ?? readSource(script.source),
136
137
  limits: script.limits,
package/sqlite.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.disposable" />
2
- import { Wt as SegmentCoordinator, bt as Call, fn as StoreImpl, gn as SqlRows, hn as SqlParams, vn as SqliteBinding, yn as SqliteImpl } from "./debug-C_Ob5rkl.js";
3
- import { a as Stores, r as StoreQuotas } from "./engine-BBNHy4-F.js";
2
+ import { Wt as SegmentCoordinator, _n as SqlParams, bn as SqliteBinding, bt as Call, mn as StoreImpl, vn as SqlRows, xn as SqliteImpl } from "./debug-s6QIovKS.js";
3
+ import { a as Stores, r as StoreQuotas } from "./engine-Dy-BCoiw.js";
4
4
  //#region src/sqlite/database.d.ts
5
5
  /** The table that keeps a database's Stores, which no `sqlite` Grant may use. */
6
6
  export declare const STORE_TABLE = "store";
package/sqlite.js CHANGED
@@ -1,9 +1,9 @@
1
1
 
2
- import { et as text, t as HostError, v as dec } from "./errors-P3ga1I-9.js";
3
- import { r as decodeValue } from "./readers-yMS1eAOp.js";
4
- import { t as encodeValue } from "./encoding-BL2ECJmg.js";
5
- import { n as hostScriptError } from "./store-capability-DBLlWaNO.js";
6
- import { r as Stores, t as StoreContentsError } from "./engine-DhBk0lTt.js";
2
+ import { b as dec, it as text, t as HostError } from "./errors-CNc-xY_9.js";
3
+ import { r as decodeValue } from "./readers-G1lHqrPl.js";
4
+ import { t as encodeValue } from "./encoding-DzVFpg7k.js";
5
+ import { n as hostScriptError } from "./store-capability-CBJ6mUoH.js";
6
+ import { r as Stores, t as StoreContentsError } from "./engine-Bx8B63iQ.js";
7
7
  import { DatabaseSync } from "node:sqlite";
8
8
  //#region src/sqlite/scan.ts
9
9
  const isWordChar = (c) => /[\w$]/.test(c) || c.charCodeAt(0) > 127;
@@ -1,6 +1,6 @@
1
1
 
2
- import { ut as compareText } from "./operations-CGjDlkGU.js";
3
- import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, r as Stores, s as sessionWatchLimits } from "./engine-DhBk0lTt.js";
2
+ import { ut as compareText } from "./operations-B3XaG7Ve.js";
3
+ import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, r as Stores, s as sessionWatchLimits } from "./engine-Bx8B63iQ.js";
4
4
  //#region src/store/memory.ts
5
5
  /** A backend that keeps nothing outside the engine's own copy. */
6
6
  const memoryBackend = () => ({
@@ -1,7 +1,7 @@
1
1
 
2
- import { L as nothing, N as map, et as text, i as ScriptError, t as HostError, u as bool } from "./errors-P3ga1I-9.js";
3
- import { Dt as validComputedMessageName, Tt as shape, bt as defineValueCapability, ft as errorMessages, i as arithmetic, n as ScriptError$1 } from "./operations-CGjDlkGU.js";
4
- import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-BL2ECJmg.js";
2
+ import { L as map, V as nothing, i as ScriptError, it as text, t as HostError, u as bool } from "./errors-CNc-xY_9.js";
3
+ import { Dt as shape, ft as errorMessages, i as arithmetic, kt as validComputedMessageName, n as ScriptError$1, xt as defineValueCapability } from "./operations-B3XaG7Ve.js";
4
+ import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-DzVFpg7k.js";
5
5
  //#region src/store-capability.ts
6
6
  /** A Core-raised error as the Host sees it, with its catalogue message. */
7
7
  const hostScriptError = (code, fields) => {
package/store.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference lib="esnext.disposable" />
2
- import { n as RouterOptions } from "./router-D0rf5SkW.js";
3
- import { a as Stores, c as sessionQuotas, i as StoreStateUnknownError, l as sessionWatchLimits, n as StoreContentsError, o as decodeContents, r as StoreQuotas, s as encodeContents, t as StoreBackend } from "./engine-BBNHy4-F.js";
2
+ import { n as RouterOptions } from "./router-DXoJ_2Z4.js";
3
+ import { a as Stores, c as sessionQuotas, i as StoreStateUnknownError, l as sessionWatchLimits, n as StoreContentsError, o as decodeContents, r as StoreQuotas, s as encodeContents, t as StoreBackend } from "./engine-Dy-BCoiw.js";
4
4
  //#region src/store/memory.d.ts
5
5
  /** A backend that keeps nothing outside the engine's own copy. */
6
6
  export declare const memoryBackend: () => StoreBackend;
package/store.js CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
- import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, o as sessionQuotas, r as Stores, s as sessionWatchLimits, t as StoreContentsError } from "./engine-DhBk0lTt.js";
3
- import { i as memoryStores, n as webStorageStores, r as memoryBackend, t as webStorageBackend } from "./store-D80OlpyG.js";
2
+ import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, o as sessionQuotas, r as Stores, s as sessionWatchLimits, t as StoreContentsError } from "./engine-Bx8B63iQ.js";
3
+ import { i as memoryStores, n as webStorageStores, r as memoryBackend, t as webStorageBackend } from "./store-BTcyKBLg.js";
4
4
  export { StoreContentsError, StoreStateUnknownError, Stores, decodeContents, encodeContents, memoryBackend, memoryStores, sessionQuotas, sessionWatchLimits, webStorageBackend, webStorageStores };
@@ -1,7 +1,7 @@
1
1
 
2
- import { Ct as integerOf, N as map, et as text, t as HostError, u as bool, wt as isInteger, y as decimalParts } from "./errors-P3ga1I-9.js";
3
- import { Tt as shape, bt as defineValueCapability, n as ScriptError } from "./operations-CGjDlkGU.js";
4
- import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-BL2ECJmg.js";
2
+ import { Dt as integerOf, L as map, Ot as isInteger, it as text, t as HostError, u as bool, x as decimalParts } from "./errors-CNc-xY_9.js";
3
+ import { Dt as shape, n as ScriptError, xt as defineValueCapability } from "./operations-B3XaG7Ve.js";
4
+ import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-DzVFpg7k.js";
5
5
  //#region src/locale-tag.ts
6
6
  const grandfathered = /^(?:en-gb-oed|i-(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)|sgn-(?:be-fr|be-nl|ch-de))$/i;
7
7
  const alpha = /^[a-z]+$/i;
package/wasm.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="esnext.disposable" />
2
- import { $ as instant, $t as Group, At as FireOp, Bn as LimitName, Bt as ReleaseHook, C as Report, Cn as CalendarImpl, Ct as ChargeRequest, Dn as TimerImpl, Dt as EffectResult, E as RestoreResult, En as MusicalClockImpl, Et as Cost, Fn as LibrarySource, Ft as Metering, G as RunStarted, Gt as SegmentGrant, H as RunAccounting, Hn as Outcome, Ht as ScopeDecl, In as OperationRef, It as Operation, J as Value, Jt as SuspendingOp, K as Decimal, Kt as SegmentLifecycle, Lt as Operations, Mt as GrantContext, N as Settlement, Nn as Library, Nt as ImmediateOp, Ot as ErrorDecl, Pt as LimitReached, Q as dec, Qt as Core, R as Verdict, Rt as PlainArg, S as PumpedRequest, St as CapabilityDefiner, T as RestoreOptions, Tn as Costs, Tt as CoordinatedLifecycle, U as RunAncestry, Ut as SegmentContext, V as CausalWork, Vn as Limits, Vt as ReleaseReason, W as RunDiscarded, Wt as SegmentCoordinator, X as bytes, Xt as operationDeclarations, Y as bool, Yt as defineCapability, Z as civilDate, Zt as shape, _ as LoadOptions, _n as SqlValue, _t as PropDef, ar as ScriptError, at as quantity, b as PumpOptions, bt as Call, cn as HttpServerImpl, d as Counters, dt as nowMicros, en as Script, er as HostError, f as Decided, fn as StoreImpl, ft as parseInstant, g as Inspection, gn as SqlRows, gt as ObjectKindDef, h as GroupOptions, hn as SqlParams, ht as ObjectKind, ir as MailboxFull, it as num, jt as Grant, kt as FieldShape, l as CancellationOptions, lt as text, m as EffectFailure, mt as ObjectElements, nr as LoadDiagnostic, nt as map, on as HttpClientImpl, or as SendFailedReason, ot as range, p as Deciding, pn as add, pt as HostObject, q as Kind, qt as Shape, rn as PeerImpl, rr as LoadError, rt as nothing, sn as HttpImpl, st as record, tn as Versions, tr as HostErrorCode, tt as list, u as CarryOver, un as UserImpl, ut as formatInstant, v as Message, vn as SqliteBinding, w as Requested, wn as ConsoleImpl, wt as ChargeResult, x as PumpResult, xn as LocaleImpl, xt as CapabilityDef, y as PendingCall, yn as SqliteImpl, yt as GrantDecls, zt as PlainResult } from "./debug-C_Ob5rkl.js";
3
- import { A as PlainValue, C as decodeJson, M as fromValue, N as toValue, O as encodeValue, P as talk, S as handlersOf, _ as CreateGroupOptions, b as Handlers, d as exportManifest, f as InlineFunction, j as ToValueOptions, k as FromValueOptions, l as ManifestSpec, m as inlineGrants, p as InlineOperation, u as MessageDecl, v as DrivenGroup, w as encodeJson, x as ScriptWithHandlers, y as createGroup } from "./lean-CFLJ9VrX.js";
4
- import { a as decodeValue, n as Json, o as readDisplay } from "./readers-ChQ0e92c.js";
5
- import { t as BinaryValueOptions } from "./binary-value-M8v567iA.js";
2
+ import { $ as instant, $t as shape, At as FireOp, Bt as ReleaseHook, C as Report, Cn as LocaleImpl, Ct as ChargeRequest, Dn as Costs, Dt as EffectResult, E as RestoreResult, En as ConsoleImpl, Et as Cost, Fn as Library, Ft as Metering, G as RunStarted, Gt as SegmentGrant, H as RunAccounting, Hn as LimitName, Ht as ScopeDecl, It as Operation, J as Value, Jt as SuspendingOp, K as Decimal, Kt as SegmentLifecycle, Ln as LibrarySource, Lt as Operations, Mt as GrantContext, N as Settlement, Nt as ImmediateOp, On as MusicalClockImpl, Ot as ErrorDecl, Pt as LimitReached, Q as dec, Qt as operationDeclarations, R as Verdict, Rn as OperationRef, Rt as PlainArg, S as PumpedRequest, St as CapabilityDefiner, T as RestoreOptions, Tn as CalendarImpl, Tt as CoordinatedLifecycle, U as RunAncestry, Un as Limits, Ut as SegmentContext, V as CausalWork, Vt as ReleaseReason, W as RunDiscarded, Wn as Outcome, Wt as SegmentCoordinator, X as bytes, Xt as defineCapability, Y as bool, Yt as conforms, Z as civilDate, Zt as explain, _ as LoadOptions, _n as SqlParams, _t as PropDef, an as PeerImpl, ar as LoadError, at as quantity, b as PumpOptions, bn as SqliteBinding, bt as Call, cn as HttpClientImpl, cr as SendFailedReason, d as Counters, dt as nowMicros, en as Core, f as Decided, fn as UserImpl, ft as parseInstant, g as Inspection, gt as ObjectKindDef, h as GroupOptions, hn as add, ht as ObjectKind, ir as LoadDiagnostic, it as num, jt as Grant, kn as TimerImpl, kt as FieldShape, l as CancellationOptions, ln as HttpImpl, lt as text, m as EffectFailure, mn as StoreImpl, mt as ObjectElements, nn as Script, nr as HostError, nt as map, or as MailboxFull, ot as range, p as Deciding, pt as HostObject, q as Kind, qt as Shape, rn as Versions, rr as HostErrorCode, rt as nothing, sr as ScriptError, st as record, tn as Group, tt as list, u as CarryOver, un as HttpServerImpl, ut as formatInstant, v as Message, vn as SqlRows, w as Requested, wt as ChargeResult, x as PumpResult, xn as SqliteImpl, xt as CapabilityDef, y as PendingCall, yn as SqlValue, yt as GrantDecls, zt as PlainResult } from "./debug-s6QIovKS.js";
3
+ import { A as FromValueOptions, C as handlersOf, F as talk, M as ToValueOptions, N as fromValue, P as toValue, S as ScriptWithHandlers, T as encodeJson, b as createGroup, d as exportManifest, f as zoneRules, h as inlineGrants, j as PlainValue, k as encodeValue, l as ManifestSpec, m as InlineOperation, p as InlineFunction, u as MessageDecl, v as CreateGroupOptions, w as decodeJson, x as Handlers, y as DrivenGroup } from "./lean-Bg_UTRj0.js";
4
+ import { a as decodeValue, n as Json, o as readDisplay } from "./readers-AeB1bJ--.js";
5
+ import { t as BinaryValueOptions } from "./binary-value-B93hEK7l.js";
6
6
  //#region src/wasm/reactor.d.ts
7
7
  /** Text the reactor writes to stdout or stderr, such as a fatal error. */
8
8
  type Diagnostics = (line: string) => void;
@@ -253,4 +253,4 @@ export declare const defaultLimits: Readonly<{
253
253
  cleanupBudget: number;
254
254
  }>;
255
255
  //#endregion
256
- export { type CalendarImpl, type Call, type CancellationOptions, type CapabilityDef, type CapabilityDefiner, type CarryOver, type CausalWork, type ChargeRequest, type ChargeResult, type ConsoleImpl, type CoordinatedLifecycle, type Core, type CoreOptions, type Cost, type Costs, type Counters, type CreateGroupOptions, type Decided, type Deciding, Decimal, type DrivenGroup, type EffectFailure, type EffectResult, type ErrorDecl, type FieldShape, type FireOp, type FromValueOptions, type Grant, type GrantContext, type GrantDecls, type Group, type GroupOptions, type Handlers, HostError, type HostErrorCode, type HostObject, type HttpClientImpl, type HttpImpl, type HttpServerImpl, type ImmediateOp, type InlineFunction, type InlineOperation, type Inspection, type Kind, type Library, type LibrarySource, type LimitName, LimitReached, type Limits, type LoadDiagnostic, LoadError, type LoadOptions, type LocaleImpl, MailboxFull, type ManifestSpec, type Message, type MessageDecl, type Metering, type MusicalClockImpl, type ObjectElements, type ObjectKind, type ObjectKindDef, type Operation, type OperationRef, type Operations, type Outcome, type PeerImpl, type PendingCall, type PlainArg, type PlainResult, type PlainValue, type PropDef, type PumpOptions, type PumpResult, type PumpedRequest, type ReleaseHook, type ReleaseReason, type Report, type Requested, type RestoreOptions, type RestoreResult, type RunAccounting, type RunAncestry, type RunDiscarded, type RunStarted, type ScopeDecl, type Script, ScriptError, type ScriptWithHandlers, type SegmentContext, type SegmentCoordinator, type SegmentGrant, type SegmentLifecycle, type SendFailedReason, type Settlement, type Shape, type SqlParams, type SqlRows, type SqlValue, type SqliteBinding, type SqliteImpl, type StoreImpl, type SuspendingOp, type TimerImpl, type ToValueOptions, type UserImpl, Value, type Verdict, type Versions, type WasmSource, add, bool, bytes, civilDate, createGroup, dec, decodeJson, decodeValue, encodeJson, encodeValue, exportManifest, formatInstant, fromValue, handlersOf, inlineGrants, instant, list, map, nothing, nowMicros, num, operationDeclarations, parseInstant, quantity, range, readDisplay, record, shape, talk, text, toValue };
256
+ export { type CalendarImpl, type Call, type CancellationOptions, type CapabilityDef, type CapabilityDefiner, type CarryOver, type CausalWork, type ChargeRequest, type ChargeResult, type ConsoleImpl, type CoordinatedLifecycle, type Core, type CoreOptions, type Cost, type Costs, type Counters, type CreateGroupOptions, type Decided, type Deciding, Decimal, type DrivenGroup, type EffectFailure, type EffectResult, type ErrorDecl, type FieldShape, type FireOp, type FromValueOptions, type Grant, type GrantContext, type GrantDecls, type Group, type GroupOptions, type Handlers, HostError, type HostErrorCode, type HostObject, type HttpClientImpl, type HttpImpl, type HttpServerImpl, type ImmediateOp, type InlineFunction, type InlineOperation, type Inspection, type Kind, type Library, type LibrarySource, type LimitName, LimitReached, type Limits, type LoadDiagnostic, LoadError, type LoadOptions, type LocaleImpl, MailboxFull, type ManifestSpec, type Message, type MessageDecl, type Metering, type MusicalClockImpl, type ObjectElements, type ObjectKind, type ObjectKindDef, type Operation, type OperationRef, type Operations, type Outcome, type PeerImpl, type PendingCall, type PlainArg, type PlainResult, type PlainValue, type PropDef, type PumpOptions, type PumpResult, type PumpedRequest, type ReleaseHook, type ReleaseReason, type Report, type Requested, type RestoreOptions, type RestoreResult, type RunAccounting, type RunAncestry, type RunDiscarded, type RunStarted, type ScopeDecl, type Script, ScriptError, type ScriptWithHandlers, type SegmentContext, type SegmentCoordinator, type SegmentGrant, type SegmentLifecycle, type SendFailedReason, type Settlement, type Shape, type SqlParams, type SqlRows, type SqlValue, type SqliteBinding, type SqliteImpl, type StoreImpl, type SuspendingOp, type TimerImpl, type ToValueOptions, type UserImpl, Value, type Verdict, type Versions, type WasmSource, add, bool, bytes, civilDate, conforms, createGroup, dec, decodeJson, decodeValue, encodeJson, encodeValue, explain, exportManifest, formatInstant, fromValue, handlersOf, inlineGrants, instant, list, map, nothing, nowMicros, num, operationDeclarations, parseInstant, quantity, range, readDisplay, record, shape, talk, text, toValue, zoneRules };
package/wasm.js CHANGED
@@ -1,18 +1,18 @@
1
1
 
2
- import { G as record, H as quantity, Jt as parseInstant, K as requireArgs, Kt as nowMicros, L as nothing, N as map, R as num, S as functionValue, T as instant, Ut as formatInstant, V as patternValue, W as range, c as Decimal, d as bytes, et as text, i as ScriptError, k as list, l as Value, m as civilDate, n as LoadError, o as invalidValue, q as requireValue, r as MailboxFull, s as sendFailed, t as HostError, u as bool, v as dec, z as objectValue } from "./errors-P3ga1I-9.js";
3
- import { a as rebindObject, n as makeObject, t as defineObjectKind } from "./objects-DE6kRk0r.js";
4
- import { Tt as shape, gt as LimitReached, mt as limitDefaults, wt as operationDeclarations, yt as defineCapability } from "./operations-CGjDlkGU.js";
5
- import { c as CallMeter, i as operationData, n as exportManifest, o as shapeData, s as invoke } from "./manifest-37x-HSxH.js";
2
+ import { D as instant, G as patternValue, H as num, J as range, K as quantity, L as map, N as list, Qt as parseInstant, U as objectValue, V as nothing, X as requireArgs, Xt as nowMicros, Y as record, Z as requireValue, b as dec, c as Decimal, d as bytes, g as civilDate, i as ScriptError, it as text, l as Value, n as LoadError, o as invalidValue, qt as formatInstant, r as MailboxFull, s as sendFailed, t as HostError, u as bool, w as functionValue } from "./errors-CNc-xY_9.js";
3
+ import { a as rebindObject, n as makeObject, t as defineObjectKind } from "./objects-OKVLH190.js";
4
+ import { Dt as shape, Et as operationDeclarations, bt as defineCapability, gt as LimitReached, mt as limitDefaults, vt as conforms, wt as explain } from "./operations-B3XaG7Ve.js";
5
+ import { c as CallMeter, i as operationData, n as exportManifest, o as shapeData, s as invoke } from "./manifest-DVS1SEmN.js";
6
6
  import { n as trackOperation } from "./operation-promises-ClA1BTaS.js";
7
7
  import { n as toBase64, t as fromBase64 } from "./base64-CDO-a06R.js";
8
- import { a as fromJson, c as readDisplay, l as readOrderedJSON, n as JsonObject, o as isJsonNumber, r as decodeValue, s as isJsonObject, t as JsonNumber } from "./readers-yMS1eAOp.js";
9
- import { a as clockCapability, d as timerCapability, i as calendarCapability, l as isMusicalClock, n as quoteJSON, o as consoleCapability, p as standardChecks, r as MUSICAL_CLOCK, t as encodeValue, u as musicalClockCapability } from "./encoding-BL2ECJmg.js";
10
- import { a as peerKind, i as peerCapability } from "./peer-capability-elnbQy-J.js";
11
- import { a as sqliteCapability, c as talk, i as httpCapability, n as createGroup, o as fromValue, r as handlersOf, s as toValue, t as inlineGrants } from "./inline-grants-BT2nnfLA.js";
12
- import { o as decodeJson, s as encodeJson } from "./http-fetch-DA-NbFIM.js";
13
- import { n as localeCapability, t as userCapability } from "./user-capability-D6hGa3eF.js";
14
- import { r as storeCapability, t as add } from "./store-capability-DBLlWaNO.js";
15
- import { a as encodeResult, c as isRequestPumpBinary, d as valueNode, i as encodeBinaryFrame, l as placeholderValues, n as decodeBinaryFrame, o as heldValue, r as decodeNeed, s as isBinaryNeed, t as callbacksFeature, u as requestPumpFeature } from "./request-pump-binary-BS1J8DF2.js";
8
+ import { a as fromJson, c as readDisplay, l as readOrderedJSON, n as JsonObject, o as isJsonNumber, r as decodeValue, s as isJsonObject, t as JsonNumber } from "./readers-G1lHqrPl.js";
9
+ import { a as clockCapability, d as timerCapability, i as calendarCapability, l as isMusicalClock, n as quoteJSON, o as consoleCapability, p as standardChecks, r as MUSICAL_CLOCK, t as encodeValue, u as musicalClockCapability } from "./encoding-DzVFpg7k.js";
10
+ import { a as peerKind, i as peerCapability } from "./peer-capability-3etyPHs3.js";
11
+ import { a as httpCapability, c as toValue, i as handlersOf, l as talk, n as inlineGrants, o as sqliteCapability, r as createGroup, s as fromValue, t as zoneRules } from "./zone-rules-DsCJtmlC.js";
12
+ import { o as decodeJson, s as encodeJson } from "./http-fetch-DnpfiOWK.js";
13
+ import { n as localeCapability, t as userCapability } from "./user-capability-DNY2dyjq.js";
14
+ import { r as storeCapability, t as add } from "./store-capability-CBJ6mUoH.js";
15
+ import { a as encodeResult, c as isRequestPumpBinary, d as valueNode, i as encodeBinaryFrame, l as placeholderValues, n as decodeBinaryFrame, o as heldValue, r as decodeNeed, s as isBinaryNeed, t as callbacksFeature, u as requestPumpFeature } from "./request-pump-binary-VOPVqRZD.js";
16
16
  //#region src/wasm/wire.ts
17
17
  const raw = Symbol("raw JSON");
18
18
  const sep = Symbol("separator");
@@ -1059,6 +1059,7 @@ var WasmGroup = class {
1059
1059
  source: o.source,
1060
1060
  grants: this.#grantHandles(grants),
1061
1061
  grantsAsUsed: o.grantsAsUsed,
1062
+ forbidSuspension: o.forbidSuspension || void 0,
1062
1063
  owner: o.owner ? this.#objectRef(o.owner) : void 0,
1063
1064
  objects: o.objects ? Object.fromEntries(Object.entries(o.objects).map(([n, h]) => [n, this.#objectRef(h)])) : void 0,
1064
1065
  limits: {
@@ -1298,6 +1299,7 @@ var WasmGroup = class {
1298
1299
  return {
1299
1300
  name: textOf(field(s, "name")),
1300
1301
  ...disabled.length ? { disabledGrants: disabled } : {},
1302
+ ...field(s, "forbidSuspension") === true ? { forbidSuspension: true } : {},
1301
1303
  vars: listOf(field(s, "vars")).map((pair) => {
1302
1304
  const [name, v] = listOf(pair);
1303
1305
  return [textOf(name), decode(this.#codec, v)];
@@ -1793,4 +1795,4 @@ const createCore = async (o = {}) => new WasmCore(await compile(o.wasm ?? new UR
1793
1795
  /** Chapter 9's default Limits, which the reactor shares. */
1794
1796
  const defaultLimits = Object.freeze({ ...limitDefaults });
1795
1797
  //#endregion
1796
- export { Decimal, HostError, InstanceLostError, LimitReached, LoadError, MailboxFull, ScriptError, Value, WasmCore, WasmGroup, WasmScript, add, bool, bytes, civilDate, createCore, createGroup, dec, decodeJson, decodeValue, defaultLimits, encodeJson, encodeValue, exportManifest, formatInstant, fromValue, handlersOf, inlineGrants, instant, list, map, nothing, nowMicros, num, operationDeclarations, parseInstant, quantity, range, readDisplay, record, shape, talk, text, toValue };
1798
+ export { Decimal, HostError, InstanceLostError, LimitReached, LoadError, MailboxFull, ScriptError, Value, WasmCore, WasmGroup, WasmScript, add, bool, bytes, civilDate, conforms, createCore, createGroup, dec, decodeJson, decodeValue, defaultLimits, encodeJson, encodeValue, explain, exportManifest, formatInstant, fromValue, handlersOf, inlineGrants, instant, list, map, nothing, nowMicros, num, operationDeclarations, parseInstant, quantity, range, readDisplay, record, shape, talk, text, toValue, zoneRules };
@@ -1,8 +1,8 @@
1
1
 
2
- import { A as listValues, Ct as integerOf, D as isDecimal, G as record, L as nothing, N as map, R as num, d as bytes, et as text, i as ScriptError, l as Value, o as invalidValue, q as requireValue, t as HostError, u as bool, v as dec, wt as isInteger, y as decimalParts } from "./errors-P3ga1I-9.js";
3
- import { Dt as validComputedMessageName, St as expectedOf, Tt as shape, bt as defineValueCapability, kt as validStaticMessageName, n as ScriptError$1, yt as defineCapability } from "./operations-CGjDlkGU.js";
4
- import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-BL2ECJmg.js";
5
- import { n as duplicateHeaderNames, r as fetchAnswerOk, s as encodeJson, t as checkFetch } from "./http-fetch-DA-NbFIM.js";
2
+ import { D as instant, Dt as integerOf, H as num, K as quantity, L as map, N as list, Ot as isInteger, P as listValues, V as nothing, Y as record, Z as requireValue, b as dec, d as bytes, i as ScriptError, it as text, k as isDecimal, l as Value, o as invalidValue, t as HostError, u as bool, x as decimalParts } from "./errors-CNc-xY_9.js";
3
+ import { Ct as expectedOf, Dt as shape, bt as defineCapability, jt as validStaticMessageName, kt as validComputedMessageName, n as ScriptError$1, xt as defineValueCapability } from "./operations-B3XaG7Ve.js";
4
+ import { c as fixed, f as registerStandardChecks, s as costOf } from "./encoding-DzVFpg7k.js";
5
+ import { n as duplicateHeaderNames, r as fetchAnswerOk, s as encodeJson, t as checkFetch } from "./http-fetch-DnpfiOWK.js";
6
6
  import { asyncDispose, newDrivenGroup } from "./driver.js";
7
7
  //#region src/talk.ts
8
8
  const blank = /^[\t ]*$/;
@@ -577,4 +577,87 @@ const inlineGrants = (capabilities) => Object.fromEntries(Object.entries(capabil
577
577
  return [name, defineCapability(name, ops).grant("all", void 0)];
578
578
  }));
579
579
  //#endregion
580
- export { sqliteCapability as a, talk as c, httpCapability as i, createGroup as n, fromValue as o, handlersOf as r, toValue as s, inlineGrants as t };
580
+ //#region src/zone-rules.ts
581
+ const SECOND = 1e3;
582
+ const STEP = 21600 * SECOND;
583
+ const formatIn = (zone) => {
584
+ try {
585
+ return new Intl.DateTimeFormat("en-US", {
586
+ timeZone: zone,
587
+ hourCycle: "h23",
588
+ era: "short",
589
+ year: "numeric",
590
+ month: "numeric",
591
+ day: "numeric",
592
+ hour: "numeric",
593
+ minute: "numeric",
594
+ second: "numeric"
595
+ });
596
+ } catch {
597
+ throw new HostError("invalid value", `zoneRules: unknown zone ${zone}`);
598
+ }
599
+ };
600
+ /** The zone's offset from UTC at `ms`, a whole second, in seconds. */
601
+ const offsetAt = (format, ms) => {
602
+ const parts = {};
603
+ for (const p of format.formatToParts(new Date(ms))) parts[p.type] = p.value;
604
+ const year = parts.era === "BC" ? 1 - Number(parts.year) : Number(parts.year);
605
+ const wall = /* @__PURE__ */ new Date(0);
606
+ wall.setUTCFullYear(year, Number(parts.month) - 1, Number(parts.day));
607
+ wall.setUTCHours(Number(parts.hour), Number(parts.minute), Number(parts.second));
608
+ return (wall.getTime() - ms) / SECOND;
609
+ };
610
+ /** `ms` rounded down to a whole second. */
611
+ const second = (ms) => Math.floor(ms / SECOND) * SECOND;
612
+ const instantOfMs = (ms) => instant(BigInt(ms) * 1000n);
613
+ /**
614
+ * Zone Rules for the IANA zone `zone` from `from` up to `until`, exclusive,
615
+ * as an ordinary map (chapter 7): the offset in effect at `from`, then each
616
+ * Instant in the window where the offset changes. An unknown zone, an empty
617
+ * window, or an offset that isn't a whole number of minutes, as in local mean
618
+ * time before a zone adopted standard time, throws invalid value.
619
+ */
620
+ const zoneRules = (zone, from, until) => {
621
+ const start = from.getTime();
622
+ const end = until.getTime();
623
+ if (!Number.isFinite(start) || !Number.isFinite(end) || start >= end) throw new HostError("invalid value", "zoneRules: an empty window");
624
+ const format = formatIn(zone);
625
+ const offset = (ms) => {
626
+ const o = offsetAt(format, second(ms));
627
+ if (o % 60 !== 0) throw new HostError("invalid value", `zoneRules: ${zone} is ${o} s from UTC at ${new Date(ms).toISOString()}, not whole minutes`);
628
+ return o;
629
+ };
630
+ const changes = [];
631
+ const change = (at, o) => changes.push(record({
632
+ at: instantOfMs(at),
633
+ offset: quantity(num(o), "s")
634
+ }));
635
+ let current = offset(start);
636
+ change(start, current);
637
+ let at = start;
638
+ const last = second(end - 1);
639
+ while (at < last) {
640
+ const next = Math.min(at + STEP, last);
641
+ if (offset(next) === current) {
642
+ at = next;
643
+ continue;
644
+ }
645
+ let low = second(at);
646
+ let high = next;
647
+ while (high - low > SECOND) {
648
+ const mid = second(low + (high - low) / 2);
649
+ if (offset(mid) === current) low = mid;
650
+ else high = mid;
651
+ }
652
+ current = offset(high);
653
+ change(Math.max(high, start), current);
654
+ at = high;
655
+ }
656
+ return record({
657
+ zone: text(zone),
658
+ until: instantOfMs(end),
659
+ changes: list(...changes)
660
+ });
661
+ };
662
+ //#endregion
663
+ export { httpCapability as a, toValue as c, handlersOf as i, talk as l, inlineGrants as n, sqliteCapability as o, createGroup as r, fromValue as s, zoneRules as t };