@malloy-publisher/sdk 0.13.1 → 0.15.0

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 (29) hide show
  1. package/dist/{RenderedResult-C4rimzu4.cjs.js → RenderedResult-B2VzqpJV.cjs.js} +1 -1
  2. package/dist/{RenderedResult-D5HJr2Xo.es.js → RenderedResult-Ct3z543g.es.js} +9 -9
  3. package/dist/{ServerProvider-8Eul_YOl.es.js → ServerProvider-Be9eusDF.es.js} +1076 -993
  4. package/dist/ServerProvider-DDr5VOVF.cjs.js +1 -0
  5. package/dist/builder/index.cjs.js +1 -1
  6. package/dist/builder/index.es.js +335 -335
  7. package/dist/client/api.d.ts +261 -82
  8. package/dist/client/index.cjs.js +1 -1
  9. package/dist/client/index.es.js +110 -104
  10. package/dist/components/Materializations/DeleteMaterializationDialog.d.ts +1 -1
  11. package/dist/components/Materializations/MaterializationRunsList.d.ts +1 -1
  12. package/dist/components/Materializations/utils.d.ts +28 -6
  13. package/dist/components/Package/PackageProblems.d.ts +6 -0
  14. package/dist/index.cjs.js +36 -36
  15. package/dist/index.es.js +7045 -7521
  16. package/dist/{useCompiledDocument-UADoxvYb.cjs.js → useCompiledDocument-CQG6VO-x.cjs.js} +20 -20
  17. package/dist/{useCompiledDocument-CwMwrEXo.es.js → useCompiledDocument-CuSAYHX_.es.js} +56 -60
  18. package/package.json +1 -1
  19. package/src/components/Materializations/DeleteMaterializationDialog.tsx +5 -16
  20. package/src/components/Materializations/MaterializationDetailDialog.tsx +4 -4
  21. package/src/components/Materializations/MaterializationRunsList.tsx +8 -10
  22. package/src/components/Materializations/Materializations.tsx +3 -13
  23. package/src/components/Materializations/Materializations.versions.spec.tsx +6 -3
  24. package/src/components/Materializations/TriggerLabel.tsx +2 -2
  25. package/src/components/Materializations/utils.spec.ts +29 -1
  26. package/src/components/Materializations/utils.ts +48 -7
  27. package/src/components/Package/PackageProblems.spec.tsx +25 -1
  28. package/src/components/Package/PackageProblems.tsx +32 -2
  29. package/dist/ServerProvider-Cvllj0GN.cjs.js +0 -1
@@ -280,9 +280,12 @@ export interface BuildInstruction {
280
280
  * Logical, fully-qualified (but unquoted) table name to create — an optional dialect container path plus the table name, e.g. `mydataset.engaged_events_<sourceEntityId>_v0`. The publisher dialect-quotes each segment when it emits the DDL, so quote-requiring names (a hyphenated BigQuery project id, a container path) are valid, and echoes this logical name back in the manifest.
281
281
  */
282
282
  'physicalTableName': string;
283
- 'realization': Realization;
284
283
  /**
285
- * Optional name of a storage destination to materialize INTO (the `storage=` authoring axis) — an entry in the environment\'s `storageDestinations`, which is a disjoint set from `connections`. Absent means build into the persist source\'s own warehouse — the default, unchanged (colocated) path. When present, the build runs a native per-engine query-passthrough CTAS on a build-scoped session for that destination (the source computes; only results cross), and the manifest records the destination + captured schema so the source can later be served cross-dialect from it. The name resolves generically against registered connections; any managed-tier alias is resolved by the host upstream and never reaches the publisher.
284
+ * Optional; absent means `COPY`, the only realization built. `SNAPSHOT` is refused.
285
+ */
286
+ 'realization'?: Realization;
287
+ /**
288
+ * Optional name of a storage destination to materialize INTO (the `storage=` authoring axis) — an entry in the environment\'s `storageDestinations`, which is a disjoint set from `connections`. Absent means build into the persist source\'s own warehouse — the default, unchanged (database) path. When present, the build runs a native per-engine query-passthrough CTAS on a build-scoped session for that destination (the source computes; only results cross), and the manifest records the destination + captured schema so the source can later be served cross-dialect from it. The name resolves generically against registered connections; any managed-tier alias is resolved by the host upstream and never reaches the publisher.
286
289
  */
287
290
  'destination'?: string;
288
291
  /**
@@ -324,7 +327,7 @@ export interface BuildManifest {
324
327
  [key: string]: ManifestEntry;
325
328
  };
326
329
  /**
327
- * Map of sourceEntityId to the reason that source failed to materialize, for the sources that did NOT build. A build that loses some of its sources still returns the ones that succeeded in `entries`, so this is how a consumer tells a partial failure from a clean run and learns which source failed. Empty or absent on a run where every source built.
330
+ * Map of sourceEntityId to the reason that source failed to materialize, for the sources that did NOT build. A build that loses some of its sources still returns the ones that succeeded in `entries`, so this is how a consumer tells a partial failure from a clean run and learns which source failed. Empty or absent on a run where every source built. Present on a FAILED run too, when every source it was asked to build failed or was refused: there it names each of them, and `entries` is empty.
328
331
  */
329
332
  'failures'?: {
330
333
  [key: string]: SourceFailure;
@@ -359,7 +362,7 @@ export interface BuildPlan {
359
362
  [key: string]: PersistSourcePlan;
360
363
  };
361
364
  /**
362
- * Map of sourceID (\"sourceName@modelURL\") to the sources the package declared `#@ persist` on but that are ineligible to build, so they carry no entry in `sources`. A SEPARATE collection rather than a field on `PersistSourcePlan`: constructing that plan entry requires the source\'s SQL and content address, and a free-parameter or given-referencing source cannot produce either, so a refused source needs a wire shape that requires neither. Lets a host distinguish \"this package declares no persist source\" (both maps empty) from \"every persist source was refused\" (empty `sources`, populated `refusedSources`) — silence otherwise reads as the former.
365
+ * Map of sourceID (\"sourceName@modelURL\") to every valid materialization declaration the package makes that is not built here: a `#@ persist` or `#(materialize)` source, a persisted view or named query, or a rollup (`#(rollup)` or `#@ preaggregate`). Each is answered live while the rest of the package loads, and each carries its `reason`. An invalid declaration is never here: it fails the publish and the load. A SEPARATE collection rather than a field on `PersistSourcePlan`: constructing that plan entry requires the source\'s SQL and content address, and a refused declaration may produce neither. Lets a host distinguish \"this package declares no materialization\" (both maps empty) from \"every declaration was refused\" (empty `sources`, populated `refusedSources`), which silence otherwise reads as the former. A persisted view or query is keyed by the generated build source it would have had (`<source>__<view>__view@…` or `<query>__query@…`), a `#(materialize)` source by its own sourceID, and a rollup measure refused before its rollup is planned by the measure\'s path on its base, its grain and its destination (`<base>.<measure>[<grain>]@<model>.preaggregate.malloy`, `[<grain> in <destination>]` for a `storage=` one).
363
366
  */
364
367
  'refusedSources'?: {
365
368
  [key: string]: RefusedSource;
@@ -450,7 +453,7 @@ export type CompileProblemSeverityEnum = typeof CompileProblemSeverityEnum[keyof
450
453
  */
451
454
  export interface CompileProblemAt {
452
455
  /**
453
- * URL of the source file
456
+ * The source file, never where the server keeps it: a package file\'s path relative to the package root, decoded (`sub dir/orders.malloy`). At scope `append` the problem points into a temporary compile-check overlay beside the model, `__compile_check.malloy` (`model` names the model it extends). A file outside the package reads `<outside package>`.
454
457
  */
455
458
  'url'?: string;
456
459
  /**
@@ -467,7 +470,7 @@ export interface CompileRequest {
467
470
  */
468
471
  'source'?: string;
469
472
  /**
470
- * What the source means, and how far the check reaches. \"append\" (default) appends the source to the model in the URL and compiles it in that namespace — right for NEW definitions; an edit to an existing definition collides (\"Cannot redefine\"), and diagnostic positions land in the concatenated virtual file. \"file\" compiles the source AS that model, replacing its on-disk content for the check — validates an edit before saving, at true file coordinates. \"package\" runs the same worker compiler and file selection as reload over every .malloy and .malloynb file, without swapping the result into the served package; with a source, importers compile against the replacement. It also reports the render-tag findings (code \"render-tag\") and the dashboard, given and drill findings (code \"dashboard-lint\") a reload would put on the package\'s warnings, at their own severity and with no position. The package\'s other warnings (storage, persist, materialization, explores, surface and discovery warnings, among others) are not reported. Package diagnostics can name files hidden from discovery. No rows or SQL are returned, and caller-provided source remains subject to authorize gates. includeSql is not available at \"package\". \"append\" text is checked against the model\'s PUBLISHED surface, so it may not declare its own data roots: import, connection.table(…), connection.sql(…), given:, ##! compiler flags and the raw-SQL function forms (name!type(…), sql_number, sql_string and the rest of that family) are refused with a 400. Those belong in a model file, so validate text declaring them at \"file\" or \"package\", which are not restricted. \"append\" text must also stand alone as top-level Malloy: a bare view:, dimension: or measure:, and anything that only parses as a continuation of the model\'s last statement, is refused with a 400, because the check reads the submitted text by itself. Wrap a view body in a top-level query:, or a field in a throwaway source: check is <source> extend { … }. Compiling at \"append\" also requires the model named in the URL to load: a model that does not compile is a 400 carrying that model\'s own problems, and a model that does not exist is a 400 that deliberately says only that it could not be loaded. An invalid scope value is rejected with a 400 naming the valid set. \"append\" text that carries a model-level `## artifact` tag is a document, which other viewers run, and is also refused with a 400 for `# image`, `# link`, markup in a `# label`, `@env.` in an annotation, an annotation the tag parser rejects or that exceeds 8,192 characters, `except:` or `rename:` followed by a declaration of the same name in the same extend chain, and more than 1,000 annotations or 64 KB of them. Plain \"append\" text without that tag keeps those tags; a model file defines them itself, and its edit is checked at \"file\".
473
+ * What the source means, and how far the check reaches. \"append\" (default) appends the source to the model in the URL and compiles it in that namespace — right for NEW definitions; an edit to an existing definition collides (\"Cannot redefine\"), and diagnostic positions land in the concatenated virtual file. \"file\" compiles the source AS that model, replacing its on-disk content for the check — validates an edit before saving, at true file coordinates. \"package\" runs the same worker compiler and file selection as reload over every .malloy and .malloynb file, without swapping the result into the served package; with a source, importers compile against the replacement. It also reports the render-tag findings (code \"render-tag\") and the dashboard, given and drill findings (code \"dashboard-lint\") a reload would put on the package\'s warnings, at their own severity and with no position, and the load\'s verdict on the materialization annotations: each line a load fails with as an error with its code, each annotation the load leaves unbuilt as a warning (\"file\" reports the same verdict when the file names a materialization route or the package plans a table). The package\'s other warnings (storage, bound tables, explores, surface and discovery warnings, among others) are not reported. Package diagnostics can name files hidden from discovery. No rows or SQL are returned, and caller-provided source remains subject to authorize gates. includeSql is not available at \"package\". \"append\" text is checked against the model\'s PUBLISHED surface, so it may not declare its own data roots: import, connection.table(…), connection.sql(…), given:, ##! compiler flags and the raw-SQL function forms (name!type(…), sql_number, sql_string and the rest of that family) are refused with a 400. Those belong in a model file, so validate text declaring them at \"file\" or \"package\", which are not restricted. \"append\" text must also stand alone as top-level Malloy: a bare view:, dimension: or measure:, and anything that only parses as a continuation of the model\'s last statement, is refused with a 400, because the check reads the submitted text by itself. Wrap a view body in a top-level query:, or a field in a throwaway source: check is <source> extend { … }. Compiling at \"append\" also requires the model named in the URL to load: a model that does not compile is a 400 carrying that model\'s own problems, and a model that does not exist is a 400 that deliberately says only that it could not be loaded. An invalid scope value is rejected with a 400 naming the valid set. \"append\" text that carries a model-level `## artifact` tag is a document, which other viewers run, and is also refused with a 400 for `# image`, `# link`, markup in a `# label`, `@env.` in an annotation, an annotation the tag parser rejects or that exceeds 8,192 characters, `except:` or `rename:` followed by a declaration of the same name in the same extend chain, and more than 1,000 annotations or 64 KB of them. Plain \"append\" text without that tag keeps those tags; a model file defines them itself, and its edit is checked at \"file\".
471
474
  */
472
475
  'scope'?: CompileRequestScopeEnum;
473
476
  /**
@@ -1385,7 +1388,7 @@ export interface LedgerEntry {
1385
1388
  */
1386
1389
  'physicalTableName': string;
1387
1390
  /**
1388
- * The storage destination the table lives in, when the source was materialized into one — an entry in `storageDestinations`, NOT a connection, exactly as on `ManifestEntry`. Absent means the table lives in `connectionName`\'s own warehouse. Part of the table\'s IDENTITY, not a description of it, so it must be returned verbatim like every other field here. A source keeps both its physical name and its content address when `storage=` is added or removed (an annotation enters neither), so without this field a boundary measured on the stored table is indistinguishable from one measured on a colocated table of the same name — and a delta computed from the wrong one can skip rows. A caller that has never recorded this field may omit it. An entry that omits it for a source this run materializes into a destination describes a different table, so that source SEEDS rather than being rejected: the entry is stale, not wrong, and a seed is always correct. An entry that names a DIFFERENT destination than the run instructs is a caller error and is rejected like any other mismatched entry.
1391
+ * The storage destination the table lives in, when the source was materialized into one — an entry in `storageDestinations`, NOT a connection, exactly as on `ManifestEntry`. Absent means the table lives in `connectionName`\'s own warehouse. Part of the table\'s IDENTITY, not a description of it, so it must be returned verbatim like every other field here. A source keeps both its physical name and its content address when `storage=` is added or removed (an annotation enters neither), so without this field a boundary measured on the stored table is indistinguishable from one measured on a database table of the same name — and a delta computed from the wrong one can skip rows. A caller that has never recorded this field may omit it. An entry that omits it for a source this run materializes into a destination describes a different table, so that source SEEDS rather than being rejected: the entry is stale, not wrong, and a seed is always correct. An entry that names a DIFFERENT destination than the run instructs is a caller error and is rejected like any other mismatched entry.
1389
1392
  */
1390
1393
  'storageDestinationName'?: string;
1391
1394
  /**
@@ -1469,7 +1472,7 @@ export interface ManifestEntry {
1469
1472
  */
1470
1473
  'sourceName'?: string;
1471
1474
  /**
1472
- * Mirrors `PersistSourcePlan.origin` for the source this entry was built from: `persist` for a source the modeler wrote `#@ persist` on, which is the meaning of an absent value, and `preaggregate` for a rollup synthesized from `#@ preaggregate` measures. Repeated here because a manifest travels without its build plan, and a consumer holding only the manifest otherwise cannot tell why it holds a table for a source that does not appear in the package.
1475
+ * Mirrors `PersistSourcePlan.origin` for the source this entry was built from: `persist` for a source the modeler wrote `#@ persist` on, which is the meaning of an absent value, and `rollup` for a rollup synthesized from `#(rollup)` or `#@ preaggregate` measures. `preaggregate`, what releases before this one wrote for a rollup, is retained, no longer produced, and still read as a rollup, since a host echoes the entries it stored. The plan\'s other values (`materialize`, `view`, `query`) are accepted; `persist` or an absent value stays valid for every entry that is not a rollup, since a host echoes the entries it stored, and Publisher reads only whether an entry is a rollup, taking the mechanism from its own plan. Repeated here because a manifest travels without its build plan, and a consumer holding only the manifest otherwise cannot tell why it holds a table for a source that does not appear in the package.
1473
1476
  */
1474
1477
  'origin'?: ManifestEntryOriginEnum;
1475
1478
  /**
@@ -1493,9 +1496,12 @@ export interface ManifestEntry {
1493
1496
  */
1494
1497
  'schema'?: Array<Column>;
1495
1498
  /**
1496
- * For a colocated entry (no `storageDestinationName`): each column of the built table with its type as the warehouse\'s own catalog names it (`bigint`, `numeric`, `NUMBER(38,0)`, `UHUGEINT`), captured after the build. The served copy reads a big-integer column through a cast to exactly this type, so a value past 2^53 comes back with every digit and no wider value is narrowed; a column whose type it does not know is answered live instead. Absent when the capture failed or the producer did not record it.
1499
+ * For a database entry (no `storageDestinationName`): each column of the built table with its type as the warehouse\'s own catalog names it (`bigint`, `numeric`, `NUMBER(38,0)`, `UHUGEINT`), captured after the build. The served copy reads a big-integer column through a cast to exactly this type, so a value past 2^53 comes back with every digit and no wider value is narrowed; a column whose type it does not know is answered live instead. Absent when the capture failed or the producer did not record it.
1497
1500
  */
1498
1501
  'nativeSchema'?: Array<Column>;
1502
+ /**
1503
+ * Retained; always `COPY`.
1504
+ */
1499
1505
  'realization'?: Realization;
1500
1506
  'rowCount'?: number | null;
1501
1507
  /**
@@ -1503,11 +1509,11 @@ export interface ManifestEntry {
1503
1509
  */
1504
1510
  'buildDurationMs'?: number | null;
1505
1511
  /**
1506
- * Warehouse bytes SCANNED by the read that produced this table — the recurring cost of keeping the source materialized, and the debit against whatever materializing it saves on the read side. Bytes scanned, never bytes billed. The two differ by up to BigQuery\'s 10MB-per-query floor, and materialization refreshes are mostly small reads, so a field carrying one on some paths and the other elsewhere would be unsummable across a package\'s sources. **Null is not zero**, and which paths report a figure differs. A COLOCATED build reports one, taken from the Malloy connection\'s own statistics. A plain `storage=` build reports one when its warehouse read carried query metadata, and null otherwise. That read goes through DuckDB\'s query-passthrough rather than a Malloy connector, so the figure is read back from the warehouse\'s own accounting afterwards — which needs an identifier for the job, and obtaining one is part of how a TAGGED read is issued. An untagged read is issued the older way, which yields no such identifier, and reports null. A read whose connection cannot reach its own job records also reports null; that case is counted by `publisher_storage_build_attribution_skipped_total`. A COLOCATED incremental delta reports null because its statements do not run through a single call whose result reaches here. A delta into a `storage=` destination reports whatever its own bounded read reported: that read is issued through the same call a full build\'s is, so a tagged one is costed and an untagged one is not. A SNOWFLAKE source reports null on a delta even though its full build reports a figure — Snowflake does not return one with the read, so the full build looks it up afterwards by matching the statement text, and a delta\'s text is the bounded, projected wrapper rather than the build SQL that lookup keys on. Summing this field across refreshes therefore understates a Snowflake source; it does not mean those reads were free. A chained `storage=` build reports null because it read its parent\'s already-materialized table and touched no warehouse at all. A POSTGRES source reports null on every path: the label that makes a read reportable is BigQuery\'s, and Postgres has no per-statement tag to carry one. And a bag whose every property is unusable as a BigQuery label key renders no label, so such a read is issued the untagged way and reports null too.
1512
+ * Warehouse bytes SCANNED by the read that produced this table — the recurring cost of keeping the source materialized, and the debit against whatever materializing it saves on the read side. Bytes scanned, never bytes billed. The two differ by up to BigQuery\'s 10MB-per-query floor, and materialization refreshes are mostly small reads, so a field carrying one on some paths and the other elsewhere would be unsummable across a package\'s sources. **Null is not zero**, and which paths report a figure differs. A DATABASE build reports one, taken from the Malloy connection\'s own statistics. A plain `storage=` build reports one when its warehouse read carried query metadata, and null otherwise. That read goes through DuckDB\'s query-passthrough rather than a Malloy connector, so the figure is read back from the warehouse\'s own accounting afterwards — which needs an identifier for the job, and obtaining one is part of how a TAGGED read is issued. An untagged read is issued the older way, which yields no such identifier, and reports null. A read whose connection cannot reach its own job records also reports null; that case is counted by `publisher_storage_build_attribution_skipped_total`. A DATABASE incremental delta reports null because its statements do not run through a single call whose result reaches here. A delta into a `storage=` destination reports whatever its own bounded read reported: that read is issued through the same call a full build\'s is, so a tagged one is costed and an untagged one is not. A SNOWFLAKE source reports null on a delta even though its full build reports a figure — Snowflake does not return one with the read, so the full build looks it up afterwards by matching the statement text, and a delta\'s text is the bounded, projected wrapper rather than the build SQL that lookup keys on. Summing this field across refreshes therefore understates a Snowflake source; it does not mean those reads were free. A chained `storage=` build reports null because it read its parent\'s already-materialized table and touched no warehouse at all. A POSTGRES source reports null on every path: the label that makes a read reportable is BigQuery\'s, and Postgres has no per-statement tag to carry one. And a bag whose every property is unusable as a BigQuery label key renders no label, so such a read is issued the untagged way and reports null too.
1507
1513
  */
1508
1514
  'queryCostBytes'?: number | null;
1509
1515
  /**
1510
- * For a source that reads another persisted source, how this table\'s rows were computed from it. `reused`: every persisted upstream was read from its already-materialized table, so the rows are a function of those snapshots and consistent with them. `recomputed`: at least one persisted upstream was recomputed from its definition and inlined into this build, because its table could not be read -- on either tier, an upstream this build neither materialized nor was handed by reference; for a colocated build, an upstream that landed in a `storage=` destination; for a `storage=` build, a source that reaches the warehouse through a non-persisted source, or whose shape does not compile in the destination. `upstreamRecomputeReason` says which. Such a table reflects the warehouse at THIS build\'s time rather than the upstream\'s snapshot, so the two can disagree when their refresh cadences differ. Not a location: it does not name the table the rows came from. Absent for a source that reads no persisted upstream, which has one way to build and no choice to report.
1516
+ * For a source that reads another persisted source, how this table\'s rows were computed from it. `reused`: every persisted upstream was read from its already-materialized table, so the rows are a function of those snapshots and consistent with them. `recomputed`: at least one persisted upstream was recomputed from its definition and inlined into this build, because its table could not be read -- on either tier, an upstream this build neither materialized nor was handed by reference; for a database build, an upstream that landed in a `storage=` destination; for a `storage=` build, a source that reaches the warehouse through a non-persisted source, or whose shape does not compile in the destination. `upstreamRecomputeReason` says which. Such a table reflects the warehouse at THIS build\'s time rather than the upstream\'s snapshot, so the two can disagree when their refresh cadences differ. Not a location: it does not name the table the rows came from. Absent for a source that reads no persisted upstream, which has one way to build and no choice to report.
1511
1517
  */
1512
1518
  'upstreamReuse'?: ManifestEntryUpstreamReuseEnum;
1513
1519
  /**
@@ -1537,6 +1543,10 @@ export interface ManifestEntry {
1537
1543
  }
1538
1544
  export declare const ManifestEntryOriginEnum: {
1539
1545
  readonly Persist: "persist";
1546
+ readonly Materialize: "materialize";
1547
+ readonly View: "view";
1548
+ readonly Query: "query";
1549
+ readonly Rollup: "rollup";
1540
1550
  readonly Preaggregate: "preaggregate";
1541
1551
  };
1542
1552
  export type ManifestEntryOriginEnum = typeof ManifestEntryOriginEnum[keyof typeof ManifestEntryOriginEnum];
@@ -1574,7 +1584,7 @@ export interface ManifestReference {
1574
1584
  */
1575
1585
  'connectionName'?: string;
1576
1586
  /**
1577
- * The storage destination the upstream table lives in, for a table a `storage=` build wrote; omit it for a table in the source\'s own warehouse. A stored table\'s `connectionName` is the source\'s warehouse connection, so without this field a reference to a stored table reads as a warehouse table. The publisher uses a reference as an upstream only where this agrees with where the upstream source is declared now (a source that moved to or from `storage=` keeps its content address): a stored upstream is stacked on in its destination, and never rendered into warehouse SQL. Optional and additive: a reference without it still serves a colocated upstream.
1587
+ * The storage destination the upstream table lives in, for a table a `storage=` build wrote; omit it for a table in the source\'s own warehouse. A stored table\'s `connectionName` is the source\'s warehouse connection, so without this field a reference to a stored table reads as a warehouse table. The publisher uses a reference as an upstream only where this agrees with where the upstream source is declared now (a source that moved to or from `storage=` keeps its content address): a stored upstream is stacked on in its destination, and never rendered into warehouse SQL. Optional and additive: a reference without it still serves a database upstream.
1578
1588
  */
1579
1589
  'storageDestinationName'?: string;
1580
1590
  }
@@ -1587,7 +1597,7 @@ export interface Materialization {
1587
1597
  'packageName'?: string;
1588
1598
  'status'?: MaterializationStatus;
1589
1599
  /**
1590
- * Build output. Null until status = MANIFEST_FILE_READY.
1600
+ * Build output. Null until the tables are built (status MANIFEST_ROWS_READY), and on a run that failed or was cancelled before then, with one exception: a run that FAILED because every source it was asked to build failed or was refused carries a manifest whose `failures` holds each such source\'s own reason and `retryable`, keyed by sourceEntityId, and whose `entries` is empty. A run interrupted at MANIFEST_ROWS_READY (the server stopped while it loaded its manifest) ends FAILED with its manifest. Publisher never serves or binds a FAILED run\'s manifest; a host may still bind the sources it reused, from its own records. Such a manifest has no `builtAt`, since nothing was built; the run\'s `completedAt` says when it ended.
1591
1601
  */
1592
1602
  'manifest'?: BuildManifest | null;
1593
1603
  'startedAt'?: string | null;
@@ -1596,15 +1606,54 @@ export interface Materialization {
1596
1606
  * Error message if the materialization failed
1597
1607
  */
1598
1608
  'error'?: string | null;
1599
- /**
1600
- * Materialization metadata including build options, source counts, and durations. Free-form object — fields such as `trigger` (ON_DEMAND | SCHEDULER) live here deliberately, so a strict-schema client does not need to know them. Promoting any such field to a top-level `Materialization` property is a breaking schema change that orchestrated clients must adopt first; do not do it casually. `errorRetryable` (boolean) is set on a FAILED run that built nothing, which commits no manifest and so reports no per-source `failures`: `false` when every source failed deterministically or was refused, `true` when any failure was transient, with the same rules as `SourceFailure.retryable`. Absent when unclassified, for a cancelled run, and from a Publisher that predates it. `errorAtCancel` (string) is set on a CANCELLED run whose last error was not the cancellation itself: the message of the failure the cancel raced, which `error` reports only as \"Cancelled\".
1601
- */
1602
- 'metadata'?: object | null;
1609
+ 'metadata'?: MaterializationMetadata | null;
1603
1610
  'createdAt'?: string;
1604
1611
  'updatedAt'?: string;
1605
1612
  }
1606
1613
  /**
1607
- * Phase-aware status of a materialization run.
1614
+ * Materialization metadata including build options, source counts, and durations. Free-form object — fields such as `trigger` (`on_demand` | `scheduler`, the words `RunContext.trigger` uses; releases before this one wrote `ON_DEMAND` | `SCHEDULER`, which a reader of older runs must still accept) live here deliberately, so a strict-schema client does not need to know them. Promoting any such field to a top-level `Materialization` property is a breaking schema change that orchestrated clients must adopt first; do not do it casually. `errorRetryable` (boolean) is set on a FAILED run that built nothing, the whole run\'s answer beside each source\'s own in `manifest.failures`: `false` when every source failed deterministically or was refused, `true` when any failure was transient, with the same rules as `SourceFailure.retryable`. Absent when unclassified, for a cancelled run, and from a Publisher that predates it. `errorAtCancel` (string) is set on a CANCELLED run whose last error was not the cancellation itself: the message of the failure the cancel raced, which `error` reports only as \"Cancelled\". `keptTables` (array) is set on an auto-run that lists the tables a rename or move left and Publisher keeps rather than drops (see the `table-kept` warning).
1615
+ */
1616
+ export interface MaterializationMetadata {
1617
+ [key: string]: any;
1618
+ /**
1619
+ * Tables an auto-run replaced and Publisher keeps, carried forward by later runs until no committed run names the table in its place, the name is built again in its own place, or a run finds the table gone. An older server leaves out an entry whose `reason` it does not know.
1620
+ */
1621
+ 'keptTables'?: Array<MaterializationMetadataKeptTablesInner>;
1622
+ }
1623
+ export interface MaterializationMetadataKeptTablesInner {
1624
+ /**
1625
+ * The source the table was built for.
1626
+ */
1627
+ 'sourceEntityId': string;
1628
+ /**
1629
+ * The source\'s name, when the run recorded it.
1630
+ */
1631
+ 'sourceName'?: string;
1632
+ /**
1633
+ * The kept table, as the run that built it wrote it.
1634
+ */
1635
+ 'physicalTableName': string;
1636
+ /**
1637
+ * The source\'s connection.
1638
+ */
1639
+ 'connectionName': string;
1640
+ /**
1641
+ * The storage destination holding the table; absent for a table in the connection\'s own database.
1642
+ */
1643
+ 'storageDestinationName'?: string;
1644
+ /**
1645
+ * `author_name`: at an author\'s exact `name=`, which Publisher never drops. `destination_missing`: in a storage destination no longer configured, which Publisher cannot reach. `may_be_served`: under the table segment the source is served under now, in another place or container, so it may be the very table served, and is never dropped.
1646
+ */
1647
+ 'reason': MaterializationMetadataKeptTablesInnerReasonEnum;
1648
+ }
1649
+ export declare const MaterializationMetadataKeptTablesInnerReasonEnum: {
1650
+ readonly AuthorName: "author_name";
1651
+ readonly DestinationMissing: "destination_missing";
1652
+ readonly MayBeServed: "may_be_served";
1653
+ };
1654
+ export type MaterializationMetadataKeptTablesInnerReasonEnum = typeof MaterializationMetadataKeptTablesInnerReasonEnum[keyof typeof MaterializationMetadataKeptTablesInnerReasonEnum];
1655
+ /**
1656
+ * Phase-aware status of a materialization run. `MANIFEST_ROWS_READY`: the tables are built and the manifest is recorded. `MANIFEST_FILE_READY`: the run is done; an auto-run reaches it only after its manifest is loaded into the package it built, so a query sent after it is answered from the new tables (`metadata.autoLoad` is `loaded`). When that load does not take, the run still reaches `MANIFEST_FILE_READY`, since its tables were built, with `metadata.autoLoad` `failed`, `metadata.autoLoadStep` (`reload`, `bind` or `timeout`), `metadata.autoLoadError`, and `error` set; the package\'s next reload or restart binds the run\'s manifest. An orchestrated run never loads its manifest, so for it `MANIFEST_FILE_READY` means built.
1608
1657
  */
1609
1658
  export declare const MaterializationStatus: {
1610
1659
  readonly Pending: "PENDING";
@@ -1694,7 +1743,11 @@ export interface ModelError {
1694
1743
  */
1695
1744
  'details'?: string;
1696
1745
  /**
1697
- * Machine-readable discriminator, for callers that must branch on which error they got rather than on prose. Absent unless a caller is expected to act on it, so treat absence as \"no special handling\". TABLE_NOT_FOUND distinguishes a table that is not in the database from the other conditions that also answer 404 on these routes -- an environment or connection this server does not host. The former says nothing about whether the caller reached the right server; the latter is a routing problem worth retrying elsewhere. CONNECTION_FAILED, on a 502, means the database could not be reached (the connection was refused, reset or timed out, or the server closed it), so the query never ran. The query and the model are fine; retrying elsewhere will not help, and neither will rewriting the query. CONNECTION_AUTH_FAILED, on a 424, means the database rejected the connection\'s credentials (a wrong password, an invalid key, an expired token), so the query never ran. Whoever configures the connection has to fix it; retrying fails the same way. CONNECTION_NOT_FOUND, on a 424, means the model names a connection the environment does not have, usually one deleted after the package was loaded. Deliberately an open string rather than an enum. Generators render an enum closed, so adding a second value here would break every client generated before it -- on the one field whose purpose is to grow. Callers must treat an unrecognized value as absent. The package-version values let a caller tell \"forgot to bump the version\" from \"the model is broken\", which share a status code: * MANIFEST_VERSION_MISSING (400): with package versioning on, a publish whose publisher.json has no `version`. * MANIFEST_VERSION_INVALID (400): such a publish whose `version` is not a semantic version. * VERSION_CONFLICT (409): that version is already published with different content. * PACKAGE_IS_VERSIONED (409): the package has published versions, so it cannot be changed in place (a write, or a publish with package versioning off). * PACKAGE_INSTALLED_FROM_LOCATION (409): the package is fetched again from a `location` on reload, which would discard a report write or a package update\'s change to its settings. * FILE_EXISTS (409): a report write with no `expectedHash` (a create) found a file already at the path; another path may be free. A stale `expectedHash` answers 409 with no `reason`. * VERSION_IS_LATEST (409): the package\'s `latest` version cannot be archived, or deleted while other versions remain. * VERSION_IS_LAST_ACTIVE (409): the package\'s last version in service cannot be archived, or deleted while archived versions remain. * VERSION_BUILDING (409): a materialization of the version is running, so it cannot be archived or deleted yet. * VERSION_ID_INVALID (400): a requested `versionId` is not a semantic version. * VERSION_NOT_LATEST (400): an auto-run of a version other than `latest`, in a package whose versions share their tables. A package with no `latest` yet refuses none. * VERSION_NOT_FOUND (404): the package has no such version. * VERSION_ARCHIVED (410): the version is archived. Known values: TABLE_NOT_FOUND, CONNECTION_FAILED, CONNECTION_AUTH_FAILED, CONNECTION_NOT_FOUND, MANIFEST_VERSION_MISSING, MANIFEST_VERSION_INVALID, VERSION_CONFLICT, PACKAGE_IS_VERSIONED, PACKAGE_INSTALLED_FROM_LOCATION, FILE_EXISTS, VERSION_IS_LATEST, VERSION_IS_LAST_ACTIVE, VERSION_BUILDING, VERSION_ID_INVALID, VERSION_NOT_LATEST, VERSION_NOT_FOUND, VERSION_ARCHIVED.
1746
+ * With `reason: MATERIALIZATION_REFUSED`: the refusal\'s bounded reason, from the same open set as `RefusedSource.reason`. Absent otherwise.
1747
+ */
1748
+ 'refusalReason'?: string;
1749
+ /**
1750
+ * Machine-readable discriminator, for callers that must branch on which error they got rather than on prose. Absent unless a caller is expected to act on it, so treat absence as \"no special handling\". TABLE_NOT_FOUND distinguishes a table that is not in the database from the other conditions that also answer 404 on these routes -- an environment or connection this server does not host. The former says nothing about whether the caller reached the right server; the latter is a routing problem worth retrying elsewhere. CONNECTION_FAILED, on a 502, means the database could not be reached (the connection was refused, reset or timed out, or the server closed it), so the query never ran. The query and the model are fine; retrying elsewhere will not help, and neither will rewriting the query. CONNECTION_AUTH_FAILED, on a 424, means the database rejected the connection\'s credentials (a wrong password, an invalid key, an expired token), so the query never ran. Whoever configures the connection has to fix it; retrying fails the same way. CONNECTION_NOT_FOUND, on a 424, means the model names a connection the environment does not have, usually one deleted after the package was loaded. STORAGE_ACCESS_DENIED, on a 403, means an object store refused the database\'s read under a data path the environment configures (a DuckLake catalog\'s, a storage destination\'s): the query and the model are fine, and whoever configures the database\'s storage credentials has to fix it. PATH_ACCESS_DENIED, on a 403, means the object store at a path the query or the model reads itself (a file or table URL) refused access: change the path, or get the caller a grant to it. Retrying either fails the same way. The body names the source or connection the caller read and no storage path. ACCESS_DENIED, on a 403, means a gate (`#(authorize)` or `#(access_filter)`) refused the caller. Every gate 403 carries it, including a gate that could not be decided, which fails closed and answers the same: only the server\'s metrics and log tell those apart. A 403 with any other reason is not a gate\'s. MATERIALIZATION_REFUSED, on a 422, means a valid materialization declaration this server will not build. The body\'s `refusalReason` is the refusal\'s `RefusedSource.reason`. TABLE_OWNED_ELSEWHERE and TABLE_OWNERSHIP_UNVERIFIED, on a 400, mean a build was refused before it wrote because its `name=` is held by a table this package does not own, or because who holds it could not be read. BUILD_INSTRUCTIONS_INVALID, on a 400 from creating a materialization, means its body or build instructions are not a run this package can take (a field of the wrong shape, an unknown source, a table named twice, a ledger entry that does not fit); the message names which. Retrying unchanged fails the same way. MATERIALIZATION_CONFLICT, on a 409, means a materialization run conflicts with another run or with the package\'s binding. Two of its cases clear on their own, so retry later: a run already active for the package, and a table another run is writing. Two do not clear until something changes, so a retry fails the same way: an auto-run of a package or version a host manifest serves (pass `buildInstructions`, or clear the binding), and a run of a version that is not latest touching the tables a `scope: package` package\'s versions share (name tables of its own in `buildInstructions`). The message says which. Deliberately an open string rather than an enum. Generators render an enum closed, so adding a second value here would break every client generated before it -- on the one field whose purpose is to grow. Callers must treat an unrecognized value as absent. The package-version values let a caller tell \"forgot to bump the version\" from \"the model is broken\", which share a status code: * MANIFEST_VERSION_MISSING (400): with package versioning on, a publish whose publisher.json has no `version`. * MANIFEST_VERSION_INVALID (400): such a publish whose `version` is not a semantic version. * VERSION_CONFLICT (409): that version is already published with different content. * PACKAGE_IS_VERSIONED (409): the package has published versions, so it cannot be changed in place (a write, or a publish with package versioning off). * PACKAGE_INSTALLED_FROM_LOCATION (409): the package is fetched again from a `location` on reload, which would discard a report write or a package update\'s change to its settings. * FILE_EXISTS (409): a report write with no `expectedHash` (a create) found a file already at the path; another path may be free. A stale `expectedHash` answers 409 with no `reason`. * VERSION_IS_LATEST (409): the package\'s `latest` version cannot be archived, or deleted while other versions remain. * VERSION_IS_LAST_ACTIVE (409): the package\'s last version in service cannot be archived, or deleted while archived versions remain. * VERSION_BUILDING (409): a materialization of the version is running, so it cannot be archived or deleted yet. * VERSION_ID_INVALID (400): a requested `versionId` is not a semantic version. * VERSION_NOT_LATEST (400): an auto-run of a version other than `latest`, in a package whose versions share their tables. A package with no `latest` yet refuses none. * VERSION_NOT_FOUND (404): the package has no such version. * VERSION_ARCHIVED (410): the version is archived. Known values: TABLE_NOT_FOUND, CONNECTION_FAILED, CONNECTION_AUTH_FAILED, CONNECTION_NOT_FOUND, STORAGE_ACCESS_DENIED, PATH_ACCESS_DENIED, ACCESS_DENIED, MATERIALIZATION_REFUSED, TABLE_OWNED_ELSEWHERE, TABLE_OWNERSHIP_UNVERIFIED, BUILD_INSTRUCTIONS_INVALID, MATERIALIZATION_CONFLICT, MANIFEST_VERSION_MISSING, MANIFEST_VERSION_INVALID, VERSION_CONFLICT, PACKAGE_IS_VERSIONED, PACKAGE_INSTALLED_FROM_LOCATION, FILE_EXISTS, VERSION_IS_LATEST, VERSION_IS_LAST_ACTIVE, VERSION_BUILDING, VERSION_ID_INVALID, VERSION_NOT_LATEST, VERSION_NOT_FOUND, VERSION_ARCHIVED.
1698
1751
  */
1699
1752
  'reason'?: string;
1700
1753
  /**
@@ -1933,7 +1986,7 @@ export interface OmittedSource {
1933
1986
  */
1934
1987
  'sourceID': string;
1935
1988
  /**
1936
- * Why the source was left out, as a code. An OPEN set: a client must accept a code it does not know (read it as a failure) rather than reject the plan. Today\'s codes: `unkeyable` (Malloy could not key the source\'s build: an unbound parameter or a given with no value); `eligibility_check_failed` (an eligibility gate failed with an error rather than a refusal); `projection_failed` (the plan entry could not otherwise be computed); `rollup_companion_failed` (the generated `#(preaggregate)` rollup companion, which also plans v1 `#@ preaggregate` rollups, did not plan or compile); `rollup_companion_blanking_failed` (that companion was not built because a `#@` line of the author\'s files could not be set aside); `materialize_companion_failed` (the generated `#(materialize)` companion did not plan or compile); `persisted_view_companion_failed` (the persisted-view companion did not plan or compile); `v1_build_companion_failed` (the build copy of a model file without `##! experimental.persistence` did not compile, so none of its `#@ persist` sources were planned); `persist_annotation_unparseable` (none of the source\'s `#@` lines parse, so Malloy planned nothing for it; the package warning names the line).
1989
+ * Why the source was left out, as a code. An OPEN set: a client must accept a code it does not know (read it as a failure) rather than reject the plan. Today\'s codes: `unkeyable` (Malloy could not key the source\'s build: an unbound parameter or a given with no value); `eligibility_check_failed` (an eligibility gate failed with an error rather than a refusal); `projection_failed` (the plan entry could not otherwise be computed); `rollup_companion_failed` (the generated `#(rollup)` rollup companion, which also plans v1 `#@ preaggregate` rollups, did not plan or compile); `rollup_companion_blanking_failed` (that companion was not built because a `#@` line of the author\'s files could not be set aside); `materialize_companion_failed` (the generated `#(materialize)` companion did not plan or compile); `persisted_view_companion_failed` (the persisted-view companion did not plan or compile); `v1_build_companion_failed` (the build copy of a model file without `##! experimental.persistence` did not compile, so none of its `#@ persist` sources were planned); `persist_annotation_unparseable` is retained and no longer produced: a `#@` line that does not parse is an invalid annotation (`persist-unparseable`), which fails the publish and the load, so no served plan carries it.
1937
1990
  */
1938
1991
  'reason': string;
1939
1992
  }
@@ -2002,7 +2055,7 @@ export interface Package {
2002
2055
  */
2003
2056
  'exploresWarnings'?: Array<string>;
2004
2057
  /**
2005
- * Non-fatal findings collected when the package loaded, none of which stop the model compiling or the package loading. Render-tag findings: a render annotation (e.g. `# big_value`, `# currency` or `# colspan`) the renderer cannot apply as written, either malformed for the field it sits on, so it renders as \"[object Object]\" or an inline error at query time, or inert where it sits and silently ignored. Materialization findings: a `storage=` source not served from storage, a `#@ persist` source that was not recognized as materializable, a `#@ persist` REFUSED by the compile-time eligibility gate (one entry per `BuildPlan.refusedSources` member, carrying that gate\'s own message), a persist-target collision, and materialization-config problems that degrade attribution. A refusal is the one materialization finding the build plan cannot also be read for: a refused `storage`/`colocated` source is ABSENT from `BuildPlan.sources`, so nothing there records that the annotation was written at all. Discovery findings: a model on the package\'s surface whose export closure surfaces no sources or named queries, so it lists as empty and renders a blank page; a surface whose every model failed to compile, so every model in the package answers 404 by name; and, on the reload that caused it, a package that had a surface and now has none, so every source that surface hid is listed and queryable by name again. Manifest findings: each deprecated use of `explores` or of `queryableSources: \"declared\"`, and a root file such as `Index.malloy` that differs from `index.malloy` only in case and so is ignored. A root `index.malloy` with no manifest keys gets no warning. Report findings (one lint pass per report, of either layout, wherever it lives): a file whose artifact tag does not parse or does not describe a report, a tile or suggest query that does not resolve, a `# drill` naming a destination that is not a report, and a tile, single query or filter suggest that reads a source the surface does not export, so it won\'t load. A `# drill` destination is a path from the package root (a bare name is a file at the root); one that names no report is unresolved (`error`). Curation findings: a root `index.malloy` carrying an artifact tag, which is ignored (`index-is-not-a-report`, `error`); and a report that `index.malloy` imports or `explores` lists (`report-on-surface`, `warn`). Two report findings are about Publisher rather than about the package: one when a file carrying an artifact tag could not be read and so is not served at all, and one when the lint stops early, in which case the list must be read as incomplete rather than as a clean package. A linear report whose cells could not be read gets a finding that names the line and the fix and is reported with severity `error`, because it is served with that error instead of opening. The per-file report findings each name their line and the fix and carry a `code`; they are computed at discovery and are also returned by `/compile` at file and package scope. These codes are `error` and fail `/compile`: `notebook-markdown-opener-text` (more than a name after `(markdown)` on a block\'s opener), `notebook-markdown-attached-nowhere` (a `#(markdown)` annotation with no statement to take it), `notebook-artifact-unparsed` (an `## artifact` tag does not parse), and `notebook-cells-unreadable` (the reader could not read a linear report\'s cells), plus `report-kind-removed` (a tag that sets `kind=`, which is no longer read, so the file is not a report; the finding names the `layout=` to write), `report-cells-removed` (a linear tag that lists no `tiles`, the retired `run:` cell format, so the file is not a report; the fix is to list its tiles in `tiles=[…]`) and `report-layout-unknown` (a `layout=` other than `grid` or `linear`). The rest are `warn` (a mistyped `(markdown)` opener, a block that never closes, and similar). Skill and agent findings, all `warn`: a package skill under `skills/` that is not served (unreadable or linked-out `SKILL.md`, a frontmatter `name` that is not its directory name, a `skills/` directory that links out of the package) or served with a gap (no `description`, a `reference/` that cannot be listed or read); and each agent the manifest declares that is not served, or is served with a finding (an agent skill with no `description`, a skills directory with no skills, an unreadable reference). Deprecated-format findings, all `warn`: each `.malloynb` notebook (`model` is its path), and each source a file declares deprecated `#(filter)` annotations on (`model` is that file, `subject` the source; a source that only inherits or imports a filter is not reported). Both still load and run. Server-computed and read-only: ignored on create/update requests and only returned in responses. Present only when there are such findings. **Almost every `#@ preaggregate` that cannot be honored REJECTS A PUBLISH — a 400 at publish or PATCH — and fails a load thereafter.** The two access-modifier violations are the exception: they warn at BOTH gates and appear in this array. See the split below. Rejected are a `#@ preaggregate` anywhere but on a measure; a `#@ preaggregate` with no `grain=`; a grain naming anything but a dimension the base source itself declares, which rules out an inline time truncation such as `order_time.day`; a measure that cannot be correctly re-aggregated to a coarser grain, whether because its aggregate has no exact merge function (`count(distinct)`, `median`, percentiles, `mode`, and `avg` until it is decomposed) or because it carries its own filter, an ungrouping (`all`, `exclude`), or a required group-by; a measure whose expression cannot be POSITIVELY classified as re-aggregatable, which fails closed rather than being guessed at; a base source with a FAN-OUT join (`join_many` or `join_cross`), which can multiply rows, while a `join_one` is permitted and a measure aggregating through one is served normally; a base source that already fails persist eligibility (unbound parameters, `given` references, authorize gates); `sharing=` or `schedule=` at the resource level; and a synthesized rollup name that collides with an existing model object. WARNED rather than rejected, at publish and at load alike, is a `#@ preaggregate` on a measure the source does not publicly expose, or a grain naming a hidden dimension — a rollup STORES its grain and each measure\'s partial, and the stored table is served under the base\'s name without the source\'s field visibility applying to it. Each names the measure and the fix. Refusing rather than silently dropping the measure is the deliberate choice. A dropped measure is not served from the rollup at ANY grain, so the declaration would have no effect whatsoever while still reading as applied — and the build cost of the rollup would still be paid. An author who writes `#@ preaggregate` on a measure that cannot be rolled up has made a modeling mistake, and an error is where a mistake belongs. The same verdict is enforced at LOAD for every violation EXCEPT the two access-modifier ones, so a package whose declarations stopped being honorable does not load at all: it is absent from its environment and reported in `ServerStatus.loadErrors`. Worth knowing because whether a measure can be re-aggregated is derived from the compiled model, so a Malloy version change can in principle reclassify a measure that published cleanly long before. That surfaces as a package that stops loading rather than as a package quietly serving without its rollups — louder, and deliberately so, since the alternative is paying for rollups that answer nothing. The two access-modifier violations are the deliberate exception, and for two reasons rather than a lesser severity. They WARN at publish and at load alike and appear in this array. First, a package annotating a hidden field published and loaded before this rule existed — refusing it would stop an already-published package from doing either because a new validation was added, which is not a thing a server upgrade may do. Second, the refusal was unfollowable: an annotation INHERITED onto a source that then hides the measure raises it, while that source produces no plan at all and nothing is exposed, so the advice to make the field public or drop the annotation asks an author to give up either the hiding or the rollup over a model that was already safe. Warning is safe here and would not be for the others: what keeps a hidden field out of a rollup is that the planner refuses to plan one at all, so no table is built and nothing can be served whether or not anyone reads the message. For the other violations the refusal IS the enforcement, which is why they stay fatal.
2058
+ * Non-fatal findings collected when the package loaded, none of which stop the model compiling or the package loading. Render-tag findings: a render annotation (e.g. `# big_value`, `# currency` or `# colspan`) the renderer cannot apply as written, either malformed for the field it sits on, so it renders as \"[object Object]\" or an inline error at query time, or inert where it sits and silently ignored. Materialization findings: a `storage=` source not served from storage, a `#@ persist` source that was not recognized as materializable, a `#@ persist` REFUSED by the compile-time eligibility gate (one entry per `BuildPlan.refusedSources` member, carrying that gate\'s own message), a persist-target collision, and materialization-config problems that degrade attribution. A refusal is the one materialization finding the build plan cannot also be read for: a refused `storage`/`database` source is ABSENT from `BuildPlan.sources`, so nothing there records that the annotation was written at all. Discovery findings: a model on the package\'s surface whose export closure surfaces no sources or named queries, so it lists as empty and renders a blank page; a surface whose every model failed to compile, so every model in the package answers 404 by name; and, on the reload that caused it, a package that had a surface and now has none, so every source that surface hid is listed and queryable by name again. Manifest findings: each deprecated use of `explores` or of `queryableSources: \"declared\"`, and a root file such as `Index.malloy` that differs from `index.malloy` only in case and so is ignored. A root `index.malloy` with no manifest keys gets no warning. Report findings (one lint pass per report, of either layout, wherever it lives): a file whose artifact tag does not parse or does not describe a report, a tile or suggest query that does not resolve, a `# drill` naming a destination that is not a report, and a tile, single query or filter suggest that reads a source the surface does not export, so it won\'t load. A `# drill` destination is a path from the package root (a bare name is a file at the root); one that names no report is unresolved (`error`). Curation findings: a root `index.malloy` carrying an artifact tag, which is ignored (`index-is-not-a-report`, `error`); and a report that `index.malloy` imports or `explores` lists (`report-on-surface`, `warn`). Two report findings are about Publisher rather than about the package: one when a file carrying an artifact tag could not be read and so is not served at all, and one when the lint stops early, in which case the list must be read as incomplete rather than as a clean package. A linear report whose cells could not be read gets a finding that names the line and the fix and is reported with severity `error`, because it is served with that error instead of opening. The per-file report findings each name their line and the fix and carry a `code`; they are computed at discovery and are also returned by `/compile` at file and package scope. These codes are `error` and fail `/compile`: `notebook-markdown-opener-text` (more than a name after `(markdown)` on a block\'s opener), `notebook-markdown-attached-nowhere` (a `#(markdown)` annotation with no statement to take it), `notebook-artifact-unparsed` (an `## artifact` tag does not parse), and `notebook-cells-unreadable` (the reader could not read a linear report\'s cells), plus `report-kind-removed` (a tag that sets `kind=`, which is no longer read, so the file is not a report; the finding names the `layout=` to write), `report-cells-removed` (a linear tag that lists no `tiles`, the retired `run:` cell format, so the file is not a report; the fix is to list its tiles in `tiles=[…]`) and `report-layout-unknown` (a `layout=` other than `grid` or `linear`). The rest are `warn` (a mistyped `(markdown)` opener, a block that never closes, and similar). Skill and agent findings, all `warn`: a package skill under `skills/` that is not served (unreadable or linked-out `SKILL.md`, a frontmatter `name` that is not its directory name, a `skills/` directory that links out of the package) or served with a gap (no `description`, a `reference/` that cannot be listed or read); and each agent the manifest declares that is not served, or is served with a finding (an agent skill with no `description`, a skills directory with no skills, an unreadable reference). Deprecated-format findings, all `warn`: each `.malloynb` notebook (`model` is its path), and each source a file declares deprecated `#(filter)` annotations on (`model` is that file, `subject` the source; a source that only inherits or imports a filter is not reported). Both still load and run. Server-computed and read-only: ignored on create/update requests and only returned in responses. Present only when there are such findings. **Almost every `#@ preaggregate` that cannot be honored REJECTS A PUBLISH — a 400 at publish or PATCH — and fails a load thereafter.** The two access-modifier violations are the exception: they warn at BOTH gates and appear in this array. See the split below. Rejected are a `#@ preaggregate` anywhere but on a measure; a `#@ preaggregate` with no `grain=`; a grain naming anything but a dimension the base source itself declares, which rules out an inline time truncation such as `order_time.day`; a measure that cannot be correctly re-aggregated to a coarser grain, whether because its aggregate has no exact merge function (`count(distinct)`, `median`, percentiles, `mode`, and `avg` until it is decomposed) or because it carries its own filter, an ungrouping (`all`, `exclude`), or a required group-by; a measure whose expression cannot be POSITIVELY classified as re-aggregatable, which fails closed rather than being guessed at; a base source with a FAN-OUT join (`join_many` or `join_cross`), which can multiply rows, while a `join_one` is permitted and a measure aggregating through one is served normally; a base source that already fails persist eligibility (unbound parameters, `given` references, authorize gates); `sharing=` or `schedule=` at the resource level; and a synthesized rollup name that collides with an existing model object. WARNED rather than rejected, at publish and at load alike, is a `#@ preaggregate` on a measure the source does not publicly expose, or a grain naming a hidden dimension — a rollup STORES its grain and each measure\'s partial, and the stored table is served under the base\'s name without the source\'s field visibility applying to it. Each names the measure and the fix. Refusing rather than silently dropping the measure is the deliberate choice. A dropped measure is not served from the rollup at ANY grain, so the declaration would have no effect whatsoever while still reading as applied — and the build cost of the rollup would still be paid. An author who writes `#@ preaggregate` on a measure that cannot be rolled up has made a modeling mistake, and an error is where a mistake belongs. The same verdict is enforced at LOAD for every violation EXCEPT the two access-modifier ones, so a package whose declarations stopped being honorable does not load at all: it is absent from its environment and reported in `ServerStatus.loadErrors`. Worth knowing because whether a measure can be re-aggregated is derived from the compiled model, so a Malloy version change can in principle reclassify a measure that published cleanly long before. That surfaces as a package that stops loading rather than as a package quietly serving without its rollups — louder, and deliberately so, since the alternative is paying for rollups that answer nothing. The two access-modifier violations are the deliberate exception, and for two reasons rather than a lesser severity. They WARN at publish and at load alike and appear in this array. First, a package annotating a hidden field published and loaded before this rule existed — refusing it would stop an already-published package from doing either because a new validation was added, which is not a thing a server upgrade may do. Second, the refusal was unfollowable: an annotation INHERITED onto a source that then hides the measure raises it, while that source produces no plan at all and nothing is exposed, so the advice to make the field public or drop the annotation asks an author to give up either the hiding or the rollup over a model that was already safe. Warning is safe here and would not be for the others: what keeps a hidden field out of a rollup is that the planner refuses to plan one at all, so no table is built and nothing can be served whether or not anyone reads the message. For the other violations the refusal IS the enforcement, which is why they stay fatal.
2006
2059
  */
2007
2060
  'warnings'?: Array<PackageWarningsInner>;
2008
2061
  /**
@@ -2105,6 +2158,7 @@ export type PackageQueryableSourcesEnum = typeof PackageQueryableSourcesEnum[key
2105
2158
  export declare const PackageManifestBindingStatusEnum: {
2106
2159
  readonly Unbound: "unbound";
2107
2160
  readonly Bound: "bound";
2161
+ readonly BindFailed: "bind_failed";
2108
2162
  readonly LiveFallback: "live_fallback";
2109
2163
  };
2110
2164
  export type PackageManifestBindingStatusEnum = typeof PackageManifestBindingStatusEnum[keyof typeof PackageManifestBindingStatusEnum];
@@ -2280,11 +2334,11 @@ export interface PackageServingState {
2280
2334
  */
2281
2335
  'sourceContentSha'?: string;
2282
2336
  /**
2283
- * Server-computed, read-only: whether the CONFIGURED build manifest is currently bound to this package\'s served models. `unbound` = no manifest configured, so the package serves live. `bound` = the configured manifest was fetched and applied. `live_fallback` = a `manifestLocation` is configured but its fetch/bind failed or timed out, so the configured manifest is NOT applied. Lets the caller confirm the publisher actually bound the configured manifest rather than inferring it from logs. `bound` reports that the bind ran to completion, NOT that any query routes to a materialized table: an entry whose source fails the eligibility gate is dropped, and the storage tier serves live under a `PERSIST_STORAGE_MODE` that is not `on`. Read `manifestEntryCount` and `storageServeBindings` for what actually bound. An EMPTY manifest is a bind like any other: it is fetched and applied, binds nothing, and reports `bound` with `manifestEntryCount` 0 and no `storageServeBindings`, while the package serves entirely live. That combination is the signature — `bound` with neither tier populated means the manifest carried nothing, not that the bind was missed. `live_fallback` does NOT imply the package is serving live. It says the configured manifest was not applied — not that nothing is. A failed FIRST bind leaves nothing bound (`boundManifestUri` null), but a failed REBIND leaves the previously bound manifest in place: its colocated substitutions stay compiled in, its storage serve bindings stay installed, and `boundManifestUri`, `manifestEntryCount` and `storageServeBindings` all continue to describe it. That rebind guarantee covers a failure BEFORE either tier applies — the manifest fetch failing or timing out, which is what produces `live_fallback` in practice. A failure partway through the recompile, after the new models are installed but before the binding is recorded, is out of scope: the new substitutions would be live while these fields still described the previous manifest. So the invariant to hold, whatever the status says: a non-null `boundManifestUri` is a LIVE reference to the manifest whose tables this package is currently serving from. A caller reclaiming superseded physical tables must treat it as one regardless of `manifestBindingStatus` — reading `live_fallback` as \"not serving from manifest tables\" and reclaiming that generation would drop tables out from under a package actively serving them. Note this value is not the `live_fallback` on a query result\'s `servedFrom`, which reports that ONE query degraded to the warehouse. This one is about the package\'s binding, and as above does not imply any query ran live.
2337
+ * Server-computed, read-only: whether the CONFIGURED build manifest is currently bound to this package\'s served models. `unbound` = no manifest configured, so the package serves live. `bound` = the configured manifest was fetched and applied. `bind_failed` = a `manifestLocation` is configured but its fetch/bind failed or timed out, so the configured manifest is NOT applied. `live_fallback` is retained, no longer produced: releases before this one said it for `bind_failed`, so a client should read both the same. Lets the caller confirm the publisher actually bound the configured manifest rather than inferring it from logs. `bound` reports that the bind ran to completion, NOT that any query routes to a materialized table: an entry whose source fails the eligibility gate is dropped, and the storage tier serves live under a `PERSIST_STORAGE_MODE` that is not `on`. Read `manifestEntryCount` and `storageServeBindings` for what actually bound. An EMPTY manifest is a bind like any other: it is fetched and applied, binds nothing, and reports `bound` with `manifestEntryCount` 0 and no `storageServeBindings`, while the package serves entirely live. That combination is the signature — `bound` with neither tier populated means the manifest carried nothing, not that the bind was missed. `bind_failed` does NOT imply the package is serving live. It says the configured manifest was not applied — not that nothing is. A failed FIRST bind leaves nothing bound (`boundManifestUri` null), but a failed REBIND leaves the previously bound manifest in place: its database substitutions stay compiled in, its storage serve bindings stay installed, and `boundManifestUri`, `manifestEntryCount` and `storageServeBindings` all continue to describe it. That rebind guarantee covers a failure BEFORE either tier applies — the manifest fetch failing or timing out, which is what produces `bind_failed` in practice. A failure partway through the recompile, after the new models are installed but before the binding is recorded, is out of scope: the new substitutions would be live while these fields still described the previous manifest. So the invariant to hold, whatever the status says: a non-null `boundManifestUri` is a LIVE reference to the manifest whose tables this package is currently serving from. A caller reclaiming superseded physical tables must treat it as one regardless of `manifestBindingStatus` — reading `bind_failed` as \"not serving from manifest tables\" and reclaiming that generation would drop tables out from under a package actively serving them. It is named apart from the `live_fallback` on a query result\'s `servedFrom`, which reports that ONE query degraded to the warehouse. This one is about the package\'s binding, and as above does not imply any query ran live.
2284
2338
  */
2285
2339
  'manifestBindingStatus'?: PackageServingStateManifestBindingStatusEnum;
2286
2340
  /**
2287
- * Server-computed, read-only: number of sourceEntityId -> physical-table entries currently bound for the COLOCATED (same-connection tableName substitution) tier only. 0 when unbound, or when the bound manifest carried no colocated entries — so a fully bound `storage=`-only manifest reports `bound` with a count of 0. Corroborate a cross-connection bind with `storageServeBindings`, not this count. Describes whatever is CURRENTLY bound, not the configured manifest: on a failed rebind this keeps the previously bound manifest\'s count (as `boundManifestUri` keeps its URI), because those entries really are still bound.
2341
+ * Server-computed, read-only: number of sourceEntityId -> physical-table entries currently bound for the DATABASE (same-connection tableName substitution) tier only. 0 when unbound, or when the bound manifest carried no database entries — so a fully bound `storage=`-only manifest reports `bound` with a count of 0. Corroborate a cross-connection bind with `storageServeBindings`, not this count. Describes whatever is CURRENTLY bound, not the configured manifest: on a failed rebind this keeps the previously bound manifest\'s count (as `boundManifestUri` keeps its URI), because those entries really are still bound.
2288
2342
  */
2289
2343
  'manifestEntryCount'?: number;
2290
2344
  /**
@@ -2292,7 +2346,7 @@ export interface PackageServingState {
2292
2346
  */
2293
2347
  'boundManifestUri'?: string | null;
2294
2348
  /**
2295
- * Server-computed, read-only: sources currently bound to serve from a `storage=` destination via the virtual-source transform (distinct from the same-connection manifest binding above — a storage source is read cross-connection from its destination, not substituted in the manifest). Present only when at least one source is bound. Whether a query actually routes to these tables additionally depends on `PERSIST_STORAGE_MODE=on`; under `off`/`write-only` the bindings may be present but the serve path still runs live (see `warnings`). Like `boundManifestUri`, this describes whatever is CURRENTLY bound rather than the configured manifest: after a failed rebind it goes on listing the previously bound manifest\'s sources, which are still serving. \"Bound\" is not the same as \"serving\", and an entry with `origin: preaggregate` is where the two most often part: a rollup is listed here once its table exists, but it is only offered to a query through a composite re-exposing its base\'s name, so it does not serve when something else already claims that name. Read `origin` before treating a row as evidence that queries are being accelerated.
2349
+ * Server-computed, read-only: sources currently bound to serve from a `storage=` destination via the virtual-source transform (distinct from the same-connection manifest binding above — a storage source is read cross-connection from its destination, not substituted in the manifest). Present only when at least one source is bound. Whether a query actually routes to these tables additionally depends on `PERSIST_STORAGE_MODE=on`; under `off`/`write-only` the bindings may be present but the serve path still runs live (see `warnings`). Like `boundManifestUri`, this describes whatever is CURRENTLY bound rather than the configured manifest: after a failed rebind it goes on listing the previously bound manifest\'s sources, which are still serving. \"Bound\" is not the same as \"serving\", and an entry with `origin: rollup` is where the two most often part: a rollup is listed here once its table exists, but it is only offered to a query through a composite re-exposing its base\'s name, so it does not serve when something else already claims that name. Read `origin` before treating a row as evidence that queries are being accelerated.
2296
2350
  */
2297
2351
  'storageServeBindings'?: Array<StorageServeBinding>;
2298
2352
  /**
@@ -2308,6 +2362,7 @@ export type PackageServingStateArchiveStatusEnum = typeof PackageServingStateArc
2308
2362
  export declare const PackageServingStateManifestBindingStatusEnum: {
2309
2363
  readonly Unbound: "unbound";
2310
2364
  readonly Bound: "bound";
2365
+ readonly BindFailed: "bind_failed";
2311
2366
  readonly LiveFallback: "live_fallback";
2312
2367
  };
2313
2368
  export type PackageServingStateManifestBindingStatusEnum = typeof PackageServingStateManifestBindingStatusEnum[keyof typeof PackageServingStateManifestBindingStatusEnum];
@@ -2378,7 +2433,7 @@ export interface PackageStatusEntry {
2378
2433
  */
2379
2434
  'exploresWarnings'?: Array<string>;
2380
2435
  /**
2381
- * Non-fatal findings collected when the package loaded, none of which stop the model compiling or the package loading. Render-tag findings: a render annotation (e.g. `# big_value`, `# currency` or `# colspan`) the renderer cannot apply as written, either malformed for the field it sits on, so it renders as \"[object Object]\" or an inline error at query time, or inert where it sits and silently ignored. Materialization findings: a `storage=` source not served from storage, a `#@ persist` source that was not recognized as materializable, a `#@ persist` REFUSED by the compile-time eligibility gate (one entry per `BuildPlan.refusedSources` member, carrying that gate\'s own message), a persist-target collision, and materialization-config problems that degrade attribution. A refusal is the one materialization finding the build plan cannot also be read for: a refused `storage`/`colocated` source is ABSENT from `BuildPlan.sources`, so nothing there records that the annotation was written at all. Discovery findings: a model on the package\'s surface whose export closure surfaces no sources or named queries, so it lists as empty and renders a blank page; a surface whose every model failed to compile, so every model in the package answers 404 by name; and, on the reload that caused it, a package that had a surface and now has none, so every source that surface hid is listed and queryable by name again. Manifest findings: each deprecated use of `explores` or of `queryableSources: \"declared\"`, and a root file such as `Index.malloy` that differs from `index.malloy` only in case and so is ignored. A root `index.malloy` with no manifest keys gets no warning. Report findings (one lint pass per report, of either layout, wherever it lives): a file whose artifact tag does not parse or does not describe a report, a tile or suggest query that does not resolve, a `# drill` naming a destination that is not a report, and a tile, single query or filter suggest that reads a source the surface does not export, so it won\'t load. A `# drill` destination is a path from the package root (a bare name is a file at the root); one that names no report is unresolved (`error`). Curation findings: a root `index.malloy` carrying an artifact tag, which is ignored (`index-is-not-a-report`, `error`); and a report that `index.malloy` imports or `explores` lists (`report-on-surface`, `warn`). Two report findings are about Publisher rather than about the package: one when a file carrying an artifact tag could not be read and so is not served at all, and one when the lint stops early, in which case the list must be read as incomplete rather than as a clean package. A linear report whose cells could not be read gets a finding that names the line and the fix and is reported with severity `error`, because it is served with that error instead of opening. The per-file report findings each name their line and the fix and carry a `code`; they are computed at discovery and are also returned by `/compile` at file and package scope. These codes are `error` and fail `/compile`: `notebook-markdown-opener-text` (more than a name after `(markdown)` on a block\'s opener), `notebook-markdown-attached-nowhere` (a `#(markdown)` annotation with no statement to take it), `notebook-artifact-unparsed` (an `## artifact` tag does not parse), and `notebook-cells-unreadable` (the reader could not read a linear report\'s cells), plus `report-kind-removed` (a tag that sets `kind=`, which is no longer read, so the file is not a report; the finding names the `layout=` to write), `report-cells-removed` (a linear tag that lists no `tiles`, the retired `run:` cell format, so the file is not a report; the fix is to list its tiles in `tiles=[…]`) and `report-layout-unknown` (a `layout=` other than `grid` or `linear`). The rest are `warn` (a mistyped `(markdown)` opener, a block that never closes, and similar). Skill and agent findings, all `warn`: a package skill under `skills/` that is not served (unreadable or linked-out `SKILL.md`, a frontmatter `name` that is not its directory name, a `skills/` directory that links out of the package) or served with a gap (no `description`, a `reference/` that cannot be listed or read); and each agent the manifest declares that is not served, or is served with a finding (an agent skill with no `description`, a skills directory with no skills, an unreadable reference). Deprecated-format findings, all `warn`: each `.malloynb` notebook (`model` is its path), and each source a file declares deprecated `#(filter)` annotations on (`model` is that file, `subject` the source; a source that only inherits or imports a filter is not reported). Both still load and run. Server-computed and read-only: ignored on create/update requests and only returned in responses. Present only when there are such findings. **Almost every `#@ preaggregate` that cannot be honored REJECTS A PUBLISH — a 400 at publish or PATCH — and fails a load thereafter.** The two access-modifier violations are the exception: they warn at BOTH gates and appear in this array. See the split below. Rejected are a `#@ preaggregate` anywhere but on a measure; a `#@ preaggregate` with no `grain=`; a grain naming anything but a dimension the base source itself declares, which rules out an inline time truncation such as `order_time.day`; a measure that cannot be correctly re-aggregated to a coarser grain, whether because its aggregate has no exact merge function (`count(distinct)`, `median`, percentiles, `mode`, and `avg` until it is decomposed) or because it carries its own filter, an ungrouping (`all`, `exclude`), or a required group-by; a measure whose expression cannot be POSITIVELY classified as re-aggregatable, which fails closed rather than being guessed at; a base source with a FAN-OUT join (`join_many` or `join_cross`), which can multiply rows, while a `join_one` is permitted and a measure aggregating through one is served normally; a base source that already fails persist eligibility (unbound parameters, `given` references, authorize gates); `sharing=` or `schedule=` at the resource level; and a synthesized rollup name that collides with an existing model object. WARNED rather than rejected, at publish and at load alike, is a `#@ preaggregate` on a measure the source does not publicly expose, or a grain naming a hidden dimension — a rollup STORES its grain and each measure\'s partial, and the stored table is served under the base\'s name without the source\'s field visibility applying to it. Each names the measure and the fix. Refusing rather than silently dropping the measure is the deliberate choice. A dropped measure is not served from the rollup at ANY grain, so the declaration would have no effect whatsoever while still reading as applied — and the build cost of the rollup would still be paid. An author who writes `#@ preaggregate` on a measure that cannot be rolled up has made a modeling mistake, and an error is where a mistake belongs. The same verdict is enforced at LOAD for every violation EXCEPT the two access-modifier ones, so a package whose declarations stopped being honorable does not load at all: it is absent from its environment and reported in `ServerStatus.loadErrors`. Worth knowing because whether a measure can be re-aggregated is derived from the compiled model, so a Malloy version change can in principle reclassify a measure that published cleanly long before. That surfaces as a package that stops loading rather than as a package quietly serving without its rollups — louder, and deliberately so, since the alternative is paying for rollups that answer nothing. The two access-modifier violations are the deliberate exception, and for two reasons rather than a lesser severity. They WARN at publish and at load alike and appear in this array. First, a package annotating a hidden field published and loaded before this rule existed — refusing it would stop an already-published package from doing either because a new validation was added, which is not a thing a server upgrade may do. Second, the refusal was unfollowable: an annotation INHERITED onto a source that then hides the measure raises it, while that source produces no plan at all and nothing is exposed, so the advice to make the field public or drop the annotation asks an author to give up either the hiding or the rollup over a model that was already safe. Warning is safe here and would not be for the others: what keeps a hidden field out of a rollup is that the planner refuses to plan one at all, so no table is built and nothing can be served whether or not anyone reads the message. For the other violations the refusal IS the enforcement, which is why they stay fatal.
2436
+ * Non-fatal findings collected when the package loaded, none of which stop the model compiling or the package loading. Render-tag findings: a render annotation (e.g. `# big_value`, `# currency` or `# colspan`) the renderer cannot apply as written, either malformed for the field it sits on, so it renders as \"[object Object]\" or an inline error at query time, or inert where it sits and silently ignored. Materialization findings: a `storage=` source not served from storage, a `#@ persist` source that was not recognized as materializable, a `#@ persist` REFUSED by the compile-time eligibility gate (one entry per `BuildPlan.refusedSources` member, carrying that gate\'s own message), a persist-target collision, and materialization-config problems that degrade attribution. A refusal is the one materialization finding the build plan cannot also be read for: a refused `storage`/`database` source is ABSENT from `BuildPlan.sources`, so nothing there records that the annotation was written at all. Discovery findings: a model on the package\'s surface whose export closure surfaces no sources or named queries, so it lists as empty and renders a blank page; a surface whose every model failed to compile, so every model in the package answers 404 by name; and, on the reload that caused it, a package that had a surface and now has none, so every source that surface hid is listed and queryable by name again. Manifest findings: each deprecated use of `explores` or of `queryableSources: \"declared\"`, and a root file such as `Index.malloy` that differs from `index.malloy` only in case and so is ignored. A root `index.malloy` with no manifest keys gets no warning. Report findings (one lint pass per report, of either layout, wherever it lives): a file whose artifact tag does not parse or does not describe a report, a tile or suggest query that does not resolve, a `# drill` naming a destination that is not a report, and a tile, single query or filter suggest that reads a source the surface does not export, so it won\'t load. A `# drill` destination is a path from the package root (a bare name is a file at the root); one that names no report is unresolved (`error`). Curation findings: a root `index.malloy` carrying an artifact tag, which is ignored (`index-is-not-a-report`, `error`); and a report that `index.malloy` imports or `explores` lists (`report-on-surface`, `warn`). Two report findings are about Publisher rather than about the package: one when a file carrying an artifact tag could not be read and so is not served at all, and one when the lint stops early, in which case the list must be read as incomplete rather than as a clean package. A linear report whose cells could not be read gets a finding that names the line and the fix and is reported with severity `error`, because it is served with that error instead of opening. The per-file report findings each name their line and the fix and carry a `code`; they are computed at discovery and are also returned by `/compile` at file and package scope. These codes are `error` and fail `/compile`: `notebook-markdown-opener-text` (more than a name after `(markdown)` on a block\'s opener), `notebook-markdown-attached-nowhere` (a `#(markdown)` annotation with no statement to take it), `notebook-artifact-unparsed` (an `## artifact` tag does not parse), and `notebook-cells-unreadable` (the reader could not read a linear report\'s cells), plus `report-kind-removed` (a tag that sets `kind=`, which is no longer read, so the file is not a report; the finding names the `layout=` to write), `report-cells-removed` (a linear tag that lists no `tiles`, the retired `run:` cell format, so the file is not a report; the fix is to list its tiles in `tiles=[…]`) and `report-layout-unknown` (a `layout=` other than `grid` or `linear`). The rest are `warn` (a mistyped `(markdown)` opener, a block that never closes, and similar). Skill and agent findings, all `warn`: a package skill under `skills/` that is not served (unreadable or linked-out `SKILL.md`, a frontmatter `name` that is not its directory name, a `skills/` directory that links out of the package) or served with a gap (no `description`, a `reference/` that cannot be listed or read); and each agent the manifest declares that is not served, or is served with a finding (an agent skill with no `description`, a skills directory with no skills, an unreadable reference). Deprecated-format findings, all `warn`: each `.malloynb` notebook (`model` is its path), and each source a file declares deprecated `#(filter)` annotations on (`model` is that file, `subject` the source; a source that only inherits or imports a filter is not reported). Both still load and run. Server-computed and read-only: ignored on create/update requests and only returned in responses. Present only when there are such findings. **Almost every `#@ preaggregate` that cannot be honored REJECTS A PUBLISH — a 400 at publish or PATCH — and fails a load thereafter.** The two access-modifier violations are the exception: they warn at BOTH gates and appear in this array. See the split below. Rejected are a `#@ preaggregate` anywhere but on a measure; a `#@ preaggregate` with no `grain=`; a grain naming anything but a dimension the base source itself declares, which rules out an inline time truncation such as `order_time.day`; a measure that cannot be correctly re-aggregated to a coarser grain, whether because its aggregate has no exact merge function (`count(distinct)`, `median`, percentiles, `mode`, and `avg` until it is decomposed) or because it carries its own filter, an ungrouping (`all`, `exclude`), or a required group-by; a measure whose expression cannot be POSITIVELY classified as re-aggregatable, which fails closed rather than being guessed at; a base source with a FAN-OUT join (`join_many` or `join_cross`), which can multiply rows, while a `join_one` is permitted and a measure aggregating through one is served normally; a base source that already fails persist eligibility (unbound parameters, `given` references, authorize gates); `sharing=` or `schedule=` at the resource level; and a synthesized rollup name that collides with an existing model object. WARNED rather than rejected, at publish and at load alike, is a `#@ preaggregate` on a measure the source does not publicly expose, or a grain naming a hidden dimension — a rollup STORES its grain and each measure\'s partial, and the stored table is served under the base\'s name without the source\'s field visibility applying to it. Each names the measure and the fix. Refusing rather than silently dropping the measure is the deliberate choice. A dropped measure is not served from the rollup at ANY grain, so the declaration would have no effect whatsoever while still reading as applied — and the build cost of the rollup would still be paid. An author who writes `#@ preaggregate` on a measure that cannot be rolled up has made a modeling mistake, and an error is where a mistake belongs. The same verdict is enforced at LOAD for every violation EXCEPT the two access-modifier ones, so a package whose declarations stopped being honorable does not load at all: it is absent from its environment and reported in `ServerStatus.loadErrors`. Worth knowing because whether a measure can be re-aggregated is derived from the compiled model, so a Malloy version change can in principle reclassify a measure that published cleanly long before. That surfaces as a package that stops loading rather than as a package quietly serving without its rollups — louder, and deliberately so, since the alternative is paying for rollups that answer nothing. The two access-modifier violations are the deliberate exception, and for two reasons rather than a lesser severity. They WARN at publish and at load alike and appear in this array. First, a package annotating a hidden field published and loaded before this rule existed — refusing it would stop an already-published package from doing either because a new validation was added, which is not a thing a server upgrade may do. Second, the refusal was unfollowable: an annotation INHERITED onto a source that then hides the measure raises it, while that source produces no plan at all and nothing is exposed, so the advice to make the field public or drop the annotation asks an author to give up either the hiding or the rollup over a model that was already safe. Warning is safe here and would not be for the others: what keeps a hidden field out of a rollup is that the planner refuses to plan one at all, so no table is built and nothing can be served whether or not anyone reads the message. For the other violations the refusal IS the enforcement, which is why they stay fatal.
2382
2437
  */
2383
2438
  'warnings'?: Array<PackageWarningsInner>;
2384
2439
  /**
@@ -2475,6 +2530,7 @@ export type PackageStatusEntryQueryableSourcesEnum = typeof PackageStatusEntryQu
2475
2530
  export declare const PackageStatusEntryManifestBindingStatusEnum: {
2476
2531
  readonly Unbound: "unbound";
2477
2532
  readonly Bound: "bound";
2533
+ readonly BindFailed: "bind_failed";
2478
2534
  readonly LiveFallback: "live_fallback";
2479
2535
  };
2480
2536
  export type PackageStatusEntryManifestBindingStatusEnum = typeof PackageStatusEntryManifestBindingStatusEnum[keyof typeof PackageStatusEntryManifestBindingStatusEnum];
@@ -2524,6 +2580,7 @@ export type PackageStatusEntryFieldsArchiveStatusEnum = typeof PackageStatusEntr
2524
2580
  export declare const PackageStatusEntryFieldsManifestBindingStatusEnum: {
2525
2581
  readonly Unbound: "unbound";
2526
2582
  readonly Bound: "bound";
2583
+ readonly BindFailed: "bind_failed";
2527
2584
  readonly LiveFallback: "live_fallback";
2528
2585
  };
2529
2586
  export type PackageStatusEntryFieldsManifestBindingStatusEnum = typeof PackageStatusEntryFieldsManifestBindingStatusEnum[keyof typeof PackageStatusEntryFieldsManifestBindingStatusEnum];
@@ -2606,7 +2663,7 @@ export type PackageVersionArchiveStatusEnum = typeof PackageVersionArchiveStatus
2606
2663
  */
2607
2664
  export interface PackageVersionManifest {
2608
2665
  /**
2609
- * Where the build manifest to bind is: a gs:// or s3:// URI, a file:// URL, or an absolute path on this server (a mounted volume). Null, or leaving the field out, clears the binding and serves live, so a client that drops a field it meant to send (a value left undefined) clears the binding. An empty string or a relative path is refused with 400, and so is any other field in the body and a body not sent as application/json.
2666
+ * Where the build manifest to bind is: a gs:// or s3:// URI, a file:// URL, or an absolute path on this server (a mounted volume). Once one binds, the version is the host\'s from then on, as it is once a host\'s instructed run of it has run, even one whose commit failed. Null, or leaving the field out, clears the binding: a version a host has bound then serves live, and stays live through a reload or a restart until a manifest is bound again, never serving the tables this server\'s own runs built for it. A version no host has bound serves what its own runs built, or live when they built nothing. A client that drops a field it meant to send (a value left undefined) therefore clears the binding. An empty string or a relative path is refused with 400, and so is any other field in the body and a body not sent as application/json.
2610
2667
  */
2611
2668
  'manifestLocation'?: string | null;
2612
2669
  }
@@ -2638,9 +2695,13 @@ export interface PackageWarningsInner {
2638
2695
  */
2639
2696
  'message'?: string;
2640
2697
  /**
2641
- * A stable identifier for the finding\'s family, for a client that acts on it rather than only showing it; absent for a family that has none yet. `deprecated-malloynb-notebook`: a `.malloynb` notebook, the deprecated cell format (one per file, `model` naming it). `deprecated-filter-annotation`: a source declaring deprecated `#(filter)` annotations (one per declaring source, `model` naming its file and `subject` the source). `deprecated-preaggregate-annotation`: a measure declaring `#@ preaggregate`, whose v2 spelling is `#(preaggregate)` (one per measure, `model` its file, `subject` the source and the message the measure; `warn`; only while `PUBLISHER_MATERIALIZE` is on). `report-name-ambiguous`: two or more grid reports share a basename, so the deprecated `GET …/dashboards/{name}` route answers 409 for it (one per name, `subject` naming it and the message every path; `warn`). `classification-coverage`: a published source with a dimension or measure that carries no `#(classification)` while some field in the package does (one per source, `model` naming its file and `subject` the source; `warn`; see docs/classification.md). `classification-malformed`: a `#(classification)` annotation that names no single class (one per field, `subject` the source; `warn`). `classification-downgrade`: a field that declares a lower class than the fields its expression reads, which Publisher cannot tell from a real de-identification, so a review has to (one per field, `subject` the source; `warn`; a plain copy under `#(carries)` refuses the load instead). `preaggregate-over-stored-base`: a source persisted with `#@ persist storage=` that also declares `#@ preaggregate storage=` rollups, which are left out of the build plan and every run because a rollup over a stored base can neither build nor serve yet (one per base, `subject` the base; `warn`; the base still builds and serves from storage). `persist-unparseable`: a `#@` annotation that does not parse, so Malloy drops its source from the build and it is served live (one per annotation, `model` its file; `error`; refused at publish, while a package already published keeps loading). `persist-retired-key`: a `#@ persist` key no longer read, `sharing=` or `schedule=`, with what to write instead (one per key, `subject` the source; `error`; refused at publish). `persist-unknown-key`: a `#@ persist` key Publisher does not read, such as a misspelled `merge_key=` (one per key, `subject` the source; `warn`). `persist-not-materializable`: a `#@ persist` source the build walk did not recognize, served live (`subject` the source; `warn`). `persist-source-refused`: a `#@ persist` source a compile-time gate refused (a row-level gate, a free parameter, a given in the persisted query, or the `storage=` gate), served live, with the gate\'s message (`subject` the source, or a rollup\'s base; `warn`). `persist-incremental-no-merge-key`: an incremental source with no `merge_key=`, so each refresh replaces its watermark range (`subject` the source; `warn`). `persist-incremental-shared-address`: sources that compile to the same SQL on one connection, so they share one table and one boundary, where at least one is incremental (one per source; `warn`). `preaggregate-hidden-field`: a `#@ preaggregate` on a private or internal field or grain dimension (`warn`). `join-bypass`: an author join from a published source to one with a stricter gate, which the join does not carry (one per join, or one for a walk cut short at the join bound; always a `warn`, never a load refusal; see docs/authorize.md). `storage-column-type-mismatch`: a `storage=` table stores a column as a type other than the one Malloy declares for it. It is read through a cast to the declared type where that is faithful, and otherwise answered live (one per source and column, `model` the first model binding it, `subject` the source, the message naming the column, both types and which of the two applies; `warn`; see docs/materialization.md). `entities-…` (`entities-not-a-dimension`, `entities-parameterized-source`, `entities-multiple-required-filters`, `entities-sharing-not-allowed-on-dimension`, `entities-schedule-not-allowed-on-dimension`, `entities-required-filter-missing-dimension`, `entities-required-filter-non-public-dimension`): an `#(index)` or required `#(filter)` an index cannot honor, left out of `GET …/entities` (`model` its file; `warn`). The per-file report findings (`notebook-…`, `report-…`) and the report curation findings (`report-on-surface`, `index-is-not-a-report`). The message wording may change; the code does not.
2698
+ * A stable identifier for the finding\'s family, for a client that acts on it rather than only showing it; absent for a family that has none yet. `deprecated-malloynb-notebook`: a `.malloynb` notebook, the deprecated cell format (one per file, `model` naming it). `deprecated-filter-annotation`: a source declaring deprecated `#(filter)` annotations (one per declaring source, `model` naming its file and `subject` the source). `deprecated-preaggregate-annotation`: a measure declaring `#@ preaggregate` or the deprecated alias `#(preaggregate)`, whose v2 spelling is `#(rollup)`; the message names the spelling it found (one per measure, `model` its file, `subject` the source and the message the measure; `warn`; only while `PUBLISHER_MATERIALIZE` is on). `deprecated-rollup-namespace`: a rollup line placed with `namespace=`, the deprecated spelling of its `name=` container; still read, in that container under the readable name (one per measure and container, `subject` `<base>.<measure>`; `warn`). `report-name-ambiguous`: two or more grid reports share a basename, so the deprecated `GET …/dashboards/{name}` route answers 409 for it (one per name, `subject` naming it and the message every path; `warn`). `classification-coverage`: a published source with a dimension or measure that carries no `#(classification)` while some field in the package does (one per source, `model` naming its file and `subject` the source; `warn`; see docs/classification.md). `classification-malformed`: a `#(classification)` annotation that names no single class (one per field, `subject` the source; `warn`). `classification-downgrade`: a field that declares a lower class than the fields its expression reads, which Publisher cannot tell from a real de-identification, so a review has to (one per field, `subject` the source; `warn`; a plain copy under `#(carries)` refuses the load instead). Materialization codes follow one rule: the suffix tells the outcome. An INVALID annotation (or invalid code it covers) fails the publish and the load, on every path, so its code appears only in the load failure\'s message (the publish 4xx and `loadErrors`), never as a warning here: `persist-invalid`, `materialize-invalid`, `rollup-invalid`, `persist-view-invalid` and `persist-query-invalid` (a bad value or contradictory combination: a `storage=` that names nothing, an `@env.` reference, an unusable, unsafe, unquoted or reserved `name=`, an `inline=` that names no join, an incremental key or `refresh=\"incremental\"` on a view or query); `persist-unknown-key`, `materialize-unknown-key` and `rollup-unknown-key` (every route\'s key set is closed, a `freshness.` group\'s included); `persist-retired-key` and `materialize-retired-key` (`sharing=`, `schedule=`, `partition=`, and on `#@ persist` `realization=`); `persist-unparseable`, `materialize-unparseable`, `rollup-unparseable`, `persist-view-unparseable` and `persist-query-unparseable`; `persist-not-materializable` (a `#@ persist` on a shape Malloy does not plan); `rollup-not-a-measure`, `rollup-unknown-grain` and `rollup-not-mergeable` (a rollup line on a field that is not a measure, a grain naming no dimension, a measure no rollup can merge); `materialization-table-collision` (two sources whose `name=` puts them on one table; under `PERSIST_COLLISION_ENFORCE=false` a refusal instead); and `materialization-near-miss` (a misspelled materialization route or directive, such as `#(materialise)` or `#@ persits`). `preaggregate-malformed` is retained and no longer produced: it is `rollup-invalid` or `rollup-unparseable` now. Retained, no longer produced: `preaggregate-invalid`, `preaggregate-unknown-key`, `preaggregate-unparseable`, `preaggregate-not-a-measure`, `preaggregate-unknown-grain` and `preaggregate-not-mergeable`, now `rollup-invalid`, `rollup-unknown-key`, `rollup-unparseable`, `rollup-not-a-measure`, `rollup-unknown-grain` and `rollup-not-mergeable`. A measure or source that carries both `#(rollup)` and `#(preaggregate)` is `rollup-invalid`. A VALID annotation Publisher cannot build here is refused alone, answered live, while the package loads, and is severity `warn`, never `error`. Every one is a `BuildPlan.refusedSources` entry with a bounded `reason`, and its warning\'s code names the mechanism: `persist-not-built` (a `#@ persist` source; `subject` the source), `materialize-not-built` (a `#(materialize)` source; `subject` the source), `persist-view-not-built` and `persist-query-not-built` (a persisted view or named query; `subject` the view or query), and `rollup-not-built` (a `#(rollup)` or `#@ preaggregate` rollup; `subject` the base, or `<base>.<measure>` for one measure). The message says why, and `reason` is the refusal record\'s bounded reason. `preaggregate-not-built` is `rollup-not-built`\'s former name: each `rollup-not-built` warning is repeated under it, with the same message, for this release only. `persist-source-refused`, the former name of `persist-not-built` repeated beside it in 0.14.0, is no longer produced. Retained, no longer produced: the rollup sub-family `preaggregate-hidden-field`, `-access-filter`, `-time-zone`, `-current-time`, `-reads-given`, `-unreadable-measure`, `-join-level` and `-name-clash`, now each `rollup-not-built` with the reasons `hidden_field`, `access_filter` (or `authorize`), `time_zone`, `current_time`, `reads_given`, `inherited_where_with_given` or `given_where_over_unstored_field`, `unreadable_measure`, `join_not_in_grain` and `partial_name_collision`. `materialization-storage-mode`: a `storage=` source the deployment\'s `PERSIST_STORAGE_MODE` (`off` or `write-only`) does not serve from storage (`subject` the source, or a rollup\'s base; `reason` `storage_mode`; `warn`). `materialization-unreachable`, `materialization-destination-missing` and `materialization-connection-cannot-hold-table`: a source whose serve verdict is `live` for the reason each names (no published source reaches it; its `storage=` destination is not configured; its connection creates no tables), with the verdict\'s `message` and `fixes` (`subject` the source; `reason` the verdict\'s; `warn`). `materialize-pair-full-refresh`: a `#(materialize)` pair table (an inlined `join_many`) whose `refresh=\"incremental\"` is not honoured: it is rebuilt in full on every refresh, and served (`subject` the source; `warn`). `rollup-join-one-key-repeated`: a rollup\'s last build found a `join_one` key repeated in the data, so queries that read that join beside other aggregates are answered live (`subject` the rollup\'s base; `warn`). Repeated under its former name `preaggregate-join-one-key-repeated` for this release only. `served-copy-not-served`: the served copy (the author\'s own files, each stored source re-rooted on its table) leaves a source as written, so it answers live, or serves it with a join read as written or left out; `reason` names why (`compile_failed`, `cross_connection_unbuilt`, `column_types`, `no_declaration`, `definition_not_parsed`, `pair_join_not_found`, `pair_not_compiled`, `fields_not_carried`, `read_terms_not_kept`, `cross_connection_join`, `inline_join_kept`, `reroot_not_compiled`, `classification_not_kept`; an open set) (`subject` the source; `warn`). `row-level-gate-unexpressible`: a row-level gate an entry point inherits, whose field it no longer carries, so that entry point denies every request; `row-level-gate-reads-no-given`: a source-line gate that reads no given, a fixed predicate rather than an access rule keyed on the caller; `row-level-gate-negated-membership`: a source-line gate that negates a membership test, which an empty given turns into match-all, or that is too deep to check for one (its message then says it is too deep to check, not that it negates one) (`model` the entry point\'s file, `subject` the entry point; `warn`; the model still loads). `annotation-near-miss` and `annotation-malformed-route`: an annotation whose route or directive looks like a misspelled one Publisher reads (`warn`); `annotation-gate-near-miss`: a misspelled gate annotation (`#(authorise)`), which `compile_model` refuses. `persist-incremental-no-merge-key`: an incremental source with no `merge_key=`, so each refresh replaces its watermark range (`subject` the source; `warn`). `persist-incremental-shared-address`: sources that compile to the same SQL on one connection, so they share one table and one boundary, where at least one is incremental (one per source; `warn`). `rollup-join-one-key-repeated`: a bound rollup whose last build found the key of a `join_one` it reads repeated, so a query reading that join beside other aggregates is answered live; it clears once a build finds the key unique (one per rollup; `warn`). `preaggregate-join-one-key-repeated` is retained, no longer produced: it is `rollup-join-one-key-repeated` now. `join-bypass`: an author join from a published source to one with a stricter gate, which the join does not carry (one per join, or one for a walk cut short at the join bound; always a `warn`, never a load refusal; see docs/authorize.md). `storage-column-type-mismatch`: a `storage=` table of any kind (`#@ persist`, `#(materialize)`, a rollup, a persisted view or query) stores a column as a type other than the one its build declares. It is read through a cast to the declared type where that is faithful, and otherwise answered live, never read as its stored type (one per source and column, `model` the model declaring it, `subject` the source, a rollup\'s base, or a view\'s or query\'s build source, the message naming the column, both types and which applies; `warn`; see docs/materialization.md). `database-column-type-mismatch`: a bound table in a source\'s own database whose column was altered, or dropped, outside a build, so it no longer stores the declared type; it is read through a cast where that is faithful, and otherwise answered live, until the table is rebuilt (one per source and column, `subject` the source; `warn`). `table-kept`: a table an auto-run replaced when its source\'s table was renamed or moved, which Publisher keeps rather than drops: one at an author\'s exact `name=` (never dropped), one in a storage destination that is no longer configured (which, when the destination was renamed rather than removed, may be the table served under the new name), or one a `storage=` or tier move left under the name the source is served under now (which may be the very table served, so it is never dropped). Listed on the newest run\'s `metadata.keptTables` until no committed run names it in its place (its runs deleted; a delete is record-only), a run finds it dropped by hand (never on Snowflake or MySQL, whose catalogs hide tables), or its name is used again in its own place (one per table, `model` the model declaring the source, `subject` the source or a rollup\'s base, the message naming the table and where it is, `reason` the kept table\'s `author_name`, `destination_missing` or `may_be_served`; `warn`; see docs/materialization.md). `database-table-unread`: a bound table in a source\'s own database whose columns could not be read when it was bound (missing, unreadable, slower than the read\'s bound, or named in more than one schema), so its queries are answered live until a read succeeds; the message names the table or rollup, one fixed reason (its connection could not be opened, the catalog read timed out, the catalog query failed, not found, a name matching more than one table, a name the catalog cannot read; never the driver\'s text) and whether a retry is pending, and the warning clears once the table is read (only for a table a source of the package reads; one per table, `model` the model declaring its source, `subject` the source, or a rollup\'s base, when the plan knows the table; `reason` one of `connection_failed`, `timed_out`, `catalog_query_failed`, `not_found`, `ambiguous`, `unparseable`, `not_read`; `warn`; see docs/materialization.md). `database-native-type-missing`: a database table is bound with no captured warehouse type (its manifest entry\'s `nativeSchema`) for a column whose field Malloy types as a big integer. On BigQuery the column is read as `INT64`, its only integer type, and still serves; on any other dialect it is left out, so a query that reads it is answered live. The next full rebuild captures the types (one per source, `model` the first model binding it, `subject` the source, the message naming the columns and which applies; `warn`; see docs/materialization.md). Repeated under its former name `stored-native-schema-missing` for this release only. `entities-…` (`entities-not-a-dimension`, `entities-parameterized-source`, `entities-multiple-required-filters`, `entities-sharing-not-allowed-on-dimension`, `entities-schedule-not-allowed-on-dimension`, `entities-required-filter-missing-dimension`, `entities-required-filter-non-public-dimension`): an `#(index)` or required `#(filter)` an index cannot honor, left out of `GET …/entities` (`model` its file; `warn`). The per-file report findings (`notebook-…`, `report-…`) and the report curation findings (`report-on-surface`, `index-is-not-a-report`). The message wording may change; the code does not.
2642
2699
  */
2643
2700
  'code'?: string;
2701
+ /**
2702
+ * The bounded cause of a materialization finding, so a client branches on it rather than on the message (whose wording may change): the refusal record\'s `reason` on a `*-not-built` warning; the served copy\'s reason on `served-copy-not-served`; the unread reason on `database-table-unread`; the kept table\'s reason on `table-kept`; the serve verdict\'s reason on a `materialization-*` verdict warning; `storage_mode` on `materialization-storage-mode`. Always snake_case. An open string; absent on a finding that has none.
2703
+ */
2704
+ 'reason'?: string;
2644
2705
  /**
2645
2706
  * Finding severity, `error` or `warn` and nothing else; a deprecated form that still loads (such as `deprecated-malloynb-notebook`) is `warn`. Render-tag findings use both: `error` for a tag malformed for the field it sits on, which renders as \"[object Object]\" or an inline error at query time, and `warn` for one that is well-formed but inert where it sits and so is silently ignored (e.g. `# colspan` outside `# dashboard { columns=N }`), where nothing looks broken at query time and the layout simply is not what was written. Those are the only two severities the renderer emits, so no render finding is withheld. Materialization and dashboard findings use both: `error` for something that cannot work as written, such as a tile naming a view the source does not have, and `warn` for something that works but not as the author probably intended, such as a dashboard name outside the conventional shape. The two findings about Publisher rather than about the package split across both: a file that carries an artifact tag and could not be read is `error`, because the dashboard it should have produced does not exist, and a lint that stopped early is `warn`, because the lint failing is not itself a defect in the package. That `warn` does NOT mean the package is free of `error`-severity findings, since the ones the lint never reached are exactly what it cannot report.
2646
2707
  */
@@ -2657,11 +2718,11 @@ export interface PersistSourcePlan {
2657
2718
  'connectionName': string;
2658
2719
  'dialect'?: string;
2659
2720
  /**
2660
- * Which authoring annotation produced this plan entry. `persist` — the modeler wrote `#@ persist` on the source; every entry on a deployment that uses no pre-aggregation, and the meaning of an absent value. `preaggregate` — the modeler wrote `#@ preaggregate` on measures of `preaggregate.baseSourceName`, and the publisher SYNTHESIZED this rollup source to serve them. Note that BOTH kinds carry a `#@ persist` annotation by the time they reach this plan, because synthesis emits one (see `annotationFields`). So this reports which surface the AUTHOR used, not which annotation sits on the source — which is the question worth answering, since a `preaggregate` entry\'s `name` appears in no model file and without this field an operator or orchestrator sees a source nobody wrote with no way to tell it from one they did. Everything downstream is deliberately indifferent to it: a synthesized entry is built, identified, manifested, shared and garbage-collected exactly like a hand-written one.
2721
+ * Which authoring annotation produced this plan entry. `persist` — the modeler wrote `#@ persist` on the source, and the meaning of an absent value. `materialize` — `#(materialize)` on the source. `view` and `query` — `#@ persist` on a view or a named `query:`, whose generated build source this entry is. `rollup` — the modeler wrote `#(rollup)` (or its deprecated alias `#(preaggregate)`) or v1\'s `#@ preaggregate` on measures of `preaggregate.baseSourceName`, and the publisher SYNTHESIZED this rollup source to serve them. Releases before this one said `persist` for every entry that was not a rollup, and `preaggregate` for a rollup: `preaggregate` is retained, no longer produced. A client must accept a value it does not know as an entry that is not a rollup. Note that BOTH kinds carry a `#@ persist` annotation by the time they reach this plan, because synthesis emits one (see `annotationFields`). So this reports which surface the AUTHOR used, not which annotation sits on the source — which is the question worth answering, since a `preaggregate` entry\'s `name` appears in no model file and without this field an operator or orchestrator sees a source nobody wrote with no way to tell it from one they did. Everything downstream is deliberately indifferent to it: a synthesized entry is built, identified, manifested, shared and garbage-collected exactly like a hand-written one.
2661
2722
  */
2662
2723
  'origin'?: PersistSourcePlanOriginEnum;
2663
2724
  /**
2664
- * What the synthesized rollup covers: the base source it was derived from, the one grain it is built at, and the measures served there. Present only when `origin` is `preaggregate`; null otherwise. Coverage is complete by construction — a measure that cannot be correctly re-aggregated is refused at publish rather than dropped from the rollup — so there is no per-measure omission list to reconcile against the model.
2725
+ * What the synthesized rollup covers: the base source it was derived from, the one grain it is built at, and the measures served there. Present only when `origin` is `rollup`; null otherwise. Coverage is complete by construction — a measure that cannot be correctly re-aggregated is refused at publish rather than dropped from the rollup — so there is no per-measure omission list to reconcile against the model.
2665
2726
  */
2666
2727
  'preaggregate'?: PreaggregatePlan | null;
2667
2728
  /**
@@ -2673,7 +2734,8 @@ export interface PersistSourcePlan {
2673
2734
  */
2674
2735
  'sql': string;
2675
2736
  /**
2676
- * The source\'s declared `#@ persist partition=` columns, resolved against its public projection and reported in the author\'s order, which is the order the stored table\'s directories nest in. Absent or empty means the table is written unpartitioned, which is the default and what every source built before this field existed means. A layout, not an access control. Every term the build strips from a source is re-applied when the artifact is read whether or not its column is partitioned, so a list omitting the column a caller is scoped by costs a full scan and never widens what that caller sees. Consumers should not infer isolation from it. `partition=` requires `storage=`; declared without one it is a publish refusal rather than an ignored key, so this is empty for every colocated source.
2737
+ * Retired and no longer produced: always absent. It reported a source\'s `#@ persist partition=` columns; `partition=` is now a retired key, refused at publish, and every stored table is written unpartitioned. Kept so generated clients that read it still compile.
2738
+ * @deprecated
2677
2739
  */
2678
2740
  'partition'?: Array<string>;
2679
2741
  /**
@@ -2689,7 +2751,7 @@ export interface PersistSourcePlan {
2689
2751
  */
2690
2752
  'refresh'?: string | null;
2691
2753
  /**
2692
- * The source\'s EFFECTIVE freshness objective after most-specific-wins resolution (source > model-file > package). Null = unset at every level; the control plane applies the platform default. Reported verbatim (invalid fields dropped, never defaulted). Valid in both scope modes. (Per-source `sharing`/`schedule` were retired: scope is a single package-level mode and a schedule is package-root-only — declaring either on a source is a publish-time manifest error.) A synthesized rollup (`origin: preaggregate`) declares nothing of its own and gets no freshness policy of its own: it INHERITS its base\'s, so what is reported here is the base source\'s effective objective resolved by the rule above. A rollup and its base therefore go stale together, which is what makes \"serve the base when the rollup is stale\" a safe degradation rather than a change of answer.
2754
+ * The source\'s EFFECTIVE freshness objective after most-specific-wins resolution (source > model-file > package). Null = unset at every level; the control plane applies the platform default. Reported verbatim (invalid fields dropped, never defaulted). Valid in both scope modes. (Per-source `sharing`/`schedule` were retired: scope is a single package-level mode and a schedule is package-root-only — declaring either on a source is a publish-time manifest error.) A synthesized rollup (`origin: rollup`) resolves the same way, with its source level being its own `freshness.window=` / `freshness.fallback=` (on `#(rollup)` or `#@ preaggregate`), field by field over its base\'s own source-level declaration. A rollup that declares nothing therefore goes stale with its base, and a stale rollup is answered from the base, the same answer. A standalone run stamps this resolution on the manifest entries it commits (`freshnessWindowSeconds`, `freshnessFallback`, `dataAsOf`), as a control plane does on the manifest it distributes.
2693
2755
  */
2694
2756
  'freshness'?: Freshness | null;
2695
2757
  /**
@@ -2703,18 +2765,22 @@ export interface PersistSourcePlan {
2703
2765
  */
2704
2766
  'columns': Array<Column>;
2705
2767
  /**
2706
- * All key=value fields of the source\'s `#@ persist` annotation (e.g. `name`, `realization`). The control plane uses `name` as the materialized table name (it may carry a dialect container path like `dataset.table`). Returned as the full set so new persist directives need no publisher change; an unrecognized key rides through here and is reported as a package warning, never a rejection. Recognized keys beyond `name`/`realization`/`storage`, both read from the EFFECTIVE merged tag (a source extending a persisted parent inherits the parent\'s keys, and its own keys merge over them per key): * `watermark` — one output dimension name, monotone non-decreasing. Required by `refresh=\"incremental\"`; the platform derives each refresh\'s half-open range from it. Must be a single quoted string naming a column of `columns`. * `merge_key` — comma-separated output dimension names, none of them the watermark. Declares row identity for a source whose rows are restated with a LATER watermark value, which selects a MERGE apply; omitted, the delta replaces the range instead. Compound keys go in one quoted string (`merge_key=\"order_id, region\"`). Both are validated at publish against the compiled output schema, so a dangling or stale name is rejected rather than deferred to a build. Neither participates in `sourceEntityId`: adding a watermark to an existing source must not re-address its table. For a synthesized rollup (`origin: preaggregate`) the annotation was generated by the publisher rather than authored, so this reports what synthesis emitted. It is still the annotation that governs the build, which is why it is reported the same way: a rollup is an ordinary persist source whose `#@ persist` nobody typed.
2768
+ * All key=value fields of the source\'s `#@ persist` annotation (e.g. `name`, `storage`). The control plane uses `name` as the materialized table name (it may carry a dialect container path like `dataset.table`). The key set is closed: an unrecognized or retired key fails the publish and the load (`persist-unknown-key`, `persist-retired-key`), so a served plan carries only recognized keys. Recognized keys beyond `name`/`storage`, both read from the EFFECTIVE merged tag (a source extending a persisted parent inherits the parent\'s keys, and its own keys merge over them per key): * `watermark` — one output dimension name, monotone non-decreasing. Required by `refresh=\"incremental\"`; the platform derives each refresh\'s half-open range from it. Must be a single quoted string naming a column of `columns`. * `merge_key` — comma-separated output dimension names, none of them the watermark. Declares row identity for a source whose rows are restated with a LATER watermark value, which selects a MERGE apply; omitted, the delta replaces the range instead. Compound keys go in one quoted string (`merge_key=\"order_id, region\"`). Both are validated at publish against the compiled output schema, so a dangling or stale name is rejected rather than deferred to a build. Neither participates in `sourceEntityId`: adding a watermark to an existing source must not re-address its table. For a synthesized rollup (`origin: rollup`) the annotation was generated by the publisher rather than authored, so this reports what synthesis emitted. It is still the annotation that governs the build, which is why it is reported the same way: a rollup is an ordinary persist source whose `#@ persist` nobody typed.
2707
2769
  */
2708
2770
  'annotationFields'?: {
2709
2771
  [key: string]: string;
2710
2772
  };
2711
2773
  /**
2712
- * Package-relative path of the `.malloy` model that declares this source (e.g. `order_rollup.malloy`). The source\'s sourceID embeds an absolute `file://` modelURL with no package boundary, so this is the only place the relative path is exposed; callers use it to deep-link the source back to its model. A synthesized rollup (`origin: preaggregate`) is declared by no model, so this is the model of its base — the file holding the `#@ preaggregate` annotations it was synthesized from, which is where an author would go to change it.
2774
+ * Package-relative path of the `.malloy` model that declares this source (e.g. `order_rollup.malloy`). The source\'s sourceID embeds an absolute `file://` modelURL with no package boundary, so this is the only place the relative path is exposed; callers use it to deep-link the source back to its model. A synthesized rollup (`origin: rollup`) is declared by no model, so this is the model of its base — the file holding the `#@ preaggregate` annotations it was synthesized from, which is where an author would go to change it.
2713
2775
  */
2714
2776
  'modelPath'?: string;
2715
2777
  }
2716
2778
  export declare const PersistSourcePlanOriginEnum: {
2717
2779
  readonly Persist: "persist";
2780
+ readonly Materialize: "materialize";
2781
+ readonly View: "view";
2782
+ readonly Query: "query";
2783
+ readonly Rollup: "rollup";
2718
2784
  readonly Preaggregate: "preaggregate";
2719
2785
  };
2720
2786
  export type PersistSourcePlanOriginEnum = typeof PersistSourcePlanOriginEnum[keyof typeof PersistSourcePlanOriginEnum];
@@ -2857,7 +2923,7 @@ export interface QueryPath {
2857
2923
  'query': QueryShape;
2858
2924
  'servedBy': QueryPathServer;
2859
2925
  /**
2860
- * Every materialized table on the queried source\'s chain, and every rollup of a source on it, that could have answered this query: the one that served it marked `used`, the rest `skipped` with a reason. In the order Publisher tries them: `storage=` tables, then colocated rollups, then colocated `#@ persist` tables nearest first. A table that was not tried because an earlier one answered is left out. Empty when the queried source has no materialized table.
2926
+ * Every materialized table on the queried source\'s chain, and every rollup of a source on it, that could have answered this query: the one that served it marked `used`, the rest `skipped` with a reason. Listed as `storage=` tables, then database rollups, then database tables nearest first, which is not the order Publisher tries them (a persisted view or query, then rollups coarsest first, then the served copy). A table that was not tried because an earlier one answered is left out. Empty when the queried source has no materialized table.
2861
2927
  */
2862
2928
  'considered': Array<QueryPathCandidate>;
2863
2929
  /**
@@ -2865,7 +2931,7 @@ export interface QueryPath {
2865
2931
  */
2866
2932
  'notConsidered': Array<QueryPathNearby>;
2867
2933
  /**
2868
- * The serve verdicts behind this query\'s `WARNED` skips: one per table on the queried source\'s chain that no query can be answered from, each with a code and a sentence for a person. A table whose source the caller cannot list is left out, as in `notConsidered`. Empty when there are none. The package\'s own warnings, and its status, carry the full message and the fixes.
2934
+ * The serve verdicts behind this query\'s `NOT_SERVED` skips: one per table on the queried source\'s chain that no query can be answered from, each with a code and a sentence for a person. A table whose source the caller cannot list is left out, as in `notConsidered`. Empty when there are none. The package\'s own warnings, and its status, carry the full message and the fixes.
2869
2935
  */
2870
2936
  'warnings'?: Array<QueryPathWarning>;
2871
2937
  }
@@ -2876,12 +2942,16 @@ export interface QueryPathCandidate {
2876
2942
  'tableId': string;
2877
2943
  'kind': QueryPathTableKind;
2878
2944
  /**
2879
- * `used`, the table answered; `skipped`, it could not, and `reason` says why.
2945
+ * The mechanism that declared the table, as `PersistSourcePlan.origin` names it. `kind: materialized` is `persist` or `materialize`. Absent when `kind` is `live`, or when the table\'s mechanism is not known.
2946
+ */
2947
+ 'origin'?: QueryPathCandidateOriginEnum;
2948
+ /**
2949
+ * `used`, the table answered; `skipped`, it could not, and `reason` says why. A rollup the rollup leg tried carries that rollup\'s own `reason` and `detail`, so two rollups of one source skipped for different reasons report each its own; one the leg never tried carries the leg\'s.
2880
2950
  */
2881
2951
  'outcome': QueryPathCandidateOutcomeEnum;
2882
2952
  'reason'?: SkipReason;
2883
2953
  /**
2884
- * For a `WARNED` skip, the serve verdict\'s reason the table answers no query: `storage_mode`, `unreachable`, `row_level_gate`, `refused`, `shadowed` or `served_copy` (see `QueryPathWarning`); or, for a table only the served copy reads, `served-copy-not-served` (the package warning of that code) or `persist-opt-out` (the queried source opts out with `#@ -persist`). An open set. Absent on any other outcome, and on a `WARNED` skip whose verdict is not known.
2954
+ * For a `NOT_SERVED` skip, the serve verdict\'s reason the table answers no query, from the same set as `QueryPathWarning.code`; for a table only the served copy reads, `served_copy` also when the served copy does not re-root the queried source (the `served-copy-not-served` package warning says why). Always snake_case. An open set. Absent on any other outcome, and on a `NOT_SERVED` skip whose verdict is not known. Retained, no longer produced (shipped in 0.14.0): `served-copy-not-served`, now `served_copy`; `persist-opt-out`, now the skip reason `OPTED_OUT`.
2885
2955
  */
2886
2956
  'code'?: string;
2887
2957
  /**
@@ -2889,6 +2959,14 @@ export interface QueryPathCandidate {
2889
2959
  */
2890
2960
  'detail'?: string;
2891
2961
  }
2962
+ export declare const QueryPathCandidateOriginEnum: {
2963
+ readonly Persist: "persist";
2964
+ readonly Materialize: "materialize";
2965
+ readonly View: "view";
2966
+ readonly Query: "query";
2967
+ readonly Rollup: "rollup";
2968
+ };
2969
+ export type QueryPathCandidateOriginEnum = typeof QueryPathCandidateOriginEnum[keyof typeof QueryPathCandidateOriginEnum];
2892
2970
  export declare const QueryPathCandidateOutcomeEnum: {
2893
2971
  readonly Used: "used";
2894
2972
  readonly Skipped: "skipped";
@@ -2900,6 +2978,10 @@ export type QueryPathCandidateOutcomeEnum = typeof QueryPathCandidateOutcomeEnum
2900
2978
  export interface QueryPathNearby {
2901
2979
  'tableId': string;
2902
2980
  'kind': QueryPathTableKind;
2981
+ /**
2982
+ * The mechanism that declared the table, as `PersistSourcePlan.origin` names it. `kind: materialized` is `persist` or `materialize`. Absent when `kind` is `live`, or when the table\'s mechanism is not known.
2983
+ */
2984
+ 'origin'?: QueryPathNearbyOriginEnum;
2903
2985
  /**
2904
2986
  * The source the table materializes; for a rollup, the source it rolls up.
2905
2987
  */
@@ -2913,6 +2995,14 @@ export interface QueryPathNearby {
2913
2995
  */
2914
2996
  'built': boolean;
2915
2997
  }
2998
+ export declare const QueryPathNearbyOriginEnum: {
2999
+ readonly Persist: "persist";
3000
+ readonly Materialize: "materialize";
3001
+ readonly View: "view";
3002
+ readonly Query: "query";
3003
+ readonly Rollup: "rollup";
3004
+ };
3005
+ export type QueryPathNearbyOriginEnum = typeof QueryPathNearbyOriginEnum[keyof typeof QueryPathNearbyOriginEnum];
2916
3006
  export declare const QueryPathNearbyRelationshipEnum: {
2917
3007
  readonly Sibling: "sibling";
2918
3008
  readonly Below: "below";
@@ -2923,10 +3013,18 @@ export type QueryPathNearbyRelationshipEnum = typeof QueryPathNearbyRelationship
2923
3013
  */
2924
3014
  export interface QueryPathServer {
2925
3015
  'kind': QueryPathTableKind;
3016
+ /**
3017
+ * The mechanism that declared the table, as `PersistSourcePlan.origin` names it. `kind: materialized` is `persist` or `materialize`. Absent when `kind` is `live`, or when the table\'s mechanism is not known.
3018
+ */
3019
+ 'origin'?: QueryPathServerOriginEnum;
2926
3020
  /**
2927
3021
  * The table that answered. Absent when `kind` is `live`.
2928
3022
  */
2929
3023
  'tableId'?: string;
3024
+ /**
3025
+ * Where the table that answered lives: `database`, the source\'s own database, or `storage`, a `storage=` destination. The same tier the query result\'s `servedFrom` reports. Absent when `kind` is `live`.
3026
+ */
3027
+ 'tier'?: QueryPathServerTierEnum;
2930
3028
  /**
2931
3029
  * The moment the table\'s rows reflect, as on its manifest entry. Absent when `kind` is `live`, or when the manifest entry does not record it.
2932
3030
  */
@@ -2936,11 +3034,25 @@ export interface QueryPathServer {
2936
3034
  */
2937
3035
  'via'?: string;
2938
3036
  }
3037
+ export declare const QueryPathServerOriginEnum: {
3038
+ readonly Persist: "persist";
3039
+ readonly Materialize: "materialize";
3040
+ readonly View: "view";
3041
+ readonly Query: "query";
3042
+ readonly Rollup: "rollup";
3043
+ };
3044
+ export type QueryPathServerOriginEnum = typeof QueryPathServerOriginEnum[keyof typeof QueryPathServerOriginEnum];
3045
+ export declare const QueryPathServerTierEnum: {
3046
+ readonly Database: "database";
3047
+ readonly Storage: "storage";
3048
+ };
3049
+ export type QueryPathServerTierEnum = typeof QueryPathServerTierEnum[keyof typeof QueryPathServerTierEnum];
2939
3050
  /**
2940
- * What kind of answer: `view`, a persisted view\'s table; `rollup`, a pre-aggregation; `materialized`, a materialized source\'s table; `live`, the source\'s own warehouse.
3051
+ * What kind of answer: `view`, a persisted view\'s table; `query`, a persisted named query\'s table (`#@ persist` on a top-level `query:`); `rollup`, a pre-aggregation; `materialized`, a materialized source\'s table (`origin` `persist` or `materialize`; this kind is not extended); `live`, the source\'s own warehouse. A client treats a kind it does not know as a materialized table it cannot name.
2941
3052
  */
2942
3053
  export declare const QueryPathTableKind: {
2943
3054
  readonly View: "view";
3055
+ readonly Query: "query";
2944
3056
  readonly Rollup: "rollup";
2945
3057
  readonly Materialized: "materialized";
2946
3058
  readonly Live: "live";
@@ -2951,7 +3063,7 @@ export type QueryPathTableKind = typeof QueryPathTableKind[keyof typeof QueryPat
2951
3063
  */
2952
3064
  export interface QueryPathWarning {
2953
3065
  /**
2954
- * The serve verdict\'s reason: `storage_mode` (built into storage, but the server\'s PERSIST_STORAGE_MODE routes no query to it), `unreachable` (no published source reaches it), `row_level_gate` (every published entry point over it carries a gate it cannot keep yet), `refused` (the package refuses to serve it), `shadowed` (its storage table is bound to another source of the same name) or `served_copy` (only the served copy reads it, and it does not answer from it). An open set: treat a code you do not know as a warning like any other.
3066
+ * The serve verdict\'s reason (`ServeVerdict.reason`): `refused` (the package refuses to serve it), `storage_mode` (built into storage, but the server\'s PERSIST_STORAGE_MODE routes no query to it), `unreachable` (no published source reaches it), `row_level_gate` (every published entry point over it carries a gate it cannot keep yet), `stale` (past its freshness window, with a fallback that does not serve stale), `shadowed` (its storage table is bound to another source of the same name), `destination_missing` (`storage=` names a destination the environment does not configure), `connection_cannot_hold_table` (its connection creates no tables), `materialization_off` (only the served copy reads it, and the served copy is off) or `served_copy` (only the served copy reads it, and the served copy does not re-root it). An open set: treat a code you do not know as a warning like any other.
2955
3067
  */
2956
3068
  'code': string;
2957
3069
  /**
@@ -3049,7 +3161,7 @@ export interface QueryResult {
3049
3161
  */
3050
3162
  'queryRowLimitSource'?: QueryResultQueryRowLimitSourceEnum;
3051
3163
  /**
3052
- * How this answer was produced, when the query reached the storage routing decision at all. `storage` — served from a materialized table in a `storage=` destination, via the virtual-source transform. The source\'s own warehouse was not queried. `live_fallback` — the query DID route to storage and the store then failed underneath it, and the source\'s freshness fallback allowed it to degrade to the live warehouse. **The rows are correct and the request succeeded**, which is why this needs its own value: it is indistinguishable from a storage hit at the call site, and treating it as one would report a healthy hit rate for a broken store. This value is NOT the same event as the `live_fallback` label on `publisher_storage_serve_routing_total` — see the warning below. **This field describes the `storage=` tier and nothing else.** It records how the storage routing decision came out, so it says nothing about the colocated `#@ persist` tier, which answers a query by substituting the materialized table into the model and never reaches that decision. **Null is three different outcomes**, and they are worth telling apart because two of them mean materialization worked and one means it silently did not: 1. The query never had a storage binding to consider — every query on a deployment with no `storage=` sources, which is the default. 2. It was answered from a **colocated** materialized table. The query never reached the routing decision, so a fully materialized answer reports the same null a fully live one does. 3. The storage transform was **ineligible** for this query, so it was served live. The query DID reach the routing decision and the tier declined it — a storage-tier miss, reported identically to \"no materialization exists anywhere.\" Case 3 is the one that costs time, because nothing about this field distinguishes it from case 1. `path`, the path report, does: it names the table that answered in every tier, and why each table that could have answered did not. The server does log it: one `storage serve-shape ineligible for this query; serving live` line at INFO per routed query, carrying the compile error that made the shape ineligible, plus `shapeSources` (what the shape offered) and `staleSources` (bound, but withheld by the freshness gate). The compile error alone does not separate those: `Reference to undefined object \'x\'` reads identically whether `x` carries no `#@ persist` at all or is materialized and merely past its freshness window. That log is currently the only per-query account of a storage-tier miss. It is not a hypothetical shape — a source warehouse that folds unquoted identifiers to upper case made every query on every `storage=` source in a package ineligible, and the whole tier reported null for months while looking exactly like a deployment that had never enabled it. For the colocated tier there is no per-query signal at all. The package-grain fields are the nearest thing — `manifestBindingStatus`, `manifestEntryCount` and `storageServeBindings` — but read what each actually claims: `bound` reports that the bind ran to completion, explicitly NOT that any query routes to a materialized table, and `manifestEntryCount` counts colocated entries only, so a package whose sources are all `storage=` reports 0 while being fully bound. ⚠️ **`live_fallback` names two different things across two surfaces, and correlating them on the token is wrong in both directions.** On this field it means the store failed at run time. On `publisher_storage_serve_routing_total{outcome}` it means the transform was ineligible — this field\'s null case 3 — and that metric spells the run-time failure `runtime_live_fallback`. So the field\'s `live_fallback` is the metric\'s `runtime_live_fallback`, and the metric\'s `live_fallback` is this field\'s `null`. A third surface, `manifestBindingStatus`, uses the same token for a third thing: a configured `manifestLocation` whose fetch or bind failed. Each surface is internally consistent; none of them means what the others do.
3164
+ * Which tier answered this query, when a materialized table did. `storage` — served from a materialized table in a `storage=` destination, via the virtual-source transform. The source\'s own warehouse was not queried. `database` — served from a materialized table in the source\'s own database (`colocated` in releases before this one): a database `#@ persist` table Malloy substituted, a database `#(materialize)` table the served copy read, or a database rollup or persisted view. `live_fallback` — the query DID route to storage and the store then failed underneath it, and the source\'s freshness fallback allowed it to degrade to the live warehouse. **The rows are correct and the request succeeded**, which is why this needs its own value: it is indistinguishable from a storage hit at the call site, and treating it as one would report a healthy hit rate for a broken store. On `publisher_query_route_total` the same event is the answering leg\'s `outcome=\"fallback\", reason=\"RUN_FAILED\"`. Null means no materialized table answered: the query was served live. `path`, the path report, says why each table that could have answered did not, and `path.servedBy.tier` names the same tier this field does. The server also logs a `served copy cannot answer this query` line at DEBUG, carrying the error that declined the query and its decline code. `live_fallback` here means the store failed at run time for this query. A configured `manifestLocation` whose fetch or bind failed is `manifestBindingStatus: bind_failed` (releases before this one spelled that `live_fallback` too).
3053
3165
  */
3054
3166
  'servedFrom'?: QueryResultServedFromEnum | null;
3055
3167
  /**
@@ -3061,7 +3173,7 @@ export interface QueryResult {
3061
3173
  */
3062
3174
  'queryCostBytes'?: number | null;
3063
3175
  /**
3064
- * The path report: what answered this query and why. It names the materialized table that served it (or `live`), every materialized table on the queried source\'s chain with the reason each one that did not answer was skipped, and nearby tables the query could not use. Unlike `servedFrom`, it covers the colocated `#@ persist` tier and pre-aggregation rollups as well as `storage=`, so a null `servedFrom` no longer hides whether a table answered. Absent only when the report could not be assembled; the query\'s answer never depends on it.
3176
+ * The path report: what answered this query and why. It names the materialized table that served it (or `live`), every materialized table on the queried source\'s chain with the reason each one that did not answer was skipped, and nearby tables the query could not use, for every tier. Absent only when the report could not be assembled; the query\'s answer never depends on it.
3065
3177
  */
3066
3178
  'path'?: QueryPath;
3067
3179
  }
@@ -3072,6 +3184,7 @@ export declare const QueryResultQueryRowLimitSourceEnum: {
3072
3184
  export type QueryResultQueryRowLimitSourceEnum = typeof QueryResultQueryRowLimitSourceEnum[keyof typeof QueryResultQueryRowLimitSourceEnum];
3073
3185
  export declare const QueryResultServedFromEnum: {
3074
3186
  readonly Storage: "storage";
3187
+ readonly Database: "database";
3075
3188
  readonly LiveFallback: "live_fallback";
3076
3189
  };
3077
3190
  export type QueryResultServedFromEnum = typeof QueryResultServedFromEnum[keyof typeof QueryResultServedFromEnum];
@@ -3170,7 +3283,7 @@ export declare const RawNotebookFormatEnum: {
3170
3283
  };
3171
3284
  export type RawNotebookFormatEnum = typeof RawNotebookFormatEnum[keyof typeof RawNotebookFormatEnum];
3172
3285
  /**
3173
- * SNAPSHOT = warehouse clone/snapshot; COPY = CREATE TABLE AS SELECT.
3286
+ * COPY = CREATE TABLE AS SELECT, the only realization built. SNAPSHOT (a warehouse clone or snapshot) is refused.
3174
3287
  */
3175
3288
  export declare const Realization: {
3176
3289
  readonly Snapshot: "SNAPSHOT";
@@ -3178,11 +3291,15 @@ export declare const Realization: {
3178
3291
  };
3179
3292
  export type Realization = typeof Realization[keyof typeof Realization];
3180
3293
  /**
3181
- * One `#@ persist` source refused at compile time, and why. Computed from the SAME tier-appropriate eligibility assert the build path itself enforces (the colocated tier\'s post-relaxation admission for a proven row-level, fully-attributed authorize gate applies here too), so a source this reports as refused is refused for the tier it would actually build under — never the unconditional `storage=`-destination check applied to a source that declares no `storage=`. A `preaggregate`-tier entry can coexist with an entry of the same sourceID in `BuildPlan.sources` — the one tier where refused-and-present-in-sources is the correct, intended state, unlike `storage`/`colocated` where a refusal means absence from `sources`.
3294
+ * One valid materialization declaration Publisher does not build here, and why: the one refusal record for every mechanism (`#@ persist`, `#(materialize)`, a persisted view or named query, and a rollup). It is answered live, and the package carries one `*-not-built` warning for it (`persist-not-built`, `materialize-not-built`, `persist-view-not-built`, `persist-query-not-built` or `rollup-not-built`) with this `message`. A `#@ persist` source\'s gate refusal is computed from the SAME tier-appropriate eligibility assert the build path itself enforces (the database tier\'s post-relaxation admission for a proven row-level, fully-attributed authorize gate applies here too), so a source this reports as refused is refused for the tier it would actually build under. A rollup\'s entry (`origin: rollup`) can coexist with an entry of the same sourceID in `BuildPlan.sources`: the one mechanism where refused-and-present-in-sources is the correct, intended state; for every other a refusal means absence from `sources`.
3182
3295
  */
3183
3296
  export interface RefusedSource {
3184
3297
  /**
3185
- * The source\'s declared name.
3298
+ * The mechanism that declared it, as `PersistSourcePlan.origin` names it: `persist`, `materialize`, `view`, `query`, or `rollup`. Read this, not `tier`, to tell a rollup\'s refusal. Absent on a record a release before this one wrote, where `tier: preaggregate` marked a rollup.
3299
+ */
3300
+ 'origin'?: RefusedSourceOriginEnum;
3301
+ /**
3302
+ * The declaration\'s name: a source\'s declared name, a persisted view\'s or query\'s generated build source name (`<source>__<view>__view`, `<query>__query`), a planned rollup\'s generated name, or, for a rollup measure refused before its rollup is planned, `<base>.<measure>`.
3186
3303
  */
3187
3304
  'name': string;
3188
3305
  /**
@@ -3194,22 +3311,31 @@ export interface RefusedSource {
3194
3311
  */
3195
3312
  'modelPath'?: string;
3196
3313
  /**
3197
- * Which build path this source was evaluated against: `storage` for a source declaring `#@ persist storage=<ref>` (evaluated against the full storage-destination eligibility gate, which never admits an authorize-gated source); `colocated` for a plain `#@ persist` (evaluated against the colocated gate, which admits a proven row-level, fully-attributed gate); `preaggregate` for a `#@ preaggregate` rollup (evaluated against the pre-aggregation gate, which refuses unconditionally when the rollup\'s base is authorize-gated — rollups group away the gate column, so there is no row-level admission the way colocated has).
3314
+ * Which build path this declaration was evaluated against: `storage` for one declaring `storage=<ref>` (a `#@ persist` source is evaluated against the full storage-destination eligibility gate, which never admits an authorize-gated source); `database` for one built in its own connection\'s database (a `#@ persist` source is evaluated against the database gate, which admits a proven row-level, fully-attributed gate). A rollup\'s is its own placement, as any other mechanism\'s. `preaggregate` is retained, no longer produced: releases before this one said it for a rollup, whatever its placement; read `origin` for the mechanism. `colocated` is retained, no longer produced: it is what releases before this one said for `database`, and a client should read it as `database`.
3198
3315
  */
3199
3316
  'tier': RefusedSourceTierEnum;
3200
3317
  /**
3201
- * The bounded refusal reason. Only the compile-time reasons can appear here — `free_parameter`, `authorize`, the four that name where a given the build could not strip sits (`given_in_persisted_query`, `dynamic_projection`, `dynamic_join`, `dynamic_joined_where`), the three that name an unusable `partition=` (`partition_without_storage`, `partition_column_unknown`, `partition_column_not_public`), `merge_key_scope_unresolved` (a `merge_key=` whose caller scope cannot be expressed over the stored table\'s own columns), `preaggregate_over_dynamic_source` (a rollup whose base is scoped by a given, which has no read-time re-application to put the term back), `read_only_dialect` (a colocated `#@ persist` on a source whose dialect cannot create tables; SQL Server today, whose connection reports `canPersist: false`), `env_reference` (a source with an `@env.` reference on one of its `#@` lines, whose directives are all ignored, so it serves live rather than build into the source warehouse), and `rollup_name_collision` (a pre-aggregation rollup whose generated name, and so its table, is also another model\'s rollup with different content; neither builds or serves, and each model answers from its base) — those being the only reasons the two compile-time eligibility asserts this collection is computed from produce. `given_in_persisted_query` is raised by BOTH gates, for one condition: the BUILD would substitute a given\'s value, so the artifact holds one caller\'s slice. On colocated that is a build that runs and lies; on a storage destination the same placement also leaves nothing for the read to re-apply. A given in the source\'s extend block is neither — it is left out of the build and applied per caller at read — and is admitted on both tiers. `given` is retained for records that already carry it and is no longer produced. It was the storage tier\'s blanket refusal of any given reference, and the positional reasons above replaced it: where a given sits decides the outcome, so a single reason covering every placement can no longer be raised. `not_duckdb_portable` is decided against the post-build captured schema, which does not exist at compile time, and `public_surface_unknown` is raised by the build-time narrowing of a stored table to the source\'s public columns; both are listed only because they share the enum the runtime eligibility metric uses.
3318
+ * The bounded refusal reason; `message` says the specifics. On every mechanism: `free_parameter`; a row-level gate the table could not keep, named by the gate\'s kind, `access_filter` for a row filter (`#(access_filter)`, any of the gates that refused it) and `authorize` for a lock (`#(authorize)`); `reads_given`, the one reason every mechanism gives for a stored result that would read a given, so its table would hold one caller\'s rows or could not be read per caller (a given in a `#@ persist` source\'s persisted query, in a field it declares, in a join\'s `on:` condition or in a source it joins that is not stored per caller; a persisted view or query whose result reads one; a rollup whose build reads one), with `message` naming where the given sits; `inherited_where_with_given` (a given-reading `where:` or dimension the declaration inherits from a source it is built from, in its own file or another, rather than writing it in its own declaration: only the declaration\'s own terms are re-applied over the stored table at read; move the `where:` onto the persisted source to serve it from a table); `given_where_over_unstored_field` (a given-reading `where:` of the declaration\'s own over a field its table does not store, so it cannot be re-applied over the table at read: a field the rollup\'s grain drops, which adding it to the grain fixes, or on `#(materialize)` a field that is not a stored dimension); `merge_key_scope_unresolved` (a `merge_key=` whose caller scope cannot be expressed over the stored table\'s own columns); `connection_cannot_hold_table` (a database build on a connection that cannot create tables; SQL Server today, whose connection reports `canPersist: false`: the same words as the serve verdict\'s reason for the same case); `needs_qualified_name` (a database table on BigQuery, where a table needs a dataset, whose `name=` names none: a `#@ persist` source, a persisted view or query, a `#(materialize)` source, or a rollup whose own `name=` and base\'s give no container; refused at plan, before any warehouse work); `storage_source_unsupported` (`storage=` on a source whose connection the build cannot pass through to a destination, e.g. the package\'s DuckDB sandbox); `table_name_collision` (under `PERSIST_COLLISION_ENFORCE=false`, a declaration whose `name=` puts it on one table with another, so neither is built; by default such a package does not load; a run also records it in its `metadata.refusedSources` for a source whose readable table name another source\'s table already takes in that run); `current_time` (the build reads the current time, `now`, or keeps rows older than a moving cut-off it cannot leave out, so its table would hold the rows as of the build; `now` in the source\'s own extend block is applied at every read and is admitted); `incremental_unsupported` (a valid incremental declaration this deployment\'s dialect or destination cannot honour). A persisted view or named query: `materialization_off` (persisted named queries are built only with `PUBLISHER_MATERIALIZE` on), `multi_line_annotation` (its `#@` line spans more than one line), `build_name_collision` (its generated build source\'s name is one the model, or another persisted view, already takes), `run_target_unsupported` (its source is declared in another file, is not in the model\'s namespace, or cannot be read), `nested_result` (a result that nests, which its table cannot answer yet), `access_filter` or `authorize` (it reaches a row-level gate its stored result cannot keep, named by the gate\'s kind), `reads_given` (its result reads a given), `current_time` (its result reads `now`), `no_stored_columns` (it has no stage to store) and `generated_build_failed` (its build does not compile on its own). A `#(materialize)` source: `inherited_persist` (it inherits `#@ persist`, so it is already its base\'s table), `inline_unsupported` (an `inline=` join or pair-table layout the build cannot store), `no_stored_columns` (the source has no dimension to store), `needs_qualified_name` (as above), `time_zone` (the source sets its own time zone, which its stored columns cannot follow at read), and `generated_build_failed` (Publisher could not write or compile its generated build, a Publisher bug worth reporting). A rollup (`#(rollup)` or `#@ preaggregate`): `hidden_field` (a measure or grain dimension the published surface hides, which a rollup would publish), `access_filter` or `authorize` (a row-level gate a rollup cannot re-apply to its rows, named by the gate\'s kind as on every mechanism), `time_zone` (the source sets its own time zone, so no query reads the rollup), `unreadable_measure` (a measure definition outside what a rollup reads), `join_not_in_grain` (a measure that aggregates through a join its grain does not key, or through a fan-out join), `partial_name_collision` (a field already takes the name of the measure\'s stored partial), and `unreadable_grain` (a `storage=` rollup over a DuckDB source whose grain dimension is stored as a type no stored read declares, a BLOB, INTERVAL, MAP or JSON, so no query would read its table; database, it is built). Retained, no longer produced: `given` (replaced by the positional given reasons above), `given_in_persisted_query` (shipped in 0.14.0: a `#@ persist` source\'s persisted query, or a `#(materialize)` source, whose build reads a given; now `reads_given`, the one name every mechanism gives the case), `preaggregate_over_dynamic_source` (shipped in 0.14.0: a rollup over a caller-scoped source, now `reads_given`, `given_where_over_unstored_field` or `inherited_where_with_given`, as every mechanism names the same case), `dynamic_projection`, `dynamic_join` and `dynamic_joined_where` (a `storage=` `#@ persist` source\'s given in a field it declares, in a join\'s `on:` condition, or in a source it joins; now `reads_given`, whose `message` still names the position), `not_duckdb_portable` (a `storage=` table no column of which Malloy can type is now built, and its source is answered live), the three `partition_*` reasons (`partition=` is a retired key, which fails the publish and the load as `persist-retired-key` or `materialize-retired-key`), `env_reference` and `empty_storage` (invalid annotations, which fail the publish and the load, so no served package reports them; the plan keeps refusing such a source as a backstop, so a plan computed without the load\'s check can still carry one), and `rollup_name_collision` (a rollup\'s generated name digests its declaring source, so no two rollups share one). `read_only_dialect` (shipped in 0.14.0: now `connection_cannot_hold_table`). `public_surface_unknown` is raised by the build-time narrowing of a stored table to the source\'s public columns, never by a plan; it shares the enum with the eligibility metric.
3202
3319
  */
3203
3320
  'reason': RefusedSourceReasonEnum;
3204
3321
  /**
3205
- * The full, human-readable refusal message the eligibility assert produced — the same text a build attempting this source would 422 with.
3322
+ * The full, human-readable refusal message, the text of the declaration\'s `*-not-built` warning. For a `#@ persist` gate refusal it is the same text a build attempting the source would 422 with.
3206
3323
  */
3207
3324
  'message': string;
3208
3325
  }
3326
+ export declare const RefusedSourceOriginEnum: {
3327
+ readonly Persist: "persist";
3328
+ readonly Materialize: "materialize";
3329
+ readonly View: "view";
3330
+ readonly Query: "query";
3331
+ readonly Rollup: "rollup";
3332
+ };
3333
+ export type RefusedSourceOriginEnum = typeof RefusedSourceOriginEnum[keyof typeof RefusedSourceOriginEnum];
3209
3334
  export declare const RefusedSourceTierEnum: {
3210
3335
  readonly Storage: "storage";
3211
- readonly Colocated: "colocated";
3336
+ readonly Database: "database";
3212
3337
  readonly Preaggregate: "preaggregate";
3338
+ readonly Colocated: "colocated";
3213
3339
  };
3214
3340
  export type RefusedSourceTierEnum = typeof RefusedSourceTierEnum[keyof typeof RefusedSourceTierEnum];
3215
3341
  export declare const RefusedSourceReasonEnum: {
@@ -3219,6 +3345,7 @@ export declare const RefusedSourceReasonEnum: {
3219
3345
  readonly DynamicProjection: "dynamic_projection";
3220
3346
  readonly DynamicJoin: "dynamic_join";
3221
3347
  readonly DynamicJoinedWhere: "dynamic_joined_where";
3348
+ readonly InheritedWhereWithGiven: "inherited_where_with_given";
3222
3349
  readonly PartitionWithoutStorage: "partition_without_storage";
3223
3350
  readonly PartitionColumnUnknown: "partition_column_unknown";
3224
3351
  readonly PartitionColumnNotPublic: "partition_column_not_public";
@@ -3228,8 +3355,33 @@ export declare const RefusedSourceReasonEnum: {
3228
3355
  readonly NotDuckdbPortable: "not_duckdb_portable";
3229
3356
  readonly PublicSurfaceUnknown: "public_surface_unknown";
3230
3357
  readonly ReadOnlyDialect: "read_only_dialect";
3358
+ readonly ConnectionCannotHoldTable: "connection_cannot_hold_table";
3359
+ readonly StorageSourceUnsupported: "storage_source_unsupported";
3231
3360
  readonly EnvReference: "env_reference";
3232
3361
  readonly RollupNameCollision: "rollup_name_collision";
3362
+ readonly EmptyStorage: "empty_storage";
3363
+ readonly TableNameCollision: "table_name_collision";
3364
+ readonly CurrentTime: "current_time";
3365
+ readonly ReadsGiven: "reads_given";
3366
+ readonly IncrementalUnsupported: "incremental_unsupported";
3367
+ readonly MaterializationOff: "materialization_off";
3368
+ readonly MultiLineAnnotation: "multi_line_annotation";
3369
+ readonly BuildNameCollision: "build_name_collision";
3370
+ readonly RunTargetUnsupported: "run_target_unsupported";
3371
+ readonly NestedResult: "nested_result";
3372
+ readonly InheritedPersist: "inherited_persist";
3373
+ readonly InlineUnsupported: "inline_unsupported";
3374
+ readonly NoStoredColumns: "no_stored_columns";
3375
+ readonly NeedsQualifiedName: "needs_qualified_name";
3376
+ readonly GeneratedBuildFailed: "generated_build_failed";
3377
+ readonly HiddenField: "hidden_field";
3378
+ readonly AccessFilter: "access_filter";
3379
+ readonly TimeZone: "time_zone";
3380
+ readonly UnreadableMeasure: "unreadable_measure";
3381
+ readonly JoinNotInGrain: "join_not_in_grain";
3382
+ readonly PartialNameCollision: "partial_name_collision";
3383
+ readonly GivenWhereOverUnstoredField: "given_where_over_unstored_field";
3384
+ readonly UnreadableGrain: "unreadable_grain";
3233
3385
  };
3234
3386
  export type RefusedSourceReasonEnum = typeof RefusedSourceReasonEnum[keyof typeof RefusedSourceReasonEnum];
3235
3387
  /**
@@ -3588,19 +3740,19 @@ export interface ServeVerdict {
3588
3740
  */
3589
3741
  'modelPath'?: string;
3590
3742
  /**
3591
- * `persist` for a source a modeler annotated, `preaggregate` for a rollup the publisher synthesized. A string, not an enum, so a new kind of variant needs no client change.
3743
+ * The mechanism that declared the stored source: `persist` for `#@ persist` on a source, `materialize` for `#(materialize)`, `view` for `#@ persist` on a view, `query` for `#@ persist` on a named `query:`, and `rollup` for a rollup the publisher synthesized (`#(rollup)`, or v1\'s `#@ preaggregate`). A string, not an enum, so a new kind of variant needs no client change. `preaggregate` is retained, no longer produced: releases before this one said it for `rollup`.
3592
3744
  */
3593
3745
  'origin': string;
3594
3746
  /**
3595
- * Where its table lives: `colocated` (the source\'s own connection) or `storage` (a `storage=` destination).
3747
+ * Where its table lives: `database` (the source\'s own connection\'s database) or `storage` (a `storage=` destination). `colocated` is retained, no longer produced: releases before this one said it for `database`, so a client should accept both.
3596
3748
  */
3597
3749
  'tier': string;
3598
3750
  /**
3599
- * `serves`: its table is bound and queries can be answered from it. `not_built`: nothing is bound yet; queries are answered from its table once a build binds it. `live`: no query is answered from it, for `reason`, until something changes.
3751
+ * `serves`: its table is bound and queries can be answered from it. `awaiting_build`: nothing is bound yet; queries are answered from its table once a build binds it (unlike a `*-not-built` package warning, which names a declaration that is refused and is never built here). `live`: no query is answered from it, for `reason`, until something changes. `not_built` is retained, no longer produced: releases before this one said it for `awaiting_build`.
3600
3752
  */
3601
3753
  'verdict': string;
3602
3754
  /**
3603
- * For a `live` verdict, why: `refused` (the plan refused to build it), `storage_mode` (`storage=` while `PERSIST_STORAGE_MODE` is not `on`), `rollup_over_stored_base` (a rollup over a `storage=` base, left out of the plan), `unreachable` (no source on the package\'s published surface reads it), `row_level_gate` (every query through it carries an `#(authorize)` or `#(access_filter)` gate, which the storage tier and rollups cannot keep yet), `shadowed` (its storage table is bound, but every model\'s source of that name is another source), `destination_missing` (`storage=` names a destination the environment does not configure), `connection_cannot_hold_table` (colocated, on a connection whose type creates no tables), `served_copy` (a `#(materialize)` source, which only the served copy reads: the served copy is off, no model\'s served copy reads its table, or it is colocated, which the served copy does not serve yet). An open set.
3755
+ * For a `live` verdict, why: `refused` (the plan refused to build it), `storage_mode` (`storage=` while `PERSIST_STORAGE_MODE` is not `on`), `unreachable` (no source on the package\'s published surface reads it), `row_level_gate` (every query through it carries an `#(authorize)` or `#(access_filter)` gate its table cannot keep yet, on either tier), `stale` (its table is past its freshness window, and its fallback does not serve stale), `shadowed` (its storage table is bound, but every model\'s source of that name is another source), `destination_missing` (`storage=` names a destination the environment does not configure), `connection_cannot_hold_table` (database, on a connection whose type creates no tables), `materialization_off` (a `#(materialize)` source, which only the served copy reads, and the served copy is off: `PUBLISHER_MATERIALIZE`, and for `storage=` `PERSIST_STORAGE_MODE`), `served_copy` (a `#(materialize)` source whose table is bound, but no model\'s served copy re-roots it; the `served-copy-not-served` warning says why). An open set.
3604
3756
  */
3605
3757
  'reason'?: string;
3606
3758
  /**
@@ -3612,15 +3764,25 @@ export interface ServeVerdict {
3612
3764
  */
3613
3765
  'fixes'?: Array<string>;
3614
3766
  /**
3615
- * On a dry run: the path that will answer queries on this source (the v1 cutover\'s, now the only one), judged by compiling the package\'s served copy over bindings declared from the plan\'s output columns (no table is built): `served_copy` (the served copy re-roots it on its table), `rollup` (a rollup the rollup leg reads), or `live`, with `cutoverReason`. An open string, so a later release can add a path; treat an unknown value as `live`.
3767
+ * On a dry run: the path that will answer queries on this source, judged by compiling the package\'s served copy over bindings declared from the plan\'s output columns (no table is built): `served_copy` (the served copy re-roots it on its table, or reads it through a base it re-roots), `rollup` (a rollup the rollup leg reads), or `live`, with `servePathReason`. An open string, so a later release can add a path; treat an unknown value as `live`.
3768
+ */
3769
+ 'servePath'?: string;
3770
+ /**
3771
+ * Why the path is what it is, when that is not the source\'s own table. With a `live` `servePath`: `refused` (the plan refused it), `inherited_gate` (a row-level gate declared on a base the served copy replaces, which it cannot graft), the served copy\'s reason for leaving the source as written (`column_types`, `fields_not_carried`, `read_terms_not_kept`, `compile_failed`, and the like), the verdict\'s own `reason`, or `not_rerooted` when none names one. With a `served_copy` `servePath`: `through_base` (an extension of a re-rooted source, left as written, which reads that source\'s table by name). An open string.
3772
+ */
3773
+ 'servePathReason'?: string;
3774
+ /**
3775
+ * Deprecated: the same value as `servePath`, under its old name. Emitted beside it for this release only.
3776
+ * @deprecated
3616
3777
  */
3617
3778
  'cutoverPath'?: string;
3618
3779
  /**
3619
- * With a `live` `cutoverPath`, why: the served copy\'s reason for leaving the source as written (`column_types`, `fields_not_carried`, `read_terms_not_kept`, `compile_failed`, and the like), or `not_rerooted` when it names none. An open string.
3780
+ * Deprecated: the same value as `servePathReason`, under its old name. Emitted beside it for this release only.
3781
+ * @deprecated
3620
3782
  */
3621
3783
  'cutoverReason'?: string;
3622
3784
  /**
3623
- * On a dry run, for a source stored with `storage=`: each named view on it, and whether it compiles against the serve shape. A view that does not is answered live, and `detail` carries the compile error that says why (usually a field the shape cannot reproduce).
3785
+ * On a dry run, for a source stored with `storage=`: each named view on it, and whether it compiles against a compile-only served copy. A view that does not is answered live, and `detail` carries the compile error that says why (usually a field the stored table cannot reproduce).
3624
3786
  */
3625
3787
  'views'?: Array<ViewServeVerdict>;
3626
3788
  }
@@ -3743,6 +3905,10 @@ export interface ServerStatusLoadErrorsInner {
3743
3905
  * Why it did not load.
3744
3906
  */
3745
3907
  'message'?: string;
3908
+ /**
3909
+ * The codes of the load failure\'s coded lines (each line of `message` that ends `[code]`, such as `persist-unknown-key` or `rollup-invalid`), in order, each once, so a client never parses the message for them. Absent when the message carries none.
3910
+ */
3911
+ 'codes'?: Array<string>;
3746
3912
  /**
3747
3913
  * When true, the package did load earlier and is still serving that last successful compile; the message is why its most recent reload (a watch-mode save, reload_package, or reload=true) failed. The served model is older than the files on disk. Absent on ordinary load failures. This array is the only place staleness is reported, because the package\'s entry under environments, and its own package resource, both read SERVING; join on the package name here to tell a current package from a stale one.
3748
3914
  */
@@ -3801,18 +3967,23 @@ export declare const SkillSummaryOriginEnum: {
3801
3967
  };
3802
3968
  export type SkillSummaryOriginEnum = typeof SkillSummaryOriginEnum[keyof typeof SkillSummaryOriginEnum];
3803
3969
  /**
3804
- * Why a table could not answer a query. `NOT_BUILT`, it is not bound to this package; `WARNED`, its annotation carries a publish warning and serves live, and the candidate\'s `code` says which; `MISSING_FIELD`, the query reads a field the table lacks (or otherwise does not compile against it); `CONTRACT`, answering from it would bypass an access control on the queried source; `GRAIN_TOO_COARSE`, a rollup\'s grain does not cover the query\'s groups or filters; `TIME_ZONE`, it was built in another time zone than the query\'s; `CROSS_CONNECTION`, the query needs a join the table\'s connection cannot reach; `COUNT_SEMANTICS`, an aggregate the table cannot reproduce as the live query computes it; `STALE`, it is past its freshness window; `RUN_FAILED`, it was chosen but reading it failed at run time, and its freshness fallback allowed live. A closed list to which codes may be added, so a client treats an unknown one as a skip it cannot explain.
3970
+ * Why a table could not answer a query. `NOT_BUILT`, it is not bound to this package yet; `NOT_SERVED`, its serve verdict is `live`, so it answers no query, and the candidate\'s `code` names the verdict\'s reason; `OPTED_OUT`, the queried source opts out of its tables with `#@ -persist`; `MISSING_FIELD`, the query reads a field the table lacks (or otherwise does not compile against it); `SHAPE_MISMATCH`, the query is not the shape the stored result answers: it is not a call of the persisted view or query, it refines the call, or its text names beside the call a name the stored result\'s variant takes over; `ROW_LEVEL_GATE`, answering from it would bypass a row-level gate on the queried source; `GRAIN_TOO_COARSE`, a rollup\'s grain does not cover the query\'s groups or filters; `TIME_ZONE`, it was built in another time zone than the query\'s; `CROSS_CONNECTION`, the query needs a join the table\'s connection cannot reach; `COUNT_SEMANTICS`, an aggregate the table cannot reproduce as the live query computes it; `STALE`, it is past its freshness window; `READ_FAILED`, it was chosen but reading it failed at run time, and its freshness fallback allowed live. Retained, no longer produced (shipped in 0.14.0): `WARNED`, now `NOT_SERVED` (or `OPTED_OUT` for `#@ -persist`); `CONTRACT`, now `ROW_LEVEL_GATE`; `RUN_FAILED`, now `READ_FAILED`. A closed list to which codes may be added, so a client treats an unknown one as a skip it cannot explain.
3805
3971
  */
3806
3972
  export declare const SkipReason: {
3807
3973
  readonly NotBuilt: "NOT_BUILT";
3808
- readonly Warned: "WARNED";
3974
+ readonly NotServed: "NOT_SERVED";
3975
+ readonly OptedOut: "OPTED_OUT";
3809
3976
  readonly MissingField: "MISSING_FIELD";
3810
- readonly Contract: "CONTRACT";
3977
+ readonly ShapeMismatch: "SHAPE_MISMATCH";
3978
+ readonly RowLevelGate: "ROW_LEVEL_GATE";
3811
3979
  readonly GrainTooCoarse: "GRAIN_TOO_COARSE";
3812
3980
  readonly TimeZone: "TIME_ZONE";
3813
3981
  readonly CrossConnection: "CROSS_CONNECTION";
3814
3982
  readonly CountSemantics: "COUNT_SEMANTICS";
3815
3983
  readonly Stale: "STALE";
3984
+ readonly ReadFailed: "READ_FAILED";
3985
+ readonly Warned: "WARNED";
3986
+ readonly Contract: "CONTRACT";
3816
3987
  readonly RunFailed: "RUN_FAILED";
3817
3988
  };
3818
3989
  export type SkipReason = typeof SkipReason[keyof typeof SkipReason];
@@ -3954,13 +4125,21 @@ export interface SourceFailure {
3954
4125
  */
3955
4126
  'physicalTableName'?: string;
3956
4127
  /**
3957
- * The persist source\'s own connection (the source warehouse), mirroring `ManifestEntry.connectionName`. Without this a failure-only source carries no destination discriminator at all, so a consumer cannot tell a colocated failure from a `storage=` one and, lacking `storageDestinationName`, would resolve a destination-scoped claim against the wrong key.
4128
+ * The persist source\'s own connection (the source warehouse), mirroring `ManifestEntry.connectionName`. Without this a failure-only source carries no destination discriminator at all, so a consumer cannot tell a database failure from a `storage=` one and, lacking `storageDestinationName`, would resolve a destination-scoped claim against the wrong key.
3958
4129
  */
3959
4130
  'connectionName'?: string;
3960
4131
  /**
3961
- * When the source was instructed to build into a `storage=` destination, the destination name, mirroring `ManifestEntry.storageDestinationName`. Absent for a colocated failure. A consumer computes the same destination key a successful build would (`storageDestinationName ?? connectionName`) whether the source built or failed.
4132
+ * When the source was instructed to build into a `storage=` destination, the destination name, mirroring `ManifestEntry.storageDestinationName`. Absent for a database failure. A consumer computes the same destination key a successful build would (`storageDestinationName ?? connectionName`) whether the source built or failed.
3962
4133
  */
3963
4134
  'storageDestinationName'?: string;
4135
+ /**
4136
+ * With `refused`: the refusal\'s bounded reason, from the same open set as `RefusedSource.reason`, so a client branches on it rather than on `reason`\'s prose. Absent otherwise.
4137
+ */
4138
+ 'refusalReason'?: string;
4139
+ /**
4140
+ * A bounded code for a failure a client may branch on, beside `reason`\'s prose: `table-owned-elsewhere` (the build\'s `name=` is held by a table this package does not own) or `table-ownership-unverified` (who holds it could not be read). An open set; absent for a failure that has none.
4141
+ */
4142
+ 'code'?: string;
3964
4143
  /**
3965
4144
  * True when the materialization-eligibility gate refused this source, so the build was never attempted and `reason` is the gate\'s message. A refusal is a property of the model, not of the run: retrying returns the same answer until the model changes. Absent for every other failure; see `retryable` for how those are classified.
3966
4145
  */
@@ -4108,7 +4287,7 @@ export interface StorageServeBinding {
4108
4287
  */
4109
4288
  'sourceName'?: string;
4110
4289
  /**
4111
- * What the bound source IS: `persist` for one a modeler annotated, which is the meaning of an absent value, and `preaggregate` for a rollup the publisher synthesized from `#@ preaggregate` measures. Mirrors `ManifestEntry.origin`.
4290
+ * The mechanism that declared the bound table: `persist` for `#@ persist` on a source, which is the meaning of an absent value, `materialize` for `#(materialize)`, `view` and `query` for `#@ persist` on a view or a named query, and `rollup` for a rollup. `preaggregate` is retained, no longer produced: releases before this one said it for `rollup`. Releases before this one said `persist` for every table that was not a rollup; a client must accept a value it does not know as a table that is not a rollup.
4112
4291
  */
4113
4292
  'origin'?: StorageServeBindingOriginEnum;
4114
4293
  /**
@@ -4122,6 +4301,10 @@ export interface StorageServeBinding {
4122
4301
  }
4123
4302
  export declare const StorageServeBindingOriginEnum: {
4124
4303
  readonly Persist: "persist";
4304
+ readonly Materialize: "materialize";
4305
+ readonly View: "view";
4306
+ readonly Query: "query";
4307
+ readonly Rollup: "rollup";
4125
4308
  readonly Preaggregate: "preaggregate";
4126
4309
  };
4127
4310
  export type StorageServeBindingOriginEnum = typeof StorageServeBindingOriginEnum[keyof typeof StorageServeBindingOriginEnum];
@@ -4135,7 +4318,7 @@ export interface StorageTable {
4135
4318
  'name': string;
4136
4319
  }
4137
4320
  /**
4138
- * One `where:` conjunct a storage build leaves out of the artifact and the read puts back. Its `code` is the author\'s verbatim expression, which is what a serve shape re-emits; `givens` are the names that expression reads, which is what the shape must declare for it to compile.
4321
+ * One `where:` conjunct a storage build leaves out of the artifact and the read puts back. Its `code` is the author\'s verbatim expression, which is what the served copy re-emits; `givens` are the names that expression reads, which the served copy must declare for it to compile.
4139
4322
  */
4140
4323
  export interface StrippedTerm {
4141
4324
  /**
@@ -5814,17 +5997,16 @@ export declare const MaterializationsApiAxiosParamCreator: (configuration?: Conf
5814
5997
  */
5815
5998
  createMaterialization: (environmentName: string, packageName: string, createMaterializationRequest?: CreateMaterializationRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5816
5999
  /**
5817
- * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. By default this removes the publisher\'s record only; the caller owns table GC. Set dropTables=true to also drop the physical tables this run produced (from the materialization\'s manifest) as a best-effort cleanup.
6000
+ * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a table this run produced, check that no remaining run, of any version, names a table with that name in any place, then drop it through its connection. `dropTables=true` is refused with 400 and deletes nothing, as is any value other than `true` or `false` (the fix is to omit it); `dropTables=false`, which older clients send, is accepted and ignored.
5818
6001
  * @summary Delete a materialization
5819
6002
  * @param {string} environmentName Name of the environment
5820
6003
  * @param {string} packageName Name of the package
5821
6004
  * @param {string} materializationId ID of the materialization
5822
- * @param {boolean} [dropTables] When true, also drop the physical tables recorded in the materialization\&#39;s manifest before deleting the record. Defaults to false (record-only delete; the caller owns table GC). Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400 rather than read as &#x60;false&#x60;, which would delete the record, leave the tables on disk, and still answer 204.
5823
6005
  * @param {string} [versionId] The published version of the package to serve, a semantic version such as &#x60;1.2.0&#x60; or &#x60;1.2.0-rc1&#x60;. &#x60;latest&#x60;, omitted or empty (&#x60;versionId&#x3D;&#x60;, which a proxy forwarding a page\&#39;s query string may send), the request is served from the package\&#39;s &#x60;latest&#x60; version. Any other value that is not a semantic version answers 400 with &#x60;reason&#x60; VERSION_ID_INVALID, so a malformed value is told apart from a missing version. An unknown version answers 404 with &#x60;reason&#x60; VERSION_NOT_FOUND, and an archived one answers 410 with &#x60;reason&#x60; VERSION_ARCHIVED. A package that has no versions (one loaded from &#x60;publisher.config.json&#x60; or registered from a directory) is served as before when this is omitted, and answers 404 VERSION_NOT_FOUND when it is given. Build metadata must be percent-encoded: send &#x60;1.2.0+build.5&#x60; as &#x60;1.2.0%2Bbuild.5&#x60;, since a bare &#x60;+&#x60; in a query string decodes to a space.
5824
6006
  * @param {*} [options] Override http request option.
5825
6007
  * @throws {RequiredError}
5826
6008
  */
5827
- deleteMaterialization: (environmentName: string, packageName: string, materializationId: string, dropTables?: boolean, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
6009
+ deleteMaterialization: (environmentName: string, packageName: string, materializationId: string, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5828
6010
  /**
5829
6011
  * A run\'s id is unique, so with no `versionId` the run is found whichever version built it. Naming a version also requires the run to be that version\'s (or one from before the package\'s first versioned publish); the same holds for stopping and deleting a run.
5830
6012
  * @summary Get a specific materialization
@@ -5876,17 +6058,16 @@ export declare const MaterializationsApiFp: (configuration?: Configuration) => {
5876
6058
  */
5877
6059
  createMaterialization(environmentName: string, packageName: string, createMaterializationRequest?: CreateMaterializationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Materialization>>;
5878
6060
  /**
5879
- * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. By default this removes the publisher\'s record only; the caller owns table GC. Set dropTables=true to also drop the physical tables this run produced (from the materialization\'s manifest) as a best-effort cleanup.
6061
+ * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a table this run produced, check that no remaining run, of any version, names a table with that name in any place, then drop it through its connection. `dropTables=true` is refused with 400 and deletes nothing, as is any value other than `true` or `false` (the fix is to omit it); `dropTables=false`, which older clients send, is accepted and ignored.
5880
6062
  * @summary Delete a materialization
5881
6063
  * @param {string} environmentName Name of the environment
5882
6064
  * @param {string} packageName Name of the package
5883
6065
  * @param {string} materializationId ID of the materialization
5884
- * @param {boolean} [dropTables] When true, also drop the physical tables recorded in the materialization\&#39;s manifest before deleting the record. Defaults to false (record-only delete; the caller owns table GC). Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400 rather than read as &#x60;false&#x60;, which would delete the record, leave the tables on disk, and still answer 204.
5885
6066
  * @param {string} [versionId] The published version of the package to serve, a semantic version such as &#x60;1.2.0&#x60; or &#x60;1.2.0-rc1&#x60;. &#x60;latest&#x60;, omitted or empty (&#x60;versionId&#x3D;&#x60;, which a proxy forwarding a page\&#39;s query string may send), the request is served from the package\&#39;s &#x60;latest&#x60; version. Any other value that is not a semantic version answers 400 with &#x60;reason&#x60; VERSION_ID_INVALID, so a malformed value is told apart from a missing version. An unknown version answers 404 with &#x60;reason&#x60; VERSION_NOT_FOUND, and an archived one answers 410 with &#x60;reason&#x60; VERSION_ARCHIVED. A package that has no versions (one loaded from &#x60;publisher.config.json&#x60; or registered from a directory) is served as before when this is omitted, and answers 404 VERSION_NOT_FOUND when it is given. Build metadata must be percent-encoded: send &#x60;1.2.0+build.5&#x60; as &#x60;1.2.0%2Bbuild.5&#x60;, since a bare &#x60;+&#x60; in a query string decodes to a space.
5886
6067
  * @param {*} [options] Override http request option.
5887
6068
  * @throws {RequiredError}
5888
6069
  */
5889
- deleteMaterialization(environmentName: string, packageName: string, materializationId: string, dropTables?: boolean, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
6070
+ deleteMaterialization(environmentName: string, packageName: string, materializationId: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
5890
6071
  /**
5891
6072
  * A run\'s id is unique, so with no `versionId` the run is found whichever version built it. Naming a version also requires the run to be that version\'s (or one from before the package\'s first versioned publish); the same holds for stopping and deleting a run.
5892
6073
  * @summary Get a specific materialization
@@ -5938,17 +6119,16 @@ export declare const MaterializationsApiFactory: (configuration?: Configuration,
5938
6119
  */
5939
6120
  createMaterialization(environmentName: string, packageName: string, createMaterializationRequest?: CreateMaterializationRequest, options?: RawAxiosRequestConfig): AxiosPromise<Materialization>;
5940
6121
  /**
5941
- * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. By default this removes the publisher\'s record only; the caller owns table GC. Set dropTables=true to also drop the physical tables this run produced (from the materialization\'s manifest) as a best-effort cleanup.
6122
+ * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a table this run produced, check that no remaining run, of any version, names a table with that name in any place, then drop it through its connection. `dropTables=true` is refused with 400 and deletes nothing, as is any value other than `true` or `false` (the fix is to omit it); `dropTables=false`, which older clients send, is accepted and ignored.
5942
6123
  * @summary Delete a materialization
5943
6124
  * @param {string} environmentName Name of the environment
5944
6125
  * @param {string} packageName Name of the package
5945
6126
  * @param {string} materializationId ID of the materialization
5946
- * @param {boolean} [dropTables] When true, also drop the physical tables recorded in the materialization\&#39;s manifest before deleting the record. Defaults to false (record-only delete; the caller owns table GC). Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400 rather than read as &#x60;false&#x60;, which would delete the record, leave the tables on disk, and still answer 204.
5947
6127
  * @param {string} [versionId] The published version of the package to serve, a semantic version such as &#x60;1.2.0&#x60; or &#x60;1.2.0-rc1&#x60;. &#x60;latest&#x60;, omitted or empty (&#x60;versionId&#x3D;&#x60;, which a proxy forwarding a page\&#39;s query string may send), the request is served from the package\&#39;s &#x60;latest&#x60; version. Any other value that is not a semantic version answers 400 with &#x60;reason&#x60; VERSION_ID_INVALID, so a malformed value is told apart from a missing version. An unknown version answers 404 with &#x60;reason&#x60; VERSION_NOT_FOUND, and an archived one answers 410 with &#x60;reason&#x60; VERSION_ARCHIVED. A package that has no versions (one loaded from &#x60;publisher.config.json&#x60; or registered from a directory) is served as before when this is omitted, and answers 404 VERSION_NOT_FOUND when it is given. Build metadata must be percent-encoded: send &#x60;1.2.0+build.5&#x60; as &#x60;1.2.0%2Bbuild.5&#x60;, since a bare &#x60;+&#x60; in a query string decodes to a space.
5948
6128
  * @param {*} [options] Override http request option.
5949
6129
  * @throws {RequiredError}
5950
6130
  */
5951
- deleteMaterialization(environmentName: string, packageName: string, materializationId: string, dropTables?: boolean, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
6131
+ deleteMaterialization(environmentName: string, packageName: string, materializationId: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
5952
6132
  /**
5953
6133
  * A run\'s id is unique, so with no `versionId` the run is found whichever version built it. Naming a version also requires the run to be that version\'s (or one from before the package\'s first versioned publish); the same holds for stopping and deleting a run.
5954
6134
  * @summary Get a specific materialization
@@ -6000,17 +6180,16 @@ export declare class MaterializationsApi extends BaseAPI {
6000
6180
  */
6001
6181
  createMaterialization(environmentName: string, packageName: string, createMaterializationRequest?: CreateMaterializationRequest, options?: RawAxiosRequestConfig): Promise< AxiosResponse<Materialization, any, {}, any>>;
6002
6182
  /**
6003
- * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. By default this removes the publisher\'s record only; the caller owns table GC. Set dropTables=true to also drop the physical tables this run produced (from the materialization\'s manifest) as a best-effort cleanup.
6183
+ * Deletes a terminal (MANIFEST_FILE_READY, FAILED, or CANCELLED) materialization record. A delete is record-only: it never drops a table, and the caller owns table GC. To drop a table this run produced, check that no remaining run, of any version, names a table with that name in any place, then drop it through its connection. `dropTables=true` is refused with 400 and deletes nothing, as is any value other than `true` or `false` (the fix is to omit it); `dropTables=false`, which older clients send, is accepted and ignored.
6004
6184
  * @summary Delete a materialization
6005
6185
  * @param {string} environmentName Name of the environment
6006
6186
  * @param {string} packageName Name of the package
6007
6187
  * @param {string} materializationId ID of the materialization
6008
- * @param {boolean} [dropTables] When true, also drop the physical tables recorded in the materialization\&#39;s manifest before deleting the record. Defaults to false (record-only delete; the caller owns table GC). Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400 rather than read as &#x60;false&#x60;, which would delete the record, leave the tables on disk, and still answer 204.
6009
6188
  * @param {string} [versionId] The published version of the package to serve, a semantic version such as &#x60;1.2.0&#x60; or &#x60;1.2.0-rc1&#x60;. &#x60;latest&#x60;, omitted or empty (&#x60;versionId&#x3D;&#x60;, which a proxy forwarding a page\&#39;s query string may send), the request is served from the package\&#39;s &#x60;latest&#x60; version. Any other value that is not a semantic version answers 400 with &#x60;reason&#x60; VERSION_ID_INVALID, so a malformed value is told apart from a missing version. An unknown version answers 404 with &#x60;reason&#x60; VERSION_NOT_FOUND, and an archived one answers 410 with &#x60;reason&#x60; VERSION_ARCHIVED. A package that has no versions (one loaded from &#x60;publisher.config.json&#x60; or registered from a directory) is served as before when this is omitted, and answers 404 VERSION_NOT_FOUND when it is given. Build metadata must be percent-encoded: send &#x60;1.2.0+build.5&#x60; as &#x60;1.2.0%2Bbuild.5&#x60;, since a bare &#x60;+&#x60; in a query string decodes to a space.
6010
6189
  * @param {*} [options] Override http request option.
6011
6190
  * @throws {RequiredError}
6012
6191
  */
6013
- deleteMaterialization(environmentName: string, packageName: string, materializationId: string, dropTables?: boolean, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<void, any, {}, any>>;
6192
+ deleteMaterialization(environmentName: string, packageName: string, materializationId: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<void, any, {}, any>>;
6014
6193
  /**
6015
6194
  * A run\'s id is unique, so with no `versionId` the run is found whichever version built it. Naming a version also requires the run to be that version\'s (or one from before the package\'s first versioned publish); the same holds for stopping and deleting a run.
6016
6195
  * @summary Get a specific materialization
@@ -6497,7 +6676,7 @@ export type ExecuteNotebookCellBypassFiltersEnum = typeof ExecuteNotebookCellByp
6497
6676
  */
6498
6677
  export declare const PackagesApiAxiosParamCreator: (configuration?: Configuration) => {
6499
6678
  /**
6500
- * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a serve shape (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
6679
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a compile-only served copy (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
6501
6680
  * @summary Create a new package
6502
6681
  * @param {string} environmentName Name of the environment
6503
6682
  * @param {Package} _package
@@ -6602,7 +6781,7 @@ export declare const PackagesApiAxiosParamCreator: (configuration?: Configuratio
6602
6781
  */
6603
6782
  export declare const PackagesApiFp: (configuration?: Configuration) => {
6604
6783
  /**
6605
- * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a serve shape (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
6784
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a compile-only served copy (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
6606
6785
  * @summary Create a new package
6607
6786
  * @param {string} environmentName Name of the environment
6608
6787
  * @param {Package} _package
@@ -6707,7 +6886,7 @@ export declare const PackagesApiFp: (configuration?: Configuration) => {
6707
6886
  */
6708
6887
  export declare const PackagesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
6709
6888
  /**
6710
- * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a serve shape (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
6889
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a compile-only served copy (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
6711
6890
  * @summary Create a new package
6712
6891
  * @param {string} environmentName Name of the environment
6713
6892
  * @param {Package} _package
@@ -6812,7 +6991,7 @@ export declare const PackagesApiFactory: (configuration?: Configuration, basePat
6812
6991
  */
6813
6992
  export declare class PackagesApi extends BaseAPI {
6814
6993
  /**
6815
- * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a serve shape (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
6994
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a compile-only served copy (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
6816
6995
  * @summary Create a new package
6817
6996
  * @param {string} environmentName Name of the environment
6818
6997
  * @param {Package} _package
@@ -7460,7 +7639,7 @@ export declare const VersionsApiAxiosParamCreator: (configuration?: Configuratio
7460
7639
  */
7461
7640
  setPackageLatestVersion: (environmentName: string, packageName: string, packageLatestVersion: PackageLatestVersion, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7462
7641
  /**
7463
- * Sets the version\'s `manifestLocation`, the externally computed build manifest its persist references resolve through, and rebinds that version\'s models to it right away. A null `manifestLocation` clears the binding and the version serves live. Only this version is affected. This is serving state, not package content, which is why it is the one thing about a published version that can change. It replaces the deprecated `PATCH .../packages/{packageName}` for rebinding a manifest. An absent `manifestLocation` (an empty body, `{}`) clears the binding too, as null does: a PUT replaces the binding, and many generated clients drop a null field from the JSON they send. `manifestLocation` is the body\'s only field, so any other field is refused with 400 naming it, rather than read as a clear.
7642
+ * Sets the version\'s `manifestLocation`, the externally computed build manifest its persist references resolve through, and rebinds that version\'s models to it right away. Only this version is affected. A version is owned by the host from then on once a manifest it named, by this route or by a publish, has bound (one whose fetch fails marks nothing), or once a run it instructed with `buildInstructions` has run, even one whose commit failed. The version\'s record keeps that across an unload and a restart. A null `manifestLocation` then clears the binding and the version serves live: this server never binds tables its own runs built for it, so a host can clear the binding before it drops the tables the manifest named. A reload or restart of that version keeps it live until the host binds a manifest again, and the version answers a local run without `buildInstructions` with 409. Its status reports it the way it reports a version with nothing bound: `manifestBindingStatus` `unbound`, `manifestEntryCount` 0 and `boundManifestUri` null. A version no host has bound (standalone, or built only by this server\'s own runs) serves what this server\'s own runs built for it when its binding is cleared, or live when they built nothing, as it does when it loads. This is serving state, not package content, which is why it is the one thing about a published version that can change. It replaces the deprecated `PATCH .../packages/{packageName}` for rebinding a manifest. An absent `manifestLocation` (an empty body, `{}`) clears the binding too, as null does: a PUT replaces the binding, and many generated clients drop a null field from the JSON they send. `manifestLocation` is the body\'s only field, so any other field is refused with 400 naming it, rather than read as a clear.
7464
7643
  * @summary Bind a version to a build manifest
7465
7644
  * @param {string} environmentName Name of the environment
7466
7645
  * @param {string} packageName Name of the package
@@ -7526,7 +7705,7 @@ export declare const VersionsApiFp: (configuration?: Configuration) => {
7526
7705
  */
7527
7706
  setPackageLatestVersion(environmentName: string, packageName: string, packageLatestVersion: PackageLatestVersion, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PackageVersion>>;
7528
7707
  /**
7529
- * Sets the version\'s `manifestLocation`, the externally computed build manifest its persist references resolve through, and rebinds that version\'s models to it right away. A null `manifestLocation` clears the binding and the version serves live. Only this version is affected. This is serving state, not package content, which is why it is the one thing about a published version that can change. It replaces the deprecated `PATCH .../packages/{packageName}` for rebinding a manifest. An absent `manifestLocation` (an empty body, `{}`) clears the binding too, as null does: a PUT replaces the binding, and many generated clients drop a null field from the JSON they send. `manifestLocation` is the body\'s only field, so any other field is refused with 400 naming it, rather than read as a clear.
7708
+ * Sets the version\'s `manifestLocation`, the externally computed build manifest its persist references resolve through, and rebinds that version\'s models to it right away. Only this version is affected. A version is owned by the host from then on once a manifest it named, by this route or by a publish, has bound (one whose fetch fails marks nothing), or once a run it instructed with `buildInstructions` has run, even one whose commit failed. The version\'s record keeps that across an unload and a restart. A null `manifestLocation` then clears the binding and the version serves live: this server never binds tables its own runs built for it, so a host can clear the binding before it drops the tables the manifest named. A reload or restart of that version keeps it live until the host binds a manifest again, and the version answers a local run without `buildInstructions` with 409. Its status reports it the way it reports a version with nothing bound: `manifestBindingStatus` `unbound`, `manifestEntryCount` 0 and `boundManifestUri` null. A version no host has bound (standalone, or built only by this server\'s own runs) serves what this server\'s own runs built for it when its binding is cleared, or live when they built nothing, as it does when it loads. This is serving state, not package content, which is why it is the one thing about a published version that can change. It replaces the deprecated `PATCH .../packages/{packageName}` for rebinding a manifest. An absent `manifestLocation` (an empty body, `{}`) clears the binding too, as null does: a PUT replaces the binding, and many generated clients drop a null field from the JSON they send. `manifestLocation` is the body\'s only field, so any other field is refused with 400 naming it, rather than read as a clear.
7530
7709
  * @summary Bind a version to a build manifest
7531
7710
  * @param {string} environmentName Name of the environment
7532
7711
  * @param {string} packageName Name of the package
@@ -7592,7 +7771,7 @@ export declare const VersionsApiFactory: (configuration?: Configuration, basePat
7592
7771
  */
7593
7772
  setPackageLatestVersion(environmentName: string, packageName: string, packageLatestVersion: PackageLatestVersion, options?: RawAxiosRequestConfig): AxiosPromise<PackageVersion>;
7594
7773
  /**
7595
- * Sets the version\'s `manifestLocation`, the externally computed build manifest its persist references resolve through, and rebinds that version\'s models to it right away. A null `manifestLocation` clears the binding and the version serves live. Only this version is affected. This is serving state, not package content, which is why it is the one thing about a published version that can change. It replaces the deprecated `PATCH .../packages/{packageName}` for rebinding a manifest. An absent `manifestLocation` (an empty body, `{}`) clears the binding too, as null does: a PUT replaces the binding, and many generated clients drop a null field from the JSON they send. `manifestLocation` is the body\'s only field, so any other field is refused with 400 naming it, rather than read as a clear.
7774
+ * Sets the version\'s `manifestLocation`, the externally computed build manifest its persist references resolve through, and rebinds that version\'s models to it right away. Only this version is affected. A version is owned by the host from then on once a manifest it named, by this route or by a publish, has bound (one whose fetch fails marks nothing), or once a run it instructed with `buildInstructions` has run, even one whose commit failed. The version\'s record keeps that across an unload and a restart. A null `manifestLocation` then clears the binding and the version serves live: this server never binds tables its own runs built for it, so a host can clear the binding before it drops the tables the manifest named. A reload or restart of that version keeps it live until the host binds a manifest again, and the version answers a local run without `buildInstructions` with 409. Its status reports it the way it reports a version with nothing bound: `manifestBindingStatus` `unbound`, `manifestEntryCount` 0 and `boundManifestUri` null. A version no host has bound (standalone, or built only by this server\'s own runs) serves what this server\'s own runs built for it when its binding is cleared, or live when they built nothing, as it does when it loads. This is serving state, not package content, which is why it is the one thing about a published version that can change. It replaces the deprecated `PATCH .../packages/{packageName}` for rebinding a manifest. An absent `manifestLocation` (an empty body, `{}`) clears the binding too, as null does: a PUT replaces the binding, and many generated clients drop a null field from the JSON they send. `manifestLocation` is the body\'s only field, so any other field is refused with 400 naming it, rather than read as a clear.
7596
7775
  * @summary Bind a version to a build manifest
7597
7776
  * @param {string} environmentName Name of the environment
7598
7777
  * @param {string} packageName Name of the package
@@ -7658,7 +7837,7 @@ export declare class VersionsApi extends BaseAPI {
7658
7837
  */
7659
7838
  setPackageLatestVersion(environmentName: string, packageName: string, packageLatestVersion: PackageLatestVersion, options?: RawAxiosRequestConfig): Promise< AxiosResponse<PackageVersion, any, {}, any>>;
7660
7839
  /**
7661
- * Sets the version\'s `manifestLocation`, the externally computed build manifest its persist references resolve through, and rebinds that version\'s models to it right away. A null `manifestLocation` clears the binding and the version serves live. Only this version is affected. This is serving state, not package content, which is why it is the one thing about a published version that can change. It replaces the deprecated `PATCH .../packages/{packageName}` for rebinding a manifest. An absent `manifestLocation` (an empty body, `{}`) clears the binding too, as null does: a PUT replaces the binding, and many generated clients drop a null field from the JSON they send. `manifestLocation` is the body\'s only field, so any other field is refused with 400 naming it, rather than read as a clear.
7840
+ * Sets the version\'s `manifestLocation`, the externally computed build manifest its persist references resolve through, and rebinds that version\'s models to it right away. Only this version is affected. A version is owned by the host from then on once a manifest it named, by this route or by a publish, has bound (one whose fetch fails marks nothing), or once a run it instructed with `buildInstructions` has run, even one whose commit failed. The version\'s record keeps that across an unload and a restart. A null `manifestLocation` then clears the binding and the version serves live: this server never binds tables its own runs built for it, so a host can clear the binding before it drops the tables the manifest named. A reload or restart of that version keeps it live until the host binds a manifest again, and the version answers a local run without `buildInstructions` with 409. Its status reports it the way it reports a version with nothing bound: `manifestBindingStatus` `unbound`, `manifestEntryCount` 0 and `boundManifestUri` null. A version no host has bound (standalone, or built only by this server\'s own runs) serves what this server\'s own runs built for it when its binding is cleared, or live when they built nothing, as it does when it loads. This is serving state, not package content, which is why it is the one thing about a published version that can change. It replaces the deprecated `PATCH .../packages/{packageName}` for rebinding a manifest. An absent `manifestLocation` (an empty body, `{}`) clears the binding too, as null does: a PUT replaces the binding, and many generated clients drop a null field from the JSON they send. `manifestLocation` is the body\'s only field, so any other field is refused with 400 naming it, rather than read as a clear.
7662
7841
  * @summary Bind a version to a build manifest
7663
7842
  * @param {string} environmentName Name of the environment
7664
7843
  * @param {string} packageName Name of the package