Skip to main content
sys, from @bijectionhq/bijection, holds the host’s own tables. They are read with the same five reads and addresses as an app’s tables, and they are read-only to the six writes: a write to a sys table is a type error. Each changes only through its grave acts, which bijection check lists per function. The kernel lowers each act to an existing host verb. An app selection binds the declaration that its rows describe in the index prefix. For example, grants bind a label and a holder or parent, tasks a target, and logs a site. An unbounded or out-of-reach selection refuses with GrantRequired. A principal’s own identity binding and sessions are read under the principal’s own member, and they take the same site reach as any relation: the root app’s functions reach them as they reach sys.installation, and a mounted component does not. A table’s writers gives a site no read reach. A task’s lifecycle state is pending, blocked or settled. A task is blocked when the grants recorded at submit are no longer live when it is claimed. survivors holds the ids of the submitter’s surviving grants at submit, per position (credential, actor, code): a claim decides only through those that are still live. replyTo is where the claim may write, fixed at submit, and claim is the claim record (claimant and instant) that consumed the task; a second claim refuses. A settled task carries its Result. A read below the task’s run label can see withheld, which describes visibility. A grant’s id and parent are { label, key }. The opaque key names the original issuance, and parent is the grant it was issued from. holder is { kind, id }: a principal, a class (anyone or signedIn) or an invitation bearer (the token’s digest). rights lists its { verb, object, scope } rights. roleChain is its role’s path, then the roles of the grants above it: the grant binds the role by name, so a release that replaces the role keeps it. label is where the grant is observed, and expiresAtMs its end (null until revoked). A grant lives only while its parent lives. Revoking a grant is a later assertion of the same grant that expires at the revoking instant; nothing is retracted. A grant carries no other attribute: a session’s or an installation key’s details live in the platform’s sessions and keys records, keyed by the grant’s id. Pass a where selection to ctx.revoke to revoke the visible grants it names in one bounded append. Identities are grants too. Trusting an issuer issues a grant to the issuer that carries attest for it. Each identity that signs in through the issuer is bound to its principal by a grant under that trust, which carries speak for the principal, and each session is a grant under the binding, held by the session’s credential (credential:<id>). Revoking the trust ends every binding and session under it, and revoking a binding ends its sessions (see Authenticate callers). Service keys, export secrets and development keys speak for their principals the same way, through grants held by their credentials (see Installation credentials). A member of a dynamic label family holds its own accounts only once registered. ctx.register(family) registers one: the host mints a random, opaque tag <family>:<id> (32 lowercase hex) and answers it. An admitted retry of the same act occurrence returns its retained receipt’s original tag, including after erasure.
  • Founding needs the register right for the family from both the caller’s and the code’s grants (Found a family member). It runs at the public label, registers the member in its own step and charges the public members account. Past the family’s members: n it refuses Limit (MemberEntitlementExhausted). Your plan’s member place capacity is a host-only shared limit: it reveals no member count. Each returned judgement records sys.disclosures at the asking label and the release’s source label.
  • The member’s place is funded with the family’s quotas.
  • A family declared keyed: true takes ctx.register(family, { key }). The tag is still random; a keyed index at the family’s stem finds it, and erasing the member deletes the index entry. A fresh registration of a taken key refuses Exists. A fresh registration can reuse an erased member’s key and receives a new opaque tag.
sys.members is keyed by the member’s tag, and family is the family declaration. For a current keyed member, read ctx.get(sys.members({ family, key })) in the live world. The point answers { id, family, key } when the member is live and null when the key is absent. The keyed lookup can refuse while the index is rebuilding. See Family tables. ctx.retire(tag) retires a live member and answers its point. It refuses Absent if the member is missing or already retired. The family recovers its slot at the retirement horizon. Retiring from above the public label takes a declared release. sys.organizationRegistry is the platform’s fact, and no app act writes it. The organization registry is one fact, the installation’s own, and sys.organizationRegistry is itself its point: ctx.get(sys.organizationRegistry) reads it, with no key, and answers null until management delivers a registry. Its id is the installation, and it holds the generation and the verified registry that management delivered. sys.programs(program) reads the first deployment of the content-addressed Program. The public fact gives its id, publication time and previous Program. Reads that clear the operator label sys.host also return the deployer and push message. Change reactions receive the public fields. ctx.get(sys.programs.current) answers { id, program } for the program installed in the frame’s world at its version. A branch reads its candidate, or the program installed at its fork. Use sys.programs.current.in(world) to select a world explicitly. Both fields carry the same program:<64 hex> reference. A live read joins the read set for that world, so a deploy into the same world can conflict with a mutation that read it. sys.logs holds every execution’s log lines (console.debug, info, log, warn and error), committed or refused, as labelled facts. Each line carries its execution’s label, so a frame reads only the lines its label clears. stream is "app" for application executions, or an audit stream such as "sys.sessions" or "sys.recovery". In app code, select a site with sys.logs.where({ site: "orders.place" }).by("version"). execution names the run, line orders its lines, function is the full tree path that ran, code is the refusal code it ended with (null when it ended ok), reason is that refusal’s reason (when it has one), and version is the line’s commit-order cursor. Read the newest lines for one site with ctx.list(sys.logs.where({ site: "orders.place" }).by("at").descending().first(50)). Lines are kept for 14 days. on holds the triggering task, obligation, source or branch point. Direct calls have on: null. An operator’s direct read can select logs by their triggering task. bijection list sys.logs reads the same table. Execution measurements leave the host through telemetry. See Monitoring and profiling. sys.grantTransitions records each grant’s append-only audit chain at the grant’s label: its issue, then at most one revoke, each entry carrying its predecessor’s digest, who acted (as), the person they acted for (asFor), the call chain and the survivors that admitted the act. Read one grant’s chain in order with ctx.list(sys.grantTransitions.where({ grant })). Each committed transition carries its commit instant (at) and an audit cursor (version) that combines the commit position and transition id. The platform’s telemetry export uses ctx.page(sys.grantTransitions.by("version"), { size, cursor }) to read the transitions its frame clears in commit order. It ships them through the installation’s telemetry slot. sys.logs also holds the host’s span of each top-level mutation run, as the sys.traces stream. Only a read of that stream shows them (sys.logs.where({ stream: "sys.traces" })), and the telemetry export sends them as OTLP traces. Operator read acts (POST /api/world/act, CLI bijection list / page / get) use the same catalog. The operator’s inventory includes secret metadata, completed landings, and program rollout history.
A where on target takes the target value itself. A task is also the point of its own state: ctx.get(task) reads a TaskState, by state: { state: "pending", target, due, until, claim }, { state: "blocked", target, reason, since, due, until }, { state: "settled", target, result }, or { state: "withheld" } when the task runs under a label your function does not clear. When a settled reply closes, its task remains settled and result reads as null. Reading a sys fact joins the read set like any read: a mutation that read a grant conflicts with a revocation of it. A rule about who holds what, such as separation of duties, is a guard that reads sys.grants: see Guards.

Disclosure chain coverage

Release records and the asker-side records of shared judgements form a hash chain at each exact label in a world. sequence is a decimal string starting at one. previous is the preceding digest or null at the start. digest commits to the stored record and its predecessor. A branch extends the chain it sees at its fork. A landing links its covered records into the Root chain in its own append. The same ordered decision records the source-side copy of a shared bound or cross-cover unique judgement, including a refusal. The source copy is a blind append at from with atSource: true and omits sequence, previous and digest. It carries the release, endpoints, acting principal, time and judgement. A chain check against a trusted head covers the linked rows through that head. A complete census of source-side rows would require separate evidence at the source label and an exact Store position. ctx.get, ctx.list, and ctx.page decode the visible records of the requested selection. The remote SDK client decodes application replies without checking disclosure hashes or verifying the source census. An app selection must bind the release and the frame must be able to read the records’ labels. A page cursor continues that selection. Fetching its last page gives no source census attestation.

Host functions

sys also holds one group of functions the host serves itself. You enter them with ctx.call, or with ctx.try to get a refusal back as a Result. They take no { in, at }, and you never place them in an app: Apps use the library, which adds lease bounds and named types on top of these functions. Kept decisions need no host function: @bijectionhq/library-decisions records each one as a fact of its own table and judges it by replay.

Files

sys.files is the host’s file inventory. Select from it to list stored files or call sys.files(id) to recover the point from a raw key. Use ctx.get(file) for its metadata and ctx.get(file.bytes) for its bytes. See Files.

The grave acts

The act verbs are described with the functions that use them: grants, tasks, branches and landing, pins, disclosures and erasure. Each then creates a sys.obligations fact with its task, name, state, attempts and since. States are waiting, due, stuck, delivered, withdrawn and disposed. A stuck obligation carries a Refusal. A withdrawn obligation carries the supplied message. A disposed obligation carries a DisposeReason, such as MemberErased. The terminal states are delivered, withdrawn and disposed. Read the fact at its delivery label. Use bijection list sys.obligations --where state=stuck --first 50 to find obligations that need intervention.