@prisma/orm-framework 8.0.0-rc.8-dev.5 → 8.0.0-rc.8-dev.7
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/dist/authoring-9Zbdh9AT.d.mts +1 -0
- package/dist/{components-ia4FZEto.d.mts → components-DfBgqtAA.d.mts} +2 -2
- package/dist/{components-ia4FZEto.d.mts.map → components-DfBgqtAA.d.mts.map} +1 -1
- package/dist/components.d.mts +9 -9
- package/dist/components.mjs +2 -2
- package/dist/components__authoring.d.mts +3 -3
- package/dist/components__authoring.mjs +1 -1
- package/dist/components__components.d.mts +2 -2
- package/dist/components__control.d.mts +2 -2
- package/dist/components__control.mjs +1 -1
- package/dist/components__execution.d.mts +1 -1
- package/dist/components__psl-ast.d.mts +3 -3
- package/dist/{config-types-BBh0yyQd.d.mts → config-types-D-nxkVW-.d.mts} +4 -4
- package/dist/{config-types-BBh0yyQd.d.mts.map → config-types-D-nxkVW-.d.mts.map} +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config__config-types.d.mts +1 -1
- package/dist/contract-authoring.d.mts +2 -2
- package/dist/contract-authoring.mjs +1 -1
- package/dist/{control-BNfiycdf.mjs → control-Bu6rDTHH.mjs} +9 -2
- package/dist/control-Bu6rDTHH.mjs.map +1 -0
- package/dist/{control-DmFSwVgR.d.mts → control-DK98Br9g.d.mts} +5 -4
- package/dist/{control-DmFSwVgR.d.mts.map → control-DK98Br9g.d.mts.map} +1 -1
- package/dist/errors.d.mts +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/{execution-G7Kp48sJ.d.mts → execution-B6yrDgxW.d.mts} +2 -2
- package/dist/{execution-G7Kp48sJ.d.mts.map → execution-B6yrDgxW.d.mts.map} +1 -1
- package/dist/{execution-A4vaigOc.d.mts → execution-DPhpNcSb.d.mts} +2 -2
- package/dist/{execution-A4vaigOc.d.mts.map → execution-DPhpNcSb.d.mts.map} +1 -1
- package/dist/{framework-authoring-CDEvlouU-ds1Hb4Vt.mjs → framework-authoring-7TMJaLjm-DghHbwwP.mjs} +22 -3
- package/dist/framework-authoring-7TMJaLjm-DghHbwwP.mjs.map +1 -0
- package/dist/{framework-authoring-BRbNN8tk-DrB69FyZ.d.mts → framework-authoring-C57bj6fM-C9ljFo_i.d.mts} +8 -9
- package/dist/{framework-authoring-BRbNN8tk-DrB69FyZ.d.mts.map → framework-authoring-C57bj6fM-C9ljFo_i.d.mts.map} +1 -1
- package/dist/{framework-components-UsOSi5GL-CSF4BISx.d.mts → framework-components-BAj0Yl7v-CFNdlUrJ.d.mts} +3 -3
- package/dist/{framework-components-UsOSi5GL-CSF4BISx.d.mts.map → framework-components-BAj0Yl7v-CFNdlUrJ.d.mts.map} +1 -1
- package/dist/{parse-0ZJjj_2N-DatnH-Vo.d.mts → parse-0ZJjj_2N-hn1rwo4m.d.mts} +3 -3
- package/dist/{parse-0ZJjj_2N-DatnH-Vo.d.mts.map → parse-0ZJjj_2N-hn1rwo4m.d.mts.map} +1 -1
- package/dist/{psl-ast-Bbzjp_WY.d.mts → psl-ast-D7s3Wde7.d.mts} +3 -3
- package/dist/{psl-ast-Bbzjp_WY.d.mts.map → psl-ast-D7s3Wde7.d.mts.map} +1 -1
- package/dist/{psl-ast-2W8mhZ2J-Cd8pMTOV.d.mts → psl-ast-U8WIp-a5-BVKH-Lhi.d.mts} +3 -3
- package/dist/{psl-ast-2W8mhZ2J-Cd8pMTOV.d.mts.map → psl-ast-U8WIp-a5-BVKH-Lhi.d.mts.map} +1 -1
- package/dist/psl-parser.d.mts +32 -7
- package/dist/psl-parser.d.mts.map +1 -1
- package/dist/psl-parser.mjs +25 -2
- package/dist/psl-parser.mjs.map +1 -1
- package/dist/psl-parser__interpret.d.mts +3 -3
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/dist/psl-printer.d.mts +4 -4
- package/dist/psl-printer.mjs +1 -1
- package/dist/{symbol-table-CZ7EVCTL-ByUmi8Bh.d.mts → symbol-table-CZ7EVCTL-Kr33P4hu.d.mts} +5 -5
- package/dist/{symbol-table-CZ7EVCTL-ByUmi8Bh.d.mts.map → symbol-table-CZ7EVCTL-Kr33P4hu.d.mts.map} +1 -1
- package/package.json +15 -15
- package/dist/authoring-B2hm8xz7.d.mts +0 -1
- package/dist/control-BNfiycdf.mjs.map +0 -1
- package/dist/framework-authoring-CDEvlouU-ds1Hb4Vt.mjs.map +0 -1
package/dist/psl-parser.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
|
+
import { t as InternalError } from "./internal-error-BIc-ehme-ouBQPoEL.mjs";
|
|
2
3
|
import { n as ok, t as notOk } from "./result-CBZ8X9mU.mjs";
|
|
3
|
-
import { h as isAuthoringPslBlockDescriptor } from "./framework-authoring-
|
|
4
|
+
import { h as isAuthoringPslBlockDescriptor, m as isAuthoringModelAttributeDescriptor } from "./framework-authoring-7TMJaLjm-DghHbwwP.mjs";
|
|
4
5
|
import { a as makePslNamespace, c as validateExtensionBlock, i as flatPslModels, n as UNSPECIFIED_PSL_NAMESPACE_ID, o as makePslNamespaceEntries, s as namespacePslExtensionBlocks } from "./psl-ast-DUCvVXbB.mjs";
|
|
5
6
|
import { E as TypesBlockAst, N as printSyntax, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, d as IdentifierAst, g as NamespaceDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-DR6To8_k-BFwkCGeP.mjs";
|
|
6
7
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.mjs
|
|
@@ -12,6 +13,28 @@ function parseQuotedStringLiteral(value) {
|
|
|
12
13
|
if (!match) return void 0;
|
|
13
14
|
return match[2] ?? "";
|
|
14
15
|
}
|
|
16
|
+
function* modelAttributeDescriptors(namespace) {
|
|
17
|
+
for (const value of Object.values(namespace)) {
|
|
18
|
+
if (isAuthoringModelAttributeDescriptor(value)) {
|
|
19
|
+
yield value;
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
yield* modelAttributeDescriptors(value);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function assembleAttributeSpecs(contributions) {
|
|
26
|
+
const entries = Object.entries(contributions.attributeSpecs.model);
|
|
27
|
+
const claimed = new Set(entries.map(([attribute]) => attribute));
|
|
28
|
+
for (const descriptor of modelAttributeDescriptors(contributions.modelAttributes)) {
|
|
29
|
+
if (claimed.has(descriptor.attribute)) throw new InternalError(`Duplicate attribute spec registration for "${descriptor.attribute}". Each model attribute name may be registered once across family built-ins and model-attribute descriptors.`);
|
|
30
|
+
claimed.add(descriptor.attribute);
|
|
31
|
+
entries.push([descriptor.attribute, descriptor.spec]);
|
|
32
|
+
}
|
|
33
|
+
return Object.freeze(blindCast({
|
|
34
|
+
model: Object.freeze(Object.fromEntries(entries)),
|
|
35
|
+
field: Object.freeze({ ...contributions.attributeSpecs.field })
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
15
38
|
function readResolvedAttribute(attribute, sourceFile) {
|
|
16
39
|
return {
|
|
17
40
|
name: attributeName(attribute.name()),
|
|
@@ -827,6 +850,6 @@ function nodeRange(node, sourceFile) {
|
|
|
827
850
|
};
|
|
828
851
|
}
|
|
829
852
|
//#endregion
|
|
830
|
-
export { bool, buildSymbolTable, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, json, keywordPslSpan, leafDiagnostic, list, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, oneOf, optional, parseQuotedStringLiteral, rangeToPslSpan, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, str, validateExtensionBlockFromSymbol };
|
|
853
|
+
export { assembleAttributeSpecs, bool, buildSymbolTable, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, json, keywordPslSpan, leafDiagnostic, list, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, oneOf, optional, parseQuotedStringLiteral, rangeToPslSpan, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, str, validateExtensionBlockFromSymbol };
|
|
831
854
|
|
|
832
855
|
//# sourceMappingURL=psl-parser.mjs.map
|
package/dist/psl-parser.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.mjs"],"sourcesContent":["import { _ as FunctionCallAst, b as ObjectLiteralExprAst, c as NamespaceDeclarationAst, g as BooleanLiteralExprAst, i as GenericBlockDeclarationAst, k as printSyntax, l as TypesBlockAst, m as ArrayLiteralAst, o as ModelDeclarationAst, t as CompositeTypeDeclarationAst, v as NumberLiteralExprAst, w as IdentifierAst, x as StringLiteralExprAst } from \"./declarations-DR6To8_k.mjs\";\nimport { UNSPECIFIED_PSL_NAMESPACE_ID, flatPslModels, makePslNamespace, makePslNamespaceEntries, namespacePslExtensionBlocks, validateExtensionBlock } from \"@internal/framework-components/psl-ast\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { isAuthoringPslBlockDescriptor } from \"@internal/framework-components/authoring\";\n//#region src/attribute-helpers.ts\nfunction getPositionalArgument(attribute, index = 0) {\n\treturn attribute.args.filter((arg) => arg.kind === \"positional\")[index]?.value;\n}\nfunction parseQuotedStringLiteral(value) {\n\tconst match = value.trim().match(/^(['\"])(.*)\\1$/);\n\tif (!match) return void 0;\n\treturn match[2] ?? \"\";\n}\n//#endregion\n//#region src/resolve.ts\nfunction readResolvedAttribute(attribute, sourceFile) {\n\treturn {\n\t\tname: attributeName(attribute.name()),\n\t\targs: readResolvedArgList(attribute.argList(), sourceFile),\n\t\tspan: nodePslSpan(attribute.syntax, sourceFile)\n\t};\n}\nfunction readResolvedAttributes(attributes, sourceFile) {\n\treturn Array.from(attributes, (attribute) => readResolvedAttribute(attribute, sourceFile));\n}\nfunction readResolvedConstructorCall(annotation, sourceFile) {\n\tconst argList = annotation?.argList();\n\tif (annotation === void 0 || argList === void 0) return void 0;\n\treturn {\n\t\tpath: annotation.name()?.path() ?? [],\n\t\targs: readResolvedArgList(argList, sourceFile),\n\t\tspan: nodePslSpan(annotation.syntax, sourceFile)\n\t};\n}\nfunction readResolvedArgList(argList, sourceFile) {\n\tif (argList === void 0) return [];\n\tconst args = [];\n\tfor (const arg of argList.args()) {\n\t\tconst name = arg.name()?.name();\n\t\tconst expression = arg.value();\n\t\targs.push({\n\t\t\tkind: name !== void 0 ? \"named\" : \"positional\",\n\t\t\t...name !== void 0 ? { name } : {},\n\t\t\tvalue: renderExpression(expression),\n\t\t\t...expression !== void 0 ? { expression } : {},\n\t\t\tspan: nodePslSpan(arg.syntax, sourceFile)\n\t\t});\n\t}\n\treturn args;\n}\nfunction attributeName(name) {\n\treturn name?.path().join(\".\") ?? \"\";\n}\nfunction renderExpression(expression) {\n\tif (expression === void 0) return \"\";\n\treturn printSyntax(expression.syntax).trim();\n}\nfunction nodePslSpan(node, sourceFile) {\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: offsetToPslPosition(start, sourceFile),\n\t\tend: offsetToPslPosition(end, sourceFile)\n\t};\n}\n/** Unsupported-top-level-block diagnostics are anchored to the keyword token. */\nfunction keywordPslSpan(node, keyword, sourceFile) {\n\tconst start = node.offset;\n\tconst end = start + keyword.length;\n\treturn {\n\t\tstart: offsetToPslPosition(start, sourceFile),\n\t\tend: offsetToPslPosition(end, sourceFile)\n\t};\n}\nfunction rangeToPslSpan(range, sourceFile) {\n\treturn {\n\t\tstart: offsetToPslPosition(sourceFile.offsetAt(range.start), sourceFile),\n\t\tend: offsetToPslPosition(sourceFile.offsetAt(range.end), sourceFile)\n\t};\n}\nfunction offsetToPslPosition(offset, sourceFile) {\n\tconst position = sourceFile.positionAt(offset);\n\treturn {\n\t\toffset,\n\t\tline: position.line + 1,\n\t\tcolumn: position.character + 1\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/diagnostic.ts\nconst ATTRIBUTE_DIAGNOSTIC_CODE = \"PSL_INVALID_ATTRIBUTE_SYNTAX\";\nfunction leafDiagnostic(ctx, node, message, code = ATTRIBUTE_DIAGNOSTIC_CODE) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\tsourceId: ctx.sourceId,\n\t\tspan: nodePslSpan(node.syntax, ctx.sourceFile)\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/bool.ts\nfunction bool() {\n\treturn {\n\t\tkind: \"bool\",\n\t\tlabel: \"boolean\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (arg instanceof BooleanLiteralExprAst) {\n\t\t\t\tconst value = arg.value();\n\t\t\t\tif (value !== void 0) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a boolean literal\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/entity-ref.ts\nfunction entityRef() {\n\treturn {\n\t\tkind: \"entityRef\",\n\t\tlabel: \"model name\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (!(arg instanceof IdentifierAst)) return notOk([leafDiagnostic(ctx, arg, \"Expected a model name\")]);\n\t\t\tconst name = arg.name();\n\t\t\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a model name\")]);\n\t\t\treturn ok(name);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/field-ref.ts\nfunction fieldRef(scope) {\n\treturn {\n\t\tkind: \"fieldRef\",\n\t\tlabel: \"field name\",\n\t\tscope,\n\t\tparse: (arg, ctx) => {\n\t\t\tif (!(arg instanceof IdentifierAst)) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\t\t\tconst name = arg.name();\n\t\t\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\t\t\tconst model = scope === \"self\" ? ctx.selfModel : ctx.resolveReferencedModel();\n\t\t\tif (model !== void 0 && !Object.hasOwn(model.fields, name)) return notOk([leafDiagnostic(ctx, arg, `Field \"${name}\" does not exist on model \"${model.name}\"`)]);\n\t\t\treturn ok(name);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/interpret.ts\nfunction interpretArgs(args, spec, ctx, span) {\n\tconst diagnostics = [];\n\tconst output = {};\n\tconst seen = /* @__PURE__ */ new Set();\n\tlet positionalSlot = 0;\n\tlet reportedExcess = false;\n\tfor (const arg of args) {\n\t\tconst name = arg.name()?.name();\n\t\tlet key;\n\t\tlet param;\n\t\tif (name === void 0) {\n\t\t\tconst posParam = spec.positional[positionalSlot];\n\t\t\tif (posParam === void 0) {\n\t\t\t\tif (!reportedExcess) {\n\t\t\t\t\tdiagnostics.push(diagnostic(`Attribute \"${spec.name}\" received too many positional arguments`, ctx, span));\n\t\t\t\t\treportedExcess = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpositionalSlot += 1;\n\t\t\tkey = posParam.key;\n\t\t\tparam = posParam.type;\n\t\t} else {\n\t\t\tconst namedParam = Object.hasOwn(spec.named, name) ? spec.named[name] : void 0;\n\t\t\tif (namedParam === void 0) {\n\t\t\t\tdiagnostics.push(diagnostic(`Attribute \"${spec.name}\" received unknown argument \"${name}\"`, ctx, nodePslSpan(arg.syntax, ctx.sourceFile)));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tkey = name;\n\t\t\tparam = namedParam;\n\t\t}\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push(diagnostic(`Attribute \"${spec.name}\" received duplicate argument \"${key}\"`, ctx, nodePslSpan(arg.syntax, ctx.sourceFile)));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tconst result = parseArgValue(arg, param, ctx, diagnostics);\n\t\tif (result.ok) output[key] = result.value;\n\t}\n\tconst finalized = /* @__PURE__ */ new Set();\n\tconst finalizeAbsentKey = (key, positionalParam, namedParam) => {\n\t\tif (finalized.has(key) || seen.has(key)) return;\n\t\tfinalized.add(key);\n\t\tconst effective = namedParam ?? positionalParam;\n\t\tif (effective === void 0) return;\n\t\tif (isOptionalArgType(effective)) {\n\t\t\tif (effective.hasDefault) output[key] = effective.defaultValue;\n\t\t\treturn;\n\t\t}\n\t\tdiagnostics.push(diagnostic(`Attribute \"${spec.name}\" is missing required argument \"${key}\"`, ctx, span));\n\t};\n\tfor (const param of spec.positional) {\n\t\tconst namedParam = Object.hasOwn(spec.named, param.key) ? spec.named[param.key] : void 0;\n\t\tfinalizeAbsentKey(param.key, param.type, namedParam);\n\t}\n\tfor (const key of Object.keys(spec.named)) finalizeAbsentKey(key, void 0, spec.named[key]);\n\tif (diagnostics.length > 0) return notOk(diagnostics);\n\treturn ok(output);\n}\nfunction interpretAttribute(attrNode, spec, ctx) {\n\tconst attributeSpan = nodePslSpan(attrNode.syntax, ctx.sourceFile);\n\tconst bound = interpretArgs(attrNode.argList()?.args() ?? [], spec, ctx, attributeSpan);\n\tif (!bound.ok) return notOk(bound.failure);\n\tconst value = blindCast(bound.value);\n\tif (spec.refine !== void 0) {\n\t\tconst refineDiagnostics = spec.refine(value, ctx, attrNode);\n\t\tif (refineDiagnostics.length > 0) return notOk(refineDiagnostics);\n\t}\n\treturn ok(value);\n}\nfunction parseArgValue(arg, argType, ctx, diagnostics) {\n\tconst value = arg.value();\n\tif (value === void 0) {\n\t\tconst missing = diagnostic(\"Attribute argument is missing a value\", ctx, nodePslSpan(arg.syntax, ctx.sourceFile));\n\t\tdiagnostics.push(missing);\n\t\treturn notOk([missing]);\n\t}\n\tconst result = argType.parse(value, ctx);\n\tif (!result.ok) for (const failure of result.failure) diagnostics.push(failure);\n\treturn result;\n}\nfunction isOptionalArgType(param) {\n\treturn \"optional\" in param && param.optional === true;\n}\nfunction diagnostic(message, ctx, span) {\n\treturn {\n\t\tcode: ATTRIBUTE_DIAGNOSTIC_CODE,\n\t\tmessage,\n\t\tsourceId: ctx.sourceId,\n\t\tspan\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/func-call.ts\nfunction funcCall(name, sig) {\n\treturn {\n\t\tkind: \"funcCall\",\n\t\tlabel: \"function call\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst guard = matchCallee(arg, name, ctx);\n\t\t\tif (!guard.ok) return guard;\n\t\t\tconst span = nodePslSpan(guard.value.syntax, ctx.sourceFile);\n\t\t\tconst bound = interpretArgs(guard.value.args(), {\n\t\t\t\tname,\n\t\t\t\tpositional: sig.positional ?? [],\n\t\t\t\tnamed: sig.named ?? {}\n\t\t\t}, ctx, span);\n\t\t\tif (!bound.ok) return notOk(bound.failure);\n\t\t\treturn ok({\n\t\t\t\tfn: name,\n\t\t\t\tspan,\n\t\t\t\targs: bound.value\n\t\t\t});\n\t\t}\n\t};\n}\nfunction matchCallee(arg, name, ctx) {\n\tif (!(arg instanceof FunctionCallAst)) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst qname = arg.name();\n\tif (qname === void 0 || qname.dot() !== void 0 || qname.colon() !== void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst calleeName = qname.identifier()?.token()?.text;\n\tif (calleeName === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tif (calleeName !== name) return notOk([leafDiagnostic(ctx, arg, `Expected ${name}()`)]);\n\treturn ok(arg);\n}\n//#endregion\n//#region src/attribute-spec/combinators/identifier.ts\nfunction identifier(name) {\n\treturn {\n\t\tkind: \"identifier\",\n\t\tlabel: name,\n\t\tparse: (arg, ctx) => {\n\t\t\tif (arg instanceof IdentifierAst && arg.name() === name) return ok(name);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${name}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/int.ts\nfunction int(opts) {\n\tconst min = opts?.min;\n\tconst max = opts?.max;\n\treturn {\n\t\tkind: \"int\",\n\t\tlabel: \"integer\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (arg instanceof NumberLiteralExprAst) {\n\t\t\t\tconst value = arg.value();\n\t\t\t\tif (value !== void 0 && Number.isInteger(value)) {\n\t\t\t\t\tif ((min === void 0 || value >= min) && (max === void 0 || value <= max)) return ok(value);\n\t\t\t\t\treturn notOk([leafDiagnostic(ctx, arg, rangeMessage(min, max))]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected an integer literal\")]);\n\t\t}\n\t};\n}\nfunction rangeMessage(min, max) {\n\tif (min !== void 0 && max !== void 0) return `Expected an integer between ${min} and ${max}`;\n\tif (min !== void 0) return `Expected an integer greater than or equal to ${min}`;\n\treturn `Expected an integer less than or equal to ${max}`;\n}\n//#endregion\n//#region src/attribute-spec/combinators/json.ts\n/**\n* Reads an opaque JSON object from a quoted JSON string — the ADR's one text-encoded surface\n* exception (e.g. an index `filter` / `weights` argument). The string is decoded by the parser,\n* then JSON-parsed; a non-object (array/scalar) or invalid JSON is a diagnostic.\n*/\nfunction json() {\n\treturn {\n\t\tkind: \"json\",\n\t\tlabel: \"JSON object\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (!(arg instanceof StringLiteralExprAst)) return notOk([leafDiagnostic(ctx, arg, \"Expected a JSON object string\")]);\n\t\t\tconst raw = arg.value();\n\t\t\tif (raw !== void 0) try {\n\t\t\t\tconst parsed = JSON.parse(raw);\n\t\t\t\tif (typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed)) return ok(blindCast(parsed));\n\t\t\t} catch {}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a valid JSON object\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/list.ts\nfunction list(of, opts) {\n\treturn {\n\t\tkind: \"list\",\n\t\tlabel: `${of.label}[]`,\n\t\tparse: (arg, ctx) => {\n\t\t\tif (!(arg instanceof ArrayLiteralAst)) return notOk([leafDiagnostic(ctx, arg, `Expected a list of ${of.label}`)]);\n\t\t\tconst diagnostics = [];\n\t\t\tconst parsed = [];\n\t\t\tlet count = 0;\n\t\t\tfor (const element of arg.elements()) {\n\t\t\t\tcount += 1;\n\t\t\t\tconst result = of.parse(element, ctx);\n\t\t\t\tif (result.ok) parsed.push({\n\t\t\t\t\tnode: element,\n\t\t\t\t\tvalue: result.value\n\t\t\t\t});\n\t\t\t\telse diagnostics.push(...result.failure);\n\t\t\t}\n\t\t\tif (opts?.nonEmpty === true && count === 0) diagnostics.push(leafDiagnostic(ctx, arg, \"Expected a non-empty list\"));\n\t\t\tif (opts?.unique === true) {\n\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const { node, value } of parsed) if (seen.has(value)) diagnostics.push(leafDiagnostic(ctx, node, \"Duplicate list entry\"));\n\t\t\t\telse seen.add(value);\n\t\t\t}\n\t\t\tif (diagnostics.length > 0) return notOk(diagnostics);\n\t\t\treturn ok(parsed.map((entry) => entry.value));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/num.ts\nfunction num(value) {\n\treturn {\n\t\tkind: \"num\",\n\t\tlabel: value === void 0 ? \"number\" : String(value),\n\t\tparse: (arg, ctx) => {\n\t\t\tif (arg instanceof NumberLiteralExprAst) {\n\t\t\t\tconst parsed = arg.value();\n\t\t\t\tif (parsed !== void 0) {\n\t\t\t\t\tif (value === void 0) return ok(parsed);\n\t\t\t\t\tif (parsed === value) return ok(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, value === void 0 ? \"Expected a number literal\" : `Expected ${value}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/one-of.ts\nfunction oneOf(...alts) {\n\tconst label = alts.map((alt) => alt.label).join(\" | \");\n\treturn {\n\t\tkind: \"oneOf\",\n\t\tlabel,\n\t\tparse: (arg, ctx) => {\n\t\t\tfor (const alt of alts) {\n\t\t\t\tconst result = alt.parse(arg, ctx);\n\t\t\t\tif (result.ok) return ok(blindCast(result.value));\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected one of: ${label}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/record.ts\nfunction record(of) {\n\treturn {\n\t\tkind: \"record\",\n\t\tlabel: `{ [key]: ${of.label} }`,\n\t\tparse: (arg, ctx) => {\n\t\t\tif (!(arg instanceof ObjectLiteralExprAst)) return notOk([leafDiagnostic(ctx, arg, \"Expected an object literal\")]);\n\t\t\tconst diagnostics = [];\n\t\t\tconst entries = [];\n\t\t\tconst keys = /* @__PURE__ */ new Set();\n\t\t\tfor (const field of arg.fields()) {\n\t\t\t\tconst key = field.keyName();\n\t\t\t\tif (key === void 0) {\n\t\t\t\t\tdiagnostics.push(leafDiagnostic(ctx, field, \"Expected a key\"));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst value = field.value();\n\t\t\t\tif (value === void 0) {\n\t\t\t\t\tdiagnostics.push(leafDiagnostic(ctx, field, `Expected a value for key \"${key}\"`));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst parsed = of.parse(value, ctx);\n\t\t\t\tif (!parsed.ok) {\n\t\t\t\t\tdiagnostics.push(...parsed.failure);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (keys.has(key)) {\n\t\t\t\t\tdiagnostics.push(leafDiagnostic(ctx, field, `Duplicate key \"${key}\"`));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tkeys.add(key);\n\t\t\t\tentries.push([key, parsed.value]);\n\t\t\t}\n\t\t\tif (diagnostics.length > 0) return notOk(diagnostics);\n\t\t\treturn ok(Object.fromEntries(entries));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/str.ts\nfunction str(value) {\n\treturn {\n\t\tkind: \"str\",\n\t\tlabel: value === void 0 ? \"string\" : JSON.stringify(value),\n\t\tparse: (arg, ctx) => {\n\t\t\tif (arg instanceof StringLiteralExprAst) {\n\t\t\t\tconst parsed = arg.value();\n\t\t\t\tif (parsed !== void 0) {\n\t\t\t\t\tif (value === void 0) return ok(parsed);\n\t\t\t\t\tif (parsed === value) return ok(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, value === void 0 ? \"Expected a string literal\" : `Expected ${JSON.stringify(value)}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/field-attribute.ts\nfunction fieldAttribute(name, config) {\n\treturn {\n\t\tlevel: \"field\",\n\t\tname,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: config.named ?? {},\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/model-attribute.ts\nfunction modelAttribute(name, config) {\n\treturn {\n\t\tlevel: \"model\",\n\t\tname,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: config.named ?? {},\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/optional.ts\nfunction optional(type, ...rest) {\n\tif (rest.length === 0) return {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: false\n\t};\n\treturn {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: true,\n\t\tdefaultValue: rest[0]\n\t};\n}\n//#endregion\n//#region src/extension-block.ts\nfunction findBlockDescriptor(descriptors, keyword) {\n\tif (descriptors === void 0) return void 0;\n\tfor (const value of Object.values(descriptors)) {\n\t\tif (value === void 0) continue;\n\t\tif (isAuthoringPslBlockDescriptor(value)) {\n\t\t\tif (value.keyword === keyword) return value;\n\t\t\tcontinue;\n\t\t}\n\t\tconst nested = findBlockDescriptor(value, keyword);\n\t\tif (nested !== void 0) return nested;\n\t}\n}\nfunction validateExtensionBlockFromSymbol(input) {\n\tconst refCtx = buildRefResolutionContext(input.symbolTable, input.block);\n\treturn validateExtensionBlock(input.block.block, input.descriptor, input.sourceId, input.codecLookup, refCtx);\n}\nconst ZERO_SPAN = {\n\tstart: {\n\t\toffset: 0,\n\t\tline: 1,\n\t\tcolumn: 1\n\t},\n\tend: {\n\t\toffset: 0,\n\t\tline: 1,\n\t\tcolumn: 1\n\t}\n};\nfunction buildRefResolutionContext(symbolTable, block) {\n\tconst unspecifiedNamespace = makeNamespace(UNSPECIFIED_PSL_NAMESPACE_ID, Object.values(symbolTable.topLevel.models));\n\tconst allNamespaces = [unspecifiedNamespace, ...Object.values(symbolTable.topLevel.namespaces).map((namespace) => makeNamespace(namespace.name, Object.values(namespace.models)))];\n\tconst ownerNamespaceName = findOwnerNamespaceName(symbolTable, block);\n\treturn {\n\t\townerNamespace: allNamespaces.find((namespace) => namespace.name === ownerNamespaceName) ?? unspecifiedNamespace,\n\t\tallNamespaces\n\t};\n}\nfunction makeNamespace(name, models) {\n\treturn makePslNamespace({\n\t\tkind: \"namespace\",\n\t\tname,\n\t\tentries: makePslNamespaceEntries(models.map((model) => ({\n\t\t\tkind: \"model\",\n\t\t\tname: model.name,\n\t\t\tfields: [],\n\t\t\tattributes: [],\n\t\t\tspan: ZERO_SPAN\n\t\t})), [], []),\n\t\tspan: ZERO_SPAN\n\t});\n}\nfunction findOwnerNamespaceName(symbolTable, block) {\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) if (Object.values(namespace.blocks).some((candidate) => candidate === block)) return namespace.name;\n\treturn UNSPECIFIED_PSL_NAMESPACE_ID;\n}\n//#endregion\n//#region src/block-reconstruction.ts\n/**\n* Descriptor-free and unknown parameters become `value` stubs so validation can\n* report them via key-set comparison. Duplicate member names are first-wins.\n*/\nfunction reconstructExtensionBlock(node, descriptor, sourceFile, diagnostics) {\n\tconst keyword = node.keyword()?.text ?? \"\";\n\tconst blockName = node.name()?.name() ?? \"\";\n\tconst blockAttributes = [];\n\tfor (const attribute of node.attributes()) {\n\t\tconst name = attribute.name()?.path().join(\".\") ?? \"\";\n\t\tconst args = Array.from(attribute.argList()?.args() ?? [], (arg) => {\n\t\t\tconst value = arg.value();\n\t\t\treturn {\n\t\t\t\tkind: \"positional\",\n\t\t\t\tvalue: value === void 0 ? \"\" : printSyntax(value.syntax).trim(),\n\t\t\t\tspan: nodePslSpan(arg.syntax, sourceFile)\n\t\t\t};\n\t\t});\n\t\tblockAttributes.push({\n\t\t\tname,\n\t\t\targs,\n\t\t\tspan: nodePslSpan(attribute.syntax, sourceFile)\n\t\t});\n\t}\n\tconst parameters = {};\n\tfor (const entry of node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst span = nodePslSpan(entry.syntax, sourceFile);\n\t\tif (Object.hasOwn(parameters, key)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_DUPLICATE_PARAMETER\",\n\t\t\t\tmessage: `Duplicate parameter \"${key}\" in \"${keyword}\" block \"${blockName}\"; first occurrence wins`,\n\t\t\t\trange: {\n\t\t\t\t\tstart: sourceFile.positionAt(entry.syntax.offset),\n\t\t\t\t\tend: sourceFile.positionAt(entry.syntax.offset + entry.syntax.green.textLength)\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tparameters[key] = reconstructParamValue(entry, descriptor?.parameters[key], span, sourceFile, diagnostics);\n\t}\n\treturn {\n\t\tkind: descriptor?.discriminator ?? keyword,\n\t\tkeyword,\n\t\tname: blockName,\n\t\tparameters,\n\t\tblockAttributes,\n\t\tspan: nodePslSpan(node.syntax, sourceFile)\n\t};\n}\nfunction reconstructParamValue(entry, param, span, sourceFile, diagnostics) {\n\tconst value = entry.value();\n\tif (value === void 0) return {\n\t\tkind: \"bare\",\n\t\tspan\n\t};\n\treturn reconstructFromExpression(value, param, span, sourceFile, diagnostics);\n}\nfunction reconstructFromExpression(value, param, span, sourceFile, diagnostics) {\n\tconst raw = printSyntax(value.syntax).trim();\n\tif (param?.kind === \"list\") {\n\t\tconst array = ArrayLiteralAst.cast(value.syntax);\n\t\tif (!array) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `List parameter expects an array literal, got ${raw}`,\n\t\t\t\trange: {\n\t\t\t\t\tstart: sourceFile.positionAt(value.syntax.offset),\n\t\t\t\t\tend: sourceFile.positionAt(value.syntax.offset + value.syntax.green.textLength)\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tkind: \"value\",\n\t\t\t\traw,\n\t\t\t\tspan\n\t\t\t};\n\t\t}\n\t\tconst items = [];\n\t\tfor (const element of array.elements()) items.push(reconstructFromExpression(element, param.of, nodePslSpan(element.syntax, sourceFile), sourceFile, diagnostics));\n\t\treturn {\n\t\t\tkind: \"list\",\n\t\t\titems,\n\t\t\tspan\n\t\t};\n\t}\n\tswitch (param?.kind) {\n\t\tcase \"ref\": return {\n\t\t\tkind: \"ref\",\n\t\t\tidentifier: raw,\n\t\t\tspan\n\t\t};\n\t\tcase \"option\": return {\n\t\t\tkind: \"option\",\n\t\t\ttoken: raw,\n\t\t\tspan\n\t\t};\n\t\tdefault: return {\n\t\t\tkind: \"value\",\n\t\t\traw,\n\t\t\tspan\n\t\t};\n\t}\n}\n//#endregion\n//#region src/symbol-table.ts\n/**\n* Owns duplicate-declaration detection for all PSL scopes; downstream consumers\n* should consume first-wins symbols rather than re-emitting duplicate diagnostics.\n*/\nfunction buildSymbolTable(options) {\n\tconst { document, sourceFile, pslBlockDescriptors } = options;\n\tconst diagnostics = [];\n\tconst namespaces = {};\n\tconst namedTypes = {};\n\tconst blocks = {};\n\tconst models = {};\n\tconst compositeTypes = {};\n\tconst topLevelNames = /* @__PURE__ */ new Set();\n\tconst claim = (taken, name) => {\n\t\tconst text = name?.name();\n\t\tif (text === void 0) return void 0;\n\t\tif (taken.has(text)) {\n\t\t\tconst range = nameRange(name, sourceFile);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${text}\"`,\n\t\t\t\trange\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\ttaken.add(text);\n\t\treturn text;\n\t};\n\tfor (const declaration of document.declarations()) if (declaration instanceof ModelDeclarationAst) {\n\t\tconst name = claim(topLevelNames, declaration.name());\n\t\tif (name !== void 0) models[name] = buildModel(name, declaration, sourceFile, diagnostics);\n\t} else if (declaration instanceof CompositeTypeDeclarationAst) {\n\t\tconst name = claim(topLevelNames, declaration.name());\n\t\tif (name !== void 0) compositeTypes[name] = buildCompositeType(name, declaration, sourceFile, diagnostics);\n\t} else if (declaration instanceof GenericBlockDeclarationAst) {\n\t\tconst name = claim(topLevelNames, declaration.name());\n\t\tif (name !== void 0) blocks[name] = buildBlock(name, declaration, sourceFile, pslBlockDescriptors, diagnostics);\n\t} else if (declaration instanceof NamespaceDeclarationAst) {\n\t\tconst name = claim(topLevelNames, declaration.name());\n\t\tif (name !== void 0) namespaces[name] = buildNamespace(name, declaration, diagnostics, sourceFile, pslBlockDescriptors);\n\t} else if (declaration instanceof TypesBlockAst) for (const binding of declaration.declarations()) {\n\t\tconst name = claim(topLevelNames, binding.name());\n\t\tif (name === void 0) continue;\n\t\tconst resolved = resolveNamedTypeBinding(binding, sourceFile);\n\t\tnamedTypes[name] = {\n\t\t\tkind: \"namedType\",\n\t\t\tname,\n\t\t\tnode: binding,\n\t\t\tspan: nodePslSpan(binding.syntax, sourceFile),\n\t\t\t...resolved\n\t\t};\n\t}\n\treturn {\n\t\ttable: { topLevel: {\n\t\t\tnamespaces,\n\t\t\tnamedTypes,\n\t\t\tblocks,\n\t\t\tmodels,\n\t\t\tcompositeTypes\n\t\t} },\n\t\tdiagnostics\n\t};\n}\nfunction buildModel(name, node, sourceFile, diagnostics) {\n\treturn {\n\t\tkind: \"model\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sourceFile),\n\t\tfields: buildFields(name, node.fields(), sourceFile, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sourceFile)\n\t};\n}\nfunction buildCompositeType(name, node, sourceFile, diagnostics) {\n\treturn {\n\t\tkind: \"compositeType\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sourceFile),\n\t\tfields: buildFields(name, node.fields(), sourceFile, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sourceFile)\n\t};\n}\nfunction buildBlock(name, node, sourceFile, pslBlockDescriptors, diagnostics) {\n\tconst keyword = node.keyword()?.text ?? \"\";\n\tconst descriptor = findBlockDescriptor(pslBlockDescriptors, keyword);\n\treturn {\n\t\tkind: \"block\",\n\t\tname,\n\t\tkeyword,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sourceFile),\n\t\tblock: reconstructExtensionBlock(node, descriptor, sourceFile, diagnostics)\n\t};\n}\nfunction buildNamespace(name, node, diagnostics, sourceFile, pslBlockDescriptors) {\n\tconst models = {};\n\tconst compositeTypes = {};\n\tconst blocks = {};\n\tconst taken = /* @__PURE__ */ new Set();\n\tfor (const member of node.declarations()) {\n\t\tconst memberName = member.name()?.name();\n\t\tif (memberName === void 0) continue;\n\t\tif (taken.has(memberName)) {\n\t\t\tconst range = nameRange(member.name(), sourceFile);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${memberName}\"`,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\ttaken.add(memberName);\n\t\tif (member instanceof ModelDeclarationAst) models[memberName] = buildModel(memberName, member, sourceFile, diagnostics);\n\t\telse if (member instanceof CompositeTypeDeclarationAst) compositeTypes[memberName] = buildCompositeType(memberName, member, sourceFile, diagnostics);\n\t\telse if (member instanceof GenericBlockDeclarationAst) blocks[memberName] = buildBlock(memberName, member, sourceFile, pslBlockDescriptors, diagnostics);\n\t}\n\treturn {\n\t\tkind: \"namespace\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sourceFile),\n\t\tmodels,\n\t\tcompositeTypes,\n\t\tblocks\n\t};\n}\nfunction buildFields(ownerName, fields, sourceFile, diagnostics) {\n\tconst result = {};\n\tfor (const field of fields) {\n\t\tconst nameNode = field.name();\n\t\tconst name = nameNode?.name();\n\t\tif (name === void 0) continue;\n\t\tif (Object.hasOwn(result, name)) {\n\t\t\tconst range = nameRange(nameNode, sourceFile);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${name}\"`,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tresult[name] = buildField(ownerName, name, field, sourceFile, diagnostics);\n\t}\n\treturn result;\n}\nfunction buildField(ownerName, name, node, sourceFile, diagnostics) {\n\tconst attributes = readResolvedAttributes(node.attributes(), sourceFile);\n\tconst span = nodePslSpan(node.syntax, sourceFile);\n\tconst annotation = node.typeAnnotation();\n\tconst typeName = annotation?.name();\n\tif (typeName?.isOverQualified()) {\n\t\tconst path = typeName.path();\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_INVALID_QUALIFIED_TYPE\",\n\t\t\tmessage: `Field \"${ownerName}.${name}\" has an invalid qualified type \"${path.join(\".\")}\"; use at most one namespace qualifier (e.g. \"ns.TypeName\")`,\n\t\t\trange: nodeRange(typeName.syntax, sourceFile)\n\t\t});\n\t\treturn {\n\t\t\tkind: \"field\",\n\t\t\tname,\n\t\t\tnode,\n\t\t\tspan,\n\t\t\ttypeName: path[path.length - 1] ?? \"\",\n\t\t\toptional: false,\n\t\t\tlist: false,\n\t\t\tmalformedType: true,\n\t\t\tattributes\n\t\t};\n\t}\n\tconst typeConstructor = annotation?.isConstructor() ? readResolvedConstructorCall(annotation, sourceFile) : void 0;\n\tconst typeNamespaceId = typeName?.namespace()?.name();\n\tconst typeContractSpaceId = typeName?.space()?.name();\n\treturn {\n\t\tkind: \"field\",\n\t\tname,\n\t\tnode,\n\t\tspan,\n\t\ttypeName: typeName?.identifier()?.name() ?? \"\",\n\t\t...typeNamespaceId !== void 0 ? { typeNamespaceId } : {},\n\t\t...typeContractSpaceId !== void 0 ? { typeContractSpaceId } : {},\n\t\toptional: annotation?.isOptional() ?? false,\n\t\tlist: annotation?.isList() ?? false,\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes\n\t};\n}\nfunction resolveNamedTypeBinding(node, sourceFile) {\n\tconst annotation = node.typeAnnotation();\n\tconst isConstructor = annotation?.isConstructor() ?? false;\n\tconst baseType = annotation?.name()?.identifier()?.name();\n\tconst typeConstructor = readResolvedConstructorCall(annotation, sourceFile);\n\treturn {\n\t\tisConstructor,\n\t\t...!isConstructor && baseType !== void 0 ? { baseType } : {},\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes: readResolvedAttributes(node.attributes(), sourceFile)\n\t};\n}\nfunction nameRange(name, sourceFile) {\n\tif (name === void 0) return void 0;\n\tfor (const token of name.syntax.tokens()) if (token.kind === \"Ident\") return {\n\t\tstart: sourceFile.positionAt(token.offset),\n\t\tend: sourceFile.positionAt(token.offset + token.text.length)\n\t};\n}\nfunction nodeRange(node, sourceFile) {\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: sourceFile.positionAt(start),\n\t\tend: sourceFile.positionAt(end)\n\t};\n}\n//#endregion\nexport { bool, buildSymbolTable, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, json, keywordPslSpan, leafDiagnostic, list, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, oneOf, optional, parseQuotedStringLiteral, rangeToPslSpan, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, str, validateExtensionBlockF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,YAAY;CAClD,MAAM,aAAa,KAAK,eAAe;CACvC,MAAM,gBAAgB,YAAY,cAAc,KAAK;CACrD,MAAM,WAAW,YAAY,KAAK,CAAC,EAAE,WAAW,CAAC,EAAE,KAAK;CACxD,MAAM,kBAAkB,4BAA4B,YAAY,UAAU;CAC1E,OAAO;EACN;EACA,GAAG,CAAC,iBAAiB,aAAa,KAAK,IAAI,EAAE,SAAS,IAAI,CAAC;EAC3D,GAAG,oBAAoB,KAAK,IAAI,EAAE,gBAAgB,IAAI,CAAC;EACvD,YAAY,uBAAuB,KAAK,WAAW,GAAG,UAAU;CACjE;AACD;AACA,SAAS,UAAU,MAAM,YAAY;CACpC,IAAI,SAAS,KAAK,GAAG,OAAO,KAAK;CACjC,KAAK,MAAM,SAAS,KAAK,OAAO,OAAO,GAAG,IAAI,MAAM,SAAS,SAAS,OAAO;EAC5E,OAAO,WAAW,WAAW,MAAM,MAAM;EACzC,KAAK,WAAW,WAAW,MAAM,SAAS,MAAM,KAAK,MAAM;CAC5D;AACD;AACA,SAAS,UAAU,MAAM,YAAY;CACpC,MAAM,QAAQ,KAAK;CACnB,MAAM,MAAM,QAAQ,KAAK,MAAM;CAC/B,OAAO;EACN,OAAO,WAAW,WAAW,KAAK;EAClC,KAAK,WAAW,WAAW,GAAG;CAC/B;AACD"}
|
|
1
|
+
{"version":3,"file":"psl-parser.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.mjs"],"sourcesContent":["import { _ as FunctionCallAst, b as ObjectLiteralExprAst, c as NamespaceDeclarationAst, g as BooleanLiteralExprAst, i as GenericBlockDeclarationAst, k as printSyntax, l as TypesBlockAst, m as ArrayLiteralAst, o as ModelDeclarationAst, t as CompositeTypeDeclarationAst, v as NumberLiteralExprAst, w as IdentifierAst, x as StringLiteralExprAst } from \"./declarations-DR6To8_k.mjs\";\nimport { UNSPECIFIED_PSL_NAMESPACE_ID, flatPslModels, makePslNamespace, makePslNamespaceEntries, namespacePslExtensionBlocks, validateExtensionBlock } from \"@internal/framework-components/psl-ast\";\nimport { isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor } from \"@internal/framework-components/authoring\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/attribute-helpers.ts\nfunction getPositionalArgument(attribute, index = 0) {\n\treturn attribute.args.filter((arg) => arg.kind === \"positional\")[index]?.value;\n}\nfunction parseQuotedStringLiteral(value) {\n\tconst match = value.trim().match(/^(['\"])(.*)\\1$/);\n\tif (!match) return void 0;\n\treturn match[2] ?? \"\";\n}\n//#endregion\n//#region src/attribute-spec/assemble.ts\nfunction* modelAttributeDescriptors(namespace) {\n\tfor (const value of Object.values(namespace)) {\n\t\tif (isAuthoringModelAttributeDescriptor(value)) {\n\t\t\tyield value;\n\t\t\tcontinue;\n\t\t}\n\t\tyield* modelAttributeDescriptors(value);\n\t}\n}\nfunction assembleAttributeSpecs(contributions) {\n\tconst entries = Object.entries(contributions.attributeSpecs.model);\n\tconst claimed = new Set(entries.map(([attribute]) => attribute));\n\tfor (const descriptor of modelAttributeDescriptors(contributions.modelAttributes)) {\n\t\tif (claimed.has(descriptor.attribute)) throw new InternalError(`Duplicate attribute spec registration for \"${descriptor.attribute}\". Each model attribute name may be registered once across family built-ins and model-attribute descriptors.`);\n\t\tclaimed.add(descriptor.attribute);\n\t\tentries.push([descriptor.attribute, descriptor.spec]);\n\t}\n\treturn Object.freeze(blindCast({\n\t\tmodel: Object.freeze(Object.fromEntries(entries)),\n\t\tfield: Object.freeze({ ...contributions.attributeSpecs.field })\n\t}));\n}\n//#endregion\n//#region src/resolve.ts\nfunction readResolvedAttribute(attribute, sourceFile) {\n\treturn {\n\t\tname: attributeName(attribute.name()),\n\t\targs: readResolvedArgList(attribute.argList(), sourceFile),\n\t\tspan: nodePslSpan(attribute.syntax, sourceFile)\n\t};\n}\nfunction readResolvedAttributes(attributes, sourceFile) {\n\treturn Array.from(attributes, (attribute) => readResolvedAttribute(attribute, sourceFile));\n}\nfunction readResolvedConstructorCall(annotation, sourceFile) {\n\tconst argList = annotation?.argList();\n\tif (annotation === void 0 || argList === void 0) return void 0;\n\treturn {\n\t\tpath: annotation.name()?.path() ?? [],\n\t\targs: readResolvedArgList(argList, sourceFile),\n\t\tspan: nodePslSpan(annotation.syntax, sourceFile)\n\t};\n}\nfunction readResolvedArgList(argList, sourceFile) {\n\tif (argList === void 0) return [];\n\tconst args = [];\n\tfor (const arg of argList.args()) {\n\t\tconst name = arg.name()?.name();\n\t\tconst expression = arg.value();\n\t\targs.push({\n\t\t\tkind: name !== void 0 ? \"named\" : \"positional\",\n\t\t\t...name !== void 0 ? { name } : {},\n\t\t\tvalue: renderExpression(expression),\n\t\t\t...expression !== void 0 ? { expression } : {},\n\t\t\tspan: nodePslSpan(arg.syntax, sourceFile)\n\t\t});\n\t}\n\treturn args;\n}\nfunction attributeName(name) {\n\treturn name?.path().join(\".\") ?? \"\";\n}\nfunction renderExpression(expression) {\n\tif (expression === void 0) return \"\";\n\treturn printSyntax(expression.syntax).trim();\n}\nfunction nodePslSpan(node, sourceFile) {\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: offsetToPslPosition(start, sourceFile),\n\t\tend: offsetToPslPosition(end, sourceFile)\n\t};\n}\n/** Unsupported-top-level-block diagnostics are anchored to the keyword token. */\nfunction keywordPslSpan(node, keyword, sourceFile) {\n\tconst start = node.offset;\n\tconst end = start + keyword.length;\n\treturn {\n\t\tstart: offsetToPslPosition(start, sourceFile),\n\t\tend: offsetToPslPosition(end, sourceFile)\n\t};\n}\nfunction rangeToPslSpan(range, sourceFile) {\n\treturn {\n\t\tstart: offsetToPslPosition(sourceFile.offsetAt(range.start), sourceFile),\n\t\tend: offsetToPslPosition(sourceFile.offsetAt(range.end), sourceFile)\n\t};\n}\nfunction offsetToPslPosition(offset, sourceFile) {\n\tconst position = sourceFile.positionAt(offset);\n\treturn {\n\t\toffset,\n\t\tline: position.line + 1,\n\t\tcolumn: position.character + 1\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/diagnostic.ts\nconst ATTRIBUTE_DIAGNOSTIC_CODE = \"PSL_INVALID_ATTRIBUTE_SYNTAX\";\nfunction leafDiagnostic(ctx, node, message, code = ATTRIBUTE_DIAGNOSTIC_CODE) {\n\treturn {\n\t\tcode,\n\t\tmessage,\n\t\tsourceId: ctx.sourceId,\n\t\tspan: nodePslSpan(node.syntax, ctx.sourceFile)\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/bool.ts\nfunction bool() {\n\treturn {\n\t\tkind: \"bool\",\n\t\tlabel: \"boolean\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (arg instanceof BooleanLiteralExprAst) {\n\t\t\t\tconst value = arg.value();\n\t\t\t\tif (value !== void 0) return ok(value);\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a boolean literal\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/entity-ref.ts\nfunction entityRef() {\n\treturn {\n\t\tkind: \"entityRef\",\n\t\tlabel: \"model name\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (!(arg instanceof IdentifierAst)) return notOk([leafDiagnostic(ctx, arg, \"Expected a model name\")]);\n\t\t\tconst name = arg.name();\n\t\t\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a model name\")]);\n\t\t\treturn ok(name);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/field-ref.ts\nfunction fieldRef(scope) {\n\treturn {\n\t\tkind: \"fieldRef\",\n\t\tlabel: \"field name\",\n\t\tscope,\n\t\tparse: (arg, ctx) => {\n\t\t\tif (!(arg instanceof IdentifierAst)) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\t\t\tconst name = arg.name();\n\t\t\tif (name === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a field name\")]);\n\t\t\tconst model = scope === \"self\" ? ctx.selfModel : ctx.resolveReferencedModel();\n\t\t\tif (model !== void 0 && !Object.hasOwn(model.fields, name)) return notOk([leafDiagnostic(ctx, arg, `Field \"${name}\" does not exist on model \"${model.name}\"`)]);\n\t\t\treturn ok(name);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/interpret.ts\nfunction interpretArgs(args, spec, ctx, span) {\n\tconst diagnostics = [];\n\tconst output = {};\n\tconst seen = /* @__PURE__ */ new Set();\n\tlet positionalSlot = 0;\n\tlet reportedExcess = false;\n\tfor (const arg of args) {\n\t\tconst name = arg.name()?.name();\n\t\tlet key;\n\t\tlet param;\n\t\tif (name === void 0) {\n\t\t\tconst posParam = spec.positional[positionalSlot];\n\t\t\tif (posParam === void 0) {\n\t\t\t\tif (!reportedExcess) {\n\t\t\t\t\tdiagnostics.push(diagnostic(`Attribute \"${spec.name}\" received too many positional arguments`, ctx, span));\n\t\t\t\t\treportedExcess = true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpositionalSlot += 1;\n\t\t\tkey = posParam.key;\n\t\t\tparam = posParam.type;\n\t\t} else {\n\t\t\tconst namedParam = Object.hasOwn(spec.named, name) ? spec.named[name] : void 0;\n\t\t\tif (namedParam === void 0) {\n\t\t\t\tdiagnostics.push(diagnostic(`Attribute \"${spec.name}\" received unknown argument \"${name}\"`, ctx, nodePslSpan(arg.syntax, ctx.sourceFile)));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tkey = name;\n\t\t\tparam = namedParam;\n\t\t}\n\t\tif (seen.has(key)) {\n\t\t\tdiagnostics.push(diagnostic(`Attribute \"${spec.name}\" received duplicate argument \"${key}\"`, ctx, nodePslSpan(arg.syntax, ctx.sourceFile)));\n\t\t\tcontinue;\n\t\t}\n\t\tseen.add(key);\n\t\tconst result = parseArgValue(arg, param, ctx, diagnostics);\n\t\tif (result.ok) output[key] = result.value;\n\t}\n\tconst finalized = /* @__PURE__ */ new Set();\n\tconst finalizeAbsentKey = (key, positionalParam, namedParam) => {\n\t\tif (finalized.has(key) || seen.has(key)) return;\n\t\tfinalized.add(key);\n\t\tconst effective = namedParam ?? positionalParam;\n\t\tif (effective === void 0) return;\n\t\tif (isOptionalArgType(effective)) {\n\t\t\tif (effective.hasDefault) output[key] = effective.defaultValue;\n\t\t\treturn;\n\t\t}\n\t\tdiagnostics.push(diagnostic(`Attribute \"${spec.name}\" is missing required argument \"${key}\"`, ctx, span));\n\t};\n\tfor (const param of spec.positional) {\n\t\tconst namedParam = Object.hasOwn(spec.named, param.key) ? spec.named[param.key] : void 0;\n\t\tfinalizeAbsentKey(param.key, param.type, namedParam);\n\t}\n\tfor (const key of Object.keys(spec.named)) finalizeAbsentKey(key, void 0, spec.named[key]);\n\tif (diagnostics.length > 0) return notOk(diagnostics);\n\treturn ok(output);\n}\nfunction interpretAttribute(attrNode, spec, ctx) {\n\tconst attributeSpan = nodePslSpan(attrNode.syntax, ctx.sourceFile);\n\tconst bound = interpretArgs(attrNode.argList()?.args() ?? [], spec, ctx, attributeSpan);\n\tif (!bound.ok) return notOk(bound.failure);\n\tconst value = blindCast(bound.value);\n\tif (spec.refine !== void 0) {\n\t\tconst refineDiagnostics = spec.refine(value, ctx, attrNode);\n\t\tif (refineDiagnostics.length > 0) return notOk(refineDiagnostics);\n\t}\n\treturn ok(value);\n}\nfunction parseArgValue(arg, argType, ctx, diagnostics) {\n\tconst value = arg.value();\n\tif (value === void 0) {\n\t\tconst missing = diagnostic(\"Attribute argument is missing a value\", ctx, nodePslSpan(arg.syntax, ctx.sourceFile));\n\t\tdiagnostics.push(missing);\n\t\treturn notOk([missing]);\n\t}\n\tconst result = argType.parse(value, ctx);\n\tif (!result.ok) for (const failure of result.failure) diagnostics.push(failure);\n\treturn result;\n}\nfunction isOptionalArgType(param) {\n\treturn \"optional\" in param && param.optional === true;\n}\nfunction diagnostic(message, ctx, span) {\n\treturn {\n\t\tcode: ATTRIBUTE_DIAGNOSTIC_CODE,\n\t\tmessage,\n\t\tsourceId: ctx.sourceId,\n\t\tspan\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/func-call.ts\nfunction funcCall(name, sig) {\n\treturn {\n\t\tkind: \"funcCall\",\n\t\tlabel: \"function call\",\n\t\tparse: (arg, ctx) => {\n\t\t\tconst guard = matchCallee(arg, name, ctx);\n\t\t\tif (!guard.ok) return guard;\n\t\t\tconst span = nodePslSpan(guard.value.syntax, ctx.sourceFile);\n\t\t\tconst bound = interpretArgs(guard.value.args(), {\n\t\t\t\tname,\n\t\t\t\tpositional: sig.positional ?? [],\n\t\t\t\tnamed: sig.named ?? {}\n\t\t\t}, ctx, span);\n\t\t\tif (!bound.ok) return notOk(bound.failure);\n\t\t\treturn ok({\n\t\t\t\tfn: name,\n\t\t\t\tspan,\n\t\t\t\targs: bound.value\n\t\t\t});\n\t\t}\n\t};\n}\nfunction matchCallee(arg, name, ctx) {\n\tif (!(arg instanceof FunctionCallAst)) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst qname = arg.name();\n\tif (qname === void 0 || qname.dot() !== void 0 || qname.colon() !== void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tconst calleeName = qname.identifier()?.token()?.text;\n\tif (calleeName === void 0) return notOk([leafDiagnostic(ctx, arg, \"Expected a function call\")]);\n\tif (calleeName !== name) return notOk([leafDiagnostic(ctx, arg, `Expected ${name}()`)]);\n\treturn ok(arg);\n}\n//#endregion\n//#region src/attribute-spec/combinators/identifier.ts\nfunction identifier(name) {\n\treturn {\n\t\tkind: \"identifier\",\n\t\tlabel: name,\n\t\tparse: (arg, ctx) => {\n\t\t\tif (arg instanceof IdentifierAst && arg.name() === name) return ok(name);\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected ${name}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/int.ts\nfunction int(opts) {\n\tconst min = opts?.min;\n\tconst max = opts?.max;\n\treturn {\n\t\tkind: \"int\",\n\t\tlabel: \"integer\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (arg instanceof NumberLiteralExprAst) {\n\t\t\t\tconst value = arg.value();\n\t\t\t\tif (value !== void 0 && Number.isInteger(value)) {\n\t\t\t\t\tif ((min === void 0 || value >= min) && (max === void 0 || value <= max)) return ok(value);\n\t\t\t\t\treturn notOk([leafDiagnostic(ctx, arg, rangeMessage(min, max))]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected an integer literal\")]);\n\t\t}\n\t};\n}\nfunction rangeMessage(min, max) {\n\tif (min !== void 0 && max !== void 0) return `Expected an integer between ${min} and ${max}`;\n\tif (min !== void 0) return `Expected an integer greater than or equal to ${min}`;\n\treturn `Expected an integer less than or equal to ${max}`;\n}\n//#endregion\n//#region src/attribute-spec/combinators/json.ts\n/**\n* Reads an opaque JSON object from a quoted JSON string — the ADR's one text-encoded surface\n* exception (e.g. an index `filter` / `weights` argument). The string is decoded by the parser,\n* then JSON-parsed; a non-object (array/scalar) or invalid JSON is a diagnostic.\n*/\nfunction json() {\n\treturn {\n\t\tkind: \"json\",\n\t\tlabel: \"JSON object\",\n\t\tparse: (arg, ctx) => {\n\t\t\tif (!(arg instanceof StringLiteralExprAst)) return notOk([leafDiagnostic(ctx, arg, \"Expected a JSON object string\")]);\n\t\t\tconst raw = arg.value();\n\t\t\tif (raw !== void 0) try {\n\t\t\t\tconst parsed = JSON.parse(raw);\n\t\t\t\tif (typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed)) return ok(blindCast(parsed));\n\t\t\t} catch {}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, \"Expected a valid JSON object\")]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/list.ts\nfunction list(of, opts) {\n\treturn {\n\t\tkind: \"list\",\n\t\tlabel: `${of.label}[]`,\n\t\tparse: (arg, ctx) => {\n\t\t\tif (!(arg instanceof ArrayLiteralAst)) return notOk([leafDiagnostic(ctx, arg, `Expected a list of ${of.label}`)]);\n\t\t\tconst diagnostics = [];\n\t\t\tconst parsed = [];\n\t\t\tlet count = 0;\n\t\t\tfor (const element of arg.elements()) {\n\t\t\t\tcount += 1;\n\t\t\t\tconst result = of.parse(element, ctx);\n\t\t\t\tif (result.ok) parsed.push({\n\t\t\t\t\tnode: element,\n\t\t\t\t\tvalue: result.value\n\t\t\t\t});\n\t\t\t\telse diagnostics.push(...result.failure);\n\t\t\t}\n\t\t\tif (opts?.nonEmpty === true && count === 0) diagnostics.push(leafDiagnostic(ctx, arg, \"Expected a non-empty list\"));\n\t\t\tif (opts?.unique === true) {\n\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const { node, value } of parsed) if (seen.has(value)) diagnostics.push(leafDiagnostic(ctx, node, \"Duplicate list entry\"));\n\t\t\t\telse seen.add(value);\n\t\t\t}\n\t\t\tif (diagnostics.length > 0) return notOk(diagnostics);\n\t\t\treturn ok(parsed.map((entry) => entry.value));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/num.ts\nfunction num(value) {\n\treturn {\n\t\tkind: \"num\",\n\t\tlabel: value === void 0 ? \"number\" : String(value),\n\t\tparse: (arg, ctx) => {\n\t\t\tif (arg instanceof NumberLiteralExprAst) {\n\t\t\t\tconst parsed = arg.value();\n\t\t\t\tif (parsed !== void 0) {\n\t\t\t\t\tif (value === void 0) return ok(parsed);\n\t\t\t\t\tif (parsed === value) return ok(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, value === void 0 ? \"Expected a number literal\" : `Expected ${value}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/one-of.ts\nfunction oneOf(...alts) {\n\tconst label = alts.map((alt) => alt.label).join(\" | \");\n\treturn {\n\t\tkind: \"oneOf\",\n\t\tlabel,\n\t\tparse: (arg, ctx) => {\n\t\t\tfor (const alt of alts) {\n\t\t\t\tconst result = alt.parse(arg, ctx);\n\t\t\t\tif (result.ok) return ok(blindCast(result.value));\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, `Expected one of: ${label}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/record.ts\nfunction record(of) {\n\treturn {\n\t\tkind: \"record\",\n\t\tlabel: `{ [key]: ${of.label} }`,\n\t\tparse: (arg, ctx) => {\n\t\t\tif (!(arg instanceof ObjectLiteralExprAst)) return notOk([leafDiagnostic(ctx, arg, \"Expected an object literal\")]);\n\t\t\tconst diagnostics = [];\n\t\t\tconst entries = [];\n\t\t\tconst keys = /* @__PURE__ */ new Set();\n\t\t\tfor (const field of arg.fields()) {\n\t\t\t\tconst key = field.keyName();\n\t\t\t\tif (key === void 0) {\n\t\t\t\t\tdiagnostics.push(leafDiagnostic(ctx, field, \"Expected a key\"));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst value = field.value();\n\t\t\t\tif (value === void 0) {\n\t\t\t\t\tdiagnostics.push(leafDiagnostic(ctx, field, `Expected a value for key \"${key}\"`));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst parsed = of.parse(value, ctx);\n\t\t\t\tif (!parsed.ok) {\n\t\t\t\t\tdiagnostics.push(...parsed.failure);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (keys.has(key)) {\n\t\t\t\t\tdiagnostics.push(leafDiagnostic(ctx, field, `Duplicate key \"${key}\"`));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tkeys.add(key);\n\t\t\t\tentries.push([key, parsed.value]);\n\t\t\t}\n\t\t\tif (diagnostics.length > 0) return notOk(diagnostics);\n\t\t\treturn ok(Object.fromEntries(entries));\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/combinators/str.ts\nfunction str(value) {\n\treturn {\n\t\tkind: \"str\",\n\t\tlabel: value === void 0 ? \"string\" : JSON.stringify(value),\n\t\tparse: (arg, ctx) => {\n\t\t\tif (arg instanceof StringLiteralExprAst) {\n\t\t\t\tconst parsed = arg.value();\n\t\t\t\tif (parsed !== void 0) {\n\t\t\t\t\tif (value === void 0) return ok(parsed);\n\t\t\t\t\tif (parsed === value) return ok(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn notOk([leafDiagnostic(ctx, arg, value === void 0 ? \"Expected a string literal\" : `Expected ${JSON.stringify(value)}`)]);\n\t\t}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/field-attribute.ts\nfunction fieldAttribute(name, config) {\n\treturn {\n\t\tlevel: \"field\",\n\t\tname,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: config.named ?? {},\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/model-attribute.ts\nfunction modelAttribute(name, config) {\n\treturn {\n\t\tlevel: \"model\",\n\t\tname,\n\t\tpositional: config.positional ?? [],\n\t\tnamed: config.named ?? {},\n\t\t...config.refine !== void 0 ? { refine: config.refine } : {}\n\t};\n}\n//#endregion\n//#region src/attribute-spec/optional.ts\nfunction optional(type, ...rest) {\n\tif (rest.length === 0) return {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: false\n\t};\n\treturn {\n\t\t...type,\n\t\toptional: true,\n\t\thasDefault: true,\n\t\tdefaultValue: rest[0]\n\t};\n}\n//#endregion\n//#region src/extension-block.ts\nfunction findBlockDescriptor(descriptors, keyword) {\n\tif (descriptors === void 0) return void 0;\n\tfor (const value of Object.values(descriptors)) {\n\t\tif (value === void 0) continue;\n\t\tif (isAuthoringPslBlockDescriptor(value)) {\n\t\t\tif (value.keyword === keyword) return value;\n\t\t\tcontinue;\n\t\t}\n\t\tconst nested = findBlockDescriptor(value, keyword);\n\t\tif (nested !== void 0) return nested;\n\t}\n}\nfunction validateExtensionBlockFromSymbol(input) {\n\tconst refCtx = buildRefResolutionContext(input.symbolTable, input.block);\n\treturn validateExtensionBlock(input.block.block, input.descriptor, input.sourceId, input.codecLookup, refCtx);\n}\nconst ZERO_SPAN = {\n\tstart: {\n\t\toffset: 0,\n\t\tline: 1,\n\t\tcolumn: 1\n\t},\n\tend: {\n\t\toffset: 0,\n\t\tline: 1,\n\t\tcolumn: 1\n\t}\n};\nfunction buildRefResolutionContext(symbolTable, block) {\n\tconst unspecifiedNamespace = makeNamespace(UNSPECIFIED_PSL_NAMESPACE_ID, Object.values(symbolTable.topLevel.models));\n\tconst allNamespaces = [unspecifiedNamespace, ...Object.values(symbolTable.topLevel.namespaces).map((namespace) => makeNamespace(namespace.name, Object.values(namespace.models)))];\n\tconst ownerNamespaceName = findOwnerNamespaceName(symbolTable, block);\n\treturn {\n\t\townerNamespace: allNamespaces.find((namespace) => namespace.name === ownerNamespaceName) ?? unspecifiedNamespace,\n\t\tallNamespaces\n\t};\n}\nfunction makeNamespace(name, models) {\n\treturn makePslNamespace({\n\t\tkind: \"namespace\",\n\t\tname,\n\t\tentries: makePslNamespaceEntries(models.map((model) => ({\n\t\t\tkind: \"model\",\n\t\t\tname: model.name,\n\t\t\tfields: [],\n\t\t\tattributes: [],\n\t\t\tspan: ZERO_SPAN\n\t\t})), [], []),\n\t\tspan: ZERO_SPAN\n\t});\n}\nfunction findOwnerNamespaceName(symbolTable, block) {\n\tfor (const namespace of Object.values(symbolTable.topLevel.namespaces)) if (Object.values(namespace.blocks).some((candidate) => candidate === block)) return namespace.name;\n\treturn UNSPECIFIED_PSL_NAMESPACE_ID;\n}\n//#endregion\n//#region src/block-reconstruction.ts\n/**\n* Descriptor-free and unknown parameters become `value` stubs so validation can\n* report them via key-set comparison. Duplicate member names are first-wins.\n*/\nfunction reconstructExtensionBlock(node, descriptor, sourceFile, diagnostics) {\n\tconst keyword = node.keyword()?.text ?? \"\";\n\tconst blockName = node.name()?.name() ?? \"\";\n\tconst blockAttributes = [];\n\tfor (const attribute of node.attributes()) {\n\t\tconst name = attribute.name()?.path().join(\".\") ?? \"\";\n\t\tconst args = Array.from(attribute.argList()?.args() ?? [], (arg) => {\n\t\t\tconst value = arg.value();\n\t\t\treturn {\n\t\t\t\tkind: \"positional\",\n\t\t\t\tvalue: value === void 0 ? \"\" : printSyntax(value.syntax).trim(),\n\t\t\t\tspan: nodePslSpan(arg.syntax, sourceFile)\n\t\t\t};\n\t\t});\n\t\tblockAttributes.push({\n\t\t\tname,\n\t\t\targs,\n\t\t\tspan: nodePslSpan(attribute.syntax, sourceFile)\n\t\t});\n\t}\n\tconst parameters = {};\n\tfor (const entry of node.entries()) {\n\t\tconst key = entry.key()?.name();\n\t\tif (key === void 0) continue;\n\t\tconst span = nodePslSpan(entry.syntax, sourceFile);\n\t\tif (Object.hasOwn(parameters, key)) {\n\t\t\tdiagnostics.push({\n\t\t\t\tcode: \"PSL_EXTENSION_DUPLICATE_PARAMETER\",\n\t\t\t\tmessage: `Duplicate parameter \"${key}\" in \"${keyword}\" block \"${blockName}\"; first occurrence wins`,\n\t\t\t\trange: {\n\t\t\t\t\tstart: sourceFile.positionAt(entry.syntax.offset),\n\t\t\t\t\tend: sourceFile.positionAt(entry.syntax.offset + entry.syntax.green.textLength)\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tparameters[key] = reconstructParamValue(entry, descriptor?.parameters[key], span, sourceFile, diagnostics);\n\t}\n\treturn {\n\t\tkind: descriptor?.discriminator ?? keyword,\n\t\tkeyword,\n\t\tname: blockName,\n\t\tparameters,\n\t\tblockAttributes,\n\t\tspan: nodePslSpan(node.syntax, sourceFile)\n\t};\n}\nfunction reconstructParamValue(entry, param, span, sourceFile, diagnostics) {\n\tconst value = entry.value();\n\tif (value === void 0) return {\n\t\tkind: \"bare\",\n\t\tspan\n\t};\n\treturn reconstructFromExpression(value, param, span, sourceFile, diagnostics);\n}\nfunction reconstructFromExpression(value, param, span, sourceFile, diagnostics) {\n\tconst raw = printSyntax(value.syntax).trim();\n\tif (param?.kind === \"list\") {\n\t\tconst array = ArrayLiteralAst.cast(value.syntax);\n\t\tif (!array) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `List parameter expects an array literal, got ${raw}`,\n\t\t\t\trange: {\n\t\t\t\t\tstart: sourceFile.positionAt(value.syntax.offset),\n\t\t\t\t\tend: sourceFile.positionAt(value.syntax.offset + value.syntax.green.textLength)\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tkind: \"value\",\n\t\t\t\traw,\n\t\t\t\tspan\n\t\t\t};\n\t\t}\n\t\tconst items = [];\n\t\tfor (const element of array.elements()) items.push(reconstructFromExpression(element, param.of, nodePslSpan(element.syntax, sourceFile), sourceFile, diagnostics));\n\t\treturn {\n\t\t\tkind: \"list\",\n\t\t\titems,\n\t\t\tspan\n\t\t};\n\t}\n\tswitch (param?.kind) {\n\t\tcase \"ref\": return {\n\t\t\tkind: \"ref\",\n\t\t\tidentifier: raw,\n\t\t\tspan\n\t\t};\n\t\tcase \"option\": return {\n\t\t\tkind: \"option\",\n\t\t\ttoken: raw,\n\t\t\tspan\n\t\t};\n\t\tdefault: return {\n\t\t\tkind: \"value\",\n\t\t\traw,\n\t\t\tspan\n\t\t};\n\t}\n}\n//#endregion\n//#region src/symbol-table.ts\n/**\n* Owns duplicate-declaration detection for all PSL scopes; downstream consumers\n* should consume first-wins symbols rather than re-emitting duplicate diagnostics.\n*/\nfunction buildSymbolTable(options) {\n\tconst { document, sourceFile, pslBlockDescriptors } = options;\n\tconst diagnostics = [];\n\tconst namespaces = {};\n\tconst namedTypes = {};\n\tconst blocks = {};\n\tconst models = {};\n\tconst compositeTypes = {};\n\tconst topLevelNames = /* @__PURE__ */ new Set();\n\tconst claim = (taken, name) => {\n\t\tconst text = name?.name();\n\t\tif (text === void 0) return void 0;\n\t\tif (taken.has(text)) {\n\t\t\tconst range = nameRange(name, sourceFile);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${text}\"`,\n\t\t\t\trange\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\ttaken.add(text);\n\t\treturn text;\n\t};\n\tfor (const declaration of document.declarations()) if (declaration instanceof ModelDeclarationAst) {\n\t\tconst name = claim(topLevelNames, declaration.name());\n\t\tif (name !== void 0) models[name] = buildModel(name, declaration, sourceFile, diagnostics);\n\t} else if (declaration instanceof CompositeTypeDeclarationAst) {\n\t\tconst name = claim(topLevelNames, declaration.name());\n\t\tif (name !== void 0) compositeTypes[name] = buildCompositeType(name, declaration, sourceFile, diagnostics);\n\t} else if (declaration instanceof GenericBlockDeclarationAst) {\n\t\tconst name = claim(topLevelNames, declaration.name());\n\t\tif (name !== void 0) blocks[name] = buildBlock(name, declaration, sourceFile, pslBlockDescriptors, diagnostics);\n\t} else if (declaration instanceof NamespaceDeclarationAst) {\n\t\tconst name = claim(topLevelNames, declaration.name());\n\t\tif (name !== void 0) namespaces[name] = buildNamespace(name, declaration, diagnostics, sourceFile, pslBlockDescriptors);\n\t} else if (declaration instanceof TypesBlockAst) for (const binding of declaration.declarations()) {\n\t\tconst name = claim(topLevelNames, binding.name());\n\t\tif (name === void 0) continue;\n\t\tconst resolved = resolveNamedTypeBinding(binding, sourceFile);\n\t\tnamedTypes[name] = {\n\t\t\tkind: \"namedType\",\n\t\t\tname,\n\t\t\tnode: binding,\n\t\t\tspan: nodePslSpan(binding.syntax, sourceFile),\n\t\t\t...resolved\n\t\t};\n\t}\n\treturn {\n\t\ttable: { topLevel: {\n\t\t\tnamespaces,\n\t\t\tnamedTypes,\n\t\t\tblocks,\n\t\t\tmodels,\n\t\t\tcompositeTypes\n\t\t} },\n\t\tdiagnostics\n\t};\n}\nfunction buildModel(name, node, sourceFile, diagnostics) {\n\treturn {\n\t\tkind: \"model\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sourceFile),\n\t\tfields: buildFields(name, node.fields(), sourceFile, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sourceFile)\n\t};\n}\nfunction buildCompositeType(name, node, sourceFile, diagnostics) {\n\treturn {\n\t\tkind: \"compositeType\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sourceFile),\n\t\tfields: buildFields(name, node.fields(), sourceFile, diagnostics),\n\t\tattributes: readResolvedAttributes(node.attributes(), sourceFile)\n\t};\n}\nfunction buildBlock(name, node, sourceFile, pslBlockDescriptors, diagnostics) {\n\tconst keyword = node.keyword()?.text ?? \"\";\n\tconst descriptor = findBlockDescriptor(pslBlockDescriptors, keyword);\n\treturn {\n\t\tkind: \"block\",\n\t\tname,\n\t\tkeyword,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sourceFile),\n\t\tblock: reconstructExtensionBlock(node, descriptor, sourceFile, diagnostics)\n\t};\n}\nfunction buildNamespace(name, node, diagnostics, sourceFile, pslBlockDescriptors) {\n\tconst models = {};\n\tconst compositeTypes = {};\n\tconst blocks = {};\n\tconst taken = /* @__PURE__ */ new Set();\n\tfor (const member of node.declarations()) {\n\t\tconst memberName = member.name()?.name();\n\t\tif (memberName === void 0) continue;\n\t\tif (taken.has(memberName)) {\n\t\t\tconst range = nameRange(member.name(), sourceFile);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${memberName}\"`,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\ttaken.add(memberName);\n\t\tif (member instanceof ModelDeclarationAst) models[memberName] = buildModel(memberName, member, sourceFile, diagnostics);\n\t\telse if (member instanceof CompositeTypeDeclarationAst) compositeTypes[memberName] = buildCompositeType(memberName, member, sourceFile, diagnostics);\n\t\telse if (member instanceof GenericBlockDeclarationAst) blocks[memberName] = buildBlock(memberName, member, sourceFile, pslBlockDescriptors, diagnostics);\n\t}\n\treturn {\n\t\tkind: \"namespace\",\n\t\tname,\n\t\tnode,\n\t\tspan: nodePslSpan(node.syntax, sourceFile),\n\t\tmodels,\n\t\tcompositeTypes,\n\t\tblocks\n\t};\n}\nfunction buildFields(ownerName, fields, sourceFile, diagnostics) {\n\tconst result = {};\n\tfor (const field of fields) {\n\t\tconst nameNode = field.name();\n\t\tconst name = nameNode?.name();\n\t\tif (name === void 0) continue;\n\t\tif (Object.hasOwn(result, name)) {\n\t\t\tconst range = nameRange(nameNode, sourceFile);\n\t\t\tif (range) diagnostics.push({\n\t\t\t\tcode: \"PSL_DUPLICATE_DECLARATION\",\n\t\t\t\tmessage: `Duplicate declaration of \"${name}\"`,\n\t\t\t\trange\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tresult[name] = buildField(ownerName, name, field, sourceFile, diagnostics);\n\t}\n\treturn result;\n}\nfunction buildField(ownerName, name, node, sourceFile, diagnostics) {\n\tconst attributes = readResolvedAttributes(node.attributes(), sourceFile);\n\tconst span = nodePslSpan(node.syntax, sourceFile);\n\tconst annotation = node.typeAnnotation();\n\tconst typeName = annotation?.name();\n\tif (typeName?.isOverQualified()) {\n\t\tconst path = typeName.path();\n\t\tdiagnostics.push({\n\t\t\tcode: \"PSL_INVALID_QUALIFIED_TYPE\",\n\t\t\tmessage: `Field \"${ownerName}.${name}\" has an invalid qualified type \"${path.join(\".\")}\"; use at most one namespace qualifier (e.g. \"ns.TypeName\")`,\n\t\t\trange: nodeRange(typeName.syntax, sourceFile)\n\t\t});\n\t\treturn {\n\t\t\tkind: \"field\",\n\t\t\tname,\n\t\t\tnode,\n\t\t\tspan,\n\t\t\ttypeName: path[path.length - 1] ?? \"\",\n\t\t\toptional: false,\n\t\t\tlist: false,\n\t\t\tmalformedType: true,\n\t\t\tattributes\n\t\t};\n\t}\n\tconst typeConstructor = annotation?.isConstructor() ? readResolvedConstructorCall(annotation, sourceFile) : void 0;\n\tconst typeNamespaceId = typeName?.namespace()?.name();\n\tconst typeContractSpaceId = typeName?.space()?.name();\n\treturn {\n\t\tkind: \"field\",\n\t\tname,\n\t\tnode,\n\t\tspan,\n\t\ttypeName: typeName?.identifier()?.name() ?? \"\",\n\t\t...typeNamespaceId !== void 0 ? { typeNamespaceId } : {},\n\t\t...typeContractSpaceId !== void 0 ? { typeContractSpaceId } : {},\n\t\toptional: annotation?.isOptional() ?? false,\n\t\tlist: annotation?.isList() ?? false,\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes\n\t};\n}\nfunction resolveNamedTypeBinding(node, sourceFile) {\n\tconst annotation = node.typeAnnotation();\n\tconst isConstructor = annotation?.isConstructor() ?? false;\n\tconst baseType = annotation?.name()?.identifier()?.name();\n\tconst typeConstructor = readResolvedConstructorCall(annotation, sourceFile);\n\treturn {\n\t\tisConstructor,\n\t\t...!isConstructor && baseType !== void 0 ? { baseType } : {},\n\t\t...typeConstructor !== void 0 ? { typeConstructor } : {},\n\t\tattributes: readResolvedAttributes(node.attributes(), sourceFile)\n\t};\n}\nfunction nameRange(name, sourceFile) {\n\tif (name === void 0) return void 0;\n\tfor (const token of name.syntax.tokens()) if (token.kind === \"Ident\") return {\n\t\tstart: sourceFile.positionAt(token.offset),\n\t\tend: sourceFile.positionAt(token.offset + token.text.length)\n\t};\n}\nfunction nodeRange(node, sourceFile) {\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: sourceFile.positionAt(start),\n\t\tend: sourceFile.positionAt(end)\n\t};\n}\n//#endregion\nexport { assembleAttributeSpecs, bool, buildSymbolTable, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, json, keywordPslSpan, leafDiagnostic, list, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, oneOf, optional, parseQuotedStringLiteral, rangeToPslSpan, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, str, validateExtensionBlockFromSymbol };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;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AAM;EACzC,KAAK,WAAW,WAAW,MAAM,SAAS,MAAM,KAAK,MAAM;CAC5D;AACD;AACA,SAAS,UAAU,MAAM,YAAY;CACpC,MAAM,QAAQ,KAAK;CACnB,MAAM,MAAM,QAAQ,KAAK,MAAM;CAC/B,OAAO;EACN,OAAO,WAAW,WAAW,KAAK;EAClC,KAAK,WAAW,WAAW,GAAG;CAC/B;AACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as Contract } from "./contract-types-CkdMH7F7-9EHXSwbH.mjs";
|
|
2
2
|
import { r as Result } from "./result-Bpupv5vO.mjs";
|
|
3
|
-
import { c as ContractSourceProvider, m as PslContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, r as ContractSourceDiagnostic } from "./config-types-
|
|
4
|
-
import { I as SourceFile, d as DocumentAst } from "./parse-0ZJjj_2N-
|
|
5
|
-
import { f as SymbolTable } from "./symbol-table-CZ7EVCTL-
|
|
3
|
+
import { c as ContractSourceProvider, m as PslContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, r as ContractSourceDiagnostic } from "./config-types-D-nxkVW-.mjs";
|
|
4
|
+
import { I as SourceFile, d as DocumentAst } from "./parse-0ZJjj_2N-hn1rwo4m.mjs";
|
|
5
|
+
import { f as SymbolTable } from "./symbol-table-CZ7EVCTL-Kr33P4hu.mjs";
|
|
6
6
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts
|
|
7
7
|
//#region src/interpret.d.ts
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as TokenKind } from "./tokenizer-DcYI0Xrq-C-nNE9mE.mjs";
|
|
2
|
-
import { $ as parse, A as ObjectLiteralExprAst, B as SyntaxNode, C as ModelAttributeAst, D as NamespaceMemberAst, E as NamespaceDeclarationAst, F as Range, G as any, H as TokenAtOffset, I as SourceFile, J as filterChildren, K as castExpression, L as StringLiteralExprAst, M as ParseResult, N as Position, O as NumberLiteralExprAst, P as QualifiedNameAst, Q as greenToken, R as SyntaxElement, S as KeyValuePairAst, T as NamedTypeDeclarationAst, U as TypeAnnotationAst, V as SyntaxToken, W as TypesBlockAst, X as findFirstChild, Y as findChildToken, Z as greenNode, _ as GenericBlockMemberAst, a as AttributeAst, b as GreenToken, c as BracedBlock, d as DocumentAst, et as printSyntax, f as ExpressionAst, g as GenericBlockDeclarationAst, h as FunctionCallAst, i as AttributeArgListAst, j as ParseDiagnostic, k as ObjectFieldAst, l as CompositeTypeDeclarationAst, m as FieldDeclarationAst, n as AstNode, o as BlockMemberAst, p as FieldAttributeAst, q as createSyntaxTree, r as AttributeArgAst, s as BooleanLiteralExprAst, t as ArrayLiteralAst, u as DeclarationAst, v as GreenElement, w as ModelDeclarationAst, x as IdentifierAst, y as GreenNode, z as SyntaxKind } from "./parse-0ZJjj_2N-
|
|
2
|
+
import { $ as parse, A as ObjectLiteralExprAst, B as SyntaxNode, C as ModelAttributeAst, D as NamespaceMemberAst, E as NamespaceDeclarationAst, F as Range, G as any, H as TokenAtOffset, I as SourceFile, J as filterChildren, K as castExpression, L as StringLiteralExprAst, M as ParseResult, N as Position, O as NumberLiteralExprAst, P as QualifiedNameAst, Q as greenToken, R as SyntaxElement, S as KeyValuePairAst, T as NamedTypeDeclarationAst, U as TypeAnnotationAst, V as SyntaxToken, W as TypesBlockAst, X as findFirstChild, Y as findChildToken, Z as greenNode, _ as GenericBlockMemberAst, a as AttributeAst, b as GreenToken, c as BracedBlock, d as DocumentAst, et as printSyntax, f as ExpressionAst, g as GenericBlockDeclarationAst, h as FunctionCallAst, i as AttributeArgListAst, j as ParseDiagnostic, k as ObjectFieldAst, l as CompositeTypeDeclarationAst, m as FieldDeclarationAst, n as AstNode, o as BlockMemberAst, p as FieldAttributeAst, q as createSyntaxTree, r as AttributeArgAst, s as BooleanLiteralExprAst, t as ArrayLiteralAst, u as DeclarationAst, v as GreenElement, w as ModelDeclarationAst, x as IdentifierAst, y as GreenNode, z as SyntaxKind } from "./parse-0ZJjj_2N-hn1rwo4m.mjs";
|
|
3
3
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/syntax.d.mts
|
|
4
4
|
//#region src/syntax/green-builder.d.ts
|
|
5
5
|
declare class GreenNodeBuilder {
|
package/dist/psl-printer.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as CodecLookup } from "./codec-types-nVMtogur-DkhzrAqE.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import "./authoring-
|
|
2
|
+
import { x as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-C57bj6fM-C9ljFo_i.mjs";
|
|
3
|
+
import "./authoring-9Zbdh9AT.mjs";
|
|
4
4
|
import "./codec-CoU3qIEw.mjs";
|
|
5
|
-
import { m as PslDocumentAst } from "./psl-ast-
|
|
6
|
-
import "./psl-ast-
|
|
5
|
+
import { m as PslDocumentAst } from "./psl-ast-U8WIp-a5-BVKH-Lhi.mjs";
|
|
6
|
+
import "./psl-ast-D7s3Wde7.mjs";
|
|
7
7
|
//#region ../../../1-framework/2-authoring/psl-printer/dist/index.d.mts
|
|
8
8
|
//#region src/print-psl.d.ts
|
|
9
9
|
type PslBlockDescriptorsNamespace = AuthoringPslBlockDescriptorNamespace;
|
package/dist/psl-printer.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
2
|
import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
|
|
3
3
|
import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
4
|
-
import { h as isAuthoringPslBlockDescriptor } from "./framework-authoring-
|
|
4
|
+
import { h as isAuthoringPslBlockDescriptor } from "./framework-authoring-7TMJaLjm-DghHbwwP.mjs";
|
|
5
5
|
import { i as flatPslModels, s as namespacePslExtensionBlocks } from "./psl-ast-DUCvVXbB.mjs";
|
|
6
6
|
//#region ../../../1-framework/2-authoring/psl-printer/dist/index.mjs
|
|
7
7
|
function contractError(code, message, options) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./authoring-
|
|
3
|
-
import "./psl-ast-
|
|
4
|
-
import { B as SyntaxNode, C as ModelAttributeAst, E as NamespaceDeclarationAst, F as Range, I as SourceFile, T as NamedTypeDeclarationAst, U as TypeAnnotationAst, d as DocumentAst, f as ExpressionAst, g as GenericBlockDeclarationAst, j as ParseDiagnostic, l as CompositeTypeDeclarationAst, m as FieldDeclarationAst, p as FieldAttributeAst, w as ModelDeclarationAst } from "./parse-0ZJjj_2N-
|
|
1
|
+
import { L as PslExtensionBlock, q as PslSpan, x as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-C57bj6fM-C9ljFo_i.mjs";
|
|
2
|
+
import "./authoring-9Zbdh9AT.mjs";
|
|
3
|
+
import "./psl-ast-D7s3Wde7.mjs";
|
|
4
|
+
import { B as SyntaxNode, C as ModelAttributeAst, E as NamespaceDeclarationAst, F as Range, I as SourceFile, T as NamedTypeDeclarationAst, U as TypeAnnotationAst, d as DocumentAst, f as ExpressionAst, g as GenericBlockDeclarationAst, j as ParseDiagnostic, l as CompositeTypeDeclarationAst, m as FieldDeclarationAst, p as FieldAttributeAst, w as ModelDeclarationAst } from "./parse-0ZJjj_2N-hn1rwo4m.mjs";
|
|
5
5
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/symbol-table-CZ7EVCTL.d.mts
|
|
6
6
|
//#region src/resolve.d.ts
|
|
7
7
|
interface ResolvedAttributeArg {
|
|
@@ -122,4 +122,4 @@ interface SymbolTableResult {
|
|
|
122
122
|
declare function buildSymbolTable(options: BuildSymbolTableOptions): SymbolTableResult;
|
|
123
123
|
//#endregion
|
|
124
124
|
export { nodePslSpan as _, ModelSymbol as a, readResolvedAttributes as b, ResolvedAttribute as c, ResolvedTypeConstructorCall as d, SymbolTable as f, keywordPslSpan as g, buildSymbolTable as h, FieldSymbol as i, ResolvedAttributeArg as l, TopLevelScope as m, BuildSymbolTableOptions as n, NamedTypeSymbol as o, SymbolTableResult as p, CompositeTypeSymbol as r, NamespaceSymbol as s, BlockSymbol as t, ResolvedNamedTypeBinding as u, rangeToPslSpan as v, readResolvedConstructorCall as x, readResolvedAttribute as y };
|
|
125
|
-
//# sourceMappingURL=symbol-table-CZ7EVCTL-
|
|
125
|
+
//# sourceMappingURL=symbol-table-CZ7EVCTL-Kr33P4hu.d.mts.map
|
package/dist/{symbol-table-CZ7EVCTL-ByUmi8Bh.d.mts.map → symbol-table-CZ7EVCTL-Kr33P4hu.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-table-CZ7EVCTL-
|
|
1
|
+
{"version":3,"file":"symbol-table-CZ7EVCTL-Kr33P4hu.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/symbol-table-CZ7EVCTL.d.mts"],"mappings":";;;;;;UAIU;WACC;WACA;WACA;WACA,aAAa;WACb,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;iBAEA,sBAAsB,WAAW,oBAAoB,mBAAmB,YAAY,aAAa;iBACjG,uBAAuB,YAAY,SAAS,oBAAoB,oBAAoB,YAAY,sBAAsB;iBACtH,4BAA4B,YAAY,+BAA+B,YAAY,aAAa;iBAChG,YAAY,MAAM,YAAY,YAAY,aAAa;;iBAEvD,eAAe,MAAM,YAAY,iBAAiB,YAAY,aAAa;iBAC3E,eAAe,OAAO,OAAO,YAAY,aAAa;;;UAG7D;WACC,UAAU;;UAEX;WACC,YAAY,eAAe;WAC3B,YAAY,eAAe;WAC3B,QAAQ,eAAe;WACvB,QAAQ,eAAe;WACvB,gBAAgB,eAAe;;UAEhC;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,gBAAgB,eAAe;WAC/B,QAAQ,eAAe;;UAExB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA;WACA,MAAM;WACN,MAAM;;WAEN,OAAO;;UAER;WACC;WACA,kBAAkB;WAClB;WACA,qBAAqB;;;;;;;UAOtB,wBAAwB;WACvB;WACA;WACA,MAAM;WACN,MAAM;;UAEP;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN;WACA;WACA;WACA;WACA;WACA,kBAAkB;WAClB,qBAAqB;;WAErB;;UAED;WACC,UAAU;WACV,YAAY;WACZ,qBAAqB;;UAEtB;WACC,OAAO;WACP,sBAAsB;;;;;;iBAMhB,iBAAiB,SAAS,0BAA0B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-framework",
|
|
3
|
-
"version": "8.0.0-rc.8-dev.
|
|
3
|
+
"version": "8.0.0-rc.8-dev.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
"uniku": "^0.5.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@internal/config": "8.0.0-rc.8-dev.
|
|
19
|
-
"@internal/contract": "8.0.0-rc.8-dev.
|
|
20
|
-
"@internal/contract-authoring": "8.0.0-rc.8-dev.
|
|
21
|
-
"@internal/errors": "8.0.0-rc.8-dev.
|
|
22
|
-
"@internal/framework-components": "8.0.0-rc.8-dev.
|
|
23
|
-
"@internal/ids": "8.0.0-rc.8-dev.
|
|
24
|
-
"@internal/operations": "8.0.0-rc.8-dev.
|
|
25
|
-
"@internal/psl-parser": "8.0.0-rc.8-dev.
|
|
26
|
-
"@internal/psl-printer": "8.0.0-rc.8-dev.
|
|
27
|
-
"@internal/ts-render": "8.0.0-rc.8-dev.
|
|
28
|
-
"@repo/tsconfig": "8.0.0-rc.8-dev.
|
|
29
|
-
"@internal/publish-surface": "8.0.0-rc.8-dev.
|
|
30
|
-
"@repo/tsdown": "8.0.0-rc.8-dev.
|
|
31
|
-
"@internal/utils": "8.0.0-rc.8-dev.
|
|
18
|
+
"@internal/config": "8.0.0-rc.8-dev.7",
|
|
19
|
+
"@internal/contract": "8.0.0-rc.8-dev.7",
|
|
20
|
+
"@internal/contract-authoring": "8.0.0-rc.8-dev.7",
|
|
21
|
+
"@internal/errors": "8.0.0-rc.8-dev.7",
|
|
22
|
+
"@internal/framework-components": "8.0.0-rc.8-dev.7",
|
|
23
|
+
"@internal/ids": "8.0.0-rc.8-dev.7",
|
|
24
|
+
"@internal/operations": "8.0.0-rc.8-dev.7",
|
|
25
|
+
"@internal/psl-parser": "8.0.0-rc.8-dev.7",
|
|
26
|
+
"@internal/psl-printer": "8.0.0-rc.8-dev.7",
|
|
27
|
+
"@internal/ts-render": "8.0.0-rc.8-dev.7",
|
|
28
|
+
"@repo/tsconfig": "8.0.0-rc.8-dev.7",
|
|
29
|
+
"@internal/publish-surface": "8.0.0-rc.8-dev.7",
|
|
30
|
+
"@repo/tsdown": "8.0.0-rc.8-dev.7",
|
|
31
|
+
"@internal/utils": "8.0.0-rc.8-dev.7",
|
|
32
32
|
"tsdown": "0.22.14",
|
|
33
33
|
"typescript": "5.9.3",
|
|
34
34
|
"vitest": "5.0.0-rc.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./framework-authoring-BRbNN8tk-DrB69FyZ.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-BNfiycdf.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/control.mjs"],"sourcesContent":["import { n as runtimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { n as materializeCodec, r as resolveCodecDescriptorOrThrow, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from \"./resolve-codec-BZF8TZh_.mjs\";\nimport { n as aggregateDescriptorKey, r as isAggregateDescriptor, t as mergeCapabilityMatrices } from \"./capabilities-BCEONw9w.mjs\";\nimport { _ as mergeAuthoringNamespaces, a as collectScalarTypeConstructors, i as collectContributedDescriptorPaths, n as assertResolvableTypeConstructorTemplates, t as assertNoCrossRegistryCollisions } from \"./framework-authoring-CDEvlouU.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/control/contract-snapshot-layout.ts\nconst CONTRACT_SNAPSHOTS_DIRNAME = \"snapshots\";\nconst STORAGE_HASH_PATTERN = /^[0-9a-f]{64}$/;\n/** Validate a storage hash for use as a directory name. */\nfunction storageHashHex(storageHash) {\n\tif (!STORAGE_HASH_PATTERN.test(storageHash)) throw new InternalError(`Invalid storage hash \"${storageHash}\": expected 64 lowercase hex characters`);\n\treturn storageHash;\n}\n/** Module specifier for the store's `contract.json`, POSIX separators. */\nfunction contractSnapshotJsonSpecifier(snapshotsImportPath, storageHash) {\n\treturn `${snapshotsImportPath}/${storageHashHex(storageHash)}/contract.json`;\n}\n/** Type-only module specifier for the store's `contract.d.ts` (no extension). */\nfunction contractSnapshotTypesSpecifier(snapshotsImportPath, storageHash) {\n\treturn `${snapshotsImportPath}/${storageHashHex(storageHash)}/contract`;\n}\n//#endregion\n//#region src/control/control-capabilities.ts\nfunction hasMigrations(target) {\n\treturn \"migrations\" in target && !!target[\"migrations\"];\n}\nfunction hasSchemaView(instance) {\n\treturn \"toSchemaView\" in instance && typeof instance[\"toSchemaView\"] === \"function\";\n}\nfunction hasPslContractInfer(instance) {\n\treturn \"inferPslContract\" in instance && typeof instance[\"inferPslContract\"] === \"function\";\n}\nfunction hasOperationPreview(instance) {\n\treturn \"toOperationPreview\" in instance && typeof instance[\"toOperationPreview\"] === \"function\";\n}\nfunction hasSchemaSubjectClassifier(instance) {\n\treturn \"classifySubjectGranularity\" in instance && typeof instance[\"classifySubjectGranularity\"] === \"function\" && \"classifyEntityKind\" in instance && typeof instance[\"classifyEntityKind\"] === \"function\";\n}\n//#endregion\n//#region src/control/control-operation-results.ts\nconst VERIFY_CODE_MARKER_MISSING = \"CONTRACT.MARKER_MISSING\";\nconst VERIFY_CODE_HASH_MISMATCH = \"CONTRACT.MARKER_MISMATCH\";\nconst VERIFY_CODE_TARGET_MISMATCH = \"CONTRACT.TARGET_MISMATCH\";\nconst VERIFY_CODE_SCHEMA_FAILURE = \"CONTRACT.SCHEMA_VERIFICATION_FAILED\";\n//#endregion\n//#region src/control/control-schema-view.ts\nvar SchemaTreeNode = class {\n\tkind;\n\tid;\n\tlabel;\n\tmeta;\n\tchildren;\n\tconstructor(options) {\n\t\tthis.kind = options.kind;\n\t\tthis.id = options.id;\n\t\tthis.label = options.label;\n\t\tif (options.meta !== void 0) this.meta = options.meta;\n\t\tif (options.children !== void 0) this.children = options.children;\n\t\tObject.freeze(this);\n\t}\n\taccept(visitor) {\n\t\treturn visitor.visit(this);\n\t}\n};\n//#endregion\n//#region src/control/control-spaces.ts\n/**\n* Canonical control-plane identifiers for contract spaces.\n*\n* A contract space is the disjoint `(contract.json, migration-graph)` unit\n* the per-space planner / runner / verifier (project: extension contract\n* spaces, TML-2397) operates on. The application owns one well-known\n* space — the value below — and each loaded extension that contributes\n* schema owns a uniquely-named space.\n*\n* Lives in `framework-components/control` so every layer that has to\n* reason about space identity (the migration tooling, the SQL runtime's\n* marker reader, target-side statement builders, target-side adapters)\n* can import a single value rather than duplicating the literal. Raw\n* `'app'` string literals in framework / target / runtime / adapter\n* source code are forbidden and policed by\n* `scripts/lint-app-space-id.mjs` (wired into `pnpm lint:deps`).\n*\n* @see specs/framework-mechanism.spec.md § 3 — Layout convention (γ).\n*/\nconst APP_SPACE_ID = \"app\";\n//#endregion\n//#region src/control/control-stack.ts\nfunction addUniqueId(ids, seen, id) {\n\tif (!seen.has(id)) {\n\t\tids.push(id);\n\t\tseen.add(id);\n\t}\n}\nfunction assertUniqueCodecOwner(options) {\n\tconst existingOwner = options.owners.get(options.codecId);\n\tif (existingOwner !== void 0) throw new InternalError(`Duplicate ${options.entityLabel} for codecId \"${options.codecId}\". Descriptor \"${options.descriptorId}\" conflicts with \"${existingOwner}\". Each codecId can only have one ${options.entityOwnershipLabel}.`);\n}\nfunction extractCodecTypeImports(descriptors) {\n\tconst imports = [];\n\tfor (const descriptor of descriptors) {\n\t\tconst codecTypes = descriptor.types?.codecTypes;\n\t\tif (codecTypes?.import) imports.push(codecTypes.import);\n\t\tif (codecTypes?.typeImports) imports.push(...codecTypes.typeImports);\n\t}\n\treturn imports;\n}\nfunction extractQueryOperationTypeImports(descriptors) {\n\tconst imports = [];\n\tfor (const descriptor of descriptors) {\n\t\tconst queryOperationTypes = descriptor.types?.queryOperationTypes;\n\t\tif (queryOperationTypes?.import) imports.push(queryOperationTypes.import);\n\t}\n\treturn imports;\n}\nfunction extractComponentIds(family, target, adapter, extensions) {\n\tconst ids = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\taddUniqueId(ids, seen, family.id);\n\taddUniqueId(ids, seen, target.id);\n\tif (adapter) addUniqueId(ids, seen, adapter.id);\n\tfor (const ext of extensions) addUniqueId(ids, seen, ext.id);\n\treturn ids;\n}\nfunction assembleAuthoringContributions(descriptors) {\n\tconst field = {};\n\tconst type = {};\n\tconst entityTypes = {};\n\tconst pslBlockDescriptors = {};\n\tconst modelAttributes = {};\n\tconst pathOwners = /* @__PURE__ */ new Map();\n\tconst claimContributedPaths = (namespace, descriptorKind, label, descriptorId) => {\n\t\tfor (const path of collectContributedDescriptorPaths(namespace, descriptorKind)) {\n\t\t\tconst key = `${label}:${path}`;\n\t\t\tconst existingOwner = pathOwners.get(key);\n\t\t\tif (existingOwner !== void 0) throw new InternalError(`Duplicate authoring ${label} helper \"${path}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`);\n\t\t\tpathOwners.set(key, descriptorId);\n\t\t}\n\t};\n\tlet valueObjectStorageDeclaration;\n\tfor (const descriptor of descriptors) {\n\t\tconst descriptorId = descriptor.id ?? \"<unknown>\";\n\t\tconst declaredValueObjectStorageType = descriptor.authoring?.valueObjectStorageType;\n\t\tif (declaredValueObjectStorageType !== void 0) {\n\t\t\tif (valueObjectStorageDeclaration !== void 0) throw new InternalError(`Duplicate authoring valueObjectStorageType declaration. Descriptor \"${descriptorId}\" conflicts with \"${valueObjectStorageDeclaration.ownerId}\". Exactly one composed component may declare the value-object storage type.`);\n\t\t\tvalueObjectStorageDeclaration = {\n\t\t\t\tname: declaredValueObjectStorageType,\n\t\t\t\townerId: descriptorId\n\t\t\t};\n\t\t}\n\t\tif (descriptor.authoring?.field) {\n\t\t\tclaimContributedPaths(descriptor.authoring.field, \"fieldPreset\", \"field\", descriptorId);\n\t\t\tmergeAuthoringNamespaces(field, descriptor.authoring.field, [], \"fieldPreset\", \"field\");\n\t\t}\n\t\tif (descriptor.authoring?.type) {\n\t\t\tclaimContributedPaths(descriptor.authoring.type, \"typeConstructor\", \"type\", descriptorId);\n\t\t\tassertResolvableTypeConstructorTemplates(descriptor.authoring.type, descriptorId);\n\t\t\tmergeAuthoringNamespaces(type, descriptor.authoring.type, [], \"typeConstructor\", \"type\");\n\t\t}\n\t\tif (descriptor.authoring?.entityTypes) {\n\t\t\tclaimContributedPaths(descriptor.authoring.entityTypes, \"entity\", \"entity\", descriptorId);\n\t\t\tmergeAuthoringNamespaces(entityTypes, descriptor.authoring.entityTypes, [], \"entity\", \"entity\");\n\t\t}\n\t\tif (descriptor.authoring?.pslBlockDescriptors) {\n\t\t\tclaimContributedPaths(descriptor.authoring.pslBlockDescriptors, \"pslBlock\", \"pslBlock\", descriptorId);\n\t\t\tmergeAuthoringNamespaces(pslBlockDescriptors, descriptor.authoring.pslBlockDescriptors, [], \"pslBlock\", \"pslBlock\");\n\t\t}\n\t\tif (descriptor.authoring?.modelAttributes) mergeAuthoringNamespaces(modelAttributes, descriptor.authoring.modelAttributes, [], \"modelAttribute\", \"modelAttribute\");\n\t}\n\tconst fieldNamespace = field;\n\tconst typeNamespace = type;\n\tconst entityTypeNamespace = entityTypes;\n\tconst pslBlockDescriptorNamespace = blindCast(pslBlockDescriptors);\n\tconst modelAttributeNamespace = blindCast(modelAttributes);\n\tassertNoCrossRegistryCollisions(typeNamespace, fieldNamespace, entityTypeNamespace, pslBlockDescriptorNamespace, modelAttributeNamespace);\n\tif (valueObjectStorageDeclaration !== void 0 && !collectScalarTypeConstructors(typeNamespace).has(valueObjectStorageDeclaration.name)) throw new InternalError(`Invalid authoring valueObjectStorageType \"${valueObjectStorageDeclaration.name}\" declared by descriptor \"${valueObjectStorageDeclaration.ownerId}\". The name must be a top-level bare-eligible type constructor in the assembled authoring namespace.`);\n\treturn {\n\t\tfield: fieldNamespace,\n\t\ttype: typeNamespace,\n\t\tentityTypes: entityTypeNamespace,\n\t\tpslBlockDescriptors: pslBlockDescriptorNamespace,\n\t\tmodelAttributes: modelAttributeNamespace,\n\t\t...valueObjectStorageDeclaration !== void 0 ? { valueObjectStorageType: valueObjectStorageDeclaration.name } : {}\n\t};\n}\nfunction assembleControlMutationDefaults(descriptors) {\n\tconst defaultFunctionRegistry = /* @__PURE__ */ new Map();\n\tconst functionOwners = /* @__PURE__ */ new Map();\n\tconst generatorMap = /* @__PURE__ */ new Map();\n\tconst generatorOwners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tconst contributions = descriptor.controlMutationDefaults;\n\t\tif (!contributions) continue;\n\t\tconst descriptorId = descriptor.id ?? \"<unknown>\";\n\t\tfor (const generatorDescriptor of contributions.generatorDescriptors) {\n\t\t\tconst existingOwner = generatorOwners.get(generatorDescriptor.id);\n\t\t\tif (existingOwner !== void 0) throw new InternalError(`Duplicate mutation default generator id \"${generatorDescriptor.id}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`);\n\t\t\tgeneratorMap.set(generatorDescriptor.id, generatorDescriptor);\n\t\t\tgeneratorOwners.set(generatorDescriptor.id, descriptorId);\n\t\t}\n\t\tfor (const [functionName, handler] of contributions.defaultFunctionRegistry) {\n\t\t\tconst existingOwner = functionOwners.get(functionName);\n\t\t\tif (existingOwner !== void 0) throw new InternalError(`Duplicate mutation default function \"${functionName}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`);\n\t\t\tdefaultFunctionRegistry.set(functionName, handler);\n\t\t\tfunctionOwners.set(functionName, descriptorId);\n\t\t}\n\t}\n\treturn {\n\t\tdefaultFunctionRegistry,\n\t\tgeneratorDescriptors: Array.from(generatorMap.values())\n\t};\n}\n/**\n* Collect every contributed {@link AggregateDescriptor} across the composed components, rejecting malformed shapes and second claims on one `(operation, input)` overload.\n*\n* Both planes read the same contribution slot: emission derives result types from these descriptors, and family runtimes build their resolution registry from them. Rejections are user-facing — an extension author's bad contribution surfaces here first, during `contract emit` — so a malformed shape raises `CONTRACT.AGGREGATE_DESCRIPTOR_INVALID` and a second claim raises `CONTRACT.AGGREGATE_DESCRIPTOR_DUPLICATE`, each naming the contributing component.\n*/\nfunction collectAggregateDescriptors(descriptors) {\n\tconst collected = [];\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tconst descriptorId = descriptor.id ?? \"<unknown>\";\n\t\tfor (const contributed of descriptor.types?.aggregateDescriptors ?? []) {\n\t\t\tif (!isAggregateDescriptor(contributed)) throw runtimeError(\"CONTRACT.AGGREGATE_DESCRIPTOR_INVALID\", `Malformed aggregate descriptor contributed by \"${descriptorId}\". A descriptor declares a non-empty \\`operation\\`, an \\`input\\` match of kind \\`none\\`/\\`any\\`/\\`codec\\`/\\`trait\\`, an \\`output\\` of kind \\`self\\`/\\`codec\\`, and a boolean \\`nullable\\` — plus \\`emptyResultJson\\`, in the result codec's canonical JSON, where \\`nullable\\` is false; a \\`self\\` output needs an input to reuse.`, {\n\t\t\t\tcontributedBy: descriptorId,\n\t\t\t\tdescriptor: contributed\n\t\t\t});\n\t\t\tconst key = aggregateDescriptorKey(contributed);\n\t\t\tconst existingOwner = owners.get(key);\n\t\t\tif (existingOwner !== void 0) throw runtimeError(\"CONTRACT.AGGREGATE_DESCRIPTOR_DUPLICATE\", `Duplicate aggregate descriptor for \"${key}\". Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\". Each operation/input pair can only have one provider.`, {\n\t\t\t\tkey,\n\t\t\t\tcontributedBy: descriptorId,\n\t\t\t\towner: existingOwner\n\t\t\t});\n\t\t\towners.set(key, descriptorId);\n\t\t\tcollected.push(contributed);\n\t\t}\n\t}\n\treturn collected;\n}\n/**\n* Flatten the codec descriptors the composed components contribute.\n*\n* A component may know a codec and still withhold it — an adapter that cannot name a codec's emitted type contributes the rest without it — so the contributed set is not always the set some component's own registry holds. Consumers whose output must agree with what the runtime resolves read this list rather than any one component's registry.\n*/\nfunction collectCodecDescriptors(descriptors) {\n\treturn descriptors.flatMap((descriptor) => descriptor.types?.codecTypes?.codecDescriptors ?? []);\n}\nfunction extractCodecLookup(descriptors) {\n\tconst byId = /* @__PURE__ */ new Map();\n\tconst descriptorsById = /* @__PURE__ */ new Map();\n\tconst targetTypesById = /* @__PURE__ */ new Map();\n\tconst renderersById = /* @__PURE__ */ new Map();\n\tconst inputRenderersById = /* @__PURE__ */ new Map();\n\tconst valueLiteralRenderersById = /* @__PURE__ */ new Map();\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const descriptor of descriptors) {\n\t\tconst codecTypes = descriptor.types?.codecTypes;\n\t\tconst descriptorId = descriptor.id;\n\t\tfor (const codecDescriptor of codecTypes?.codecDescriptors ?? []) {\n\t\t\tassertUniqueCodecOwner({\n\t\t\t\tcodecId: codecDescriptor.codecId,\n\t\t\t\towners,\n\t\t\t\tdescriptorId,\n\t\t\t\tentityLabel: \"codec descriptor\",\n\t\t\t\tentityOwnershipLabel: \"codec descriptor provider\"\n\t\t\t});\n\t\t\towners.set(codecDescriptor.codecId, descriptorId);\n\t\t\tdescriptorsById.set(codecDescriptor.codecId, codecDescriptor);\n\t\t\tif (Array.isArray(codecDescriptor.targetTypes)) targetTypesById.set(codecDescriptor.codecId, codecDescriptor.targetTypes);\n\t\t\tif (typeof codecDescriptor.renderOutputType === \"function\") renderersById.set(codecDescriptor.codecId, codecDescriptor.renderOutputType);\n\t\t\tif (typeof codecDescriptor.renderInputType === \"function\") inputRenderersById.set(codecDescriptor.codecId, codecDescriptor.renderInputType);\n\t\t\tif (typeof codecDescriptor.renderValueLiteral === \"function\") valueLiteralRenderersById.set(codecDescriptor.codecId, codecDescriptor.renderValueLiteral);\n\t\t\tif (!byId.has(codecDescriptor.codecId)) if (codecDescriptor.isParameterized) try {\n\t\t\t\tconst representative = codecDescriptor.factory({})({ name: `<lookup:${codecDescriptor.codecId}>` });\n\t\t\t\tbyId.set(codecDescriptor.codecId, representative);\n\t\t\t} catch {}\n\t\t\telse {\n\t\t\t\tconst representative = codecDescriptor.factory(void 0)({ name: `<lookup:${codecDescriptor.codecId}>` });\n\t\t\t\tbyId.set(codecDescriptor.codecId, representative);\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tget: (id) => byId.get(id),\n\t\tforCodecRef(ref) {\n\t\t\treturn materializeCodec(resolveCodecDescriptorOrThrow((id) => descriptorsById.get(id), ref, CONTRACT_CODEC_DESCRIPTOR_MISSING), ref, { name: `<ref:${ref.codecId}>` });\n\t\t},\n\t\tforColumn: () => void 0,\n\t\ttargetTypesFor: (id) => targetTypesById.get(id),\n\t\trenderOutputTypeFor: (id, params) => renderersById.get(id)?.(params),\n\t\trenderInputTypeFor: (id, params) => inputRenderersById.get(id)?.(params),\n\t\trenderValueLiteralFor: (id, value, side) => valueLiteralRenderersById.get(id)?.(value, side),\n\t\tdescriptorFor: (id) => descriptorsById.get(id)\n\t};\n}\nfunction assembleExtensionContracts(extensions) {\n\tconst result = /* @__PURE__ */ new Map();\n\tfor (const ext of extensions) {\n\t\tif (ext.contractSpace === void 0) continue;\n\t\tresult.set(ext.id, ext.contractSpace.contractJson);\n\t}\n\treturn result;\n}\nfunction readDeclaredDependencyIds(descriptor) {\n\tconst packs = descriptor.contractSpace?.contractJson?.extensions;\n\tif (packs === null || typeof packs !== \"object\") return [];\n\treturn Object.keys(packs);\n}\n/**\n* Builds a dependency-respecting load order for the given extension descriptors\n* using Kahn's topological sort algorithm. Dependencies (packs declared in\n* `contractSpace.contractJson.extensions`) are placed before the extensions\n* that depend on them.\n*\n* Throws if the dependency graph contains a cycle, with an error message that\n* names every extension involved in the cycle.\n*\n* Throws if any extension declares a dependency on a pack ID that is not present\n* in the provided list — add the missing pack to the `extensions` list to\n* resolve the error.\n*/\nfunction buildExtensionLoadOrder(extensions) {\n\tif (extensions.length === 0) return [];\n\tconst idSet = new Set(extensions.map((e) => e.id));\n\tconst inDegree = /* @__PURE__ */ new Map();\n\tconst dependents = /* @__PURE__ */ new Map();\n\tfor (const ext of extensions) {\n\t\tif (!inDegree.has(ext.id)) inDegree.set(ext.id, 0);\n\t\tif (!dependents.has(ext.id)) dependents.set(ext.id, []);\n\t}\n\tfor (const ext of extensions) for (const depId of readDeclaredDependencyIds(ext)) {\n\t\tif (!idSet.has(depId)) throw new InternalError(`Extension \"${ext.id}\" declares a dependency on \"${depId}\", but \"${depId}\" is not in the provided extension set. Add the missing space to extensions.`);\n\t\tinDegree.set(ext.id, (inDegree.get(ext.id) ?? 0) + 1);\n\t\tconst list = dependents.get(depId);\n\t\tif (list !== void 0) list.push(ext.id);\n\t}\n\tconst queue = [];\n\tfor (const [id, deg] of inDegree) if (deg === 0) queue.push(id);\n\tqueue.sort();\n\tconst result = [];\n\twhile (queue.length > 0) {\n\t\tconst id = queue.shift();\n\t\tif (id === void 0) break;\n\t\tresult.push(id);\n\t\tconst children = dependents.get(id) ?? [];\n\t\tchildren.sort();\n\t\tfor (const childId of children) {\n\t\t\tconst newDeg = (inDegree.get(childId) ?? 1) - 1;\n\t\t\tinDegree.set(childId, newDeg);\n\t\t\tif (newDeg === 0) queue.push(childId);\n\t\t}\n\t}\n\tif (result.length < extensions.length) throw new InternalError(`Extension dependency cycle detected. Cycle members: ${extensions.map((e) => e.id).filter((id) => !result.includes(id)).sort().map((id) => `\"${id}\"`).join(\", \")}.`);\n\treturn result;\n}\nfunction createControlStack(input) {\n\tconst { family, target, adapter, driver, extensions = [] } = input;\n\tconst orderedIds = buildExtensionLoadOrder(extensions);\n\tconst extensionById = new Map(extensions.map((ext) => [ext.id, ext]));\n\tconst orderedExtensions = orderedIds.map((id) => extensionById.get(id)).filter((ext) => ext !== void 0);\n\tconst allDescriptors = [\n\t\tfamily,\n\t\ttarget,\n\t\t...adapter ? [adapter] : [],\n\t\t...orderedExtensions\n\t];\n\tconst codecLookup = extractCodecLookup(allDescriptors);\n\tconst authoringContributions = assembleAuthoringContributions(allDescriptors);\n\treturn {\n\t\tfamily,\n\t\ttarget,\n\t\tadapter,\n\t\tdriver,\n\t\textensions: orderedExtensions,\n\t\textensionContracts: assembleExtensionContracts(orderedExtensions),\n\t\tcodecTypeImports: extractCodecTypeImports(allDescriptors),\n\t\tqueryOperationTypeImports: extractQueryOperationTypeImports(allDescriptors),\n\t\textensionIds: extractComponentIds(family, target, adapter, orderedExtensions),\n\t\tcodecLookup,\n\t\tcodecDescriptors: collectCodecDescriptors(allDescriptors),\n\t\taggregateDescriptors: collectAggregateDescriptors(allDescriptors),\n\t\tauthoringContributions,\n\t\tscalarTypes: [...collectScalarTypeConstructors(authoringContributions.type).keys()],\n\t\tcontrolMutationDefaults: assembleControlMutationDefaults(allDescriptors),\n\t\tcapabilities: mergeCapabilityMatrices({}, [\n\t\t\ttarget,\n\t\t\t...adapter ? [adapter] : [],\n\t\t\t...orderedExtensions\n\t\t])\n\t};\n}\n//#endregion\n//#region src/control/order-issues-by-dependencies.ts\nconst PATH_DELIMITER = \" \";\nfunction pathKey(path) {\n\treturn path.join(PATH_DELIMITER);\n}\n/**\n* Whether an issue's op builds its subject up (create or alter) rather than\n* only tearing it down. The differ sets `expected` on every create (`not-found`)\n* and alter (`not-equal`) issue and leaves it absent on a pure drop\n* (`not-expected`). This is the single signal the ordering law reads for edge\n* direction — never `reason`.\n*/\nfunction buildsUp(issue) {\n\treturn issue.expected !== void 0;\n}\n/**\n* The nearest strict-ancestor bucket of `path` — the surviving parent entity a\n* child is contained by. Walks the path's proper prefixes from longest to\n* shortest and returns the first prefix that maps to a bucket; a gap (a prefix\n* with no bucket) is skipped so containment always attaches to the closest real\n* parent.\n*\n* Returns a list because a path prefix can be shared by two siblings of\n* different `nodeKind` (a role and a namespace named alike); linking the child\n* to every candidate over-constrains safely (the extra edge points at a same-\n* direction op and never forms a cycle, since a parent never depends on its\n* child) rather than risk picking the wrong one.\n*/\nfunction nearestAncestors(path, byPath) {\n\tfor (let end = path.length - 1; end >= 1; end -= 1) {\n\t\tconst bucket = byPath.get(pathKey(path.slice(0, end)));\n\t\tif (bucket !== void 0) return bucket;\n\t}\n\treturn [];\n}\n/**\n* Orders schema-diff issues so that every dependency's op precedes its\n* dependent on the way up and follows it on the way down, breaking ties\n* deterministically by path.\n*\n* Edges come from two sources:\n* - **`dependsOn` cross-links** — the resolved issue-to-issue paths the differ\n* mirrors onto each issue (a node's declared structural prerequisites). A\n* path that resolves to no issue in this list is skipped (the dependency is\n* satisfied by reality); a path shared by two same-id/different-kind siblings\n* links to every match, over-constraining safely.\n* - **containment** — every issue depends on its nearest strict-ancestor issue\n* (a child entity on the parent entity that owns it). Subtree coalescing has\n* already removed the descendants of a whole create/drop, so this only links\n* the parent/child pairs that legitimately survive together.\n*\n* The ordering law reads each dependent's presence for direction: an issue that\n* builds up (`expected` present — a create or alter) needs its dependency\n* first; a pure drop needs its dependent removed first, so the edge reverses.\n* The graph is a DAG by construction (dependencies point from dependents to\n* their prerequisites, and prerequisites never point back), so a cycle is a\n* derivation or authoring bug: the topological sort asserts acyclicity and\n* throws, naming the issues it could not place.\n*/\nfunction orderIssuesByDependencies(issues) {\n\tif (issues.length <= 1) return issues;\n\tconst nodes = issues.map((issue) => ({\n\t\tissue,\n\t\tkey: pathKey(issue.path),\n\t\tbuildsUp: buildsUp(issue),\n\t\toutgoing: /* @__PURE__ */ new Set(),\n\t\tinDegree: 0\n\t}));\n\tconst nodesByPath = /* @__PURE__ */ new Map();\n\tfor (const node of nodes) {\n\t\tconst bucket = nodesByPath.get(node.key);\n\t\tif (bucket === void 0) nodesByPath.set(node.key, [node]);\n\t\telse bucket.push(node);\n\t}\n\tconst addEdge = (before, after) => {\n\t\tif (before.outgoing.has(after)) return;\n\t\tbefore.outgoing.add(after);\n\t\tafter.inDegree += 1;\n\t};\n\tconst addDependency = (dependent, dependency) => {\n\t\tif (dependent === dependency) return;\n\t\tif (dependent.buildsUp) addEdge(dependency, dependent);\n\t\telse addEdge(dependent, dependency);\n\t};\n\tfor (const node of nodes) {\n\t\tfor (const targetPath of node.issue.dependsOn ?? []) for (const target of nodesByPath.get(pathKey(targetPath)) ?? []) addDependency(node, target);\n\t\tfor (const ancestor of nearestAncestors(node.issue.path, nodesByPath)) addDependency(node, ancestor);\n\t}\n\tconst ready = nodes.filter((node) => node.inDegree === 0);\n\tconst order = [];\n\twhile (ready.length > 0) {\n\t\tlet best;\n\t\tfor (const candidate of ready) if (best === void 0 || candidate.key < best.key) best = candidate;\n\t\tif (best === void 0) break;\n\t\tready.splice(ready.indexOf(best), 1);\n\t\torder.push(best);\n\t\tfor (const next of best.outgoing) {\n\t\t\tnext.inDegree -= 1;\n\t\t\tif (next.inDegree === 0) ready.push(next);\n\t\t}\n\t}\n\tif (order.length !== nodes.length) {\n\t\tconst placed = new Set(order);\n\t\tthrow new InternalError(`orderIssuesByDependencies: dependency cycle among schema-diff issues (unresolved: ${nodes.filter((node) => !placed.has(node)).map((node) => node.issue.path.join(\"/\")).join(\", \")})`);\n\t}\n\treturn order.map((node) => node.issue);\n}\n//#endregion\n//#region src/control/schema-diff.ts\n/**\n* The outcome an issue represents, discriminated by presence rather than any\n* stored field — the single source of truth every consumer reads. An issue\n* always carries at least one side by construction; neither is a malformed\n* issue and throws.\n*/\nfunction issueOutcome(issue) {\n\tconst hasExpected = issue.expected !== void 0;\n\tconst hasActual = issue.actual !== void 0;\n\tif (hasExpected && hasActual) return \"not-equal\";\n\tif (hasExpected) return \"not-found\";\n\tif (hasActual) return \"not-expected\";\n\tthrow new InternalError(`issueOutcome: issue at \"${issue.path.join(\"/\")}\" carries neither an expected nor an actual node`);\n}\n/** Delimiter joining `nodeKind` and `id` into one sibling-map key. Every `nodeKind` is a code-defined literal (kebab-case-style), so a null character can never appear in one. */\nconst SIBLING_KEY_DELIMITER = \"\\0\";\nfunction siblingKey(node) {\n\treturn `${node.nodeKind}${SIBLING_KEY_DELIMITER}${node.id}`;\n}\nfunction insertNode(map, node) {\n\tconst key = siblingKey(node);\n\tif (map.has(key)) throw new InternalError(`diffSchemas: duplicate id among siblings: ${node.nodeKind}/${node.id}`);\n\tmap.set(key, node);\n}\nfunction emitMissingSubtree(node, parentPath) {\n\tconst path = [...parentPath, node.id];\n\treturn [{\n\t\tpath,\n\t\texpected: node\n\t}, ...node.children().flatMap((c) => emitMissingSubtree(c, path))];\n}\nfunction emitExtraSubtree(node, parentPath) {\n\tconst path = [...parentPath, node.id];\n\treturn [{\n\t\tpath,\n\t\tactual: node\n\t}, ...node.children().flatMap((c) => emitExtraSubtree(c, path))];\n}\n/**\n* Diff two schema trees starting from their roots.\n*\n* The differ is **total**: every node-level difference is reported. An unmatched\n* non-leaf node emits its own issue and descends, emitting an issue for every\n* node in the missing/extra subtree. Coalescing a parent change over its\n* children is the planner's responsibility. Ownership filtering (dropping `extra`\n* issues in namespaces a contract doesn't own) is the caller's responsibility.\n*/\nfunction diffSchemas(expected, actual) {\n\treturn mirrorDependsOnOntoIssues(diffPair(expected, actual, []));\n}\nfunction schemaNodeRefKey(ref) {\n\treturn ref.map((step) => step.id).join(SIBLING_KEY_DELIMITER);\n}\nfunction issuePathKey(path) {\n\treturn path.join(SIBLING_KEY_DELIMITER);\n}\nfunction terminalNodeKind(issue) {\n\treturn (issue.expected ?? issue.actual)?.nodeKind;\n}\n/**\n* Copies each issue's node's `dependsOn` refs onto the issue itself, as\n* issue-to-issue path references. A ref is kept only when some emitted issue\n* sits at that exact path AND that issue's node `nodeKind` matches the ref's\n* last step — otherwise the ref is dropped (its target either didn't\n* change, or was never part of either tree; either way the dependency is\n* satisfied by reality, not by an operation this diff will produce).\n*\n* The path index is a multimap: two siblings may share an `id` under\n* different `nodeKind`s (a role and a namespace named alike), so an id-path\n* alone is ambiguous. The ref's terminal `nodeKind` disambiguates — the ref\n* resolves only against a same-path issue whose own node carries that kind.\n*/\nfunction mirrorDependsOnOntoIssues(issues) {\n\tconst issuesByPath = /* @__PURE__ */ new Map();\n\tfor (const issue of issues) {\n\t\tconst key = issuePathKey(issue.path);\n\t\tconst bucket = issuesByPath.get(key);\n\t\tif (bucket === void 0) issuesByPath.set(key, [issue]);\n\t\telse bucket.push(issue);\n\t}\n\treturn issues.map((issue) => {\n\t\tconst refs = (issue.expected ?? issue.actual)?.dependsOn;\n\t\tif (refs === void 0 || refs.length === 0) return issue;\n\t\tconst dependsOn = refs.flatMap((ref) => {\n\t\t\tconst lastStep = ref[ref.length - 1];\n\t\t\tif (lastStep === void 0) return [];\n\t\t\tif (!(issuesByPath.get(schemaNodeRefKey(ref)) ?? []).some((c) => terminalNodeKind(c) === lastStep.nodeKind)) return [];\n\t\t\treturn [ref.map((step) => step.id)];\n\t\t});\n\t\tif (dependsOn.length === 0) return issue;\n\t\treturn {\n\t\t\t...issue,\n\t\t\tdependsOn\n\t\t};\n\t});\n}\nfunction diffPair(expected, actual, parentPath) {\n\tconst path = [...parentPath, expected.id];\n\tconst issues = [];\n\tif (!expected.isEqualTo(actual)) issues.push({\n\t\tpath,\n\t\texpected,\n\t\tactual\n\t});\n\tissues.push(...diffChildren(expected.children(), actual.children(), path));\n\treturn issues;\n}\n/**\n* Align one level of nodes by `(nodeKind, id)`; emit issues in input order\n* and recurse.\n*\n* A missing node emits one issue for itself and one for every node in its\n* subtree (total descent). Same for extra nodes. A matched pair recurses via\n* `diffPair`.\n*/\nfunction diffChildren(expected, actual, parentPath) {\n\tconst expectedMap = /* @__PURE__ */ new Map();\n\tfor (const node of expected) insertNode(expectedMap, node);\n\tconst actualMap = /* @__PURE__ */ new Map();\n\tfor (const node of actual) insertNode(actualMap, node);\n\tconst issues = [];\n\tfor (const [key, expectedNode] of expectedMap) {\n\t\tconst actualNode = actualMap.get(key);\n\t\tif (actualNode === void 0) issues.push(...emitMissingSubtree(expectedNode, parentPath));\n\t\telse issues.push(...diffPair(expectedNode, actualNode, parentPath));\n\t}\n\tfor (const [key, actualNode] of actualMap) if (!expectedMap.has(key)) issues.push(...emitExtraSubtree(actualNode, parentPath));\n\treturn issues;\n}\n/**\n* The result of diffing a contract's expected schema against the introspected\n* actual schema: one node-typed issue list. Carries no verdict, verification\n* tree, or counts — those are the verifier's own presentation, built from the\n* same underlying comparison.\n*\n* `TNode` is the concrete schema-IR node the issues carry; it defaults to\n* `DiffableNode`, so this is purely additive — a caller that wants the\n* concrete node opts in (the Postgres planner uses the concrete node type),\n* everyone else keeps the default unchanged.\n*/\nvar SchemaDiff = class SchemaDiff {\n\tissues;\n\tconstructor(issues) {\n\t\tthis.issues = issues;\n\t}\n\t/** Returns a new `SchemaDiff` narrowed to the issues `keep` returns true for. */\n\tfilter(keep) {\n\t\treturn new SchemaDiff(this.issues.filter(keep));\n\t}\n};\n//#endregion\n//#region src/control/verifier-disposition.ts\n/**\n* Grades a target-neutral issue category against a control policy.\n*\n* - `observed` warns on everything.\n* - `tolerated` suppresses only an extra nested element (everything else fails).\n* - `external` suppresses every extra category and value drift (existence and\n* declared-shape divergences still fail).\n* - `managed` (and any other) fails.\n*/\nfunction dispositionForCategory(controlPolicy, category) {\n\tif (controlPolicy === \"observed\") return \"warn\";\n\tif (controlPolicy === \"tolerated\" && category === \"extraNestedElement\") return \"suppress\";\n\tif (controlPolicy === \"external\") {\n\t\tif (category === \"extraNestedElement\" || category === \"extraAuxiliary\" || category === \"extraTopLevelObject\" || category === \"valueDrift\") return \"suppress\";\n\t}\n\treturn \"fail\";\n}\n//#endregion\nexport { APP_SPACE_ID, CONTRACT_SNAPSHOTS_DIRNAME, SchemaDiff, SchemaTreeNode, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, assembleAuthoringContributions, assembleControlMutationDefaults, assertUniqueCodecOwner, buildExtensionLoadOrder, contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, createControlStack, diffSchemas, dispositionForCategory, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractQueryOperationTypeImports, hasMigrations, hasOperationPreview, hasPslContractInfer, hasSchemaSubjectClassifier, hasSchemaView, issueOutcome, orderIssuesByDependencies, storageHashHex };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;AAOA,MAAM,6BAA6B;AACnC,MAAM,uBAAuB;;AAE7B,SAAS,eAAe,aAAa;CACpC,IAAI,CAAC,qBAAqB,KAAK,WAAW,GAAG,MAAM,IAAI,cAAc,yBAAyB,YAAY,wCAAwC;CAClJ,OAAO;AACR;;AAEA,SAAS,8BAA8B,qBAAqB,aAAa;CACxE,OAAO,GAAG,oBAAoB,GAAG,eAAe,WAAW,EAAE;AAC9D;;AAEA,SAAS,+BAA+B,qBAAqB,aAAa;CACzE,OAAO,GAAG,oBAAoB,GAAG,eAAe,WAAW,EAAE;AAC9D;AAGA,SAAS,cAAc,QAAQ;CAC9B,OAAO,gBAAgB,UAAU,CAAC,CAAC,OAAO;AAC3C;AACA,SAAS,cAAc,UAAU;CAChC,OAAO,kBAAkB,YAAY,OAAO,SAAS,oBAAoB;AAC1E;AACA,SAAS,oBAAoB,UAAU;CACtC,OAAO,sBAAsB,YAAY,OAAO,SAAS,wBAAwB;AAClF;AACA,SAAS,oBAAoB,UAAU;CACtC,OAAO,wBAAwB,YAAY,OAAO,SAAS,0BAA0B;AACtF;AACA,SAAS,2BAA2B,UAAU;CAC7C,OAAO,gCAAgC,YAAY,OAAO,SAAS,kCAAkC,cAAc,wBAAwB,YAAY,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