Schema versioning
Section titled “Schema versioning”Every package manifest carries a schemaVersion — the version of the package format, deliberately decoupled from the version of the platform that wrote it. This page documents which versions exist, which ones an importer accepts, the three distinct version checks that run at validation, and what a package producer should write. The format itself is documented in The package format. The packaging engine this contract belongs to shipped in the 1.8 line (Since 1.8); on an older deployment these endpoints and the export UI are absent.
The supported versions
Section titled “The supported versions”The authority is a closed allow-list:
export const SUPPORTED_SCHEMA_VERSIONS = ['1.0', '1.1', '1.2', '1.3', '1.4'] as const;1.2, 1.3 and 1.4 are all Since 1.10. A pre-1.10 deployment (1.8 or earlier) still has the two-item allow-list ['1.0', '1.1'] and rejects a package declaring any of the three. That version gap is the subject of What 1.2 adds and What 1.3 and 1.4 add, and it is why a package declares a newer version only when it has to: an export produced on 1.10+ still needs to import cleanly into an environment that has not yet upgraded past 1.8.
The writer side is pickSchemaVersion, which returns the lowest version that describes the package’s actual contents — 1.4 when it carries a README, else 1.3 when it carries a package block, else 1.2 when it carries the mapped-field sidecar, else 1.1. Constants.SCHEMA_VERSION = '1.4' is the highest version the service can produce; a unit test asserts it also appears in the allow-list, so the service can never reject its own exports. A plain export carries neither a README nor a package block (POST /v1/export takes no README Since 1.10), so it is always 1.1 or 1.2; 1.3 and 1.4 come from published package versions.
| Version | Status | What it is |
|---|---|---|
1.0 | accepted | The original layout |
1.1 | accepted — and still what export stamps on a package with no mapped fields, no package block and no README | Adds the source-identity manifest fields |
1.2 Since 1.10 | accepted from 1.10 onward; rejected on a pre-1.10 deployment | Adds the field-mapping-hints.json sidecar; stamped only by a package that carries it |
1.3 Since 1.10 | accepted from 1.10 onward; rejected on a pre-1.10 deployment | Adds the package manifest block, hashes.json and package-references.json; stamped only by a published package version |
1.4 Since 1.10 | accepted from 1.10 onward; rejected on a pre-1.10 deployment | Adds README.md and readme/; stamped by any package that carries a README — in practice a published version with one |
| anything else | rejected | Blocking INCOMPATIBLE_SCHEMA at validation |
Note that this is an allow-list, not a range check: a hand-authored manifest claiming an unlisted version is rejected exactly like one claiming 0.9, even though it may look “newer”. The strict package validator also requires schemaVersion to be a string — a bare number in the JSON fails the manifest shape check with a SCHEMA_VIOLATION before version comparison even happens.
What 1.2 adds Since 1.10
Section titled “What 1.2 adds Since 1.10”Since 1.10.
1.2shipped on the development line that became release 1.10. On a pre-1.10 deployment the allow-list is still['1.0', '1.1'], and a package that declares1.2is refused there with a blockingINCOMPATIBLE_SCHEMA.
1.2 adds the field-mapping-hints.json sidecar — one new optional top-level ZIP entry, and nothing else. It lets import resolve a mapped field’s sourceFieldId by name when the parent entity’s own snapshot is not in the package. No resource payload gained a property and no manifest field was added or removed; the entry itself is specified in the package format.
The version is declared conditionally — only by a package that actually carries the sidecar (buildPackageManifest via pickSchemaVersion). The rule is declare the lowest version that describes this package’s actual contents: 1.2 when the sidecar it just built is non-empty (and there is no package block or README), 1.1 otherwise.
That conditionality is the whole design, because schemaVersion gates in both directions:
| Package | Target | Outcome |
|---|---|---|
1.0 or 1.1 | a 1.2-capable environment | Accepted unchanged. There is no sidecar to read, so a mapped field’s source name falls back to the parent entity’s in-package snapshot — exactly the pre-1.2 behaviour. |
1.2 — it carries the sidecar | a pre-1.2 environment, i.e. anything on 1.8 or earlier | Refused outright. Blocking INCOMPATIBLE_SCHEMA, canProceed: false, before any target-space lookup runs. |
any package with no mapped fields, exported by a 1.2-capable environment | anything | Stamped 1.1, so it still imports into a pre-1.2 environment exactly as before. |
1.2 | a 1.2-capable environment | Full round trip: the sidecar travels, and a mapped field resolves by name even when its parent entity is not in the package. |
Declaring 1.2 unconditionally would strand every export — including the majority that contain no mapped fields at all — on any environment not yet upgraded. That is row three, and it is the reason the choice is made per package.
For a package that does carry the sidecar, row two’s rejection is correct and unavoidable rather than a gap: without the declaration, validatePackageStrict on the older service would fail the same package anyway, with an opaque UNKNOWN_ENTRY on the unrecognised top-level entry. INCOMPATIBLE_SCHEMA at least says why.
The operator rule that follows: upgrade the target environment before the source. A source already on 1.2 can keep shipping to an older target for as long as its packages happen to carry no mapped fields — but nothing on the target side can force that, and the moment one mapped field enters a package the export becomes unimportable there. Upgrading targets first is the only ordering that is never blocked.
What 1.3 and 1.4 add Since 1.10
Section titled “What 1.3 and 1.4 add Since 1.10”Both versions belong to published package versions and the in-app store, and both follow the same conditional rule as 1.2.
1.3adds the optionalpackagemanifest block plus two top-level entries,hashes.jsonandpackage-references.json. Only a published package version declares it; a plain export never carries apackageblock. On import, the block is what turns the session into an install.1.4addsREADME.mdand thereadme/image folder, withmanifest.readmepointing at them. Any package that carries a README declares1.4. Only a published version is written with one: a plainPOST /v1/exporttakes no README (it has noreadmefield), though an importer still reads a README it finds in a hand-built file.
The entries are specified in the package format. As with 1.2, a pre-1.10 target refuses these packages outright with a blocking INCOMPATIBLE_SCHEMA; without the declaration it would fail them anyway on the unknown top-level entries.
The same validation step applies one more gate to versioned files: a package block whose id is not a valid pkg_ id — a file published before package ids existed — is refused with 422 PACKAGE_FORMAT_OUTDATED, and the file must be exported again from its environment. This is not a schemaVersion check: such a file may well declare a supported version.
What 1.1 adds
Section titled “What 1.1 adds”Two optional manifest fields: sourceEnvironmentId and sourceSpaceId. Together with the target space they form the key of a persisted mapping profile — the memory of how a previous import from the same source resolved users, groups and org-units. The stored-profile lookup returns early when either field is absent (resolveStoredMappingProfiles).
The consequence is graceful, not fatal: a 1.0 package imports fine, but no stored principal mapping is ever pre-filled for it — every principal falls back to natural-key matching, and remembered decisions from earlier imports do not apply.
Three version checks, three severities
Section titled “Three version checks, three severities”Validation runs three independent version checks, and they are not equally serious.
The package format: schemaVersion
Section titled “The package format: schemaVersion”Blocking. An unsupported value produces the INCOMPATIBLE_SCHEMA error and validation returns early — no resource classification, no target-space lookups. The session is still created so the failure is inspectable, but it lands directly in failed with an empty resource report and canProceed: false.
The source release: sourceVersion
Section titled “The source release: sourceVersion”A warning, in one direction only. The manifest’s informational sourceVersion records the platform release that exported the package. When it is newer than the importing environment, validation attaches the non-blocking NEWER_SOURCE_VERSION warning — the package may reference capabilities the older environment lacks. The comparison is major.minor.patch only; prerelease tags are ignored, and an unparseable version simply produces no warning. A package older than the environment raises nothing at all — that is the supported direction.
The per-resource contract: specificationVersion
Section titled “The per-resource contract: specificationVersion”A warning per resource. Each packaged resource payload may carry its own specificationVersion; a missing value is treated as 1. Every resource parser declares the spec versions it supports, and today every parser supports exactly [1] (the shared default, overridden by none). A resource claiming another version gets an UNSUPPORTED_SPEC_VERSION warning naming the resource — validation proceeds, and the resource may still fail at execution.
The compatibility matrix
Section titled “The compatibility matrix”| Package says | Importer’s verdict | Effect |
|---|---|---|
schemaVersion: "1.4" Since 1.10 | accepted from 1.10 onward; blocked on a pre-1.10 deployment | The README is validated and kept with the import record |
schemaVersion: "1.3" Since 1.10 | accepted from 1.10 onward; blocked on a pre-1.10 deployment | The package block makes the import an install |
schemaVersion: "1.2" Since 1.10 | accepted from 1.10 onward; blocked on a pre-1.10 deployment | The sidecar is read, so a mapped field resolves by name without its parent’s snapshot |
schemaVersion: "1.1" | accepted | Full behaviour, including stored mapping-profile reuse |
schemaVersion: "1.0" | accepted | Imports; mapping profiles never match — principals resolve by natural key only |
schemaVersion: anything else | blocked | INCOMPATIBLE_SCHEMA; session created in failed, canProceed: false |
sourceVersion newer than the environment | warning | NEWER_SOURCE_VERSION; import proceeds at your own risk |
sourceVersion older, equal, or absent | silent | The supported direction |
a resource’s specificationVersion ≠ 1 | warning | UNSUPPORTED_SPEC_VERSION on that resource |
a package block with a pre-package-id id Since 1.10 | blocked | 422 PACKAGE_FORMAT_OUTDATED; export the file again |
Forward migration
Section titled “Forward migration”There is no migration step, and no upgrade transform anywhere: nothing rewrites a package from one schemaVersion to another, on import or on export. A 1.0 package is read as-is, and everything 1.1 to 1.4 added is optional. Absence degrades a feature — profile reuse at 1.1, name-based mapped-field resolution at 1.2, install mode at 1.3, the README at 1.4 — rather than failing the import, which is the design intent recorded at the allow-list itself: every listed version is accepted “so older packages keep importing unchanged”. Format versioning is thus one-directional: environments move forward, packages stay importable.
For a producer the guidance is short:
- Stamp the lowest version that describes what you actually wrote. Omit
field-mapping-hints.jsonand stamp"1.1"; include the sidecar and stamp"1.2"; include a README and stamp"1.4". Stamping a newer version than your contents need gains nothing and locks the package out of every environment that has not been upgraded. - Do not hand-write a
packageblock. A1.3package is a published version: its hashes, root hash and cross-package references are computed by the publishing environment, and an install validates them. Publish from the Packages area instead. - Include
sourceEnvironmentIdandsourceSpaceIdif imports from your pipeline should benefit from remembered principal mappings. - Never invent a higher version to signal “newer content”. The release that exported the resources belongs in
sourceVersion;schemaVersiondescribes only the container layout, and an unknown value blocks the import outright.
Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27