@northtalk/ts 0.9.0 → 0.11.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.
- package/{binary-value-B93hEK7l.d.ts → binary-value-np-QZCfn.d.ts} +1 -1
- package/{checker-D74oYIhs.js → checker-hkWO1UbN.js} +1 -1
- package/{core-BBPI6EhG.d.ts → core-kBXyAo-m.d.ts} +1 -1
- package/{debug-s6QIovKS.d.ts → debug-fthW6KN8.d.ts} +15 -1
- package/debug.d.ts +1 -1
- package/{driver-D5yrK3Nu.d.ts → driver-DtOBRKiH.d.ts} +1 -1
- package/driver.d.ts +1 -1
- package/{encoding-DzVFpg7k.js → encoding-DlMqlP2Y.js} +1 -1
- package/{engine-Dy-BCoiw.d.ts → engine-BoafZGEv.d.ts} +2 -2
- package/{engine-Bx8B63iQ.js → engine-CxcONfhv.js} +4 -4
- package/{group-CY4FKhzT.js → group-dgTtB1Pi.js} +179 -97
- package/{http-fetch-DnpfiOWK.js → http-fetch-CLAeEXVi.js} +1 -1
- package/http.d.ts +1 -1
- package/http.js +2 -2
- package/index.d.ts +4 -4
- package/index.js +11 -11
- package/{lean-Bg_UTRj0.d.ts → lean-BAz1NuyP.d.ts} +2 -2
- package/{lean-DTCTJUmR.js → lean-BwszbUJl.js} +8 -8
- package/lean.d.ts +4 -4
- package/lean.js +11 -11
- package/{manifest-DVS1SEmN.js → manifest-CRpUahPt.js} +2 -2
- package/message-layer.d.ts +2 -2
- package/message-layer.js +1 -1
- package/notify.d.ts +1 -1
- package/notify.js +1 -1
- package/{objects-q0lnCK-4.d.ts → objects-Cpc3eO-f.d.ts} +1 -1
- package/{operations-B3XaG7Ve.js → operations-DrsedOvj.js} +3 -3
- package/package.json +1 -1
- package/{peer-capability-3etyPHs3.js → peer-capability-RMdN4OHj.js} +2 -2
- package/peer.d.ts +1 -1
- package/peer.js +2 -2
- package/{readers-AeB1bJ--.d.ts → readers-DW4pUrD-.d.ts} +1 -1
- package/{request-pump-binary-VOPVqRZD.js → request-pump-binary-P8m6kLfB.js} +229 -51
- package/{router-Bdm4KiMG.js → router-C_Fjc2as.js} +4 -4
- package/{router-DXoJ_2Z4.d.ts → router-D6b7VJ92.d.ts} +2 -2
- package/session.d.ts +2 -2
- package/session.js +21 -17
- package/setup.d.ts +2 -2
- package/setup.js +3 -3
- package/sha256-C5Lqj5U7.js +197 -0
- package/sqlite.d.ts +2 -2
- package/sqlite.js +3 -3
- package/{store-BTcyKBLg.js → store-_af2DPoK.js} +2 -2
- package/{store-capability-CBJ6mUoH.js → store-capability-Db6v_dw9.js} +2 -2
- package/store.d.ts +2 -2
- package/store.js +2 -2
- package/{user-capability-DNY2dyjq.js → user-capability-CzoLN3RK.js} +2 -2
- package/wasm.d.ts +15 -4
- package/wasm.js +119 -46
- package/{zone-rules-DsCJtmlC.js → zone-rules-Cn-f9u_Z.js} +3 -3
- package/sha256-9CGf5BS_.js +0 -168
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import { $ as smallCoefficient, Dt as integerOf, H as num, Ht as civilFromFields, J as range, Jt as isInstant, K as quantity, L as map, O as instantOf$1, Ot as isInteger, P as listValues, R as mapLayout, S as displayText, T as functionsBelongTo, V as nothing, X as requireArgs, Z as requireValue, _ as civilOf, a as hostDetail, b as dec, d as bytes, f as bytesOf, ft as parseUnit, gn as libraryExports, h as canonicalNumber, hn as grammar, i as ScriptError, it as text, l as Value, mn as diagnosticCodes, n as LoadError, pn as builtins, q as quantityOf, qt as formatInstant, r as MailboxFull, s as sendFailed, t as HostError, tt as smallExponent, u as bool, w as functionValue, x as decimalParts, z as mapOfLayout } from "./errors-CNc-xY_9.js";
|
|
3
3
|
import { a as rebindObject, i as propertyChecks, n as makeObject, o as stateOf$1, r as objectKind } from "./objects-OKVLH190.js";
|
|
4
|
-
import { $ as arityOf, A as musicalCount, At as validMessageSelector, B as splice, C as isKind, D as matchCaptures, E as makeRange, F as randomBound, G as cacheBuild, H as textForm, I as search, J as keysContents, K as charge, L as setKey, M as outOfRange, N as prepareConversion, O as matchesOf, Ot as shapeDiagnostics, P as property, Pt as runTask, Q as sizeOf, R as smallArithmetic, S as isEmpty, St as diagnosticRecord, T as makePatternValue, Tt as mismatch, U as waitUs, V as subjectText, W as wrongKind, X as rateOf, Y as partSize, Z as resetMeasured, _ as deleteKey, _t as acceptsArgumentCount, a as builtin, at as numberText, b as hasKey, c as canConvert, ct as splicesOf, d as chunkSet, dt as costModel, f as chunkThere, ft as errorMessages, g as decodeUtf8, h as convert, ht as reservedErrorKeys, i as arithmetic, it as capturesOf, j as negated, k as member, kt as validComputedMessageName, l as chunkDelete, lt as textDisplay, m as concat, mt as limitDefaults, n as ScriptError$1, nt as instructionSpec, o as builtinDefaults, ot as patternSource, p as comparison, pt as languageVersion, q as fixedRates, r as appendTo, rt as opcodes, s as byteOf, st as quantityText, t as NotImplementedError, tt as functionHead, u as chunkGet, ut as compareText, v as equals, w as keyText, x as integerValue, y as getKey, yt as decodeShape, z as smallCoefficientOf } from "./operations-
|
|
5
|
-
import { _ as viewSource, d as operationUses, g as checkDecisionCalls, n as checkSourceForLoad, t as checkSource, u as checkEffectCall } from "./checker-
|
|
6
|
-
import { a as operationsOf, c as CallMeter, r as grantData, s as invoke, t as canonicalJSON } from "./manifest-
|
|
4
|
+
import { $ as arityOf, A as musicalCount, At as validMessageSelector, B as splice, C as isKind, D as matchCaptures, E as makeRange, F as randomBound, G as cacheBuild, H as textForm, I as search, J as keysContents, K as charge, L as setKey, M as outOfRange, Mt as Lexer, N as prepareConversion, O as matchesOf, Ot as shapeDiagnostics, P as property, Pt as runTask, Q as sizeOf, R as smallArithmetic, S as isEmpty, St as diagnosticRecord, T as makePatternValue, Tt as mismatch, U as waitUs, V as subjectText, W as wrongKind, X as rateOf, Y as partSize, Z as resetMeasured, _ as deleteKey, _t as acceptsArgumentCount, a as builtin, at as numberText, b as hasKey, c as canConvert, ct as splicesOf, d as chunkSet, dt as costModel, f as chunkThere, ft as errorMessages, g as decodeUtf8, h as convert, ht as reservedErrorKeys, i as arithmetic, it as capturesOf, j as negated, k as member, kt as validComputedMessageName, l as chunkDelete, lt as textDisplay, m as concat, mt as limitDefaults, n as ScriptError$1, nt as instructionSpec, o as builtinDefaults, ot as patternSource, p as comparison, pt as languageVersion, q as fixedRates, r as appendTo, rt as opcodes, s as byteOf, st as quantityText, t as NotImplementedError, tt as functionHead, u as chunkGet, ut as compareText, v as equals, w as keyText, x as integerValue, y as getKey, yt as decodeShape, z as smallCoefficientOf } from "./operations-DrsedOvj.js";
|
|
5
|
+
import { _ as viewSource, d as operationUses, g as checkDecisionCalls, n as checkSourceForLoad, t as checkSource, u as checkEffectCall } from "./checker-hkWO1UbN.js";
|
|
6
|
+
import { a as operationsOf, c as CallMeter, r as grantData, s as invoke, t as canonicalJSON } from "./manifest-CRpUahPt.js";
|
|
7
7
|
import { n as trackOperation } from "./operation-promises-ClA1BTaS.js";
|
|
8
8
|
import { c as readDisplay } from "./readers-G1lHqrPl.js";
|
|
9
|
-
import { l as isMusicalClock, p as standardChecks, r as MUSICAL_CLOCK } from "./encoding-
|
|
10
|
-
import { r as PEER_POST, t as PEER_CALL } from "./peer-capability-
|
|
11
|
-
import { n as sha256, r as sha256Bytes, t as Sha256 } from "./sha256-
|
|
9
|
+
import { l as isMusicalClock, p as standardChecks, r as MUSICAL_CLOCK } from "./encoding-DlMqlP2Y.js";
|
|
10
|
+
import { r as PEER_POST, t as PEER_CALL } from "./peer-capability-RMdN4OHj.js";
|
|
11
|
+
import { n as sha256, r as sha256Bytes, t as Sha256 } from "./sha256-C5Lqj5U7.js";
|
|
12
12
|
//#region src/stdlib-registry.ts
|
|
13
13
|
/** The seven stdlib Library names, which a Host may not register. */
|
|
14
14
|
const stdlibNames = new Set(libraryExports.map((entry) => entry.library));
|
|
@@ -7170,7 +7170,46 @@ const identityOf = (l) => compiled.get(l).hex;
|
|
|
7170
7170
|
const codeOf = (l) => compiled.get(l).code;
|
|
7171
7171
|
/** The code of the Libraries a unit imports, by name, to link it to. */
|
|
7172
7172
|
const linksOf = (imports) => new Map(imports.map((l) => [l.name, codeOf(l)]));
|
|
7173
|
-
|
|
7173
|
+
/**
|
|
7174
|
+
* Where a unit's diagnostic ranges end (chapter 2, Syntax errors): at the end
|
|
7175
|
+
* of the token a diagnostic is reported at, in lines and scalar columns. A
|
|
7176
|
+
* line end and the end of the source give an empty range, and so does a
|
|
7177
|
+
* position no token of `tree` starts at.
|
|
7178
|
+
*/
|
|
7179
|
+
const rangesOf = (source, tree = null) => {
|
|
7180
|
+
let lexer;
|
|
7181
|
+
let starts;
|
|
7182
|
+
const of = (span) => {
|
|
7183
|
+
if (span.end <= span.start || /^[\n\r]+$/u.test(source.slice(span.start, span.end))) return {
|
|
7184
|
+
endLine: span.line,
|
|
7185
|
+
endCol: span.col
|
|
7186
|
+
};
|
|
7187
|
+
lexer ??= new Lexer(source);
|
|
7188
|
+
const end = lexer.where(span.end);
|
|
7189
|
+
return {
|
|
7190
|
+
endLine: end.line,
|
|
7191
|
+
endCol: end.col
|
|
7192
|
+
};
|
|
7193
|
+
};
|
|
7194
|
+
const at = (line, col) => {
|
|
7195
|
+
if (!starts) {
|
|
7196
|
+
starts = /* @__PURE__ */ new Map();
|
|
7197
|
+
const work = tree ? [tree.root] : [];
|
|
7198
|
+
while (work.length) for (const child of work.pop().children) if (child.kind === "node") work.push(child);
|
|
7199
|
+
else if (child.span.end > child.span.start) starts.set(`${child.span.line}:${child.span.col}`, child.span);
|
|
7200
|
+
}
|
|
7201
|
+
const span = starts.get(`${line}:${col}`);
|
|
7202
|
+
return span ? of(span) : {
|
|
7203
|
+
endLine: line,
|
|
7204
|
+
endCol: col
|
|
7205
|
+
};
|
|
7206
|
+
};
|
|
7207
|
+
return {
|
|
7208
|
+
at,
|
|
7209
|
+
of
|
|
7210
|
+
};
|
|
7211
|
+
};
|
|
7212
|
+
const diagnosticsOf = (checked, unit, ranges) => {
|
|
7174
7213
|
if (checked.error) {
|
|
7175
7214
|
const { code, tok, message } = checked.error;
|
|
7176
7215
|
return [{
|
|
@@ -7178,7 +7217,13 @@ const diagnosticsOf = (checked, unit) => {
|
|
|
7178
7217
|
message,
|
|
7179
7218
|
unit,
|
|
7180
7219
|
line: tok.line,
|
|
7181
|
-
col: tok.col
|
|
7220
|
+
col: tok.col,
|
|
7221
|
+
...ranges.of({
|
|
7222
|
+
start: tok.pos,
|
|
7223
|
+
end: tok.end,
|
|
7224
|
+
line: tok.line,
|
|
7225
|
+
col: tok.col
|
|
7226
|
+
})
|
|
7182
7227
|
}];
|
|
7183
7228
|
}
|
|
7184
7229
|
if (!checked.ok) return checked.diagnostics.map((d) => ({
|
|
@@ -7186,12 +7231,13 @@ const diagnosticsOf = (checked, unit) => {
|
|
|
7186
7231
|
message: d.message,
|
|
7187
7232
|
unit,
|
|
7188
7233
|
line: d.span.line,
|
|
7189
|
-
col: d.span.col
|
|
7234
|
+
col: d.span.col,
|
|
7235
|
+
...ranges.of(d.span)
|
|
7190
7236
|
}));
|
|
7191
7237
|
return null;
|
|
7192
7238
|
};
|
|
7193
7239
|
/** Check a Library's original call sites in the importing Script's context. */
|
|
7194
|
-
const checkLibraryNeeds = (name, root, available, grants) => {
|
|
7240
|
+
const checkLibraryNeeds = (name, root, available, grants, ranges) => {
|
|
7195
7241
|
const diagnostics = [];
|
|
7196
7242
|
const uses = new Map(viewSource(root, (declaration) => declaration.rule === "Use").flatMap((d) => d.k === "use" ? [[d.imports[0].local.span.line, d.library]] : []));
|
|
7197
7243
|
const work = [root];
|
|
@@ -7205,6 +7251,7 @@ const checkLibraryNeeds = (name, root, available, grants) => {
|
|
|
7205
7251
|
const library = available.get(uses.get(use.span.line) ?? "");
|
|
7206
7252
|
if (!library) continue;
|
|
7207
7253
|
const missing = /* @__PURE__ */ new Set();
|
|
7254
|
+
const end = ranges.at(use.span.line, use.span.col);
|
|
7208
7255
|
for (const site of compiled.get(library).sites) {
|
|
7209
7256
|
const reference = `${site.capability}.${site.operation}`;
|
|
7210
7257
|
const report = (code) => diagnostics.push({
|
|
@@ -7212,6 +7259,7 @@ const checkLibraryNeeds = (name, root, available, grants) => {
|
|
|
7212
7259
|
unit: name,
|
|
7213
7260
|
line: use.span.line,
|
|
7214
7261
|
col: use.span.col,
|
|
7262
|
+
...end,
|
|
7215
7263
|
message: `${code}: ${reference} at ${site.unit}:${site.node.span.line}:${site.node.span.col}`
|
|
7216
7264
|
});
|
|
7217
7265
|
const operations = Object.hasOwn(grants, site.capability) ? grants[site.capability] : void 0;
|
|
@@ -7240,18 +7288,20 @@ const prepare = (unit, name, source, available, objects, grants, existing, prope
|
|
|
7240
7288
|
libraries: Object.fromEntries([...available.values()].map((l) => [l.name, compiled.get(l).exports])),
|
|
7241
7289
|
stdlib: registeredStdlib
|
|
7242
7290
|
});
|
|
7243
|
-
const
|
|
7244
|
-
|
|
7291
|
+
const ranges = rangesOf(source, checked.tree);
|
|
7292
|
+
const diagnostics = diagnosticsOf(checked, name, ranges) ?? [];
|
|
7293
|
+
if (unit === "script" && grants && checked.tree) diagnostics.push(...checkLibraryNeeds(name, checked.tree.root, available, grants, ranges));
|
|
7245
7294
|
const imports = (checked.tree ? importsOf(checked.tree) : []).flatMap((n) => available.get(n) ?? (registeredStdlib.has(n) ? [stdlibLibrary(n)] : []));
|
|
7246
7295
|
return {
|
|
7247
7296
|
checked,
|
|
7248
7297
|
diagnostics: diagnostics.length ? diagnostics.sort((a, b) => a.line - b.line || a.col - b.col || diagnosticCodes.indexOf(a.code) - diagnosticCodes.indexOf(b.code)) : null,
|
|
7249
7298
|
imports,
|
|
7250
|
-
identity: codeIdentity(unit, name, source, imports.map(identityOf))
|
|
7299
|
+
identity: codeIdentity(unit, name, source, imports.map(identityOf)),
|
|
7300
|
+
ranges
|
|
7251
7301
|
};
|
|
7252
7302
|
};
|
|
7253
7303
|
/** Lower a checked unit, turning a failure to load into its diagnostic. */
|
|
7254
|
-
const loadOrReject = (name, load) => {
|
|
7304
|
+
const loadOrReject = (name, ranges, load) => {
|
|
7255
7305
|
try {
|
|
7256
7306
|
return load();
|
|
7257
7307
|
} catch (error) {
|
|
@@ -7260,7 +7310,8 @@ const loadOrReject = (name, load) => {
|
|
|
7260
7310
|
message: error.message,
|
|
7261
7311
|
unit: name,
|
|
7262
7312
|
line: error.line,
|
|
7263
|
-
col: error.col
|
|
7313
|
+
col: error.col,
|
|
7314
|
+
...ranges.at(error.line, error.col)
|
|
7264
7315
|
}]);
|
|
7265
7316
|
throw error;
|
|
7266
7317
|
}
|
|
@@ -7300,7 +7351,7 @@ const build = (src, imports, isStdlib, declarations = {}, atCaller = false) => {
|
|
|
7300
7351
|
const tree = p.checked.tree;
|
|
7301
7352
|
entry = {
|
|
7302
7353
|
exports: exportsOf(tree),
|
|
7303
|
-
code: loadOrReject(src.name, () => loadLibrary(isStdlib ? lowerStdlibIntrinsics(lowerTree(tree, {
|
|
7354
|
+
code: loadOrReject(src.name, p.ranges, () => loadLibrary(isStdlib ? lowerStdlibIntrinsics(lowerTree(tree, {
|
|
7304
7355
|
name: src.name,
|
|
7305
7356
|
unit: "library"
|
|
7306
7357
|
})) : lowerTree(tree, {
|
|
@@ -7366,6 +7417,7 @@ const replacementLibraries = (available, replacement) => {
|
|
|
7366
7417
|
unit: replacement.name,
|
|
7367
7418
|
line,
|
|
7368
7419
|
col: 1,
|
|
7420
|
+
...p.ranges.at(line, 1),
|
|
7369
7421
|
message: "import cycle"
|
|
7370
7422
|
}]);
|
|
7371
7423
|
}
|
|
@@ -7387,6 +7439,25 @@ const replacementLibraries = (available, replacement) => {
|
|
|
7387
7439
|
};
|
|
7388
7440
|
//#endregion
|
|
7389
7441
|
//#region src/run-accounting.ts
|
|
7442
|
+
/**
|
|
7443
|
+
* Copies `a` onto `into` in `RunAncestry` key order. Run reports are built
|
|
7444
|
+
* once per turn, so they assign fields rather than spread them (#2235).
|
|
7445
|
+
*/
|
|
7446
|
+
const putAncestry = (into, a) => {
|
|
7447
|
+
into.rootDelivery = a.rootDelivery;
|
|
7448
|
+
if (a.parentRun !== void 0) into.parentRun = a.parentRun;
|
|
7449
|
+
if (a.parentCall !== void 0) into.parentCall = a.parentCall;
|
|
7450
|
+
};
|
|
7451
|
+
/** A new live Run's accounting row report, which the Group owns. */
|
|
7452
|
+
const accountingReport = (a, script, run, fuel) => {
|
|
7453
|
+
const r = { kind: "run accounting" };
|
|
7454
|
+
putAncestry(r, a);
|
|
7455
|
+
r.script = script;
|
|
7456
|
+
r.run = run;
|
|
7457
|
+
r.fuel = fuel;
|
|
7458
|
+
r.state = "live";
|
|
7459
|
+
return r;
|
|
7460
|
+
};
|
|
7390
7461
|
const emptyAccounting = () => ({
|
|
7391
7462
|
next: 0,
|
|
7392
7463
|
runs: /* @__PURE__ */ new Map(),
|
|
@@ -7401,13 +7472,18 @@ const accountingTail = (state, queued) => {
|
|
|
7401
7472
|
const live = /* @__PURE__ */ new Map();
|
|
7402
7473
|
for (const [id, row] of [...state.runs].sort((a, b) => a[1].order - b[1].order)) {
|
|
7403
7474
|
const r = row.report;
|
|
7404
|
-
if (r.state
|
|
7405
|
-
|
|
7475
|
+
if (r.state !== "live") {
|
|
7476
|
+
reports.push(r);
|
|
7477
|
+
changed.add(r.rootDelivery);
|
|
7478
|
+
state.runs.delete(id);
|
|
7479
|
+
continue;
|
|
7480
|
+
}
|
|
7481
|
+
live.set(r.rootDelivery, (live.get(r.rootDelivery) ?? 0) + 1);
|
|
7482
|
+
if (row.reportedFuel !== r.fuel) {
|
|
7406
7483
|
reports.push({ ...r });
|
|
7407
7484
|
changed.add(r.rootDelivery);
|
|
7408
7485
|
}
|
|
7409
7486
|
row.reportedFuel = r.fuel;
|
|
7410
|
-
if (r.state !== "live") state.runs.delete(id);
|
|
7411
7487
|
}
|
|
7412
7488
|
for (const [root, row] of [...state.roots].sort((a, b) => Number(a[0].slice(1)) - Number(b[0].slice(1)))) {
|
|
7413
7489
|
const r = {
|
|
@@ -11277,7 +11353,7 @@ var TsGroup = class TsGroup {
|
|
|
11277
11353
|
trace;
|
|
11278
11354
|
onReady;
|
|
11279
11355
|
scripts = [];
|
|
11280
|
-
|
|
11356
|
+
libraryMap = /* @__PURE__ */ new Map();
|
|
11281
11357
|
waits = new Waits();
|
|
11282
11358
|
functionGroup = {};
|
|
11283
11359
|
objects = /* @__PURE__ */ new Map();
|
|
@@ -11342,10 +11418,13 @@ var TsGroup = class TsGroup {
|
|
|
11342
11418
|
const parentRun = senderRun(d.from);
|
|
11343
11419
|
const parent = this.accounting.runs.get(parentRun);
|
|
11344
11420
|
if (!parent) throw new Error(`missing accounting parent ${parentRun}`);
|
|
11345
|
-
d.ancestry = {
|
|
11421
|
+
d.ancestry = d.reply ? {
|
|
11346
11422
|
rootDelivery: parent.report.rootDelivery,
|
|
11347
11423
|
parentRun,
|
|
11348
|
-
|
|
11424
|
+
parentCall: d.reply
|
|
11425
|
+
} : {
|
|
11426
|
+
rootDelivery: parent.report.rootDelivery,
|
|
11427
|
+
parentRun
|
|
11349
11428
|
};
|
|
11350
11429
|
}
|
|
11351
11430
|
}
|
|
@@ -11354,39 +11433,34 @@ var TsGroup = class TsGroup {
|
|
|
11354
11433
|
}
|
|
11355
11434
|
accountStart(s, r) {
|
|
11356
11435
|
const ancestry = this.ancestry(r.delivery);
|
|
11436
|
+
const d = r.delivery;
|
|
11357
11437
|
this.accounting.runs.set(r.id, {
|
|
11358
11438
|
order: ++this.accounting.next,
|
|
11359
|
-
report:
|
|
11360
|
-
kind: "run accounting",
|
|
11361
|
-
...ancestry,
|
|
11362
|
-
script: s.name,
|
|
11363
|
-
run: r.id,
|
|
11364
|
-
fuel: r.run.fuel,
|
|
11365
|
-
state: "live"
|
|
11366
|
-
}
|
|
11367
|
-
});
|
|
11368
|
-
this.drainReports.push({
|
|
11369
|
-
kind: "run started",
|
|
11370
|
-
...ancestry,
|
|
11371
|
-
script: s.name,
|
|
11372
|
-
run: r.id,
|
|
11373
|
-
...r.delivery.id ? { delivery: r.delivery.id } : {},
|
|
11374
|
-
...r.delivery.fn ? { fn: r.delivery.fn } : { selector: r.delivery.message },
|
|
11375
|
-
args: [...r.delivery.args]
|
|
11439
|
+
report: accountingReport(ancestry, s.name, r.id, r.run.fuel)
|
|
11376
11440
|
});
|
|
11441
|
+
const started = { kind: "run started" };
|
|
11442
|
+
putAncestry(started, ancestry);
|
|
11443
|
+
started.script = s.name;
|
|
11444
|
+
started.run = r.id;
|
|
11445
|
+
if (d.id) started.delivery = d.id;
|
|
11446
|
+
if (d.fn) started.fn = d.fn;
|
|
11447
|
+
else started.selector = d.message;
|
|
11448
|
+
started.args = d.args.slice();
|
|
11449
|
+
this.drainReports.push(started);
|
|
11377
11450
|
}
|
|
11378
11451
|
accountEnd(r, state, reason) {
|
|
11379
11452
|
const row = this.accounting.runs.get(r.id);
|
|
11380
11453
|
if (row.report.state !== "live") return;
|
|
11381
11454
|
row.report.fuel = r.run.fuel;
|
|
11382
11455
|
row.report.state = state;
|
|
11383
|
-
if (state === "discarded")
|
|
11384
|
-
kind: "run discarded"
|
|
11385
|
-
|
|
11386
|
-
script
|
|
11387
|
-
run
|
|
11388
|
-
reason
|
|
11389
|
-
|
|
11456
|
+
if (state === "discarded") {
|
|
11457
|
+
const discarded = { kind: "run discarded" };
|
|
11458
|
+
putAncestry(discarded, this.ancestry(r.delivery));
|
|
11459
|
+
discarded.script = row.report.script;
|
|
11460
|
+
discarded.run = r.id;
|
|
11461
|
+
discarded.reason = reason;
|
|
11462
|
+
this.drainReports.push(discarded);
|
|
11463
|
+
}
|
|
11390
11464
|
}
|
|
11391
11465
|
accountDrop(d) {
|
|
11392
11466
|
const a = this.ancestry(d);
|
|
@@ -11456,7 +11530,7 @@ var TsGroup = class TsGroup {
|
|
|
11456
11530
|
for (const library of code.libraries.values()) visit(library);
|
|
11457
11531
|
};
|
|
11458
11532
|
for (const s of this.scripts) for (const code of s.loaded.units) visit(code, s.name);
|
|
11459
|
-
for (const library of this.
|
|
11533
|
+
for (const library of this.libraryMap.values()) visit(codeOf(library));
|
|
11460
11534
|
return sources;
|
|
11461
11535
|
}, (body, frame) => this.debugEvaluate(body, frame));
|
|
11462
11536
|
}
|
|
@@ -11581,7 +11655,7 @@ var TsGroup = class TsGroup {
|
|
|
11581
11655
|
return hexBytes(sha256(canonicalJSON({
|
|
11582
11656
|
language: languageVersion,
|
|
11583
11657
|
costModel: costModel.version,
|
|
11584
|
-
libraries: [...this.
|
|
11658
|
+
libraries: [...this.libraryMap.values()].sort(byName).map((l) => [l.name, identityOf(l)]),
|
|
11585
11659
|
scripts
|
|
11586
11660
|
})));
|
|
11587
11661
|
}
|
|
@@ -11623,7 +11697,7 @@ var TsGroup = class TsGroup {
|
|
|
11623
11697
|
issued: this.issued,
|
|
11624
11698
|
chargeCounter: this.chargeCounter,
|
|
11625
11699
|
lastClock: this.lastClock,
|
|
11626
|
-
libraries: this.
|
|
11700
|
+
libraries: this.libraryMap,
|
|
11627
11701
|
name: this.savedName ?? this.name,
|
|
11628
11702
|
objects: this.objects,
|
|
11629
11703
|
randomState: this.randomState,
|
|
@@ -11662,8 +11736,8 @@ var TsGroup = class TsGroup {
|
|
|
11662
11736
|
save.objects.forEach((object, i) => {
|
|
11663
11737
|
objects[i].parent = object.parent === void 0 ? null : objects[object.parent];
|
|
11664
11738
|
});
|
|
11665
|
-
for (const library of o.libraries) group.
|
|
11666
|
-
let mismatch = save.libraries.some((l) => !group.
|
|
11739
|
+
for (const library of o.libraries) group.libraryMap.set(library.name, library);
|
|
11740
|
+
let mismatch = save.libraries.some((l) => !group.libraryMap.has(l.name) || identityOf(group.libraryMap.get(l.name)) !== hexOf(l.identity));
|
|
11667
11741
|
let wholeGroup = save.language !== "1.0-rc.3" || save.costModel !== costModel.version;
|
|
11668
11742
|
const changed = /* @__PURE__ */ new Set();
|
|
11669
11743
|
let loadFailure;
|
|
@@ -11739,7 +11813,7 @@ var TsGroup = class TsGroup {
|
|
|
11739
11813
|
mismatch ||= wholeGroup || changed.size > 0 || hexOf(group.fingerprint()) !== savedFingerprint;
|
|
11740
11814
|
const partial = mismatch && !wholeGroup && o.onMismatch === "reload changed";
|
|
11741
11815
|
const variablesOnly = mismatch && !partial;
|
|
11742
|
-
const withheld = save.libraries.filter((l) => !group.
|
|
11816
|
+
const withheld = save.libraries.filter((l) => !group.libraryMap.has(l.name)).map((l) => l.name);
|
|
11743
11817
|
const restoreLine = (result) => recordLine("restore", [], [
|
|
11744
11818
|
["from", saveId],
|
|
11745
11819
|
["mismatch", o.onMismatch === "variables only" ? "variables-only" : o.onMismatch === "reload changed" ? "reload-changed" : null],
|
|
@@ -12096,14 +12170,7 @@ var TsGroup = class TsGroup {
|
|
|
12096
12170
|
});
|
|
12097
12171
|
this.accounting.runs.set(rec.id, {
|
|
12098
12172
|
order: rec.order,
|
|
12099
|
-
report:
|
|
12100
|
-
kind: "run accounting",
|
|
12101
|
-
...this.ancestry(r.delivery),
|
|
12102
|
-
script: script.name,
|
|
12103
|
-
run: rec.id,
|
|
12104
|
-
fuel: rec.fuel,
|
|
12105
|
-
state: "live"
|
|
12106
|
-
}
|
|
12173
|
+
report: accountingReport(this.ancestry(r.delivery), script.name, rec.id, rec.fuel)
|
|
12107
12174
|
});
|
|
12108
12175
|
markRest(r, {
|
|
12109
12176
|
fuel: rec.segmentFuel,
|
|
@@ -13170,6 +13237,14 @@ var TsGroup = class TsGroup {
|
|
|
13170
13237
|
scriptNames() {
|
|
13171
13238
|
return this.scripts.map((s) => s.name);
|
|
13172
13239
|
}
|
|
13240
|
+
/**
|
|
13241
|
+
* Any time, inside a Pump too. The user Libraries it holds now, as
|
|
13242
|
+
* `restore` takes them, including those `replaceLibrary` recompiled
|
|
13243
|
+
* (chapter 9); not a Host Input, and not traced.
|
|
13244
|
+
*/
|
|
13245
|
+
libraries() {
|
|
13246
|
+
return [...this.libraryMap.values()];
|
|
13247
|
+
}
|
|
13173
13248
|
queueInput(input, notify = true) {
|
|
13174
13249
|
const landing = this.debugController?.current;
|
|
13175
13250
|
if (landing && (input.action.k === "stop" || input.action.k === "cancel-run" || input.action.k === "rewind-run") && typeof input.line === "string") input.line += ` pc=${landing.pc}`;
|
|
@@ -13241,7 +13316,7 @@ var TsGroup = class TsGroup {
|
|
|
13241
13316
|
const grants = new Map(Object.entries(o.grants ?? {}));
|
|
13242
13317
|
if (grants.has("musical-clock")) throw new HostError("invalid value", `${MUSICAL_CLOCK} is the Group's own Grant name`);
|
|
13243
13318
|
if ([...grants.values()].filter((g) => g.capability.name === "peer").length > 1) throw new HostError("invalid value", `Script ${o.name} has more than one peer Grant`);
|
|
13244
|
-
const p = prepare("script", o.name, o.source, this.
|
|
13319
|
+
const p = prepare("script", o.name, o.source, this.libraryMap, objects, declarationsOf(grants), void 0, {
|
|
13245
13320
|
...propertyChecks(o.objects ?? {}, o.owner),
|
|
13246
13321
|
forbidSuspension: o.forbidSuspension === true
|
|
13247
13322
|
});
|
|
@@ -13297,23 +13372,27 @@ var TsGroup = class TsGroup {
|
|
|
13297
13372
|
const identity = compileKey(existing?.identity ?? p.identity, p.checked.tree);
|
|
13298
13373
|
let unit = compiledScripts.get(identity);
|
|
13299
13374
|
if (!unit) {
|
|
13300
|
-
unit = loadOrReject(name, () => lowerTree(p.checked.tree, {
|
|
13375
|
+
unit = loadOrReject(name, p.ranges, () => lowerTree(p.checked.tree, {
|
|
13301
13376
|
name,
|
|
13302
13377
|
unit: "script",
|
|
13303
13378
|
existingVariables: existing?.home.variableNames
|
|
13304
13379
|
}));
|
|
13305
13380
|
compiledScripts.set(identity, unit);
|
|
13306
13381
|
}
|
|
13307
|
-
return loadOrReject(name, () => loadScript(unit, limits, new Map([...existing?.links ?? [], ...linksOf(p.imports)]), existing?.home.variables, existing?.home, p.identity, this.functionGroup));
|
|
13382
|
+
return loadOrReject(name, p.ranges, () => loadScript(unit, limits, new Map([...existing?.links ?? [], ...linksOf(p.imports)]), existing?.home.variables, existing?.home, p.identity, this.functionGroup));
|
|
13308
13383
|
} catch (error) {
|
|
13309
13384
|
if (traced) this.writeDiagnostics(error);
|
|
13310
13385
|
throw error;
|
|
13311
13386
|
}
|
|
13312
13387
|
}
|
|
13313
13388
|
writeDiagnostics(error) {
|
|
13314
|
-
if (error instanceof LoadError) for (const d of error.diagnostics) this.trace?.(recordLine("diag", [d.unit], [
|
|
13389
|
+
if (error instanceof LoadError) for (const d of error.diagnostics) this.trace?.(recordLine("diag", [d.unit], [
|
|
13390
|
+
["code", JSON.stringify(d.code)],
|
|
13391
|
+
["pos", `${d.line}:${d.col}`],
|
|
13392
|
+
["end", `${d.endLine}:${d.endCol}`]
|
|
13393
|
+
]));
|
|
13315
13394
|
}
|
|
13316
|
-
replacement(s, source, carry, libraries = this.
|
|
13395
|
+
replacement(s, source, carry, libraries = this.libraryMap, extensions = [], keepMailbox = false) {
|
|
13317
13396
|
const grants = availableGrants(s);
|
|
13318
13397
|
const p = prepare("script", s.name, source, libraries, Object.keys(s.objects), declarationsOf(grants), void 0, {
|
|
13319
13398
|
...propertyChecks(s.objects, s.owner?.handle),
|
|
@@ -13363,20 +13442,20 @@ var TsGroup = class TsGroup {
|
|
|
13363
13442
|
this.worker();
|
|
13364
13443
|
this.requireKnownEffects();
|
|
13365
13444
|
const s = this.scripts.find((s) => s.name === name);
|
|
13366
|
-
const p = prepare("script", name, source, this.
|
|
13445
|
+
const p = prepare("script", name, source, this.libraryMap);
|
|
13367
13446
|
this.trace?.(recordLine("reload", [name], [
|
|
13368
13447
|
["carry", carry === "carry variables" ? "yes" : "no"],
|
|
13369
13448
|
["mailbox", keepMailbox ? "keep" : null],
|
|
13370
13449
|
["source", displayText(source)],
|
|
13371
13450
|
["identity", p.identity]
|
|
13372
13451
|
], true));
|
|
13373
|
-
const replacement = this.replacement(s, source, carry, this.
|
|
13452
|
+
const replacement = this.replacement(s, source, carry, this.libraryMap, [], keepMailbox);
|
|
13374
13453
|
return this.replaceScripts([{
|
|
13375
13454
|
s,
|
|
13376
13455
|
...replacement
|
|
13377
13456
|
}], keepMailbox);
|
|
13378
13457
|
}
|
|
13379
|
-
extension(s, source, libraries = this.
|
|
13458
|
+
extension(s, source, libraries = this.libraryMap) {
|
|
13380
13459
|
const name = `${s.name}+${s.units.length}`;
|
|
13381
13460
|
const existing = {};
|
|
13382
13461
|
const links = /* @__PURE__ */ new Map();
|
|
@@ -13414,10 +13493,12 @@ var TsGroup = class TsGroup {
|
|
|
13414
13493
|
if (p.checked.tree) {
|
|
13415
13494
|
const units = [...s.units.map((unit, i) => ({
|
|
13416
13495
|
root: unit.tree.root,
|
|
13417
|
-
name: s.loaded.units[i].name
|
|
13496
|
+
name: s.loaded.units[i].name,
|
|
13497
|
+
ranges: () => rangesOf(unit.source, unit.tree)
|
|
13418
13498
|
})), {
|
|
13419
13499
|
root: p.checked.tree.root,
|
|
13420
|
-
name
|
|
13500
|
+
name,
|
|
13501
|
+
ranges: () => p.ranges
|
|
13421
13502
|
}];
|
|
13422
13503
|
checkDecisionCalls(units.map((unit) => ({
|
|
13423
13504
|
root: unit.root,
|
|
@@ -13427,6 +13508,7 @@ var TsGroup = class TsGroup {
|
|
|
13427
13508
|
unit: unit.name,
|
|
13428
13509
|
line: leaf.span.line,
|
|
13429
13510
|
col: leaf.span.col,
|
|
13511
|
+
...unit.ranges().of(leaf.span),
|
|
13430
13512
|
message: code
|
|
13431
13513
|
});
|
|
13432
13514
|
}
|
|
@@ -13527,12 +13609,12 @@ var TsGroup = class TsGroup {
|
|
|
13527
13609
|
throw new HostError(code, message);
|
|
13528
13610
|
};
|
|
13529
13611
|
if (stdlibNames.has(l.name)) refuse("reserved name", `${l.name} is a stdlib Library's name`);
|
|
13530
|
-
if (this.
|
|
13612
|
+
if (this.libraryMap.has(l.name)) refuse("name reused", `The Group already holds a Library ${l.name}`);
|
|
13531
13613
|
for (const i of l.imports.filter((i) => !stdlibNames.has(i.name))) {
|
|
13532
|
-
const held = this.
|
|
13614
|
+
const held = this.libraryMap.get(i.name);
|
|
13533
13615
|
if (!held || identityOf(held) !== identityOf(i)) refuse("library mismatch", `The Group doesn't hold the ${i.name} that ${l.name} imports`);
|
|
13534
13616
|
}
|
|
13535
|
-
this.
|
|
13617
|
+
this.libraryMap.set(l.name, l);
|
|
13536
13618
|
}
|
|
13537
13619
|
/** Worker. Prepare every dependent before changing the Group. */
|
|
13538
13620
|
replaceLibrary(l, carry, o) {
|
|
@@ -13550,19 +13632,19 @@ var TsGroup = class TsGroup {
|
|
|
13550
13632
|
throw new HostError(code);
|
|
13551
13633
|
};
|
|
13552
13634
|
if (stdlibNames.has(l.name)) refuse("reserved name");
|
|
13553
|
-
if (!this.
|
|
13635
|
+
if (!this.libraryMap.has(l.name)) refuse("library mismatch");
|
|
13554
13636
|
for (const imported of l.imports.filter((i) => !stdlibNames.has(i.name))) {
|
|
13555
|
-
const held = this.
|
|
13637
|
+
const held = this.libraryMap.get(imported.name);
|
|
13556
13638
|
if (!held || identityOf(held) !== identityOf(imported)) refuse("library mismatch");
|
|
13557
13639
|
}
|
|
13558
13640
|
let libraries;
|
|
13559
13641
|
try {
|
|
13560
|
-
libraries = replacementLibraries(this.
|
|
13642
|
+
libraries = replacementLibraries(this.libraryMap, l);
|
|
13561
13643
|
} catch (error) {
|
|
13562
13644
|
this.writeDiagnostics(error);
|
|
13563
13645
|
throw error;
|
|
13564
13646
|
}
|
|
13565
|
-
const affected = new Set([...libraries].filter(([name, library]) => library !== this.
|
|
13647
|
+
const affected = new Set([...libraries].filter(([name, library]) => library !== this.libraryMap.get(name)).map(([name]) => name));
|
|
13566
13648
|
affected.add(l.name);
|
|
13567
13649
|
const replacements = this.scripts.filter((s) => s.units.some((u) => u.imports.some((i) => affected.has(i.name)))).map((s) => ({
|
|
13568
13650
|
s,
|
|
@@ -13576,8 +13658,8 @@ var TsGroup = class TsGroup {
|
|
|
13576
13658
|
this.discardReason = "stop";
|
|
13577
13659
|
}
|
|
13578
13660
|
if (this.effectStateUnknown) return reports;
|
|
13579
|
-
this.
|
|
13580
|
-
for (const [name, library] of libraries) this.
|
|
13661
|
+
this.libraryMap.clear();
|
|
13662
|
+
for (const [name, library] of libraries) this.libraryMap.set(name, library);
|
|
13581
13663
|
return reports;
|
|
13582
13664
|
}
|
|
13583
13665
|
hostFor(s, run, delivery) {
|
|
@@ -14980,24 +15062,24 @@ var TsGroup = class TsGroup {
|
|
|
14980
15062
|
...error ? { error } : {}
|
|
14981
15063
|
});
|
|
14982
15064
|
this.accountEnd(running, "terminal");
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
|
|
14986
|
-
|
|
14987
|
-
|
|
14988
|
-
|
|
14989
|
-
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
|
|
14996
|
-
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15065
|
+
const end = { kind: "run end" };
|
|
15066
|
+
end.script = s.name;
|
|
15067
|
+
end.run = running.id;
|
|
15068
|
+
if (delivery.id) end.delivery = delivery.id;
|
|
15069
|
+
if (delivery.broadcast) end.broadcast = delivery.broadcast;
|
|
15070
|
+
if (handler) end.handler = handler;
|
|
15071
|
+
if (fallback) end.fallback = fallback;
|
|
15072
|
+
if (outcome.kind === "cancelled" && outcome.cleanupFailed) end.cleanupFailed = "code" in outcome.cleanupFailed ? outcome.cleanupFailed : { limit: limitWord(outcome.cleanupFailed.limit) };
|
|
15073
|
+
end.outcome = outcome.kind;
|
|
15074
|
+
if (outcome.kind === "effect failed") end.effect = outcome.effect;
|
|
15075
|
+
if (result) end.result = result;
|
|
15076
|
+
if (error) end.error = hostError(error);
|
|
15077
|
+
if (limit) end.limit = limit;
|
|
15078
|
+
if (outcome.kind === "errored") end.at = location(outcome.at);
|
|
15079
|
+
else if (outcome.kind === "limit fault") end.at = location(outcome);
|
|
15080
|
+
end.fuel = run.fuel;
|
|
15081
|
+
end.alloc = run.alloc;
|
|
15082
|
+
reports.push(end);
|
|
15001
15083
|
if (outcome.kind === "errored" || outcome.kind === "limit fault" || outcome.kind === "cancelled" || outcome.kind === "dropped" || outcome.kind === "effect failed") this.seal(delivery, {
|
|
15002
15084
|
verdict: "undecided",
|
|
15003
15085
|
undecided: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { H as num, L as map, P as listValues, V as nothing, Z as requireValue, b as dec, i as ScriptError, it as text, nn as characterBoundaries, o as invalidValue, sn as normalizeNFC, u as bool } from "./errors-CNc-xY_9.js";
|
|
3
|
-
import { ft as errorMessages, n as ScriptError$1 } from "./operations-
|
|
3
|
+
import { ft as errorMessages, n as ScriptError$1 } from "./operations-DrsedOvj.js";
|
|
4
4
|
//#region src/json.ts
|
|
5
5
|
var JsonReader = class {
|
|
6
6
|
source;
|
package/http.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { J as Value, cn as HttpClientImpl, gt as ObjectKindDef, ht as ObjectKind, ln as HttpImpl, tn as Group, x as PumpResult } from "./debug-
|
|
2
|
+
import { J as Value, cn as HttpClientImpl, gt as ObjectKindDef, ht as ObjectKind, ln as HttpImpl, tn as Group, x as PumpResult } from "./debug-fthW6KN8.js";
|
|
3
3
|
import { Buffer } from "node:buffer";
|
|
4
4
|
//#region src/http/fetch.d.ts
|
|
5
5
|
/** The largest response body `fetch` reads by default: 8 MiB. */
|
package/http.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { H as num, L as map, P as listValues, d as bytes, i as ScriptError, it as text, t as HostError, u as bool } from "./errors-CNc-xY_9.js";
|
|
3
3
|
import { t as defineObjectKind } from "./objects-OKVLH190.js";
|
|
4
|
-
import { Dt as shape } from "./operations-
|
|
5
|
-
import { a as parseFetchUrl, i as fetchOrigin } from "./http-fetch-
|
|
4
|
+
import { Dt as shape } from "./operations-DrsedOvj.js";
|
|
5
|
+
import { a as parseFetchUrl, i as fetchOrigin } from "./http-fetch-CLAeEXVi.js";
|
|
6
6
|
import { Buffer } from "node:buffer";
|
|
7
7
|
import { createServer, request } from "node:http";
|
|
8
8
|
import { request as request$1 } from "node:https";
|
package/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { $ as instant, $n as NotImplementedError, $t as shape, A as ScriptSources, An as calendarCapability, Ar as SourceSpan, At as FireOp, B as restore, Bn as compileLibrary, Br as syntaxSelector, Bt as ReleaseHook, C as Report, Cn as LocaleImpl, Cr as NameRole, Ct as ChargeRequest, Dn as Costs, Dr as SemanticScope, Dt as EffectResult, E as RestoreResult, En as ConsoleImpl, Er as SemanticNode, Et as Cost, Fn as Library, Fr as SyntaxElement, Ft as Metering, G as RunStarted, Gn as Run, Gt as SegmentGrant, H as RunAccounting, Hn as LimitName, Ht as ScopeDecl, In as LibraryOptions, Ir as SyntaxErrorCode, It as Operation, J as Value, Jn as UnitLoadError, Jt as SuspendingOp, K as Decimal, Kn as RunRecord, Kt as SegmentLifecycle, L as TsScript, Ln as LibrarySource, Lr as SyntaxNode, Lt as Operations, Mn as consoleCapability, Mr as Mode, Mt as GrantContext, N as Settlement, Nn as musicalClockCapability, Nr as TokType, Nt as ImmediateOp, O as SaveOptions, On as MusicalClockImpl, Or as SemanticToken, Ot as ErrorDecl, P as TsGroup, Pn as timerCapability, Pr as Token, Pt as LimitReached, Q as dec, Qn as loadScript, Qt as operationDeclarations, R as Verdict, Rn as OperationRef, Rr as SyntaxRule, Rt as PlainArg, S as PumpedRequest, Sn as sqliteCapability, Sr as LibraryExport, St as CapabilityDefiner, T as RestoreOptions, Tn as CalendarImpl, Tr as SemanticName, Tt as CoordinatedLifecycle, U as RunAncestry, Un as Limits, Ut as SegmentContext, V as CausalWork, Vr as syntaxText, Vt as ReleaseReason, W as RunDiscarded, Wn as Outcome, Wt as SegmentCoordinator, X as bytes, Xn as defaultLimits, Xt as defineCapability, Y as bool, Yn as callFunction, Yt as conforms, Z as civilDate, Zn as deliver, Zt as explain, _ as LoadOptions, _n as SqlParams, _r as disassemble, _t as PropDef, an as PeerImpl, ar as LoadError, at as quantity, b as PumpOptions, bn as SqliteBinding, br as ExportKind, bt as Call, cn as HttpClientImpl, cr as SendFailedReason, d as Counters, dn as httpCapability, dr as CodeUnit, dt as nowMicros, en as Core, er as canConvert, f as Decided, fn as UserImpl, fr as EventBranch, ft as parseInstant, g as Inspection, gn as storeCapability, gr as UnwindEntry, gt as ObjectKindDef, h as GroupOptions, hn as add, hr as Operand, ht as ObjectKind, in as coreVersions, ir as LoadDiagnostic, it as num, jn as clockCapability, jr as Lexer, jt as Grant, k as ScriptCodeRequest, kn as TimerImpl, kr as SemanticTree, kt as FieldShape, l as CancellationOptions, ln as HttpImpl, lr as Body, lt as text, m as EffectFailure, mn as StoreImpl, mr as Instruction, mt as ObjectElements, nn as Script$1, nr as HostError, nt as map, on as peerCapability, or as MailboxFull, ot as range, p as Deciding, pn as userCapability, pr as EventEntry, pt as HostObject, q as Kind, qn as Script, qt as Shape, rn as Versions, rr as HostErrorCode, rt as nothing, sn as peerKind, sr as ScriptError, st as record, tn as Group, tr as waitUs, tt as list, u as CarryOver, un as HttpServerImpl, ur as BodyKind, ut as formatInstant, v as Message, vn as SqlRows, vr as Binding, vt as defineObjectKind, w as Requested, wn as localeCapability, wr as SemanticElement, wt as ChargeResult, x as PumpResult, xn as SqliteImpl, xr as FunctionContract, xt as CapabilityDef, y as PendingCall, yn as SqlValue, yr as BindingKind, yt as GrantDecls, z as newGroup, zn as codeIdentity, zr as Trivia, zt as PlainResult } from "./debug-
|
|
2
|
+
import { $ as instant, $n as NotImplementedError, $t as shape, A as ScriptSources, An as calendarCapability, Ar as SourceSpan, At as FireOp, B as restore, Bn as compileLibrary, Br as syntaxSelector, Bt as ReleaseHook, C as Report, Cn as LocaleImpl, Cr as NameRole, Ct as ChargeRequest, Dn as Costs, Dr as SemanticScope, Dt as EffectResult, E as RestoreResult, En as ConsoleImpl, Er as SemanticNode, Et as Cost, Fn as Library, Fr as SyntaxElement, Ft as Metering, G as RunStarted, Gn as Run, Gt as SegmentGrant, H as RunAccounting, Hn as LimitName, Ht as ScopeDecl, In as LibraryOptions, Ir as SyntaxErrorCode, It as Operation, J as Value, Jn as UnitLoadError, Jt as SuspendingOp, K as Decimal, Kn as RunRecord, Kt as SegmentLifecycle, L as TsScript, Ln as LibrarySource, Lr as SyntaxNode, Lt as Operations, Mn as consoleCapability, Mr as Mode, Mt as GrantContext, N as Settlement, Nn as musicalClockCapability, Nr as TokType, Nt as ImmediateOp, O as SaveOptions, On as MusicalClockImpl, Or as SemanticToken, Ot as ErrorDecl, P as TsGroup, Pn as timerCapability, Pr as Token, Pt as LimitReached, Q as dec, Qn as loadScript, Qt as operationDeclarations, R as Verdict, Rn as OperationRef, Rr as SyntaxRule, Rt as PlainArg, S as PumpedRequest, Sn as sqliteCapability, Sr as LibraryExport, St as CapabilityDefiner, T as RestoreOptions, Tn as CalendarImpl, Tr as SemanticName, Tt as CoordinatedLifecycle, U as RunAncestry, Un as Limits, Ut as SegmentContext, V as CausalWork, Vr as syntaxText, Vt as ReleaseReason, W as RunDiscarded, Wn as Outcome, Wt as SegmentCoordinator, X as bytes, Xn as defaultLimits, Xt as defineCapability, Y as bool, Yn as callFunction, Yt as conforms, Z as civilDate, Zn as deliver, Zt as explain, _ as LoadOptions, _n as SqlParams, _r as disassemble, _t as PropDef, an as PeerImpl, ar as LoadError, at as quantity, b as PumpOptions, bn as SqliteBinding, br as ExportKind, bt as Call, cn as HttpClientImpl, cr as SendFailedReason, d as Counters, dn as httpCapability, dr as CodeUnit, dt as nowMicros, en as Core, er as canConvert, f as Decided, fn as UserImpl, fr as EventBranch, ft as parseInstant, g as Inspection, gn as storeCapability, gr as UnwindEntry, gt as ObjectKindDef, h as GroupOptions, hn as add, hr as Operand, ht as ObjectKind, in as coreVersions, ir as LoadDiagnostic, it as num, jn as clockCapability, jr as Lexer, jt as Grant, k as ScriptCodeRequest, kn as TimerImpl, kr as SemanticTree, kt as FieldShape, l as CancellationOptions, ln as HttpImpl, lr as Body, lt as text, m as EffectFailure, mn as StoreImpl, mr as Instruction, mt as ObjectElements, nn as Script$1, nr as HostError, nt as map, on as peerCapability, or as MailboxFull, ot as range, p as Deciding, pn as userCapability, pr as EventEntry, pt as HostObject, q as Kind, qn as Script, qt as Shape, rn as Versions, rr as HostErrorCode, rt as nothing, sn as peerKind, sr as ScriptError, st as record, tn as Group, tr as waitUs, tt as list, u as CarryOver, un as HttpServerImpl, ur as BodyKind, ut as formatInstant, v as Message, vn as SqlRows, vr as Binding, vt as defineObjectKind, w as Requested, wn as localeCapability, wr as SemanticElement, wt as ChargeResult, x as PumpResult, xn as SqliteImpl, xr as FunctionContract, xt as CapabilityDef, y as PendingCall, yn as SqlValue, yr as BindingKind, yt as GrantDecls, z as newGroup, zn as codeIdentity, zr as Trivia, zt as PlainResult } from "./debug-fthW6KN8.js";
|
|
3
3
|
import { n as registerStdlib, r as stdlibNames, t as StdlibLibrary } from "./stdlib-registry-BwitI3Ox.js";
|
|
4
|
-
import { $ as grammar, A as FromValueOptions, B as SemanticResult, C as handlersOf, D as shapeData, E as ShapeData, F as talk, G as ParseError, H as checkSyntax, I as CheckOptions, J as RecoveryDiagnostic, K as ParseResult, L as CheckResult, M as ToValueOptions, N as fromValue, O as kindNames, P as toValue, Q as builtins, R as Diagnostic, S as ScriptWithHandlers, T as encodeJson, U as EntryKind, V as checkSource, W as EntryResult, X as parseSource, Y as parseEntry, Z as parseSourceRecovering, _ as createGroup, a as LoweringError, c as lowerTree, d as exportManifest, et as units, f as zoneRules, g as CreateGroupOptions, h as inlineGrants, i as CompileResult, j as PlainValue, k as encodeValue, l as ManifestSpec, m as InlineOperation, n as declarationStart, o as compileSource, p as InlineFunction, q as RecoveringParseResult, r as CompileOptions, s as exportsOf, t as validMessageSelector, u as MessageDecl, w as decodeJson, x as Handlers, y as DrivenGroup, z as DiagnosticCode } from "./lean-
|
|
5
|
-
import { n as createCore, t as TsCore } from "./core-
|
|
6
|
-
import { a as decodeValue, o as readDisplay, t as FunctionResolver } from "./readers-
|
|
4
|
+
import { $ as grammar, A as FromValueOptions, B as SemanticResult, C as handlersOf, D as shapeData, E as ShapeData, F as talk, G as ParseError, H as checkSyntax, I as CheckOptions, J as RecoveryDiagnostic, K as ParseResult, L as CheckResult, M as ToValueOptions, N as fromValue, O as kindNames, P as toValue, Q as builtins, R as Diagnostic, S as ScriptWithHandlers, T as encodeJson, U as EntryKind, V as checkSource, W as EntryResult, X as parseSource, Y as parseEntry, Z as parseSourceRecovering, _ as createGroup, a as LoweringError, c as lowerTree, d as exportManifest, et as units, f as zoneRules, g as CreateGroupOptions, h as inlineGrants, i as CompileResult, j as PlainValue, k as encodeValue, l as ManifestSpec, m as InlineOperation, n as declarationStart, o as compileSource, p as InlineFunction, q as RecoveringParseResult, r as CompileOptions, s as exportsOf, t as validMessageSelector, u as MessageDecl, w as decodeJson, x as Handlers, y as DrivenGroup, z as DiagnosticCode } from "./lean-BAz1NuyP.js";
|
|
5
|
+
import { n as createCore, t as TsCore } from "./core-kBXyAo-m.js";
|
|
6
|
+
import { a as decodeValue, o as readDisplay, t as FunctionResolver } from "./readers-DW4pUrD-.js";
|
|
7
7
|
import { n as stdlibSources, t as allStdlib } from "./index-CBuczWK0.js";
|
|
8
8
|
export { type Binding, type BindingKind, type Body, type BodyKind, type CalendarImpl, type Call, type CancellationOptions, type CapabilityDef, type CapabilityDefiner, type CarryOver, type CausalWork, type ChargeRequest, type ChargeResult, type CheckOptions, type CheckResult, type CodeUnit, type CompileOptions, type CompileResult, Script as CompiledScript, type ConsoleImpl, type CoordinatedLifecycle, type Core, type Cost, type Costs, type Counters, type CreateGroupOptions, type Decided, type Deciding, Decimal, type Diagnostic, type DiagnosticCode, type DrivenGroup, type EffectFailure, type EffectResult, type EntryKind, type EntryResult, type ErrorDecl, type EventBranch, type EventEntry, type ExportKind, type FieldShape, type FireOp, type FromValueOptions, type FunctionContract, type FunctionResolver, 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 Instruction, type Kind, Lexer, type Library, type LibraryExport, type LibraryOptions, type LibrarySource, type LimitName, LimitReached, type Limits, type LoadDiagnostic, LoadError, type LoadOptions, type LocaleImpl, LoweringError, MailboxFull, type ManifestSpec, type Message, type MessageDecl, type Metering, type Mode, type MusicalClockImpl, type NameRole, NotImplementedError, type ObjectElements, type ObjectKind, type ObjectKindDef, type Operand, type Operation, type OperationRef, type Operations, type Outcome, ParseError, type ParseResult, type PeerImpl, type PendingCall, type PlainArg, type PlainResult, type PlainValue, type PropDef, type PumpOptions, type PumpResult, type PumpedRequest, type RecoveringParseResult, type RecoveryDiagnostic, type ReleaseHook, type ReleaseReason, type Report, type Requested, type RestoreOptions, type RestoreResult, Run, type RunAccounting, type RunAncestry, type RunDiscarded, type RunRecord, type RunStarted, type SaveOptions, type ScopeDecl, type Script$1 as Script, type ScriptCodeRequest, ScriptError, type ScriptSources, type ScriptWithHandlers, type SegmentContext, type SegmentCoordinator, type SegmentGrant, type SegmentLifecycle, type SemanticElement, type SemanticName, type SemanticNode, type SemanticResult, type SemanticScope, type SemanticToken, type SemanticTree, type SendFailedReason, type Settlement, type Shape, type ShapeData, type SourceSpan, type SqlParams, type SqlRows, type SqlValue, type SqliteBinding, type SqliteImpl, type StdlibLibrary, type StoreImpl, type SuspendingOp, type SyntaxElement, type SyntaxErrorCode, type SyntaxNode, type SyntaxRule, type TimerImpl, type ToValueOptions, type TokType, type Token, type Trivia, type TsCore, TsGroup, TsScript, UnitLoadError, type UnwindEntry, type UserImpl, Value, type Verdict, type Versions, add, allStdlib, bool, builtins, bytes, calendarCapability, callFunction, canConvert, checkSource, checkSyntax, civilDate, clockCapability, codeIdentity, compileLibrary, compileSource, conforms, consoleCapability, coreVersions, createCore, createGroup, dec, declarationStart, decodeJson, decodeValue, defaultLimits, defineCapability, defineObjectKind, deliver, disassemble, encodeJson, encodeValue, explain, exportManifest, exportsOf, formatInstant, fromValue, grammar, handlersOf, httpCapability, inlineGrants, instant, kindNames, list, loadScript, localeCapability, lowerTree, map, musicalClockCapability, newGroup, nothing, nowMicros, num, operationDeclarations, parseEntry, parseInstant, parseSource, parseSourceRecovering, peerCapability, peerKind, quantity, range, readDisplay, record, registerStdlib, restore, shape, shapeData, sqliteCapability, stdlibNames, stdlibSources, storeCapability, syntaxSelector, syntaxText, talk, text, timerCapability, toValue, units, userCapability, validMessageSelector, waitUs, zoneRules };
|