bijection client <lang> writes a typed client package for the app in Go,
Java, Kotlin, Python or Swift. Each package is built on its language’s runtime
SDK and offers what the TypeScript client offers, with
the same meanings: connect pinned to the app contract, query, watch,
mutate with once, trial, the frames as, under, in and at,
seen and version, and one Result.
Every command takes
--out <dir> and --package-version, and refuses when the
committed bijection.lock is stale. A generated package embeds the lock’s
contract line, so an installation whose contract differs refuses its calls
Conflict (ContractStale).
For a language without a generated client, write the interface document and
call the app over HTTP:
bijection client json writes bijection.interface/v1: for each exposed
function, its arguments and value as portable value types. A function whose
types have no portable form is listed under unresolved, with the reason.
Calling a function
Every call is onePOST /api/world/function with a JSON body:
Send the caller’s token as
Authorization: Bearer <token>. A successful call
answers its value, and a mutation its commit version. A refusal answers
{ code, message, guard? }, with the same codes as the
TypeScript client’s Result. POST /api/trial
takes the same body and answers { result, writes, tasks, validUntil },
committing nothing; validUntil is the instant the answer is valid until, or
null. Live queries use POST /api/world/function/watch with the query body and an SSE response.
A fresh head watch may first send a resume event. Send its data back as the
body’s resume field, without seen, to reopen the watch exactly at its
original cut; a refusal before the first value means reopen fresh.
The generated runtimes all follow one written wire,
sdks/application/contract/client.json, and run one set of cases,
sdks/application/checks/client_cases.json. The
HTTP application API gives the routes, the
value encoding and the status codes.