@malloy-publisher/sdk 0.8.2 → 0.8.4

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 (44) hide show
  1. package/README.md +14 -65
  2. package/dist/{DocumentStorage-BZqn0x5r.es.js → Dashboard-DnqWRijB.es.js} +23691 -23538
  3. package/dist/Dashboard-FD3-Af-_.cjs.js +136 -0
  4. package/dist/{RenderedResult-DKOl0FQ8.es.js → RenderedResult-6UKAHaAj.es.js} +18 -18
  5. package/dist/{RenderedResult-Bu25oAAr.cjs.js → RenderedResult-CetSzFgW.cjs.js} +1 -1
  6. package/dist/ServerProvider-BsjJvkML.cjs.js +1 -0
  7. package/dist/{ServerProvider-CfUFleYe.es.js → ServerProvider-DgRFJ43L.es.js} +983 -957
  8. package/dist/builder/index.cjs.js +50 -50
  9. package/dist/builder/index.es.js +2587 -2511
  10. package/dist/client/api.d.ts +157 -44
  11. package/dist/client/configuration.d.ts +1 -1
  12. package/dist/client/index.cjs.js +1 -1
  13. package/dist/client/index.d.ts +1 -1
  14. package/dist/client/index.es.js +62 -59
  15. package/dist/components/DashboardBuilder/malloyText.d.ts +49 -0
  16. package/dist/components/DashboardBuilder/malloyTree.d.ts +2 -18
  17. package/dist/components/DashboardBuilder/readDocument.d.ts +2 -0
  18. package/dist/components/Notebook/NotebookCell.d.ts +3 -2
  19. package/dist/components/Notebook/cellKind.d.ts +20 -0
  20. package/dist/components/given/filterValue.d.ts +11 -0
  21. package/dist/index.cjs.js +15 -12
  22. package/dist/index.es.js +4528 -4435
  23. package/package.json +1 -1
  24. package/src/components/DashboardBuilder/malloyText.spec.ts +70 -1
  25. package/src/components/DashboardBuilder/malloyText.ts +171 -3
  26. package/src/components/DashboardBuilder/malloyTree.spec.ts +35 -0
  27. package/src/components/DashboardBuilder/malloyTree.ts +28 -4
  28. package/src/components/DashboardBuilder/readDocument.spec.ts +180 -1
  29. package/src/components/DashboardBuilder/readDocument.ts +52 -14
  30. package/src/components/DashboardBuilder/spliceDocument.spec.ts +396 -2
  31. package/src/components/DashboardBuilder/spliceDocument.ts +121 -18
  32. package/src/components/Notebook/Notebook.served.spec.tsx +175 -0
  33. package/src/components/Notebook/Notebook.spec.tsx +33 -2
  34. package/src/components/Notebook/Notebook.tsx +13 -7
  35. package/src/components/Notebook/NotebookCell.tsx +124 -63
  36. package/src/components/Notebook/cellKind.spec.ts +191 -0
  37. package/src/components/Notebook/cellKind.ts +74 -0
  38. package/src/components/Package/Package.notebooks.spec.tsx +90 -0
  39. package/src/components/Package/Package.tsx +18 -4
  40. package/src/components/given/GivenInput.spec.tsx +66 -0
  41. package/src/components/given/GivenInput.tsx +99 -0
  42. package/src/components/given/filterValue.ts +21 -0
  43. package/dist/DocumentStorage-B0_YgSzt.cjs.js +0 -134
  44. package/dist/ServerProvider-CuYLH_Yi.cjs.js +0 -1
@@ -895,7 +895,7 @@ export interface Dashboard {
895
895
  */
896
896
  'title'?: string;
897
897
  /**
898
- * The file\'s `#\"` doc comment, when it has one
898
+ * The file\'s unnamed `\"` notes above the `## artifact` tag; when it has none there, the ones below it (a legacy spot the lint flags). For a dashboard whose tag sits on one query, that query\'s `#\"` notes.
899
899
  * @type {string}
900
900
  * @memberof Dashboard
901
901
  */
@@ -944,7 +944,7 @@ export interface DashboardManifest {
944
944
  */
945
945
  'title'?: string;
946
946
  /**
947
- * The file\'s `#\"` doc comment, when it has one
947
+ * The file\'s unnamed `\"` notes above the `## artifact` tag; when it has none there, the ones below it (a legacy spot the lint flags). For a dashboard whose tag sits on one query, that query\'s `#\"` notes.
948
948
  * @type {string}
949
949
  * @memberof DashboardManifest
950
950
  */
@@ -1945,6 +1945,12 @@ export interface Model {
1945
1945
  * @memberof Model
1946
1946
  */
1947
1947
  'path'?: string;
1948
+ /**
1949
+ * Whether the file is on the package\'s surface: the files this route lists without `includeHiddenFilesAndSources`. True for every file of a package with no surface. It does not say whether a query can reach the file, which `queryableSources: \"all\"` also decides. False only on a file listed because the request set `includeHiddenFilesAndSources`.
1950
+ * @type {boolean}
1951
+ * @memberof Model
1952
+ */
1953
+ 'onSurface'?: boolean;
1948
1954
  /**
1949
1955
  * Error message if the model failed to compile or load
1950
1956
  * @type {string}
@@ -2120,13 +2126,13 @@ export interface Notebook {
2120
2126
  */
2121
2127
  'path'?: string;
2122
2128
  /**
2123
- * Human title, resolved from the notebook\'s own `## title=\"…\"`, then its `#\"` doc comment, then its first markdown heading. Absent when none of those resolve, leaving the caller to show the path.
2129
+ * Human title. For a `.malloynb`, resolved from its own `## title=\"…\"`, then its `#\"` doc comment, then its first markdown heading. For a `.malloy` notebook, from the `title` in its `## artifact` tag, then the first line of the `\"` notes above that tag, then its first markdown heading when no prose precedes it. Absent when none of those resolve, leaving the caller to show the path.
2124
2130
  * @type {string}
2125
2131
  * @memberof Notebook
2126
2132
  */
2127
2133
  'title'?: string;
2128
2134
  /**
2129
- * The notebook\'s `#\"` doc comment, when it has one
2135
+ * The notebook\'s doc comment, when it has one. For a `.malloy` notebook that is the `\"` notes above the `## artifact` line; prose below it is a `##(markdown)` or `##|(markdown)` cell.
2130
2136
  * @type {string}
2131
2137
  * @memberof Notebook
2132
2138
  */
@@ -2150,12 +2156,42 @@ export interface NotebookCell {
2150
2156
  * @memberof NotebookCell
2151
2157
  */
2152
2158
  'type'?: NotebookCellTypeEnum;
2159
+ /**
2160
+ * What a cell is, on a `.malloy` notebook. A definition cell (`source:`, `import`, `query:`, `given:`, `type:`, `export`) has type `code` and produces no result. Absent on a `.malloynb`.
2161
+ * @type {string}
2162
+ * @memberof NotebookCell
2163
+ */
2164
+ 'kind'?: NotebookCellKindEnum;
2153
2165
  /**
2154
2166
  * Text contents of the notebook cell (either markdown or Malloy code)
2155
2167
  * @type {string}
2156
2168
  * @memberof NotebookCell
2157
2169
  */
2158
2170
  'text'?: string;
2171
+ /**
2172
+ * On a `.malloy` notebook\'s code cell, the prose written on the `(markdown)` route in its own tag lines (`#(markdown) text` lines, `#|(markdown)` … `|#` blocks), which `text` still contains. Blocks join with a blank line, adjacent lines with a newline. Author prose, so it is served even when `queryInfo` is withheld. Absent when the cell has none.
2173
+ * @type {string}
2174
+ * @memberof NotebookCell
2175
+ */
2176
+ 'markdown'?: string;
2177
+ /**
2178
+ * Present on every code cell of a `.malloy` notebook, and absent on a `.malloynb` or from a server that predates it. The lines of `text` that hold `markdown`, as `[start, end]` pairs in file order; `[]` when the cell has none. Lines are 0-based and inclusive, counted on `text` split at `\\n`. Strip exactly these lines to get the cell\'s code without its prose; do not re-derive them from `text`, whose first line has lost its indentation.
2179
+ * @type {Array<Array<number>>}
2180
+ * @memberof NotebookCell
2181
+ */
2182
+ 'proseLines'?: Array<Array<number>>;
2183
+ /**
2184
+ * Present on every code cell of a `.malloy` notebook, as `proseLines` is. The 0-based line of `text` (split at `\\n`) where the statement\'s code starts, its first token that is neither a note nor a comment, so the `source`, `run`, `given` or `import` keyword sits on it.
2185
+ * @type {number}
2186
+ * @memberof NotebookCell
2187
+ */
2188
+ 'codeLine'?: number;
2189
+ /**
2190
+ * On a `.malloy` notebook\'s code cell, the joined text of its leading `#\"` lines (space-joined, trimmed). Author prose, so it is served even when `queryInfo` is withheld. Absent when the cell has none, which is authoritative wherever `proseLines` is present.
2191
+ * @type {string}
2192
+ * @memberof NotebookCell
2193
+ */
2194
+ 'caption'?: string;
2159
2195
  /**
2160
2196
  * Array of JSON strings containing SourceInfo objects made available in this cell
2161
2197
  * @type {Array<string>}
@@ -2174,6 +2210,12 @@ export declare const NotebookCellTypeEnum: {
2174
2210
  readonly Code: "code";
2175
2211
  };
2176
2212
  export type NotebookCellTypeEnum = typeof NotebookCellTypeEnum[keyof typeof NotebookCellTypeEnum];
2213
+ export declare const NotebookCellKindEnum: {
2214
+ readonly Markdown: "markdown";
2215
+ readonly Query: "query";
2216
+ readonly Definition: "definition";
2217
+ };
2218
+ export type NotebookCellKindEnum = typeof NotebookCellKindEnum[keyof typeof NotebookCellKindEnum];
2177
2219
  /**
2178
2220
  * Result of executing a notebook cell
2179
2221
  * @export
@@ -2186,12 +2228,42 @@ export interface NotebookCellResult {
2186
2228
  * @memberof NotebookCellResult
2187
2229
  */
2188
2230
  'type'?: NotebookCellResultTypeEnum;
2231
+ /**
2232
+ * The cell\'s kind, on a `.malloy` notebook. Absent on a `.malloynb`.
2233
+ * @type {string}
2234
+ * @memberof NotebookCellResult
2235
+ */
2236
+ 'kind'?: NotebookCellResultKindEnum;
2189
2237
  /**
2190
2238
  * Text contents of the notebook cell
2191
2239
  * @type {string}
2192
2240
  * @memberof NotebookCellResult
2193
2241
  */
2194
2242
  'text'?: string;
2243
+ /**
2244
+ * A `.malloy` notebook code cell\'s own `(markdown)` prose, as on `NotebookCell`. Absent when the cell has none.
2245
+ * @type {string}
2246
+ * @memberof NotebookCellResult
2247
+ */
2248
+ 'markdown'?: string;
2249
+ /**
2250
+ * The lines of `text` that hold `markdown`, as on `NotebookCell`; `[]` when none.
2251
+ * @type {Array<Array<number>>}
2252
+ * @memberof NotebookCellResult
2253
+ */
2254
+ 'proseLines'?: Array<Array<number>>;
2255
+ /**
2256
+ * The line of `text` where the statement\'s code starts, as on `NotebookCell`.
2257
+ * @type {number}
2258
+ * @memberof NotebookCellResult
2259
+ */
2260
+ 'codeLine'?: number;
2261
+ /**
2262
+ * The cell\'s leading `#\"` caption, as on `NotebookCell`. Absent when the cell has none.
2263
+ * @type {string}
2264
+ * @memberof NotebookCellResult
2265
+ */
2266
+ 'caption'?: string;
2195
2267
  /**
2196
2268
  * JSON string containing the execution result for this cell
2197
2269
  * @type {string}
@@ -2210,6 +2282,12 @@ export declare const NotebookCellResultTypeEnum: {
2210
2282
  readonly Code: "code";
2211
2283
  };
2212
2284
  export type NotebookCellResultTypeEnum = typeof NotebookCellResultTypeEnum[keyof typeof NotebookCellResultTypeEnum];
2285
+ export declare const NotebookCellResultKindEnum: {
2286
+ readonly Markdown: "markdown";
2287
+ readonly Query: "query";
2288
+ readonly Definition: "definition";
2289
+ };
2290
+ export type NotebookCellResultKindEnum = typeof NotebookCellResultKindEnum[keyof typeof NotebookCellResultKindEnum];
2213
2291
  /**
2214
2292
  * Represents a Malloy package containing models, notebooks, and embedded databases
2215
2293
  * @export
@@ -2259,7 +2337,7 @@ export interface Package {
2259
2337
  */
2260
2338
  'exploresWarnings'?: Array<string>;
2261
2339
  /**
2262
- * 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. Dashboard findings: a `dashboards/` file whose `# artifact` tag does not parse or does not describe a dashboard, a tile or suggest query that does not resolve, a `# drill` naming a destination that is not a dashboard, and a tile, single query or filter suggest that reads a source the surface does not export, so it won\'t load. Two dashboard 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. 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.
2340
+ * 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. Dashboard findings: a `dashboards/` file whose `# artifact` tag does not parse or does not describe a dashboard, a tile or suggest query that does not resolve, a `# drill` naming a destination that is not a dashboard, and a tile, single query or filter suggest that reads a source the surface does not export, so it won\'t load. Two dashboard 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. Notebook findings: a `notebooks/` file with an `## artifact` note whose cells could not be read, which names the line and the fix and is reported with severity `error`, because the notebook is served with that error instead of opening. The same family carries findings on files under `notebooks/` and `dashboards/`, each naming its line and the fix; they are computed at discovery and are also returned by `/compile` at file and package scope. Eight codes are `error` and fail `/compile`: `notebook-statement-above-artifact` and `notebook-tag-above-artifact` (a statement or a tag above a served notebook\'s `## artifact`), `notebook-markdown-above-artifact` (a `(markdown)` annotation above it), `notebook-columns-conflict` (a tiled dashboard\'s `dashboard_columns` disagrees with `dashboard { columns }`), `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 served notebook\'s cells). The rest are `warn` (a mistyped `(markdown)` opener, a missing `kind=notebook`, a block that never closes, and similar). 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.
2263
2341
  * @type {Array<PackageWarningsInner>}
2264
2342
  * @memberof Package
2265
2343
  */
@@ -2345,19 +2423,19 @@ export declare const PackageManifestBindingStatusEnum: {
2345
2423
  };
2346
2424
  export type PackageManifestBindingStatusEnum = typeof PackageManifestBindingStatusEnum[keyof typeof PackageManifestBindingStatusEnum];
2347
2425
  /**
2348
- * State of a package\'s semantic discovery index. Poll `status` until `ready` to know retrieval is warm - before this, that state existed only as a server log line, so anything waiting on a warm index had to scrape logs. Every count is scoped to the embedding model currently configured, matching what the search path reads, so a server pointed at a new model reports the index as not yet ready rather than reporting rows retrieval would reject. Reading it takes no locks, so polling cannot perturb an indexing run; note that the first read after a package loads or reloads builds the package\'s entity index, which is work a metadata read would not otherwise do.
2426
+ * State of a package\'s semantic discovery index. Poll `status` until `ready` to know retrieval is warm - before this, that state existed only as a server log line, so anything waiting on a warm index had to scrape logs. Send the package one `get_context` question first, then poll: only a question starts the sync, and a restart forgets which syncs completed, so after every restart each package reads `indexing` until it is asked something. Polling before asking waits forever. Every count is scoped to the embedding model currently configured, so rows left behind by an earlier model are never counted. Read `status` for readiness and the counts for coverage: they answer different questions, and only `status` tracks what the search path will do. The first read after a package loads or reloads builds the package\'s entity index and its content fingerprint, which is work a metadata read would not otherwise do. After that a read is two row counts and never waits on a sync, so polling is cheap.
2349
2427
  * @export
2350
2428
  * @interface PackageEmbeddingIndex
2351
2429
  */
2352
2430
  export interface PackageEmbeddingIndex {
2353
2431
  /**
2354
- * `indexing` = at least one current entity has no usable vector yet. Retrieval answers lexically meanwhile. This clears once a `get_context` question triggers a sync, which is what builds the index; it does not clear on its own for a package nothing has queried. `ready` = every entity the package exposes has a vector under the current model and the cache is serving semantic ranking. `cooldown` = the provider failed recently, so the semantic path is short-circuited for a window. `too-many-entities` = the package has more entities than the embedding cap, so it stays lexical permanently rather than transiently. The same vocabulary as `get_context`\'s `retrieval_reason`, deliberately.
2432
+ * `ready` = the index is warm, so the next `get_context` question about this package is ranked semantically rather than lexically. (It is a statement about the index, not a promise about the next response: a question whose own query embedding fails still falls back, reporting `retrieval_reason: provider-error`.) It is decided by the same completed sync the search path gates on, not by whether cached rows happen to cover the current entity names. Those two differ exactly where it matters - the rows outlive a restart and a reload, so a coverage test called an index warm while the next question was still answered lexically. `indexing` = no completed sync covers the package\'s current content under the current model, so retrieval answers lexically meanwhile. A reload whose files did not change stays `ready`, because the vectors still describe that content. Four things move a package to `indexing`: an edit, a new package, a changed `EMBEDDING_MODEL`, and a server restart - the sync is recorded in memory, so a restart reports `indexing` until the first question re-establishes it, even though the vectors are still on disk. It clears when a `get_context` question triggers a sync, which is what builds the index; a package nothing has ever queried does not warm on its own. `cooldown` = the provider failed recently, so the semantic path is short-circuited for a window. `too-many-entities` = the package has more entities than the embedding cap, so it stays lexical permanently rather than transiently. The same vocabulary as `get_context`\'s `retrieval_reason`, deliberately.
2355
2433
  * @type {string}
2356
2434
  * @memberof PackageEmbeddingIndex
2357
2435
  */
2358
2436
  'status'?: PackageEmbeddingIndexStatusEnum;
2359
2437
  /**
2360
- * Cached vectors for this package under the current embedding model. An entity contributes one row for its name plus one per chunk of its documentation, so this exceeds `totalEntities` on a documented model and is not a count of entities.
2438
+ * Cached vectors for this package under the current embedding model. An entity contributes one row for its name plus one per chunk of its documentation, so this exceeds `totalEntities` on a documented model and is not a count of entities. Scoped by model only, not by vector length, so it counts what is cached rather than what a search could read today: after a change to `EMBEDDING_DIMENSIONS` that no question has probed yet, rows of the old length are still counted here until the next search discards them. `status` is already `indexing` in that window.
2361
2439
  * @type {number}
2362
2440
  * @memberof PackageEmbeddingIndex
2363
2441
  */
@@ -2369,7 +2447,7 @@ export interface PackageEmbeddingIndex {
2369
2447
  */
2370
2448
  'totalEntities'?: number;
2371
2449
  /**
2372
- * Of `totalEntities`, how many have at least one usable vector. The two are equal exactly when `status` is `ready`. Reported because a row count cannot show a model edit that removes two entities and adds two others: the row total is unchanged while the new entities have no vector at all.
2450
+ * Of `totalEntities`, how many have at least one usable vector. Reported because a row count cannot show a model edit that removes two entities and adds two others: the row total is unchanged while the new entities have no vector at all. Coverage by identity, so equality does NOT imply `ready`: an edit that rewrote every doc without renaming anything leaves each entity holding its stale name vector. Read `status` for readiness and this pair for how much of the package is covered.
2373
2451
  * @type {number}
2374
2452
  * @memberof PackageEmbeddingIndex
2375
2453
  */
@@ -2983,6 +3061,12 @@ export interface RawNotebook {
2983
3061
  * @memberof RawNotebook
2984
3062
  */
2985
3063
  'modelPath'?: string;
3064
+ /**
3065
+ * The file format the notebook is written in. `malloynb` is the cell-separated format; `malloy` is a `.malloy` file under `notebooks/` with a model-level `## artifact` note, whose cells are its statements and its floating `(markdown)` notes in file order.
3066
+ * @type {string}
3067
+ * @memberof RawNotebook
3068
+ */
3069
+ 'format'?: RawNotebookFormatEnum;
2986
3070
  /**
2987
3071
  * Version of the Malloy compiler used to generate the notebook data
2988
3072
  * @type {string}
@@ -3002,13 +3086,13 @@ export interface RawNotebook {
3002
3086
  */
3003
3087
  'notebookCells'?: Array<NotebookCell>;
3004
3088
  /**
3005
- * Array of file-level (##) annotations attached to the notebook
3089
+ * Array of file-level (##) annotations attached to the notebook. For a `.malloy` notebook, every own note that is not a floating `(markdown)` cell, in file order, each note once. A `\"` or `(text)` note below the `## artifact` tag is dropped and not listed.
3006
3090
  * @type {Array<string>}
3007
3091
  * @memberof RawNotebook
3008
3092
  */
3009
3093
  'annotations'?: Array<string>;
3010
3094
  /**
3011
- * Starting values for the notebook\'s controls, declared at its file level. URL parameters override these, which is why the two share a shape. Omitted when the notebook declares none.
3095
+ * Starting values for the notebook\'s controls. A `.malloy` notebook declares them in its artifact tag (`## artifact { givens { … } }`), a `.malloynb` in its file-level tags (`## givens { … }`). URL parameters override these, which is why the two share a shape. Omitted when the notebook declares none.
3012
3096
  * @type {{ [key: string]: string; }}
3013
3097
  * @memberof RawNotebook
3014
3098
  */
@@ -3016,7 +3100,7 @@ export interface RawNotebook {
3016
3100
  [key: string]: string;
3017
3101
  };
3018
3102
  /**
3019
- * False batches control changes behind an Apply button instead of re-running on every change. Defaults to true. The same flag, with the same default, that `DashboardManifest.autorun` carries, so a notebook\'s `## autorun=false` and a dashboard\'s `# artifact { autorun=false }` arrive identically.
3103
+ * False batches control changes behind an Apply button instead of re-running on every change. Defaults to true. A `.malloy` notebook reads it from its artifact tag (`## artifact { autorun=false }`), a `.malloynb` from its file-level tags (`## autorun=false`). The same flag, with the same default, that `DashboardManifest.autorun` carries.
3020
3104
  * @type {boolean}
3021
3105
  * @memberof RawNotebook
3022
3106
  */
@@ -3034,6 +3118,11 @@ export interface RawNotebook {
3034
3118
  */
3035
3119
  'queries'?: Array<Query>;
3036
3120
  }
3121
+ export declare const RawNotebookFormatEnum: {
3122
+ readonly Malloynb: "malloynb";
3123
+ readonly Malloy: "malloy";
3124
+ };
3125
+ export type RawNotebookFormatEnum = typeof RawNotebookFormatEnum[keyof typeof RawNotebookFormatEnum];
3037
3126
  /**
3038
3127
  * SNAPSHOT = warehouse clone/snapshot; COPY = CREATE TABLE AS SELECT.
3039
3128
  * @export
@@ -3250,6 +3339,18 @@ export interface ServerStatus {
3250
3339
  * @memberof ServerStatus
3251
3340
  */
3252
3341
  'operationalState'?: ServerStatusOperationalStateEnum;
3342
+ /**
3343
+ * This server\'s release version, for example \"0.8.2\". Use it to tell which build answered, for instance to rule out an old copy served from the npx cache.
3344
+ * @type {string}
3345
+ * @memberof ServerStatus
3346
+ */
3347
+ 'version'?: string;
3348
+ /**
3349
+ * Present only when the server has no environments because no publisher.config.json was found at startup, or because the --config path it was given does not exist. It names the path that was checked and how to fix it. It describes startup, so a config written while the server runs is not read until a restart. A server in this state still reports serving, so check this before treating an empty environments list as intended. Absent once any environment exists, including one created at runtime through the API, and absent when a config was found but lists no environments.
3350
+ * @type {string}
3351
+ * @memberof ServerStatus
3352
+ */
3353
+ 'emptyReason'?: string;
3253
3354
  /**
3254
3355
  * Configured packages and environments that did not load, and why. A load failure is not fatal to the server, so operationalState stays serving and the affected packages are absent from environments, unless the entry carries stale = true, in which case the package is still listed and still serving its last successful compile. This is the only place either difference is reported, so check it before treating a serving server as complete or current. Present only when something failed, so a healthy server omits the field.
3255
3356
  * @type {Array<ServerStatusLoadErrorsInner>}
@@ -5565,31 +5666,34 @@ export declare const ModelsApiAxiosParamCreator: (configuration?: Configuration)
5565
5666
  * @param {string} packageName Name of the package
5566
5667
  * @param {string} path Path to the model within the package
5567
5668
  * @param {QueryRequest} queryRequest
5669
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5568
5670
  * @param {*} [options] Override http request option.
5569
5671
  * @throws {RequiredError}
5570
5672
  */
5571
- executeQueryModel: (environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5673
+ executeQueryModel: (environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5572
5674
  /**
5573
- * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets. Dashboard files are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; a dashboard\'s text is always returned.
5675
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets, unless `includeHiddenFilesAndSources` is true. With it, the file is returned with its `sourceText`, whatever sources the text names. Dashboard files and served notebooks (`notebooks/_*.malloy` with an `## artifact` note) are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; the text of a dashboard is always returned.
5574
5676
  * @summary Get compiled Malloy model
5575
5677
  * @param {string} environmentName Name of the environment
5576
5678
  * @param {string} packageName Name of the package
5577
5679
  * @param {string} path Path to the model within the package
5578
5680
  * @param {string} [versionId] Version identifier for the package
5681
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5579
5682
  * @param {*} [options] Override http request option.
5580
5683
  * @throws {RequiredError}
5581
5684
  */
5582
- getModel: (environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5685
+ getModel: (environmentName: string, packageName: string, path: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5583
5686
  /**
5584
- * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
5687
+ * Retrieves the Malloy models within the specified package. Each model entry includes the relative path, package name, whether the file is on the package\'s surface, and any compilation errors. On a package with a surface (a root `index.malloy`, or a legacy `explores`), only the files on that surface are listed, unless `includeHiddenFilesAndSources` is true. With it, every model file is listed and `onSurface` marks the ones on the surface. Dashboard files are listed by the dashboards route either way. Served notebooks (`.malloy` files under `notebooks/` that carry an `## artifact` note) are not models here, with or without a surface; they are listed by list-notebooks.
5585
5688
  * @summary List package models
5586
5689
  * @param {string} environmentName Name of the environment
5587
5690
  * @param {string} packageName Name of the package
5588
5691
  * @param {string} [versionId] Version identifier for the package
5692
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5589
5693
  * @param {*} [options] Override http request option.
5590
5694
  * @throws {RequiredError}
5591
5695
  */
5592
- listModels: (environmentName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5696
+ listModels: (environmentName: string, packageName: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5593
5697
  /**
5594
5698
  * Writes the Malloy text of a dashboard file — `dashboards/<slug>.malloy`, the only paths this endpoint accepts — into the package, and reloads the package in place so the dashboard is served from the new text. This is the dashboard builder\'s save. The text is compiled first, as the file, and refused with its problems when it does not compile; nothing is written. The write is atomic (a sibling temporary file renamed over the target). If the reload that follows fails to compile the package, the previous text is restored (or a new file removed) and the package reloaded again, so a save never leaves the package serving less than it did. `expectedHash` is the SHA-256 (hex) of the text the caller opened, as `GET …/models/{path}` returned it in `sourceText`. When the file on disk no longer hashes to it, the write is refused with 409 and nothing is merged: the caller re-opens and reapplies its change. Omit it to CREATE the file: a file that already exists is then refused with 409 too, so an unconditional overwrite is not something a caller can ask for by leaving a field out. The check, the write, the reload and the restore all happen under one hold of the package lock, so two saves racing on one file cannot both pass the check, and a rollback cannot revert the other writer\'s text instead of its own. A create answers 201 and an update 200; `created` in the body says the same thing. Refused with 403 when `publisher.config.json` has `frozenConfig: true`. Like every write on this server, it is unauthenticated and meant to sit behind an authenticating gateway; see docs/security-posture.md.
5595
5699
  * @summary Write a dashboard file into the package
@@ -5626,31 +5730,34 @@ export declare const ModelsApiFp: (configuration?: Configuration) => {
5626
5730
  * @param {string} packageName Name of the package
5627
5731
  * @param {string} path Path to the model within the package
5628
5732
  * @param {QueryRequest} queryRequest
5733
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5629
5734
  * @param {*} [options] Override http request option.
5630
5735
  * @throws {RequiredError}
5631
5736
  */
5632
- executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryResult>>;
5737
+ executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QueryResult>>;
5633
5738
  /**
5634
- * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets. Dashboard files are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; a dashboard\'s text is always returned.
5739
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets, unless `includeHiddenFilesAndSources` is true. With it, the file is returned with its `sourceText`, whatever sources the text names. Dashboard files and served notebooks (`notebooks/_*.malloy` with an `## artifact` note) are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; the text of a dashboard is always returned.
5635
5740
  * @summary Get compiled Malloy model
5636
5741
  * @param {string} environmentName Name of the environment
5637
5742
  * @param {string} packageName Name of the package
5638
5743
  * @param {string} path Path to the model within the package
5639
5744
  * @param {string} [versionId] Version identifier for the package
5745
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5640
5746
  * @param {*} [options] Override http request option.
5641
5747
  * @throws {RequiredError}
5642
5748
  */
5643
- getModel(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompiledModel>>;
5749
+ getModel(environmentName: string, packageName: string, path: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompiledModel>>;
5644
5750
  /**
5645
- * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
5751
+ * Retrieves the Malloy models within the specified package. Each model entry includes the relative path, package name, whether the file is on the package\'s surface, and any compilation errors. On a package with a surface (a root `index.malloy`, or a legacy `explores`), only the files on that surface are listed, unless `includeHiddenFilesAndSources` is true. With it, every model file is listed and `onSurface` marks the ones on the surface. Dashboard files are listed by the dashboards route either way. Served notebooks (`.malloy` files under `notebooks/` that carry an `## artifact` note) are not models here, with or without a surface; they are listed by list-notebooks.
5646
5752
  * @summary List package models
5647
5753
  * @param {string} environmentName Name of the environment
5648
5754
  * @param {string} packageName Name of the package
5649
5755
  * @param {string} [versionId] Version identifier for the package
5756
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5650
5757
  * @param {*} [options] Override http request option.
5651
5758
  * @throws {RequiredError}
5652
5759
  */
5653
- listModels(environmentName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Model>>>;
5760
+ listModels(environmentName: string, packageName: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Model>>>;
5654
5761
  /**
5655
5762
  * Writes the Malloy text of a dashboard file — `dashboards/<slug>.malloy`, the only paths this endpoint accepts — into the package, and reloads the package in place so the dashboard is served from the new text. This is the dashboard builder\'s save. The text is compiled first, as the file, and refused with its problems when it does not compile; nothing is written. The write is atomic (a sibling temporary file renamed over the target). If the reload that follows fails to compile the package, the previous text is restored (or a new file removed) and the package reloaded again, so a save never leaves the package serving less than it did. `expectedHash` is the SHA-256 (hex) of the text the caller opened, as `GET …/models/{path}` returned it in `sourceText`. When the file on disk no longer hashes to it, the write is refused with 409 and nothing is merged: the caller re-opens and reapplies its change. Omit it to CREATE the file: a file that already exists is then refused with 409 too, so an unconditional overwrite is not something a caller can ask for by leaving a field out. The check, the write, the reload and the restore all happen under one hold of the package lock, so two saves racing on one file cannot both pass the check, and a rollback cannot revert the other writer\'s text instead of its own. A create answers 201 and an update 200; `created` in the body says the same thing. Refused with 403 when `publisher.config.json` has `frozenConfig: true`. Like every write on this server, it is unauthenticated and meant to sit behind an authenticating gateway; see docs/security-posture.md.
5656
5763
  * @summary Write a dashboard file into the package
@@ -5687,31 +5794,34 @@ export declare const ModelsApiFactory: (configuration?: Configuration, basePath?
5687
5794
  * @param {string} packageName Name of the package
5688
5795
  * @param {string} path Path to the model within the package
5689
5796
  * @param {QueryRequest} queryRequest
5797
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5690
5798
  * @param {*} [options] Override http request option.
5691
5799
  * @throws {RequiredError}
5692
5800
  */
5693
- executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig): AxiosPromise<QueryResult>;
5801
+ executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<QueryResult>;
5694
5802
  /**
5695
- * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets. Dashboard files are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; a dashboard\'s text is always returned.
5803
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets, unless `includeHiddenFilesAndSources` is true. With it, the file is returned with its `sourceText`, whatever sources the text names. Dashboard files and served notebooks (`notebooks/_*.malloy` with an `## artifact` note) are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; the text of a dashboard is always returned.
5696
5804
  * @summary Get compiled Malloy model
5697
5805
  * @param {string} environmentName Name of the environment
5698
5806
  * @param {string} packageName Name of the package
5699
5807
  * @param {string} path Path to the model within the package
5700
5808
  * @param {string} [versionId] Version identifier for the package
5809
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5701
5810
  * @param {*} [options] Override http request option.
5702
5811
  * @throws {RequiredError}
5703
5812
  */
5704
- getModel(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<CompiledModel>;
5813
+ getModel(environmentName: string, packageName: string, path: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<CompiledModel>;
5705
5814
  /**
5706
- * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
5815
+ * Retrieves the Malloy models within the specified package. Each model entry includes the relative path, package name, whether the file is on the package\'s surface, and any compilation errors. On a package with a surface (a root `index.malloy`, or a legacy `explores`), only the files on that surface are listed, unless `includeHiddenFilesAndSources` is true. With it, every model file is listed and `onSurface` marks the ones on the surface. Dashboard files are listed by the dashboards route either way. Served notebooks (`.malloy` files under `notebooks/` that carry an `## artifact` note) are not models here, with or without a surface; they are listed by list-notebooks.
5707
5816
  * @summary List package models
5708
5817
  * @param {string} environmentName Name of the environment
5709
5818
  * @param {string} packageName Name of the package
5710
5819
  * @param {string} [versionId] Version identifier for the package
5820
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5711
5821
  * @param {*} [options] Override http request option.
5712
5822
  * @throws {RequiredError}
5713
5823
  */
5714
- listModels(environmentName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Model>>;
5824
+ listModels(environmentName: string, packageName: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Array<Model>>;
5715
5825
  /**
5716
5826
  * Writes the Malloy text of a dashboard file — `dashboards/<slug>.malloy`, the only paths this endpoint accepts — into the package, and reloads the package in place so the dashboard is served from the new text. This is the dashboard builder\'s save. The text is compiled first, as the file, and refused with its problems when it does not compile; nothing is written. The write is atomic (a sibling temporary file renamed over the target). If the reload that follows fails to compile the package, the previous text is restored (or a new file removed) and the package reloaded again, so a save never leaves the package serving less than it did. `expectedHash` is the SHA-256 (hex) of the text the caller opened, as `GET …/models/{path}` returned it in `sourceText`. When the file on disk no longer hashes to it, the write is refused with 409 and nothing is merged: the caller re-opens and reapplies its change. Omit it to CREATE the file: a file that already exists is then refused with 409 too, so an unconditional overwrite is not something a caller can ask for by leaving a field out. The check, the write, the reload and the restore all happen under one hold of the package lock, so two saves racing on one file cannot both pass the check, and a rollback cannot revert the other writer\'s text instead of its own. A create answers 201 and an update 200; `created` in the body says the same thing. Refused with 403 when `publisher.config.json` has `frozenConfig: true`. Like every write on this server, it is unauthenticated and meant to sit behind an authenticating gateway; see docs/security-posture.md.
5717
5827
  * @summary Write a dashboard file into the package
@@ -5751,34 +5861,37 @@ export declare class ModelsApi extends BaseAPI {
5751
5861
  * @param {string} packageName Name of the package
5752
5862
  * @param {string} path Path to the model within the package
5753
5863
  * @param {QueryRequest} queryRequest
5864
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5754
5865
  * @param {*} [options] Override http request option.
5755
5866
  * @throws {RequiredError}
5756
5867
  * @memberof ModelsApi
5757
5868
  */
5758
- executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, options?: RawAxiosRequestConfig): Promise< AxiosResponse<QueryResult, any, {}>>;
5869
+ executeQueryModel(environmentName: string, packageName: string, path: string, queryRequest: QueryRequest, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise< AxiosResponse<QueryResult, any, {}>>;
5759
5870
  /**
5760
- * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets. Dashboard files are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; a dashboard\'s text is always returned.
5871
+ * Retrieves a compiled Malloy model with its source information, queries, and metadata. The model is compiled using the specified version of the Malloy compiler. This endpoint provides access to the model\'s structure, sources, and named queries for use in applications. On a package with a surface (a root `index.malloy`, or a legacy `explores`), a file off that surface answers 404 with the same message a query to it gets, unless `includeHiddenFilesAndSources` is true. With it, the file is returned with its `sourceText`, whatever sources the text names. Dashboard files and served notebooks (`notebooks/_*.malloy` with an `## artifact` note) are always returned. A package with no surface, or with `queryableSources: \"all\"`, returns every file. For a file it returns, `modelDef.contents` and `modelDef.exports`, `modelInfo`, `sources` and `sourceInfos` are limited to the names the file publishes, so the surface file does not carry the hidden sources it imports. A join to a hidden source keeps only its name and the names and types of its fields. `sourceText` is left out when the text names a source the file does not publish; the text of a dashboard is always returned.
5761
5872
  * @summary Get compiled Malloy model
5762
5873
  * @param {string} environmentName Name of the environment
5763
5874
  * @param {string} packageName Name of the package
5764
5875
  * @param {string} path Path to the model within the package
5765
5876
  * @param {string} [versionId] Version identifier for the package
5877
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5766
5878
  * @param {*} [options] Override http request option.
5767
5879
  * @throws {RequiredError}
5768
5880
  * @memberof ModelsApi
5769
5881
  */
5770
- getModel(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<CompiledModel, any, {}>>;
5882
+ getModel(environmentName: string, packageName: string, path: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise< AxiosResponse<CompiledModel, any, {}>>;
5771
5883
  /**
5772
- * Retrieves a list of all Malloy models within the specified package. Each model entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available models and checking their status.
5884
+ * Retrieves the Malloy models within the specified package. Each model entry includes the relative path, package name, whether the file is on the package\'s surface, and any compilation errors. On a package with a surface (a root `index.malloy`, or a legacy `explores`), only the files on that surface are listed, unless `includeHiddenFilesAndSources` is true. With it, every model file is listed and `onSurface` marks the ones on the surface. Dashboard files are listed by the dashboards route either way. Served notebooks (`.malloy` files under `notebooks/` that carry an `## artifact` note) are not models here, with or without a surface; they are listed by list-notebooks.
5773
5885
  * @summary List package models
5774
5886
  * @param {string} environmentName Name of the environment
5775
5887
  * @param {string} packageName Name of the package
5776
5888
  * @param {string} [versionId] Version identifier for the package
5889
+ * @param {boolean} [includeHiddenFilesAndSources] When true, a package with a surface (a root &#x60;index.malloy&#x60;, or a legacy &#x60;explores&#x60;) is served to this request as if it had none: the models list includes the files off the surface, the model GET returns them, and the query route runs any model path the request names, including a dashboard or notebook file, against every source, as &#x60;queryableSources: \&quot;all\&quot;&#x60; does for every request. &#x60;#(authorize)&#x60; and &#x60;#(access_filter)&#x60; still apply: it lifts curation, never the lock. The model GET goes one step further than &#x60;queryableSources: \&quot;all\&quot;&#x60;: it returns the file\&#39;s &#x60;sourceText&#x60; even when that text names a source the file does not publish. That text can include &#x60;#(authorize)&#x60; expressions, &#x60;given:&#x60; defaults, connection names and raw SQL. Only the models list, the model GET and the query route read it. The notebook-cell route, the dashboards route, the MCP tools, and the legacy &#x60;/projects/...&#x60; aliases of these routes ignore it. Like every route on this server, it is unauthenticated. A deployment that authenticates in front of Publisher decides who may send it, and should pass it only for callers allowed to work with a package\&#39;s hidden files, such as its authors. Only &#x60;true&#x60; and &#x60;false&#x60; are accepted. Any other value is refused with 400.
5777
5890
  * @param {*} [options] Override http request option.
5778
5891
  * @throws {RequiredError}
5779
5892
  * @memberof ModelsApi
5780
5893
  */
5781
- listModels(environmentName: string, packageName: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<Model[], any, {}>>;
5894
+ listModels(environmentName: string, packageName: string, versionId?: string, includeHiddenFilesAndSources?: boolean, options?: RawAxiosRequestConfig): Promise< AxiosResponse<Model[], any, {}>>;
5782
5895
  /**
5783
5896
  * Writes the Malloy text of a dashboard file — `dashboards/<slug>.malloy`, the only paths this endpoint accepts — into the package, and reloads the package in place so the dashboard is served from the new text. This is the dashboard builder\'s save. The text is compiled first, as the file, and refused with its problems when it does not compile; nothing is written. The write is atomic (a sibling temporary file renamed over the target). If the reload that follows fails to compile the package, the previous text is restored (or a new file removed) and the package reloaded again, so a save never leaves the package serving less than it did. `expectedHash` is the SHA-256 (hex) of the text the caller opened, as `GET …/models/{path}` returned it in `sourceText`. When the file on disk no longer hashes to it, the write is refused with 409 and nothing is merged: the caller re-opens and reapplies its change. Omit it to CREATE the file: a file that already exists is then refused with 409 too, so an unconditional overwrite is not something a caller can ask for by leaving a field out. The check, the write, the reload and the restore all happen under one hold of the package lock, so two saves racing on one file cannot both pass the check, and a rollback cannot revert the other writer\'s text instead of its own. A create answers 201 and an update 200; `created` in the body says the same thing. Refused with 403 when `publisher.config.json` has `frozenConfig: true`. Like every write on this server, it is unauthenticated and meant to sit behind an authenticating gateway; see docs/security-posture.md.
5784
5897
  * @summary Write a dashboard file into the package
@@ -5799,7 +5912,7 @@ export declare class ModelsApi extends BaseAPI {
5799
5912
  */
5800
5913
  export declare const NotebooksApiAxiosParamCreator: (configuration?: Configuration) => {
5801
5914
  /**
5802
- * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
5915
+ * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content. A served `notebooks/_*.malloy` answers here as well as a `.malloynb`. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
5803
5916
  * @summary Execute a specific notebook cell
5804
5917
  * @param {string} environmentName Name of the environment
5805
5918
  * @param {string} packageName Name of the package
@@ -5814,7 +5927,7 @@ export declare const NotebooksApiAxiosParamCreator: (configuration?: Configurati
5814
5927
  */
5815
5928
  executeNotebookCell: (environmentName: string, packageName: string, path: string, cellIndex: number, versionId?: string, filterParams?: string, bypassFilters?: ExecuteNotebookCellBypassFiltersEnum, givens?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5816
5929
  /**
5817
- * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. On a package with a surface, the response shows only the sources the notebook may read.
5930
+ * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. A served `notebooks/_*.malloy` (one with an `## artifact` note) answers here as well as a `.malloynb`. On a package with a surface, the response shows only the sources the notebook may read.
5818
5931
  * @summary Get Malloy notebook cells
5819
5932
  * @param {string} environmentName Name of the environment
5820
5933
  * @param {string} packageName Name of the package
@@ -5825,7 +5938,7 @@ export declare const NotebooksApiAxiosParamCreator: (configuration?: Configurati
5825
5938
  */
5826
5939
  getNotebook: (environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
5827
5940
  /**
5828
- * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
5941
+ * Retrieves a list of all Malloy notebooks within the specified package: every `.malloynb` file, and every `.malloy` file directly under `notebooks/` that has a model-level `## artifact` note. Each notebook entry includes the relative path, package name, title, description, and any compilation or reading error. This endpoint is useful for discovering available notebooks and checking their status.
5829
5942
  * @summary List package notebooks
5830
5943
  * @param {string} environmentName Name of the environment
5831
5944
  * @param {string} packageName Name of the package
@@ -5841,7 +5954,7 @@ export declare const NotebooksApiAxiosParamCreator: (configuration?: Configurati
5841
5954
  */
5842
5955
  export declare const NotebooksApiFp: (configuration?: Configuration) => {
5843
5956
  /**
5844
- * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
5957
+ * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content. A served `notebooks/_*.malloy` answers here as well as a `.malloynb`. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
5845
5958
  * @summary Execute a specific notebook cell
5846
5959
  * @param {string} environmentName Name of the environment
5847
5960
  * @param {string} packageName Name of the package
@@ -5856,7 +5969,7 @@ export declare const NotebooksApiFp: (configuration?: Configuration) => {
5856
5969
  */
5857
5970
  executeNotebookCell(environmentName: string, packageName: string, path: string, cellIndex: number, versionId?: string, filterParams?: string, bypassFilters?: ExecuteNotebookCellBypassFiltersEnum, givens?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NotebookCellResult>>;
5858
5971
  /**
5859
- * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. On a package with a surface, the response shows only the sources the notebook may read.
5972
+ * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. A served `notebooks/_*.malloy` (one with an `## artifact` note) answers here as well as a `.malloynb`. On a package with a surface, the response shows only the sources the notebook may read.
5860
5973
  * @summary Get Malloy notebook cells
5861
5974
  * @param {string} environmentName Name of the environment
5862
5975
  * @param {string} packageName Name of the package
@@ -5867,7 +5980,7 @@ export declare const NotebooksApiFp: (configuration?: Configuration) => {
5867
5980
  */
5868
5981
  getNotebook(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RawNotebook>>;
5869
5982
  /**
5870
- * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
5983
+ * Retrieves a list of all Malloy notebooks within the specified package: every `.malloynb` file, and every `.malloy` file directly under `notebooks/` that has a model-level `## artifact` note. Each notebook entry includes the relative path, package name, title, description, and any compilation or reading error. This endpoint is useful for discovering available notebooks and checking their status.
5871
5984
  * @summary List package notebooks
5872
5985
  * @param {string} environmentName Name of the environment
5873
5986
  * @param {string} packageName Name of the package
@@ -5883,7 +5996,7 @@ export declare const NotebooksApiFp: (configuration?: Configuration) => {
5883
5996
  */
5884
5997
  export declare const NotebooksApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
5885
5998
  /**
5886
- * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
5999
+ * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content. A served `notebooks/_*.malloy` answers here as well as a `.malloynb`. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
5887
6000
  * @summary Execute a specific notebook cell
5888
6001
  * @param {string} environmentName Name of the environment
5889
6002
  * @param {string} packageName Name of the package
@@ -5898,7 +6011,7 @@ export declare const NotebooksApiFactory: (configuration?: Configuration, basePa
5898
6011
  */
5899
6012
  executeNotebookCell(environmentName: string, packageName: string, path: string, cellIndex: number, versionId?: string, filterParams?: string, bypassFilters?: ExecuteNotebookCellBypassFiltersEnum, givens?: string, options?: RawAxiosRequestConfig): AxiosPromise<NotebookCellResult>;
5900
6013
  /**
5901
- * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. On a package with a surface, the response shows only the sources the notebook may read.
6014
+ * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. A served `notebooks/_*.malloy` (one with an `## artifact` note) answers here as well as a `.malloynb`. On a package with a surface, the response shows only the sources the notebook may read.
5902
6015
  * @summary Get Malloy notebook cells
5903
6016
  * @param {string} environmentName Name of the environment
5904
6017
  * @param {string} packageName Name of the package
@@ -5909,7 +6022,7 @@ export declare const NotebooksApiFactory: (configuration?: Configuration, basePa
5909
6022
  */
5910
6023
  getNotebook(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<RawNotebook>;
5911
6024
  /**
5912
- * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
6025
+ * Retrieves a list of all Malloy notebooks within the specified package: every `.malloynb` file, and every `.malloy` file directly under `notebooks/` that has a model-level `## artifact` note. Each notebook entry includes the relative path, package name, title, description, and any compilation or reading error. This endpoint is useful for discovering available notebooks and checking their status.
5913
6026
  * @summary List package notebooks
5914
6027
  * @param {string} environmentName Name of the environment
5915
6028
  * @param {string} packageName Name of the package
@@ -5927,7 +6040,7 @@ export declare const NotebooksApiFactory: (configuration?: Configuration, basePa
5927
6040
  */
5928
6041
  export declare class NotebooksApi extends BaseAPI {
5929
6042
  /**
5930
- * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
6043
+ * Executes a specific cell in a Malloy notebook by index. For code cells, this compiles and runs the Malloy code, returning query results and any new sources defined. For markdown cells, this simply returns the cell content. A served `notebooks/_*.malloy` answers here as well as a `.malloynb`. On a package with a surface (a root `index.malloy`, or a legacy `explores`) with `queryableSources` left at `\"declared\"`, a code cell may read only sources the surface exports. A cell over a hidden source answers 404, and 404 rather than 403 even when the source is also `#(authorize)`-gated. A source an earlier cell declares on top of a published source still works. A cell\'s own source over a raw table (`duckdb.table(...)` or `.sql(...)`) has no published source under it, so it is refused. The response shows only the sources the notebook may read.
5931
6044
  * @summary Execute a specific notebook cell
5932
6045
  * @param {string} environmentName Name of the environment
5933
6046
  * @param {string} packageName Name of the package
@@ -5943,7 +6056,7 @@ export declare class NotebooksApi extends BaseAPI {
5943
6056
  */
5944
6057
  executeNotebookCell(environmentName: string, packageName: string, path: string, cellIndex: number, versionId?: string, filterParams?: string, bypassFilters?: ExecuteNotebookCellBypassFiltersEnum, givens?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<NotebookCellResult, any, {}>>;
5945
6058
  /**
5946
- * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. On a package with a surface, the response shows only the sources the notebook may read.
6059
+ * Retrieves a Malloy notebook with its raw cell contents (markdown and code). Cell execution should be done separately via the execute-notebook-cell endpoint. A served `notebooks/_*.malloy` (one with an `## artifact` note) answers here as well as a `.malloynb`. On a package with a surface, the response shows only the sources the notebook may read.
5947
6060
  * @summary Get Malloy notebook cells
5948
6061
  * @param {string} environmentName Name of the environment
5949
6062
  * @param {string} packageName Name of the package
@@ -5955,7 +6068,7 @@ export declare class NotebooksApi extends BaseAPI {
5955
6068
  */
5956
6069
  getNotebook(environmentName: string, packageName: string, path: string, versionId?: string, options?: RawAxiosRequestConfig): Promise< AxiosResponse<RawNotebook, any, {}>>;
5957
6070
  /**
5958
- * Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry includes the relative path, package name, and any compilation errors. This endpoint is useful for discovering available notebooks and checking their status.
6071
+ * Retrieves a list of all Malloy notebooks within the specified package: every `.malloynb` file, and every `.malloy` file directly under `notebooks/` that has a model-level `## artifact` note. Each notebook entry includes the relative path, package name, title, description, and any compilation or reading error. This endpoint is useful for discovering available notebooks and checking their status.
5959
6072
  * @summary List package notebooks
5960
6073
  * @param {string} environmentName Name of the environment
5961
6074
  * @param {string} packageName Name of the package