@prisma/orm-framework 8.0.0-rc.1-dev.39 → 8.0.0-rc.1-dev.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/{codec-4A4n5x6T.mjs → codec-Cd0QcxAx.mjs} +2 -2
  2. package/dist/{codec-4A4n5x6T.mjs.map → codec-Cd0QcxAx.mjs.map} +1 -1
  3. package/dist/components.mjs +3 -3
  4. package/dist/components__authoring.mjs +1 -1
  5. package/dist/components__codec.mjs +1 -1
  6. package/dist/components__control.mjs +1 -1
  7. package/dist/contract-authoring.mjs +2 -2
  8. package/dist/contract.mjs +2 -2
  9. package/dist/contract__default-namespace.mjs +1 -1
  10. package/dist/contract__types.mjs +2 -2
  11. package/dist/{control-C9JfxzPo-C4JAdFMg.mjs → control-C9JfxzPo-CxCL2sxo.mjs} +2 -2
  12. package/dist/{control-C9JfxzPo-C4JAdFMg.mjs.map → control-C9JfxzPo-CxCL2sxo.mjs.map} +1 -1
  13. package/dist/{control-DuiafB_U.mjs → control-DLEm6u5m.mjs} +2 -2
  14. package/dist/{control-DuiafB_U.mjs.map → control-DLEm6u5m.mjs.map} +1 -1
  15. package/dist/{control-ql9N9u4f-Dz4QqSR1.d.mts → control-ql9N9u4f-r3Vv41kZ.d.mts} +2 -2
  16. package/dist/{control-ql9N9u4f-Dz4QqSR1.d.mts.map → control-ql9N9u4f-r3Vv41kZ.d.mts.map} +1 -1
  17. package/dist/{default-namespace-D4vCwkXg-yt1Ch4tq.mjs → default-namespace-D4vCwkXg-lzVN7gSc.mjs} +2 -2
  18. package/dist/{default-namespace-D4vCwkXg-yt1Ch4tq.mjs.map → default-namespace-D4vCwkXg-lzVN7gSc.mjs.map} +1 -1
  19. package/dist/{dist-CC1FPJKo.mjs → dist-Dqbo77p7.mjs} +2 -2
  20. package/dist/{dist-CC1FPJKo.mjs.map → dist-Dqbo77p7.mjs.map} +1 -1
  21. package/dist/errors.d.mts +3 -3
  22. package/dist/errors.mjs +3 -3
  23. package/dist/errors__control.d.mts +1 -1
  24. package/dist/errors__control.mjs +1 -1
  25. package/dist/errors__execution.d.mts +1 -1
  26. package/dist/errors__execution.mjs +1 -1
  27. package/dist/errors__migration.d.mts +1 -1
  28. package/dist/errors__migration.mjs +1 -1
  29. package/dist/{execution-B22Eq7-n.mjs → execution-C_Bu-Fia.mjs} +2 -2
  30. package/dist/{execution-B22Eq7-n.mjs.map → execution-C_Bu-Fia.mjs.map} +1 -1
  31. package/dist/{execution-Dpiw50TH.d.mts → execution-D3yaOlOT.d.mts} +3 -3
  32. package/dist/{execution-Dpiw50TH.d.mts.map → execution-D3yaOlOT.d.mts.map} +1 -1
  33. package/dist/{framework-authoring-CDEvlouU-CD43IJTJ.mjs → framework-authoring-CDEvlouU-DKklu-fL.mjs} +2 -2
  34. package/dist/{framework-authoring-CDEvlouU-CD43IJTJ.mjs.map → framework-authoring-CDEvlouU-DKklu-fL.mjs.map} +1 -1
  35. package/dist/ids.mjs +1 -1
  36. package/dist/{migration-jmLnbo_A.mjs → migration-5zFMadnp.mjs} +2 -2
  37. package/dist/{migration-jmLnbo_A.mjs.map → migration-5zFMadnp.mjs.map} +1 -1
  38. package/dist/{migration-CSc3ZZK3.d.mts → migration-DOIs8GBr.d.mts} +2 -2
  39. package/dist/{migration-CSc3ZZK3.d.mts.map → migration-DOIs8GBr.d.mts.map} +1 -1
  40. package/dist/operations.mjs +1 -1
  41. package/dist/psl-parser.mjs +1 -1
  42. package/dist/psl-parser__format.mjs +1 -1
  43. package/dist/psl-printer.mjs +2 -2
  44. package/dist/{structured-error-BBdCpY44.d.mts → structured-error-BsNT4Hun.d.mts} +4 -2
  45. package/dist/{structured-error-BBdCpY44.d.mts.map → structured-error-BsNT4Hun.d.mts.map} +1 -1
  46. package/dist/{structured-error-xG_PRmbb.mjs → structured-error-CgiSMpdU.mjs} +7 -3
  47. package/dist/structured-error-CgiSMpdU.mjs.map +1 -0
  48. package/dist/ts-render.mjs +1 -1
  49. package/dist/{types-B1qkza2E.mjs → types-BnH4zYvN.mjs} +2 -2
  50. package/dist/{types-B1qkza2E.mjs.map → types-BnH4zYvN.mjs.map} +1 -1
  51. package/dist/utils.d.mts +2 -2
  52. package/dist/utils.mjs +2 -2
  53. package/dist/utils__structured-error.d.mts +2 -2
  54. package/dist/utils__structured-error.mjs +2 -2
  55. package/package.json +15 -15
  56. package/dist/structured-error-xG_PRmbb.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"framework-authoring-CDEvlouU-CD43IJTJ.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/framework-authoring-CDEvlouU.mjs"],"sourcesContent":["import { n as runtimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { isColumnDefaultLiteralInputValue, isExecutionMutationDefaultValue } from \"@internal/contract/types\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/shared/framework-authoring.ts\nconst AUTHORING_WARNING_BATCH_THRESHOLD = 5;\n/**\n* Emits collected authoring warnings once per build, grouped by `code`:\n* a group at or below the threshold itemizes every `message`; above it,\n* one summary — `\"<count> <summary>\"` followed by the `item` lines — so\n* a build with many hits of one kind does not wall-of-text, and warnings\n* of different codes never batch into each other's summary.\n*/\nfunction flushAuthoringWarnings(warnings) {\n\tconst groups = /* @__PURE__ */ new Map();\n\tfor (const warning of warnings) {\n\t\tconst key = `${warning.code}\\u0000${warning.summary}`;\n\t\tconst group = groups.get(key) ?? [];\n\t\tgroup.push(warning);\n\t\tgroups.set(key, group);\n\t}\n\tfor (const group of groups.values()) {\n\t\tconst first = group[0];\n\t\tif (first === void 0) continue;\n\t\tif (group.length <= AUTHORING_WARNING_BATCH_THRESHOLD) {\n\t\t\tfor (const warning of group) process.emitWarning(warning.message, { code: warning.code });\n\t\t\tcontinue;\n\t\t}\n\t\tprocess.emitWarning(`${group.length} ${first.summary}\\n${group.map((w) => ` - ${w.item}`).join(\"\\n\")}`, { code: first.code });\n\t}\n}\n/**\n* Classifies an `enum` block's members (before codec decoding, which needs\n* the codec chosen first) into which default codec an omitted `@@type`\n* should resolve to:\n*\n* - every member is `bare`, or a `value` whose raw JSON is a string → `'text'`\n* - every member is a `value` whose raw JSON is an integer → `'int'`\n* - anything else (float, bigint, boolean, mixed, or a `ref`/`option`/`list`\n* parameter) → `null`, meaning the caller must require an explicit `@@type`.\n*/\nfunction classifyEnumMemberType(block) {\n\tlet sawText = false;\n\tlet sawInt = false;\n\tfor (const paramValue of Object.values(block.parameters)) {\n\t\tif (paramValue.kind === \"bare\") {\n\t\t\tsawText = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (paramValue.kind !== \"value\") return null;\n\t\tlet jsonValue;\n\t\ttry {\n\t\t\tjsonValue = JSON.parse(paramValue.raw);\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t\tif (typeof jsonValue === \"string\") sawText = true;\n\t\telse if (typeof jsonValue === \"number\" && Number.isInteger(jsonValue)) sawInt = true;\n\t\telse return null;\n\t}\n\tif (sawText && sawInt) return null;\n\tif (sawText) return \"text\";\n\tif (sawInt) return \"int\";\n\treturn null;\n}\n/**\n* Resolves the codec id for an `enum` block. When `@@type` is absent, the codec\n* is inferred from the members via {@link classifyEnumMemberType}; otherwise the\n* explicit `@@type(\"codec\")` argument is parsed. Pushes the appropriate\n* diagnostic and returns `undefined` when neither yields a codec. `codecSpan` is\n* the span downstream codec-validation diagnostics should anchor to. Shared by\n* every family's enum factory so inference and the explicit path stay identical.\n*/\nfunction resolveEnumCodecId(block, ctx) {\n\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\tconst typeAttr = block.blockAttributes.find((a) => a.name === \"type\");\n\tif (typeAttr === void 0) {\n\t\tconst inferredKind = classifyEnumMemberType(block);\n\t\tif (inferredKind === null || ctx.enumInferenceCodecs === void 0) {\n\t\t\tctx.diagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_CANNOT_INFER_TYPE\",\n\t\t\t\tmessage: `cannot infer @@type for enum \"${block.name}\"; add an explicit @@type(...)`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: block.span\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\treturn {\n\t\t\tcodecId: ctx.enumInferenceCodecs[inferredKind],\n\t\t\tcodecSpan: block.span\n\t\t};\n\t}\n\tconst rawCodecArg = typeAttr.args[0]?.value;\n\tconst codecId = rawCodecArg?.startsWith(\"\\\"\") && rawCodecArg.endsWith(\"\\\"\") && rawCodecArg.length >= 2 ? rawCodecArg.slice(1, -1) : void 0;\n\tif (codecId === void 0) {\n\t\tctx.diagnostics?.push({\n\t\t\tcode: \"PSL_ENUM_MISSING_TYPE\",\n\t\t\tmessage: `enum \"${block.name}\" @@type attribute must have a quoted codec id argument`,\n\t\t\tsourceId,\n\t\t\tspan: typeAttr.span\n\t\t});\n\t\treturn;\n\t}\n\treturn {\n\t\tcodecId,\n\t\tcodecSpan: typeAttr.args[0]?.span ?? typeAttr.span\n\t};\n}\nfunction isAuthoringArgRef(value) {\n\tif (typeof value !== \"object\" || value === null || value.kind !== \"arg\") return false;\n\tconst { index, path } = value;\n\tif (typeof index !== \"number\" || !Number.isInteger(index) || index < 0) return false;\n\tif (path !== void 0 && (!Array.isArray(path) || path.some((s) => typeof s !== \"string\"))) return false;\n\treturn true;\n}\nfunction isAuthoringSelectRef(value) {\n\tif (!isAuthoringTemplateRecord(value) || value[\"kind\"] !== \"select\") return false;\n\tconst index = value[\"index\"];\n\tconst path = value[\"path\"];\n\tconst cases = value[\"cases\"];\n\tif (typeof index !== \"number\" || !Number.isInteger(index) || index < 0) return false;\n\tif (path !== void 0 && (!Array.isArray(path) || path.some((s) => typeof s !== \"string\"))) return false;\n\treturn typeof cases === \"object\" && cases !== null && !Array.isArray(cases);\n}\nfunction isAuthoringTemplateRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction readTemplateArgumentValue(args, index, path) {\n\tlet value = args[index];\n\tfor (const segment of path ?? []) {\n\t\tif (!isAuthoringTemplateRecord(value) || !Object.hasOwn(value, segment)) return;\n\t\tvalue = value[segment];\n\t}\n\treturn value;\n}\nfunction isAuthoringTypeConstructorDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"typeConstructor\";\n}\nfunction isAuthoringFieldPresetDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"fieldPreset\";\n}\nfunction isAuthoringEntityTypeDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"entity\";\n}\nfunction isAuthoringPslBlockDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"pslBlock\";\n}\nfunction isAuthoringModelAttributeDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"modelAttribute\";\n}\n/**\n* Returns true when `namespace` is a non-leaf key in `contributions.field`.\n*\n* `AuthoringFieldNamespace` permits a leaf descriptor at any depth — including\n* the root — so a top-level `field: { Foo: { kind: 'fieldPreset', ... } }`\n* registration must NOT be treated as a \"namespace\" with sub-paths. Callers\n* use this predicate to gate dot-namespaced lookups (e.g. PSL `@Foo.bar`).\n*/\nfunction hasRegisteredFieldNamespace(contributions, namespace) {\n\tif (contributions?.field === void 0 || !Object.hasOwn(contributions.field, namespace)) return false;\n\tconst value = contributions.field[namespace];\n\treturn value !== void 0 && !isAuthoringFieldPresetDescriptor(value);\n}\nfunction isCopyableNamespaceObject(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tconst proto = Object.getPrototypeOf(value);\n\treturn proto === Object.prototype || proto === null;\n}\n/**\n* Deep structural check run only at the composition boundary (the merge and\n* collect walkers) to classify a raw namespace-tree node as a leaf descriptor.\n* A node counts as a leaf iff its `kind` matches `descriptorKind` AND it\n* carries that kind's required fields.\n*\n* This is boundary validation over `unknown`, NOT a type-predicate: the four\n* exported `isAuthoring*Descriptor` predicates deliberately narrow on `kind`\n* alone and trust the static types. The walkers, by contrast, also receive\n* type-bypassing packs (`as unknown as never` in tests, untyped JS at runtime)\n* whose descriptor-shaped-but-incomplete nodes must be rejected rather than\n* silently treated as sub-namespaces — so the well-formedness check lives here.\n*/\nfunction isWellFormedDescriptor(value, descriptorKind) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tif (!(\"kind\" in value) || value.kind !== descriptorKind) return false;\n\tswitch (descriptorKind) {\n\t\tcase \"typeConstructor\":\n\t\tcase \"fieldPreset\": {\n\t\t\tif (!(\"output\" in value)) return false;\n\t\t\tconst output = value.output;\n\t\t\treturn typeof output === \"object\" && output !== null;\n\t\t}\n\t\tcase \"entity\": {\n\t\t\tif (!(\"discriminator\" in value) || typeof value.discriminator !== \"string\") return false;\n\t\t\tif (value.discriminator.length === 0) return false;\n\t\t\tif (!(\"output\" in value)) return false;\n\t\t\tconst output = value.output;\n\t\t\tif (typeof output !== \"object\" || output === null) return false;\n\t\t\tconst factory = \"factory\" in output ? output.factory : void 0;\n\t\t\tconst template = \"template\" in output ? output.template : void 0;\n\t\t\treturn typeof factory === \"function\" || template !== void 0;\n\t\t}\n\t\tcase \"pslBlock\": {\n\t\t\tif (!(\"keyword\" in value) || typeof value.keyword !== \"string\" || value.keyword.length === 0) return false;\n\t\t\tif (!(\"discriminator\" in value) || typeof value.discriminator !== \"string\" || value.discriminator.length === 0) return false;\n\t\t\tif (!(\"name\" in value)) return false;\n\t\t\tconst name = value.name;\n\t\t\tif (typeof name !== \"object\" || name === null) return false;\n\t\t\tif (!(\"required\" in name) || typeof name.required !== \"boolean\") return false;\n\t\t\tif (!(\"parameters\" in value)) return false;\n\t\t\tconst parameters = value.parameters;\n\t\t\treturn typeof parameters === \"object\" && parameters !== null && !Array.isArray(parameters);\n\t\t}\n\t\tcase \"modelAttribute\":\n\t\t\tif (!(\"attribute\" in value) || typeof value.attribute !== \"string\" || value.attribute.length === 0) return false;\n\t\t\tif (!(\"spec\" in value)) return false;\n\t\t\treturn \"lower\" in value && typeof value.lower === \"function\";\n\t\tdefault: return false;\n\t}\n}\nfunction deepCopyNamespace(source, descriptorKind) {\n\tconst copy = {};\n\tfor (const [key, value] of Object.entries(source)) copy[key] = isCopyableNamespaceObject(value) && !isWellFormedDescriptor(value, descriptorKind) ? deepCopyNamespace(value, descriptorKind) : value;\n\treturn copy;\n}\n/**\n* Merges `source` into `target` recursively at the descriptor-namespace\n* level. `descriptorKind` is the `kind` value ('typeConstructor',\n* 'fieldPreset', 'entity', or 'pslBlock') that identifies a descriptor\n* (terminal merge point; same-path registrations across components are\n* reported as duplicates) as opposed to a sub-namespace (recursion target).\n*\n* Path segments are validated against prototype-pollution names\n* (`__proto__`, `constructor`, `prototype`). A value that is neither a\n* recognized leaf nor a plain object — e.g. a malformed descriptor\n* where the canonical leaf guard rejected it for missing `output` —\n* is reported as an invalid contribution rather than recursed into,\n* which would either silently mangle state or infinite-loop on\n* primitive properties.\n*\n* Within-registry duplicate detection is this walker's job;\n* cross-registry detection runs separately via\n* `assertNoCrossRegistryCollisions` after merging completes.\n*/\nfunction mergeAuthoringNamespaces(target, source, path, descriptorKind, label) {\n\tconst assertSafePath = (currentPath) => {\n\t\tconst blockedSegment = currentPath.find((segment) => segment === \"__proto__\" || segment === \"constructor\" || segment === \"prototype\");\n\t\tif (blockedSegment) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Invalid authoring ${label} helper \"${currentPath.join(\".\")}\". Helper path segments must not use \"${blockedSegment}\".`);\n\t};\n\tfor (const [key, sourceValue] of Object.entries(source)) {\n\t\tconst currentPath = [...path, key];\n\t\tassertSafePath(currentPath);\n\t\tconst hasExistingValue = Object.hasOwn(target, key);\n\t\tconst existingValue = hasExistingValue ? target[key] : void 0;\n\t\tif (!hasExistingValue) {\n\t\t\ttarget[key] = isCopyableNamespaceObject(sourceValue) && !isWellFormedDescriptor(sourceValue, descriptorKind) ? deepCopyNamespace(sourceValue, descriptorKind) : sourceValue;\n\t\t\tcontinue;\n\t\t}\n\t\tconst existingIsLeaf = isWellFormedDescriptor(existingValue, descriptorKind);\n\t\tconst sourceIsLeaf = isWellFormedDescriptor(sourceValue, descriptorKind);\n\t\tif (existingIsLeaf || sourceIsLeaf) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Duplicate authoring ${label} helper \"${currentPath.join(\".\")}\". Helper names must be unique across composed packs.`);\n\t\tif (!isCopyableNamespaceObject(existingValue) || !isCopyableNamespaceObject(sourceValue)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Invalid authoring ${label} helper \"${currentPath.join(\".\")}\". Expected a sub-namespace object or a recognized descriptor; received a malformed value.`);\n\t\tmergeAuthoringNamespaces(existingValue, sourceValue, currentPath, descriptorKind, label);\n\t}\n}\n/**\n* Collects the full dotted paths of every well-formed descriptor of\n* `descriptorKind` in a raw contribution tree, using the same boundary\n* classification as {@link mergeAuthoringNamespaces}. Lets assembly-level\n* callers attribute each contributed path to its contributing component\n* before merging, so a same-path collision can be reported naming both\n* contributors.\n*/\nfunction collectContributedDescriptorPaths(namespace, descriptorKind, path = []) {\n\tconst paths = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isWellFormedDescriptor(value, descriptorKind)) {\n\t\t\tpaths.push(currentPath.join(\".\"));\n\t\t\tcontinue;\n\t\t}\n\t\tif (isCopyableNamespaceObject(value)) paths.push(...collectContributedDescriptorPaths(value, descriptorKind, currentPath));\n\t}\n\treturn paths;\n}\n/**\n* Derives the scalar view of an assembled authoring type namespace: every\n* **top-level** type constructor that is instantiable with an empty argument\n* list — all declared args optional and no entity-ref argument. A bare type\n* name `T` in a schema is semantically the zero-arg instantiation `T()`, so\n* each entry is exactly what that call produces (defaulted template values\n* applied, absent optional-arg typeParams keys omitted). Constructors\n* registered under a namespace segment, constructors with required args, and\n* entity-ref constructors are not scalars and are excluded.\n*\n* Eligibility needs no template inspection: templates that cannot resolve\n* for their legal call shapes are rejected at the composition boundary by\n* {@link assertResolvableTypeConstructorTemplates}, so the zero-arg\n* instantiation below cannot fail for an eligible constructor.\n*/\nfunction collectScalarTypeConstructors(namespace) {\n\tconst result = /* @__PURE__ */ new Map();\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tif (!isAuthoringTypeConstructorDescriptor(value)) continue;\n\t\tif (value.entityRefArg !== void 0) continue;\n\t\tif (value.args?.some((arg) => arg.optional !== true)) continue;\n\t\tresult.set(name, instantiateAuthoringTypeConstructor(value, []));\n\t}\n\treturn result;\n}\nfunction visitTemplateArgRefs(template, visit) {\n\tif (template === void 0) return;\n\tif (isAuthoringArgRef(template)) {\n\t\tvisit(template);\n\t\tvisitTemplateArgRefs(template.default, visit);\n\t\treturn;\n\t}\n\tif (Array.isArray(template)) {\n\t\tfor (const value of template) visitTemplateArgRefs(value, visit);\n\t\treturn;\n\t}\n\tif (typeof template === \"object\" && template !== null) for (const value of Object.values(template)) visitTemplateArgRefs(value, visit);\n}\n/**\n* Boundary validation for a contributed authoring type namespace, called\n* per contributing component at assembly (which supplies `contributedBy`\n* for attribution). Rejects what the types cannot express — entity-ref\n* constructors are skipped (their output derives from the referenced\n* entity): a plain constructor must declare its output storage type name,\n* and every `typeParams` arg-ref (including refs inside arg-ref defaults)\n* must point at a declared argument index.\n*/\nfunction assertResolvableTypeConstructorTemplates(namespace, contributedBy, path = []) {\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, name];\n\t\tif (!isAuthoringTypeConstructorDescriptor(value)) {\n\t\t\tassertResolvableTypeConstructorTemplates(value, contributedBy, currentPath);\n\t\t\tcontinue;\n\t\t}\n\t\tif (value.entityRefArg !== void 0) continue;\n\t\tconst args = value.args ?? [];\n\t\tconst invalid = (detail) => /* @__PURE__ */ new Error(`Invalid authoring type constructor \"${currentPath.join(\".\")}\" contributed by descriptor \"${contributedBy}\". ${detail}`);\n\t\tif (value.output.nativeType === void 0) throw invalid(\"The output declares no storage type template and no entityRefArg; a plain constructor must declare one.\");\n\t\tfor (const [key, template] of Object.entries(value.output.typeParams ?? {})) visitTemplateArgRefs(template, (ref) => {\n\t\t\tif (args[ref.index] === void 0) throw invalid(`output.typeParams.${key} references argument ${ref.index}, but the constructor declares ${args.length} argument(s). Declare the argument or correct the reference index.`);\n\t\t});\n\t}\n}\nfunction collectDescriptorPaths(namespace, isLeaf, path = []) {\n\tconst paths = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tpaths.push(currentPath.join(\".\"));\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) paths.push(...collectDescriptorPaths(value, isLeaf, currentPath));\n\t}\n\treturn paths;\n}\nfunction collectDescriptorEntries(namespace, isLeaf, descriptorKind, label, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, descriptorKind)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring ${label} contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the ${label} descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tif (value.discriminator.length > 0) entries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.discriminator\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tif ((record[\"kind\"] !== void 0 || record[\"keyword\"] !== void 0 || record[\"discriminator\"] !== void 0) && !isLeaf(value)) {\n\t\t\t\tconst hasKind = record[\"kind\"] === \"pslBlock\";\n\t\t\t\tconst hasKeyword = typeof record[\"keyword\"] === \"string\";\n\t\t\t\tconst hasDiscriminator = typeof record[\"discriminator\"] === \"string\";\n\t\t\t\tif (hasKind || hasKeyword && hasDiscriminator) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring ${label} contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the ${label} descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\t}\n\t\t\tentries.push(...collectDescriptorEntries(value, isLeaf, descriptorKind, label, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Throws when two or more entries in the same namespace share a key. A\n* duplicate key makes dispatch ambiguous — the caller's lookup dispatches by\n* this key, so one entry would silently shadow the other. Catch duplicates\n* before building any dispatch map.\n*\n* `label` (e.g. `'pslBlock'`, `'entityType'`) names which namespace the\n* duplicate was found in and is carried in the structured error metadata;\n* the key itself is always called `key` in both the message and the\n* metadata, since what it semantically represents (a discriminator for\n* `entityType`, the parser's dispatch keyword for `pslBlock`) is the\n* caller's concern, not this function's.\n*/\nfunction assertUniqueDiscriminators(entries, label) {\n\tconst seen = /* @__PURE__ */ new Map();\n\tfor (const { path, discriminator: key } of entries) {\n\t\tconst existing = seen.get(key);\n\t\tif (existing !== void 0) throw runtimeError(\"RUNTIME.DUPLICATE_AUTHORING_DISCRIMINATOR\", `Duplicate ${label} key \"${key}\" registered at both \"${existing}\" and \"${path}\". Each ${label} contribution must use a unique key.`, {\n\t\t\tlabel,\n\t\t\tkey,\n\t\t\texistingPath: existing,\n\t\t\tpath\n\t\t});\n\t\tseen.set(key, path);\n\t}\n}\nfunction collectPslBlockDescriptorEntries(namespace, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isAuthoringPslBlockDescriptor(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, \"pslBlock\")) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring pslBlock contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the pslBlock descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.discriminator,\n\t\t\t\tkeyword: value.keyword\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tconst hasKind = record[\"kind\"] === \"pslBlock\";\n\t\t\tconst hasKeyword = typeof record[\"keyword\"] === \"string\";\n\t\t\tconst hasDiscriminator = typeof record[\"discriminator\"] === \"string\";\n\t\t\tif (hasKind || hasKeyword && hasDiscriminator) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring pslBlock contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the pslBlock descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push(...collectPslBlockDescriptorEntries(value, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Every `pslBlockDescriptors` entry requires a matching `entityTypes` factory\n* with the same discriminator. An `entityTypes` factory may stand alone (e.g.\n* `enum`, reachable from the TypeScript builder without any PSL block).\n*\n* Uniqueness for pslBlock entries is keyed on **keyword**, not discriminator:\n* several keywords (e.g. `policy_select`/`policy_insert`) may legitimately\n* share one discriminator, routing to the same `entityTypes` factory and the\n* same `entries[discriminator]` slot — that N:1 shape is exactly what lets\n* one entity kind be authored through several PSL keywords. What must stay\n* unique is the keyword itself, since that's what the parser dispatches on.\n*/\nfunction assertPslBlocksHaveFactories(entityTypeNamespace, pslBlockNamespace) {\n\tconst blockEntries = collectPslBlockDescriptorEntries(pslBlockNamespace);\n\tconst entityEntries = collectDescriptorEntries(entityTypeNamespace, isAuthoringEntityTypeDescriptor, \"entity\", \"entityType\");\n\tassertUniqueDiscriminators(blockEntries.map((entry) => ({\n\t\tpath: entry.path,\n\t\tdiscriminator: entry.keyword\n\t})), \"pslBlock\");\n\tassertUniqueDiscriminators(entityEntries, \"entityType\");\n\tconst entityDiscriminators = new Set(entityEntries.map((entry) => entry.discriminator));\n\tfor (const block of blockEntries) if (!entityDiscriminators.has(block.discriminator)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Incomplete extension contribution: pslBlock helper \"${block.path}\" registers discriminator \"${block.discriminator}\" but no entityType contribution shares that discriminator. An extension-contributed PSL block requires a matching entityType factory so the parsed AST node can lower to an IR class instance; add an entityType helper with discriminator \"${block.discriminator}\".`);\n}\nfunction collectModelAttributeEntries(namespace, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isAuthoringModelAttributeDescriptor(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, \"modelAttribute\")) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring modelAttribute contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/attribute) but does not satisfy the modelAttribute descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.attribute\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tif (typeof record[\"attribute\"] === \"string\" && \"spec\" in record) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring modelAttribute contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/attribute) but does not satisfy the modelAttribute descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push(...collectModelAttributeEntries(value, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Throws when two modelAttribute contributions — at any paths, even\n* different ones — claim the same bare `@@` attribute name. The family\n* interpreter dispatches by attribute name, not by registration path, so\n* two descriptors claiming the same name would have one silently shadow\n* the other.\n*/\nfunction assertUniqueModelAttributeNames(entries) {\n\tconst seen = /* @__PURE__ */ new Map();\n\tfor (const { path, discriminator: attribute } of entries) {\n\t\tconst existing = seen.get(attribute);\n\t\tif (existing !== void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Duplicate modelAttribute \"${attribute}\" registered at both \"${existing}\" and \"${path}\". Each modelAttribute contribution must claim a unique attribute name.`);\n\t\tseen.set(attribute, path);\n\t}\n}\nfunction assertNoCrossRegistryCollisions(typeNamespace, fieldNamespace, entityTypeNamespace = {}, pslBlockNamespace = {}, modelAttributeNamespace = {}) {\n\tconst typePaths = new Set(collectDescriptorPaths(typeNamespace, isAuthoringTypeConstructorDescriptor));\n\tconst fieldPaths = new Set(collectDescriptorPaths(fieldNamespace, isAuthoringFieldPresetDescriptor));\n\tconst entityPaths = new Set(collectDescriptorPaths(entityTypeNamespace, isAuthoringEntityTypeDescriptor));\n\tconst ambiguityHint = \"Register each path in only one of authoringContributions.field / authoringContributions.type / authoringContributions.entityTypes.\";\n\tfor (const fieldPath of fieldPaths) if (typePaths.has(fieldPath)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Ambiguous authoring registry path \"${fieldPath}\". The same path is registered as both a type constructor and a field preset; PSL resolution would be ambiguous. ${ambiguityHint}`);\n\tfor (const entityPath of entityPaths) if (typePaths.has(entityPath) || fieldPaths.has(entityPath)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Ambiguous authoring registry path \"${entityPath}\". The same path is registered as an entity contribution AND as a type constructor or field preset; PSL resolution would be ambiguous. ${ambiguityHint}`);\n\tassertPslBlocksHaveFactories(entityTypeNamespace, pslBlockNamespace);\n\tassertUniqueModelAttributeNames(collectModelAttributeEntries(modelAttributeNamespace));\n\tassertSelectTemplatesMatchOptionArgs(typeNamespace, fieldNamespace, entityTypeNamespace);\n}\nfunction collectDescriptorNodes(namespace, isLeaf, path = []) {\n\tconst nodes = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tnodes.push([currentPath.join(\".\"), value]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) nodes.push(...collectDescriptorNodes(value, isLeaf, currentPath));\n\t}\n\treturn nodes;\n}\nfunction collectSelectRefs(value, found) {\n\tif (typeof value !== \"object\" || value === null) return;\n\tif (isAuthoringSelectRef(value)) {\n\t\tfound.push(value);\n\t\tfor (const caseTemplate of Object.values(value.cases)) collectSelectRefs(caseTemplate, found);\n\t\treturn;\n\t}\n\tif (isAuthoringArgRef(value)) {\n\t\tcollectSelectRefs(value.default, found);\n\t\treturn;\n\t}\n\tif (Array.isArray(value)) {\n\t\tfor (const entry of value) collectSelectRefs(entry, found);\n\t\treturn;\n\t}\n\tfor (const entry of Object.values(value)) collectSelectRefs(entry, found);\n}\nfunction validateSelectRefsAgainstArgs(label, helperPath, args, templateRoot) {\n\tconst selects = [];\n\tcollectSelectRefs(templateRoot, selects);\n\tfor (const select of selects) {\n\t\tconst position = `#${select.index + 1}`;\n\t\tlet descriptor = args?.[select.index];\n\t\tif (descriptor === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position}, but the helper declares no argument at that position.`);\n\t\tfor (const segment of select.path ?? []) {\n\t\t\tdescriptor = descriptor.kind === \"object\" ? descriptor.properties[segment] : void 0;\n\t\t\tif (descriptor === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position} at path \"${(select.path ?? []).join(\".\")}\", which does not resolve to a declared argument property.`);\n\t\t}\n\t\tif (descriptor.kind !== \"option\") throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position}, which is kind \"${descriptor.kind}\"; select requires an option argument.`);\n\t\tconst argumentLabel = descriptor.name !== void 0 ? `\"${descriptor.name}\"` : position;\n\t\tconst missing = descriptor.values.filter((value) => !Object.hasOwn(select.cases, value));\n\t\tif (missing.length > 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" option argument ${argumentLabel} allows [${descriptor.values.join(\", \")}] but the select template has no case for: ${missing.join(\", \")}.`);\n\t\tconst values = descriptor.values;\n\t\tconst unreachable = Object.keys(select.cases).filter((key) => !values.includes(key));\n\t\tif (unreachable.length > 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template has case(s) not allowed by option argument ${argumentLabel}: ${unreachable.join(\", \")}. Allowed values: [${values.join(\", \")}].`);\n\t}\n}\n/**\n* Every `select` template node must target an option argument whose `values`\n* exactly cover the node's `cases` — a legal token with no case and a case no\n* token can reach are both declaration bugs, caught here at pack-registration\n* time rather than at first resolution.\n*/\nfunction assertSelectTemplatesMatchOptionArgs(typeNamespace, fieldNamespace, entityTypeNamespace) {\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(fieldNamespace, isAuthoringFieldPresetDescriptor)) validateSelectRefsAgainstArgs(\"field\", helperPath, descriptor.args, descriptor.output);\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(typeNamespace, isAuthoringTypeConstructorDescriptor)) validateSelectRefsAgainstArgs(\"type\", helperPath, descriptor.args, descriptor.output);\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(entityTypeNamespace, isAuthoringEntityTypeDescriptor)) if (\"template\" in descriptor.output) validateSelectRefsAgainstArgs(\"entityType\", helperPath, descriptor.args, descriptor.output.template);\n}\nfunction resolveAuthoringTemplateValue(template, args) {\n\tif (template === void 0) return;\n\tif (isAuthoringArgRef(template)) {\n\t\tconst value = readTemplateArgumentValue(args, template.index, template.path);\n\t\tif (value === void 0 && template.default !== void 0) return resolveAuthoringTemplateValue(template.default, args);\n\t\treturn value;\n\t}\n\tif (isAuthoringSelectRef(template)) {\n\t\tconst value = readTemplateArgumentValue(args, template.index, template.path);\n\t\tif (value === void 0) return;\n\t\tif (typeof value !== \"string\" || !Object.hasOwn(template.cases, value)) throw new InternalError(`Authoring template select has no case for value \"${String(value)}\"`);\n\t\treturn resolveAuthoringTemplateValue(template.cases[value], args);\n\t}\n\tif (Array.isArray(template)) return template.map((value) => resolveAuthoringTemplateValue(value, args));\n\tif (typeof template === \"object\" && template !== null) {\n\t\tconst resolved = {};\n\t\tfor (const [key, value] of Object.entries(template)) {\n\t\t\tconst resolvedValue = resolveAuthoringTemplateValue(value, args);\n\t\t\tif (resolvedValue !== void 0) resolved[key] = resolvedValue;\n\t\t}\n\t\treturn resolved;\n\t}\n\treturn template;\n}\nfunction validateAuthoringArgument(descriptor, value, path) {\n\tif (value === void 0) {\n\t\tif (descriptor.optional) return;\n\t\tthrow runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Missing required authoring helper argument at ${path}`);\n\t}\n\tif (descriptor.kind === \"string\") {\n\t\tif (typeof value !== \"string\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a string`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"boolean\") {\n\t\tif (typeof value !== \"boolean\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a boolean`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"stringArray\") {\n\t\tif (!Array.isArray(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an array of strings`);\n\t\tfor (const entry of value) if (typeof entry !== \"string\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an array of strings`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"object\") {\n\t\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an object`);\n\t\tconst input = value;\n\t\tconst expectedKeys = new Set(Object.keys(descriptor.properties));\n\t\tfor (const key of Object.keys(input)) if (!expectedKeys.has(key)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} contains unknown property \"${key}\"`);\n\t\tfor (const [key, propertyDescriptor] of Object.entries(descriptor.properties)) validateAuthoringArgument(propertyDescriptor, input[key], `${path}.${key}`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"option\") {\n\t\tif (typeof value !== \"string\" || !descriptor.values.includes(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be one of: ${descriptor.values.join(\", \")}`);\n\t\treturn;\n\t}\n\tif (typeof value !== \"number\" || Number.isNaN(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a number`);\n\tif (descriptor.integer && !Number.isInteger(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an integer`);\n\tif (descriptor.minimum !== void 0 && value < descriptor.minimum) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be >= ${descriptor.minimum}, received ${value}`);\n\tif (descriptor.maximum !== void 0 && value > descriptor.maximum) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be <= ${descriptor.maximum}, received ${value}`);\n}\nfunction validateAuthoringHelperArguments(helperPath, descriptors, args) {\n\tconst expected = descriptors ?? [];\n\tconst minimumArgs = expected.reduce((count, descriptor, index) => descriptor.optional ? count : index + 1, 0);\n\tif (args.length < minimumArgs || args.length > expected.length) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `${helperPath} expects ${minimumArgs === expected.length ? expected.length : `${minimumArgs}-${expected.length}`} argument(s), received ${args.length}`);\n\texpected.forEach((descriptor, index) => {\n\t\tvalidateAuthoringArgument(descriptor, args[index], `${helperPath}[${index}]`);\n\t});\n}\nfunction resolveAuthoringStorageTypeTemplate(template, args) {\n\tconst nativeType = template.nativeType;\n\tif (nativeType === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring output template for codec \"${template.codecId}\" declares no nativeType; only entity-ref constructors may omit it`);\n\tconst typeParams = template.typeParams === void 0 ? void 0 : resolveAuthoringTemplateValue(template.typeParams, args);\n\tif (typeParams !== void 0 && !isAuthoringTemplateRecord(typeParams)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring typeParams must be an object for codec \"${template.codecId}\", received ${String(typeParams)}`);\n\tconst normalizedTypeParams = typeParams !== void 0 && Object.keys(typeParams).length === 0 ? void 0 : typeParams;\n\treturn {\n\t\tcodecId: template.codecId,\n\t\tnativeType,\n\t\t...ifDefined(\"typeParams\", normalizedTypeParams)\n\t};\n}\nfunction resolveAuthoringColumnDefaultTemplate(template, args) {\n\tif (template.kind === \"literal\") {\n\t\tconst value = resolveAuthoringTemplateValue(template.value, args);\n\t\tif (value === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", \"Resolved authoring literal default must not be undefined\");\n\t\tif (!isColumnDefaultLiteralInputValue(value)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring literal default must be a JSON-serializable value or Date, received ${String(value)}`);\n\t\treturn {\n\t\t\tkind: \"literal\",\n\t\t\tvalue\n\t\t};\n\t}\n\tconst expression = resolveAuthoringTemplateValue(template.expression, args);\n\tif (expression === void 0 || typeof expression === \"object\" && expression !== null) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring function default expression must resolve to a primitive, received ${String(expression)}`);\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: String(expression)\n\t};\n}\nfunction resolveExecutionMutationDefaultPhase(phase, template, args) {\n\tconst value = resolveAuthoringTemplateValue(template, args);\n\tif (value === void 0) return;\n\tif (!isExecutionMutationDefaultValue(value)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring preset executionDefaults.${phase} did not resolve to a valid generator descriptor (kind: 'generator', id: string).`);\n\treturn value;\n}\nfunction resolveAuthoringExecutionDefaultsTemplate(template, args) {\n\tconst phases = {\n\t\t...ifDefined(\"onCreate\", template.onCreate !== void 0 ? resolveExecutionMutationDefaultPhase(\"onCreate\", template.onCreate, args) : void 0),\n\t\t...ifDefined(\"onUpdate\", template.onUpdate !== void 0 ? resolveExecutionMutationDefaultPhase(\"onUpdate\", template.onUpdate, args) : void 0)\n\t};\n\treturn Object.keys(phases).length === 0 ? void 0 : phases;\n}\nfunction instantiateAuthoringTypeConstructor(descriptor, args) {\n\treturn resolveAuthoringStorageTypeTemplate(descriptor.output, args);\n}\nfunction instantiateAuthoringEntityType(helperPath, descriptor, args, ctx) {\n\tif (\"factory\" in descriptor.output) {\n\t\tconst input = args[0];\n\t\treturn blindCast(descriptor.output.factory)(input, ctx);\n\t}\n\tvalidateAuthoringHelperArguments(helperPath, descriptor.args, args);\n\treturn blindCast(resolveAuthoringTemplateValue(descriptor.output.template, args));\n}\nfunction instantiateAuthoringFieldPreset(descriptor, args) {\n\treturn {\n\t\tdescriptor: resolveAuthoringStorageTypeTemplate(descriptor.output, args),\n\t\tnullable: descriptor.output.nullable ?? false,\n\t\t...ifDefined(\"default\", descriptor.output.default !== void 0 ? resolveAuthoringColumnDefaultTemplate(descriptor.output.default, args) : void 0),\n\t\t...ifDefined(\"executionDefaults\", descriptor.output.executionDefaults !== void 0 ? resolveAuthoringExecutionDefaultsTemplate(descriptor.output.executionDefaults, args) : void 0),\n\t\tid: descriptor.output.id ?? false,\n\t\tunique: descriptor.output.unique ?? false\n\t};\n}\n//#endregion\nexport { mergeAuthoringNamespaces as _, collectScalarTypeConstructors as a, validateAuthoringHelperArguments as b, instantiateAuthoringEntityType as c, isAuthoringArgRef as d, isAuthoringEntityTypeDescriptor as f, isAuthoringTypeConstructorDescriptor as g, isAuthoringPslBlockDescriptor as h, collectContributedDescriptorPaths as i, instantiateAuthoringFieldPreset as l, isAuthoringModelAttributeDescriptor as m, assertResolvableTypeConstructorTemplates as n, flushAuthoringWarnings as o, isAuthoringFieldPresetDescriptor as p, classifyEnumMemberType as r, hasRegisteredFieldNamespace as s, assertNoCrossRegistryCollisions as t, instantiateAuthoringTypeConstructor as u, resolveAuthoringTemplateValue as v, resolveEnumCodecId as y };\n\n//# sourceMappingURL=framework-authoring-CDEvlouU.mjs.map"],"mappings":";;;;;;AAMA,MAAM,oCAAoC;;;;;;;;AAQ1C,SAAS,uBAAuB,UAAU;CACzC,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,WAAW,UAAU;EAC/B,MAAM,MAAM,GAAG,QAAQ,KAAK,QAAQ,QAAQ;EAC5C,MAAM,QAAQ,OAAO,IAAI,GAAG,KAAK,CAAC;EAClC,MAAM,KAAK,OAAO;EAClB,OAAO,IAAI,KAAK,KAAK;CACtB;CACA,KAAK,MAAM,SAAS,OAAO,OAAO,GAAG;EACpC,MAAM,QAAQ,MAAM;EACpB,IAAI,UAAU,KAAK,GAAG;EACtB,IAAI,MAAM,UAAU,mCAAmC;GACtD,KAAK,MAAM,WAAW,OAAO,QAAQ,YAAY,QAAQ,SAAS,EAAE,MAAM,QAAQ,KAAK,CAAC;GACxF;EACD;EACA,QAAQ,YAAY,GAAG,MAAM,OAAO,GAAG,MAAM,QAAQ,IAAI,MAAM,KAAK,MAAM,OAAO,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,KAAK,EAAE,MAAM,MAAM,KAAK,CAAC;CAC9H;AACD;;;;;;;;;;;AAWA,SAAS,uBAAuB,OAAO;CACtC,IAAI,UAAU;CACd,IAAI,SAAS;CACb,KAAK,MAAM,cAAc,OAAO,OAAO,MAAM,U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AO,OAAO,CAAC,CAAC,OAAO,GAAG;CACvD;CACA,iCAAiC,YAAY,WAAW,MAAM,IAAI;CAClE,OAAO,UAAU,8BAA8B,WAAW,OAAO,UAAU,IAAI,CAAC;AACjF;AACA,SAAS,gCAAgC,YAAY,MAAM;CAC1D,OAAO;EACN,YAAY,oCAAoC,WAAW,QAAQ,IAAI;EACvE,UAAU,WAAW,OAAO,YAAY;EACxC,GAAG,UAAU,WAAW,WAAW,OAAO,YAAY,KAAK,IAAI,sCAAsC,WAAW,OAAO,SAAS,IAAI,IAAI,KAAK,CAAC;EAC9I,GAAG,UAAU,qBAAqB,WAAW,OAAO,sBAAsB,KAAK,IAAI,0CAA0C,WAAW,OAAO,mBAAmB,IAAI,IAAI,KAAK,CAAC;EAChL,IAAI,WAAW,OAAO,MAAM;EAC5B,QAAQ,WAAW,OAAO,UAAU;CACrC;AACD"}
1
+ {"version":3,"file":"framework-authoring-CDEvlouU-DKklu-fL.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/framework-authoring-CDEvlouU.mjs"],"sourcesContent":["import { n as runtimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { isColumnDefaultLiteralInputValue, isExecutionMutationDefaultValue } from \"@internal/contract/types\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/shared/framework-authoring.ts\nconst AUTHORING_WARNING_BATCH_THRESHOLD = 5;\n/**\n* Emits collected authoring warnings once per build, grouped by `code`:\n* a group at or below the threshold itemizes every `message`; above it,\n* one summary — `\"<count> <summary>\"` followed by the `item` lines — so\n* a build with many hits of one kind does not wall-of-text, and warnings\n* of different codes never batch into each other's summary.\n*/\nfunction flushAuthoringWarnings(warnings) {\n\tconst groups = /* @__PURE__ */ new Map();\n\tfor (const warning of warnings) {\n\t\tconst key = `${warning.code}\\u0000${warning.summary}`;\n\t\tconst group = groups.get(key) ?? [];\n\t\tgroup.push(warning);\n\t\tgroups.set(key, group);\n\t}\n\tfor (const group of groups.values()) {\n\t\tconst first = group[0];\n\t\tif (first === void 0) continue;\n\t\tif (group.length <= AUTHORING_WARNING_BATCH_THRESHOLD) {\n\t\t\tfor (const warning of group) process.emitWarning(warning.message, { code: warning.code });\n\t\t\tcontinue;\n\t\t}\n\t\tprocess.emitWarning(`${group.length} ${first.summary}\\n${group.map((w) => ` - ${w.item}`).join(\"\\n\")}`, { code: first.code });\n\t}\n}\n/**\n* Classifies an `enum` block's members (before codec decoding, which needs\n* the codec chosen first) into which default codec an omitted `@@type`\n* should resolve to:\n*\n* - every member is `bare`, or a `value` whose raw JSON is a string → `'text'`\n* - every member is a `value` whose raw JSON is an integer → `'int'`\n* - anything else (float, bigint, boolean, mixed, or a `ref`/`option`/`list`\n* parameter) → `null`, meaning the caller must require an explicit `@@type`.\n*/\nfunction classifyEnumMemberType(block) {\n\tlet sawText = false;\n\tlet sawInt = false;\n\tfor (const paramValue of Object.values(block.parameters)) {\n\t\tif (paramValue.kind === \"bare\") {\n\t\t\tsawText = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (paramValue.kind !== \"value\") return null;\n\t\tlet jsonValue;\n\t\ttry {\n\t\t\tjsonValue = JSON.parse(paramValue.raw);\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t\tif (typeof jsonValue === \"string\") sawText = true;\n\t\telse if (typeof jsonValue === \"number\" && Number.isInteger(jsonValue)) sawInt = true;\n\t\telse return null;\n\t}\n\tif (sawText && sawInt) return null;\n\tif (sawText) return \"text\";\n\tif (sawInt) return \"int\";\n\treturn null;\n}\n/**\n* Resolves the codec id for an `enum` block. When `@@type` is absent, the codec\n* is inferred from the members via {@link classifyEnumMemberType}; otherwise the\n* explicit `@@type(\"codec\")` argument is parsed. Pushes the appropriate\n* diagnostic and returns `undefined` when neither yields a codec. `codecSpan` is\n* the span downstream codec-validation diagnostics should anchor to. Shared by\n* every family's enum factory so inference and the explicit path stay identical.\n*/\nfunction resolveEnumCodecId(block, ctx) {\n\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\tconst typeAttr = block.blockAttributes.find((a) => a.name === \"type\");\n\tif (typeAttr === void 0) {\n\t\tconst inferredKind = classifyEnumMemberType(block);\n\t\tif (inferredKind === null || ctx.enumInferenceCodecs === void 0) {\n\t\t\tctx.diagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_CANNOT_INFER_TYPE\",\n\t\t\t\tmessage: `cannot infer @@type for enum \"${block.name}\"; add an explicit @@type(...)`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: block.span\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\treturn {\n\t\t\tcodecId: ctx.enumInferenceCodecs[inferredKind],\n\t\t\tcodecSpan: block.span\n\t\t};\n\t}\n\tconst rawCodecArg = typeAttr.args[0]?.value;\n\tconst codecId = rawCodecArg?.startsWith(\"\\\"\") && rawCodecArg.endsWith(\"\\\"\") && rawCodecArg.length >= 2 ? rawCodecArg.slice(1, -1) : void 0;\n\tif (codecId === void 0) {\n\t\tctx.diagnostics?.push({\n\t\t\tcode: \"PSL_ENUM_MISSING_TYPE\",\n\t\t\tmessage: `enum \"${block.name}\" @@type attribute must have a quoted codec id argument`,\n\t\t\tsourceId,\n\t\t\tspan: typeAttr.span\n\t\t});\n\t\treturn;\n\t}\n\treturn {\n\t\tcodecId,\n\t\tcodecSpan: typeAttr.args[0]?.span ?? typeAttr.span\n\t};\n}\nfunction isAuthoringArgRef(value) {\n\tif (typeof value !== \"object\" || value === null || value.kind !== \"arg\") return false;\n\tconst { index, path } = value;\n\tif (typeof index !== \"number\" || !Number.isInteger(index) || index < 0) return false;\n\tif (path !== void 0 && (!Array.isArray(path) || path.some((s) => typeof s !== \"string\"))) return false;\n\treturn true;\n}\nfunction isAuthoringSelectRef(value) {\n\tif (!isAuthoringTemplateRecord(value) || value[\"kind\"] !== \"select\") return false;\n\tconst index = value[\"index\"];\n\tconst path = value[\"path\"];\n\tconst cases = value[\"cases\"];\n\tif (typeof index !== \"number\" || !Number.isInteger(index) || index < 0) return false;\n\tif (path !== void 0 && (!Array.isArray(path) || path.some((s) => typeof s !== \"string\"))) return false;\n\treturn typeof cases === \"object\" && cases !== null && !Array.isArray(cases);\n}\nfunction isAuthoringTemplateRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction readTemplateArgumentValue(args, index, path) {\n\tlet value = args[index];\n\tfor (const segment of path ?? []) {\n\t\tif (!isAuthoringTemplateRecord(value) || !Object.hasOwn(value, segment)) return;\n\t\tvalue = value[segment];\n\t}\n\treturn value;\n}\nfunction isAuthoringTypeConstructorDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"typeConstructor\";\n}\nfunction isAuthoringFieldPresetDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"fieldPreset\";\n}\nfunction isAuthoringEntityTypeDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"entity\";\n}\nfunction isAuthoringPslBlockDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"pslBlock\";\n}\nfunction isAuthoringModelAttributeDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"modelAttribute\";\n}\n/**\n* Returns true when `namespace` is a non-leaf key in `contributions.field`.\n*\n* `AuthoringFieldNamespace` permits a leaf descriptor at any depth — including\n* the root — so a top-level `field: { Foo: { kind: 'fieldPreset', ... } }`\n* registration must NOT be treated as a \"namespace\" with sub-paths. Callers\n* use this predicate to gate dot-namespaced lookups (e.g. PSL `@Foo.bar`).\n*/\nfunction hasRegisteredFieldNamespace(contributions, namespace) {\n\tif (contributions?.field === void 0 || !Object.hasOwn(contributions.field, namespace)) return false;\n\tconst value = contributions.field[namespace];\n\treturn value !== void 0 && !isAuthoringFieldPresetDescriptor(value);\n}\nfunction isCopyableNamespaceObject(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tconst proto = Object.getPrototypeOf(value);\n\treturn proto === Object.prototype || proto === null;\n}\n/**\n* Deep structural check run only at the composition boundary (the merge and\n* collect walkers) to classify a raw namespace-tree node as a leaf descriptor.\n* A node counts as a leaf iff its `kind` matches `descriptorKind` AND it\n* carries that kind's required fields.\n*\n* This is boundary validation over `unknown`, NOT a type-predicate: the four\n* exported `isAuthoring*Descriptor` predicates deliberately narrow on `kind`\n* alone and trust the static types. The walkers, by contrast, also receive\n* type-bypassing packs (`as unknown as never` in tests, untyped JS at runtime)\n* whose descriptor-shaped-but-incomplete nodes must be rejected rather than\n* silently treated as sub-namespaces — so the well-formedness check lives here.\n*/\nfunction isWellFormedDescriptor(value, descriptorKind) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tif (!(\"kind\" in value) || value.kind !== descriptorKind) return false;\n\tswitch (descriptorKind) {\n\t\tcase \"typeConstructor\":\n\t\tcase \"fieldPreset\": {\n\t\t\tif (!(\"output\" in value)) return false;\n\t\t\tconst output = value.output;\n\t\t\treturn typeof output === \"object\" && output !== null;\n\t\t}\n\t\tcase \"entity\": {\n\t\t\tif (!(\"discriminator\" in value) || typeof value.discriminator !== \"string\") return false;\n\t\t\tif (value.discriminator.length === 0) return false;\n\t\t\tif (!(\"output\" in value)) return false;\n\t\t\tconst output = value.output;\n\t\t\tif (typeof output !== \"object\" || output === null) return false;\n\t\t\tconst factory = \"factory\" in output ? output.factory : void 0;\n\t\t\tconst template = \"template\" in output ? output.template : void 0;\n\t\t\treturn typeof factory === \"function\" || template !== void 0;\n\t\t}\n\t\tcase \"pslBlock\": {\n\t\t\tif (!(\"keyword\" in value) || typeof value.keyword !== \"string\" || value.keyword.length === 0) return false;\n\t\t\tif (!(\"discriminator\" in value) || typeof value.discriminator !== \"string\" || value.discriminator.length === 0) return false;\n\t\t\tif (!(\"name\" in value)) return false;\n\t\t\tconst name = value.name;\n\t\t\tif (typeof name !== \"object\" || name === null) return false;\n\t\t\tif (!(\"required\" in name) || typeof name.required !== \"boolean\") return false;\n\t\t\tif (!(\"parameters\" in value)) return false;\n\t\t\tconst parameters = value.parameters;\n\t\t\treturn typeof parameters === \"object\" && parameters !== null && !Array.isArray(parameters);\n\t\t}\n\t\tcase \"modelAttribute\":\n\t\t\tif (!(\"attribute\" in value) || typeof value.attribute !== \"string\" || value.attribute.length === 0) return false;\n\t\t\tif (!(\"spec\" in value)) return false;\n\t\t\treturn \"lower\" in value && typeof value.lower === \"function\";\n\t\tdefault: return false;\n\t}\n}\nfunction deepCopyNamespace(source, descriptorKind) {\n\tconst copy = {};\n\tfor (const [key, value] of Object.entries(source)) copy[key] = isCopyableNamespaceObject(value) && !isWellFormedDescriptor(value, descriptorKind) ? deepCopyNamespace(value, descriptorKind) : value;\n\treturn copy;\n}\n/**\n* Merges `source` into `target` recursively at the descriptor-namespace\n* level. `descriptorKind` is the `kind` value ('typeConstructor',\n* 'fieldPreset', 'entity', or 'pslBlock') that identifies a descriptor\n* (terminal merge point; same-path registrations across components are\n* reported as duplicates) as opposed to a sub-namespace (recursion target).\n*\n* Path segments are validated against prototype-pollution names\n* (`__proto__`, `constructor`, `prototype`). A value that is neither a\n* recognized leaf nor a plain object — e.g. a malformed descriptor\n* where the canonical leaf guard rejected it for missing `output` —\n* is reported as an invalid contribution rather than recursed into,\n* which would either silently mangle state or infinite-loop on\n* primitive properties.\n*\n* Within-registry duplicate detection is this walker's job;\n* cross-registry detection runs separately via\n* `assertNoCrossRegistryCollisions` after merging completes.\n*/\nfunction mergeAuthoringNamespaces(target, source, path, descriptorKind, label) {\n\tconst assertSafePath = (currentPath) => {\n\t\tconst blockedSegment = currentPath.find((segment) => segment === \"__proto__\" || segment === \"constructor\" || segment === \"prototype\");\n\t\tif (blockedSegment) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Invalid authoring ${label} helper \"${currentPath.join(\".\")}\". Helper path segments must not use \"${blockedSegment}\".`);\n\t};\n\tfor (const [key, sourceValue] of Object.entries(source)) {\n\t\tconst currentPath = [...path, key];\n\t\tassertSafePath(currentPath);\n\t\tconst hasExistingValue = Object.hasOwn(target, key);\n\t\tconst existingValue = hasExistingValue ? target[key] : void 0;\n\t\tif (!hasExistingValue) {\n\t\t\ttarget[key] = isCopyableNamespaceObject(sourceValue) && !isWellFormedDescriptor(sourceValue, descriptorKind) ? deepCopyNamespace(sourceValue, descriptorKind) : sourceValue;\n\t\t\tcontinue;\n\t\t}\n\t\tconst existingIsLeaf = isWellFormedDescriptor(existingValue, descriptorKind);\n\t\tconst sourceIsLeaf = isWellFormedDescriptor(sourceValue, descriptorKind);\n\t\tif (existingIsLeaf || sourceIsLeaf) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Duplicate authoring ${label} helper \"${currentPath.join(\".\")}\". Helper names must be unique across composed packs.`);\n\t\tif (!isCopyableNamespaceObject(existingValue) || !isCopyableNamespaceObject(sourceValue)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Invalid authoring ${label} helper \"${currentPath.join(\".\")}\". Expected a sub-namespace object or a recognized descriptor; received a malformed value.`);\n\t\tmergeAuthoringNamespaces(existingValue, sourceValue, currentPath, descriptorKind, label);\n\t}\n}\n/**\n* Collects the full dotted paths of every well-formed descriptor of\n* `descriptorKind` in a raw contribution tree, using the same boundary\n* classification as {@link mergeAuthoringNamespaces}. Lets assembly-level\n* callers attribute each contributed path to its contributing component\n* before merging, so a same-path collision can be reported naming both\n* contributors.\n*/\nfunction collectContributedDescriptorPaths(namespace, descriptorKind, path = []) {\n\tconst paths = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isWellFormedDescriptor(value, descriptorKind)) {\n\t\t\tpaths.push(currentPath.join(\".\"));\n\t\t\tcontinue;\n\t\t}\n\t\tif (isCopyableNamespaceObject(value)) paths.push(...collectContributedDescriptorPaths(value, descriptorKind, currentPath));\n\t}\n\treturn paths;\n}\n/**\n* Derives the scalar view of an assembled authoring type namespace: every\n* **top-level** type constructor that is instantiable with an empty argument\n* list — all declared args optional and no entity-ref argument. A bare type\n* name `T` in a schema is semantically the zero-arg instantiation `T()`, so\n* each entry is exactly what that call produces (defaulted template values\n* applied, absent optional-arg typeParams keys omitted). Constructors\n* registered under a namespace segment, constructors with required args, and\n* entity-ref constructors are not scalars and are excluded.\n*\n* Eligibility needs no template inspection: templates that cannot resolve\n* for their legal call shapes are rejected at the composition boundary by\n* {@link assertResolvableTypeConstructorTemplates}, so the zero-arg\n* instantiation below cannot fail for an eligible constructor.\n*/\nfunction collectScalarTypeConstructors(namespace) {\n\tconst result = /* @__PURE__ */ new Map();\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tif (!isAuthoringTypeConstructorDescriptor(value)) continue;\n\t\tif (value.entityRefArg !== void 0) continue;\n\t\tif (value.args?.some((arg) => arg.optional !== true)) continue;\n\t\tresult.set(name, instantiateAuthoringTypeConstructor(value, []));\n\t}\n\treturn result;\n}\nfunction visitTemplateArgRefs(template, visit) {\n\tif (template === void 0) return;\n\tif (isAuthoringArgRef(template)) {\n\t\tvisit(template);\n\t\tvisitTemplateArgRefs(template.default, visit);\n\t\treturn;\n\t}\n\tif (Array.isArray(template)) {\n\t\tfor (const value of template) visitTemplateArgRefs(value, visit);\n\t\treturn;\n\t}\n\tif (typeof template === \"object\" && template !== null) for (const value of Object.values(template)) visitTemplateArgRefs(value, visit);\n}\n/**\n* Boundary validation for a contributed authoring type namespace, called\n* per contributing component at assembly (which supplies `contributedBy`\n* for attribution). Rejects what the types cannot express — entity-ref\n* constructors are skipped (their output derives from the referenced\n* entity): a plain constructor must declare its output storage type name,\n* and every `typeParams` arg-ref (including refs inside arg-ref defaults)\n* must point at a declared argument index.\n*/\nfunction assertResolvableTypeConstructorTemplates(namespace, contributedBy, path = []) {\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, name];\n\t\tif (!isAuthoringTypeConstructorDescriptor(value)) {\n\t\t\tassertResolvableTypeConstructorTemplates(value, contributedBy, currentPath);\n\t\t\tcontinue;\n\t\t}\n\t\tif (value.entityRefArg !== void 0) continue;\n\t\tconst args = value.args ?? [];\n\t\tconst invalid = (detail) => /* @__PURE__ */ new Error(`Invalid authoring type constructor \"${currentPath.join(\".\")}\" contributed by descriptor \"${contributedBy}\". ${detail}`);\n\t\tif (value.output.nativeType === void 0) throw invalid(\"The output declares no storage type template and no entityRefArg; a plain constructor must declare one.\");\n\t\tfor (const [key, template] of Object.entries(value.output.typeParams ?? {})) visitTemplateArgRefs(template, (ref) => {\n\t\t\tif (args[ref.index] === void 0) throw invalid(`output.typeParams.${key} references argument ${ref.index}, but the constructor declares ${args.length} argument(s). Declare the argument or correct the reference index.`);\n\t\t});\n\t}\n}\nfunction collectDescriptorPaths(namespace, isLeaf, path = []) {\n\tconst paths = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tpaths.push(currentPath.join(\".\"));\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) paths.push(...collectDescriptorPaths(value, isLeaf, currentPath));\n\t}\n\treturn paths;\n}\nfunction collectDescriptorEntries(namespace, isLeaf, descriptorKind, label, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, descriptorKind)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring ${label} contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the ${label} descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tif (value.discriminator.length > 0) entries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.discriminator\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tif ((record[\"kind\"] !== void 0 || record[\"keyword\"] !== void 0 || record[\"discriminator\"] !== void 0) && !isLeaf(value)) {\n\t\t\t\tconst hasKind = record[\"kind\"] === \"pslBlock\";\n\t\t\t\tconst hasKeyword = typeof record[\"keyword\"] === \"string\";\n\t\t\t\tconst hasDiscriminator = typeof record[\"discriminator\"] === \"string\";\n\t\t\t\tif (hasKind || hasKeyword && hasDiscriminator) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring ${label} contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the ${label} descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\t}\n\t\t\tentries.push(...collectDescriptorEntries(value, isLeaf, descriptorKind, label, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Throws when two or more entries in the same namespace share a key. A\n* duplicate key makes dispatch ambiguous — the caller's lookup dispatches by\n* this key, so one entry would silently shadow the other. Catch duplicates\n* before building any dispatch map.\n*\n* `label` (e.g. `'pslBlock'`, `'entityType'`) names which namespace the\n* duplicate was found in and is carried in the structured error metadata;\n* the key itself is always called `key` in both the message and the\n* metadata, since what it semantically represents (a discriminator for\n* `entityType`, the parser's dispatch keyword for `pslBlock`) is the\n* caller's concern, not this function's.\n*/\nfunction assertUniqueDiscriminators(entries, label) {\n\tconst seen = /* @__PURE__ */ new Map();\n\tfor (const { path, discriminator: key } of entries) {\n\t\tconst existing = seen.get(key);\n\t\tif (existing !== void 0) throw runtimeError(\"RUNTIME.DUPLICATE_AUTHORING_DISCRIMINATOR\", `Duplicate ${label} key \"${key}\" registered at both \"${existing}\" and \"${path}\". Each ${label} contribution must use a unique key.`, {\n\t\t\tlabel,\n\t\t\tkey,\n\t\t\texistingPath: existing,\n\t\t\tpath\n\t\t});\n\t\tseen.set(key, path);\n\t}\n}\nfunction collectPslBlockDescriptorEntries(namespace, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isAuthoringPslBlockDescriptor(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, \"pslBlock\")) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring pslBlock contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the pslBlock descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.discriminator,\n\t\t\t\tkeyword: value.keyword\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tconst hasKind = record[\"kind\"] === \"pslBlock\";\n\t\t\tconst hasKeyword = typeof record[\"keyword\"] === \"string\";\n\t\t\tconst hasDiscriminator = typeof record[\"discriminator\"] === \"string\";\n\t\t\tif (hasKind || hasKeyword && hasDiscriminator) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring pslBlock contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the pslBlock descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push(...collectPslBlockDescriptorEntries(value, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Every `pslBlockDescriptors` entry requires a matching `entityTypes` factory\n* with the same discriminator. An `entityTypes` factory may stand alone (e.g.\n* `enum`, reachable from the TypeScript builder without any PSL block).\n*\n* Uniqueness for pslBlock entries is keyed on **keyword**, not discriminator:\n* several keywords (e.g. `policy_select`/`policy_insert`) may legitimately\n* share one discriminator, routing to the same `entityTypes` factory and the\n* same `entries[discriminator]` slot — that N:1 shape is exactly what lets\n* one entity kind be authored through several PSL keywords. What must stay\n* unique is the keyword itself, since that's what the parser dispatches on.\n*/\nfunction assertPslBlocksHaveFactories(entityTypeNamespace, pslBlockNamespace) {\n\tconst blockEntries = collectPslBlockDescriptorEntries(pslBlockNamespace);\n\tconst entityEntries = collectDescriptorEntries(entityTypeNamespace, isAuthoringEntityTypeDescriptor, \"entity\", \"entityType\");\n\tassertUniqueDiscriminators(blockEntries.map((entry) => ({\n\t\tpath: entry.path,\n\t\tdiscriminator: entry.keyword\n\t})), \"pslBlock\");\n\tassertUniqueDiscriminators(entityEntries, \"entityType\");\n\tconst entityDiscriminators = new Set(entityEntries.map((entry) => entry.discriminator));\n\tfor (const block of blockEntries) if (!entityDiscriminators.has(block.discriminator)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Incomplete extension contribution: pslBlock helper \"${block.path}\" registers discriminator \"${block.discriminator}\" but no entityType contribution shares that discriminator. An extension-contributed PSL block requires a matching entityType factory so the parsed AST node can lower to an IR class instance; add an entityType helper with discriminator \"${block.discriminator}\".`);\n}\nfunction collectModelAttributeEntries(namespace, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isAuthoringModelAttributeDescriptor(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, \"modelAttribute\")) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring modelAttribute contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/attribute) but does not satisfy the modelAttribute descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.attribute\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tif (typeof record[\"attribute\"] === \"string\" && \"spec\" in record) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring modelAttribute contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/attribute) but does not satisfy the modelAttribute descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push(...collectModelAttributeEntries(value, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Throws when two modelAttribute contributions — at any paths, even\n* different ones — claim the same bare `@@` attribute name. The family\n* interpreter dispatches by attribute name, not by registration path, so\n* two descriptors claiming the same name would have one silently shadow\n* the other.\n*/\nfunction assertUniqueModelAttributeNames(entries) {\n\tconst seen = /* @__PURE__ */ new Map();\n\tfor (const { path, discriminator: attribute } of entries) {\n\t\tconst existing = seen.get(attribute);\n\t\tif (existing !== void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Duplicate modelAttribute \"${attribute}\" registered at both \"${existing}\" and \"${path}\". Each modelAttribute contribution must claim a unique attribute name.`);\n\t\tseen.set(attribute, path);\n\t}\n}\nfunction assertNoCrossRegistryCollisions(typeNamespace, fieldNamespace, entityTypeNamespace = {}, pslBlockNamespace = {}, modelAttributeNamespace = {}) {\n\tconst typePaths = new Set(collectDescriptorPaths(typeNamespace, isAuthoringTypeConstructorDescriptor));\n\tconst fieldPaths = new Set(collectDescriptorPaths(fieldNamespace, isAuthoringFieldPresetDescriptor));\n\tconst entityPaths = new Set(collectDescriptorPaths(entityTypeNamespace, isAuthoringEntityTypeDescriptor));\n\tconst ambiguityHint = \"Register each path in only one of authoringContributions.field / authoringContributions.type / authoringContributions.entityTypes.\";\n\tfor (const fieldPath of fieldPaths) if (typePaths.has(fieldPath)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Ambiguous authoring registry path \"${fieldPath}\". The same path is registered as both a type constructor and a field preset; PSL resolution would be ambiguous. ${ambiguityHint}`);\n\tfor (const entityPath of entityPaths) if (typePaths.has(entityPath) || fieldPaths.has(entityPath)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Ambiguous authoring registry path \"${entityPath}\". The same path is registered as an entity contribution AND as a type constructor or field preset; PSL resolution would be ambiguous. ${ambiguityHint}`);\n\tassertPslBlocksHaveFactories(entityTypeNamespace, pslBlockNamespace);\n\tassertUniqueModelAttributeNames(collectModelAttributeEntries(modelAttributeNamespace));\n\tassertSelectTemplatesMatchOptionArgs(typeNamespace, fieldNamespace, entityTypeNamespace);\n}\nfunction collectDescriptorNodes(namespace, isLeaf, path = []) {\n\tconst nodes = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tnodes.push([currentPath.join(\".\"), value]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) nodes.push(...collectDescriptorNodes(value, isLeaf, currentPath));\n\t}\n\treturn nodes;\n}\nfunction collectSelectRefs(value, found) {\n\tif (typeof value !== \"object\" || value === null) return;\n\tif (isAuthoringSelectRef(value)) {\n\t\tfound.push(value);\n\t\tfor (const caseTemplate of Object.values(value.cases)) collectSelectRefs(caseTemplate, found);\n\t\treturn;\n\t}\n\tif (isAuthoringArgRef(value)) {\n\t\tcollectSelectRefs(value.default, found);\n\t\treturn;\n\t}\n\tif (Array.isArray(value)) {\n\t\tfor (const entry of value) collectSelectRefs(entry, found);\n\t\treturn;\n\t}\n\tfor (const entry of Object.values(value)) collectSelectRefs(entry, found);\n}\nfunction validateSelectRefsAgainstArgs(label, helperPath, args, templateRoot) {\n\tconst selects = [];\n\tcollectSelectRefs(templateRoot, selects);\n\tfor (const select of selects) {\n\t\tconst position = `#${select.index + 1}`;\n\t\tlet descriptor = args?.[select.index];\n\t\tif (descriptor === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position}, but the helper declares no argument at that position.`);\n\t\tfor (const segment of select.path ?? []) {\n\t\t\tdescriptor = descriptor.kind === \"object\" ? descriptor.properties[segment] : void 0;\n\t\t\tif (descriptor === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position} at path \"${(select.path ?? []).join(\".\")}\", which does not resolve to a declared argument property.`);\n\t\t}\n\t\tif (descriptor.kind !== \"option\") throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position}, which is kind \"${descriptor.kind}\"; select requires an option argument.`);\n\t\tconst argumentLabel = descriptor.name !== void 0 ? `\"${descriptor.name}\"` : position;\n\t\tconst missing = descriptor.values.filter((value) => !Object.hasOwn(select.cases, value));\n\t\tif (missing.length > 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" option argument ${argumentLabel} allows [${descriptor.values.join(\", \")}] but the select template has no case for: ${missing.join(\", \")}.`);\n\t\tconst values = descriptor.values;\n\t\tconst unreachable = Object.keys(select.cases).filter((key) => !values.includes(key));\n\t\tif (unreachable.length > 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template has case(s) not allowed by option argument ${argumentLabel}: ${unreachable.join(\", \")}. Allowed values: [${values.join(\", \")}].`);\n\t}\n}\n/**\n* Every `select` template node must target an option argument whose `values`\n* exactly cover the node's `cases` — a legal token with no case and a case no\n* token can reach are both declaration bugs, caught here at pack-registration\n* time rather than at first resolution.\n*/\nfunction assertSelectTemplatesMatchOptionArgs(typeNamespace, fieldNamespace, entityTypeNamespace) {\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(fieldNamespace, isAuthoringFieldPresetDescriptor)) validateSelectRefsAgainstArgs(\"field\", helperPath, descriptor.args, descriptor.output);\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(typeNamespace, isAuthoringTypeConstructorDescriptor)) validateSelectRefsAgainstArgs(\"type\", helperPath, descriptor.args, descriptor.output);\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(entityTypeNamespace, isAuthoringEntityTypeDescriptor)) if (\"template\" in descriptor.output) validateSelectRefsAgainstArgs(\"entityType\", helperPath, descriptor.args, descriptor.output.template);\n}\nfunction resolveAuthoringTemplateValue(template, args) {\n\tif (template === void 0) return;\n\tif (isAuthoringArgRef(template)) {\n\t\tconst value = readTemplateArgumentValue(args, template.index, template.path);\n\t\tif (value === void 0 && template.default !== void 0) return resolveAuthoringTemplateValue(template.default, args);\n\t\treturn value;\n\t}\n\tif (isAuthoringSelectRef(template)) {\n\t\tconst value = readTemplateArgumentValue(args, template.index, template.path);\n\t\tif (value === void 0) return;\n\t\tif (typeof value !== \"string\" || !Object.hasOwn(template.cases, value)) throw new InternalError(`Authoring template select has no case for value \"${String(value)}\"`);\n\t\treturn resolveAuthoringTemplateValue(template.cases[value], args);\n\t}\n\tif (Array.isArray(template)) return template.map((value) => resolveAuthoringTemplateValue(value, args));\n\tif (typeof template === \"object\" && template !== null) {\n\t\tconst resolved = {};\n\t\tfor (const [key, value] of Object.entries(template)) {\n\t\t\tconst resolvedValue = resolveAuthoringTemplateValue(value, args);\n\t\t\tif (resolvedValue !== void 0) resolved[key] = resolvedValue;\n\t\t}\n\t\treturn resolved;\n\t}\n\treturn template;\n}\nfunction validateAuthoringArgument(descriptor, value, path) {\n\tif (value === void 0) {\n\t\tif (descriptor.optional) return;\n\t\tthrow runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Missing required authoring helper argument at ${path}`);\n\t}\n\tif (descriptor.kind === \"string\") {\n\t\tif (typeof value !== \"string\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a string`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"boolean\") {\n\t\tif (typeof value !== \"boolean\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a boolean`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"stringArray\") {\n\t\tif (!Array.isArray(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an array of strings`);\n\t\tfor (const entry of value) if (typeof entry !== \"string\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an array of strings`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"object\") {\n\t\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an object`);\n\t\tconst input = value;\n\t\tconst expectedKeys = new Set(Object.keys(descriptor.properties));\n\t\tfor (const key of Object.keys(input)) if (!expectedKeys.has(key)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} contains unknown property \"${key}\"`);\n\t\tfor (const [key, propertyDescriptor] of Object.entries(descriptor.properties)) validateAuthoringArgument(propertyDescriptor, input[key], `${path}.${key}`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"option\") {\n\t\tif (typeof value !== \"string\" || !descriptor.values.includes(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be one of: ${descriptor.values.join(\", \")}`);\n\t\treturn;\n\t}\n\tif (typeof value !== \"number\" || Number.isNaN(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a number`);\n\tif (descriptor.integer && !Number.isInteger(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an integer`);\n\tif (descriptor.minimum !== void 0 && value < descriptor.minimum) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be >= ${descriptor.minimum}, received ${value}`);\n\tif (descriptor.maximum !== void 0 && value > descriptor.maximum) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be <= ${descriptor.maximum}, received ${value}`);\n}\nfunction validateAuthoringHelperArguments(helperPath, descriptors, args) {\n\tconst expected = descriptors ?? [];\n\tconst minimumArgs = expected.reduce((count, descriptor, index) => descriptor.optional ? count : index + 1, 0);\n\tif (args.length < minimumArgs || args.length > expected.length) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `${helperPath} expects ${minimumArgs === expected.length ? expected.length : `${minimumArgs}-${expected.length}`} argument(s), received ${args.length}`);\n\texpected.forEach((descriptor, index) => {\n\t\tvalidateAuthoringArgument(descriptor, args[index], `${helperPath}[${index}]`);\n\t});\n}\nfunction resolveAuthoringStorageTypeTemplate(template, args) {\n\tconst nativeType = template.nativeType;\n\tif (nativeType === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring output template for codec \"${template.codecId}\" declares no nativeType; only entity-ref constructors may omit it`);\n\tconst typeParams = template.typeParams === void 0 ? void 0 : resolveAuthoringTemplateValue(template.typeParams, args);\n\tif (typeParams !== void 0 && !isAuthoringTemplateRecord(typeParams)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring typeParams must be an object for codec \"${template.codecId}\", received ${String(typeParams)}`);\n\tconst normalizedTypeParams = typeParams !== void 0 && Object.keys(typeParams).length === 0 ? void 0 : typeParams;\n\treturn {\n\t\tcodecId: template.codecId,\n\t\tnativeType,\n\t\t...ifDefined(\"typeParams\", normalizedTypeParams)\n\t};\n}\nfunction resolveAuthoringColumnDefaultTemplate(template, args) {\n\tif (template.kind === \"literal\") {\n\t\tconst value = resolveAuthoringTemplateValue(template.value, args);\n\t\tif (value === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", \"Resolved authoring literal default must not be undefined\");\n\t\tif (!isColumnDefaultLiteralInputValue(value)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring literal default must be a JSON-serializable value or Date, received ${String(value)}`);\n\t\treturn {\n\t\t\tkind: \"literal\",\n\t\t\tvalue\n\t\t};\n\t}\n\tconst expression = resolveAuthoringTemplateValue(template.expression, args);\n\tif (expression === void 0 || typeof expression === \"object\" && expression !== null) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring function default expression must resolve to a primitive, received ${String(expression)}`);\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: String(expression)\n\t};\n}\nfunction resolveExecutionMutationDefaultPhase(phase, template, args) {\n\tconst value = resolveAuthoringTemplateValue(template, args);\n\tif (value === void 0) return;\n\tif (!isExecutionMutationDefaultValue(value)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring preset executionDefaults.${phase} did not resolve to a valid generator descriptor (kind: 'generator', id: string).`);\n\treturn value;\n}\nfunction resolveAuthoringExecutionDefaultsTemplate(template, args) {\n\tconst phases = {\n\t\t...ifDefined(\"onCreate\", template.onCreate !== void 0 ? resolveExecutionMutationDefaultPhase(\"onCreate\", template.onCreate, args) : void 0),\n\t\t...ifDefined(\"onUpdate\", template.onUpdate !== void 0 ? resolveExecutionMutationDefaultPhase(\"onUpdate\", template.onUpdate, args) : void 0)\n\t};\n\treturn Object.keys(phases).length === 0 ? void 0 : phases;\n}\nfunction instantiateAuthoringTypeConstructor(descriptor, args) {\n\treturn resolveAuthoringStorageTypeTemplate(descriptor.output, args);\n}\nfunction instantiateAuthoringEntityType(helperPath, descriptor, args, ctx) {\n\tif (\"factory\" in descriptor.output) {\n\t\tconst input = args[0];\n\t\treturn blindCast(descriptor.output.factory)(input, ctx);\n\t}\n\tvalidateAuthoringHelperArguments(helperPath, descriptor.args, args);\n\treturn blindCast(resolveAuthoringTemplateValue(descriptor.output.template, args));\n}\nfunction instantiateAuthoringFieldPreset(descriptor, args) {\n\treturn {\n\t\tdescriptor: resolveAuthoringStorageTypeTemplate(descriptor.output, args),\n\t\tnullable: descriptor.output.nullable ?? false,\n\t\t...ifDefined(\"default\", descriptor.output.default !== void 0 ? resolveAuthoringColumnDefaultTemplate(descriptor.output.default, args) : void 0),\n\t\t...ifDefined(\"executionDefaults\", descriptor.output.executionDefaults !== void 0 ? resolveAuthoringExecutionDefaultsTemplate(descriptor.output.executionDefaults, args) : void 0),\n\t\tid: descriptor.output.id ?? false,\n\t\tunique: descriptor.output.unique ?? false\n\t};\n}\n//#endregion\nexport { mergeAuthoringNamespaces as _, collectScalarTypeConstructors as a, validateAuthoringHelperArguments as b, instantiateAuthoringEntityType as c, isAuthoringArgRef as d, isAuthoringEntityTypeDescriptor as f, isAuthoringTypeConstructorDescriptor as g, isAuthoringPslBlockDescriptor as h, collectContributedDescriptorPaths as i, instantiateAuthoringFieldPreset as l, isAuthoringModelAttributeDescriptor as m, assertResolvableTypeConstructorTemplates as n, flushAuthoringWarnings as o, isAuthoringFieldPresetDescriptor as p, classifyEnumMemberType as r, hasRegisteredFieldNamespace as s, assertNoCrossRegistryCollisions as t, instantiateAuthoringTypeConstructor as u, resolveAuthoringTemplateValue as v, resolveEnumCodecId as y };\n\n//# sourceMappingURL=framework-authoring-CDEvlouU.mjs.map"],"mappings":";;;;;;AAMA,MAAM,oCAAoC;;;;;;;;AAQ1C,SAAS,uBAAuB,UAAU;CACzC,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,WAAW,UAAU;EAC/B,MAAM,MAAM,GAAG,QAAQ,KAAK,QAAQ,QAAQ;EAC5C,MAAM,QAAQ,OAAO,IAAI,GAAG,KAAK,CAAC;EAClC,MAAM,KAAK,OAAO;EAClB,OAAO,IAAI,KAAK,KAAK;CACtB;CACA,KAAK,MAAM,SAAS,OAAO,OAAO,GAAG;EACpC,MAAM,QAAQ,MAAM;EACpB,IAAI,UAAU,KAAK,GAAG;EACtB,IAAI,MAAM,UAAU,mCAAmC;GACtD,KAAK,MAAM,WAAW,OAAO,QAAQ,YAAY,QAAQ,SAAS,EAAE,MAAM,QAAQ,KAAK,CAAC;GACxF;EACD;EACA,QAAQ,YAAY,GAAG,MAAM,OAAO,GAAG,MA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AAC,WAAW,IAAI,KAAK,IAAI;AACpD;AACA,SAAS,oCAAoC,YAAY,MAAM;CAC9D,OAAO,oCAAoC,WAAW,QAAQ,IAAI;AACnE;AACA,SAAS,+BAA+B,YAAY,YAAY,MAAM,KAAK;CAC1E,IAAI,aAAa,WAAW,QAAQ;EACnC,MAAM,QAAQ,KAAK;EACnB,OAAO,UAAU,WAAW,OAAO,OAAO,CAAC,CAAC,OAAO,GAAG;CACvD;CACA,iCAAiC,YAAY,WAAW,MAAM,IAAI;CAClE,OAAO,UAAU,8BAA8B,WAAW,OAAO,UAAU,IAAI,CAAC;AACjF;AACA,SAAS,gCAAgC,YAAY,MAAM;CAC1D,OAAO;EACN,YAAY,oCAAoC,WAAW,QAAQ,IAAI;EACvE,UAAU,WAAW,OAAO,YAAY;EACxC,GAAG,UAAU,WAAW,WAAW,OAAO,YAAY,KAAK,IAAI,sCAAsC,WAAW,OAAO,SAAS,IAAI,IAAI,KAAK,CAAC;EAC9I,GAAG,UAAU,qBAAqB,WAAW,OAAO,sBAAsB,KAAK,IAAI,0CAA0C,WAAW,OAAO,mBAAmB,IAAI,IAAI,KAAK,CAAC;EAChL,IAAI,WAAW,OAAO,MAAM;EAC5B,QAAQ,WAAW,OAAO,UAAU;CACrC;AACD"}
package/dist/ids.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
2
- import { a as structuredError } from "./structured-error-xG_PRmbb.mjs";
2
+ import { o as structuredError } from "./structured-error-CgiSMpdU.mjs";
3
3
  //#region ../../../1-framework/2-authoring/ids/dist/index.mjs
4
4
  function contractError(code, message, options) {
5
5
  return structuredError(code, message, options);
@@ -1,4 +1,4 @@
1
- import { t as CliStructuredError } from "./control-C9JfxzPo-C4JAdFMg.mjs";
1
+ import { t as CliStructuredError } from "./control-C9JfxzPo-CxCL2sxo.mjs";
2
2
  //#region ../../../1-framework/1-core/errors/dist/migration.mjs
3
3
  /**
4
4
  * A scaffolded migration contains a placeholder slot that was never filled in.
@@ -124,4 +124,4 @@ function errorMigrationPlanNotArray(dir, actualValueDescription) {
124
124
  //#endregion
125
125
  export { errorMigrationTargetMismatch as a, errorMigrationPlanNotArray as i, errorMigrationFileMissing as n, errorUnfilledPlaceholder as o, errorMigrationInvalidDefaultExport as r, placeholder as s, errorDataTransformContractMismatch as t };
126
126
 
127
- //# sourceMappingURL=migration-jmLnbo_A.mjs.map
127
+ //# sourceMappingURL=migration-5zFMadnp.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-jmLnbo_A.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/migration.mjs"],"sourcesContent":["import { t as CliStructuredError } from \"./control-C9JfxzPo.mjs\";\n//#region src/migration.ts\n/**\n* A scaffolded migration contains a placeholder slot that was never filled in.\n*\n* Thrown at emit time (when `check.source()` or `run()` is invoked) via the\n* `placeholder(...)` utility. The `slot` identifies the exact location the\n* author still needs to edit, e.g. `\"backfill-product-status:check.source\"`.\n*/\nfunction errorUnfilledPlaceholder(slot) {\n\treturn new CliStructuredError(\"MIGRATION.UNFILLED_PLACEHOLDER\", \"Unfilled migration placeholder\", {\n\t\twhy: `The migration contains a placeholder that has not been filled in: ${slot}`,\n\t\tfix: \"Open migration.ts and replace the `placeholder(...)` call with your actual query.\",\n\t\tmeta: { slot }\n\t});\n}\n/**\n* Scaffolded `migration.ts` files call this wherever the scaffolder couldn't\n* emit a real query and the author is expected to fill one in. Always throws\n* a structured migration error (`MIGRATION.UNFILLED_PLACEHOLDER`).\n*\n* The return type `never` makes it assignable to any expected return type, so\n* a scaffolded `() => placeholder('...')` satisfies signatures like\n* `() => MongoQueryPlan` without polluting them with a sentinel union arm.\n*/\nfunction placeholder(slot) {\n\tthrow errorUnfilledPlaceholder(slot);\n}\n/**\n* A `dataTransform(endContract, …)` factory was handed a `SqlQueryPlan` whose\n* `meta.storageHash` does not match the `endContract.storage.storageHash` it\n* was configured with. This almost always means the user's query-builder\n* (`sql({ context: createExecutionContext({ contract: endContract, … }) })`)\n* was instantiated from a different contract reference than the one passed\n* to `dataTransform(endContract, …)`.\n*\n* Distinct from `errorHashMismatch` (`CONTRACT.MARKER_MISMATCH`) which\n* rejects a plan at runtime execution; this is an authoring-time rejection\n* so it lives in the `MIGRATION` namespace.\n*/\nfunction errorDataTransformContractMismatch(options) {\n\treturn new CliStructuredError(\"MIGRATION.DATA_TRANSFORM_CONTRACT_MISMATCH\", \"dataTransform query plan built against wrong contract\", {\n\t\twhy: `Data transform \"${options.dataTransformName}\" produced a query plan whose storage hash (${options.actual}) does not match the migration's contract (${options.expected}). The query builder was configured with a different contract than the one passed to dataTransform(endContract, ...).`,\n\t\tfix: \"Ensure the `endContract` imported at module scope (used for both `dataTransform(endContract, …)` and `sql({ context: createExecutionContext({ contract: endContract, … }) })`) is the same reference.\",\n\t\tmeta: {\n\t\t\tdataTransformName: options.dataTransformName,\n\t\t\texpected: options.expected,\n\t\t\tactual: options.actual\n\t\t}\n\t});\n}\n/**\n* `migration.ts` was expected at the given package directory but could not be\n* located. Thrown when consumers attempt to read a migration package that is\n* missing its source file.\n*/\nfunction errorMigrationFileMissing(dir) {\n\treturn new CliStructuredError(\"MIGRATION.FILE_MISSING\", \"migration.ts not found\", {\n\t\twhy: `No migration.ts file was found at \"${dir}\"`,\n\t\tfix: \"Scaffold one with `prisma-next migration new` or `prisma-next migration plan`.\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Scaffold an empty migration\",\n\t\t\tcommand: \"{bin} migration new\"\n\t\t}, {\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Scaffold a migration from a contract diff\",\n\t\t\tcommand: \"{bin} migration plan\"\n\t\t}],\n\t\tmeta: { dir }\n\t});\n}\n/**\n* The `migration.ts` at the given package directory does not default-export a\n* valid migration shape. Two shapes are accepted: a `Migration` subclass, or a\n* factory function returning a `MigrationPlan`-shaped object (with at least\n* an `operations` array, plus `targetId` and `destination`). Thrown when the\n* default export is missing, is not a constructor/function, does not extend\n* `Migration`, or (for factory functions) returns a value that is not\n* `MigrationPlan`-shaped.\n*/\nfunction errorMigrationInvalidDefaultExport(dir, actualExportDescription) {\n\treturn new CliStructuredError(\"MIGRATION.INVALID_DEFAULT_EXPORT\", \"migration.ts default export is not a valid migration\", {\n\t\twhy: actualExportDescription !== void 0 ? `migration.ts at \"${dir}\" must default-export a Migration subclass or a factory function returning a MigrationPlan-shaped object; got ${actualExportDescription}` : `migration.ts at \"${dir}\" must default-export a Migration subclass or a factory function returning a MigrationPlan-shaped object.`,\n\t\tfix: \"Use `export default class extends Migration { ... }` or `export default () => ({ targetId, destination, operations })`.\",\n\t\tmeta: {\n\t\t\tdir,\n\t\t\t...actualExportDescription !== void 0 ? { actualExport: actualExportDescription } : {}\n\t\t}\n\t});\n}\n/**\n* The migration class declares one `targetId` but the loaded\n* `prisma-next.config.ts` declares another. Thrown by `MigrationCLI.run`\n* when a migration script is invoked against a config whose target\n* descriptor disagrees with the migration's own `targetId`. Distinct from generic\n* config-validation errors because the mismatch is between two valid\n* artifacts (the script and the config), not a malformed input.\n*/\nfunction errorMigrationTargetMismatch(options) {\n\treturn new CliStructuredError(\"MIGRATION.TARGET_MISMATCH\", \"Migration target does not match config target\", {\n\t\twhy: `This migration is for target \"${options.migrationTargetId}\" but the loaded prisma-next.config.ts declares target \"${options.configTargetId}\". The migration script can only be run against a config that targets the same database.`,\n\t\tfix: \"Switch to a config whose `target` matches the migration's target, or pass `--config <path>` to point at the right config file.\",\n\t\tmeta: {\n\t\t\tmigrationTargetId: options.migrationTargetId,\n\t\t\tconfigTargetId: options.configTargetId\n\t\t}\n\t});\n}\n/**\n* A `Migration.operations` getter returned a value that is not an array. Used\n* by emit capabilities after instantiating the authored migration.\n*/\nfunction errorMigrationPlanNotArray(dir, actualValueDescription) {\n\treturn new CliStructuredError(\"MIGRATION.PLAN_NOT_ARRAY\", \"Migration.operations must be an array of operations\", {\n\t\twhy: actualValueDescription !== void 0 ? `Migration.operations for migration.ts at \"${dir}\" was ${actualValueDescription}; an array of operations is required.` : `Migration.operations for migration.ts at \"${dir}\" is not an array of operations.`,\n\t\tfix: \"Ensure your `operations` getter returns an array of operations; see the data-migrations authoring guide.\",\n\t\tmeta: {\n\t\t\tdir,\n\t\t\t...actualValueDescription !== void 0 ? { actualValue: actualValueDescription } : {}\n\t\t}\n\t});\n}\n//#endregion\nexport { errorDataTransformContractMismatch, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationPlanNotArray, errorMigrationTargetMismatch, errorUnfilledPlaceholder, placeholder };\n\n//# sourceMappingURL=migration.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,yBAAyB,MAAM;CACvC,OAAO,IAAI,mBAAmB,kCAAkC,kCAAkC;EACjG,KAAK,qEAAqE;EAC1E,KAAK;EACL,MAAM,EAAE,KAAK;CACd,CAAC;AACF;;;;;;;;;;AAUA,SAAS,YAAY,MAAM;CAC1B,MAAM,yBAAyB,IAAI;AACpC;;;;;;;;;;;;;AAaA,SAAS,mCAAmC,SAAS;CACpD,OAAO,IAAI,mBAAmB,8CAA8C,yDAAyD;EACpI,KAAK,mBAAmB,QAAQ,kBAAkB,8CAA8C,QAAQ,OAAO,6CAA6C,QAAQ,SAAS;EAC7K,KAAK;EACL,MAAM;GACL,mBAAmB,QAAQ;GAC3B,UAAU,QAAQ;GAClB,QAAQ,QAAQ;EACjB;CACD,CAAC;AACF;;;;;;AAMA,SAAS,0BAA0B,KAAK;CACvC,OAAO,IAAI,mBAAmB,0BAA0B,0BAA0B;EACjF,KAAK,sCAAsC,IAAI;EAC/C,KAAK;EACL,aAAa,CAAC;GACb,MAAM;GACN,OAAO;GACP,SAAS;EACV,GAAG;GACF,MAAM;GACN,OAAO;GACP,SAAS;EACV,CAAC;EACD,MAAM,EAAE,IAAI;CACb,CAAC;AACF;;;;;;;;;;AAUA,SAAS,mCAAmC,KAAK,yBAAyB;CACzE,OAAO,IAAI,mBAAmB,oCAAoC,wDAAwD;EACzH,KAAK,4BAA4B,KAAK,IAAI,oBAAoB,IAAI,gHAAgH,4BAA4B,oBAAoB,IAAI;EACtO,KAAK;EACL,MAAM;GACL;GACA,GAAG,4BAA4B,KAAK,IAAI,EAAE,cAAc,wBAAwB,IAAI,CAAC;EACtF;CACD,CAAC;AACF;;;;;;;;;AASA,SAAS,6BAA6B,SAAS;CAC9C,OAAO,IAAI,mBAAmB,6BAA6B,iDAAiD;EAC3G,KAAK,iCAAiC,QAAQ,kBAAkB,0DAA0D,QAAQ,eAAe;EACjJ,KAAK;EACL,MAAM;GACL,mBAAmB,QAAQ;GAC3B,gBAAgB,QAAQ;EACzB;CACD,CAAC;AACF;;;;;AAKA,SAAS,2BAA2B,KAAK,wBAAwB;CAChE,OAAO,IAAI,mBAAmB,4BAA4B,uDAAuD;EAChH,KAAK,2BAA2B,KAAK,IAAI,6CAA6C,IAAI,QAAQ,uBAAuB,yCAAyC,6CAA6C,IAAI;EACnN,KAAK;EACL,MAAM;GACL;GACA,GAAG,2BAA2B,KAAK,IAAI,EAAE,aAAa,uBAAuB,IAAI,CAAC;EACnF;CACD,CAAC;AACF"}
1
+ {"version":3,"file":"migration-5zFMadnp.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/migration.mjs"],"sourcesContent":["import { t as CliStructuredError } from \"./control-C9JfxzPo.mjs\";\n//#region src/migration.ts\n/**\n* A scaffolded migration contains a placeholder slot that was never filled in.\n*\n* Thrown at emit time (when `check.source()` or `run()` is invoked) via the\n* `placeholder(...)` utility. The `slot` identifies the exact location the\n* author still needs to edit, e.g. `\"backfill-product-status:check.source\"`.\n*/\nfunction errorUnfilledPlaceholder(slot) {\n\treturn new CliStructuredError(\"MIGRATION.UNFILLED_PLACEHOLDER\", \"Unfilled migration placeholder\", {\n\t\twhy: `The migration contains a placeholder that has not been filled in: ${slot}`,\n\t\tfix: \"Open migration.ts and replace the `placeholder(...)` call with your actual query.\",\n\t\tmeta: { slot }\n\t});\n}\n/**\n* Scaffolded `migration.ts` files call this wherever the scaffolder couldn't\n* emit a real query and the author is expected to fill one in. Always throws\n* a structured migration error (`MIGRATION.UNFILLED_PLACEHOLDER`).\n*\n* The return type `never` makes it assignable to any expected return type, so\n* a scaffolded `() => placeholder('...')` satisfies signatures like\n* `() => MongoQueryPlan` without polluting them with a sentinel union arm.\n*/\nfunction placeholder(slot) {\n\tthrow errorUnfilledPlaceholder(slot);\n}\n/**\n* A `dataTransform(endContract, …)` factory was handed a `SqlQueryPlan` whose\n* `meta.storageHash` does not match the `endContract.storage.storageHash` it\n* was configured with. This almost always means the user's query-builder\n* (`sql({ context: createExecutionContext({ contract: endContract, … }) })`)\n* was instantiated from a different contract reference than the one passed\n* to `dataTransform(endContract, …)`.\n*\n* Distinct from `errorHashMismatch` (`CONTRACT.MARKER_MISMATCH`) which\n* rejects a plan at runtime execution; this is an authoring-time rejection\n* so it lives in the `MIGRATION` namespace.\n*/\nfunction errorDataTransformContractMismatch(options) {\n\treturn new CliStructuredError(\"MIGRATION.DATA_TRANSFORM_CONTRACT_MISMATCH\", \"dataTransform query plan built against wrong contract\", {\n\t\twhy: `Data transform \"${options.dataTransformName}\" produced a query plan whose storage hash (${options.actual}) does not match the migration's contract (${options.expected}). The query builder was configured with a different contract than the one passed to dataTransform(endContract, ...).`,\n\t\tfix: \"Ensure the `endContract` imported at module scope (used for both `dataTransform(endContract, …)` and `sql({ context: createExecutionContext({ contract: endContract, … }) })`) is the same reference.\",\n\t\tmeta: {\n\t\t\tdataTransformName: options.dataTransformName,\n\t\t\texpected: options.expected,\n\t\t\tactual: options.actual\n\t\t}\n\t});\n}\n/**\n* `migration.ts` was expected at the given package directory but could not be\n* located. Thrown when consumers attempt to read a migration package that is\n* missing its source file.\n*/\nfunction errorMigrationFileMissing(dir) {\n\treturn new CliStructuredError(\"MIGRATION.FILE_MISSING\", \"migration.ts not found\", {\n\t\twhy: `No migration.ts file was found at \"${dir}\"`,\n\t\tfix: \"Scaffold one with `prisma-next migration new` or `prisma-next migration plan`.\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Scaffold an empty migration\",\n\t\t\tcommand: \"{bin} migration new\"\n\t\t}, {\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Scaffold a migration from a contract diff\",\n\t\t\tcommand: \"{bin} migration plan\"\n\t\t}],\n\t\tmeta: { dir }\n\t});\n}\n/**\n* The `migration.ts` at the given package directory does not default-export a\n* valid migration shape. Two shapes are accepted: a `Migration` subclass, or a\n* factory function returning a `MigrationPlan`-shaped object (with at least\n* an `operations` array, plus `targetId` and `destination`). Thrown when the\n* default export is missing, is not a constructor/function, does not extend\n* `Migration`, or (for factory functions) returns a value that is not\n* `MigrationPlan`-shaped.\n*/\nfunction errorMigrationInvalidDefaultExport(dir, actualExportDescription) {\n\treturn new CliStructuredError(\"MIGRATION.INVALID_DEFAULT_EXPORT\", \"migration.ts default export is not a valid migration\", {\n\t\twhy: actualExportDescription !== void 0 ? `migration.ts at \"${dir}\" must default-export a Migration subclass or a factory function returning a MigrationPlan-shaped object; got ${actualExportDescription}` : `migration.ts at \"${dir}\" must default-export a Migration subclass or a factory function returning a MigrationPlan-shaped object.`,\n\t\tfix: \"Use `export default class extends Migration { ... }` or `export default () => ({ targetId, destination, operations })`.\",\n\t\tmeta: {\n\t\t\tdir,\n\t\t\t...actualExportDescription !== void 0 ? { actualExport: actualExportDescription } : {}\n\t\t}\n\t});\n}\n/**\n* The migration class declares one `targetId` but the loaded\n* `prisma-next.config.ts` declares another. Thrown by `MigrationCLI.run`\n* when a migration script is invoked against a config whose target\n* descriptor disagrees with the migration's own `targetId`. Distinct from generic\n* config-validation errors because the mismatch is between two valid\n* artifacts (the script and the config), not a malformed input.\n*/\nfunction errorMigrationTargetMismatch(options) {\n\treturn new CliStructuredError(\"MIGRATION.TARGET_MISMATCH\", \"Migration target does not match config target\", {\n\t\twhy: `This migration is for target \"${options.migrationTargetId}\" but the loaded prisma-next.config.ts declares target \"${options.configTargetId}\". The migration script can only be run against a config that targets the same database.`,\n\t\tfix: \"Switch to a config whose `target` matches the migration's target, or pass `--config <path>` to point at the right config file.\",\n\t\tmeta: {\n\t\t\tmigrationTargetId: options.migrationTargetId,\n\t\t\tconfigTargetId: options.configTargetId\n\t\t}\n\t});\n}\n/**\n* A `Migration.operations` getter returned a value that is not an array. Used\n* by emit capabilities after instantiating the authored migration.\n*/\nfunction errorMigrationPlanNotArray(dir, actualValueDescription) {\n\treturn new CliStructuredError(\"MIGRATION.PLAN_NOT_ARRAY\", \"Migration.operations must be an array of operations\", {\n\t\twhy: actualValueDescription !== void 0 ? `Migration.operations for migration.ts at \"${dir}\" was ${actualValueDescription}; an array of operations is required.` : `Migration.operations for migration.ts at \"${dir}\" is not an array of operations.`,\n\t\tfix: \"Ensure your `operations` getter returns an array of operations; see the data-migrations authoring guide.\",\n\t\tmeta: {\n\t\t\tdir,\n\t\t\t...actualValueDescription !== void 0 ? { actualValue: actualValueDescription } : {}\n\t\t}\n\t});\n}\n//#endregion\nexport { errorDataTransformContractMismatch, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationPlanNotArray, errorMigrationTargetMismatch, errorUnfilledPlaceholder, placeholder };\n\n//# sourceMappingURL=migration.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,yBAAyB,MAAM;CACvC,OAAO,IAAI,mBAAmB,kCAAkC,kCAAkC;EACjG,KAAK,qEAAqE;EAC1E,KAAK;EACL,MAAM,EAAE,KAAK;CACd,CAAC;AACF;;;;;;;;;;AAUA,SAAS,YAAY,MAAM;CAC1B,MAAM,yBAAyB,IAAI;AACpC;;;;;;;;;;;;;AAaA,SAAS,mCAAmC,SAAS;CACpD,OAAO,IAAI,mBAAmB,8CAA8C,yDAAyD;EACpI,KAAK,mBAAmB,QAAQ,kBAAkB,8CAA8C,QAAQ,OAAO,6CAA6C,QAAQ,SAAS;EAC7K,KAAK;EACL,MAAM;GACL,mBAAmB,QAAQ;GAC3B,UAAU,QAAQ;GAClB,QAAQ,QAAQ;EACjB;CACD,CAAC;AACF;;;;;;AAMA,SAAS,0BAA0B,KAAK;CACvC,OAAO,IAAI,mBAAmB,0BAA0B,0BAA0B;EACjF,KAAK,sCAAsC,IAAI;EAC/C,KAAK;EACL,aAAa,CAAC;GACb,MAAM;GACN,OAAO;GACP,SAAS;EACV,GAAG;GACF,MAAM;GACN,OAAO;GACP,SAAS;EACV,CAAC;EACD,MAAM,EAAE,IAAI;CACb,CAAC;AACF;;;;;;;;;;AAUA,SAAS,mCAAmC,KAAK,yBAAyB;CACzE,OAAO,IAAI,mBAAmB,oCAAoC,wDAAwD;EACzH,KAAK,4BAA4B,KAAK,IAAI,oBAAoB,IAAI,gHAAgH,4BAA4B,oBAAoB,IAAI;EACtO,KAAK;EACL,MAAM;GACL;GACA,GAAG,4BAA4B,KAAK,IAAI,EAAE,cAAc,wBAAwB,IAAI,CAAC;EACtF;CACD,CAAC;AACF;;;;;;;;;AASA,SAAS,6BAA6B,SAAS;CAC9C,OAAO,IAAI,mBAAmB,6BAA6B,iDAAiD;EAC3G,KAAK,iCAAiC,QAAQ,kBAAkB,0DAA0D,QAAQ,eAAe;EACjJ,KAAK;EACL,MAAM;GACL,mBAAmB,QAAQ;GAC3B,gBAAgB,QAAQ;EACzB;CACD,CAAC;AACF;;;;;AAKA,SAAS,2BAA2B,KAAK,wBAAwB;CAChE,OAAO,IAAI,mBAAmB,4BAA4B,uDAAuD;EAChH,KAAK,2BAA2B,KAAK,IAAI,6CAA6C,IAAI,QAAQ,uBAAuB,yCAAyC,6CAA6C,IAAI;EACnN,KAAK;EACL,MAAM;GACL;GACA,GAAG,2BAA2B,KAAK,IAAI,EAAE,aAAa,uBAAuB,IAAI,CAAC;EACnF;CACD,CAAC;AACF"}
@@ -1,4 +1,4 @@
1
- import { r as CliStructuredError } from "./control-ql9N9u4f-Dz4QqSR1.mjs";
1
+ import { r as CliStructuredError } from "./control-ql9N9u4f-r3Vv41kZ.mjs";
2
2
  //#region ../../../1-framework/1-core/errors/dist/migration.d.mts
3
3
  //#region src/migration.d.ts
4
4
  /**
@@ -71,4 +71,4 @@ declare function errorMigrationTargetMismatch(options: {
71
71
  declare function errorMigrationPlanNotArray(dir: string, actualValueDescription?: string): CliStructuredError;
72
72
  //#endregion
73
73
  export { errorMigrationTargetMismatch as a, errorMigrationPlanNotArray as i, errorMigrationFileMissing as n, errorUnfilledPlaceholder as o, errorMigrationInvalidDefaultExport as r, placeholder as s, errorDataTransformContractMismatch as t };
74
- //# sourceMappingURL=migration-CSc3ZZK3.d.mts.map
74
+ //# sourceMappingURL=migration-DOIs8GBr.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-CSc3ZZK3.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/migration.d.mts"],"mappings":";;;;;;;;;;iBASiB,yBAAyB,eAAe;;;;;;;;;;iBAUxC,YAAY;;;;;;;;;;;;;iBAaZ,mCAAmC;WACzC;WACA;WACA;IACP;;;;;;iBAMa,0BAA0B,cAAc;;;;;;;;;;iBAUxC,mCAAmC,aAAa,mCAAmC;;;;;;;;;iBASnF,6BAA6B;WACnC;WACA;IACP;;;;;iBAKa,2BAA2B,aAAa,kCAAkC"}
1
+ {"version":3,"file":"migration-DOIs8GBr.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/migration.d.mts"],"mappings":";;;;;;;;;;iBASiB,yBAAyB,eAAe;;;;;;;;;;iBAUxC,YAAY;;;;;;;;;;;;;iBAaZ,mCAAmC;WACzC;WACA;WACA;IACP;;;;;;iBAMa,0BAA0B,cAAc;;;;;;;;;;iBAUxC,mCAAmC,aAAa,mCAAmC;;;;;;;;;iBASnF,6BAA6B;WACnC;WACA;IACP;;;;;iBAKa,2BAA2B,aAAa,kCAAkC"}
@@ -1,4 +1,4 @@
1
- import { a as structuredError } from "./structured-error-xG_PRmbb.mjs";
1
+ import { o as structuredError } from "./structured-error-CgiSMpdU.mjs";
2
2
  //#region ../../../1-framework/1-core/operations/dist/index.mjs
3
3
  function contractError(code, message, options) {
4
4
  return structuredError(code, message, options);
@@ -1,6 +1,6 @@
1
1
  import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
2
  import { n as ok, t as notOk } from "./result-CBZ8X9mU.mjs";
3
- import { h as isAuthoringPslBlockDescriptor } from "./framework-authoring-CDEvlouU-CD43IJTJ.mjs";
3
+ import { h as isAuthoringPslBlockDescriptor } from "./framework-authoring-CDEvlouU-DKklu-fL.mjs";
4
4
  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
5
  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
6
  //#region ../../../1-framework/2-authoring/psl-parser/dist/index.mjs
@@ -1,4 +1,4 @@
1
- import { a as structuredError } from "./structured-error-xG_PRmbb.mjs";
1
+ import { o as structuredError } from "./structured-error-CgiSMpdU.mjs";
2
2
  import { E as TypesBlockAst, S as SyntaxNode, a as CompositeTypeDeclarationAst, c as FieldDeclarationAst, f as KeyValuePairAst, g as NamespaceDeclarationAst, h as NamedTypeDeclarationAst, m as ModelDeclarationAst, p as ModelAttributeAst, u as GenericBlockDeclarationAst } from "./declarations-DR6To8_k-BFwkCGeP.mjs";
3
3
  import { a as parse } from "./parse-GbZGfMUj-BFSrD2AN.mjs";
4
4
  //#region ../../../1-framework/2-authoring/psl-parser/dist/format.mjs
@@ -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
- import { a as structuredError } from "./structured-error-xG_PRmbb.mjs";
4
- import { h as isAuthoringPslBlockDescriptor } from "./framework-authoring-CDEvlouU-CD43IJTJ.mjs";
3
+ import { o as structuredError } from "./structured-error-CgiSMpdU.mjs";
4
+ import { h as isAuthoringPslBlockDescriptor } from "./framework-authoring-CDEvlouU-DKklu-fL.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) {
@@ -49,11 +49,13 @@ interface StructuredErrorOptions {
49
49
  readonly docsUrl?: string;
50
50
  readonly cause?: unknown;
51
51
  }
52
+ /** Whether a bare string is a published `NAMESPACE.SUBCODE` code. */
53
+ declare function isStructuredErrorCode(code: string): code is StructuredError['code'];
52
54
  declare function isStructuredError(e: unknown): e is StructuredError;
53
55
  declare function structuredError(code: StructuredError['code'], message: string, options?: StructuredErrorOptions): StructuredError;
54
56
  declare const DOCS_ERRORS_VERSION = "next";
55
57
  declare const DOCS_BASE = "https://docs.prisma.io/docs/orm/next/reference/error-reference";
56
58
  declare function docsUrlFor(code: string): string;
57
59
  //#endregion
58
- export { StructuredErrorOptions as a, structuredError as c, StructuredError as i, DOCS_ERRORS_VERSION as n, docsUrlFor as o, NextAction as r, isStructuredError as s, DOCS_BASE as t };
59
- //# sourceMappingURL=structured-error-BBdCpY44.d.mts.map
60
+ export { StructuredErrorOptions as a, isStructuredErrorCode as c, StructuredError as i, structuredError as l, DOCS_ERRORS_VERSION as n, docsUrlFor as o, NextAction as r, isStructuredError as s, DOCS_BASE as t };
61
+ //# sourceMappingURL=structured-error-BsNT4Hun.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"structured-error-BBdCpY44.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/structured-error.d.mts"],"mappings":";;;;;;;;;;;;;;;;;UAgBU;WACC;WACA;WACA;WACA;WACA;WACA;;UAED,wBAAwB;WACvB;WACA;WACA;WACA,uBAAuB;WACvB;aACE;aACA;;WAEF;WACA,OAAO;WACP;;UAED;WACC;WACA;WACA,uBAAuB;WACvB;aACE;aACA;;WAEF;WACA,OAAO;WACP;WACA;;iBAEM,kBAAkB,aAAa,KAAK;iBACpC,gBAAgB,MAAM,yBAAyB,iBAAiB,UAAU,yBAAyB;cACtG;cACA;iBACG,WAAW"}
1
+ {"version":3,"file":"structured-error-BsNT4Hun.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/structured-error.d.mts"],"mappings":";;;;;;;;;;;;;;;;;UAgBU;WACC;WACA;WACA;WACA;WACA;WACA;;UAED,wBAAwB;WACvB;WACA;WACA;WACA,uBAAuB;WACvB;aACE;aACA;;WAEF;WACA,OAAO;WACP;;UAED;WACC;WACA;WACA,uBAAuB;WACvB;aACE;aACA;;WAEF;WACA,OAAO;WACP;WACA;;;iBAGM,sBAAsB,eAAe,QAAQ;iBAC7C,kBAAkB,aAAa,KAAK;iBACpC,gBAAgB,MAAM,yBAAyB,iBAAiB,UAAU,yBAAyB;cACtG;cACA;iBACG,WAAW"}
@@ -1,8 +1,12 @@
1
1
  import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
2
2
  //#region ../../../1-framework/0-foundation/utils/dist/structured-error.mjs
3
3
  const STRUCTURED_CODE_RE = /^[A-Z][A-Z0-9]*\.[A-Z][A-Z0-9_]*$/;
4
+ /** Whether a bare string is a published `NAMESPACE.SUBCODE` code. */
5
+ function isStructuredErrorCode(code) {
6
+ return STRUCTURED_CODE_RE.test(code);
7
+ }
4
8
  function isStructuredError(e) {
5
- return typeof e === "object" && e !== null && "code" in e && typeof e.code === "string" && STRUCTURED_CODE_RE.test(e.code) && "message" in e && typeof e.message === "string";
9
+ return typeof e === "object" && e !== null && "code" in e && typeof e.code === "string" && isStructuredErrorCode(e.code) && "message" in e && typeof e.message === "string";
6
10
  }
7
11
  function structuredError(code, message, options) {
8
12
  const error = options?.cause !== void 0 ? new Error(message, { cause: options.cause }) : new Error(message);
@@ -27,6 +31,6 @@ function docsUrlFor(code) {
27
31
  return `${DOCS_BASE}#${code}`;
28
32
  }
29
33
  //#endregion
30
- export { structuredError as a, isStructuredError as i, DOCS_ERRORS_VERSION as n, docsUrlFor as r, DOCS_BASE as t };
34
+ export { isStructuredErrorCode as a, isStructuredError as i, DOCS_ERRORS_VERSION as n, structuredError as o, docsUrlFor as r, DOCS_BASE as t };
31
35
 
32
- //# sourceMappingURL=structured-error-xG_PRmbb.mjs.map
36
+ //# sourceMappingURL=structured-error-CgiSMpdU.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structured-error-CgiSMpdU.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/structured-error.mjs"],"sourcesContent":["import { t as ifDefined } from \"./defined-BQWA85QH.mjs\";\n//#region src/structured-error.ts\nconst STRUCTURED_CODE_RE = /^[A-Z][A-Z0-9]*\\.[A-Z][A-Z0-9_]*$/;\n/** Whether a bare string is a published `NAMESPACE.SUBCODE` code. */\nfunction isStructuredErrorCode(code) {\n\treturn STRUCTURED_CODE_RE.test(code);\n}\nfunction isStructuredError(e) {\n\treturn typeof e === \"object\" && e !== null && \"code\" in e && typeof e.code === \"string\" && isStructuredErrorCode(e.code) && \"message\" in e && typeof e.message === \"string\";\n}\nfunction structuredError(code, message, options) {\n\tconst error = options?.cause !== void 0 ? new Error(message, { cause: options.cause }) : new Error(message);\n\tObject.defineProperty(error, \"name\", {\n\t\tvalue: \"StructuredError\",\n\t\tconfigurable: true\n\t});\n\treturn Object.assign(error, {\n\t\tcode,\n\t\t...ifDefined(\"why\", options?.why),\n\t\t...ifDefined(\"fix\", options?.fix),\n\t\t...ifDefined(\"nextActions\", options?.nextActions),\n\t\t...ifDefined(\"where\", options?.where),\n\t\t...ifDefined(\"severity\", options?.severity),\n\t\t...ifDefined(\"meta\", options?.meta),\n\t\t...ifDefined(\"docsUrl\", options?.docsUrl)\n\t});\n}\nconst DOCS_ERRORS_VERSION = \"next\";\nconst DOCS_BASE = `https://docs.prisma.io/docs/orm/${DOCS_ERRORS_VERSION}/reference/error-reference`;\nfunction docsUrlFor(code) {\n\treturn `${DOCS_BASE}#${code}`;\n}\n//#endregion\nexport { DOCS_BASE, DOCS_ERRORS_VERSION, docsUrlFor, isStructuredError, isStructuredErrorCode, structuredError };\n\n//# sourceMappingURL=structured-error.mjs.map"],"mappings":";;AAEA,MAAM,qBAAqB;;AAE3B,SAAS,sBAAsB,MAAM;CACpC,OAAO,mBAAmB,KAAK,IAAI;AACpC;AACA,SAAS,kBAAkB,GAAG;CAC7B,OAAO,OAAO,MAAM,YAAY,MAAM,QAAQ,UAAU,KAAK,OAAO,EAAE,SAAS,YAAY,sBAAsB,EAAE,IAAI,KAAK,aAAa,KAAK,OAAO,EAAE,YAAY;AACpK;AACA,SAAS,gBAAgB,MAAM,SAAS,SAAS;CAChD,MAAM,QAAQ,SAAS,UAAU,KAAK,IAAI,IAAI,MAAM,SAAS,EAAE,OAAO,QAAQ,MAAM,CAAC,IAAI,IAAI,MAAM,OAAO;CAC1G,OAAO,eAAe,OAAO,QAAQ;EACpC,OAAO;EACP,cAAc;CACf,CAAC;CACD,OAAO,OAAO,OAAO,OAAO;EAC3B;EACA,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,eAAe,SAAS,WAAW;EAChD,GAAG,UAAU,SAAS,SAAS,KAAK;EACpC,GAAG,UAAU,YAAY,SAAS,QAAQ;EAC1C,GAAG,UAAU,QAAQ,SAAS,IAAI;EAClC,GAAG,UAAU,WAAW,SAAS,OAAO;CACzC,CAAC;AACF;AACA,MAAM,sBAAsB;AAC5B,MAAM,YAAY,mCAAmC,oBAAoB;AACzE,SAAS,WAAW,MAAM;CACzB,OAAO,GAAG,UAAU,GAAG;AACxB"}
@@ -1,2 +1,2 @@
1
- import { i as tsStringLiteral, n as jsonToTsSource, r as renderImports, t as TsExpression } from "./dist-CC1FPJKo.mjs";
1
+ import { i as tsStringLiteral, n as jsonToTsSource, r as renderImports, t as TsExpression } from "./dist-Dqbo77p7.mjs";
2
2
  export { TsExpression, jsonToTsSource, renderImports, tsStringLiteral };
@@ -1,5 +1,5 @@
1
1
  import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
- import { n as contractError, r as soleDomainNamespaceId } from "./default-namespace-D4vCwkXg-yt1Ch4tq.mjs";
2
+ import { n as contractError, r as soleDomainNamespaceId } from "./default-namespace-D4vCwkXg-lzVN7gSc.mjs";
3
3
  import { t as asNamespaceId } from "./namespace-id-asbWpwMw-3yxn-tRe.mjs";
4
4
  import { type } from "arktype";
5
5
  //#region ../../../1-framework/0-foundation/contract/dist/types.mjs
@@ -93,4 +93,4 @@ function isExecutionMutationDefaultValue(value) {
93
93
  //#endregion
94
94
  export { domainValueObjectsAtDefaultNamespace as a, isColumnDefault as c, profileHash as d, domainModelsAtDefaultNamespace as i, isColumnDefaultLiteralInputValue as l, coreHash as n, effectiveControlPolicy as o, crossRef as r, executionHash as s, CrossReferenceSchema as t, isExecutionMutationDefaultValue as u };
95
95
 
96
- //# sourceMappingURL=types-B1qkza2E.mjs.map
96
+ //# sourceMappingURL=types-BnH4zYvN.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-B1qkza2E.mjs","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/types.mjs"],"sourcesContent":["import { n as soleDomainNamespaceId, r as contractError, t as UNBOUND_DOMAIN_NAMESPACE_ID } from \"./default-namespace-D4vCwkXg.mjs\";\nimport { t as resolveDomainModel } from \"./resolve-domain-model-BovPAsW2.mjs\";\nimport { t as asNamespaceId } from \"./namespace-id-asbWpwMw.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { type } from \"arktype\";\n//#region src/control-policy.ts\n/**\n* Resolves the effective control policy for a storage-plane node.\n*\n* Precedence: node-level value → contract default → `'managed'`.\n*\n* Both parameters are optional raw values so this function stays node-type-agnostic\n* and can be called by any consumer (verifier, planner, etc.) without importing IR classes.\n*/\nfunction effectiveControlPolicy(nodeControl, defaultControlPolicy) {\n\treturn nodeControl ?? defaultControlPolicy ?? \"managed\";\n}\n//#endregion\n//#region src/cross-reference.ts\nconst CrossReferenceSchema = /* @__PURE__ */ blindCast(/* @__PURE__ */ type({\n\t\"+\": \"reject\",\n\tnamespace: \"string\",\n\tmodel: \"string\",\n\t\"space?\": \"string\"\n}));\nconst DEFAULT_CROSS_REF_NAMESPACE = \"__unbound__\";\nfunction crossRef(model, namespace = DEFAULT_CROSS_REF_NAMESPACE, space) {\n\treturn {\n\t\tnamespace: asNamespaceId(namespace),\n\t\tmodel,\n\t\t...space !== void 0 ? { space } : {}\n\t};\n}\n//#endregion\n//#region src/domain-namespace-access.ts\n/**\n* Models map for the contract's single domain namespace. Throws when the\n* contract does not declare exactly one namespace — bare-name access is\n* ambiguous across namespaces and must be qualified explicitly (TML-2550).\n*/\nfunction domainModelsAtDefaultNamespace(domain) {\n\tconst namespaceId = soleDomainNamespaceId(domain);\n\tconst domainNamespace = domain.namespaces[namespaceId];\n\tif (domainNamespace === void 0) throw contractError(\"CONTRACT.NAMESPACE_INVALID\", `domain namespace \"${namespaceId}\" is not present on the contract`, { meta: {\n\t\treason: \"domain-namespace-missing\",\n\t\tnamespaceId\n\t} });\n\treturn domainNamespace.models;\n}\n/**\n* Value objects for the contract's single domain namespace, when present.\n* Throws when the contract does not declare exactly one namespace.\n*/\nfunction domainValueObjectsAtDefaultNamespace(domain) {\n\treturn domain.namespaces[soleDomainNamespaceId(domain)]?.valueObjects;\n}\n//#endregion\n//#region src/types.ts\nfunction executionHash(value) {\n\treturn value;\n}\nfunction coreHash(value) {\n\treturn value;\n}\nfunction profileHash(value) {\n\treturn value;\n}\n/**\n* Runtime predicate for `ColumnDefaultLiteralInputValue`. Authoring layers\n* resolve template values from caller-supplied args (typed `unknown` at the\n* boundary) and need to validate before constructing a `ColumnDefault`.\n* Accepts JSON primitives, plain arrays/objects of JSON values, and `Date`\n* instances. Rejects functions, class instances (other than `Date`),\n* `undefined`, `bigint`, `symbol`, and arrays/objects containing those.\n*/\nfunction isColumnDefaultLiteralInputValue(value) {\n\tif (value === null) return true;\n\tconst t = typeof value;\n\tif (t === \"string\" || t === \"number\" || t === \"boolean\") return true;\n\tif (value instanceof Date) return true;\n\tif (Array.isArray(value)) return value.every(isColumnDefaultLiteralInputValue);\n\tif (t === \"object\" && Object.getPrototypeOf(value) === Object.prototype) return Object.values(value).every(isColumnDefaultLiteralInputValue);\n\treturn false;\n}\nfunction isColumnDefault(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst kind = value.kind;\n\tif (kind === \"literal\") return \"value\" in value;\n\tif (kind === \"function\") return typeof value.expression === \"string\";\n\treturn false;\n}\nfunction isExecutionMutationDefaultValue(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\tif (candidate.kind !== \"generator\") return false;\n\tif (typeof candidate.id !== \"string\") return false;\n\tif (candidate.params !== void 0 && (typeof candidate.params !== \"object\" || candidate.params === null || Array.isArray(candidate.params))) return false;\n\treturn true;\n}\n//#endregion\nexport { CrossReferenceSchema, UNBOUND_DOMAIN_NAMESPACE_ID, asNamespaceId, coreHash, crossRef, domainModelsAtDefaultNamespace, domainValueObjectsAtDefaultNamespace, effectiveControlPolicy, executionHash, isColumnDefault, isColumnDefaultLiteralInputValue, isExecutionMutationDefaultValue, profileHash, resolveDomainModel, soleDomainNamespaceId };\n\n//# sourceMappingURL=types.mjs.map"],"mappings":";;;;;;;;;;;;;AAcA,SAAS,uBAAuB,aAAa,sBAAsB;CAClE,OAAO,eAAe,wBAAwB;AAC/C;AAGA,MAAM,uBAAuC,0BAA0B,qBAAK;CAC3E,KAAK;CACL,WAAW;CACX,OAAO;CACP,UAAU;AACX,CAAC,CAAC;AACF,MAAM,8BAA8B;AACpC,SAAS,SAAS,OAAO,YAAY,6BAA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AAM,YAAY;CAClB,IAAI,UAAU,SAAS,aAAa,OAAO;CAC3C,IAAI,OAAO,UAAU,OAAO,UAAU,OAAO;CAC7C,IAAI,UAAU,WAAW,KAAK,MAAM,OAAO,UAAU,WAAW,YAAY,UAAU,WAAW,QAAQ,MAAM,QAAQ,UAAU,MAAM,IAAI,OAAO;CAClJ,OAAO;AACR"}
1
+ {"version":3,"file":"types-BnH4zYvN.mjs","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/types.mjs"],"sourcesContent":["import { n as soleDomainNamespaceId, r as contractError, t as UNBOUND_DOMAIN_NAMESPACE_ID } from \"./default-namespace-D4vCwkXg.mjs\";\nimport { t as resolveDomainModel } from \"./resolve-domain-model-BovPAsW2.mjs\";\nimport { t as asNamespaceId } from \"./namespace-id-asbWpwMw.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { type } from \"arktype\";\n//#region src/control-policy.ts\n/**\n* Resolves the effective control policy for a storage-plane node.\n*\n* Precedence: node-level value → contract default → `'managed'`.\n*\n* Both parameters are optional raw values so this function stays node-type-agnostic\n* and can be called by any consumer (verifier, planner, etc.) without importing IR classes.\n*/\nfunction effectiveControlPolicy(nodeControl, defaultControlPolicy) {\n\treturn nodeControl ?? defaultControlPolicy ?? \"managed\";\n}\n//#endregion\n//#region src/cross-reference.ts\nconst CrossReferenceSchema = /* @__PURE__ */ blindCast(/* @__PURE__ */ type({\n\t\"+\": \"reject\",\n\tnamespace: \"string\",\n\tmodel: \"string\",\n\t\"space?\": \"string\"\n}));\nconst DEFAULT_CROSS_REF_NAMESPACE = \"__unbound__\";\nfunction crossRef(model, namespace = DEFAULT_CROSS_REF_NAMESPACE, space) {\n\treturn {\n\t\tnamespace: asNamespaceId(namespace),\n\t\tmodel,\n\t\t...space !== void 0 ? { space } : {}\n\t};\n}\n//#endregion\n//#region src/domain-namespace-access.ts\n/**\n* Models map for the contract's single domain namespace. Throws when the\n* contract does not declare exactly one namespace — bare-name access is\n* ambiguous across namespaces and must be qualified explicitly (TML-2550).\n*/\nfunction domainModelsAtDefaultNamespace(domain) {\n\tconst namespaceId = soleDomainNamespaceId(domain);\n\tconst domainNamespace = domain.namespaces[namespaceId];\n\tif (domainNamespace === void 0) throw contractError(\"CONTRACT.NAMESPACE_INVALID\", `domain namespace \"${namespaceId}\" is not present on the contract`, { meta: {\n\t\treason: \"domain-namespace-missing\",\n\t\tnamespaceId\n\t} });\n\treturn domainNamespace.models;\n}\n/**\n* Value objects for the contract's single domain namespace, when present.\n* Throws when the contract does not declare exactly one namespace.\n*/\nfunction domainValueObjectsAtDefaultNamespace(domain) {\n\treturn domain.namespaces[soleDomainNamespaceId(domain)]?.valueObjects;\n}\n//#endregion\n//#region src/types.ts\nfunction executionHash(value) {\n\treturn value;\n}\nfunction coreHash(value) {\n\treturn value;\n}\nfunction profileHash(value) {\n\treturn value;\n}\n/**\n* Runtime predicate for `ColumnDefaultLiteralInputValue`. Authoring layers\n* resolve template values from caller-supplied args (typed `unknown` at the\n* boundary) and need to validate before constructing a `ColumnDefault`.\n* Accepts JSON primitives, plain arrays/objects of JSON values, and `Date`\n* instances. Rejects functions, class instances (other than `Date`),\n* `undefined`, `bigint`, `symbol`, and arrays/objects containing those.\n*/\nfunction isColumnDefaultLiteralInputValue(value) {\n\tif (value === null) return true;\n\tconst t = typeof value;\n\tif (t === \"string\" || t === \"number\" || t === \"boolean\") return true;\n\tif (value instanceof Date) return true;\n\tif (Array.isArray(value)) return value.every(isColumnDefaultLiteralInputValue);\n\tif (t === \"object\" && Object.getPrototypeOf(value) === Object.prototype) return Object.values(value).every(isColumnDefaultLiteralInputValue);\n\treturn false;\n}\nfunction isColumnDefault(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst kind = value.kind;\n\tif (kind === \"literal\") return \"value\" in value;\n\tif (kind === \"function\") return typeof value.expression === \"string\";\n\treturn false;\n}\nfunction isExecutionMutationDefaultValue(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\tif (candidate.kind !== \"generator\") return false;\n\tif (typeof candidate.id !== \"string\") return false;\n\tif (candidate.params !== void 0 && (typeof candidate.params !== \"object\" || candidate.params === null || Array.isArray(candidate.params))) return false;\n\treturn true;\n}\n//#endregion\nexport { CrossReferenceSchema, UNBOUND_DOMAIN_NAMESPACE_ID, asNamespaceId, coreHash, crossRef, domainModelsAtDefaultNamespace, domainValueObjectsAtDefaultNamespace, effectiveControlPolicy, executionHash, isColumnDefault, isColumnDefaultLiteralInputValue, isExecutionMutationDefaultValue, profileHash, resolveDomainModel, soleDomainNamespaceId };\n\n//# sourceMappingURL=types.mjs.map"],"mappings":";;;;;;;;;;;;;AAcA,SAAS,uBAAuB,aAAa,sBAAsB;CAClE,OAAO,eAAe,wBAAwB;AAC/C;AAGA,MAAM,uBAAuC,0BAA0B,qBAAK;CAC3E,KAAK;CACL,WAAW;CACX,OAAO;CACP,UAAU;AACX,CAAC,CAAC;AACF,MAAM,8BAA8B;AACpC,SAAS,SAAS,OAAO,YAAY,6BAA6B,OAAO;CACxE,OAAO;EACN,WAAW,cAAc,SAAS;EAClC;EACA,GAAG,UAAU,KAAK,IAAI,EAAE,MAAM,IAAI,CAAC;CACpC;AACD;;;;;;AAQA,SAAS,+BAA+B,QAAQ;CAC/C,MAAM,cAAc,sBAAsB,MAAM;CAChD,MAAM,kBAAkB,OAAO,WAAW;CAC1C,IAAI,oBAAoB,KAAK,GAAG,MAAM,cAAc,8BAA8B,qBAAqB,YAAY,mCAAmC,EAAE,MAAM;EAC7J,QAAQ;EACR;CACD,EAAE,CAAC;CACH,OAAO,gBAAgB;AACxB;;;;;AAKA,SAAS,qCAAqC,QAAQ;CACrD,OAAO,OAAO,WAAW,sBAAsB,MAAM,EAAE,EAAE;AAC1D;AAGA,SAAS,cAAc,OAAO;CAC7B,OAAO;AACR;AACA,SAAS,SAAS,OAAO;CACxB,OAAO;AACR;AACA,SAAS,YAAY,OAAO;CAC3B,OAAO;AACR;;;;;;;;;AASA,SAAS,iCAAiC,OAAO;CAChD,IAAI,UAAU,MAAM,OAAO;CAC3B,MAAM,IAAI,OAAO;CACjB,IAAI,MAAM,YAAY,MAAM,YAAY,MAAM,WAAW,OAAO;CAChE,IAAI,iBAAiB,MAAM,OAAO;CAClC,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,MAAM,gCAAgC;CAC7E,IAAI,MAAM,YAAY,OAAO,eAAe,KAAK,MAAM,OAAO,WAAW,OAAO,OAAO,OAAO,KAAK,CAAC,CAAC,MAAM,gCAAgC;CAC3I,OAAO;AACR;AACA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,MAAM,OAAO,MAAM;CACnB,IAAI,SAAS,WAAW,OAAO,WAAW;CAC1C,IAAI,SAAS,YAAY,OAAO,OAAO,MAAM,eAAe;CAC5D,OAAO;AACR;AACA,SAAS,gCAAgC,OAAO;CAC/C,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,MAAM,YAAY;CAClB,IAAI,UAAU,SAAS,aAAa,OAAO;CAC3C,IAAI,OAAO,UAAU,OAAO,UAAU,OAAO;CAC7C,IAAI,UAAU,WAAW,KAAK,MAAM,OAAO,UAAU,WAAW,YAAY,UAAU,WAAW,QAAQ,MAAM,QAAQ,UAAU,MAAM,IAAI,OAAO;CAClJ,OAAO;AACR"}
package/dist/utils.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { i as JsonValue, n as JsonObject, r as JsonPrimitive, t as JsonArray } from "./json-Dkqr3say.mjs";
2
2
  import { a as ok, i as notOk, n as Ok, o as okVoid, r as Result, t as NotOk } from "./result-Bpupv5vO.mjs";
3
- import { a as StructuredErrorOptions, c as structuredError, i as StructuredError, n as DOCS_ERRORS_VERSION, o as docsUrlFor, r as NextAction, s as isStructuredError, t as DOCS_BASE } from "./structured-error-BBdCpY44.mjs";
3
+ import { a as StructuredErrorOptions, c as isStructuredErrorCode, i as StructuredError, l as structuredError, n as DOCS_ERRORS_VERSION, o as docsUrlFor, r as NextAction, s as isStructuredError, t as DOCS_BASE } from "./structured-error-BsNT4Hun.mjs";
4
4
  import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
5
5
  import { t as abortable } from "./abortable-DBbAaT_4.mjs";
6
6
  import { t as isArrayEqual } from "./array-equal-dUd-VPlk.mjs";
@@ -13,4 +13,4 @@ import { n as assertNever, r as isInternalError, t as InternalError } from "./in
13
13
  import { t as isThenable } from "./promise-DHJWZv49.mjs";
14
14
  import { n as redactDatabaseUrl, t as RedactedDatabaseUrl } from "./redact-db-url-BlaloOwt.mjs";
15
15
  import { t as SimplifyDeep } from "./simplify-deep-Dw9I_ZUl.mjs";
16
- export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type NextAction, type NotOk, type Ok, type RedactedDatabaseUrl, type Result, type Simplify, type SimplifyDeep, type StructuredError, type StructuredErrorOptions, type UnionToIntersection, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError };
16
+ export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type NextAction, type NotOk, type Ok, type RedactedDatabaseUrl, type Result, type Simplify, type SimplifyDeep, type StructuredError, type StructuredErrorOptions, type UnionToIntersection, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isStructuredErrorCode, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError };
package/dist/utils.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as castAs, t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
2
  import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
3
- import { a as structuredError, i as isStructuredError, n as DOCS_ERRORS_VERSION, r as docsUrlFor, t as DOCS_BASE } from "./structured-error-xG_PRmbb.mjs";
3
+ import { a as isStructuredErrorCode, i as isStructuredError, n as DOCS_ERRORS_VERSION, o as structuredError, r as docsUrlFor, t as DOCS_BASE } from "./structured-error-CgiSMpdU.mjs";
4
4
  import { t as isArrayEqual } from "./array-equal-28xupwIB.mjs";
5
5
  import { t as abortable } from "./abortable-CQO6uG9F.mjs";
6
6
  import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-BIc-ehme-ouBQPoEL.mjs";
@@ -10,4 +10,4 @@ import { t as hashContent } from "./hash-content-Bugg_nZn.mjs";
10
10
  import { t as isThenable } from "./promise-D8meygPf.mjs";
11
11
  import { t as redactDatabaseUrl } from "./redact-db-url-CRWJWdB1.mjs";
12
12
  import { n as ok, r as okVoid, t as notOk } from "./result-CBZ8X9mU.mjs";
13
- export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError };
13
+ export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isStructuredErrorCode, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError };
@@ -1,2 +1,2 @@
1
- import { a as StructuredErrorOptions, c as structuredError, i as StructuredError, n as DOCS_ERRORS_VERSION, o as docsUrlFor, r as NextAction, s as isStructuredError, t as DOCS_BASE } from "./structured-error-BBdCpY44.mjs";
2
- export { DOCS_BASE, DOCS_ERRORS_VERSION, type NextAction, type StructuredError, type StructuredErrorOptions, docsUrlFor, isStructuredError, structuredError };
1
+ import { a as StructuredErrorOptions, c as isStructuredErrorCode, i as StructuredError, l as structuredError, n as DOCS_ERRORS_VERSION, o as docsUrlFor, r as NextAction, s as isStructuredError, t as DOCS_BASE } from "./structured-error-BsNT4Hun.mjs";
2
+ export { DOCS_BASE, DOCS_ERRORS_VERSION, type NextAction, type StructuredError, type StructuredErrorOptions, docsUrlFor, isStructuredError, isStructuredErrorCode, structuredError };
@@ -1,2 +1,2 @@
1
- import { a as structuredError, i as isStructuredError, n as DOCS_ERRORS_VERSION, r as docsUrlFor, t as DOCS_BASE } from "./structured-error-xG_PRmbb.mjs";
2
- export { DOCS_BASE, DOCS_ERRORS_VERSION, docsUrlFor, isStructuredError, structuredError };
1
+ import { a as isStructuredErrorCode, i as isStructuredError, n as DOCS_ERRORS_VERSION, o as structuredError, r as docsUrlFor, t as DOCS_BASE } from "./structured-error-CgiSMpdU.mjs";
2
+ export { DOCS_BASE, DOCS_ERRORS_VERSION, docsUrlFor, isStructuredError, isStructuredErrorCode, structuredError };