@northtalk/ts 0.1.0 → 0.2.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/README.md +9 -5
  2. package/{encoding-DWlbPq-e.js → base64-DORMd3Hv.js} +197 -1368
  3. package/binary-value-CEmh60GC.d.ts +15 -0
  4. package/capabilities-CH0FkRMq.js +1301 -0
  5. package/checker-Dc1jl2WH.js +6657 -0
  6. package/core-DptnvQT9.d.ts +14 -0
  7. package/{debug-D8Z_u244.d.ts → debug-CQBxKnJB.d.ts} +1147 -780
  8. package/debug.d.ts +2 -1
  9. package/debug.js +2 -1
  10. package/driver.d.ts +16 -2
  11. package/driver.js +98 -20
  12. package/encoding-nlrpj-Pb.js +99 -0
  13. package/{engine-CgCMdGGd.js → engine-BGaJ9dAk.js} +7 -5
  14. package/{engine-BPFnHT9N.d.ts → engine-vbYInVYF.d.ts} +3 -3
  15. package/{errors-DHwz1Vho.js → errors-LYJZ_c8h.js} +91 -17
  16. package/{group-B4eyJKTA.js → group-B742gg4T.js} +1490 -7278
  17. package/{sqlite-capability-CrCej3Po.js → http-capability-CSTkw1Yt.js} +255 -5
  18. package/http.d.ts +59 -0
  19. package/http.js +465 -0
  20. package/index.d.ts +23 -17
  21. package/index.js +19 -12
  22. package/manifest-BscyH_rW.d.ts +70 -0
  23. package/{manifest-DKe2Je6Z.js → manifest-DjsxDSuB.js} +11 -90
  24. package/message-layer.d.ts +12 -0
  25. package/message-layer.js +4 -0
  26. package/notify.d.ts +2 -1
  27. package/notify.js +2 -1
  28. package/{objects-MeXIDDFo.d.ts → objects-DJ3QtCCs.d.ts} +23 -8
  29. package/objects-Db7IB5vQ.js +91 -0
  30. package/operation-promises-EgZXG5N_.js +23 -0
  31. package/package.json +9 -1
  32. package/readers-BFPuosPk.d.ts +25 -0
  33. package/{readers-DyjxJEkL.js → readers-CjJHKHvH.js} +6 -3
  34. package/request-pump-binary-DdY3X-yl.js +2246 -0
  35. package/{router-DHPJNvbt.js → router--71qvxtY.js} +8 -6
  36. package/{router-DpDpAJjz.d.ts → router-Zhrw5l__.d.ts} +6 -5
  37. package/session.d.ts +2 -1
  38. package/session.js +58 -24
  39. package/setup.d.ts +2 -1
  40. package/setup.js +8 -4
  41. package/{sha256-0jiTgVJu.js → sha256-B_kyYw3Z.js} +1 -0
  42. package/sqlite.d.ts +3 -4
  43. package/sqlite.js +6 -5
  44. package/{store-capability-CDoVafZL.js → store-capability-OZp4hXmj.js} +10 -7
  45. package/{store-DrYjcoru.js → store-hJrRULMx.js} +3 -2
  46. package/store.d.ts +3 -2
  47. package/store.js +3 -2
  48. package/{user-capability-Cv0oJhhv.js → user-capability-BK4Asg7D.js} +8 -5
  49. package/wasm.d.ts +42 -22
  50. package/wasm.js +330 -46
  51. package/core-eU5KaYkz.d.ts +0 -23
  52. package/readers-Oh4tO2dK.d.ts +0 -57
  53. package/sqlite-capability-C7-SYdD7.d.ts +0 -87
  54. package/user-capability-CLkDsrCX.d.ts +0 -40
@@ -1,7 +1,9 @@
1
- import { E as listValues, V as text, c as bool, i as ScriptError, k as map, t as HostError } from "./errors-DHwz1Vho.js";
2
- import { Q as sizeOf, t as encodeValue, ut as compareText } from "./encoding-DWlbPq-e.js";
3
- import { t as sha256 } from "./sha256-0jiTgVJu.js";
4
- import { n as hostScriptError } from "./store-capability-CDoVafZL.js";
1
+
2
+ import { K as text, M as map, i as ScriptError, k as listValues, t as HostError, u as bool } from "./errors-LYJZ_c8h.js";
3
+ import { Y as sizeOf, st as compareText } from "./base64-DORMd3Hv.js";
4
+ import { t as encodeValue } from "./encoding-nlrpj-Pb.js";
5
+ import { t as sha256 } from "./sha256-B_kyYw3Z.js";
6
+ import { n as hostScriptError } from "./store-capability-OZp4hXmj.js";
5
7
  //#region src/notify/router.ts
6
8
  /**
7
9
  * Whether a commit changed a key's value: compared by the bytes of the Value
@@ -215,8 +217,8 @@ const createRouter = (o) => {
215
217
  detach(group) {
216
218
  for (const w of groups.get(group)?.watches ?? []) remove(w);
217
219
  },
218
- save(group) {
219
- const bytes = group.save();
220
+ save(group, options) {
221
+ const bytes = group.save(options);
220
222
  const state = groups.get(group);
221
223
  const watches = order(state?.watches ?? []);
222
224
  const routing = {
@@ -1,5 +1,6 @@
1
- import { At as Call, T as RestoreResult, at as Value, m as Group, w as RestoreOptions, zt as GrantContext } from "./debug-D8Z_u244.js";
2
- import { t as Core } from "./core-eU5KaYkz.js";
1
+
2
+ import { D as SaveOptions, F as TsRestoreOptions, Jt as Group, N as TsGroup, T as RestoreResult, kt as GrantContext, q as Value, yt as Call } from "./debug-CQBxKnJB.js";
3
+ import { t as TsCore } from "./core-DptnvQT9.js";
3
4
  //#region src/notify/router.d.ts
4
5
  /** A Store's four limits on its watches (Store Notifications, Limits). */
5
6
  type WatchLimits = {
@@ -33,13 +34,13 @@ type NotificationRouter = {
33
34
  pumped(group: Group): boolean;
34
35
  release(context: GrantContext<string>): void;
35
36
  /** Throws HostError `invalid checkpoint`, or whatever Core.restore throws. */
36
- restore(core: Pick<Core, 'restore'>, checkpoint: Uint8Array, o: RestoreOptions): {
37
- group: Group;
37
+ restore(core: Pick<TsCore, 'restore'>, checkpoint: Uint8Array, o: TsRestoreOptions): {
38
+ group: TsGroup;
38
39
  result: RestoreResult;
39
40
  routing: RoutingResult;
40
41
  };
41
42
  /** A checkpoint; throws effects pending as Group.save does. */
42
- save(group: Group): Uint8Array;
43
+ save(group: TsGroup, options?: SaveOptions): Uint8Array;
43
44
  unwatch(call: Call<string>, name: string): void;
44
45
  /** Registers or replaces a watch; throws ScriptError `watch limit` {limit}. */
45
46
  watch(call: Call<string>, name: string, prefix: string, message: string): void;
package/session.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- 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-MeXIDDFo.js";
1
+
2
+ 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-DJ3QtCCs.js";
2
3
  //#region src/generated/builtin-docs.d.ts
3
4
  export declare const builtinDocs: Readonly<Record<string, {
4
5
  call: string;
package/session.js CHANGED
@@ -1,13 +1,18 @@
1
- import { $ as builtins, E as listValues, Gt as parseInstant, Ht as formatInstant, L as range, M as num, V as text, c as bool, i as ScriptError, j as nothing, k as map, lt as lower, n as LoadError, ot as characterBoundaries, s as Value, t as HostError } from "./errors-DHwz1Vho.js";
2
- import { a as shapeData, d as stateOf, n as exportManifest, o as defineObjectKind, t as canonicalJSON } from "./manifest-DKe2Je6Z.js";
3
- import { K as textForm$1, a as validComputedMessageName, k as integerValue, n as quoteJSON, q as waitUs, t as encodeValue, tt as functionHead, ut as compareText, vt as defineCapability, xt as shape } from "./encoding-DWlbPq-e.js";
4
- import { E as checkSource, I as functionDoc, L as leadingDoc, M as parseSource, P as declarationDocs, R as viewSource, a as observeValues, c as sessionReply, f as compileLibrary, i as observeRuns, j as parseEntry, l as recordLine, m as stdlibSources, o as queuedInputs, s as restore, u as traceValue, y as defaultLimits } from "./group-B4eyJKTA.js";
5
- import { a as readOrderedJSON, i as readDisplay, t as decodeValue } from "./readers-DyjxJEkL.js";
6
- import { n as localeCapability, t as userCapability } from "./user-capability-Cv0oJhhv.js";
7
- import { a as clockCapability, i as calendarCapability, o as consoleCapability, r as storeCapability } from "./store-capability-CDoVafZL.js";
1
+
2
+ import { B as range, F as num, K as text, M as map, P as nothing, Qt as parseInstant, dt as characterBoundaries, i as ScriptError, it as builtins, k as listValues, l as Value, mt as lower, n as LoadError, qt as formatInstant, t as HostError, u as bool } from "./errors-LYJZ_c8h.js";
3
+ import { o as stateOf, t as defineObjectKind } from "./objects-Db7IB5vQ.js";
4
+ import { a as defineValueCapability, f as validComputedMessageName, u as shape } from "./capabilities-CH0FkRMq.js";
5
+ import { _ as viewSource, f as declarationDocs, h as leadingDoc, m as functionDoc, o as parseEntry, s as parseSource, t as checkSource } from "./checker-Dc1jl2WH.js";
6
+ import { C as integerValue, H as textForm$1, Q as functionHead, U as waitUs, st as compareText } from "./base64-DORMd3Hv.js";
7
+ import { a as recordLine, c as compileLibrary, h as defaultLimits, i as restore, o as traceValue, u as stdlibSources } from "./group-B742gg4T.js";
8
+ import { c as readDisplay, l as readOrderedJSON, r as decodeValue } from "./readers-CjJHKHvH.js";
9
+ import { n as quoteJSON, t as encodeValue } from "./encoding-nlrpj-Pb.js";
10
+ import { a as shapeData, n as exportManifest, t as canonicalJSON } from "./manifest-DjsxDSuB.js";
11
+ import { n as localeCapability, t as userCapability } from "./user-capability-BK4Asg7D.js";
12
+ import { a as clockCapability, i as calendarCapability, o as consoleCapability, r as storeCapability } from "./store-capability-OZp4hXmj.js";
8
13
  import { buildSetupGroup, capabilityOperations, immutableSetup, operationDeclarations, shapeOf } from "./setup.js";
9
- import { a as encodeContents, i as decodeContents, o as sessionQuotas, t as StoreContentsError } from "./engine-CgCMdGGd.js";
10
- import { i as memoryStores } from "./store-DrYjcoru.js";
14
+ import { a as encodeContents, i as decodeContents, o as sessionQuotas, t as StoreContentsError } from "./engine-BGaJ9dAk.js";
15
+ import { i as memoryStores } from "./store-hJrRULMx.js";
11
16
  //#region src/session/objects.ts
12
17
  const externalCollection = () => {
13
18
  throw new Error("external collection callback in replay");
@@ -372,6 +377,7 @@ var SessionObjects = class {
372
377
  recorded;
373
378
  enabled;
374
379
  group;
380
+ reply;
375
381
  items = [];
376
382
  kinds = /* @__PURE__ */ new Map();
377
383
  declarations = /* @__PURE__ */ new Map();
@@ -397,9 +403,25 @@ var SessionObjects = class {
397
403
  consumed: false
398
404
  })) : null;
399
405
  }
400
- attach(group) {
401
- group[observeValues]((tree) => this.expose(tree));
406
+ /**
407
+ * A port to build or restore the next Group with. Its controls only count
408
+ * once `attach` adopts the Group, since a restore can still fail after the
409
+ * Core connects it.
410
+ */
411
+ port(runs) {
412
+ const port = {
413
+ controls: null,
414
+ connect: (c) => {
415
+ port.controls = c;
416
+ },
417
+ runs: (e) => runs?.(e),
418
+ values: (tree) => this.expose(tree)
419
+ };
420
+ return port;
421
+ }
422
+ attach(group, port) {
402
423
  this.group = group;
424
+ this.reply = port.controls.reply;
403
425
  for (const [key, o] of this.objects) {
404
426
  const restored = group.objectById(o.kind.name, o.id);
405
427
  if (restored) this.objects.set(key, restored);
@@ -917,7 +939,7 @@ var SessionObjects = class {
917
939
  script().revoke(string(request.grant));
918
940
  break;
919
941
  case "answer":
920
- this.group[sessionReply](string(request.call), {
942
+ this.reply(string(request.call), {
921
943
  k: "answer",
922
944
  value: val("value"),
923
945
  fuel: Number(request.fuel ?? 0)
@@ -929,7 +951,7 @@ var SessionObjects = class {
929
951
  "message",
930
952
  "data"
931
953
  ]);
932
- this.group[sessionReply](string(request.call), {
954
+ this.reply(string(request.call), {
933
955
  k: "fail",
934
956
  error: new ScriptError(string(f.code), string(f.message), val("error", "data"))
935
957
  });
@@ -1088,6 +1110,14 @@ const builtinDocs = {
1088
1110
  "call": "atan2(y, x)",
1089
1111
  "gives": "The angle of the point (`x`, `y`) from the positive x-axis, in radians above -pi and at most pi"
1090
1112
  },
1113
+ "degrees": {
1114
+ "call": "degrees(x)",
1115
+ "gives": "`x` radians in degrees"
1116
+ },
1117
+ "radians": {
1118
+ "call": "radians(x)",
1119
+ "gives": "`x` degrees in radians"
1120
+ },
1091
1121
  "random": {
1092
1122
  "call": "random(n)",
1093
1123
  "gives": "A whole number from 1 to `n`, the next from the Script Group's generator"
@@ -1767,6 +1797,7 @@ const nodes = (node) => node.children.filter((c) => c.kind === "node");
1767
1797
  var SessionHost = class {
1768
1798
  env;
1769
1799
  group = null;
1800
+ controls = null;
1770
1801
  objectSession = null;
1771
1802
  objectBindings = {};
1772
1803
  script = null;
@@ -2017,7 +2048,7 @@ var SessionHost = class {
2017
2048
  }
2018
2049
  finished(lines) {
2019
2050
  const out = this.printed(lines);
2020
- if (!this.group || this.state.k === "paused" || !this.group[queuedInputs]()) return out;
2051
+ if (!this.group || this.state.k === "paused" || !this.controls.queuedInputs()) return out;
2021
2052
  this.callStart = this.recordedItems.length;
2022
2053
  return [...out, ...this.printed(this.pump())];
2023
2054
  }
@@ -2095,17 +2126,18 @@ var SessionHost = class {
2095
2126
  start(setup = this.setup0) {
2096
2127
  if (this.group) return;
2097
2128
  const capabilities = this.capabilities(setup);
2129
+ this.objectSession = new SessionObjects((item) => this.record(item), this.env.objectTranscript, this.env.objectTranscript === void 0 || !!this.env.objectTranscript?.some((i) => i.k === "envelope"));
2130
+ const port = this.objectSession.port((e) => this.events.push(e));
2098
2131
  const built = buildSetupGroup(setup, capabilities, {
2099
2132
  name: NAME,
2133
+ session: port,
2100
2134
  trace: (line) => this.env.trace?.(line)
2101
2135
  });
2102
2136
  const { group } = built;
2103
- group[observeRuns]((e) => this.events.push(e));
2104
2137
  this.declarations0 = Object.fromEntries(capabilities);
2105
2138
  this.group = group;
2106
- this.objectSession = new SessionObjects((item) => this.record(item), this.env.objectTranscript, this.env.objectTranscript === void 0 || !!this.env.objectTranscript?.some((i) => i.k === "envelope"));
2107
- this.objectSession.attach(group);
2108
- group[observeValues]((tree) => this.objectSession.expose(tree));
2139
+ this.controls = port.controls;
2140
+ this.objectSession.attach(group, port);
2109
2141
  this.objectBindings = this.env.objectTranscript ? this.objectSession.preload() : this.env.objects?.(this.objectSession) ?? {};
2110
2142
  this.objectSession.initial(this.objectBindings);
2111
2143
  this.script = built.load(group, NAME, this.objectBindings);
@@ -2222,7 +2254,8 @@ var SessionHost = class {
2222
2254
  ...spec.cost,
2223
2255
  fuel: spec.cost?.fuel ?? 0
2224
2256
  },
2225
- ...spec.command === void 0 ? {} : { command: spec.command }
2257
+ ...spec.command === void 0 ? {} : { command: spec.command },
2258
+ ...spec.labels === void 0 ? {} : { labels: spec.labels }
2226
2259
  };
2227
2260
  const op = mode === "immediate" ? {
2228
2261
  ...base,
@@ -2261,7 +2294,7 @@ var SessionHost = class {
2261
2294
  [operation]: op
2262
2295
  });
2263
2296
  }
2264
- return new Map([...operations].map(([name, ops]) => [name, defineCapability(name, ops)]));
2297
+ return new Map([...operations].map(([name, ops]) => [name, defineValueCapability(name, ops)]));
2265
2298
  }
2266
2299
  command(source) {
2267
2300
  const [, name = "", rest = ""] = /^:(\S*)\s*(.*)$/su.exec(source) ?? [];
@@ -2655,10 +2688,12 @@ var SessionHost = class {
2655
2688
  if (!saved) return refuse("no such save");
2656
2689
  this.recorded();
2657
2690
  let restored;
2691
+ const port = this.objectSession.port((e) => this.events.push(e));
2658
2692
  this.notified = false;
2659
2693
  try {
2660
2694
  restored = this.stores.router.restore({ restore }, saved.checkpoint, {
2661
2695
  name: NAME,
2696
+ session: port,
2662
2697
  trace: (line) => this.env.trace?.(line),
2663
2698
  libraries: [...this.libraries.values()].map((l) => l.library),
2664
2699
  grants: (_, grant) => this.grantsByName[grant],
@@ -2670,13 +2705,12 @@ var SessionHost = class {
2670
2705
  throw error;
2671
2706
  }
2672
2707
  const { group, result } = restored;
2673
- group[observeRuns]((e) => this.events.push(e));
2674
2708
  this.stores.router.detach(this.group);
2675
2709
  this.group = group;
2710
+ this.controls = port.controls;
2676
2711
  this.objectSession.restored();
2677
- this.objectSession.attach(group);
2712
+ this.objectSession.attach(group, port);
2678
2713
  this.objectSession.reports(result.reports);
2679
- group[observeValues]((tree) => this.objectSession.expose(tree));
2680
2714
  this.controller = null;
2681
2715
  this.script = group.script(NAME);
2682
2716
  this.declarations = [...saved.declarations];
@@ -3013,7 +3047,7 @@ var SessionHost = class {
3013
3047
  }
3014
3048
  notifications() {
3015
3049
  const out = [];
3016
- while (this.notified && this.state.k !== "paused" && this.group[queuedInputs]()) out.push(...this.pumpAt(this.lastClock));
3050
+ while (this.notified && this.state.k !== "paused" && this.controls.queuedInputs()) out.push(...this.pumpAt(this.lastClock));
3017
3051
  return out;
3018
3052
  }
3019
3053
  notifiedPump() {
package/setup.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- 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 operationDeclarations, w as SetupGroup, x as ObjectRefSpec, y as CaseCore } from "./objects-MeXIDDFo.js";
1
+
2
+ 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 operationDeclarations, w as SetupGroup, x as ObjectRefSpec, y as CaseCore } from "./objects-DJ3QtCCs.js";
2
3
  export { CaseCore, MissingCapabilityError, ObjectRefSpec, OperationSpec, Setup, SetupGroup, ShapeSpec, buildSetupGroup, capabilityOperations, immutableSetup, operationDeclarations, shapeOf, shapeSpec, tsCore };
package/setup.js CHANGED
@@ -1,13 +1,15 @@
1
- import { n as LoadError } from "./errors-DHwz1Vho.js";
2
- import { o as defineObjectKind } from "./manifest-DKe2Je6Z.js";
3
- import { xt as shape } from "./encoding-DWlbPq-e.js";
4
- import { f as compileLibrary, p as replacementLibraries, r as newGroup, s as restore } from "./group-B4eyJKTA.js";
1
+
2
+ import { n as LoadError } from "./errors-LYJZ_c8h.js";
3
+ import { t as defineObjectKind } from "./objects-Db7IB5vQ.js";
4
+ import { u as shape } from "./capabilities-CH0FkRMq.js";
5
+ import { c as compileLibrary, i as restore, l as replacementLibraries, r as newGroup } from "./group-B742gg4T.js";
5
6
  //#region src/setup.ts
6
7
  const operationDeclarations = (capabilities) => {
7
8
  const declarations = Object.create(null);
8
9
  for (const [name, capability] of capabilities) declarations[name] = Object.fromEntries([...capability.operations].map(([operation, op]) => [operation, {
9
10
  args: op.args ?? [],
10
11
  mode: op.mode,
12
+ ...op.labels?.length ? { labels: op.labels } : {},
11
13
  ...op.command ? { command: true } : {}
12
14
  }]));
13
15
  return declarations;
@@ -67,6 +69,7 @@ const capabilityOperations = (capabilities) => capabilities.flatMap((c) => [...c
67
69
  mode: op.mode,
68
70
  args: (op.args ?? []).map(shapeSpec),
69
71
  cost: { ...op.cost },
72
+ ...op.labels?.length ? { labels: [...op.labels] } : {},
70
73
  ...op.command ? { command: true } : {},
71
74
  ...op.result ? { result: shapeSpec(op.result) } : {},
72
75
  ...op.errors ? { errors: op.errors.map((e) => ({
@@ -96,6 +99,7 @@ const buildSetupGroup = (setup, capabilities, options) => {
96
99
  const core = options.core ?? tsCore;
97
100
  const group = core.newGroup({
98
101
  name: options.name,
102
+ session: options.session,
99
103
  trace: options.trace,
100
104
  ...setup.seed === void 0 ? {} : { seed: BigInt(setup.seed) }
101
105
  });
@@ -1,3 +1,4 @@
1
+
1
2
  //#region src/sha256.ts
2
3
  const K = new Uint32Array([
3
4
  1116352408,
package/sqlite.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { At as Call, qt as SegmentCoordinator } from "./debug-D8Z_u244.js";
2
- import { a as SqliteImpl, i as SqliteBinding, n as SqlRows, t as SqlParams } from "./sqlite-capability-C7-SYdD7.js";
3
- import { r as StoreImpl } from "./user-capability-CLkDsrCX.js";
4
- import { a as Stores, r as StoreQuotas } from "./engine-BPFnHT9N.js";
1
+
2
+ import { Bt as SegmentCoordinator, an as SqlParams, cn as SqliteBinding, ln as SqliteImpl, nn as StoreImpl, on as SqlRows, yt as Call } from "./debug-CQBxKnJB.js";
3
+ import { a as Stores, r as StoreQuotas } from "./engine-vbYInVYF.js";
5
4
  //#region src/sqlite/database.d.ts
6
5
  /** The table that keeps a database's Stores, which no `sqlite` Grant may use. */
7
6
  export declare const STORE_TABLE = "store";
package/sqlite.js CHANGED
@@ -1,8 +1,9 @@
1
- import { V as text, h as dec, t as HostError } from "./errors-DHwz1Vho.js";
2
- import { t as encodeValue } from "./encoding-DWlbPq-e.js";
3
- import { t as decodeValue } from "./readers-DyjxJEkL.js";
4
- import { n as hostScriptError } from "./store-capability-CDoVafZL.js";
5
- import { r as Stores, t as StoreContentsError } from "./engine-CgCMdGGd.js";
1
+
2
+ import { K as text, _ as dec, t as HostError } from "./errors-LYJZ_c8h.js";
3
+ import { r as decodeValue } from "./readers-CjJHKHvH.js";
4
+ import { t as encodeValue } from "./encoding-nlrpj-Pb.js";
5
+ import { n as hostScriptError } from "./store-capability-OZp4hXmj.js";
6
+ import { r as Stores, t as StoreContentsError } from "./engine-BGaJ9dAk.js";
6
7
  import { DatabaseSync } from "node:sqlite";
7
8
  //#region src/sqlite/scan.ts
8
9
  const isWordChar = (c) => /[\w$]/.test(c) || c.charCodeAt(0) > 127;
@@ -1,5 +1,8 @@
1
- import { S as instant, V as text, c as bool, i as ScriptError, j as nothing, k as map, t as HostError } from "./errors-DHwz1Vho.js";
2
- import { a as validComputedMessageName, f as arithmetic, ft as errorMessages, r as registerStandardChecks, u as ScriptError$1, vt as defineCapability, xt as shape } from "./encoding-DWlbPq-e.js";
1
+
2
+ import { K as text, M as map, P as nothing, i as ScriptError, t as HostError, u as bool, w as instant } from "./errors-LYJZ_c8h.js";
3
+ import { a as defineValueCapability, f as validComputedMessageName, u as shape } from "./capabilities-CH0FkRMq.js";
4
+ import { i as ScriptError$1, lt as errorMessages, o as arithmetic } from "./base64-DORMd3Hv.js";
5
+ import { r as registerStandardChecks } from "./encoding-nlrpj-Pb.js";
3
6
  //#region src/standard-capabilities.ts
4
7
  const costOf = (costs, name) => {
5
8
  const cost = costs && Object.hasOwn(costs, name) ? costs[name] : void 0;
@@ -31,7 +34,7 @@ const dataListShape = Object.freeze({
31
34
  of: Object.freeze({ k: "any" })
32
35
  });
33
36
  /** The Pump's Clock reading; there is no Host clock implementation. */
34
- const clockCapability = (costs) => fixed(defineCapability("clock", { now: {
37
+ const clockCapability = (costs) => fixed(defineValueCapability("clock", { now: {
35
38
  mode: "immediate",
36
39
  args: [],
37
40
  result: instantShape,
@@ -42,7 +45,7 @@ const clockCapability = (costs) => fixed(defineCapability("clock", { now: {
42
45
  /** The Host owns durable timers, scoped by Script and name. */
43
46
  const timerCapability = (impl, costs) => {
44
47
  if (!impl || typeof impl.schedule !== "function" || typeof impl.cancel !== "function") throw new HostError("invalid value", "Timer needs Schedule and Cancel");
45
- return fixed(defineCapability("timer", {
48
+ return fixed(defineValueCapability("timer", {
46
49
  schedule: {
47
50
  mode: "fire-and-forget",
48
51
  args: [
@@ -67,7 +70,7 @@ const timerCapability = (impl, costs) => {
67
70
  /** The Host shows Values in text form and answers read with a line of text. */
68
71
  const consoleCapability = (impl, costs) => {
69
72
  if (!impl || typeof impl.write !== "function" || typeof impl.read !== "function") throw new HostError("invalid value", "Console needs Write and Read");
70
- return fixed(defineCapability("console", {
73
+ return fixed(defineValueCapability("console", {
71
74
  write: {
72
75
  mode: "fire-and-forget",
73
76
  args: [valueShape],
@@ -199,7 +202,7 @@ const calendarCapability = (impl, costs) => {
199
202
  "toCivil"
200
203
  ].includes(name) ? { result: (value) => !("hour" in value.asCivilDate()) === (name === "today") } : {}
201
204
  });
202
- return fixed(defineCapability("calendar", operations));
205
+ return fixed(defineValueCapability("calendar", operations));
203
206
  };
204
207
  //#endregion
205
208
  //#region src/store-capability.ts
@@ -376,7 +379,7 @@ const storeCapability = (impl, costs) => {
376
379
  }
377
380
  };
378
381
  const coordinator = impl;
379
- const capability = defineCapability("store", operations, { coordinator: () => coordinator }, (context) => impl.release(context));
382
+ const capability = defineValueCapability("store", operations, { coordinator: () => coordinator }, (context) => impl.release(context));
380
383
  for (const [name, op] of capability.operations) registerStandardChecks(op, {
381
384
  error: (code, data) => Boolean(op.errors?.some((e) => e.code === code) && errorFields[code]?.(data)),
382
385
  ...name === "keys" ? {} : { arguments: argumentChecks[name] ?? checkKey }
@@ -1,5 +1,6 @@
1
- import { ut as compareText } from "./encoding-DWlbPq-e.js";
2
- import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, r as Stores, s as sessionWatchLimits } from "./engine-CgCMdGGd.js";
1
+
2
+ import { st as compareText } from "./base64-DORMd3Hv.js";
3
+ import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, r as Stores, s as sessionWatchLimits } from "./engine-BGaJ9dAk.js";
3
4
  //#region src/store/memory.ts
4
5
  /** A backend that keeps nothing outside the engine's own copy. */
5
6
  const memoryBackend = () => ({
package/store.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { n as RouterOptions } from "./router-DpDpAJjz.js";
2
- 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-BPFnHT9N.js";
1
+
2
+ import { n as RouterOptions } from "./router-Zhrw5l__.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-vbYInVYF.js";
3
4
  //#region src/store/memory.d.ts
4
5
  /** A backend that keeps nothing outside the engine's own copy. */
5
6
  export declare const memoryBackend: () => StoreBackend;
package/store.js CHANGED
@@ -1,3 +1,4 @@
1
- import { a as encodeContents, i as decodeContents, n as StoreStateUnknownError, o as sessionQuotas, r as Stores, s as sessionWatchLimits, t as StoreContentsError } from "./engine-CgCMdGGd.js";
2
- import { i as memoryStores, n as webStorageStores, r as memoryBackend, t as webStorageBackend } from "./store-DrYjcoru.js";
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-BGaJ9dAk.js";
3
+ import { i as memoryStores, n as webStorageStores, r as memoryBackend, t as webStorageBackend } from "./store-hJrRULMx.js";
3
4
  export { StoreContentsError, StoreStateUnknownError, Stores, decodeContents, encodeContents, memoryBackend, memoryStores, sessionQuotas, sessionWatchLimits, webStorageBackend, webStorageStores };
@@ -1,6 +1,9 @@
1
- import { Ct as integerOf, V as text, c as bool, g as decimalParts, k as map, t as HostError, wt as isInteger } from "./errors-DHwz1Vho.js";
2
- import { r as registerStandardChecks, u as ScriptError, vt as defineCapability, xt as shape } from "./encoding-DWlbPq-e.js";
3
- import { c as fixed, s as costOf } from "./store-capability-CDoVafZL.js";
1
+
2
+ import { K as text, M as map, Ot as integerOf, kt as isInteger, t as HostError, u as bool, v as decimalParts } from "./errors-LYJZ_c8h.js";
3
+ import { a as defineValueCapability, u as shape } from "./capabilities-CH0FkRMq.js";
4
+ import { i as ScriptError } from "./base64-DORMd3Hv.js";
5
+ import { r as registerStandardChecks } from "./encoding-nlrpj-Pb.js";
6
+ import { c as fixed, s as costOf } from "./store-capability-OZp4hXmj.js";
4
7
  //#region src/locale-tag.ts
5
8
  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;
6
9
  const alpha = /^[a-z]+$/i;
@@ -176,7 +179,7 @@ const localeCapability = (impl, costs) => {
176
179
  add("monthNames", [], textList, (call, _args, opts, tag) => impl.monthNames(call, opts, tag), nameDefaults, (value) => value.length === 12);
177
180
  add("dayNames", [], textList, (call, _args, opts, tag) => impl.dayNames(call, opts, tag), nameDefaults, (value) => value.length === 7);
178
181
  add("tag", [], shape.text, (call, _args, _opts, tag) => impl.tag(call, tag), void 0, (value) => wellFormedLocale(value.asText()));
179
- return fixed(defineCapability("locale", operations));
182
+ return fixed(defineValueCapability("locale", operations));
180
183
  };
181
184
  //#endregion
182
185
  //#region src/user-capability.ts
@@ -267,7 +270,7 @@ const userCapability = (impl, costs) => {
267
270
  result: chosen
268
271
  } : {}
269
272
  });
270
- return fixed(defineCapability("user", operations));
273
+ return fixed(defineValueCapability("user", operations));
271
274
  };
272
275
  //#endregion
273
276
  export { localeCapability as n, userCapability as t };
package/wasm.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { $t as shape, At as Call, Bt as ImmediateOp, C as Requested, Ct as HostObject, D as Settlement, Dt as PropDef, Et as ObjectKindDef, Ft as ErrorDecl, Gt as ScopeDecl, Ht as Operation, It as FieldShape, Jt as SegmentGrant, Kt as SegmentContext, Lt as FireOp, Mt as CoordinatedLifecycle, N as LibrarySource, Nt as Cost, O as Verdict, P as OperationRef, Pt as EffectResult, Rt as Grant, S as Report, St as parseInstant, T as RestoreResult, Tt as ObjectKind, Ut as ReleaseHook, Vt as LimitReached, Wt as ReleaseReason, Xt as Shape, Yt as SegmentLifecycle, Zt as SuspendingOp, _ as LoadOptions, _t as range, an as ScriptError, at as Value, b as PumpOptions, bt as text, c as CancellationOptions, ct as civilDate, d as Decided, en as HostError, f as Deciding, ft as list, g as Inspection, gt as quantity, h as GroupOptions, ht as num, in as MailboxFull, it as Kind, j as Library, jt as CapabilityDef, kt as GrantDecls, l as CarryOver, lt as dec, mt as nothing, nn as LoadDiagnostic, ot as bool, p as EffectFailure, pt as map, qt as SegmentCoordinator, rn as LoadError, rt as Decimal, st as bytes, tn as HostErrorCode, u as Counters, ut as instant, v as Message, vt as record, w as RestoreOptions, x as PumpResult, xt as formatInstant, y as PendingCall, zt as GrantContext } from "./debug-D8Z_u244.js";
2
- import { a as ManifestSpec, c as decodeJson, i as readDisplay, l as encodeJson, n as Json, o as MessageDecl, r as decodeValue, s as exportManifest, u as encodeValue } from "./readers-Oh4tO2dK.js";
3
- import { a as SqliteImpl, d as Costs, f as TimerImpl, i as SqliteBinding, l as CalendarImpl, n as SqlRows, r as SqlValue, s as LocaleImpl, t as SqlParams, u as ConsoleImpl } from "./sqlite-capability-C7-SYdD7.js";
4
- import { i as add, r as StoreImpl, t as UserImpl } from "./user-capability-CLkDsrCX.js";
1
+
2
+ import { An as Outcome, At as ImmediateOp, B as CausalWork, Bt as SegmentCoordinator, C as Requested, Cn as LibrarySource, Ct as Cost, Dt as FireOp, Et as FieldShape, Ft as PlainResult, G as Decimal, Gn as LoadError, Gt as defineCapability, H as RunAncestry, Hn as HostError, Ht as SegmentLifecycle, It as ReleaseHook, J as bool, Jn as SendFailedReason, Jt as Group, K as Kind, Kn as MailboxFull, Kt as shape, L as Verdict, Lt as ReleaseReason, M as Settlement, Mt as Operation, Nt as Operations, On as LimitName, Ot as Grant, Pt as PlainArg, Q as instant, Qt as HttpImpl, Rt as ScopeDecl, S as Report, St as CoordinatedLifecycle, T as RestoreResult, Tt as ErrorDecl, U as RunDiscarded, Un as HostErrorCode, Ut as Shape, V as RunAccounting, Vt as SegmentGrant, W as RunStarted, Wn as LoadDiagnostic, Wt as SuspendingOp, X as civilDate, Xt as Versions, Y as bytes, Yt as Script, Z as dec, _ as Message, an as SqlParams, at as range, b as PumpResult, bt as CapabilityDef, c as CancellationOptions, cn as SqliteBinding, ct as text, d as Decided, dn as LocaleImpl, dt as parseInstant, en as UserImpl, et as list, f as Deciding, ft as HostObject, g as LoadOptions, gn as TimerImpl, gt as PropDef, h as Inspection, hn as Costs, ht as ObjectKindDef, it as quantity, jt as LimitReached, kn as Limits, kt as GrantContext, l as CarryOver, ln as SqliteImpl, lt as formatInstant, m as GroupOptions, mn as ConsoleImpl, mt as ObjectKind, nn as StoreImpl, nt as nothing, on as SqlRows, ot as record, p as EffectFailure, pn as CalendarImpl, pt as ObjectElements, q as Value, qn as ScriptError, qt as Core, rn as add, rt as num, sn as SqlValue, tt as map, u as Counters, ut as nowMicros, v as PendingCall, vt as GrantDecls, w as RestoreOptions, wn as OperationRef, wt as EffectResult, x as PumpedRequest, xn as Library, xt as CapabilityDefiner, y as PumpOptions, yt as Call, zt as SegmentContext } from "./debug-CQBxKnJB.js";
3
+ import { a as encodeJson, c as PlainValue, d as toValue, f as talk, i as decodeJson, l as ToValueOptions, n as MessageDecl, o as encodeValue, r as exportManifest, s as FromValueOptions, t as ManifestSpec, u as fromValue } from "./manifest-BscyH_rW.js";
4
+ import { a as decodeValue, n as Json, o as readDisplay } from "./readers-BFPuosPk.js";
5
+ import { t as BinaryValueOptions } from "./binary-value-CEmh60GC.js";
5
6
  //#region src/wasm/reactor.d.ts
6
7
  /** Text the reactor writes to stdout or stderr, such as a fatal error. */
7
8
  type Diagnostics = (line: string) => void;
@@ -13,8 +14,10 @@ declare class Reactor {
13
14
  #private;
14
15
  /** Synchronous: the module is compiled once, by createCore. */
15
16
  constructor(module: WebAssembly.Module, diagnostics: Diagnostics);
16
- /** One frame of JSON in, its reply out. */
17
+ /** One JSON frame, retained for Hosts speaking only JSON. */
17
18
  frame(json: string): string;
19
+ /** One mixed-transport frame; copy the reply before another export can run. */
20
+ frameBytes(bytes: Uint8Array): ArrayBuffer;
18
21
  /** The instance's linear memory, in bytes. */
19
22
  memoryBytes(): number;
20
23
  }
@@ -23,22 +26,19 @@ declare class Reactor {
23
26
  declare const raw: unique symbol;
24
27
  /** Text already in JSON, such as a Value Encoding, placed in a frame as is. */
25
28
  declare class Raw {
26
- readonly json: string;
29
+ private source;
30
+ readonly value?: Value | undefined;
27
31
  readonly [raw] = true;
28
- constructor(json: string);
32
+ /** `value`, when given, is the Value `json` encodes. */
33
+ constructor(source: string | (() => string), value?: Value | undefined);
34
+ /** Binary frames use `value` directly; only JSON frames need its encoding. */
35
+ get json(): string;
29
36
  }
30
37
  type Frame = null | boolean | number | string | Raw | readonly Frame[] | {
31
38
  readonly [key: string]: Frame | undefined;
32
39
  };
33
40
  //#endregion
34
41
  //#region src/wasm/session.d.ts
35
- type Versions = {
36
- core: string;
37
- costModel: string;
38
- language: string;
39
- saveFormat: string;
40
- unicode: string;
41
- };
42
42
  /** Answers one interim need with its `…-result` fields. */
43
43
  type NeedHandler = (need: Json, packet: Json) => Record<string, Frame>;
44
44
  /** Sees every reply of an exchange, interim ones included. */
@@ -55,13 +55,18 @@ declare class Session {
55
55
  readonly versions: Versions;
56
56
  /** Whether the guest accepts Object Collection declarations. */
57
57
  readonly elements: boolean;
58
- constructor(module: WebAssembly.Module, diagnostics: Diagnostics, registry: Registry);
58
+ readonly requestPump: boolean;
59
+ readonly callbacks: boolean;
60
+ nextToken(): Raw;
61
+ constructor(module: WebAssembly.Module, diagnostics: Diagnostics, registry: Registry, binaryCallbacks?: boolean);
59
62
  /**
60
63
  * One complete exchange: the message, then every need answered under its
61
64
  * ref, until the final reply. Returns its `ok`, or throws its `err`.
62
65
  * A callback may start other exchanges meanwhile, under their own refs.
63
66
  */
64
67
  exchange(m: string, fields: Record<string, Frame | undefined>, answer?: NeedHandler, observe?: Observer): Json;
68
+ /** Resolves binary callback Values as the Group that owns this guest does. */
69
+ bind(values: BinaryValueOptions): void;
65
70
  /** The guest's handle for a Capability, declared on first use. */
66
71
  define(def: CapabilityDef<unknown>): string;
67
72
  /** The guest's handle for a Grant, made on first use. */
@@ -94,7 +99,7 @@ type GroupOptions$1 = {
94
99
  trace?: (line: string) => void;
95
100
  };
96
101
  /** A handle for calls addressed to one Script. */
97
- export declare class WasmScript {
102
+ export declare class WasmScript implements Script {
98
103
  private readonly group;
99
104
  readonly name: string;
100
105
  constructor(group: WasmGroup, name: string);
@@ -102,6 +107,9 @@ export declare class WasmScript {
102
107
  counters(): Counters;
103
108
  deliver(m: Message): string;
104
109
  request(m: Message, o?: CancellationOptions): Requested;
110
+ requestPump(m: Message, now: bigint, o?: PumpOptions & CancellationOptions): PumpedRequest;
111
+ /** Queued. A Request for the answer only; use `request` for its id or a signal. */
112
+ invoke(name: string, ...args: Value[]): Promise<Value>;
105
113
  decide(m: Message, o?: CancellationOptions): Deciding;
106
114
  reload(source: string, carry: CarryOver, o?: {
107
115
  keepMailbox?: boolean;
@@ -112,7 +120,7 @@ export declare class WasmScript {
112
120
  rewindRun(runId: string): void;
113
121
  revoke(grantName: string): void;
114
122
  }
115
- export declare class WasmGroup {
123
+ export declare class WasmGroup implements Group {
116
124
  #private;
117
125
  readonly name: string;
118
126
  /** @internal Made by WasmCore. */
@@ -121,12 +129,14 @@ export declare class WasmGroup {
121
129
  save: Uint8Array;
122
130
  });
123
131
  /** @internal One exchange for this Group, its needs answered here. */
124
- send(m: string, fields?: Record<string, Frame | undefined>): Json;
132
+ send(m: string, fields?: Record<string, Frame | undefined>, receive?: (packet: Json) => void): Json;
125
133
  /**
126
134
  * A worker call. Made from a callback, the guest refuses it as
127
135
  * `reentrant call`, with its refusal record, as the in-process Core does.
128
136
  */
129
137
  worker(m: string, fields?: Record<string, Frame | undefined>): Json;
138
+ /** @internal Message data shared with the Script combined operation. */
139
+ messageFrame(m: Message): Frame;
130
140
  /** @internal */
131
141
  queue(m: string, fields: Record<string, Frame | undefined>, message?: Message): string;
132
142
  /** @internal */
@@ -148,6 +158,12 @@ export declare class WasmGroup {
148
158
  dispose(o: HostObject): void;
149
159
  deliver(to: HostObject, m: Message): string;
150
160
  request(to: HostObject, m: Message, o?: CancellationOptions): Requested;
161
+ requestPump(to: HostObject, m: Message, now: bigint, o?: PumpOptions & CancellationOptions): PumpedRequest;
162
+ callPump(fn: Value, args: Value[], now: bigint, o?: PumpOptions & CancellationOptions & {
163
+ limits?: Message['limits'];
164
+ }): PumpedRequest;
165
+ /** @internal Shared by Script and Object targets. No fallback on old guests. */
166
+ combined(m: string, fields: () => Record<string, Frame | undefined>, now: bigint, o?: PumpOptions & CancellationOptions): PumpedRequest;
151
167
  broadcast(m: Message): string;
152
168
  decide(to: HostObject, m: Message, o?: CancellationOptions): Deciding;
153
169
  decideBroadcast(m: Message, o?: CancellationOptions): Deciding;
@@ -171,18 +187,21 @@ export declare class WasmGroup {
171
187
  /** Where `talk.wasm` comes from. A URL or path is fetched; `file:` URLs are read. */
172
188
  type WasmSource = WebAssembly.Module | BufferSource | Response | PromiseLike<Response> | URL | string;
173
189
  type CoreOptions = {
190
+ /** Request binary callbacks when offered. False keeps JSON for compatibility checks. */
191
+ binaryCallbacks?: boolean;
174
192
  /** Lines the reactor writes to stdout or stderr. Defaults to console.warn. */
175
193
  diagnostics?: (line: string) => void;
176
194
  /** The reactor. Defaults to `talk.wasm` beside this module. */
177
195
  wasm?: WasmSource;
178
196
  };
179
- export declare class WasmCore {
197
+ export declare class WasmCore implements Core {
180
198
  #private;
199
+ private readonly binaryCallbacks;
181
200
  /** The reactor's `hello`: its Core, language, Cost Model, Unicode and save format. */
182
201
  readonly versions: Versions;
183
202
  /** @internal Use createCore. */
184
- constructor(module: WebAssembly.Module, diagnostics: (line: string) => void);
185
- defineCapability: <B = void>(name: string, ops: Record<string, Operation<B>>, lifecycle?: SegmentLifecycle<B> | CoordinatedLifecycle<B>, release?: ReleaseHook<B>) => CapabilityDef<B>;
203
+ constructor(module: WebAssembly.Module, diagnostics: (line: string) => void, binaryCallbacks?: boolean);
204
+ defineCapability: typeof defineCapability;
186
205
  clockCapability: (costs: Costs) => CapabilityDef<void>;
187
206
  calendarCapability: (impl: CalendarImpl, costs: Costs) => CapabilityDef<string>;
188
207
  localeCapability: (impl: LocaleImpl, costs: Costs) => CapabilityDef<string>;
@@ -191,6 +210,7 @@ export declare class WasmCore {
191
210
  storeCapability: (impl: StoreImpl, costs: Costs) => CapabilityDef<string>;
192
211
  sqliteCapability: (impl: SqliteImpl, costs: Costs, perRow: number) => CapabilityDef<SqliteBinding>;
193
212
  userCapability: (impl: UserImpl, costs: Costs) => CapabilityDef<unknown>;
213
+ httpCapability: (impl: HttpImpl, costs: Costs) => CapabilityDef<unknown>;
194
214
  defineObjectKind<N>(k: ObjectKindDef<N>): ObjectKind<N>;
195
215
  /** Checked in a guest the Core keeps; each Group's guest compiles it again when added. */
196
216
  compileLibrary(src: LibrarySource, imports?: Library[], declarations?: GrantDecls): Library;
@@ -220,4 +240,4 @@ export declare const defaultLimits: Readonly<{
220
240
  cleanupBudget: number;
221
241
  }>;
222
242
  //#endregion
223
- export { type CalendarImpl, type Call, type CancellationOptions, type CapabilityDef, type CarryOver, type ConsoleImpl, type CoordinatedLifecycle, type WasmCore as Core, type CoreOptions, type Cost, type Costs, type Counters, type Decided, type Deciding, Decimal, type EffectFailure, type EffectResult, type ErrorDecl, type FieldShape, type FireOp, type Grant, type GrantContext, type GrantDecls, type WasmGroup as Group, type GroupOptions, HostError, type HostErrorCode, type HostObject, type ImmediateOp, type Inspection, type Kind, type Library, type LibrarySource, LimitReached, type LoadDiagnostic, LoadError, type LoadOptions, type LocaleImpl, MailboxFull, type ManifestSpec, type Message, type MessageDecl, type ObjectKind, type ObjectKindDef, type Operation, type OperationRef, type PendingCall, type PropDef, type PumpOptions, type PumpResult, type ReleaseHook, type ReleaseReason, type Report, type Requested, type RestoreOptions, type RestoreResult, type ScopeDecl, type WasmScript as Script, ScriptError, type SegmentContext, type SegmentCoordinator, type SegmentGrant, type SegmentLifecycle, type Settlement, type Shape, type SqlParams, type SqlRows, type SqlValue, type SqliteBinding, type SqliteImpl, type StoreImpl, type SuspendingOp, type TimerImpl, type UserImpl, Value, type Verdict, type Versions, type WasmSource, add, bool, bytes, civilDate, dec, decodeJson, decodeValue, encodeJson, encodeValue, exportManifest, formatInstant, instant, list, map, nothing, num, parseInstant, quantity, range, readDisplay, record, shape, text };
243
+ export { type CalendarImpl, type Call, type CancellationOptions, type CapabilityDef, type CapabilityDefiner, type CarryOver, type CausalWork, type ConsoleImpl, type CoordinatedLifecycle, type Core, type CoreOptions, type Cost, type Costs, type Counters, type Decided, type Deciding, Decimal, type EffectFailure, type EffectResult, type ErrorDecl, type FieldShape, type FireOp, type FromValueOptions, type Grant, type GrantContext, type GrantDecls, type Group, type GroupOptions, HostError, type HostErrorCode, type HostObject, type HttpImpl, type ImmediateOp, 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 ObjectElements, type ObjectKind, type ObjectKindDef, type Operation, type OperationRef, type Operations, type Outcome, 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 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, dec, decodeJson, decodeValue, encodeJson, encodeValue, exportManifest, formatInstant, fromValue, instant, list, map, nothing, nowMicros, num, parseInstant, quantity, range, readDisplay, record, shape, talk, text, toValue };