One SDK contract across execution contexts
Resolve a name once, then retain its exact generation reference. Opening that reference is local and every use rechecks the original generation and access.query returns the application value in live, branch and snapshot contexts.
queryWithBasis returns { value, basis } for comparisons and evidence.
Ordinary commands throw RequestUnconfirmed with requestRef after a lost
reply. Explicit request handles also expose uncertainty in their observation
state. Reopening or observing a request never creates a replacement intention.
SDK composition uses requestId, expectedVersion, approvalContract,
retainFor and timeoutMs. Retired spellings are refused. Native records and
serialized references retain their own schema; CLI JSON uses snake_case.
review.watch() and useReview subscribe to a native query over the client’s
shared Convex sync connection. Identical Review subscriptions share the same
query. Assessment completion, approvals, acceptance, external execution and
current access invalidate their actual database dependencies. Evidence expiry
also wakes the query without a database write. There is no inspection polling.
Capture, submit and review
Application clients use the existing private request journal. In Node, configurerequestStore: fileRequests(directory, { deployment: url, namespace: principal })
from bijection/node. The workspace uses private browser custody. Capture,
submission and approval allocate request identities and retain their exact
bodies before dispatch. Explicit SDK requestId / CLI --request-id remains
available. After an interrupted CLI reply, use its recorded request_ref or
continuation; repeating a command without its original identity starts new work.
revision_id for inspection, review and
application. Retain that returned reference. Capture requires an explicit
selection. --through receipt.json selects a complete ordered prefix ending at
one qualified operation receipt. --intent intent.json selects exact qualified
receipts or an application-authored typed proposal graph. Native transaction
evidence preserves whole commits and refuses omitted dependencies, returning the
required receipt closure for inspection. By default it refuses omitted
dependencies. Explicit dependencies: "include" allows explained prerequisite
expansion. Unknown evidence requires the conservative prefix. Graphs use
declared output references between operations. Assessment never adds later
branch operations.
The review workspaces accept an explicit JSON array of qualified operation
receipts. Capture stays disabled until you select receipts. The saved selection
remains fixed during lost-reply recovery; revising a Change requires another
explicit selection.
Native admission records the exact request and revision ID before preparing the
checkpoint and private source. Pending preparation has a fixed deadline of at
most five minutes. A retry resumes its original source; it never selects later
branch operations. Closed or applied revisions retain the same immutable capture
receipt.
client.changes.inspectCapture(request_id) and
bijection request inspect <request-ref> read the capture as unseen,
preparing, captured or refused, without submitting work. SDK and CLI
recovery can use native custody after losing their local request journal.
Inspect (await change.inspect()).source.explanation to see why operations were
included. requested records the deliberate selection; included records its
same exact admitted history. Default capture refuses omitted dependencies.
Explicit dependencies: "include" adds prerequisites and records their reasons
in the explanation. Dependency entries name an operation and its prerequisite
indices in included, with reasons such as document_read, created_record,
request_outcome or same_transaction. proven_closure uses exact native
evidence. conservative_closure accounts for missing proof, assumed outcomes or
relevant non-operation changes. The explanation survives the working branch and
contains selection metadata, not protected record values. The capture receipt
and CLI JSON include the same explanation. Authored intention graphs return
empty source-history lists; their declared operation dependencies remain in the
proposal content.
change.revise(...) in the SDK or
bijection change revise <revision> in the CLI; both keep the change_id, bind
the exact previous_revision, and close the preceding revision atomically with
admission.
Discover your retained revisions with client.changes.list() or
bijection change list. Each page contains up to eight items and a
next_cursor; pass it as { cursor } or --cursor to continue. Use
{ view: "shared_with_me" } or { view: "needs_my_review" } for a
collaboration inbox; the CLI accepts the same values through --view. Shared
inboxes contain the current revision of each Change. Pagination can return an
empty filtered page with a continuation cursor; continue until that cursor is
absent. Closed history remains readable after source reclamation. The workspace
can open a retained revision from live, without reopening the original working
branch.
Explicit business intent and bounded approvals
Useintent: { kind: "receipts", receipts: [...] } in SDK capture, or pass the
same BusinessIntent to change capture --intent intent.json. A selection that
omits a prerequisite returns a typed boundary with required qualified
receipts and is_complete. Inspect those requirements, then capture the exact
revised selection under a new request ID.
For an application-authored decision, use
intent: { kind: "graph", component: null, content }, where content is the
existing typed proposal graph. Capture is inert; assessment prepares the graph,
and native acceptance applies all its nodes in one transaction. Exploratory
record IDs do not replace declared graph output references.
Exact assessment approval is the default. A finite envelope can authorize one or
more uses among exact assessed choices:
Collaborate without changing intent
client.requests.pending(); client.requests.open(ref) inspects or resumes
one.
Comments and revision metadata belong to the logical Change’s current audience.
change.share() and change.unshare() require the stable request identity and
original collaboration version, just like approval and discussion commands. An
uncertain retry never generates a new identity or refreshes that expected
version. They update only this Change, including its revision history. Other
Changes on the same branch retain their own audiences. Membership survives a new
revision and retirement of the original working branch. Sharing grants no
business read, approval or execution permission. Withdrawing membership
withdraws access to all revisions and invalidates that person’s approval at
application. The author cannot be removed.
Comment authors and the Change author can redact text while retaining its
identity. A revision retains at most 64 comments of 4096 bytes and 128 ordinary
discussion edits. Native edit receipts are stored separately, so expiry and
those limits cannot block permitted redaction or withdrawal of sharing. Each
edit uses the revision’s current discussion version, including sharing changes.
The immutable capture still retains its original title, program, receipts and
digest. Inspection, listing and discussion() return the current presentation
title. Editing discussion never changes an assessment or approval binding. New
executable intent uses
change.revise({ requestId, from, intent: { kind: "prefix", through } }), which
captures a new revision and closes its predecessor atomically. It needs a new
assessment.
Reopen business evidence safely
report: null with an unavailable
reason). It never means that the proposal has no effects. The report retains its
basis, captured program, ordered evaluated arguments and targets, native effect
digest, exclusion counts, and limitations. Inputs use the exact assessed target
identities; trial-created IDs are tentative. Internal validation seals stay
private. Historical content that has changed or lost retention remains
explicitly unavailable; a readable replacement row does not authorize the
original values. A reclaimed assessment returns validity: "unavailable" and
assessment_reclaimed; an accepted receipt remains consumed even when its
report has been reclaimed.
Independent approval binds the exact assessment, current policy epoch, current
reviewer authentication and Change participation. Native admission checks
current business disclosure for a new approval, including clients that bypass
the UI. Retrying the exact saved decision recovers its receipt after expiry or
subsequent state changes; it does not create a new approval. Assess the same
intent again when live data, code or access invalidates its dependencies.
Operational approval routing uses the assessed read/write and external-call
footprint. Map policy sources with exact native keys: table:stock,
component:warehouse/table:stock, or integration:payments. Domains with empty
sources remain mandatory. Missing proof, file effects, or unmapped resources
keep all policy domains required. Program changes retain conservative review of
arbitrary code. Source mappings do not grant business access or prove downstream
provider behavior.
The workspace restores the selected assessment, shows its proposed business
consequences, and refreshes status using read-only requests. Its URL retains the
exact Change and assessment for sharing. Acceptance is a durable local
transition. Status preserves the selected assessment and approval observations
after acceptance, and reads execution through the existing request and
external-call owners. Observation errors are separate from the acceptance
receipt. Pending delivery, required attention, settled incomplete outcomes, and
completed execution have distinct feedback. change.execution() and
bijection change execution are also explicit read-only observations. Any
current Change participant with the required operation and source-disclosure
authority can observe them; sharing supplies neither permission.
Uncertain captures do not block navigation. Interrupted requests opens the
SDK’s private journal, independently of the currently selected Change or working
branch. Inspection never resumes a request. Resumption explicitly submits its
original identity and content, including when inspection says unseen after an
uncertain submission. The incoming URL selects the exact revision and
assessment.
Discussion comments remain revision-specific. The returned discussion version
fences collaboration across the whole logical Change, including revisions and
membership; an edit through historical discussion cannot overwrite a newer
membership decision.
Select an evaluated Plan
A Plan declares business intent, constraints and alternative captured Changes. Its draft is local. Selecting a candidate captures a new Change revision with the exact choice, rationale and retained evaluation references. Assess and review that new revision against live before applying it. Declare a typed evaluation query withdefinePlan from bijection/server:
revision_id and intent_digest
together with the same intent and constraints. The checkpoint preserves the
producing code, input, query basis and any preceding computation. External
compute uses the existing computation integration.
client.plans.inspect(selected.ref) returns decision metadata. Read protected
results separately with client.runs.readEvidence(reference), which checks
current disclosure. Its basis.application retains the producing state,
program, input-manifest identity and assumption-set identity after the
exploratory run retires. These identities do not extend retention or authorize
disclosure. Native revision consistency leaves external provider snapshot
consistency explicitly unproven.
Intent, constraints and rationale are shared Change metadata; keep protected
result values in their checkpoint. The workspace displays the decision and
offers an explicit authorized evidence read. The CLI accepts the native decision
JSON through
bijection change capture <branch> --request-id <id> --plan plan.json.
Coordinate Changes with a live procedure
UsedefineLiveProcedure from bijection/scenarios to wait for review, apply a
Change and observe its external responsibilities. Register the definition in
your application’s procedures map. It uses the existing durable run journal,
compiler and worker.
waitReview waits for current independent consent
without approving on anyone’s behalf. Optional approvalContract selection is
retained with each review/apply instruction and cannot change during recovery.
waitExecution requires confirmed completion of every accepted request. Unknown
or attention states keep waiting; partial or unsuccessful outcomes fail the
step.
Submit operations as durable steps
A live procedure can submit declared operations itself. Each named step owns one stable request identity, so a restart recovers its original acceptance or refusal instead of submitting again. Declaredinputs are supplied with the
run’s input and read durably with ctx.input. ctx.waitFor waits until the
accepted request’s external effects are confirmed complete.
OperationReviewRequired in
bijection run inspect). Approve that proposal through the ordinary proposal
commands; the step then submits it. An expired or refused proposal fails the
step. A refused operation throws a catchable ScenarioRefusal. Settled
unsuccessful external work fails a wait; compensation is another operation.
Live procedures support queries, computation, checks and operation steps. They
cannot inherit a scenario snapshot, simulate writes, advance a modeled clock or
retain a writable output. Each step reads its current live basis; several Change
applications remain separately atomic. No database transaction stays open while
waiting for a person or provider.
Cancellation stops future coordination. Accepted Changes and external work keep
their existing owners; compensation requires another explicitly assessed and
reviewed Change. Recover or resume the original run after an uncertain reply.
Recompute and resample refuse live procedures; new coordination requires an
explicit new start. Evidence defaults to 24 hours and remains bounded by the
original admission deadline. The workspace lists live procedures and opens their
normal run inspector without submitting them.
Author a Change as a typed graph
Build source or capture installed code
A Release freezes executable code.build compiles one exact Git revision on
isolated native state; capture freezes a program already installed on a
branch. Both return the same immutable Release and use the same installation
Review. Neither command installs code on live.
build_source records the Git commit and source_digest; the program’s native
source identity names that same content digest. A branch’s installed program may
come from a different source checkout. Editing or switching Git cannot change an
existing Release. Reusing a build or capture request ID continues its original
inputs; changing those inputs requires a new ID.
In a Node worker, configure the build and deployment capabilities once:
cliReleaseBuilder uses the installed native CLI and its current sign-in. It
retains the CLI’s opaque request handle before dispatching compilation. Its
inspection path reads existing custody and never creates or starts a build.
publishThroughReleaseOwner is the application’s configured deployment
capability, separate from the caller’s business token. Resumption reuses that
capability and rechecks current authority.
Publish application code independently
capabilities: { deployment: publishThroughReleaseOwner } once when
constructing the client. The deployment capability supplies deployment authority
and is reused during request resumption. An operational Change requires its
captured program to be live already. Publish that program, then reassess the
Change. Program approval never approves business adoption.
After an interrupted application response, inspect the same Change or retry
application with the same review ID. Its native receipt survives source
reclamation. Local acceptance does not establish external delivery: the existing
execution owner tracks provider work and confirmation separately.
Coordinate code and business adoption
A live Procedure coordinates independently governed transitions. This example first waits for the release’s independent approval and confirmed publication, then submits a fresh assessment of the already captured business Change. Code approval supplies no business approval.required_action for Review submission or release installation.
run.status(), run.wait() and bijection run inspect only observe it.
Explicit run.resume() or bijection run resume drives that action through the
existing Change/Review owner, then resumes the same native run. Human approval
remains a separate explicit decision. A worker can resume the same run after
approval; unknown acknowledgements retain the original action and request
identity.
Each accepted transition remains independently atomic. If business adoption is
refused, the installed code remains installed. Compensation is another assessed
Change. Cancellation stops future coordination, and cannot undo accepted work.
Inspect and resume an original request
Inspection never submits or advances work. Resumption uses only the retained body, caller and native destination; selecting another context does not change it. The same interface covers operations, branch lifecycle, Change capture, submission, approvals, source builds, scenario execution and release installation. CLIreq_... locators resolve existing private custody in the
current user profile. They carry no credentials and do not replace native
ownership checks. Moving custody between machines is an explicit diagnostic
import, not ordinary navigation.
request_ref before dispatch. Recovery
continuations identify read, exact resumption and new-work effects.
request pending discovers existing custody without dispatching it.
A lost reply from a retained SDK mutation throws RequestUnconfirmed. Its
request_ref opens the exact retained request; a fresh call would be a new
intention:
review.apply() resolves to the acceptance receipt, or reports a refused or
pending application as data.
Typed operation references preserve their original generated result through
client.requests.open(request.request_ref). Generic inspection results identify
their family with kind, so an agent can narrow the observation before reading
its domain fields. Import references from JSON through the shared validator:
What operation acceptance carries
Acceptance reruns the selected business operations against live under the caller’s current permissions. It does not copy branch documents. The reviewed ordered batch commits together or none does, and its results and effects must match the review after typed document identity remapping. Only the caller’s directly invoked eligible operations can be selected. Ordinary mutations, console edits, imports, another user’s work and scheduled work remain private. The report identifies excluded work. Administrator impersonation cannot authorize operation replay. Documents created on the branch receive different live IDs. Native replay rewrites their declaredv.id(...) arguments, results and record keys through
the verified correspondence. It refuses undeclared or ambiguous references,
opaque values hiding created IDs, and incompatible creation counts. Ordinary
strings keep their declared meaning.
A report distinguishes Branch result, Proposed live result and
Accepted live result. Refused or diverged operations stop the reviewed
batch. Skipped operations remain unaccepted. --format json preserves exact
integers, bytes, revisions and evidence when the bounded human display omits
detail.
Each accepted request applies at most once. Retrying a completed review recovers
its receipt even after later batches have applied. Current branch access is
still required. Receipt recovery does not require retained business values or
claim that today’s live installation matches the historical review.
Program publication
A release captures the installed branch program and its source provenance. Local files are not evidence of the running program. Commit and push intended source and letbijection dev install it before capturing publication intent.
Publication installs only the reviewed program through the release owner,
including its application publication lifecycle.
An operational Change cannot publish missing code. Publish a release first, then
assess the original Change against the resulting live installation. Published
code remains live if later operation acceptance fails.
External calls
A branch holds external calls. Simulations may assume outcomes without producing real delivery receipts. Accepting eligible operations asks live to deliver their calls through its ordinary external-effect owner. Local acceptance and external completion remain separate facts. A Change must fit one bounded local acceptance transaction. Assessment refuses a selected batch that needs an external result between its operations; it does not accept an initial part of that batch. Capture the complete prefix through the earlier operation’s receipt as a separate Change, assess and apply it, then wait for its live result before proposing the dependent work. Unknown, refused or superseded outcomes cannot become proof that a real effect completed.Refresh from live
Refresh preserves this branch’s name while bringing in current live data. Use it to repeat the experiment on a newer starting state. Review already evaluates against current live data, so refresh is not a prerequisite for publication. An expired or invalidated review needs another review, not a refresh:- At most 128 remaining operations are replayed together.
- Direct edits, imports and another person’s unapplied work are refused rather than silently dropped. Changed files and environment variables also require their own preservation path and currently refuse refresh.
- A code-only branch with no operations can refresh.
- When an operation cannot be carried, refresh names it with its own code: the
operation’s refusal (such as
INSUFFICIENT_STOCK),ObjectMissing,OperationContractChanged,OperationCodeChangedorEvidenceUnavailable. The SDK throwsBranchRefreshConflictswith one entry per operation inconflicts; the CLI lists them under the refusal and the workspace shows the code beside each step. - Retry the same command after interruption to recover its attempt.
- Use
bijection branch refresh what-if --cancelto cancel preparation and keep the current generation.
Observe a Change after acceptance
bijection change execution <revision> exposes the same read. The workspace’s
Observe execution button refreshes it without applying again. Acceptance and
external completion are separate: unconfirmed delivery, blocked publication and
source refreshes retain their native states. is_complete: false means current
access or retained evidence cannot reveal every request; it does not establish
completion. Observation remains available after the retained Change source ends,
subject to current read and disclosure permissions.
Submission allocates a durable review before assessment. Its reference remains
inspectable when preparing or blocked.
review.wait({ until: "assessed", timeoutMs: 30_000 }) waits for that original
assessment; it starts no work. After confirmed acceptance, the accepted result
contains a serializable receipt reference. Open it with
client.receipts.open(applied.receipt) and use wait({ until: "settled" }) to
observe execution separately. Settlement includes incomplete outcomes;
needsAttention is a separate goal and does not end a settlement wait. A
blocked assessment retains operation positions and statuses. When evaluation
establishes native disclosure evidence, inspection.assessment.evidence also
retains the failing operation’s captured receipt or authored graph key, business
refusal code, message, installed program and assessment basis. The native
finalizer saves this before ending the private trial, independently of response
delivery. Each read rechecks current operation-read and input-data access.
Participation alone grants no business disclosure. Missing, expired, oversized
or inaccessible evidence is explicitly unavailable; it never turns a blocked
assessment into an applicable transition. All provisional business writes remain
uncommitted.
CLI review wait --until assessed and receipt wait --until settled apply
--timeout to sign-in, native target identity checks and the native query
subscription together. A deadline or cancellation before the first answer still
returns the exact review or receipt identity and its inspection continuation. It
establishes no new assessment or execution fact.
Route React queries and operations together
useQuery, operation hooks, forms and uploads use that same
opening. While another target is opening, the previous target’s children are
unmounted; its socket and observers close. Authentication follows the owning
client. Requests already captured retain their original logical branch,
generation, caller and inputs, even after the provider changes target. A
refreshed generation requires explicitly reopening the branch. Without target,
the provider keeps the ordinary live client behavior.
Receipt observation separates is_observation_complete (coverage of the
observed responsibility) from each operation’s phase and
release.is_publication_complete. Complete coverage alone does not establish
successful execution or confirmed deployment publication.