Compatibility
Source of truth: schema/wire.json and schema/taji.json, classified change by change by the API check .githooks/pre-push runs on every push; api_moves_with_the_wire (engine/crates/taji/src/wire/fixture.rs) and api_moves_with_the_schema (engine/crates/taji-plugin/tests/schema.rs) hold each file to its version. Taji's API is those two files; this page says which changes to them break a client and how the versions move.
The two files
| File | What it is | Version | Held by |
|---|---|---|---|
schema/wire.json | The wire as an OpenAPI 3.1 document: every route a token opens with its scopes, query words, body and answers, every data product and word, every socket frame | info.version, routes::API (engine/crates/taji/src/wire/routes.rs) | api_moves_with_the_wire |
schema/taji.json | The plugin contract: the manifest, the messages of taji-plugin/1 and the Frame* messages | version, taji_plugin::API (engine/crates/taji-plugin/src/lib.rs) | api_moves_with_the_schema |
A running kernel serves its own wire.json at GET /read/openapi: one operation per row of GET /read/routes, then the rows its enabled plugins add. It names the wire's version as api in GET /read/routes; that answer's version is the kernel's release, not the wire's.
curl -s -H "x-taji-token: $(cat "$TAJI_STATE_DIR/wire-token")" "http://127.0.0.1:$(cat "$TAJI_STATE_DIR/wire-port")/read/routes" | jq -r .api
wire.json omits the routes no token opens (POST /app/token and the phone's door, POST /verb/remote/pair/options, /pair and /challenge), and a sub-form a row's header spells inside another's has no operation of its own (GET /read/catalog/<definition> is spelled in the row of GET /read/catalog). A client does not generate either.
What a client tolerates
None of these is a breaking change:
- A member it does not know in an answer or a frame, and members in any order.
- A value it does not know where the schema lists an
enum. - A route, product, word or frame it does not know.
What breaks a client
The check reads each change on the side it touches. A request is a route's parameters and requestBody, a word, a socket's client frames, and the schemas only those reach; an answer is a route's responses, a node, a field, a socket's kernel frames, and the schemas only those reach. A schema both reach is read on both sides, and taji.json is always read on both.
| Change | Request | Answer |
|---|---|---|
A route, product, word, frame, member or $defs entry added | additive | additive |
| One removed, or a member renamed (a removal and an addition) | breaking | breaking |
A member's type changed | breaking | breaking |
A member becoming required, or added required | breaking | additive |
A required member becoming optional | additive | breaking |
A member gaining null in its type, or a new anyOf / oneOf branch | additive | breaking |
A member losing null | breaking | additive |
An enum value (a word's value included) added | additive | additive |
An enum value removed | breaking | additive |
A member set deprecated: true | additive | additive |
A bound, format, pattern or $ref changed | breaking | breaking |
A route's x-taji.scopes narrowed | breaking | breaking |
A route's x-taji.gate or x-taji.effect changed or removed | breaking | breaking |
description, summary, title and example are not compared: prose may change in any release. A refusal's error is a value of schema Code; its reason is prose for a person and is in no schema.
A body member the kernel does not know is refused 400 bad_ask, so a client sends only what the schema names.
The versions
| Change in a file | Its version |
|---|---|
| Breaking | The minor is raised in the same change (0.15 to 0.16); the push is refused otherwise |
| Additive | Unchanged; the pinned hash in the test above moves |
While a version is 0.x a breaking change may land in any release, and two kernels that name the same 0.N differ only by additions.
From 1.0 nothing is promised yet: the check refuses every breaking change once a version's major is 1, until its rules exist.
The SDKs
@taji/plugin (private) and the taji-plugin crate (publish = false) are not published; with the Python module taji (packages/taji-py) they come from this repository. While taji.json's version is 0.x, a name in an SDK can be renamed or removed in any release with no version change; only the two files under schema/ are held to the rules above. packages/plugin/entries.test.ts lists the names an installed pane's frame imports, so a change to them shows in review.
Not yet recorded
These can change with no version change:
- Which route answers which refusal code:
schema Codeholds the set, andGET /read/routeslists each route's codes, butwire.jsondoes not. - A query word's accepted spellings beyond its type and its
enum(a date's forms, a symbol list's syntax): they are in itsdescription, which is not compared.