@prisma-next/framework-components 0.5.0-dev.9 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +51 -4
  2. package/dist/authoring.d.mts +2 -2
  3. package/dist/authoring.mjs +2 -122
  4. package/dist/codec-m_-FAyQn.d.mts +168 -0
  5. package/dist/codec-m_-FAyQn.d.mts.map +1 -0
  6. package/dist/codec.d.mts +48 -2
  7. package/dist/codec.d.mts.map +1 -0
  8. package/dist/codec.mjs +67 -4
  9. package/dist/codec.mjs.map +1 -1
  10. package/dist/components.d.mts +1 -1
  11. package/dist/components.mjs +2 -3
  12. package/dist/control.d.mts +421 -78
  13. package/dist/control.d.mts.map +1 -1
  14. package/dist/control.mjs +83 -58
  15. package/dist/control.mjs.map +1 -1
  16. package/dist/emission-types-CMv_053d.d.mts +38 -0
  17. package/dist/emission-types-CMv_053d.d.mts.map +1 -0
  18. package/dist/emission.d.mts +2 -2
  19. package/dist/emission.mjs +1 -1
  20. package/dist/execution.d.mts +5 -5
  21. package/dist/execution.d.mts.map +1 -1
  22. package/dist/execution.mjs +4 -6
  23. package/dist/execution.mjs.map +1 -1
  24. package/dist/{framework-authoring-D1-JZ37B.d.mts → framework-authoring-DGIQbNPt.d.mts} +43 -12
  25. package/dist/framework-authoring-DGIQbNPt.d.mts.map +1 -0
  26. package/dist/framework-authoring-DxXcjyJX.mjs +209 -0
  27. package/dist/framework-authoring-DxXcjyJX.mjs.map +1 -0
  28. package/dist/{framework-components-DFZMi2h7.d.mts → framework-components-CHuBHXQN.d.mts} +45 -58
  29. package/dist/framework-components-CHuBHXQN.d.mts.map +1 -0
  30. package/dist/{framework-components-C8ZhSwXe.mjs → framework-components-FdqmlGUj.mjs} +3 -3
  31. package/dist/framework-components-FdqmlGUj.mjs.map +1 -0
  32. package/dist/psl-ast-Ckn_G-jv.d.mts +159 -0
  33. package/dist/psl-ast-Ckn_G-jv.d.mts.map +1 -0
  34. package/dist/psl-ast.d.mts +2 -0
  35. package/dist/psl-ast.mjs +1 -0
  36. package/dist/runtime.d.mts +273 -37
  37. package/dist/runtime.d.mts.map +1 -1
  38. package/dist/runtime.mjs +172 -30
  39. package/dist/runtime.mjs.map +1 -1
  40. package/dist/{types-import-spec-C4sc7wbb.d.mts → types-import-spec-BxI5cSQy.d.mts} +2 -2
  41. package/dist/types-import-spec-BxI5cSQy.d.mts.map +1 -0
  42. package/package.json +12 -8
  43. package/src/control/control-capabilities.ts +96 -0
  44. package/src/{control-descriptors.ts → control/control-descriptors.ts} +7 -7
  45. package/src/{control-instances.ts → control/control-instances.ts} +52 -6
  46. package/src/{control-migration-types.ts → control/control-migration-types.ts} +251 -63
  47. package/src/control/control-operation-preview.ts +23 -0
  48. package/src/{control-result-types.ts → control/control-result-types.ts} +0 -2
  49. package/src/control/control-spaces.ts +82 -0
  50. package/src/{control-stack.ts → control/control-stack.ts} +77 -111
  51. package/src/control/emission-types.ts +48 -0
  52. package/src/control/psl-ast.ts +193 -0
  53. package/src/{execution-descriptors.ts → execution/execution-descriptors.ts} +7 -7
  54. package/src/{execution-instances.ts → execution/execution-instances.ts} +1 -1
  55. package/src/{execution-requirements.ts → execution/execution-requirements.ts} +1 -1
  56. package/src/execution/race-against-abort.ts +89 -0
  57. package/src/execution/run-with-middleware.ts +153 -0
  58. package/src/{runtime-core.ts → execution/runtime-core.ts} +27 -3
  59. package/src/execution/runtime-error.ts +94 -0
  60. package/src/execution/runtime-middleware.ts +235 -0
  61. package/src/exports/authoring.ts +5 -2
  62. package/src/exports/codec.ts +27 -2
  63. package/src/exports/components.ts +2 -2
  64. package/src/exports/control.ts +41 -14
  65. package/src/exports/emission.ts +2 -2
  66. package/src/exports/execution.ts +5 -5
  67. package/src/exports/psl-ast.ts +1 -0
  68. package/src/exports/runtime.ts +18 -9
  69. package/src/shared/codec-descriptor.ts +87 -0
  70. package/src/shared/codec-types.ts +79 -0
  71. package/src/shared/codec.ts +80 -0
  72. package/src/shared/column-spec.ts +83 -0
  73. package/src/{framework-authoring.ts → shared/framework-authoring.ts} +210 -23
  74. package/src/{framework-components.ts → shared/framework-components.ts} +22 -49
  75. package/src/{mutation-default-types.ts → shared/mutation-default-types.ts} +22 -2
  76. package/dist/authoring.mjs.map +0 -1
  77. package/dist/codec-types-DQ1Agjom.d.mts +0 -58
  78. package/dist/codec-types-DQ1Agjom.d.mts.map +0 -1
  79. package/dist/emission-types-BPAALJbF.d.mts +0 -24
  80. package/dist/emission-types-BPAALJbF.d.mts.map +0 -1
  81. package/dist/framework-authoring-D1-JZ37B.d.mts.map +0 -1
  82. package/dist/framework-components-C8ZhSwXe.mjs.map +0 -1
  83. package/dist/framework-components-DFZMi2h7.d.mts.map +0 -1
  84. package/dist/types-import-spec-C4sc7wbb.d.mts.map +0 -1
  85. package/src/codec-types.ts +0 -64
  86. package/src/control-capabilities.ts +0 -34
  87. package/src/emission-types.ts +0 -28
  88. package/src/run-with-middleware.ts +0 -77
  89. package/src/runtime-error.ts +0 -55
  90. package/src/runtime-middleware.ts +0 -87
  91. /package/src/{control-schema-view.ts → control/control-schema-view.ts} +0 -0
  92. /package/src/{async-iterable-result.ts → execution/async-iterable-result.ts} +0 -0
  93. /package/src/{execution-stack.ts → execution/execution-stack.ts} +0 -0
  94. /package/src/{query-plan.ts → execution/query-plan.ts} +0 -0
  95. /package/src/{types-import-spec.ts → shared/types-import-spec.ts} +0 -0
@@ -1,12 +1,14 @@
1
- import { a as AuthoringFieldNamespace, d as AuthoringTypeNamespace, i as AuthoringContributions } from "./framework-authoring-D1-JZ37B.mjs";
2
- import { n as CodecLookup } from "./codec-types-DQ1Agjom.mjs";
3
- import { A as LoweredDefaultResult, C as ControlMutationDefaultEntry, D as DefaultFunctionLoweringHandler, E as DefaultFunctionLoweringContext, F as SourceSpan, M as MutationDefaultGeneratorDescriptor, N as ParsedDefaultFunctionCall, O as DefaultFunctionRegistry, P as SourceDiagnostic, T as ControlMutationDefaults, a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, j as LoweredDefaultValue, k as DefaultFunctionRegistryEntry, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, v as TargetBoundComponentDescriptor, w as ControlMutationDefaultRegistry, y as TargetDescriptor } from "./framework-components-DFZMi2h7.mjs";
4
- import { t as TypesImportSpec } from "./types-import-spec-C4sc7wbb.mjs";
5
- import { t as EmissionSpi } from "./emission-types-BPAALJbF.mjs";
1
+ import { a as AuthoringFieldNamespace, d as AuthoringTypeNamespace, i as AuthoringContributions } from "./framework-authoring-DGIQbNPt.mjs";
2
+ import { c as CodecLookup } from "./codec-m_-FAyQn.mjs";
3
+ import { A as LoweredDefaultResult, C as ControlMutationDefaultEntry, D as DefaultFunctionLoweringHandler, E as DefaultFunctionLoweringContext, F as SourceSpan, M as MutationDefaultGeneratorDescriptor, N as ParsedDefaultFunctionCall, O as DefaultFunctionRegistry, P as SourceDiagnostic, T as ControlMutationDefaults, a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, j as LoweredDefaultValue, k as DefaultFunctionRegistryEntry, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, v as TargetBoundComponentDescriptor, w as ControlMutationDefaultRegistry, y as TargetDescriptor } from "./framework-components-CHuBHXQN.mjs";
4
+ import { t as TypesImportSpec } from "./types-import-spec-BxI5cSQy.mjs";
5
+ import { t as EmissionSpi } from "./emission-types-CMv_053d.mjs";
6
+ import { m as PslDocumentAst } from "./psl-ast-Ckn_G-jv.mjs";
6
7
  import { Contract, ContractMarkerRecord } from "@prisma-next/contract/types";
8
+ import { ImportRequirement, ImportRequirement as ImportRequirement$1 } from "@prisma-next/ts-render";
7
9
  import { Result } from "@prisma-next/utils/result";
8
10
 
9
- //#region src/control-result-types.d.ts
11
+ //#region src/control/control-result-types.d.ts
10
12
  declare const VERIFY_CODE_MARKER_MISSING = "PN-RUN-3001";
11
13
  declare const VERIFY_CODE_HASH_MISMATCH = "PN-RUN-3002";
12
14
  declare const VERIFY_CODE_TARGET_MISMATCH = "PN-RUN-3003";
@@ -43,12 +45,11 @@ interface VerifyDatabaseResult {
43
45
  };
44
46
  }
45
47
  interface BaseSchemaIssue {
46
- readonly kind: 'missing_table' | 'missing_column' | 'extra_table' | 'extra_column' | 'extra_primary_key' | 'extra_foreign_key' | 'extra_unique_constraint' | 'extra_index' | 'extra_validator' | 'type_mismatch' | 'type_missing' | 'type_values_mismatch' | 'nullability_mismatch' | 'primary_key_mismatch' | 'foreign_key_mismatch' | 'unique_constraint_mismatch' | 'index_mismatch' | 'dependency_missing' | 'default_missing' | 'default_mismatch' | 'extra_default';
48
+ readonly kind: 'missing_table' | 'missing_column' | 'extra_table' | 'extra_column' | 'extra_primary_key' | 'extra_foreign_key' | 'extra_unique_constraint' | 'extra_index' | 'extra_validator' | 'type_mismatch' | 'type_missing' | 'type_values_mismatch' | 'nullability_mismatch' | 'primary_key_mismatch' | 'foreign_key_mismatch' | 'unique_constraint_mismatch' | 'index_mismatch' | 'default_missing' | 'default_mismatch' | 'extra_default';
47
49
  readonly table?: string;
48
50
  readonly column?: string;
49
51
  readonly indexOrConstraint?: string;
50
52
  readonly typeName?: string;
51
- readonly dependencyId?: string;
52
53
  readonly expected?: string;
53
54
  readonly actual?: string;
54
55
  readonly message: string;
@@ -154,7 +155,7 @@ interface SignDatabaseResult {
154
155
  };
155
156
  }
156
157
  //#endregion
157
- //#region src/control-instances.d.ts
158
+ //#region src/control/control-instances.d.ts
158
159
  interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR> extends FamilyInstance<TFamilyId> {
159
160
  validateContract(contractJson: unknown): Contract;
160
161
  verify(options: {
@@ -172,15 +173,59 @@ interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR> extends Fam
172
173
  readonly configPath?: string;
173
174
  readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, string>>;
174
175
  }): Promise<VerifyDatabaseSchemaResult>;
176
+ /**
177
+ * Verify a contract against an already-introspected schema slice.
178
+ *
179
+ * Difference from {@link schemaVerify}: no `driver`, no introspection
180
+ * — the caller hands over the schema directly. Used by the aggregate
181
+ * verifier to invoke the family's verification logic per member,
182
+ * with the schema **pre-projected** to that member's claimed slice
183
+ * via {@link import('@prisma-next/migration-tools/aggregate').projectSchemaToSpace}.
184
+ *
185
+ * Synchronous — no I/O. Idempotent.
186
+ */
187
+ schemaVerifyAgainstSchema(options: {
188
+ readonly contract: unknown;
189
+ readonly schema: TSchemaIR;
190
+ readonly strict: boolean;
191
+ readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, string>>;
192
+ }): VerifyDatabaseSchemaResult;
175
193
  sign(options: {
176
194
  readonly driver: ControlDriverInstance<TFamilyId, string>;
177
195
  readonly contract: unknown;
178
196
  readonly contractPath: string;
179
197
  readonly configPath?: string;
180
198
  }): Promise<SignDatabaseResult>;
199
+ /**
200
+ * Reads the contract marker for `space` from the database, returning
201
+ * `null` if no marker row exists for that space (or if the marker
202
+ * table itself is missing).
203
+ *
204
+ * `space` is required at every call site so the type system surfaces
205
+ * every place that needs to thread the value: callers in single-app
206
+ * paths pass {@link import('./control-spaces').APP_SPACE_ID}
207
+ * (`'app'`); per-extension callers pass the extension's space id.
208
+ * Defaulting at the family-interface level was a silent bug door —
209
+ * it let multi-space-aware callers forget to pass `space` and
210
+ * collapse onto the app's marker row.
211
+ *
212
+ * Families whose underlying storage doesn't yet support per-space
213
+ * markers (Mongo, today) accept `space` for interface conformance and
214
+ * reject any non-`APP_SPACE_ID` value rather than silently ignoring
215
+ * it; see the family-specific implementation for details.
216
+ */
181
217
  readMarker(options: {
182
218
  readonly driver: ControlDriverInstance<TFamilyId, string>;
219
+ readonly space: string;
183
220
  }): Promise<ContractMarkerRecord | null>;
221
+ /**
222
+ * Reads every marker row keyed by `space`. Used by the per-space
223
+ * verifier to detect orphan marker rows and marker-vs-on-disk drift.
224
+ * Returns an empty map when the marker table does not yet exist.
225
+ */
226
+ readAllMarkers(options: {
227
+ readonly driver: ControlDriverInstance<TFamilyId, string>;
228
+ }): Promise<ReadonlyMap<string, ContractMarkerRecord>>;
184
229
  introspect(options: {
185
230
  readonly driver: ControlDriverInstance<TFamilyId, string>;
186
231
  readonly contract?: unknown;
@@ -196,7 +241,7 @@ interface ControlDriverInstance<TFamilyId extends string, TTargetId extends stri
196
241
  }
197
242
  interface ControlExtensionInstance<TFamilyId extends string, TTargetId extends string> extends ExtensionInstance<TFamilyId, TTargetId> {}
198
243
  //#endregion
199
- //#region src/control-stack.d.ts
244
+ //#region src/control/control-stack.d.ts
200
245
  interface AssembledAuthoringContributions {
201
246
  readonly field: AuthoringFieldNamespace;
202
247
  readonly type: AuthoringTypeNamespace;
@@ -208,7 +253,6 @@ interface ControlStack<TFamilyId extends string = string, TTargetId extends stri
208
253
  readonly driver?: ControlDriverDescriptor<TFamilyId, TTargetId> | undefined;
209
254
  readonly extensionPacks: readonly ControlExtensionDescriptor<TFamilyId, TTargetId>[];
210
255
  readonly codecTypeImports: ReadonlyArray<TypesImportSpec>;
211
- readonly operationTypeImports: ReadonlyArray<TypesImportSpec>;
212
256
  readonly queryOperationTypeImports: ReadonlyArray<TypesImportSpec>;
213
257
  readonly extensionIds: ReadonlyArray<string>;
214
258
  readonly codecLookup: CodecLookup;
@@ -231,7 +275,6 @@ declare function assertUniqueCodecOwner(options: {
231
275
  readonly entityOwnershipLabel: string;
232
276
  }): void;
233
277
  declare function extractCodecTypeImports(descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>): ReadonlyArray<TypesImportSpec>;
234
- declare function extractOperationTypeImports(descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>): ReadonlyArray<TypesImportSpec>;
235
278
  declare function extractQueryOperationTypeImports(descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>): ReadonlyArray<TypesImportSpec>;
236
279
  declare function extractComponentIds(family: {
237
280
  readonly id: string;
@@ -252,11 +295,11 @@ declare function assembleControlMutationDefaults(descriptors: ReadonlyArray<Pick
252
295
  readonly id?: string;
253
296
  }>): ControlMutationDefaults;
254
297
  declare function extractCodecLookup(descriptors: ReadonlyArray<Pick<ComponentMetadata & {
255
- id?: string;
298
+ id: string;
256
299
  }, 'types' | 'id'>>): CodecLookup;
257
300
  declare function createControlStack<TFamilyId extends string, TTargetId extends string>(input: CreateControlStackInput<TFamilyId, TTargetId>): ControlStack<TFamilyId, TTargetId>;
258
301
  //#endregion
259
- //#region src/control-descriptors.d.ts
302
+ //#region src/control/control-descriptors.d.ts
260
303
  interface ControlFamilyDescriptor<TFamilyId extends string, TFamilyInstance extends ControlFamilyInstance<TFamilyId, unknown> = ControlFamilyInstance<TFamilyId, unknown>> extends FamilyDescriptor<TFamilyId> {
261
304
  readonly emission: EmissionSpi;
262
305
  create<TTargetId extends string>(stack: ControlStack<TFamilyId, TTargetId>): TFamilyInstance;
@@ -281,7 +324,62 @@ interface ControlExtensionDescriptor<TFamilyId extends string, TTargetId extends
281
324
  create(): TExtensionInstance;
282
325
  }
283
326
  //#endregion
284
- //#region src/control-migration-types.d.ts
327
+ //#region src/control/control-migration-types.d.ts
328
+ /**
329
+ * Planner provenance recorded inside {@link MigrationMetadata}.
330
+ *
331
+ * `used` / `applied` track which migration hints the planner consulted
332
+ * vs. which it actually applied during emission; `plannerVersion`
333
+ * pins the planner build that produced the migration so future
334
+ * verification passes can recognise plans authored against an older
335
+ * planner.
336
+ */
337
+ interface MigrationHints {
338
+ readonly used: readonly string[];
339
+ readonly applied: readonly string[];
340
+ readonly plannerVersion: string;
341
+ }
342
+ /**
343
+ * In-memory migration metadata envelope. Every migration is
344
+ * content-addressed: the `migrationHash` is a hash over the metadata
345
+ * envelope plus the operations list, computed at write time. There is no
346
+ * draft state — a migration directory either exists with fully attested
347
+ * metadata or it does not.
348
+ *
349
+ * When the planner cannot lower an operation because of an unfilled
350
+ * `placeholder(...)` slot, the migration is still written with
351
+ * `migrationHash` hashed over `ops: []`. Re-running self-emit after the
352
+ * user fills the placeholder produces a *different* `migrationHash`
353
+ * (committed to the real ops); this is intentional.
354
+ *
355
+ * The on-disk JSON shape in `migration.json` matches this type
356
+ * field-for-field — `JSON.stringify(metadata, null, 2)` is the canonical
357
+ * writer output (defined in `@prisma-next/migration-tools/io`).
358
+ */
359
+ interface MigrationMetadata {
360
+ readonly migrationHash: string;
361
+ readonly from: string | null;
362
+ readonly to: string;
363
+ readonly fromContract: Contract | null;
364
+ readonly toContract: Contract;
365
+ readonly hints: MigrationHints;
366
+ readonly labels: readonly string[];
367
+ /**
368
+ * Sorted, deduplicated list of `invariantId`s declared by the
369
+ * migration's data-transform ops. Always present; an empty array
370
+ * means the migration has no routing-visible data transforms.
371
+ */
372
+ readonly providedInvariants: readonly string[];
373
+ readonly authorship?: {
374
+ readonly author?: string;
375
+ readonly email?: string;
376
+ };
377
+ readonly signature?: {
378
+ readonly keyId: string;
379
+ readonly value: string;
380
+ } | null;
381
+ readonly createdAt: string;
382
+ }
285
383
  /**
286
384
  * Migration operation classes define the safety level of an operation.
287
385
  * - 'additive': Adds new structures without modifying existing ones (safe)
@@ -294,52 +392,15 @@ type MigrationOperationClass = 'additive' | 'widening' | 'destructive' | 'data';
294
392
  * A lowered query statement as stored in ops.json.
295
393
  * Contains the SQL string and parameter values — ready for execution.
296
394
  * Lowering from query builder AST to SQL happens at verify time.
395
+ *
396
+ * The Postgres `dataTransform` factory uses this shape internally to
397
+ * carry the user's lowered `check`/`run` plans before wrapping them
398
+ * into precheck/execute/postcheck steps on the unified migration op.
297
399
  */
298
400
  interface SerializedQueryPlan {
299
401
  readonly sql: string;
300
402
  readonly params: readonly unknown[];
301
403
  }
302
- /**
303
- * A data transform operation within a migration edge.
304
- *
305
- * Data transforms are authored in TypeScript using the query builder,
306
- * serialized to JSON ASTs at verification time, and rendered to SQL
307
- * by the target adapter at apply time.
308
- *
309
- * The `name` serves as the invariant identity — it's recorded in the
310
- * ledger and used for invariant-aware routing via environment refs.
311
- *
312
- * In draft state (before verification), `check` and `run` are null.
313
- * After verification, they contain the serialized query ASTs.
314
- */
315
- interface DataTransformOperation extends MigrationPlanOperation {
316
- readonly operationClass: 'data';
317
- /**
318
- * The invariant name for this data transform.
319
- * Recorded in the ledger on successful edge completion.
320
- * Used by environment refs to declare required invariants.
321
- */
322
- readonly name: string;
323
- /**
324
- * Path to the TypeScript source file that produced this operation.
325
- * Not part of edgeId computation — for traceability only.
326
- */
327
- readonly source: string;
328
- /**
329
- * Serialized check query plan, or a boolean literal.
330
- * - SerializedQueryPlan: describes violations; empty result = already applied.
331
- * - false: always run (no check).
332
- * - true: always skip.
333
- * - null: not yet serialized (draft state).
334
- */
335
- readonly check: SerializedQueryPlan | boolean | null;
336
- /**
337
- * Serialized run query plans.
338
- * - Array of serialized query plans to execute sequentially.
339
- * - null: not yet serialized (draft state).
340
- */
341
- readonly run: readonly SerializedQueryPlan[] | null;
342
- }
343
404
  /**
344
405
  * Policy defining which operation classes are allowed during a migration.
345
406
  */
@@ -357,11 +418,46 @@ interface MigrationPlanOperation {
357
418
  readonly label: string;
358
419
  /** The class of operation (additive, widening, destructive). */
359
420
  readonly operationClass: MigrationOperationClass;
421
+ /**
422
+ * Optional opt-in routing identity for data-transform operations.
423
+ * Presence opts the transform into invariant-aware routing; absence
424
+ * means it is path-dependent and not referenceable from refs.
425
+ *
426
+ * Lives on the base op so the manifest emitter and
427
+ * `deriveProvidedInvariants` can read it without depending on a
428
+ * target-specific shape. Schema-DDL ops (additive / widening /
429
+ * destructive) leave it undefined.
430
+ */
431
+ readonly invariantId?: string;
360
432
  }
361
433
  /**
362
- * Framework-level contract for a single factory call in a target's planner IR.
434
+ * Framework-level contract for a single factory call in a target's planner
435
+ * IR — the canonical shape for any node participating in the two-renderer
436
+ * pattern (source-text rendering for `migration.ts` + runtime-op derivation
437
+ * for `ops.json`).
438
+ *
439
+ * Implementations declare:
440
+ *
441
+ * - **Identity / display metadata** (`factoryName`, `operationClass`,
442
+ * `label`) used by CLI summaries and the issue planner.
443
+ * - **`renderTypeScript()`** — emit the call as a TypeScript expression
444
+ * suitable for inclusion in a generated `migration.ts`. Polymorphic
445
+ * across postgres / mongo / sqlite / extension-owned calls.
446
+ * - **`importRequirements()`** — the symbols this rendered expression
447
+ * pulls in. Aggregated and deduplicated by the top-level renderer
448
+ * into a single import block per file.
449
+ * - **`toOp()`** — lower the call to a runtime
450
+ * `MigrationPlanOperation`. Returns the framework base; concrete
451
+ * implementations narrow via covariant return (e.g. SQL targets
452
+ * return `SqlMigrationPlanOperation<TTargetDetails>`).
453
+ *
454
+ * Each domain (target, extension) defines its own set of concrete `*Call`
455
+ * classes that implement this interface — typically by extending
456
+ * {@link import('@prisma-next/ts-render').TsExpression} and adding the
457
+ * concrete `toOp()` body. Extensions can implement the interface
458
+ * directly without depending on a target's package-private base.
363
459
  *
364
- * @see ADR 195
460
+ * @see ADR 195 — Planner IR with two renderers.
365
461
  */
366
462
  interface OpFactoryCall {
367
463
  /** The name of the factory that would produce this call's runtime op. */
@@ -370,6 +466,26 @@ interface OpFactoryCall {
370
466
  readonly operationClass: MigrationOperationClass;
371
467
  /** Human-readable label for CLI output and diagnostics. */
372
468
  readonly label: string;
469
+ /**
470
+ * Render this call as a TypeScript expression suitable for inclusion in
471
+ * a generated `migration.ts`. The output is composed alongside other
472
+ * calls' rendered expressions inside the migration's `operations`
473
+ * array.
474
+ */
475
+ renderTypeScript(): string;
476
+ /**
477
+ * Import requirements pulled in by the rendered TypeScript expression.
478
+ * Aggregated and deduplicated across all calls into a single import
479
+ * block per file.
480
+ */
481
+ importRequirements(): readonly ImportRequirement$1[];
482
+ /**
483
+ * Lower this call to a runtime migration plan operation suitable for
484
+ * execution / inclusion in `ops.json`. Concrete implementations narrow
485
+ * the return type via covariant return (e.g. SQL targets return
486
+ * `SqlMigrationPlanOperation<TTargetDetails>`).
487
+ */
488
+ toOp(): MigrationPlanOperation;
373
489
  }
374
490
  /**
375
491
  * A migration plan for display purposes.
@@ -378,6 +494,16 @@ interface OpFactoryCall {
378
494
  interface MigrationPlan {
379
495
  /** The target ID this plan is for (e.g., 'postgres'). */
380
496
  readonly targetId: string;
497
+ /**
498
+ * Contract space this plan applies to. Runners cross-check
499
+ * `options.space` against `plan.spaceId` so the marker row gets keyed
500
+ * by the right space when applying via `executeAcrossSpaces`.
501
+ *
502
+ * Optional for backward compatibility with single-space callers that
503
+ * pre-date the contract-space aggregate; when present, runners
504
+ * enforce that it matches `options.space`.
505
+ */
506
+ readonly spaceId?: string;
381
507
  /**
382
508
  * Origin contract identity that the plan expects the database to currently be at.
383
509
  * If omitted or null, the runner skips origin validation entirely.
@@ -393,6 +519,17 @@ interface MigrationPlan {
393
519
  };
394
520
  /** Ordered list of operations to execute. */
395
521
  readonly operations: readonly MigrationPlanOperation[];
522
+ /**
523
+ * Sorted, deduplicated invariant ids declared by this plan's data-transform
524
+ * ops. Authored migrations carry the canonical value from
525
+ * `migration.json.providedInvariants`; planner-built plans (`db init`,
526
+ * `db update`) omit it (the runner treats it as `[]`). Runners read this
527
+ * field for marker writes and self-edge no-op detection rather than
528
+ * re-deriving from `operations`, since the manifest is the canonical
529
+ * source for the invariant set across all runners (postgres, sqlite,
530
+ * mongo).
531
+ */
532
+ readonly providedInvariants?: readonly string[];
396
533
  }
397
534
  /**
398
535
  * A migration plan that can also render itself back to user-editable
@@ -502,27 +639,36 @@ interface MigrationPlanner<TFamilyId extends string = string, TTargetId extends
502
639
  readonly contract: unknown;
503
640
  readonly schema: unknown;
504
641
  readonly policy: MigrationOperationPolicy;
505
- /**
506
- * Storage hash of the "from" contract (the state the planner assumes the
507
- * database starts at). Planners use this to populate `describe()` on the
508
- * produced plan so the rendered `migration.ts` has correct `from`/`to`
509
- * metadata.
510
- */
511
- readonly fromHash: string;
512
642
  /**
513
643
  * The "from" contract (the state the planner assumes the database starts
514
- * at). Planners pass this to data-safety strategies so they can compare
515
- * `from` and `to` column shapes (e.g. to detect unsafe type changes).
516
- * `db update` / `db init` reconcile against the live schema and have no
517
- * "from" contract; only `migration plan` provides one.
644
+ * at), or `null` for a baseline plan with no prior state.
645
+ *
646
+ * Planners derive any "from" identity they need to stamp onto the
647
+ * produced plan's `describe()` from `fromContract?.storage.storageHash
648
+ * ?? null`. They also pass this to data-safety strategies so they can
649
+ * compare `from` and `to` column shapes (e.g. to detect unsafe type
650
+ * changes).
651
+ *
652
+ * Required at every call site to make the structural fact "I have a
653
+ * prior contract / I don't" visible in the type. Reconciliation
654
+ * commands (`db init`, `db update`) introspect a live schema and pass
655
+ * `null`; authoring commands (`migration plan`) pass the previous
656
+ * bundle's `metadata.toContract`.
518
657
  */
519
- readonly fromContract?: unknown;
658
+ readonly fromContract: Contract | null;
520
659
  /**
521
660
  * Active framework components participating in this composition.
522
661
  * Families/targets can interpret this list to derive family-specific metadata.
523
662
  * All components must have matching familyId and targetId.
524
663
  */
525
664
  readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>;
665
+ /**
666
+ * Contract space this plan applies to. Stamped onto the produced
667
+ * plan so the runner keys the marker row by the right space when
668
+ * executing. App-plan callers pass `APP_SPACE_ID` (`'app'`);
669
+ * per-extension callers pass the extension's space id.
670
+ */
671
+ readonly spaceId: string;
526
672
  }): MigrationPlannerResult;
527
673
  /**
528
674
  * Produce an empty migration with the target's authoring conventions.
@@ -530,8 +676,12 @@ interface MigrationPlanner<TFamilyId extends string = string, TTargetId extends
530
676
  * Used by `migration new` to scaffold a fresh `migration.ts`. The
531
677
  * returned plan has no operations; its `renderTypeScript()` yields a
532
678
  * stub the user can edit.
679
+ *
680
+ * `spaceId` is stamped onto the produced plan; reconciliation flows
681
+ * (`db init`, `db update`) and authoring flows (`migration new`) all
682
+ * pass it explicitly.
533
683
  */
534
- emptyMigration(context: MigrationScaffoldContext): MigrationPlanWithAuthoringSurface;
684
+ emptyMigration(context: MigrationScaffoldContext, spaceId: string): MigrationPlanWithAuthoringSurface;
535
685
  }
536
686
  /**
537
687
  * Migration runner interface for executing migration plans.
@@ -541,6 +691,16 @@ interface MigrationPlanner<TFamilyId extends string = string, TTargetId extends
541
691
  * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
542
692
  */
543
693
  interface MigrationRunner<TFamilyId extends string = string, TTargetId extends string = string> {
694
+ /**
695
+ * Execute a migration plan against the configured driver.
696
+ *
697
+ * The `plan` parameter is trusted input. Callers are responsible for
698
+ * upstream verification of the originating migration package — typically
699
+ * by obtaining the package via `readMigrationPackage` from
700
+ * `@prisma-next/migration-tools/io`, which performs hash-integrity checks
701
+ * at the load boundary. Runners do not re-verify the plan and assume the
702
+ * `(metadata, ops)` pair on disk has not been tampered with since emit.
703
+ */
544
704
  execute(options: {
545
705
  readonly plan: MigrationPlan;
546
706
  readonly driver: ControlDriverInstance<TFamilyId, TTargetId>;
@@ -563,6 +723,58 @@ interface MigrationRunner<TFamilyId extends string = string, TTargetId extends s
563
723
  readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>;
564
724
  }): Promise<MigrationRunnerResult>;
565
725
  }
726
+ /**
727
+ * Per-space input for {@link MultiSpaceCapableRunner.executeAcrossSpaces}.
728
+ *
729
+ * Mirrors the single-space `MigrationRunner.execute` options, extended with a
730
+ * required `space` identifier. Each entry's `driver` must reference the same
731
+ * connection the outer transaction is opened on (typically the same value as
732
+ * the top-level `driver` on `executeAcrossSpaces`).
733
+ *
734
+ * Family-specific runners (e.g. the SQL family's `SqlMigrationRunner`) define
735
+ * a richer per-space option shape that is structurally compatible with this
736
+ * one — additional optional fields (e.g. SQL's `strictVerification`,
737
+ * `schemaName`, `callbacks`) are tolerated by the underlying runner without
738
+ * affecting cross-target wiring.
739
+ */
740
+ interface MultiSpaceRunnerPerSpaceOptions<TFamilyId extends string = string, TTargetId extends string = string> {
741
+ readonly space: string;
742
+ readonly plan: MigrationPlan;
743
+ readonly driver: ControlDriverInstance<TFamilyId, TTargetId>;
744
+ readonly destinationContract: unknown;
745
+ readonly policy: MigrationOperationPolicy;
746
+ readonly executionChecks?: MigrationRunnerExecutionChecks;
747
+ readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>;
748
+ }
749
+ interface MultiSpaceRunnerSuccessValue {
750
+ readonly perSpaceResults: ReadonlyArray<{
751
+ readonly space: string;
752
+ readonly value: MigrationRunnerSuccessValue;
753
+ }>;
754
+ }
755
+ interface MultiSpaceRunnerFailure extends MigrationRunnerFailure {
756
+ /** Identifier of the space whose plan caused the rollback. */
757
+ readonly failingSpace: string;
758
+ }
759
+ type MultiSpaceRunnerResult = Result<MultiSpaceRunnerSuccessValue, MultiSpaceRunnerFailure>;
760
+ /**
761
+ * Optional capability for runners that can apply a list of per-space plans
762
+ * inside a single outer transaction. A failure on any space rolls back every
763
+ * space's writes.
764
+ *
765
+ * The SQL family (`SqlMigrationRunner`) implements this with a true outer
766
+ * transaction across every space. The Mongo family implements a degenerate
767
+ * single-space shim (per-space is a non-goal per the extension-contract-spaces
768
+ * project spec — Mongo aggregates are always single-member). The capability
769
+ * is declared at the framework layer so CLI utilities can route through it
770
+ * without importing any specific family directly.
771
+ */
772
+ interface MultiSpaceCapableRunner<TFamilyId extends string = string, TTargetId extends string = string> {
773
+ executeAcrossSpaces(options: {
774
+ readonly driver: ControlDriverInstance<TFamilyId, TTargetId>;
775
+ readonly perSpaceOptions: ReadonlyArray<MultiSpaceRunnerPerSpaceOptions<TFamilyId, TTargetId>>;
776
+ }): Promise<MultiSpaceRunnerResult>;
777
+ }
566
778
  /**
567
779
  * Optional capability interface for targets that support migrations.
568
780
  * Targets that implement migrations expose this via their descriptor.
@@ -598,11 +810,12 @@ interface MigrationScaffoldContext {
598
810
  /** Absolute path to the contract.json file, if one exists. Used by targets that emit typed-contract imports. */
599
811
  readonly contractJsonPath?: string;
600
812
  /**
601
- * Storage hash of the "from" contract. Targets use this to populate
602
- * `describe()` on the rendered empty migration so that identity metadata
603
- * is correctly populated.
813
+ * Storage hash of the "from" contract, or `null` for a baseline scaffold
814
+ * with no prior state. Targets use this to populate `describe()` on the
815
+ * rendered empty migration so that identity metadata is correctly
816
+ * populated.
604
817
  */
605
- readonly fromHash: string;
818
+ readonly fromHash: string | null;
606
819
  /**
607
820
  * Storage hash of the "to" contract. Same purpose as `fromHash` — threaded
608
821
  * through so the rendered class's `describe()` declares the correct
@@ -611,7 +824,30 @@ interface MigrationScaffoldContext {
611
824
  readonly toHash: string;
612
825
  }
613
826
  //#endregion
614
- //#region src/control-schema-view.d.ts
827
+ //#region src/control/control-operation-preview.d.ts
828
+ /**
829
+ * Family-agnostic textual preview of a migration plan, used by the CLI to
830
+ * render a "DDL preview" section for `db init` / `db update` / `migration plan`
831
+ * / `migration show`. Each statement carries a free-form `language` tag so
832
+ * formatters can suffix `;` for SQL but render Mongo shell lines verbatim.
833
+ *
834
+ * Producers are family-specific: SQL emits `language: 'sql'` (existing DDL
835
+ * extraction); Mongo emits `language: 'mongodb-shell'` via the
836
+ * `MongoDdlCommandFormatter` visitor.
837
+ *
838
+ * The capability `OperationPreviewCapable` (declared in
839
+ * `./control-capabilities`) is how a family announces it can produce these.
840
+ */
841
+ interface OperationPreviewStatement {
842
+ readonly text: string;
843
+ /** Dialect identifier, e.g. `'sql'`, `'mongodb-shell'`. Free-form by design (OQ-3). */
844
+ readonly language: string;
845
+ }
846
+ interface OperationPreview {
847
+ readonly statements: readonly OperationPreviewStatement[];
848
+ }
849
+ //#endregion
850
+ //#region src/control/control-schema-view.d.ts
615
851
  /**
616
852
  * Core schema view types for family-agnostic schema visualization.
617
853
  *
@@ -649,7 +885,7 @@ interface CoreSchemaView {
649
885
  readonly root: SchemaTreeNode;
650
886
  }
651
887
  //#endregion
652
- //#region src/control-capabilities.d.ts
888
+ //#region src/control/control-capabilities.d.ts
653
889
  interface MigratableTargetDescriptor<TFamilyId extends string, TTargetId extends string, TFamilyInstance extends ControlFamilyInstance<TFamilyId, unknown> = ControlFamilyInstance<TFamilyId, unknown>> extends ControlTargetDescriptor<TFamilyId, TTargetId> {
654
890
  readonly migrations: TargetMigrationsCapability<TFamilyId, TTargetId, TFamilyInstance>;
655
891
  }
@@ -658,6 +894,113 @@ interface SchemaViewCapable<TSchemaIR = unknown> {
658
894
  toSchemaView(schema: TSchemaIR): CoreSchemaView;
659
895
  }
660
896
  declare function hasSchemaView<TFamilyId extends string, TSchemaIR>(instance: ControlFamilyInstance<TFamilyId, TSchemaIR>): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & SchemaViewCapable<TSchemaIR>;
897
+ /**
898
+ * Capability declaring that a family can infer a PSL contract AST from its
899
+ * opaque introspected schema IR. Consumed by `prisma-next contract infer`.
900
+ */
901
+ interface PslContractInferCapable<TSchemaIR = unknown> {
902
+ inferPslContract(schemaIR: TSchemaIR): PslDocumentAst;
903
+ }
904
+ declare function hasPslContractInfer<TFamilyId extends string, TSchemaIR>(instance: ControlFamilyInstance<TFamilyId, TSchemaIR>): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & PslContractInferCapable<TSchemaIR>;
905
+ /**
906
+ * Capability declaring that a family can render a textual preview of migration
907
+ * operations for the CLI's "DDL preview" output. SQL families emit
908
+ * `language: 'sql'` statements; Mongo families emit `language: 'mongodb-shell'`.
909
+ */
910
+ interface OperationPreviewCapable {
911
+ toOperationPreview(operations: readonly MigrationPlanOperation[]): OperationPreview;
912
+ }
913
+ declare function hasOperationPreview<TFamilyId extends string, TSchemaIR>(instance: ControlFamilyInstance<TFamilyId, TSchemaIR>): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & OperationPreviewCapable;
914
+ /**
915
+ * Capability declaring that a runner can apply per-space plans inside a
916
+ * single outer transaction. The SQL family (`SqlMigrationRunner`) implements
917
+ * this with a true outer transaction. The Mongo family implements a
918
+ * degenerate single-space shim (Mongo per-space is a non-goal per the
919
+ * extension-contract-spaces project spec — TML-2397).
920
+ *
921
+ * The CLI's shared `applyAggregate` primitive uses this guard so that
922
+ * `db init` / `db update` / `migration apply` route uniformly through one
923
+ * dispatch path regardless of family.
924
+ */
925
+ declare function hasMultiSpaceRunner<TFamilyId extends string, TTargetId extends string>(runner: MigrationRunner<TFamilyId, TTargetId>): runner is MigrationRunner<TFamilyId, TTargetId> & MultiSpaceCapableRunner<TFamilyId, TTargetId>;
926
+ //#endregion
927
+ //#region src/control/control-spaces.d.ts
928
+ /**
929
+ * Canonical control-plane identifiers for contract spaces.
930
+ *
931
+ * A contract space is the disjoint `(contract.json, migration-graph)` unit
932
+ * the per-space planner / runner / verifier (project: extension contract
933
+ * spaces, TML-2397) operates on. The application owns one well-known
934
+ * space — the value below — and each loaded extension that contributes
935
+ * schema owns a uniquely-named space.
936
+ *
937
+ * Lives in `framework-components/control` so every layer that has to
938
+ * reason about space identity (the migration tooling, the SQL runtime's
939
+ * marker reader, target-side statement builders, target-side adapters)
940
+ * can import a single value rather than duplicating the literal. Raw
941
+ * `'app'` string literals in framework / target / runtime / adapter
942
+ * source code are forbidden and policed by
943
+ * `scripts/lint-app-space-id.mjs` (wired into `pnpm lint:deps`).
944
+ *
945
+ * @see specs/framework-mechanism.spec.md § 3 — Layout convention (γ).
946
+ */
947
+ declare const APP_SPACE_ID: "app";
948
+ /**
949
+ * Head ref for a contract space — the `(hash, invariants)` tuple
950
+ * a runner targets when applying that space's migration graph. Identical
951
+ * in shape to the on-disk `migrations/<space-id>/refs/head.json` the
952
+ * framework writes per loaded extension, and to the app-space
953
+ * `<projectRoot>/refs/head.json`. Family-agnostic: SQL, Mongo, and any
954
+ * future family share the same head-ref shape.
955
+ *
956
+ * @see specs/framework-mechanism.spec.md § 1.
957
+ */
958
+ interface ContractSpaceHeadRef {
959
+ readonly hash: string;
960
+ readonly invariants: readonly string[];
961
+ }
962
+ /**
963
+ * Canonical structural shape of a migration package — the unit a planner
964
+ * produces and a runner consumes: a directory name, the ADR 197 metadata
965
+ * envelope (which carries the `toContract` snapshot), and the operation
966
+ * list.
967
+ *
968
+ * In-memory by default. Readers in `@prisma-next/migration-tools`
969
+ * (`readMigrationPackage` / `readMigrationsDir`) return the augmented
970
+ * {@link import('@prisma-next/migration-tools/package').OnDiskMigrationPackage}
971
+ * variant which adds `dirPath`; everything else operates against the
972
+ * canonical shape so the same value flows through pre-emission
973
+ * authoring, on-disk loading, and runner execution without conversion.
974
+ *
975
+ * @see specs/framework-mechanism.spec.md § 1.
976
+ */
977
+ interface MigrationPackage {
978
+ readonly dirName: string;
979
+ readonly metadata: MigrationMetadata;
980
+ readonly ops: readonly MigrationPlanOperation[];
981
+ }
982
+ /**
983
+ * Canonical structural shape of a contract space — one disjoint
984
+ * `(contractJson, migration-graph)` unit the per-space planner / runner
985
+ * / verifier operates on. The application owns one well-known space
986
+ * ({@link APP_SPACE_ID}); each loaded extension that contributes schema
987
+ * owns a uniquely-named space. Whether a value is the app's space or an
988
+ * extension's space is a control-plane concern; the type carries no
989
+ * such distinction.
990
+ *
991
+ * Generic over the contract so each family pins a typed contract value
992
+ * at consumption time. The SQL family specialises to
993
+ * `ContractSpace<Contract<SqlStorage>>` at the descriptor surface;
994
+ * Mongo's symmetrical `ContractSpace<Contract<MongoStorage>>` will land
995
+ * with that family.
996
+ *
997
+ * @see specs/framework-mechanism.spec.md § 1.
998
+ */
999
+ interface ContractSpace<TContract extends Contract = Contract> {
1000
+ readonly contractJson: TContract;
1001
+ readonly migrations: readonly MigrationPackage[];
1002
+ readonly headRef: ContractSpaceHeadRef;
1003
+ }
661
1004
  //#endregion
662
- export { type AssembledAuthoringContributions, type BaseSchemaIssue, type ControlAdapterDescriptor, type ControlAdapterInstance, type ControlDriverDescriptor, type ControlDriverInstance, type ControlExtensionDescriptor, type ControlExtensionInstance, type ControlFamilyDescriptor, type ControlFamilyInstance, type ControlMutationDefaultEntry, type ControlMutationDefaultRegistry, type ControlMutationDefaults, type ControlStack, type ControlTargetDescriptor, type ControlTargetInstance, type CoreSchemaView, type CreateControlStackInput, type DataTransformOperation, type DefaultFunctionLoweringContext, type DefaultFunctionLoweringHandler, type DefaultFunctionRegistry, type DefaultFunctionRegistryEntry, type EmitContractResult, type EnumValuesChangedIssue, type IntrospectSchemaResult, type LoweredDefaultResult, type LoweredDefaultValue, type MigratableTargetDescriptor, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanWithAuthoringSurface, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerFailureResult, type MigrationPlannerResult, type MigrationPlannerSuccessResult, type MigrationRunner, type MigrationRunnerExecutionChecks, type MigrationRunnerFailure, type MigrationRunnerResult, type MigrationRunnerSuccessValue, type MigrationScaffoldContext, type MutationDefaultGeneratorDescriptor, type OpFactoryCall, type OperationContext, type ParsedDefaultFunctionCall, type SchemaIssue, type SchemaNodeKind, SchemaTreeNode, type SchemaTreeNodeOptions, type SchemaTreeVisitor, type SchemaVerificationNode, type SchemaViewCapable, type SerializedQueryPlan, type SignDatabaseResult, type SourceDiagnostic, type SourceSpan, type TargetMigrationsCapability, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, type VerifyDatabaseResult, type VerifyDatabaseSchemaResult, assembleAuthoringContributions, assembleControlMutationDefaults, assembleScalarTypeDescriptors, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractOperationTypeImports, extractQueryOperationTypeImports, hasMigrations, hasSchemaView };
1005
+ export { APP_SPACE_ID, type AssembledAuthoringContributions, type BaseSchemaIssue, type ContractSpace, type ContractSpaceHeadRef, type ControlAdapterDescriptor, type ControlAdapterInstance, type ControlDriverDescriptor, type ControlDriverInstance, type ControlExtensionDescriptor, type ControlExtensionInstance, type ControlFamilyDescriptor, type ControlFamilyInstance, type ControlMutationDefaultEntry, type ControlMutationDefaultRegistry, type ControlMutationDefaults, type ControlStack, type ControlTargetDescriptor, type ControlTargetInstance, type CoreSchemaView, type CreateControlStackInput, type DefaultFunctionLoweringContext, type DefaultFunctionLoweringHandler, type DefaultFunctionRegistry, type DefaultFunctionRegistryEntry, type EmitContractResult, type EnumValuesChangedIssue, type ImportRequirement, type IntrospectSchemaResult, type LoweredDefaultResult, type LoweredDefaultValue, type MigratableTargetDescriptor, type MigrationHints, type MigrationMetadata, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPackage, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanWithAuthoringSurface, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerFailureResult, type MigrationPlannerResult, type MigrationPlannerSuccessResult, type MigrationRunner, type MigrationRunnerExecutionChecks, type MigrationRunnerFailure, type MigrationRunnerResult, type MigrationRunnerSuccessValue, type MigrationScaffoldContext, type MultiSpaceCapableRunner, type MultiSpaceRunnerFailure, type MultiSpaceRunnerPerSpaceOptions, type MultiSpaceRunnerResult, type MultiSpaceRunnerSuccessValue, type MutationDefaultGeneratorDescriptor, type OpFactoryCall, type OperationContext, type OperationPreview, type OperationPreviewCapable, type OperationPreviewStatement, type ParsedDefaultFunctionCall, type PslContractInferCapable, type SchemaIssue, type SchemaNodeKind, SchemaTreeNode, type SchemaTreeNodeOptions, type SchemaTreeVisitor, type SchemaVerificationNode, type SchemaViewCapable, type SerializedQueryPlan, type SignDatabaseResult, type SourceDiagnostic, type SourceSpan, type TargetMigrationsCapability, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, type VerifyDatabaseResult, type VerifyDatabaseSchemaResult, assembleAuthoringContributions, assembleControlMutationDefaults, assembleScalarTypeDescriptors, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractQueryOperationTypeImports, hasMigrations, hasMultiSpaceRunner, hasOperationPreview, hasPslContractInfer, hasSchemaView };
663
1006
  //# sourceMappingURL=control.d.mts.map