@malloy-publisher/server 0.12.0 → 0.12.2

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 (32) hide show
  1. package/README.docker.md +1 -1
  2. package/dist/app/api-doc.yaml +1142 -310
  3. package/dist/app/assets/{EnvironmentPage-xh4aL2P9.js → EnvironmentPage-Bur-WhHL.js} +1 -1
  4. package/dist/app/assets/{HomePage-B1w1b7e1.js → HomePage-C-mHsU3M.js} +1 -1
  5. package/dist/app/assets/{MainPage-BrYzrVlB.js → MainPage-Dmzmn9Mt.js} +1 -1
  6. package/dist/app/assets/ModelPage-ClSgGwYc.js +2 -0
  7. package/dist/app/assets/PackagePage-C4nKI00H.js +1 -0
  8. package/dist/app/assets/PackageSplatRoute-D6GSpadt.js +2 -0
  9. package/dist/app/assets/{RenderedResult-D8bCgThO.es-bV5QVotj.js → RenderedResult-DEjFM1DL.es-hdq4xdyP.js} +7 -7
  10. package/dist/app/assets/{RouteError-Dmo0qwGV.js → RouteError-Ct5JhhH3.js} +1 -1
  11. package/dist/app/assets/{ThemeEditorPage-ByJldD0t.js → ThemeEditorPage-DoIC196m.js} +1 -1
  12. package/dist/app/assets/{ToggleButtonGroup-Dxax2bOe.js → ToggleButtonGroup-9ITznW0t.js} +1 -1
  13. package/dist/app/assets/{documentRoutes-DFdmdaBX.js → documentRoutes-DHQw63FD.js} +1 -1
  14. package/dist/app/assets/{editPageMounted-CjmdfOM1.js → editPageMounted-DQ2kfKQx.js} +2 -2
  15. package/dist/app/assets/index-DT27peli.js +512 -0
  16. package/dist/app/assets/{index-BvJ7NTSs.js → index-Dbg1nxCx.js} +1 -1
  17. package/dist/app/assets/{index-9_OOEQph.js → index-iwwnDmO4.js} +1 -1
  18. package/dist/app/assets/{index-BsumQDtR.js → index-u-HKFk7y.js} +1 -1
  19. package/dist/app/assets/index.es-Cu-znYwd.js +144 -0
  20. package/dist/app/assets/usePackageLinkNavigate-YsMXY8yR.js +1 -0
  21. package/dist/app/assets/{usePackageRoute-DzmKqWKq.js → usePackageRoute-D8N0M9Rp.js} +1 -1
  22. package/dist/app/index.html +1 -1
  23. package/dist/instrumentation.mjs +50529 -740
  24. package/dist/package_load_worker.mjs +50633 -227
  25. package/dist/server.mjs +8383 -4642
  26. package/package.json +1 -1
  27. package/dist/app/assets/ModelPage-DC5HfNar.js +0 -2
  28. package/dist/app/assets/PackagePage-DRKFqQHw.js +0 -1
  29. package/dist/app/assets/PackageSplatRoute-CU3-BYcC.js +0 -2
  30. package/dist/app/assets/index-BLi0H5mL.js +0 -483
  31. package/dist/app/assets/index.es-CbR1CwU4.js +0 -144
  32. package/dist/app/assets/usePackageLinkNavigate-SMJdqHGs.js +0 -1
@@ -2706,6 +2706,265 @@ paths:
2706
2706
  "503":
2707
2707
  $ref: "#/components/responses/ServiceUnavailable"
2708
2708
 
2709
+ /environments/{environmentName}/packages/{packageName}/status:
2710
+ get:
2711
+ tags:
2712
+ - packages
2713
+ operationId: get-package-status
2714
+ summary: Read how this server holds a package right now
2715
+ description: |
2716
+ The package's serving state on this server: whether a compiled copy
2717
+ serves and whether a load is in progress, which load it serves
2718
+ (`servedRevision`) and the content of that load (`sourceContentSha`),
2719
+ and which materialized tables are bound (`manifestBindingStatus`,
2720
+ `manifestEntryCount`, `boundManifestUri`, `storageServeBindings`).
2721
+ For a versioned package, the named version's, or its `latest`'s.
2722
+
2723
+ Reading it never loads the package. A package this server knows but
2724
+ does not hold in memory reports `status.serving` false and none of
2725
+ the load fields. `GET /status` carries the part of this an
2726
+ orchestrator reconciles from, for every package at once.
2727
+ parameters:
2728
+ - name: environmentName
2729
+ in: path
2730
+ description: Name of the environment
2731
+ required: true
2732
+ schema:
2733
+ $ref: "#/components/schemas/IdentifierPattern"
2734
+ - name: packageName
2735
+ in: path
2736
+ description: Name of the package
2737
+ required: true
2738
+ schema:
2739
+ $ref: "#/components/schemas/IdentifierPattern"
2740
+ - $ref: "#/components/parameters/versionId"
2741
+ responses:
2742
+ "200":
2743
+ description: The package's serving state
2744
+ content:
2745
+ application/json:
2746
+ schema:
2747
+ $ref: "#/components/schemas/PackageServingState"
2748
+ "400":
2749
+ $ref: "#/components/responses/BadRequest"
2750
+ "401":
2751
+ $ref: "#/components/responses/Unauthorized"
2752
+ "404":
2753
+ $ref: "#/components/responses/NotFound"
2754
+ "500":
2755
+ $ref: "#/components/responses/InternalServerError"
2756
+ "503":
2757
+ $ref: "#/components/responses/ServiceUnavailable"
2758
+
2759
+ /environments/{environmentName}/packages/{packageName}/entities:
2760
+ get:
2761
+ tags:
2762
+ - packages
2763
+ operationId: get-package-entities
2764
+ summary: Read what every model of a loaded package declares, for an indexer
2765
+ description: |
2766
+ What every `.malloy` model of the package declares, in the form an
2767
+ indexer reads: each source's public fields (kind, type, declaring code,
2768
+ annotations, `#(doc)`, table, join target, and an `#(index)`
2769
+ dimension's fingerprint), the facts the model states about each
2770
+ source (doc, visibility, queryability, filters, access gates), the
2771
+ model's givens and each source's schema. One entry per `.malloy`
2772
+ file, sorted by `modelPath`.
2773
+
2774
+ Shown under the rules of `GET …/models/{path}`: only the files on the
2775
+ package's discovery surface, and no source locked with
2776
+ `#(authorize) false`. With `includeHiddenFilesAndSources`, every
2777
+ `.malloy` file and every source, for a host that indexes them; as with
2778
+ the model routes, a gateway admits that flag only for such a host.
2779
+
2780
+ Computed once, when the package loads, from the models as they
2781
+ compiled before any materialization manifest is bound, so a later
2782
+ bind does not change it. A model that failed has an entry with `error`
2783
+ and `errorKind` and nothing else. An `#(index)` or required `#(filter)`
2784
+ an index cannot honor is left out (no fingerprint, no filter) and
2785
+ reported as a package warning whose `code` starts with `entities-`.
2786
+ parameters:
2787
+ - name: environmentName
2788
+ in: path
2789
+ description: Name of the environment
2790
+ required: true
2791
+ schema:
2792
+ $ref: "#/components/schemas/IdentifierPattern"
2793
+ - name: packageName
2794
+ in: path
2795
+ description: Name of the package
2796
+ required: true
2797
+ schema:
2798
+ $ref: "#/components/schemas/IdentifierPattern"
2799
+ - $ref: "#/components/parameters/versionId"
2800
+ - $ref: "#/components/parameters/includeHiddenFilesAndSources"
2801
+ responses:
2802
+ "200":
2803
+ description: The package's entities
2804
+ content:
2805
+ application/json:
2806
+ schema:
2807
+ type: array
2808
+ description: One entry per `.malloy` file, sorted by `modelPath`.
2809
+ items:
2810
+ $ref: "#/components/schemas/ModelEntities"
2811
+ "400":
2812
+ $ref: "#/components/responses/BadRequest"
2813
+ "401":
2814
+ $ref: "#/components/responses/Unauthorized"
2815
+ "404":
2816
+ $ref: "#/components/responses/NotFound"
2817
+ "410":
2818
+ $ref: "#/components/responses/Gone"
2819
+ "500":
2820
+ $ref: "#/components/responses/InternalServerError"
2821
+ "503":
2822
+ $ref: "#/components/responses/ServiceUnavailable"
2823
+
2824
+ /environments/{environmentName}/packages/{packageName}/build-plan:
2825
+ get:
2826
+ tags:
2827
+ - packages
2828
+ operationId: get-package-build-plan
2829
+ summary: Read the persist build plan of a loaded package
2830
+ description: |
2831
+ The persist build plan of the load: per persist source its
2832
+ `sourceEntityId`, output columns and build SQL, the dependency graphs,
2833
+ and the sources refused a build. A caller assigns physical names and
2834
+ identity per source from it and issues one build call (see
2835
+ `CreateMaterializationRequest.buildInstructions`). A package that
2836
+ declares no persist source has an empty plan. When the plan could not
2837
+ be derived at load, the read answers 409 with `reason`
2838
+ BUILD_PLAN_UNAVAILABLE; reloading the package derives it again, and
2839
+ retrying the read does not.
2840
+ parameters:
2841
+ - name: environmentName
2842
+ in: path
2843
+ description: Name of the environment
2844
+ required: true
2845
+ schema:
2846
+ $ref: "#/components/schemas/IdentifierPattern"
2847
+ - name: packageName
2848
+ in: path
2849
+ description: Name of the package
2850
+ required: true
2851
+ schema:
2852
+ $ref: "#/components/schemas/IdentifierPattern"
2853
+ - $ref: "#/components/parameters/versionId"
2854
+ responses:
2855
+ "200":
2856
+ description: The package's build plan
2857
+ content:
2858
+ application/json:
2859
+ schema:
2860
+ $ref: "#/components/schemas/BuildPlan"
2861
+ "400":
2862
+ $ref: "#/components/responses/BadRequest"
2863
+ "401":
2864
+ $ref: "#/components/responses/Unauthorized"
2865
+ "404":
2866
+ $ref: "#/components/responses/NotFound"
2867
+ "410":
2868
+ $ref: "#/components/responses/Gone"
2869
+ "500":
2870
+ $ref: "#/components/responses/InternalServerError"
2871
+ "409":
2872
+ $ref: "#/components/responses/Conflict"
2873
+ "503":
2874
+ $ref: "#/components/responses/ServiceUnavailable"
2875
+
2876
+ /environments/{environmentName}/packages/{packageName}/embedding-index:
2877
+ get:
2878
+ tags:
2879
+ - packages
2880
+ operationId: get-package-embedding-index
2881
+ summary: Read the state of a package's semantic discovery index
2882
+ description: |
2883
+ The state of the package's semantic discovery index, which is what
2884
+ `get_context` ranks against when an embedding provider is configured.
2885
+ `status: lexical` when the server has no provider, because there is no
2886
+ index to describe. Poll it after a load or reload until `status` is
2887
+ terminal (`ready`, `lexical` or `error`).
2888
+ parameters:
2889
+ - name: environmentName
2890
+ in: path
2891
+ description: Name of the environment
2892
+ required: true
2893
+ schema:
2894
+ $ref: "#/components/schemas/IdentifierPattern"
2895
+ - name: packageName
2896
+ in: path
2897
+ description: Name of the package
2898
+ required: true
2899
+ schema:
2900
+ $ref: "#/components/schemas/IdentifierPattern"
2901
+ - $ref: "#/components/parameters/versionId"
2902
+ responses:
2903
+ "200":
2904
+ description: The package's semantic index state
2905
+ content:
2906
+ application/json:
2907
+ schema:
2908
+ $ref: "#/components/schemas/PackageEmbeddingIndex"
2909
+ "400":
2910
+ $ref: "#/components/responses/BadRequest"
2911
+ "401":
2912
+ $ref: "#/components/responses/Unauthorized"
2913
+ "404":
2914
+ $ref: "#/components/responses/NotFound"
2915
+ "410":
2916
+ $ref: "#/components/responses/Gone"
2917
+ "500":
2918
+ $ref: "#/components/responses/InternalServerError"
2919
+ "503":
2920
+ $ref: "#/components/responses/ServiceUnavailable"
2921
+
2922
+ /environments/{environmentName}/packages/{packageName}/classification:
2923
+ get:
2924
+ tags:
2925
+ - packages
2926
+ operationId: get-package-classification
2927
+ summary: Read a package's classification summary
2928
+ description: |
2929
+ For each published entry point of the package, the classes its
2930
+ `#(carries)` declares and how many of its fields carry each class,
2931
+ inherited classes included, with the count left unclassified. It
2932
+ covers only what discovery shows. `sources` is empty when nothing
2933
+ published is classified.
2934
+ parameters:
2935
+ - name: environmentName
2936
+ in: path
2937
+ description: Name of the environment
2938
+ required: true
2939
+ schema:
2940
+ $ref: "#/components/schemas/IdentifierPattern"
2941
+ - name: packageName
2942
+ in: path
2943
+ description: Name of the package
2944
+ required: true
2945
+ schema:
2946
+ $ref: "#/components/schemas/IdentifierPattern"
2947
+ - $ref: "#/components/parameters/versionId"
2948
+ responses:
2949
+ "200":
2950
+ description: The package's classification summary
2951
+ content:
2952
+ application/json:
2953
+ schema:
2954
+ $ref: "#/components/schemas/ClassificationSummary"
2955
+ "400":
2956
+ $ref: "#/components/responses/BadRequest"
2957
+ "401":
2958
+ $ref: "#/components/responses/Unauthorized"
2959
+ "404":
2960
+ $ref: "#/components/responses/NotFound"
2961
+ "410":
2962
+ $ref: "#/components/responses/Gone"
2963
+ "500":
2964
+ $ref: "#/components/responses/InternalServerError"
2965
+ "503":
2966
+ $ref: "#/components/responses/ServiceUnavailable"
2967
+
2709
2968
  /environments/{environmentName}/packages/{packageName}/agents:
2710
2969
  get:
2711
2970
  tags:
@@ -3947,6 +4206,9 @@ components:
3947
4206
  * VERSION_BUILDING: a materialization of the version is running, and
3948
4207
  archiving or deleting it would drop the tables it is writing. Wait for
3949
4208
  it, or stop it.
4209
+ * BUILD_PLAN_UNAVAILABLE: the package's build plan could not be
4210
+ derived when it loaded. Reload the package; retrying the read does
4211
+ not help.
3950
4212
  content:
3951
4213
  application/json:
3952
4214
  schema:
@@ -4313,9 +4575,11 @@ components:
4313
4575
  archived version, or one not loaded since the server started) carries only
4314
4576
  its name and version. An orchestrator reconciles what a server holds
4315
4577
  from this list, so it names every version rather than only `latest`
4316
- or only what is in memory; `resource` keeps its shape.
4578
+ or only what is in memory; `resource` keeps its shape. Each entry
4579
+ carries what a reconcile reads (`PackageStatusEntry`); the rest of a
4580
+ package's serving state is at `GET …/packages/{packageName}/status`.
4317
4581
  items:
4318
- $ref: "#/components/schemas/Environment"
4582
+ $ref: "#/components/schemas/ServerStatusEnvironment"
4319
4583
  initialized:
4320
4584
  type: boolean
4321
4585
  description: Whether the server is fully initialized and ready to serve requests
@@ -4358,6 +4622,18 @@ components:
4358
4622
  The `versionPromotion` setting this server runs with. With
4359
4623
  "explicit", a publish never moves a package's `latest`; only
4360
4624
  `PUT .../packages/{packageName}/latest` does.
4625
+ modelPage:
4626
+ type: string
4627
+ enum: ["explorer", "viewer"]
4628
+ readOnly: true
4629
+ description: >-
4630
+ Which page the Console shows for a model (`PUBLISHER_MODEL_PAGE`,
4631
+ "explorer" by default). "explorer" is the Malloy Explorer, which
4632
+ writes the queries it builds back to Malloy text with string
4633
+ values unescaped, so a drilled value holding a double quote
4634
+ rewrites its query. "viewer" shows a page that builds no query,
4635
+ and takes the Explorer out of the legacy notebook too. Absent from
4636
+ a server that predates the setting, which reads as "explorer".
4361
4637
  emptyReason:
4362
4638
  type: string
4363
4639
  readOnly: true
@@ -4378,9 +4654,11 @@ components:
4378
4654
  Present only when initialization failed, and says why. Such a
4379
4655
  server stays up but never becomes ready, so operationalState stays
4380
4656
  initializing; without this field that reads as a server still
4381
- starting. Typical causes are a config file the server cannot read
4382
- or parse, and a server root it cannot write (where it creates
4383
- publisher.db), such as a read-only root filesystem. A package or
4657
+ starting. Typical causes are a server root it cannot write (where
4658
+ it creates publisher.db), such as a read-only root filesystem, and
4659
+ a ${VAR} in the config file's environments that is not set. A
4660
+ config file the server cannot read or parse stops it at startup,
4661
+ before it answers at all. A package or
4384
4662
  environment that fails to load is reported under loadErrors
4385
4663
  instead. Fix the cause and restart.
4386
4664
  loadErrors:
@@ -4673,10 +4951,88 @@ components:
4673
4951
  populated by the server or applied by the client; viewers currently
4674
4952
  use the instance-level theme only.
4675
4953
 
4676
- Package:
4954
+ PackageStatus:
4677
4955
  type: object
4678
- description: Represents a Malloy package containing models, notebooks, and
4679
- embedded databases
4956
+ description: >-
4957
+ Server-computed, read-only: how this server holds the package right
4958
+ now. `serving` is whether a compiled copy answers queries here;
4959
+ `loading` is whether a load, reinstall or recompile of the package
4960
+ is in progress here. The two are independent. A first load reports
4961
+ `loading` without `serving`. A reload of a package that is already
4962
+ served reports both, because the previous copy keeps answering until
4963
+ the new one is swapped in. Steady state reports `serving` alone.
4964
+ `loadingSince` is when the in-progress load began, so a caller can
4965
+ bound one that never completes. Which tables a serving copy answers
4966
+ from is a separate question, answered by `manifestBindingStatus`.
4967
+ A publish of a package version is a load from its download until
4968
+ it settles, and while it runs every entry of that package reports
4969
+ `loading`. With `includeLoading=true`, once its tree has named the
4970
+ version, a version the package does not hold yet is listed as its
4971
+ own entry, with its `versionId`, `loaded: false` and `loading`,
4972
+ unless an unversioned copy of the package still serves.
4973
+
4974
+ A package that is loading for the first time, so is not yet
4975
+ serving, is listed only where a caller asks for it:
4976
+ `GET /status?includeLoading=true` includes it as its name and
4977
+ `status`. Every other listing, the environment resources included,
4978
+ shows packages that can be queried.
4979
+ required: [serving, loading]
4980
+ properties:
4981
+ serving:
4982
+ type: boolean
4983
+ description: A compiled copy of the package answers queries here now.
4984
+ loading:
4985
+ type: boolean
4986
+ description: >-
4987
+ A load, reinstall or recompile of the package is in progress
4988
+ here. While true, `manifestBindingStatus` describes the copy
4989
+ being replaced, not the one being built.
4990
+ loadingSince:
4991
+ type: string
4992
+ format: date-time
4993
+ description: When the in-progress load began. Present only while `loading` is true.
4994
+
4995
+ StorageServeBinding:
4996
+ type: object
4997
+ properties:
4998
+ sourceName:
4999
+ type: string
5000
+ description: >-
5001
+ The materialized source served from storage.
5002
+
5003
+
5004
+ **It may name no source in any model file**, exactly as
5005
+ `ManifestEntry.sourceName` may: a pre-aggregation rollup is a
5006
+ persist source the publisher synthesized, so its name is
5007
+ generated. Check `origin` rather than resolving this against a
5008
+ package's models and reading a miss as corruption.
5009
+ origin:
5010
+ type: string
5011
+ enum: [persist, preaggregate]
5012
+ default: persist
5013
+ description: >-
5014
+ What the bound source IS: `persist` for one a modeler annotated,
5015
+ which is the meaning of an absent value, and `preaggregate` for
5016
+ a rollup the publisher synthesized from `#@ preaggregate`
5017
+ measures. Mirrors `ManifestEntry.origin`.
5018
+ storageDestinationName:
5019
+ type: string
5020
+ description: >-
5021
+ The storage destination the physical table lives in (an entry
5022
+ in `storageDestinations`, not a connection).
5023
+ tablePath:
5024
+ type: string
5025
+ description: The physical table the source is served from.
5026
+
5027
+ PackageServingState:
5028
+ type: object
5029
+ description: |
5030
+ How this server holds one package, or one version of it, right now:
5031
+ whether it serves and is loading, which load it serves, and which
5032
+ materialized tables are bound to it. `GET …/packages/{packageName}/status`.
5033
+ Reading it never loads the package: a package that is not in memory
5034
+ reports `status.serving` false and none of the load fields.
5035
+ required: [name, status]
4680
5036
  properties:
4681
5037
  resource:
4682
5038
  type: string
@@ -4688,57 +5044,348 @@ components:
4688
5044
  oneOf:
4689
5045
  - $ref: "#/components/schemas/VersionIdPattern"
4690
5046
  - type: "null"
4691
- readOnly: true
4692
- description: >-
4693
- The published version this response describes. Absent for a package
4694
- that has no published versions. A request that names no `versionId`
4695
- is answered with the package's `latest` version, so this is how a
4696
- caller learns which version it got. In a package listing it is null
4697
- for a package none of whose versions is `latest` yet (under
4698
- `versionPromotion: explicit`, before `PUT .../latest`). Set from the
4699
- version's publisher.json at publish; never sent by a client.
4700
- latestVersion:
4701
- oneOf:
4702
- - $ref: "#/components/schemas/VersionIdPattern"
4703
- - type: "null"
4704
- readOnly: true
4705
5047
  description: >-
4706
- The package's `latest` version. Absent for a package that has no
4707
- published versions, and null while none of its versions is `latest`.
4708
- Equal to `versionId` unless the request named another one.
5048
+ The version this state describes, for a package that has versions:
5049
+ the one the request named, or its `latest`. Absent otherwise.
4709
5050
  loaded:
4710
5051
  type: boolean
4711
- readOnly: true
4712
5052
  description: >-
4713
- Set only on a version's entry in `GET /status`: whether this server
4714
- holds the version in memory. A published version that is not loaded
4715
- (an archived one, or one not loaded since the server started) is still
4716
- held, so it is still listed, with `loaded: false` and only its
4717
- `resource`, name, version, `latestVersion`, `archiveStatus` and
4718
- `status`. It loads when a request next names it. A version still
4719
- being published is listed only under `includeLoading`, with
4720
- `loaded: false`, no `archiveStatus`, and `status.loading`.
5053
+ For a version: whether this server holds it in memory. A published
5054
+ version that is not loaded (an archived one, or one not loaded since
5055
+ the server started) loads when a request next names it. Absent for a
5056
+ package without versions, whose `status.serving` says the same.
4721
5057
  archiveStatus:
4722
5058
  type: string
4723
5059
  enum: [archive, unarchive]
5060
+ description: For a version, whether it is archived. Absent otherwise.
5061
+ status:
5062
+ $ref: "#/components/schemas/PackageStatus"
5063
+ servedRevision:
5064
+ type: string
4724
5065
  readOnly: true
4725
5066
  description: >-
4726
- Set only on a version's entry in `GET /status`, except one still
4727
- being published: whether the version is archived.
4728
- description:
4729
- type: string
4730
- description: Package description
4731
- location:
5067
+ Server-computed, read-only: an identifier for the load that produced
5068
+ what this package is currently serving. Minted fresh per load, so
5069
+ two loads of byte-identical files carry different revisions. Use it
5070
+ to tell one load from another, NOT to tell whether content changed:
5071
+ it moves on every reload regardless. `sourceContentSha` answers that.
5072
+ sourceContentSha:
4732
5073
  type: string
4733
- description:
4734
- Package location. A LOCAL path must start with `./`, `../`, `~/`,
4735
- or `/`; a `./` or `../` path resolves against the config file's
4736
- directory, and `~/` against the home directory. Anything else is
4737
- read as a remote URI (github, s3, gcs, https), so a bare name like
4738
- `sales` is not local and the package is skipped with
4739
- "Invalid package path" in the server's loadErrors. At boot a local
4740
- package is COPIED into publisher_data/ and the copy is served, so
4741
- edits to the source directory are not read; starting the server
5074
+ readOnly: true
5075
+ description: >-
5076
+ Server-computed, read-only: SHA-256 over the package-relative path
5077
+ and bytes of every file the package is serving: each model file,
5078
+ each package skill file under `skills/`, and, when the manifest
5079
+ declares `agents`, the canonical form of that `agents` object plus
5080
+ every instructions, task and skill file those agents read.
5081
+
5082
+ This is the reload receipt. Publisher serves a COPY of a package
5083
+ under `publisher_data/<env>/<pkg>/` unless the environment was
5084
+ started with `--watch-env`, so an edit to the original source
5085
+ directory reaches nothing and the reload still reports success.
5086
+ Comparing this value across a reload is what distinguishes "the
5087
+ server recompiled my edit" from "the server recompiled the same
5088
+ bytes it already had".
5089
+
5090
+ It covers EVERY model path in the package, so an edit to an imported
5091
+ file moves it where a hash of one model path would not. It covers
5092
+ nothing outside the list above: a data file, a `public/` asset, a
5093
+ `version` bump or any other key in publisher.json (`retrieval`,
5094
+ `explores`, `queryableSources`, `scope`) all leave it unchanged,
5095
+ although some of those do change what is served. An unchanged value
5096
+ therefore proves an edit to a hashed file did not reach the served
5097
+ copy, and says nothing about an edit to anything else.
5098
+ manifestBindingStatus:
5099
+ type: string
5100
+ readOnly: true
5101
+ enum:
5102
+ - unbound
5103
+ - bound
5104
+ - live_fallback
5105
+ description: >-
5106
+ Server-computed, read-only: whether the CONFIGURED build manifest is
5107
+ currently bound to this package's served models. `unbound` = no
5108
+ manifest configured, so the package serves live. `bound` = the
5109
+ configured manifest was fetched and applied. `live_fallback` = a
5110
+ `manifestLocation` is configured but its fetch/bind failed or timed
5111
+ out, so the configured manifest is NOT applied. Lets the caller
5112
+ confirm the publisher actually bound the configured manifest rather
5113
+ than inferring it from logs.
5114
+
5115
+ `bound` reports that the bind ran to completion, NOT that any query
5116
+ routes to a materialized table: an entry whose source fails the
5117
+ eligibility gate is dropped, and the storage tier serves live under a
5118
+ `PERSIST_STORAGE_MODE` that is not `on`. Read `manifestEntryCount`
5119
+ and `storageServeBindings` for what actually bound.
5120
+
5121
+ An EMPTY manifest is a bind like any other: it is fetched and applied,
5122
+ binds nothing, and reports `bound` with `manifestEntryCount` 0 and no
5123
+ `storageServeBindings`, while the package serves entirely live. That
5124
+ combination is the signature — `bound` with neither tier populated
5125
+ means the manifest carried nothing, not that the bind was missed.
5126
+
5127
+ `live_fallback` does NOT imply the package is serving live. It says
5128
+ the configured manifest was not applied — not that nothing is. A
5129
+ failed FIRST bind leaves nothing bound (`boundManifestUri` null), but
5130
+ a failed REBIND leaves the previously bound manifest in place: its
5131
+ colocated substitutions stay compiled in, its storage serve bindings
5132
+ stay installed, and `boundManifestUri`, `manifestEntryCount` and
5133
+ `storageServeBindings` all continue to describe it.
5134
+
5135
+ That rebind guarantee covers a failure BEFORE either tier applies —
5136
+ the manifest fetch failing or timing out, which is what produces
5137
+ `live_fallback` in practice. A failure partway through the recompile,
5138
+ after the new models are installed but before the binding is
5139
+ recorded, is out of scope: the new substitutions would be live while
5140
+ these fields still described the previous manifest.
5141
+
5142
+ So the invariant to hold, whatever the status says: a non-null
5143
+ `boundManifestUri` is a LIVE reference to the manifest whose tables
5144
+ this package is currently serving from. A caller reclaiming
5145
+ superseded physical tables must treat it as one regardless of
5146
+ `manifestBindingStatus` — reading `live_fallback` as "not serving
5147
+ from manifest tables" and reclaiming that generation would drop
5148
+ tables out from under a package actively serving them.
5149
+
5150
+ Note this value is not the `live_fallback` on a query result's
5151
+ `servedFrom`, which reports that ONE query degraded to the warehouse.
5152
+ This one is about the package's binding, and as above does not imply
5153
+ any query ran live.
5154
+ manifestEntryCount:
5155
+ type: integer
5156
+ readOnly: true
5157
+ description: >-
5158
+ Server-computed, read-only: number of sourceEntityId -> physical-table
5159
+ entries currently bound for the COLOCATED (same-connection tableName
5160
+ substitution) tier only. 0 when unbound, or when the bound manifest
5161
+ carried no colocated entries — so a fully bound `storage=`-only
5162
+ manifest reports `bound` with a count of 0. Corroborate a
5163
+ cross-connection bind with `storageServeBindings`, not this count.
5164
+
5165
+ Describes whatever is CURRENTLY bound, not the configured manifest: on
5166
+ a failed rebind this keeps the previously bound manifest's count (as
5167
+ `boundManifestUri` keeps its URI), because those entries really are
5168
+ still bound.
5169
+ boundManifestUri:
5170
+ type: ["string", "null"]
5171
+ readOnly: true
5172
+ description: >-
5173
+ Server-computed, read-only: the manifest URI actually bound to the
5174
+ served models. Usually equals `manifestLocation`, but can differ
5175
+ after an in-memory auto-load following a materialization build (no
5176
+ URI), in which case it is null. Null whenever the package is unbound.
5177
+
5178
+ It also diverges after a FAILED REBIND: `manifestLocation` then names
5179
+ the configured manifest that did not apply, while this names the
5180
+ manifest still bound and still served from. So a non-null value here
5181
+ is a live reference regardless of `manifestBindingStatus` — see that
5182
+ field for the invariant a caller reclaiming superseded physical
5183
+ tables has to hold.
5184
+ storageServeBindings:
5185
+ type: array
5186
+ readOnly: true
5187
+ description: >-
5188
+ Server-computed, read-only: sources currently bound to serve from a
5189
+ `storage=` destination via the virtual-source transform (distinct
5190
+ from the same-connection manifest binding above — a storage source is
5191
+ read cross-connection from its destination, not substituted in the
5192
+ manifest). Present only when at least one source is bound. Whether a
5193
+ query actually routes to these tables additionally depends on
5194
+ `PERSIST_STORAGE_MODE=on`; under `off`/`write-only` the bindings may
5195
+ be present but the serve path still runs live (see `warnings`).
5196
+
5197
+ Like `boundManifestUri`, this describes whatever is CURRENTLY bound
5198
+ rather than the configured manifest: after a failed rebind it goes on
5199
+ listing the previously bound manifest's sources, which are still
5200
+ serving.
5201
+
5202
+
5203
+ "Bound" is not the same as "serving", and an entry with
5204
+ `origin: preaggregate` is where the two most often part: a rollup is
5205
+ listed here once its table exists, but it is only offered to a query
5206
+ through a composite re-exposing its base's name, so it does not serve
5207
+ when something else already claims that name. Read `origin` before
5208
+ treating a row as evidence that queries are being accelerated.
5209
+ items:
5210
+ $ref: "#/components/schemas/StorageServeBinding"
5211
+
5212
+ PackageStatusEntry:
5213
+ description: |
5214
+ A package's entry in `GET /status`, carrying what an orchestrator reconciles
5215
+ a server from: which package or version it is, whether it is serving or
5216
+ loading, and which manifest is bound. The rest of the package's serving
5217
+ state is at `GET …/packages/{packageName}/status`.
5218
+
5219
+ While `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this
5220
+ release, an entry is the package's whole response, so it is declared as a
5221
+ `Package`: every field beyond the ones below is deprecated on this entry
5222
+ and absent once the setting is off; a later release removes them.
5223
+ allOf:
5224
+ - $ref: "#/components/schemas/Package"
5225
+ - $ref: "#/components/schemas/PackageStatusEntryFields"
5226
+
5227
+ PackageStatusEntryFields:
5228
+ type: object
5229
+ description: >-
5230
+ What a `GET /status` entry carries with `PUBLISHER_PACKAGE_INLINE_FIELDS`
5231
+ off. Each field is declared `deprecated: false` so it overrides the
5232
+ deprecated `Package` field of the same name the `allOf` brings in.
5233
+ required: [name]
5234
+ properties:
5235
+ resource:
5236
+ type: string
5237
+ description: Resource path to the package
5238
+ name:
5239
+ type: string
5240
+ description: Package name
5241
+ versionId:
5242
+ oneOf:
5243
+ - $ref: "#/components/schemas/VersionIdPattern"
5244
+ - type: "null"
5245
+ description: >-
5246
+ The version this entry describes. A versioned package is listed once
5247
+ per version this server holds. Absent for a package without versions.
5248
+ latestVersion:
5249
+ oneOf:
5250
+ - $ref: "#/components/schemas/VersionIdPattern"
5251
+ - type: "null"
5252
+ description: >-
5253
+ The package's `latest` version; null while none of its versions is
5254
+ `latest`. Absent for a package without versions.
5255
+ loaded:
5256
+ deprecated: false
5257
+ type: boolean
5258
+ description: >-
5259
+ Set only on a version's entry: whether this server holds the version
5260
+ in memory. A published version that is not loaded (an archived one, or
5261
+ one not loaded since the server started) is still held, so it is still
5262
+ listed, with `loaded: false` and only its `resource`, name, version,
5263
+ `latestVersion`, `archiveStatus` and `status`. It loads when a request
5264
+ next names it. A version still being published is listed only under
5265
+ `includeLoading`, with `loaded: false`, no `archiveStatus`, and
5266
+ `status.loading`.
5267
+ archiveStatus:
5268
+ deprecated: false
5269
+ type: string
5270
+ enum: [archive, unarchive]
5271
+ description: >-
5272
+ Set only on a version's entry, except one still being published:
5273
+ whether the version is archived.
5274
+ status:
5275
+ deprecated: false
5276
+ $ref: "#/components/schemas/PackageStatus"
5277
+ manifestBindingStatus:
5278
+ deprecated: false
5279
+ type: string
5280
+ enum:
5281
+ - unbound
5282
+ - bound
5283
+ - live_fallback
5284
+ description: >-
5285
+ Whether the configured build manifest is bound to the served models.
5286
+ See `PackageServingState.manifestBindingStatus`, including the
5287
+ invariant a caller reclaiming superseded tables has to hold.
5288
+ boundManifestUri:
5289
+ deprecated: false
5290
+ type: ["string", "null"]
5291
+ description: >-
5292
+ The manifest URI actually bound to the served models; null when
5293
+ unbound. A non-null value is a live reference. See
5294
+ `PackageServingState.boundManifestUri`.
5295
+
5296
+ ServerStatusEnvironment:
5297
+ type: object
5298
+ description: |
5299
+ An environment as `GET /status` reports it: its identity and connections,
5300
+ and one entry per package (per version, for a versioned package).
5301
+ Connections are reported without their attributes.
5302
+ properties:
5303
+ resource:
5304
+ type: string
5305
+ description: Resource path to the environment
5306
+ name:
5307
+ type: string
5308
+ description: Environment name
5309
+ readme:
5310
+ type: string
5311
+ description: Environment README content
5312
+ location:
5313
+ type: string
5314
+ description: Environment location
5315
+ connections:
5316
+ type: array
5317
+ items:
5318
+ $ref: "#/components/schemas/Connection"
5319
+ storageDestinations:
5320
+ type: array
5321
+ description: The environment's storage destinations, `name` and `type` only.
5322
+ items:
5323
+ $ref: "#/components/schemas/Connection"
5324
+ packages:
5325
+ type: array
5326
+ items:
5327
+ $ref: "#/components/schemas/PackageStatusEntry"
5328
+
5329
+ Package:
5330
+ type: object
5331
+ description: Represents a Malloy package containing models, notebooks, and
5332
+ embedded databases
5333
+ properties:
5334
+ resource:
5335
+ type: string
5336
+ description: Resource path to the package
5337
+ name:
5338
+ type: string
5339
+ description: Package name
5340
+ versionId:
5341
+ oneOf:
5342
+ - $ref: "#/components/schemas/VersionIdPattern"
5343
+ - type: "null"
5344
+ readOnly: true
5345
+ description: >-
5346
+ The published version this response describes. Absent for a package
5347
+ that has no published versions. A request that names no `versionId`
5348
+ is answered with the package's `latest` version, so this is how a
5349
+ caller learns which version it got. In a package listing it is null
5350
+ for a package none of whose versions is `latest` yet (under
5351
+ `versionPromotion: explicit`, before `PUT .../latest`). Set from the
5352
+ version's publisher.json at publish; never sent by a client.
5353
+ latestVersion:
5354
+ oneOf:
5355
+ - $ref: "#/components/schemas/VersionIdPattern"
5356
+ - type: "null"
5357
+ readOnly: true
5358
+ description: >-
5359
+ The package's `latest` version. Absent for a package that has no
5360
+ published versions, and null while none of its versions is `latest`.
5361
+ Equal to `versionId` unless the request named another one.
5362
+ loaded:
5363
+ deprecated: true
5364
+ type: boolean
5365
+ readOnly: true
5366
+ description: >-
5367
+ **Moved** to `GET …/packages/{packageName}/status` (`PackageServingState.loaded`) and the version's entry in `GET /status`. Present on a package response only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5368
+ archiveStatus:
5369
+ deprecated: true
5370
+ type: string
5371
+ enum: [archive, unarchive]
5372
+ readOnly: true
5373
+ description: >-
5374
+ **Moved** to `GET …/packages/{packageName}/status` (`PackageServingState.archiveStatus`) and the version's entry in `GET /status`. Present on a package response only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5375
+ description:
5376
+ type: string
5377
+ description: Package description
5378
+ location:
5379
+ type: string
5380
+ description:
5381
+ Package location. A LOCAL path must start with `./`, `../`, `~/`,
5382
+ or `/`; a `./` or `../` path resolves against the config file's
5383
+ directory, and `~/` against the home directory. Anything else is
5384
+ read as a remote URI (github, s3, gcs, https), so a bare name like
5385
+ `sales` is not local and the package is skipped with
5386
+ "Invalid package path" in the server's loadErrors. At boot a local
5387
+ package is COPIED into publisher_data/ and the copy is served, so
5388
+ edits to the source directory are not read; starting the server
4742
5389
  with `--watch-env <env>` mounts local packages in place (symlink)
4743
5390
  and live-reloads them instead. The mount is chosen when the
4744
5391
  environment is first loaded from config, so adding `--watch-env`
@@ -5011,7 +5658,15 @@ components:
5011
5658
  `warn`; see docs/classification.md).
5012
5659
  `classification-malformed`: a `#(classification)` annotation
5013
5660
  that names no single class (one per field, `subject` the
5014
- source; `warn`). The per-file
5661
+ source; `warn`). `entities-…` (`entities-not-a-dimension`,
5662
+ `entities-parameterized-source`,
5663
+ `entities-multiple-required-filters`,
5664
+ `entities-sharing-not-allowed-on-dimension`,
5665
+ `entities-schedule-not-allowed-on-dimension`,
5666
+ `entities-required-filter-missing-dimension`,
5667
+ `entities-required-filter-non-public-dimension`): an
5668
+ `#(index)` or required `#(filter)` an index cannot honor, left
5669
+ out of `GET …/entities` (`model` its file; `warn`). The per-file
5015
5670
  report findings (`notebook-…`, `report-…`) and the report
5016
5671
  curation findings (`report-on-surface`,
5017
5672
  `index-is-not-a-report`). The message wording may change; the
@@ -5135,6 +5790,7 @@ components:
5135
5790
  metadata is unavailable for this request (not loaded), which the
5136
5791
  caller must treat as "unknown", not as a removal.
5137
5792
  manifestBindingStatus:
5793
+ deprecated: true
5138
5794
  type: string
5139
5795
  readOnly: true
5140
5796
  enum:
@@ -5142,187 +5798,43 @@ components:
5142
5798
  - bound
5143
5799
  - live_fallback
5144
5800
  description: >-
5145
- Server-computed, read-only: whether the CONFIGURED build manifest is
5146
- currently bound to this package's served models. `unbound` = no
5147
- manifest configured, so the package serves live. `bound` = the
5148
- configured manifest was fetched and applied. `live_fallback` = a
5149
- `manifestLocation` is configured but its fetch/bind failed or timed
5150
- out, so the configured manifest is NOT applied. Lets the caller
5151
- confirm the publisher actually bound the configured manifest rather
5152
- than inferring it from logs.
5153
-
5154
- `bound` reports that the bind ran to completion, NOT that any query
5155
- routes to a materialized table: an entry whose source fails the
5156
- eligibility gate is dropped, and the storage tier serves live under a
5157
- `PERSIST_STORAGE_MODE` that is not `on`. Read `manifestEntryCount`
5158
- and `storageServeBindings` for what actually bound.
5159
-
5160
- An EMPTY manifest is a bind like any other: it is fetched and applied,
5161
- binds nothing, and reports `bound` with `manifestEntryCount` 0 and no
5162
- `storageServeBindings`, while the package serves entirely live. That
5163
- combination is the signature — `bound` with neither tier populated
5164
- means the manifest carried nothing, not that the bind was missed.
5165
-
5166
- `live_fallback` does NOT imply the package is serving live. It says
5167
- the configured manifest was not applied — not that nothing is. A
5168
- failed FIRST bind leaves nothing bound (`boundManifestUri` null), but
5169
- a failed REBIND leaves the previously bound manifest in place: its
5170
- colocated substitutions stay compiled in, its storage serve bindings
5171
- stay installed, and `boundManifestUri`, `manifestEntryCount` and
5172
- `storageServeBindings` all continue to describe it.
5173
-
5174
- That rebind guarantee covers a failure BEFORE either tier applies —
5175
- the manifest fetch failing or timing out, which is what produces
5176
- `live_fallback` in practice. A failure partway through the recompile,
5177
- after the new models are installed but before the binding is
5178
- recorded, is out of scope: the new substitutions would be live while
5179
- these fields still described the previous manifest.
5180
-
5181
- So the invariant to hold, whatever the status says: a non-null
5182
- `boundManifestUri` is a LIVE reference to the manifest whose tables
5183
- this package is currently serving from. A caller reclaiming
5184
- superseded physical tables must treat it as one regardless of
5185
- `manifestBindingStatus` — reading `live_fallback` as "not serving
5186
- from manifest tables" and reclaiming that generation would drop
5187
- tables out from under a package actively serving them.
5188
-
5189
- Note this value is not the `live_fallback` on a query result's
5190
- `servedFrom`, which reports that ONE query degraded to the warehouse.
5191
- This one is about the package's binding, and as above does not imply
5192
- any query ran live.
5801
+ **Moved** to `GET …/packages/{packageName}/status` (`PackageServingState.manifestBindingStatus`) and the package's entry in `GET /status`. Present on a package response only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5193
5802
  manifestEntryCount:
5803
+ deprecated: true
5194
5804
  type: integer
5195
5805
  readOnly: true
5196
5806
  description: >-
5197
- Server-computed, read-only: number of sourceEntityId -> physical-table
5198
- entries currently bound for the COLOCATED (same-connection tableName
5199
- substitution) tier only. 0 when unbound, or when the bound manifest
5200
- carried no colocated entries — so a fully bound `storage=`-only
5201
- manifest reports `bound` with a count of 0. Corroborate a
5202
- cross-connection bind with `storageServeBindings`, not this count.
5203
-
5204
- Describes whatever is CURRENTLY bound, not the configured manifest: on
5205
- a failed rebind this keeps the previously bound manifest's count (as
5206
- `boundManifestUri` keeps its URI), because those entries really are
5207
- still bound.
5807
+ **Moved** to `GET …/packages/{packageName}/status` (`PackageServingState.manifestEntryCount`). Present on a package response only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5208
5808
  boundManifestUri:
5809
+ deprecated: true
5209
5810
  type: ["string", "null"]
5210
5811
  readOnly: true
5211
5812
  description: >-
5212
- Server-computed, read-only: the manifest URI actually bound to the
5213
- served models. Usually equals `manifestLocation`, but can differ
5214
- after an in-memory auto-load following a materialization build (no
5215
- URI), in which case it is null. Null whenever the package is unbound.
5216
-
5217
- It also diverges after a FAILED REBIND: `manifestLocation` then names
5218
- the configured manifest that did not apply, while this names the
5219
- manifest still bound and still served from. So a non-null value here
5220
- is a live reference regardless of `manifestBindingStatus` — see that
5221
- field for the invariant a caller reclaiming superseded physical
5222
- tables has to hold.
5813
+ **Moved** to `GET …/packages/{packageName}/status` (`PackageServingState.boundManifestUri`) and the package's entry in `GET /status`. Present on a package response only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5223
5814
  status:
5224
- type: object
5815
+ deprecated: true
5816
+ allOf:
5817
+ - $ref: "#/components/schemas/PackageStatus"
5225
5818
  readOnly: true
5226
5819
  description: >-
5227
- Server-computed, read-only: how this server holds the package right
5228
- now. `serving` is whether a compiled copy answers queries here;
5229
- `loading` is whether a load, reinstall or recompile of the package
5230
- is in progress here. The two are independent. A first load reports
5231
- `loading` without `serving`. A reload of a package that is already
5232
- served reports both, because the previous copy keeps answering until
5233
- the new one is swapped in. Steady state reports `serving` alone.
5234
- `loadingSince` is when the in-progress load began, so a caller can
5235
- bound one that never completes. Which tables a serving copy answers
5236
- from is a separate question, answered by `manifestBindingStatus`.
5237
- A publish of a package version is a load from its download until
5238
- it settles, and while it runs every entry of that package reports
5239
- `loading`. With `includeLoading=true`, once its tree has named the
5240
- version, a version the package does not hold yet is listed as its
5241
- own entry, with its `versionId`, `loaded: false` and `loading`,
5242
- unless an unversioned copy of the package still serves.
5243
-
5244
- A package that is loading for the first time, so is not yet
5245
- serving, is listed only where a caller asks for it:
5246
- `GET /status?includeLoading=true` includes it as its name and
5247
- `status`. Every other listing, the environment resources included,
5248
- shows packages that can be queried.
5249
- required: [serving, loading]
5250
- properties:
5251
- serving:
5252
- type: boolean
5253
- description: A compiled copy of the package answers queries here now.
5254
- loading:
5255
- type: boolean
5256
- description: >-
5257
- A load, reinstall or recompile of the package is in progress
5258
- here. While true, `manifestBindingStatus` describes the copy
5259
- being replaced, not the one being built.
5260
- loadingSince:
5261
- type: string
5262
- format: date-time
5263
- description: When the in-progress load began. Present only while `loading` is true.
5820
+ **Moved** to `GET …/packages/{packageName}/status` (`PackageServingState.status`) and the package's entry in `GET /status`. Present on a package response only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5264
5821
  storageServeBindings:
5822
+ deprecated: true
5265
5823
  type: array
5266
5824
  readOnly: true
5267
5825
  description: >-
5268
- Server-computed, read-only: sources currently bound to serve from a
5269
- `storage=` destination via the virtual-source transform (distinct
5270
- from the same-connection manifest binding above — a storage source is
5271
- read cross-connection from its destination, not substituted in the
5272
- manifest). Present only when at least one source is bound. Whether a
5273
- query actually routes to these tables additionally depends on
5274
- `PERSIST_STORAGE_MODE=on`; under `off`/`write-only` the bindings may
5275
- be present but the serve path still runs live (see `warnings`).
5276
-
5277
- Like `boundManifestUri`, this describes whatever is CURRENTLY bound
5278
- rather than the configured manifest: after a failed rebind it goes on
5279
- listing the previously bound manifest's sources, which are still
5280
- serving.
5281
-
5282
-
5283
- "Bound" is not the same as "serving", and an entry with
5284
- `origin: preaggregate` is where the two most often part: a rollup is
5285
- listed here once its table exists, but it is only offered to a query
5286
- through a composite re-exposing its base's name, so it does not serve
5287
- when something else already claims that name. Read `origin` before
5288
- treating a row as evidence that queries are being accelerated.
5826
+ **Moved** to `GET …/packages/{packageName}/status` (`PackageServingState.storageServeBindings`). Present on a package response only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5289
5827
  items:
5290
- type: object
5291
- properties:
5292
- sourceName:
5293
- type: string
5294
- description: >-
5295
- The materialized source served from storage.
5296
-
5297
-
5298
- **It may name no source in any model file**, exactly as
5299
- `ManifestEntry.sourceName` may: a pre-aggregation rollup is a
5300
- persist source the publisher synthesized, so its name is
5301
- generated. Check `origin` rather than resolving this against a
5302
- package's models and reading a miss as corruption.
5303
- origin:
5304
- type: string
5305
- enum: [persist, preaggregate]
5306
- default: persist
5307
- description: >-
5308
- What the bound source IS: `persist` for one a modeler annotated,
5309
- which is the meaning of an absent value, and `preaggregate` for
5310
- a rollup the publisher synthesized from `#@ preaggregate`
5311
- measures. Mirrors `ManifestEntry.origin`.
5312
- storageDestinationName:
5313
- type: string
5314
- description: >-
5315
- The storage destination the physical table lives in (an entry
5316
- in `storageDestinations`, not a connection).
5317
- tablePath:
5318
- type: string
5319
- description: The physical table the source is served from.
5828
+ $ref: "#/components/schemas/StorageServeBinding"
5320
5829
  buildPlan:
5830
+ deprecated: true
5321
5831
  oneOf:
5322
5832
  - $ref: "#/components/schemas/BuildPlan"
5323
5833
  - type: "null"
5324
5834
  readOnly: true
5325
5835
  description: >-
5836
+ **Moved** to `GET …/packages/{packageName}/build-plan`. Present here only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5837
+
5326
5838
  Server-computed, read-only: the persist build plan for this package
5327
5839
  version (per-source sourceEntityId, output columns, build SQL,
5328
5840
  dependency graphs), exposed as a deterministic property of the
@@ -5336,54 +5848,44 @@ components:
5336
5848
  package is compiled; null only when the package declares no persist
5337
5849
  source.
5338
5850
  embeddingIndex:
5851
+ deprecated: true
5339
5852
  oneOf:
5340
5853
  - $ref: "#/components/schemas/PackageEmbeddingIndex"
5341
5854
  - type: "null"
5342
5855
  readOnly: true
5343
5856
  description: >-
5857
+ **Moved** to `GET …/packages/{packageName}/embedding-index`. Present here only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5858
+ classification:
5859
+ deprecated: true
5860
+ allOf:
5861
+ - $ref: "#/components/schemas/ClassificationSummary"
5862
+ readOnly: true
5863
+ description: >-
5864
+ **Moved** to `GET …/packages/{packageName}/classification`. On the single-package read only (never a listing or `GET /status`), absent when nothing published is classified, and only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5865
+
5344
5866
  Server-computed, read-only: the state of this package's semantic
5345
5867
  discovery index, which is what `get_context` ranks against
5346
5868
  when an embedding provider is configured. `status: lexical` when
5347
5869
  the server has no provider, because there is no index to describe.
5348
5870
  servedRevision:
5871
+ deprecated: true
5349
5872
  type: string
5350
5873
  readOnly: true
5351
5874
  description: >-
5352
- Server-computed, read-only: an identifier for the load that produced
5353
- what this package is currently serving. Minted fresh per load, so
5354
- two loads of byte-identical files carry different revisions. Use it
5355
- to tell one load from another, NOT to tell whether content changed:
5356
- it moves on every reload regardless. `sourceContentSha` answers that.
5875
+ **Moved** to `GET …/packages/{packageName}/status` (`PackageServingState.servedRevision`). Always present on a `?reload=true` response, as that reload's receipt. Otherwise present only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it from all but the reload response.
5357
5876
  sourceContentSha:
5877
+ deprecated: true
5358
5878
  type: string
5359
5879
  readOnly: true
5360
5880
  description: >-
5361
- Server-computed, read-only: SHA-256 over the package-relative path
5362
- and bytes of every file the package is serving: each model file,
5363
- each package skill file under `skills/`, and, when the manifest
5364
- declares `agents`, the canonical form of that `agents` object plus
5365
- every instructions, task and skill file those agents read.
5366
-
5367
- This is the reload receipt. Publisher serves a COPY of a package
5368
- under `publisher_data/<env>/<pkg>/` unless the environment was
5369
- started with `--watch-env`, so an edit to the original source
5370
- directory reaches nothing and the reload still reports success.
5371
- Comparing this value across a reload is what distinguishes "the
5372
- server recompiled my edit" from "the server recompiled the same
5373
- bytes it already had".
5374
-
5375
- It covers EVERY model path in the package, so an edit to an imported
5376
- file moves it where a hash of one model path would not. It covers
5377
- nothing outside the list above: a data file, a `public/` asset, a
5378
- `version` bump or any other key in publisher.json (`retrieval`,
5379
- `explores`, `queryableSources`, `scope`) all leave it unchanged,
5380
- although some of those do change what is served. An unchanged value
5381
- therefore proves an edit to a hashed file did not reach the served
5382
- copy, and says nothing about an edit to anything else.
5881
+ **Moved** to `GET …/packages/{packageName}/status` (`PackageServingState.sourceContentSha`). Always present on a `?reload=true` response, as that reload's receipt. Otherwise present only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it from all but the reload response.
5383
5882
  agents:
5883
+ deprecated: true
5384
5884
  type: array
5385
5885
  readOnly: true
5386
5886
  description: >-
5887
+ **Moved** to `GET …/packages/{packageName}/agents`. Present here only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5888
+
5387
5889
  Server-computed, read-only: the agents this package's
5388
5890
  `publisher.json` declares and the server accepted, without their
5389
5891
  instructions. Absent when the manifest declares no `agents`. An
@@ -5392,9 +5894,12 @@ components:
5392
5894
  items:
5393
5895
  $ref: "#/components/schemas/AgentSummary"
5394
5896
  secureGivens:
5897
+ deprecated: true
5395
5898
  type: array
5396
5899
  readOnly: true
5397
5900
  description: >-
5901
+ **Moved** to `GET …/packages/{packageName}/entities`, where each model's `givens` carries `secure` (`.malloy` models only). Present here only while `PUBLISHER_PACKAGE_INLINE_FIELDS` is on, the default in this release; a later release removes it.
5902
+
5398
5903
  Server-computed, read-only: every `#(secure)` given the package's
5399
5904
  compiled models surface, so a host that sets those values learns
5400
5905
  which ones to set from the load response without compiling the
@@ -5422,9 +5927,6 @@ components:
5422
5927
  body carrying it is ignored.
5423
5928
  items:
5424
5929
  $ref: "#/components/schemas/SecureGivenSummary"
5425
- classification:
5426
- $ref: "#/components/schemas/ClassificationSummary"
5427
-
5428
5930
  AgentSchedule:
5429
5931
  type: object
5430
5932
  readOnly: true
@@ -5611,82 +6113,31 @@ components:
5611
6113
  type: string
5612
6114
  assets:
5613
6115
  type: array
5614
- description: >-
5615
- Every asset the agent's skills ship, listed without contents and
5616
- sorted by `relative_filepath`. Absent when there are none and in
5617
- the `skills=summary` view.
5618
- items:
5619
- $ref: "#/components/schemas/AgentAsset"
5620
- asset_counts:
5621
- type: object
5622
- description: >-
5623
- Only in the `skills=summary` view, and only when there are assets:
5624
- how many assets each skill ships.
5625
- additionalProperties:
5626
- type: integer
5627
- schedules:
5628
- type: array
5629
- items:
5630
- $ref: "#/components/schemas/AgentSchedule"
5631
- budget:
5632
- $ref: "#/components/schemas/AgentBudget"
5633
- warnings:
5634
- type: array
5635
- items:
5636
- type: string
5637
- source:
5638
- $ref: "#/components/schemas/AgentSource"
5639
-
5640
- ClassificationSummary:
5641
- type: object
5642
- readOnly: true
5643
- required: [sources]
5644
- description: >-
5645
- Server-computed, read-only, on a single package read
5646
- (`GET …/packages/{packageName}`) only, never on a listing: for each
5647
- published entry point, the classes its `#(carries)` declares and how
5648
- many of its fields carry each class (`#(classification)`, declared or
5649
- inherited). Covers only the sources discovery shows, so it reveals
5650
- nothing curation hides; a source locked to every caller is left out.
5651
- A field's own classes, and what they were inherited from, are on its
5652
- `get_context` card. Absent when no published field carries a class.
5653
- It cannot be set: a PATCH body carrying it is ignored.
5654
- properties:
5655
- sources:
5656
- type: array
5657
- description: Sorted by model path, then name.
5658
- items:
5659
- $ref: "#/components/schemas/ClassificationSummarySource"
5660
-
5661
- ClassificationSummarySource:
5662
- type: object
5663
- readOnly: true
5664
- required: [modelPath, name, fields, unclassified, classCounts]
5665
- properties:
5666
- modelPath:
5667
- type: string
5668
- name:
5669
- type: string
5670
- carries:
5671
- type: array
5672
- description: >-
5673
- The classes the source's `#(carries)` lists, sorted, inherited
5674
- through `extend` like a gate. Absent when it declares none.
6116
+ description: >-
6117
+ Every asset the agent's skills ship, listed without contents and
6118
+ sorted by `relative_filepath`. Absent when there are none and in
6119
+ the `skills=summary` view.
5675
6120
  items:
5676
- type: string
5677
- fields:
5678
- type: integer
5679
- description: The dimensions and measures a caller can reach from the source, through joins included.
5680
- unclassified:
5681
- type: integer
5682
- description: How many of those carry no class.
5683
- classCounts:
6121
+ $ref: "#/components/schemas/AgentAsset"
6122
+ asset_counts:
5684
6123
  type: object
5685
6124
  description: >-
5686
- How many of those fields carry each class, keyed by class. A field
5687
- under several classes counts under each.
6125
+ Only in the `skills=summary` view, and only when there are assets:
6126
+ how many assets each skill ships.
5688
6127
  additionalProperties:
5689
6128
  type: integer
6129
+ schedules:
6130
+ type: array
6131
+ items:
6132
+ $ref: "#/components/schemas/AgentSchedule"
6133
+ budget:
6134
+ $ref: "#/components/schemas/AgentBudget"
6135
+ warnings:
6136
+ type: array
6137
+ items:
6138
+ type: string
6139
+ source:
6140
+ $ref: "#/components/schemas/AgentSource"
5690
6141
 
5691
6142
  SkillSummary:
5692
6143
  type: object
@@ -6751,6 +7202,387 @@ components:
6751
7202
  file and every file that imports it alike. Sorted, no duplicates.
6752
7203
  items:
6753
7204
  type: string
7205
+ ClassificationSummary:
7206
+ type: object
7207
+ readOnly: true
7208
+ required: [sources]
7209
+ description: >-
7210
+ Server-computed, read-only, as `GET …/packages/{packageName}/classification`
7211
+ returns it: for each published entry point, the classes its
7212
+ `#(carries)` declares and how many of its fields carry each class
7213
+ (`#(classification)`, declared or inherited). Covers only the sources
7214
+ discovery shows, so it reveals nothing curation hides; a source locked
7215
+ to every caller is left out. A field's own classes, and what they were
7216
+ inherited from, are on its `get_context` card. `sources` is empty when
7217
+ no published field carries a class.
7218
+ properties:
7219
+ sources:
7220
+ type: array
7221
+ description: Sorted by model path, then name.
7222
+ items:
7223
+ $ref: "#/components/schemas/ClassificationSummarySource"
7224
+
7225
+ ClassificationSummarySource:
7226
+ type: object
7227
+ readOnly: true
7228
+ required: [modelPath, name, fields, unclassified, classCounts]
7229
+ properties:
7230
+ modelPath:
7231
+ type: string
7232
+ name:
7233
+ type: string
7234
+ carries:
7235
+ type: array
7236
+ description: >-
7237
+ The classes the source's `#(carries)` lists, sorted, inherited
7238
+ through `extend` like a gate. Absent when it declares none.
7239
+ items:
7240
+ type: string
7241
+ fields:
7242
+ type: integer
7243
+ description: The dimensions and measures a caller can reach from the source, through joins included.
7244
+ unclassified:
7245
+ type: integer
7246
+ description: How many of those carry no class.
7247
+ classCounts:
7248
+ type: object
7249
+ description: >-
7250
+ How many of those fields carry each class, keyed by class. A field
7251
+ under several classes counts under each.
7252
+ additionalProperties:
7253
+ type: integer
7254
+
7255
+ ModelEntities:
7256
+ type: object
7257
+ readOnly: true
7258
+ description: >-
7259
+ What one `.malloy` model file declares, in the form an indexer reads.
7260
+ See `GET …/entities`.
7261
+ required:
7262
+ - modelPath
7263
+ properties:
7264
+ modelPath:
7265
+ type: string
7266
+ description: Package-relative path of the model file.
7267
+ error:
7268
+ type: string
7269
+ description: >-
7270
+ Why the model has no entities: its compile error, or the server's
7271
+ failure to extract it (see `errorKind`). When present, every other
7272
+ list is empty.
7273
+ errorKind:
7274
+ type: string
7275
+ enum:
7276
+ - compile
7277
+ - extraction
7278
+ description: >-
7279
+ Present with `error`. `compile`: the model did not compile, which
7280
+ its author fixes. `extraction`: it compiled but the server could
7281
+ not extract its entities, a server fault an indexer should not
7282
+ read as the model having none.
7283
+ fields:
7284
+ type: array
7285
+ description: >-
7286
+ Every public field of every source the model surfaces, its
7287
+ imported sources included. A field reachable only through a join
7288
+ (a joined source declared inline, or one the model's imports do
7289
+ not surface on their own) is listed under the runnable source it
7290
+ is reached from, its `name` the join-qualified path.
7291
+ items:
7292
+ $ref: "#/components/schemas/EntityField"
7293
+ sources:
7294
+ type: array
7295
+ description: >-
7296
+ The facts the model states about each of its sources: docs,
7297
+ visibility, queryability, filters and access gates.
7298
+ Includes a source reached only through a join, with
7299
+ `joinOnly: true`, when the model gates or declares givens for it.
7300
+ items:
7301
+ $ref: "#/components/schemas/SourceEntities"
7302
+ givens:
7303
+ type: array
7304
+ description: >-
7305
+ Every given the model surfaces, those its imports surface included.
7306
+ They apply to every source in `sources`.
7307
+ items:
7308
+ $ref: "#/components/schemas/Given"
7309
+ sourceSchemas:
7310
+ type: array
7311
+ description: >-
7312
+ The schema of each source the model surfaces, in declaration
7313
+ order: its own annotations and its public fields, a join's fields
7314
+ nested under it.
7315
+ items:
7316
+ $ref: "#/components/schemas/SourceSchema"
7317
+ EntityField:
7318
+ type: object
7319
+ readOnly: true
7320
+ description: One public field of a source. See `ModelEntities.fields`.
7321
+ required:
7322
+ - name
7323
+ - source
7324
+ - kind
7325
+ - code
7326
+ - annotations
7327
+ - table
7328
+ properties:
7329
+ name:
7330
+ type: string
7331
+ description: >-
7332
+ The field's name, or its join-qualified path (`people.name`) when
7333
+ it is reached through a join.
7334
+ source:
7335
+ type: string
7336
+ description: >-
7337
+ The runnable source to query the field from. For a join field it
7338
+ is the source declaring the join, dotted when that source is itself
7339
+ reached through a join.
7340
+ kind:
7341
+ type: string
7342
+ description: >-
7343
+ One of `dimension`, `column`, `measure`, `view`, `join` or
7344
+ `hidden`. `column` is a dimension read straight from the table;
7345
+ `dimension` is one the model defines with `is`. `hidden` is a field
7346
+ the source hides with a `# hidden` tag. A later release may add a
7347
+ kind: skip a field whose kind you do not know.
7348
+ dataType:
7349
+ type: string
7350
+ description: The field's Malloy type, when it has one.
7351
+ code:
7352
+ type: string
7353
+ description: The Malloy text that declares the field.
7354
+ annotations:
7355
+ type: array
7356
+ items:
7357
+ type: string
7358
+ description: The field's annotations, trimmed, empty ones left out.
7359
+ doc:
7360
+ type: string
7361
+ description: The field's `#(doc)` text, when it has any.
7362
+ table:
7363
+ $ref: "#/components/schemas/EntityTable"
7364
+ join:
7365
+ $ref: "#/components/schemas/EntityJoin"
7366
+ indexFingerprint:
7367
+ $ref: "#/components/schemas/IndexFingerprint"
7368
+ EntityTable:
7369
+ type: object
7370
+ readOnly: true
7371
+ description: >-
7372
+ The table behind the field's source, split from its table path. Every
7373
+ part is absent when the source is not read from a table.
7374
+ properties:
7375
+ connection:
7376
+ type: string
7377
+ catalog:
7378
+ type: string
7379
+ schema:
7380
+ type: string
7381
+ name:
7382
+ type: string
7383
+
7384
+ EntityJoin:
7385
+ type: object
7386
+ readOnly: true
7387
+ description: What a join field joins. Present only on a `join` field.
7388
+ required:
7389
+ - nested
7390
+ properties:
7391
+ sourceName:
7392
+ type: string
7393
+ description: >-
7394
+ The source the join reads, absent for a join read straight from a
7395
+ table.
7396
+ sourcePath:
7397
+ type: string
7398
+ description: Package-relative path of the file declaring that source.
7399
+ nested:
7400
+ type: boolean
7401
+ description: >-
7402
+ Whether the joined source exists only inside this join (an inline
7403
+ `extend` or a table read), so its fields are listed through it.
7404
+
7405
+ IndexFingerprint:
7406
+ type: object
7407
+ readOnly: true
7408
+ description: >-
7409
+ The definitional fingerprint of an `#(index)`-tagged dimension. Two
7410
+ loads that compile the dimension's canonical index query to the same
7411
+ SQL report the same fingerprint, so a host can reuse one index across
7412
+ versions and across sources that extend each other. Absent when that
7413
+ query did not compile.
7414
+ required:
7415
+ - sqlHash
7416
+ - requiredFilterDimensions
7417
+ properties:
7418
+ sqlHash:
7419
+ type: string
7420
+ description: Lowercase hex SHA-256 of the compiled index query's SQL.
7421
+ requiredFilterDimensions:
7422
+ type: array
7423
+ items:
7424
+ type: string
7425
+ description: >-
7426
+ The dimensions the index is partitioned by: the source's required
7427
+ filters, in declaration order, then its `#(access_filter)` term
7428
+ columns.
7429
+
7430
+ SourceEntities:
7431
+ type: object
7432
+ readOnly: true
7433
+ description: >-
7434
+ What a model states about one source. See `ModelEntities.sources`.
7435
+ required:
7436
+ - modelPath
7437
+ - name
7438
+ - joinOnly
7439
+ - agentHidden
7440
+ - queryable
7441
+ properties:
7442
+ modelPath:
7443
+ type: string
7444
+ description: >-
7445
+ The model file the facts are filed under: the reporting model, or,
7446
+ for a `joinOnly` source declared in another file, that file.
7447
+ name:
7448
+ type: string
7449
+ description: >-
7450
+ The source's name. Dotted (`orders.customer`) for a source that
7451
+ exists only inside a join.
7452
+ joinOnly:
7453
+ type: boolean
7454
+ description: >-
7455
+ Reached only through a join. Only `authorize` is reported for it.
7456
+ doc:
7457
+ type: string
7458
+ description: The source's own `#(doc)` text, when it has any.
7459
+ agentHidden:
7460
+ type: boolean
7461
+ description: >-
7462
+ The source, or the model file declaring it, carries
7463
+ `#(agent-hidden)`.
7464
+ queryable:
7465
+ type: boolean
7466
+ description: >-
7467
+ Whether this server runs a query against the source directly.
7468
+ False for a source outside the package's query surface.
7469
+ servedFrom:
7470
+ $ref: "#/components/schemas/EntitySourceAddress"
7471
+ filters:
7472
+ type: array
7473
+ items:
7474
+ $ref: "#/components/schemas/Filter"
7475
+ authorize:
7476
+ type: array
7477
+ description: >-
7478
+ The source's effective access gates: file-level ones first, then
7479
+ its own, `authorize` before `access_filter`.
7480
+ items:
7481
+ $ref: "#/components/schemas/EntityGate"
7482
+
7483
+ EntitySourceAddress:
7484
+ type: object
7485
+ readOnly: true
7486
+ description: >-
7487
+ The served source a non-queryable source stands for: a report's import
7488
+ of a served source, or a source it derives from one.
7489
+ required:
7490
+ - modelPath
7491
+ - sourceName
7492
+ properties:
7493
+ modelPath:
7494
+ type: string
7495
+ sourceName:
7496
+ type: string
7497
+
7498
+ EntityGate:
7499
+ type: object
7500
+ readOnly: true
7501
+ required:
7502
+ - expression
7503
+ - givenNames
7504
+ properties:
7505
+ expression:
7506
+ type: string
7507
+ givenNames:
7508
+ type: array
7509
+ items:
7510
+ type: string
7511
+ description: The `$NAME` givens the expression references.
7512
+ route:
7513
+ type: string
7514
+ description: "`authorize` or `access_filter`."
7515
+ terms:
7516
+ type: array
7517
+ description: >-
7518
+ On an `access_filter` gate, its `field <op> $GIVEN` terms, present
7519
+ only when the source's whole row filter reduces to such terms on
7520
+ queryable fields.
7521
+ items:
7522
+ $ref: "#/components/schemas/EntityGateTerm"
7523
+
7524
+ EntityGateTerm:
7525
+ type: object
7526
+ readOnly: true
7527
+ required:
7528
+ - fieldPath
7529
+ - given
7530
+ - op
7531
+ properties:
7532
+ fieldPath:
7533
+ type: string
7534
+ given:
7535
+ type: string
7536
+ op:
7537
+ type: string
7538
+ description: "`=` or `in`."
7539
+
7540
+ SourceSchema:
7541
+ type: object
7542
+ readOnly: true
7543
+ required:
7544
+ - name
7545
+ - annotations
7546
+ - fields
7547
+ properties:
7548
+ name:
7549
+ type: string
7550
+ annotations:
7551
+ type: array
7552
+ items:
7553
+ type: string
7554
+ description: The annotations declared on the source itself.
7555
+ fields:
7556
+ type: array
7557
+ items:
7558
+ $ref: "#/components/schemas/SourceSchemaField"
7559
+
7560
+ SourceSchemaField:
7561
+ type: object
7562
+ readOnly: true
7563
+ required:
7564
+ - kind
7565
+ - name
7566
+ properties:
7567
+ kind:
7568
+ type: string
7569
+ description: >-
7570
+ One of `dimension`, `column`, `measure`, `view` or `join`; a later
7571
+ release may add one.
7572
+ name:
7573
+ type: string
7574
+ type:
7575
+ type: string
7576
+ annotations:
7577
+ type: array
7578
+ items:
7579
+ type: string
7580
+ fields:
7581
+ type: array
7582
+ description: A join's or a view's own fields.
7583
+ items:
7584
+ $ref: "#/components/schemas/SourceSchemaField"
7585
+
6754
7586
  Given:
6755
7587
  type: object
6756
7588
  description: |