@ds-lang/monaco-editor 0.0.0-stage → 1.1.1
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/LICENSE +691 -0
- package/README.md +13 -2
- package/dist/THIRD_PARTY_NOTICES.md +77 -0
- package/dist/compiler-worker.js +4 -0
- package/dist/compiler-worker.js.map +7 -0
- package/dist/ds-monaco-editor.js +103 -0
- package/dist/ds-monaco-editor.js.map +7 -0
- package/dist/lsp-worker.js +16 -0
- package/dist/lsp-worker.js.map +7 -0
- package/package.json +56 -4
- package/src/compiler-worker.mjs +5 -0
- package/src/debugger.mjs +472 -0
- package/src/diagnostics.mjs +65 -0
- package/src/ds-language.mjs +102 -0
- package/src/editor.mjs +108 -0
- package/src/index.mjs +10 -0
- package/src/lsp-worker.mjs +6 -0
- package/src/lsp.mjs +248 -0
- package/src/node/ds-lsp.mjs +5 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../node_modules/@ds-lang/ds/lib/browser.js", "../node_modules/@ds-lang/ds/lib/status.js", "../node_modules/@ds-lang/ds/lib/bind.js", "../node_modules/@ds-lang/ds/lib/dsc-wasm.js", "../node_modules/@ds-lang/tools/lib/ast/nodes.js", "../node_modules/@ds-lang/tools/lib/ast/read.js", "../node_modules/@ds-lang/tools/lib/lsp/analysis.js", "../node_modules/@ds-lang/tools/lib/lsp/references.js", "../node_modules/@ds-lang/tools/lib/lsp/registries.js", "../node_modules/@ds-lang/tools/lib/lsp/complete.js", "../node_modules/@ds-lang/tools/lib/lsp/builtins.js", "../node_modules/@ds-lang/tools/lib/lsp/positions.js", "../node_modules/@ds-lang/tools/lib/lsp/semantic.js", "../node_modules/@ds-lang/tools/lib/lsp/signature.js", "../node_modules/@ds-lang/tools/lib/lsp/symbols.js", "../node_modules/@ds-lang/tools/lib/lsp/diagnostics.js", "../node_modules/@ds-lang/tools/lib/lsp/session.js", "../node_modules/@ds-lang/tools/lib/lsp/browser.js", "../node_modules/@ds-lang/editor-core/src/lsp-files.mjs", "../node_modules/@ds-lang/editor-core/src/lsp-worker.mjs"],
|
|
4
|
+
"sourcesContent": ["// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// @ds-lang/ds in a page (tools/dsdb/DSDB_WEB.md \u00A75): libds as wasm, the API\n// bind.js's, the same as under Node. Nothing here imports from Node. The page\n// gives what Node finds on disk: the emscripten glue (ds_wasm.mjs) and\n// emnapi's runtime, each as a module or a URL to import, and, if it wants,\n// the `.wasm`'s bytes instead of the glue fetching them beside itself.\n//\n// What a page has not got: a file system, so `recordTo` takes a sink function\n// only and `compileFile` refuses. Compiling is ds_dsc's, which\n// the page passes as `compiler` when it wants one: `compile` and `fromSource`\n// are then async, and without one they refuse, saying why.\n\nimport {\n attach, Cache, Clock, CompileRefused, DsError, Engine, EngineEvent, Fact, InternalCompilerError, JsonText,\n STREAM_EVENT_KINDS, status,\n} from \"./bind.js\";\nimport { compileWasm, runDsc } from \"./dsc-wasm.js\";\n\n/** @import { Api, ModuleSource, WasmCompileOptions } from \"./types.js\" */\n/** @import { Glue } from \"./bind.js\" */\n\nexport {\n status, DsError, CompileRefused, InternalCompilerError, Engine, EngineEvent, STREAM_EVENT_KINDS, Clock, Cache,\n Fact, JsonText, compileWasm, runDsc,\n};\nexport * from \"./types.js\";\n\nconst NO_COMPILER = \"@ds-lang/ds: compiling in a page needs ds_dsc, the wasm compiler: \"\n + \"pass it to open() as `compiler`\";\n\n/**\n * A page's host: no file system, and the compiler if the page gave one.\n * @typedef {object} BrowserHost\n * @property {null} file\n * @property {(source: string, options?: WasmCompileOptions) => Promise<Uint8Array>} compile\n * @property {(path: string) => never} compileFile\n */\n\n/**\n * ds_wasm.mjs's factory, and the module it makes.\n * @typedef {(options: { wasmBinary?: Uint8Array | ArrayBuffer }) =>\n * Promise<{ emnapiInit: (options: { context: unknown }) => Glue }>} GlueFactory\n */\n\n/**\n * @param {ModuleSource | undefined} compiler\n * @param {Uint8Array | ArrayBuffer | undefined} compilerWasm\n * @returns {BrowserHost}\n */\nfunction host(compiler, compilerWasm) {\n return {\n file: null,\n compile: compiler === undefined\n ? () => { throw new Error(NO_COMPILER); }\n : (source, options = {}) => compileWasm(compiler, source, { wasmBinary: compilerWasm, ...options }),\n compileFile: () => {\n throw new Error(\"@ds-lang/ds: compileFile needs a file system; in a page, `compile` the source text\");\n },\n };\n}\n\n/**\n * `what` if it is already the module, else the module imported from it (a URL).\n * @param {unknown} what\n * @param {string} name\n * @returns {Promise<unknown>}\n */\nasync function moduleOf(what, name) {\n if (what === undefined || what === null) throw new TypeError(`@ds-lang/ds: open() needs \\`${name}\\``);\n if (typeof what === \"string\" || what instanceof URL) return import(String(what));\n return what;\n}\n\n/**\n * A module's member `key`, or undefined.\n * @param {unknown} m\n * @param {string} key\n * @returns {unknown}\n */\nfunction member(m, key) {\n return m !== null && (typeof m === \"object\" || typeof m === \"function\") ? Reflect.get(m, key) : undefined;\n}\n\n/**\n * Load libds as wasm in a page and return the API bound to it: the same API\n * as `open({ target: \"wasm\" })` under Node.\n *\n * A realm loads libds once. open() again returns the first API, and does not\n * read its arguments.\n *\n * @param {object} o\n * @param {ModuleSource} o.glue ds_wasm.mjs: its factory (the default\n * export), the module, or its URL\n * @param {ModuleSource} o.runtime `@emnapi/runtime`: the module, or its URL\n * @param {Uint8Array | ArrayBuffer} [o.wasmBinary] the `.wasm` itself, rather\n * than the glue fetching it from beside its own URL\n * @param {ModuleSource} [o.compiler] ds_dsc (ds_dsc.mjs: its\n * factory, module or URL), to compile in the page\n * @param {Uint8Array | ArrayBuffer} [o.compilerWasm] its `.wasm`, likewise\n * @returns {Promise<Api<BrowserHost>>}\n */\nexport async function open({ glue, runtime, wasmBinary, compiler, compilerWasm }) {\n return attach(\"browser\", \"wasm\", async () => {\n const g = await moduleOf(glue, \"glue\");\n const factory = typeof g === \"function\" ? g : member(g, \"default\");\n if (typeof factory !== \"function\") throw new TypeError(\"@ds-lang/ds: `glue` is not ds_wasm.mjs\");\n const rt = await moduleOf(runtime, \"runtime\");\n const getDefaultContext = member(rt, \"getDefaultContext\") ?? member(member(rt, \"default\"), \"getDefaultContext\");\n if (typeof getDefaultContext !== \"function\")\n throw new TypeError(\"@ds-lang/ds: `runtime` is not @emnapi/runtime\");\n // The glue's factory, checked as far as JavaScript can check one.\n const create = /** @type {GlueFactory} */ (factory);\n const Module = await create(wasmBinary === undefined ? {} : { wasmBinary });\n return Module.emnapiInit({ context: getDefaultContext() });\n }, host(compiler, compilerWasm));\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// GENERATED from proto/status.proto \u2014 do not\n// edit. The `js` gate lane runs `--check`, so a hand edit is a red\n// build. The numbers are normative; the names are labels.\n\nexport const DS_OK = 0;\nexport const DS_ERR_INVAL = -1;\nexport const DS_ERR_OOM = -2;\nexport const DS_ERR_NOT_FOUND = -3;\nexport const DS_ERR_STATE = -4;\nexport const DS_ERR_OVERFLOW = -5;\nexport const DS_ERR_UNSUPPORTED = -7;\nexport const DS_ERR_INTERNAL = -8;\nexport const DS_ERR_IO = -9;\nexport const DS_ERR_ENGINE_HALTED = -10;\nexport const DS_ERR_PARSE = -100;\nexport const DS_ERR_SCHEMA_UNKNOWN = -101;\nexport const DS_ERR_SLOT_UNKNOWN = -103;\nexport const DS_ERR_SLOT_TYPE_MISMATCH = -104;\nexport const DS_ERR_FACT_INVALID = -200;\nexport const DS_ERR_ACTION_FAILED = -202;\nexport const DS_ERR_TIME_RANGE = -205;\nexport const DS_ERR_NAN_REJECTED = -216;\nexport const DS_ERR_JSON_NONFINITE = -217;\nexport const DS_ERR_SERIES_NO_BACKING = -218;\nexport const DS_ERR_SCHEMA_HASH_MISMATCH = -219;\nexport const DS_ERR_FACT_REF_CONFLICT = -220;\nexport const DS_ERR_JSON_LIMIT = -221;\nexport const DS_ERR_ENCODING = -222;\nexport const DS_ERR_NOT_REPRESENTABLE = -223;\nexport const DS_ERR_STORAGE_UNAVAILABLE = -400;\nexport const DS_ERR_STORAGE_QUERY_FAILED = -401;\nexport const DS_ERR_STORAGE_NOT_FOUND = -402;\nexport const DS_ERR_DSC_TRUNCATED = -500;\nexport const DS_ERR_DSC_BAD_MAGIC = -501;\nexport const DS_ERR_DSC_VERSION = -502;\nexport const DS_ERR_DSC_DECODE = -503;\nexport const DS_ERR_DSC_SEMANTIC = -504;\nexport const DS_ERR_DSC_DANGLING = -506;\nexport const DS_ERR_DSC_DECOMPRESS = -507;\nexport const DS_ERR_DSC_CAPABILITY_ABSENT = -514;\nexport const DS_ERR_RETP_INVALID = -601;\nexport const DS_ERR_RETP_INDEX_OOB = -602;\nexport const DS_ERR_FN_NOT_FOUND = -604;\nexport const DS_ERR_BUDGET_EXCEEDED = -605;\nexport const DS_ERR_WM_FULL = -606;\nexport const DS_ERR_TOKEN_BUDGET = -607;\nexport const DS_ERR_RT_UNSAFE = -608;\nexport const DS_ERR_RT_LIVE = -609;\nexport const DS_ERR_RT_PRECOND = -610;\nexport const DS_ERR_BACKEND_ABI_VERSION = -620;\nexport const DS_ERR_BACKEND_BAD_MAGIC = -621;\nexport const DS_ERR_BACKEND_BAD_AGGS = -622;\nexport const DS_ERR_BACKEND_NOT_REGISTERED = -623;\nexport const DS_ERR_BND_DSC_MISMATCH = -700;\nexport const DS_ERR_BND_DIALECT_MISMATCH = -701;\nexport const DS_ERR_BND_INCOMPLETE = -703;\nexport const DS_ERR_BND_RT_CONFIG_MISMATCH = -704;\nexport const DS_ERR_CONTRACT_BREACH = -710;\nexport const DS_ERR_CONTRACT_MISSING = -711;\nexport const DS_ERR_CONTRACT_INVALID = -712;\nexport const DS_ERR_RTCT_PROFILE_REFUSES_DSRT = -713;\nexport const DS_ERR_CONTRACT_WCET_HALT = -714;\nexport const DS_ERR_FS_VERSION = -720;\nexport const DS_ERR_FS_DIVERGENCE = -725;\nexport const DS_ERR_FS_RECORDING_INCOMPLETE = -729;\nexport const DS_ERR_FS_UNKNOWN_FACT_ID = -730;\n\n/** Every live status, name -> number. */\nexport const STATUS = Object.freeze({\n DS_OK,\n DS_ERR_INVAL,\n DS_ERR_OOM,\n DS_ERR_NOT_FOUND,\n DS_ERR_STATE,\n DS_ERR_OVERFLOW,\n DS_ERR_UNSUPPORTED,\n DS_ERR_INTERNAL,\n DS_ERR_IO,\n DS_ERR_ENGINE_HALTED,\n DS_ERR_PARSE,\n DS_ERR_SCHEMA_UNKNOWN,\n DS_ERR_SLOT_UNKNOWN,\n DS_ERR_SLOT_TYPE_MISMATCH,\n DS_ERR_FACT_INVALID,\n DS_ERR_ACTION_FAILED,\n DS_ERR_TIME_RANGE,\n DS_ERR_NAN_REJECTED,\n DS_ERR_JSON_NONFINITE,\n DS_ERR_SERIES_NO_BACKING,\n DS_ERR_SCHEMA_HASH_MISMATCH,\n DS_ERR_FACT_REF_CONFLICT,\n DS_ERR_JSON_LIMIT,\n DS_ERR_ENCODING,\n DS_ERR_NOT_REPRESENTABLE,\n DS_ERR_STORAGE_UNAVAILABLE,\n DS_ERR_STORAGE_QUERY_FAILED,\n DS_ERR_STORAGE_NOT_FOUND,\n DS_ERR_DSC_TRUNCATED,\n DS_ERR_DSC_BAD_MAGIC,\n DS_ERR_DSC_VERSION,\n DS_ERR_DSC_DECODE,\n DS_ERR_DSC_SEMANTIC,\n DS_ERR_DSC_DANGLING,\n DS_ERR_DSC_DECOMPRESS,\n DS_ERR_DSC_CAPABILITY_ABSENT,\n DS_ERR_RETP_INVALID,\n DS_ERR_RETP_INDEX_OOB,\n DS_ERR_FN_NOT_FOUND,\n DS_ERR_BUDGET_EXCEEDED,\n DS_ERR_WM_FULL,\n DS_ERR_TOKEN_BUDGET,\n DS_ERR_RT_UNSAFE,\n DS_ERR_RT_LIVE,\n DS_ERR_RT_PRECOND,\n DS_ERR_BACKEND_ABI_VERSION,\n DS_ERR_BACKEND_BAD_MAGIC,\n DS_ERR_BACKEND_BAD_AGGS,\n DS_ERR_BACKEND_NOT_REGISTERED,\n DS_ERR_BND_DSC_MISMATCH,\n DS_ERR_BND_DIALECT_MISMATCH,\n DS_ERR_BND_INCOMPLETE,\n DS_ERR_BND_RT_CONFIG_MISMATCH,\n DS_ERR_CONTRACT_BREACH,\n DS_ERR_CONTRACT_MISSING,\n DS_ERR_CONTRACT_INVALID,\n DS_ERR_RTCT_PROFILE_REFUSES_DSRT,\n DS_ERR_CONTRACT_WCET_HALT,\n DS_ERR_FS_VERSION,\n DS_ERR_FS_DIVERGENCE,\n DS_ERR_FS_RECORDING_INCOMPLETE,\n DS_ERR_FS_UNKNOWN_FACT_ID,\n});\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// @ds-lang/ds \u2014 the JavaScript binding to libds (../JS_BINDING.md): the API\n// over a loaded glue, the SAME for every target and every host. The C\n// glue (src/ds.c) converts values and owns pointers; names, argument\n// shapes and the classes live here. How the glue is loaded is the host's:\n// index.js under Node (native, or wasm), browser.js in a page\n// (tools/dsdb/DSDB_WEB.md \u00A75). Nothing here imports from Node; what needs\n// a platform (a file to record to, the compiler) comes in as the host.\n//\n// ONE GLUE PER REALM. Engine and Fact are module-level\n// classes, so a TypeScript program can name them, and they reach libds through\n// the one glue this realm loaded. A second open() for the same target, through\n// the same entry, returns the first's API; any other open() is refused.\n//\n// The public records are types.js's. The glue's own shape is the `Glue`\n// typedef below, and it is the one place types are asserted rather than\n// checked: what a Node-API module returns is whatever its C builds, and\n// src/ds.c is what the typedef is read against.\n\nimport * as status from \"./status.js\";\n\n/**\n * @import {\n * AnnouncedBody, AnnouncedSlot, Api, AtomField, AtomsRead, CacheRemoval, CallArgument, CallRequest, ClockMode, EngineEventMap,\n * ExternalAssertApplied, FactArgument, FactRecord, FactRecordOf, FileSink, FromSource, Host, Int64, Justifier, LineSpan,\n * LogEngineEvent,\n * LogRecord, MatchStep, MemoryReport, Metric, MetricEngineEvent, PlatformSignature, Refraction, ReplayCounts,\n * ReteNetwork, RuleMeta, SchemaInfo, SessionHeader,\n * SlotValue, SlotValueOf, StreamEvent, StreamEventKind, StreamEventOf, Target,\n * UnraisableHook, WriteThrough,\n * } from \"./types.js\"\n */\n\nexport { status };\n\n/**\n * A failing libds call: the JavaScript form of a non-OK `ds_result_t`.\n *\n * Branch on `status`, never on `detail`. A failure a handler of the host's\n * caused carries the handler's exception as its `cause`.\n */\nexport class DsError extends Error {\n /**\n * @param {number} statusCode libds's status number, from `proto/status.proto`\n * @param {string} [detail] libds's text, copied when the error was made\n * @param {ErrorOptions} [options] the error's `cause`, as Error takes it\n */\n constructor(statusCode, detail, options) {\n super(detail ? `ds status ${statusCode}: ${detail}` : `ds status ${statusCode}`, options);\n this.name = \"DsError\";\n /** libds's status number: compare it against `status.DS_ERR_*`. */\n this.status = statusCode;\n /** libds's text, for logs. */\n this.detail = detail ?? \"\";\n }\n}\n\n/**\n * A compile the compiler refused (its exit status 1): `file`, and dsc's\n * `diagnostics`. Here, not in compile.js, so every host throws the same class.\n */\nexport class CompileRefused extends Error {\n /**\n * @param {string} file what the source was called\n * @param {string} diagnostics dsc's report\n */\n constructor(file, diagnostics) {\n super(`${file}: refused by dsc\\n${diagnostics}`);\n this.name = \"CompileRefused\";\n this.file = file;\n this.diagnostics = diagnostics;\n }\n}\n\n/**\n * A compile the compiler stopped before it finished (its exit status 3, an\n * internal compiler error, [RCLI.3.1]): `file`, and dsc's `reason`. It reached\n * no verdict on the program, so it carries no diagnostics. Here, beside\n * CompileRefused, so every host throws the same class.\n */\nexport class InternalCompilerError extends Error {\n /**\n * @param {string} file what the source was called\n * @param {string} reason what dsc wrote to stderr\n */\n constructor(file, reason) {\n super(`${file}: dsc stopped before it finished (exit 3)${reason ? `\\n${reason}` : \"\"}`);\n this.name = \"InternalCompilerError\";\n this.file = file;\n this.reason = reason;\n }\n}\n\n/**\n * A call argument of kind `Json`: libds's canonical JSON text. A `String`\n * argument is a plain string, so `instanceof JsonText` tells the two apart.\n *\n * `text` is the document as libds wrote it. `JSON.parse` reads it where every\n * integer in it fits a Number; one past 2^53 comes back rounded.\n */\nexport class JsonText {\n #text;\n\n /** @param {string} text canonical JSON text, as libds writes it */\n constructor(text) {\n if (typeof text !== \"string\") throw new TypeError(\"text: want a string of JSON text\");\n this.#text = text;\n }\n\n /** The document, as libds wrote it. */\n get text() { return this.#text; }\n\n /**\n * The document, so `String()` and a template literal give its text.\n * @returns {string}\n */\n toString() { return this.#text; }\n}\n\n/**\n * An event an Engine dispatches: a stream event, whose `type` is its kind\n * (one of STREAM_EVENT_KINDS), or a \"log\" or \"metric\" record. The record's\n * fields are the event's own: `event.fact`, `event.seq`, `event.message`.\n */\nexport class EngineEvent extends Event {\n /**\n * @param {string} type\n * @param {object} [fields] set on the event as its own properties\n */\n constructor(type, fields = {}) {\n super(type);\n Object.assign(this, fields);\n }\n}\n\n/**\n * Every stream event kind, as runtime/src/bindings/ds_names.h names them. Keyed\n * by StreamEventKind, so tsc refuses a kind missing here or one the type does\n * not have.\n * @type {Record<StreamEventKind, true>}\n */\nconst KINDS = {\n fact_assert: true,\n fact_retract: true,\n fact_modify: true,\n rule_fire_begin: true,\n rule_fire_end: true,\n action_call: true,\n action_emit: true,\n action_publish: true,\n action_cache_set: true,\n action_cache_get: true,\n action_log: true,\n tick: true,\n action_cache_delete: true,\n rule_lhs_facts: true,\n timer_armed: true,\n timer_fired: true,\n type_error: true,\n bounds_error: true,\n engine_error: true,\n computation_error: true,\n pump: true,\n unknown: true,\n};\n\n/**\n * Every stream event kind: the `type` of each event an Engine dispatches for\n * its stream. A listener for the whole stream is added once per kind, and\n * hears every event in `seq` order.\n * @type {readonly StreamEventKind[]}\n */\nexport const STREAM_EVENT_KINDS = Object.freeze(/** @type {StreamEventKind[]} */ (Object.keys(KINDS)));\n\n// \u2500\u2500 the glue \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** @typedef {\"node\" | \"browser\"} Entry */\n/** @typedef {{ readonly brand: \"@ds-lang/ds engine\" }} EngineHandle */\n/** @typedef {{ readonly brand: \"@ds-lang/ds fact\" }} FactHandle */\n/** @typedef {{ readonly brand: \"@ds-lang/ds replay\" }} ReplayHandle */\n/** @typedef {\"stream\" | \"call\" | \"log\" | \"metric\"} CallbackName */\n\n/**\n * The glue's exports, as src/ds.c defines them.\n * @typedef {object} Glue\n * @property {(errorClass: typeof DsError, hook: UnraisableHook) => void} init\n * @property {(runId: string | null, tierId: string | null) => EngineHandle} newEngine\n * @property {(e: EngineHandle) => void} close\n * @property {(e: EngineHandle) => EngineHandle} clone\n * @property {(e: EngineHandle, bytes: Uint8Array) => void} loadDsc\n * @property {(e: EngineHandle) => number} schemaCount\n * @property {(e: EngineHandle, i: number) => SchemaInfo} schemaAt\n * @property {(e: EngineHandle, schema: string, slot: string, value: bigint | number, toStored: boolean) => bigint | number} slotConvert\n * @property {(e: EngineHandle, schema: string, slots: Record<string, SlotValueOf<FactHandle>>) => FactHandle} assert\n * @property {(e: EngineHandle, bytes: Uint8Array) => void} assertExternal\n * @property {(e: EngineHandle, body: Uint8Array) => ExternalAssertApplied} applyExternalAssert\n * @property {(e: EngineHandle, f: FactHandle) => void} retract\n * @property {(f: FactHandle) => bigint} factId\n * @property {(f: FactHandle) => boolean} factAlive\n * @property {(f: FactHandle) => FactRecordOf<FactHandle>} factRead\n * @property {(e: EngineHandle, schema: string | null) => FactHandle[]} facts\n * @property {(e: EngineHandle) => number} factCount\n * @property {(e: EngineHandle) => number | null} halted\n * @property {(e: EngineHandle, id: Int64) => FactHandle | null} factById\n * @property {(e: EngineHandle) => MemoryReport} mem\n * @property {(e: EngineHandle) => void} pump\n * @property {(e: EngineHandle) => ClockMode} clockMode\n * @property {(e: EngineHandle, mode: ClockMode) => void} clockSetMode\n * @property {(e: EngineHandle) => bigint} clockNow\n * @property {(e: EngineHandle) => bigint | null} clockNextDeadline\n * @property {(e: EngineHandle, ns: Int64) => void} clockSet\n * @property {(e: EngineHandle, ns: Int64) => void} clockAdvance\n * @property {(e: EngineHandle, utcNs: Int64) => void} wallClockSet\n * @property {(e: EngineHandle) => PlatformSignature} platformSignature\n * @property {(e: EngineHandle, name: CallbackName, fn: ((...args: never[]) => unknown) | null) => void} setCallback\n * @property {(e: EngineHandle, set: ((key: string, value: string | null, ttlNs: bigint) => void) | null,\n * del: ((key: string, reason: CacheRemoval[\"reason\"]) => void) | null) => void} setCacheCallbacks\n * @property {(e: EngineHandle, key: string, json: string, ttlNs: Int64) => void} cacheSeed\n * @property {(e: EngineHandle) => number} ruleMetaCount\n * @property {(e: EngineHandle, i: number) => RuleMeta} ruleMetaAt\n * @property {(e: EngineHandle) => number} lineSpanCount\n * @property {(e: EngineHandle, i: number) => LineSpan} lineSpanAt\n * @property {(e: EngineHandle, nodeId: number) => LineSpan} lineSpanFind\n * @property {(e: EngineHandle, factId: Int64) => Justifier[]} getJustifiers\n * @property {(e: EngineHandle, ruleFilter: string | null, includeOccupancy: boolean) => ReteNetwork} reteNetwork\n * @property {(e: EngineHandle, factId: Int64) => MatchStep[]} reteMatchTrace\n * @property {(e: EngineHandle, ruleFilter: string | null) => Refraction[]} refractedActivations\n * @property {(e: EngineHandle, capKeys: Int64, capBytes: Int64) => void} setCacheCap\n * @property {(e: EngineHandle) => SessionHeader} sessionHeader\n * @property {(e: EngineHandle) => string | null} runId\n * @property {(e: EngineHandle) => string | null} tierId\n * @property {(e: EngineHandle, sink: (bytes: Uint8Array) => void) => void} recordTo\n * @property {(e: EngineHandle) => void} stopRecording\n * @property {(e: EngineHandle, maxAtomBytes: number) => ReplayHandle} replayBegin\n * @property {(r: ReplayHandle, chunk: Uint8Array) => void} replayFeed\n * @property {(r: ReplayHandle) => ReplayCounts & { tailBytes: bigint }} replayFinish\n * @property {(bytes: Uint8Array, incremental: boolean) => AtomsRead} readAtoms\n * @property {(field: number) => string | null} messageName\n * @property {(e: EngineHandle, schema: string, body: Uint8Array) => Record<string, SlotValueOf<FactHandle>>}\n * decodeFactBody\n * @property {(slots: AnnouncedSlot[], body: Uint8Array) => Record<string, SlotValueOf<FactHandle>>}\n * decodeAnnouncedFactBody\n * @property {(slots: AnnouncedSlot[], body: Uint8Array) =>\n * { slots: Record<string, SlotValueOf<FactHandle>>, refs: Record<string, bigint | null> }}\n * decodeAnnouncedFactBodyHandles\n */\n\n// \u2500\u2500 this realm's libds \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** @type {Glue | null} */\nlet glue = null;\n\n/**\n * The host this realm opened with, for `recordTo`'s paths.\n * @type {Host | null}\n */\nlet realmHost = null;\n\n/**\n * Which target this realm loaded, through which entry, and the API over it:\n * set by the first attach(), cleared again if its load fails.\n * @type {{ target: Target, entry: Entry, api: Promise<unknown> } | null}\n */\nlet realm = null;\n\n/** @returns {Glue} */\nfunction loadedGlue() {\n if (glue === null) throw new Error(\"@ds-lang/ds: libds is not loaded in this realm; open() it first\");\n return glue;\n}\n\n/**\n * The API over this realm's libds, loading it (`load`) the first time.\n *\n * A second call for the same target through the same entry returns the\n * first's API, as the first opened it. Any other is refused: a realm holds one\n * glue, and Engine and Fact are its classes. A load that fails leaves the\n * realm free.\n *\n * @template {Host} H\n * @param {Entry} entry the module opening libds: index.js is \"node\", browser.js \"browser\"\n * @param {Target} target\n * @param {() => Glue | Promise<Glue>} load\n * @param {H} host\n * @returns {Promise<Api<H>>}\n */\nexport function attach(entry, target, load, host) {\n if (realm !== null) {\n if (realm.target !== target || realm.entry !== entry)\n return Promise.reject(new Error(\n `@ds-lang/ds: this realm loaded libds as ${realm.target} through the ${realm.entry} entry, `\n + `and cannot also load ${target} through the ${entry} entry`));\n // One entry always builds the same kind of host, so the API is an Api<H>.\n return /** @type {Promise<Api<H>>} */ (realm.api);\n }\n const api = (async () => bind(await load(), target, host))();\n const mine = { target, entry, api };\n realm = mine;\n api.catch(() => { if (realm === mine) realm = null; });\n return api;\n}\n\n/**\n * @template {Host} H\n * @param {Glue} b\n * @param {Target} target\n * @param {H} host\n * @returns {Api<H>}\n */\nfunction bind(b, target, host) {\n // The call callback reports a throw to the hook, and the engine carries\n // on. A handler's throw is not the hook's:\n // the Engine reports it (`#handler`), and libds hears that it failed.\n // See the glue's header.\n b.init(DsError, (error, where) => hook(error, where));\n glue = b;\n realmHost = host;\n const { compile, compileFile } = host;\n // fromSource gives an Engine exactly when the host's compiler returns\n // bytes and a Promise when it returns one, which is what FromSource says;\n // tsc cannot follow the conditional through the generic, so it is cast.\n const fromSourceHere = /** @type {FromSource<H[\"compile\"]>} */ (/** @type {unknown} */ (\n (/** @type {string} */ source, /** @type {unknown} */ options) => fromSource(compile, source, options)));\n return Object.freeze({\n target,\n Engine,\n Fact,\n JsonText,\n EngineEvent,\n STREAM_EVENT_KINDS,\n DsError,\n CompileRefused,\n InternalCompilerError,\n status,\n setUnraisableHook,\n compile,\n compileFile,\n fromSource: fromSourceHere,\n readAtoms,\n messageName,\n decodeAnnouncedFactBody,\n decodeAnnouncedFactBodyHandles,\n });\n}\n\n/** @type {UnraisableHook} */\nfunction defaultUnraisableHook(error, where) {\n console.error(`@ds-lang/ds: exception ignored in the ${where} callback:`, error);\n}\n\n/** @type {UnraisableHook} */\nlet hook = defaultUnraisableHook;\n\n/**\n * Replace where a throwing callback's exception is reported. null restores\n * the default, which prints to stderr. Returns the previous hook.\n * @param {UnraisableHook | null} fn\n * @returns {UnraisableHook}\n */\nfunction setUnraisableHook(fn) {\n if (fn !== null && typeof fn !== \"function\")\n throw new TypeError(\"setUnraisableHook: want a function or null\");\n const prev = hook;\n hook = fn ?? defaultUnraisableHook;\n return prev;\n}\n\n// \u2500\u2500 facts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** @type {(b: Glue, handle: FactHandle) => Fact} */\nlet makeFact;\n/** @type {(fact: Fact) => FactHandle} */\nlet handleOf;\n\n/**\n * A handle to one fact in one engine. Valid until the fact leaves working\n * memory (retracted, replaced by an upsert, or expired), after which `read`,\n * and passing it to the engine, throw DsError(DS_ERR_FACT_INVALID) instead of\n * reading freed memory. `id` and `alive` still answer.\n *\n * A Fact comes from its engine (`assert`, `factById`, a slot, an event) and is\n * never made directly.\n */\nexport class Fact {\n /** @type {Glue} */\n #b;\n /** @type {FactHandle} */\n #h;\n\n /**\n * @private\n * @param {Glue} b\n * @param {FactHandle} handle\n */\n constructor(b, handle) {\n this.#b = b;\n this.#h = handle;\n }\n\n static {\n makeFact = (b, handle) => new Fact(b, handle);\n handleOf = (fact) => fact.#h;\n }\n\n /** The engine's fact id: stable for the fact's life, never reused. */\n get id() { return this.#b.factId(this.#h); }\n\n /**\n * Whether the fact is still in working memory. After a replay that halted\n * the engine, nothing can say, and this stays true until `close`.\n */\n get alive() { return this.#b.factAlive(this.#h); }\n\n /**\n * The fact as it is now: `{ schema, id, slots }`.\n * @returns {FactRecord}\n */\n read() { return publicRecord(this.#b, this.#b.factRead(this.#h)); }\n}\n\n/**\n * A slot's value as the API gives it: a fact handle as a Fact, and bytes as a\n * plain Uint8Array (the glue returns a Buffer on Node, and the targets must\n * hand back the same type).\n * @param {Glue} b\n * @param {SlotValueOf<FactHandle>} v\n * @returns {SlotValue}\n */\nfunction publicValue(b, v) {\n if (v instanceof Uint8Array) return plainBytes(v);\n if (v !== null && typeof v === \"object\") return makeFact(b, v);\n return v;\n}\n\n/**\n * @param {Glue} b\n * @param {Record<string, SlotValueOf<FactHandle>>} slots\n * @returns {Record<string, SlotValue>}\n */\nfunction publicSlots(b, slots) {\n /** @type {Record<string, SlotValue>} */\n const out = {};\n for (const [k, v] of Object.entries(slots)) out[k] = publicValue(b, v);\n return out;\n}\n\n/**\n * @param {Glue} b\n * @param {FactRecordOf<FactHandle>} r\n * @returns {FactRecord}\n */\nfunction publicRecord(b, r) {\n return { schema: r.schema, id: r.id, slots: publicSlots(b, r.slots) };\n}\n\n/**\n * Slot values that are facts go in as their handles; everything else as is.\n * @param {Record<string, SlotValue>} slots\n * @returns {Record<string, SlotValueOf<FactHandle>>}\n */\nfunction glueSlots(slots) {\n if (slots === null || typeof slots !== \"object\" || Array.isArray(slots))\n throw new TypeError(\"slots: want an object of slot name -> value\");\n /** @type {Record<string, SlotValueOf<FactHandle>>} */\n const out = {};\n for (const [k, v] of Object.entries(slots)) out[k] = v instanceof Fact ? handleOf(v) : v;\n return out;\n}\n\n/**\n * Bytes as a plain Uint8Array: the glue's are a Buffer on Node.\n * @param {Uint8Array} v\n * @returns {Uint8Array}\n */\nfunction plainBytes(v) {\n return v.constructor === Uint8Array ? v : new Uint8Array(v);\n}\n\n/**\n * A call's arguments as the API gives them: a Json one, which the glue gives\n * as `{ json }`, as a JsonText, and bytes plain, a fact argument's included.\n * @param {Record<string, CallArgument | { json: string }>} args\n * @returns {Record<string, CallArgument>}\n */\nfunction plainArgs(args) {\n /** @type {Record<string, CallArgument>} */\n const out = {};\n for (const [k, v] of Object.entries(args)) {\n if (v instanceof Uint8Array) out[k] = plainBytes(v);\n else if (v === null || typeof v !== \"object\" || v instanceof JsonText) out[k] = v;\n else if (\"json\" in v) out[k] = new JsonText(v.json);\n else out[k] = { ...v, external: plainBytes(v.external) };\n }\n return out;\n}\n\n/**\n * A stream event as the API gives it: its fact handles as Facts, its bytes\n * plain. A fact's handle stays good while the fact is in working memory: the\n * one a fact_retract carries is readable during that callback and dead once\n * it returns.\n * @param {Glue} b\n * @param {StreamEventOf<FactHandle>} ev\n * @returns {StreamEvent}\n */\nfunction publicEvent(b, ev) {\n /** @type {Record<string, unknown>} */\n const out = { ...ev };\n if (\"fact\" in ev) out.fact = makeFact(b, ev.fact);\n if (\"lhsFacts\" in ev) out.lhsFacts = ev.lhsFacts.map((h) => makeFact(b, h));\n // A publish's slot values, copied in the callback ([NCBK.2.5]): a fact\n // reference among them is a Fact, as in a read.\n if (\"slots\" in ev) out.slots = publicSlots(b, ev.slots);\n if (\"args\" in ev) out.args = plainArgs(ev.args);\n if (\"external\" in ev) out.external = plainBytes(ev.external);\n // Every FactHandle the union carries is replaced above.\n return /** @type {StreamEvent} */ (/** @type {unknown} */ (out));\n}\n\n/**\n * An atom's field with every bytes value a plain Uint8Array, converted in\n * place: a message's fields, and a repeated field's items.\n * @param {AtomField} v\n * @returns {AtomField}\n */\nfunction plainField(v) {\n if (v instanceof Uint8Array) return plainBytes(v);\n if (Array.isArray(v)) {\n // A repeated field's items are one kind, and each converts to that kind.\n const items = /** @type {AtomField[]} */ (v);\n for (let i = 0; i < items.length; i++) items[i] = plainField(items[i]);\n return v;\n }\n if (typeof v === \"object\") {\n // A message, or an enum, whose `name` may be null.\n const fields = /** @type {Record<string, AtomField | null>} */ (v);\n for (const [k, f] of Object.entries(fields)) if (f !== null) fields[k] = plainField(f);\n }\n return v;\n}\n\n/**\n * @param {unknown} fn\n * @param {string} what\n */\nfunction wantCallback(fn, what) {\n if (fn != null && typeof fn !== \"function\")\n throw new TypeError(`${what}: want a function or null`);\n}\n\n/**\n * Report `error` as the platform reports an event listener's throw: thrown on\n * its own once the running call has returned, so it is the host's uncaught\n * exception. For a handler's failure that no call can throw.\n * @param {unknown} error\n */\nfunction reportUncaught(error) {\n queueMicrotask(() => { throw error; });\n}\n\n// \u2500\u2500 engines \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** @type {(b: Glue, h: EngineHandle) => Clock} */\nlet makeClock;\n\n/**\n * An engine's clock, live: each read gives the engine's clock as it is then.\n * The monotonic clock is integer nanoseconds. A mock clock moves only when the\n * host moves it, through `set` and `advance`; a live one moves with the host.\n *\n * A Clock comes from its engine (`engine.clock`) and is never made directly.\n */\nexport class Clock {\n /** @type {Glue} */\n #b;\n /** @type {EngineHandle} */\n #h;\n\n /**\n * @private\n * @param {Glue} b\n * @param {EngineHandle} h\n */\n constructor(b, h) {\n this.#b = b;\n this.#h = h;\n }\n\n static {\n makeClock = (b, h) => new Clock(b, h);\n }\n\n /**\n * \"live\" or \"mock\".\n * @returns {ClockMode}\n */\n get mode() { return this.#b.clockMode(this.#h); }\n\n /**\n * Setting \"mock\" starts the monotonic clock at 0 and leaves the wall\n * clock unset until `setWall`. DsError(DS_ERR_STATE) once the engine has\n * sampled its clock, for an input or a pump.\n * @param {ClockMode} mode\n */\n set mode(mode) { this.#b.clockSetMode(this.#h, mode); }\n\n /**\n * The monotonic clock, ns. Reading it is not a sample: it records nothing.\n * @returns {bigint}\n */\n get now() { return this.#b.clockNow(this.#h); }\n\n /**\n * The earliest deadline after the clock's current value, ns, or null: a\n * live timer's fire_at, a live fact's TTL expiry or a cache entry's expiry.\n * Reading it is not a sample: it records nothing.\n * @returns {bigint | null}\n */\n get nextDeadline() { return this.#b.clockNextDeadline(this.#h); }\n\n /**\n * Set the mock monotonic clock; DsError(DS_ERR_STATE) in live mode, and\n * below its current value once the engine has sampled it. Not a sample:\n * the next input or pump observes it.\n * @param {Int64} ns\n */\n set(ns) { this.#b.clockSet(this.#h, ns); }\n\n /**\n * Advance the mock monotonic clock, and the mock wall clock by the same\n * amount when it is set.\n * @param {Int64} ns\n */\n advance(ns) { this.#b.clockAdvance(this.#h, ns); }\n\n /**\n * Set the mock wall clock, UTC ns since the Unix epoch: any instant,\n * earlier or later, as a host clock can be stepped. DsError(DS_ERR_STATE)\n * in live mode.\n * @param {Int64} utcNs\n */\n setWall(utcNs) { this.#b.wallClockSet(this.#h, utcNs); }\n}\n\n/** @type {(b: Glue, h: EngineHandle, register: (handlers: WriteThrough | null) => void) => Cache} */\nlet makeCache;\n\n/**\n * An engine's cache, as the host reaches it: seeded before the first pump,\n * capped, and written through to the host's store. Rules read and write it;\n * the host does not read it.\n *\n * A Cache comes from its engine (`engine.cache`) and is never made directly.\n */\nexport class Cache {\n /** @type {Glue} */\n #b;\n /** @type {EngineHandle} */\n #h;\n /** @type {(handlers: WriteThrough | null) => void} */\n #register;\n /** @type {Readonly<WriteThrough> | null} */\n #writeThrough = null;\n\n /**\n * @private\n * @param {Glue} b\n * @param {EngineHandle} h\n * @param {(handlers: WriteThrough | null) => void} register\n */\n constructor(b, h, register) {\n this.#b = b;\n this.#h = h;\n this.#register = register;\n }\n\n static {\n makeCache = (b, h, register) => new Cache(b, h, register);\n }\n\n /**\n * Seed an entry before the first pump: `json` is its value as JSON text,\n * and `ttlNs` its TTL, 0 (the default) for none. A seed is not a write:\n * no action_cache_set event, and no write-through. DsError(DS_ERR_STATE)\n * after the first pump.\n * @param {string} key\n * @param {string} json\n * @param {{ ttlNs?: Int64 }} [options]\n */\n seed(key, json, { ttlNs = 0n } = {}) { this.#b.cacheSeed(this.#h, key, json, ttlNs); }\n\n /**\n * Cap the cache's keys and its bytes; each left out, or 0, is unbounded.\n * A write past either fails with DS_ERR_CONTRACT_BREACH and changes\n * nothing.\n * @param {{ keys?: Int64, bytes?: Int64 }} [caps]\n */\n setCap({ keys = 0n, bytes = 0n } = {}) { this.#b.setCacheCap(this.#h, keys, bytes); }\n\n /**\n * The write-through ([NCBK.7]), or null: `set` hears each write the rules\n * make, `delete` each entry that leaves, by a rule's `cache_delete` or its\n * TTL. Each is called with the object as `this`, as an event listener\n * object's `handleEvent` is. A handler that throws has failed the write:\n * the pump that ran it throws DsError(DS_ERR_ACTION_FAILED) with the\n * handler's exception as its `cause`, and the cache keeps the change. The\n * value read back is a frozen copy of the handlers as they were set.\n * @returns {Readonly<WriteThrough> | null}\n */\n get writeThrough() { return this.#writeThrough; }\n\n /** @param {WriteThrough | null} handlers */\n set writeThrough(handlers) {\n if (handlers !== null && typeof handlers !== \"object\")\n throw new TypeError(\"writeThrough: want { set, delete } or null\");\n this.#register(handlers);\n this.#writeThrough = handlers === null ? null\n : Object.freeze({ set: handlers.set ?? null, delete: handlers.delete ?? null });\n }\n}\n\n/**\n * A read-only map by name, as the platform's `readonly maplike` is: `get`,\n * `has`, `size`, iteration, and nothing that changes it. Built once from a\n * snapshot, its values frozen, so every reader sees the same entries.\n * @template V\n * @implements {ReadonlyMap<string, V>}\n */\nclass NameMap {\n /** @type {Map<string, V>} */\n #map;\n\n /** @param {Iterable<[string, V]>} entries */\n constructor(entries) { this.#map = new Map(entries); }\n\n get size() { return this.#map.size; }\n\n /** @param {string} name */\n get(name) { return this.#map.get(name); }\n\n /** @param {string} name */\n has(name) { return this.#map.has(name); }\n\n keys() { return this.#map.keys(); }\n\n values() { return this.#map.values(); }\n\n entries() { return this.#map.entries(); }\n\n /**\n * @param {(value: V, key: string, map: ReadonlyMap<string, V>) => void} fn\n * @param {unknown} [thisArg]\n */\n forEach(fn, thisArg) {\n for (const [k, v] of this.#map) fn.call(thisArg, v, k, this);\n }\n\n [Symbol.iterator]() { return this.#map[Symbol.iterator](); }\n}\n\n/**\n * `v`, and every object and array it holds, frozen.\n * @template T\n * @param {T} v\n * @returns {T}\n */\nfunction deepFrozen(v) {\n if (v !== null && typeof v === \"object\" && !Object.isFrozen(v)) {\n for (const x of Object.values(v)) deepFrozen(x);\n Object.freeze(v);\n }\n return v;\n}\n\n/**\n * Set by clone() for the one construction that adopts the handle it made,\n * since the constructor takes no handle.\n * @type {EngineHandle | null}\n */\nlet adopting = null;\n\n/**\n * One libds engine, on this realm's libds. `close()` frees it, as `using`\n * does where the platform has `Symbol.dispose`.\n *\n * An EventTarget (TAG \u00A77.4): its stream is an event per stream event, of the\n * event's kind, and its log and metric records are \"log\" and \"metric\" events.\n * A listener that throws is reported as the platform reports any listener's\n * throw, the listeners after it still run, and the engine carries on.\n */\nexport class Engine extends EventTarget {\n /** @type {Glue} */\n #b;\n /** @type {EngineHandle} */\n #h;\n /**\n * The functions the glue calls. It holds them weakly (a strong hold would\n * be a GC root, and a callback closing over its own Engine would keep the\n * engine alive forever), so the Engine holds them here.\n * @type {Map<string, unknown>}\n */\n #cbs = new Map();\n /** @type {{ sink: (bytes: Uint8Array) => void, file: FileSink | null } | null} */\n #rec = null;\n /** @type {Clock} */\n #clock;\n /** @type {Cache} */\n #cache;\n /**\n * The handlers' failures during the running pump or loadDsc, for the\n * DsError it throws; null outside one.\n * @type {unknown[] | null}\n */\n #failures = null;\n /**\n * The snapshots `schemas`, `rules` and `lineSpans` give, made at the\n * first read after a change. Only loadDsc and replayStream change\n * them, and each clears them, as close does.\n * @type {NameMap<SchemaInfo> | null}\n */\n #schemas = null;\n /** @type {NameMap<RuleMeta> | null} */\n #rules = null;\n /** @type {readonly LineSpan[] | null} */\n #lineSpans = null;\n /**\n * The handler properties' functions, and the listener each was added as.\n * @type {Map<string, { handler: Function, listener: (event: Event) => void }>}\n */\n #handlers = new Map();\n\n /**\n * An empty engine. Throws until this realm has opened libds.\n *\n * `runId` and `tierId` are the engine's identity, the integrator's to give\n * ([NLFC.1.2]): the stream header records them, and each `event_id` derives\n * from them. Absent, null or `\"\"`, the engine has none.\n * @param {{ runId?: string | null, tierId?: string | null }} [options]\n */\n constructor(options = {}) {\n super();\n const b = loadedGlue();\n this.#b = b;\n this.#h = adopting ?? b.newEngine(options.runId ?? null, options.tierId ?? null);\n adopting = null;\n this.#clock = makeClock(b, this.#h);\n this.#cache = makeCache(b, this.#h, (handlers) => this.#setWriteThrough(handlers));\n }\n\n /**\n * An independent copy of this engine ([NLFC.8]): facts, working memory,\n * series, cache, clock and counters, sharing nothing. It starts with NO\n * listeners or callbacks: add them to the clone before pumping it ([NLFC.8.3]).\n * Refused mid-pump, inside a callback, and in real-time mode. Facts of this\n * engine are not facts of the clone.\n * @returns {Engine}\n */\n clone() {\n adopting = this.#b.clone(this.#h);\n return new Engine();\n }\n\n /**\n * Record this engine's fact stream through the C recorder, as the\n * canonical RFCS stream. `target` is a path (each atom is written as it is\n * framed, so the file can be read while the recording runs) or a function\n * that receives each atom as a Uint8Array. The recorder is chained beside\n * the engine's stream events, which keep coming. One recording at a\n * time.\n *\n * The stream's header and its schema announcements are written at the\n * engine's first stream event, or by `recordTo` itself if the engine has\n * already had one ([RFCS.5.1]). A sink that throws while `recordTo` writes\n * them makes `recordTo` throw; one that throws later stops the recording,\n * and `stopRecording` throws, with the sink's error as its `cause`.\n * @param {string | ((bytes: Uint8Array) => void)} target\n */\n recordTo(target) {\n if (this.#rec) throw new DsError(status.DS_ERR_STATE, \"recordTo: already recording; stopRecording first\");\n /** @type {FileSink | null} */\n let file = null;\n /** @type {(bytes: Uint8Array) => void} */\n let sink;\n if (typeof target === \"function\") {\n sink = target;\n } else if (typeof target === \"string\") {\n const open = realmHost?.file ?? null;\n if (open === null)\n throw new TypeError(\"recordTo: a path needs a file system, which this host has none of; \"\n + \"give a sink function\");\n // A closed engine refuses here, ahead of the open, which truncates.\n this.#b.halted(this.#h);\n const f = open(target);\n file = f;\n sink = (bytes) => { f.write(bytes); };\n } else {\n throw new TypeError(\"recordTo: want a path or a sink function\");\n }\n // The glue holds the sink weakly, as it holds callbacks.\n this.#rec = { sink, file };\n try {\n this.#b.recordTo(this.#h, sink);\n } catch (err) {\n this.#rec = null;\n file?.close();\n throw err;\n }\n }\n\n /**\n * Stop recording and report: the recorder's first error, if it had one, is\n * thrown as a DsError (a sink's own throw as its `cause`). Idempotent.\n */\n stopRecording() {\n const rec = this.#rec;\n this.#rec = null;\n try {\n this.#b.stopRecording(this.#h);\n } finally {\n rec?.file?.close();\n }\n }\n\n /**\n * Replay an RFCS stream through the C replayer: a Uint8Array, or an\n * iterable of Uint8Array chunks with any boundaries. Inputs are delivered,\n * the rules re-fire, and every re-derived compare atom is checked against\n * the record ([LFST.9.6]); there is no apply-only form. Listeners and a\n * running recording hear no event of the replay, and hear events again\n * once it ends, however it ends, unless it halted the engine, which emits\n * none after that. While `source` is being iterated, a\n * `Fact`'s `read()` and passing a `Fact` to the engine throw\n * `DS_ERR_STATE`.\n * @param {Uint8Array | Iterable<Uint8Array>} source\n * @param {{ maxAtomBytes?: number }} [options]\n * @returns {ReplayCounts}\n */\n replayStream(source, { maxAtomBytes = 0 } = {}) {\n const chunks = source instanceof Uint8Array ? [source] : source;\n if (chunks == null || typeof chunks[Symbol.iterator] !== \"function\")\n throw new TypeError(\"replayStream: want a Uint8Array or an iterable of them\");\n // A stream can announce schemas, so the snapshots are made again.\n this.#forgetProgram();\n const r = this.#b.replayBegin(this.#h, maxAtomBytes);\n try {\n for (const chunk of chunks) this.#b.replayFeed(r, chunk);\n } catch (err) {\n try { this.#b.replayFinish(r); } catch { /* the feed's error is the one to report */ }\n this.#forgetProgram();\n throw err;\n }\n /** @type {ReplayCounts & { tailBytes: bigint }} */\n let finished;\n try {\n finished = this.#b.replayFinish(r);\n } finally {\n this.#forgetProgram();\n }\n const { tailBytes, ...counts } = finished;\n // replayStream is handed the whole stream, so a partial trailing atom\n // is a truncated stream, refused as ds_rfcs_replay refuses one. (The\n // chunked C reader reports it and lets the caller say.)\n if (tailBytes > 0n)\n throw new DsError(status.DS_ERR_PARSE, `the stream ends inside an atom (${tailBytes} bytes of it)`);\n return counts;\n }\n\n /**\n * A FactAssert or FactEmit atom's `fact` bytes, typed by this engine's\n * schema `schema` (`ds_rfcs_decode_fact_body`): the slots as a fact's\n * `read()` gives them.\n * @param {string} schema\n * @param {Uint8Array} body\n * @returns {Record<string, SlotValue>}\n */\n decodeFactBody(schema, body) {\n return publicSlots(this.#b, this.#b.decodeFactBody(this.#h, schema, body));\n }\n\n /**\n * The session's header (LFST.4): a snapshot, made at each read.\n * @returns {SessionHeader}\n */\n get sessionHeader() {\n const h = this.#b.sessionHeader(this.#h);\n return { ...h, dscHash: h.dscHash === null ? null : plainBytes(h.dscHash) };\n }\n\n /**\n * The run id this engine was given, or null.\n * @returns {string | null}\n */\n get runId() {\n return this.#b.runId(this.#h);\n }\n\n /**\n * The tier id this engine was given, or null.\n * @returns {string | null}\n */\n get tierId() {\n return this.#b.tierId(this.#h);\n }\n\n /**\n * Release the engine now. Idempotent. A later call on it throws\n * DsError(DS_ERR_STATE), and passing or reading one of its Facts\n * DsError(DS_ERR_FACT_INVALID). Reading `clock`, `cache` or `writeThrough`\n * does not throw.\n */\n close() {\n this.#b.close(this.#h); // detaches the recorder, unchecked\n this.#cbs.clear();\n this.#forgetProgram(); // a closed engine's `schemas` throws, as its other reads do\n this.#rec?.file?.close();\n this.#rec = null;\n }\n\n /** `close`, for `using`, where the platform has `Symbol.dispose`. */\n [Symbol.dispose]() { this.close(); }\n\n /**\n * @param {CallbackName} name\n * @param {unknown} fn what the caller passed, checked here\n * @param {((...args: never[]) => unknown) | null} f what the glue calls\n */\n #setCallback(name, fn, f) {\n wantCallback(fn, name);\n this.#b.setCallback(this.#h, name, f);\n this.#cbs.set(name, f);\n }\n\n /**\n * @template {keyof EngineEventMap} K\n * @overload\n * @param {K} type\n * @param {((event: EngineEventMap[K]) => void) | null} listener\n * @param {boolean | AddEventListenerOptions} [options]\n * @returns {void}\n */\n /**\n * @overload\n * @param {string} type\n * @param {EventListenerOrEventListenerObject | null} listener\n * @param {boolean | AddEventListenerOptions} [options]\n * @returns {void}\n */\n /**\n * Listen for an event, as EventTarget does: a stream kind\n * (STREAM_EVENT_KINDS), \"log\" or \"metric\". The first listener for the\n * stream, for the log or for metrics has libds deliver them from then on,\n * so an engine nobody listens to pays nothing for them.\n * @param {string} type\n * @param {EventListenerOrEventListenerObject | null} listener\n * @param {boolean | AddEventListenerOptions} [options]\n */\n addEventListener(type, listener, options) {\n // libds first, so an engine that refuses (a closed one) adds nothing.\n if (listener != null) this.#deliver(type);\n super.addEventListener(type, listener, options);\n }\n\n /**\n * @template {keyof EngineEventMap} K\n * @overload\n * @param {K} type\n * @param {((event: EngineEventMap[K]) => void) | null} listener\n * @param {boolean | EventListenerOptions} [options]\n * @returns {void}\n */\n /**\n * @overload\n * @param {string} type\n * @param {EventListenerOrEventListenerObject | null} listener\n * @param {boolean | EventListenerOptions} [options]\n * @returns {void}\n */\n /**\n * Stop listening, as EventTarget does.\n * @param {string} type\n * @param {EventListenerOrEventListenerObject | null} listener\n * @param {boolean | EventListenerOptions} [options]\n */\n removeEventListener(type, listener, options) {\n super.removeEventListener(type, listener, options);\n }\n\n /**\n * Have libds deliver what a listener of `type` hears. Once on, it stays on\n * until close: a listener a `once` or an AbortSignal removes tells no one,\n * so the listeners left cannot be counted.\n * @param {string} type\n */\n #deliver(type) {\n const b = this.#b;\n if (Object.hasOwn(KINDS, type)) {\n if (this.#cbs.has(\"stream\")) return;\n const f = (/** @type {StreamEventOf<FactHandle>} */ ev) => {\n const { kind, ...fields } = publicEvent(b, ev);\n this.dispatchEvent(new EngineEvent(kind, fields));\n };\n b.setCallback(this.#h, \"stream\", f);\n this.#cbs.set(\"stream\", f);\n } else if ((type === \"log\" || type === \"metric\") && !this.#cbs.has(type)) {\n const f = (/** @type {LogRecord | Metric} */ r) => { this.dispatchEvent(new EngineEvent(type, r)); };\n b.setCallback(this.#h, type, f);\n this.#cbs.set(type, f);\n }\n }\n\n /**\n * A handler property's setter: the listener it added goes, and `fn`, if\n * it is a function, is added in its place. Anything else clears it, as\n * the platform's handler properties do.\n * @param {\"log\" | \"metric\"} type\n * @param {unknown} fn\n */\n #setHandler(type, fn) {\n const old = this.#handlers.get(type);\n if (old !== undefined) super.removeEventListener(type, old.listener);\n this.#handlers.delete(type);\n if (typeof fn !== \"function\") return;\n const listener = (/** @type {Event} */ event) => { fn.call(this, event); };\n this.#handlers.set(type, { handler: fn, listener });\n this.addEventListener(type, listener);\n }\n\n /**\n * The \"log\" events' handler (TAG \u00A77.5), or null: the log records libds\n * reports, as a listener added for \"log\" hears them.\n * @returns {((event: LogEngineEvent) => void) | null}\n */\n get onlog() {\n const fn = this.#handlers.get(\"log\")?.handler ?? null;\n return /** @type {((event: LogEngineEvent) => void) | null} */ (fn);\n }\n\n /** @param {((event: LogEngineEvent) => void) | null} fn */\n set onlog(fn) { this.#setHandler(\"log\", fn); }\n\n /**\n * The \"metric\" events' handler, or null.\n * @returns {((event: MetricEngineEvent) => void) | null}\n */\n get onmetric() {\n const fn = this.#handlers.get(\"metric\")?.handler ?? null;\n return /** @type {((event: MetricEngineEvent) => void) | null} */ (fn);\n }\n\n /** @param {((event: MetricEngineEvent) => void) | null} fn */\n set onmetric(fn) { this.#setHandler(\"metric\", fn); }\n\n /**\n * A rule's `call`. The reply is a fact of the service's response schema,\n * asserted after the pump.\n * @param {((request: CallRequest) => void) | null} fn\n */\n setCallCallback(fn) {\n this.#setCallback(\"call\", fn, fn == null ? null\n : (/** @type {CallRequest} */ req) => fn({ ...req, args: plainArgs(req.args) }));\n }\n\n /**\n * A handler of the host's, for the glue: its throw is kept for the\n * DsError the running pump or loadDsc throws, or, where no call can throw\n * it (`uncaught`, or none running), reported as uncaught. Either way it is\n * thrown on, so libds hears that the handler failed, and the glue\n * reports it nowhere else.\n * @template {unknown[]} A\n * @param {(...args: A) => void} fn\n * @param {boolean} [uncaught]\n * @returns {(...args: A) => void}\n */\n #duty(fn, uncaught = false) {\n return (...args) => {\n try {\n fn(...args);\n } catch (err) {\n if (uncaught || this.#failures === null) reportUncaught(err);\n else this.#failures.push(err);\n throw err;\n }\n };\n }\n\n // NO sampleSink AND NO seriesProvisioner: there is no samples plane, and\n // NSTG.5 is deferred.\n\n /**\n * The engine's cache: the same Cache at every read.\n * @returns {Cache}\n */\n get cache() { return this.#cache; }\n\n /**\n * Cache's `writeThrough` setter: each handler called with the object as\n * `this`, and one record argument. libds registers the pair as one.\n * @param {WriteThrough | null} handlers\n */\n #setWriteThrough(handlers) {\n const set = handlers?.set ?? null, del = handlers?.delete ?? null;\n wantCallback(set, \"writeThrough.set\");\n wantCallback(del, \"writeThrough.delete\");\n const s = set === null ? null : this.#duty(\n (/** @type {string} */ key, /** @type {string | null} */ value, /** @type {bigint} */ ttlNs) => {\n set.call(handlers, { key, value, ttlNs });\n });\n const d = del === null ? null : this.#duty(\n (/** @type {string} */ key, /** @type {CacheRemoval[\"reason\"]} */ reason) => {\n del.call(handlers, { key, reason });\n });\n this.#b.setCacheCallbacks(this.#h, s, d);\n this.#cbs.set(\"cacheSet\", s);\n this.#cbs.set(\"cacheDelete\", d);\n }\n\n /**\n * Run `op`, a libds call that may run the host's handlers. The DsError it\n * throws carries the first handler's failure as its `cause`; any other\n * failure, which no call is left to throw, is reported as uncaught.\n * @template T\n * @param {() => T} op\n * @returns {T}\n */\n #withHandlers(op) {\n const outer = this.#failures;\n /** @type {unknown[]} */\n const failures = [];\n this.#failures = failures;\n try {\n return op();\n } catch (err) {\n if (!(err instanceof DsError) || failures.length === 0) throw err;\n throw new DsError(err.status, err.detail, { cause: failures.shift() });\n } finally {\n this.#failures = outer;\n for (const f of failures) reportUncaught(f);\n }\n }\n\n /**\n * Load a compiled `.dsc`. A load that fails once it has begun reading\n * spends the engine ([RDSC.9.8]): `halted` is 0, no engine error, and\n * every later call but `halted`, the platform signature, the session\n * header and close throws DS_ERR_ENGINE_HALTED.\n * @param {Uint8Array} bytes\n */\n loadDsc(bytes) {\n try {\n this.#withHandlers(() => this.#b.loadDsc(this.#h, bytes));\n } finally {\n this.#forgetProgram();\n }\n }\n\n /**\n * The engine's schemas by name, its internal ones included: a snapshot\n * of the program as loaded, the same map at every read until loadDsc\n * or replayStream changes the schemas. Its schemas are frozen.\n * @returns {ReadonlyMap<string, SchemaInfo>}\n */\n get schemas() {\n if (this.#schemas === null) {\n const b = this.#b, h = this.#h, n = b.schemaCount(h);\n /** @type {Array<[string, SchemaInfo]>} */\n const all = [];\n for (let i = 0; i < n; i++) {\n const s = deepFrozen(b.schemaAt(h, i));\n all.push([s.name, s]);\n }\n this.#schemas = new NameMap(all);\n }\n return this.#schemas;\n }\n\n /**\n * A number in the unit a slot names, as the number the slot stores\n * ([NFCT.1.4.6]): what `value::<unit>` gives a rule, which assert takes.\n * An Int is a BigInt or a safe integer Number and comes back a BigInt; a\n * Float is a Number. Changes nothing. Throws a DsError:\n * DS_ERR_SCHEMA_UNKNOWN or DS_ERR_SLOT_UNKNOWN for a name the engine has\n * no schema or slot by, DS_ERR_INVAL for a slot that names no unit,\n * DS_ERR_SLOT_TYPE_MISMATCH, DS_ERR_NAN_REJECTED, and\n * DS_ERR_NOT_REPRESENTABLE where the conversion has no result for the\n * number.\n * @param {string} schema\n * @param {string} slot\n * @param {bigint | number} value\n * @returns {bigint | number}\n */\n slotToStored(schema, slot, value) {\n return this.#b.slotConvert(this.#h, schema, slot, value, true);\n }\n\n /**\n * A number a slot stores, in the unit the slot names: what a kwarg of\n * that unit receives ([NFCT.1.4.6]). The inverse of slotToStored, taken\n * and refused as it is.\n * @param {string} schema\n * @param {string} slot\n * @param {bigint | number} value\n * @returns {bigint | number}\n */\n slotFromStored(schema, slot, value) {\n return this.#b.slotConvert(this.#h, schema, slot, value, false);\n }\n\n /**\n * The program's rules' metadata by rule name: a snapshot, as `schemas`\n * is, made again after loadDsc or replayStream. Its entries are frozen.\n * @returns {ReadonlyMap<string, RuleMeta>}\n */\n get rules() {\n if (this.#rules === null) {\n const b = this.#b, h = this.#h, n = b.ruleMetaCount(h);\n /** @type {Array<[string, RuleMeta]>} */\n const all = [];\n for (let i = 0; i < n; i++) {\n const m = deepFrozen(b.ruleMetaAt(h, i));\n all.push([m.ruleName, m]);\n }\n this.#rules = new NameMap(all);\n }\n return this.#rules;\n }\n\n /**\n * Where each attributed node comes from ([NDBG.3.1]): the program's line\n * spans, in the artefact's order, a frozen snapshot as `rules` is. A node\n * id is unique in a program, so a node has at most one span; an alpha has\n * none ([RDSC.14.3.6]). Empty before a load.\n * @returns {readonly LineSpan[]}\n */\n get lineSpans() {\n if (this.#lineSpans === null) {\n const b = this.#b, h = this.#h, n = b.lineSpanCount(h);\n /** @type {LineSpan[]} */\n const all = [];\n for (let i = 0; i < n; i++) all.push(deepFrozen(b.lineSpanAt(h, i)));\n this.#lineSpans = Object.freeze(all);\n }\n return this.#lineSpans;\n }\n\n /**\n * The line span of the node `nodeId`, as `reteNetwork()` and a fault\n * event name it ([NDBG.3.2]). A node with no span, an alpha among them,\n * throws a DsError with DS_ERR_NOT_FOUND ([NDBG.7.1]).\n * @param {number} nodeId\n * @returns {LineSpan}\n */\n lineSpan(nodeId) {\n if (!Number.isInteger(nodeId) || nodeId < 0 || nodeId > 0xFFFF_FFFF)\n throw new TypeError(`lineSpan: want a node id, a uint32, not ${nodeId}`);\n return deepFrozen(this.#b.lineSpanFind(this.#h, nodeId));\n }\n\n /** The schemas, rules and spans have changed, or may have: read them again. */\n #forgetProgram() {\n this.#schemas = null;\n this.#rules = null;\n this.#lineSpans = null;\n }\n\n /**\n * Assert a fact: slots by name. An omitted nullable slot is null. Its\n * TTL is its schema's: there is no per-fact TTL.\n * @param {string} schema\n * @param {Record<string, SlotValue>} slots\n * @returns {Fact}\n */\n assert(schema, slots) {\n const b = this.#b;\n return makeFact(b, b.assert(this.#h, schema, glueSlots(slots)));\n }\n\n /**\n * Assert a fact another engine handed out, from its FactExternal bytes\n * (NCBK.10.4): a fact argument's `external`, or an `action_publish`\n * event's. Takes the bytes, or the FactArgument itself. Its references\n * resolve against this engine's working memory, and a refusal throws a\n * DsError with nothing asserted: DS_ERR_PARSE, DS_ERR_SCHEMA_UNKNOWN,\n * DS_ERR_SCHEMA_HASH_MISMATCH or DS_ERR_FACT_REF_CONFLICT. libds returns\n * no fact, so neither does this: what it asserted is in the stream.\n * @param {Uint8Array | FactArgument} data\n */\n assertExternal(data) {\n const bytes = data instanceof Uint8Array ? data : data?.external;\n if (!(bytes instanceof Uint8Array))\n throw new TypeError(\"assertExternal: want a Uint8Array or a fact argument\");\n this.#b.assertExternal(this.#h, bytes);\n }\n\n /**\n * Apply one recorded ExternalAssert as libds's replayer does ([RFCS.24.2],\n * `ds_rfcs_apply_external_assert`): `body` is the atom's body as framed in\n * the stream (`readAtoms` gives where). One input: its fact delivered as a\n * received FactExternal is, the recorded `ttl_ns` on the received fact,\n * and no pump. `factIds[i]` is this engine's id for the recorded\n * `recordedIds[i]`, in [RFCS.24.3]'s order, which is how a later\n * FactRetract's recorded id finds its fact. Throws a DsError:\n * DS_ERR_FS_DIVERGENCE when the delivery refuses or asserts a different\n * number of facts than the record lists, DS_ERR_PARSE for a malformed body,\n * DS_ERR_STATE or DS_ERR_ENGINE_HALTED for an engine that cannot take an\n * input now.\n * @param {Uint8Array} body\n * @returns {ExternalAssertApplied}\n */\n applyExternalAssert(body) {\n if (!(body instanceof Uint8Array))\n throw new TypeError(\"applyExternalAssert: want the atom's body, a Uint8Array\");\n return this.#b.applyExternalAssert(this.#h, body);\n }\n\n /**\n * Retract a fact: a Fact, or a fact id, as the introspection calls take\n * either. A Fact that has left working memory is refused with\n * DS_ERR_FACT_INVALID, and an id no live fact has with DS_ERR_NOT_FOUND.\n * An id is found by walking working memory, O(live facts).\n * @param {Fact | Int64} fact\n */\n retract(fact) {\n const b = this.#b;\n if (fact instanceof Fact) {\n b.retract(this.#h, handleOf(fact));\n return;\n }\n const h = b.factById(this.#h, fact);\n if (h === null) throw new DsError(status.DS_ERR_NOT_FOUND, `retract: no live fact has id ${fact}`);\n b.retract(this.#h, h);\n }\n\n /**\n * Every live fact, or `schema`'s, as Facts: a snapshot, unordered. Sort by\n * `id` if order matters.\n * @param {{ schema?: string | null }} [options]\n * @returns {Fact[]}\n */\n facts({ schema = null } = {}) {\n const b = this.#b;\n return b.facts(this.#h, schema).map((h) => makeFact(b, h));\n }\n\n /**\n * How many facts are in working memory.\n * @returns {number}\n */\n get factCount() { return this.#b.factCount(this.#h); }\n\n /**\n * null while the engine runs. Once an engine error has halted it, every\n * call but this, the platform signature and the session header throws\n * DS_ERR_ENGINE_HALTED, reads of its state\n * included ([NCBK.2.9]), and this is the fault that did\n * it: the EngineFault number, as the engine_error event's `engineFault`\n * ([NCBK.2.11]). Still answers on a halted engine, so the cause is readable\n * without a stream listener. An engine a failed load spent ([RDSC.9.8])\n * reads 0, UNSPECIFIED: no engine error was raised. Test it against null.\n */\n get halted() { return this.#b.halted(this.#h); }\n\n /**\n * The live fact with this engine-local id, or null. A clone's facts have\n * handles of their own: this is how a fact asserted before a clone is\n * retracted in it. Walks working memory, O(live facts).\n * @param {Int64} id\n * @returns {Fact | null}\n */\n factById(id) {\n const h = this.#b.factById(this.#h, id);\n return h === null ? null : makeFact(this.#b, h);\n }\n\n /**\n * The Rete structures' bytes. A method, not a property: it walks the\n * engine's structures to answer.\n * @returns {MemoryReport}\n */\n memory() { return this.#b.mem(this.#h); }\n\n /**\n * Run the agenda to exhaustion. Rules fire only here. A handler of the\n * cache's write-through that throws fails it: the DsError carries the\n * handler's exception as its `cause`.\n */\n pump() { this.#withHandlers(() => this.#b.pump(this.#h)); }\n\n /**\n * The engine's clock: the same Clock at every read, and live.\n * @returns {Clock}\n */\n get clock() { return this.#clock; }\n\n /**\n * The platform signature ([LDET.2.3]): a snapshot, made at each read.\n * @returns {PlatformSignature}\n */\n get platformSignature() { return this.#b.platformSignature(this.#h); }\n\n // NO seriesValue: no public function reads a series ([NSBK.6.3]).\n // A series' values reach the host through what rules do with them.\n\n // NO registerSchema: a schema reaches the engine from a compiled\n // artefact and in no other way ([NFCT.1.1]), through loadDsc.\n\n /**\n * The activations that logically support a fact; empty for a fact nothing\n * derived.\n * @param {Fact | Int64} fact a Fact, or a fact id\n * @returns {Justifier[]}\n */\n justifiers(fact) { return this.#b.getJustifiers(this.#h, factId(fact)); }\n\n /**\n * The Rete network, optionally only what one rule reaches.\n * @param {{ ruleFilter?: string | null, includeOccupancy?: boolean }} [options]\n * @returns {ReteNetwork}\n */\n reteNetwork({ ruleFilter = null, includeOccupancy = false } = {}) {\n return this.#b.reteNetwork(this.#h, ruleFilter, includeOccupancy);\n }\n\n /**\n * A fact's path through the alpha network.\n * @param {Fact | Int64} fact a Fact, or a fact id\n * @returns {MatchStep[]}\n */\n reteMatchTrace(fact) { return this.#b.reteMatchTrace(this.#h, factId(fact)); }\n\n /**\n * Activations refraction blocked this cycle.\n * @param {string | null} [ruleFilter]\n * @returns {Refraction[]}\n */\n refractedActivations(ruleFilter = null) { return this.#b.refractedActivations(this.#h, ruleFilter); }\n}\n\n// A platform with no `Symbol.dispose` named that method \"undefined\".\nif (typeof Symbol.dispose !== \"symbol\") Reflect.deleteProperty(Engine.prototype, \"undefined\");\n\n/**\n * A Fact, or a fact id: the introspection calls take either.\n * @param {Fact | Int64} fact\n * @returns {Int64}\n */\nfunction factId(fact) { return fact instanceof Fact ? fact.id : fact; }\n\n// \u2500\u2500 reading streams, and compiling \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * Every atom of a trace or a .dsc, read by libds (no codec here).\n *\n * A fact's typed slots are the `fact` bytes: `engine.decodeFactBody` types\n * them by a program's schema, and `decodeAnnouncedFactBody` by the stream's\n * own `Slot` atoms. `incremental` reads a stream that may still be growing: a partial\n * trailing atom stops the read with `incomplete` true and `end` where it\n * starts ([RFCS.19.2]). Otherwise it is an error, and the atoms before it are\n * still returned.\n * @param {Uint8Array} bytes\n * @param {{ incremental?: boolean }} [options]\n * @returns {AtomsRead}\n */\nfunction readAtoms(bytes, { incremental = false } = {}) {\n const r = loadedGlue().readAtoms(bytes, incremental);\n for (const a of r.atoms) if (a.body !== null) plainField(a.body);\n return r;\n}\n\n/**\n * The proto message an atom's body is (\"FactAssert\" for FactAssert's field\n * number), or null for a field number this build has no entry for.\n * @param {number} field an integer in 0..2^32-1\n * @returns {string | null}\n */\nfunction messageName(field) {\n if (typeof field !== \"number\" || !Number.isInteger(field))\n throw new TypeError(\"messageName: want an atom's field number, an integer\");\n if (field < 0 || field > 0xffffffff)\n throw new RangeError(`messageName: field number ${field} is outside 0..2^32-1`);\n return loadedGlue().messageName(field);\n}\n\n/**\n * A FactAssert or FactEmit atom's `fact` bytes, typed by the stream's own\n * announcement of the schema, its `Slot` atoms in order\n * (`ds_rfcs_decode_announced_fact_body`, [RFCS.5.1]): what a reader holding\n * no program types a body by. The values are those `engine.decodeFactBody`\n * gives by the program's schema. A fact-ref slot is refused (DS_ERR_INVAL):\n * its handle names a fact only within its stream ([RFCS.4]);\n * `decodeAnnouncedFactBodyHandles` gives it as recorded.\n * @param {AnnouncedSlot[]} slots `kind` is `Slot.kind`'s number\n * @param {Uint8Array} body\n * @returns {Record<string, SlotValue>}\n */\nfunction decodeAnnouncedFactBody(slots, body) {\n checkAnnounced(\"decodeAnnouncedFactBody\", slots, body);\n const b = loadedGlue();\n return publicSlots(b, b.decodeAnnouncedFactBody(slots, body));\n}\n\n/**\n * `decodeAnnouncedFactBody`, with each fact-ref slot as the stream recorded\n * it (`ds_rfcs_decode_announced_fact_body_handles`): `slots` holds\n * every other slot, as that call gives it, and `refs` each fact-ref slot,\n * its recorded handle, or null where a nullable one is absent. [RFCS.6.3]:\n * the handle is the `fact_id` of the earlier record in the same stream that\n * carried the referenced fact; it names nothing outside that stream.\n * @param {AnnouncedSlot[]} slots `kind` is `Slot.kind`'s number\n * @param {Uint8Array} body\n * @returns {AnnouncedBody}\n */\nfunction decodeAnnouncedFactBodyHandles(slots, body) {\n checkAnnounced(\"decodeAnnouncedFactBodyHandles\", slots, body);\n const b = loadedGlue();\n const got = b.decodeAnnouncedFactBodyHandles(slots, body);\n return { slots: publicSlots(b, got.slots), refs: got.refs };\n}\n\n/**\n * What both announced decodes take, refused before libds with a TypeError\n * naming `fn` where it is not that.\n * @param {string} fn\n * @param {unknown} slots\n * @param {unknown} body\n */\nfunction checkAnnounced(fn, slots, body) {\n if (!Array.isArray(slots))\n throw new TypeError(`${fn}: want an array of announced slots`);\n for (const s of slots) {\n if (s === null || typeof s !== \"object\" || typeof s.name !== \"string\")\n throw new TypeError(`${fn}: each slot wants a name, a string`);\n if (typeof s.kind !== \"number\" || !Number.isInteger(s.kind) || s.kind < 0 || s.kind > 0xffffffff)\n throw new TypeError(`${fn}: slot ${s.name}'s kind is not a SlotKind number`);\n if (typeof s.nullable !== \"boolean\")\n throw new TypeError(`${fn}: slot ${s.name}'s nullable is not a boolean`);\n }\n if (!(body instanceof Uint8Array))\n throw new TypeError(`${fn}: want a Uint8Array body`);\n}\n\n/**\n * Compile, then a fresh Engine with it loaded; a Promise of one where\n * compiling is async.\n * @param {Host[\"compile\"]} compile\n * @param {string} source\n * @param {unknown} options the compiler's, passed on as given\n * @returns {Engine | Promise<Engine>}\n */\nfunction fromSource(compile, source, options) {\n /** @param {Uint8Array} dsc */\n const load = (dsc) => {\n const e = new Engine();\n try {\n e.loadDsc(dsc);\n } catch (err) {\n e.close();\n throw err;\n }\n return e;\n };\n const dsc = compile(source, /** @type {never} */ (options));\n return dsc instanceof Uint8Array ? load(dsc) : dsc.then(load);\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// The compiler's wasm runner: ds_dsc, the Mercury `dsc` built for\n// wasm32, run with the SAME argv the native runner gives the binary\n// (compile.js), so the two are one command line with two runners. Nothing from Node: it runs in a page and under Node\n// alike.\n//\n// ONE INSTANCE PER COMPILE: Mercury's runtime keeps global state and\n// `main` exits, so each compile instantiates the module afresh. Standard input\n// and output are bytes, through Emscripten's `FS.init`: the source goes in on\n// stdin, the `.dsc` comes back on stdout, exactly as the binary's pipes carry\n// them. Files the compile reads (`-L` directories) are\n// written into the instance's in-memory file system at the paths the argv\n// names. The module's own exit is caught, never allowed to end the process\n// (`quit`), nor to set its exit code.\n//\n// THE PROGRAM'S NAME IS GIVEN, NOT TAKEN: argv[0] is where the compiler finds\n// the standard library it ships with, `<its directory>/../share/ds/stdlib`\n// ([LIMP.3.3.1], [RCLI.1.11]), and under Node Emscripten would otherwise take\n// it from the host's own script (process.argv[1]). It is `program`, else\n// DEFAULT_PROGRAM.\n//\n// THE LIBRARY COMES WITH THE COMPILER: the\n// ds_dsc package's module exports `library`, every `.ds` file of the\n// standard library by its path below the library's root, generated from the\n// committed `stdlib/` when the package is made. Before `main`, this writes each\n// at `<program's directory>/../share/ds/stdlib/<path>`, so a page or Node\n// caller sets up nothing; a `dsc` that finds no library there refuses every\n// compile, exit 2. A caller's own `files` are written after, and win.\n\nimport { CompileRefused, InternalCompilerError } from \"./bind.js\";\n\n/** @import { ModuleSource, WasmCompileOptions } from \"./types.js\" */\n\n/**\n * The parts of an Emscripten module the runner uses.\n * @typedef {object} DscModule\n * @property {{\n * init: (stdin: () => number | null, stdout: (c: number | null) => void, stderr: (c: number | null) => void)\n * => void,\n * mkdirTree: (path: string) => void,\n * writeFile: (path: string, data: string | Uint8Array) => void,\n * }} FS\n * @property {(argv: string[]) => number | undefined} callMain\n */\n\n/** @typedef {(options: object) => Promise<DscModule>} DscFactory */\n\n/**\n * The directory part of a path, \".\" for none.\n * @param {string} p\n */\nconst dirOf = (p) => (p.includes(\"/\") ? p.slice(0, p.lastIndexOf(\"/\")) || \"/\" : \".\");\n\n/**\n * The directory a file's path needs made. Without `.` and `..`, which the file\n * system's mkdir refuses, and which it resolves when the file is written: a\n * caller's relative path, `cold.ds` or `../a.ds`, is a path like any other.\n * @param {string} p\n */\nconst dirToMake = (p) => dirOf(p).split(\"/\").filter((s) => s !== \".\" && s !== \"..\").join(\"/\") || \"/\";\n\n/** argv[0] when the caller names none: an absolute path, so `../share` is too. */\nexport const DEFAULT_PROGRAM = \"/ds_dsc/bin/dsc\";\n\n/**\n * The module factory and the library the package carries: given as the\n * module, a URL to import, or the bare factory. A bare factory carries no\n * library; the caller then writes one among `files`, or the compile is\n * refused ([RCLI.1.11]).\n * @param {ModuleSource | undefined | null} compiler\n * @returns {Promise<{ factory: DscFactory, library: Record<string, string> }>}\n */\nasync function compilerOf(compiler) {\n if (compiler === undefined || compiler === null)\n throw new Error(\"@ds-lang/ds: compiling under wasm needs ds_dsc, passed in as `compiler`\");\n const m = typeof compiler === \"string\" || compiler instanceof URL ? await import(String(compiler)) : compiler;\n const f = typeof m === \"function\" ? m : Reflect.get(m, \"default\");\n if (typeof f !== \"function\") throw new TypeError(\"@ds-lang/ds: `compiler` is not ds_dsc\");\n const lib = typeof m === \"function\" ? undefined : Reflect.get(m, \"library\");\n /** @type {Record<string, string>} */\n const library = {};\n if (lib !== undefined && lib !== null && typeof lib === \"object\") {\n for (const [rel, text] of Object.entries(lib)) {\n if (typeof text !== \"string\") throw new TypeError(`@ds-lang/ds: ds_dsc's library entry ${rel} is not text`);\n library[rel] = text;\n }\n }\n return { factory: f, library };\n}\n\n/**\n * Emscripten's own ExitStatus, which callMain throws when `main` exits.\n * @param {unknown} e\n * @returns {e is { name: \"ExitStatus\", status: number }}\n */\nfunction isExitStatus(e) {\n return e !== null && typeof e === \"object\" && Reflect.get(e, \"name\") === \"ExitStatus\"\n && typeof Reflect.get(e, \"status\") === \"number\";\n}\n\n/**\n * Run the compiler once: `{ status, stdout, stderr }`.\n * @param {ModuleSource} compiler ds_dsc: its factory, module, or URL\n * @param {string[]} argv as the binary takes it, without argv[0]\n * @param {object} [io]\n * @param {Uint8Array} [io.stdin]\n * @param {Record<string, string | Uint8Array>} [io.files] path -> contents, written before main\n * @param {Uint8Array | ArrayBuffer} [io.wasmBinary] the `.wasm`, rather than the module fetching it\n * @param {WebAssembly.Module} [io.wasmModule] the `.wasm` already compiled, so this run only instantiates\n * it: a caller that compiles often keeps one\n * @param {string} [io.program] argv[0], an absolute path, DEFAULT_PROGRAM if none: the compiler finds\n * the standard library at `<its directory>/../share/ds/stdlib` ([LIMP.3.3.1]), where the package's\n * own `library` is written\n * @returns {Promise<{ status: number, stdout: Uint8Array, stderr: string }>}\n */\nexport async function runDsc(compiler, argv,\n { stdin = new Uint8Array(0), files = {}, wasmBinary, wasmModule,\n program = DEFAULT_PROGRAM } = {}) {\n if (!program.startsWith(\"/\")) throw new TypeError(`@ds-lang/ds: \\`program\\` is ${program}, not an absolute path`);\n const { factory, library } = await compilerOf(compiler);\n const root = `${dirOf(dirOf(program))}/share/ds/stdlib`.replace(/^\\/\\//, \"/\");\n /** @type {number[]} */\n const out = [];\n /** @type {number[]} */\n const err = [];\n let at = 0;\n class Quit extends Error {\n /** @param {number} status */\n constructor(status) {\n super(`exit ${status}`);\n this.status = status;\n }\n }\n const M = await factory({\n ...(wasmBinary === undefined ? {} : { wasmBinary }),\n // Emscripten's own hook for a module compiled already: instantiate it\n // with the imports the factory gives, and hand the instance back.\n ...(wasmModule === undefined ? {} : {\n instantiateWasm: (/** @type {WebAssembly.Imports} */ imports,\n /** @type {(i: WebAssembly.Instance, m: WebAssembly.Module) => void} */ receive) => {\n WebAssembly.instantiate(wasmModule, imports).then((inst) => receive(inst, wasmModule));\n return {};\n },\n }),\n noInitialRun: true,\n thisProgram: program,\n print: () => {},\n printErr: () => {},\n // Emscripten's default quit ends a Node process. Rethrowing its own\n // ExitStatus lets callMain return the status, as it does in a page.\n quit: (/** @type {number} */ status, /** @type {unknown} */ toThrow) => { throw toThrow ?? new Quit(status); },\n preRun: [(/** @type {DscModule} */ m) => {\n m.FS.init(() => (at < stdin.length ? stdin[at++] : null),\n (c) => { if (c !== null) out.push(c & 0xff); },\n (c) => { if (c !== null) err.push(c & 0xff); });\n // The program is there, as a binary's would be: the compiler\n // follows its own path through any link before it looks beside it\n // ([RCLI.1.11]), and a path that names nothing ends nowhere. Then\n // `<dir>/../share/ds/stdlib` resolves, and holds the package's\n // library.\n m.FS.mkdirTree(dirOf(program));\n m.FS.writeFile(program, new Uint8Array(0));\n for (const [rel, text] of Object.entries(library)) {\n const path = `${root}/${rel}`;\n m.FS.mkdirTree(dirOf(path));\n m.FS.writeFile(path, text);\n }\n for (const [path, data] of Object.entries(files)) {\n m.FS.mkdirTree(dirToMake(path));\n m.FS.writeFile(path, data);\n }\n }],\n });\n // Emscripten's quit for Node sets process.exitCode before it throws, and\n // a build that does not take the `quit` above runs it: the\n // compiler's status would become the process's. It is the run's, so the\n // process's own is put back. Only under Node is there one to keep.\n const proc = /** @type {{ exitCode?: number | string | null } | undefined} */ (Reflect.get(globalThis, \"process\"));\n const exitCode = proc?.exitCode;\n /** @type {number | undefined} */\n let status;\n try {\n status = M.callMain(argv);\n } catch (e) {\n if (e instanceof Quit) status = e.status;\n else if (isExitStatus(e)) status = e.status;\n else throw e;\n } finally {\n if (proc !== undefined) proc.exitCode = exitCode;\n }\n return {\n status: status ?? 0,\n stdout: Uint8Array.from(out),\n stderr: new TextDecoder().decode(Uint8Array.from(err)),\n };\n}\n\n/**\n * Compile DS source text to `.dsc` bytes with ds_dsc: compile.js's\n * `compile` under wasm, the same argv and the same errors, and async.\n *\n * `files` holds what the compile reads by path: each `searchPath` directory's\n * files, at those paths, and with a `program`, the standard library beside it.\n *\n * @param {ModuleSource} compiler\n * @param {string} source\n * @param {WasmCompileOptions} [options]\n * @returns {Promise<Uint8Array>}\n */\nexport async function compileWasm(compiler, source, { file = \"<input>\", searchPath = [], files = {}, wasmBinary,\n wasmModule, program } = {}) {\n if (typeof source !== \"string\") throw new TypeError(\"compile: want DS source text\");\n const argv = [\"compile\", \"-\", \"-o\", \"-\", \"--filename\", file];\n for (const p of searchPath) argv.push(\"-L\", p);\n const r = await runDsc(compiler, argv,\n { stdin: new TextEncoder().encode(source), files, wasmBinary, wasmModule, program });\n const stderr = r.stderr.trim();\n if (r.status === 1) throw new CompileRefused(file, stderr);\n if (r.status === 3) throw new InternalCompilerError(file, stderr);\n if (r.status !== 0) throw new Error(`dsc exited ${r.status} on ${file}:\\n${stderr}`);\n return r.stdout;\n}\n", "// GENERATED from tools/ds_ast/ds.asdl. Do not edit: regenerate it.\n// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// Schema sha256 (first 16): 051bdba0b4d3794f.\n//\n// ds_ast's nodes for JavaScript (tools/ds_ast/DESIGN.md section 3). A node\n// is a plain object, as `dsc dump-ast` writes it, whose `_type` names its\n// constructor. NODES gives every constructor's fields and attributes, which\n// read.js checks a tree against; the typedefs below give `tsc --checkJs` the\n// same shapes. An ASDL type is `<type>_t` (`expr_t`, `let_t`): a union of its\n// constructors.\n\n/** @typedef {\"\" | \"?\" | \"*\"} Kind required, optional, or a sequence */\n/** @typedef {{ name: string, type: string, kind: Kind }} Field */\n/** @typedef {{ type: string, fields: readonly Field[], attributes: readonly Field[] }} Shape */\n\n/** @typedef {{ _type: \"Module\", use: use_t | null, body: decl_t[], comments_end: comment_t[] }} Module */\n/** @typedef {Module} mod_t */\n\n/** @typedef {{ _type: \"Use\", dialect: string, settings: setting_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Use */\n/** @typedef {Use} use_t */\n\n/** @typedef {{ _type: \"Setting\", capability: string, value: boolean }} Setting */\n/** @typedef {Setting} setting_t */\n\n/** @typedef {{ _type: \"Import\", path: string[], asname: string | null, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Import */\n/** @typedef {{ _type: \"ImportFrom\", path: string[], names: alias_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} ImportFrom */\n/** @typedef {{ _type: \"Schema\", name: string, scope: scope_t | null, docstring: string | null, slots: slot_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Schema */\n/** @typedef {{ _type: \"Rule\", name: string, rate: rate_t[], docstring: string | null, lhs: lhs_t[], lets: let_t[], actions: action_t[], afters: after_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Rule */\n/** @typedef {{ _type: \"Const\", name: string, annotation: annotation_t | null, value: expr_t, colon_form: boolean, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Const */\n/** @typedef {{ _type: \"Series\", schema: string | null, slot: string, options: series_option_t[], docstring: string | null, lines: series_line_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Series */\n/** @typedef {{ _type: \"Service\", name: string[], docstring: string | null, kwargs: service_kwarg_t[], response: service_response_t | null, hydration: hydration_field_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Service */\n/** @typedef {{ _type: \"UnitDimension\", name: string, storage: string, base: string, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} UnitDimension */\n/** @typedef {{ _type: \"UnitScalar\", name: string, storage: string, label: string | null, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} UnitScalar */\n/** @typedef {{ _type: \"UnitSymbol\", symbol: string, dimension: string, body: unit_body_t, label: string | null, aliases: string[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} UnitSymbol */\n/** @typedef {{ _type: \"UnitFormula\", name: string, modifiers: formula_modifier_t[], lines: formula_line_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} UnitFormula */\n/** @typedef {{ _type: \"UnitFxPair\", name: string, from_unit: string, to_unit: string, via: string, where: expr_t, numerator: string, denominator: string, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} UnitFxPair */\n/** @typedef {{ _type: \"Opaque\", name: string, representation: string, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Opaque */\n/** @typedef {{ _type: \"Test\", name: expr_t, sections: test_section_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Test */\n/** @typedef {{ _type: \"InitialBlock\", items: initial_item_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} InitialBlock */\n/** @typedef {Import | ImportFrom | Schema | Rule | Const | Series | Service | UnitDimension | UnitScalar | UnitSymbol | UnitFormula | UnitFxPair | Opaque | Test | InitialBlock} decl_t */\n\n/** @typedef {{ _type: \"Initial\", items: initial_item_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Initial */\n/** @typedef {{ _type: \"Inputs\", blocks: at_block_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Inputs */\n/** @typedef {{ _type: \"Responses\", stubs: stub_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Responses */\n/** @typedef {{ _type: \"Produces\", assertions: assertion_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Produces */\n/** @typedef {{ _type: \"Until\", when: expr_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Until */\n/** @typedef {Initial | Inputs | Responses | Produces | Until} test_section_t */\n\n/** @typedef {{ _type: \"InitialFact\", fact: fact_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} InitialFact */\n/** @typedef {{ _type: \"CacheSeed\", key: expr_t, value: expr_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} CacheSeed */\n/** @typedef {{ _type: \"CacheBlock\", seeds: seed_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} CacheBlock */\n/** @typedef {InitialFact | CacheSeed | CacheBlock} initial_item_t */\n\n/** @typedef {{ _type: \"Seed\", key: expr_t, value: expr_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Seed */\n/** @typedef {Seed} seed_t */\n\n/** @typedef {{ _type: \"Fact\", schema: type_ref_t, args: keyword_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Fact */\n/** @typedef {Fact} fact_t */\n\n/** @typedef {{ _type: \"At\", when: expr_t, facts: fact_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} At */\n/** @typedef {At} at_block_t */\n\n/** @typedef {{ _type: \"ForCall\", library: string[], service: string[], args: keyword_t[], correlation: expr_t | null, after: expr_t | null, replies: reply_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} ForCall */\n/** @typedef {ForCall} stub_t */\n\n/** @typedef {{ _type: \"Reply\", fact: fact_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Reply */\n/** @typedef {{ _type: \"NoResponse\", lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} NoResponse */\n/** @typedef {Reply | NoResponse} reply_t */\n\n/** @typedef {{ _type: \"Assertion\", never: boolean, head: test_head_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Assertion */\n/** @typedef {Assertion} assertion_t */\n\n/** @typedef {{ _type: \"Activated\", rule: string }} Activated */\n/** @typedef {{ _type: \"Emitted\", schema: type_ref_t, args: keyword_t[], binding: string | null, where: expr_t | null }} Emitted */\n/** @typedef {{ _type: \"Published\", schema: type_ref_t, args: keyword_t[], binding: string | null, where: expr_t | null }} Published */\n/** @typedef {{ _type: \"Retracted\", schema: type_ref_t, args: keyword_t[] }} Retracted */\n/** @typedef {{ _type: \"Recorded\", kind: string }} Recorded */\n/** @typedef {{ _type: \"Called\", library: string[], service: string[], correlation: expr_t | null }} Called */\n/** @typedef {{ _type: \"Cached\", key: expr_t, value: expr_t | null }} Cached */\n/** @typedef {{ _type: \"CacheDeleted\", key: expr_t }} CacheDeleted */\n/** @typedef {{ _type: \"Logged\", level: log_level_t, substring: expr_t | null }} Logged */\n/** @typedef {{ _type: \"WmHas\", schema: type_ref_t, args: keyword_t[] }} WmHas */\n/** @typedef {{ _type: \"WmCount\", schema: type_ref_t, count: expr_t }} WmCount */\n/** @typedef {{ _type: \"WmEmpty\" }} WmEmpty */\n/** @typedef {Activated | Emitted | Published | Retracted | Recorded | Called | Cached | CacheDeleted | Logged | WmHas | WmCount | WmEmpty} test_head_t */\n\n/** @typedef {{ _type: \"alias\", name: string, asname: string | null, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} alias */\n/** @typedef {alias} alias_t */\n\n/** @typedef {{ _type: \"comment\", text: string, lineno: number, col_offset: number, blank_lines_before: number }} comment */\n/** @typedef {comment} comment_t */\n\n/** @typedef {{ _type: \"ResponseSchema\", name: string }} ResponseSchema */\n/** @typedef {{ _type: \"NoServiceResponse\" }} NoServiceResponse */\n/** @typedef {ResponseSchema | NoServiceResponse} service_response_t */\n\n/** @typedef {{ _type: \"Explicit\" }} Explicit */\n/** @typedef {{ _type: \"Activation\" }} Activation */\n/** @typedef {{ _type: \"Logical\", ambient: boolean }} Logical */\n/** @typedef {{ _type: \"Ttl\", duration: expr_t, ambient: boolean }} Ttl */\n/** @typedef {{ _type: \"Unprefixed\", scope: scope_t }} Unprefixed */\n/** @typedef {{ _type: \"BareAmbient\" }} BareAmbient */\n/** @typedef {Explicit | Activation | Logical | Ttl | Unprefixed | BareAmbient} scope_t */\n\n/** @typedef {{ _type: \"Slot\", name: string, type: string, nullable: boolean, capacity: expr_t | null, markers: marker_t[], tolerance: expr_t | null, docstring: string | null, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Slot */\n/** @typedef {Slot} slot_t */\n\n/** @typedef {{ _type: \"Key\", lineno: number, col_offset: number }} Key */\n/** @typedef {{ _type: \"Mutable\", lineno: number, col_offset: number }} Mutable */\n/** @typedef {{ _type: \"Sampled\", lineno: number, col_offset: number }} Sampled */\n/** @typedef {{ _type: \"Retained\", lineno: number, col_offset: number }} Retained */\n/** @typedef {Key | Mutable | Sampled | Retained} marker_t */\n\n/** @typedef {{ _type: \"Cooldown\", duration: expr_t, lineno: number, col_offset: number }} Cooldown */\n/** @typedef {{ _type: \"RateKey\", paths: expr_t[], lineno: number, col_offset: number }} RateKey */\n/** @typedef {Cooldown | RateKey} rate_t */\n\n/** @typedef {{ _type: \"PatternClause\", pattern: pattern_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} PatternClause */\n/** @typedef {{ _type: \"ThenClause\", step: then_step_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} ThenClause */\n/** @typedef {PatternClause | ThenClause} lhs_t */\n\n/** @typedef {{ _type: \"Simple\", body: pattern_body_t }} Simple */\n/** @typedef {{ _type: \"Negated\", body: pattern_body_t, parenthesised: boolean }} Negated */\n/** @typedef {{ _type: \"Sequence\", latest: boolean, head: pattern_body_t, steps: then_step_t[] }} Sequence */\n/** @typedef {Simple | Negated | Sequence} pattern_t */\n\n/** @typedef {{ _type: \"PatternBody\", type: type_ref_t, binding: string | null, within: expr_t | null, where: expr_t | null, captures: string[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} PatternBody */\n/** @typedef {PatternBody} pattern_body_t */\n\n/** @typedef {{ _type: \"Then\", latest: boolean, body: pattern_body_t, within: expr_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} Then */\n/** @typedef {Then} then_step_t */\n\n/** @typedef {{ _type: \"TypeName\", name: string }} TypeName */\n/** @typedef {{ _type: \"QualifiedType\", library: string[], name: string }} QualifiedType */\n/** @typedef {TypeName | QualifiedType} type_ref_t */\n\n/** @typedef {{ _type: \"Let\", bindings: let_binding_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Let */\n/** @typedef {Let} let_t */\n\n/** @typedef {{ _type: \"LetName\", name: string, annotation: annotation_t | null, value: expr_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} LetName */\n/** @typedef {{ _type: \"LetCapture\", names: string[], value: expr_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} LetCapture */\n/** @typedef {LetName | LetCapture} let_binding_t */\n\n/** @typedef {{ _type: \"Annotation\", type: string, nullable: boolean }} Annotation */\n/** @typedef {Annotation} annotation_t */\n\n/** @typedef {{ _type: \"Log\", level: log_level_t, message: expr_t, args: keyword_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Log */\n/** @typedef {{ _type: \"ServiceCall\", library: string[], service: string[], args: keyword_t[], block: keyword_t[], continuations: continuation_t[], correlation: expr_t | null, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} ServiceCall */\n/** @typedef {{ _type: \"Emit\", schema: type_ref_t, args: keyword_t[], block: keyword_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Emit */\n/** @typedef {{ _type: \"Publish\", schema: type_ref_t, args: keyword_t[], block: keyword_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Publish */\n/** @typedef {{ _type: \"Cache\", args: keyword_t[], block: keyword_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Cache */\n/** @typedef {{ _type: \"CacheDelete\", args: keyword_t[], block: keyword_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} CacheDelete */\n/** @typedef {{ _type: \"Withdraw\", binding: string, args: keyword_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Withdraw */\n/** @typedef {Log | ServiceCall | Emit | Publish | Cache | CacheDelete | Withdraw} action_t */\n\n/** @typedef {{ _type: \"LogDebug\" }} LogDebug */\n/** @typedef {{ _type: \"LogInfo\" }} LogInfo */\n/** @typedef {{ _type: \"LogWarning\" }} LogWarning */\n/** @typedef {{ _type: \"LogError\" }} LogError */\n/** @typedef {{ _type: \"LogCritical\" }} LogCritical */\n/** @typedef {{ _type: \"LogUnknown\", written: string }} LogUnknown */\n/** @typedef {LogDebug | LogInfo | LogWarning | LogError | LogCritical | LogUnknown} log_level_t */\n\n/** @typedef {{ _type: \"keyword\", arg: string, value: expr_t | null, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} keyword */\n/** @typedef {keyword} keyword_t */\n\n/** @typedef {{ _type: \"OnResponse\", test: expr_t, body: action_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} OnResponse */\n/** @typedef {{ _type: \"OnTimeout\", duration: expr_t, body: action_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} OnTimeout */\n/** @typedef {{ _type: \"OnError\", code: string[], body: action_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} OnError */\n/** @typedef {OnResponse | OnTimeout | OnError} continuation_t */\n\n/** @typedef {{ _type: \"After\", duration: expr_t, correlation: expr_t | null, body: action_t[], nested: after_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} After */\n/** @typedef {After} after_t */\n\n/** @typedef {{ _type: \"Persist\", duration: expr_t, lineno: number, col_offset: number }} Persist */\n/** @typedef {{ _type: \"By\", slot: string | null, lineno: number, col_offset: number }} By */\n/** @typedef {{ _type: \"Capacity\", samples: expr_t, lineno: number, col_offset: number }} Capacity */\n/** @typedef {{ _type: \"Nulls\", policy: string, lineno: number, col_offset: number }} Nulls */\n/** @typedef {Persist | By | Capacity | Nulls} series_option_t */\n\n/** @typedef {{ _type: \"SeriesLine\", aggregations: string[], time: time_model_t, accuracy: accuracy_t | null, gap: gap_policy_t | null, asname: string | null, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} SeriesLine */\n/** @typedef {SeriesLine} series_line_t */\n\n/** @typedef {{ _type: \"AllTime\" }} AllTime */\n/** @typedef {{ _type: \"Sliding\", window: expr_t }} Sliding */\n/** @typedef {{ _type: \"Tumbling\", window: expr_t }} Tumbling */\n/** @typedef {{ _type: \"Sample\", size: expr_t }} Sample */\n/** @typedef {AllTime | Sliding | Tumbling | Sample} time_model_t */\n\n/** @typedef {{ _type: \"Exact\" }} Exact */\n/** @typedef {{ _type: \"Tolerance\", value: expr_t }} Tolerance */\n/** @typedef {{ _type: \"Confidence\", value: expr_t }} Confidence */\n/** @typedef {{ _type: \"Delta\", value: expr_t }} Delta */\n/** @typedef {{ _type: \"BoundDeterministic\" }} BoundDeterministic */\n/** @typedef {Exact | Tolerance | Confidence | Delta | BoundDeterministic} accuracy_t */\n\n/** @typedef {{ _type: \"GapHold\" }} GapHold */\n/** @typedef {{ _type: \"GapZero\" }} GapZero */\n/** @typedef {{ _type: \"GapSkip\" }} GapSkip */\n/** @typedef {GapHold | GapZero | GapSkip} gap_policy_t */\n\n/** @typedef {{ _type: \"ServiceKwarg\", name: string, type: string, modifiers: kwarg_modifier_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} ServiceKwarg */\n/** @typedef {ServiceKwarg} service_kwarg_t */\n\n/** @typedef {{ _type: \"Default\", value: expr_t }} Default */\n/** @typedef {{ _type: \"Literal\" }} Literal */\n/** @typedef {{ _type: \"Required\" }} Required */\n/** @typedef {Default | Literal | Required} kwarg_modifier_t */\n\n/** @typedef {{ _type: \"Hydrates\", schemas: string[], lineno: number, col_offset: number, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} Hydrates */\n/** @typedef {{ _type: \"MaxWindow\", value: expr_t, lineno: number, col_offset: number, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} MaxWindow */\n/** @typedef {{ _type: \"MaxLimit\", value: expr_t, lineno: number, col_offset: number, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} MaxLimit */\n/** @typedef {{ _type: \"FilterFields\", fields: filter_field_t[], lineno: number, col_offset: number, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} FilterFields */\n/** @typedef {Hydrates | MaxWindow | MaxLimit | FilterFields} hydration_field_t */\n\n/** @typedef {{ _type: \"FilterField\", name: string, ops: cmpop_t[] }} FilterField */\n/** @typedef {FilterField} filter_field_t */\n\n/** @typedef {{ _type: \"BaseUnit\" }} BaseUnit */\n/** @typedef {{ _type: \"Affine\", expr: expr_t }} Affine */\n/** @typedef {{ _type: \"Tier2\", to_base: expr_t, from_base: expr_t }} Tier2 */\n/** @typedef {BaseUnit | Affine | Tier2} unit_body_t */\n\n/** @typedef {{ _type: \"Inverting\" }} Inverting */\n/** @typedef {{ _type: \"Implicit\" }} Implicit */\n/** @typedef {Inverting | Implicit} formula_modifier_t */\n\n/** @typedef {{ _type: \"FormulaLine\", name: string, param: string, param_type: string, returns: string, body: expr_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null, comments_before: comment_t[], comment_after: comment_t | null, blank_lines_before: number }} FormulaLine */\n/** @typedef {FormulaLine} formula_line_t */\n\n/** @typedef {{ _type: \"BoolOp\", op: boolop_t, values: expr_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} BoolOp */\n/** @typedef {{ _type: \"UnaryOp\", op: unaryop_t, operand: expr_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} UnaryOp */\n/** @typedef {{ _type: \"BinOp\", left: expr_t, op: operator_t, right: expr_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} BinOp */\n/** @typedef {{ _type: \"Compare\", left: expr_t, ops: cmpop_t[], comparators: expr_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} Compare */\n/** @typedef {{ _type: \"Is\", operand: expr_t, negated: boolean, subject: is_subject_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} Is */\n/** @typedef {{ _type: \"Match\", operand: expr_t, negated: boolean, pattern: string, flags: string, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} Match */\n/** @typedef {{ _type: \"Call\", func: expr_t, args: expr_t[], lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} Call */\n/** @typedef {{ _type: \"Cast\", operand: expr_t, type: string, nullable: boolean, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} Cast */\n/** @typedef {{ _type: \"Attribute\", value: expr_t, attr: string, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} Attribute */\n/** @typedef {{ _type: \"Subscript\", value: expr_t, index: expr_t, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} Subscript */\n/** @typedef {{ _type: \"Name\", id: string, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} Name */\n/** @typedef {{ _type: \"QualifiedName\", library: string[], id: string, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} QualifiedName */\n/** @typedef {{ _type: \"Constant\", value: number | string | boolean | null, raw: string | null, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} Constant */\n/** @typedef {{ _type: \"Quantity\", magnitude: string, unit: string, raw: string | null, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} Quantity */\n/** @typedef {{ _type: \"JoinedStr\", values: expr_t[], raw: string | null, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} JoinedStr */\n/** @typedef {{ _type: \"FormattedValue\", value: expr_t, format_spec: string | null, lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} FormattedValue */\n/** @typedef {BoolOp | UnaryOp | BinOp | Compare | Is | Match | Call | Cast | Attribute | Subscript | Name | QualifiedName | Constant | Quantity | JoinedStr | FormattedValue} expr_t */\n\n/** @typedef {{ _type: \"And\" }} And */\n/** @typedef {{ _type: \"Or\" }} Or */\n/** @typedef {And | Or} boolop_t */\n\n/** @typedef {{ _type: \"Add\" }} Add */\n/** @typedef {{ _type: \"Sub\" }} Sub */\n/** @typedef {{ _type: \"Mult\" }} Mult */\n/** @typedef {{ _type: \"Div\" }} Div */\n/** @typedef {{ _type: \"FloorDiv\" }} FloorDiv */\n/** @typedef {{ _type: \"Mod\" }} Mod */\n/** @typedef {{ _type: \"Pow\" }} Pow */\n/** @typedef {{ _type: \"BitOr\" }} BitOr */\n/** @typedef {{ _type: \"BitXor\" }} BitXor */\n/** @typedef {{ _type: \"BitAnd\" }} BitAnd */\n/** @typedef {{ _type: \"LShift\" }} LShift */\n/** @typedef {{ _type: \"RShift\" }} RShift */\n/** @typedef {{ _type: \"Coalesce\" }} Coalesce */\n/** @typedef {{ _type: \"In\" }} In */\n/** @typedef {{ _type: \"Contains\" }} Contains */\n/** @typedef {{ _type: \"Overlaps\" }} Overlaps */\n/** @typedef {{ _type: \"Range\" }} Range */\n/** @typedef {Add | Sub | Mult | Div | FloorDiv | Mod | Pow | BitOr | BitXor | BitAnd | LShift | RShift | Coalesce | In | Contains | Overlaps | Range} operator_t */\n\n/** @typedef {{ _type: \"Not\" }} Not */\n/** @typedef {{ _type: \"UAdd\" }} UAdd */\n/** @typedef {{ _type: \"USub\" }} USub */\n/** @typedef {{ _type: \"Invert\" }} Invert */\n/** @typedef {Not | UAdd | USub | Invert} unaryop_t */\n\n/** @typedef {{ _type: \"Eq\" }} Eq */\n/** @typedef {{ _type: \"NotEq\" }} NotEq */\n/** @typedef {{ _type: \"Lt\" }} Lt */\n/** @typedef {{ _type: \"LtE\" }} LtE */\n/** @typedef {{ _type: \"Gt\" }} Gt */\n/** @typedef {{ _type: \"GtE\" }} GtE */\n/** @typedef {Eq | NotEq | Lt | LtE | Gt | GtE} cmpop_t */\n\n/** @typedef {{ _type: \"IsNull\" }} IsNull */\n/** @typedef {{ _type: \"IsBool\", value: boolean }} IsBool */\n/** @typedef {{ _type: \"IsInf\", negative: boolean }} IsInf */\n/** @typedef {{ _type: \"IsNaN\" }} IsNaN */\n/** @typedef {{ _type: \"IsTag\", tag: string }} IsTag */\n/** @typedef {IsNull | IsBool | IsInf | IsNaN | IsTag} is_subject_t */\n\n/** @typedef {Module | Use | Setting | Import | ImportFrom | Schema | Rule | Const | Series | Service | UnitDimension | UnitScalar | UnitSymbol | UnitFormula | UnitFxPair | Opaque | Test | InitialBlock | Initial | Inputs | Responses | Produces | Until | InitialFact | CacheSeed | CacheBlock | Seed | Fact | At | ForCall | Reply | NoResponse | Assertion | Activated | Emitted | Published | Retracted | Recorded | Called | Cached | CacheDeleted | Logged | WmHas | WmCount | WmEmpty | alias | comment | ResponseSchema | NoServiceResponse | Explicit | Activation | Logical | Ttl | Unprefixed | BareAmbient | Slot | Key | Mutable | Sampled | Retained | Cooldown | RateKey | PatternClause | ThenClause | Simple | Negated | Sequence | PatternBody | Then | TypeName | QualifiedType | Let | LetName | LetCapture | Annotation | Log | ServiceCall | Emit | Publish | Cache | CacheDelete | Withdraw | LogDebug | LogInfo | LogWarning | LogError | LogCritical | LogUnknown | keyword | OnResponse | OnTimeout | OnError | After | Persist | By | Capacity | Nulls | SeriesLine | AllTime | Sliding | Tumbling | Sample | Exact | Tolerance | Confidence | Delta | BoundDeterministic | GapHold | GapZero | GapSkip | ServiceKwarg | Default | Literal | Required | Hydrates | MaxWindow | MaxLimit | FilterFields | FilterField | BaseUnit | Affine | Tier2 | Inverting | Implicit | FormulaLine | BoolOp | UnaryOp | BinOp | Compare | Is | Match | Call | Cast | Attribute | Subscript | Name | QualifiedName | Constant | Quantity | JoinedStr | FormattedValue | And | Or | Add | Sub | Mult | Div | FloorDiv | Mod | Pow | BitOr | BitXor | BitAnd | LShift | RShift | Coalesce | In | Contains | Overlaps | Range | Not | UAdd | USub | Invert | Eq | NotEq | Lt | LtE | Gt | GtE | IsNull | IsBool | IsInf | IsNaN | IsTag} Node every node */\n\n/**\n * Every constructor, by name: the ASDL type it belongs to, its fields\n * and its attributes, in the order ds.asdl gives them.\n * @type {ReadonlyMap<string, Shape>}\n */\nexport const NODES = new Map([\n [\"Module\", { type: \"mod\", fields: [{ name: \"use\", type: \"use\", kind: \"?\" }, { name: \"body\", type: \"decl\", kind: \"*\" }, { name: \"comments_end\", type: \"comment\", kind: \"*\" }],\n attributes: [] }],\n [\"Use\", { type: \"use\", fields: [{ name: \"dialect\", type: \"identifier\", kind: \"\" }, { name: \"settings\", type: \"setting\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Setting\", { type: \"setting\", fields: [{ name: \"capability\", type: \"identifier\", kind: \"\" }, { name: \"value\", type: \"bool\", kind: \"\" }],\n attributes: [] }],\n [\"Import\", { type: \"decl\", fields: [{ name: \"path\", type: \"identifier\", kind: \"*\" }, { name: \"asname\", type: \"identifier\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"ImportFrom\", { type: \"decl\", fields: [{ name: \"path\", type: \"identifier\", kind: \"*\" }, { name: \"names\", type: \"alias\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Schema\", { type: \"decl\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"scope\", type: \"scope\", kind: \"?\" }, { name: \"docstring\", type: \"string\", kind: \"?\" }, { name: \"slots\", type: \"slot\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Rule\", { type: \"decl\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"rate\", type: \"rate\", kind: \"*\" }, { name: \"docstring\", type: \"string\", kind: \"?\" }, { name: \"lhs\", type: \"lhs\", kind: \"*\" }, { name: \"lets\", type: \"let\", kind: \"*\" }, { name: \"actions\", type: \"action\", kind: \"*\" }, { name: \"afters\", type: \"after\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Const\", { type: \"decl\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"annotation\", type: \"annotation\", kind: \"?\" }, { name: \"value\", type: \"expr\", kind: \"\" }, { name: \"colon_form\", type: \"bool\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Series\", { type: \"decl\", fields: [{ name: \"schema\", type: \"identifier\", kind: \"?\" }, { name: \"slot\", type: \"identifier\", kind: \"\" }, { name: \"options\", type: \"series_option\", kind: \"*\" }, { name: \"docstring\", type: \"string\", kind: \"?\" }, { name: \"lines\", type: \"series_line\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Service\", { type: \"decl\", fields: [{ name: \"name\", type: \"identifier\", kind: \"*\" }, { name: \"docstring\", type: \"string\", kind: \"?\" }, { name: \"kwargs\", type: \"service_kwarg\", kind: \"*\" }, { name: \"response\", type: \"service_response\", kind: \"?\" }, { name: \"hydration\", type: \"hydration_field\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"UnitDimension\", { type: \"decl\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"storage\", type: \"identifier\", kind: \"\" }, { name: \"base\", type: \"identifier\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"UnitScalar\", { type: \"decl\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"storage\", type: \"identifier\", kind: \"\" }, { name: \"label\", type: \"string\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"UnitSymbol\", { type: \"decl\", fields: [{ name: \"symbol\", type: \"identifier\", kind: \"\" }, { name: \"dimension\", type: \"identifier\", kind: \"\" }, { name: \"body\", type: \"unit_body\", kind: \"\" }, { name: \"label\", type: \"string\", kind: \"?\" }, { name: \"aliases\", type: \"identifier\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"UnitFormula\", { type: \"decl\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"modifiers\", type: \"formula_modifier\", kind: \"*\" }, { name: \"lines\", type: \"formula_line\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"UnitFxPair\", { type: \"decl\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"from_unit\", type: \"identifier\", kind: \"\" }, { name: \"to_unit\", type: \"identifier\", kind: \"\" }, { name: \"via\", type: \"identifier\", kind: \"\" }, { name: \"where\", type: \"expr\", kind: \"\" }, { name: \"numerator\", type: \"identifier\", kind: \"\" }, { name: \"denominator\", type: \"identifier\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Opaque\", { type: \"decl\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"representation\", type: \"identifier\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Test\", { type: \"decl\", fields: [{ name: \"name\", type: \"expr\", kind: \"\" }, { name: \"sections\", type: \"test_section\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"InitialBlock\", { type: \"decl\", fields: [{ name: \"items\", type: \"initial_item\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Initial\", { type: \"test_section\", fields: [{ name: \"items\", type: \"initial_item\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Inputs\", { type: \"test_section\", fields: [{ name: \"blocks\", type: \"at_block\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Responses\", { type: \"test_section\", fields: [{ name: \"stubs\", type: \"stub\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Produces\", { type: \"test_section\", fields: [{ name: \"assertions\", type: \"assertion\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Until\", { type: \"test_section\", fields: [{ name: \"when\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"InitialFact\", { type: \"initial_item\", fields: [{ name: \"fact\", type: \"fact\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"CacheSeed\", { type: \"initial_item\", fields: [{ name: \"key\", type: \"expr\", kind: \"\" }, { name: \"value\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"CacheBlock\", { type: \"initial_item\", fields: [{ name: \"seeds\", type: \"seed\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Seed\", { type: \"seed\", fields: [{ name: \"key\", type: \"expr\", kind: \"\" }, { name: \"value\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Fact\", { type: \"fact\", fields: [{ name: \"schema\", type: \"type_ref\", kind: \"\" }, { name: \"args\", type: \"keyword\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"At\", { type: \"at_block\", fields: [{ name: \"when\", type: \"expr\", kind: \"\" }, { name: \"facts\", type: \"fact\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"ForCall\", { type: \"stub\", fields: [{ name: \"library\", type: \"identifier\", kind: \"*\" }, { name: \"service\", type: \"identifier\", kind: \"*\" }, { name: \"args\", type: \"keyword\", kind: \"*\" }, { name: \"correlation\", type: \"expr\", kind: \"?\" }, { name: \"after\", type: \"expr\", kind: \"?\" }, { name: \"replies\", type: \"reply\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Reply\", { type: \"reply\", fields: [{ name: \"fact\", type: \"fact\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"NoResponse\", { type: \"reply\", fields: [],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Assertion\", { type: \"assertion\", fields: [{ name: \"never\", type: \"bool\", kind: \"\" }, { name: \"head\", type: \"test_head\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Activated\", { type: \"test_head\", fields: [{ name: \"rule\", type: \"identifier\", kind: \"\" }],\n attributes: [] }],\n [\"Emitted\", { type: \"test_head\", fields: [{ name: \"schema\", type: \"type_ref\", kind: \"\" }, { name: \"args\", type: \"keyword\", kind: \"*\" }, { name: \"binding\", type: \"identifier\", kind: \"?\" }, { name: \"where\", type: \"expr\", kind: \"?\" }],\n attributes: [] }],\n [\"Published\", { type: \"test_head\", fields: [{ name: \"schema\", type: \"type_ref\", kind: \"\" }, { name: \"args\", type: \"keyword\", kind: \"*\" }, { name: \"binding\", type: \"identifier\", kind: \"?\" }, { name: \"where\", type: \"expr\", kind: \"?\" }],\n attributes: [] }],\n [\"Retracted\", { type: \"test_head\", fields: [{ name: \"schema\", type: \"type_ref\", kind: \"\" }, { name: \"args\", type: \"keyword\", kind: \"*\" }],\n attributes: [] }],\n [\"Recorded\", { type: \"test_head\", fields: [{ name: \"kind\", type: \"identifier\", kind: \"\" }],\n attributes: [] }],\n [\"Called\", { type: \"test_head\", fields: [{ name: \"library\", type: \"identifier\", kind: \"*\" }, { name: \"service\", type: \"identifier\", kind: \"*\" }, { name: \"correlation\", type: \"expr\", kind: \"?\" }],\n attributes: [] }],\n [\"Cached\", { type: \"test_head\", fields: [{ name: \"key\", type: \"expr\", kind: \"\" }, { name: \"value\", type: \"expr\", kind: \"?\" }],\n attributes: [] }],\n [\"CacheDeleted\", { type: \"test_head\", fields: [{ name: \"key\", type: \"expr\", kind: \"\" }],\n attributes: [] }],\n [\"Logged\", { type: \"test_head\", fields: [{ name: \"level\", type: \"log_level\", kind: \"\" }, { name: \"substring\", type: \"expr\", kind: \"?\" }],\n attributes: [] }],\n [\"WmHas\", { type: \"test_head\", fields: [{ name: \"schema\", type: \"type_ref\", kind: \"\" }, { name: \"args\", type: \"keyword\", kind: \"*\" }],\n attributes: [] }],\n [\"WmCount\", { type: \"test_head\", fields: [{ name: \"schema\", type: \"type_ref\", kind: \"\" }, { name: \"count\", type: \"expr\", kind: \"\" }],\n attributes: [] }],\n [\"WmEmpty\", { type: \"test_head\", fields: [],\n attributes: [] }],\n [\"alias\", { type: \"alias\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"asname\", type: \"identifier\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"comment\", { type: \"comment\", fields: [{ name: \"text\", type: \"string\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"ResponseSchema\", { type: \"service_response\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }],\n attributes: [] }],\n [\"NoServiceResponse\", { type: \"service_response\", fields: [],\n attributes: [] }],\n [\"Explicit\", { type: \"scope\", fields: [],\n attributes: [] }],\n [\"Activation\", { type: \"scope\", fields: [],\n attributes: [] }],\n [\"Logical\", { type: \"scope\", fields: [{ name: \"ambient\", type: \"bool\", kind: \"\" }],\n attributes: [] }],\n [\"Ttl\", { type: \"scope\", fields: [{ name: \"duration\", type: \"expr\", kind: \"\" }, { name: \"ambient\", type: \"bool\", kind: \"\" }],\n attributes: [] }],\n [\"Unprefixed\", { type: \"scope\", fields: [{ name: \"scope\", type: \"scope\", kind: \"\" }],\n attributes: [] }],\n [\"BareAmbient\", { type: \"scope\", fields: [],\n attributes: [] }],\n [\"Slot\", { type: \"slot\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"type\", type: \"identifier\", kind: \"\" }, { name: \"nullable\", type: \"bool\", kind: \"\" }, { name: \"capacity\", type: \"expr\", kind: \"?\" }, { name: \"markers\", type: \"marker\", kind: \"*\" }, { name: \"tolerance\", type: \"expr\", kind: \"?\" }, { name: \"docstring\", type: \"string\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Key\", { type: \"marker\", fields: [],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }] }],\n [\"Mutable\", { type: \"marker\", fields: [],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }] }],\n [\"Sampled\", { type: \"marker\", fields: [],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }] }],\n [\"Retained\", { type: \"marker\", fields: [],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }] }],\n [\"Cooldown\", { type: \"rate\", fields: [{ name: \"duration\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }] }],\n [\"RateKey\", { type: \"rate\", fields: [{ name: \"paths\", type: \"expr\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }] }],\n [\"PatternClause\", { type: \"lhs\", fields: [{ name: \"pattern\", type: \"pattern\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"ThenClause\", { type: \"lhs\", fields: [{ name: \"step\", type: \"then_step\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Simple\", { type: \"pattern\", fields: [{ name: \"body\", type: \"pattern_body\", kind: \"\" }],\n attributes: [] }],\n [\"Negated\", { type: \"pattern\", fields: [{ name: \"body\", type: \"pattern_body\", kind: \"\" }, { name: \"parenthesised\", type: \"bool\", kind: \"\" }],\n attributes: [] }],\n [\"Sequence\", { type: \"pattern\", fields: [{ name: \"latest\", type: \"bool\", kind: \"\" }, { name: \"head\", type: \"pattern_body\", kind: \"\" }, { name: \"steps\", type: \"then_step\", kind: \"*\" }],\n attributes: [] }],\n [\"PatternBody\", { type: \"pattern_body\", fields: [{ name: \"type\", type: \"type_ref\", kind: \"\" }, { name: \"binding\", type: \"identifier\", kind: \"?\" }, { name: \"within\", type: \"expr\", kind: \"?\" }, { name: \"where\", type: \"expr\", kind: \"?\" }, { name: \"captures\", type: \"identifier\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"Then\", { type: \"then_step\", fields: [{ name: \"latest\", type: \"bool\", kind: \"\" }, { name: \"body\", type: \"pattern_body\", kind: \"\" }, { name: \"within\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"TypeName\", { type: \"type_ref\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }],\n attributes: [] }],\n [\"QualifiedType\", { type: \"type_ref\", fields: [{ name: \"library\", type: \"identifier\", kind: \"*\" }, { name: \"name\", type: \"identifier\", kind: \"\" }],\n attributes: [] }],\n [\"Let\", { type: \"let\", fields: [{ name: \"bindings\", type: \"let_binding\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"LetName\", { type: \"let_binding\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"annotation\", type: \"annotation\", kind: \"?\" }, { name: \"value\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"LetCapture\", { type: \"let_binding\", fields: [{ name: \"names\", type: \"identifier\", kind: \"*\" }, { name: \"value\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Annotation\", { type: \"annotation\", fields: [{ name: \"type\", type: \"identifier\", kind: \"\" }, { name: \"nullable\", type: \"bool\", kind: \"\" }],\n attributes: [] }],\n [\"Log\", { type: \"action\", fields: [{ name: \"level\", type: \"log_level\", kind: \"\" }, { name: \"message\", type: \"expr\", kind: \"\" }, { name: \"args\", type: \"keyword\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"ServiceCall\", { type: \"action\", fields: [{ name: \"library\", type: \"identifier\", kind: \"*\" }, { name: \"service\", type: \"identifier\", kind: \"*\" }, { name: \"args\", type: \"keyword\", kind: \"*\" }, { name: \"block\", type: \"keyword\", kind: \"*\" }, { name: \"continuations\", type: \"continuation\", kind: \"*\" }, { name: \"correlation\", type: \"expr\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Emit\", { type: \"action\", fields: [{ name: \"schema\", type: \"type_ref\", kind: \"\" }, { name: \"args\", type: \"keyword\", kind: \"*\" }, { name: \"block\", type: \"keyword\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Publish\", { type: \"action\", fields: [{ name: \"schema\", type: \"type_ref\", kind: \"\" }, { name: \"args\", type: \"keyword\", kind: \"*\" }, { name: \"block\", type: \"keyword\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Cache\", { type: \"action\", fields: [{ name: \"args\", type: \"keyword\", kind: \"*\" }, { name: \"block\", type: \"keyword\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"CacheDelete\", { type: \"action\", fields: [{ name: \"args\", type: \"keyword\", kind: \"*\" }, { name: \"block\", type: \"keyword\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Withdraw\", { type: \"action\", fields: [{ name: \"binding\", type: \"identifier\", kind: \"\" }, { name: \"args\", type: \"keyword\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"LogDebug\", { type: \"log_level\", fields: [],\n attributes: [] }],\n [\"LogInfo\", { type: \"log_level\", fields: [],\n attributes: [] }],\n [\"LogWarning\", { type: \"log_level\", fields: [],\n attributes: [] }],\n [\"LogError\", { type: \"log_level\", fields: [],\n attributes: [] }],\n [\"LogCritical\", { type: \"log_level\", fields: [],\n attributes: [] }],\n [\"LogUnknown\", { type: \"log_level\", fields: [{ name: \"written\", type: \"string\", kind: \"\" }],\n attributes: [] }],\n [\"keyword\", { type: \"keyword\", fields: [{ name: \"arg\", type: \"identifier\", kind: \"\" }, { name: \"value\", type: \"expr\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"OnResponse\", { type: \"continuation\", fields: [{ name: \"test\", type: \"expr\", kind: \"\" }, { name: \"body\", type: \"action\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"OnTimeout\", { type: \"continuation\", fields: [{ name: \"duration\", type: \"expr\", kind: \"\" }, { name: \"body\", type: \"action\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"OnError\", { type: \"continuation\", fields: [{ name: \"code\", type: \"identifier\", kind: \"*\" }, { name: \"body\", type: \"action\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"After\", { type: \"after\", fields: [{ name: \"duration\", type: \"expr\", kind: \"\" }, { name: \"correlation\", type: \"expr\", kind: \"?\" }, { name: \"body\", type: \"action\", kind: \"*\" }, { name: \"nested\", type: \"after\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Persist\", { type: \"series_option\", fields: [{ name: \"duration\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }] }],\n [\"By\", { type: \"series_option\", fields: [{ name: \"slot\", type: \"identifier\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }] }],\n [\"Capacity\", { type: \"series_option\", fields: [{ name: \"samples\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }] }],\n [\"Nulls\", { type: \"series_option\", fields: [{ name: \"policy\", type: \"identifier\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }] }],\n [\"SeriesLine\", { type: \"series_line\", fields: [{ name: \"aggregations\", type: \"identifier\", kind: \"*\" }, { name: \"time\", type: \"time_model\", kind: \"\" }, { name: \"accuracy\", type: \"accuracy\", kind: \"?\" }, { name: \"gap\", type: \"gap_policy\", kind: \"?\" }, { name: \"asname\", type: \"identifier\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"AllTime\", { type: \"time_model\", fields: [],\n attributes: [] }],\n [\"Sliding\", { type: \"time_model\", fields: [{ name: \"window\", type: \"expr\", kind: \"\" }],\n attributes: [] }],\n [\"Tumbling\", { type: \"time_model\", fields: [{ name: \"window\", type: \"expr\", kind: \"\" }],\n attributes: [] }],\n [\"Sample\", { type: \"time_model\", fields: [{ name: \"size\", type: \"expr\", kind: \"\" }],\n attributes: [] }],\n [\"Exact\", { type: \"accuracy\", fields: [],\n attributes: [] }],\n [\"Tolerance\", { type: \"accuracy\", fields: [{ name: \"value\", type: \"expr\", kind: \"\" }],\n attributes: [] }],\n [\"Confidence\", { type: \"accuracy\", fields: [{ name: \"value\", type: \"expr\", kind: \"\" }],\n attributes: [] }],\n [\"Delta\", { type: \"accuracy\", fields: [{ name: \"value\", type: \"expr\", kind: \"\" }],\n attributes: [] }],\n [\"BoundDeterministic\", { type: \"accuracy\", fields: [],\n attributes: [] }],\n [\"GapHold\", { type: \"gap_policy\", fields: [],\n attributes: [] }],\n [\"GapZero\", { type: \"gap_policy\", fields: [],\n attributes: [] }],\n [\"GapSkip\", { type: \"gap_policy\", fields: [],\n attributes: [] }],\n [\"ServiceKwarg\", { type: \"service_kwarg\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"type\", type: \"identifier\", kind: \"\" }, { name: \"modifiers\", type: \"kwarg_modifier\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"Default\", { type: \"kwarg_modifier\", fields: [{ name: \"value\", type: \"expr\", kind: \"\" }],\n attributes: [] }],\n [\"Literal\", { type: \"kwarg_modifier\", fields: [],\n attributes: [] }],\n [\"Required\", { type: \"kwarg_modifier\", fields: [],\n attributes: [] }],\n [\"Hydrates\", { type: \"hydration_field\", fields: [{ name: \"schemas\", type: \"identifier\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"MaxWindow\", { type: \"hydration_field\", fields: [{ name: \"value\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"MaxLimit\", { type: \"hydration_field\", fields: [{ name: \"value\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"FilterFields\", { type: \"hydration_field\", fields: [{ name: \"fields\", type: \"filter_field\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"FilterField\", { type: \"filter_field\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"ops\", type: \"cmpop\", kind: \"*\" }],\n attributes: [] }],\n [\"BaseUnit\", { type: \"unit_body\", fields: [],\n attributes: [] }],\n [\"Affine\", { type: \"unit_body\", fields: [{ name: \"expr\", type: \"expr\", kind: \"\" }],\n attributes: [] }],\n [\"Tier2\", { type: \"unit_body\", fields: [{ name: \"to_base\", type: \"expr\", kind: \"\" }, { name: \"from_base\", type: \"expr\", kind: \"\" }],\n attributes: [] }],\n [\"Inverting\", { type: \"formula_modifier\", fields: [],\n attributes: [] }],\n [\"Implicit\", { type: \"formula_modifier\", fields: [],\n attributes: [] }],\n [\"FormulaLine\", { type: \"formula_line\", fields: [{ name: \"name\", type: \"identifier\", kind: \"\" }, { name: \"param\", type: \"identifier\", kind: \"\" }, { name: \"param_type\", type: \"identifier\", kind: \"\" }, { name: \"returns\", type: \"identifier\", kind: \"\" }, { name: \"body\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }, { name: \"comments_before\", type: \"comment\", kind: \"*\" }, { name: \"comment_after\", type: \"comment\", kind: \"?\" }, { name: \"blank_lines_before\", type: \"int\", kind: \"\" }] }],\n [\"BoolOp\", { type: \"expr\", fields: [{ name: \"op\", type: \"boolop\", kind: \"\" }, { name: \"values\", type: \"expr\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"UnaryOp\", { type: \"expr\", fields: [{ name: \"op\", type: \"unaryop\", kind: \"\" }, { name: \"operand\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"BinOp\", { type: \"expr\", fields: [{ name: \"left\", type: \"expr\", kind: \"\" }, { name: \"op\", type: \"operator\", kind: \"\" }, { name: \"right\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"Compare\", { type: \"expr\", fields: [{ name: \"left\", type: \"expr\", kind: \"\" }, { name: \"ops\", type: \"cmpop\", kind: \"*\" }, { name: \"comparators\", type: \"expr\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"Is\", { type: \"expr\", fields: [{ name: \"operand\", type: \"expr\", kind: \"\" }, { name: \"negated\", type: \"bool\", kind: \"\" }, { name: \"subject\", type: \"is_subject\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"Match\", { type: \"expr\", fields: [{ name: \"operand\", type: \"expr\", kind: \"\" }, { name: \"negated\", type: \"bool\", kind: \"\" }, { name: \"pattern\", type: \"string\", kind: \"\" }, { name: \"flags\", type: \"string\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"Call\", { type: \"expr\", fields: [{ name: \"func\", type: \"expr\", kind: \"\" }, { name: \"args\", type: \"expr\", kind: \"*\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"Cast\", { type: \"expr\", fields: [{ name: \"operand\", type: \"expr\", kind: \"\" }, { name: \"type\", type: \"identifier\", kind: \"\" }, { name: \"nullable\", type: \"bool\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"Attribute\", { type: \"expr\", fields: [{ name: \"value\", type: \"expr\", kind: \"\" }, { name: \"attr\", type: \"identifier\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"Subscript\", { type: \"expr\", fields: [{ name: \"value\", type: \"expr\", kind: \"\" }, { name: \"index\", type: \"expr\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"Name\", { type: \"expr\", fields: [{ name: \"id\", type: \"identifier\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"QualifiedName\", { type: \"expr\", fields: [{ name: \"library\", type: \"identifier\", kind: \"*\" }, { name: \"id\", type: \"identifier\", kind: \"\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"Constant\", { type: \"expr\", fields: [{ name: \"value\", type: \"constant\", kind: \"\" }, { name: \"raw\", type: \"string\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"Quantity\", { type: \"expr\", fields: [{ name: \"magnitude\", type: \"string\", kind: \"\" }, { name: \"unit\", type: \"string\", kind: \"\" }, { name: \"raw\", type: \"string\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"JoinedStr\", { type: \"expr\", fields: [{ name: \"values\", type: \"expr\", kind: \"*\" }, { name: \"raw\", type: \"string\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"FormattedValue\", { type: \"expr\", fields: [{ name: \"value\", type: \"expr\", kind: \"\" }, { name: \"format_spec\", type: \"string\", kind: \"?\" }],\n attributes: [{ name: \"lineno\", type: \"int\", kind: \"\" }, { name: \"col_offset\", type: \"int\", kind: \"\" }, { name: \"end_lineno\", type: \"int\", kind: \"?\" }, { name: \"end_col_offset\", type: \"int\", kind: \"?\" }] }],\n [\"And\", { type: \"boolop\", fields: [],\n attributes: [] }],\n [\"Or\", { type: \"boolop\", fields: [],\n attributes: [] }],\n [\"Add\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"Sub\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"Mult\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"Div\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"FloorDiv\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"Mod\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"Pow\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"BitOr\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"BitXor\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"BitAnd\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"LShift\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"RShift\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"Coalesce\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"In\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"Contains\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"Overlaps\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"Range\", { type: \"operator\", fields: [],\n attributes: [] }],\n [\"Not\", { type: \"unaryop\", fields: [],\n attributes: [] }],\n [\"UAdd\", { type: \"unaryop\", fields: [],\n attributes: [] }],\n [\"USub\", { type: \"unaryop\", fields: [],\n attributes: [] }],\n [\"Invert\", { type: \"unaryop\", fields: [],\n attributes: [] }],\n [\"Eq\", { type: \"cmpop\", fields: [],\n attributes: [] }],\n [\"NotEq\", { type: \"cmpop\", fields: [],\n attributes: [] }],\n [\"Lt\", { type: \"cmpop\", fields: [],\n attributes: [] }],\n [\"LtE\", { type: \"cmpop\", fields: [],\n attributes: [] }],\n [\"Gt\", { type: \"cmpop\", fields: [],\n attributes: [] }],\n [\"GtE\", { type: \"cmpop\", fields: [],\n attributes: [] }],\n [\"IsNull\", { type: \"is_subject\", fields: [],\n attributes: [] }],\n [\"IsBool\", { type: \"is_subject\", fields: [{ name: \"value\", type: \"bool\", kind: \"\" }],\n attributes: [] }],\n [\"IsInf\", { type: \"is_subject\", fields: [{ name: \"negative\", type: \"bool\", kind: \"\" }],\n attributes: [] }],\n [\"IsNaN\", { type: \"is_subject\", fields: [],\n attributes: [] }],\n [\"IsTag\", { type: \"is_subject\", fields: [{ name: \"tag\", type: \"identifier\", kind: \"\" }],\n attributes: [] }],\n]);\n\n/**\n * Every ASDL type, with its constructors.\n * @type {ReadonlyMap<string, readonly string[]>}\n */\nexport const TYPES = new Map([\n [\"mod\", [\"Module\"]],\n [\"use\", [\"Use\"]],\n [\"setting\", [\"Setting\"]],\n [\"decl\", [\"Import\", \"ImportFrom\", \"Schema\", \"Rule\", \"Const\", \"Series\", \"Service\", \"UnitDimension\", \"UnitScalar\", \"UnitSymbol\", \"UnitFormula\", \"UnitFxPair\", \"Opaque\", \"Test\", \"InitialBlock\"]],\n [\"test_section\", [\"Initial\", \"Inputs\", \"Responses\", \"Produces\", \"Until\"]],\n [\"initial_item\", [\"InitialFact\", \"CacheSeed\", \"CacheBlock\"]],\n [\"seed\", [\"Seed\"]],\n [\"fact\", [\"Fact\"]],\n [\"at_block\", [\"At\"]],\n [\"stub\", [\"ForCall\"]],\n [\"reply\", [\"Reply\", \"NoResponse\"]],\n [\"assertion\", [\"Assertion\"]],\n [\"test_head\", [\"Activated\", \"Emitted\", \"Published\", \"Retracted\", \"Recorded\", \"Called\", \"Cached\", \"CacheDeleted\", \"Logged\", \"WmHas\", \"WmCount\", \"WmEmpty\"]],\n [\"alias\", [\"alias\"]],\n [\"comment\", [\"comment\"]],\n [\"service_response\", [\"ResponseSchema\", \"NoServiceResponse\"]],\n [\"scope\", [\"Explicit\", \"Activation\", \"Logical\", \"Ttl\", \"Unprefixed\", \"BareAmbient\"]],\n [\"slot\", [\"Slot\"]],\n [\"marker\", [\"Key\", \"Mutable\", \"Sampled\", \"Retained\"]],\n [\"rate\", [\"Cooldown\", \"RateKey\"]],\n [\"lhs\", [\"PatternClause\", \"ThenClause\"]],\n [\"pattern\", [\"Simple\", \"Negated\", \"Sequence\"]],\n [\"pattern_body\", [\"PatternBody\"]],\n [\"then_step\", [\"Then\"]],\n [\"type_ref\", [\"TypeName\", \"QualifiedType\"]],\n [\"let\", [\"Let\"]],\n [\"let_binding\", [\"LetName\", \"LetCapture\"]],\n [\"annotation\", [\"Annotation\"]],\n [\"action\", [\"Log\", \"ServiceCall\", \"Emit\", \"Publish\", \"Cache\", \"CacheDelete\", \"Withdraw\"]],\n [\"log_level\", [\"LogDebug\", \"LogInfo\", \"LogWarning\", \"LogError\", \"LogCritical\", \"LogUnknown\"]],\n [\"keyword\", [\"keyword\"]],\n [\"continuation\", [\"OnResponse\", \"OnTimeout\", \"OnError\"]],\n [\"after\", [\"After\"]],\n [\"series_option\", [\"Persist\", \"By\", \"Capacity\", \"Nulls\"]],\n [\"series_line\", [\"SeriesLine\"]],\n [\"time_model\", [\"AllTime\", \"Sliding\", \"Tumbling\", \"Sample\"]],\n [\"accuracy\", [\"Exact\", \"Tolerance\", \"Confidence\", \"Delta\", \"BoundDeterministic\"]],\n [\"gap_policy\", [\"GapHold\", \"GapZero\", \"GapSkip\"]],\n [\"service_kwarg\", [\"ServiceKwarg\"]],\n [\"kwarg_modifier\", [\"Default\", \"Literal\", \"Required\"]],\n [\"hydration_field\", [\"Hydrates\", \"MaxWindow\", \"MaxLimit\", \"FilterFields\"]],\n [\"filter_field\", [\"FilterField\"]],\n [\"unit_body\", [\"BaseUnit\", \"Affine\", \"Tier2\"]],\n [\"formula_modifier\", [\"Inverting\", \"Implicit\"]],\n [\"formula_line\", [\"FormulaLine\"]],\n [\"expr\", [\"BoolOp\", \"UnaryOp\", \"BinOp\", \"Compare\", \"Is\", \"Match\", \"Call\", \"Cast\", \"Attribute\", \"Subscript\", \"Name\", \"QualifiedName\", \"Constant\", \"Quantity\", \"JoinedStr\", \"FormattedValue\"]],\n [\"boolop\", [\"And\", \"Or\"]],\n [\"operator\", [\"Add\", \"Sub\", \"Mult\", \"Div\", \"FloorDiv\", \"Mod\", \"Pow\", \"BitOr\", \"BitXor\", \"BitAnd\", \"LShift\", \"RShift\", \"Coalesce\", \"In\", \"Contains\", \"Overlaps\", \"Range\"]],\n [\"unaryop\", [\"Not\", \"UAdd\", \"USub\", \"Invert\"]],\n [\"cmpop\", [\"Eq\", \"NotEq\", \"Lt\", \"LtE\", \"Gt\", \"GtE\"]],\n [\"is_subject\", [\"IsNull\", \"IsBool\", \"IsInf\", \"IsNaN\", \"IsTag\"]],\n]);\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// `dsc dump-ast`'s JSON as a tree, checked against ds.asdl. The JavaScript\n// side of ds_ast's `from_json` (tools/ds_ast/ds_ast/_parse.py), and as\n// STRICT, in both directions: a `_type` the schema does not name, a key a node\n// does not have, a field or attribute the writer left out, and a value of the\n// wrong kind are each a TreeError. That strictness is what makes the Mercury\n// writer's names checkable against ds.asdl from here too: a name that drifted\n// is an error, not a silently missing key.\n//\n// No parser here, and no I/O. The compiler is the only parser ([LTSL.1.2]);\n// whoever runs `dsc dump-ast` hands its output to readModule. Positions are\n// as `dsc` gives them: `lineno` 1-based, `col_offset` 0-based in code points.\n\nimport { NODES, TYPES } from \"./nodes.js\";\n\n/** @import { Field, Module, Node } from \"./nodes.js\" */\n\n/**\n * `dsc` wrote a tree ds.asdl does not describe: a disagreement between the\n * compiler and this reader, never a problem with the program.\n */\nexport class TreeError extends Error {\n /** @param {string} message */\n constructor(message) {\n super(message);\n this.name = \"TreeError\";\n }\n}\n\n/**\n * A whole program's tree, from the JSON `dsc dump-ast` writes.\n * @param {unknown} json the parsed JSON\n * @returns {Module}\n */\nexport function readModule(json) {\n const tree = readNode(json, \"the root\");\n if (tree._type !== \"Module\") throw new TreeError(`the root is ${tree._type}, not Module`);\n return tree;\n}\n\n/**\n * One node, checked with everything under it.\n * @param {unknown} value\n * @param {string} where what holds it, for a message\n * @returns {Node}\n */\nexport function readNode(value, where) {\n if (value === null || typeof value !== \"object\" || Array.isArray(value))\n throw new TreeError(`${where} is not a node`);\n const obj = /** @type {Record<string, unknown>} */ (value);\n const type = obj._type;\n if (typeof type !== \"string\") throw new TreeError(`${where} has no _type`);\n // An ASDL type (`expr`, `decl`) is a set of nodes, never one.\n const shape = NODES.get(type);\n if (shape === undefined) throw new TreeError(`\\`${type}\\` is not a node in ds.asdl`);\n const declared = [...shape.fields, ...shape.attributes];\n const names = new Set(declared.map((f) => f.name));\n const extra = Object.keys(obj).filter((k) => k !== \"_type\" && !names.has(k)).sort();\n if (extra.length) throw new TreeError(`${type} has no ${extra.join(\", \")}`);\n const missing = declared.filter((f) => !Object.hasOwn(obj, f.name)).map((f) => f.name).sort();\n if (missing.length) throw new TreeError(`${type} was written without ${missing.join(\", \")}`);\n for (const f of declared) check(obj[f.name], f, `${type}.${f.name}`);\n return /** @type {Node} */ (value);\n}\n\n/**\n * A field's value is what its declaration says.\n * @param {unknown} value\n * @param {Field} field\n * @param {string} where\n */\nfunction check(value, field, where) {\n if (field.kind === \"*\") {\n if (!Array.isArray(value)) throw new TreeError(`${where} is not a list`);\n value.forEach((item, i) => one(item, field.type, `${where}[${i}]`));\n return;\n }\n if (value === null) {\n // A Constant's value may be null: `null` is a DS literal.\n if (field.kind === \"?\" || field.type === \"constant\") return;\n throw new TreeError(`${where} is null, and is required`);\n }\n one(value, field.type, where);\n}\n\n/**\n * One value of an ASDL type or a builtin.\n * @param {unknown} value\n * @param {string} type\n * @param {string} where\n */\nfunction one(value, type, where) {\n switch (type) {\n case \"identifier\":\n case \"string\":\n if (typeof value !== \"string\") throw new TreeError(`${where} should be a string`);\n return;\n case \"int\":\n if (!Number.isInteger(value)) throw new TreeError(`${where} should be an int`);\n return;\n case \"bool\":\n if (typeof value !== \"boolean\") throw new TreeError(`${where} should be a bool`);\n return;\n case \"constant\":\n if (value !== null && ![\"number\", \"string\", \"boolean\"].includes(typeof value))\n throw new TreeError(`${where} should be a constant`);\n return;\n }\n const node = readNode(value, where);\n if (!TYPES.get(type)?.includes(node._type))\n throw new TreeError(`${where} should be ${type}, got ${node._type}`);\n}\n\n/**\n * Every node at and under `node`, parents first, children in field order:\n * Python's `ast.walk`, but depth-first, so source order is kept.\n * @param {Node} node\n * @returns {Generator<Node>}\n */\nexport function* walk(node) {\n yield node;\n const shape = /** @type {import(\"./nodes.js\").Shape} */ (NODES.get(node._type));\n const obj = /** @type {Record<string, unknown>} */ (/** @type {unknown} */ (node));\n for (const f of shape.fields) {\n if (BUILTIN.has(f.type)) continue;\n const v = obj[f.name];\n if (Array.isArray(v)) for (const item of v) yield* walk(/** @type {Node} */ (item));\n else if (v !== null) yield* walk(/** @type {Node} */ (v));\n }\n}\n\n/** The builtin types: a field of one holds no node. */\nconst BUILTIN = new Set([\"identifier\", \"string\", \"int\", \"bool\", \"constant\"]);\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// A file's names and where they are, read from its syntax tree (lib/ast/):\n// the declaration a position is in, a rule's pattern bindings, the name under\n// a column; and what hover shows for a declaration, a binding or a slot.\n// What a name refers to, across the files of a program, is references.js's\n// `refAt`.\n//\n// Positions are the tree's: lines 1-based, columns 0-based in code points.\n// The server converts to and from the client's.\n//\n// The tree records where each statement starts and ends, not where each name\n// in it does (ds.asdl gives `type_ref` and identifiers no location). So the\n// name under the cursor is read from the line's text, and the tree says what\n// the enclosing statement makes of it.\n\n/**\n * @import { Module, PatternBody, Rule, Schema, Service, ServiceKwarg, Slot, decl_t, expr_t, kwarg_modifier_t, scope_t,\n * type_ref_t, lhs_t } from \"../ast/nodes.js\"\n */\n\n/**\n * What a name refers to.\n * @typedef {{ kind: \"decl\", decl: decl_t, name: string }\n * | { kind: \"binding\", name: string, body: PatternBody, schema: Schema | null }\n * | { kind: \"slot\", schema: Schema, slot: Slot }} Target\n */\n\n/** @typedef {{ line: number, start: number, end: number }} NameRange one line, a code-point range */\n\n/** A name's characters: DS names are UAX #31 identifiers ([LNAM.2]), close enough for finding one. */\nconst NAME_CHAR = /[\\p{L}\\p{N}_]/u;\n\n/**\n * The name a declaration is referred to by, or null for one that has none\n * (an import, a test, the `initial:` block).\n * @param {decl_t} d\n * @returns {string | null}\n */\nexport function declName(d) {\n switch (d._type) {\n case \"Schema\": case \"Rule\": case \"Const\": case \"Opaque\": case \"UnitDimension\": case \"UnitScalar\":\n case \"UnitFormula\": case \"UnitFxPair\":\n return d.name;\n case \"UnitSymbol\":\n return d.symbol;\n case \"Service\":\n return d.name.join(\".\");\n default:\n return null;\n }\n}\n\n/**\n * The schema a pattern or a verb names: its last name, which is the schema's\n * own whether or not a library qualifies it.\n * @param {type_ref_t} ref\n */\nexport function typeName(ref) {\n return ref.name;\n}\n\n/**\n * `node` spans the position. A node with no recorded end spans its first line\n * from its start.\n * @param {{ lineno: number, col_offset: number, end_lineno: number | null, end_col_offset: number | null }} node\n * @param {number} line\n * @param {number} col\n */\nexport function spans(node, line, col) {\n if (line < node.lineno || (line === node.lineno && col < node.col_offset)) return false;\n if (node.end_lineno === null || node.end_col_offset === null) return line === node.lineno;\n return line < node.end_lineno || (line === node.end_lineno && col <= node.end_col_offset);\n}\n\n/**\n * The declaration the position is in. One whose end the tree does not record\n * runs to the next declaration's start, or to the end of the file: a\n * position between two declarations is the earlier one's (its trailing\n * comments and blank lines).\n * @param {Module} mod\n * @param {number} line\n * @param {number} col\n * @returns {decl_t | null}\n */\nexport function declAt(mod, line, col) {\n const body = mod.body;\n for (let i = 0; i < body.length; i++) {\n const d = body[i];\n if (line < d.lineno || (line === d.lineno && col < d.col_offset)) return null;\n if (d.end_lineno !== null && d.end_col_offset !== null) {\n if (spans(d, line, col)) return d;\n continue;\n }\n const next = body[i + 1];\n if (next === undefined || line < next.lineno || (line === next.lineno && col < next.col_offset)) return d;\n }\n return null;\n}\n\n/**\n * Every pattern body on a rule's left-hand side, in source order.\n * @param {lhs_t[]} lhs\n * @returns {PatternBody[]}\n */\nexport function patternBodies(lhs) {\n /** @type {PatternBody[]} */\n const out = [];\n for (const clause of lhs) {\n if (clause._type === \"ThenClause\") {\n out.push(clause.step.body);\n continue;\n }\n const p = clause.pattern;\n if (p._type === \"Sequence\") out.push(p.head, ...p.steps.map((s) => s.body));\n else out.push(p.body);\n }\n return out;\n}\n\n/**\n * A rule's pattern bindings, each to the pattern that makes it.\n * @param {Rule} rule\n * @returns {Map<string, PatternBody>}\n */\nexport function bindings(rule) {\n /** @type {Map<string, PatternBody>} */\n const out = new Map();\n for (const body of patternBodies(rule.lhs)) if (body.binding !== null && !out.has(body.binding)) out.set(body.binding, body);\n return out;\n}\n\n/**\n * The name under (or just before) a code-point column, and the name before a\n * `.` in front of it, if any: `r.value` at `value` gives `value` and `r`.\n * @param {string} text the line\n * @param {number} col\n * @returns {{ word: string, start: number, end: number, qualifier: string | null } | null}\n */\nexport function wordAt(text, col) {\n const cps = [...text];\n const is = (/** @type {number} */ i) => i >= 0 && i < cps.length && NAME_CHAR.test(cps[i]);\n let at = col;\n if (!is(at) && is(at - 1)) at--;\n if (!is(at)) return null;\n let start = at, end = at;\n while (is(start - 1)) start--;\n while (is(end)) end++;\n /** @type {string | null} */\n let qualifier = null;\n if (cps[start - 1] === \".\" && is(start - 2)) {\n let q = start - 1;\n while (is(q - 1)) q--;\n qualifier = cps.slice(q, start - 1).join(\"\");\n }\n return { word: cps.slice(start, end).join(\"\"), start, end, qualifier };\n}\n\n/**\n * Where a name is written in the statement that starts on `node`'s line:\n * the first whole-word occurrence at or after its start column.\n * @param {string[]} lines the document's\n * @param {{ lineno: number, col_offset: number }} node\n * @param {string} name\n * @returns {NameRange}\n */\nexport function nameRange(lines, node, name) {\n const cps = [...(lines[node.lineno - 1] ?? \"\")];\n const want = [...name];\n for (let i = node.col_offset; i + want.length <= cps.length; i++) {\n if (want.every((c, k) => cps[i + k] === c)\n && !NAME_CHAR.test(cps[i - 1] ?? \"\") && !NAME_CHAR.test(cps[i + want.length] ?? \"\"))\n return { line: node.lineno, start: i, end: i + want.length };\n }\n return { line: node.lineno, start: node.col_offset, end: node.col_offset };\n}\n\n/**\n * Where a target is declared.\n * @param {string[]} lines\n * @param {Target} t\n * @returns {NameRange}\n */\nexport function definition(lines, t) {\n switch (t.kind) {\n case \"decl\": return nameRange(lines, t.decl, t.name);\n case \"binding\": return nameRange(lines, t.body, t.name);\n case \"slot\": return nameRange(lines, t.slot, t.slot.name);\n }\n}\n\n/**\n * A schema's lifecycle as declared: the keyword, and a ttl scope's duration\n * as written. No `scope` clause is `explicit` ([LSCP.6.2]);\n * `Unprefixed` is the same scope with the keyword left out.\n * @param {scope_t | null} scope\n * @returns {string}\n */\nfunction scopeName(scope) {\n if (scope === null) return \"explicit\";\n switch (scope._type) {\n case \"Unprefixed\": return scopeName(scope.scope);\n case \"Explicit\": return \"explicit\";\n case \"Activation\": return \"activation\";\n case \"BareAmbient\": return \"ambient\";\n case \"Logical\": return scope.ambient ? \"logical ambient\" : \"logical\";\n case \"Ttl\": return `ttl ${exprText(scope.duration)}` + (scope.ambient ? \" ambient\" : \"\");\n }\n}\n\n/**\n * A literal as written: what a declaration holds where it takes a value (a\n * ttl, a tolerance, a capacity). Anything else is not a literal there, and\n * the compiler refuses it; `\u2026` stands for it.\n * @param {expr_t} e\n * @returns {string}\n */\nfunction exprText(e) {\n switch (e._type) {\n case \"Quantity\": return e.raw ?? `${e.magnitude}_${e.unit}`;\n case \"Constant\": return e.raw ?? String(e.value);\n case \"Name\": return e.id;\n case \"UnaryOp\": return e.op._type === \"USub\" ? `-${exprText(e.operand)}` : \"\u2026\";\n default: return \"\u2026\";\n }\n}\n\n/**\n * A kwarg modifier as written ([LGRA.23.1]).\n * @param {kwarg_modifier_t} m\n */\nfunction modifierText(m) {\n switch (m._type) {\n case \"Required\": return \"required\";\n case \"Literal\": return \"literal\";\n case \"Default\": return `default ${exprText(m.value)}`;\n }\n}\n\n/**\n * A kwarg as declared, after `kwarg`: its name, type and modifiers.\n * @param {ServiceKwarg} k\n */\nexport function kwargText(k) {\n return [`${k.name}: ${k.type}`, ...k.modifiers.map(modifierText)].join(\" \");\n}\n\n/**\n * A service as declared: its header, its kwargs, and what it answers with.\n * @param {string} name its dotted name\n * @param {Service} s\n */\nfunction serviceText(name, s) {\n const out = [`service ${name}:`, ...s.kwargs.map((k) => ` kwarg ${kwargText(k)}`)];\n if (s.response !== null)\n out.push(s.response._type === \"ResponseSchema\" ? ` response ${s.response.name}` : \" no response\");\n return out.join(\"\\n\");\n}\n\n/** @param {Slot} s */\nconst slotType = (s) => (s.nullable ? `${s.type}?` : s.type);\n\n/** Each marker's keyword ([LGRA]'s slot line). */\nconst MARKER = /** @type {const} */ ({ Key: \"key\", Mutable: \"mutable\", Sampled: \"sampled\", Retained: \"retained\" });\n\n/**\n * A slot's line as declared, after its name: its type and nullability, its\n * capacity, its markers in the order written, and its tolerance.\n * @param {Slot} s\n */\nfunction slotDecl(s) {\n const parts = [slotType(s)];\n if (s.capacity !== null) parts[0] += ` capacity ${exprText(s.capacity)}`;\n for (const m of s.markers) parts.push(MARKER[m._type]);\n if (s.tolerance !== null) parts.push(`tolerance ${exprText(s.tolerance)}`);\n return parts.join(\" \");\n}\n\n/**\n * The hover text for a target: its declaration, in DS, then its docstring.\n * @param {Target} t\n * @returns {string}\n */\nexport function hoverText(t) {\n switch (t.kind) {\n case \"slot\":\n return block(`${t.slot.name}: ${slotDecl(t.slot)} # in ${t.schema.name}`, t.slot.docstring);\n case \"binding\":\n return block(`${t.name}: ${t.schema?.name ?? typeName(t.body.type)} # a pattern binding`,\n null, t.schema === null ? \"\" : schemaText(t.schema));\n case \"decl\": {\n const d = t.decl;\n if (d._type === \"Schema\") return block(schemaText(d), d.docstring);\n if (d._type === \"Rule\") {\n const pats = patternBodies(d.lhs).map((b) => ` ${typeName(b.type)}${b.binding === null ? \"\" : \" \" + b.binding}`);\n return block([`rule ${d.name}:`, ...pats].join(\"\\n\"), d.docstring);\n }\n if (d._type === \"Const\") {\n const v = d.value;\n const raw = v._type === \"Constant\" || v._type === \"Quantity\" ? v.raw : null;\n return block(`const ${d.name}${raw === null ? \"\" : \" = \" + raw}`, null);\n }\n if (d._type === \"Service\") return block(serviceText(t.name, d), d.docstring);\n return block(`${t.name} # ${d._type}`, null);\n }\n }\n}\n\n/**\n * A schema as declared: its header and its slots.\n * @param {Schema} s\n */\nfunction schemaText(s) {\n return [`schema ${s.name} scope ${scopeName(s.scope)}:`, ...s.slots.map((x) => ` ${x.name}: ${slotDecl(x)}`)].join(\"\\n\");\n}\n\n/**\n * Markdown: a `ds` code block, then any prose.\n * @param {string} code\n * @param {string | null} doc\n * @param {string} [more] a second code block\n */\nfunction block(code, doc, more = \"\") {\n const parts = [\"```ds\\n\" + code + \"\\n```\"];\n if (more) parts.push(\"```ds\\n\" + more + \"\\n```\");\n if (doc) parts.push(doc);\n return parts.join(\"\\n\\n\");\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// References and rename, across the program: the\n// document and every library it imports, transitively. An import resolves as\n// the compiler resolves it ([LIMP.3.1.4]): `import a.b` is `<dir>/a/b.ds` on a\n// search-path entry, the entries being the ones the document's compile\n// takes, in order: the document's own directory, the library directories, and\n// last the bundled standard library ([LIMP.3.3.1]). Every file of the program\n// resolves its imports against that one list, as `dsc` does with one map of\n// every library under it. A name more than one distinct entry holds is\n// ambiguous ([LIMP.3.1.3]): `dsc` refuses the import, so it resolves to\n// nothing here. A library that does not resolve, or does not parse, is left\n// out; the compiler reports it.\n//\n// What a name refers to is decided per file, the way the file sees it: a\n// schema or constant declared there, or one a `from L import X` brings in,\n// or `L.X` / `L;X` through an `import L`. Two sites refer to one thing only\n// when both resolve to the same declaration. A rule's binding is that rule's.\n//\n// The tree gives each statement a location and most names none (ds.asdl's\n// `type_ref`, an identifier field), so a name's range is found in its\n// statement's text (analysis.js nameRange); a `Name` or `Attribute`\n// expression carries its own.\n\nimport { walk } from \"../ast/read.js\";\nimport { bindings, declName, nameRange, patternBodies, spans, typeName, wordAt, declAt } from \"./analysis.js\";\n\n/** @import { Module, Rule, Schema, Service, Slot, decl_t, type_ref_t } from \"../ast/nodes.js\" */\n/** @import { NameRange, Target } from \"./analysis.js\" */\n\n/**\n * One file of the program.\n * @typedef {object} Unit\n * @property {string} uri\n * @property {string | null} path\n * @property {string[]} lines\n * @property {Module} tree\n * @property {Map<string, Unit>} modules each `import L` (or `as q`), by its qualifier\n * @property {Map<string, { unit: Unit, name: string }>} bare each from-imported name, by its local name\n */\n\n/**\n * The files the server reads a library from.\n * @typedef {object} Sources\n * @property {(path: string) => string | null} read a file's text, or null if there is none\n * @property {(text: string, file: string) => Module | null} tree its syntax tree, or null if it does not parse\n * @property {(path: string) => string} uri\n */\n\n/** What a site refers to: a declaration, a schema's slot, or a rule's binding. */\n/**\n * @typedef {{ kind: \"decl\", unit: Unit, decl: decl_t, name: string }\n * | { kind: \"slot\", unit: Unit, schema: Schema, slot: Slot }\n * | { kind: \"binding\", unit: Unit, rule: Rule, name: string }} Ref\n */\n\n/** @typedef {{ unit: Unit, range: NameRange, declaration: boolean }} Site */\n\n/**\n * The program rooted at a document.\n * @param {{ uri: string, path: string | null, lines: string[], tree: Module }} root\n * @param {string[]} search library directories, after the document's own; the bundled standard library last\n * @param {Sources} src\n * @returns {Unit}\n */\nexport function program(root, search, src) {\n const dirs = distinct(root.path === null ? search : [dirOf(root.path), ...search]);\n /** @type {Map<string, Unit>} */\n const byPath = new Map();\n /** @type {Map<string, Unit | null>} each import name, to the library it resolves to */\n const byName = new Map();\n /** @param {Unit} unit */\n const link = (unit) => {\n for (const d of unit.tree.body) {\n if (d._type !== \"Import\" && d._type !== \"ImportFrom\") continue;\n const lib = library(d.path);\n if (lib === null) continue;\n if (d._type === \"Import\") unit.modules.set(d.asname ?? d.path.join(\".\"), lib);\n else for (const a of d.names) unit.bare.set(a.asname ?? a.name, { unit: lib, name: a.name });\n }\n };\n /**\n * @param {string[]} segments\n * @returns {Unit | null}\n */\n const library = (segments) => {\n const name = segments.join(\".\");\n const known = byName.get(name);\n if (known !== undefined) return known;\n /** @type {Array<{ path: string, text: string }>} every entry's file for the name */\n const found = [];\n for (const dir of dirs) {\n const path = [dir, ...segments].join(\"/\") + \".ds\";\n const text = byPath.has(path) ? \"\" : src.read(path);\n if (text !== null) found.push({ path, text });\n }\n byName.set(name, null);\n if (found.length !== 1) return null;\n const [{ path, text }] = found;\n const already = byPath.get(path);\n if (already !== undefined) {\n byName.set(name, already);\n return already;\n }\n const tree = src.tree(text, path);\n if (tree === null) return null;\n /** @type {Unit} */\n const unit = { uri: src.uri(path), path, lines: text.split(/\\r\\n|\\n|\\r/), tree, modules: new Map(), bare: new Map() };\n byPath.set(path, unit);\n byName.set(name, unit);\n link(unit);\n return unit;\n };\n /** @type {Unit} */\n const top = { ...root, modules: new Map(), bare: new Map() };\n if (root.path !== null) byPath.set(root.path, top);\n link(top);\n return top;\n}\n\n/** @param {string} path */\nconst dirOf = (path) => path.slice(0, Math.max(0, path.lastIndexOf(\"/\"))) || \"/\";\n\n/**\n * The search path with an entry named twice kept once, where it first\n * stands: one directory listed twice is one entry, not an ambiguity, as for\n * `dsc`. Entries compare as text with a trailing `/` dropped.\n * @param {string[]} dirs\n */\nfunction distinct(dirs) {\n /** @type {Set<string>} */\n const seen = new Set();\n /** @type {string[]} */\n const out = [];\n for (const d of dirs) {\n const key = d.length > 1 ? d.replace(/\\/+$/, \"\") : d;\n if (seen.has(key)) continue;\n seen.add(key);\n out.push(key);\n }\n return out;\n}\n\n/**\n * Every file of the program, the root first.\n * @param {Unit} top\n * @returns {Unit[]}\n */\nexport function units(top) {\n /** @type {Unit[]} */\n const out = [];\n /** @type {Set<Unit>} */\n const seen = new Set();\n /** @param {Unit} u */\n const visit = (u) => {\n if (seen.has(u)) return;\n seen.add(u);\n out.push(u);\n for (const m of u.modules.values()) visit(m);\n for (const b of u.bare.values()) visit(b.unit);\n };\n visit(top);\n return out;\n}\n\n/**\n * The declaration `name` names in a file: its own, or one an import brings.\n * @param {Unit} unit\n * @param {string} name\n * @returns {{ unit: Unit, decl: decl_t } | null}\n */\nfunction lookup(unit, name) {\n for (const d of unit.tree.body) if (declName(d) === name) return { unit, decl: d };\n const b = unit.bare.get(name);\n if (b === undefined) return null;\n for (const d of b.unit.tree.body) if (declName(d) === b.name) return { unit: b.unit, decl: d };\n return null;\n}\n\n/**\n * The declaration a schema reference names, written plain or qualified.\n * @param {Unit} unit\n * @param {type_ref_t} ref\n */\nfunction lookupType(unit, ref) {\n if (ref._type === \"TypeName\") return lookup(unit, ref.name);\n const lib = unit.modules.get(ref.library.join(\".\"));\n if (lib === undefined) return null;\n for (const d of lib.tree.body) if (declName(d) === ref.name) return { unit: lib, decl: d };\n return null;\n}\n\n/**\n * The schema a schema reference names in a file, written plain or qualified,\n * with the file that declares it.\n * @param {Unit} unit\n * @param {type_ref_t} ref\n * @returns {{ unit: Unit, schema: Schema } | null}\n */\nexport function schemaOf(unit, ref) {\n const found = lookupType(unit, ref);\n return found !== null && found.decl._type === \"Schema\" ? { unit: found.unit, schema: found.decl } : null;\n}\n\n/**\n * Every service a `call` in the program may name: each one its files\n * declare, by its dotted name ([LGRA.10.1.6]). A name two files declare is\n * the first's, the root first.\n * @param {Unit} top\n * @returns {Map<string, { unit: Unit, decl: Service }>}\n */\nexport function services(top) {\n /** @type {Map<string, { unit: Unit, decl: Service }>} */\n const out = new Map();\n for (const u of units(top))\n for (const d of u.tree.body)\n if (d._type === \"Service\" && !out.has(d.name.join(\".\"))) out.set(d.name.join(\".\"), { unit: u, decl: d });\n return out;\n}\n\n/**\n * The service a `call` at a position names, where the position is on its\n * name: `call pager.page \u2026` anywhere on `pager.page`.\n * @param {Unit} unit\n * @param {number} line\n * @param {number} col\n * @returns {string | null} its dotted name\n */\nexport function calledAt(unit, line, col) {\n const d = declAt(unit.tree, line, col);\n if (d?._type !== \"Rule\") return null;\n for (const n of walk(d)) {\n if (n._type !== \"ServiceCall\" || n.lineno !== line) continue;\n const name = n.service.join(\".\");\n const r = nameRange(unit.lines, n, name);\n if (r.end > r.start && col >= r.start && col <= r.end) return name;\n }\n return null;\n}\n\n/**\n * A reference as hover and definition take it: what it names, and the file\n * declaring it.\n * @param {Ref} ref\n * @returns {{ unit: Unit, t: Target } | null}\n */\nexport function targetOf(ref) {\n switch (ref.kind) {\n case \"decl\": return { unit: ref.unit, t: { kind: \"decl\", decl: ref.decl, name: ref.name } };\n case \"slot\": return { unit: ref.unit, t: { kind: \"slot\", schema: ref.schema, slot: ref.slot } };\n case \"binding\": {\n const body = bindings(ref.rule).get(ref.name);\n if (body === undefined) return null;\n const schema = schemaOf(ref.unit, body.type)?.schema ?? null;\n return { unit: ref.unit, t: { kind: \"binding\", name: ref.name, body, schema } };\n }\n }\n}\n\n/**\n * What the name at a position refers to, in the program.\n * @param {Unit} unit the position's file\n * @param {number} line\n * @param {number} col\n * @returns {Ref | null}\n */\nexport function refAt(unit, line, col) {\n const w = wordAt(unit.lines[line - 1] ?? \"\", col);\n if (w === null) return null;\n const d = declAt(unit.tree, line, col);\n if (d?._type === \"Rule\") {\n const bs = bindings(d);\n if (w.qualifier !== null) {\n const body = bs.get(w.qualifier);\n if (body !== undefined) {\n const s = lookupType(unit, body.type);\n const slot = s?.decl._type === \"Schema\" ? s.decl.slots.find((x) => x.name === w.word) : undefined;\n return s && slot && s.decl._type === \"Schema\" ? { kind: \"slot\", unit: s.unit, schema: s.decl, slot } : null;\n }\n const lib = unit.modules.get(w.qualifier);\n if (lib === undefined) return null;\n for (const x of lib.tree.body) if (declName(x) === w.word) return { kind: \"decl\", unit: lib, decl: x, name: w.word };\n return null;\n }\n if (bs.has(w.word)) return { kind: \"binding\", unit, rule: d, name: w.word };\n // `emit Alert sensor: \u2026`, or `sensor: \u2026` in the emit's block: a slot of Alert.\n for (const n of walk(d)) {\n if ((n._type === \"Emit\" || n._type === \"Publish\") && spans(n, line, col)\n && [...n.args, ...n.block].some((k) => k.arg === w.word && k.lineno === line)) {\n const s = lookupType(unit, n.schema);\n const slot = s?.decl._type === \"Schema\" ? s.decl.slots.find((x) => x.name === w.word) : undefined;\n if (s && slot && s.decl._type === \"Schema\") return { kind: \"slot\", unit: s.unit, schema: s.decl, slot };\n }\n }\n }\n if (d?._type === \"Schema\") {\n const slot = d.slots.find((s) => s.lineno === line && s.name === w.word);\n if (slot) return { kind: \"slot\", unit, schema: d, slot };\n }\n const found = lookup(unit, w.word);\n return found === null ? null : { kind: \"decl\", unit: found.unit, decl: found.decl, name: declName(found.decl) ?? w.word };\n}\n\n/**\n * Every site of what `ref` refers to, across the program, its declaration\n * marked.\n * @param {Unit} top\n * @param {Ref} ref\n * @returns {Site[]}\n */\nexport function sites(top, ref) {\n /** @type {Site[]} */\n const out = [];\n /** @param {Unit} unit @param {NameRange} range @param {boolean} [declaration] */\n const add = (unit, range, declaration = false) => out.push({ unit, range, declaration });\n if (ref.kind === \"binding\") {\n bindingSites(ref, add);\n return out;\n }\n if (ref.kind === \"decl\") add(ref.unit, nameRange(ref.unit.lines, ref.decl, ref.name), true);\n else add(ref.unit, nameRange(ref.unit.lines, ref.slot, ref.slot.name), true);\n for (const unit of units(top)) {\n if (ref.kind === \"decl\") declSites(unit, ref, add);\n else slotSites(unit, ref, add);\n }\n return out;\n}\n\n/**\n * @param {Extract<Ref, { kind: \"binding\" }>} ref\n * @param {(unit: Unit, range: NameRange, declaration?: boolean) => void} add\n */\nfunction bindingSites(ref, add) {\n const { unit, rule, name } = ref;\n for (const body of patternBodies(rule.lhs))\n if (body.binding === name) add(unit, nameAfter(unit.lines, body, typeName(body.type), name), true);\n for (const n of walk(rule)) if (n._type === \"Name\" && n.id === name) add(unit, exprRange(n, name));\n}\n\n/**\n * Sites in one file of a declaration, written under its own name.\n * @param {Unit} unit\n * @param {Extract<Ref, { kind: \"decl\" }>} ref\n * @param {(unit: Unit, range: NameRange) => void} add\n */\nfunction declSites(unit, ref, add) {\n const same = (/** @type {{ decl: decl_t } | null} */ r) => r !== null && r.decl === ref.decl;\n for (const d of unit.tree.body) {\n if (d._type === \"ImportFrom\")\n for (const a of d.names)\n if (a.name === ref.name && unit.bare.get(a.asname ?? a.name)?.unit === ref.unit) add(unit, nameRange(unit.lines, a, a.name));\n if (d._type !== \"Rule\") continue;\n const bs = bindings(d);\n for (const body of patternBodies(d.lhs))\n if (body.type.name === ref.name && same(lookupType(unit, body.type))) add(unit, nameRange(unit.lines, body, ref.name));\n for (const n of walk(d)) {\n if ((n._type === \"Emit\" || n._type === \"Publish\")\n && n.schema.name === ref.name && same(lookupType(unit, n.schema)))\n add(unit, nameRange(unit.lines, n, ref.name));\n else if (n._type === \"Name\" && n.id === ref.name && !bs.has(n.id) && same(lookup(unit, n.id)))\n add(unit, exprRange(n, n.id));\n else if (n._type === \"Attribute\" && n.attr === ref.name && n.value._type === \"Name\"\n && unit.modules.get(n.value.id) === ref.unit && !bs.has(n.value.id))\n add(unit, attrRange(unit.lines, n));\n }\n }\n}\n\n/**\n * Sites in one file of a slot: read through a binding of its schema, or\n * written by an emit or publish of it.\n * @param {Unit} unit\n * @param {Extract<Ref, { kind: \"slot\" }>} ref\n * @param {(unit: Unit, range: NameRange) => void} add\n */\nfunction slotSites(unit, ref, add) {\n const isSchema = (/** @type {type_ref_t} */ t) => lookupType(unit, t)?.decl === ref.schema;\n for (const d of unit.tree.body) {\n if (d._type !== \"Rule\") continue;\n /** @type {Set<string>} */\n const of = new Set();\n for (const [b, body] of bindings(d)) if (isSchema(body.type)) of.add(b);\n for (const n of walk(d)) {\n if (n._type === \"Attribute\" && n.attr === ref.slot.name && n.value._type === \"Name\" && of.has(n.value.id))\n add(unit, attrRange(unit.lines, n));\n else if ((n._type === \"Emit\" || n._type === \"Publish\") && isSchema(n.schema))\n for (const k of [...n.args, ...n.block]) if (k.arg === ref.slot.name) add(unit, nameRange(unit.lines, k, k.arg));\n }\n }\n}\n\n/**\n * A `Name`'s range: it starts where the node does.\n * @param {{ lineno: number, col_offset: number }} n\n * @param {string} name\n * @returns {NameRange}\n */\nfunction exprRange(n, name) {\n return { line: n.lineno, start: n.col_offset, end: n.col_offset + [...name].length };\n}\n\n/**\n * An `Attribute`'s name: the first whole-word occurrence after its value,\n * read from the line. `dsc dump-ast` writes an Attribute's end just past its\n * name, but inside an interpolation site the end is null, so the line\n * is what serves every Attribute.\n * @param {string[]} lines\n * @param {import(\"../ast/nodes.js\").Attribute} n\n * @returns {NameRange}\n */\nfunction attrRange(lines, n) {\n const v = n.value;\n const from = v._type === \"Name\" && v.lineno === n.lineno ? v.col_offset + [...v.id].length : n.col_offset;\n return nameRange(lines, { lineno: n.lineno, col_offset: from }, n.attr);\n}\n\n/**\n * A pattern's binding: the first whole-word occurrence after its type.\n * @param {string[]} lines\n * @param {{ lineno: number, col_offset: number }} body\n * @param {string} type\n * @param {string} name\n */\nfunction nameAfter(lines, body, type, name) {\n const t = nameRange(lines, body, type);\n return nameRange(lines, { lineno: body.lineno, col_offset: t.end }, name);\n}\n", "// GENERATED from [LLEX.9.6], [LEXP.17.2] and [LGRA.22.8]. Do not edit:\n// regenerate it.\n// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// What `ds lsp` completes from: the words the grammar reserves, by their\n// LLEX.9.8 class; the aggregations; the builtin functions, with what hover\n// and signature help show of them; the builtin types.\n\n/** @typedef {{ id: string, page: string }} Clause a clause, and its page in the rendered specification book */\n/** @typedef {{ name: string, arities: readonly number[], tier: \"pure\" | \"sync-impure\", signatures: readonly string[], summary: string, defined: readonly Clause[] }} Builtin */\n/** @typedef {{ name: string, clause: string }} BuiltinType */\n\n/** The grammar's reserved words, by class ([LLEX.9.6], [LLEX.9.8]). */\nexport const GRAMMAR_WORDS = Object.freeze({\n declaration: Object.freeze([\"const\", \"from\", \"import\", \"opaque\", \"rule\", \"schema\", \"series\", \"service\", \"test\", \"unit\", \"use\"]),\n action: Object.freeze([\"cache\", \"cache_delete\", \"call\", \"emit\", \"log\", \"publish\", \"withdraw\"]),\n clause: Object.freeze([\"activated\", \"activation\", \"after\", \"alias\", \"all_time\", \"ambient\", \"as\", \"at\", \"base\", \"by\", \"cache_deleted\", \"cached\", \"called\", \"capacity\", \"cooldown\", \"count\", \"default\", \"dimension\", \"emitted\", \"empty\", \"error\", \"explicit\", \"field\", \"filter_fields\", \"for\", \"formula\", \"from_base\", \"fx_pair\", \"gap\", \"has\", \"hold\", \"hydrates\", \"hydration\", \"implicit\", \"initial\", \"inputs\", \"inverting\", \"key\", \"kwarg\", \"latest\", \"let\", \"literal\", \"logged\", \"logical\", \"max_limit\", \"max_window\", \"mutable\", \"never\", \"no\", \"none\", \"on\", \"over\", \"persist\", \"produces\", \"published\", \"recorded\", \"required\", \"response\", \"responses\", \"retained\", \"retracted\", \"sample\", \"sampled\", \"scalar\", \"scope\", \"skip\", \"sliding\", \"storage\", \"then\", \"timeout\", \"to\", \"to_base\", \"tolerance\", \"ttl\", \"tumbling\", \"type\", \"until\", \"via\", \"where\", \"within\", \"wm\", \"zero\"]),\n operator: Object.freeze([\"and\", \"contains\", \"in\", \"is\", \"not\", \"or\", \"overlaps\"]),\n constant: Object.freeze([\"NaN\", \"false\", \"inf\", \"nan\", \"null\", \"true\"]),\n});\n\n/** The aggregations and their aliases ([LLEX.9.6]). */\nexport const AGGREGATIONS = Object.freeze([\"active_fraction\", \"bool_and\", \"bool_or\", \"count_distinct\", \"count_of\", \"direction\", \"dwell\", \"first\", \"integral\", \"last\", \"max\", \"mean\", \"median\", \"min\", \"onset_rate\", \"pstdev\", \"pvariance\", \"rate\", \"stdev\", \"sum\", \"variance\"]);\n\n/** The builtin functions ([LEXP.17.2]). @type {readonly Builtin[]} */\nexport const BUILTINS = Object.freeze([\n { name: \"abs\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Int) \u2192 Int\", \"(x: Float) \u2192 Float\"],\n summary: \"Absolute value, of the argument's type.\",\n defined: [{ id: \"LEXP.3.2\", page: \"language/EXPRESSIONS.html#lexp-3-2\" }] },\n { name: \"cached\", arities: [1], tier: \"sync-impure\",\n signatures: [\"(key: String) \u2192 String?\"],\n summary: \"The cache's value for the key, as JSON text; null on a miss.\",\n defined: [{ id: \"LSTO.4.3.1\", page: \"language/STORAGE.html#lsto-4-3-1\" }] },\n { name: \"calendar.date\", arities: [3], tier: \"pure\",\n signatures: [\"(year: Int, month: Int, day: Int) \u2192 Date\"],\n summary: \"The Date of that calendar day.\",\n defined: [{ id: \"LTIM.14.1\", page: \"language/TIME.html#ltim-14-1\" }] },\n { name: \"calendar.time\", arities: [3, 6, 7], tier: \"pure\",\n signatures: [\"(year, month, day: Int) \u2192 Time\", \"(year, month, day, hour, minute, second: Int) \u2192 Time\", \"(year, month, day, hour, minute, second, nanosecond: Int) \u2192 Time\"],\n summary: \"The UTC instant of that calendar day and wall-clock time.\",\n defined: [{ id: \"LTIM.14.1\", page: \"language/TIME.html#ltim-14-1\" }] },\n { name: \"contains\", arities: [2], tier: \"pure\",\n signatures: [\"(cursor, value: T) \u2192 Bool\"],\n summary: \"Whether the value is among the series' samples in its window.\",\n defined: [{ id: \"LSER.16.7.1\", page: \"language/SERIES.html#lser-16-7-1\" }] },\n { name: \"count\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Int\"],\n summary: \"Number of samples in the series' window.\",\n defined: [{ id: \"LSER.16.2\", page: \"language/SERIES.html#lser-16-2\" }] },\n { name: \"count_distinct\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Int\"],\n summary: \"Number of distinct sample values in the series' window.\",\n defined: [{ id: \"LSER.16.5.1\", page: \"language/SERIES.html#lser-16-5-1\" }] },\n { name: \"count_of\", arities: [2], tier: \"pure\",\n signatures: [\"(cursor, value: T) \u2192 Int\"],\n summary: \"Number of samples in the series' window equal to the value.\",\n defined: [{ id: \"LSER.16.6.1\", page: \"language/SERIES.html#lser-16-6-1\" }] },\n { name: \"direction\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Int?\"],\n summary: \"Sign of the difference of the two newest samples: \u22121, 0 or 1.\",\n defined: [{ id: \"LSER.16.9\", page: \"language/SERIES.html#lser-16-9\" }] },\n { name: \"distance.chebyshev\", arities: [4, 6], tier: \"pure\",\n signatures: [\"(x1, y1, x2, y2: Float) \u2192 Float\", \"(x1, y1, z1, x2, y2, z2: Float) \u2192 Float\"],\n summary: \"L\u221E (chessboard) distance between two points, 2D or 3D.\",\n defined: [{ id: \"LEXP.5.3.1\", page: \"language/EXPRESSIONS.html#lexp-5-3-1\" }] },\n { name: \"distance.cosine\", arities: [4, 6], tier: \"pure\",\n signatures: [\"(ax, ay, bx, by: Float) \u2192 Float\", \"(ax, ay, az, bx, by, bz: Float) \u2192 Float\"],\n summary: \"Cosine distance, 1 \u2212 cos \u03B8, between two vectors, in [0, 2].\",\n defined: [{ id: \"LEXP.5.7.1\", page: \"language/EXPRESSIONS.html#lexp-5-7-1\" }] },\n { name: \"distance.euclidean\", arities: [4, 6], tier: \"pure\",\n signatures: [\"(x1, y1, x2, y2: Float) \u2192 Float\", \"(x1, y1, z1, x2, y2, z2: Float) \u2192 Float\"],\n summary: \"L\u2082 distance between two points, 2D or 3D.\",\n defined: [{ id: \"LEXP.5.3.1\", page: \"language/EXPRESSIONS.html#lexp-5-3-1\" }] },\n { name: \"distance.great_circle\", arities: [4], tier: \"pure\",\n signatures: [\"(lat1, lon1, lat2, lon2: Float) \u2192 meter\"],\n summary: \"Distance along the Earth's surface between two points given in degrees.\",\n defined: [{ id: \"LEXP.5.11.1\", page: \"language/EXPRESSIONS.html#lexp-5-11-1\" }] },\n { name: \"distance.hypotenuse\", arities: [2, 3], tier: \"pure\",\n signatures: [\"(x, y: Float) \u2192 Float\", \"(x, y, z: Float) \u2192 Float\"],\n summary: \"Length of a vector from the origin, 2D or 3D.\",\n defined: [{ id: \"LEXP.5.5\", page: \"language/EXPRESSIONS.html#lexp-5-5\" }] },\n { name: \"distance.manhattan\", arities: [4, 6], tier: \"pure\",\n signatures: [\"(x1, y1, x2, y2: Float) \u2192 Float\", \"(x1, y1, z1, x2, y2, z2: Float) \u2192 Float\"],\n summary: \"L\u2081 (taxicab) distance between two points, 2D or 3D.\",\n defined: [{ id: \"LEXP.5.3.1\", page: \"language/EXPRESSIONS.html#lexp-5-3-1\" }] },\n { name: \"has\", arities: [1], tier: \"pure\",\n signatures: [\"(path: Json path) \u2192 Bool\"],\n summary: \"Whether the Json path resolves.\",\n defined: [{ id: \"LEXP.6.1\", page: \"language/EXPRESSIONS.html#lexp-6-1\" }] },\n { name: \"len\", arities: [1], tier: \"pure\",\n signatures: [\"(j: Json) \u2192 Int\", \"(s: String) \u2192 Int\", \"(b: Bytes) \u2192 Int\"],\n summary: \"A Json array's length, a String's code points, or a Bytes value's bytes.\",\n defined: [{ id: \"LEXP.6.1\", page: \"language/EXPRESSIONS.html#lexp-6-1\" }, { id: \"LSTR.2.1\", page: \"language/STRINGS.html#lstr-2-1\" }, { id: \"LSTR.4.2\", page: \"language/STRINGS.html#lstr-4-2\" }] },\n { name: \"math.acos\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Inverse cosine, in radians.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.asin\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Inverse sine, in radians.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.atan\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Inverse tangent, in radians.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.atan2\", arities: [2], tier: \"pure\",\n signatures: [\"(y: Float, x: Float) \u2192 Float\"],\n summary: \"Angle of the point (x, y) from the positive x axis, in radians, in [\u2212\u03C0, \u03C0].\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.ceil\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Int) \u2192 Int\", \"(x: Float) \u2192 Int\", \"(x: <unit>) \u2192 <unit>\"],\n summary: \"Smallest integer not less than x; a Float with no Int answer traps.\",\n defined: [{ id: \"LEXP.3.2\", page: \"language/EXPRESSIONS.html#lexp-3-2\" }] },\n { name: \"math.cos\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Cosine of x radians.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.cosh\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Hyperbolic cosine.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.degrees\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Radians to degrees.\",\n defined: [{ id: \"LEXP.3.6.1\", page: \"language/EXPRESSIONS.html#lexp-3-6-1\" }] },\n { name: \"math.exp\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"e to the power x.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.floor\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Int) \u2192 Int\", \"(x: Float) \u2192 Int\", \"(x: <unit>) \u2192 <unit>\"],\n summary: \"Largest integer not greater than x; a Float with no Int answer traps.\",\n defined: [{ id: \"LEXP.3.2\", page: \"language/EXPRESSIONS.html#lexp-3-2\" }] },\n { name: \"math.fma\", arities: [3], tier: \"pure\",\n signatures: [\"(x: Float, y: Float, z: Float) \u2192 Float\"],\n summary: \"x \u00D7 y + z, rounded once.\",\n defined: [{ id: \"LEXP.3.2.2\", page: \"language/EXPRESSIONS.html#lexp-3-2-2\" }] },\n { name: \"math.ln\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Natural logarithm.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.log10\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Base-10 logarithm.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.log2\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Base-2 logarithm.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.pow\", arities: [2], tier: \"pure\",\n signatures: [\"(x: Int, y: Int) \u2192 Int\", \"(x: Float, y: Float) \u2192 Float\"],\n summary: \"x to the power y; an Int only for an Int base and a statically non-negative Int exponent.\",\n defined: [{ id: \"LEXP.3.2\", page: \"language/EXPRESSIONS.html#lexp-3-2\" }] },\n { name: \"math.radians\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Degrees to radians.\",\n defined: [{ id: \"LEXP.3.6.1\", page: \"language/EXPRESSIONS.html#lexp-3-6-1\" }] },\n { name: \"math.sign\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Int) \u2192 Int\", \"(x: Float) \u2192 Int\", \"(x: <unit>) \u2192 Int\"],\n summary: \"1 when x > 0, \u22121 when x < 0, else 0.\",\n defined: [{ id: \"LEXP.3.2\", page: \"language/EXPRESSIONS.html#lexp-3-2\" }] },\n { name: \"math.sin\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Sine of x radians.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.sinh\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Hyperbolic sine.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.sqrt\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Square root, correctly rounded; NaN for a negative x.\",\n defined: [{ id: \"LEXP.3.2\", page: \"language/EXPRESSIONS.html#lexp-3-2\" }] },\n { name: \"math.tan\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Tangent of x radians.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.tanh\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Float) \u2192 Float\"],\n summary: \"Hyperbolic tangent.\",\n defined: [{ id: \"LEXP.3.9.1\", page: \"language/EXPRESSIONS.html#lexp-3-9-1\" }] },\n { name: \"math.trunc\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Int) \u2192 Int\", \"(x: Float) \u2192 Int\", \"(x: <unit>) \u2192 <unit>\"],\n summary: \"x truncated toward zero; a Float with no Int answer traps.\",\n defined: [{ id: \"LEXP.3.2\", page: \"language/EXPRESSIONS.html#lexp-3-2\" }] },\n { name: \"max\", arities: [2], tier: \"pure\",\n signatures: [\"(a, b: Int | Float) \u2192 Int | Float\", \"(a, b: <unit>) \u2192 <unit>\", \"(cursor) \u2192 T?\"],\n summary: \"The larger of a and b, of the winning operand's type, a tie giving a; with a cursor alone, the series' maximum.\",\n defined: [{ id: \"LEXP.3.8.1\", page: \"language/EXPRESSIONS.html#lexp-3-8-1\" }] },\n { name: \"mean\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Arithmetic mean of the series' window.\",\n defined: [{ id: \"LSER.16.2\", page: \"language/SERIES.html#lser-16-2\" }] },\n { name: \"median\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Median of the series' window, as p50.\",\n defined: [{ id: \"LSER.16.2\", page: \"language/SERIES.html#lser-16-2\" }] },\n { name: \"min\", arities: [2], tier: \"pure\",\n signatures: [\"(a, b: Int | Float) \u2192 Int | Float\", \"(a, b: <unit>) \u2192 <unit>\", \"(cursor) \u2192 T?\"],\n summary: \"The smaller of a and b, of the winning operand's type, a tie giving a; with a cursor alone, the series' minimum.\",\n defined: [{ id: \"LEXP.3.8.1\", page: \"language/EXPRESSIONS.html#lexp-3-8-1\" }] },\n { name: \"monotonic_ns\", arities: [0], tier: \"sync-impure\",\n signatures: [\"() \u2192 Duration\"],\n summary: \"The monotonic clock's reading.\",\n defined: [{ id: \"LGRA.9.8.10\", page: \"language/GRAMMAR.html#lgra-9-8-10\" }] },\n { name: \"now\", arities: [0], tier: \"sync-impure\",\n signatures: [\"() \u2192 Time\"],\n summary: \"The wall-clock instant.\",\n defined: [{ id: \"LGRA.9.8.10\", page: \"language/GRAMMAR.html#lgra-9-8-10\" }] },\n { name: \"p1\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 1 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p10\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 10 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p11\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 11 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p12\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 12 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p13\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 13 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p14\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 14 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p15\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 15 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p16\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 16 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p17\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 17 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p18\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 18 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p19\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 19 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p2\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 2 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p20\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 20 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p21\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 21 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p22\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 22 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p23\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 23 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p24\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 24 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p25\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 25 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p26\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 26 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p27\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 27 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p28\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 28 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p29\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 29 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p3\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 3 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p30\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 30 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p31\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 31 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p32\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 32 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p33\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 33 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p34\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 34 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p35\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 35 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p36\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 36 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p37\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 37 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p38\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 38 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p39\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 39 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p4\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 4 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p40\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 40 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p41\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 41 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p42\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 42 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p43\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 43 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p44\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 44 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p45\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 45 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p46\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 46 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p47\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 47 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p48\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 48 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p49\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 49 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p5\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 5 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p50\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 50 of the series' window, interpolated; the median.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p51\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 51 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p52\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 52 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p53\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 53 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p54\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 54 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p55\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 55 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p56\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 56 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p57\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 57 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p58\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 58 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p59\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 59 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p6\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 6 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p60\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 60 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p61\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 61 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p62\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 62 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p63\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 63 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p64\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 64 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p65\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 65 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p66\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 66 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p67\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 67 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p68\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 68 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p69\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 69 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p7\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 7 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p70\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 70 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p71\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 71 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p72\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 72 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p73\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 73 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p74\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 74 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p75\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 75 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p76\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 76 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p77\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 77 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p78\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 78 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p79\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 79 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p8\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 8 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p80\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 80 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p81\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 81 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p82\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 82 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p83\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 83 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p84\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 84 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p85\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 85 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p86\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 86 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p87\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 87 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p88\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 88 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p89\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 89 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p9\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 9 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p90\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 90 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p91\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 91 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p92\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 92 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p93\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 93 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p94\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 94 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p95\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 95 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p96\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 96 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p97\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 97 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p98\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 98 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"p99\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Percentile 99 of the series' window, interpolated.\",\n defined: [{ id: \"LSER.16.4.1\", page: \"language/SERIES.html#lser-16-4-1\" }] },\n { name: \"pstdev\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Population standard deviation of the series' window.\",\n defined: [{ id: \"LSER.16.3.1\", page: \"language/SERIES.html#lser-16-3-1\" }] },\n { name: \"pvariance\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Population variance of the series' window.\",\n defined: [{ id: \"LSER.16.3.1\", page: \"language/SERIES.html#lser-16-3-1\" }] },\n { name: \"rate\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"(last \u2212 first) / elapsed seconds over the series' window.\",\n defined: [{ id: \"LSER.16.9\", page: \"language/SERIES.html#lser-16-9\" }] },\n { name: \"round\", arities: [1], tier: \"pure\",\n signatures: [\"(x: Int) \u2192 Int\", \"(x: Float) \u2192 Int\", \"(x: <unit>) \u2192 <unit>\"],\n summary: \"Nearest integer, ties to even; a Float with no Int answer traps.\",\n defined: [{ id: \"LEXP.3.2\", page: \"language/EXPRESSIONS.html#lexp-3-2\" }] },\n { name: \"stdev\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Sample standard deviation of the series' window.\",\n defined: [{ id: \"LSER.16.3.1\", page: \"language/SERIES.html#lser-16-3-1\" }] },\n { name: \"variance\", arities: [1], tier: \"pure\",\n signatures: [\"(cursor) \u2192 Float?\"],\n summary: \"Sample variance of the series' window.\",\n defined: [{ id: \"LSER.16.3.1\", page: \"language/SERIES.html#lser-16-3-1\" }] },\n]);\n\n/** The builtin types ([LGRA.22.8]). @type {readonly BuiltinType[]} */\nexport const TYPES = Object.freeze([\n { name: \"Bool\", clause: \"LGRA.5.1\" },\n { name: \"Bytes\", clause: \"LGRA.5.1\" },\n { name: \"Date\", clause: \"LTIM.1\" },\n { name: \"Duration\", clause: \"LTIM.1\" },\n { name: \"Float\", clause: \"LGRA.5.1\" },\n { name: \"Int\", clause: \"LGRA.5.1\" },\n { name: \"Interval\", clause: \"LINT.1\" },\n { name: \"Json\", clause: \"LGRA.5.8\" },\n { name: \"String\", clause: \"LGRA.5.1\" },\n { name: \"Time\", clause: \"LTIM.1\" },\n]);\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// Completion: what may be written at a position, read from the line before\n// the cursor and the program's tree. The lists are the spec's, generated into\n// registries.js: the grammar's words by class ([LLEX.9.6]), the builtin\n// functions ([LEXP.17.2]), the aggregations, the builtin types ([LGRA.22.8]).\n//\n// Positions are the tree's: lines 1-based, columns in code points. The tree\n// may be the last good one while an edit does not parse; it answers for the\n// program's names, and the line's own text says where the cursor is.\n//\n// The program, where the server gives it (references.js `program`), is the\n// file and every library it imports, resolved as the compiler resolves them.\n// It answers for what the imports bring: a library's schemas and constants\n// after its qualifier and any it makes bare, the slots of a schema a library\n// declares, and every service of the program after `call`, with its kwargs\n// ([LGRA.10.1.6]). Without one, only the file's own declarations and the\n// builtins are offered.\n\nimport { bindings, declAt, declName, kwargText, typeName } from \"./analysis.js\";\nimport { schemaOf, services } from \"./references.js\";\nimport { AGGREGATIONS, BUILTINS, GRAMMAR_WORDS, TYPES } from \"./registries.js\";\n\n/** @import { Module, Rule, Schema, Service, decl_t } from \"../ast/nodes.js\" */\n/** @import { Builtin } from \"./registries.js\" */\n/** @import { Unit } from \"./references.js\" */\n\n/** LSP's CompletionItemKind and InsertTextFormat numbers. */\nconst FUNCTION = 3, FIELD = 5, VARIABLE = 6, CLASS = 7, MODULE = 9, KEYWORD = 14, CONSTANT = 21, STRUCT = 22,\n OPERATOR = 24, SNIPPET = 2;\n\n/** @typedef {{ label: string, kind: number, detail?: string, insertText?: string, insertTextFormat?: number }} Item */\n\n/**\n * @param {string} label\n * @param {number} kind\n * @param {string} [detail]\n * @returns {Item}\n */\nconst item = (label, kind, detail) => (detail === undefined ? { label, kind } : { label, kind, detail });\n\n/** What a call may name: every row of [LEXP.17.2]. */\nconst CALLABLE = BUILTINS;\n\n/**\n * The items for a position.\n * @param {Module | null} mod the last good tree, if the document ever parsed\n * @param {string[]} lines\n * @param {number} line\n * @param {number} col\n * @param {{ prog?: Unit | null }} [options]\n * `prog`: the program rooted at `mod`'s file, its imports resolved; none offers the file's own names alone\n * @returns {Item[]}\n */\nexport function complete(mod, lines, line, col, { prog = null } = {}) {\n const before = [...(lines[line - 1] ?? \"\")].slice(0, col).join(\"\");\n const call = /(?:^|\\s)call\\s+((?:[\\p{L}_][\\p{L}\\p{N}_]*\\.)*)[\\p{L}\\p{N}_]*$/u.exec(before);\n if (call) return serviceNames(mod, prog, call[1]);\n const args = callArgs(before);\n if (args !== null) return kwargs(mod, prog, args);\n const dot = /([\\p{L}_][\\p{L}\\p{N}_]*)\\.[\\p{L}\\p{N}_]*$/u.exec(before);\n if (dot) return afterDot(mod, prog, dot[1], line, col);\n if (/::\\s*[\\p{L}\\p{N}_]*$/u.test(before)) return TYPES.map((t) => item(t.name, CLASS, `type (${t.clause})`));\n if (/(?:^|\\s)(?:emit|publish)\\s+[\\p{L}\\p{N}_]*$/u.test(before)) return schemas(mod, prog);\n // Nothing on the line yet but the word being typed.\n const fresh = /^\\s*[\\p{L}\\p{N}_]*$/u.test(before);\n if (fresh && !/^\\s/u.test(before)) return GRAMMAR_WORDS.declaration.map((w) => item(w, KEYWORD));\n const d = mod === null ? null : declAt(mod, line, col);\n if (d?._type !== \"Rule\") return expression(mod, prog, null);\n /** @type {Item[]} */\n const out = [];\n if (fresh) {\n if (inActions(lines, d.lineno, line)) out.push(...GRAMMAR_WORDS.action.map((w) => item(w, KEYWORD)), item(\"let\", KEYWORD));\n else out.push(...schemas(mod, prog), ...[\"no\", \"then\", \"latest\"].map((w) => item(w, KEYWORD)));\n }\n out.push(...expression(mod, prog, d));\n return out;\n}\n\n/**\n * The services a `call` may name, after what of a dotted name is typed:\n * each one the program declares ([LGRA.10.1.6]), or the file's own with no\n * program. `call pager.` offers `page` and `notify`, each by what follows\n * the typed part.\n * @param {Module | null} mod\n * @param {Unit | null} prog\n * @param {string} typed the dotted name's segments typed so far, each with its `.`\n * @returns {Item[]}\n */\nfunction serviceNames(mod, prog, typed) {\n /** @type {Item[]} */\n const out = [];\n for (const [name, s] of declaredServices(mod, prog))\n if (name.startsWith(typed) && name.length > typed.length)\n out.push(item(name.slice(typed.length), FUNCTION, serviceDetail(s)));\n return out;\n}\n\n/**\n * The services a call may name, by dotted name.\n * @param {Module | null} mod\n * @param {Unit | null} prog\n * @returns {Map<string, Service>}\n */\nfunction declaredServices(mod, prog) {\n /** @type {Map<string, Service>} */\n const out = new Map();\n if (prog !== null) {\n for (const [name, s] of services(prog)) out.set(name, s.decl);\n return out;\n }\n for (const d of mod?.body ?? []) {\n if (d._type !== \"Service\") continue;\n const name = d.name.join(\".\");\n if (!out.has(name)) out.set(name, d);\n }\n return out;\n}\n\n/**\n * A service's kwargs, as an item's detail.\n * @param {Service} s\n */\nfunction serviceDetail(s) {\n return s.kwargs.length === 0 ? \"service\" : `service (${s.kwargs.map((k) => k.name).join(\", \")})`;\n}\n\n/**\n * The call a position is a kwarg's name in, on the call's own line:\n * `call pager.page who: \"x\" su` is one, `call pager.page who: ` is not (a\n * value goes there). Its service, and the kwargs the line writes already.\n * @param {string} before the line up to the cursor\n * @returns {{ service: string, written: Set<string> } | null}\n */\nfunction callArgs(before) {\n const m = /(?:^|\\s)call\\s+([\\p{L}_][\\p{L}\\p{N}_]*(?:\\.[\\p{L}_][\\p{L}\\p{N}_]*)+)\\s+(.*)$/u.exec(before);\n if (m === null) return null;\n // A string's text is no kwarg: drop each string, and stop inside an open one.\n const tail = m[2].replace(/\"(?:[^\"\\\\]|\\\\.)*\"/gu, '\"\"');\n if ((tail.match(/\"/gu) ?? []).length % 2 === 1) return null;\n const rest = tail.replace(/[\\p{L}\\p{N}_]*$/u, \"\");\n if (rest !== \"\" && !/\\s$/u.test(rest)) return null;\n if (/:\\s*$/u.test(rest)) return null;\n const written = new Set([...tail.matchAll(/([\\p{L}_][\\p{L}\\p{N}_]*)\\s*:/gu)].map((k) => k[1]));\n return { service: m[1], written };\n}\n\n/**\n * A call's kwargs that the line does not write yet, each to fill in.\n * @param {Module | null} mod\n * @param {Unit | null} prog\n * @param {{ service: string, written: Set<string> }} args\n * @returns {Item[]}\n */\nfunction kwargs(mod, prog, args) {\n const s = declaredServices(mod, prog).get(args.service);\n if (s === undefined) return [];\n return s.kwargs.filter((k) => !args.written.has(k.name))\n .map((k) => ({ label: k.name, kind: FIELD, detail: kwargText(k), insertText: `${k.name}: ` }));\n}\n\n/**\n * What the program's imports reach ([LIMP.3.3.4]): each `import m` (or\n * `import m as q`) by the name it is qualified with, and each name a\n * `from m import x` (or `x as y`) makes bare, to the member it names.\n * @param {Module | null} mod\n */\nexport function imported(mod) {\n /** @type {Map<string, string>} the qualifier, to the module it names */\n const modules = new Map();\n /** @type {Map<string, string>} the bare name, to `module.member` */\n const bare = new Map();\n for (const d of mod?.body ?? []) {\n if (d._type === \"Import\") {\n const m = d.path.join(\".\");\n modules.set(d.asname ?? m, m);\n } else if (d._type === \"ImportFrom\") {\n const m = d.path.join(\".\");\n for (const a of d.names) bare.set(a.asname ?? a.name, `${m}.${a.name}`);\n }\n }\n return { modules, bare };\n}\n\n/**\n * `q.` and what follows it: a slot of the schema binding `q` names, wherever\n * it is declared; or a member of the module `q` names, if the program\n * imports it: a library's schemas and constants, a builtin module's\n * functions. A module's members are reached only through an import\n * ([LIMP.3.3.4]).\n * @param {Module | null} mod\n * @param {Unit | null} prog\n * @param {string} q\n * @param {number} line\n * @param {number} col\n * @returns {Item[]}\n */\nfunction afterDot(mod, prog, q, line, col) {\n const d = mod === null ? null : declAt(mod, line, col);\n if (mod !== null && d?._type === \"Rule\") {\n const body = bindings(d).get(q);\n const schema = body === undefined ? null\n : prog === null ? schemaNamed(mod, typeName(body.type)) : schemaOf(prog, body.type)?.schema ?? null;\n if (schema !== null) return schema.slots.map((s) => item(s.name, FIELD, s.nullable ? `${s.type}?` : s.type));\n }\n /** @type {Item[]} */\n const out = [];\n const lib = prog?.modules.get(q);\n if (lib !== undefined) out.push(...members(lib));\n const m = imported(mod).modules.get(q);\n if (m === undefined) return out;\n const prefix = m + \".\";\n out.push(...CALLABLE.filter((b) => b.name.startsWith(prefix)).map((b) => builtin(b, b.name.slice(prefix.length))));\n return out;\n}\n\n/**\n * What a library gives through its qualifier: its schemas and constants.\n * @param {Unit} lib\n * @returns {Item[]}\n */\nfunction members(lib) {\n /** @type {Item[]} */\n const out = [];\n for (const d of lib.tree.body) {\n if (d._type === \"Schema\") out.push(schemaItem(d.name, d));\n else if (d._type === \"Const\") out.push(item(d.name, CONSTANT, \"const\"));\n }\n return out;\n}\n\n/**\n * @param {string} label\n * @param {Schema} s\n * @returns {Item}\n */\nconst schemaItem = (label, s) => item(label, STRUCT, `schema, ${s.slots.length} slots`);\n\n/**\n * Each library the file imports whole that `pick` finds a member of, by its\n * qualifier ([LIMP.3.3.4]).\n * @param {Unit | null} prog\n * @param {(d: decl_t) => boolean} pick\n * @returns {Item[]}\n */\nfunction libraries(prog, pick) {\n /** @type {Item[]} */\n const out = [];\n for (const [q, lib] of prog?.modules ?? []) if (lib.tree.body.some(pick)) out.push(item(q, MODULE, \"library\"));\n return out;\n}\n\n/**\n * What a from-import makes bare, where it is a declaration `pick` finds.\n * @param {Unit | null} prog\n * @param {(d: decl_t) => boolean} pick\n * @returns {Array<{ name: string, decl: decl_t }>}\n */\nfunction bareImports(prog, pick) {\n /** @type {Array<{ name: string, decl: decl_t }>} */\n const out = [];\n for (const [name, b] of prog?.bare ?? []) {\n const decl = b.unit.tree.body.find((d) => declName(d) === b.name);\n if (decl !== undefined && pick(decl)) out.push({ name, decl });\n }\n return out;\n}\n\n/**\n * What an expression in a rule (or anywhere, with no rule) can name: the\n * rule's bindings, the program's constants (its own, and a from-import's\n * bare), the builtins it reaches (the unqualified ones, an imported module's\n * under its qualifier, a from-import's bare), the libraries it imports whole,\n * the aggregations, the grammar's constants and operators.\n * @param {Module | null} mod\n * @param {Unit | null} prog\n * @param {Rule | null} rule\n * @returns {Item[]}\n */\nfunction expression(mod, prog, rule) {\n /** @type {Item[]} */\n const out = [];\n if (rule !== null && mod !== null)\n for (const [name, body] of bindings(rule)) out.push(item(name, VARIABLE, typeName(body.type)));\n for (const d of mod?.body ?? []) if (d._type === \"Const\") out.push(item(d.name, CONSTANT, \"const\"));\n for (const { name } of bareImports(prog, (d) => d._type === \"Const\")) out.push(item(name, CONSTANT, \"const\"));\n for (const b of CALLABLE) if (!b.name.includes(\".\")) out.push(builtin(b, b.name));\n const { modules, bare } = imported(mod);\n for (const [q, m] of modules)\n if (CALLABLE.some((b) => b.name.startsWith(m + \".\"))) out.push(item(q, MODULE, `builtin module ${m}`));\n const builtinModules = new Set(out.filter((i) => i.kind === MODULE).map((i) => i.label));\n for (const l of libraries(prog, (d) => d._type === \"Schema\" || d._type === \"Const\"))\n if (!builtinModules.has(l.label)) out.push(l);\n for (const [name, full] of bare) {\n const b = CALLABLE.find((x) => x.name === full);\n if (b !== undefined) out.push(builtin(b, name));\n }\n const named = new Set(CALLABLE.map((b) => b.name));\n for (const a of AGGREGATIONS) if (!named.has(a)) out.push(item(a, FUNCTION, \"aggregation\"));\n out.push(...GRAMMAR_WORDS.constant.map((w) => item(w, CONSTANT)), ...GRAMMAR_WORDS.operator.map((w) => item(w, OPERATOR)));\n return out;\n}\n\n/**\n * A builtin as an item: its arities, its tier, and a call to fill in.\n * @param {Builtin} b\n * @param {string} label\n * @returns {Item}\n */\nfunction builtin(b, label) {\n const arity = `${b.arities.length > 1 ? \"arities\" : \"arity\"} ${b.arities.join(\", \")}`;\n const tier = b.tier === \"sync-impure\" ? \", bound once per firing\" : \"\";\n const takes = Math.max(...b.arities) > 0;\n return { label, kind: FUNCTION, detail: `${arity}${tier}`,\n insertText: takes ? `${label}($1)` : `${label}()`, insertTextFormat: SNIPPET };\n}\n\n/**\n * The schemas a pattern or an emit may name: the file's own, each a\n * from-import makes bare, and the qualifier of each library imported whole\n * that declares one, which `.` then completes.\n * @param {Module | null} mod\n * @param {Unit | null} prog\n * @returns {Item[]}\n */\nfunction schemas(mod, prog) {\n /** @type {Item[]} */\n const out = [];\n for (const d of mod?.body ?? []) if (d._type === \"Schema\") out.push(schemaItem(d.name, d));\n for (const { name, decl } of bareImports(prog, (d) => d._type === \"Schema\"))\n if (decl._type === \"Schema\") out.push(schemaItem(name, decl));\n out.push(...libraries(prog, (d) => d._type === \"Schema\"));\n return out;\n}\n\n/**\n * The schema `name` declares.\n * @param {Module} mod\n * @param {string} name\n * @returns {Schema | null}\n */\nfunction schemaNamed(mod, name) {\n for (const d of mod.body) if (d._type === \"Schema\" && d.name === name) return d;\n return null;\n}\n\n/**\n * The rule's `->` comes before `line`: the line is one of its actions.\n * @param {string[]} lines\n * @param {number} start the rule's first line\n * @param {number} line\n */\nfunction inActions(lines, start, line) {\n for (let l = start; l < line; l++) if ((lines[l - 1] ?? \"\").trim().startsWith(\"->\")) return true;\n return false;\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// The builtin functions as `ds lsp` shows them: which one a name\n// written in a program calls, and its hover. Everything shown is\n// [LEXP.17.2]'s, through the generated registries.js: the signature, the\n// summary and the clauses that define it. The hover adds no text of its own.\n//\n// A defining clause is a link when the client names where the rendered\n// documentation is (`initializationOptions.docs`: the site a release's docs\n// tarball unpacks to, or its URL), and its id alone when it does not: the\n// release publishes the documentation as that tarball, at no address of its\n// own. Nothing here imports from Node: a path becomes a URL through the\n// host's own naming (session.js `LspHost`).\n\nimport { wordAt } from \"./analysis.js\";\nimport { imported } from \"./complete.js\";\nimport { BUILTINS } from \"./registries.js\";\n\n/** @import { Module } from \"../ast/nodes.js\" */\n/** @import { Builtin } from \"./registries.js\" */\n\n/** What a call may name, by name: every row of [LEXP.17.2]. */\nconst CALLABLE = new Map(BUILTINS.map((b) => [b.name, b]));\n\n/**\n * The builtin a callee names, as written: `abs`; `math.sqrt` through `import\n * math` (or `m.sqrt` through `import math as m`); `sqrt` through `from math\n * import sqrt`. A module's members are reached only through an import\n * ([LIMP.3.3.4]).\n * @param {Module | null} mod\n * @param {string} callee\n * @returns {Builtin | null}\n */\nexport function builtinNamed(mod, callee) {\n const { modules, bare } = imported(mod);\n const dot = callee.indexOf(\".\");\n if (dot < 0) return CALLABLE.get(bare.get(callee) ?? callee) ?? null;\n const m = modules.get(callee.slice(0, dot));\n return m === undefined ? null : CALLABLE.get(`${m}${callee.slice(dot)}`) ?? null;\n}\n\n/**\n * The builtin called at a position: the name under it, with any qualifier,\n * followed by `(`. A name not called is not a builtin's here: `count` is also\n * a clause word ([LLEX.9.6]).\n * @param {Module | null} mod\n * @param {string} text the line\n * @param {number} col a code-point column\n * @returns {Builtin | null}\n */\nexport function builtinAt(mod, text, col) {\n const w = wordAt(text, col);\n if (w === null) return null;\n if (!/^\\s*\\(/u.test([...text].slice(w.end).join(\"\"))) return null;\n return builtinNamed(mod, w.qualifier === null ? w.word : `${w.qualifier}.${w.word}`);\n}\n\n/**\n * Where the client says the rendered documentation is, as a base URL: a URL\n * as given, a path as the host names it (a `file:` URL); null for none.\n * @param {unknown} given\n * @param {(path: string) => string} pathUri the host's URL for a path\n * @returns {string | null}\n */\nexport function docsBase(given, pathUri) {\n if (typeof given !== \"string\" || given === \"\") return null;\n const base = /^[a-z][a-z0-9+.-]*:/i.test(given) ? given : pathUri(given);\n return base.endsWith(\"/\") ? base : base + \"/\";\n}\n\n/**\n * A builtin's hover: each overload's signature under its name, its summary,\n * and the clauses that define it.\n * @param {Builtin} b\n * @param {string | null} docs the documentation's base URL\n * @returns {string}\n */\nexport function builtinHover(b, docs) {\n const clauses = b.defined.map((c) => (docs === null ? `[${c.id}]` : `[[${c.id}]](${docs}specs/${c.page})`));\n return [\"```ds\\n\" + b.signatures.map((s) => b.name + s).join(\"\\n\") + \"\\n```\", b.summary, clauses.join(\", \")].join(\"\\n\\n\");\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// Columns, three ways. `dsc`'s diagnostics count code points from 1\n// ([ICOM.7.4]); the syntax tree counts them from 0 (`col_offset`, as Python's\n// `ast`, but in code points); LSP counts UTF-16 code units from 0, unless the\n// client accepts \"utf-32\", which is code points again. Lines are 0-based in\n// LSP and 1-based everywhere else.\n\n/** @typedef {\"utf-16\" | \"utf-32\"} Encoding how a client counts a column */\n\n/**\n * The encoding to speak: code points when the client takes them, since that\n * is what DS counts in; else UTF-16, which every client takes.\n * @param {unknown} offered the client's `general.positionEncodings`\n * @returns {Encoding}\n */\nexport function negotiate(offered) {\n return Array.isArray(offered) && offered.includes(\"utf-32\") ? \"utf-32\" : \"utf-16\";\n}\n\n/**\n * A 0-based code-point column on `line` as the client counts it. A column\n * past the end of the line counts one unit per missing code point.\n * @param {string} line\n * @param {number} cp\n * @param {Encoding} enc\n */\nexport function toClient(line, cp, enc) {\n if (enc === \"utf-32\") return cp;\n let units = 0, seen = 0;\n for (const ch of line) {\n if (seen >= cp) return units;\n units += ch.length;\n seen++;\n }\n return units + (cp - seen);\n}\n\n/**\n * A client's column on `line` as a 0-based code-point column. A column inside\n * a surrogate pair is the code point it is part of.\n * @param {string} line\n * @param {number} col\n * @param {Encoding} enc\n */\nexport function fromClient(line, col, enc) {\n if (enc === \"utf-32\") return col;\n let units = 0, cp = 0;\n for (const ch of line) {\n if (units + ch.length > col) return cp;\n units += ch.length;\n cp++;\n }\n return cp + Math.max(0, col - units);\n}\n\n/**\n * A document's lines, as LSP splits them: on CRLF, LF or CR.\n * @param {string} text\n */\nexport function lines(text) {\n return text.split(/\\r\\n|\\n|\\r/);\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// Semantic tokens (`textDocument/semanticTokens/full`) of `ds lsp`:\n// how an editor colours DS with no grammar installed.\n//\n// The text is split into the lexer's token classes ([LLEX.4], [LLEX.11] to\n// [LLEX.13]): a comment, a string, a numeric or unit literal (one token,\n// suffix included: [LLEX.11.3.1]), a name, punctuation. This splits; it\n// does not parse, and decides nothing the compiler decides. A name is then\n// coloured by what it is, in this order:\n//\n// 1. what the program declares, as references.js `refAt` resolves it across\n// the file and the libraries it imports: a schema, a rule, a constant, an\n// opaque type, a unit, a slot, a rule's binding; and the file's services,\n// whose names are dotted (`svc.page`), each part coloured as the service;\n// 2. a builtin function the call reaches ([LEXP.17.2]): a bare one, an\n// imported module's under its qualifier, a from-import's bare name; the\n// qualifier itself is a namespace;\n// 3. a builtin type ([LGRA.22.8]);\n// 4. a word the grammar reserves, by its [LLEX.9.8] class.\n//\n// The program comes first because a class-2 word may also be a name\n// ([LLEX.9.3.1]): a slot called `key` is a slot where it is read.\n//\n// Positions are the tree's: lines 1-based, columns code points. `encode`\n// converts to the client's and to LSP's relative form, one token per line: a\n// triple-quoted string is a token on each line it spans.\n\nimport { imported } from \"./complete.js\";\nimport { nameRange, patternBodies } from \"./analysis.js\";\nimport { refAt } from \"./references.js\";\nimport { AGGREGATIONS, BUILTINS, GRAMMAR_WORDS, TYPES } from \"./registries.js\";\nimport { toClient } from \"./positions.js\";\n\n/** @import { Unit, Ref } from \"./references.js\" */\n/** @import { Encoding } from \"./positions.js\" */\n\n/**\n * The legend the server gives in `initialize`. The types are LSP's own. Of\n * the modifiers, `action`, `clause` and `constant` are DS's: the [LLEX.9.8]\n * class of a reserved word coloured `keyword` (a `declaration`-class word\n * carries none, an `operator`-class one is an `operator`).\n */\nexport const LEGEND = Object.freeze({\n tokenTypes: Object.freeze([\"namespace\", \"type\", \"struct\", \"interface\", \"function\", \"variable\", \"property\",\n \"keyword\", \"operator\", \"string\", \"number\", \"comment\"]),\n tokenModifiers: Object.freeze([\"declaration\", \"readonly\", \"defaultLibrary\", \"action\", \"clause\", \"constant\"]),\n});\n\nconst T = Object.fromEntries(LEGEND.tokenTypes.map((t, i) => [t, i]));\nconst M = Object.fromEntries(LEGEND.tokenModifiers.map((m, i) => [m, 1 << i]));\n\n/**\n * A piece of the text, as the lexer would class it.\n * @typedef {{ line: number, start: number, end: number, kind: \"comment\" | \"string\" | \"number\" | \"name\" | \"punct\", text: string }} Lexeme\n */\n\n/**\n * A coloured token: one line, a code-point range, a legend type and a\n * modifier bit set.\n * @typedef {{ line: number, start: number, end: number, type: number, mods: number }} Token\n */\n\nconst NAME_START = /[\\p{L}_]/u;\nconst NAME_CONT = /[\\p{L}\\p{N}_]/u;\nconst DIGIT = /[0-9]/;\n/** A unit suffix's first character ([LLEX.12]): a letter or one of the glyphs, with their confusables ([LLEX.12.2.1]). */\nconst UNIT_START = /[\\p{L}\u00B0\u2032\u2033\u02B9\u02BA]/u;\nconst UNIT_CONT = /[\\p{L}\\p{N}_\u00B0\u2032\u2033\u02B9\u02BA]/u;\n\n/**\n * The text's lexemes, in order. A string that is not closed runs to the end\n * of its line (a single-quoted one) or of the text (a triple-quoted one), as\n * an editor shows it while it is typed; the compiler refuses it\n * ([LLEX.13.1.4]).\n * @param {string[]} lines\n * @param {{ line: number, col: number }} [until] stop there: lines 1-based, a code-point column\n * @returns {Lexeme[]}\n */\nexport function scan(lines, until) {\n /** @type {Lexeme[]} */\n const out = [];\n let inTriple = false;\n const last = until === undefined ? lines.length : Math.min(until.line, lines.length);\n for (let l = 1; l <= last; l++) {\n const all = [...(lines[l - 1] ?? \"\")];\n const cps = until !== undefined && l === until.line ? all.slice(0, until.col) : all;\n /** @param {number} start @param {number} end @param {Lexeme[\"kind\"]} kind */\n const push = (start, end, kind) => out.push({ line: l, start, end, kind, text: cps.slice(start, end).join(\"\") });\n let i = 0;\n if (inTriple) {\n const close = tripleEnd(cps, 0);\n if (close < 0) {\n if (cps.length) push(0, cps.length, \"string\");\n continue;\n }\n push(0, close, \"string\");\n inTriple = false;\n i = close;\n }\n while (i < cps.length) {\n const c = cps[i];\n if (c === \" \" || c === \"\\t\") {\n i++;\n } else if (c === \"#\") {\n push(i, cps.length, \"comment\");\n i = cps.length;\n } else if (c === '\"' && cps[i + 1] === '\"' && cps[i + 2] === '\"') {\n const close = tripleEnd(cps, i + 3);\n if (close < 0) {\n push(i, cps.length, \"string\");\n inTriple = true;\n i = cps.length;\n } else {\n push(i, close, \"string\");\n i = close;\n }\n } else if (c === '\"') {\n let j = i + 1;\n while (j < cps.length && cps[j] !== '\"') j += cps[j] === \"\\\\\" ? 2 : 1;\n const end = Math.min(j + 1, cps.length);\n push(i, end, \"string\");\n i = end;\n } else if (DIGIT.test(c)) {\n const end = numberEnd(cps, i);\n push(i, end, \"number\");\n i = end;\n } else if (NAME_START.test(c)) {\n let j = i + 1;\n while (j < cps.length && NAME_CONT.test(cps[j])) j++;\n push(i, j, \"name\");\n i = j;\n } else {\n push(i, i + 1, \"punct\");\n i++;\n }\n }\n }\n return out;\n}\n\n/**\n * Just past the `\"\"\"` that closes a triple-quoted string, searching from\n * `from`; -1 if the line does not close it. A backslash escapes what follows.\n * @param {string[]} cps\n * @param {number} from\n */\nfunction tripleEnd(cps, from) {\n for (let j = from; j < cps.length; j++) {\n if (cps[j] === \"\\\\\") j++;\n else if (cps[j] === '\"' && cps[j + 1] === '\"' && cps[j + 2] === '\"') return j + 3;\n }\n return -1;\n}\n\n/**\n * Just past a numeric or unit literal that starts at `i` ([LLEX.11],\n * [LLEX.12]): a based integer, or a decimal with its fraction and exponent,\n * then a unit suffix with its optional `_`. The withheld `e` of [LLEX.11.3.1]\n * is taken as the exponent when digits follow it.\n * @param {string[]} cps\n * @param {number} i\n */\nfunction numberEnd(cps, i) {\n let j = i;\n const digits = (/** @type {RegExp} */ re) => {\n while (j < cps.length && (re.test(cps[j]) || (cps[j] === \"_\" && re.test(cps[j + 1] ?? \"\")))) j++;\n };\n if (cps[i] === \"0\" && /[xob]/.test(cps[i + 1] ?? \"\")) {\n j = i + 2;\n digits(/[0-9a-fA-F]/);\n return j;\n }\n digits(DIGIT);\n if (cps[j] === \".\" && DIGIT.test(cps[j + 1] ?? \"\")) {\n j++;\n digits(DIGIT);\n }\n if ((cps[j] === \"e\" || cps[j] === \"E\")) {\n const sign = cps[j + 1] === \"+\" || cps[j + 1] === \"-\" ? 1 : 0;\n if (DIGIT.test(cps[j + 1 + sign] ?? \"\")) {\n j += 1 + sign;\n digits(DIGIT);\n }\n }\n const u = cps[j] === \"_\" && UNIT_START.test(cps[j + 1] ?? \"\") ? j + 1 : j;\n if (UNIT_START.test(cps[u] ?? \"\")) {\n j = u + 1;\n while (j < cps.length && UNIT_CONT.test(cps[j])) j++;\n }\n return j;\n}\n\n/** Each grammar word's class ([LLEX.9.8]), as a type and modifiers. */\nconst WORDS = new Map(/** @type {Array<[string, { type: number, mods: number }]>} */ ([\n ...GRAMMAR_WORDS.declaration.map((w) => [w, { type: T.keyword, mods: 0 }]),\n ...GRAMMAR_WORDS.action.map((w) => [w, { type: T.keyword, mods: M.action }]),\n ...GRAMMAR_WORDS.clause.map((w) => [w, { type: T.keyword, mods: M.clause }]),\n ...GRAMMAR_WORDS.constant.map((w) => [w, { type: T.keyword, mods: M.constant }]),\n ...GRAMMAR_WORDS.operator.map((w) => [w, { type: T.operator, mods: 0 }]),\n]));\n\nconst BUILTIN_TYPES = new Set(TYPES.map((t) => t.name));\nconst CALLABLE = new Set(BUILTINS.map((b) => b.name));\nconst AGGREGATION = new Set(AGGREGATIONS);\n\n/**\n * The document's tokens, in order.\n * @param {string[]} lines\n * @param {Unit | null} unit the document as a file of its program; null when it has never parsed\n * @returns {Token[]}\n */\nexport function tokens(lines, unit) {\n const lexemes = scan(lines);\n const { modules, bare } = imported(unit?.tree ?? null);\n /** The file's services, by their dotted name, to the line each is declared on. */\n const services = new Map((unit?.tree.body ?? []).flatMap((d) => (d._type === \"Service\" ? [[d.name.join(\".\"), d.lineno]] : [])));\n /** @type {Token[]} */\n const out = [];\n for (let k = 0; k < lexemes.length; k++) {\n const x = lexemes[k];\n /** @param {number} type @param {number} [mods] */\n const add = (type, mods = 0) => out.push({ line: x.line, start: x.start, end: x.end, type, mods });\n if (x.kind === \"comment\") add(T.comment);\n else if (x.kind === \"string\") add(T.string);\n else if (x.kind === \"number\") add(T.number);\n if (x.kind !== \"name\") continue;\n const prev = lexemes[k - 1], next = lexemes[k + 1];\n const dotBefore = prev?.kind === \"punct\" && prev.text === \".\" && prev.line === x.line && prev.end === x.start;\n const qualifier = dotBefore && lexemes[k - 2]?.kind === \"name\" && lexemes[k - 2].end === prev.start ? lexemes[k - 2].text : null;\n const dotAfter = next?.kind === \"punct\" && next.text === \".\" && next.line === x.line && next.start === x.end;\n const member = dotAfter && lexemes[k + 2]?.kind === \"name\" && lexemes[k + 2].start === next.end ? lexemes[k + 2].text : null;\n const calls = next?.kind === \"punct\" && next.text === \"(\" && next.line === x.line;\n // A service's name is dotted, and each of its parts is the service.\n const chain = dotted(lexemes, k);\n const service = chain.length > 1 ? services.get(chain) : undefined;\n if (service !== undefined) {\n add(T.interface, service === x.line ? M.declaration : 0);\n continue;\n }\n const ref = unit === null ? null : refAt(unit, x.line, x.start);\n if (ref !== null && unit !== null) {\n const t = declared(ref, unit, x);\n if (t !== null) {\n add(t.type, t.mods);\n continue;\n }\n }\n // `math.sqrt`, through `import math` (or `as m`), or `sqrt` from `from math import sqrt`.\n const viaModule = qualifier !== null ? modules.get(qualifier) : undefined;\n if (viaModule !== undefined && CALLABLE.has(`${viaModule}.${x.text}`)) {\n add(T.function, M.defaultLibrary);\n continue;\n }\n const m = modules.get(x.text);\n if (member !== null && m !== undefined && CALLABLE.has(`${m}.${member}`)) {\n add(T.namespace, M.defaultLibrary);\n continue;\n }\n if (qualifier === null && calls && (CALLABLE.has(x.text) || CALLABLE.has(bare.get(x.text) ?? \"\") || AGGREGATION.has(x.text))) {\n add(T.function, M.defaultLibrary);\n continue;\n }\n if (qualifier !== null) continue;\n if (BUILTIN_TYPES.has(x.text)) {\n add(T.type, M.defaultLibrary);\n continue;\n }\n const w = WORDS.get(x.text);\n if (w !== undefined) {\n add(w.type, w.mods);\n continue;\n }\n if (unit !== null && importLine(unit, x.line)) add(T.namespace);\n }\n return out;\n}\n\n/**\n * How a name the program declares is coloured; null for a declaration that\n * names nothing a colour tells apart (a test, an import).\n * @param {Ref} ref\n * @param {Unit} unit the document's\n * @param {Lexeme} x\n * @returns {{ type: number, mods: number } | null}\n */\nfunction declared(ref, unit, x) {\n /** @param {import(\"./analysis.js\").NameRange} r */\n const here = (r) => ref.unit === unit && r.line === x.line && r.start === x.start;\n switch (ref.kind) {\n case \"binding\": {\n const at = patternBodies(ref.rule.lhs).some((b) => b.binding === ref.name && here(nameRange(unit.lines, b, ref.name)));\n return { type: T.variable, mods: at ? M.declaration : 0 };\n }\n case \"slot\":\n return { type: T.property, mods: here(nameRange(ref.unit.lines, ref.slot, ref.slot.name)) ? M.declaration : 0 };\n case \"decl\": {\n const decl = here(nameRange(ref.unit.lines, ref.decl, ref.name)) ? M.declaration : 0;\n switch (ref.decl._type) {\n case \"Schema\": return { type: T.struct, mods: decl };\n case \"Rule\": return { type: T.function, mods: decl };\n case \"Const\": return { type: T.variable, mods: decl | M.readonly };\n case \"Service\": return { type: T.interface, mods: decl };\n case \"Opaque\": case \"UnitDimension\": case \"UnitScalar\": case \"UnitSymbol\": case \"UnitFormula\": case \"UnitFxPair\":\n return { type: T.type, mods: decl };\n default: return null;\n }\n }\n }\n}\n\n/**\n * The dotted name the name lexeme at `k` is part of, `a.b.c`, written with no\n * space around its dots; the name alone if it is part of none.\n * @param {Lexeme[]} xs\n * @param {number} k\n */\nexport function dotted(xs, k) {\n /** @param {number} i @param {number} j `xs[i]` and `xs[j]` touch, on one line */\n const touch = (i, j) => xs[i] !== undefined && xs[j] !== undefined && xs[i].line === xs[j].line && xs[i].end === xs[j].start;\n /** @param {number} i */\n const isDot = (i) => xs[i]?.kind === \"punct\" && xs[i].text === \".\";\n let a = k, b = k;\n while (isDot(a - 1) && xs[a - 2]?.kind === \"name\" && touch(a - 2, a - 1) && touch(a - 1, a)) a -= 2;\n while (isDot(b + 1) && xs[b + 2]?.kind === \"name\" && touch(b, b + 1) && touch(b + 1, b + 2)) b += 2;\n return xs.slice(a, b + 1).map((x) => x.text).join(\"\");\n}\n\n/**\n * The line is in an `import` or `from \u2026 import`: its names that are not\n * declarations are module paths.\n * @param {Unit} unit\n * @param {number} line\n */\nfunction importLine(unit, line) {\n return unit.tree.body.some((d) => (d._type === \"Import\" || d._type === \"ImportFrom\")\n && line >= d.lineno && line <= (d.end_lineno ?? d.lineno));\n}\n\n/**\n * Tokens as LSP sends them: five integers each, the line and start relative\n * to the token before, the length, the type, the modifiers; columns as the\n * client counts them.\n * @param {Token[]} toks in order\n * @param {string[]} lines\n * @param {Encoding} enc\n * @returns {number[]}\n */\nexport function encode(toks, lines, enc) {\n /** @type {number[]} */\n const data = [];\n let line = 0, char = 0;\n for (const t of toks) {\n const text = lines[t.line - 1] ?? \"\";\n const start = toClient(text, t.start, enc), end = toClient(text, t.end, enc);\n if (end <= start) continue;\n const l = t.line - 1;\n data.push(l - line, l === line ? start - char : start, end - start, t.type, t.mods);\n line = l;\n char = start;\n }\n return data;\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// Signature help (`textDocument/signatureHelp`) of `ds lsp` for the builtin\n// functions: each overload [LEXP.17.2]'s Signature column\n// gives, its parameters as that column writes them, its summary as the\n// documentation. The active overload is the first with a parameter for the\n// argument the cursor is on.\n//\n// The call is found in the text before the cursor, split as semantic.js\n// splits it, so a bracket inside a string or a comment is not one, and a call\n// continued over lines inside its brackets ([LLEX.7.5]) is followed. A name\n// the call reaches is resolved as builtins.js resolves it.\n\nimport { builtinNamed } from \"./builtins.js\";\nimport { dotted, scan } from \"./semantic.js\";\n\n/** @import { Module } from \"../ast/nodes.js\" */\n\nconst OPEN = new Set([\"(\", \"[\", \"{\"]), CLOSE = new Set([\")\", \"]\", \"}\"]);\n\n/**\n * @typedef {{ label: string, documentation: string, parameters: { label: [number, number] }[] }} Signature\n */\n\n/**\n * The signatures of the builtin call the cursor is in, or null for none.\n * @param {Module | null} mod the last good tree, for the imports\n * @param {string[]} lines\n * @param {number} line 1-based\n * @param {number} col a code-point column\n * @returns {{ signatures: Signature[], activeSignature: number, activeParameter: number } | null}\n */\nexport function signatureHelp(mod, lines, line, col) {\n const xs = scan(lines, { line, col });\n /** @type {Array<{ open: string, callee: string | null, commas: number }>} */\n const stack = [];\n for (let k = 0; k < xs.length; k++) {\n const x = xs[k];\n if (x.kind !== \"punct\") continue;\n if (OPEN.has(x.text)) {\n const before = xs[k - 1];\n const callee = x.text === \"(\" && before?.kind === \"name\" && before.line === x.line ? dotted(xs, k - 1) : null;\n stack.push({ open: x.text, callee, commas: 0 });\n } else if (CLOSE.has(x.text)) {\n stack.pop();\n } else if (x.text === \",\" && stack.length) {\n stack[stack.length - 1].commas++;\n }\n }\n const call = stack[stack.length - 1];\n if (call === undefined || call.open !== \"(\" || call.callee === null) return null;\n const b = builtinNamed(mod, call.callee);\n if (b === null) return null;\n const callee = call.callee;\n const signatures = b.signatures.map((s) => signature(callee, s, b.summary));\n const fits = signatures.findIndex((s) => s.parameters.length > call.commas);\n return { signatures, activeSignature: fits < 0 ? signatures.length - 1 : fits, activeParameter: call.commas };\n}\n\n/**\n * One overload: `callee(x: Int) \u2192 Int`, each parameter the offsets of its\n * text between the parentheses, split at the commas outside any bracket.\n * @param {string} callee as written\n * @param {string} overload `(\u2026) \u2192 T`, as [LEXP.17.2] writes it\n * @param {string} summary\n * @returns {Signature}\n */\nfunction signature(callee, overload, summary) {\n const label = callee + overload;\n const open = callee.length + 1;\n const close = open + closing(overload) - 1;\n /** @type {{ label: [number, number] }[]} */\n const parameters = [];\n let depth = 0, from = open;\n for (let i = open; i <= close; i++) {\n const c = label[i];\n if (c === \"(\" || c === \"[\") depth++;\n else if (c === \")\" || c === \"]\") depth--;\n if ((c === \",\" && depth === 0) || i === close) {\n let a = from, z = i;\n while (a < z && label[a] === \" \") a++;\n if (a < z) parameters.push({ label: [a, z] });\n from = i + 1;\n }\n }\n return { label, documentation: summary, parameters };\n}\n\n/**\n * Where an overload's parameter list closes: the index of the `)` that\n * matches its opening one.\n * @param {string} overload\n */\nfunction closing(overload) {\n let depth = 0;\n for (let i = 0; i < overload.length; i++) {\n if (overload[i] === \"(\") depth++;\n else if (overload[i] === \")\" && --depth === 0) return i;\n }\n return overload.length - 1;\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// The outline (`textDocument/documentSymbol`) and workspace symbols\n// (`workspace/symbol`) of `ds lsp`, read from the syntax tree: each\n// declaration a program makes, a schema's slots under it. Positions are the\n// tree's (lines 1-based, columns code points); the server converts them.\n//\n// A declaration's whole range runs from its start to its recorded end, or,\n// where the tree records none, to the next declaration's start or the end of\n// the file, as analysis.js's `declAt` reads it. Its selection range is its\n// name, found in its statement's text (analysis.js `nameRange`).\n\nimport { declName, nameRange } from \"./analysis.js\";\n\n/** @import { Module, Slot, decl_t } from \"../ast/nodes.js\" */\n/** @import { NameRange } from \"./analysis.js\" */\n\n/** LSP's SymbolKind numbers, the ones used here. */\nexport const KIND = Object.freeze({\n Field: 8, Interface: 11, Function: 12, Constant: 14, Property: 7, Struct: 23, Event: 24, TypeParameter: 26,\n});\n\n/** @typedef {{ line: number, col: number }} Pos */\n\n/**\n * One symbol: a declaration, or a schema's slot under it.\n * @typedef {object} Outline\n * @property {string} name\n * @property {string} detail\n * @property {number} kind an LSP SymbolKind\n * @property {{ start: Pos, end: Pos }} range the whole declaration\n * @property {NameRange} selection its name\n * @property {Outline[]} children\n */\n\n/**\n * The outline of one file: its declarations in source order. Imports and the\n * `initial:` block name nothing, and are left out.\n * @param {Module} mod\n * @param {string[]} lines the file's\n * @returns {Outline[]}\n */\nexport function outline(mod, lines) {\n /** @type {Outline[]} */\n const out = [];\n const body = mod.body;\n for (let i = 0; i < body.length; i++) {\n const d = body[i];\n const what = describe(d);\n if (what === null) continue;\n const { nameInText, ...shown } = what;\n out.push({\n ...shown,\n range: { start: { line: d.lineno, col: d.col_offset }, end: endOf(d, body[i + 1] ?? null, lines) },\n selection: nameRange(lines, d, nameInText ?? shown.name),\n children: d._type === \"Schema\" ? d.slots.map((s) => slotSymbol(s, lines)) : [],\n });\n }\n return out;\n}\n\n/**\n * Every symbol of an outline, its slots included, flat, with what contains\n * each: what `workspace/symbol` lists.\n * @param {Outline[]} tree\n * @returns {Array<Outline & { container: string | null }>}\n */\nexport function flat(tree) {\n return tree.flatMap((o) => [{ ...o, container: null }, ...o.children.map((c) => ({ ...c, container: o.name }))]);\n}\n\n/**\n * Whether a symbol's name answers a workspace query: the query's characters\n * in order, case-insensitively, as an editor's symbol search matches. An\n * empty query answers everything.\n * @param {string} name\n * @param {string} query\n */\nexport function matches(name, query) {\n const n = name.toLowerCase();\n let at = 0;\n for (const c of query.toLowerCase()) {\n at = n.indexOf(c, at);\n if (at < 0) return false;\n at += c.length;\n }\n return true;\n}\n\n/**\n * A declaration's name, kind and detail; null for one that names nothing.\n * `nameInText` is how the name is written where it differs from how it is\n * shown (a series is shown with its schema, written as its slot).\n * @param {decl_t} d\n * @returns {{ name: string, detail: string, kind: number, nameInText?: string } | null}\n */\nfunction describe(d) {\n switch (d._type) {\n case \"Schema\":\n return { name: d.name, detail: `schema, ${d.slots.length} slot${d.slots.length === 1 ? \"\" : \"s\"}`,\n kind: KIND.Struct };\n case \"Rule\":\n return { name: d.name, detail: \"rule\", kind: KIND.Function };\n case \"Const\":\n return { name: d.name, detail: \"const\", kind: KIND.Constant };\n case \"Service\": {\n const r = d.response;\n const detail = r === null ? \"service\" : r._type === \"ResponseSchema\" ? `service, response ${r.name}`\n : \"service, no response\";\n return { name: d.name.join(\".\"), detail, kind: KIND.Interface };\n }\n case \"Opaque\":\n return { name: d.name, detail: `opaque ${d.representation}`, kind: KIND.TypeParameter };\n case \"Series\":\n return { name: d.schema === null ? d.slot : `${d.schema}.${d.slot}`, detail: \"series\", kind: KIND.Property,\n nameInText: d.slot };\n case \"Test\": {\n const n = d.name;\n const name = n._type === \"Constant\" && typeof n.value === \"string\" ? n.value : \"test\";\n return { name, detail: \"test\", kind: KIND.Event, nameInText: \"test\" };\n }\n default: {\n // The unit declarations: a dimension, a scalar, a symbol, a formula,\n // an exchange pair.\n const name = declName(d);\n return name === null ? null : { name, detail: \"unit\", kind: KIND.Constant };\n }\n }\n}\n\n/**\n * @param {Slot} s\n * @param {string[]} lines\n * @returns {Outline}\n */\nfunction slotSymbol(s, lines) {\n const end = s.end_lineno !== null && s.end_col_offset !== null\n ? { line: s.end_lineno, col: s.end_col_offset }\n : { line: s.lineno, col: [...(lines[s.lineno - 1] ?? \"\")].length };\n return {\n name: s.name, detail: s.nullable ? `${s.type}?` : s.type, kind: KIND.Field,\n range: { start: { line: s.lineno, col: s.col_offset }, end },\n selection: nameRange(lines, s, s.name), children: [],\n };\n}\n\n/**\n * Where a declaration ends: its recorded end, else the end of the last line\n * before the next declaration that is not blank or a comment, else the end\n * of the file's last such line.\n * @param {decl_t} d\n * @param {decl_t | null} next\n * @param {string[]} lines\n * @returns {Pos}\n */\nfunction endOf(d, next, lines) {\n if (d.end_lineno !== null && d.end_col_offset !== null) return { line: d.end_lineno, col: d.end_col_offset };\n let last = (next === null ? lines.length : next.lineno - 1);\n while (last > d.lineno && /^\\s*(#.*)?$/.test(lines[last - 1] ?? \"\")) last--;\n return { line: last, col: [...(lines[last - 1] ?? \"\")].length };\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// `dsc`'s rendered diagnostics read back as records, until the compiler can\n// write them as data. The shape is [RCLI.5.3]'s, as dsc.render.m\n// writes it, one diagnostic after another with a blank line between:\n//\n// File \"<file>\", line <L>, column <C> C 1-based, in code points\n// <the source line> absent when L is out of range\n// <spaces>^^^^[ (continues to line L2, column C2)]\n// <CODE>: <message>\n// hint: <hint> optional\n// related: File \"<file>\", line <L>, column <C> zero or more, each a block\n// <the source line>\n// <spaces>^\n// <message>\n//\n// The caret row gives the span's end: its width on the line, or the line and\n// column it continues to. A related span carries no end and underlines one\n// code point.\n\n/** @typedef {{ line: number, col: number }} Point a line, 1-based, and a column, 0-based in code points */\n/** @typedef {{ start: Point, end: Point }} Span */\n/** @typedef {{ span: Span, message: string }} Related */\n/** @typedef {{ code: string, message: string, hint: string | null, span: Span, related: Related[] }} Diagnostic */\n\nconst HEADER = /^(related: )?File \"(.*)\", line (\\d+), column (\\d+)$/;\nconst CARETS = /^( *)(\\^+)(?: \\(continues to line (\\d+), column (\\d+)\\))?$/;\nconst CODE = /^([A-Z][A-Z0-9_]*): (.*)$/;\nconst HINT = \" hint: \";\n\n/**\n * Every diagnostic in `dsc`'s report, in its order. Lines that are not part\n * of a diagnostic (a note the compiler printed first) are passed over.\n * @param {string} text\n * @returns {Diagnostic[]}\n */\nexport function parseDiagnostics(text) {\n const ls = text.split(\"\\n\");\n /** @type {Diagnostic[]} */\n const out = [];\n let i = 0;\n /** The block at `i`: its span, or null when `i` is no header. */\n const block = () => {\n const m = HEADER.exec(ls[i]);\n if (m === null) return null;\n const line = Number(m[3]), col = Number(m[4]) - 1;\n /** @type {Span} */\n const span = { start: { line, col }, end: { line, col: col + 1 } };\n i++;\n if (i + 1 < ls.length && ls[i].startsWith(\" \")) {\n const c = CARETS.exec(ls[i + 1].slice(4));\n if (c !== null) {\n span.end = c[3] !== undefined\n ? { line: Number(c[3]), col: Number(c[4]) - 1 }\n : { line, col: col + c[2].length };\n i += 2;\n }\n }\n return { related: m[1] !== undefined, span };\n };\n while (i < ls.length) {\n const head = block();\n if (head === null || head.related) {\n if (head === null) i++;\n continue;\n }\n const code = CODE.exec(ls[i] ?? \"\");\n if (code === null) continue;\n i++;\n /** @type {Diagnostic} */\n const diag = { code: code[1], message: code[2], hint: null, span: head.span, related: [] };\n if (ls[i]?.startsWith(HINT)) diag.hint = ls[i++].slice(HINT.length);\n for (;;) {\n const save = i;\n const rel = block();\n if (rel === null || !rel.related) {\n i = save;\n break;\n }\n diag.related.push({ span: rel.span, message: (ls[i++] ?? \"\").trim() });\n }\n out.push(diag);\n }\n return out;\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// `ds lsp`'s language server, one session, message by message: the Language\n// Server Protocol's messages in, as parsed JSON, and out, as objects. It\n// imports nothing from Node, so it runs in a page as it runs under Node. What\n// differs between the two is the host (`LspHost`), which the session reaches\n// for everything outside itself and never reaches past: the compiler, a file\n// by path, the standard library's directory, and how a document's URI names a\n// path. server.js gives it Node's host over stdin and stdout; browser.js gives\n// it a page's, the wasm compiler and an in-memory file set.\n//\n// The compiler is the only parser ([LTSL.1.2]), so this server parses\n// nothing: every change is compiled for its diagnostics, and dumped (`dsc\n// dump-ast`) for the tree hover, definition (analysis.js), completion\n// (complete.js), references and rename (references.js), the outline\n// (symbols.js) and semantic tokens (semantic.js) read. Signature help\n// (signature.js) reads the text and the registries.\n//\n// Completion, hover, definition, references, rename, the workspace's symbols\n// and semantic tokens answer over the program (references.js `program`): the\n// document and every library it imports, resolved through the search path\n// as the compiler resolves them, the document's directory first and the\n// bundled standard library last ([LIMP.3.1], [LIMP.3.3.1]). The libraries are\n// found through the host's `read`, so the resolution is written once, here and\n// in references.js, for every host. A library's tree is dumped once for each\n// text it has, and kept.\n//\n// The client's `initializationOptions` may give `libs`, library directories\n// for every compile, and `docs`, where the rendered documentation is (a URL,\n// or a path; a relative path is the workspace root's), which a builtin's\n// hover links the clauses that define it into (builtins.js).\n//\n// Full document sync: the client sends the whole text on every change. One\n// client; requests are answered one at a time, in order. A tree is kept per\n// document whenever the source parses, and the last good one is kept while it\n// does not, so hover and definition still answer mid-edit.\n//\n// ONE THING AT A TIME. The compiler may be async (ds_dsc is), and a page may\n// hand over a message while the last is still being answered, so analyses and\n// messages take turns (`inTurn`), in the order they arrive, and each runs to\n// its end before the next begins. A message's checks against the session's\n// state (initialized, shut down) are made in its turn, so they see every\n// message before it.\n//\n// AN EDIT IS ANALYSED WHEN TYPING SETTLES, not on every keystroke: compiling\n// runs `dsc`, and the server answers nothing while it does. A change waits\n// `settleMs` with no change after it. Opening or saving a document analyses it\n// at once. Any request but completion and signature help first analyses\n// whatever is waiting, so it answers about the text as it is. Those two are\n// asked for while typing, and answer from the last good tree and the line's\n// own text. A library changed (`workspace/didChangeWatchedFiles`) waits the\n// same way, for every open document, since any of them may import it.\n\nimport { readModule, TreeError } from \"../ast/read.js\";\nimport { definition, hoverText } from \"./analysis.js\";\nimport { builtinAt, builtinHover, docsBase } from \"./builtins.js\";\nimport { complete } from \"./complete.js\";\nimport { calledAt, program, refAt, services, sites, targetOf, units } from \"./references.js\";\nimport { GRAMMAR_WORDS, TYPES } from \"./registries.js\";\nimport { encode, LEGEND, tokens } from \"./semantic.js\";\nimport { signatureHelp } from \"./signature.js\";\nimport { flat, matches, outline } from \"./symbols.js\";\nimport { parseDiagnostics } from \"./diagnostics.js\";\nimport { fromClient, lines, negotiate, toClient } from \"./positions.js\";\n\n/** @import { Module } from \"../ast/nodes.js\" */\n/** @import { Diagnostic, Point } from \"./diagnostics.js\" */\n/** @import { Encoding } from \"./positions.js\" */\n\n/** @typedef {{ tree: unknown } | { refused: string }} Dumped */\n\n/**\n * The compiler and the files, as the server reaches them: synchronously or\n * not, since the wasm compiler is async.\n * @typedef {object} LspPorts\n * @property {(text: string, file: string) => Dumped | Promise<Dumped>} dumpAst\n * the source's tree as `dsc dump-ast` writes it, or what it said refusing it\n * @property {(text: string, file: string, search: string[]) => string | null | Promise<string | null>} compile\n * the compiler's diagnostics, or null when the source compiles\n * @property {(path: string) => string | null} [read]\n * a library's text, or null when there is no such file; none reads nothing\n * @property {() => string | null} [stdlib]\n * the directory of the standard library the compiler ships with ([LIMP.3.3.1]), which the\n * compiler searches after every library directory; null, or none, where it has none\n */\n\n/**\n * Everything the session reaches outside itself: the ports, and how the\n * host names files. A path is what the ports take; a URI is what the client\n * sends.\n * @typedef {LspPorts & {\n * uriPath: (uri: string) => string | null,\n * pathUri: (path: string) => string,\n * dirname: (path: string) => string,\n * resolve: (base: string, path: string) => string,\n * }} LspHost\n * `uriPath`: the path a document's URI names, or null for one no file has (an unsaved buffer);\n * `pathUri`: the URI a path is sent to the client as;\n * `dirname`: a path's directory;\n * `resolve`: `path` against the directory `base`, an absolute `path` as it is\n */\n\n/**\n * One session: `receive` each message the client sends, in order; the\n * session's exit status once `exit` comes, else null. `end` is the input's end.\n * @typedef {object} LspSession\n * @property {(msg: unknown) => Promise<number | null>} receive\n * @property {() => number} end the exit status when the client goes without `exit`: 0 after `shutdown`, else 1\n */\n\n/** @import { Site, Unit } from \"./references.js\" */\n/** @import { Target } from \"./analysis.js\" */\n/** @import { Outline } from \"./symbols.js\" */\n\n/** The words a rename may not take: the grammar's and the builtin types ([LLEX.9.6], [LGRA.22.8]). */\nconst RESERVED = new Set([...Object.values(GRAMMAR_WORDS).flat(), ...TYPES.map((t) => t.name)]);\n\n/** @typedef {{ text: string, lines: string[], tree: Module | null }} Doc */\n\n/**\n * How many library trees are kept, each for one file's text: enough for every\n * library of a program, and an edit's worth more.\n */\nconst KEPT_TREES = 256;\n\nconst INVALID = -32600, NO_METHOD = -32601, INTERNAL = -32603, NOT_INITIALIZED = -32002, REQUEST_FAILED = -32803;\n\n/**\n * A language server session.\n * @param {object} o\n * @param {LspHost} o.host\n * @param {(msg: Record<string, unknown>) => void} o.send a message to the client, `jsonrpc` included\n * @param {(s: string) => void} o.log not to the client: what a host keeps for its operator\n * @param {string[]} [o.libs] library directories for every compile, after the document's own\n * @param {number} [o.settleMs] how long a change waits, with no change after it, to be analysed\n * @param {string} [o.version] the server's version, for `serverInfo`; none sends none\n * @returns {LspSession}\n */\nexport function lspSession({ host, send: sendOut, log, libs = [], settleMs = 200, version }) {\n /** @type {Map<string, Doc>} */\n const docs = new Map();\n /** @type {Encoding} */\n let enc = \"utf-16\";\n let initialized = false, shutdown = false;\n let search = [...libs];\n /** the bundled standard library: the last entry a program's imports resolve through, as for the compiler */\n const bundle = host.stdlib?.() ?? null;\n /** @type {Map<string, Module | null>} each library tree dumped, by file and text, the least recently used first */\n const kept = new Map();\n /** @type {string[]} the workspace folders' paths: a rename edits nothing outside them */\n let folders = [];\n /** @type {string | null} the rendered documentation's base URL, for a builtin's clause links */\n let docsAt = null;\n /** set at `exit`, or the input's end: nothing is sent to a client that has gone */\n let closed = false;\n /** @param {Record<string, unknown>} msg */\n const send = (msg) => { if (!closed) sendOut({ jsonrpc: \"2.0\", ...msg }); };\n\n /**\n * The path a URI names, or null: a `file:` URI is the host's to read.\n * @param {unknown} uri\n */\n const uriPath = (uri) => (typeof uri === \"string\" ? host.uriPath(uri) : null);\n\n /** @type {Promise<void>} the last turn's end */\n let turn = Promise.resolve();\n /**\n * Run `fn` when every turn before it has ended: analyses and messages, one\n * at a time, in order. Its own failure is its caller's, not the next turn's.\n * @template T\n * @param {() => Promise<T>} fn\n * @returns {Promise<T>}\n */\n const inTurn = (fn) => {\n const p = turn.then(fn);\n turn = p.then(() => {}, () => {});\n return p;\n };\n\n /**\n * A document's tree and diagnostics, from its current text.\n * @param {string} uri\n */\n const analyse = async (uri) => {\n const doc = docs.get(uri);\n if (doc === undefined || closed) return;\n const path = uriPath(uri);\n const file = path ?? uri;\n const dumped = await host.dumpAst(doc.text, file);\n if (\"tree\" in dumped) {\n try {\n doc.tree = readModule(dumped.tree);\n } catch (err) {\n // The compiler and ds.asdl disagree: a defect to report, and\n // the last good tree kept.\n if (!(err instanceof TreeError)) throw err;\n log(`ds lsp: ${file}: ${err.message}`);\n }\n }\n const dirs = path === null ? search : [host.dirname(path), ...search];\n const report = await host.compile(doc.text, file, dirs);\n if (closed) return;\n const diagnostics = report === null ? [] : parseDiagnostics(report).map((d) => toLsp(d, doc.lines, uri, enc));\n send({ method: \"textDocument/publishDiagnostics\", params: { uri, diagnostics } });\n };\n\n /** @type {Map<string, ReturnType<typeof setTimeout>>} each document waiting to be analysed, and its timer */\n const waiting = new Map();\n\n /**\n * Analyse a document once its changes settle: `settleMs` after the last.\n * @param {string} uri\n */\n const settle = (uri) => {\n clearTimeout(waiting.get(uri));\n waiting.set(uri, setTimeout(() => {\n // A request may have caught it up before its turn came.\n inTurn(async () => {\n if (!waiting.has(uri)) return;\n waiting.delete(uri);\n await analyse(uri);\n }).catch((err) => log(`ds lsp: ${uri}: ${err instanceof Error ? err.message : String(err)}`));\n }, settleMs));\n };\n\n /** Analyse now whatever is waiting: a request answers about the text as it is. */\n const catchUp = async () => {\n for (const [uri, timer] of waiting) {\n clearTimeout(timer);\n waiting.delete(uri);\n await analyse(uri);\n }\n };\n\n /**\n * A request's answer.\n * @param {string} method\n * @param {any} params\n * @returns {Promise<unknown>}\n */\n const answer = async (method, params) => {\n switch (method) {\n case \"initialize\": {\n initialized = true;\n enc = negotiate(params?.capabilities?.general?.positionEncodings);\n const opts = params?.initializationOptions;\n const root = params?.rootUri ? uriPath(params.rootUri) : null;\n /** @param {string} p a path the client gave, a relative one the workspace root's */\n const atRoot = (p) => (root === null ? p : host.resolve(root, p));\n if (Array.isArray(opts?.libs))\n search = [...opts.libs.filter((/** @type {unknown} */ l) => typeof l === \"string\").map(atRoot), ...libs];\n const d = opts?.docs;\n docsAt = docsBase(typeof d === \"string\" && !/^[a-z][a-z0-9+.-]*:/i.test(d) ? atRoot(d) : d, host.pathUri);\n const wf = Array.isArray(params?.workspaceFolders) ? params.workspaceFolders : [];\n folders = [...wf.map((/** @type {any} */ f) => uriPath(f?.uri)), root]\n .flatMap((/** @type {string | null} */ p) => (p === null ? [] : [p]));\n return {\n capabilities: {\n positionEncoding: enc,\n textDocumentSync: { openClose: true, change: 1, save: { includeText: false } },\n hoverProvider: true,\n definitionProvider: true,\n completionProvider: { triggerCharacters: [\".\", \":\"] },\n referencesProvider: true,\n renameProvider: true,\n documentSymbolProvider: true,\n workspaceSymbolProvider: true,\n semanticTokensProvider: { legend: LEGEND, full: true },\n signatureHelpProvider: { triggerCharacters: [\"(\", \",\"] },\n },\n serverInfo: { name: \"ds lsp\", ...(version === undefined ? {} : { version }) },\n };\n }\n case \"shutdown\":\n shutdown = true;\n return null;\n case \"textDocument/hover\": {\n const at = await target(params);\n if (at !== null) return { contents: { kind: \"markdown\", value: hoverText(at.t) } };\n // Not a name the program declares: a builtin, where it is called.\n const doc = docs.get(params?.textDocument?.uri);\n const pos = params?.position;\n if (doc === undefined || typeof pos?.line !== \"number\") return null;\n const text = doc.lines[pos.line] ?? \"\";\n const b = builtinAt(doc.tree, text, fromClient(text, pos.character, enc));\n return b === null ? null : { contents: { kind: \"markdown\", value: builtinHover(b, docsAt) } };\n }\n case \"textDocument/completion\": {\n const uri = params?.textDocument?.uri;\n const doc = docs.get(uri);\n const pos = params?.position;\n if (doc === undefined || typeof pos?.line !== \"number\") return null;\n const text = doc.lines[pos.line] ?? \"\";\n const prog = doc.tree === null ? null : await programOf(uri, doc, doc.tree);\n const items = complete(doc.tree, doc.lines, pos.line + 1, fromClient(text, pos.character, enc), { prog });\n return { isIncomplete: false, items };\n }\n case \"textDocument/references\": {\n const found = await found_(params);\n if (found === null) return [];\n const keep = params?.context?.includeDeclaration !== false;\n return found.all.filter((s) => keep || !s.declaration)\n .map((s) => ({ uri: s.unit.uri, range: range(s.unit.lines, s.range.line, s.range.start, s.range.line, s.range.end, enc) }));\n }\n case \"textDocument/rename\": {\n const name = params?.newName;\n if (typeof name !== \"string\" || !/^[\\p{L}_][\\p{L}\\p{N}_]*$/u.test(name))\n throw new RequestFailed(`${JSON.stringify(name)} is not a DS name`);\n if (RESERVED.has(name)) throw new RequestFailed(`\\`${name}\\` is a reserved word ([LLEX.9.6])`);\n const found = await found_(params);\n if (found === null) throw new RequestFailed(\"nothing the program declares is named here\");\n const outside = found.all.find((s) => !inside(s.unit.path, s.unit.uri === params.textDocument.uri));\n if (outside !== undefined)\n throw new RequestFailed(`${outside.unit.path ?? outside.unit.uri} is outside the workspace, so the rename would leave it behind`);\n /** @type {Record<string, { range: unknown, newText: string }[]>} */\n const changes = {};\n for (const s of found.all)\n (changes[s.unit.uri] ??= []).push({ range: range(s.unit.lines, s.range.line, s.range.start, s.range.line, s.range.end, enc), newText: name });\n return { changes };\n }\n case \"textDocument/definition\": {\n // In the file that declares it: the document, or a library.\n const at = await target(params);\n if (at === null) return null;\n const ls = at.unit.lines;\n const r = definition(ls, at.t);\n return { uri: at.unit.uri, range: range(ls, r.line, r.start, r.line, r.end, enc) };\n }\n case \"textDocument/documentSymbol\": {\n const doc = docs.get(params?.textDocument?.uri);\n if (doc === undefined || doc.tree === null) return [];\n const ls = doc.lines;\n /** @param {Outline} o @returns {unknown} */\n const toLspSymbol = (o) => ({\n name: o.name, detail: o.detail, kind: o.kind,\n range: range(ls, o.range.start.line, o.range.start.col, o.range.end.line, o.range.end.col, enc),\n selectionRange: range(ls, o.selection.line, o.selection.start, o.selection.line, o.selection.end, enc),\n children: o.children.map(toLspSymbol),\n });\n return outline(doc.tree, ls).map(toLspSymbol);\n }\n case \"textDocument/semanticTokens/full\": {\n // A document that has never parsed is still split and its\n // reserved words coloured; only the program's names need a tree.\n const uri = params?.textDocument?.uri;\n const doc = docs.get(uri);\n if (doc === undefined) return { data: [] };\n const unit = doc.tree === null ? null : await programOf(uri, doc, doc.tree);\n return { data: encode(tokens(doc.lines, unit), doc.lines, enc) };\n }\n case \"textDocument/signatureHelp\": {\n const doc = docs.get(params?.textDocument?.uri);\n const pos = params?.position;\n if (doc === undefined || typeof pos?.line !== \"number\") return null;\n const text = doc.lines[pos.line] ?? \"\";\n return signatureHelp(doc.tree, doc.lines, pos.line + 1, fromClient(text, pos.character, enc));\n }\n case \"workspace/symbol\": {\n // Every file an open document's program reaches, each once: the\n // workspace as the server knows it, without walking the disk.\n const query = typeof params?.query === \"string\" ? params.query : \"\";\n /** @type {Set<string>} */\n const seen = new Set();\n /** @type {unknown[]} */\n const out = [];\n for (const [uri, d] of docs) {\n if (d.tree === null) continue;\n for (const u of units(await programOf(uri, d, d.tree))) {\n if (seen.has(u.uri)) continue;\n seen.add(u.uri);\n for (const s of flat(outline(u.tree, u.lines))) {\n if (!matches(s.name, query)) continue;\n const r = s.range;\n out.push({\n name: s.name, kind: s.kind, ...(s.container === null ? {} : { containerName: s.container }),\n location: { uri: u.uri, range: range(u.lines, r.start.line, r.start.col, r.end.line, r.end.col, enc) },\n });\n }\n }\n }\n return out;\n }\n default:\n throw new NoMethod(method);\n }\n };\n\n /**\n * What the name at a request's position refers to, across the program,\n * with the file that declares it: what `refAt` finds, or the service a\n * `call` names, which may be declared in any file of the program\n * ([LGRA.10.1.6]).\n * @param {any} params a TextDocumentPositionParams\n * @returns {Promise<{ unit: Unit, t: Target } | null>}\n */\n const target = async (params) => {\n const uri = params?.textDocument?.uri;\n const doc = docs.get(uri);\n const pos = params?.position;\n if (doc === undefined || doc.tree === null || typeof pos?.line !== \"number\") return null;\n const top = await programOf(uri, doc, doc.tree);\n const text = doc.lines[pos.line] ?? \"\";\n const line = pos.line + 1, col = fromClient(text, pos.character, enc);\n const ref = refAt(top, line, col);\n if (ref !== null) return targetOf(ref);\n const called = calledAt(top, line, col);\n const s = called === null ? undefined : services(top).get(called);\n if (s === undefined || called === null) return null;\n return { unit: s.unit, t: { kind: \"decl\", decl: s.decl, name: called } };\n };\n\n /**\n * What the name at a request's position refers to across the program,\n * and every site of it, once each.\n * @param {any} params a TextDocumentPositionParams\n * @returns {Promise<{ all: Site[] } | null>}\n */\n const found_ = async (params) => {\n const uri = params?.textDocument?.uri;\n const doc = docs.get(uri);\n const pos = params?.position;\n if (doc === undefined || doc.tree === null || typeof pos?.line !== \"number\") return null;\n const top = await programOf(uri, doc, doc.tree);\n const text = doc.lines[pos.line] ?? \"\";\n const ref = refAt(top, pos.line + 1, fromClient(text, pos.character, enc));\n if (ref === null) return null;\n /** @type {Map<string, Site>} */\n const once = new Map();\n for (const s of sites(top, ref)) {\n const key = `${s.unit.uri}\\0${s.range.line}:${s.range.start}`;\n if (!once.has(key) || s.declaration) once.set(key, s);\n }\n return { all: [...once.values()] };\n };\n\n /**\n * The program rooted at an open document: it and every library it\n * imports. A library open in the editor is read from there, not the host.\n *\n * references.js walks the imports synchronously and asks for each\n * library's tree as it reaches it; dumping one may be async. So the walk\n * is run with the trees dumped so far, each one it asks for and has not\n * got is dumped, and it is run again, until it asks for none it has not\n * got: one more round per level of imports.\n * @param {string} uri\n * @param {Doc} doc\n * @param {Module} tree its tree, which the caller has seen is there\n * @returns {Promise<Unit>}\n */\n const programOf = async (uri, doc, tree) => {\n /** @type {Map<string, string>} the open documents' text, by path: what the editor has, not what is saved */\n const open = new Map();\n for (const [u, d] of docs) {\n const p = uriPath(u);\n if (p !== null) open.set(p, d.text);\n }\n const dirs = bundle === null ? search : [...search, bundle];\n for (;;) {\n /** @type {Map<string, [string, string]>} what this round asked for and had not got */\n const missing = new Map();\n const top = program({ uri, path: uriPath(uri), lines: doc.lines, tree }, dirs, {\n read: (p) => open.get(p) ?? host.read?.(p) ?? null,\n tree: (text, file) => {\n const key = `${file}\\0${text}`;\n const got = kept.get(key);\n if (got === undefined) {\n missing.set(key, [text, file]);\n return null;\n }\n kept.delete(key);\n kept.set(key, got);\n return got;\n },\n uri: (p) => host.pathUri(p),\n });\n if (!missing.size) {\n // Pruned once the walk is done, so a tree it took this time is never dumped twice in it.\n for (const key of kept.keys()) {\n if (kept.size <= KEPT_TREES) break;\n kept.delete(key);\n }\n return top;\n }\n for (const [key, [text, file]] of missing) kept.set(key, await treeOf(text, file));\n }\n };\n\n /**\n * A library's tree, or null when it does not parse or its tree does not\n * read (that said to the log).\n * @param {string} text\n * @param {string} file\n * @returns {Promise<Module | null>}\n */\n const treeOf = async (text, file) => {\n const dumped = await host.dumpAst(text, file);\n if (!(\"tree\" in dumped)) return null;\n try {\n return readModule(dumped.tree);\n } catch (err) {\n if (!(err instanceof TreeError)) throw err;\n log(`ds lsp: ${file}: ${err.message}`);\n return null;\n }\n };\n\n /**\n * A file a rename may edit: inside a workspace folder, or the document\n * the rename was asked in, if it is not saved anywhere.\n * @param {string | null} path\n * @param {boolean} isRequestDoc\n */\n const inside = (path, isRequestDoc) => {\n if (path === null) return isRequestDoc;\n return folders.some((f) => path === f || path.startsWith(f.endsWith(\"/\") ? f : f + \"/\"));\n };\n\n /**\n * A notification, acted on.\n * @param {string} method\n * @param {any} params\n */\n const notice = async (method, params) => {\n const uri = params?.textDocument?.uri;\n switch (method) {\n case \"textDocument/didOpen\":\n docs.set(uri, doc(params.textDocument.text, null));\n await analyse(uri);\n return;\n case \"textDocument/didChange\": {\n const changes = params.contentChanges;\n // Full sync: the last change is the whole document.\n const text = changes[changes.length - 1].text;\n docs.set(uri, doc(text, docs.get(uri)?.tree ?? null));\n settle(uri);\n return;\n }\n case \"textDocument/didSave\":\n clearTimeout(waiting.get(uri));\n waiting.delete(uri);\n await analyse(uri);\n return;\n case \"textDocument/didClose\":\n clearTimeout(waiting.get(uri));\n waiting.delete(uri);\n docs.delete(uri);\n send({ method: \"textDocument/publishDiagnostics\", params: { uri, diagnostics: [] } });\n return;\n case \"workspace/didChangeWatchedFiles\":\n for (const u of docs.keys()) settle(u);\n return;\n }\n // Anything else (`initialized`, `$/cancelRequest`, a setting) is\n // not acted on, as the protocol allows for a notification.\n };\n\n /**\n * The session's end: nothing waits past it, since an analysis after\n * `exit` would write to a client that has gone.\n * @param {number} code\n */\n const done = (code) => {\n closed = true;\n for (const timer of waiting.values()) clearTimeout(timer);\n waiting.clear();\n return code;\n };\n\n /**\n * A request answered, or a notification acted on.\n * @param {any} msg\n * @param {boolean} isRequest\n */\n const handle = async (msg, isRequest) => {\n try {\n if (isRequest && !WHILE_TYPING.has(msg.method)) await catchUp();\n if (isRequest) send({ id: msg.id, result: await answer(msg.method, msg.params) });\n else await notice(msg.method, msg.params);\n } catch (err) {\n if (err instanceof NoMethod) {\n if (isRequest) send({ id: msg.id, error: { code: NO_METHOD, message: `no method ${err.message}` } });\n return;\n }\n if (err instanceof RequestFailed) {\n if (isRequest) send({ id: msg.id, error: { code: REQUEST_FAILED, message: err.message } });\n return;\n }\n const text = err instanceof Error ? err.message : String(err);\n log(`ds lsp: ${msg.method}: ${text}`);\n if (isRequest) send({ id: msg.id, error: { code: INTERNAL, message: text } });\n }\n };\n\n /**\n * One message from the client, in its turn.\n * @param {any} msg\n * @returns {Promise<number | null>}\n */\n const receive = (msg) => inTurn(async () => {\n if (closed) return null;\n if (msg === null || typeof msg !== \"object\" || typeof msg.method !== \"string\") {\n // A response to a request of ours: the server sends none yet.\n if (msg?.id === undefined) send({ id: null, error: { code: INVALID, message: \"not a request or notification\" } });\n return null;\n }\n const isRequest = msg.id !== undefined;\n if (msg.method === \"exit\") return done(shutdown ? 0 : 1);\n if (!initialized && msg.method !== \"initialize\") {\n if (isRequest) send({ id: msg.id, error: { code: NOT_INITIALIZED, message: \"initialize first\" } });\n return null;\n }\n // LSP 3.17, `shutdown`: a request after it errors with InvalidRequest.\n // `exit` is the one message left to act on; a notification\n // is dropped, as before `initialize`.\n if (shutdown) {\n if (isRequest) send({ id: msg.id, error: { code: INVALID, message: \"the server is shut down: only `exit` is left\" } });\n return null;\n }\n await handle(msg, isRequest);\n return null;\n });\n\n return { receive, end: () => done(shutdown ? 0 : 1) };\n}\n\n/** The requests asked for while typing, answered without waiting for an analysis. */\nconst WHILE_TYPING = new Set([\"textDocument/completion\", \"textDocument/signatureHelp\"]);\n\n/** A request this server does not answer. */\nclass NoMethod extends Error {}\n\n/** A request understood and refused: a rename that cannot be made, and why. */\nclass RequestFailed extends Error {}\n\n/**\n * @param {string} text\n * @param {Module | null} tree the last good one\n * @returns {Doc}\n */\nfunction doc(text, tree) {\n return { text, lines: lines(text), tree };\n}\n\n/**\n * An LSP range from tree positions: lines 1-based, columns code points.\n * @param {string[]} ls\n * @param {number} l1\n * @param {number} c1\n * @param {number} l2\n * @param {number} c2\n * @param {Encoding} enc\n */\nfunction range(ls, l1, c1, l2, c2, enc) {\n return {\n start: { line: l1 - 1, character: toClient(ls[l1 - 1] ?? \"\", c1, enc) },\n end: { line: l2 - 1, character: toClient(ls[l2 - 1] ?? \"\", c2, enc) },\n };\n}\n\n/**\n * A diagnostic as LSP has it. An empty span is widened to one character, so\n * an editor has something to underline.\n * @param {Diagnostic} d\n * @param {string[]} ls\n * @param {string} uri\n * @param {Encoding} enc\n */\nfunction toLsp(d, ls, uri, enc) {\n /** @param {Point} a @param {Point} b */\n const span = (a, b) => {\n const wide = b.line > a.line || b.col > a.col;\n return range(ls, a.line, a.col, b.line, wide ? b.col : a.col + 1, enc);\n };\n return {\n range: span(d.span.start, d.span.end),\n severity: 1,\n code: d.code,\n source: \"ds lsp\",\n message: d.hint === null ? d.message : `${d.message}\\n\\nhint: ${d.hint}`,\n ...(d.related.length ? {\n relatedInformation: d.related.map((r) => ({ location: { uri, range: span(r.span.start, r.span.end) }, message: r.message })),\n } : {}),\n };\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n//\n// `ds lsp` in a page: the language server (session.js) with a page's host.\n// Nothing here, nor anything it imports, is from Node. The page gives what\n// Node finds on disk:\n//\n// - THE COMPILER: ds_dsc, the wasm `dsc` (its module, or a URL to import),\n// run through `@ds-lang/ds/browser`'s `runDsc` and `compileWasm`, which the\n// page passes in as `binding`, so a compile has the command line every host\n// builds. Its `.wasm` may be given too, as bytes or compiled, and is then\n// compiled once rather than fetched for every run.\n// - THE FILES: an in-memory file set, by absolute path: the libraries a\n// program imports, each at its path, and anything else a compile reads. The\n// page keeps the set and changes it as it likes, then says so with\n// `workspace/didChangeWatchedFiles`, as an editor says a file on disk\n// changed. A document's own text comes from the client, as under Node.\n// - THE STANDARD LIBRARY: the one ds_dsc's module carries (`library`), at\n// `<the compiler's directory>/../share/ds/stdlib` ([LIMP.3.3.1], [RCLI.1.11]):\n// runDsc writes it there for each run, and the session reads it there.\n//\n// A document's URI names a path when it is a `file:` URI, as under Node; its\n// directory is then the first search-path entry ([LIMP.3.1]), and its imports\n// resolve through the file set. Paths are POSIX: `/` separated, and absolute.\n//\n// A page runs the session in a worker (`startLspWorker`), where a compile\n// cannot stall the page, and speaks to it in the protocol's own messages as\n// JSON text over `postMessage`, which an editor's LSP client takes as its\n// transport. `lspSession` is exported as well, for a page that runs it itself.\n\nimport { lspSession } from \"./session.js\";\n\nexport { lspSession };\n\n/** @import { LspHost, LspSession } from \"./session.js\" */\n/** @import { ModuleSource } from \"@ds-lang/ds/browser\" */\n\n/**\n * argv[0] for ds_dsc: an absolute path, whose directory's `../share/ds/stdlib`\n * holds the standard library the compiler carries ([RCLI.1.11]).\n */\nexport const PROGRAM = \"/ds_dsc/bin/dsc\";\n\n/** Where that library is: `<PROGRAM's directory>/../share/ds/stdlib`. */\nexport const STDLIB = \"/ds_dsc/share/ds/stdlib\";\n\n/**\n * The parts of `@ds-lang/ds/browser` the host runs the compiler through.\n * @typedef {object} BrowserBinding\n * @property {typeof import(\"@ds-lang/ds/browser\").runDsc} runDsc\n * @property {typeof import(\"@ds-lang/ds/browser\").compileWasm} compileWasm\n * @property {typeof import(\"@ds-lang/ds/browser\").CompileRefused} CompileRefused\n */\n\n/** @typedef {LspHost & { files: Map<string, string> }} BrowserHost the host, and the file set it reads */\n\n/**\n * A page's host for the session: ds_dsc and an in-memory file set.\n * @param {object} o\n * @param {BrowserBinding} o.binding `@ds-lang/ds/browser`, as the page imported it\n * @param {ModuleSource} o.compiler ds_dsc: ds_dsc.mjs's module, its URL, or its factory (which carries no\n * standard library: the compiler then refuses every compile, [RCLI.1.11])\n * @param {Uint8Array | ArrayBuffer | WebAssembly.Module} [o.compilerWasm] ds_dsc's `.wasm`, its bytes or\n * compiled; with none, the module fetches it beside itself for every run\n * @param {Map<string, string>} [o.files] the file set, by absolute path; kept, not copied\n * @returns {Promise<BrowserHost>}\n */\nexport async function browserHost({ binding, compiler, compilerWasm, files = new Map() }) {\n const module = typeof compiler === \"string\" || compiler instanceof URL ? await import(String(compiler)) : compiler;\n const library = libraryOf(module);\n // A Uint8Array over a SharedArrayBuffer is not a BufferSource to TypeScript, and is to the engine.\n const wasmModule = compilerWasm === undefined || compilerWasm instanceof WebAssembly.Module\n ? compilerWasm : await WebAssembly.compile(/** @type {BufferSource} */ (compilerWasm));\n const run = { wasmModule, program: PROGRAM };\n const below = `${STDLIB}/`;\n\n /**\n * A search-path entry the compiler can open: one the file set has a file\n * under. `dsc` refuses the whole compile over a directory that is not\n * there, as under Node (ports.js), and in the compiler's own file system\n * only what the set holds is there.\n * @param {string} dir\n */\n const there = (dir) => {\n const d = dir.endsWith(\"/\") ? dir : `${dir}/`;\n for (const p of files.keys()) if (p.startsWith(d)) return true;\n return false;\n };\n\n return {\n files,\n async dumpAst(text, file) {\n const r = await binding.runDsc(module, [\"dump-ast\", \"-\", \"--filename\", file],\n { stdin: new TextEncoder().encode(text), ...run });\n if (r.status === 0) return { tree: JSON.parse(new TextDecoder().decode(r.stdout)) };\n if (r.status === 1) return { refused: r.stderr };\n throw new Error(`dsc dump-ast exited ${r.status}: ${r.stderr.trim()}`);\n },\n async compile(text, file, search) {\n try {\n await binding.compileWasm(module, text,\n { file, searchPath: search.filter(there), files: Object.fromEntries(files),\n ...run });\n return null;\n } catch (err) {\n if (err instanceof binding.CompileRefused) return err.diagnostics;\n throw err;\n }\n },\n read: (path) => files.get(path)\n ?? (path.startsWith(below) ? library.get(path.slice(below.length)) : undefined) ?? null,\n stdlib: () => (library.size ? STDLIB : null),\n uriPath: (uri) => (uri.startsWith(\"file:\") ? decodeURIComponent(new URL(uri).pathname) : null),\n pathUri: (path) => `file://${path.split(\"/\").map(encodeURIComponent).join(\"/\")}`,\n dirname: dirOf,\n resolve: (base, path) => normal(path.startsWith(\"/\") ? path : `${base}/${path}`),\n };\n}\n\n/**\n * The standard library a compiler module carries, by its path below the\n * library's root: its `library` export, which a bare factory has not got.\n * @param {unknown} module\n * @returns {Map<string, string>}\n */\nfunction libraryOf(module) {\n const lib = typeof module === \"function\" || module === null || typeof module !== \"object\"\n ? undefined : Reflect.get(module, \"library\");\n /** @type {Map<string, string>} */\n const out = new Map();\n if (lib === undefined || lib === null) return out;\n if (typeof lib !== \"object\") throw new TypeError(\"ds lsp: ds_dsc's `library` is not its standard library\");\n for (const [rel, text] of Object.entries(lib)) {\n if (typeof text !== \"string\") throw new TypeError(`ds lsp: ds_dsc's library entry ${rel} is not text`);\n out.set(rel, text);\n }\n return out;\n}\n\n/**\n * A POSIX path's directory: \"/\" for a file at the root.\n * @param {string} path\n */\nfunction dirOf(path) {\n const at = path.lastIndexOf(\"/\");\n return at <= 0 ? \"/\" : path.slice(0, at);\n}\n\n/**\n * An absolute POSIX path with `.`, `..` and repeated `/` taken out, as Node's\n * `path.resolve` gives it: no trailing `/`, and `..` at the root is the root.\n * @param {string} path\n */\nfunction normal(path) {\n /** @type {string[]} */\n const out = [];\n for (const s of path.split(\"/\")) {\n if (s === \"\" || s === \".\") continue;\n if (s === \"..\") out.pop();\n else out.push(s);\n }\n return `/${out.join(\"/\")}`;\n}\n\n/**\n * What a worker's global gives the protocol: messages out, and messages in\n * through a listener it can take back.\n * @typedef {{ postMessage: (message: string) => void,\n * addEventListener: (type: \"message\", listener: (event: MessageEvent) => void) => void,\n * removeEventListener?: (type: \"message\", listener: (event: MessageEvent) => void) => void }} Scope\n */\n\n/**\n * Serve the page from inside a worker: each message it posts is one of the\n * protocol's messages, as JSON text (or the object itself), and each the\n * session sends is posted back as JSON text. What the session logs goes to\n * the console. After `exit` the worker answers nothing, and `exited` holds\n * the session's exit status.\n * @param {object} o\n * @param {LspHost} o.host `browserHost`'s, or the page's own\n * @param {Scope} [o.scope] the worker's global\n * @param {string[]} [o.libs] library directories for every compile, after the document's own\n * @param {number} [o.settleMs] how long a change waits, with no change after it, to be analysed\n * @param {string} [o.version] the server's version, for `serverInfo`\n * @returns {{ session: LspSession, exited: Promise<number>, close: () => void }}\n */\nexport function startLspWorker({ host, scope = /** @type {Scope} */ (/** @type {unknown} */ (globalThis)), libs,\n settleMs, version }) {\n const session = lspSession({ host, send: (msg) => scope.postMessage(JSON.stringify(msg)),\n log: (line) => console.error(line), libs, settleMs, version });\n /** @type {(code: number) => void} */\n let exit = () => {};\n /** @type {Promise<number>} */\n const exited = new Promise((resolve) => { exit = resolve; });\n /** @param {MessageEvent} event */\n const listener = (event) => {\n /** @type {unknown} */\n let msg = event.data;\n if (typeof msg === \"string\") {\n try {\n msg = JSON.parse(msg);\n } catch {\n // Not a message at all: the protocol's own answer, and nothing for the session.\n scope.postMessage(JSON.stringify({ jsonrpc: \"2.0\", id: null,\n error: { code: -32700, message: \"not JSON\" } }));\n return;\n }\n }\n session.receive(msg).then((code) => {\n if (code === null) return;\n close();\n exit(code);\n }, (err) => console.error(`ds lsp: ${err instanceof Error ? err.message : String(err)}`));\n };\n const close = () => scope.removeEventListener?.(\"message\", listener);\n scope.addEventListener(\"message\", listener);\n return { session, exited, close };\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n// The file set ds lsp in a worker reads (lsp-worker.mjs): the host's\n// libraries, each at /ds-libraries/<name>, the one directory on its search path.\n\nexport const LIBRARIES = '/ds-libraries';\nconst NAME = /^[A-Za-z0-9_.-]+\\.ds$/;\n\n/**\n * The file set: each library at /ds-libraries/<name>.\n *\n * @param {Record<string, string>} libraries the host's libraries, {name.ds: text}\n * @returns {Map<string, string>} the files, by absolute path\n */\nexport function libraryFiles(libraries = {}) {\n const files = new Map();\n for (const [name, text] of Object.entries(libraries || {})) {\n if (!NAME.test(name)) {\n throw new Error(`a library is a .ds file name, not ${JSON.stringify(name)}`);\n }\n files.set(`${LIBRARIES}/${name}`, String(text));\n }\n return files;\n}\n", "// SPDX-FileCopyrightText: 2026 Dan Finster and the Desert Sage Contributors\n// SPDX-License-Identifier: BSD-4-Clause OR AGPL-3.0-or-later\n// ds lsp in a worker, for a host that runs no ds lsp of its own (browser-lsp.mjs\n// is the page's side): @ds-lang/tools's language server for a page, on the\n// wasm dsc through @ds-lang/ds's browser binding, with the host's libraries\n// in its file set under /ds-libraries/.\n//\n// The page's first message sets it up: {op: 'ds-editor-core/init', dsc, wasm,\n// libraries}, the URLs of @ds-lang/ds's build/ds_dsc/ds_dsc.mjs and its\n// dsc_cli.wasm, and the libraries as {name.ds: text}. The worker answers\n// {\"ds-editor-core/ready\": true}, or {\"ds-editor-core/failed\": why}, as JSON\n// text; after that every message either way is one of the protocol's, as JSON\n// text, as @ds-lang/tools's startLspWorker speaks it.\nimport * as binding from '@ds-lang/ds/browser';\nimport { browserHost, startLspWorker } from '@ds-lang/tools/lsp/browser';\nimport { LIBRARIES, libraryFiles } from './lsp-files.mjs';\n\nasync function init({ dsc, wasm, libraries }) {\n const files = libraryFiles(libraries);\n const compilerWasm = new Uint8Array(await (await fetch(wasm)).arrayBuffer());\n const host = await browserHost({ binding, compiler: dsc, compilerWasm, files });\n startLspWorker({ host, scope: self, libs: files.size ? [LIBRARIES] : [] });\n}\n\nif (typeof self !== 'undefined' && typeof self.addEventListener === 'function' && typeof document === 'undefined') {\n const first = ({ data }) => {\n if (!data || data.op !== 'ds-editor-core/init') {\n return;\n }\n self.removeEventListener('message', first);\n init(data).then(\n () => self.postMessage(JSON.stringify({ 'ds-editor-core/ready': true })),\n err => self.postMessage(JSON.stringify({ 'ds-editor-core/failed': String((err && err.message) || err) })),\n );\n };\n self.addEventListener('message', first);\n}\n"],
|
|
5
|
+
"mappings": "6FAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,WAAAE,GAAA,UAAAC,GAAA,mBAAAC,EAAA,YAAAC,EAAA,WAAAC,EAAA,gBAAAC,EAAA,SAAAC,EAAA,0BAAAC,EAAA,aAAAC,EAAA,uBAAAC,GAAA,gBAAAC,GAAA,SAAAC,GAAA,WAAAC,GAAA,WAAAC,KCAA,IAAAC,GAAA,GAAAC,GAAAD,GAAA,0BAAAE,GAAA,+BAAAC,GAAA,4BAAAC,GAAA,6BAAAC,GAAA,kCAAAC,GAAA,gCAAAC,GAAA,4BAAAC,GAAA,0BAAAC,GAAA,kCAAAC,GAAA,2BAAAC,GAAA,2BAAAC,GAAA,4BAAAC,GAAA,4BAAAC,GAAA,8BAAAC,GAAA,yBAAAC,GAAA,iCAAAC,GAAA,wBAAAC,GAAA,sBAAAC,GAAA,0BAAAC,GAAA,wBAAAC,GAAA,yBAAAC,GAAA,uBAAAC,GAAA,oB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EAAK,KAAO,wBAGzB,KAAK,oBAAoB,UAAWD,CAAK,EACzCZ,GAAKa,CAAI,EAAE,KACP,IAAM,KAAK,YAAY,KAAK,UAAU,CAAE,uBAAwB,EAAK,CAAC,CAAC,EACvEC,GAAO,KAAK,YAAY,KAAK,UAAU,CAAE,wBAAyB,OAAQA,GAAOA,EAAI,SAAYA,CAAG,CAAE,CAAC,CAAC,CAC5G,EACJ,EACA,KAAK,iBAAiB,UAAWF,CAAK,CAC1C",
|
|
6
|
+
"names": ["browser_exports", "__export", "Cache", "Clock", "CompileRefused", "DsError", "Engine", "EngineEvent", "Fact", "InternalCompilerError", "JsonText", "STREAM_EVENT_KINDS", "compileWasm", "open", "runDsc", "status_exports", "status_exports", "__export", "DS_ERR_ACTION_FAILED", "DS_ERR_BACKEND_ABI_VERSION", "DS_ERR_BACKEND_BAD_AGGS", "DS_ERR_BACKEND_BAD_MAGIC", "DS_ERR_BACKEND_NOT_REGISTERED", "DS_ERR_BND_DIALECT_MISMATCH", "DS_ERR_BND_DSC_MISMATCH", "DS_ERR_BND_INCOMPLETE", "DS_ERR_BND_RT_CONFIG_MISMATCH", "DS_ERR_BUDGET_EXCEEDED", "DS_ERR_CONTRACT_BREACH", "DS_ERR_CONTRACT_INVALID", "DS_ERR_CONTRACT_MISSING", "DS_ERR_CONTRACT_WCET_HALT", "DS_ERR_DSC_BAD_MAGIC", "DS_ERR_DSC_CAPABILITY_ABSENT", "DS_ERR_DSC_DANGLING", "DS_ERR_DSC_DECODE", "DS_ERR_DSC_DECOMPRESS", "DS_ERR_DSC_SEMANTIC", "DS_ERR_DSC_TRUNCATED", "DS_ERR_DSC_VERSION", "DS_ERR_ENCODING", "DS_ERR_ENGINE_HALTED", "DS_ERR_FACT_INVALID", "DS_ERR_FACT_REF_CONFLICT", "DS_ERR_FN_NOT_FOUND", "DS_ERR_FS_DIVERGENCE", "DS_ERR_FS_RECORDING_INCOMPLETE", "DS_ERR_FS_UNKNOWN_FACT_ID", "DS_ERR_FS_VERSION", "DS_ERR_INTERNAL", "DS_ERR_INVAL", "DS_ERR_IO", "DS_ERR_JSON_LIMIT", "DS_ERR_JSON_NONFINITE", "DS_ERR_NAN_REJECTED", "DS_ERR_NOT_FOUND", "DS_ERR_NOT_REPRESENTABLE", "DS_ERR_OOM", "DS_ERR_OVERFLOW", "DS_ERR_PARSE", "DS_ERR_RETP_INDEX_OOB", "DS_ERR_RETP_INVALID", "DS_ERR_RTCT_PROFILE_REFUSES_DSRT", "DS_ERR_RT_LIVE", "DS_ERR_RT_PRECOND", "DS_ERR_RT_UNSAFE", "DS_ERR_SCHEMA_HASH_MISMATCH", "DS_ERR_SCHEMA_UNKNOWN", "DS_ERR_SERIES_NO_BACKING", "DS_ERR_SLOT_TYPE_MISMATCH", "DS_ERR_SLOT_UNKNOWN", "DS_ERR_STATE", "DS_ERR_STORAGE_NOT_FOUND", "DS_ERR_STORAGE_QUERY_FAILED", "DS_ERR_STORAGE_UNAVAILABLE", "DS_ERR_TIME_RANGE", "DS_ERR_TOKEN_BUDGET", "DS_ERR_UNSUPPORTED", "DS_ERR_WM_FULL", "DS_OK", "STATUS", "DsError", "statusCode", "detail", "options", "CompileRefused", "file", "diagnostics", "InternalCompilerError", "reason", "JsonText", "#text", "text", "EngineEvent", "type", "fields", "KINDS", "STREAM_EVENT_KINDS", "glue", "realmHost", "realm", "loadedGlue", "attach", "entry", "target", "load", "host", "api", "bind", "mine", "b", "error", "where", "hook", "compile", "compileFile", "Engine", "Fact", "status_exports", "setUnraisableHook", "source", "fromSource", "readAtoms", "messageName", "decodeAnnouncedFactBody", "decodeAnnouncedFactBodyHandles", "defaultUnraisableHook", "fn", "prev", "makeFact", "handleOf", "_Fact", "#b", "#h", "handle", "fact", "publicRecord", "publicValue", "v", "plainBytes", "publicSlots", "slots", "out", "k", "r", "glueSlots", "plainArgs", "args", "publicEvent", "ev", "h", "plainField", "items", "i", "f", "wantCallback", "what", "reportUncaught", "makeClock", "Clock", "_Clock", "mode", "ns", "utcNs", "makeCache", "Cache", "_Cache", "#register", "#writeThrough", "register", "key", "json", "ttlNs", "keys", "bytes", "handlers", "NameMap", "#map", "entries", "name", "thisArg", "deepFrozen", "x", "adopting", "_Engine", "#cbs", "#rec", "#clock", "#cache", "#failures", "#schemas", "#rules", "#lineSpans", "#handlers", "#setWriteThrough", "sink", "open", "err", "rec", "maxAtomBytes", "chunks", "#forgetProgram", "chunk", "finished", "tailBytes", "counts", "schema", "body", "#setCallback", "listener", "#deliver", "kind", "#setHandler", "old", "event", "req", "#duty", "uncaught", "set", "del", "s", "value", "d", "#withHandlers", "op", "outer", "failures", "n", "all", "slot", "m", "nodeId", "data", "id", "factId", "ruleFilter", "includeOccupancy", "incremental", "a", "field", "checkAnnounced", "got", "dsc", "e", "dirOf", "p", "dirToMake", "s", "DEFAULT_PROGRAM", "compilerOf", "compiler", "m", "f", "lib", "library", "rel", "text", "isExitStatus", "e", "runDsc", "argv", "stdin", "files", "wasmBinary", "wasmModule", "program", "factory", "root", "out", "err", "at", "Quit", "status", "imports", "receive", "inst", "toThrow", "c", "path", "data", "proc", "exitCode", "compileWasm", "source", "file", "searchPath", "r", "stderr", "CompileRefused", "InternalCompilerError", "NO_COMPILER", "host", "compiler", "compilerWasm", "source", "options", "compileWasm", "moduleOf", "what", "name", "member", "m", "key", "open", "glue", "runtime", "wasmBinary", "attach", "g", "factory", "rt", "getDefaultContext", "NODES", "TYPES", "TreeError", "message", "readModule", "json", "tree", "readNode", "value", "where", "obj", "type", "shape", "NODES", "declared", "names", "f", "extra", "k", "missing", "check", "field", "item", "i", "one", "node", "TYPES", "walk", "BUILTIN", "v", "NAME_CHAR", "declName", "d", "typeName", "ref", "spans", "node", "line", "col", "declAt", "mod", "body", "i", "next", "patternBodies", "lhs", "out", "clause", "p", "s", "bindings", "rule", "wordAt", "text", "cps", "is", "at", "start", "end", "qualifier", "q", "nameRange", "lines", "name", "want", "c", "k", "definition", "t", "scopeName", "scope", "exprText", "e", "modifierText", "m", "kwargText", "serviceText", "slotType", "MARKER", "slotDecl", "parts", "hoverText", "block", "schemaText", "pats", "b", "v", "raw", "x", "code", "doc", "more", "program", "root", "search", "src", "dirs", "distinct", "dirOf", "byPath", "byName", "link", "unit", "d", "lib", "library", "a", "segments", "name", "known", "found", "dir", "path", "text", "already", "tree", "top", "seen", "out", "key", "units", "visit", "u", "m", "b", "lookup", "declName", "lookupType", "ref", "schemaOf", "services", "calledAt", "line", "col", "declAt", "n", "walk", "r", "nameRange", "targetOf", "body", "bindings", "schema", "refAt", "w", "wordAt", "bs", "s", "slot", "x", "spans", "k", "sites", "add", "range", "declaration", "bindingSites", "declSites", "slotSites", "rule", "patternBodies", "nameAfter", "typeName", "exprRange", "same", "attrRange", "isSchema", "t", "of", "lines", "v", "from", "type", "GRAMMAR_WORDS", "AGGREGATIONS", "BUILTINS", "TYPES", "FUNCTION", "FIELD", "VARIABLE", "CLASS", "MODULE", "KEYWORD", "CONSTANT", "STRUCT", "OPERATOR", "SNIPPET", "item", "label", "kind", "detail", "CALLABLE", "BUILTINS", "complete", "mod", "lines", "line", "col", "prog", "before", "call", "serviceNames", "args", "callArgs", "kwargs", "dot", "afterDot", "TYPES", "t", "schemas", "fresh", "GRAMMAR_WORDS", "w", "d", "declAt", "expression", "out", "inActions", "typed", "name", "s", "declaredServices", "serviceDetail", "services", "k", "m", "tail", "rest", "written", "kwargText", "imported", "modules", "bare", "q", "body", "bindings", "schema", "schemaNamed", "typeName", "schemaOf", "lib", "members", "prefix", "b", "builtin", "schemaItem", "libraries", "pick", "bareImports", "decl", "declName", "rule", "builtinModules", "i", "l", "full", "x", "named", "a", "AGGREGATIONS", "arity", "tier", "takes", "start", "CALLABLE", "BUILTINS", "b", "builtinNamed", "mod", "callee", "modules", "bare", "imported", "dot", "m", "builtinAt", "text", "col", "w", "wordAt", "docsBase", "given", "pathUri", "base", "builtinHover", "docs", "clauses", "c", "s", "negotiate", "offered", "toClient", "line", "cp", "enc", "units", "seen", "ch", "fromClient", "col", "lines", "text", "LEGEND", "T", "i", "M", "m", "NAME_START", "NAME_CONT", "DIGIT", "UNIT_START", "UNIT_CONT", "scan", "lines", "until", "out", "inTriple", "last", "l", "all", "cps", "push", "start", "end", "kind", "close", "tripleEnd", "c", "j", "numberEnd", "from", "digits", "re", "sign", "u", "WORDS", "GRAMMAR_WORDS", "w", "BUILTIN_TYPES", "TYPES", "CALLABLE", "BUILTINS", "b", "AGGREGATION", "AGGREGATIONS", "tokens", "unit", "lexemes", "modules", "bare", "imported", "services", "d", "k", "x", "add", "type", "mods", "prev", "next", "qualifier", "member", "calls", "chain", "dotted", "service", "ref", "refAt", "t", "declared", "viaModule", "importLine", "here", "at", "patternBodies", "nameRange", "decl", "xs", "touch", "isDot", "a", "line", "encode", "toks", "enc", "data", "char", "text", "toClient", "OPEN", "CLOSE", "signatureHelp", "mod", "lines", "line", "col", "xs", "scan", "stack", "k", "x", "before", "callee", "dotted", "call", "b", "builtinNamed", "signatures", "s", "signature", "fits", "overload", "summary", "label", "open", "close", "closing", "parameters", "depth", "from", "i", "c", "a", "z", "KIND", "outline", "mod", "lines", "out", "body", "i", "d", "what", "describe", "nameInText", "shown", "endOf", "nameRange", "s", "slotSymbol", "flat", "tree", "o", "c", "matches", "name", "query", "at", "r", "detail", "n", "declName", "end", "next", "last", "HEADER", "CARETS", "CODE", "HINT", "parseDiagnostics", "text", "ls", "out", "block", "m", "line", "col", "span", "c", "head", "code", "diag", "save", "rel", "RESERVED", "GRAMMAR_WORDS", "TYPES", "KEPT_TREES", "INVALID", "NO_METHOD", "INTERNAL", "NOT_INITIALIZED", "REQUEST_FAILED", "lspSession", "host", "sendOut", "log", "libs", "settleMs", "version", "docs", "enc", "initialized", "shutdown", "search", "bundle", "kept", "folders", "docsAt", "closed", "send", "msg", "uriPath", "uri", "turn", "inTurn", "fn", "p", "analyse", "doc", "path", "file", "dumped", "readModule", "err", "TreeError", "dirs", "report", "diagnostics", "parseDiagnostics", "d", "toLsp", "waiting", "settle", "catchUp", "timer", "answer", "method", "params", "negotiate", "opts", "root", "atRoot", "l", "docsBase", "f", "LEGEND", "at", "target", "hoverText", "pos", "text", "b", "builtinAt", "fromClient", "builtinHover", "prog", "programOf", "complete", "found", "found_", "keep", "s", "range", "name", "RequestFailed", "outside", "inside", "changes", "ls", "r", "definition", "toLspSymbol", "o", "outline", "unit", "encode", "tokens", "signatureHelp", "query", "seen", "out", "u", "units", "flat", "matches", "NoMethod", "top", "line", "col", "ref", "refAt", "targetOf", "called", "calledAt", "services", "once", "sites", "key", "tree", "open", "missing", "program", "got", "treeOf", "isRequestDoc", "notice", "done", "code", "handle", "isRequest", "WHILE_TYPING", "lines", "l1", "c1", "l2", "c2", "toClient", "span", "wide", "PROGRAM", "STDLIB", "browserHost", "binding", "compiler", "compilerWasm", "files", "module", "library", "libraryOf", "run", "below", "there", "dir", "d", "p", "text", "file", "r", "search", "err", "path", "uri", "dirOf", "base", "normal", "lib", "out", "rel", "at", "s", "startLspWorker", "host", "scope", "libs", "settleMs", "version", "session", "lspSession", "msg", "line", "exit", "exited", "resolve", "listener", "event", "code", "close", "LIBRARIES", "NAME", "libraryFiles", "libraries", "files", "name", "text", "init", "dsc", "wasm", "libraries", "files", "libraryFiles", "compilerWasm", "host", "browserHost", "browser_exports", "startLspWorker", "LIBRARIES", "first", "data", "err"]
|
|
7
|
+
}
|