@prisma/orm-framework 8.0.0-rc.16-dev.6 → 8.0.0-rc.16-dev.8

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 (59) hide show
  1. package/dist/{authoring-BollGD3p.mjs → authoring-Doh4Co1l.mjs} +2 -2
  2. package/dist/{authoring-BollGD3p.mjs.map → authoring-Doh4Co1l.mjs.map} +1 -1
  3. package/dist/{binder-CfxKD8hm-DG9ndi6m.d.mts → binder-CfxKD8hm-D5RMNOlu.d.mts} +4 -4
  4. package/dist/{binder-CfxKD8hm-DG9ndi6m.d.mts.map → binder-CfxKD8hm-D5RMNOlu.d.mts.map} +1 -1
  5. package/dist/components.d.mts +2 -2
  6. package/dist/components.mjs +9 -8
  7. package/dist/components__authoring.mjs +1 -1
  8. package/dist/components__codec.mjs +1 -1
  9. package/dist/components__control.d.mts +2 -2
  10. package/dist/components__control.mjs +2 -2
  11. package/dist/components__ir.mjs +2 -1
  12. package/dist/{config-types-CVe1Oivb.d.mts → config-types-CzRkQS8v.d.mts} +2 -2
  13. package/dist/{config-types-CVe1Oivb.d.mts.map → config-types-CzRkQS8v.d.mts.map} +1 -1
  14. package/dist/config.d.mts +1 -1
  15. package/dist/config__config-types.d.mts +1 -1
  16. package/dist/control-BrhkTtvb.d.mts +1 -0
  17. package/dist/{control-BaynP47g-Bg8xTRS3.mjs → control-C4Q85sT5-CkUAJH3B.mjs} +17 -3
  18. package/dist/control-C4Q85sT5-CkUAJH3B.mjs.map +1 -0
  19. package/dist/{control-tyaNVmQ-.d.mts → control-CdQIjZLo.d.mts} +293 -123
  20. package/dist/control-CdQIjZLo.d.mts.map +1 -0
  21. package/dist/{control-Dv7d6sU1.mjs → control-DNzOW6HH.mjs} +87 -4
  22. package/dist/control-DNzOW6HH.mjs.map +1 -0
  23. package/dist/{control-CJlRO0fS-DW9k9mRB.d.mts → control-DhWsAbYJ-D37F1KSm.d.mts} +9 -2
  24. package/dist/control-DhWsAbYJ-D37F1KSm.d.mts.map +1 -0
  25. package/dist/errors.d.mts +5 -4
  26. package/dist/errors.mjs +4 -4
  27. package/dist/errors__control.d.mts +2 -1
  28. package/dist/errors__control.mjs +1 -1
  29. package/dist/errors__execution.d.mts +2 -2
  30. package/dist/errors__execution.mjs +2 -2
  31. package/dist/errors__migration.d.mts +2 -2
  32. package/dist/errors__migration.mjs +2 -2
  33. package/dist/{execution-BAT2IoUz.d.mts → execution-CJz0gW0j.d.mts} +4 -24
  34. package/dist/{execution-BAT2IoUz.d.mts.map → execution-CJz0gW0j.d.mts.map} +1 -1
  35. package/dist/{execution-qoPA8PQQ.mjs → execution-CasccCMg.mjs} +3 -30
  36. package/dist/{execution-qoPA8PQQ.mjs.map → execution-CasccCMg.mjs.map} +1 -1
  37. package/dist/{ir-RR6raWW5.mjs → ir-uDGU9vaj.mjs} +3 -50
  38. package/dist/ir-uDGU9vaj.mjs.map +1 -0
  39. package/dist/{migration-C8GCVMjt.mjs → migration-A-VM0FBS.mjs} +14 -3
  40. package/dist/migration-A-VM0FBS.mjs.map +1 -0
  41. package/dist/{migration-o0OGRAcI.d.mts → migration-CwaNPvbt.d.mts} +10 -3
  42. package/dist/migration-CwaNPvbt.d.mts.map +1 -0
  43. package/dist/namespace-VUH2dgnS-By5y75h9.mjs +53 -0
  44. package/dist/namespace-VUH2dgnS-By5y75h9.mjs.map +1 -0
  45. package/dist/{parse-GXhoypXR-CJoPrjXn.d.mts → parse-GXhoypXR-pRzlssbl.d.mts} +3 -3
  46. package/dist/{parse-GXhoypXR-CJoPrjXn.d.mts.map → parse-GXhoypXR-pRzlssbl.d.mts.map} +1 -1
  47. package/dist/psl-parser.d.mts +3 -3
  48. package/dist/psl-parser.mjs +1 -1
  49. package/dist/psl-parser__format.d.mts +1 -1
  50. package/dist/psl-parser__interpret.d.mts +3 -3
  51. package/dist/psl-parser__syntax.d.mts +1 -1
  52. package/package.json +15 -15
  53. package/dist/control-BaynP47g-Bg8xTRS3.mjs.map +0 -1
  54. package/dist/control-CJlRO0fS-DW9k9mRB.d.mts.map +0 -1
  55. package/dist/control-Dv7d6sU1.mjs.map +0 -1
  56. package/dist/control-tyaNVmQ-.d.mts.map +0 -1
  57. package/dist/ir-RR6raWW5.mjs.map +0 -1
  58. package/dist/migration-C8GCVMjt.mjs.map +0 -1
  59. package/dist/migration-o0OGRAcI.d.mts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-C4Q85sT5-CkUAJH3B.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/control-C4Q85sT5.mjs"],"sourcesContent":["import { migrationStatementJson } from \"@internal/framework-components/control\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { docsUrlFor } from \"@internal/utils/structured-error\";\n//#region src/control.ts\n/**\n* Structured CLI error that contains all information needed for error envelopes.\n* Call sites throw these errors with full context.\n*\n* A `CliStructuredError` is a `StructuredError` (see\n* `@internal/utils/structured-error`): `code` is a dotted\n* `NAMESPACE.SUBCODE` string, and the namespace prefix is the error's\n* category — there is no separate `domain` field. See\n* [ADR 239](../../../../../docs/architecture%20docs/adrs/ADR%20239%20-%20Errors%20are%20structural%20envelopes%20with%20dotted%20namespace%20codes.md)\n* for the namespace taxonomy.\n*/\nvar CliStructuredError = class extends Error {\n\tcode;\n\tseverity;\n\tconstructor(code, summary, options) {\n\t\tsuper(summary, options?.cause !== void 0 ? { cause: options.cause } : void 0);\n\t\tthis.name = \"CliStructuredError\";\n\t\tthis.code = code;\n\t\tthis.severity = options?.severity ?? \"error\";\n\t\tconst fix = options?.fix === options?.why ? void 0 : options?.fix;\n\t\tconst where = options?.where ? {\n\t\t\t...ifDefined(\"path\", options.where.path),\n\t\t\t...ifDefined(\"line\", options.where.line)\n\t\t} : void 0;\n\t\tObject.assign(this, {\n\t\t\t...ifDefined(\"why\", options?.why),\n\t\t\t...ifDefined(\"fix\", fix),\n\t\t\t...ifDefined(\"nextActions\", options?.nextActions),\n\t\t\t...ifDefined(\"diagnostics\", options?.diagnostics),\n\t\t\t...ifDefined(\"where\", where),\n\t\t\t...ifDefined(\"meta\", options?.meta),\n\t\t\t...ifDefined(\"docsUrl\", options?.docsUrl)\n\t\t});\n\t}\n\t/**\n\t* Converts this error to a CLI error envelope for output formatting.\n\t*\n\t* This is the boundary that emits the envelope, so it is where a missing\n\t* `nextActions` becomes `[]`.\n\t*/\n\ttoEnvelope() {\n\t\treturn {\n\t\t\tok: false,\n\t\t\tcode: this.code,\n\t\t\tseverity: this.severity,\n\t\t\tsummary: this.message,\n\t\t\t...ifDefined(\"why\", this.why),\n\t\t\t...ifDefined(\"fix\", this.fix),\n\t\t\tnextActions: this.nextActions ?? [],\n\t\t\t...ifDefined(\"diagnostics\", this.diagnostics),\n\t\t\t...ifDefined(\"where\", this.where),\n\t\t\t...ifDefined(\"meta\", this.meta),\n\t\t\t...ifDefined(\"docsUrl\", this.docsUrl)\n\t\t};\n\t}\n\t/**\n\t* Type guard to check if an error is a CliStructuredError.\n\t* Uses duck-typing to work across module boundaries where instanceof may fail.\n\t*/\n\tstatic is(error) {\n\t\tif (!(error instanceof Error)) return false;\n\t\tconst candidate = error;\n\t\treturn candidate.name === \"CliStructuredError\" && typeof candidate.code === \"string\" && typeof candidate.toEnvelope === \"function\";\n\t}\n};\n/**\n* Config file not found or missing.\n*/\nfunction errorConfigFileNotFound(configPath, options) {\n\treturn new CliStructuredError(\"CONFIG.FILE_NOT_FOUND\", \"Config file not found\", {\n\t\t...options?.why ? { why: options.why } : { why: \"Config file not found\" },\n\t\tfix: \"Run '{bin} orm init' to create a config file\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Create a config file\",\n\t\t\tcommand: \"{bin} orm init\"\n\t\t}],\n\t\tdocsUrl: docsUrlFor(\"CONFIG.FILE_NOT_FOUND\"),\n\t\t...configPath ? { where: { path: configPath } } : {}\n\t});\n}\n/**\n* Config module failed to evaluate (syntax error, module threw during import).\n*/\nfunction errorConfigEvaluationFailed(configPath, options) {\n\treturn new CliStructuredError(\"CONFIG.EVALUATION_FAILED\", \"Config file could not be evaluated\", {\n\t\twhy: options.why,\n\t\tfix: \"Fix the error in your prisma.config.ts so the module evaluates, then rerun the command\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.EVALUATION_FAILED\"),\n\t\t...configPath ? { where: { path: configPath } } : {},\n\t\t...options.cause !== void 0 ? { cause: options.cause } : {}\n\t});\n}\n/**\n* Config module evaluated, but its export does not carry the definePrismaConfig\n* version marker (plain object export, or a config produced by a different\n* defineConfig such as classic Prisma's).\n*/\nfunction errorConfigVersionMarkerMissing(configPath) {\n\treturn new CliStructuredError(\"CONFIG.VERSION_MARKER_MISSING\", \"Config is not a definePrismaConfig result\", {\n\t\twhy: \"The config module evaluated, but its default export was not created by a current definePrismaConfig\",\n\t\tfix: \"Create the config with definePrismaConfig from '@prisma/cli-engine', nest your settings under its `orm` section, and export its return value directly\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.VERSION_MARKER_MISSING\"),\n\t\t...configPath ? { where: { path: configPath } } : {}\n\t});\n}\n/**\n* Contract configuration missing from config.\n*/\nfunction errorContractConfigMissing(options) {\n\treturn new CliStructuredError(\"CONFIG.CONTRACT_MISSING\", \"Contract configuration missing\", {\n\t\twhy: options?.why ?? \"The contract configuration is required for emit\",\n\t\tfix: \"Add contract configuration to your prisma.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.CONTRACT_MISSING\")\n\t});\n}\n/**\n* Contract validation failed.\n*/\nfunction errorContractValidationFailed(reason, options) {\n\treturn new CliStructuredError(\"CONTRACT.VALIDATION_FAILED\", \"Contract validation failed\", {\n\t\twhy: reason,\n\t\tfix: \"Re-run `{bin} contract emit`, or fix the contract file and try again\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Re-emit the contract\",\n\t\t\tcommand: \"{bin} contract emit\"\n\t\t}, {\n\t\t\tkind: \"edit-file\",\n\t\t\tlabel: \"Fix the contract file, then re-run the command\",\n\t\t\treason\n\t\t}],\n\t\tdocsUrl: docsUrlFor(\"CONTRACT.VALIDATION_FAILED\"),\n\t\t...options?.where ? { where: options.where } : {},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n/**\n* File not found.\n*/\nfunction errorFileNotFound(filePath, options) {\n\treturn new CliStructuredError(\"CLI.FILE_NOT_FOUND\", \"File not found\", {\n\t\twhy: options?.why ?? `File not found: ${filePath}`,\n\t\tfix: options?.fix ?? \"Check that the file path is correct\",\n\t\twhere: { path: filePath },\n\t\t...options?.docsUrl ? { docsUrl: options.docsUrl } : {},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n/**\n* Database connection is required but not provided.\n*/\nfunction errorDatabaseConnectionRequired(options) {\n\tconst runHint = options?.retryCommand ? `Run \\`${options.retryCommand}\\`` : options?.commandName ? `Run \\`{bin} ${options.commandName} --db <url>\\`` : \"Provide `--db <url>`\";\n\treturn new CliStructuredError(\"CONFIG.DB_CONNECTION_REQUIRED\", \"Database connection is required\", {\n\t\twhy: options?.why ?? \"Database connection is required for this command\",\n\t\tfix: `${runHint}, or set \\`db: { connection: \"postgres://…\" }\\` in prisma.config.ts`,\n\t\t...options?.missingFlags !== void 0 ? { meta: { missingFlags: [...options.missingFlags] } } : {}\n\t});\n}\n/**\n* Query runner factory is required but not provided in config.\n*/\nfunction errorQueryRunnerFactoryRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.QUERY_RUNNER_FACTORY_REQUIRED\", \"Query runner factory is required\", {\n\t\twhy: options?.why ?? \"Config.db.queryRunnerFactory is required for db verify\",\n\t\tfix: \"Add db.queryRunnerFactory to prisma.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.QUERY_RUNNER_FACTORY_REQUIRED\")\n\t});\n}\n/**\n* Family verify.readMarker is required but not provided.\n*/\nfunction errorFamilyReadMarkerSqlRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.FAMILY_READ_MARKER_REQUIRED\", \"Family readMarker() is required\", {\n\t\twhy: options?.why ?? \"Family verify.readMarker is required for db verify\",\n\t\tfix: \"Ensure family.verify.readMarker() is exported by your family package\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.FAMILY_READ_MARKER_REQUIRED\")\n\t});\n}\n/**\n* JSON output format not supported.\n*/\nfunction errorJsonFormatNotSupported(options) {\n\treturn new CliStructuredError(\"CLI.JSON_FORMAT_UNSUPPORTED\", \"Unsupported JSON format\", {\n\t\twhy: `The ${options.command} command does not support --json ${options.format}`,\n\t\tfix: `Use --json ${options.supportedFormats.join(\" or \")}, or omit --json for human output`,\n\t\tmeta: {\n\t\t\tcommand: options.command,\n\t\t\tformat: options.format,\n\t\t\tsupportedFormats: options.supportedFormats\n\t\t}\n\t});\n}\n/**\n* Driver is required for DB-connected commands but not provided.\n*/\nfunction errorDriverRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.DRIVER_REQUIRED\", \"Driver is required for DB-connected commands\", {\n\t\twhy: options?.why ?? \"Config.driver is required for DB-connected commands\",\n\t\tfix: \"Add a control-plane driver to prisma.config.ts (e.g. import a driver descriptor and set `driver: postgresDriver`)\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.DRIVER_REQUIRED\")\n\t});\n}\n/**\n* Contract requires extension packs that are not provided by config descriptors.\n*/\nfunction errorContractMissingExtensions(options) {\n\tconst missing = [...options.missingExtensions].sort();\n\treturn new CliStructuredError(\"CONFIG.MISSING_EXTENSION_PACKS\", \"Missing extension packs in config\", {\n\t\twhy: missing.length === 1 ? `Contract requires extension pack '${missing[0]}', but CLI config does not provide a matching descriptor.` : `Contract requires extension packs ${missing.map((p) => `'${p}'`).join(\", \")}, but CLI config does not provide matching descriptors.`,\n\t\tfix: \"Add the missing extension descriptors to `extensions` in prisma.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.MISSING_EXTENSION_PACKS\"),\n\t\tmeta: {\n\t\t\tmissingExtensions: missing,\n\t\t\tprovidedComponentIds: [...options.providedComponentIds].sort()\n\t\t}\n\t});\n}\nfunction locationJson(location) {\n\tif (location.namespaceId !== UNBOUND_NAMESPACE_ID) return location;\n\tconst { namespaceId: _unbound, ...rest } = location;\n\treturn rest;\n}\nfunction conflictJson(conflict) {\n\treturn {\n\t\t...conflict,\n\t\t...conflict.location === void 0 ? {} : { location: locationJson(conflict.location) },\n\t\t...conflict.refusedStatement === void 0 ? {} : { refusedStatement: migrationStatementJson(conflict.refusedStatement) }\n\t};\n}\n/**\n* Migration planning failed due to conflicts.\n*/\nfunction errorMigrationPlanningFailed(options) {\n\tconst conflictSummaries = options.conflicts.map((c) => c.summary);\n\tconst computedWhy = options.why ?? conflictSummaries.join(\"\\n\");\n\tconst conflictFixes = options.conflicts.map((c) => c.why).filter((why) => typeof why === \"string\");\n\treturn new CliStructuredError(\"MIGRATION.PLANNING_FAILED\", \"Migration planning failed\", {\n\t\twhy: computedWhy,\n\t\tfix: conflictFixes.length > 0 ? conflictFixes.join(\"\\n\") : \"Use `db verify --schema-only` to inspect conflicts, or ensure the database is empty\",\n\t\tmeta: { conflicts: options.conflicts.map(conflictJson) },\n\t\tdocsUrl: docsUrlFor(\"MIGRATION.PLANNING_FAILED\")\n\t});\n}\n/**\n* Target does not support migrations (missing createPlanner/createRunner).\n*/\nfunction errorTargetMigrationNotSupported(options) {\n\treturn new CliStructuredError(\"MIGRATION.TARGET_UNSUPPORTED\", \"Target does not support migrations\", {\n\t\twhy: options?.why ?? \"The configured target does not provide migration planner/runner\",\n\t\tfix: \"Select a target that provides migrations (it must export `target.migrations` for db init)\",\n\t\tdocsUrl: docsUrlFor(\"MIGRATION.TARGET_UNSUPPORTED\")\n\t});\n}\n/**\n* The migration-file CLI received `--config` without a path argument (either\n* a bare trailing `--config`, or `--config` followed by another flag like\n* `--config --dry-run`). Surfacing this as a structured error fails fast\n* rather than silently consuming the next flag as the config path or\n* falling back to default discovery against the wrong project.\n*/\nfunction errorMigrationCliInvalidConfigArg(options) {\n\treturn new CliStructuredError(\"CLI.CONFIG_ARG_MISSING_PATH\", \"--config flag requires a path argument\", {\n\t\twhy: options?.nextToken !== void 0 ? `\\`--config\\` was followed by another flag (\\`${options.nextToken}\\`) instead of a path argument.` : \"`--config` was passed without a following path argument.\",\n\t\tfix: \"Pass a config path: `--config <path>` or `--config=<path>`.\",\n\t\tmeta: options?.nextToken !== void 0 ? { nextToken: options.nextToken } : {}\n\t});\n}\n/**\n* The migration-file CLI received a flag it does not recognise. Surfaced as a\n* structured error so consumers can render their own \"did you mean\"\n* suggestions from `meta.knownFlags` rather than parsing the message.\n*\n* Designed to wrap clipanion's `UnknownSyntaxError` at the parser boundary:\n* pass the offending token as `flag` and the option declarations as\n* `knownFlags`.\n*/\nfunction errorMigrationCliUnknownFlag(options) {\n\tconst knownList = options.knownFlags.join(\", \");\n\treturn new CliStructuredError(\"CLI.UNKNOWN_FLAG\", \"Unknown migration CLI flag\", {\n\t\twhy: `Unknown flag \\`${options.flag}\\`.`,\n\t\tfix: `Known flags: ${knownList}. Run with \\`--help\\` to see the full list.`,\n\t\tmeta: {\n\t\t\tflag: options.flag,\n\t\t\tknownFlags: options.knownFlags\n\t\t}\n\t});\n}\n/**\n* The main CLI received an unsupported `--format` value.\n*/\nfunction errorInvalidOutputFormat(value) {\n\treturn new CliStructuredError(\"CLI.INVALID_OUTPUT_FORMAT\", `Invalid --format value \"${value}\". Allowed values: pretty, json.`, { meta: {\n\t\tvalue,\n\t\tallowed: [\"pretty\", \"json\"]\n\t} });\n}\n/**\n* The main CLI received mutually exclusive output format flags\n* (`--format pretty` together with `--json`).\n*/\nfunction errorOutputFormatMutex() {\n\treturn new CliStructuredError(\"CLI.OUTPUT_FORMAT_CONFLICT\", \"Cannot use --format pretty together with --json. Use --format json or --json alone for JSON output.\");\n}\n/**\n* Config validation error (missing required fields).\n*/\nfunction errorConfigValidation(field, options) {\n\treturn new CliStructuredError(\"CONFIG.VALIDATION_FAILED\", \"Config validation error\", {\n\t\twhy: options?.why ?? `Config must have a \"${field}\" field`,\n\t\tfix: \"Check your prisma.config.ts and ensure all required fields are provided\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.VALIDATION_FAILED\"),\n\t\tmeta: {\n\t\t\tfield,\n\t\t\t...options?.section !== void 0 ? { section: options.section } : {}\n\t\t}\n\t});\n}\n/**\n* An enum declares a codecId that no component in the contract's pack stack provides,\n* so its member values cannot be encoded. Thrown by both authoring paths (TS `defineContract`\n* and PSL interpretation) when the codec lookup built from the contract's packs has no\n* descriptor for the codecId.\n*/\nfunction errorEnumCodecNotInPackStack(options) {\n\treturn new CliStructuredError(\"CONTRACT.ENUM_CODEC_NOT_IN_PACK_STACK\", `Enum codec \"${options.codecId}\" is not part of the contract's pack stack`, {\n\t\twhy: `An enum uses codec \"${options.codecId}\", but no family, target, or extension pack in the contract provides it.`,\n\t\tfix: \"Use a codec provided by the contract's target/extension packs, or add the pack that supplies this codec.\",\n\t\tmeta: { codecId: options.codecId }\n\t});\n}\n/**\n* Generic unexpected error.\n*/\nfunction errorUnexpected(message, options) {\n\treturn new CliStructuredError(\"CLI.UNEXPECTED\", \"Unexpected error\", {\n\t\twhy: options?.why ?? message,\n\t\tfix: options?.fix ?? \"Check the error message and try again\",\n\t\t...ifDefined(\"meta\", options?.meta),\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n//#endregion\nexport { errorUnexpected as S, errorMigrationCliUnknownFlag as _, errorConfigVersionMarkerMissing as a, errorQueryRunnerFactoryRequired as b, errorContractValidationFailed as c, errorEnumCodecNotInPackStack as d, errorFamilyReadMarkerSqlRequired as f, errorMigrationCliInvalidConfigArg as g, errorJsonFormatNotSupported as h, errorConfigValidation as i, errorDatabaseConnectionRequired as l, errorInvalidOutputFormat as m, errorConfigEvaluationFailed as n, errorContractConfigMissing as o, errorFileNotFound as p, errorConfigFileNotFound as r, errorContractMissingExtensions as s, CliStructuredError as t, errorDriverRequired as u, errorMigrationPlanningFailed as v, errorT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ClK;;;;AAIA,SAAS,sBAAsB,OAAO,SAAS;CAC9C,OAAO,IAAI,mBAAmB,4BAA4B,2BAA2B;EACpF,KAAK,SAAS,OAAO,uBAAuB,MAAM;EAClD,KAAK;EACL,SAAS,WAAW,0BAA0B;EAC9C,MAAM;GACL;GACA,GAAG,SAAS,YAAY,KAAK,IAAI,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;EAClE;CACD,CAAC;AACF;;;;;;;AAOA,SAAS,6BAA6B,SAAS;CAC9C,OAAO,IAAI,mBAAmB,yCAAyC,eAAe,QAAQ,QAAQ,6CAA6C;EAClJ,KAAK,uBAAuB,QAAQ,QAAQ;EAC5C,KAAK;EACL,MAAM,EAAE,SAAS,QAAQ,QAAQ;CAClC,CAAC;AACF;;;;AAIA,SAAS,gBAAgB,SAAS,SAAS;CAC1C,OAAO,IAAI,mBAAmB,kBAAkB,oBAAoB;EACnE,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,OAAO;EACrB,GAAG,UAAU,QAAQ,SAAS,IAAI;EAClC,GAAG,UAAU,SAAS,SAAS,KAAK;CACrC,CAAC;AACF"}
@@ -1,4 +1,4 @@
1
- import { H as LedgerEntryRecord, m as ContractMarkerRecord } from "./domain-envelope-C2vVIWGK-C5x7cBpU.mjs";
1
+ import { E as ContractWithDomain, H as LedgerEntryRecord, W as NamespaceId, m as ContractMarkerRecord } from "./domain-envelope-C2vVIWGK-C5x7cBpU.mjs";
2
2
  import { i as ControlPolicy, t as Contract } from "./contract-types-BIaUtO7Z-Bcxx2I74.mjs";
3
3
  import { b as DataTypeLookup, h as CodecRegistry, t as AnyCodecDescriptor, v as DataType, y as DataTypeId } from "./codec-types-CQNZE70G-DZIvCZwY.mjs";
4
4
  import { C as AuthoringPslBlockDescriptorNamespace, D as AuthoringTypeConstructorDescriptor, N as DataTypeAuthoringEntry, _ as AuthoringModelAttributeDescriptorNamespace, a as AuthoringContributions, f as AuthoringFieldNamespace, k as AuthoringTypeNamespace, p as AuthoringFieldPresetDescriptor, r as AuthoringAttributeSpecContributions, u as AuthoringEntityTypeNamespace } from "./framework-authoring-CEQ3YaZw-BAeSxl0O.mjs";
@@ -92,6 +92,8 @@ interface ContractSerializer<TContract> {
92
92
  //#endregion
93
93
  //#region src/control/contract-snapshot-layout.d.ts
94
94
  declare const CONTRACT_SNAPSHOTS_DIRNAME = "snapshots";
95
+ /** Whether the snapshot store can address `storageHash`. */
96
+ declare function isStorageHashHex(storageHash: string): boolean;
95
97
  /** Validate a storage hash for use as a directory name. */
96
98
  declare function storageHashHex(storageHash: string): string;
97
99
  /** Module specifier for the store's `contract.json`, POSIX separators. */
@@ -352,104 +354,129 @@ interface SpaceMarkerConflict {
352
354
  /** What signing did to one contract space's marker. */
353
355
  type SpaceSignature = SpaceSigned | SpaceMarkerConflict;
354
356
  //#endregion
355
- //#region src/control/control-instances.d.ts
356
- interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR> extends FamilyInstance<TFamilyId> {
357
- /**
358
- * The family seam-of-record for on-disk contract reads. Structurally
359
- * validates the JSON envelope and hydrates IR-class instances via the
360
- * per-target ContractSerializer. The single named entry point every
361
- * CLI on-disk read crosses (TML-2536) — `as Contract` casts in
362
- * production package sources are a serializer-bypass smell guarded by
363
- * `pnpm lint:no-contract-cast`.
364
- */
365
- deserializeContract(contractJson: unknown): Contract;
366
- verify(options: {
367
- readonly driver: ControlDriverInstance<TFamilyId, string>;
368
- readonly contract: unknown;
369
- readonly expectedTargetId: string;
370
- readonly contractPath: string;
371
- readonly configPath?: string;
372
- }): Promise<VerifyDatabaseResult>;
373
- /**
374
- * Verify a contract against an already-introspected schema.
375
- *
376
- * Callers that need to verify against the live database compose
377
- * {@link introspect} + `verifySchema` directly. The aggregate verifier
378
- * verifies each member against the full introspected schema and scopes the
379
- * result to that member's contract space afterwards — it never prunes the
380
- * schema up front.
381
- *
382
- * Synchronous — no I/O. Idempotent.
383
- */
384
- verifySchema(options: {
385
- readonly contract: unknown;
386
- readonly schema: TSchemaIR;
387
- readonly strict: boolean;
388
- readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, string>>;
389
- }): VerifyDatabaseSchemaResult;
390
- /**
391
- * Writes the marker of every space in `spaces` with its contract's hashes. Does not check the schema: callers verify each space first. A space whose marker no longer holds `expected`, when it is read or when it is written, is reported as a conflict and its marker is left as it was. The SQL family takes the migration runner's marker lock, one lock for the whole marker table, and writes every marker in one transaction, so a failed write leaves every marker as it was. The Mongo family writes the markers one by one, so a failed write can leave earlier markers written; running the command again finishes the job.
392
- */
393
- signSpaces(options: {
394
- readonly driver: ControlDriverInstance<TFamilyId, string>;
395
- readonly spaces: readonly SpaceToSign[];
396
- }): Promise<readonly SpaceSignature[]>;
397
- /**
398
- * Reads the contract marker for `space` from the database, returning
399
- * `null` if no marker row exists for that space (or if the marker
400
- * table itself is missing).
401
- *
402
- * `space` is required at every call site so the type system surfaces
403
- * every place that needs to thread the value: callers in app-only
404
- * paths pass {@link import('./control-spaces').APP_SPACE_ID}
405
- * (`'app'`); per-extension callers pass the extension's space id.
406
- * Defaulting at the family-interface level was a silent bug door —
407
- * it let callers forget to pass `space` and collapse onto the app's
408
- * marker row.
409
- *
410
- * Families whose underlying storage doesn't yet support per-space
411
- * markers (Mongo, today) accept `space` for interface conformance and
412
- * reject any non-`APP_SPACE_ID` value rather than silently ignoring
413
- * it; see the family-specific implementation for details.
414
- */
415
- readMarker(options: {
416
- readonly driver: ControlDriverInstance<TFamilyId, string>;
417
- readonly space: string;
418
- }): Promise<ContractMarkerRecord | null>;
419
- /**
420
- * Reads every marker row keyed by `space`. Used by the per-space
421
- * verifier to detect orphan marker rows and marker-vs-on-disk drift.
422
- * Returns an empty map when the marker table does not yet exist.
423
- */
424
- readAllMarkers(options: {
425
- readonly driver: ControlDriverInstance<TFamilyId, string>;
426
- }): Promise<ReadonlyMap<string, ContractMarkerRecord>>;
427
- /**
428
- * Reads the per-migration ledger journal in apply order. When `space` is
429
- * omitted, returns rows for every space. Returns an empty array when the
430
- * ledger store does not yet exist or has no matching rows.
431
- */
432
- readLedger(options: {
433
- readonly driver: ControlDriverInstance<TFamilyId, string>;
434
- readonly space?: string;
435
- }): Promise<readonly LedgerEntryRecord[]>;
436
- introspect(options: {
437
- readonly driver: ControlDriverInstance<TFamilyId, string>;
438
- readonly contract?: unknown;
439
- }): Promise<TSchemaIR>;
357
+ //#region src/control/migration-statements.d.ts
358
+ /** A model: its namespace and its name as the contract source writes it, never a table name. */
359
+ interface ModelCoordinate {
360
+ readonly namespaceId: NamespaceId;
361
+ readonly model: string;
440
362
  }
441
- interface ControlTargetInstance<TFamilyId extends string, TTargetId extends string> extends TargetInstance<TFamilyId, TTargetId> {}
442
- interface ControlAdapterInstance<TFamilyId extends string, TTargetId extends string> extends AdapterInstance<TFamilyId, TTargetId> {}
443
- interface ControlDriverInstance<TFamilyId extends string, TTargetId extends string> extends DriverInstance<TFamilyId, TTargetId> {
444
- close(): Promise<void>;
363
+ /**
364
+ * A field of a model, named as the contract's model keys it in `fields`. Whether that is the
365
+ * field's name in the contract source or its stored name in every family is not settled yet.
366
+ */
367
+ interface FieldCoordinate extends ModelCoordinate {
368
+ readonly field: string;
369
+ }
370
+ interface ResolvedModelRenameStatement {
371
+ readonly kind: 'rename';
372
+ readonly entity: 'model';
373
+ readonly from: ModelCoordinate;
374
+ readonly to: ModelCoordinate;
375
+ }
376
+ interface ResolvedFieldRenameStatement {
377
+ readonly kind: 'rename';
378
+ readonly entity: 'field';
379
+ readonly from: FieldCoordinate;
380
+ readonly to: FieldCoordinate;
381
+ }
382
+ /**
383
+ * A statement resolved against the origin and destination contracts into domain coordinates:
384
+ * `from` is a coordinate of the origin contract and `to` one of the destination contract. Each
385
+ * member's `entity` names the kind of coordinate its sides use, so another kind of entity is a
386
+ * further member with its own coordinate type.
387
+ */
388
+ type ResolvedMigrationStatement = ResolvedModelRenameStatement | ResolvedFieldRenameStatement;
389
+ /**
390
+ * What an operation of a plan is about, in the contract's terms where the family can say: a model
391
+ * or a field of the origin contract, or, when no model of the origin contract stores it, the name
392
+ * the database knows it by. Told apart by `kind`, not by a statement's `entity`, because a storage
393
+ * name is not an entity of the contract.
394
+ */
395
+ type MigrationSubject = ({
396
+ readonly kind: 'model';
397
+ } & ModelCoordinate) | ({
398
+ readonly kind: 'field';
399
+ } & FieldCoordinate) | {
400
+ readonly kind: 'storage';
401
+ readonly name: string;
402
+ };
403
+ /** A key that is equal for two subjects exactly when they name the same thing. */
404
+ declare function migrationSubjectKey(subject: MigrationSubject): string;
405
+ /** An operation of a plan, by its position in the plan's `operations`, and its subject. */
406
+ interface MigrationOperationSubject {
407
+ readonly operationIndex: number;
408
+ readonly subject: MigrationSubject;
409
+ }
410
+ /** An operation that changes who can read or write the rows of its subject. */
411
+ interface MigrationAccessChange extends MigrationOperationSubject {
445
412
  /**
446
- * Name of the database this connection is bound to, when the target names
447
- * one. `db update` asks the user to type it before applying destructive
448
- * operations, so it names where the data would be lost.
413
+ * True when it lets more people read or write, such as disabling row-level security; false when
414
+ * the change can go either way, such as dropping a policy.
449
415
  */
450
- databaseName?(): Promise<string | undefined>;
416
+ readonly widens: boolean;
451
417
  }
452
- interface ControlExtensionInstance<TFamilyId extends string, TTargetId extends string> extends ExtensionInstance<TFamilyId, TTargetId> {}
418
+ /** What the operations of a plan lose and whose access they change, each by its position in the plan. */
419
+ interface MigrationPlanSubjects<TEntry extends MigrationOperationSubject = MigrationOperationSubject, TAccess extends MigrationAccessChange = MigrationAccessChange> {
420
+ /** Each operation that loses data, in plan order, with what it loses. */
421
+ readonly dataLoss: readonly TEntry[];
422
+ /** Each operation that changes who can read or write data, in plan order, with what it is about. */
423
+ readonly accessWidening: readonly TAccess[];
424
+ }
425
+ /**
426
+ * A statement as a plan applied it: `operationIndexes` are the positions, in the plan's
427
+ * `operations`, of the operations the statement accounts for, in plan order, and empty when the
428
+ * storage did not change. Statements refer to operations by position because operation ids are
429
+ * not unique within a plan.
430
+ */
431
+ interface AppliedMigrationStatement {
432
+ readonly statement: ResolvedMigrationStatement;
433
+ readonly operationIndexes: readonly number[];
434
+ }
435
+ /**
436
+ * A model's name in messages: `namespace.Model`, or `Model` alone in the unbound namespace, whose
437
+ * id is internal.
438
+ */
439
+ declare function modelDisplayName(coordinate: ModelCoordinate): string;
440
+ /** A model coordinate in JSON output: `namespaceId` is left out for the unbound namespace. */
441
+ interface ModelCoordinateJson {
442
+ readonly namespaceId?: NamespaceId;
443
+ readonly model: string;
444
+ }
445
+ /** A field coordinate in JSON output: `namespaceId` is left out for the unbound namespace. */
446
+ interface FieldCoordinateJson extends ModelCoordinateJson {
447
+ readonly field: string;
448
+ }
449
+ /** A resolved statement in JSON output, with each coordinate written as `*CoordinateJson`. */
450
+ type MigrationStatementJson = {
451
+ readonly kind: 'rename';
452
+ readonly entity: 'model';
453
+ readonly from: ModelCoordinateJson;
454
+ readonly to: ModelCoordinateJson;
455
+ } | {
456
+ readonly kind: 'rename';
457
+ readonly entity: 'field';
458
+ readonly from: FieldCoordinateJson;
459
+ readonly to: FieldCoordinateJson;
460
+ };
461
+ /** A subject in JSON output: `namespaceId` is left out for the unbound namespace. */
462
+ type MigrationSubjectJson = ({
463
+ readonly kind: 'model';
464
+ } & ModelCoordinateJson) | ({
465
+ readonly kind: 'field';
466
+ } & FieldCoordinateJson) | {
467
+ readonly kind: 'storage';
468
+ readonly name: string;
469
+ };
470
+ /** The statement as JSON output writes it. */
471
+ declare function migrationStatementJson(statement: ResolvedMigrationStatement): MigrationStatementJson;
472
+ /** The subject as JSON output writes it. */
473
+ declare function migrationSubjectJson(subject: MigrationSubject): MigrationSubjectJson;
474
+ /**
475
+ * The text that reports a statement, in domain names: a model or field is named with its
476
+ * namespace only when its contract has more than one. A renamed field is named through its model as
477
+ * the destination contract names it, as the statement itself is written.
478
+ */
479
+ declare function describeMigrationStatement(statement: ResolvedMigrationStatement, fromContract: ContractWithDomain, contract: ContractWithDomain): string;
453
480
  //#endregion
454
481
  //#region src/control/control-migration-types.d.ts
455
482
  /**
@@ -489,13 +516,34 @@ interface MigrationMetadata {
489
516
  readonly createdAt: string;
490
517
  }
491
518
  /**
492
- * Migration operation classes define the safety level of an operation.
493
- * - 'additive': Adds new structures without modifying existing ones (safe)
494
- * - 'widening': Relaxes constraints or expands types (generally safe)
495
- * - 'destructive': Removes or alters existing structures (potentially unsafe)
496
- * - 'data': Data transformation operation (e.g., backfill, type conversion)
519
+ * What an operation does to the data. Of the classes a planner chooses, only `destructive` loses
520
+ * data by itself; a `data` operation runs what its author wrote, which may lose data by design.
521
+ * - 'additive': adds structure and leaves existing structure and data as they are.
522
+ * - 'widening': changes existing structure without losing data. An operation that cannot keep
523
+ * every value fails instead, so a tightened constraint is widening: `SET NOT NULL` fails on a
524
+ * NULL, and a MongoDB validator applies to later writes only. So are a rename, a relaxed
525
+ * constraint, a type change that keeps every value, and a drop of an object that holds no data,
526
+ * such as an index, a constraint, a default or a row-level-security policy. Dropping a policy or
527
+ * disabling row-level security widens who can read and write rows.
528
+ * - 'destructive': can lose rows or values: dropping a table, a column or a collection, or a type
529
+ * change that can change values.
530
+ * - 'data': reads and writes rows, such as a backfill or a type conversion, as its author wrote.
497
531
  */
498
532
  type MigrationOperationClass = 'additive' | 'widening' | 'destructive' | 'data';
533
+ /**
534
+ * The state a plan asserts it starts from: the storage hash, and optionally the profile hash, the
535
+ * runner checks the marker for. A planner's `origin` option and a plan's `origin` share this type.
536
+ */
537
+ interface PlanOrigin {
538
+ readonly storageHash: string;
539
+ readonly profileHash?: string;
540
+ }
541
+ /** The origin a plan from `contract` asserts, or `null` when it starts from no contract. */
542
+ declare function planOriginOf(contract: {
543
+ readonly storage: {
544
+ readonly storageHash: string;
545
+ };
546
+ } | null): PlanOrigin | null;
499
547
  /**
500
548
  * Policy defining which operation classes are allowed during a migration.
501
549
  */
@@ -507,7 +555,14 @@ interface MigrationOperationPolicy {
507
555
  * Contains only the fields needed for CLI output (tree view, JSON envelope).
508
556
  */
509
557
  interface MigrationPlanOperation {
510
- /** Unique identifier for this operation (e.g., "table.users.create"). */
558
+ /**
559
+ * Names what the operation changes (e.g., "table.users"). Ids are not guaranteed unique within a
560
+ * plan: on Postgres, same-named tables in two schemas give operations the same id. So anything
561
+ * that points at one operation of a plan, such as `AppliedMigrationStatement.operationIndexes`,
562
+ * uses its position in `operations`. Ids are written to `ops.json`, so they are part of a
563
+ * migration's hash; the ledger records executed operations, ids included, but nothing compares
564
+ * them.
565
+ */
511
566
  readonly id: string;
512
567
  /** Human-readable label for display in UI/CLI (e.g., "Create table users"). */
513
568
  readonly label: string;
@@ -603,10 +658,7 @@ interface MigrationPlan {
603
658
  * Origin contract identity that the plan expects the database to currently be at.
604
659
  * If omitted or null, the runner skips origin validation entirely.
605
660
  */
606
- readonly origin?: {
607
- readonly storageHash: string;
608
- readonly profileHash?: string;
609
- } | null;
661
+ readonly origin?: PlanOrigin | null;
610
662
  /** Destination contract identity that the plan intends to reach. */
611
663
  readonly destination: {
612
664
  readonly storageHash: string;
@@ -668,6 +720,11 @@ interface MigrationPlannerConflict {
668
720
  readonly why?: string;
669
721
  /** Set when the conflict is an operation the policy does not allow: the class of that operation. */
670
722
  readonly refusedOperationClass?: MigrationOperationClass;
723
+ /**
724
+ * Set when the conflict refuses a statement: the statement, in domain coordinates. Consumers key
725
+ * on this field, not on the conflict's kind, which each family names.
726
+ */
727
+ readonly refusedStatement?: ResolvedMigrationStatement;
671
728
  }
672
729
  /**
673
730
  * Successful planner result with the migration plan.
@@ -675,10 +732,12 @@ interface MigrationPlannerConflict {
675
732
  * The plan is typed as `MigrationPlanWithAuthoringSurface` so the CLI can
676
733
  * uniformly ask any plan to render itself to TypeScript.
677
734
  */
678
- interface MigrationPlannerSuccessResult {
735
+ interface MigrationPlannerSuccessResult extends MigrationPlanSubjects {
679
736
  readonly kind: 'success';
680
737
  readonly plan: MigrationPlanWithAuthoringSurface;
681
738
  readonly warnings?: readonly MigrationPlannerConflict[];
739
+ /** The statements the plan applied, one per statement it was given, in order. */
740
+ readonly appliedStatements: readonly AppliedMigrationStatement[];
682
741
  }
683
742
  /**
684
743
  * Failed planner result with the list of conflicts.
@@ -812,23 +871,24 @@ interface MigrationPlanner<TFamilyId extends string = string, TTargetId extends
812
871
  readonly schema: unknown;
813
872
  readonly policy: MigrationOperationPolicy;
814
873
  /**
815
- * The "from" contract (the state the planner assumes the database starts
816
- * at), or `null` for a baseline plan with no prior state.
817
- *
818
- * Planners derive any "from" identity they need to stamp onto the
819
- * produced plan's `describe()` from `fromContract?.storage.storageHash
820
- * ?? null`. They also pass this to data-safety strategies so they can
821
- * compare `from` and `to` column shapes (e.g. to detect unsafe type
822
- * changes).
823
- *
824
- * Required at every call site to make the structural fact "I have a
825
- * prior contract / I don't" visible in the type. Reconciliation
826
- * commands (`db init`, `db update`) introspect a live schema and pass
827
- * `null`; authoring commands (`migration plan`) read the predecessor's
828
- * contract from the snapshot store by its storage hash and pass the
829
- * parsed value.
874
+ * The contract the planner reads as the starting state, or `null` when it has none: statements
875
+ * resolve against it, and data-safety strategies compare its column shapes with the
876
+ * destination's. `migration plan` passes the predecessor's contract; `db update` passes the
877
+ * contract the marker names only when statements are given.
830
878
  */
831
879
  readonly fromContract: Contract | null;
880
+ /**
881
+ * The origin the produced plan asserts, which the runner checks against the marker: the
882
+ * plan's `origin` and its `describe().from`. `migration plan` passes its starting contract's
883
+ * hash ({@link planOriginOf}); reconciliation commands (`db init`, `db update`) pass `null`,
884
+ * because their plans apply from whatever state the database is in.
885
+ */
886
+ readonly origin: PlanOrigin | null;
887
+ /**
888
+ * Statements the user gave, resolved against `fromContract` and `contract`,
889
+ * in the order given. Empty when the user gave none.
890
+ */
891
+ readonly statements: readonly ResolvedMigrationStatement[];
832
892
  /**
833
893
  * Active framework components participating in this composition.
834
894
  * Families/targets can interpret this list to derive family-specific metadata.
@@ -958,6 +1018,15 @@ interface MigrationRunner<TFamilyId extends string = string, TTargetId extends s
958
1018
  interface TargetMigrationsCapability<TFamilyId extends string = string, TTargetId extends string = string, TFamilyInstance extends ControlFamilyInstance<TFamilyId, unknown> = ControlFamilyInstance<TFamilyId, unknown>> {
959
1019
  createPlanner(adapter: ControlAdapterInstance<TFamilyId, TTargetId>): MigrationPlanner<TFamilyId, TTargetId>;
960
1020
  createRunner(family: TFamilyInstance): MigrationRunner<TFamilyId, TTargetId>;
1021
+ /**
1022
+ * Set when the target's planner carries out no rename statement: a data-loss question then
1023
+ * offers no rename, and says instead how to keep the data by hand.
1024
+ */
1025
+ readonly renameStatements?: {
1026
+ readonly refused: true;
1027
+ /** How to keep the data of `subject` by hand, so that the plan made afterwards loses nothing. */
1028
+ readonly keepDataByHand: (subject: MigrationSubject, fromContract: ContractWithDomain) => string;
1029
+ };
961
1030
  /**
962
1031
  * Synthesizes a family-specific schema IR from a contract for offline planning.
963
1032
  * The returned schema can be passed to `planner.plan({ schema })` as the "from" state.
@@ -1003,6 +1072,107 @@ interface MigrationScaffoldContext {
1003
1072
  readonly snapshotsImportPath: string;
1004
1073
  }
1005
1074
  //#endregion
1075
+ //#region src/control/control-instances.d.ts
1076
+ interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR> extends FamilyInstance<TFamilyId> {
1077
+ /**
1078
+ * The family seam-of-record for on-disk contract reads. Structurally
1079
+ * validates the JSON envelope and hydrates IR-class instances via the
1080
+ * per-target ContractSerializer. The single named entry point every
1081
+ * CLI on-disk read crosses (TML-2536) — `as Contract` casts in
1082
+ * production package sources are a serializer-bypass smell guarded by
1083
+ * `pnpm lint:no-contract-cast`.
1084
+ */
1085
+ deserializeContract(contractJson: unknown): Contract;
1086
+ /** The name the database knows the object an operation acts on by. */
1087
+ storageNameOf(operation: MigrationPlanOperation): string;
1088
+ verify(options: {
1089
+ readonly driver: ControlDriverInstance<TFamilyId, string>;
1090
+ readonly contract: unknown;
1091
+ readonly expectedTargetId: string;
1092
+ readonly contractPath: string;
1093
+ readonly configPath?: string;
1094
+ }): Promise<VerifyDatabaseResult>;
1095
+ /**
1096
+ * Verify a contract against an already-introspected schema.
1097
+ *
1098
+ * Callers that need to verify against the live database compose
1099
+ * {@link introspect} + `verifySchema` directly. The aggregate verifier
1100
+ * verifies each member against the full introspected schema and scopes the
1101
+ * result to that member's contract space afterwards — it never prunes the
1102
+ * schema up front.
1103
+ *
1104
+ * Synchronous — no I/O. Idempotent.
1105
+ */
1106
+ verifySchema(options: {
1107
+ readonly contract: unknown;
1108
+ readonly schema: TSchemaIR;
1109
+ readonly strict: boolean;
1110
+ readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, string>>;
1111
+ }): VerifyDatabaseSchemaResult;
1112
+ /**
1113
+ * Writes the marker of every space in `spaces` with its contract's hashes. Does not check the schema: callers verify each space first. A space whose marker no longer holds `expected`, when it is read or when it is written, is reported as a conflict and its marker is left as it was. The SQL family takes the migration runner's marker lock, one lock for the whole marker table, and writes every marker in one transaction, so a failed write leaves every marker as it was. The Mongo family writes the markers one by one, so a failed write can leave earlier markers written; running the command again finishes the job.
1114
+ */
1115
+ signSpaces(options: {
1116
+ readonly driver: ControlDriverInstance<TFamilyId, string>;
1117
+ readonly spaces: readonly SpaceToSign[];
1118
+ }): Promise<readonly SpaceSignature[]>;
1119
+ /**
1120
+ * Reads the contract marker for `space` from the database, returning
1121
+ * `null` if no marker row exists for that space (or if the marker
1122
+ * table itself is missing).
1123
+ *
1124
+ * `space` is required at every call site so the type system surfaces
1125
+ * every place that needs to thread the value: callers in app-only
1126
+ * paths pass {@link import('./control-spaces').APP_SPACE_ID}
1127
+ * (`'app'`); per-extension callers pass the extension's space id.
1128
+ * Defaulting at the family-interface level was a silent bug door —
1129
+ * it let callers forget to pass `space` and collapse onto the app's
1130
+ * marker row.
1131
+ *
1132
+ * Families whose underlying storage doesn't yet support per-space
1133
+ * markers (Mongo, today) accept `space` for interface conformance and
1134
+ * reject any non-`APP_SPACE_ID` value rather than silently ignoring
1135
+ * it; see the family-specific implementation for details.
1136
+ */
1137
+ readMarker(options: {
1138
+ readonly driver: ControlDriverInstance<TFamilyId, string>;
1139
+ readonly space: string;
1140
+ }): Promise<ContractMarkerRecord | null>;
1141
+ /**
1142
+ * Reads every marker row keyed by `space`. Used by the per-space
1143
+ * verifier to detect orphan marker rows and marker-vs-on-disk drift.
1144
+ * Returns an empty map when the marker table does not yet exist.
1145
+ */
1146
+ readAllMarkers(options: {
1147
+ readonly driver: ControlDriverInstance<TFamilyId, string>;
1148
+ }): Promise<ReadonlyMap<string, ContractMarkerRecord>>;
1149
+ /**
1150
+ * Reads the per-migration ledger journal in apply order. When `space` is
1151
+ * omitted, returns rows for every space. Returns an empty array when the
1152
+ * ledger store does not yet exist or has no matching rows.
1153
+ */
1154
+ readLedger(options: {
1155
+ readonly driver: ControlDriverInstance<TFamilyId, string>;
1156
+ readonly space?: string;
1157
+ }): Promise<readonly LedgerEntryRecord[]>;
1158
+ introspect(options: {
1159
+ readonly driver: ControlDriverInstance<TFamilyId, string>;
1160
+ readonly contract?: unknown;
1161
+ }): Promise<TSchemaIR>;
1162
+ }
1163
+ interface ControlTargetInstance<TFamilyId extends string, TTargetId extends string> extends TargetInstance<TFamilyId, TTargetId> {}
1164
+ interface ControlAdapterInstance<TFamilyId extends string, TTargetId extends string> extends AdapterInstance<TFamilyId, TTargetId> {}
1165
+ interface ControlDriverInstance<TFamilyId extends string, TTargetId extends string> extends DriverInstance<TFamilyId, TTargetId> {
1166
+ close(): Promise<void>;
1167
+ /**
1168
+ * Name of the database this connection is bound to, when the target names
1169
+ * one. `db update` asks the user to type it before applying destructive
1170
+ * operations, so it names where the data would be lost.
1171
+ */
1172
+ databaseName?(): Promise<string | undefined>;
1173
+ }
1174
+ interface ControlExtensionInstance<TFamilyId extends string, TTargetId extends string> extends ExtensionInstance<TFamilyId, TTargetId> {}
1175
+ //#endregion
1006
1176
  //#region src/control/control-spaces.d.ts
1007
1177
  /**
1008
1178
  * Canonical control-plane identifiers for contract spaces.
@@ -1511,5 +1681,5 @@ type VerifierIssueCategory = 'declaredMissing' | 'declaredIncompatible' | 'value
1511
1681
  */
1512
1682
  declare function dispositionForCategory(controlPolicy: ControlPolicy, category: VerifierIssueCategory): VerifierOutcome;
1513
1683
  //#endregion
1514
- export { PslContractBuildCapable as $, orderIssuesByDependencies as $t, MigrationOperationPolicy as A, VerifyDatabaseSchemaResult as At, MigrationRunner as B, dispositionForCategory as Bt, EmitContractResult as C, VERIFY_CODE_MARKER_MISSING as Ct, MigratableTargetDescriptor as D, VerifierIssueCategory as Dt, MarkerHashes as E, VerificationStatus as Et, MigrationPlanner as F, buildExtensionLoadOrder as Ft, MigrationRunnerResult as G, extractQueryOperationTypeImports as Gt, MigrationRunnerFailure as H, extractCodecLookup as Ht, MigrationPlannerConflict as I, contractSnapshotJsonSpecifier as It, OpFactoryCall as J, hasPslContractBuild as Jt, MigrationRunnerSuccessValue as K, hasMigrations as Kt, MigrationPlannerFailureResult as L, contractSnapshotTypesSpecifier as Lt, MigrationPlan as M, assembleAuthoringDataTypes as Mt, MigrationPlanOperation as N, assembleControlMutationDefaults as Nt, MigrationMetadata as O, VerifierOutcome as Ot, MigrationPlanWithAuthoringSurface as P, assertUniqueCodecOwner as Pt, OperationPreviewStatement as Q, issueOutcome as Qt, MigrationPlannerResult as R, createControlStack as Rt, DiffableNode as S, VERIFY_CODE_HASH_MISMATCH as St, IntrospectSchemaResult as T, VERIFY_CODE_TARGET_MISMATCH as Tt, MigrationRunnerPerSpaceOptions as U, extractCodecTypeImports as Ut, MigrationRunnerExecutionChecks as V, enforceDataTypeInvariants as Vt, MigrationRunnerPerSpaceSuccessValue as W, extractComponentIds as Wt, OperationPreview as X, hasSchemaSubjectClassifier as Xt, OperationContext as Y, hasPslContractInfer as Yt, OperationPreviewCapable as Z, hasSchemaView as Zt, ControlTargetInstance as _, SpaceMarkerConflict as _t, ContractSpace as a, SchemaEntityCoordinate as at, DataTypeInvariantInput as b, SpaceToSign as bt, ControlAdapterInstance as c, SchemaSubjectClassifierCapable as ct, ControlExtensionDescriptor as d, SchemaTreeVisitor as dt, sameMarkerHashes as en, PslContractDocument as et, ControlExtensionInstance as f, SchemaVerifier as ft, ControlTargetDescriptor as g, SchemaViewNodeKind as gt, ControlStack as h, SchemaViewCapable as ht, ContractSerializer as i, SchemaDiffIssue as it, MigrationPackage as j, assembleAuthoringContributions as jt, MigrationOperationClass as k, VerifyDatabaseResult as kt, ControlDriverDescriptor as l, SchemaTreeNode as lt, ControlFamilyInstance as m, SchemaVerifyResult as mt, AssembledAuthoringContributions as n, PslSourceSettings as nt, ContractSpaceHeadRef as o, SchemaNodeRef as ot, ControlFamilyDescriptor as p, SchemaVerifyOptions as pt, MigrationScaffoldContext as q, hasOperationPreview as qt, CONTRACT_SNAPSHOTS_DIRNAME as r, SchemaDiff as rt, ControlAdapterDescriptor as s, SchemaOwnership as st, APP_SPACE_ID as t, storageHashHex as tn, PslContractInferCapable as tt, ControlDriverInstance as u, SchemaTreeNodeOptions as ut, CoreSchemaView as v, SpaceSignature as vt, ExpectationFailureReason as w, VERIFY_CODE_SCHEMA_FAILURE as wt, DiffSubjectGranularity as x, TargetMigrationsCapability as xt, CreateControlStackInput as y, SpaceSigned as yt, MigrationPlannerSuccessResult as z, diffSchemas as zt };
1515
- //# sourceMappingURL=control-tyaNVmQ-.d.mts.map
1684
+ export { MigrationScaffoldContext as $, createControlStack as $t, MigratableTargetDescriptor as A, SchemaViewCapable as At, MigrationPlanWithAuthoringSurface as B, VERIFY_CODE_TARGET_MISMATCH as Bt, DiffableNode as C, storageHashHex as Cn, SchemaSubjectClassifierCapable as Ct, FieldCoordinateJson as D, SchemaVerifier as Dt, FieldCoordinate as E, SchemaTreeVisitor as Et, MigrationOperationSubject as F, SpaceToSign as Ft, MigrationPlannerSuccessResult as G, VerifyDatabaseSchemaResult as Gt, MigrationPlannerConflict as H, VerifierIssueCategory as Ht, MigrationPackage as I, TargetMigrationsCapability as It, MigrationRunnerFailure as J, assembleControlMutationDefaults as Jt, MigrationRunner as K, assembleAuthoringContributions as Kt, MigrationPlan as L, VERIFY_CODE_HASH_MISMATCH as Lt, MigrationMetadata as M, SpaceMarkerConflict as Mt, MigrationOperationClass as N, SpaceSignature as Nt, IntrospectSchemaResult as O, SchemaVerifyOptions as Ot, MigrationOperationPolicy as P, SpaceSigned as Pt, MigrationRunnerSuccessValue as Q, contractSnapshotTypesSpecifier as Qt, MigrationPlanOperation as R, VERIFY_CODE_MARKER_MISSING as Rt, DiffSubjectGranularity as S, sameMarkerHashes as Sn, SchemaOwnership as St, ExpectationFailureReason as T, SchemaTreeNodeOptions as Tt, MigrationPlannerFailureResult as U, VerifierOutcome as Ut, MigrationPlanner as V, VerificationStatus as Vt, MigrationPlannerResult as W, VerifyDatabaseResult as Wt, MigrationRunnerPerSpaceSuccessValue as X, buildExtensionLoadOrder as Xt, MigrationRunnerPerSpaceOptions as Y, assertUniqueCodecOwner as Yt, MigrationRunnerResult as Z, contractSnapshotJsonSpecifier as Zt, ControlTargetDescriptor as _, migrationSubjectJson as _n, ResolvedModelRenameStatement as _t, ContractSerializer as a, extractCodecTypeImports as an, OpFactoryCall as at, CreateControlStackInput as b, orderIssuesByDependencies as bn, SchemaEntityCoordinate as bt, ControlAdapterDescriptor as c, hasMigrations as cn, OperationPreviewCapable as ct, ControlDriverInstance as d, hasPslContractInfer as dn, PslContractBuildCapable as dt, describeMigrationStatement as en, MigrationStatementJson as et, ControlExtensionDescriptor as f, hasSchemaSubjectClassifier as fn, PslContractDocument as ft, ControlStack as g, migrationStatementJson as gn, ResolvedMigrationStatement as gt, ControlFamilyInstance as h, issueOutcome as hn, ResolvedFieldRenameStatement as ht, CONTRACT_SNAPSHOTS_DIRNAME as i, extractCodecLookup as in, ModelCoordinateJson as it, MigrationAccessChange as j, SchemaViewNodeKind as jt, MarkerHashes as k, SchemaVerifyResult as kt, ControlAdapterInstance as l, hasOperationPreview as ln, OperationPreviewStatement as lt, ControlFamilyDescriptor as m, isStorageHashHex as mn, PslSourceSettings as mt, AppliedMigrationStatement as n, dispositionForCategory as nn, MigrationSubjectJson as nt, ContractSpace as o, extractComponentIds as on, OperationContext as ot, ControlExtensionInstance as p, hasSchemaView as pn, PslContractInferCapable as pt, MigrationRunnerExecutionChecks as q, assembleAuthoringDataTypes as qt, AssembledAuthoringContributions as r, enforceDataTypeInvariants as rn, ModelCoordinate as rt, ContractSpaceHeadRef as s, extractQueryOperationTypeImports as sn, OperationPreview as st, APP_SPACE_ID as t, diffSchemas as tn, MigrationSubject as tt, ControlDriverDescriptor as u, hasPslContractBuild as un, PlanOrigin as ut, ControlTargetInstance as v, migrationSubjectKey as vn, SchemaDiff as vt, EmitContractResult as w, SchemaTreeNode as wt, DataTypeInvariantInput as x, planOriginOf as xn, SchemaNodeRef as xt, CoreSchemaView as y, modelDisplayName as yn, SchemaDiffIssue as yt, MigrationPlanSubjects as z, VERIFY_CODE_SCHEMA_FAILURE as zt };
1685
+ //# sourceMappingURL=control-CdQIjZLo.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-CdQIjZLo.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA+BU,mBAAmB;;;;;;;;;;;;EAY3B,oBAAoB,UAAU,YAAY,WAAW,gBAAgB;;;;;;;;;;EAUrE,kBAAkB,UAAU,YAAY;;;;;;;;WAQ/B,sBAAsB;;;;;;;;WAQtB,cAAc;;;;;;;;;;;;;;;WAed;aACE,sBAAsB;aACtB,cAAc;;;;;cAKb;;iBAEG,iBAAiB;;iBAEjB,eAAe;;iBAEf,8BAA8B,6BAA6B;;iBAE3D,+BAA+B,6BAA6B;;;;;;;;;;KAUxE;WACM;WACA;;UAED,gBAAgB,cAAc,eAAe;;WAE5C;;WAEA,WAAW;;WAEX,SAAS;;;;;;;;WAQT;;WAEA;;;;;;;;;;;;;;;;KAgBN;;;;;;;iBAOY,aAAa,OAAO,kBAAkB;;;;;;;;;;;;;;;UAe7C;WACC;WACA;;;;;;;WAOA,qBAAqB;EAC9B,UAAU,OAAO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