Skip to main content

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​

FileWhat it isVersionHeld by
schema/wire.jsonThe 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 frameinfo.version, routes::API (engine/crates/taji/src/wire/routes.rs)api_moves_with_the_wire
schema/taji.jsonThe plugin contract: the manifest, the messages of taji-plugin/1 and the Frame* messagesversion, 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.

ChangeRequestAnswer
A route, product, word, frame, member or $defs entry addedadditiveadditive
One removed, or a member renamed (a removal and an addition)breakingbreaking
A member's type changedbreakingbreaking
A member becoming required, or added requiredbreakingadditive
A required member becoming optionaladditivebreaking
A member gaining null in its type, or a new anyOf / oneOf branchadditivebreaking
A member losing nullbreakingadditive
An enum value (a word's value included) addedadditiveadditive
An enum value removedbreakingadditive
A member set deprecated: trueadditiveadditive
A bound, format, pattern or $ref changedbreakingbreaking
A route's x-taji.scopes narrowedbreakingbreaking
A route's x-taji.gate or x-taji.effect changed or removedbreakingbreaking

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 fileIts version
BreakingThe minor is raised in the same change (0.15 to 0.16); the push is refused otherwise
AdditiveUnchanged; 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 Code holds the set, and GET /read/routes lists each route's codes, but wire.json does 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 its description, which is not compared.