@malloy-publisher/sdk 0.14.0 → 0.16.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-C9PiHrGC.cjs.js → RenderedResult-DTM9o4Ql.cjs.js} +1 -1
  2. package/dist/{RenderedResult-D0kAzSrP.es.js → RenderedResult-vyM2wQbC.es.js} +9 -9
  3. package/dist/ServerProvider-DpOy4_Kf.cjs.js +1 -0
  4. package/dist/{ServerProvider-BHM9y5l0.es.js → ServerProvider-lAZ5ZdQS.es.js} +1182 -1034
  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 +324 -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 +7 -4
  13. package/dist/components/Package/PackageProblems.d.ts +6 -0
  14. package/dist/index.cjs.js +38 -38
  15. package/dist/index.es.js +6176 -6665
  16. package/dist/{useCompiledDocument-Co-INO6B.cjs.js → useCompiledDocument-2huaKTJN.cjs.js} +20 -20
  17. package/dist/{useCompiledDocument-CF5s0cXj.es.js → useCompiledDocument-CSXZufFO.es.js} +56 -60
  18. package/package.json +1 -1
  19. package/src/components/Materializations/DeleteMaterializationDialog.tsx +5 -16
  20. package/src/components/Materializations/MaterializationRunsList.tsx +3 -5
  21. package/src/components/Materializations/Materializations.tsx +3 -13
  22. package/src/components/Materializations/Materializations.versions.spec.tsx +6 -3
  23. package/src/components/Materializations/TriggerLabel.tsx +2 -2
  24. package/src/components/Materializations/utils.spec.ts +6 -1
  25. package/src/components/Materializations/utils.ts +11 -5
  26. package/src/components/Package/PackageProblems.spec.tsx +25 -1
  27. package/src/components/Package/PackageProblems.tsx +30 -12
  28. package/src/components/RenderedResult/RenderedResult.lifecycle.spec.tsx +15 -1
  29. package/dist/ServerProvider-D97_rUv5.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;
@@ -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. A database rollup reports what its build actually read: `reused` only when it built from its base\'s materialized table, and absent when it built from the warehouse, even over a persisted base. Before 0.15.0 every rollup over a persisted base reported `reused`. A `storage=` rollup reports `reused` only when it stacked on a stored table.
1511
1517
  */
1512
1518
  'upstreamReuse'?: ManifestEntryUpstreamReuseEnum;
1513
1519
  /**
@@ -1534,9 +1540,14 @@ export interface ManifestEntry {
1534
1540
  * What this run\'s refresh DID to the table, for a source declaring `refresh=\"incremental\"`: advanced it in place by a bounded range (`delta`), rebuilt it (`full`), or applied nothing because the watermark had not moved (`none`, which leaves the boundary in `ledger` in force). Reported because it cannot be inferred: every fallback the publisher applies — no recorded boundary, a table the delta path cannot build on, `reseed` — answers success and rebuilds, so a source quietly rebuilding on every run is otherwise indistinguishable from one advancing. Present exactly when the source is refreshed incrementally, so absent means only that it is not: a source declaring `refresh=\"full\"`, or one whose declaration the delta path cannot act on at all (an unsupported source dialect), which the publish gate rejects anyway.
1535
1541
  */
1536
1542
  'refresh'?: ManifestEntryRefreshEnum;
1543
+ 'lateRows'?: ManifestEntryLateRows;
1537
1544
  }
1538
1545
  export declare const ManifestEntryOriginEnum: {
1539
1546
  readonly Persist: "persist";
1547
+ readonly Materialize: "materialize";
1548
+ readonly View: "view";
1549
+ readonly Query: "query";
1550
+ readonly Rollup: "rollup";
1540
1551
  readonly Preaggregate: "preaggregate";
1541
1552
  };
1542
1553
  export type ManifestEntryOriginEnum = typeof ManifestEntryOriginEnum[keyof typeof ManifestEntryOriginEnum];
@@ -1557,6 +1568,23 @@ export declare const ManifestEntryRefreshEnum: {
1557
1568
  readonly None: "none";
1558
1569
  };
1559
1570
  export type ManifestEntryRefreshEnum = typeof ManifestEntryRefreshEnum[keyof typeof ManifestEntryRefreshEnum];
1571
+ /**
1572
+ * For a source this run advanced by a delta (`refresh` is `delta`): rows the source holds below where the delta started reading that the stored table lacks. A delta reads from the newest watermark the table holds (less the source\'s `lookback=`), so a row stamped below that, landing after the rows above it were stored, is never read, and the table undercounts it until it is rebuilt. The check reads one window directly below the delta\'s start, as wide as the delta\'s own range, so it finds a row stamped within that window and not one older. With `merge_key=` a source row counts when no stored row has its keys and its watermark (a skipped restatement counts too); without one, it is the source\'s rows in the window less the table\'s. The window is capped, for a date or timestamp watermark, at seven days or the source\'s `lookback=`, whichever is longer. Carried until the source is rebuilt in full: a later delta or skip reports what earlier ones found (read from the manifest bound when it runs), with its own findings added to `count` and `to` moved up, and a slice is checked once, so a row is counted once, so `count` is a lower bound: a row that lands in a slice already checked is not counted. It stays until a full rebuild, even after a widened `lookback=` has written the rows. `from` is where the first such window started. Absent when nothing was found since the last full rebuild. The check is best-effort, and not run for a pair table, a string watermark or a `storage=` source on BigQuery: it gives up after 60 seconds, stopping its statement, and one that fails is logged and leaves what was carried. While the run\'s manifest is bound, the package also warns with code `persist-incremental-late-rows`.
1573
+ */
1574
+ export interface ManifestEntryLateRows {
1575
+ /**
1576
+ * Source rows in the window the stored table lacks.
1577
+ */
1578
+ 'count': number;
1579
+ /**
1580
+ * Where the window starts (inclusive), as the watermark\'s value: ISO-8601 for a date or timestamp, decimal text for a number.
1581
+ */
1582
+ 'from': string;
1583
+ /**
1584
+ * Where it ends (exclusive): the delta\'s lower bound, spelled as `from` is.
1585
+ */
1586
+ 'to': string;
1587
+ }
1560
1588
  /**
1561
1589
  * A reference to an already-materialized persist upstream that the built sources may read but which is not rebuilt in this run.
1562
1590
  */
@@ -1574,7 +1602,7 @@ export interface ManifestReference {
1574
1602
  */
1575
1603
  'connectionName'?: string;
1576
1604
  /**
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.
1605
+ * 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
1606
  */
1579
1607
  'storageDestinationName'?: string;
1580
1608
  }
@@ -1587,7 +1615,7 @@ export interface Materialization {
1587
1615
  'packageName'?: string;
1588
1616
  'status'?: MaterializationStatus;
1589
1617
  /**
1590
- * Build output. Null until the tables are built (status MANIFEST_ROWS_READY), and on a run that failed or was cancelled before then. A run interrupted at MANIFEST_ROWS_READY (the server stopped while it loaded its manifest) ends FAILED with its manifest; that manifest is never served.
1618
+ * 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
1619
  */
1592
1620
  'manifest'?: BuildManifest | null;
1593
1621
  'startedAt'?: string | null;
@@ -1596,13 +1624,52 @@ export interface Materialization {
1596
1624
  * Error message if the materialization failed
1597
1625
  */
1598
1626
  '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;
1627
+ 'metadata'?: MaterializationMetadata | null;
1603
1628
  'createdAt'?: string;
1604
1629
  'updatedAt'?: string;
1605
1630
  }
1631
+ /**
1632
+ * 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).
1633
+ */
1634
+ export interface MaterializationMetadata {
1635
+ [key: string]: any;
1636
+ /**
1637
+ * 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.
1638
+ */
1639
+ 'keptTables'?: Array<MaterializationMetadataKeptTablesInner>;
1640
+ }
1641
+ export interface MaterializationMetadataKeptTablesInner {
1642
+ /**
1643
+ * The source the table was built for.
1644
+ */
1645
+ 'sourceEntityId': string;
1646
+ /**
1647
+ * The source\'s name, when the run recorded it.
1648
+ */
1649
+ 'sourceName'?: string;
1650
+ /**
1651
+ * The kept table, as the run that built it wrote it.
1652
+ */
1653
+ 'physicalTableName': string;
1654
+ /**
1655
+ * The source\'s connection.
1656
+ */
1657
+ 'connectionName': string;
1658
+ /**
1659
+ * The storage destination holding the table; absent for a table in the connection\'s own database.
1660
+ */
1661
+ 'storageDestinationName'?: string;
1662
+ /**
1663
+ * `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.
1664
+ */
1665
+ 'reason': MaterializationMetadataKeptTablesInnerReasonEnum;
1666
+ }
1667
+ export declare const MaterializationMetadataKeptTablesInnerReasonEnum: {
1668
+ readonly AuthorName: "author_name";
1669
+ readonly DestinationMissing: "destination_missing";
1670
+ readonly MayBeServed: "may_be_served";
1671
+ };
1672
+ export type MaterializationMetadataKeptTablesInnerReasonEnum = typeof MaterializationMetadataKeptTablesInnerReasonEnum[keyof typeof MaterializationMetadataKeptTablesInnerReasonEnum];
1606
1673
  /**
1607
1674
  * 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
1675
  */
@@ -1694,7 +1761,11 @@ export interface ModelError {
1694
1761
  */
1695
1762
  'details'?: string;
1696
1763
  /**
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.
1764
+ * With `reason: MATERIALIZATION_REFUSED`: the refusal\'s bounded reason, from the same open set as `RefusedSource.reason`. Absent otherwise.
1765
+ */
1766
+ 'refusalReason'?: string;
1767
+ /**
1768
+ * 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 means a valid materialization declaration this server will not build, and the body\'s `refusalReason` is the refusal\'s `RefusedSource.reason`. Reserved: no route answers with it today. The eligibility gate runs inside a materialization run, after `POST …/materializations` has answered 201, so a refusal is recorded on the run instead: as a `SourceFailure` with `refused` and `refusalReason` on a run with `buildInstructions`, otherwise in the run\'s `metadata.refusedSources`, or its `error` when nothing else was left to build. 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. On a 409 from dropping a materialized table (`drop-materialized-table`), they mean the drop was refused for the same reasons: the table is another\'s, or nothing proves it is this package\'s. TABLE_IN_USE, on a 409 from dropping a materialized table, means the table may still be read: a committed run of the package, of any version, names a table with that name (other than the run the caller named, unless that run is the one a version or the package serves); a loaded copy of any package in the environment, or any loaded version of one, is bound to a table with that name; or the warehouse refused the drop because other objects depend on the table. Delete or replace that run, rebind that copy, or drop those objects first. 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, TABLE_IN_USE, 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
1769
  */
1699
1770
  'reason'?: string;
1700
1771
  /**
@@ -1933,7 +2004,7 @@ export interface OmittedSource {
1933
2004
  */
1934
2005
  'sourceID': string;
1935
2006
  /**
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` 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.
2007
+ * 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
2008
  */
1938
2009
  'reason': string;
1939
2010
  }
@@ -2002,7 +2073,7 @@ export interface Package {
2002
2073
  */
2003
2074
  'exploresWarnings'?: Array<string>;
2004
2075
  /**
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.
2076
+ * 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
2077
  */
2007
2078
  'warnings'?: Array<PackageWarningsInner>;
2008
2079
  /**
@@ -2105,6 +2176,7 @@ export type PackageQueryableSourcesEnum = typeof PackageQueryableSourcesEnum[key
2105
2176
  export declare const PackageManifestBindingStatusEnum: {
2106
2177
  readonly Unbound: "unbound";
2107
2178
  readonly Bound: "bound";
2179
+ readonly BindFailed: "bind_failed";
2108
2180
  readonly LiveFallback: "live_fallback";
2109
2181
  };
2110
2182
  export type PackageManifestBindingStatusEnum = typeof PackageManifestBindingStatusEnum[keyof typeof PackageManifestBindingStatusEnum];
@@ -2280,11 +2352,11 @@ export interface PackageServingState {
2280
2352
  */
2281
2353
  'sourceContentSha'?: string;
2282
2354
  /**
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.
2355
+ * 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
2356
  */
2285
2357
  'manifestBindingStatus'?: PackageServingStateManifestBindingStatusEnum;
2286
2358
  /**
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.
2359
+ * 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
2360
  */
2289
2361
  'manifestEntryCount'?: number;
2290
2362
  /**
@@ -2292,7 +2364,7 @@ export interface PackageServingState {
2292
2364
  */
2293
2365
  'boundManifestUri'?: string | null;
2294
2366
  /**
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.
2367
+ * 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
2368
  */
2297
2369
  'storageServeBindings'?: Array<StorageServeBinding>;
2298
2370
  /**
@@ -2308,6 +2380,7 @@ export type PackageServingStateArchiveStatusEnum = typeof PackageServingStateArc
2308
2380
  export declare const PackageServingStateManifestBindingStatusEnum: {
2309
2381
  readonly Unbound: "unbound";
2310
2382
  readonly Bound: "bound";
2383
+ readonly BindFailed: "bind_failed";
2311
2384
  readonly LiveFallback: "live_fallback";
2312
2385
  };
2313
2386
  export type PackageServingStateManifestBindingStatusEnum = typeof PackageServingStateManifestBindingStatusEnum[keyof typeof PackageServingStateManifestBindingStatusEnum];
@@ -2378,7 +2451,7 @@ export interface PackageStatusEntry {
2378
2451
  */
2379
2452
  'exploresWarnings'?: Array<string>;
2380
2453
  /**
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.
2454
+ * 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
2455
  */
2383
2456
  'warnings'?: Array<PackageWarningsInner>;
2384
2457
  /**
@@ -2475,6 +2548,7 @@ export type PackageStatusEntryQueryableSourcesEnum = typeof PackageStatusEntryQu
2475
2548
  export declare const PackageStatusEntryManifestBindingStatusEnum: {
2476
2549
  readonly Unbound: "unbound";
2477
2550
  readonly Bound: "bound";
2551
+ readonly BindFailed: "bind_failed";
2478
2552
  readonly LiveFallback: "live_fallback";
2479
2553
  };
2480
2554
  export type PackageStatusEntryManifestBindingStatusEnum = typeof PackageStatusEntryManifestBindingStatusEnum[keyof typeof PackageStatusEntryManifestBindingStatusEnum];
@@ -2524,6 +2598,7 @@ export type PackageStatusEntryFieldsArchiveStatusEnum = typeof PackageStatusEntr
2524
2598
  export declare const PackageStatusEntryFieldsManifestBindingStatusEnum: {
2525
2599
  readonly Unbound: "unbound";
2526
2600
  readonly Bound: "bound";
2601
+ readonly BindFailed: "bind_failed";
2527
2602
  readonly LiveFallback: "live_fallback";
2528
2603
  };
2529
2604
  export type PackageStatusEntryFieldsManifestBindingStatusEnum = typeof PackageStatusEntryFieldsManifestBindingStatusEnum[keyof typeof PackageStatusEntryFieldsManifestBindingStatusEnum];
@@ -2606,7 +2681,7 @@ export type PackageVersionArchiveStatusEnum = typeof PackageVersionArchiveStatus
2606
2681
  */
2607
2682
  export interface PackageVersionManifest {
2608
2683
  /**
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.
2684
+ * 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
2685
  */
2611
2686
  'manifestLocation'?: string | null;
2612
2687
  }
@@ -2638,9 +2713,13 @@ export interface PackageWarningsInner {
2638
2713
  */
2639
2714
  'message'?: string;
2640
2715
  /**
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`: retained, never reported by a released server. A `#@ preaggregate` rollup over a `#@ persist storage=` base is planned, built and served like any other rollup. 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`, `preaggregate-invalid`, `persist-view-invalid` and `persist-query-invalid` (a bad value or contradictory combination: a `storage=` that names nothing, an `@env.` reference, an unusable or reserved `name=`, an `inline=` that names no join, an incremental key on a view or query); `persist-unknown-key`, `materialize-unknown-key` and `preaggregate-unknown-key` (every route\'s key set is closed); `persist-retired-key` and `materialize-retired-key` (`sharing=`, `schedule=`, `partition=`); `persist-unparseable`, `materialize-unparseable` and `preaggregate-unparseable`; `persist-not-materializable` (a `#@ persist` on a shape Malloy does not plan); `preaggregate-not-a-measure`, `preaggregate-unknown-grain` and `preaggregate-not-mergeable`; `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 `preaggregate-invalid` or `preaggregate-unparseable` now. A VALID annotation Publisher cannot build here is refused alone, answered live, while the package loads, and is severity `warn`, never `error`: `persist-not-built` (a `#@ persist` source a compile-time gate refused, a row-level gate, a free parameter, a given in the persisted query, the `storage=` gate, an incremental declaration the dialect cannot honour, or, under `PERSIST_COLLISION_ENFORCE=false`, a table another source writes; `subject` the source). `persist-source-refused` is its former name: each gate refusal (the cases it named before) is repeated under it, with the same message, for one release, then the repeat is removed; the refusals new in this release carry `persist-not-built` only. `materialize-not-built` (a valid `#(materialize)` Publisher cannot lay out or build; `subject` the source). `persist-view-not-built` and `persist-query-not-built` (a persisted view or named query that is not built: the feature is off (`PUBLISHER_MATERIALIZE`), or the message says why; `subject` the view or query). `preaggregate-not-built`: a valid `#(preaggregate)` or `#@ preaggregate` rollup a compile-time gate refused alone (a read-only dialect, a base scoped by a given, a table name another rollup holds, a row-level gate on a v1 rollup\'s base, or the `storage=` gate), so it is not built and its measures are served live while the rest of the package loads; the message names the base, the grain and the gate\'s reason (`subject` the base; `warn`). The rollup sub-family keeps its own codes: `preaggregate-hidden-field`, `-access-filter`, `-time-zone`, `-current-time`, `-reads-given`, `-unreadable-measure`, `-join-level` (also a `#@ preaggregate` over a source with a fan-out join), and `-name-clash`. `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; `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`). `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). `stored-native-schema-missing`: a colocated 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). `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.
2716
+ * 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`). `persist-incremental-late-rows`: an incremental source whose bound table a delta\'s late-row check found missing rows stamped just below where a delta started reading, which no later delta reads (its manifest entry\'s `lateRows`); it is carried until the source is rebuilt in full (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
2717
  */
2643
2718
  'code'?: string;
2719
+ /**
2720
+ * 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.
2721
+ */
2722
+ 'reason'?: string;
2644
2723
  /**
2645
2724
  * 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
2725
  */
@@ -2657,11 +2736,11 @@ export interface PersistSourcePlan {
2657
2736
  'connectionName': string;
2658
2737
  'dialect'?: string;
2659
2738
  /**
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.
2739
+ * 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
2740
  */
2662
2741
  'origin'?: PersistSourcePlanOriginEnum;
2663
2742
  /**
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.
2743
+ * 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
2744
  */
2666
2745
  'preaggregate'?: PreaggregatePlan | null;
2667
2746
  /**
@@ -2690,7 +2769,7 @@ export interface PersistSourcePlan {
2690
2769
  */
2691
2770
  'refresh'?: string | null;
2692
2771
  /**
2693
- * 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.
2772
+ * 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.
2694
2773
  */
2695
2774
  'freshness'?: Freshness | null;
2696
2775
  /**
@@ -2704,18 +2783,22 @@ export interface PersistSourcePlan {
2704
2783
  */
2705
2784
  'columns': Array<Column>;
2706
2785
  /**
2707
- * 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.
2786
+ * 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\"`). * `lookback` — a duration (a positive whole number and one unit: `seconds`, `minutes`, `hours`, `days` or `weeks`, singular or plural, or `s`, `m`, `h`, `d` or `w`, as in `\"2 days\"` or `\"36h\"`; at most 365 days). Each delta of a `date` or `timestamp` watermark starts that much below the newest watermark the stored table holds, and the merge key matches the rows read again. Valid only with `refresh=\"incremental\"`, a `date` or `timestamp` watermark and a `merge_key`; absent means no lookback. All three are checked at publish: `watermark` and `merge_key` against the compiled output schema, and `lookback` against its grammar, its limit and the keys it requires, so a dangling or stale name, or an invalid lookback, is rejected rather than deferred to a build. None 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.
2708
2787
  */
2709
2788
  'annotationFields'?: {
2710
2789
  [key: string]: string;
2711
2790
  };
2712
2791
  /**
2713
- * 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.
2792
+ * 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.
2714
2793
  */
2715
2794
  'modelPath'?: string;
2716
2795
  }
2717
2796
  export declare const PersistSourcePlanOriginEnum: {
2718
2797
  readonly Persist: "persist";
2798
+ readonly Materialize: "materialize";
2799
+ readonly View: "view";
2800
+ readonly Query: "query";
2801
+ readonly Rollup: "rollup";
2719
2802
  readonly Preaggregate: "preaggregate";
2720
2803
  };
2721
2804
  export type PersistSourcePlanOriginEnum = typeof PersistSourcePlanOriginEnum[keyof typeof PersistSourcePlanOriginEnum];
@@ -2858,7 +2941,7 @@ export interface QueryPath {
2858
2941
  'query': QueryShape;
2859
2942
  'servedBy': QueryPathServer;
2860
2943
  /**
2861
- * 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.
2944
+ * 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.
2862
2945
  */
2863
2946
  'considered': Array<QueryPathCandidate>;
2864
2947
  /**
@@ -2866,7 +2949,7 @@ export interface QueryPath {
2866
2949
  */
2867
2950
  'notConsidered': Array<QueryPathNearby>;
2868
2951
  /**
2869
- * 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.
2952
+ * 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.
2870
2953
  */
2871
2954
  'warnings'?: Array<QueryPathWarning>;
2872
2955
  }
@@ -2877,12 +2960,16 @@ export interface QueryPathCandidate {
2877
2960
  'tableId': string;
2878
2961
  'kind': QueryPathTableKind;
2879
2962
  /**
2880
- * `used`, the table answered; `skipped`, it could not, and `reason` says why.
2963
+ * 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.
2964
+ */
2965
+ 'origin'?: QueryPathCandidateOriginEnum;
2966
+ /**
2967
+ * `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.
2881
2968
  */
2882
2969
  'outcome': QueryPathCandidateOutcomeEnum;
2883
2970
  'reason'?: SkipReason;
2884
2971
  /**
2885
- * 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.
2972
+ * 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`.
2886
2973
  */
2887
2974
  'code'?: string;
2888
2975
  /**
@@ -2890,6 +2977,14 @@ export interface QueryPathCandidate {
2890
2977
  */
2891
2978
  'detail'?: string;
2892
2979
  }
2980
+ export declare const QueryPathCandidateOriginEnum: {
2981
+ readonly Persist: "persist";
2982
+ readonly Materialize: "materialize";
2983
+ readonly View: "view";
2984
+ readonly Query: "query";
2985
+ readonly Rollup: "rollup";
2986
+ };
2987
+ export type QueryPathCandidateOriginEnum = typeof QueryPathCandidateOriginEnum[keyof typeof QueryPathCandidateOriginEnum];
2893
2988
  export declare const QueryPathCandidateOutcomeEnum: {
2894
2989
  readonly Used: "used";
2895
2990
  readonly Skipped: "skipped";
@@ -2901,6 +2996,10 @@ export type QueryPathCandidateOutcomeEnum = typeof QueryPathCandidateOutcomeEnum
2901
2996
  export interface QueryPathNearby {
2902
2997
  'tableId': string;
2903
2998
  'kind': QueryPathTableKind;
2999
+ /**
3000
+ * 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.
3001
+ */
3002
+ 'origin'?: QueryPathNearbyOriginEnum;
2904
3003
  /**
2905
3004
  * The source the table materializes; for a rollup, the source it rolls up.
2906
3005
  */
@@ -2914,6 +3013,14 @@ export interface QueryPathNearby {
2914
3013
  */
2915
3014
  'built': boolean;
2916
3015
  }
3016
+ export declare const QueryPathNearbyOriginEnum: {
3017
+ readonly Persist: "persist";
3018
+ readonly Materialize: "materialize";
3019
+ readonly View: "view";
3020
+ readonly Query: "query";
3021
+ readonly Rollup: "rollup";
3022
+ };
3023
+ export type QueryPathNearbyOriginEnum = typeof QueryPathNearbyOriginEnum[keyof typeof QueryPathNearbyOriginEnum];
2917
3024
  export declare const QueryPathNearbyRelationshipEnum: {
2918
3025
  readonly Sibling: "sibling";
2919
3026
  readonly Below: "below";
@@ -2924,10 +3031,18 @@ export type QueryPathNearbyRelationshipEnum = typeof QueryPathNearbyRelationship
2924
3031
  */
2925
3032
  export interface QueryPathServer {
2926
3033
  'kind': QueryPathTableKind;
3034
+ /**
3035
+ * 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.
3036
+ */
3037
+ 'origin'?: QueryPathServerOriginEnum;
2927
3038
  /**
2928
3039
  * The table that answered. Absent when `kind` is `live`.
2929
3040
  */
2930
3041
  'tableId'?: string;
3042
+ /**
3043
+ * 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`.
3044
+ */
3045
+ 'tier'?: QueryPathServerTierEnum;
2931
3046
  /**
2932
3047
  * 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.
2933
3048
  */
@@ -2937,8 +3052,21 @@ export interface QueryPathServer {
2937
3052
  */
2938
3053
  'via'?: string;
2939
3054
  }
3055
+ export declare const QueryPathServerOriginEnum: {
3056
+ readonly Persist: "persist";
3057
+ readonly Materialize: "materialize";
3058
+ readonly View: "view";
3059
+ readonly Query: "query";
3060
+ readonly Rollup: "rollup";
3061
+ };
3062
+ export type QueryPathServerOriginEnum = typeof QueryPathServerOriginEnum[keyof typeof QueryPathServerOriginEnum];
3063
+ export declare const QueryPathServerTierEnum: {
3064
+ readonly Database: "database";
3065
+ readonly Storage: "storage";
3066
+ };
3067
+ export type QueryPathServerTierEnum = typeof QueryPathServerTierEnum[keyof typeof QueryPathServerTierEnum];
2940
3068
  /**
2941
- * 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; `live`, the source\'s own warehouse. A client treats a kind it does not know as a materialized table it cannot name.
3069
+ * 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.
2942
3070
  */
2943
3071
  export declare const QueryPathTableKind: {
2944
3072
  readonly View: "view";
@@ -2953,7 +3081,7 @@ export type QueryPathTableKind = typeof QueryPathTableKind[keyof typeof QueryPat
2953
3081
  */
2954
3082
  export interface QueryPathWarning {
2955
3083
  /**
2956
- * 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.
3084
+ * 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.
2957
3085
  */
2958
3086
  'code': string;
2959
3087
  /**
@@ -3051,7 +3179,7 @@ export interface QueryResult {
3051
3179
  */
3052
3180
  'queryRowLimitSource'?: QueryResultQueryRowLimitSourceEnum;
3053
3181
  /**
3054
- * 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. On `publisher_query_route_total` the same event is the answering leg\'s `outcome=\"fallback\", reason=\"RUN_FAILED\"`. **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 served copy did **not answer** 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 also logs one `served copy cannot answer this query` line at DEBUG per declined query, carrying the error that declined it. It is not hypothetical — a source warehouse that folds unquoted identifiers to upper case once made every query on every `storage=` source in a package miss, 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` here is not `manifestBindingStatus`\'s.** On this field it means the store failed at run time; `manifestBindingStatus` uses the same token for a configured `manifestLocation` whose fetch or bind failed. Each surface is internally consistent; neither means what the other does.
3182
+ * 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=\"READ_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).
3055
3183
  */
3056
3184
  'servedFrom'?: QueryResultServedFromEnum | null;
3057
3185
  /**
@@ -3063,7 +3191,7 @@ export interface QueryResult {
3063
3191
  */
3064
3192
  'queryCostBytes'?: number | null;
3065
3193
  /**
3066
- * 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.
3194
+ * 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.
3067
3195
  */
3068
3196
  'path'?: QueryPath;
3069
3197
  }
@@ -3074,6 +3202,7 @@ export declare const QueryResultQueryRowLimitSourceEnum: {
3074
3202
  export type QueryResultQueryRowLimitSourceEnum = typeof QueryResultQueryRowLimitSourceEnum[keyof typeof QueryResultQueryRowLimitSourceEnum];
3075
3203
  export declare const QueryResultServedFromEnum: {
3076
3204
  readonly Storage: "storage";
3205
+ readonly Database: "database";
3077
3206
  readonly LiveFallback: "live_fallback";
3078
3207
  };
3079
3208
  export type QueryResultServedFromEnum = typeof QueryResultServedFromEnum[keyof typeof QueryResultServedFromEnum];
@@ -3172,7 +3301,7 @@ export declare const RawNotebookFormatEnum: {
3172
3301
  };
3173
3302
  export type RawNotebookFormatEnum = typeof RawNotebookFormatEnum[keyof typeof RawNotebookFormatEnum];
3174
3303
  /**
3175
- * SNAPSHOT = warehouse clone/snapshot; COPY = CREATE TABLE AS SELECT.
3304
+ * COPY = CREATE TABLE AS SELECT, the only realization built. SNAPSHOT (a warehouse clone or snapshot) is refused.
3176
3305
  */
3177
3306
  export declare const Realization: {
3178
3307
  readonly Snapshot: "SNAPSHOT";
@@ -3180,11 +3309,15 @@ export declare const Realization: {
3180
3309
  };
3181
3310
  export type Realization = typeof Realization[keyof typeof Realization];
3182
3311
  /**
3183
- * 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`.
3312
+ * 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`.
3184
3313
  */
3185
3314
  export interface RefusedSource {
3186
3315
  /**
3187
- * The source\'s declared name.
3316
+ * 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.
3317
+ */
3318
+ 'origin'?: RefusedSourceOriginEnum;
3319
+ /**
3320
+ * 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>`.
3188
3321
  */
3189
3322
  'name': string;
3190
3323
  /**
@@ -3196,22 +3329,31 @@ export interface RefusedSource {
3196
3329
  */
3197
3330
  'modelPath'?: string;
3198
3331
  /**
3199
- * 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).
3332
+ * 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`.
3200
3333
  */
3201
3334
  'tier': RefusedSourceTierEnum;
3202
3335
  /**
3203
- * 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`), `inherited_where_with_given` (a given-reading `where:` the source inherits from a source it is built from, in its own file or another, rather than writing it in its own declaration: only the source\'s own declaration is re-applied over the stored table at read, so it is not built and is answered live, under the term; move the `where:` onto the persisted source to serve it from a table), `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`), `storage_source_unsupported` (`storage=` on a source whose connection the build cannot pass through to a destination, e.g. the package\'s DuckDB sandbox; it is not built and is answered live), `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), and `current_time` (a `#@ persist` whose build reads the current time, `now`: in its persisted query, a view it runs, the `where:`, a field or a join of the source that query reads, or the query of a query-shaped source it is built from or joins; its table would hold the rows as of the build, so it is not built and is answered live. `now` in the source\'s own extend block is applied at every read and is admitted) — those being the only reasons the two compile-time eligibility asserts this collection is computed from produce. One more appears only in a run\'s `metadata.refusedSources`, never in a build plan: `table_name_collision` (a source whose readable table name, the name a standalone run gives a table it names itself, is a name another source\'s table already takes in that run: two sources of one model that share a name, such as a `#@ persist` source named like a persisted view\'s generated build source beside it, or a hash collision; it is not built and is answered live), or a source whose `name=` puts it on one table with another source, under `PERSIST_COLLISION_ENFORCE=false` (by default such a package does not load); neither is built, so neither overwrites the other, and both are answered live). `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 likewise retained and no longer produced: a `storage=` table no column of which Malloy can type is now built, and its source is answered live. The three `partition_*` reasons (`partition_without_storage`, `partition_column_unknown`, `partition_column_not_public`) are likewise retained and no longer produced: `partition=` is a retired key, which fails the publish and the load as `persist-retired-key` or `materialize-retired-key`, never a plan refusal. `env_reference` and `empty_storage` are likewise retained and no longer produced: an `@env.` reference on a `#@` line, and a `storage=` that names no destination, are invalid annotations (`persist-invalid`), which fail the publish and the load, so no served plan carries them. `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.
3336
+ * 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.
3204
3337
  */
3205
3338
  'reason': RefusedSourceReasonEnum;
3206
3339
  /**
3207
- * The full, human-readable refusal message the eligibility assert produced — the same text a build attempting this source would 422 with.
3340
+ * 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.
3208
3341
  */
3209
3342
  'message': string;
3210
3343
  }
3344
+ export declare const RefusedSourceOriginEnum: {
3345
+ readonly Persist: "persist";
3346
+ readonly Materialize: "materialize";
3347
+ readonly View: "view";
3348
+ readonly Query: "query";
3349
+ readonly Rollup: "rollup";
3350
+ };
3351
+ export type RefusedSourceOriginEnum = typeof RefusedSourceOriginEnum[keyof typeof RefusedSourceOriginEnum];
3211
3352
  export declare const RefusedSourceTierEnum: {
3212
3353
  readonly Storage: "storage";
3213
- readonly Colocated: "colocated";
3354
+ readonly Database: "database";
3214
3355
  readonly Preaggregate: "preaggregate";
3356
+ readonly Colocated: "colocated";
3215
3357
  };
3216
3358
  export type RefusedSourceTierEnum = typeof RefusedSourceTierEnum[keyof typeof RefusedSourceTierEnum];
3217
3359
  export declare const RefusedSourceReasonEnum: {
@@ -3231,12 +3373,33 @@ export declare const RefusedSourceReasonEnum: {
3231
3373
  readonly NotDuckdbPortable: "not_duckdb_portable";
3232
3374
  readonly PublicSurfaceUnknown: "public_surface_unknown";
3233
3375
  readonly ReadOnlyDialect: "read_only_dialect";
3376
+ readonly ConnectionCannotHoldTable: "connection_cannot_hold_table";
3234
3377
  readonly StorageSourceUnsupported: "storage_source_unsupported";
3235
3378
  readonly EnvReference: "env_reference";
3236
3379
  readonly RollupNameCollision: "rollup_name_collision";
3237
3380
  readonly EmptyStorage: "empty_storage";
3238
3381
  readonly TableNameCollision: "table_name_collision";
3239
3382
  readonly CurrentTime: "current_time";
3383
+ readonly ReadsGiven: "reads_given";
3384
+ readonly IncrementalUnsupported: "incremental_unsupported";
3385
+ readonly MaterializationOff: "materialization_off";
3386
+ readonly MultiLineAnnotation: "multi_line_annotation";
3387
+ readonly BuildNameCollision: "build_name_collision";
3388
+ readonly RunTargetUnsupported: "run_target_unsupported";
3389
+ readonly NestedResult: "nested_result";
3390
+ readonly InheritedPersist: "inherited_persist";
3391
+ readonly InlineUnsupported: "inline_unsupported";
3392
+ readonly NoStoredColumns: "no_stored_columns";
3393
+ readonly NeedsQualifiedName: "needs_qualified_name";
3394
+ readonly GeneratedBuildFailed: "generated_build_failed";
3395
+ readonly HiddenField: "hidden_field";
3396
+ readonly AccessFilter: "access_filter";
3397
+ readonly TimeZone: "time_zone";
3398
+ readonly UnreadableMeasure: "unreadable_measure";
3399
+ readonly JoinNotInGrain: "join_not_in_grain";
3400
+ readonly PartialNameCollision: "partial_name_collision";
3401
+ readonly GivenWhereOverUnstoredField: "given_where_over_unstored_field";
3402
+ readonly UnreadableGrain: "unreadable_grain";
3240
3403
  };
3241
3404
  export type RefusedSourceReasonEnum = typeof RefusedSourceReasonEnum[keyof typeof RefusedSourceReasonEnum];
3242
3405
  /**
@@ -3595,19 +3758,19 @@ export interface ServeVerdict {
3595
3758
  */
3596
3759
  'modelPath'?: string;
3597
3760
  /**
3598
- * `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.
3761
+ * 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`.
3599
3762
  */
3600
3763
  'origin': string;
3601
3764
  /**
3602
- * Where its table lives: `colocated` (the source\'s own connection) or `storage` (a `storage=` destination).
3765
+ * 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.
3603
3766
  */
3604
3767
  'tier': string;
3605
3768
  /**
3606
- * `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.
3769
+ * `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`.
3607
3770
  */
3608
3771
  'verdict': string;
3609
3772
  /**
3610
- * 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` (retained, never reported by a released server: a rollup over a `storage=` base is planned like any other), `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.
3773
+ * 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.
3611
3774
  */
3612
3775
  'reason'?: string;
3613
3776
  /**
@@ -3619,11 +3782,21 @@ export interface ServeVerdict {
3619
3782
  */
3620
3783
  'fixes'?: Array<string>;
3621
3784
  /**
3622
- * 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`.
3785
+ * 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`.
3786
+ */
3787
+ 'servePath'?: string;
3788
+ /**
3789
+ * 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.
3790
+ */
3791
+ 'servePathReason'?: string;
3792
+ /**
3793
+ * Deprecated: the same value as `servePath`, under its old name. Emitted beside it for this release only.
3794
+ * @deprecated
3623
3795
  */
3624
3796
  'cutoverPath'?: string;
3625
3797
  /**
3626
- * 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.
3798
+ * Deprecated: the same value as `servePathReason`, under its old name. Emitted beside it for this release only.
3799
+ * @deprecated
3627
3800
  */
3628
3801
  'cutoverReason'?: string;
3629
3802
  /**
@@ -3750,6 +3923,10 @@ export interface ServerStatusLoadErrorsInner {
3750
3923
  * Why it did not load.
3751
3924
  */
3752
3925
  'message'?: string;
3926
+ /**
3927
+ * 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.
3928
+ */
3929
+ 'codes'?: Array<string>;
3753
3930
  /**
3754
3931
  * 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.
3755
3932
  */
@@ -3808,18 +3985,23 @@ export declare const SkillSummaryOriginEnum: {
3808
3985
  };
3809
3986
  export type SkillSummaryOriginEnum = typeof SkillSummaryOriginEnum[keyof typeof SkillSummaryOriginEnum];
3810
3987
  /**
3811
- * 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.
3988
+ * 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.
3812
3989
  */
3813
3990
  export declare const SkipReason: {
3814
3991
  readonly NotBuilt: "NOT_BUILT";
3815
- readonly Warned: "WARNED";
3992
+ readonly NotServed: "NOT_SERVED";
3993
+ readonly OptedOut: "OPTED_OUT";
3816
3994
  readonly MissingField: "MISSING_FIELD";
3817
- readonly Contract: "CONTRACT";
3995
+ readonly ShapeMismatch: "SHAPE_MISMATCH";
3996
+ readonly RowLevelGate: "ROW_LEVEL_GATE";
3818
3997
  readonly GrainTooCoarse: "GRAIN_TOO_COARSE";
3819
3998
  readonly TimeZone: "TIME_ZONE";
3820
3999
  readonly CrossConnection: "CROSS_CONNECTION";
3821
4000
  readonly CountSemantics: "COUNT_SEMANTICS";
3822
4001
  readonly Stale: "STALE";
4002
+ readonly ReadFailed: "READ_FAILED";
4003
+ readonly Warned: "WARNED";
4004
+ readonly Contract: "CONTRACT";
3823
4005
  readonly RunFailed: "RUN_FAILED";
3824
4006
  };
3825
4007
  export type SkipReason = typeof SkipReason[keyof typeof SkipReason];
@@ -3961,19 +4143,27 @@ export interface SourceFailure {
3961
4143
  */
3962
4144
  'physicalTableName'?: string;
3963
4145
  /**
3964
- * 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.
4146
+ * 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.
3965
4147
  */
3966
4148
  'connectionName'?: string;
3967
4149
  /**
3968
- * 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.
4150
+ * 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.
3969
4151
  */
3970
4152
  'storageDestinationName'?: string;
4153
+ /**
4154
+ * 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.
4155
+ */
4156
+ 'refusalReason'?: string;
4157
+ /**
4158
+ * 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.
4159
+ */
4160
+ 'code'?: string;
3971
4161
  /**
3972
4162
  * 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.
3973
4163
  */
3974
4164
  'refused'?: boolean;
3975
4165
  /**
3976
- * Whether rebuilding this source unchanged could succeed, so an orchestrator that retries failed builds can stop spending attempts on one that cannot. `false` is a deterministic failure: the same model, instructions and bounds fail the same way on every attempt. It is reported for an eligibility refusal (always, beside `refused`), a Malloy or SQL compile defect (a syntax or parser error), a rejected credential or missing grant (permission or access denied), and a source refused under `strictUpstreams` because a persisted upstream it reads failed deterministically earlier in the same run. That last source inherits its upstream\'s classification (`true` when any such upstream\'s failure is transient) and its `reason` names the upstream\'s own failure. Also `false` for a source a strict build refused under `warehouseReach: refuse`, whose only build would recompute its stored upstreams from the warehouse. `true` is a transient failure, not a property of the inputs: the database could not be reached or reset the connection, a timeout, a rate limit, the build session running out of memory (`Out of Memory Error`, `could not allocate block`, `failed to pin block`: a worker\'s builds share its memory, so a build that ran out beside others can fit alone, and the consumer\'s retry cap bounds one that never fits), or a cancellation. Absent when Publisher does not recognize the error, and from every Publisher that predates the field. A consumer treats absence exactly as it did before this field existed. Deliberately absent: a missing table or column (a binder error, an unrecognized name), because a referenced upstream reclaimed mid-build reads the same as a model defect; and a persisted upstream no manifest holds, on its own, because it may be materialized in another destination or left out of instructions an orchestrator fixed, so retrying the same instructions would not supply it.
4166
+ * Whether rebuilding this source unchanged could succeed, so an orchestrator that retries failed builds can stop spending attempts on one that cannot. `false` is a deterministic failure: the same model, instructions and bounds fail the same way on every attempt. It is reported for an eligibility refusal (always, beside `refused`), a Malloy or SQL compile defect (a syntax or parser error), a rejected credential or missing grant (a message that says permission or access denied), a warehouse\'s own data or syntax error, and a source refused under `strictUpstreams` because a persisted upstream it reads failed deterministically earlier in the same run. That last source inherits its upstream\'s classification (`true` when any such upstream\'s failure is transient) and its `reason` names the upstream\'s own failure. Also `false` for a source a strict build refused under `warehouseReach: refuse`, whose only build would recompute its stored upstreams from the warehouse. A warehouse\'s own data or syntax error is one the warehouse names as such: a Postgres or Snowflake SQLSTATE in class 22 (data exception) or 42 (syntax error or access rule violation), or a BigQuery `invalidQuery` or `invalid` job error, and a Postgres data exception that reaches Publisher as text only (through a DuckDB passthrough). Five SQLSTATEs in class 42 are left to the other rules: a missing table or column (`42P01`, `42703`, `42S02`, `42S22`, and a BigQuery `Unrecognized name` or `Not found`), which stays absent, and `42501` (insufficient privilege). A Postgres `42501` still reports `false`, because its message says permission denied; a Snowflake `42501` stays absent. Transient codes (`40001`, `40P01`, and BigQuery\'s backend and quota reasons) are never `false`. `true` is a transient failure, not a property of the inputs: the database could not be reached or reset the connection, a timeout, a rate limit, the build session running out of memory (`Out of Memory Error`, `could not allocate block`, `failed to pin block`: a worker\'s builds share its memory, so a build that ran out beside others can fit alone, and the consumer\'s retry cap bounds one that never fits), or a cancellation. Absent when Publisher does not recognize the error, and from every Publisher that predates the field. A consumer treats absence exactly as it did before this field existed. Deliberately absent: a missing table or column (a binder error, an unrecognized name), because a referenced upstream reclaimed mid-build reads the same as a model defect; and a persisted upstream no manifest holds, on its own, because it may be materialized in another destination or left out of instructions an orchestrator fixed, so retrying the same instructions would not supply it.
3977
4167
  */
3978
4168
  'retryable'?: boolean;
3979
4169
  }
@@ -4115,7 +4305,7 @@ export interface StorageServeBinding {
4115
4305
  */
4116
4306
  'sourceName'?: string;
4117
4307
  /**
4118
- * 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`.
4308
+ * 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.
4119
4309
  */
4120
4310
  'origin'?: StorageServeBindingOriginEnum;
4121
4311
  /**
@@ -4129,6 +4319,10 @@ export interface StorageServeBinding {
4129
4319
  }
4130
4320
  export declare const StorageServeBindingOriginEnum: {
4131
4321
  readonly Persist: "persist";
4322
+ readonly Materialize: "materialize";
4323
+ readonly View: "view";
4324
+ readonly Query: "query";
4325
+ readonly Rollup: "rollup";
4132
4326
  readonly Preaggregate: "preaggregate";
4133
4327
  };
4134
4328
  export type StorageServeBindingOriginEnum = typeof StorageServeBindingOriginEnum[keyof typeof StorageServeBindingOriginEnum];
@@ -4707,7 +4901,7 @@ export declare const ConnectionsApiAxiosParamCreator: (configuration?: Configura
4707
4901
  */
4708
4902
  listTablesInPackage: (environmentName: string, packageName: string, connectionName: string, schemaName: string, tableNames?: Array<string>, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4709
4903
  /**
4710
- * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
4904
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1. On a DuckDB-backed connection (`duckdb`, including a package\'s `duckdb` sandbox, `ducklake` and `motherduck`), `sqlStatement` runs only as a single SELECT. Any other statement, more than one statement, or SQL that does not parse answers 400 before anything runs. `sqlSource` and `sqlTemporaryTable` apply the same rule to the caller\'s SQL.
4711
4905
  * @summary Execute SQL query
4712
4906
  * @param {string} environmentName Name of the environment
4713
4907
  * @param {string} connectionName Name of the connection
@@ -4717,7 +4911,7 @@ export declare const ConnectionsApiAxiosParamCreator: (configuration?: Configura
4717
4911
  */
4718
4912
  postQuerydata: (environmentName: string, connectionName: string, postQuerydataRequest: PostQuerydataRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4719
4913
  /**
4720
- * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
4914
+ * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint, and to the same single-SELECT rule on a DuckDB-backed connection: any other statement answers 400.
4721
4915
  * @summary Execute SQL query (per-package)
4722
4916
  * @param {string} environmentName Name of the environment
4723
4917
  * @param {string} packageName Name of the package whose connection context to use
@@ -4892,7 +5086,7 @@ export declare const ConnectionsApiFp: (configuration?: Configuration) => {
4892
5086
  */
4893
5087
  listTablesInPackage(environmentName: string, packageName: string, connectionName: string, schemaName: string, tableNames?: Array<string>, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Table>>>;
4894
5088
  /**
4895
- * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
5089
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1. On a DuckDB-backed connection (`duckdb`, including a package\'s `duckdb` sandbox, `ducklake` and `motherduck`), `sqlStatement` runs only as a single SELECT. Any other statement, more than one statement, or SQL that does not parse answers 400 before anything runs. `sqlSource` and `sqlTemporaryTable` apply the same rule to the caller\'s SQL.
4896
5090
  * @summary Execute SQL query
4897
5091
  * @param {string} environmentName Name of the environment
4898
5092
  * @param {string} connectionName Name of the connection
@@ -4902,7 +5096,7 @@ export declare const ConnectionsApiFp: (configuration?: Configuration) => {
4902
5096
  */
4903
5097
  postQuerydata(environmentName: string, connectionName: string, postQuerydataRequest: PostQuerydataRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryData>>;
4904
5098
  /**
4905
- * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
5099
+ * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint, and to the same single-SELECT rule on a DuckDB-backed connection: any other statement answers 400.
4906
5100
  * @summary Execute SQL query (per-package)
4907
5101
  * @param {string} environmentName Name of the environment
4908
5102
  * @param {string} packageName Name of the package whose connection context to use
@@ -5077,7 +5271,7 @@ export declare const ConnectionsApiFactory: (configuration?: Configuration, base
5077
5271
  */
5078
5272
  listTablesInPackage(environmentName: string, packageName: string, connectionName: string, schemaName: string, tableNames?: Array<string>, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Table>>;
5079
5273
  /**
5080
- * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
5274
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1. On a DuckDB-backed connection (`duckdb`, including a package\'s `duckdb` sandbox, `ducklake` and `motherduck`), `sqlStatement` runs only as a single SELECT. Any other statement, more than one statement, or SQL that does not parse answers 400 before anything runs. `sqlSource` and `sqlTemporaryTable` apply the same rule to the caller\'s SQL.
5081
5275
  * @summary Execute SQL query
5082
5276
  * @param {string} environmentName Name of the environment
5083
5277
  * @param {string} connectionName Name of the connection
@@ -5087,7 +5281,7 @@ export declare const ConnectionsApiFactory: (configuration?: Configuration, base
5087
5281
  */
5088
5282
  postQuerydata(environmentName: string, connectionName: string, postQuerydataRequest: PostQuerydataRequest, options?: RawAxiosRequestConfig): AxiosPromise<QueryData>;
5089
5283
  /**
5090
- * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
5284
+ * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint, and to the same single-SELECT rule on a DuckDB-backed connection: any other statement answers 400.
5091
5285
  * @summary Execute SQL query (per-package)
5092
5286
  * @param {string} environmentName Name of the environment
5093
5287
  * @param {string} packageName Name of the package whose connection context to use
@@ -5262,7 +5456,7 @@ export declare class ConnectionsApi extends BaseAPI {
5262
5456
  */
5263
5457
  listTablesInPackage(environmentName: string, packageName: string, connectionName: string, schemaName: string, tableNames?: Array<string>, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<Table[], any, {}, any>>;
5264
5458
  /**
5265
- * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1.
5459
+ * Executes a SQL statement against the specified database connection and returns the results. The results include data, metadata, and execution information. Rows returned are capped at PUBLISHER_MAX_QUERY_ROWS (default 100,000). The cap is forwarded to the connector as a rowLimit on RunSQLOptions; queries that return more rows than the cap fail with HTTP 413 rather than serializing the response. Set PUBLISHER_MAX_QUERY_ROWS=0 to disable the cap. A caller-supplied rowLimit smaller than the cap is preserved; larger values are clamped down to cap+1. On a DuckDB-backed connection (`duckdb`, including a package\'s `duckdb` sandbox, `ducklake` and `motherduck`), `sqlStatement` runs only as a single SELECT. Any other statement, more than one statement, or SQL that does not parse answers 400 before anything runs. `sqlSource` and `sqlTemporaryTable` apply the same rule to the caller\'s SQL.
5266
5460
  * @summary Execute SQL query
5267
5461
  * @param {string} environmentName Name of the environment
5268
5462
  * @param {string} connectionName Name of the connection
@@ -5272,7 +5466,7 @@ export declare class ConnectionsApi extends BaseAPI {
5272
5466
  */
5273
5467
  postQuerydata(environmentName: string, connectionName: string, postQuerydataRequest: PostQuerydataRequest, options?: RawAxiosRequestConfig): Promise< AxiosResponse<QueryData, any, {}, any>>;
5274
5468
  /**
5275
- * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint.
5469
+ * Executes a SQL statement against the specified database connection, resolved in the context of the named package, and returns the results. Subject to the same PUBLISHER_MAX_QUERY_ROWS row cap as the environment-level sqlQuery endpoint, and to the same single-SELECT rule on a DuckDB-backed connection: any other statement answers 400.
5276
5470
  * @summary Execute SQL query (per-package)
5277
5471
  * @param {string} environmentName Name of the environment
5278
5472
  * @param {string} packageName Name of the package whose connection context to use
@@ -5821,17 +6015,29 @@ export declare const MaterializationsApiAxiosParamCreator: (configuration?: Conf
5821
6015
  */
5822
6016
  createMaterialization: (environmentName: string, packageName: string, createMaterializationRequest?: CreateMaterializationRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5823
6017
  /**
5824
- * 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.
6018
+ * 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 database table this run produced, use `drop-materialized-table` (`DELETE …/connections/{connectionName}/materializedTables/{tableName}`), which checks that no remaining run, of any version, names a table with that name in any place; a table built before 0.16.0 carries no ownership mark, so drop it first, passing this run\'s id, then delete the run. `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.
5825
6019
  * @summary Delete a materialization
5826
6020
  * @param {string} environmentName Name of the environment
5827
6021
  * @param {string} packageName Name of the package
5828
6022
  * @param {string} materializationId ID of the materialization
5829
- * @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.
5830
6023
  * @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.
5831
6024
  * @param {*} [options] Override http request option.
5832
6025
  * @throws {RequiredError}
5833
6026
  */
5834
- deleteMaterialization: (environmentName: string, packageName: string, materializationId: string, dropTables?: boolean, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
6027
+ deleteMaterialization: (environmentName: string, packageName: string, materializationId: string, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
6028
+ /**
6029
+ * Drops one database-tier table a materialization of this package built on one of the package\'s connections, with the staging and backup copies a crashed build can leave beside it when a run record names the table. This is the drop a caller makes after (or before) deleting a run\'s record, which never drops a table. A `storage=` table lives in a storage destination, which this route does not reach; the admin API\'s catalog routes drop those. Publisher does not authenticate the caller: the gateway in front of it decides who may call this route, and should allow only the operator that owns the package\'s materialization lifecycle. The route itself refuses any table it cannot prove is this package\'s and unused, under the package\'s run lock and the table name\'s lock, so no run starts, commits or claims the name between the checks and the drop: * 400: the name cannot be quoted in the connection\'s dialect, or it is the staging or backup copy a build makes of a table a run of the package records, which is dropped only with that table. * 404, with no `reason`: the package does not reach a connection by that name (or the environment, package or `materializationId` does not exist). * 409 `MATERIALIZATION_CONFLICT`: a run of the package is active. Retry once it settles. * 409 `TABLE_IN_USE`: a committed run of the package, of any version, other than the one `materializationId` names, names a table with this name in any place; the run `materializationId` names is the one a version or the package serves; or a loaded copy of any package in the environment is bound to a table with this name; or the warehouse refused the drop because other objects depend on the table (Postgres 2BP01). Delete or replace that run, or those objects, first. * 409 `TABLE_OWNED_ELSEWHERE`: the table carries another package\'s ownership mark, or the name is held by a view Publisher did not create or another package\'s view; or the warehouse refused the drop because the connection may not drop it (42501) or the name holds something other than a table (42809). The answer does not name the holder. * 409 `TABLE_OWNERSHIP_UNVERIFIED`: the table carries no ownership mark this route accepts, and the run `materializationId` names (terminal, of this package) does not record it on this connection; or who holds the name could not be read. A mark is accepted only when it names this package and the very place the warehouse\'s catalog says the name resolves to now (its fully qualified location, recorded when the mark was written): a comment travels with a renamed, moved or cloned table, so such a copy, or another schema\'s table a search path finds first, is treated as unmarked, as is a mark written before 0.16.0 (it names no place). Drop such a table passing the id of the run that records it, before deleting that run\'s record. * 404 `TABLE_NOT_FOUND`: no table holds the name and no run record of this package names it on this connection, so nothing proves it was ever this package\'s. A table that is already gone answers 204 when a run record of this package still names it on this connection (pass its `materializationId`, or retry before deleting the record), so a retried drop succeeds; otherwise 404 `TABLE_NOT_FOUND`.
6030
+ * @summary Drop a materialized table from a package\'s connection
6031
+ * @param {string} environmentName Name of the environment
6032
+ * @param {string} packageName Name of the package
6033
+ * @param {string} connectionName Name of the connection the table was built on, as the package reaches it
6034
+ * @param {string} tableName The table\&#39;s full name as the run\&#39;s manifest records it (&#x60;physicalTableName&#x60;: &#x60;table&#x60;, &#x60;schema.table&#x60; or &#x60;catalog.schema.table&#x60;), URL-encoded. It is quoted for the connection\&#39;s dialect as the build quoted it; a name the dialect cannot quote answers 400.
6035
+ * @param {string} [materializationId] The id of the run that built the table, as evidence that it is this package\&#39;s when it carries no ownership mark. That run is not counted as using the table, unless it is the one a version or the package serves. Must be a terminal run of this package (404 otherwise; 409 &#x60;MATERIALIZATION_CONFLICT&#x60; while it is active).
6036
+ * @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.
6037
+ * @param {*} [options] Override http request option.
6038
+ * @throws {RequiredError}
6039
+ */
6040
+ dropMaterializedTable: (environmentName: string, packageName: string, connectionName: string, tableName: string, materializationId?: string, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5835
6041
  /**
5836
6042
  * 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.
5837
6043
  * @summary Get a specific materialization
@@ -5883,17 +6089,29 @@ export declare const MaterializationsApiFp: (configuration?: Configuration) => {
5883
6089
  */
5884
6090
  createMaterialization(environmentName: string, packageName: string, createMaterializationRequest?: CreateMaterializationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Materialization>>;
5885
6091
  /**
5886
- * 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.
6092
+ * 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 database table this run produced, use `drop-materialized-table` (`DELETE …/connections/{connectionName}/materializedTables/{tableName}`), which checks that no remaining run, of any version, names a table with that name in any place; a table built before 0.16.0 carries no ownership mark, so drop it first, passing this run\'s id, then delete the run. `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.
5887
6093
  * @summary Delete a materialization
5888
6094
  * @param {string} environmentName Name of the environment
5889
6095
  * @param {string} packageName Name of the package
5890
6096
  * @param {string} materializationId ID of the materialization
5891
- * @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.
5892
6097
  * @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.
5893
6098
  * @param {*} [options] Override http request option.
5894
6099
  * @throws {RequiredError}
5895
6100
  */
5896
- deleteMaterialization(environmentName: string, packageName: string, materializationId: string, dropTables?: boolean, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
6101
+ deleteMaterialization(environmentName: string, packageName: string, materializationId: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
6102
+ /**
6103
+ * Drops one database-tier table a materialization of this package built on one of the package\'s connections, with the staging and backup copies a crashed build can leave beside it when a run record names the table. This is the drop a caller makes after (or before) deleting a run\'s record, which never drops a table. A `storage=` table lives in a storage destination, which this route does not reach; the admin API\'s catalog routes drop those. Publisher does not authenticate the caller: the gateway in front of it decides who may call this route, and should allow only the operator that owns the package\'s materialization lifecycle. The route itself refuses any table it cannot prove is this package\'s and unused, under the package\'s run lock and the table name\'s lock, so no run starts, commits or claims the name between the checks and the drop: * 400: the name cannot be quoted in the connection\'s dialect, or it is the staging or backup copy a build makes of a table a run of the package records, which is dropped only with that table. * 404, with no `reason`: the package does not reach a connection by that name (or the environment, package or `materializationId` does not exist). * 409 `MATERIALIZATION_CONFLICT`: a run of the package is active. Retry once it settles. * 409 `TABLE_IN_USE`: a committed run of the package, of any version, other than the one `materializationId` names, names a table with this name in any place; the run `materializationId` names is the one a version or the package serves; or a loaded copy of any package in the environment is bound to a table with this name; or the warehouse refused the drop because other objects depend on the table (Postgres 2BP01). Delete or replace that run, or those objects, first. * 409 `TABLE_OWNED_ELSEWHERE`: the table carries another package\'s ownership mark, or the name is held by a view Publisher did not create or another package\'s view; or the warehouse refused the drop because the connection may not drop it (42501) or the name holds something other than a table (42809). The answer does not name the holder. * 409 `TABLE_OWNERSHIP_UNVERIFIED`: the table carries no ownership mark this route accepts, and the run `materializationId` names (terminal, of this package) does not record it on this connection; or who holds the name could not be read. A mark is accepted only when it names this package and the very place the warehouse\'s catalog says the name resolves to now (its fully qualified location, recorded when the mark was written): a comment travels with a renamed, moved or cloned table, so such a copy, or another schema\'s table a search path finds first, is treated as unmarked, as is a mark written before 0.16.0 (it names no place). Drop such a table passing the id of the run that records it, before deleting that run\'s record. * 404 `TABLE_NOT_FOUND`: no table holds the name and no run record of this package names it on this connection, so nothing proves it was ever this package\'s. A table that is already gone answers 204 when a run record of this package still names it on this connection (pass its `materializationId`, or retry before deleting the record), so a retried drop succeeds; otherwise 404 `TABLE_NOT_FOUND`.
6104
+ * @summary Drop a materialized table from a package\'s connection
6105
+ * @param {string} environmentName Name of the environment
6106
+ * @param {string} packageName Name of the package
6107
+ * @param {string} connectionName Name of the connection the table was built on, as the package reaches it
6108
+ * @param {string} tableName The table\&#39;s full name as the run\&#39;s manifest records it (&#x60;physicalTableName&#x60;: &#x60;table&#x60;, &#x60;schema.table&#x60; or &#x60;catalog.schema.table&#x60;), URL-encoded. It is quoted for the connection\&#39;s dialect as the build quoted it; a name the dialect cannot quote answers 400.
6109
+ * @param {string} [materializationId] The id of the run that built the table, as evidence that it is this package\&#39;s when it carries no ownership mark. That run is not counted as using the table, unless it is the one a version or the package serves. Must be a terminal run of this package (404 otherwise; 409 &#x60;MATERIALIZATION_CONFLICT&#x60; while it is active).
6110
+ * @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.
6111
+ * @param {*} [options] Override http request option.
6112
+ * @throws {RequiredError}
6113
+ */
6114
+ dropMaterializedTable(environmentName: string, packageName: string, connectionName: string, tableName: string, materializationId?: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
5897
6115
  /**
5898
6116
  * 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.
5899
6117
  * @summary Get a specific materialization
@@ -5945,17 +6163,29 @@ export declare const MaterializationsApiFactory: (configuration?: Configuration,
5945
6163
  */
5946
6164
  createMaterialization(environmentName: string, packageName: string, createMaterializationRequest?: CreateMaterializationRequest, options?: RawAxiosRequestConfig): AxiosPromise<Materialization>;
5947
6165
  /**
5948
- * 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.
6166
+ * 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 database table this run produced, use `drop-materialized-table` (`DELETE …/connections/{connectionName}/materializedTables/{tableName}`), which checks that no remaining run, of any version, names a table with that name in any place; a table built before 0.16.0 carries no ownership mark, so drop it first, passing this run\'s id, then delete the run. `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.
5949
6167
  * @summary Delete a materialization
5950
6168
  * @param {string} environmentName Name of the environment
5951
6169
  * @param {string} packageName Name of the package
5952
6170
  * @param {string} materializationId ID of the materialization
5953
- * @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.
5954
6171
  * @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.
5955
6172
  * @param {*} [options] Override http request option.
5956
6173
  * @throws {RequiredError}
5957
6174
  */
5958
- deleteMaterialization(environmentName: string, packageName: string, materializationId: string, dropTables?: boolean, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
6175
+ deleteMaterialization(environmentName: string, packageName: string, materializationId: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
6176
+ /**
6177
+ * Drops one database-tier table a materialization of this package built on one of the package\'s connections, with the staging and backup copies a crashed build can leave beside it when a run record names the table. This is the drop a caller makes after (or before) deleting a run\'s record, which never drops a table. A `storage=` table lives in a storage destination, which this route does not reach; the admin API\'s catalog routes drop those. Publisher does not authenticate the caller: the gateway in front of it decides who may call this route, and should allow only the operator that owns the package\'s materialization lifecycle. The route itself refuses any table it cannot prove is this package\'s and unused, under the package\'s run lock and the table name\'s lock, so no run starts, commits or claims the name between the checks and the drop: * 400: the name cannot be quoted in the connection\'s dialect, or it is the staging or backup copy a build makes of a table a run of the package records, which is dropped only with that table. * 404, with no `reason`: the package does not reach a connection by that name (or the environment, package or `materializationId` does not exist). * 409 `MATERIALIZATION_CONFLICT`: a run of the package is active. Retry once it settles. * 409 `TABLE_IN_USE`: a committed run of the package, of any version, other than the one `materializationId` names, names a table with this name in any place; the run `materializationId` names is the one a version or the package serves; or a loaded copy of any package in the environment is bound to a table with this name; or the warehouse refused the drop because other objects depend on the table (Postgres 2BP01). Delete or replace that run, or those objects, first. * 409 `TABLE_OWNED_ELSEWHERE`: the table carries another package\'s ownership mark, or the name is held by a view Publisher did not create or another package\'s view; or the warehouse refused the drop because the connection may not drop it (42501) or the name holds something other than a table (42809). The answer does not name the holder. * 409 `TABLE_OWNERSHIP_UNVERIFIED`: the table carries no ownership mark this route accepts, and the run `materializationId` names (terminal, of this package) does not record it on this connection; or who holds the name could not be read. A mark is accepted only when it names this package and the very place the warehouse\'s catalog says the name resolves to now (its fully qualified location, recorded when the mark was written): a comment travels with a renamed, moved or cloned table, so such a copy, or another schema\'s table a search path finds first, is treated as unmarked, as is a mark written before 0.16.0 (it names no place). Drop such a table passing the id of the run that records it, before deleting that run\'s record. * 404 `TABLE_NOT_FOUND`: no table holds the name and no run record of this package names it on this connection, so nothing proves it was ever this package\'s. A table that is already gone answers 204 when a run record of this package still names it on this connection (pass its `materializationId`, or retry before deleting the record), so a retried drop succeeds; otherwise 404 `TABLE_NOT_FOUND`.
6178
+ * @summary Drop a materialized table from a package\'s connection
6179
+ * @param {string} environmentName Name of the environment
6180
+ * @param {string} packageName Name of the package
6181
+ * @param {string} connectionName Name of the connection the table was built on, as the package reaches it
6182
+ * @param {string} tableName The table\&#39;s full name as the run\&#39;s manifest records it (&#x60;physicalTableName&#x60;: &#x60;table&#x60;, &#x60;schema.table&#x60; or &#x60;catalog.schema.table&#x60;), URL-encoded. It is quoted for the connection\&#39;s dialect as the build quoted it; a name the dialect cannot quote answers 400.
6183
+ * @param {string} [materializationId] The id of the run that built the table, as evidence that it is this package\&#39;s when it carries no ownership mark. That run is not counted as using the table, unless it is the one a version or the package serves. Must be a terminal run of this package (404 otherwise; 409 &#x60;MATERIALIZATION_CONFLICT&#x60; while it is active).
6184
+ * @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.
6185
+ * @param {*} [options] Override http request option.
6186
+ * @throws {RequiredError}
6187
+ */
6188
+ dropMaterializedTable(environmentName: string, packageName: string, connectionName: string, tableName: string, materializationId?: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
5959
6189
  /**
5960
6190
  * 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.
5961
6191
  * @summary Get a specific materialization
@@ -6007,17 +6237,29 @@ export declare class MaterializationsApi extends BaseAPI {
6007
6237
  */
6008
6238
  createMaterialization(environmentName: string, packageName: string, createMaterializationRequest?: CreateMaterializationRequest, options?: RawAxiosRequestConfig): Promise< AxiosResponse<Materialization, any, {}, any>>;
6009
6239
  /**
6010
- * 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.
6240
+ * 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 database table this run produced, use `drop-materialized-table` (`DELETE …/connections/{connectionName}/materializedTables/{tableName}`), which checks that no remaining run, of any version, names a table with that name in any place; a table built before 0.16.0 carries no ownership mark, so drop it first, passing this run\'s id, then delete the run. `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.
6011
6241
  * @summary Delete a materialization
6012
6242
  * @param {string} environmentName Name of the environment
6013
6243
  * @param {string} packageName Name of the package
6014
6244
  * @param {string} materializationId ID of the materialization
6015
- * @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.
6016
6245
  * @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.
6017
6246
  * @param {*} [options] Override http request option.
6018
6247
  * @throws {RequiredError}
6019
6248
  */
6020
- deleteMaterialization(environmentName: string, packageName: string, materializationId: string, dropTables?: boolean, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<void, any, {}, any>>;
6249
+ deleteMaterialization(environmentName: string, packageName: string, materializationId: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<void, any, {}, any>>;
6250
+ /**
6251
+ * Drops one database-tier table a materialization of this package built on one of the package\'s connections, with the staging and backup copies a crashed build can leave beside it when a run record names the table. This is the drop a caller makes after (or before) deleting a run\'s record, which never drops a table. A `storage=` table lives in a storage destination, which this route does not reach; the admin API\'s catalog routes drop those. Publisher does not authenticate the caller: the gateway in front of it decides who may call this route, and should allow only the operator that owns the package\'s materialization lifecycle. The route itself refuses any table it cannot prove is this package\'s and unused, under the package\'s run lock and the table name\'s lock, so no run starts, commits or claims the name between the checks and the drop: * 400: the name cannot be quoted in the connection\'s dialect, or it is the staging or backup copy a build makes of a table a run of the package records, which is dropped only with that table. * 404, with no `reason`: the package does not reach a connection by that name (or the environment, package or `materializationId` does not exist). * 409 `MATERIALIZATION_CONFLICT`: a run of the package is active. Retry once it settles. * 409 `TABLE_IN_USE`: a committed run of the package, of any version, other than the one `materializationId` names, names a table with this name in any place; the run `materializationId` names is the one a version or the package serves; or a loaded copy of any package in the environment is bound to a table with this name; or the warehouse refused the drop because other objects depend on the table (Postgres 2BP01). Delete or replace that run, or those objects, first. * 409 `TABLE_OWNED_ELSEWHERE`: the table carries another package\'s ownership mark, or the name is held by a view Publisher did not create or another package\'s view; or the warehouse refused the drop because the connection may not drop it (42501) or the name holds something other than a table (42809). The answer does not name the holder. * 409 `TABLE_OWNERSHIP_UNVERIFIED`: the table carries no ownership mark this route accepts, and the run `materializationId` names (terminal, of this package) does not record it on this connection; or who holds the name could not be read. A mark is accepted only when it names this package and the very place the warehouse\'s catalog says the name resolves to now (its fully qualified location, recorded when the mark was written): a comment travels with a renamed, moved or cloned table, so such a copy, or another schema\'s table a search path finds first, is treated as unmarked, as is a mark written before 0.16.0 (it names no place). Drop such a table passing the id of the run that records it, before deleting that run\'s record. * 404 `TABLE_NOT_FOUND`: no table holds the name and no run record of this package names it on this connection, so nothing proves it was ever this package\'s. A table that is already gone answers 204 when a run record of this package still names it on this connection (pass its `materializationId`, or retry before deleting the record), so a retried drop succeeds; otherwise 404 `TABLE_NOT_FOUND`.
6252
+ * @summary Drop a materialized table from a package\'s connection
6253
+ * @param {string} environmentName Name of the environment
6254
+ * @param {string} packageName Name of the package
6255
+ * @param {string} connectionName Name of the connection the table was built on, as the package reaches it
6256
+ * @param {string} tableName The table\&#39;s full name as the run\&#39;s manifest records it (&#x60;physicalTableName&#x60;: &#x60;table&#x60;, &#x60;schema.table&#x60; or &#x60;catalog.schema.table&#x60;), URL-encoded. It is quoted for the connection\&#39;s dialect as the build quoted it; a name the dialect cannot quote answers 400.
6257
+ * @param {string} [materializationId] The id of the run that built the table, as evidence that it is this package\&#39;s when it carries no ownership mark. That run is not counted as using the table, unless it is the one a version or the package serves. Must be a terminal run of this package (404 otherwise; 409 &#x60;MATERIALIZATION_CONFLICT&#x60; while it is active).
6258
+ * @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.
6259
+ * @param {*} [options] Override http request option.
6260
+ * @throws {RequiredError}
6261
+ */
6262
+ dropMaterializedTable(environmentName: string, packageName: string, connectionName: string, tableName: string, materializationId?: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<void, any, {}, any>>;
6021
6263
  /**
6022
6264
  * 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.
6023
6265
  * @summary Get a specific materialization
@@ -7467,7 +7709,7 @@ export declare const VersionsApiAxiosParamCreator: (configuration?: Configuratio
7467
7709
  */
7468
7710
  setPackageLatestVersion: (environmentName: string, packageName: string, packageLatestVersion: PackageLatestVersion, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7469
7711
  /**
7470
- * 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.
7712
+ * 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.
7471
7713
  * @summary Bind a version to a build manifest
7472
7714
  * @param {string} environmentName Name of the environment
7473
7715
  * @param {string} packageName Name of the package
@@ -7533,7 +7775,7 @@ export declare const VersionsApiFp: (configuration?: Configuration) => {
7533
7775
  */
7534
7776
  setPackageLatestVersion(environmentName: string, packageName: string, packageLatestVersion: PackageLatestVersion, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PackageVersion>>;
7535
7777
  /**
7536
- * 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.
7778
+ * 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.
7537
7779
  * @summary Bind a version to a build manifest
7538
7780
  * @param {string} environmentName Name of the environment
7539
7781
  * @param {string} packageName Name of the package
@@ -7599,7 +7841,7 @@ export declare const VersionsApiFactory: (configuration?: Configuration, basePat
7599
7841
  */
7600
7842
  setPackageLatestVersion(environmentName: string, packageName: string, packageLatestVersion: PackageLatestVersion, options?: RawAxiosRequestConfig): AxiosPromise<PackageVersion>;
7601
7843
  /**
7602
- * 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.
7844
+ * 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.
7603
7845
  * @summary Bind a version to a build manifest
7604
7846
  * @param {string} environmentName Name of the environment
7605
7847
  * @param {string} packageName Name of the package
@@ -7665,7 +7907,7 @@ export declare class VersionsApi extends BaseAPI {
7665
7907
  */
7666
7908
  setPackageLatestVersion(environmentName: string, packageName: string, packageLatestVersion: PackageLatestVersion, options?: RawAxiosRequestConfig): Promise< AxiosResponse<PackageVersion, any, {}, any>>;
7667
7909
  /**
7668
- * 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.
7910
+ * 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.
7669
7911
  * @summary Bind a version to a build manifest
7670
7912
  * @param {string} environmentName Name of the environment
7671
7913
  * @param {string} packageName Name of the package