Version compatibility
Identify the API, CanvasDocument, Design Lab, saved-design and Lottie version numbers, and migrate older source without losing newer state.
Glyphfield versions each boundary on its own. The HTTP envelope version, the portable canvas schema, the Design Lab metadata version, the generated compatibility document and the third-party Lottie version are separate numbers, and one does not replace another.

Current versions
| Boundary | Current version | Compatibility behavior | Where to read it |
|---|---|---|---|
| Agent manifest | schemaVersion: 3 (agent API version 0.3.0) | Stop when the version is one your client does not know | GET /api/agent |
| Generation contract | schemaVersion: 3 | Describes the request schema for POST /api/generate | GET /api/generate |
| Discovery catalogs | /api/labs and /api/identities are schemaVersion: 2. /api/materials and /api/elements are schemaVersion: 1 | Stop when the version is one your client does not know | Each route's response |
POST /api/generate response envelope | schemaVersion: 1 | The envelope is not a CanvasDocument | GET /api/generate and /openapi.json |
| CanvasDocument | schemaVersion: 2 | A valid schema 1 document migrates to schema 2. Other versions are rejected | readSource() after applying |
| Design Lab metadata | sourceVersion: 4 | Parsed inside the CanvasDocument metadata | The active Design Lab source |
| Expression tool metadata | metadata.studio.sourceVersion: 2 | Version-1 flat states migrate. A newer version is rejected | OpenGraph, Terminal card, Partnership lockup, Blog cover and Slide templates source |
| Generated Design Lab sequence document | version: 3 | Apply-ready compatibility input that application normalizes into the current CanvasDocument | The document of a design-sequence response |
| Saved-design database | IndexedDB database version 1 | Moves valid older localStorage saves into IndexedDB. It is not a public interchange format | Glyphfield's persistence layer |
| Lottie | The file's own v, fr, ip and op | Player support depends on the animation's features and the browser | The imported JSON or .lottie file |
Do not compare these values as if a higher number replaced a lower one. CanvasDocument schema 2 contains Design Lab source version 4, and both are current.
Compatibility rules
- Discover live contracts. Read the relevant route or the active Studio tool's Browser API instead of trusting an old sample.
- Migrate through the tool that owns the source. Apply source with
applySource()so the tool validator performs any supported normalization. - Reject unknown versions. Do not guess how to read a future schema.
- Keep data you do not own. Start from the current source, keep stable IDs and unknown metadata, and change the smallest field that does the job.
CanvasDocument migration
The canvas parser accepts schema 2 and migrates a valid schema 1 document. The migration creates schema 2 asset records from the old asset and font ID lists, adds empty element data where it is missing, and records migratedFromSchemaVersion: 1 in the metadata. Any other schema version fails with Canvas schema version <n> is unsupported.
After applying an older document, read and store the normalized result right away:
const studio = window.glyphfield.studio;
const imported = JSON.parse(legacySource);
await studio.applySource(imported);
const normalized = JSON.parse(studio.readSource());
if (normalized.schemaVersion !== 2) {
throw new Error('Glyphfield did not return the current canvas schema.');
}
// Store `normalized` instead of the older input.Migration does not create missing binary files. A migrated asset record without embedded bytes still needs the original authorized image or font before the document is portable.
Generated sequence compatibility
kind: "design-sequence" returns a short version-3 document inside a response-schema-1 envelope. The document is built to create a composition. It does not carry every field of the current canvas scene graph.
To use it:
- Read
GET /api/generateand build a valid request. - Confirm that the response envelope has
schemaVersion: 1. - Apply
response.documentto the active Design Lab workspace. - Read the normalized CanvasDocument.
- Make later edits against that current document.
Stop editing the version-3 input once it has been applied, because it cannot hold the newer fields that the Studio adds.
Unknown and future versions
Stop when any of these occurs:
- A discovery or generation envelope has a
schemaVersionyour client does not know. - A CanvasDocument schema is newer than the parser supports.
- The active tool does not report the expected source format in
describe().capabilities.source. - A Lottie source has no numeric frame rate (
fr) or nolayersarray.
Keep the original bytes, record the Glyphfield commit or deployed version, and open the source in a compatible or newer release. Do not remove version fields to force acceptance.
Checklist for schema changes
A change to a source format should update:
- The serializer, parser, validation and migration code.
- The Browser API
describe()metadata and action behavior. - The HTTP request and response schemas when the deterministic API is affected.
/api/agent,/openapi.json,/llms.txtand the processed Markdown docs.- Round-trip, persistence, old-version migration and malformed-input tests.
- A visual restore and export check with a realistic saved document.
Source format reference, Backup and restore and Studio Browser API cover the formats and the API in detail.
Capability matrix
Compare what each Studio tool offers, with its JSON source document, Browser API actions, export formats and HTTP generation routes, in one table.
Social previews
Glyphfield renders PNG preview cards for the home page, the Studio and every docs page, and serves them to social crawlers without cookies or JavaScript.