@cotal-ai/lang 0.24.0 → 0.25.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/README.md +11 -0
- package/dist/engine/bridge.d.ts +71 -0
- package/dist/engine/bridge.d.ts.map +1 -0
- package/dist/engine/bridge.js +277 -0
- package/dist/engine/bridge.js.map +1 -0
- package/dist/engine/ctx.d.ts +140 -0
- package/dist/engine/ctx.d.ts.map +1 -0
- package/dist/engine/ctx.js +834 -0
- package/dist/engine/ctx.js.map +1 -0
- package/dist/engine/frame.d.ts +69 -0
- package/dist/engine/frame.d.ts.map +1 -0
- package/dist/engine/frame.js +105 -0
- package/dist/engine/frame.js.map +1 -0
- package/dist/engine/host.d.ts +77 -0
- package/dist/engine/host.d.ts.map +1 -0
- package/dist/engine/host.js +134 -0
- package/dist/engine/host.js.map +1 -0
- package/dist/engine/worker-entry.d.ts +26 -0
- package/dist/engine/worker-entry.d.ts.map +1 -0
- package/dist/engine/worker-entry.js +175 -0
- package/dist/engine/worker-entry.js.map +1 -0
- package/dist/engine/worker.d.ts +156 -0
- package/dist/engine/worker.d.ts.map +1 -0
- package/dist/engine/worker.js +123 -0
- package/dist/engine/worker.js.map +1 -0
- package/dist/errors.d.ts +44 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +97 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/interpret.d.ts +7 -38
- package/dist/interpret.d.ts.map +1 -1
- package/dist/interpret.js +45 -1003
- package/dist/interpret.js.map +1 -1
- package/dist/journal.d.ts.map +1 -1
- package/dist/journal.js +75 -1
- package/dist/journal.js.map +1 -1
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +13 -1
- package/dist/library.js.map +1 -1
- package/dist/perform.d.ts +138 -0
- package/dist/perform.d.ts.map +1 -0
- package/dist/perform.js +1052 -0
- package/dist/perform.js.map +1 -0
- package/dist/pins.d.ts +28 -8
- package/dist/pins.d.ts.map +1 -1
- package/dist/pins.js +31 -11
- package/dist/pins.js.map +1 -1
- package/dist/sim.d.ts +15 -1
- package/dist/sim.d.ts.map +1 -1
- package/dist/sim.js.map +1 -1
- package/dist/transform/emit.d.ts +23 -0
- package/dist/transform/emit.d.ts.map +1 -0
- package/dist/transform/emit.js +934 -0
- package/dist/transform/emit.js.map +1 -0
- package/dist/transform/index.d.ts +34 -0
- package/dist/transform/index.d.ts.map +1 -0
- package/dist/transform/index.js +31 -0
- package/dist/transform/index.js.map +1 -0
- package/dist/transform/scope.d.ts +58 -0
- package/dist/transform/scope.d.ts.map +1 -0
- package/dist/transform/scope.js +500 -0
- package/dist/transform/scope.js.map +1 -0
- package/dist/transform/seam.d.ts +78 -0
- package/dist/transform/seam.d.ts.map +1 -0
- package/dist/transform/seam.js +111 -0
- package/dist/transform/seam.js.map +1 -0
- package/dist/values.d.ts +15 -0
- package/dist/values.d.ts.map +1 -1
- package/dist/values.js +79 -0
- package/dist/values.js.map +1 -1
- package/package.json +9 -4
package/dist/errors.js
CHANGED
|
@@ -91,6 +91,7 @@ export const CATALOG = {
|
|
|
91
91
|
L4018: "No implicit conversion",
|
|
92
92
|
L4019: "Array write past the end",
|
|
93
93
|
L4020: "A method is not a value",
|
|
94
|
+
L4021: "A callable `then` is not a record member",
|
|
94
95
|
// ---- L5xxx: durability -----------------------------------------------------------------------
|
|
95
96
|
L5001: "Run divergence",
|
|
96
97
|
L5002: "Program hash not available",
|
|
@@ -146,6 +147,20 @@ export const CATALOG = {
|
|
|
146
147
|
// awaited `Promise.race([])`, which never settles. Its own code and not L5001 because that one is
|
|
147
148
|
// a hash comparison down to its field names, and this is a comparison of branch NAMES.
|
|
148
149
|
L5022: "A recorded branch is not in the migrated source",
|
|
150
|
+
// Allocated here because the L5xxx range is where a fact about a RECORD lives, and this is one: the
|
|
151
|
+
// record names a language version and this build has no engine that speaks it. Deliberately not
|
|
152
|
+
// L5008, which is the same shape of disagreement one layer in - a record handed to a SPECIFIC
|
|
153
|
+
// engine whose version differs, where the repair is to run it on the engine that matches. Here
|
|
154
|
+
// there is no such engine to name, so the repair is a different sentence and gets its own code.
|
|
155
|
+
L5023: "No engine in this build serves this record's language version",
|
|
156
|
+
// Allocated from THIS FILE, same rule as the three above. A fact about a RECORD, so L5xxx: the
|
|
157
|
+
// entry's `external` is a value the language cannot express, which is different from the record
|
|
158
|
+
// disagreeing with the source (L5001) or with this build (L5023): nothing here disagrees with
|
|
159
|
+
// anything, the field simply cannot be read back. Its write-side sibling is deliberately NOT a new
|
|
160
|
+
// code: a handler that binds such a value fails inside its own dispatch, where L4000 handler-fault
|
|
161
|
+
// already says exactly that, and a second name for one fact is the defect the L5017..L5020 note
|
|
162
|
+
// above was written about.
|
|
163
|
+
L5024: "A recorded value has no canonical form",
|
|
149
164
|
// ---- L6xxx: simulation -------------------------------------------------------------------------
|
|
150
165
|
L6001: "Unscripted effect in simulation",
|
|
151
166
|
L6002: "Simulation script entry unused",
|
|
@@ -248,4 +263,86 @@ export class RuntimeFault extends Error {
|
|
|
248
263
|
this.name = "RuntimeFault";
|
|
249
264
|
}
|
|
250
265
|
}
|
|
266
|
+
/** The message off anything a foreign body throws, read defensively: other people's code may throw a primitive. */
|
|
267
|
+
export function messageOf(v) {
|
|
268
|
+
if (v instanceof Error)
|
|
269
|
+
return v.message;
|
|
270
|
+
const m = v?.message;
|
|
271
|
+
return typeof m === "string" ? m : String(v);
|
|
272
|
+
}
|
|
273
|
+
/** A recorded step's inputs changed, so its recorded result may no longer be the truth. */
|
|
274
|
+
export class RunDivergence extends Error {
|
|
275
|
+
stepKey;
|
|
276
|
+
recordedHash;
|
|
277
|
+
programHash;
|
|
278
|
+
constructor(stepKey, recordedHash, programHash) {
|
|
279
|
+
super(`L5001 Run divergence\n\n step ${stepKey} INPUT CHANGED\n recorded ${recordedHash}\n program ${programHash}\n\nThe recorded result was produced from different inputs, so replaying it would hand the program an answer to a question it is no longer asking.\n\nOptions\n fork(run, "${stepKey}") re-run from this step, keeping everything before it\n revert the inputs keep the recorded result`);
|
|
280
|
+
this.stepKey = stepKey;
|
|
281
|
+
this.recordedHash = recordedHash;
|
|
282
|
+
this.programHash = programHash;
|
|
283
|
+
this.name = "RunDivergence";
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* A migration's walk reached a settled scope it cannot enter.
|
|
288
|
+
*
|
|
289
|
+
* A `conclave` is the case that exists today: its channel handle is HANDLER-DERIVED, the mint
|
|
290
|
+
* returns it and nothing journals it, so a walk cannot re-enter the body without inventing a
|
|
291
|
+
* handle, and an invented one would re-hash every step inside that used the channel into a
|
|
292
|
+
* divergence the run never had. Refusing is the honest exit. Consuming the subtree instead would
|
|
293
|
+
* hide exactly the orphans a migration exists to find, which is a silent wrong answer in place of
|
|
294
|
+
* a loud refusal.
|
|
295
|
+
*/
|
|
296
|
+
export class UnwalkableScope extends Error {
|
|
297
|
+
scopeKey;
|
|
298
|
+
why;
|
|
299
|
+
constructor(scopeKey, why) {
|
|
300
|
+
super(`a migration cannot walk inside the settled ${why} at ${scopeKey}: its handle is handler-derived and was never journalled, so the walk would have to invent one. Fork from this step instead, or migrate a run that does not contain it.`);
|
|
301
|
+
this.scopeKey = scopeKey;
|
|
302
|
+
this.why = why;
|
|
303
|
+
this.name = "UnwalkableScope";
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* A migration's walk was sent into a recorded branch the new source does not have.
|
|
308
|
+
*
|
|
309
|
+
* Its own code rather than `RunDivergence`, for the reason the L5005/L5006/L5007 collision in the
|
|
310
|
+
* orphan table bought: `RunDivergence` is a HASH comparison and says so in both its fields and its
|
|
311
|
+
* message, and putting branch NAMES in fields called `recordedHash`/`programHash` would be a lie in
|
|
312
|
+
* the payload a repair loop reads. The author's repair differs too: this one is fixed by looking at
|
|
313
|
+
* an arm's NAME, not at its body.
|
|
314
|
+
*/
|
|
315
|
+
export class ScopeBranchMissing extends Error {
|
|
316
|
+
scopeKey;
|
|
317
|
+
scope;
|
|
318
|
+
missing;
|
|
319
|
+
recorded;
|
|
320
|
+
source;
|
|
321
|
+
constructor(scopeKey, scope, missing, recorded, source) {
|
|
322
|
+
super(recorded.length === 0
|
|
323
|
+
// THE EMPTY CASE IS NOT THE SAME SENTENCE. "A recorded branch is not in the source" is false
|
|
324
|
+
// here: no branch was recorded at all, and saying "missing: " with nothing after it would
|
|
325
|
+
// send a reader looking through their source for an arm that was never named. The cause is
|
|
326
|
+
// the entry, not the edit, and the repair is different too.
|
|
327
|
+
? `L5022 A settled scope recorded no branch names\n\n step ${scopeKey} BRANCH NAMES ABSENT\n`
|
|
328
|
+
+ ` source ${source.join(", ")}\n\n`
|
|
329
|
+
+ `This ${scope} settled before scopes recorded their arm names on failure, so the walk has `
|
|
330
|
+
+ `nothing to tell it which arm ran. It cannot enter one, and entering none would wait `
|
|
331
|
+
+ `forever on a scope with no branches in it.\n\nOptions\n resume(run) replay it rather `
|
|
332
|
+
+ `than walking it\n fork(run, "${scopeKey}") re-run this scope on the current arms`
|
|
333
|
+
: `L5022 A recorded branch is not in the migrated source\n\n step ${scopeKey} BRANCH MISSING\n`
|
|
334
|
+
+ ` recorded ${recorded.join(", ")}\n source ${source.join(", ")}\n`
|
|
335
|
+
+ ` missing ${missing.join(", ")}\n\n`
|
|
336
|
+
+ `This ${scope} settled on ${missing.length === 1 ? "a branch" : "branches"} the new source no longer declares, so the walk `
|
|
337
|
+
+ `cannot enter ${missing.length === 1 ? "it" : "them"} to check what ran inside. Migrating anyway would hand the program a `
|
|
338
|
+
+ `result produced by an arm it does not have.\n\nOptions\n restore the branch ${missing.map((k) => `\`${k}\``).join(", ")} `
|
|
339
|
+
+ `keep the recorded result\n fork(run, "${scopeKey}") re-run this scope on the new arms`);
|
|
340
|
+
this.scopeKey = scopeKey;
|
|
341
|
+
this.scope = scope;
|
|
342
|
+
this.missing = missing;
|
|
343
|
+
this.recorded = recorded;
|
|
344
|
+
this.source = source;
|
|
345
|
+
this.name = "ScopeBranchMissing";
|
|
346
|
+
}
|
|
347
|
+
}
|
|
251
348
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wFAAwF;AACxF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,8FAA8F;IAC9F,KAAK,EAAE,2BAA2B;IAClC,KAAK,EAAE,0BAA0B;IACjC,KAAK,EAAE,yBAAyB;IAChC,KAAK,EAAE,8BAA8B;IACrC,KAAK,EAAE,6BAA6B;IACpC,KAAK,EAAE,wCAAwC;IAC/C,KAAK,EAAE,8CAA8C;IACrD,+FAA+F;IAC/F,4FAA4F;IAC5F,kGAAkG;IAClG,KAAK,EAAE,gBAAgB;IACvB,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,kCAAkC;IACzC,KAAK,EAAE,wBAAwB;IAC/B,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,0BAA0B;IACjC,KAAK,EAAE,0BAA0B;IACjC,KAAK,EAAE,4BAA4B;IACnC,KAAK,EAAE,gCAAgC;IACvC,KAAK,EAAE,yBAAyB;IAChC,KAAK,EAAE,2CAA2C;IAClD,KAAK,EAAE,yBAAyB;IAChC,KAAK,EAAE,wCAAwC;IAC/C,KAAK,EAAE,4BAA4B;IACnC,KAAK,EAAE,gCAAgC;IACvC,KAAK,EAAE,qDAAqD;IAC5D,KAAK,EAAE,6BAA6B;IACpC,KAAK,EAAE,kCAAkC;IACzC,KAAK,EAAE,kCAAkC;IACzC,KAAK,EAAE,0BAA0B;IACjC,KAAK,EAAE,yBAAyB;IAChC,0FAA0F;IAC1F,+FAA+F;IAC/F,mFAAmF;IACnF,KAAK,EAAE,6BAA6B;IACpC,KAAK,EAAE,2BAA2B;IAElC,8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,IAAI;kBACpF,qBAAqB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM;kBAC7C,QAAQ,KAAK,eAAe,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,kDAAkD;kBAC5H,gBAAgB,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,uEAAuE;kBAC3H,gFAAgF,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;kBAC9H,0CAA0C,QAAQ,wCAAwC,CAC/F,CAAC;QAxBO,aAAQ,GAAR,QAAQ,CAAQ;QAChB,UAAK,GAAL,KAAK,CAAQ;QACb,YAAO,GAAP,OAAO,CAAmB;QAC1B,aAAQ,GAAR,QAAQ,CAAmB;QAC3B,WAAM,GAAN,MAAM,CAAmB;QAqBlC,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export { MUTATING_METHODS } from "./library.js";
|
|
|
16
16
|
export { validate, type ValidateResult } from "./grammar.js";
|
|
17
17
|
export { RunDivergence, RuntimeFault, ScopeBranchMissing, UnwalkableScope, resume, run, type RunOptions, type RunResult, } from "./interpret.js";
|
|
18
18
|
export { NotCrossable, Prng, assertCrossable, deepFreeze } from "./values.js";
|
|
19
|
-
export { LANGUAGE_VERSION, PIN_DEFAULTS, PinMismatch, bindPins, resolvePins, type PinnableOptions, type RunPins, } from "./pins.js";
|
|
19
|
+
export { ENGINE_LANGUAGE_VERSION, LANGUAGE_VERSION, PIN_DEFAULTS, PinMismatch, WALKER_LANGUAGE_VERSION, bindPins, resolvePins, type PinnableOptions, type RunPins, } from "./pins.js";
|
|
20
20
|
export { Cancelled, RunReleased, EffectError, type AgentHandleValue, type AskRequest, type CancelSignal, type ChannelHandleValue, type CheckpointRaw, type CheckpointRequest, type CheckpointResultValue, type ConclaveRequest, type EffectContext, type EffectHandler, type EventDescriptor, type MonitorRequest, type NotifyFact, type NotifyRequest, type SleepRequest, type SpawnRequest, type TurnRequest, type TurnResultValue, type TurnStatus, type WaitRequest, } from "./effects.js";
|
|
21
21
|
export { DurationError, isDuration, parseDuration, } from "./duration.js";
|
|
22
22
|
export { RecordingHandler, dryRun, renderReport, type DryRunOptions, type DryRunReport, type PlannedAgent, type PlannedCheckpoint, type PlannedEffect, } from "./dryrun.js";
|
|
@@ -24,4 +24,13 @@ export { SimHandler, SimUnscriptedError, type Scripted, type SimFault, type SimS
|
|
|
24
24
|
export { notifyFactViolation } from "./notify-fact.js";
|
|
25
25
|
export { Journal, JournalAppendRejected, JournalReadOnlyError, RunClock, journalEntryKeyString, type EntryError, type EntryState, type EntryStatus, type JournalEntry, type JournalInit, type JournalStore, type LookupVerdict, } from "./journal.js";
|
|
26
26
|
export { DIGEST_PREFIX, KeyScope, branchKeys, digest, programHashOf, scopePathString, stepKeyEquals, stepKeyString, type ScopeFrame, type ScopeKind, type StepKey, } from "./keys.js";
|
|
27
|
+
/**
|
|
28
|
+
* The compiled engine's driver-facing surface: the transform that produces what the engine runs,
|
|
29
|
+
* and the worker runner a host executes it with. The evaluator itself is NOT exported — it lives
|
|
30
|
+
* in the worker entry, where the Compartment is, and naming it here would offer an unconfined
|
|
31
|
+
* production path.
|
|
32
|
+
*/
|
|
33
|
+
export { transform, type TransformMeta, type TransformOptions } from "./transform/index.js";
|
|
34
|
+
export { runInWorker, type WorkerHandlerSpec, type WorkerRun, type WorkerRunFailed, type WorkerRunOk, type WorkerRunOptions, type WorkerRunRequest, type WorkerRunResult, } from "./engine/worker.js";
|
|
35
|
+
export { NODE_FLOOR, assertNodeFloor } from "./engine/host.js";
|
|
27
36
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,EACT,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EACL,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,MAAM,EACN,GAAG,EACH,KAAK,UAAU,EACf,KAAK,SAAS,GACf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9E,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,OAAO,GACb,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,SAAS,EACT,WAAW,EACX,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,GACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,UAAU,EACV,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,SAAS,GACf,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EACL,OAAO,EACP,qBAAqB,EACrB,oBAAoB,EACpB,QAAQ,EACR,qBAAqB,EACrB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,QAAQ,EACR,UAAU,EACV,MAAM,EACN,aAAa,EACb,eAAe,EACf,aAAa,EACb,aAAa,EACb,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,OAAO,GACb,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,EACT,KAAK,SAAS,EACd,KAAK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MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ export { MUTATING_METHODS } from "./library.js";
|
|
|
16
16
|
export { validate } from "./grammar.js";
|
|
17
17
|
export { RunDivergence, RuntimeFault, ScopeBranchMissing, UnwalkableScope, resume, run, } from "./interpret.js";
|
|
18
18
|
export { NotCrossable, Prng, assertCrossable, deepFreeze } from "./values.js";
|
|
19
|
-
export { LANGUAGE_VERSION, PIN_DEFAULTS, PinMismatch, bindPins, resolvePins, } from "./pins.js";
|
|
19
|
+
export { ENGINE_LANGUAGE_VERSION, LANGUAGE_VERSION, PIN_DEFAULTS, PinMismatch, WALKER_LANGUAGE_VERSION, bindPins, resolvePins, } from "./pins.js";
|
|
20
20
|
export { Cancelled, RunReleased, EffectError, } from "./effects.js";
|
|
21
21
|
export { DurationError, isDuration, parseDuration, } from "./duration.js";
|
|
22
22
|
export { RecordingHandler, dryRun, renderReport, } from "./dryrun.js";
|
|
@@ -24,4 +24,13 @@ export { SimHandler, SimUnscriptedError, } from "./sim.js";
|
|
|
24
24
|
export { notifyFactViolation } from "./notify-fact.js";
|
|
25
25
|
export { Journal, JournalAppendRejected, JournalReadOnlyError, RunClock, journalEntryKeyString, } from "./journal.js";
|
|
26
26
|
export { DIGEST_PREFIX, KeyScope, branchKeys, digest, programHashOf, scopePathString, stepKeyEquals, stepKeyString, } from "./keys.js";
|
|
27
|
+
/**
|
|
28
|
+
* The compiled engine's driver-facing surface: the transform that produces what the engine runs,
|
|
29
|
+
* and the worker runner a host executes it with. The evaluator itself is NOT exported — it lives
|
|
30
|
+
* in the worker entry, where the Compartment is, and naming it here would offer an unconfined
|
|
31
|
+
* production path.
|
|
32
|
+
*/
|
|
33
|
+
export { transform } from "./transform/index.js";
|
|
34
|
+
export { runInWorker, } from "./engine/worker.js";
|
|
35
|
+
export { NODE_FLOOR, assertNodeFloor } from "./engine/host.js";
|
|
27
36
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANG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YAAY,GAMb,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,UAAU,EACV,kBAAkB,GAInB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EACL,OAAO,EACP,qBAAqB,EACrB,oBAAoB,EACpB,QAAQ,EACR,qBAAqB,GAQtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,QAAQ,EACR,UAAU,EACV,MAAM,EACN,aAAa,EACb,eAAe,EACf,aAAa,EACb,aAAa,GAId,MAAM,WAAW,CAAC;AAEnB;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAA6C,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EACL,WAAW,GAQZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/interpret.d.ts
CHANGED
|
@@ -15,26 +15,19 @@
|
|
|
15
15
|
* serialized.
|
|
16
16
|
*/
|
|
17
17
|
import { LangError, LangErrors } from "./errors.js";
|
|
18
|
-
export { RuntimeFault } from "./errors.js";
|
|
18
|
+
export { RunDivergence, RuntimeFault, ScopeBranchMissing, UnwalkableScope } from "./errors.js";
|
|
19
19
|
import { Journal } from "./journal.js";
|
|
20
20
|
import { type RunPins } from "./pins.js";
|
|
21
21
|
import { type EffectHandler } from "./effects.js";
|
|
22
|
-
/** A fault the interpreter itself raises, as opposed to one an effect handler reported. */
|
|
23
22
|
/**
|
|
24
|
-
*
|
|
23
|
+
* The message of an arbitrary thrown value.
|
|
25
24
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* divergence the run never had. Refusing is the honest exit. Consuming the subtree instead would
|
|
30
|
-
* hide exactly the orphans a migration exists to find, which is a silent wrong answer in place of
|
|
31
|
-
* a loud refusal.
|
|
25
|
+
* Reading `.message` off `null` throws, and a thrown primitive is legal in a language with `throw`,
|
|
26
|
+
* so every place that has to describe a failure it did not construct goes through here. A recorded
|
|
27
|
+
* entry saying "Cannot read properties of null" describes the recorder, not the run.
|
|
32
28
|
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
readonly why: string;
|
|
36
|
-
constructor(scopeKey: string, why: string);
|
|
37
|
-
}
|
|
29
|
+
/** An AST subtree with its source offsets removed: what the code IS, not where it sits. */
|
|
30
|
+
export declare function stripPositions(node: unknown): unknown;
|
|
38
31
|
export interface RunOptions {
|
|
39
32
|
readonly runId: string;
|
|
40
33
|
readonly handler: EffectHandler;
|
|
@@ -130,30 +123,6 @@ export interface RunResult {
|
|
|
130
123
|
*/
|
|
131
124
|
readonly steps: number;
|
|
132
125
|
}
|
|
133
|
-
/** A recorded step's inputs changed, so its recorded result may no longer be the truth. */
|
|
134
|
-
export declare class RunDivergence extends Error {
|
|
135
|
-
readonly stepKey: string;
|
|
136
|
-
readonly recordedHash: string;
|
|
137
|
-
readonly programHash: string;
|
|
138
|
-
constructor(stepKey: string, recordedHash: string, programHash: string);
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* A migration's walk was sent into a recorded branch the new source does not have.
|
|
142
|
-
*
|
|
143
|
-
* Its own code rather than `RunDivergence`, for the reason the L5005/L5006/L5007 collision in the
|
|
144
|
-
* orphan table bought: `RunDivergence` is a HASH comparison and says so in both its fields and its
|
|
145
|
-
* message, and putting branch NAMES in fields called `recordedHash`/`programHash` would be a lie in
|
|
146
|
-
* the payload a repair loop reads. The author's repair differs too — this one is fixed by looking at
|
|
147
|
-
* an arm's NAME, not at its body.
|
|
148
|
-
*/
|
|
149
|
-
export declare class ScopeBranchMissing extends Error {
|
|
150
|
-
readonly scopeKey: string;
|
|
151
|
-
readonly scope: string;
|
|
152
|
-
readonly missing: readonly string[];
|
|
153
|
-
readonly recorded: readonly string[];
|
|
154
|
-
readonly source: readonly string[];
|
|
155
|
-
constructor(scopeKey: string, scope: string, missing: readonly string[], recorded: readonly string[], source: readonly string[]);
|
|
156
|
-
}
|
|
157
126
|
/**
|
|
158
127
|
* Run a program.
|
|
159
128
|
*
|
package/dist/interpret.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interpret.d.ts","sourceRoot":"","sources":["../src/interpret.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"interpret.d.ts","sourceRoot":"","sources":["../src/interpret.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EACL,SAAS,EACT,UAAU,EAMX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE/F,OAAO,EAAE,OAAO,EAAoD,MAAM,cAAc,CAAC;AAMzF,OAAO,EAAkD,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzF,OAAO,EAUL,KAAK,aAAa,EAGnB,MAAM,cAAc,CAAC;AAqItB;;;;;;GAMG;AACH,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CASrD;AAqFD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,mEAAmE;IACnE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,6EAA6E;IAC7E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;;;;;;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