Cruxible Python SDK reference
cruxible-client is the Python client for a Cruxible daemon; pip install cruxible installs it together with the daemon, CLI and MCP server. This is an
API reference. A Procedure is authored in one typed form, the ProcedureSpec;
Sequence is a thin typed builder over it. The reference also covers
contract-derived records, typed query and run results, and child calls. Names and typed handles are authoring inputs; exact versions and
hashes resolve in the daemon.
Coverage: the public Cruxible operations, returned authoring and run handles,
World access, typed values, source selectors, Procedure composition,
projection and signing helpers, package-root exports, public authoring-module
utilities, and the CruxibleClient methods. Wire request/response model names
link to their defining modules; help() on any public member gives its exact
signature and the next call to make.
Contents
- Conventions and lifecycle
- Connection and state context
- Knowledge authoring
- Reads and discovery
- Evidence, predictions, and operational work
- Procedure entry points
- Write batches
- Changesets
- Drafts, intents, proposals, and approvals
- World and typed values
- Source selection
- Procedure composition and execution
- Projections and workspace
- Signing capabilities
- Exported contract constructors
- Shared authoring inputs
- Lower-level HTTP client
- Errors and unsupported surfaces
- Import and module index
- Examples
Conventions and lifecycle
Document-write foundations live in contracts.doc_sections and contracts.write.
parse_sections, append_section, and replace_section are pure byte operations:
ATX heading paths address subtrees; the empty path addresses the preamble after
frontmatter. Fenced headings, setext headings, and HTML headings are text. Edits
preserve newline style and return exact subtree digests for compare-and-set.
An append creating a file uses the agent's text, including any agent-authored
frontmatter. The agent chooses the file and heading paths.
AppendSection, ReplaceSection, DocEditObservation, SectionEvidence, and
DocOutcome describe document writes through CLI, MCP, and SDK. Section evidence
selects the heading and its own body, ending before the first child. An optional
located_at observation gives own words a file location. A ClaimType rule
admits its named contracts; a rule that admits own words also admits workspace
file and section citations, and captured evidence means a shaped payload
under a named CaptureContract. The primary typed lane carries the prose:
w = cx.world()
item = w.project.work_item["wi-1"]
outcome = item.set(
status="ready",
because="Record the decision and its basis together.",
evidence=cx.section("notes.md", heading="Decision", body="The checks passed."),
)
# Next: inspect outcome.docs[0].written and outcome.next, then cx.get(item.address).
cx.section(file, heading="slug", body=..., under=("Notes",)) names the
heading once: the heading line is written at the depth its place needs, and
the section cited is (*under, heading). The longer form
cx.section(file, heading_path, text=..., under=()) takes text starting
with the heading line. Either appends a subtree that leaves one blank line
after it; with replace=True (and expect=digest) it replaces the named
subtree, or with heading_path=() the preamble. It
returns authoring.section_evidence.AuthoredSection, an immutable client-only
evidence object. Construction writes nothing. Accepted Subjects, their edits,
new Subject drafts' .set(...).write(...), and cx.set accept it as evidence.
A shared evidence object authors its section once across a World write.
For an explicit batch, give .append_section(..., id="basis") or
.replace_section(..., id="basis") an ID and pass batch.section("basis")
as a change's supported_by= or evidence=. Both document methods return the
batch. Next: batch.write(), then inspect outcome.docs[].written.
cx.file("notes.md").section("Decision") continues to select existing text
for authoring-lane supported_by=; it does not carry a new edit.
Files are written after accepted or awaiting-approval admission. Dry runs report
digests and write nothing. Inspect outcome.docs: a concurrent edit can leave
written=False with a repair even after Claims were admitted. Document targets
also return a files propose follow-up. Citing-Claim reports are deferred.
Docs-only writes return the advisory outcome.hint: No Claim cites this text. If it records a belief or decision, add a Claim citing the section; to keep it as a note about Subjects, link it with an about change (cruxible note); a draft stays prose.
Signatures show actual types and defaults. An argument whose type includes
None is still required when no default is displayed. * begins keyword-only
arguments. Names beginning api. refer to cruxible_client.contracts.
ProcedureSequence is the imported alias of authoring.procedures.Sequence.
Sequence[T] in other annotations means the normal Python collection protocol.
Field tables preserve annotations: ClassVar members are class metadata, not
constructor arguments. Field(...) and dataclass factories express validation
constraints or generated defaults; they are not values callers must pass.
| Stage | Meaning | What it does not imply |
|---|---|---|
| Draft | An authored decision, possibly with read/coordinate assertions | No durable intent or acceptance yet |
| Prepare | Creates/updates a durable intent and preflights its candidate | No approval or acceptance |
| Submit | Submits the prepared candidate through governed proposal machinery | No approval or acceptance |
| Review | Obtains one exact candidate’s review | No signature |
| Approve | Signs/submits that exact reviewed candidate with supplied authority | No acceptance |
| Accept | Requests a signed accepted generation under current admission | No implicit refresh of agent-owned prose |
| Run | Requests admitted execution of accepted machinery | No guarantee of success or automatic acceptance of emitted proposals |
Accepted state and observed evidence are separate. A live context normally
resolves current head per accepted read; at(...) and typed refs select an
explicit coordinate. cx.coordinate is cached, not a freshness check. Methods
documented as using cx.coordinate use that exact last-observed/pinned value.
Operational queues, signing custody, and write authority are not rewound by a
historical reading context. World snapshots remain readable after the live
client moves. Borrowed contexts share their original connection’s lifetime.
Canonical values and typed contracts reject unsupported encodings. An object
with a .value does not implicitly serialize arbitrary Python. Use the declared
SubjectRef/LiteralValue forms for knowledge; use the declared
Procedure contracts for execution values.
All network operations may raise authentication, authorization, transport, or
typed daemon errors. Local shape/coordinate checks may raise ValueError,
TypeError, Pydantic validation errors, or SDK-specific errors. A transport
timeout after a write is an uncertain outcome: inspect the retained intent,
proposal, run, or installation before retrying. A refused result is not
necessarily a Python exception; inspect typed result status and diagnostics.
Connection and state context
Import Cruxible from cruxible_client. Use Cruxible.connect(...) or
the context-manager form. Direct construction is an advanced injected-client
adapter; it does not perform the compatibility/orientation sequence of connect.
Cruxible(
*,
client: CruxibleClient,
instance_id: str,
workspace: Path | None,
access_profile: AccessProfile,
clock: Any,
) -> Cruxible
All constructor arguments are required. client is the injected transport;
instance_id selects the daemon instance; workspace is expanded and resolved;
access_profile supplies the read/disclosure preference; clock is the injected
evaluation-time source. The object initially has no observed coordinate and owns
its transport. Prefer connect() for ordinary use so context and compatibility
checks run.
A Cruxible built on an injected client with no workspace (the internal
_from_client(..., workspace=None) path) still reads and writes accepted state:
orient() reports no floor, and members that need workspace files refuse with
SourceSelectionError.
| Setting | Default / behavior |
|---|---|
CRUXIBLE_SERVER_BEARER_TOKEN |
Used when token is omitted; never creates a principal or grants rights. |
CRUXIBLE_PRINCIPAL_ID |
Used when principal_id is omitted; the daemon checks it is a registered, active principal before any write and attributes the session to it; reads stay open. |
CRUXIBLE_CLI_CONTEXT_PATH |
Otherwise ~/.cruxible/client-context.json. |
CRUXIBLE_CLIENT_TIMEOUT_S |
Ordinary HTTP read/write timeout: 180 seconds; connect/pool: 5 seconds. |
| Default access profile | sdk-default, classes ("instance", "public"), disclose restricted existence True. |
Explicit target/instance/workspace arguments participate in the shared context resolver. Workspace attachment, environment, and remembered context cannot silently combine an instance with an incompatible transport. Resolve or repair that mismatch instead of guessing a local instance.
Cruxible.connect
connect(
*,
context: str | Path | None = None,
target: str | None = None,
instance: str | None = None,
token: SecretStr | None = None,
principal_id: str | None = None,
workspace: Path | None = None,
access_profile: AccessProfile | None = None,
at: AcceptedCoordinate | api.AcceptedCoordinate | None = None,
) -> Cruxible
Opens a transport, checks client/daemon contract compatibility, resolves context, and ordinarily performs orientation. A supplied at skips live orientation and pins that coordinate.
Conditions and effects: ValueError/ContextResolutionError for missing or inconsistent context; IncompatibleDaemonVersion for an incompatible authoring contract; authentication/transport errors.
| Parameter | Default | Meaning |
|---|---|---|
context |
None |
Remembered client-context JSON path; otherwise CRUXIBLE_CLI_CONTEXT_PATH or ~/.cruxible/client-context.json. |
target |
None |
Explicit HTTP(S) endpoint or unix:/absolute/socket. It does not select an arbitrary local instance directory. |
instance |
None |
Daemon instance ID. Omission uses resolved workspace/client context. |
token |
None |
Bearer credential as SecretStr; otherwise CRUXIBLE_SERVER_BEARER_TOKEN. |
principal_id |
None |
Principal this session acts as; otherwise CRUXIBLE_PRINCIPAL_ID. With daemon auth off it is a claim of identity, not authentication; with auth on it must equal the credential's principal. |
workspace |
None |
Client workspace root for source selection, projections, and configured floors. |
access_profile |
None |
Declared access classes and disclosure preference; server authorization remains authoritative. |
at |
None |
Explicit accepted coordinate. Omission follows the live/pinned object semantics stated above. |
Cruxible.close
close() -> None
Closes an owning connection. Closing a context borrowed through at() leaves its owner’s transport open.
Conditions and effects: No automatic submission, acceptance, or workspace refresh.
Cruxible.coordinate
coordinate: AcceptedCoordinate
The pinned coordinate, or the live client's last observed coordinate.
This property performs no I/O. Live reads resolve current head in their
own request, so this value is not a freshness check. print() shows its short
Git OID; repr() keeps every digest.
Cruxible.at
at(coordinate: AcceptedCoordinate | api.AcceptedCoordinate) -> Cruxible
Returns a borrowed pinned context without I/O. Accepted reads stay fixed; writes still undergo current admission.
Conditions and effects: The original connection must remain open; pinned context does not rewind operational queues or authority.
| Parameter | Default | Meaning |
|---|---|---|
coordinate |
Required | Exact accepted coordinate, not a timestamp or an instruction to refresh current head. |
Cruxible.refresh
refresh() -> api.Head
Re-reads the accepted head through CruxibleClient.head (a pinned context re-reads its own coordinate) and records the observed coordinate. Head carries only instance, coordinate and generation; call orient() for the map.
Conditions and effects: A pinned context stays pinned; refresh does not accept proposals or update a local floor.
Cruxible.world
world() -> World
Reads accepted vocabulary and creates an independent pinned World. Lazy field reads remain at that coordinate as the live client advances.
Conditions and effects: Current first Subject access loads the Subject listing; field access is not an automatic scalar resolution.
Cruxible.block
block: ProjectionBlocks
Client-only declaration stamps; prose remains wholly agent-owned.
Cruxible.vocabulary
vocabulary: Vocabulary
vocabulary.export(*, force=False) -> VocabularyExportResult
vocabulary.plan(path=None) -> VocabularyPlan
vocabulary.apply(path=None, *, rationale=None, accept="if_allowed") -> VocabularyApplyResult
The workspace's vocabulary file, .cruxible/vocabulary.yaml: every kind and field in one YAML input. export() writes the accepted vocabulary (shorthand where it round-trips, the full ClaimType input form otherwise, each entry checked by lowering it back); plan() reads at the export the file names and lists what it adds, replaces and retires, the Claims an enum mapping moves, and the daemon's write-free preflight; apply() submits the same members as one ordinary change set.
Conditions and effects: a kind or field the file leaves out is untouched; only retired: true retires. An edited field pins the digest its export read, so one changed since refuses at preflight. Export replaces an existing file only when nothing in it would be lost (it parses and states no change accepted state lacks); otherwise it refuses, naming the pending changes, unless force=True. Git is not consulted. The same request gives the same result as cruxible vocabulary and cruxible_vocabulary_*. print() on each result shows what the CLI prints; repr() is its first line and model_dump() the full model.
Cruxible.__enter__
__enter__() -> Cruxible
Cruxible.__exit__
__exit__(*_args: object) -> None
| Parameter | Default | Meaning |
|---|---|---|
_args |
'<variadic>' |
Value required by the declared type; see operation semantics below. |
Knowledge authoring
New ClaimType authoring emits a ClaimType v7 artifact whose evidence rules name CaptureContracts by identity. Evidence rules define admissible capture contracts, roles, subject binding, and attestation requirements. A derivational rule also requires exact producer and input-Claim provenance, but never an allowlist of producing Procedures. Producer permission is enforced through the existing Procedure mandates and governed proposal approval. Historical ClaimType formats retain their original validation.
The compact derivation profile is replay-verifiable-derivation-v2; it requires
capture-contract and evidence-kind parameters, with no reducer digest parameter.
Cruxible.changes
changes(*, rationale: str | None=None) -> ChangeSetDraft
changes(*, because: str, subject: str | SubjectRef | CreatedSubject | SubjectCreationDraft | None=None) -> WriteBatch
With rationale (or nothing), returns a changeset builder retaining the last
observed coordinate for references and vocabulary. With because, returns a
WriteBatch of typed write changes: .create(kind, key=...),
.set(subject, field, value, ...), .add(subject, field, value, ...) and
.retire(target, ...) (with subject= naming the Subject of every change
that names none, .set(field, value) is enough; a cx.new_subject(...) draft
as subject= is created by the same write), sent as one change set by .write(dry_run=False, accept="if_allowed", at=...), which returns the
WriteOutcome or raises WriteRefusalError.
Conditions and effects: No prepare/submit/accept at construction. The set admits or refuses as one governed decision.
| Parameter | Default | Meaning |
|---|---|---|
rationale |
None |
Author-supplied explanation retained with this Claim/change decision. |
because |
None |
Why: opens a WriteBatch, whose change set carries it as its rationale. |
subject |
None |
With because: the Subject of every change that names none. |
Defining a vocabulary
A vocabulary is SubjectKinds (how Subjects of a kind are named) and ClaimTypes
(their fields), defined together in one change set. This one defines a kind
shop.part keyed by its sku, an enum field and a relation to other parts.
ChangeSetDraft.field gives each field the short
form's defaults, so it admits its writer's own words (because) as evidence:
changes = cx.changes(rationale="The parts vocabulary.")
changes.field("shop.part", "sku", "string{min_len: 1, max_len: 32}",
description="The stock code; the key.", key=True)
changes.field("shop.part", "status", "enum[in_stock, discontinued]",
description="Whether it can be ordered.",
members={"in_stock": "Can be ordered.", "discontinued": "No longer sold."})
changes.field("shop.part", "replaces", "subject<shop.part>", many=True,
description="Parts it supersedes.")
changes.subject_kind(name="shop.part", description="A stocked part.")
intent = changes.submit() # intent.outcome.status: 'landed'
outcome = cx.set("shop.part/bp-2210", "status", "in_stock", because="On the stock list.")
changes.prepare() checks and lints the set without submitting. The
create-state agent skill (skills/create-state) says what makes a good kind,
field and enum before you define them. With floor delivery on, the daemon keeps .cruxible/world.pyi
current: bind world = cast("World", cx.world()) (from world import World
under TYPE_CHECKING, with .cruxible on the checker's path) and a type checker
refuses a misspelled kind, field or enum member in a script.
Cruxible.subject
subject(
*,
subject: str | SubjectRef,
pins: Sequence[ArtifactPin],
lifecycle: ArtifactLifecycle,
) -> SubjectDraft
Builds a SubjectDraft from explicit identity, pins, and lifecycle.
Conditions and effects: No proposal until prepare/propose. Wrong ref kind or mismatched coordinate refuses.
| Parameter | Default | Meaning |
|---|---|---|
subject |
Required | SubjectRef or accepted canonical Subject address; a Claim is about this Subject. |
pins |
Required | Declared ArtifactPin dependencies. Exact pins belong to their artifact contract. |
lifecycle |
Required | Explicit artifact lifecycle record, including identity/version continuity. |
Cruxible.claim_type
claim_type(
*,
predicate: str | ClaimTypeRef,
subject_kinds: Sequence[str],
value_type: FieldType | str,
cardinality: Cardinality | str,
permitted_roles: Sequence[ClaimRole | str],
referent_sensitivity: ReferentSensitivity | str,
admission_policy: ClaimAdmissionPolicy,
resolution_policy: ClaimResolutionPolicy,
pins: Sequence[ArtifactPin],
evidence_freshness: Duration | None,
attestation_consequence_policy: ClaimAttestationConsequencePolicy | None = None,
canonical_form: Sequence[str] | None = None,
evidence: Sequence[str] = (),
sources: Sequence[str | SourceRef] = (),
) -> ClaimTypeDraft
Builds a ClaimTypeDraft with explicit object, cardinality, role, evidence, admission, and resolution constraints.
Conditions and effects: Validates enum/contract values. Required parameters have no inferred default even when their type permits None.
| Parameter | Default | Meaning |
|---|---|---|
predicate |
Required | ClaimType reference or canonical predicate address. |
subject_kinds |
Required | Allowed Subject kinds. |
value_type |
Required | A native Contract type, such as enum[open, closed] or subject<sec.package>. Strings declare max_len <= 256 and are one line. |
cardinality |
Required | one or many. It constrains the field; it does not hide live competing Claims on reads. |
permitted_roles |
Required | Claim roles admitted by this ClaimType. |
referent_sensitivity |
Required | Whether dependency sensitivity follows endpoint identity or its shell. |
admission_policy |
Required | Typed policy governing Claim admission. |
resolution_policy |
Required | Typed policy governing Claim resolution; separate from acceptance. |
pins |
Required | Declared ArtifactPin dependencies. Exact pins belong to their artifact contract. |
evidence_freshness |
Required | Optional freshness duration; only a field that sets one ages. None leaves it unspecified. See freshness in 0.5.0. |
attestation_consequence_policy |
None |
Optional policy for consequences of accepted signed attestations. |
canonical_form |
None |
Ordered transforms literal values are stored in; left out, a successor keeps its predecessor's. |
evidence |
() |
Shaped CaptureContract names that back the field (the short form's evidence). Own words and workspace file and section citations need no entry. |
sources |
() |
Retired: refuses with a repair naming evidence. |
Cruxible.claim
claim(
*,
subject: str | SubjectRef | SubjectKeyReference,
predicate: str | ClaimTypeRef,
value: CanonicalValue | SubjectRef | SubjectKeyReference | LiteralValue | ExactContent,
role: ClaimRole | str,
rationale: str,
supported_by: EvidenceSelection | CaptureRef | None = None,
copied_from: EvidenceSelection | CaptureRef | None = None,
self_source: str | None = None,
qualifier: str | None = None,
effective_period: EffectivePeriod | None = None,
revises: str | ClaimRef | None = None,
dispositions: Mapping[str | ClaimRef, Disposition | str] | None = None,
subject_definition: SubjectDraft | None = None,
claim_type_definition: ClaimTypeDraft | None = None,
) -> ClaimDraft
Builds a ClaimDraft; may read accepted metadata to interpret objects and evidence, but does not submit.
Conditions and effects: Exactly one of supported_by, copied_from, self_source is required. Enforces typed reference/value compatibility, citation roles, independent-source restrictions, and unique normalized dispositions.
| Parameter | Default | Meaning |
|---|---|---|
subject |
Required | SubjectRef or accepted canonical Subject address; a Claim is about this Subject. |
predicate |
Required | ClaimType reference or canonical predicate address. |
value |
Required | Object value under the selected ClaimType; use SubjectRef or LiteralValue for the declared type. |
role |
Required | Normative, observation, environment_binding, or derivation role admitted by the ClaimType. |
rationale |
Required | Author-supplied explanation retained with this Claim/change decision. |
supported_by |
None |
Independent selected evidence or an evidence-role CaptureRef. Exactly one evidence-source argument is required. |
copied_from |
None |
Selected copied content or a reusable CaptureRef; does not upgrade it to independent evidence. |
self_source |
None |
Explicit self-asserted source text. Exactly one of supported_by, copied_from, self_source. |
qualifier |
None |
Optional qualifier of this Claim statement. |
effective_period |
None |
Optional effective start/end instants, distinct from capture and acceptance times. |
revises |
None |
Existing Claim identity to revise rather than minting a parallel lineage. |
dispositions |
None |
Existing contender Claim IDs mapped to explicit dispositions. Duplicate normalized IDs refuse. |
subject_definition |
None |
Subject draft carried with the Claim, if defining its Subject in the same operation. |
claim_type_definition |
None |
ClaimType draft carried with the Claim, if defining its predicate in the same operation. |
Cruxible.set
set(
subject: str | SubjectRef,
field: str | ClaimTypeRef,
value: ClaimValue | SubjectRef | LiteralValue | NoneValue,
*,
because: str,
evidence: Evidence | AuthoredSection | None = None,
role: WriteRole | None = None,
contend: bool = False,
expect: WriteExpect | None = None,
dry_run: bool = False,
accept: Literal['if_allowed', 'never'] = 'if_allowed',
at: AcceptedCoordinate | str | None = <this context's coordinate>,
) -> WriteOutcome
Puts one value in one field of one Subject. On a single-value field it replaces the live value; the Claim it revises is found for you. A missing Subject of a known kind is added in the same change set.
Conditions and effects: Accepts in the same call when the approval policy
and the caller's tier allow it; otherwise the outcome is awaiting_approval with
the eligible approvers and the approve call. dry_run runs every check and
writes nothing. By default the write refuses cruxible.write.slot_changed when
the field moved since this context's coordinate; after that refusal the context
has seen the new value, so setting again replaces it. A refusal raises
WriteRefusalError carrying the outcome. Each change carries its verdict; a
verdict other than supported comes with a warning in outcome.warnings.
| Parameter | Default | Meaning |
|---|---|---|
subject |
Required | The Subject as kind/id, or a typed SubjectRef. |
field |
Required | A field of the kind as orient names it, or the full predicate. |
value |
Required | An enum member, text, number or boolean; a Subject for a Subject-valued field; the text itself for exact content. |
because |
Required | Why; also the default self evidence. |
evidence |
None |
SelfEvidence, FileEvidence (PATH#ANCHOR, read from this workspace), SectionEvidence, CaptureEvidence or ContractEvidence (a shaped payload under a named CaptureContract), or a cx.section(...) that writes the section it cites. File and section citations are admitted wherever own words are. |
role |
None |
Only when the field permits more than one role. |
contend |
False |
Contest the live value instead of replacing it. |
expect |
None |
Compare-and-set by value: refuse unless the field holds this value now (a list for several, [] for none). |
dry_run |
False |
Check everything and write nothing. |
accept |
'if_allowed' |
'never' only proposes. |
at |
this context's coordinate | The coordinate you read at; None checks against the head. |
Cruxible.retire
retire(
target: str | ClaimRef | SubjectRef | SlotRef,
*,
because: str,
reason: Literal['was-rescinded', 'was-wrong', 'superseded'] = 'was-rescinded',
expect: WriteExpect | None = None,
with_claims: bool = False,
dry_run: bool = False,
accept: Literal['if_allowed', 'never'] = 'if_allowed',
at: AcceptedCoordinate | str | None = <this context's coordinate>,
) -> WriteOutcome
Ends one live Claim, named by Claim ID, by SlotRef(subject=..., field=...)
for a field that holds one value, or by SlotRef(subject=..., field=..., value=...) for one of several. The Claims that depend on it retire with it,
in one change set. A Subject (kind/id or a SubjectRef) retires with its key
Claims; its other live Claims retire only with with_claims=True, and Claims
of other Subjects whose value it is refuse the write until they are re-pointed
or retired.
Conditions and effects: As Cruxible.set.
Cruxible.add
add(
subject: str | SubjectRef,
field: str | ClaimTypeRef,
value: ClaimValue | SubjectRef | LiteralValue | NoneValue,
*,
because: str,
evidence: Evidence | AuthoredSection | None = None,
role: WriteRole | None = None,
expect_absent: bool = False,
dry_run: bool = False,
accept: Literal['if_allowed', 'never'] = 'if_allowed',
at: AcceptedCoordinate | str | None = <this context's coordinate>,
) -> WriteOutcome
Adds one value to a many-valued field of one Subject, beside the values there.
A value already there is answered as done; expect_absent=True refuses
instead. value=NoneValue(none=KEY) adds a none: the field does not hold KEY.
Conditions and effects: As Cruxible.set.
Cruxible.rebind
rebind(
claim: str | ClaimRef | None = None,
*,
because: str,
file: str | None = None,
section: str | None = None,
capture: str | CaptureRef | None = None,
from_capture: str | CaptureRef | None = None,
citation: str | None = None,
dry_run: bool = False,
accept: Literal['if_allowed', 'never'] = 'if_allowed',
at: AcceptedCoordinate | str | None = <this context's coordinate>,
) -> WriteOutcome
Re-cites a Claim on the text it rests on now (file="FILE#ANCHOR" or
section="FILE#Heading/Path"), or on a fresh Capture (capture=) under the
same CaptureContract as the citation it replaces. The Claim keeps its value and
ID; its history shows one rebound revision. citation (12+ hex) picks the
citation when more than one matches. from_capture= instead of claim
re-binds every live Claim citing that Capture onto capture= (at most 500).
Conditions and effects: As Cruxible.set; a refusal raises WriteRefusalError.
Cruxible.new_subject
new_subject(
kind: str,
*,
key: Mapping[str, str | int | bool | SubjectRef | SubjectKeyReference | SubjectCreationDraft] | str | int | bool | None = None,
rationale: str | None = None,
create_new: bool = False,
) -> SubjectCreationDraft
Drafts creating one Subject of kind by its key; core assigns the id (the
readable rendering of the canonical key, or a minted id). key maps each key
ClaimType to its value, or is the value when the kind has one key; omit it for
a minted kind. A key a live Subject already holds resolves to it;
create_new=True creates another holder of a hint kind's key. Pass the draft
to ChangeSetDraft.subject to say more about it in the same set, or use it in
a WriteBatch (cx.changes(because=...)) as subject= or as a Subject value:
the write creates it once, with the draft's rationale as the key Claims' own
words.
Conditions and effects: Writes nothing until draft.submit() or the containing change set is submitted.
Cruxible.builtin_claim_type
builtin_claim_type(name: str) -> ClaimTypeDraft
A ClaimType core ships (semantic.alias), as a draft to adopt. New instances
start with every builtin; an instance created before one shipped adopts it with
draft.propose(proposal_name=...).
Cruxible.section
section(
file: str,
heading_path: tuple[str, ...] | None = None,
*,
text: str | None = None,
heading: str | None = None,
body: str = '',
under: tuple[str, ...] = (),
replace: bool = False,
expect: str | None = None,
) -> AuthoredSection
Carries a new section's text as evidence for one typed write: appends a heading
subtree under under, or with replace=True replaces heading_path (empty:
the preamble), checking expect against the prior subtree digest. The heading
path cites the resulting section. Give either heading= with body= (the
heading line is written for you and the cited path is (*under, heading)), or
heading_path with text= starting with the heading line. Pass it as evidence= to cx.set, cx.add
or a World write.
Conditions and effects: Construction writes nothing; the file is written when the write is admitted. Inspect outcome.docs.
Cruxible.note
note(
file: str,
*,
text: str,
about: Sequence[str | SubjectRef],
because: str,
under: tuple[str, ...] = (),
heading: str | None = None,
dry_run: bool = False,
accept: Literal['if_allowed', 'never'] = 'if_allowed',
at: AcceptedCoordinate | str | None = <this context's coordinate>,
) -> WriteOutcome
Appends a section to file and links it about Subjects: a note, not a Claim.
text starts with the section's heading, or heading= names it once and
text is its body. One write, under the same governance
as any write; the same as cruxible note on the CLI. Each Subject's backlinks
list the note and say when the section changes after it.
Conditions and effects: As Cruxible.set. Next: cx.backlinks(subject).
Cruxible.link
link(
source: str,
*,
about: Sequence[str | SubjectRef] = (),
guides: Sequence[str | ClaimTypeRef] = (),
unlink: bool = False,
because: str | None = None,
proposal_name: str | None = None,
dry_run: bool = False,
accept: Literal['if_allowed', 'never'] = 'if_allowed',
at: AcceptedCoordinate | str | None = <this context's coordinate>,
) -> WriteOutcome | GuidanceLinkOutcome
Links an existing section about Subjects, or a whole registered page as
review guidance; the same as cruxible link on the CLI. source names the
file by path or catalog name. link("notes.md#Triage", about=[subject], because=...) is one write (a note), shown by cx.backlinks(subject).
link("guide.md", guides=["ClaimType:p"]) records the link on the file's
catalog entry and proposes the Document's next revision from the file's bytes
and its links (later files propose keeps them); it answers a
GuidanceLinkOutcome (catalog_written, links, proposal). unlink=True
removes the named links.
because belongs to an about= link, which requires it (a note is a write and
carries its why). A guides= link is a Document proposal and takes no
because: cx.link("guide.md", guides=[...], because=...) raises TypeError
(because= goes with about=; a guides= link is a Document proposal), and an
about= link without because raises TypeError too. proposal_name belongs
to a guides= link. A guidance page must be a catalogued Document first: an
uncatalogued page refuses cruxible.link.file_unregistered, and
cx.files.add(path, document_id=..., document_kind=..., title=..., media_type=..., governance_scope=(...)) registers it (see
Cruxible.files).
Conditions and effects: Naming both about= and guides=, or neither,
raises WriteRefusalError (cruxible.link.*) before anything is sent, saying
which link is which.
files.yaml is written only once the guidance proposal stands. Next:
cx.backlinks(...).
Cruxible.query_definition
query_definition(
*,
definition: QueryDefinitionInput,
vocabulary: Sequence[ClaimTypeRef] = (),
) -> QueryDraft
Builds a QueryDraft with optional coordinate assertions from referenced vocabulary. The authored form uses
QuerySpecInput from cruxible_client.contracts.query.authored:
from cruxible_client.contracts.authoring.inputs import QueryDefinitionInput
from cruxible_client.contracts.query.authored import QuerySpecInput
spec = QuerySpecInput.model_validate({
"query": "project.ready",
"from": {"item": "project.work_item"},
"where": 'item.status == "ready"',
"fields": ["item", "item.status"],
})
draft = cx.query_definition(definition=QueryDefinitionInput(
kind="query_definition", query_definition=spec,
))
Authored queries resolve names against the candidate vocabulary; omit the
optional vocabulary assertions for that form. See saved questions
for filters, hops, includes and budgets.
Conditions and effects: A vocabulary ref not used by the query refuses. Ordinary Claim and artifact-definition queries share this API.
| Parameter | Default | Meaning |
|---|---|---|
definition |
Required | Typed definition being authored; use the exact input type shown in this operation’s signature. |
vocabulary |
() |
World ClaimType references used by the query, retaining stale-reference assertions. |
Cruxible.resume_intent
resume_intent(intent_id: str) -> Intent
Reads the latest durable intent, preflight, and observed proposal into a handle.
Conditions and effects: Does not prepare, submit, sign, accept, or restore process-local source locations/review tokens.
| Parameter | Default | Meaning |
|---|---|---|
intent_id |
Required | Durable authoring intent identity from this instance. |
Cruxible.proposal
proposal(proposal_id: str) -> Proposal
Creates a local handle for an existing proposal ID.
Conditions and effects: Does not read, review, create, approve, or accept the proposal.
| Parameter | Default | Meaning |
|---|---|---|
proposal_id |
Required | Exact proposal identity, not a branch name or candidate revision inferred from head. |
Cruxible.activate
activate(proposal_id: str) -> api.ProposalActivationResult
Activates one proposal and returns its ActivationReceipt (api.ProposalActivationResult is ActivationReceipt | ProposalRecompiled; a ProposalRecompiled names the proposal the daemon proposed again at the head instead). Updates a live connection’s last observed coordinate.
Conditions and effects: A daemon act: signs no approval and writes nothing locally. The daemon's floor-refresh trigger delivers the floor to a workspace it serves; elsewhere cx.refresh_workspace() pulls it. Use cx.at(receipt.accepted_coordinate) for exact readback.
| Parameter | Default | Meaning |
|---|---|---|
proposal_id |
Required | Exact proposal identity, not a branch name or candidate revision inferred from head. |
Cruxible.proposals
proposals(*, status: Literal['open', 'awaiting_readmit', 'settled', 'incomplete'] | None=None, limit: int | None=None, cursor: str | None=None) -> api.ProposalList
One page of proposals; follow next_cursor while truncated. Read one with cx.get(proposal_id). print(page) shows the table cruxible proposal list prints; a proposal the daemon proposed again at the head reads settled with reason superseded and a superseded_by line naming its successor. A rejected or withdrawn entry carries closed_by, closed_at and closed_reason, and print(page) shows them under its row (rejected by reviewer at 2026-11-18T15:29:21.560470Z: ..., the reason cut at 200 characters; cx.get has it whole).
Cruxible.refresh_workspace
refresh_workspace(
*,
at: AcceptedCoordinate | api.AcceptedCoordinate | None = None,
) -> api.FloorRefreshResult
Pulls the configured floor, at the accepted head unless at pins a coordinate, and reports refreshed/failed/not_configured. It is the SDK's pull for setups the daemon does not deliver to (a remote daemon, or delivery off).
Conditions and effects: Writes client workspace files; does not advance the reading context or check/repin projection blocks. A daemon delivering this workspace's floor is its only writer: over the local socket it writes now (head only); over TCP the refresh reports failed instead of writing a second copy.
| Parameter | Default | Meaning |
|---|---|---|
at |
None (head) |
An accepted coordinate to pin the pull to. |
Cruxible.file
file(path: str | Path) -> FileSelector
Reads a cataloged workspace file into a FileSelector using .cruxible/files.yaml and applicable local catalog settings.
Conditions and effects: Uncataloged/out-of-root selections and malformed catalogs refuse. File bytes are observed now, before prepare.
| Parameter | Default | Meaning |
|---|---|---|
path |
Required | Workspace/source path or destination; interpretation is stated by its owning operation. |
Cruxible.files
files.add(name: str | Path | None = None, path: str | Path | None = None, *, document_id=None, document_kind=None, title=None,
media_type=None, governance_scope=(), required_tier=None, public_uri=None,
replace=False) -> FileCatalogEdit
files.remove(name: str) -> FileCatalogEdit
Catalogues a workspace file under a source name in .cruxible/files.yaml, or removes its entry: the same edits as cruxible files add and cruxible files remove, through the same code. The name is a stable handle the catalog maps to the file's current path; files.add(path) alone derives it from the path, as a write citing the file would. A write that cites an uncatalogued workspace file by path catalogues it on its own (WriteOutcome.catalogued), so files.add is for choosing the name or declaring a Document.
Conditions and effects: Writes only the catalog file. A relative path is read from the workspace root. An existing name refuses (entry_exists) unless replace=True. The Document fields are all or none: give document_id, document_kind, title, media_type and governance_scope together to declare a Document, or none of them for an evidence-only entry; some but not all raises FileCatalogEditError (cruxible.files.catalog_edit_refused, entry_invalid). A duplicate Document target refuses.
Reads and discovery
Cruxible.capture
capture(capture: str | CaptureRef, *, max_bytes: int=4 * 1024 * 1024) -> CaptureView
Reads retained capture metadata and available bytes at cx.coordinate. Does not refetch the external source.
Conditions and effects: Unavailable evidence is represented in CaptureView.result; .ref/.content refuse if the required material is unavailable.
| Parameter | Default | Meaning |
|---|---|---|
capture |
Required | Capture digest or typed CaptureRef to retained evidence; does not initiate acquisition. |
max_bytes |
4 * 1024 * 1024 |
Byte bound for this operation, in bytes. It is not permission to exceed effective daemon policy. |
Cruxible.get
get(ref: str | TypedRef, *, detail: GetDetail = "summary", range: tuple[int, int] | str | None = None, field: str | ClaimTypeRef | None = None) -> KnowledgeCard
Reads one thing by reference; the daemon resolves the reference directly (never through search). ref is a typed Subject/ClaimType/Claim/Procedure/Query/Source ref (read at its coordinate) or any string an agent sees: CLM-... or a unique prefix, kind/id, a predicate (full or a unique leaf), ClaimType:/Document:/Procedure:/query:/CaptureContract:<name>, an artifact path, a proposal id or prefix (with or without sha256:; without it, the whole hex id or at least 8 hex characters), or an operational reference (Line:<name> or the Line identity digest next names, CAP-<12+ hex>/Capture:<digest>, ResolutionContract:<name>, Mandate:<name>, ProcedureRun:<run_id> or RUN-<12+ hex>; their cards live in cruxible_client.contracts.operational_reads), or a governance reference: Trigger:<name>, Principal:<id>, ApprovalPolicy:instance, ProcedureRuntimePolicy:instance, Capability:<name>@N, Contract:<name>@N, Provider:NAME or Provider:NAME/BUILD. A provider name selects its newest live build; tied registrations refuse with the exact builds and a provider list repair. Provider summaries use GetProviderCard; history and proof read that exact build. A Claim summary is a ClaimView; other summaries are the values-first card (GetSubjectCard, GetClaimTypeCard, ...) from cruxible_client.contracts.get_reads; other details carry their payload (GetEvidence, whose value is the Claim's whole value; GetHistory, newest first, with every page read, each revision with its change and reason; on a Subject GetSubjectHistory: its shell's revisions and every page of its field events (GetFieldStated, GetFieldChanged with before, GetFieldReobserved, GetFieldRetired), which field= narrows to one field; GetBody, whose body_digest names the whole body even when range reads part of it; the explain dict for why, on a Claim, Subject or Document; and for proof a ClaimViewRecord on a Claim or the envelope dict otherwise). A summary card shows a string value over 500 characters as a TruncatedText (cruxible_client.contracts.read_values: preview, length, and read_whole, the exact {ref, detail, at} read of the whole value at the generation it was previewed at), never as the value; cx.read_whole(preview) makes that read. An object value is a ShownObject (object, the value whole), so an object shaped like a preview or marker never reads as one. Query rows and Claim cells, World.values and write outcomes use the same types; a plain query row cell and a write's after name no read_whole (use claims=True for a cell's Claims; after is the value the write sent). The card's coordinate is the full accepted coordinate: the SDK asks the daemon for it (full_coordinate), where MCP and CLI summaries carry only the 12-hex git oid prefix and generation.
A Subject card read at the head lists pending: the open proposals that would write its fields (proposal, fields, by), while its values stay the accepted ones. Its next names cx.backlinks(subject) when a note or a cited section points at it, and cx.get(proposal) for each pending proposal. In GetEvidence, each Capture's byte_length says how many bytes it holds.
print(card) shows what cruxible get REF --detail D prints for the same read, at every detail (next-step lines in SDK syntax); a Claim summary, which the SDK reads as a ClaimView, prints that view's subject, value, verdict and revision; a proof prints as JSON, as the CLI prints it. repr() is the first line (or kind: identity (detail) when that line does not name the thing), and str() makes no request.
Conditions and effects: An unknown or ambiguous reference refuses with cruxible.get.ref_not_found or cruxible.get.ref_ambiguous and the nearest names; a detail that does not apply to the kind refuses naming the ones that do. A Document body over 64 KiB needs range. Inspect kind before using value.
| Parameter | Default | Meaning |
|---|---|---|
ref |
Required | Typed reference or any supported reference string. |
detail |
"summary" |
summary, evidence (Claims), why (Claims, Subjects, Documents), history, incoming (Subjects: the Claims of other Subjects that point at it, GetIncoming), pairs (Subjects: the pair Subjects that name it, GetPairs), runs (Lines: their runs, GetLineRuns), backlinks (Subjects, ClaimTypes, Procedures: GetBacklinks), proof, or body (Documents). A detail that does not apply refuses cruxible.get.detail_unsupported, naming the ones that do. |
field |
None |
With detail="history" on a Subject: narrow its field events to one field. |
range |
None |
Document body bytes as (start, end) or "start:end"; detail="body" only. |
Cruxible.read_whole
read_whole(preview: TruncatedText) -> object
The whole value a TruncatedText previews, read exactly where it was previewed: the preview's read_whole read, get(ref, detail="evidence", at=...) at the generation it came from, so an older revision or a value since replaced returns the value that was previewed, never the head's. A preview with no read_whole (a plain query row cell, a write's after) raises WholeValueUnavailable (cruxible.sdk.whole_value_unavailable).
Cruxible.read_whole_many
read_whole_many(previews: Iterable[TruncatedText]) -> dict[str, object]
Many previews' whole values in few reads, keyed by each preview's read_whole.ref. Each value is exactly what read_whole(preview) returns, read where it was previewed: previews are grouped by the generation they name (read_whole.at) and each group is read through claims/read-batch pinned to that generation's git oid, at most 256 Claims and about 4 MiB of previewed text per read (400 long titles are two reads, not 400). Raises WholeValueUnavailable for a preview that names no read, for one Claim previewed at two generations (read each with read_whole; one is never re-pinned to the other), and when the daemon predates git-oid pinned batch reads.
Cruxible.orient
orient(
*,
kind: str | None = None,
section: api.OrientSection | None = None,
limit: int = 50,
cursor: str | None = None,
) -> api.OrientResult
Maps accepted state in one call at the context’s coordinate: each Subject kind with its live count and predicates (type, cardinality, enum members, accepted evidence as CaptureContract names), artifact counts, named queries, you (whether this caller can author, and why not), attention from the next queue, and next suggestions written as SDK calls. kind reads one kind in full with sample Subject IDs and the predicates that point at it (incoming). section pages one family: documents, procedures, claim_types, subject_kinds, queries, operations (the provider operations a Line can bind a slot to, each with the capabilities it serves), capabilities, contracts, principals or policies, the ledger's generations, graph, pins, activity or sources, or an operational one (runs, running, lines, runbooks, captures, capture_contracts, predictions, mandates). Read a capability in full with get("Capability:<name>@N"). When the workspace holds an exported floor, floor says its coordinate and how many generations it is behind; a connection without a workspace reports no floor.
There is no cross-kind name search: grep the exported floor under .cruxible/floor/, then get the reference you found.
print(result) shows the map as cruxible orient prints it; repr() is its first line and model_dump() the full model.
Conditions and effects: Follow next_cursor while truncated. A wrong kind is refused with the nearest kinds.
| Parameter | Default | Meaning |
|---|---|---|
kind |
None |
One Subject kind to read in full. |
section |
None |
One artifact family to page instead of the map. |
limit |
50 |
Kinds or section rows per page. |
cursor |
None |
next_cursor from the previous page of the same view. |
Cruxible.query
query(
kind: str | None = None,
*,
where: Sequence[QueryFilter | Mapping[str, object]] | None = None,
contains: str | None = None,
select: Sequence[str] | None = None,
follow: Sequence[
QueryFollow | Mapping[str, str] | tuple[str, str] | tuple[str, str, QueryFollowDirection]
] | None = None,
order_by: Sequence[str] | None = None,
limit: int = 50,
cursor: str | None = None,
spec: QueryDefinitionSpec | None = None,
name: str | QueryRef | None = None,
params: Mapping[str, object] | None = None,
at: AcceptedCoordinate | str | None = None,
evaluation_time: datetime | str | None = None,
status: Sequence[QueryClaimStatus] = ("live",),
claims: bool = False,
budgets: QueryBudgets | None = None,
receipt: QueryReceiptDetail = "compact",
) -> QueryResult
Answers any question over accepted state in one call, exactly as the MCP tool
cruxible_query and cruxible query do. Exactly one mode:
compact (kind and/or contains, with where, select, follow,
order_by), a full spec, or a query name with params.
Conditions and effects: A where filter is {"field": ..., "<op>": value}
with one of eq, ne, lt, lte, gt, gte, in, exists, contains;
filters combine as all-of and ne also matches a Subject without the value.
Wrong kinds, fields, enum members and operators refuse with the nearest valid
names. QueryResult has .rows (dicts of values plus flags), .columns,
.truncated, .next_page(), .pages(), .table() and iterates its rows. subject, subject_id and flags are row metadata; a column with one of those names is served as value.<name>. A
live connection reads the current head; a pinned one reads its coordinate.
Row flags come from stale, contested, contradicted, uncovered and
unsure_hold. With claims=True each row also carries
claims[column]: a list of {claim, value, verdict, status, role, qualifier?}
(QueryClaim), where status is accepted, conflicted,
overturned, ineligible (its own verdict does not resolve, such as evidence
erased and read stale) or retired. A named query with receipt="full"
adds receipt.replay: definition_path, result (ClaimQueryResult) and
execution (QueryExecutionReceipt).
| Parameter | Default | Meaning |
|---|---|---|
kind |
None |
A Subject kind, or a definition kind to list with typed columns: ClaimType, Procedure, Trigger, Line, SubjectKind (rule, keys, live subjects, kit), CaptureContract (sources, grade, admitted_by, required_by), ProcedureMandate (grant, scope, condition, state, expires_at) or QueryDefinition (parameters, result shape). |
where |
None |
Typed filters or plain mappings, all-of. |
contains |
None |
Case-insensitive text in any live Claim value; alone, across kinds. |
select |
None |
Column fields; without it a kind shows up to 12 predicates. |
follow |
None |
One-hop relations as (field, alias), or (field, alias, "reverse") along another kind's predicate that points here; later fields read alias.field. |
order_by |
None |
Fields, - prefixed for descending. |
limit / cursor |
50 / None |
Rows per page (at most 500) and the next_cursor of the previous page. |
spec / name / params |
None |
The spec and named modes. |
at |
None |
A coordinate or git oid; the connection's otherwise. |
evaluation_time |
None |
The instant flags are evaluated at; the connection's clock otherwise. |
status |
("live",) |
Which Claims cells show: live (each slot's answer), plus opt-in overturned, ineligible or retired. Rows list live Subjects; retired also lists retired Subjects, each row then stating lifecycle. |
claims |
False |
Also answer each cell's Claims as rows[].claims[column]. |
budgets |
None |
Named query only: QueryBudgets, up to the definition's maximum; its own default otherwise. |
receipt |
"compact" |
"full" adds a named query's replay receipt as receipt.replay. |
Cruxible.since
since(
generation: int,
*,
max_rows: int = 100,
max_bytes: int = 65536,
cursor: api.SinceCursor | Mapping[str, object] | None = None,
) -> api.SinceResult
Reads accepted history changes with row/byte bounds and snapshot-bearing continuation.
Conditions and effects: Reuse the returned cursor unchanged for the same selection. Does not synthesize changes from current files.
| Parameter | Default | Meaning |
|---|---|---|
generation |
Required | Starting generation sequence for accepted-history changes. |
max_rows |
100 |
Maximum returned rows for a bounded read. |
max_bytes |
65536 |
Byte bound for this operation, in bytes. It is not permission to exceed effective daemon policy. |
cursor |
None |
Opaque continuation returned by the same operation; retains its selection/snapshot. |
Cruxible.backlinks
backlinks(
ref: str | SubjectRef | ClaimTypeRef | None = None,
*,
file: str | None = None,
section: tuple[str, ...] | None = None,
limit: int = 25,
cursor: str | None = None,
) -> api.BacklinksResult
What points into one target, one page at this context's coordinate. A Subject:
the notes about it, Documents linked about it, and the workspace sections its
live Claims cite. A ClaimType or Procedure: the Documents that guide it. file
and section: the live Claims resting on that section. Section rows carry
drift against the workspace file as it is now. The same as cruxible backlinks; a Subject's get card names it when any exist.
Conditions and effects: A read from the backlinks index. next_cursor continues a cut page.
Evidence, predictions, and operational work
Cruxible.erase_capture
erase_capture(
capture: str | CaptureRef,
*,
because: str,
dry_run: bool | None = None,
at: str | None = None,
) -> api.CaptureEraseResult
Erases one Capture's retained body under its contract's erasure rule. The bytes
are destroyed; the envelope, its contract and an erasure record (who, when,
because) stay, and Claims citing it read the evidence as erased. The default
previews (status="would_erase"); commit with dry_run=False, at=preview.coordinate.digest, then cx.rebind(claim, capture=fresh) for each
Claim in result.left_without_evidence.
Conditions and effects: Only a contract that authorizes erasure allows it; it cannot be undone.
Cruxible.predictions
predictions(claim: str | ClaimVersionReference) -> api.ResolutionContractsResult
Lists the accepted predictions (stored as resolution contracts) that test one Claim version, retired ones included. claim is a Claim ID resolved at this connection's coordinate, or an exact ClaimVersionReference.
Cruxible.predict
predict(contract: ResolutionContract | ResolutionContractInput) -> Prediction
Creates a governed proposal for an independent resolution contract over an already accepted hypothesis. The hypothesis may be a Claim ID (ResolutionContractInput); the daemon pins the exact version it resolves to. Returns proposal/intent identities.
Conditions and effects: Does not approve or accept the proposal.
Settlement has known limits in 0.5.0; see freshness in 0.5.0.
| Parameter | Default | Meaning |
|---|---|---|
contract |
Required | Typed contract or exact contract reference named by the signature. |
Cruxible.settle
settle(
prediction: str | ResolutionContractReference,
*,
observation: str | ClaimVersionReference,
trigger_event: TriggerEventReference | None = None,
terminal_run_id: str | None = None,
terminal_record_digest: str | None = None,
) -> PredictionSettlement
Evaluates and records settlement for a prediction named by contract name or bound window id (RSC-...) from an observation named by Claim ID; the daemon resolves the exact contract, window and Claim version. Returns the mechanical Boolean outcome and relation.
Conditions and effects: terminal_run_id and terminal_record_digest must be supplied together. Missing/non-Boolean outcome refuses; procedure success alone is not settlement.
An observation counts at the time its Claim version was accepted, or at that version's own per-Claim re-check observed by the window's close; the identical bytes and row sets that keep a Claim fresh do not settle a prediction. See freshness in 0.5.0.
| Parameter | Default | Meaning |
|---|---|---|
prediction |
Required | Contract name or bound window id (RSC-...); an exact contract reference is the advanced form. |
observation |
Required | Claim ID of the accepted observation; an exact Claim version reference is the advanced form. |
trigger_event |
None |
Retained trigger-event reference, when the contract/run requires event binding. |
terminal_run_id |
None |
Run whose terminal evidence supports settlement; supplied together with terminal_record_digest. |
terminal_record_digest |
None |
Exact retained terminal record; supplied together with terminal_run_id. |
Cruxible.attest
attest(
claim: ClaimRef | str,
*,
stance: ClaimStance,
signer: ClaimAttestationSigner,
because: str | None = None,
evidence: Evidence | None = None,
valid_until: datetime | None = None,
) -> ClaimAttestationAppendResult
Signs that the caller examined the exact Claim and appends it once. With neither because nor evidence it cites the Claim's own evidence; otherwise the daemon first makes or resolves the cited Captures from write's evidence options, at its head, and the statement signs them.
Conditions and effects: A signed append, never a proposal or generation; does not change the Claim's statement or sign a proposal approval. File and section evidence are read from this context's workspace; unobserved workspace evidence, or a workspace source with no accepted CaptureContract, refuses before signing.
| Parameter | Default | Meaning |
|---|---|---|
claim |
Required | Claim ID or typed ClaimRef; typed refs also assert their observed coordinate. |
stance |
Required | Signed attestation stance admitted by ClaimStance. |
signer |
Required | Caller-provisioned signing capability of the protocol required by this method. |
because |
None |
Your own words, cited as a self-source Capture bound to the Claim. |
evidence |
None |
One write evidence option: SelfEvidence, SectionEvidence (with own_words), FileEvidence, CaptureEvidence or ContractEvidence. |
valid_until |
None |
Optional attestation expiry instant. |
Cruxible.next
next(*, expiring_within: Duration | None = None) -> NextPage
Scans the attached workspace and reads actionable work with explicit access profile, evaluation time, and expiry horizon (expiring_within defaults to seven days, as cruxible next).
Conditions and effects: Inspect observed_domains/unobserved_domains; an empty page does not imply every possible domain was observed. print(page) shows what cruxible next prints (status, rows, repairs in SDK syntax, and page.unobserved, the reasons read from the workspace when next() observed it); repr() is its first line, and str() makes no request. Each row's repair.command is the SDK call that performs it (for example cx.line('hourly').enable()), leaving out an operand only the caller holds, such as the signer or the observation; it is None when the SDK has no method for that repair.
| Parameter | Default | Meaning |
|---|---|---|
expiring_within |
None (seven days) |
A cruxible_client.Duration: how far ahead expiring evidence counts. Only fields that set stale_after expire; see freshness in 0.5.0. |
Cruxible.duplicates
duplicates(kind: str, *, limit: int | None = None, cursor: str | None = None) -> DuplicatesAuditResult
Lists possible duplicates of one kind: Subjects whose ids, aliases or values of
one predicate meet under a broad comparison (casefold, no punctuation, the
alias graph) but differ under the declared rules, and Subjects of a hint kind
that hold one key. Resolve with a semantic.alias and a retirement, or assert
semantic.distinct_from.
Conditions and effects: A pure, bounded read; a cut page carries next_cursor.
Cruxible.audit
audit(
*,
claim_type_identities: tuple[str, ...] = (),
subject_kinds: tuple[str, ...] = (),
max_rows: int = 100,
max_bytes: int = 65536,
cursor: api.AuditCursor | Mapping[str, object] | None = None,
) -> api.AuditResult
Reads a bounded ranking of visible Claim-verification work.
Conditions and effects: Does not alter accepted Claims or attest to correctness.
| Parameter | Default | Meaning |
|---|---|---|
claim_type_identities |
() |
Optional audit filter by accepted ClaimType identities. |
subject_kinds |
() |
Allowed or selected Subject kinds, depending on authoring versus audit. |
max_rows |
100 |
Maximum returned rows for a bounded read. |
max_bytes |
65536 |
Byte bound for this operation, in bytes. It is not permission to exceed effective daemon policy. |
cursor |
None |
Opaque continuation returned by the same operation; retains its selection/snapshot. |
Procedure entry points
Cruxible.procedure
procedure(
*,
definition: ProcedureInput | ProcedureSequence,
) -> ProcedureDraft
Builds a ProcedureDraft from a ProcedureInput ({kind: procedure, spec}, the
one typed ProcedureSpec) or a Sequence (which builds that same spec). Each
slot names a capability ({"capability": "workspace.file@1"}); a Line binds it.
Conditions and effects: Current definitions use graph format 8. A
Procedure names no provider: each slot names a capability, and each extract a
record set of its CaptureKind's layout. How an accepted Procedure runs (directly, only as a Line, or not at all)
is the runnable field of cx.get(f"Procedure:{name}").
| Parameter | Default | Meaning |
|---|---|---|
definition |
Required | Typed definition being authored; use the exact input type shown in this operation’s signature. |
Cruxible.accepted_procedure
accepted_procedure(procedure: str | ProcedureRef) -> Procedure
Returns an accepted Procedure handle; a typed ProcedureRef retains its coordinate.
Conditions and effects: Does not execute; a name on a live context follows live reads. Use a pinned context or ref for a fixed selection.
| Parameter | Default | Meaning |
|---|---|---|
procedure |
Required | Procedure name or typed reference. |
Cruxible.line
line(name: str) -> Line
Returns a handle on one accepted Line by name. Each handle call reaches the daemon.
Conditions and effects: Does not read or write by itself. A Trigger aimed at a Line does nothing until the Line is enabled; cx.get(f"Line:{name}") reads its enablements (pinned Line and Trigger versions, evaluated_until), Triggers, pending work and runs.
| Method | Effect |
|---|---|
.enable(*, dry_run=None, at=None) -> LineEnablement |
Enable forward-only under this connection's credential, pinned to the current Line and Trigger versions; never catches up. Needs governed write even for an observe-only Line; a proposing or settling Line needs a covering ProcedureMandate. Repeating it unchanged returns outcome="already_enabled". |
.disable(*, dry_run=None, at=None) -> LineEnablement |
Stop admitting work automatically; admitted runs keep going. A stopped enablement returns outcome="already_disabled". A retired Line can be disabled. |
.run(*, event=None, repeat=False, occurrence_id=None, resolution_contract=None, parameters=None) -> ProcedureRun |
Run the Line once now as one manual occurrence under its own inputs, budgets, authority ceiling and mandate; never selects or consumes a Trigger. parameters override the Line's for this run only, checked against the Procedure's params Contract; a run whose parameters differ from the Line's runs without the Line's mandate (it may propose, never settle). event is the retained Capture event a Line whose Procedure takes an event input runs on; an event its Triggers already admitted refuses unless repeat=True. May invoke providers, register captures, or submit proposals under admitted authority. |
.evaluate(*, since=None, until=None, dry_run=False, limit=100, cursor=None) -> LineEvaluateResult |
Turn a missed range into pending occurrences; never runs anything. dry_run=True only reports what the range makes eligible (no range needed); otherwise since and until are required. |
.dispatch(*, occurrence_id=None, limit=100, retry=False, cursor=None) -> LineDispatchResult |
Run pending occurrences under this connection's current authority. retry=True with an occurrence_id retries one closed occurrence. |
.ref |
"Line:<name>", for cx.get(line.ref). |
.name |
The Line's name. |
Cruxible.runbook
runbook(name: str) -> Runbook
Returns a handle on one accepted Runbook by name. Each handle call reaches the daemon.
Conditions and effects: Does not read or write by itself.
| Method | Effect |
|---|---|
.preview() -> RunbookPreview |
What each step can read, write, call, settle, propose and set off, from accepted definitions only; nothing runs. |
.run() -> RunbookRunResult |
Run the steps now, in order, each Line as your manual run and each action fired as action run fires it; stops at the first step that fails or sends writes to review. Needs governed write. |
.ref |
"Runbook:<name>", for cx.get(runbook.ref). |
.name |
The Runbook's name. |
Cruxible.whoami
whoami() -> api.WhoAmI
Who this connection acts as and where that came from, its permission mode and principal registration, and whether it can author here: can_author and authoring_refusal carry the code, detail and repair authoring would return.
Cruxible.signer
signer(principal_id: str | None = None, *, key: str | Path | None = None) -> LocalEd25519ApprovalSigner
The local approval signer of one principal (default: who this connection acts as), for proposal.approve(signer=cx.signer("reviewer"), reviewed=review). The key is found as the CLI and the MCP server find it: key, else CRUXIBLE_PRINCIPAL_KEY unless CRUXIBLE_PRINCIPAL_ID names another principal, else the settings cruxible init or cruxible principal add remembered for that principal on this instance, else the folder's identity record when it names it (a local socket connection only), else the default key directory cruxible init uses for that principal. It is never another principal's key. The key must sit outside the workspace. Opening it reads nothing from the daemon: approve checks it against the signer's registered principal in its challenge and refuses a key the instance does not hold for that principal, or an unknown principal, signing nothing. With no key found it raises SigningKeyError naming the repair (no signing key for principal nobody here; repair: pass cx.signer('nobody', key=FILE), or start this process with its settings loaded: ...).
Cruxible.kits
kits() -> KitStatus
The kits installed here: versions, provider packages and their install state, requirements, and any kit add waiting on review. Adding, removing or checking for a newer release stays a CLI step (cruxible kit add, kit remove, kit status), which reads the kit directory or registry.
Cruxible.inbox
inbox() -> Inbox
Returns a handle on the Line inbox: the items Lines posted for judgment through
a post_inbox terminal. Each handle call reaches the daemon.
Conditions and effects: An item is the payload exactly as posted (untyped
instance data) inside a core envelope: the Line, Procedure and node that posted
it, its dedupe key (payload, Line and node), how often it was seen
(occurrences), its first sighting and up to 5 most recent ones (each a run, its
time and the Captures its closure reached), its status and your latest
disposition. Posting never changes accepted state. The same payload posted again
by the same terminal, on any evidence, is one item seen again; if you already
decided it, it is unread again with that decision still shown. Reads need read permission; dispositions need governed
write.
| Method | Effect |
|---|---|
.list(*, line=None, status=None, limit=None, cursor=None) -> InboxRows |
One page of compact rows, most recently posted first; follow next_cursor. line is a Line name; status is unread, acknowledged, dismissed or linked. |
.get(item_id) -> InboxItem |
One item whole: envelope, payload and its 10 most recent dispositions, newest first (item.item.disposition_count, on the envelope, counts them all). item_id may be a unique INB- prefix of 12+ hex digits. |
.ack(item_id) -> InboxDispositionResult |
Acknowledge it: seen, owed nothing further. Repeating the current decision records nothing (recorded=False). |
.dismiss(item_id, *, reason) -> InboxDispositionResult |
Dismiss it with a recorded reason. |
.link(item_id, *, proposal=None, subject=None) -> InboxDispositionResult |
Link it to the proposal you wrote, or to an accepted Subject (kind/id, such as a note). Name exactly one. |
An InboxRows holds rows, truncated and next_cursor. Each InboxRow is
item_id, line, kind (the posting terminal), title (a one-line reading
of the payload, at most 80 characters), status and seen (how many runs
posted it); .get(item_id) returns the whole item. Pass row.item_id to
.get, .ack, .dismiss or .link:
page = cx.inbox().list(status="unread")
for row in page.rows:
print(row.item_id, row.line, row.title)
cx.inbox().ack(page.rows[0].item_id)
WriteBatch
Import: cruxible_client.authoring.sdk.WriteBatch. Source
Obtained from cx.changes(because=..., subject=...): value changes written
together as one change set, accepted or refused whole. Change and document
methods return the batch for chaining; .section(id) returns a citation,
and .write() sends the batch.
append_section(file, text='', *, heading=None, under=(), name=None, id=None) -> WriteBatch
replace_section(file, section, text, *, expect=None, id=None) -> WriteBatch
section(id: str) -> SectionEvidence
create(kind, *, key=None, create_new=False, expect_new=False, role=None, evidence=None, label=None) -> CreatedSubject
set(*operands, subject=None, evidence=None, supported_by=None, role=None, contend=False, expect=None) -> WriteBatch
add(*operands, subject=None, evidence=None, supported_by=None, role=None, expect_absent=False) -> WriteBatch
retire(target: str | ClaimRef | SubjectRef | SlotRef, *, because=None, reason='was-rescinded', expect=None, with_claims=False) -> WriteBatch
write(*, dry_run=False, accept='if_allowed', at=<this context's coordinate>) -> WriteOutcome
append_section with under=() appends at the end of the file and is the
only document method that creates a missing file. With under=("Heading", ...) the file and that heading must already exist, and replace_section
needs the file: otherwise the write refuses cruxible.doc.section_not_found and writes
nothing. To start a new file under a heading, append the heading at the root
first.
set and add are spelled set(field, value) (about the batch's subject)
or set(subject, field, value). set replaces a single-value field, add puts
one more value in a many-valued field, and retire ends one live Claim, by
Claim ID or SlotRef(field=...), or a Subject (kind/id: its key Claims
retire with it, its other live Claims only with with_claims=True).
append_section(file, heading="Decision", text="body") names the heading
once; without heading=, text starts with the heading line. create makes a Subject of kind by its
key in the same write (key is the value of a kind's one key, or {field: value} for each key field, a pair's end as kind/id, a handle or a draft;
none for a minted kind) and returns its handle, which set, add and another
create's key take as a Subject; a key a live Subject holds lands on it
(expect_new=True refuses instead). A cx.new_subject(...) draft works
wherever a handle does:
batch = cx.changes(because="Acme catalog 2026 adds the 2020 Civic.")
civic = batch.create("catalog.vehicle", key={"name": "honda-civic-2020"})
batch.add("catalog.part/bp-2210", "fits", civic)
print(batch.write())
# accepted (generation 10, bf79962037bd)
# create catalog.vehicle/honda-civic-2020: created
# add catalog.part/bp-2210 fits: catalog.vehicle/honda-civic-2020 [CLM-6a6b96c5…; verdict supported]
# + subject catalog.vehicle/honda-civic-2020
# next: cx.get("catalog.vehicle/honda-civic-2020")
File and section evidence cite a workspace file by path; a file the catalog
does not name is catalogued once the write is admitted, and
WriteOutcome.catalogued lists it. write() returns the WriteOutcome (accepted
in the same call when the approval policy and the caller's tier allow it,
otherwise awaiting approval) or raises WriteRefusalError. The same changes
are cruxible write on the CLI and cruxible_write on MCP.
ChangeSetDraft
Import: cruxible_client.authoring.sdk.ChangeSetDraft. Source
Obtained from cx.changes(rationale=...). Methods stage members; prepare()
preflights the whole set and submit() compiles and submits it in one request. claim, procedure, query_definition, line, trigger, policy,
contract, and attestation methods return this builder for chaining unless their
signature returns a pending ref. The pending Subject/ClaimType references may
be used by sibling Claims without pretending they already exist in accepted state.
| Field | Type | Default / construction |
|---|---|---|
rationale |
str | None |
None |
Member semantics
| Member | Return and effect | Additional requirements |
|---|---|---|
claim |
Stages one Claim; returns builder | Same value/evidence rules as Cruxible.claim. |
subject |
Stages a definition; returns PendingSubjectRef | Sibling Claims may use it. |
field |
Defines (or edits) <kind>.<name> with the short form's defaults; returns PendingClaimTypeRef |
Lowers through the function claim-type propose uses: own-words evidence rule, description, enum member meanings, key=True for a key. An edit carries live Claims. |
subject_kind |
Stages a SubjectKind: its keys, or minted | With no keys and not minted, takes the fields staged with field(..., key=True) for the kind. |
claim_type |
Stages a definition; returns PendingClaimTypeRef | Use succeed_claim_type for an accepted predecessor. |
succeed_claim_type |
Stages a full successor and closure dispositions | Exact reverse-pin closure; sibling reauthors retain Claim identity/subject/predicate. |
retire_claim_type |
Retires an accepted field; its live Claims retire with it | Several per set; lands when policy allows. CLI: cruxible claim-type retire. |
retire |
Stages an attributed Claim retirement | Explicit required dependents. |
signed_attestation |
Stages supplied signed bytes | Does not re-sign or accept them. |
attestation |
Reads/prepares the exact Claim, signs locally, then stages | Explicit signer; no implicit approval of the containing changeset. |
capture_contract, resolution_contract |
Stage typed definitions | Existing artifact contracts and normal admission apply. |
procedure, query_definition, procedure_mandate |
Stage the shared authoring inputs; procedure also takes a Sequence |
Same validation as the corresponding individual draft. |
line |
Stages a Line naming its Procedure and acquisition policy | Runs on cx.line(name).run(); its Triggers act only once it is enabled; omitted budgets inherit Procedure hard caps; admission still checks live authority. |
trigger |
Stages a Trigger: one schedule aimed at one Line or internal action | A Line takes any schedule that supplies its input; an internal action takes a cadence, cron or generation-accepted schedule. Cron is always evaluated in UTC. |
subject_kind |
Stages a SubjectKind: how Subjects of one kind are named (keys or minted); returns builder | Key ClaimTypes are literal, one-valued and about this kind only; accepted or defined in the set. |
prepare |
Creates/preflights one durable intent | Atomic decision; malformed member refuses the set. |
submit |
Compiles and submits the whole set in one request; returns the Intent |
A refused set returns the same diagnostics prepare reports. |
Definitions and successions precede dependent Claims during lowering. Two members cannot write the same artifact path. A live Claim cannot be carried unchanged through an object-kind change. The source of truth remains accepted artifacts; staging a definition does not mutate accepted state.
ChangeSetDraft.claim
claim(
*,
subject: str | SubjectRef | SubjectKeyReference,
predicate: str | ClaimTypeRef,
value: CanonicalValue | SubjectRef | SubjectKeyReference | LiteralValue | ExactContent,
role: ClaimRole | str,
rationale: str,
supported_by: EvidenceSelection | CaptureRef | None = None,
copied_from: EvidenceSelection | CaptureRef | None = None,
self_source: str | None = None,
qualifier: str | None = None,
effective_period: EffectivePeriod | None = None,
revises: str | ClaimRef | None = None,
dispositions: Mapping[str | ClaimRef, Disposition | str] | None = None,
subject_definition: SubjectDraft | None = None,
claim_type_definition: ClaimTypeDraft | None = None,
) -> ChangeSetDraft
Add one Claim to this changeset; the signature is Cruxible.claim's.
| Parameter | Default | Meaning |
|---|---|---|
subject |
Required | SubjectRef or accepted canonical Subject address; a Claim is about this Subject. |
predicate |
Required | ClaimType reference or canonical predicate address. |
value |
Required | Object value under the selected ClaimType; use SubjectRef or LiteralValue for the declared type. |
role |
Required | Normative, observation, environment_binding, or derivation role admitted by the ClaimType. |
rationale |
Required | Author-supplied explanation retained with this Claim/change decision. |
supported_by |
None |
Independent selected evidence or an evidence-role CaptureRef. Exactly one evidence-source argument is required. |
copied_from |
None |
Selected copied content or a reusable CaptureRef; does not upgrade it to independent evidence. |
self_source |
None |
Explicit self-asserted source text. Exactly one of supported_by, copied_from, self_source. |
qualifier |
None |
Optional qualifier of this Claim statement. |
effective_period |
None |
Optional effective start/end instants, distinct from capture and acceptance times. |
revises |
None |
Existing Claim identity to revise rather than minting a parallel lineage. |
dispositions |
None |
Existing contender Claim IDs mapped to explicit dispositions. Duplicate normalized IDs refuse. |
subject_definition |
None |
Subject draft carried with the Claim, if defining its Subject in the same operation. |
claim_type_definition |
None |
ClaimType draft carried with the Claim, if defining its predicate in the same operation. |
ChangeSetDraft.signed_attestation
signed_attestation(attestation: ClaimAttestation) -> ChangeSetDraft
Add an already signed statement, without changing its bytes or Claim.
It becomes accepted only when this changeset passes ordinary approval and activation. The authenticated submitter need not be its signer.
| Parameter | Default | Meaning |
|---|---|---|
attestation |
Required | Already signed immutable ClaimAttestation envelope. |
ChangeSetDraft.attestation
attestation(
claim: ClaimRef | str,
*,
stance: ClaimStance,
signer: ClaimAttestationSigner,
valid_until: datetime | None = None,
) -> ChangeSetDraft
Sign an exact Claim and stage it in this governed batch.
| Parameter | Default | Meaning |
|---|---|---|
claim |
Required | Claim ID or typed ClaimRef; typed refs also assert their observed coordinate. |
stance |
Required | Signed attestation stance admitted by ClaimStance. |
signer |
Required | Caller-provisioned signing capability of the protocol required by this method. |
valid_until |
None |
Optional attestation expiry instant. |
ChangeSetDraft.subject
subject(definition: SubjectDraft | SubjectShell | SubjectCreationDraft) -> PendingSubjectRef
Define one Subject inside this changeset, and return a ref to it.
A Claim member may still carry its Subject as a dependency draft; this is for the Subjects a set defines that no single Claim owns.
The ref it returns is usable as subject= or value= in the same set,
which is what lets one changeset define a Subject and say something
about it without the caller retyping the address as a string.
| Parameter | Default | Meaning |
|---|---|---|
definition |
Required | Typed definition being authored; use the exact input type shown in this operation’s signature. |
ChangeSetDraft.capture_contract
capture_contract(contract: CaptureContract | CaptureContractInputRecord) -> ChangeSetDraft
Define one CaptureContract inside this changeset.
| Parameter | Default | Meaning |
|---|---|---|
contract |
Required | Typed contract or exact contract reference named by the signature. |
ChangeSetDraft.resolution_contract
resolution_contract(contract: ResolutionContract) -> ChangeSetDraft
Define one ResolutionContract inside this changeset.
| Parameter | Default | Meaning |
|---|---|---|
contract |
Required | Typed contract or exact contract reference named by the signature. |
ChangeSetDraft.procedure
procedure(*, definition: ProcedureInput | ProcedureSequence) -> ChangeSetDraft
Compose a Procedure with its Line and mandate in one existing changeset.
| Parameter | Default | Meaning |
|---|---|---|
definition |
Required | Typed definition being authored; use the exact input type shown in this operation’s signature. |
ChangeSetDraft.procedure_mandate
procedure_mandate(definition: ProcedureMandateInput) -> ChangeSetDraft
Stage a typed mandate through the shared authoring-input lowering.
| Parameter | Default | Meaning |
|---|---|---|
definition |
Required | Typed definition being authored; use the exact input type shown in this operation’s signature. |
ChangeSetDraft.line
line(
*,
name: str,
procedure: str,
bindings: Mapping[str, str] | None = None,
findings: LineFindings | None = None,
acquisition: Mapping[str, Mapping[str, object]] | None = None,
max_authority: Literal["observe", "propose", "settle"] | None = None,
trigger_input: str | None = None,
parameters: CanonicalValue | None = None,
budgets: Mapping[str, int] | None = None,
occurrence_epoch: int = 1,
retire: bool = False,
) -> ChangeSetDraft
Define one Line inside this changeset, naming its Procedure and slot bindings.
Define the Line with line(...), then author its schedule with
trigger(...). Cron expressions are always evaluated in UTC.
Lowering pins the Procedure's exact version (accepted at the base or defined
earlier in this same set) and binds every slot to one exact {build, operation}: bindings maps a slot (or <invoke node>.<slot>) to
provider[/build]#operation; a slot left out is fitted, and exactly one live
operation must serve its capability and fit it. A Line runs when run
explicitly (cx.line(name).run()), or, once it is enabled
(cx.line(name).enable()), when a Trigger aimed at it fires; a Trigger aimed
at a Line that is not enabled does nothing. It inherits the Procedure's hard
caps as its budget unless one is given. trigger_input binds the triggering
Capture to one capture output (<alias>.<field>); the Line then accepts only
that field's exact CaptureContract event, and every Trigger aimed at it must
fire on it.
Lowering refuses a Procedure with an exhaust_tap node: no run path admits
one. acquisition maps a capture output (<alias>.<field>) to {max_age, on_unavailable, ...}. parameters are the values of the Procedure's
params: a Line run's input is empty, so a value a Line supplies is declared
as a param (line_parameters_refused otherwise). max_authority (observe,
propose or settle) caps this Line below its Procedure's own capability and
defaults to it. A Line that proposes or settles also needs a live
ProcedureMandate covering its Procedure before it can run or be enabled
(enabling needs governed write even for an observe-only Line, which needs no
mandate).
| Parameter | Default | Meaning |
|---|---|---|
name |
Required | Definition identity name, not an arbitrary file path. |
procedure |
Required | Procedure name: accepted, or defined earlier in the same changeset. |
bindings |
None |
Slot to provider[/build]#operation; a slot left out is fitted by capability. |
findings |
None |
Which run finding kinds go to the Line's inbox ({"inbox": [...]}); omitted routes none. |
acquisition |
None |
Per capture output (<alias>.<field>), its age bound and what to do when unavailable, stale or oversized. |
max_authority |
None |
Most this Line may do: observe, propose or settle. Defaults to its Procedure's capability; effective authority is checked at admission. |
trigger_input |
None |
Capture output (<alias>.<field>, of a call with that one capture field) receiving the exact triggering Capture; the Line accepts only that field's CaptureContract event, and Triggers aimed at it must fire on it. |
parameters |
None |
The Procedure's params values, checked against its params Contract over its parameter defaults. |
budgets |
None |
The Line's operating budget, within the Procedure's hard caps. |
occurrence_epoch |
1 |
Positive epoch distinguishing Line occurrence identity; it advances when the accepted event changes. |
retire |
False |
Whether the authored Line is a retirement. Live Triggers aimed at it must be retired or retargeted in the same set. |
ChangeSetDraft.trigger
trigger(
*,
name: str,
schedule: AuthoringTriggerSchedule,
line: str | None = None,
action: InternalActionName | None = None,
retire: bool = False,
) -> ChangeSetDraft
Define one Trigger inside this changeset: a schedule aimed at one target.
Name exactly one of line (an accepted Line, or one defined in this same
set) or action (a registered internal action: floor.refresh,
evidence.sweep or prediction.anchor_retry). A Line can
have several Triggers, and they do nothing until the Line is enabled.
schedule is a CadenceSchedule(interval_seconds=...),
CronSchedule(expression=...), GenerationAcceptedSchedule(),
CaptureLandingByNameSchedule(capture_contract="security.advisory") (from
cruxible_client.contracts.authoring.models) or
WindowCloseAuthoringSchedule(window=...) from the same module. A window is
FixedWindow(...) or
CaptureEventByNameWindow(capture_contract="security.advisory", duration_seconds=60).
Prepare resolves the named live contract at the pinned base or in the same
ChangeSet, regardless of declaration order, and stores its exact identity, digest
and pins. Inspect intent.resolved_trigger_contracts before submitting.
Capture-based authoring takes a contract name only; exact event selectors
are refused. With retire=True, core retains the predecessor's stored schedule
and target without resolving a contract; the supplied schedule is ignored.
Contract succession still needs the existing dependency-closure dispositions. Cron
expressions are always evaluated in UTC: convert local times first (09:00 New
York in winter is 14:00 UTC); a schedule that names a timezone is refused. An
internal action takes a cadence, cron or generation-accepted schedule. A Line takes any schedule that supplies
its input: a Line with trigger_input needs one that fires on its exact
CaptureContract event. No Trigger fires retroactively: a new cadence first
fires one interval after acceptance, a cron schedule at its first instant
after acceptance, and Captures and windows count only when strictly after it.
from cruxible_client.contracts.triggers import CronSchedule
draft = cx.changes(rationale="Triage new findings each weekday morning")
draft.line(name="triage", procedure="triage-procedure")
draft.trigger(
name="triage-weekdays",
schedule=CronSchedule(expression="0 14 * * 1-5"), # 09:00 New York (EST), in UTC
line="triage",
)
draft.submit()
| Parameter | Default | Meaning |
|---|---|---|
name |
Required | Trigger identity name (triggers/<name>.json). |
schedule |
Required | Cadence, cron (UTC), generation accepted, capture landing, or window close. |
line |
None |
Accepted or same-set Line this Trigger runs; omit when naming an action. |
action |
None |
Registered internal action this Trigger fires (cadence or cron only); omit for a Line. |
retire |
False |
Whether the authored Trigger is a retirement. |
ChangeSetDraft.query_definition
query_definition(
definition: QueryDefinitionInput,
*,
vocabulary: Sequence[ClaimTypeRef] = (),
) -> ChangeSetDraft
Add a named query after its vocabulary definitions in this changeset.
| Parameter | Default | Meaning |
|---|---|---|
definition |
Required | Typed definition being authored; use the exact input type shown in this operation’s signature. |
vocabulary |
() |
World ClaimType references used by the query, retaining stale-reference assertions. |
ChangeSetDraft.claim_type
claim_type(definition: ClaimTypeDraft | ClaimType) -> PendingClaimTypeRef
| Parameter | Default | Meaning |
|---|---|---|
definition |
Required | Typed definition being authored; use the exact input type shown in this operation’s signature. |
ChangeSetDraft.retire
retire(
claim: str | ClaimRef,
*,
reason: ClaimRetirementReason,
effective_until: datetime | None = None,
dependents: Sequence[ClaimRetireDependent] = (),
) -> ChangeSetDraft
Retire one accepted Claim, and its live closure, inside this changeset.
Takes a Claim ID in either spelling the SDK's rows and refs use
(CLM-... or Claim:CLM-...). The member carries the one canonical bare
spelling as retires, which is what keeps two spellings of one
retirement on one member identity and one digest. Cruxible.retire is
the typed write verb for the common case: it computes the closure.
| Parameter | Default | Meaning |
|---|---|---|
claim |
Required | Claim ID or typed ClaimRef; typed refs also assert their observed coordinate. |
reason |
Required | Attributed reason for refusal, retirement, or operational action as specified by the API. |
effective_until |
None |
Optional effective-end instant for retirement. |
dependents |
() |
Explicit dependency-closure dispositions required by retirement or ClaimType succession. |
ChangeSetDraft.field
field(
kind: str,
name: str,
value_type: FieldType | str,
*,
description: str | None = None,
many: bool | None = None,
members: Mapping[str | int | bool, str] | None = None,
key: bool = False,
default_role: ClaimRole | str | None = None,
evidence: Sequence[str] | None = None,
canonical_form: Sequence[str] | None = None,
sources: Sequence[str] = (),
) -> PendingClaimTypeRef
Define (or edit) one field of a kind, with the short form's defaults. The
same request through cruxible claim-type propose gives the same ClaimType and
digest. prepare() returns its lint. evidence=[...] lists the shaped
CaptureContracts that back the field; own words and workspace file and section
citations need no entry. sources= is retired and refuses.
from cruxible_client.contracts.shapes import EnumType
changes = cx.changes(rationale="Project items.")
changes.field("dev.item", "slug", "string{pattern: \"^[a-z0-9-]+$\", max_len: 80}",
description="The item's short name.", key=True)
changes.field("dev.item", "state", EnumType(members=("open", "done")),
description="Whether it is done.",
members={"open": "Not done.", "done": "Done."})
changes.field("dev.item", "blocks", "subject<dev.item>", many=True,
description="Items it blocks.")
changes.subject_kind(name="dev.item", description="A planned piece of work.")
intent = changes.prepare() # intent.warnings: the lint, each naming its field
intent.submit()
ChangeSetDraft.retire_claim_type
retire_claim_type(
predicate: str | ClaimTypeRef,
*,
reason: ClaimRetirementReason = "superseded",
) -> ChangeSetDraft
Retire one accepted field. Its live Claims retire with reason; retired
Claims and Documents in its closure are carried.
ChangeSetDraft.succeed_claim_type
succeed_claim_type(
successor: ClaimTypeDraft | ClaimType,
*,
dependents: Sequence[ClaimTypeSuccessionDependent] = (),
) -> ChangeSetDraft
Succeed one accepted ClaimType, and settle its closure, in this set.
Vocabulary evolution is one epistemic move -- "I need this distinction,
and here is everything it changes" -- so it lands in the same signed
generation as the Claims that speak the new vocabulary. Write the
dependents with carry, rescind, retire and re_author; the
closure must be exact, and preflight names every member of it that is
still missing.
| Parameter | Default | Meaning |
|---|---|---|
successor |
Required | Complete successor ClaimType naming its predecessor. |
dependents |
() |
Explicit dependency-closure dispositions required by retirement or ClaimType succession. |
ChangeSetDraft.subject_kind
subject_kind(
*,
name: str,
keys: Sequence[str] = (),
uniqueness: Literal['unique', 'hint'] | None = None,
minted: bool = False,
description: str | None = None,
retire: bool = False,
normalizers: Mapping[str, KeyNormalizer] | None = None,
) -> ChangeSetDraft
Declares how Subjects of one kind are named: by key ClaimTypes, or minted.
Every new Subject is of a kind with an accepted SubjectKind. keys names the
key ClaimTypes in key order (each about this kind only, literal and one-valued,
accepted or defined in the same set); uniqueness unique (the default)
refuses a second Subject with the same key, hint only surfaces it in the
duplicates audit. minted=True has core mint opaque ids instead. normalizers
maps a key to its identity normalizer, pinned by version. See Defining a
vocabulary.
| Parameter | Default | Meaning |
|---|---|---|
name |
Required | The kind, e.g. shop.part. |
keys |
() |
Key ClaimTypes by predicate, in key order. |
uniqueness |
None (unique) |
hint admits a second holder of a key. |
minted |
False |
Ids are minted; no keys. |
description |
None |
What a Subject of the kind is. |
retire |
False |
Retire the kind's SubjectKind. |
normalizers |
None |
Key (predicate or last name) -> identity normalizer; unnamed keys take none@1. |
ChangeSetDraft.submit
submit(*, accept: Literal['if_allowed', 'never'] = 'if_allowed') -> Intent
Compiles and submits the whole set as one intent in one request. It lands when
the approval policy and the caller allow; accept="never" keeps the proposal.
intent.outcome says which; a refused set returns the same diagnostics
prepare reports (print(intent) shows them).
ChangeSetDraft.prepare
prepare() -> Intent
Compile and preflight the whole changeset as one intent.
Drafts, intents, proposals, and approvals
ClaimDraft, ProcedureDraft, QueryDraft, and SubjectDraft inherit
prepare() -> Intent and submit(accept="if_allowed") -> Intent. They expose payload, reference_expectations,
program_stamp, and source_map for inspection. prepare() performs server
compilation/preflight; submit() compiles and lands in one request when no
approval is required and the caller may activate. intent.outcome reports
landed with the accepted coordinate, proposed with the proposal ID,
typed stop reason and next step, or refused (AuthoringRefused, reason
preflight_refused, no proposal) when the payload failed preflight: running
preflight again changes nothing, so its next step is a revised payload
resubmitted to the same intent. submit(accept="never") keeps the proposal.
The daemon preflights once, and a refused intent carries the same refused and
diagnostics that prepare() reports; the program stamp is structured authoring provenance,
not retained executable Python source. ClaimTypeDraft.propose(...) is a direct
proposal helper and submits immediately; it is not a synonym for local staging. It
returns a ClaimTypeProposal: the plain Proposal handle and the typed
evidence-policy lint that claim-type propose serves for the same definition.
Intent and Proposal are obtained from SDK factories. from_preflight is an
advanced response adapter. Cached properties are not
automatic status polling. Intent.path_to_acceptance calls status.
A refused intent whose base the accepted head moved past advances to the head
on prepare() or submit() when it checks clean there; a payload fault stays
refused. reprepare() requires the same owning connection.
Proposal.review() returns an immutable process-local ReviewedProposal.
approve(signer=..., reviewed=...) checks exact proposal/candidate/session/instance
binding, obtains current governance/challenge data, signs locally, and submits
public approval; the approval that completes the candidate also activates it
unless hold=True. The approval is bound to the reviewed candidate: if
accepted state moved and the daemon proposed the change again at the head,
approve raises cruxible.approval.reviewed_candidate_changed, naming the
new proposal and whether its members are identical, and signs nothing; review
that proposal and approve it. The daemon's refusal arrives as a CoreError
(cruxible_client.contracts.errors) whose error_code is that code (not as an instance of the
ReviewedCandidateChanged contract class, so test error_code); its repair
is the review of the successor (exc.repair.arguments["proposal_id"]), and the
message ends with that call in SDK syntax. The replaced proposal then reads
settled with reason superseded and superseded_by naming its successor
(cx.get(proposal_id), cx.proposals()). Every acceptance moves the head, so
with several proposals open, review each one after the one before it has
landed: a review taken earlier names a candidate the daemon has since replaced. A
ProposalRecompiled is returned only when every change is already live.
A daemon older than this client cannot bind an approval: approve raises
cruxible.approval.reviewed_binding_unsupported and signs nothing; upgrade
the daemon.
Activation
refuses cruxible.approval.requirement_unsatisfied until the approvals are
in, also when the base moved, and changes nothing; acting again on an accepted
proposal refuses cruxible.proposal.already_accepted. Approval and activation
receipts name the proposal a landed one replaces in readmits, and while
approvals remain the approval receipt names required_signers and
eligible_signers. A signer registered after the proposal's base cannot sign
the reviewed candidate: the daemon lands the proposal at the head, and
approve raises the same cruxible.approval.reviewed_candidate_changed naming
the landed proposal to review and approve instead (a caller without approval rights gets
ApprovalSignerAfterBase, cruxible.approval.signer_after_base, whose repair
is the author's readmit). Approve, activate, readmit, reject and withdraw need a named principal: a connection that names none
refuses cruxible.identity.principal_unconfigured. The review token's
.details returns a fresh copy. The token is not proof a
human read it. A new process must review again. Wait methods return the last
observed status at timeout; they do not throw a synthetic failure or retry writes.
ClaimDraft
Import: cruxible_client.authoring.sdk.ClaimDraft. Source
| Field | Type | Default / construction |
|---|---|---|
payload |
ClaimAuthoringPayload | ProcedureAuthoringPayload | SubjectAuthoringPayload | ChangeSetAuthoringPayload | QueryDefinitionAuthoringPayload |
Required |
reference_expectations |
tuple[AuthoringReferenceExpectation, ...] |
Required |
program_stamp |
AuthoringProgramStamp |
Required |
source_map |
DiagnosticSourceMap |
Required |
ClaimDraft.derived_by
derived_by(derivation: object) -> ClaimDraft
ProcedureDraft
Import: cruxible_client.authoring.sdk.ProcedureDraft. Source
| Field | Type | Default / construction |
|---|---|---|
payload |
ClaimAuthoringPayload | ProcedureAuthoringPayload | SubjectAuthoringPayload | ChangeSetAuthoringPayload | QueryDefinitionAuthoringPayload |
Required |
reference_expectations |
tuple[AuthoringReferenceExpectation, ...] |
Required |
program_stamp |
AuthoringProgramStamp |
Required |
source_map |
DiagnosticSourceMap |
Required |
QueryDraft
Import: cruxible_client.authoring.sdk.QueryDraft. Source
| Field | Type | Default / construction |
|---|---|---|
payload |
ClaimAuthoringPayload | ProcedureAuthoringPayload | SubjectAuthoringPayload | ChangeSetAuthoringPayload | QueryDefinitionAuthoringPayload |
Required |
reference_expectations |
tuple[AuthoringReferenceExpectation, ...] |
Required |
program_stamp |
AuthoringProgramStamp |
Required |
source_map |
DiagnosticSourceMap |
Required |
SubjectDraft
Import: cruxible_client.authoring.sdk.SubjectDraft. Source
| Field | Type | Default / construction |
|---|---|---|
payload |
ClaimAuthoringPayload | ProcedureAuthoringPayload | SubjectAuthoringPayload | ChangeSetAuthoringPayload | QueryDefinitionAuthoringPayload |
Required |
reference_expectations |
tuple[AuthoringReferenceExpectation, ...] |
Required |
program_stamp |
AuthoringProgramStamp |
Required |
source_map |
DiagnosticSourceMap |
Required |
shell |
SubjectShell |
Required |
SubjectDraft.address
address: str
ClaimTypeDraft
Import: cruxible_client.authoring.sdk.ClaimTypeDraft. Source
| Field | Type | Default / construction |
|---|---|---|
definition |
ClaimType |
Required |
ClaimTypeDraft.predicate
predicate: str
ClaimTypeDraft.propose
propose(*, proposal_name: str) -> ClaimTypeProposal
Returns the proposal handle (.proposal) and its typed lint (.lint, an
api.ClaimTypeProposalLint whose warnings are ClaimTypeLintWarnings).
Intent
Import: cruxible_client.authoring.sdk.Intent. Source
print(intent) shows its state, proposal and outcome and, when refused, each
diagnostic with its repair; repr() stays one line. A WriteOutcome and an
intent.outcome print as the CLI prints them, through
contracts.text_display. Every SDK result that prints as CLI text (write
outcomes, landings, orient, next pages, get cards, proposal reviews, vocabulary
results, inbox items and dispositions, Line enablements, Runbook previews and
runs, proposal pages, whoami, kit status, and approval and activation receipts)
has a repr() of that text's first line (a proposal page's counts it);
model_dump() (or the result's fields) is the model.
Intent.from_preflight
from_preflight(
cx: Cruxible,
draft: _IntentDraft,
result: api.AuthoringPreflightResult,
) -> Intent
Intent.intent_id
intent_id: str
Intent.revision
revision: int
Intent.refused
refused: bool
Intent.lint
lint: api.ClaimTypeProposalLint | None
Intent.warnings
warnings: tuple[api.ClaimTypeLintWarning, ...]
Intent.resolved_trigger_contracts
@property
def resolved_trigger_contracts(self) -> tuple[ResolvedTriggerCaptureContract, ...]
Contract identities and digests resolved by the last prepare, one row per
Capture-based Trigger. Next: inspect each event, then intent.submit().
Intent.diagnostics
diagnostics: tuple[Diagnostic, ...]
Intent.path_to_acceptance
path_to_acceptance: tuple[dict[str, object], ...]
Intent.proposal
proposal: Proposal | None
Last observed proposal identity, without a server read.
Populated by resume_intent(), submit() or status(); None means no proposal was observed for this local intent revision. Call status() for fresh server state. This handle is not review, approval, or proof of activation eligibility.
Intent.prepare
prepare() -> Intent
Intent.reprepare
reprepare(*, draft: ClaimDraft | ProcedureDraft | SubjectDraft) -> Intent
Intent.submit
submit(*, accept: WriteAccept = "if_allowed") -> Intent
Intent.status
status() -> api.CandidateStatusRecord
Intent.wait_for_acceptance
wait_for_acceptance(*, timeout: Duration, poll_interval: Duration) -> api.CandidateStatusRecord
Polls status() until the intent is accepted, terminal or superseded, or
timeout passes, and returns the last status. timeout and poll_interval
(like Cruxible.next's expiring_within) are cruxible_client.Duration
values, a whole number of microseconds: build one with Duration.days(count=1),
Duration.hours(count=1) or Duration.microseconds(count=5_000_000) (five
seconds). A datetime.timedelta or an ISO 8601 string is not accepted.
Proposal
Import: cruxible_client.authoring.sdk.Proposal. Source
Proposal reviews, approves, activates, readmits, rejects and withdraws. A
reviewer rejects another actor's proposal with proposal.reject(reason), and
the proposal's own actor withdraws it with proposal.withdraw(reason) (the
CLI's proposal reject and proposal withdraw; the transport's
CruxibleClient.reject_proposal and withdraw_proposal). Each acts as the
principal the connection names: open the reviewer's connection with
Cruxible.connect(principal_id="reviewer"). With daemon auth off, a second
approver between agents is a convention, not a security boundary: any process
of the OS user can read both keys.
To approve with a key on disk, cx.signer("reviewer") opens that principal's
signer from its remembered settings (or cx.signer("reviewer", key=FILE)). To
open one by hand, use a LocalEd25519ApprovalSigner with the
principal's registered public key as expected_public_key: 64 hex characters,
as cx.get("Principal:NAME").value.public_key (or cruxible get Principal:NAME) shows it. The .pub file next to a key, in OpenSSH form
(ssh-ed25519 ...), is not that form and is refused as a key that does not
match the principal.
Proposal.review
review() -> ReviewedProposal
Fetch an immutable full review; read it before approving. print(review)
shows what cruxible proposal review prints: each value change with what it
cites and the cited text, then one block per definition. review.summary is
that page as a ProposalReviewSummary, and review.details the full
candidate review.
Proposal.activate
activate() -> api.ProposalActivationResult
Activates this proposal once its approvals are in: Cruxible.activate by handle.
Proposal.readmit
readmit(*, dry_run: bool | None=None, at: str | None=None) -> api.ProposalReadmitResult
Recompiles retained authoring/write or Procedure input at head (other origins readmit bytes) under a fresh proposal ID; review it normally. Activate and approve may return ProposalRecompiled, naming the new ID and members_identical; no approval carries. changed_members lists up to 50 sorted member paths with an added, replaced, or removed change; changed_members_truncated marks a longer list.
Proposal.reject
reject(reason: str, *, dry_run: bool | None=None, at: str | None=None) -> api.ProposalRejectResult
A reviewer's terminal statement on another actor's open or stale proposal, with the reason its author reads: the proposal leaves the open inventory and every settlement door refuses it. Your own proposal you withdraw instead (the refusal says so). Needs graph write; dry_run=True checks it and records nothing. The author reads who rejected it, when and why as closed_by, closed_at and closed_reason on cx.get(proposal_id) (the reason whole) and on its cx.proposals() entry; a withdrawn proposal carries the same three, with its author as closed_by.
Proposal.withdraw
withdraw(reason: str, *, dry_run: bool | None=None, at: str | None=None) -> api.ProposalWithdrawResult
Withdraws your own open or stale proposal: it will never be activated. Only its author withdraws it; anyone else is refused cruxible.proposal.withdraw_not_author, whose repair is Proposal.reject.
Proposal.approve
approve(
*, signer: ApprovalSigner, reviewed: ReviewedProposal, hold: bool = False
) -> api.ProposalApprovalResult
Sign this exact review with caller-configured custody. The approval that
completes the candidate activates it in the same call (receipt.activation)
when the caller may activate; hold=True signs only. receipt.not_activated
says why nothing activated, and while approvals remain receipt.required_signers
and receipt.eligible_signers say whose. When accepted state moved since the
review, or the signer was registered after the proposal's base, the daemon
proposes the change again at the head and approve raises a CoreError with
error_code cruxible.approval.reviewed_candidate_changed naming that
proposal; nothing is signed: review and approve that one. A review from another
session, instance or proposal raises ApprovalReviewMismatch before anything
is sent. Under independent approval the proposal's own author is refused
cruxible.approval.creator_forbidden; the reviewer approves on its own
connection:
rx = Cruxible.connect(principal_id="reviewer")
proposal = rx.proposal(proposal_id)
review = proposal.review()
print(review)
receipt = proposal.approve(signer=rx.signer(), reviewed=review)
print(receipt)
# approved sha256:97566939... by reviewer
# activated sha256:97566939... by reviewer: accepted at cb7b7f086789
Prediction
Import: cruxible_client.authoring.sdk.Prediction. Source
| Field | Type | Default / construction |
|---|---|---|
contract_identity |
str |
Required |
contract_digest |
str |
Required |
intent_id |
str |
Required |
proposal_id |
str |
Required |
Prediction.proposal
proposal: Proposal
PredictionSettlement
Import: cruxible_client.authoring.sdk.PredictionSettlement. Source
| Field | Type | Default / construction |
|---|---|---|
prediction_id |
str |
Required |
outcome |
bool |
Required |
relation |
dict[str, object] |
Required |
ClaimView
Import: cruxible_client.authoring.sdk.ClaimView. Source
| Field | Type | Default / construction |
|---|---|---|
claim_id |
str |
Required |
revision |
int |
Required |
subject |
str |
Required |
predicate |
str |
Required |
qualifier |
str | None |
Required |
role |
str |
Required |
object_kind |
str |
Required |
value |
object |
Required |
lifecycle_state |
str |
Required |
verdict |
str |
Required |
captures |
tuple[CaptureRef, ...] |
Required |
claim_id is the qualified Claim:CLM-...; the claim property is the bare
CLM-... that QueryClaimValue.claim, query Claim cells and the keys of
read_whole_many use, so a view and a value join on view.claim == item.claim.
KnowledgeCard
Import: cruxible_client.authoring.sdk.KnowledgeCard. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
RefKind |
Required |
identity |
str |
Required |
coordinate |
AcceptedCoordinate |
Required |
value |
object |
Required |
KnowledgeCard.ref
ref: TypedRef
NextPage
Import: cruxible_client.authoring.sdk.NextPage. Source
| Field | Type | Default / construction |
|---|---|---|
coordinate |
AcceptedCoordinate |
Required |
evaluation_time |
str |
Required |
items |
tuple[api.NextItem, ...] |
Required |
result_digest |
str |
Required |
observed_domains |
tuple[str, ...] |
Required |
unobserved_domains |
tuple[str, ...] |
Required |
status |
NextStatus |
Required |
attestation_head_digest |
str | None |
None |
unobserved |
tuple[str, ...] |
() |
No row is left out for this caller: a row or nested finding whose repair this caller cannot perform stays in items with repair withheld and repair_requires naming the tool, the tier and why; a status facet in the same position carries repair_hidden: true. status.held counts the rows an unsure attestation holds.
NextPage.__iter__
__iter__()
MeasurementOutcome
Import: cruxible_client.authoring.sdk.MeasurementOutcome. Source
| Field | Type | Default / construction |
|---|---|---|
measurement_name |
str |
Required |
status |
str |
Required |
reading_status |
str |
Required |
verdict |
str | None |
Required |
resolution_id |
str | None |
Required |
reading_id |
str | None |
Required |
detail |
str | None |
Required |
raw |
api.ProcedureMeasurementRow |
Required |
MeasurementBatch
Import: cruxible_client.authoring.sdk.MeasurementBatch. Source
| Field | Type | Default / construction |
|---|---|---|
run_id |
str | None |
Required |
activation_coordinate |
AcceptedCoordinate |
Required |
observation_coordinate |
AcceptedCoordinate |
Required |
observation_time |
datetime |
Required |
outcomes |
tuple[MeasurementOutcome, ...] |
Required |
raw |
api.ProcedureMeasureResult |
Required |
MeasurementBatch.__getitem__
__getitem__(measurement_name: str) -> MeasurementOutcome
ReviewedProposal
Import: cruxible_client.authoring.approval.ReviewedProposal. Source
Use Proposal.review(); .details is a defensive copy of the exact review,
.summary the reviewer's view of the same candidate (its first page), and
str() that view as the CLI prints it.
| Field | Type | Default / construction |
|---|---|---|
proposal_id |
str |
Required |
candidate_digest |
str |
Required |
ReviewedProposal.details
details: api.ProposalReview
summary: api.ProposalReviewSummary
authoring.sdk.carry
carry(claim: str | ClaimRef) -> ClaimTypeSuccessionDependent
Carry one dependent to the successor by re-pinning it, unchanged.
Available when the dependent still says something true under the successor.
A successor that changes object_kind refuses this for a live Claim: its
object no longer says what the ClaimType now means.
| Parameter | Default | Meaning |
|---|---|---|
claim |
Required | Claim ID or typed ClaimRef; typed refs also assert their observed coordinate. |
authoring.sdk.rescind
rescind(claim: str | ClaimRef) -> ClaimTypeSuccessionDependent
Tombstone one dependent because it should never have been stated.
The tombstone keeps the exact statement it was accepted with, under the vocabulary it was accepted under -- that is what makes the record readable after the vocabulary moves, rather than silently rewritten.
| Parameter | Default | Meaning |
|---|---|---|
claim |
Required | Claim ID or typed ClaimRef; typed refs also assert their observed coordinate. |
authoring.sdk.retire
retire(
claim: str | ClaimRef,
*,
reason: ClaimRetirementReason,
effective_until: datetime | None = None,
) -> ClaimTypeSuccessionDependent
Retire one dependent with an attributed reason as the succession lands.
| Parameter | Default | Meaning |
|---|---|---|
claim |
Required | Claim ID or typed ClaimRef; typed refs also assert their observed coordinate. |
reason |
Required | Attributed reason for refusal, retirement, or operational action as specified by the API. |
effective_until |
None |
Optional effective-end instant for retirement. |
authoring.sdk.re_author
re_author(claim: str | ClaimRef, *, with_: str | ClaimRef | None=None) -> ClaimTypeSuccessionDependent
Say this dependent again, under the successor, as a sibling Claim member.
The sibling revises this same Claim -- a re-authoring keeps the identity,
the subject, the predicate and the exact predecessor digest of what it
re-states -- so with_ is only ever an explicit spelling of what claim
already says, and re_author(claim) alone is complete.
| Parameter | Default | Meaning |
|---|---|---|
claim |
Required | Claim ID or typed ClaimRef; typed refs also assert their observed coordinate. |
with_ |
None |
Value required by the declared type; see operation semantics below. |
World and typed values
A host World is a coordinate-bound read facade over accepted ClaimTypes and
Subjects. world.<kind>[id] names a Subject; Subject field access returns tuples
of live Claim contenders. There is no .one(), resolved(...), or state_input
in this implemented surface. Cardinality-one metadata does not select a scalar.
Missing Subjects raise AbsentSubject; ambiguous names and unavailable fields
raise explicit structure/attribute errors. Index/full-name forms disambiguate
Python keyword and member collisions.
| Expression | Result |
|---|---|
world.kind("security.asset") |
KindNamespace, including collision-safe lookup |
world.security.asset["gateway"] |
WorldSubject at this coordinate |
subject["security.asset.release"] |
Live Claim tuple for one full predicate |
subject.release |
Same selection if the leaf is unambiguous |
subject.claims |
Live Claim tuple across the Subject’s predicates |
world.claim_type("security.asset.status") |
WorldClaimType |
claim_type("active") or claim_type.active |
Predicate-bound LiteralValue, validated locally |
claim_type.as_kind |
KindNamespace when a predicate name is also a Subject kind |
kind.define(<key>, <field>=...) |
WorldNewSubject: a frozen draft of a new Subject by its key (as the kind's SubjectKind names it: one value, each composite part by leaf, or none when minted); .set/.add return a new draft; nothing is sent until world.write(...) or draft.write(...) |
subject.edit().set(...) |
WorldSubjectEdit: set/add/retire changes to an accepted Subject, sent later |
world.write(*drafts, *edits, because=...) |
One change set: each draft is a create change, named by a label from the others, in any order; after acceptance draft.address is the id core assigned |
kind.where(state="open", count__gt=3) |
CompactQuery; .select(...), .order_by(...), .limit(n), .run() or iterate every page |
world.stub() |
Generated type-stub source for this vocabulary |
kind[id] (and id in kind) resolves just that kind's requested ID, alias,
or single-key spelling through the daemon and caches the result at the World's
coordinate. These typed lookups use an explicit Subject: reference (including
aliases and keys ending in .json) through the SDK-internal batch reader,
which disables whole-instance nearest-name suggestions for these lookups, so a
first miss also reads only the identity indexes. Ordinary
cx.get calls retain their suggestions. Repeated spellings and the resolved
canonical ID share a handle.
Missing or retired Subjects raise AbsentSubject on indexing and answer false
for membership; an ambiguous alias or key keeps the daemon's refusal.
Iteration, len(kind), kind.subject_ids, and dir(kind) load every live Subject
of that kind on demand, paging past server caps without listing other kinds.
Aliases and keys do not add entries to that canonical inventory.
prefetch installs only complete bounded selections. An exhausted budget,
invalid coordinate, duplicate row, or non-advancing continuation refuses before
a partial cache is installed. Current ClaimView.value is annotated object;
the constrained vocabulary and daemon checks are stronger than that annotation.
Generated stubs expose declared names and Claim tuples; they do not provide
the proposed typed Procedure field-selection wrapper.
World
Import: cruxible_client.authoring.world.World. Source
World.coordinate
coordinate: AcceptedCoordinate
World.describe
describe() -> str
Names the verbs that act on this world, then its vocabulary, as text to read:
each Subject kind with its fields, what each holds, its cardinality, enum
members and description. print(w.describe()).
World.write
write(*items: WorldWritable, because: str, dry_run: bool = False, accept: Literal['if_allowed', 'never'] = 'if_allowed') -> WriteOutcome
Sends new Subjects' drafts and accepted Subjects' edits as one change set. Each
draft is one create change, sent first; a draft may be the value of another
in any order, and a draft named only as a value is created too. Checked from
this World's write basis. Once accepted, each draft's address is the id the
outcome reports.
World.kinds
kinds: Names
Every accepted Subject kind this world knows, byte-sorted. Names is a tuple of
strings that can also be called (w.kinds()).
World.predicates
predicates: Names
Every accepted predicate this world knows, byte-sorted, as a callable tuple.
World.stub
stub() -> str
Render this world as a .pyi module stub.
World.claim_type
claim_type(predicate: str) -> WorldClaimType
Read one accepted predicate by its full dotted name.
World.kind
kind(subject_kind: str) -> KindNamespace
Read one accepted Subject kind by its full dotted name.
The escape for a kind whose segments attribute access cannot spell -- a
Python keyword such as dev.class -- and for one a predicate of the same
dotted name wins, exactly as claim_type is the escape for a predicate.
World.prefetch
prefetch(
*,
subjects: Sequence[str | SubjectRef],
predicates: Sequence[str | ClaimTypeRef] = (),
page_size: int = 128,
max_claims: int = 4096,
) -> tuple[ClaimView, ...]
Fill selected attribute caches in bounded, coordinate-pinned pages.
Strings are subject kind/id addresses or paths and fully qualified predicates.
Every live contender is retained. A selection wider than one batched read
admits (256 Subjects or predicates) is read in as many batches as it
needs, all at this World's coordinate. If the explicit budget is
exceeded, no partial attribute cache is installed and the caller can
narrow the selection or increase max_claims.
World.values
values(
*,
subjects: Sequence[str | SubjectRef],
predicates: Sequence[str | ClaimTypeRef] = (),
whole: bool = False,
) -> tuple[api.QueryClaimValue, ...]
Each live Claim's value, verdict and status for these Subjects, read through
query (one query(kind, where=subject_id in ..., claims=True, status=("live", "overturned", "ineligible")) per Subject kind, pinned to this
World's coordinate) and without full Claim views -- the cheaper read when only
values and verdicts are needed. Every live contender of each selected slot is
returned, including Claims resolution overturned or found ineligible. Each
QueryClaimValue carries subject (the Subject's kind/id),
predicate, claim, value, verdict, status (accepted, conflicted,
ineligible, overturned or retired), role and, when present, qualifier.
value is a ShownValue: a string over 500 characters is a TruncatedText
(preview, length, read_whole), never the value itself;
cx.read_whole(item.value) reads it whole at this World's coordinate;
whole=True reads every such value whole in a few batched reads
(Cruxible.read_whole_many) and returns it in place of its preview. An
object value is a ShownObject whose object is the value, whole.
Strings are Subject kind/id addresses or paths and fully qualified
predicates; with no predicates, every predicate of each kind is read. Pages
are followed to the end at the same coordinate.
WorldSubject
Import: cruxible_client.authoring.world.WorldSubject. Source
Writes by field leaf: subject.set(status="done", because=...) sets
single-value fields, subject.add(governs=other, because=...) adds to
many-valued ones (expect_absent=True refuses a value already there instead of
answering it as done), and subject.retire("status", because=...) retires a
field's one live value. Every field in one call is one change of one change set, and
names are checked against the World before the wire. A World's writes are
checked from its coordinate advanced past its own accepted writes, so its
references stay valid after them; only a field someone else moved refuses. The
generated stub types set and add per kind, enum members as Literals.
subject.edit() returns the same changes unsent, for world.write(...) beside
new Subjects' drafts.
New Subjects come from world.<kind>.define(...), typed per kind by its
SubjectKind: a one-key kind takes its key positionally or by its leaf, a
composite kind each key part by its leaf, a minted kind none; every other
keyword is a field with one value: set when the field holds one value, added
when it holds many. A list is not a value: give a many-valued field each
further value with its own .add(field=value)
(cruxible.sdk.field_value_refused otherwise). A field whose leaf is a write
keyword (role, evidence) is written by its full predicate name,
define(**{"oncall.shift.role": "primary"}); role= itself is the Claim role
(cruxible.sdk.reserved_keyword when it is given a field value). A full
predicate name also writes a leaf two predicates share.
A key one live Subject already holds lands on that Subject and creates nothing
(the outcome's resolved: existing, so a seed run twice answers as done);
expect_new=True refuses cruxible.write.subject_exists, and create_new=True
makes a further holder of a hint kind's key. w.<kind>["id"] never creates:
a missing id raises AbsentSubject. A kind no SubjectKind declares has no
define(). define(..., evidence=..., role=...) backs the key Claims and the
fields given there as .set backs its fields (a cx.section(...) carried as
prose included); without it they rest on the write's because. A draft that
was accepted, reused in a later write, is a reference to its Subject: only
changes added after the acceptance are sent.
Creation bindings follow the complete batch's deterministic assignment, including
keys with the same readable rendering. A dry run leaves subject=None on every
change about a minted or further-holder Subject until submission assigns its id;
subjects_added omits those Subjects.
w = cx.world()
requests = w.pypi.release.define(package="requests", version="2.32.4")
outcome = w.write(
requests,
w.app.service.define("payments", owner="ada").add(depends_on=requests),
w.app.service["billing"].edit().set(owner="grace"),
because="Pins from each service's requirements.txt.",
)
requests.address # the id core assigned, once accepted
WorldSubject.subject_kind
subject_kind: str
WorldSubject.subject_id
subject_id: str
WorldSubject.claims
claims: tuple[ClaimView, ...]
Every live Claim this Subject is the subject of.
WorldSubject.explain
explain() -> object
Read this Subject's governance and provenance context: the why payload of get(subject, detail="why") at this World's coordinate.
WorldSubject.__getitem__
__getitem__(predicate: str | ClaimTypeRef) -> tuple[ClaimView, ...]
Read the live Claims under one predicate, named in full or by leaf.
WorldClaimType
Import: cruxible_client.authoring.world.WorldClaimType. Source
| Field | Type | Default / construction |
|---|---|---|
address |
str |
Required |
coordinate |
AcceptedCoordinate |
Required |
value_type |
FieldType |
Required |
cardinality |
Cardinality |
Required |
allowed_subject_kinds |
tuple[str, ...] |
Required |
permitted_roles |
tuple[ClaimRole, ...] |
Required |
referent_sensitivity |
ReferentSensitivity |
Required |
description |
str | None |
Required |
member_descriptions |
tuple[ClaimTypeMemberDescription, ...] |
Required |
default_role |
ClaimRole | None |
Required |
evidence_requirement |
EvidenceRequirement |
Required |
revision_evidence |
RevisionEvidence |
Required |
WorldClaimType.predicate
predicate: str
WorldClaimType.members
members: tuple[str, ...]
Return the enum members this predicate's literal schema names.
WorldClaimType.as_kind
as_kind: KindNamespace
Reach the Subject kind this dotted name also names.
A ClaimType wins attribute access over a Subject kind of the same dotted
name, which would otherwise leave define() and subject_ids
unreachable. This is that escape.
WorldClaimType.__call__
__call__(value: object) -> LiteralValue
Mint one literal object for this predicate, admitted before the wire.
WorldClaimType.__getitem__
__getitem__(subject_id: str) -> WorldSubject
Read a Subject when this dotted name is also an accepted kind.
KindNamespace
Import: cruxible_client.authoring.world.KindNamespace. Source
KindNamespace.subject_kind
subject_kind: str | None
Return this namespace's Subject kind, or None if it is only a prefix.
KindNamespace.subject_ids
subject_ids: tuple[str, ...]
Return every accepted Subject ID of this kind, loading them on first ask.
KindNamespace.define
define(
*key: SubjectKeyValue,
create_new: bool = False,
expect_new: bool = False,
evidence: Evidence | AuthoredSection | None = None,
role: WriteRole | None = None,
**fields: object,
) -> WorldNewSubject
Draft one new Subject of this kind by its key, with fields; core assigns its
id. A one-key kind takes its key positionally or by its key's leaf, a composite
kind each key part by its leaf, a minted kind none; every other keyword is a
field (see WorldSubject above). Next: w.write(draft, ..., because=...) or draft.write(because=...).
KindNamespace.where and KindNamespace.select
where(**filters: object) -> CompactQuery
select(*fields: str) -> CompactQuery
Start a compact query over this kind at the World's coordinate, for example
w.dev.roadmap_item.where(adoption_state="adopted", implementation_state__ne="completed").select("task_title").
A keyword is a predicate's short or full name, or subject_id; the suffixes
__ne, __lt, __lte, __gt, __gte, __in, __exists and __contains
pick the operator. A leaf that is self, a Python keyword, contains __ or
ends in _ is spelled with one trailing underscore before any suffix
(self_, class___ne, status__ne_). Names, operators and enum members are
checked against the World before the wire and raise QueryNameError with the
nearest names.
run() returns a QueryResult; iterating the query walks every page. The
generated stub types where(...) per kind, with enum members as Literals, so
a type checker rejects a wrong predicate or member.
KindNamespace.__getitem__
__getitem__(subject_id: str) -> WorldSubject
KindNamespace.__iter__
__iter__() -> Iterator[WorldSubject]
Reference and value construction
Reference dataclasses are frozen data carrying address and coordinate, not
authority. Pending refs are meaningful within the changeset that defines them.
CaptureRef additionally preserves citation role; copied/legacy evidence cannot
be upgraded by passing it as independent support. CaptureView.ref requires a
verified capture; .content requires verified available body bytes. .text()
can raise decoding errors; .json() can raise JSON decoding errors.
ExactContent is retired and refuses with ExactContentTypeError. Prose lives
in Documents; cite a Document section. Duration uses nonnegative integer microseconds and
rejects booleans. EffectivePeriod normalizes UTC and requires end > start when
both are supplied. AccessProfile requires a canonical nonblank ID and sorted,
unique classes. Enum values below are the actual accepted SDK spellings.
TypedRef
Import: cruxible_client.authoring.sdk_types.TypedRef. Source
TypedRef.kind
kind: RefKind
TypedRef.address
address: str
TypedRef.coordinate
coordinate: AcceptedCoordinate
SubjectRef
Import: cruxible_client.authoring.sdk_types.SubjectRef. Source
| Field | Type | Default / construction |
|---|---|---|
address |
str |
Required |
coordinate |
AcceptedCoordinate |
Required |
kind |
ClassVar[RefKind] |
RefKind.SUBJECT |
ClaimTypeRef
Import: cruxible_client.authoring.sdk_types.ClaimTypeRef. Source
| Field | Type | Default / construction |
|---|---|---|
address |
str |
Required |
coordinate |
AcceptedCoordinate |
Required |
kind |
ClassVar[RefKind] |
RefKind.CLAIM_TYPE |
ClaimRef
Import: cruxible_client.authoring.sdk_types.ClaimRef. Source
| Field | Type | Default / construction |
|---|---|---|
address |
str |
Required |
coordinate |
AcceptedCoordinate |
Required |
kind |
ClassVar[RefKind] |
RefKind.CLAIM |
ProcedureRef
Import: cruxible_client.authoring.sdk_types.ProcedureRef. Source
| Field | Type | Default / construction |
|---|---|---|
address |
str |
Required |
coordinate |
AcceptedCoordinate |
Required |
kind |
ClassVar[RefKind] |
RefKind.PROCEDURE |
QueryRef
Import: cruxible_client.authoring.sdk_types.QueryRef. Source
| Field | Type | Default / construction |
|---|---|---|
address |
str |
Required |
coordinate |
AcceptedCoordinate |
Required |
kind |
ClassVar[RefKind] |
RefKind.QUERY |
SourceRef
Import: cruxible_client.authoring.sdk_types.SourceRef. Source
| Field | Type | Default / construction |
|---|---|---|
address |
str |
Required |
coordinate |
AcceptedCoordinate |
Required |
kind |
ClassVar[RefKind] |
RefKind.SOURCE |
SlotRef
One field of one Subject: the slot a single-value Claim fills, which
Cruxible.retire and WriteBatch.retire take to end the Claim in it.
Import: cruxible_client.SlotRef (defined in cruxible_client.contracts.write). Source
| Field | Type | Default / construction |
|---|---|---|
subject |
str | None |
None (a write batch's default subject) |
field |
str |
Required |
value |
bool | int | str | None |
None |
PendingSubjectRef
Import: cruxible_client.authoring.sdk_types.PendingSubjectRef. Source
| Field | Type | Default / construction |
|---|---|---|
address |
str |
Required |
coordinate |
AcceptedCoordinate |
Required |
kind |
ClassVar[RefKind] |
RefKind.SUBJECT |
creation |
str | None |
None |
SubjectKeyReference
Import: cruxible_client.contracts.subject_kinds.SubjectKeyReference. Source
A Subject named by its kind's key, as a Claim's subject= or a Subject-valued
value=: core resolves it when the set is lowered, to the Subject a
new_subject of the same set creates with that key, else to the one live
holder (none refuses key_missing, several key_ambiguous). No id is
predicted, composite keys included.
For a one-key kind, use SubjectKeyReference(subject_kind="sec.package", key="Demo"). A composite kind requires a mapping such as
key={"release": "R1", "cve": "CVE-2021-44228"}; a bare value refuses with
a repair naming every part. Bare references expand to the existing mapping
before intent identities and digests are computed, and key values use the
same declared canonical forms as mapping references.
| Field | Type | Default / construction |
|---|---|---|
subject_kind |
str |
Required |
key |
dict[str, str | int | bool] | str | int | bool |
Required (bare value for a one-key kind; mapping for composite keys) |
PendingClaimTypeRef
Import: cruxible_client.authoring.sdk_types.PendingClaimTypeRef. Source
| Field | Type | Default / construction |
|---|---|---|
address |
str |
Required |
coordinate |
AcceptedCoordinate |
Required |
kind |
ClassVar[RefKind] |
RefKind.CLAIM_TYPE |
value_type |
FieldType |
Required |
CaptureRef
Import: cruxible_client.authoring.sdk_types.CaptureRef. Source
| Field | Type | Default / construction |
|---|---|---|
capture_digest |
str |
Required |
contract_address |
str |
Required |
coordinate |
AcceptedCoordinate |
Required |
citation_role |
Literal['evidence', 'copy', 'legacy'] |
Required |
CaptureView
Import: cruxible_client.authoring.sdk_types.CaptureView. Source
| Field | Type | Default / construction |
|---|---|---|
result |
CaptureRead |
Required |
CaptureView.ref
ref: CaptureRef
CaptureView.content
content: bytes
CaptureView.text
text(encoding: str='utf-8') -> str
CaptureView.json
json() -> object
LiteralValue
Import: cruxible_client.authoring.sdk_types.LiteralValue. Source
| Field | Type | Default / construction |
|---|---|---|
predicate |
str |
Required |
value |
CanonicalValue |
Required |
coordinate |
AcceptedCoordinate |
Required |
ExactContent
Retired. Prose lives in Documents; cite a Document section.
Import: cruxible_client.authoring.sdk_types.ExactContent. Source
| Field | Type | Default / construction |
|---|---|---|
content |
bytes |
Required |
Duration
Import: cruxible_client.authoring.sdk_types.Duration. Source
| Field | Type | Default / construction |
|---|---|---|
value |
int |
Required |
Duration.days
days(*, count: int) -> Duration
Duration.hours
hours(*, count: int) -> Duration
Duration.microseconds
microseconds(*, count: int) -> Duration
Duration.model_dump
model_dump() -> dict[str, object]
EffectivePeriod
Import: cruxible_client.authoring.sdk_types.EffectivePeriod. Source
| Field | Type | Default / construction |
|---|---|---|
starts_at |
datetime | None |
Required |
ends_at |
datetime | None |
Required |
AccessProfile
Import: cruxible_client.authoring.sdk_types.AccessProfile. Source
| Field | Type | Default / construction |
|---|---|---|
profile_id |
str |
Required |
permitted_access_classes |
tuple[str, ...] |
Required |
disclose_restricted_existence |
bool |
Required |
AccessProfile.model_dump
model_dump() -> dict[str, object]
RefKind
Import: cruxible_client.authoring.sdk_types.RefKind. Source
| Member | Value |
|---|---|
SUBJECT |
'subject' |
CLAIM_TYPE |
'claim_type' |
CLAIM |
'claim' |
PROCEDURE |
'procedure' |
QUERY |
'query' |
SOURCE |
'source' |
DOCUMENT |
'document' |
CAPTURE_CONTRACT |
'capture_contract' |
PROPOSAL |
'proposal' |
LINE |
'line' |
CAPTURE |
'capture' |
RESOLUTION_CONTRACT |
'resolution_contract' |
MANDATE |
'mandate' |
PROCEDURE_RUN |
'procedure_run' |
TRIGGER |
'trigger' |
BLUEPRINT |
'blueprint' |
PRINCIPAL |
'principal' |
APPROVAL_POLICY |
'approval_policy' |
PROCEDURE_RUNTIME_POLICY |
'procedure_runtime_policy' |
SOURCE_ACQUISITION_POLICY |
'source_acquisition_policy' |
PROVIDER_INTERFACE |
'provider_interface' |
PROVIDER |
'provider' |
ClaimRole
Import: cruxible_client.authoring.sdk_types.ClaimRole. Source
| Member | Value |
|---|---|
NORMATIVE |
'normative' |
OBSERVATION |
'observation' |
ENVIRONMENT_BINDING |
'environment_binding' |
DERIVATION |
'derivation' |
Disposition
Import: cruxible_client.authoring.sdk_types.Disposition. Source
| Member | Value |
|---|---|
NOT_TESTED |
'not_tested' |
SUPPORT |
'support' |
CONTRADICT |
'contradict' |
UNSURE |
'unsure' |
ActivationPolicy
Import: cruxible_client.authoring.sdk_types.ActivationPolicy. Source
| Member | Value |
|---|---|
DRAIN |
'drain' |
ABORT |
'abort' |
SNAPSHOT |
'snapshot' |
EPOCH_CHECK |
'epoch-check' |
Cardinality
Import: cruxible_client.authoring.sdk_types.Cardinality. Source
| Member | Value |
|---|---|
ONE |
'one' |
MANY |
'many' |
ReferentSensitivity
Import: cruxible_client.authoring.sdk_types.ReferentSensitivity. Source
| Member | Value |
|---|---|
IDENTITY |
'identity' |
SHELL |
'shell' |
Diagnostic
Import: cruxible_client.authoring.sdk_types.Diagnostic. Source
| Field | Type | Default / construction |
|---|---|---|
code |
str |
Required |
stage |
str |
Required |
offending_element |
str |
Required |
message |
str |
Required |
repair |
tuple[object, ...] |
Required |
owner |
str | None |
Required |
disposition |
str | None |
Required |
call_site |
CallSite | None |
Required |
CallSite
Import: cruxible_client.authoring.sdk_types.CallSite. Source
| Field | Type | Default / construction |
|---|---|---|
logical_file |
str |
Required |
line |
int |
Required |
column |
int | None |
Required |
expression |
str | None |
Required |
SourceMapEntry
Import: cruxible_client.authoring.sdk_types.SourceMapEntry. Source
| Field | Type | Default / construction |
|---|---|---|
builder_path |
str |
Required |
emitted_paths |
tuple[str, ...] |
Required |
call_site |
CallSite |
Required |
Source selection
cx.file(path) selects only cataloged local files. FileSelector retains
the observed bytes; .anchor(text) requires exactly one occurrence and records
byte offsets. Missing, empty, or ambiguous anchors refuse.
Selectors do not silently reinterpret character indexes as byte indexes.
Selections overlapping a governed projection cannot be claimed as independent
evidence. .observation() produces the typed working observation for normal
authoring; it is not itself acceptance or evidence registration.
FileSelector
Import: cruxible_client.authoring.selectors.FileSelector. Source
| Field | Type | Default / construction |
|---|---|---|
path |
Path |
Required |
source_id |
str |
Required |
content |
bytes |
Required |
FileSelector.anchor
anchor(text: str) -> EvidenceSelection
EvidenceSelection
Import: cruxible_client.authoring.selectors.EvidenceSelection. Source
| Field | Type | Default / construction |
|---|---|---|
path |
Path |
Required |
source_id |
str |
Required |
content |
bytes |
Required |
anchor_text |
str |
Required |
start_byte |
int |
Required |
end_byte |
int |
Required |
section_path |
tuple[str, ...] | None |
None |
EvidenceSelection.observation
observation() -> WorkingSelectionObservation
WorkspaceFiles
Import: cruxible_client.authoring.selectors.WorkspaceFiles. Source
WorkspaceFiles.file_entries
file_entries: tuple[FileCatalogEntry, ...]
WorkspaceFiles.procedure_projection_entries
procedure_projection_entries: tuple[ProcedureProjectionCatalogEntry, ...]
WorkspaceFiles.select
select(requested: str | Path) -> FileSelector
WorkspaceFiles.path_for_file
path_for_file(file: str) -> Path
WorkspaceFiles.path_for_procedure
path_for_procedure(procedure_identity: str) -> Path
Procedure composition and execution
A Procedure is authored in one typed form, the ProcedureSpec
(cruxible_client.contracts.procedures.authored): JSON over MCP and HTTP, YAML
on the CLI, and the same model in Python. Every reference is a typed Ref
({"$ref": "input" | "param" | "step" | "item", "step"?, "path"?}), never a
$... string; a guard and a repeat's until are the same typed closed
Predicate the closed transforms use (eq/ne/lt/le/gt/ge,
in/not_in, present/absent, all_of/any_of/not, and count of a
list); a guard's arms are typed actions: {"abort": {code, message}},
{"halt": reason, "message"?, "id"?} or {"goto": step}. Every stored graph
node has a typed step, so get renders an accepted Procedure in exactly this
form.
Every Procedure has one shape (the Procedure template): read, call (fetch,
then derive), extract and claims, with filter/dedupe narrowing and inbox
egress. Computation lives in a provider derive (a call to a pure operation),
never in Procedure syntax, so authoring refuses every other step kind with
cruxible.authoring.procedure_step_closed at that step ($.steps[i]); the
return value is returns: {from|fields}, not a project step.
| Step | Graph kind | Notes |
|---|---|---|
read (query) / read (claim_type) |
read |
Runs to the end under the read ceiling |
call |
call |
Through a declared slot; captures makes it acquire |
extract |
extract |
One Capture's record set, typed by its CaptureKind's layout |
transform |
transform |
filter and dedupe only; shape, join, aggregate, union and derive are closed |
inbox |
post_inbox |
Line only; observe authority |
claims |
claims |
Typed records to Claims; its Mandate chooses propose or settle. |
project, guard, repeat, invoke, select, emit, halt |
(closed) | Refused at authoring; move the computation into a derive |
Sequence (cruxible_client.authoring.procedures) builds that spec directly:
each value step returns a Handle, and handle["field"] is the typed Ref to
one of its fields, checked against the fields the step is known to produce
(its declared output, a query read's view, or a supplied slot Contract).
eq, gt, present, all_of, count, ... build typed predicates for
filter and claims where/when. It has builders for the open step kinds only
(no project, guard, halt, invoke, select, repeat or emit, and
transform takes filter or dedupe); a spec carrying a closed step refuses
procedure_step_closed in preview() and at authoring. spec() is the spec;
preview() lowers it locally through the same shared lowering (structural
only: it does not verify runtime values, availability or authority); build()
returns ProcedureInput(kind="procedure", spec=...) or raises
ProcedureCompositionError carrying the preview.
The @procedure Python-source form is retired: a source_request (or a raw
graph definition) refuses procedure_authoring_form_retired, naming the spec.
| Run surface | Availability |
|---|---|
Direct run (Procedure.run) |
read, call, extract and the filter/dedupe transforms |
Accepted Line (cx.line(name).run()) |
Adds authorized post_inbox and claims paths |
cx.get(f"Procedure:{name}") reports which of these applies as runnable
(direct, line or unsupported) with the nodes behind it.
Graph legality does not promise availability in every run lane.
Procedure.run admits a new invocation. Read its retained status by run ID via
ProcedureRun.refresh; do not use fresh invocation as a generic historical
replay method. An admission refusal can have run_id=None. result is meaningful
under the returned status; detailed terminal fields are in the typed raw client
response. Measurement verdicts are distinct from execution success. A due
measurement can record a standing resolution/reading; pending/expired status
does not invent one. readings is read-only and carries its snapshot in cursors.
Sequence
Import: cruxible_client.authoring.procedures.Sequence. Source
Sequence(
procedure: str,
*,
input: Mapping[str, FieldType | str] | None = None,
params: Mapping[str, FieldType | str] | None = None,
output: Mapping[str, FieldType | str] | None = None,
slots: Mapping[str, ProcedureSlot | Mapping[str, object]] | None = None,
capabilities: Mapping[str, Capability] | None = None,
contracts: Mapping[str, Contract] | None = None,
description: str | None = None,
activation: Literal['drain', 'abort', 'snapshot', 'epoch-check'] = 'snapshot',
hard_caps: ProcedureLimits | None = None,
)
capabilities and contracts optionally supply accepted capabilities and
Contracts by name@N, so call handles check their field names locally; without
them a call's fields are checked at prepare.
input and params are Handles on the Procedure's input and parameters.
Each value step returns a Handle; handle["field"] is its typed Ref.
| Method | Step | Returns |
|---|---|---|
read(name, *, query, params=None, id=None, next=None) |
a saved Query's rows | Handle |
read_claims(name, *, claim_type, subject, subject_kind=None, all=None, id=None, next=None) |
one ClaimType's Claims about a Subject | Handle |
call(name, *, slot, input, captures=None, effect_policy=None, id=None, next=None) |
a provider call through a declared slot (fetch, or a pure derive) | Handle |
extract(name, *, capture, records, header=(), key=None, duplicates='refuse_key', only_keys=None, id=None, next=None) |
record set records of one Capture, through its CaptureKind's layout: the layout supplies paths, keys, the row Contract and field rules (there is no row, fields or complete_when argument); header selects some of its header fields, and key may give a plain-string key part a Subject key type |
Handle |
transform(name, *, kind, spec, id=None, next=None) |
filter or dedupe narrowing |
Handle |
inbox(contract, *, fields, for_each=None, dedupe_key=(), max_items=None, id=None) |
typed items to the Line inbox | None |
claims(templates, *, for_each, subject, where=None, expect=None, id=None) |
typed records to Claims | None |
returns(value) |
the Procedure's return: a step, its Handle, ReturnFrom or ReturnFields |
None |
spec() |
the ProcedureSpec this builder states |
ProcedureSpec |
preview() |
the shared lowering, locally | ProcedurePreview |
build() |
ProcedureInput(kind="procedure", spec=...), or ProcedureCompositionError |
ProcedureInput |
ProcedurePreview
Import: cruxible_client.authoring.procedures.ProcedurePreview. Source
| Field | Type | Default / construction |
|---|---|---|
name |
str |
Required |
ready_for_prepare |
bool |
Required |
spec |
ProcedureSpec |
Required; the one authored form the builder states |
authority |
AuthorityVerb | None |
None |
nodes |
tuple[dict[str, Any], ...] |
(); the lowered graph nodes |
edges |
dict[str, dict[str, str]] |
factory |
terminals |
tuple[str, ...] |
() |
returns |
str | None |
None |
errors |
tuple[CompositionDiagnostic, ...] |
() |
pending_checks |
tuple[str, ...] |
the checks preview leaves to prepare and admission |
CompositionDiagnostic
Import: cruxible_client.authoring.procedures.CompositionDiagnostic. Source
| Field | Type | Default / construction |
|---|---|---|
step |
str | None |
None |
code |
str |
Required |
message |
str |
Required |
Procedure
Import: cruxible_client.authoring.sdk.Procedure. Source
Procedure.ref
ref: ProcedureRef
Procedure.definition
definition: ProcedureArtifact
The accepted Procedure artifact; cx.get(procedure.ref) reads its card, with
runnable and any unsupported nodes.
Typed invocation and child inspection
Procedure.input(**fields) constructs an immutable record from the exact accepted
input contract. Pass it as Procedure.run(input=record); successful
ProcedureRun.result follows the declared output contract. ProcedureRun.succeeded
guards result access, and .children returns authorized child run handles.
cx.get("query:NAME") shows a named query's parameters, and
cx.query(name=NAME, params=..., receipt="full") returns its result with the
replay receipt.
Procedure.run
run(
*,
input: Record | None = None,
parameters: Record | None = None,
bindings: Mapping[str, str] | None = None,
at: AcceptedCoordinate | None = None,
resolution_contract: ResolutionContractReference | None = None,
trigger_event: TriggerEventReference | None = None,
) -> ProcedureRun
parameters (made by procedure.params(...)) are the run's values over the
Procedure's parameter defaults; bindings maps a slot to the provider that
serves it for this run ({"slot": "provider"}), fitted at admission.
Procedure.measure
measure(
*,
run: ProcedureRun | str | None = None,
measurements: Sequence[str] = (),
at: AcceptedCoordinate | None = None,
) -> MeasurementBatch
Evaluate this Procedure's due measurements, crediting run if given.
Pending measurements are reported, not evaluated; a standing resolution is returned rather than re-derived; calling again with the same run replays the same reading.
Procedure.dispose_resolution
cx.accepted_procedure("release-guard").dispose_resolution(
resolution_id, verdict="overturned", reason="Evidence omitted a failed region."
)
Records an upheld or overturned reviewer judgment under GOVERNED_WRITE,
attributed to the authenticated principal. Returns typed
ProcedureResolutionDispositionResult with the original disposition on an exact
retry, the standing answer ID (null after overturn), and written_now.
Get/history and readings expose the disposition. Overturn allows a later measure
to replace the answer inside its original window; it does not extend that window.
Retired/replaced contracts, unknown IDs, older answers, unavailable books, or a
same-verdict retry with a different reason/reviewer refuse.
Transport: CruxibleClient.dispose_procedure_resolution(instance_id, name, request=ProcedureResolutionDispositionRequest(...)), over
POST /api/v1/{instance_id}/procedures/{name}/resolution-dispositions.
Procedure.readings
readings(
*,
run: ProcedureRun | str | None = None,
measurements: Sequence[str] = (),
limit: int = 50,
cursor: str | None = None,
at: AcceptedCoordinate | None = None,
) -> api.ProcedureReadingsResult
Inspect measurement standing and retained readings. Never writes.
If retained payloads are unavailable, unavailable_reading_count reports the
known number of unavailable reading records. unavailable_payloads contains
at most limit representative digests, and affected contracts have status
unavailable; the sample is not a complete history of missing payloads.
A page's cursor continues that page's selection: the observation
instant and coordinate the first page was answered at travel inside
it, so passing the cursor back with the same run/measurements
pages the same selection even though this call stamps a fresh clock.
ProcedureRun
Import: cruxible_client.authoring.sdk.ProcedureRun. Source
ProcedureRun.run_id
run_id: str | None
ProcedureRun.status
status: str
ProcedureRun.result
result: Record
ProcedureRun.receipt
receipt: str | None
ProcedureRun.coordinate
coordinate: AcceptedCoordinate
ProcedureRun.track_record
track_record: tuple[GetProcedureTrackRecord, ...]
ProcedureRun.refresh
refresh() -> ProcedureRun
ProcedureRun.measure
measure(*, measurements: Sequence[str]=()) -> MeasurementBatch
Credit this run's exact grain with every due measurement's standing answer.
Projections and workspace
Access ProjectionBlocks through cx.block. Repin reads accepted backing
state and updates local declarations/manifests; it replaces prose only when
explicit body bytes are supplied. For claims/queries/artifacts, None preserves
the backing class and an empty sequence removes it. Query-only and artifact
backings are valid. currency_policy distinguishes warn from require_current.
Compact markers are the default; their local manifests are part of the view.
Sync checks declared block backings and reports drift; it writes nothing. It
does not regenerate the author’s prose or silently repin. It never raises on
drift: read has_refusals (a blocking finding under the configured currency
policy). detach is the explicit local page edit, and dry_run=True reports
what it would change without making it; depublish releases a block's
registration at the daemon. repin(..., render=True) writes the body from the
block's one query backing, and repin(..., dry_run=True) returns the stamp it
would write and writes nothing. The marker grammar is in the CLI
reference under "Projection block markers"; MCP agents use the
cruxible_block_repin, cruxible_block_sync (read-only) and
cruxible_block_detach (the page edit, previewed) tools, which
run this same adapter.
ProjectionBlocks
Import: cruxible_client.authoring.sdk.ProjectionBlocks. Source
ProjectionBlocks.repin
repin(
file: str | SourceRef,
block_id: str,
*,
claims: Sequence[str | ClaimRef] | None = None,
queries: Sequence[str | QueryRef | tuple[str | QueryRef, Mapping[str, CanonicalValue]]] | None = None,
artifacts: Sequence[ArtifactIdentity] | None = None,
currency_policy: ProjectionCurrencyPolicy | None = None,
backing_digest: str | None = None,
evaluation_time: datetime | None = None,
body: str | bytes | None = None,
compact: bool = True,
render: bool = False,
dry_run: bool = False,
) -> ProjectionBlockStamp
Refresh backing pins and optionally replace this block's authored body.
Compact markers are the default: digest references with local manifests. Subsequent
repins preserve that format. render writes the body as a table or list from the
block's one query backing instead of body. evaluation_time defaults to now,
on this handle's clock; dry_run returns the stamp it would write and writes
nothing.
ProjectionBlocks.sync
sync(*paths: str | Path, all: bool = False) -> api.BlockSyncResult
Check each block against its backings; a pure check that writes nothing.
ProjectionBlocks.detach
detach(*paths: str | Path, dry_run: bool = False) -> api.BlockSyncResult
Strip retired blocks' markers from these pages, keeping each body as prose; live blocks are refused.
ProjectionBlocks.depublish
depublish(file_id: str | SourceRef, block_id: str, *, dry_run: bool | None = None, at: str | None = None) -> api.BlockDepublishResult
Release the registration that demands one page block; edits no page and retires no backing.
file_id is the stored projection file identity; the file and catalog entry need not still exist.
Signing capabilities
ApprovalSigner and ClaimAttestationSigner are separate protocols.
Approval signs a reviewed candidate; Claim attestation signs a statement about
an exact Claim version. Local signers check key identity/custody and reread the
key for signing without sending private bytes to the daemon. An agent supplies
an operator-provisioned signer; connecting does not mint signing authority.
LocalEd25519ClaimAttestationSigner.open also needs signing_key_id and enforces
local directory/file permissions. An invalid or changed key refuses.
prepare_claim_attestation signs after resolving the exact prepared statement;
append_prepared_claim_attestation also submits it. The explicit environment
helper uses CRUXIBLE_PRINCIPAL_KEY (the key the settings file names) and resolves the authenticated actor;
this is not a search through arbitrary private-key locations.
ApprovalSigner
Import: cruxible_client.authoring.signing.ApprovalSigner. Source
ApprovalSigner.signer_id
signer_id: str
ApprovalSigner.public_key
public_key: str
ApprovalSigner.sign
sign(statement: ApprovalStatement) -> ApprovalAttestation
LocalEd25519ApprovalSigner
Import: cruxible_client.authoring.signing.LocalEd25519ApprovalSigner. Source
| Field | Type | Default / construction |
|---|---|---|
signer_id |
str |
Required |
private_key_path |
Path |
Required |
public_key |
str |
Required |
LocalEd25519ApprovalSigner.open
open(
*,
signer_id: str,
private_key_path: Path,
expected_public_key: str,
forbidden_roots: Sequence[Path],
) -> LocalEd25519ApprovalSigner
Validate custody and key identity without retaining private bytes.
LocalEd25519ApprovalSigner.sign
sign(statement: ApprovalStatement) -> ApprovalAttestation
ClaimAttestationSigner
Import: cruxible_client.authoring.attestations.ClaimAttestationSigner. Source
ClaimAttestationSigner.signer
signer: str
ClaimAttestationSigner.signing_key_id
signing_key_id: str
ClaimAttestationSigner.sign_claim_attestation_v2
sign_claim_attestation_v2(statement: ClaimAttestationStatement) -> ClaimAttestation
LocalEd25519ClaimAttestationSigner
Import: cruxible_client.authoring.attestations.LocalEd25519ClaimAttestationSigner. Source
| Field | Type | Default / construction |
|---|---|---|
signer |
str |
Required |
signing_key_id |
str |
Required |
private_key_path |
Path |
Required |
public_key |
str |
Required |
LocalEd25519ClaimAttestationSigner.open
open(
*,
signer: str,
signing_key_id: str,
private_key_path: Path,
expected_public_key: str,
forbidden_roots: Sequence[Path],
) -> 'LocalEd25519ClaimAttestationSigner'
LocalEd25519ClaimAttestationSigner.sign_claim_attestation_v2
sign_claim_attestation_v2(statement: ClaimAttestationStatement) -> ClaimAttestation
Exported contract constructors
These models are directly exported from cruxible_client. Construct them with
keyword fields or validate mappings through model_validate(...); serialize
with model_dump(...) / model_dump_json(...), and inspect the full validation
schema with model_json_schema(). Validation occurs at construction, independently
of later authoring/admission checks. Constructing a model never accepts an artifact.
Fields/defaults below come from the current model definitions. Nested discriminator
unions remain defined by their linked schemas.
A Field(...) without a default is required even when it also declares bounds.
ArtifactIdentity
Import: cruxible_client.ArtifactIdentity. Source
Kind and name must already be NFC-normalized and canonical. qualified returns kind:name; it performs no lookup.
| Field | Type | Default / validation |
|---|---|---|
kind |
str |
Required |
name |
str |
Required |
ArtifactLifecycle
Import: cruxible_client.ArtifactLifecycle. Source
An optional predecessor is a tagged artifact digest. Lifecycle metadata does not itself retire an artifact; it is admitted with the governed definition.
| Field | Type | Default / validation |
|---|---|---|
state |
Literal['live', 'retired'] |
'live' |
predecessor_digest |
str | None |
None |
ArtifactPin
Import: cruxible_client.ArtifactPin. Source
role must be canonical. artifact_digest is a tagged artifact digest; the identity alone does not pin a version.
| Field | Type | Default / validation |
|---|---|---|
role |
str |
Required |
target |
ArtifactIdentity |
Required |
artifact_digest |
str |
Required |
ClaimAdmissionPolicy
Import: cruxible_client.ClaimAdmissionPolicy. Source
Requirement groups must be sorted and unique by requirement ID, with IDs unique across kinds. Unknown freeze transition exceptions are refused.
| Field | Type | Default / validation |
|---|---|---|
tag |
Literal['playbill-claim-admission-policy-v1'] |
'playbill-claim-admission-policy-v1' |
corroboration_requirements |
tuple[CorroborationRequirement, ...] |
() |
freeze_requirements |
tuple[FreezeRequirement, ...] |
() |
ClaimResolutionPolicy
Import: cruxible_client.ClaimResolutionPolicy. Source
Eligible verdicts are nonempty, sorted, and unique; basis kinds are sorted and unique. Many-cardinality requires selector="all"; one-cardinality cannot select all contenders.
| Field | Type | Default / validation |
|---|---|---|
tag |
Literal['playbill-claim-resolution-policy-v1'] |
'playbill-claim-resolution-policy-v1' |
cardinality |
ClaimCardinality |
Required |
eligible_verdicts |
tuple[ClaimVerdict, ...] |
Required |
required_basis_kinds |
tuple[str, ...] |
() |
require_current |
bool |
True |
selector |
Literal['all', 'only_contender'] |
Required |
conflict_result |
Literal['unresolved', 'refuse'] |
'unresolved' |
CanonicalDuration
Import: cruxible_client.CanonicalDuration. Source
Duration is represented in integer microseconds, not floating-point seconds. Procedure budgets/caps additionally require their wall-clock duration to be nonzero.
| Field | Type | Default / validation |
|---|---|---|
tag |
Literal['playbill-duration-v1'] |
'playbill-duration-v1' |
microseconds |
int |
Field(ge=0) |
ProcedureBudget
Import: cruxible_client.ProcedureBudget. Source
Wall-clock budget must be nonzero. Omitted optional result/item limits do not disable effective daemon policy. Bounds in the field declarations remain enforced.
| Field | Type | Default / validation |
|---|---|---|
tag |
Literal['playbill-procedure-budget-v1'] |
'playbill-procedure-budget-v1' |
wall_clock |
CanonicalDuration |
Required |
max_provider_calls |
int |
Field(ge=0, le=1000000) |
max_capture_bytes |
int |
Field(ge=0, le=2 ** 63 - 1) |
max_result_bytes |
int | None |
Field(default=None, ge=1, exclude_if=lambda v: v is None) |
max_items |
int | None |
Field(default=None, ge=1, le=2 ** 31 - 1, exclude_if=lambda value: value is None) |
max_read_rows |
int | None |
None |
ProcedureDefinition
Import: cruxible_client.ProcedureDefinition. Source
The one Procedure graph format (8), the stored form a ProcedureSpec lowers to. Every dependency field names a governed identity; an execution plan resolves each to its exact pin at the run's accepted coordinate. slots names, per slot, the capability its provider calls go through (pinned by digest at acceptance) and optionally may_truncate; the Procedure never names a provider, and a Line binds every slot to one exact build and operation when it is accepted.
| Field | Type | Default / validation |
|---|---|---|
graph_format |
Literal[8] |
8 |
name |
str |
Required |
description |
str | None |
None |
contract_in |
ArtifactNameRef |
Required |
contract_out |
ArtifactNameRef |
Required |
parameter_contract |
ArtifactNameRef | None |
None |
parameter_defaults |
dict[str, object] |
{}; omitted when empty; each param's default, checked against its field at acceptance |
nodes |
tuple[ProcedureNode, ...] |
Required |
returns |
str | None |
None |
slots |
dict[str, ProcedureSlot] |
Field(default_factory=dict); omitted when empty |
measurements |
tuple[ProcedureMeasurementDeclaration, ...] |
() |
hard_caps |
ProcedureHardCaps |
Required |
terminal_capability |
Literal[1, 2, 3] |
Required; authoring derives it from the terminals and invoked children |
annotations |
object |
Field(default_factory=dict) |
ProcedureHardCaps
Import: cruxible_client.ProcedureHardCaps. Source
Maximum wall-clock duration must be nonzero. Caps constrain declared/effective execution; their values do not grant execution authority.
| Field | Type | Default / validation |
|---|---|---|
tag |
Literal['playbill-procedure-hard-caps-v1'] |
'playbill-procedure-hard-caps-v1' |
max_wall_clock |
CanonicalDuration |
Required |
max_provider_calls |
int |
Field(ge=0, le=1000000) |
max_capture_bytes |
int |
Field(ge=0, le=2 ** 63 - 1) |
max_result_bytes |
int | None |
Field(default=None, ge=1, exclude_if=lambda v: v is None) |
max_items |
int |
Field(ge=1, le=2 ** 31 - 1) |
max_repeat_attempts |
int |
Field(ge=1, le=2 ** 31 - 1) |
max_read_rows |
int |
100000 |
ProjectNode
Import: cruxible_client.ProjectNode. Source
Pure projection under the declared output contract. It does not invoke a provider or mutate accepted state.
| Field | Type | Default / validation |
|---|---|---|
kind |
Literal['project'] |
'project' |
node_id |
str |
Required |
fields |
object |
Required |
literal |
object |
None |
leaf |
bool |
False |
as_ |
str |
Field(alias='as') |
next |
str | None |
None |
TransformNode
Import: cruxible_client.TransformNode. Source
A contracted built-in transformation, restricted to the transform kind/specification in the versioned graph contract.
| Field | Type | Default / validation |
|---|---|---|
kind |
Literal['transform'] |
'transform' |
node_id |
str |
Required |
transform_kind |
TransformKind |
Required |
spec |
ProcedureTransformSpec |
Required |
as_ |
str |
Field(alias='as') |
next |
str | None |
None |
Shared authoring inputs
cruxible_client.authoring.inputs re-exports
cruxible_client.contracts.authoring.inputs. These strict typed inputs are
the shared declarative authoring surface; they are not a second orchestration
API. Unknown fields refuse. Accepted references resolve at the intent base;
carried contracts belong to their Procedure; slots are intentionally deferred.
An exact accepted pin is not silently converted to a different version.
The field tables below are the declared constructor fields/defaults. Pydantic Field(...) entries show actual constraints/factories, not values to copy into payloads. Model validators impose additional cross-field rules: notably exactly the discriminated member kinds. Retired exact-content inputs refuse with a Documents repair. Use model validation rather than constructing an unvalidated dictionary.
LiteralObjectInput
Import: cruxible_client.contracts.authoring.inputs.LiteralObjectInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['literal'] |
Required |
value |
object |
Required |
SubjectObjectInput
Import: cruxible_client.contracts.authoring.inputs.SubjectObjectInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['subject'] |
Required |
subject |
str |
Required |
ExactContentObjectInput
Import: cruxible_client.contracts.authoring.inputs.ExactContentObjectInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['exact_content'] |
Required |
text |
str | None |
None |
content_base64 |
str | None |
None |
SelfSourceInput
Import: cruxible_client.contracts.authoring.inputs.SelfSourceInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['self_source'] |
Required |
body |
str |
Required |
WorkingSelectionInput
Import: cruxible_client.contracts.authoring.inputs.WorkingSelectionInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['working_selection'] |
Required |
source_id |
str |
Required |
ExistingCaptureInput
Import: cruxible_client.contracts.authoring.inputs.ExistingCaptureInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['existing_capture'] |
Required |
capture_digest |
str |
Required |
ClaimDispositionInput
Import: cruxible_client.contracts.authoring.inputs.ClaimDispositionInput. Source
| Field | Type | Default / construction |
|---|---|---|
claim_id |
str |
Required |
disposition |
Literal['not_tested', 'support', 'contradict', 'unsure'] |
Required |
ClaimInput
Import: cruxible_client.contracts.authoring.inputs.ClaimInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['claim'] |
Required |
subject |
str |
Required |
predicate |
str |
Required |
qualifier |
str | None |
None |
object |
AuthoringObjectInput |
Required |
role |
Literal['normative', 'observation', 'environment_binding', 'derivation'] |
Required |
effective_from |
datetime | None |
None |
effective_until |
datetime | None |
None |
rationale |
str |
Required |
source |
AuthoringSourceInput |
Required |
citation_role |
Literal['evidence', 'copy'] | None |
None |
revises |
str | None |
None; Claim ID this Claim revises; omit to state a new Claim. |
dispositions |
tuple[ClaimDispositionInput, ...] |
() |
ProcedureInput
Import: cruxible_client.contracts.authoring.inputs.ProcedureInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['procedure'] |
Required |
spec |
ProcedureSpec |
Required |
retire |
bool |
False |
SubjectInput
Import: cruxible_client.contracts.authoring.inputs.SubjectInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['subject'] |
Required |
subject_kind |
str |
Required; The kind to create, e.g. 'dev.decision'. |
key |
dict[str, str | int | bool | SubjectObjectInput] | str | int | bool |
{}; Key ClaimType (predicate or short name) -> value, or just the value when the kind has one key; omit for a minted kind. A pair's end is {"kind": "subject", "subject": ...}. |
rationale |
str | None |
None; Why this Subject exists; the key Claims' self evidence. |
create_new |
bool |
False; Hint kinds only: create another Subject even though one holds this key (assert semantic.distinct_from between them); otherwise the key resolves to it. |
QueryDefinitionInput
Import: cruxible_client.contracts.authoring.inputs.QueryDefinitionInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['query_definition'] |
Required |
query_definition |
QuerySpecInput | QueryDefinitionSpec | QueryDefinition |
Required |
ApprovalPolicyInput
Import: cruxible_client.contracts.authoring.inputs.ApprovalPolicyInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['approval_policy'] |
Required |
approval_policy |
ApprovalPolicy |
Required |
ProcedureRuntimePolicyInput
Import: cruxible_client.contracts.authoring.inputs.ProcedureRuntimePolicyInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['procedure_runtime_policy'] |
Required |
procedure_runtime_policy |
ProcedureRuntimePolicy |
Required |
ClaimTypeInput
Import: cruxible_client.contracts.authoring.inputs.ClaimTypeInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['claim_type'] |
Required |
claim_type |
ClaimType |
Required |
ClaimTypeSuccessionInput
Import: cruxible_client.contracts.authoring.inputs.ClaimTypeSuccessionInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['claim_type_succession'] |
Required |
successor |
ClaimType |
Required |
dependents |
tuple[ClaimTypeSuccessionDependent, ...] |
() |
carry_all |
bool |
False; carry every dependent to the successor |
retire_dependents |
Optional[Literal['was-rescinded', 'was-wrong', 'superseded']] |
None; Retire every live Claim of the closure dependents does not name, with this reason, and carry the rest; what retiring a ClaimType (a retired successor) owes its dependents. |
ClaimRetirementInput
Import: cruxible_client.contracts.authoring.inputs.ClaimRetirementInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['claim_retirement'] |
Required |
retires |
str |
Required; the Claim ID |
reason |
ClaimRetirementReason |
Required |
effective_until |
datetime | None |
None |
dependents |
tuple[ClaimRetireDependent, ...] |
() |
ProcedureMandateInput
Import: cruxible_client.contracts.authoring.inputs.ProcedureMandateInput. Source
| Field | Type | Default / construction |
|---|---|---|
tag |
Literal['playbill-procedure-mandate-input-v1'] |
'playbill-procedure-mandate-input-v1' |
kind |
Literal['procedure_mandate'] |
Required |
name |
str |
Required |
line_name |
str |
Required |
grants |
Literal['propose', 'settle'] |
Required |
namespace |
tuple[str, ...] |
Required |
valid_from |
datetime |
Required |
expires_at |
datetime |
Required |
scope |
tuple[MandateScopeAuthoring, ...] |
(); for a settle grant, the ClaimTypes it may settle and, per change kind, the evidence bases (extracted, measured, derived, absence) that settle; value: {from, to} for enum and bool types |
subject_scope |
tuple[SemanticAddress, ...] | None |
None |
subjects |
Optional[Literal['expected']] |
None |
condition |
MandateConditionAuthoring | None |
None; a settle grant's condition query, with its fallback (refuse or propose) |
subject_creation |
tuple[str, ...] |
(); Settle grants only: Subject kinds a run may create by key; their new Subjects and key Claims settle with the change. A propose grant names subjects/ in its namespace instead. |
suspended |
bool |
False |
retire |
bool |
False |
LineInput
Import: cruxible_client.contracts.authoring.inputs.LineInput. Source
One Line: a stable instantiation of an accepted or same-set Procedure. It runs
when run explicitly, or, once enabled, when a Trigger aimed at it fires; author
its schedule with a TriggerInput. A Line that proposes or settles needs a live
ProcedureMandate covering its Procedure; an observe-only Line needs none.
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['line'] |
Required |
name |
str |
Required |
procedure_name |
str |
Required |
bindings |
dict[Annotated[str, FieldInfo(annotation=None, required=True, metadata=[MinLen(min_length=1), MaxLen(max_length=512)])], Annotated[str, FieldInfo(annotation=None, required=True, metadata=[MinLen(min_length=1), MaxLen(max_length=650)])]] |
{}; Slot -> 'provider[/build]#operation' (or 'provider[/build]'); an invoked child's slot is '.'. Omitted slots are fitted. |
findings |
LineFindings |
Field(default_factory=LineFindings) |
acquisition |
dict[str, LineAcquisitionRule] |
{}; Per capture output . (an invoked child's: ..): {max_age, on_unavailable, on_stale, on_oversized, permitted_replayability, origins}. A capture output left out runs under the core default: any age, refuse when unavailable, stale or oversized, any replay class, any origin. |
max_authority |
Literal['observe', 'propose', 'settle'] | None |
None (the Procedure's capability) |
trigger_input |
str | None |
None |
parameters |
dict[str, object] |
{}; checked against the Procedure's input contract |
budgets |
dict[str, int] | None |
None (the Procedure's hard caps) |
occurrence_epoch |
int |
1 |
retire |
bool |
False |
TriggerInput
Import: cruxible_client.contracts.authoring.inputs.TriggerInput. Source
One Trigger: a schedule aimed at exactly one Line or internal action. A Line
target names an accepted or same-set Line and takes any schedule that supplies
its input, and does nothing until the Line is enabled; an internal action
(floor.refresh, evidence.sweep, prediction.anchor_retry) takes a cadence, cron or generation-accepted schedule and
needs no enablement. Cron expressions are
always evaluated in UTC; convert local times first (09:00 New York in winter
is 14:00 UTC). A Trigger is changed or retired (retire) through a successor.
For Capture landings, name the contract:
{"kind":"trigger","name":"on-advisory","line_name":"triage",
"schedule":{"kind":"capture_landing","capture_contract":"security.advisory"}}
AuthoringTriggerSchedule admits cadence, cron, generation-accepted,
CaptureLandingByNameSchedule and WindowCloseAuthoringSchedule. Capture landings
and Capture-anchored windows take contract names only; exact event selectors
are refused. A Capture window is authored as:
{"kind":"window_close","window":{"kind":"capture_event",
"capture_contract":"security.advisory","duration_seconds":60}}
The SDK equivalent is WindowCloseAuthoringSchedule(window=CaptureEventByNameWindow( capture_contract="security.advisory", duration_seconds=60)), importing both
models from cruxible_client.contracts.authoring.models. Fixed windows use
WindowCloseAuthoringSchedule(window=FixedWindow(...)).
With retire=True, core retains the predecessor's stored schedule and target
without resolution and ignores the supplied schedule. Prepare/preview returns resolved_trigger_contracts: each
ResolvedTriggerCaptureContract has trigger_name and an exact event
(CaptureEventSelector, including contract identity and digest). Missing,
retired or wrong-kind contracts refuse with a repair; a Source-pinned Line must
accept the same digest. Next: submit the prepared intent, then enable the Line.
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['trigger'] |
Required |
name |
str |
Required |
schedule |
AuthoringTriggerSchedule |
Required; CronSchedule.expression is five UTC fields and names no timezone |
line_name |
str | None |
None; the Line this Trigger runs |
action |
InternalActionName | None |
None; a registered internal action |
runbook_name |
str | None |
None; The Runbook this Trigger runs (cadence, cron or generation_accepted); each Line step runs under that Line's own enablement. |
retire |
bool |
False |
Provider slots
A Procedure names no provider. Each provider-calling node names a slot, and
each slot names a capability ({"capability": "name@N"}, optionally
"may_truncate": true): an immutable, versioned artifact with a request
Contract, a result Contract and an effect. A provider operation declares the
capability names it serves and carries its own copies of its shapes. A Line
binds each slot to one exact build and operation when it is accepted:
bindings names provider[/build][#operation] per slot, and a slot left out
is fitted to the one live operation that serves its capability and fits it
(request, result, effect, and layout coverage of every Capture field). No such
operation refuses cruxible.line.slot_unfilled (naming those that declare the
capability but do not fit); several refuse cruxible.line.slot_ambiguous; a
named operation that does not fit refuses cruxible.line.binding_unfit, and
one that does not serve the capability cruxible.line.binding_undeclared.
Runs use the Line's binding as recorded and recheck it at admission, never
refitting. A direct procedure run fits its slots the same way when the
request is admitted (--bind slot=provider, or bindings={"slot": "provider"}
to the SDK's Procedure.run) and records that ephemeral spec's digest with
the run. Sequence.extract(name, capture=..., records="set") reads a record
set of the Capture's CaptureKind layout; the layout supplies paths, keys, the
row Contract and field rules.
ChangeSetInput
Import: cruxible_client.contracts.authoring.inputs.ChangeSetInput. Source
| Field | Type | Default / construction |
|---|---|---|
kind |
Literal['change_set'] |
Required |
members |
tuple[AuthoringChangeSetMemberInput, ...] |
Field(min_length=1) |
rationale |
str | None |
Field(default=None, max_length=CHANGE_SET_RATIONALE_MAX_LENGTH) |
AuthoringInputError
Import: cruxible_client.contracts.authoring.inputs.AuthoringInputError. Source
| Field | Type | Default / construction |
|---|---|---|
code |
str |
Required |
field_path |
str |
Required |
message |
str |
Required |
repair |
str |
Required |
Lower-level HTTP client
CruxibleClient is synchronous, exported from cruxible_client. Construct
with exactly one of base_url or socket_path, an optional explicit bearer
token, and an optional principal ID sent as X-Cruxible-Principal-Id (with
daemon auth off it is a claim of identity, not authentication); unlike Cruxible.connect, this constructor does not resolve workspace
context or perform the SDK compatibility/orientation workflow. Use a context
manager or close(). Public methods below retain explicit instance IDs and
typed request/response contracts. A method whose signature takes request
expects that model, not an invented SDK payload.
Each method’s complete signature is listed, with its HTTP operation when directly declared in the client. GET reads are subject to visibility and snapshot rules; POST can be a read, preflight, append, or governed mutation according to the operation. HTTP verb alone does not indicate acceptance. Methods never turn a returned proposal into an approval without a separate explicit operation. Exceptions are decoded through ErrorResponse/response_to_error. Shape-invalid responses can raise validation errors; ambiguous transport completion must be checked before retrying a write.
CruxibleClient(*, base_url: str | None=None, socket_path: str | None=None, token: str | None=None, principal_id: str | None=None, permission_ceiling: Literal['read_only', 'governed_write', 'graph_write'] | None=None) -> None
permission_ceiling caps every request this client makes at that tier: the
daemon serves the lower of it and the request's own authority, so a client can
only lower what it may do.
CruxibleClient.close
close() -> None
CruxibleClient.__enter__
__enter__() -> CruxibleClient
CruxibleClient.__exit__
__exit__(*_args: object) -> None
CruxibleClient.version
version() -> str
CruxibleClient.daemon_identity
daemon_identity(*, timeout: float | None = None) -> tuple[str, str | None]
The daemon's version and the boot id of its process image, from /version. A
restarted daemon answers with a new boot id.
CruxibleClient.check_projection_blocks
check_projection_blocks(
instance_id: str,
*,
request: contracts.ProjectionCheckRequest,
) -> contracts.ProjectionCheckResult
HTTP: POST f'/api/v1/{instance_id}/projections/check'.
CruxibleClient.read_block_sync_backing
read_block_sync_backing(
instance_id: str,
*,
request: contracts.BlockSyncReadRequest,
) -> contracts.BlockSyncReadResult
HTTP: POST f'/api/v1/{instance_id}/projections/sync-backing'.
CruxibleClient.server_info
server_info() -> contracts.ServerInfoResult
HTTP: GET '/api/v1/server/info'.
CruxibleClient.server_restart
server_restart() -> contracts.ServerRestartResult
HTTP: POST '/api/v1/server/restart'.
CruxibleClient.server_stop
server_stop() -> contracts.ServerStopResult
HTTP: POST '/api/v1/server/stop'.
CruxibleClient.create_host
create_host(
*,
instance_id: str | None = None,
workspace_root: str | None = None,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.HostResult
HTTP: POST '/api/v1/runtime/instances'.
CruxibleClient.declare_block
declare_block(
instance_id: str,
stamp: Mapping[str, Any],
) -> contracts.BlockDeclareResult
HTTP: POST f'/api/v1/{instance_id}/blocks/declare'.
CruxibleClient.observe_blocks
observe_blocks(
instance_id: str,
*,
pages: Sequence[DeclaredBlockPageObservation],
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.BlockObserveResult
HTTP: POST f'/api/v1/{instance_id}/blocks/observe'. Records the declared blocks
read on the pages a block repin or block sync touched, for block-churn
detection; the block adapter calls it.
CruxibleClient.depublish_block
depublish_block(
instance_id: str,
file_id: str,
block_id: str,
*,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.BlockDepublishResult
HTTP: POST f'/api/v1/{instance_id}/blocks/depublish'.
CruxibleClient.host_workspace_detach
host_workspace_detach(
instance_id: str,
*,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.WorkspaceDetachResult
HTTP: POST f'/api/v1/{instance_id}/workspace-detach'.
CruxibleClient.host_workspace_registration
host_workspace_registration(
instance_id: str,
*,
workspace_root: str | None = None,
) -> contracts.HostWorkspaceRegistration
HTTP: GET f'/api/v1/{instance_id}/workspace-registration'.
CruxibleClient.show_host
show_host(instance_id: str) -> contracts.HostInspection
HTTP: GET f'/api/v1/{instance_id}/host'.
CruxibleClient.claim_runtime_bootstrap
claim_runtime_bootstrap(
instance_id: str,
bootstrap_secret: str,
*,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.RuntimeCredentialBootstrapResult
HTTP: POST f'/api/v1/{instance_id}/runtime/bootstrap/claim'.
CruxibleClient.create_runtime_credential
create_runtime_credential(
instance_id: str,
*,
principal_id: str,
permission_mode: contracts.RuntimeCredentialPermissionMode,
label: str | None = None,
principal_proof: RuntimeCredentialPrincipalProof | None = None,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.RuntimeCredentialResult
HTTP: POST f'/api/v1/{instance_id}/runtime/credentials'.
Mints a credential that acts as principal_id. The daemon refuses unless the
principal is registered and active and the request carries its authority:
either the request already acts as that principal, or principal_proof is its
single-use consent signed with its registered key
(cruxible_client.authoring.signing.sign_runtime_credential_mint). An admin
credential alone is never enough. label is a description only.
CruxibleClient.list_runtime_credentials
list_runtime_credentials(instance_id: str) -> contracts.RuntimeCredentialListResult
HTTP: GET f'/api/v1/{instance_id}/runtime/credentials'.
CruxibleClient.revoke_runtime_credential
revoke_runtime_credential(
instance_id: str,
credential_id: str,
*,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.RuntimeCredentialResult
HTTP: POST f'/api/v1/{instance_id}/runtime/credentials/{credential_id}/revoke'.
CruxibleClient.rotate_runtime_credential
rotate_runtime_credential(
instance_id: str,
credential_id: str,
*,
principal_proof: RuntimeCredentialPrincipalProof | None = None,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.RuntimeCredentialResult
HTTP: POST f'/api/v1/{instance_id}/runtime/credentials/{credential_id}/rotate'.
A credential bound to a principal is replaced only with that principal's
authority, exactly as minting one: the request acts as the principal, or
principal_proof is its signed consent to the credential's current mode and
label. An unbound operator credential rotates on the admin tier alone.
CruxibleClient.init
init(
instance_id: str,
*,
principals: Sequence[Mapping[str, Any]],
operating_profile: Literal['local', 'cloud'] = 'local',
require_independent_approval: bool = False,
workspace_root: str | None = None,
git_object_format: Literal['sha1', 'sha256'] | None = None,
mirror_url: str | None = None,
) -> contracts.InitResult
HTTP: POST f'/api/v1/{instance_id}/init'. Each of principals is a
PrincipalRecord mapping with a public key the caller already generated. The
Cruxible SDK has no init: creating an instance is a CLI step (cruxible init --principal-id owner, with --reviewer-key-dir DIR --require-independent-approval for a second approver), which starts the
daemon, generates the keys, installs the base kit and remembers the context
that Cruxible.connect() then resolves.
CruxibleClient.store_body
store_body(instance_id: str, content: bytes) -> contracts.CasObjectResult
HTTP: POST f'/api/v1/{instance_id}/bodies'.
CruxibleClient.decommission_instance
decommission_instance(
instance_id: str,
*,
reason: str,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.InstanceDecommissionResult
HTTP: POST f'/api/v1/{instance_id}/instance/decommission'.
CruxibleClient.rebuild_next
rebuild_next(instance_id: str) -> contracts.NextRebuildResult
HTTP: POST f'/api/v1/{instance_id}/instance/rebuild-next'.
Drops the next worker's facts and rows and derives them again from nothing: the
operator's repair when a stalled next consumer names it. It changes no accepted
state and no evidence; ADMIN only.
CruxibleClient.set_ledger_mirror
set_ledger_mirror(
instance_id: str,
*,
url: str,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.LedgerMirror
HTTP: POST f'/api/v1/{instance_id}/ledger/mirror'.
CruxibleClient.publish_ledger
publish_ledger(
instance_id: str,
*,
timeout: float = 60.0,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.LedgerMirror
HTTP: POST f'/api/v1/{instance_id}/ledger/publish'.
CruxibleClient.clear_ledger_mirror
clear_ledger_mirror(
instance_id: str,
*,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.LedgerMirrorCleared
HTTP: POST f'/api/v1/{instance_id}/ledger/mirror/clear'.
CruxibleClient.list_provider_packages
list_provider_packages(instance_id: str) -> ProviderCatalog
HTTP: GET f'/api/v1/{instance_id}/providers'.
CruxibleClient.install_provider
install_provider(
instance_id: str,
request: ProviderInstallRequest,
) -> ProviderInstallResult
HTTP: POST f'/api/v1/{instance_id}/providers/install'.
CruxibleClient.propose_document
propose_document(
instance_id: str,
*,
shell: Mapping[str, Any],
proposal_name: str,
source_compilation_digest: str | None = None,
base: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
dry_run: bool | None = None,
at: str | None = None,
accept: AuthoringAccept = 'if_allowed',
) -> contracts.ProposalInspection
HTTP: POST f'/api/v1/{instance_id}/documents/proposals'.
CruxibleClient.propose_compiler_upgrade
propose_compiler_upgrade(
instance_id: str,
*,
target: CompilerCoordinate | None = None,
base: AcceptedCoordinate | contracts.AcceptedCoordinate | None = None,
proposal_name: str | None = None,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.ProposalInspection
HTTP: POST f'/api/v1/{instance_id}/compiler/proposals'.
CruxibleClient.propose_principal_change
propose_principal_change(
instance_id: str,
*,
principal: Mapping[str, Any],
proposal_name: str,
base: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.ProposalInspection
HTTP: POST f'/api/v1/{instance_id}/principals/proposals'.
CruxibleClient.whoami
whoami(instance_id: str) -> contracts.WhoAmI
HTTP: GET f'/api/v1/{instance_id}/whoami'.
CruxibleClient.head
head(
instance_id: str,
*,
at: contracts.AcceptedCoordinate | Mapping[str, Any] | str | None = None,
) -> contracts.Head
HTTP: GET f'/api/v1/{instance_id}/head'. The accepted head (or the coordinate at names) as Head {instance, coordinate, generation} and nothing else: the cheapest read, which Cruxible.refresh() uses in place of orient.
CruxibleClient.orient
orient(
instance_id: str,
*,
kind: str | None = None,
section: contracts.OrientSection | None = None,
limit: int | None = None,
cursor: str | None = None,
at: contracts.AcceptedCoordinate | Mapping[str, Any] | str | None = None,
evaluation_time: str | None = None,
surface: contracts.OrientSurface = 'sdk',
caller_tools: Sequence[str] | None = None,
vocabulary_at: str | None = None,
) -> contracts.OrientResult
HTTP: GET f'/api/v1/{instance_id}/orient'. at is an accepted coordinate or one accepted generation's Git OID; surface picks how next suggestions are written (mcp, cli or sdk).
CruxibleClient.list_proposals
list_proposals(
instance_id: str,
*,
status: Literal['open', 'awaiting_readmit', 'settled', 'incomplete'] | None = None,
limit: int | None = None,
cursor: str | None = None,
) -> contracts.ProposalList
HTTP: GET f'/api/v1/{instance_id}/proposals'.
CruxibleClient.resolve_proposal_selector
resolve_proposal_selector(
instance_id: str,
selector: str,
) -> contracts.ProposalSelectorResult
HTTP: GET f'/api/v1/{instance_id}/proposal-selector'.
CruxibleClient.readmit_proposal
readmit_proposal(
instance_id: str,
proposal_id: str,
*,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.ProposalReadmitResult
HTTP: POST f'/api/v1/{instance_id}/proposals/{proposal_id}/readmit'.
CruxibleClient.withdraw_proposal
withdraw_proposal(
instance_id: str,
proposal_id: str,
*,
reason: str,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.ProposalWithdrawResult
HTTP: POST f'/api/v1/{instance_id}/proposals/{proposal_id}/withdraw'.
CruxibleClient.reject_proposal
reject_proposal(
instance_id: str,
proposal_id: str,
*,
reason: str,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.ProposalRejectResult
HTTP: POST f'/api/v1/{instance_id}/proposals/{proposal_id}/reject'. A
reviewer (graph_write) rejects another actor's open or stale proposal, as
cruxible proposal reject; Proposal.reject(reason) is the same call on the
Cruxible SDK.
CruxibleClient.review_proposal
review_proposal(
instance_id: str,
proposal_id: str,
*,
include_body: bool | None = None,
workspace_observation: Mapping[str, Any] | None = None,
item_reasons_after: str | None = None,
item_reasons_limit: int | None = None,
detail: bool = False,
summary_after: str | None = None,
summary_group: str | None = None,
rows_after: str | None = None,
rows_limit: int = 5,
groups_limit: int = 5,
findings_after: str | None = None,
changes_from: int = 0,
definitions_from: int = 0,
groups: bool = True,
) -> contracts.ProposalReviewResponse
Without detail, a ProposalReviewSummary: the value changes (changes,
each a write's ChangeOutcome with its role, citations and cited text),
change_counts, and definitions (typed blocks for a Line, ProcedureMandate,
Runbook and Trigger), paged by changes_from / definitions_from (a page's
changes_next / definitions_next); groups=False leaves out the stored
fields grouped by kind. str(summary) is the text cruxible proposal review
prints. With detail=True, the full ProposalReview.
HTTP: POST f'/api/v1/{instance_id}/proposals/{proposal_id}/review'.
CruxibleClient.prepare_approval
prepare_approval(
instance_id: str,
proposal_id: str,
*,
signer_id: str,
include_body: bool = False,
reviewed_candidate_digest: str | None = None,
) -> contracts.ApprovalChallenge
HTTP: POST f'/api/v1/{instance_id}/proposals/{proposal_id}/approval-challenge'. The statement to sign;
reviewed_candidate_digest binds it to the candidate the signer reviewed, and
any other candidate is refused.
CruxibleClient.submit_approval
submit_approval(
instance_id: str,
proposal_id: str,
*,
attestation: Mapping[str, Any],
hold: bool = False,
reviewed_candidate_digest: str | None = None,
) -> contracts.ProposalApprovalResult
Submit one approval; the daemon activates a candidate it completes.
hold=True signs only and leaves activation to someone else.
reviewed_candidate_digest binds the approval to the candidate the signer
reviewed: a proposal proposed again at the head since is refused
(cruxible.approval.reviewed_candidate_changed), naming its successor and
whether its members are identical, and nothing is signed.
HTTP: POST f'/api/v1/{instance_id}/proposals/{proposal_id}/approvals'.
CruxibleClient.approve_proposal
approve_proposal(
instance_id: str,
proposal_id: str,
*,
signer_id: str,
signer: Callable[[dict[str, Any]], Mapping[str, Any]],
include_body: bool = False,
hold: bool = False,
) -> contracts.ProposalApprovalResult
CruxibleClient.activate_proposal
activate_proposal(
instance_id: str,
proposal_id: str,
) -> contracts.ProposalActivationResult
HTTP: POST f'/api/v1/{instance_id}/proposals/{proposal_id}/activate'.
CruxibleClient.read_capture
read_capture(instance_id: str, request: CaptureReadRequest) -> CaptureRead
HTTP: POST f'/api/v1/{instance_id}/captures/read'.
CruxibleClient.file_context
file_context(
instance_id: str,
*,
documents: Sequence[str] | None = None,
) -> contracts.FileContext
HTTP: GET f'/api/v1/{instance_id}/files/context'.
CruxibleClient.check_file_bundle
check_file_bundle(
instance_id: str,
*,
bundle: Mapping[str, Any],
) -> contracts.FileCheckResult
HTTP: POST f'/api/v1/{instance_id}/files/check'.
CruxibleClient.propose_file_bundle
propose_file_bundle(
instance_id: str,
*,
bundle: Mapping[str, Any],
file: str,
proposal_name: str,
dry_run: bool | None = None,
at: str | None = None,
accept: AuthoringAccept = 'if_allowed',
) -> contracts.ProposalInspection
HTTP: POST f'/api/v1/{instance_id}/files/proposals'.
CruxibleClient.propose_builtin_claim_type
propose_builtin_claim_type(
instance_id: str,
*,
builtin: BuiltinClaimTypeName,
proposal_name: str,
base: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
dry_run: bool | None = None,
at: str | None = None,
accept: AuthoringAccept = 'if_allowed',
) -> contracts.ClaimTypeInputProposalResult
HTTP: POST f'/api/v1/{instance_id}/claim-types/proposals'.
Builtin adoption sends only its declared name; the daemon supplies the exact
builtin definition. User definitions use typed ClaimType input, with an optional
base coordinate. Raw ClaimType envelopes are refused.
CruxibleClient.propose_claim_type_input
propose_claim_type_input(
instance_id: str,
*,
input: Mapping[str, Any],
proposal_name: str,
base: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
dry_run: bool | None = None,
at: str | None = None,
accept: AuthoringAccept = 'if_allowed',
) -> contracts.ClaimTypeInputProposalResult
HTTP: POST f'/api/v1/{instance_id}/claim-types/proposals'.
CruxibleClient.migrate_claim_type
migrate_claim_type(
instance_id: str,
*,
request: Mapping[str, Any],
) -> contracts.ClaimTypeMigrationResponse
HTTP: POST f'/api/v1/{instance_id}/claim-types/migrations'.
CruxibleClient.set
set(instance_id: str, *, request: SetRequest) -> WriteOutcome
HTTP: POST f'/api/v1/{instance_id}/set'. A refused write is an
outcome (status: refused), not an HTTP error.
CruxibleClient.retire
retire(instance_id: str, *, request: RetireRequest) -> WriteOutcome
HTTP: POST f'/api/v1/{instance_id}/retire'.
CruxibleClient.write
write(instance_id: str, *, request: WriteRequest) -> WriteOutcome
HTTP: POST f'/api/v1/{instance_id}/write'.
CruxibleClient.append_claim_attestation
append_claim_attestation(
instance_id: str,
*,
request: ClaimAttestationAppendRequest,
) -> ClaimAttestationAppendResult
HTTP: POST f'/api/v1/{instance_id}/claim-attestations'.
CruxibleClient.list_predictions
list_predictions(
instance_id: str,
*,
request: contracts.ResolutionContractsRequest,
) -> contracts.ResolutionContractsResult
HTTP: POST f'/api/v1/{instance_id}/predictions/query'.
CruxibleClient.predict
predict(
instance_id: str,
*,
request: contracts.PredictRequest,
) -> contracts.PredictResult
HTTP: POST f'/api/v1/{instance_id}/predictions'.
CruxibleClient.settle_prediction
settle_prediction(
instance_id: str,
prediction_id: str,
*,
request: contracts.SettleRequest,
) -> contracts.SettleResult
HTTP: POST f'/api/v1/{instance_id}/predictions/{prediction_id}/settlements'.
CruxibleClient.run_internal_action
run_internal_action(
instance_id: str,
*,
request: contracts.ActionRunRequest,
) -> contracts.ActionRunResult
Fires one registered internal action by hand, outside any Trigger's
schedule: floor.refresh, evidence.sweep or prediction.anchor_retry
(curation.detect is not served in this release and refuses). The fire is appended to the same trigger journal a
Trigger's own schedule writes to, so the daemon's normal consumer runner
picks it up and runs it exactly as a scheduled fire; an unregistered action
name is refused. request.wait starts and runs no work itself: it only
waits, bounded by request.wait_timeout_seconds, until the owning part's
own recorded progress shows this fire processed, and reports what it found
in the result's outcome (completed, timed_out -- the fire stays
queued and still runs normally -- or not_supported for a part that
exposes no completion cursor).
HTTP: POST f'/api/v1/{instance_id}/actions/run'.
CruxibleClient.get_authoring_intent
get_authoring_intent(
instance_id: str,
intent_id: str,
) -> contracts.AuthoringIntentViewRecord
HTTP: GET f'/api/v1/{instance_id}/authoring/intents/{intent_id}'.
CruxibleClient.list_pending_authoring_intents
list_pending_authoring_intents(instance_id: str) -> contracts.AuthoringIntentListRecord
HTTP: GET f'/api/v1/{instance_id}/authoring/intents'.
CruxibleClient.compile_authoring
compile_authoring(
instance_id: str,
*,
payload: Mapping[str, Any],
intent_id: str | None = None,
reference_expectations: Sequence[Mapping[str, Any]] | None = None,
program_stamp: Mapping[str, Any] | None = None,
) -> contracts.AuthoringPreflightResult
HTTP: POST f'/api/v1/{instance_id}/authoring/compile'.
The unstamped payload form remains in use by CLI authoring bind and MCP
cruxible_authoring_bind: both compile a locally bound selection payload
without an SDK program stamp. The stamped form requires
reference_expectations and program_stamp together and validates the stamp's
SDK version and contract snapshot. compile_authoring serves both forms;
submit_authoring serves only the stamped form. Tagless input compilation and
submission remain separate typed entry points. These forms are retained while
binding callers depend on the unstamped path.
CruxibleClient.compile_authoring_input
compile_authoring_input(
instance_id: str,
*,
input: Mapping[str, Any],
intent_id: str | None = None,
) -> contracts.AuthoringPreflightResult
HTTP: POST f'/api/v1/{instance_id}/authoring/compile'.
CruxibleClient.submit_authoring_input
submit_authoring_input(
instance_id: str,
*,
input: Mapping[str, Any],
intent_id: str | None = None,
accept: AuthoringAccept = 'if_allowed',
) -> contracts.AuthoringSubmitResultRecord
Compile one tagless input and submit it in one call; with intent_id, revise
that staged intent first. HTTP: POST f'/api/v1/{instance_id}/authoring/submit'.
CruxibleClient.preview_authoring_input
preview_authoring_input(
instance_id: str,
*,
input: Mapping[str, Any],
) -> contracts.AuthoringPreflightResult
The preflight submitting this input would run, with every refusal; no intent is
saved. The result's certificate still carries an intent_id: it names the
transient intent of that one preflight, which resume_intent cannot read
(cruxible.authoring.intent_not_found) and which differs on every preview and
from the intent a later submit_authoring_input creates. HTTP: POST f'/api/v1/{instance_id}/authoring/submit' with dry_run.
CruxibleClient.preflight_authoring_intent
preflight_authoring_intent(
instance_id: str,
intent_id: str,
) -> contracts.AuthoringPreflightResult
HTTP: POST f'/api/v1/{instance_id}/authoring/intents/{intent_id}/preflight'.
CruxibleClient.submit_authoring_intent
submit_authoring_intent(
instance_id: str,
intent_id: str,
*,
accept: AuthoringAccept = 'if_allowed',
) -> contracts.AuthoringSubmitResultRecord
HTTP: POST f'/api/v1/{instance_id}/authoring/intents/{intent_id}/submit'.
CruxibleClient.authoring_intent_status
authoring_intent_status(
instance_id: str,
intent_id: str,
) -> contracts.CandidateStatusRecord
HTTP: GET f'/api/v1/{instance_id}/authoring/intents/{intent_id}/status'.
CruxibleClient.read_claim_batch
read_claim_batch(
instance_id: str,
*,
request: ClaimReadBatchRequest,
) -> ClaimReadBatchResult
HTTP: POST f'/api/v1/{instance_id}/claims/read-batch'. SDK-internal: World reads (World.prefetch and WorldSubject.claims) and Cruxible.read_whole_many use it. at is the full accepted coordinate or one accepted generation's whole git oid (as a preview's read_whole.at names it: exactly, at the instance's SHA-1 or SHA-256 length, never a prefix); the result always names the full coordinate read.
CruxibleClient.get_batch
get_batch(instance_id: str, *, request: GetBatchRequest) -> GetBatchResult
HTTP: POST f'/api/v1/{instance_id}/get-batch'. SDK-internal: several references read at one coordinate and one detail, so the SDK can read a whole vocabulary (every ClaimType envelope, for world()) in a few round trips. GetBatchRequest takes refs (1 to 64), detail (summary or proof, default proof), at and evaluation_time; every result answers the coordinate the first one resolved. Agents call Cruxible.get once per reference.
CruxibleClient.get_claim_backings
get_claim_backings(
instance_id: str,
*,
claim_ids: Sequence[str],
at: contracts.AcceptedCoordinate | Mapping[str, Any],
) -> ClaimBackingsResult
HTTP: POST f'/api/v1/{instance_id}/claims/backings'. SDK-internal, kept beside read_claim_batch.
CruxibleClient.procedure_readiness
procedure_readiness(
instance_id: str,
name: str,
*,
at: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
) -> contracts.ProcedureReadiness
HTTP: GET f'/api/v1/{instance_id}/procedures/{name}/readiness'. The SDK's
Procedure handle reads its definition and input contract through this route;
read how a Procedure runs with get (runnable).
CruxibleClient.run_procedure
run_procedure(
instance_id: str,
name: str,
*,
evaluation_time: str | None,
at: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
input: Any,
parameters: Mapping[str, Any] | None = None,
bindings: Mapping[str, str] | None = None,
resolution_contract: contracts.ResolutionContractReference | None = None,
trigger_event: contracts.TriggerEventReference | None = None,
) -> contracts.ProcedureRunState
HTTP: POST f'/api/v1/{instance_id}/procedures/{name}/runs'.
CruxibleClient.get_procedure_run
get_procedure_run(instance_id: str, run_id: str) -> contracts.ProcedureRunState
HTTP: GET f'/api/v1/{instance_id}/procedure-runs/{run_id}'.
CruxibleClient.measure_procedure
measure_procedure(
instance_id: str,
name: str,
*,
request: contracts.ProcedureMeasureRequest,
) -> contracts.ProcedureMeasureResult
HTTP: POST f'/api/v1/{instance_id}/procedures/{name}/measurements'.
CruxibleClient.list_procedure_readings
list_procedure_readings(
instance_id: str,
name: str,
*,
request: contracts.ProcedureReadingsRequest,
) -> contracts.ProcedureReadingsResult
HTTP: POST f'/api/v1/{instance_id}/procedures/{name}/readings'.
CruxibleClient.run_line
run_line(
instance_id: str,
line: str,
*,
occurrence_id: str | None,
evaluation_time: str | None = None,
resolution_contract: contracts.ResolutionContractReference | None = None,
event: contracts.TriggerEventReference | None = None,
repeat: bool = False,
parameters: Mapping[str, Any] | None = None,
) -> contracts.ProcedureRunState
HTTP: POST f'/api/v1/{instance_id}/lines/{line}/runs'. One manual occurrence; see Cruxible.line.
CruxibleClient.preview_runbook
preview_runbook(instance_id: str, runbook: str) -> RunbookPreview
What each step of an accepted Runbook can read, write, call, settle and
propose, from accepted definitions only, as cruxible runbook preview NAME;
nothing runs. HTTP: GET f'/api/v1/{instance_id}/runbooks/{runbook}/preview'.
cx.runbook(name).preview() is the same call on the Cruxible SDK. The result
is a typed model that prints as the CLI prints it: print(preview), or walk
preview.steps.
CruxibleClient.run_runbook
run_runbook(instance_id: str, runbook: str) -> RunbookRunResult
Runs an accepted Runbook now, step by step, each Line as your manual run, as
cruxible runbook run NAME; it stops at the first step that fails or sends
writes to review. HTTP: POST f'/api/v1/{instance_id}/runbooks/{runbook}/runs'.
cx.runbook(name).run() is the same call on the Cruxible SDK.
CruxibleClient.next
next(
instance_id: str,
*,
evaluation_time: str,
access_profile: Mapping[str, Any],
at: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
expiring_within: Mapping[str, Any] | None = None,
workspace_observation: Mapping[str, Any] | None = None,
since_result_digest: str | None = None,
at_attestation_head_digest: str | None = None,
limit: int | None = None,
cursor: str | None = None,
caller_surface: Literal['cli', 'mcp', 'sdk'] | None = None,
caller_tools: Sequence[str] | None = None,
) -> contracts.NextResult
HTTP: POST f'/api/v1/{instance_id}/next'.
CruxibleClient.since
since(
instance_id: str,
*,
generation: int,
access_profile: Mapping[str, Any],
at: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
max_rows: int = 100,
max_bytes: int = 65536,
cursor: contracts.SinceCursor | Mapping[str, Any] | None = None,
) -> contracts.SinceResult
HTTP: POST f'/api/v1/{instance_id}/since'.
CruxibleClient.duplicates
duplicates(instance_id: str, *, kind: str, limit: int | None = None, cursor: str | None = None) -> DuplicatesAuditResult
HTTP: POST f'/api/v1/{instance_id}/duplicates'. One page of the duplicates audit of one kind.
CruxibleClient.audit
audit(
instance_id: str,
*,
evaluation_time: str,
access_profile: Mapping[str, Any],
at: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
claim_type_identities: tuple[str, ...] = (),
subject_kinds: tuple[str, ...] = (),
max_rows: int = 100,
max_bytes: int = 65536,
cursor: contracts.AuditCursor | Mapping[str, Any] | None = None,
) -> contracts.AuditResult
HTTP: POST f'/api/v1/{instance_id}/audit'.
CruxibleClient.resolve_coverage
resolve_coverage(
instance_id: str,
*,
observations: Sequence[Mapping[str, Any]],
at: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
budget: Mapping[str, Any] | None = None,
scan_budget: Mapping[str, Any] | None = None,
) -> contracts.CoverageResult
Resolve coverage for a batch of already-observed working sources.
The caller observes its own working set -- binding each path to a declared logical source and hashing the bytes it actually read -- and this call carries those observations. Coverage is delivered against them; the daemon reads no client filesystem.
HTTP: POST f'/api/v1/{instance_id}/coverage/resolve'.
CruxibleClient.export_floor
export_floor(
instance_id: str,
*,
at: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
include: Sequence[contracts.FloorExportPart] = (),
) -> contracts.FloorExport
HTTP: POST f'/api/v1/{instance_id}/floor/export'.
CruxibleClient.add_kit
add_kit(instance_id: str, request: KitAddRequest) -> KitChangeResult
HTTP: POST f'/api/v1/{instance_id}/kits'.
Installing a kit is a CLI step: the Cruxible SDK has no kit method. Run
cruxible kit add KIT_DIR to preview and cruxible kit add KIT_DIR --commit --at OID to install; the CLI reads the kit directory, stages the bundled
provider files and Document bodies in the daemon's body store, and installs
the providers before the definitions. This method is that last call: its
KitAddRequest.bundle comes from read_kit_directory(path) and must first
pass through stage_kit_providers(client, instance_id, bundle) (both in
cruxible_client.kits).
CruxibleClient.build_kit
build_kit(instance_id: str, request: KitBuildRequest) -> KitBuildResult
HTTP: POST f'/api/v1/{instance_id}/kits/build'.
CruxibleClient.deliver_floor_now
deliver_floor_now(
instance_id: str,
*,
include: tuple[contracts.FloorExportPart, ...] = (),
at: contracts.AcceptedCoordinate | None = None,
) -> contracts.FloorDeliveryResult
HTTP: POST f'/api/v1/{instance_id}/floor/deliver-now'.
CruxibleClient.disable_line
disable_line(
instance_id: str,
line: str,
*,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.LineEnablement
HTTP: POST f'/api/v1/{instance_id}/lines/{line}/disable'.
CruxibleClient.dispatch_line
dispatch_line(
instance_id: str,
line: str,
*,
request: contracts.LineDispatchRequest,
) -> contracts.LineDispatchResult
HTTP: POST f'/api/v1/{instance_id}/lines/{line}/dispatch'.
CruxibleClient.enable_line
enable_line(
instance_id: str,
line: str,
*,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.LineEnablement
HTTP: POST f'/api/v1/{instance_id}/lines/{line}/enable'.
CruxibleClient.evaluate_line
evaluate_line(
instance_id: str,
line: str,
*,
request: contracts.LineEvaluateRequest,
) -> contracts.LineEvaluateResult
HTTP: POST f'/api/v1/{instance_id}/lines/{line}/evaluate'.
CruxibleClient.floor_delta
floor_delta(
instance_id: str,
*,
at: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
base_generation: int | None = None,
base_renderer: str | None = None,
) -> FloorDelta
What brings a floor at base_generation to at (default: head).
HTTP: POST f'/api/v1/{instance_id}/floor/delta'.
CruxibleClient.get
get(instance_id: str, *, request: GetRequest) -> GetResult
One governed thing by any reference form, values first; see detail.
HTTP: POST f'/api/v1/{instance_id}/get'.
CruxibleClient.host_workspace_attach
host_workspace_attach(
instance_id: str,
*,
workspace_root: str,
dry_run: bool | None = None,
at: str | None = None,
) -> contracts.HostWorkspaceAttachResult
Attach the host to a Git worktree, initialized or not (local socket only).
HTTP: POST f'/api/v1/{instance_id}/workspace-attach'.
CruxibleClient.kit_status
kit_status(instance_id: str) -> KitStatus
HTTP: GET f'/api/v1/{instance_id}/kits'.
CruxibleClient.query
query(
instance_id: str,
*,
request: contracts.QueryRequest,
) -> contracts.QueryResultRecord
One page of a query answer; pass next_cursor back while truncated.
HTTP: POST f'/api/v1/{instance_id}/query'.
CruxibleClient.remove_kit
remove_kit(instance_id: str, request: KitRemoveRequest) -> KitChangeResult
HTTP: POST f'/api/v1/{instance_id}/kits/remove'.
CruxibleClient.set_floor_delivery
set_floor_delivery(
instance_id: str,
*,
enabled: bool,
) -> contracts.HostWorkspaceRegistration
HTTP: POST f'/api/v1/{instance_id}/workspace/floor-delivery'.
CruxibleClient.submit_authoring
submit_authoring(
instance_id: str,
*,
payload: Mapping[str, Any],
reference_expectations: Sequence[Mapping[str, Any]],
program_stamp: Mapping[str, Any],
intent_id: str | None = None,
accept: AuthoringAccept = 'if_allowed',
) -> contracts.AuthoringSubmitResultRecord
Compile and submit in one request; the daemon preflights once, on submit.
HTTP: POST f'/api/v1/{instance_id}/authoring/submit'.
CruxibleClient.list_inbox
list_inbox(
instance_id: str,
*,
line: str | None = None,
status: contracts.InboxItemStatus | None = None,
limit: int | None = None,
cursor: str | None = None,
) -> contracts.InboxList
One page of Line inbox items, most recent first; follow next_cursor. As cx.inbox().list(...). HTTP: GET f'/api/v1/{instance_id}/inbox'.
CruxibleClient.get_inbox_item
get_inbox_item(
instance_id: str,
item_id: str,
) -> contracts.InboxItem
One inbox item whole: envelope, payload as posted, and its latest dispositions, as cx.inbox().get(item_id). HTTP: GET f'/api/v1/{instance_id}/inbox/{item_id}'.
CruxibleClient.ack_inbox_item
ack_inbox_item(
instance_id: str,
item_id: str,
) -> contracts.InboxDispositionResult
Acknowledges one Line inbox item, as cx.inbox().ack(item_id). HTTP: POST f'/api/v1/{instance_id}/inbox/{item_id}/ack'.
CruxibleClient.dismiss_inbox_item
dismiss_inbox_item(
instance_id: str,
item_id: str,
*,
reason: str,
) -> contracts.InboxDispositionResult
Dismisses one Line inbox item with a recorded reason, as cx.inbox().dismiss(item_id, reason=...). HTTP: POST f'/api/v1/{instance_id}/inbox/{item_id}/dismiss'.
CruxibleClient.link_inbox_item
link_inbox_item(
instance_id: str,
item_id: str,
*,
target: contracts.InboxLinkTarget,
) -> contracts.InboxDispositionResult
Links one Line inbox item to a proposal or an accepted Subject, as cx.inbox().link(item_id, ...). HTTP: POST f'/api/v1/{instance_id}/inbox/{item_id}/link'.
CruxibleClient.backlinks
backlinks(
instance_id: str,
*,
request: BacklinksRequest,
) -> BacklinksResult
Every pointer into one Subject, ClaimType, Procedure or workspace section, as Cruxible.backlinks. HTTP: POST f'/api/v1/{instance_id}/backlinks'.
CruxibleClient.erase_capture
erase_capture(
instance_id: str,
request: CaptureEraseRequest,
) -> CaptureEraseResult
Erases one Capture's retained body, as Cruxible.erase_capture. It cannot be undone: it previews unless request.dry_run is false, and then commits only with request.at. HTTP: POST f'/api/v1/{instance_id}/captures/erase'.
CruxibleClient.dispose_procedure_resolution
dispose_procedure_resolution(
instance_id: str,
name: str,
*,
request: contracts.ProcedureResolutionDispositionRequest,
) -> contracts.ProcedureResolutionDispositionResult
Records an attributed reviewer judgment on a measurement resolution, as Procedure.dispose_resolution. HTTP: POST f'/api/v1/{instance_id}/procedures/{name}/resolution-dispositions'.
CruxibleClient.prepare_claim_attestation_evidence
prepare_claim_attestation_evidence(
instance_id: str,
*,
request: ClaimAttestationEvidenceRequest,
) -> ClaimAttestationEvidenceResult
The Captures an attestation will cite, made from write's evidence options; Cruxible.attest calls it before signing. HTTP: POST f'/api/v1/{instance_id}/claim-attestations/evidence'.
CruxibleClient.propose_capture_contract_input
propose_capture_contract_input(
instance_id: str,
*,
input: Mapping[str, Any],
proposal_name: str,
base: contracts.AcceptedCoordinate | Mapping[str, Any] | None = None,
dry_run: bool | None = None,
at: str | None = None,
accept: AuthoringAccept = 'if_allowed',
) -> contracts.ProposalInspection
Proposes a CaptureContract input or merge patch; lands when allowed. HTTP: POST f'/api/v1/{instance_id}/capture-contracts/proposals'.
CruxibleClient.open_capture_upload
open_capture_upload(
instance_id: str,
*,
byte_length: int,
sha256: str,
filename: str,
) -> CaptureUploadSession
Opens an upload session for one file of exactly these bytes. HTTP: POST f'/api/v1/{instance_id}/uploads'.
CruxibleClient.put_capture_upload_part
put_capture_upload_part(
instance_id: str,
upload_id: str,
part: int,
content: bytes,
) -> CaptureUploadSession
Sends one part as raw octets (at most UPLOAD_PART_SIZE bytes). HTTP: POST f'/api/v1/{instance_id}/uploads/{upload_id}/parts/{part}'.
CruxibleClient.capture_upload_status
capture_upload_status(
instance_id: str,
upload_id: str,
) -> CaptureUploadSession
Reads one upload session's state. HTTP: GET f'/api/v1/{instance_id}/uploads/{upload_id}'.
CruxibleClient.complete_capture_upload
complete_capture_upload(
instance_id: str,
upload_id: str,
request: CaptureUploadCompleteRequest,
) -> CaptureUploadCompleteResult
Completes an upload session; the daemon runs the acquire Procedure on the staged file. HTTP: POST f'/api/v1/{instance_id}/uploads/{upload_id}/complete'.
CruxibleClient.upload_capture
upload_capture(
instance_id: str,
content: bytes,
*,
filename: str,
procedure: str,
input: Mapping[str, object] | None = None,
input_path_field: str = 'relative_path',
at: contracts.AcceptedCoordinate | None = None,
) -> CaptureUploadCompleteResult
Uploads a scan or log and reads it as a Capture through procedure: opens a session, sends each part of at most UPLOAD_PART_SIZE bytes, and completes it; the daemon runs the acquire Procedure on the staged file and deletes it.
CruxibleClient.move_provider
move_provider(
instance_id: str,
request: ProviderMoveRequest,
) -> ProviderMoveResult
Moves Lines from one provider build to another, as cruxible provider move. HTTP: POST f'/api/v1/{instance_id}/providers/move'.
CruxibleClient.retire_provider
retire_provider(
instance_id: str,
request: ProviderRetireRequest,
) -> ProviderRetireResult
Retires one provider build, as cruxible provider retire. HTTP: POST f'/api/v1/{instance_id}/providers/retire'.
Errors and unsupported surfaces
| Family | Handling |
|---|---|
| SdkError | Local SDK refusal, also a ValueError/CoreError; inspect code and error-specific fields. |
| QueryNameError | A query named a kind, field or query that does not exist; nearest lists the closest valid names. |
| ClaimRoleNotPermittedError | A write or Claim named a role its ClaimType does not permit. |
| WholeValueUnavailable | read_whole or read_whole_many was given a TruncatedText that names no whole read (a plain query row cell, a write's after); or read_whole_many was given one Claim previewed at two generations, or a daemon that cannot pin a batched read to a git oid. |
| WriteRefusalError, ReadRefusalError | A served write or read refused; the outcome or refusal carries its code, nearest names and repair. |
| ReferenceKindError, LiteralValueTypeError, ExactContentTypeError | Wrong reference/object relationship; repair the typed authoring input. |
| AbsentSubject, ClaimValueError, SourceSelectionError | Missing vocabulary/Subject, invalid constrained value, or invalid source selection. |
| CapabilityNotServed | Explicit unsupported feature with capability, code, and repair. |
| ProcedureCompositionError | Contains .preview, including per-step errors and pending checks. |
| ApprovalReviewMismatch | Review/signing context does not match; obtain and inspect a new review rather than silently signing a changed candidate. |
CoreError with error_code cruxible.approval.reviewed_candidate_changed |
The reviewed proposal was proposed again at the head; nothing was signed. exc.repair.arguments["proposal_id"] names the successor to review and approve. cruxible.approval.creator_forbidden refuses a proposal's own author under independent approval. |
| SigningKeyError | cx.signer(...) found no key for the principal, or the key is not the one the instance holds for it; the message names the repair. |
| ProjectionMarkerError, ProjectionRepinError, ProjectionSyncError | Invalid/corrupt declaration, refused repin, or policy-enforced sync failure. |
| IncompatibleDaemonVersion | Client and daemon authoring contract snapshots differ; upgrade deliberately. |
| ServerUnreachableError | Connection failure or timeout; a timed-out mutation may have completed. |
| AuthenticationError / PermissionDeniedError / typed daemon errors | Repair credentials, scope, authority, or the server’s structured refusal. |
ClaimDraft.derived_by() always raises the unavailable derivation-carry refusal.
Public wire models remain in cruxible_client.contracts; model_fields,
model_json_schema(), and model validation expose exact types, requiredness,
constraints, and discriminator vocabulary. A model existing in that namespace
does not mean the SDK currently serves its operation.
Import and module index
The table lists every name in the package-root __all__ and its defining
module. The following appendix indexes the remaining exported authoring utilities
and shared models. Source links resolve to the exact checked-out revision and
include constructor/validator definitions for request and response contracts.
| Root import | Definition / availability |
|---|---|
ApprovalReviewMismatch |
cruxible_client.authoring.approval · Source |
ReviewedProposal |
cruxible_client.authoring.approval · Source |
ApprovalSigner |
cruxible_client.authoring.signing · Source |
LocalEd25519ApprovalSigner |
cruxible_client.authoring.signing · Source |
AbsentSubject |
cruxible_client.authoring.sdk_types · Source |
AccessProfile |
cruxible_client.authoring.sdk_types · Source |
ActivationPolicy |
cruxible_client.authoring.sdk_types · Source |
ArtifactIdentity |
cruxible_client.contracts.artifacts · Source |
ArtifactLifecycle |
cruxible_client.contracts.artifacts · Source |
ArtifactPin |
cruxible_client.contracts.artifacts · Source |
CapabilityNotServed |
cruxible_client.authoring.sdk_types · Source |
Cardinality |
cruxible_client.authoring.sdk_types · Source |
CompactQuery |
cruxible_client.authoring.compact_query · Source |
CaptureRef |
cruxible_client.authoring.sdk_types · Source |
CaptureView |
cruxible_client.authoring.sdk_types · Source |
ClaimAdmissionPolicy |
cruxible_client.contracts.policies · Source |
ClaimAttestationSigner |
cruxible_client.authoring.attestations · Source |
ClaimRef |
cruxible_client.authoring.sdk_types · Source |
ClaimRole |
cruxible_client.authoring.sdk_types · Source |
ClaimTypeRef |
cruxible_client.authoring.sdk_types · Source |
ClaimResolutionPolicy |
cruxible_client.contracts.policies · Source |
CruxibleClient |
cruxible_client.transport.http · Source |
Disposition |
cruxible_client.authoring.sdk_types · Source |
Duration |
cruxible_client.authoring.sdk_types · Source |
CanonicalDuration |
cruxible_client.contracts.captures · Source |
EffectivePeriod |
cruxible_client.authoring.sdk_types · Source |
ExactContent |
cruxible_client.authoring.sdk_types · Source |
ClaimRoleNotPermittedError |
cruxible_client.authoring.sdk_types · Source |
ExactContentTypeError |
cruxible_client.authoring.sdk_types · Source |
KindNamespace |
cruxible_client.authoring.world · Source |
ClaimValueError |
cruxible_client.authoring.sdk_types · Source |
LiteralValue |
cruxible_client.authoring.sdk_types · Source |
LiteralValueTypeError |
cruxible_client.authoring.sdk_types · Source |
LocalEd25519ClaimAttestationSigner |
cruxible_client.authoring.attestations · Source |
PendingClaimTypeRef |
cruxible_client.authoring.sdk_types · Source |
PendingSubjectRef |
cruxible_client.authoring.sdk_types · Source |
Cruxible |
cruxible_client.authoring.sdk · Source |
Prediction |
cruxible_client.authoring.sdk · Source |
PredictionSettlement |
cruxible_client.authoring.sdk · Source |
WorkspaceError |
cruxible_client.contracts.workspace_layout · Source |
observe_next_workspace |
cruxible_client.authoring.workspace · Source |
ProcedureRef |
cruxible_client.authoring.sdk_types · Source |
ProcedureBudget |
cruxible_client.contracts.procedures.models · Source |
ProcedureDefinition |
cruxible_client.contracts.procedures.models · Source |
ProcedureHardCaps |
cruxible_client.contracts.procedures.models · Source |
ProjectNode |
cruxible_client.contracts.procedures.nodes · Source |
QueryNameError |
cruxible_client.authoring.compact_query · Source |
QueryRef |
cruxible_client.authoring.sdk_types · Source |
QueryResult |
cruxible_client.authoring.compact_query · Source |
ReferentSensitivity |
cruxible_client.authoring.sdk_types · Source |
SlotRef |
cruxible_client.contracts.write · Source |
SourceRef |
cruxible_client.authoring.sdk_types · Source |
SubjectRef |
cruxible_client.authoring.sdk_types · Source |
TypedRef |
cruxible_client.authoring.sdk_types · Source |
TransformNode |
cruxible_client.contracts.procedures.nodes · Source |
World |
cruxible_client.authoring.world · Source |
WorldClaimType |
cruxible_client.authoring.world · Source |
WorldStructureError |
cruxible_client.authoring.world · Source |
WorldSubject |
cruxible_client.authoring.world · Source |
NoneValue |
cruxible_client.contracts.write · Source |
ProcedureSlot |
cruxible_client.contracts.capabilities · Source |
ReadNode |
cruxible_client.contracts.procedures.nodes · Source |
ShownObject |
cruxible_client.contracts.read_values · Source |
TruncatedText |
cruxible_client.contracts.read_values · Source |
WholeValueUnavailable |
cruxible_client.authoring.sdk_types · Source |
Module cruxible_client.authoring.attestations
LocalClaimAttestationKeyUnavailable
Key generation, custody, or public/private correspondence failed.
PRINCIPAL_KEY_ENV
Exported constant or type alias; exact value and admissible members are defined in the linked module.
prepare_claim_attestation
prepare_claim_attestation(client: 'Any', instance_id: 'str', *, prepared: 'PreparedClaimAttestationRequest', signer: 'ClaimAttestationSigner') -> 'ClaimAttestation'
Bind and sign an exact accepted Claim without appending or accepting it.
append_prepared_claim_attestation
append_prepared_claim_attestation(client: 'Any', instance_id: 'str', *, prepared: 'PreparedClaimAttestationRequest', signer: 'ClaimAttestationSigner') -> 'ClaimAttestationAppendResult'
local_attestation_signer_from_environment
local_attestation_signer_from_environment(client: 'Any', instance_id: 'str', *, workspace_root: 'Path | None' = None) -> 'LocalEd25519ClaimAttestationSigner'
Resolve the authenticated actor and its local key without wire disclosure.
Module cruxible_client.authoring.bind
AuthoringBindAnchorNotFoundError
The requested anchor was absent from the selected file.
AuthoringBindAmbiguityError
The requested anchor identified multiple byte occurrences.
AuthoringBindError
A local Flow-A bind input could not produce one mechanical observation.
bind_working_selection_input
bind_working_selection_input(input: 'ClaimInput', *, content: 'bytes', anchor: 'str', window_lines: 'int | None' = None, occurrence: 'int | None' = None) -> 'ClaimAuthoringPayload'
Observe local bytes for a decision-only working_selection Claim input.
Module cruxible_client.authoring.blocks
ParsedProjectionBlock
ParsedProjectionBlock(source_id: 'str', block_id: 'str', stamp: 'ProjectionBlockStampAny | None', opening_start: 'int', opening_end: 'int', body_start: 'int', body_end: 'int', closing_end: 'int', body_digest: 'str')
ProjectionIndependentEvidenceForbidden
A citation's span lies inside a projection block: the client fast path.
Evidence never comes from a projection window, whatever the citation's role or origin. The daemon refuses the same span with the same code at lowering and at the citation gate; this raises before the wire so an author learns it without a round trip.
ProjectionMarkerError
Base class for Cruxible protocol and storage refusals.
ProjectionRepinError
Base class for Cruxible protocol and storage refusals.
ProjectionSyncError
Base class for Cruxible protocol and storage refusals.
assert_independent_projection_evidence
assert_independent_projection_evidence(*, source_id: 'str', content: 'bytes', start_byte: 'int', end_byte: 'int') -> 'None'
Refuse a span that touches any stamped block window in content.
Reads the windows with the evidence-side scanner rather than the page parser: a cited source is evidence, not a projection page, so it is neither held to the page ceilings nor refused for a marker defect of its own. A capture with no marker bytes costs one substring search.
frame_projection_block
frame_projection_block(*, stamp: 'ProjectionBlockStampAny', body: 'bytes', compact: 'bool' = False) -> 'bytes'
Mechanically frame accepted bytes and prove the one frozen marker grammar.
parse_projection_blocks
parse_projection_blocks(content: 'bytes', *, source_id: 'str', allow_bootstrap: 'bool' = False, manifests: 'Mapping[str, bytes] | None' = None) -> 'tuple[ParsedProjectionBlock, ...]'
Parse one complete file using the stamp's frozen source_id identity.
render_projection_opening
render_projection_opening(stamp: 'ProjectionBlockStampAny') -> 'bytes'
repin_projection_block
repin_projection_block(client: 'CruxibleClient', instance_id: 'str', *, workspace: 'str | Path', file: 'str', block_id: 'str', claims: 'Sequence[str] | None' = None, queries: 'Sequence[tuple[str, Mapping[str, object]]] | None' = None, artifacts: 'Sequence[ArtifactIdentity] | None' = None, currency_policy: 'ProjectionCurrencyPolicy | None' = None, backing_digest: 'str | None' = None, evaluation_time: 'datetime', coordinate: 'AcceptedCoordinate | None' = None, body: 'bytes | None' = None, compact: 'bool' = True, render: 'bool' = False, dry_run: 'bool' = False) -> 'ProjectionBlockStamp'
Repin one block, optionally installing explicitly supplied agent-authored body bytes.
Omitted body preserves prose. Compact markers are the default; their manifests are retained before the page write. Use a reviewed package Document for ledger recovery. The whole-file compare-and-swap preserves concurrent author edits.
sync_projection_blocks
sync_projection_blocks(client: 'CruxibleClient', instance_id: 'str', *, workspace: 'str | Path', paths: 'Sequence[str | Path]' = (), all_files: 'bool' = False, check: 'bool' = False, detach_paths: 'Sequence[str | Path]' = (), observe_preimages: 'Callable[[Mapping[Path, bytes]], None] | None' = None) -> 'BlockSyncResult'
Check all dependencies without authoring prose. Only explicit detach edits files.
Module cruxible_client.authoring.context
ContextResolutionError
A selected workspace or target layer is not a safe context source.
WorkspaceBinding
tag: Literal['playbill-coverage-workspace-config-v1', 'playbill-coverage-workspace-config-v2'] = 'playbill-coverage-workspace-config-v1'
server_url: str | None = None
server_socket: str | None = None
instance_id: str | None = None
attached: bool (property)
The target-bearing subset of a workspace coverage configuration.
ResolvedContext
server_url: str | None
server_socket: str | None
instance_id: str | None
transport_source: TargetSource
instance_source: TargetSource
workspace: Path
workspace_source: WorkspaceSource
workspace_binding_path: Path | None
workspace_attached: bool
warnings: tuple[str, ...] = ()
instance_transport_mismatch: str | None = None
Resolved workspace and independently sourced target components.
TargetSource
Exported constant or type alias; exact value and admissible members are defined in the linked module.
WorkspaceSource
Exported constant or type alias; exact value and admissible members are defined in the linked module.
resolve_context
resolve_context(*, server_url: 'str | None' = None, server_socket: 'str | None' = None, instance_id: 'str | None' = None, workspace: 'str | Path | None' = None, remembered: 'Mapping[str, object] | None' = None, environ: 'Mapping[str, str] | None' = None, cwd: 'Path | None' = None, no_workspace: 'bool' = False, home: 'Path | None' = None) -> 'ResolvedContext'
Resolve explicit > environment > workspace > remembered context.
Transport and instance are selected independently. The workspace binding is eligible only when its coverage config names both one transport and an instance; incomplete coverage-only configs remain valid but do not retarget commands.
Module cruxible_client.authoring.examples
AUTHORING_EXAMPLE_FACTORIES
Exported constant or type alias; exact value and admissible members are defined in the linked module.
AUTHORING_EXAMPLE_NAMES
Exported constant or type alias; exact value and admissible members are defined in the linked module.
AuthoringExampleName
Exported constant or type alias; exact value and admissible members are defined in the linked module.
authoring_example
authoring_example(name: 'AuthoringExampleName', *, claim_id: 'str | None' = None, capture_digest: 'str | None' = None) -> 'AuthoringExample'
change_set_example
change_set_example() -> 'ChangeSetInput'
Return one changeset carrying a mix of members that admit or refuse together.
One authoring surface is one changeset: a Subject, the ClaimType that admits the statement, two Claims that read both, and one retirement all lower once and generate once.
claim_type_succession_example
claim_type_succession_example() -> 'ChangeSetInput'
Return one changeset that evolves a committed vocabulary in one generation.
The succession names the ClaimType it replaces and pins its exact current digest; every member of that ClaimType's reverse-pin closure is dispositioned in the same set -- one carried to the successor, one tombstoned, one re-authored as the sibling Claim member that says it again under the new vocabulary.
claim_existing_capture_example
claim_existing_capture_example() -> 'ClaimInput'
claim_flow_a_example
claim_flow_a_example() -> 'ClaimInput'
claim_revision_example
claim_revision_example() -> 'ClaimInput'
Revise one accepted Claim: the same statement slot, a new generation of it.
revises names the Claim ID the revision replaces. Omitting it states a new
Claim instead, with its own freshly minted ID.
claim_self_source_example
claim_self_source_example() -> 'ClaimInput'
claim_subject_relation_example
claim_subject_relation_example() -> 'ClaimInput'
document_example
document_example() -> 'DocumentShell'
approval_policy_example
approval_policy_example() -> 'ApprovalPolicyInput'
procedure_example
procedure_example() -> 'ProcedureInput'
procedure_mandate_example
procedure_mandate_example() -> 'ProcedureMandateInput'
A propose grant over the --example procedure Procedure, within its caps.
Only a Line that proposes or settles needs a mandate; an observe-only Line (like the example Procedure's) runs without one.
line_example
line_example() -> 'LineInput'
A Line over the --example procedure Procedure.
That Procedure has no Source nodes, so the Line names no acquisition
policy, and its input contract is empty, so parameters is {}. It only
observes, so it runs without a ProcedureMandate. With no Trigger aimed at it
it runs when run explicitly; --example trigger schedules it.
trigger_example
trigger_example() -> 'TriggerInput'
A Trigger that runs the --example line Line hourly, on the hour, in UTC.
Cron expressions are evaluated in UTC; convert local times first (09:00 New
York in winter is 14:00 UTC). Name line_name or action, never both; an
internal action takes cadence or cron only in this version. Nothing fires
before the Trigger is accepted.
query_claims_by_type_example
query_claims_by_type_example() -> 'QueryDefinitionInput'
Return a governed query template for current supported work-item status.
subject_example
subject_example() -> 'SubjectInput'
Module cruxible_client.authoring.page_writes
PageWriteError
A workspace page could not be replaced exactly as it was read.
replace_page_file
replace_page_file(path: 'Path', *, expected: 'bytes', replacement: 'bytes') -> 'None'
Durably replace one exact preimage without overwriting a concurrent edit.
Module cruxible_client.authoring.projection_manifests
load_projection_manifests
load_projection_manifests(workspace: 'Path', content: 'bytes') -> 'dict[str, bytes]'
retain_local_manifests
retain_local_manifests(workspace: 'Path', manifests: 'Mapping[str, bytes]') -> 'None'
Module cruxible_client.authoring.seed
SEED_BODY_DIRECTORY
Exported constant or type alias; exact value and admissible members are defined in the linked module.
SEED_BUNDLE_DIGEST_DOMAIN
Exported constant or type alias; exact value and admissible members are defined in the linked module.
SEED_GROUP_OPERATION_DIGEST_DOMAIN
Exported constant or type alias; exact value and admissible members are defined in the linked module.
SEED_ENTRY_DIRECTORIES
Exported constant or type alias; exact value and admissible members are defined in the linked module.
SEED_GROUP_OPERATIONS
Exported constant or type alias; exact value and admissible members are defined in the linked module.
SeedBundleEntry
tag: Literal['playbill-seed-bundle-entry-v1'] = 'playbill-seed-bundle-entry-v1'
path: str
kind: SeedEntryKind
identity: str
payload: dict[str, Any]
One authoring JSON, named by the identity its grouping turns on.
SeedBundleError
A bundle could not be read, or could not be legally grouped.
SeedCarriedEntry
tag: Literal['playbill-seed-carried-entry-v1'] = 'playbill-seed-carried-entry-v1'
path: str
kind: SeedEntryKind
identity: str
carried_by: str
One bundle entry that needs no proposal because a Claim already carries it.
SeedEntryKind
Exported constant or type alias; exact value and admissible members are defined in the linked module.
SeedPlan
tag: Literal['playbill-seed-plan-v1'] = 'playbill-seed-plan-v1'
proposal_name: str
body_paths: tuple[str, ...] = ()
groups: tuple[SeedProposalGroup, ...] = ()
carried: tuple[SeedCarriedEntry, ...] = ()
group_ids: tuple[str, ...] (property)
group(group_id: str) -> SeedProposalGroup
The whole grouping, before a byte is stored or a proposal is opened.
Deterministic in the bundle's bytes alone: no clock, no accepted state, no
instance. That is what lets --plan answer offline and lets a run manifest
pin plan_digest as evidence that two arms seeded the same world.
SeedPlanResult
tag: Literal['playbill-seed-plan-result-v1'] = 'playbill-seed-plan-result-v1'
plan: SeedPlan
plan_digest: str
rendered: tuple[str, ...]
The typed result of offline seed planning: the complete plan, its digest, and its rendered explanation. It does not indicate that the plan was submitted.
SeedProposalGroup
tag: Literal['playbill-seed-proposal-group-v1'] = 'playbill-seed-proposal-group-v1'
group_id: str
proposal_slug: str
kind: SeedEntryKind
operation: str
entry_paths: tuple[str, ...] = Field(min_length=1)
rationale: str
One proposal the plan will submit, and the reason it is exactly one.
plan_seed_bundle
plan_seed_bundle(files: 'Mapping[str, bytes]', *, proposal_name: 'str') -> 'SeedPlan'
Group one bundle into the fewest proposals its own closures allow.
plan_seed_directory
plan_seed_directory(root: 'Path', *, proposal_name: 'str') -> 'SeedPlanResult'
proposal_slug
proposal_slug(group_id: 'str') -> 'str'
Fold one group id into the seed-plan v1 presentation-slug grammar.
A group id names an artifact and is written for a person to select --
query_definition:project.work_items. The v1 plan retains its short slug for
byte compatibility and human display, but proposal refs are now machine-owned
content addresses from :func:seed_group_proposal_name.
read_seed_bundle
read_seed_bundle(files: 'Mapping[str, bytes]') -> 'tuple[SeedBundleEntry, ...]'
Read a bundle's files into typed, byte-sorted entries.
files is keyed by bundle-relative POSIX path. A file outside the known
directories refuses rather than being ignored: silently skipping part of a
bundle would make "this bundle was applied" untrue in a way nobody could see.
read_seed_bundle_files
read_seed_bundle_files(root: 'Path') -> 'dict[str, bytes]'
Read one bundle without following symlinks or escaping its root.
render_seed_plan
render_seed_plan(plan: 'SeedPlan') -> 'tuple[str, ...]'
The human rendering: what will be proposed, in order, and what rides along.
seed_group_operation_digest
seed_group_operation_digest(plan: 'SeedPlan', group: 'SeedProposalGroup') -> 'Sha256Value'
Bind one planned group to its exact, name-independent bundle content.
seed_group_proposal_name
seed_group_proposal_name(plan: 'SeedPlan', group: 'SeedProposalGroup') -> 'str'
Return the machine-owned proposal-ref leaf for one seed operation.
seed_plan_digest
seed_plan_digest(plan: 'SeedPlan') -> 'Sha256Value'
Digest the plan, so a run manifest can pin the world it seeds.
Module cruxible_client.authoring.source_map
DiagnosticSourceMap
entries: tuple[SourceMapEntry, ...]
locate(emitted_path: str) -> CallSite | None
DiagnosticSourceMap(entries: 'tuple[SourceMapEntry, ...]')
capture_keyword_sites
capture_keyword_sites(operation: 'str', *, stacklevel: 'int' = 1) -> 'dict[str, CallSite]'
Locate keyword expressions in the smallest call spanning the caller line.
entries_for_keywords
entries_for_keywords(*, builder: 'str', emitted: 'dict[str, tuple[str, ...]]', sites: 'dict[str, CallSite]') -> 'tuple[SourceMapEntry, ...]'
Module cruxible_client.authoring.files
WorkspaceFileError
Local catalog paths or aliases are not a valid compilation request.
compile_client_file_context
compile_client_file_context(client: 'FileContextClient', instance_id: 'str', *, catalog: 'FileCatalog', repository_root: 'Path', aliases: 'Mapping[str, Path]') -> 'FileCompilationBundle'
Read local bytes against path-free accepted context from the daemon.
load_file_catalog
load_file_catalog(portable_path: 'Path', local_path: 'Path | None') -> 'FileCatalog'
mapped_root_aliases
mapped_root_aliases(values: 'Mapping[str, Path]') -> 'dict[str, Path]'
root_aliases
root_aliases(values: 'Iterable[str]') -> 'dict[str, Path]'
Module cruxible_client.authoring.workspace
WorkspaceAttachmentError
Daemon registration and the requested client workspace disagree.
WorkspaceError
A client workspace or exported floor failed deterministic validation.
configured_floor_path
configured_floor_path(workspace: 'str | Path') -> 'str | None'
Return the declared v2 floor path, or None when absent/unconfigured.
observe_next_workspace
observe_next_workspace(workspace: 'str | Path') -> 'dict[str, object]'
Observe the configured floor and every resolvable installed catalog file.
The daemon compares installed_coordinate with its resolved coordinate. Therefore
the local stale spelling produced without a daemon coordinate is only a transport
hint; it cannot manufacture a stale or current queue item. Invalid catalogs leave
sources unobserved; individual unavailable sources are omitted from an otherwise
valid observation so the daemon can explain each accepted citation separately.
observe_next_workspace_with_coverage
observe_next_workspace_with_coverage(client: '_CoverageClient', instance_id: 'str', workspace: 'str | Path', *, observation: 'Mapping[str, object] | None' = None, coordinate: 'contracts.AcceptedCoordinate | Mapping[str, Any] | None' = None, access_profile: 'Mapping[str, Any] | None' = None, resolve_coordinate: 'Callable[[], contracts.AcceptedCoordinate] | None' = None) -> 'tuple[dict[str, object], contracts.AcceptedCoordinate | None]'
Enrich next with one existing, coordinate-bound coverage-scanner read.
This adapter never searches source bytes. Every accepted occurrence comes from the existing server coverage card; the local slice check only verifies that card against the exact bytes it previously sent to the sole scanner.
observe_projection_coverage
observe_projection_coverage(workspace: 'str | Path', *, coordinate: 'contracts.AcceptedCoordinate | Mapping[str, Any]') -> 'dict[str, object] | None'
Build bounded, coordinate-bound proof of configured local projections.
A valid catalog completely describes Procedure projection intent. Claim
coverage is complete only when every Document source can be read and its
complete marker set parses. Missing or malformed evidence removes that
kind from complete_kinds instead of manufacturing absence.
record_floor_output
record_floor_output(workspace: 'str | Path', *, instance_id: 'str', server_url: 'str | None' = None, server_socket: 'str | None' = None, include: 'Sequence[contracts.FloorExportPart]' = ()) -> 'Path'
Record the fixed floor output while preserving safe existing coverage fields.
refresh_workspace_floor
refresh_workspace_floor(client: '_FloorClient', instance_id: 'str', *, workspace: 'str | Path', at: 'contracts.AcceptedCoordinate | None' = None) -> 'contracts.FloorRefreshResult'
Refresh only the local floor and report the coordinate actually written.
A pinned request refuses a mismatched export before touching local files. No projection prose or declaration changes.
validate_workspace_config_write
validate_workspace_config_write(workspace: 'str | Path', *, instance_id: 'str | None', server_url: 'str | None' = None, server_socket: 'str | None' = None, replace: 'bool' = False) -> 'None'
Refuse a differing config before a host or init request mutates daemon state.
verified_floor_files
verified_floor_files(export: 'contracts.FloorExport') -> 'dict[str, bytes]'
Verify the v2 envelope, manifest, inventory, and bytes.
write_workspace_config
write_workspace_config(workspace: 'str | Path', *, instance_id: 'str', server_url: 'str | None' = None, server_socket: 'str | None' = None, replace: 'bool' = False) -> 'Path'
Attach one workspace target without ever accepting or persisting a secret.
Module cruxible_client.authoring.world
CLAIM_TYPE_MEMBERS
Exported constant or type alias; exact value and admissible members are defined in the linked module.
SUBJECT_MEMBERS
Exported constant or type alias; exact value and admissible members are defined in the linked module.
WorldStructureError
The world cannot answer this name at the shape it was asked for.
admit_literal
admit_literal(value: 'object', *, predicate: 'str', schema: 'Mapping[str, object] | None') -> 'CanonicalValue'
Admit one value against a ClaimType's declared literal schema.
This is a pre-wire read of the schema the ClaimType already publishes, over
the keywords ClaimTypeStructure admits plus the exact string and numeric
bounds. It is deliberately not a general JSON Schema implementation: an
unrecognised keyword is left to the daemon, which stays the only authority
on admission. What it buys is the round trip -- a mistyped enum member or a
digest that is 39 hex characters refuses here, naming the predicate, rather
than after a proposal.
build_world
build_world(cx: 'Cruxible', *, coordinate: 'AcceptedCoordinate', claim_type_envelopes: 'Sequence[Mapping[str, object]]', subject_kinds: 'Sequence[OrientSubjectKind]' = ()) -> 'World'
Assemble one world from the accepted ClaimType vocabulary and its SubjectKinds.
Subject kinds come from the vocabulary rather than from the Subjects
themselves, which is what lets cx.world() name every kind without reading
a single Subject: a kind with no ClaimType admitting it is a kind nothing
can be said about.
Module cruxible_client.authoring.world_stub
STUB_HEADER_TAG
Exported constant or type alias; exact value and admissible members are defined in the linked module.
render_world_stub
render_world_stub(world: 'World') -> 'str'
Return the .pyi source for one world, byte-identical per coordinate.
render_world_stub_for
render_world_stub_for(client: 'CruxibleClient', instance_id: 'str', *, workspace: 'str | Path') -> 'str'
Render the .pyi for one instance's accepted world over an open client.
The sanctioned entry point for a caller that holds a client rather than a
Cruxible -- the CLI leaf, and anything else outside this package -- so no
caller has to reach for a private constructor. The workspace is only the
root a relative source selection would resolve against; this reads nothing
from it, so a directory with no Cruxible workspace is fine.
Contract model index
This is the public class index under cruxible_client.contracts, one line per
module, generated from the package. Open the linked model for its declared
fields, validation rules, enum values, and format. The high-level SDK's own
return and value fields are documented above; these links keep wire schema
definitions singular.
contracts.__init__ — GitWorkspaceNote, HostResult, HostWorkspaceRegistration, HostCompatibilityReason, HostInspection, RuntimeCredentialBootstrapResult, RuntimeCredentialMetadata, RuntimeCredentialResult, RuntimeCredentialListResult, ProviderLaneStatus, ConsumerStatus, ServerInfoResult, ServerRestartResult, ServerStopResult, IsolatedExecutorRegistration, InitResult, CasObjectResult, ProposalInspection, ProposalListEntry, ProposalList, ProposalSelectorResult, ProposalReadmitResult, ProposalWithdrawResult, ProposalRejectResult, WhoAmI, SemanticFieldValue, SemanticFieldDelta, ReviewedMember, ProjectionAdvisory, ProjectionEvidence, ProposalReview, ApprovalChallenge, ApprovalReceipt, ActivationReceipt, FloorRefreshResult, FileContext, FileCheckResult, InstanceDecommissionResult, LedgerMirror, LedgerMirrorCleared, ClaimTypeLintWarning, ClaimTypeProposalLint, ClaimTypeInputProposalResult, ClaimTypeMigrationPreflight, ClaimTypeMigrationResult, CaptureAdmissionAccount, ClaimViewRecord, CandidateStatusRecord, AuthoringIntentViewRecord, AuthoringExampleResult, AuthoringIntentListRecord, AuthoringPreflightResult, AuthoringSubmitResultRecord, BlockDeclareResult, BlockDepublishResult, ProcedureReadiness, PolicyInForceList, ProcedureRunState, NextRepair, NextRepairRequirement, NextFinding, NextItem, NextHealth, NextStatus, NextResult, BlockObserveResult, AuditFactors, AuditEvidenceRef, AuditRow, AuditScope, AuditCoveredClaim, AuditCoverage, AuditCursor, AuditResult, SinceCursor, SinceRequest, SinceRow, SinceResult, CoverageResult, FloorFile, FloorExport, WorkspaceFloorWriteResult, FloorDeliveryResult, FloorConsumerOutcome, FloorDeliverNowRequest, FloorDeliveryRequest, WorkspaceAttachResult, WorkspaceDetachResult, HostWorkspaceAttachResult, WorkspaceFloorStatus.
contracts.accepted_attestations — AcceptedAttestationVerdictStatement, AcceptedClaimAttestationEvidence.
contracts.approval_policy — ApprovalPolicyFormatError, ApprovalPolicy.
contracts.artifacts — ArtifactIdentity, ArtifactPin, ArtifactRef, ArtifactLifecycle, GovernedArtifactProtocol, ArtifactPathKind, ArtifactKindRegistry.
contracts.attestations — ApprovalStatement, ApprovalAttestation, ApprovalSubmission, VerifiedApproval.
contracts.authoring.inputs — LiteralObjectInput, SubjectObjectInput, ExactContentObjectInput, SelfSourceInput, WorkingSelectionInput, ExistingCaptureInput, ClaimDispositionInput, ClaimInput, ProcedureInput, SubjectInput, QueryDefinitionInput, ApprovalPolicyInput, ProcedureRuntimePolicyInput, ClaimTypeInput, ClaimTypeSuccessionInput, ClaimRetirementInput, ProcedureMandateInput, LineInput, TriggerInput, ChangeSetInput, AuthoringInputError, CapabilityInput, ContractFieldInput, ContractInput, RunbookInput, SubjectKindInput, SubjectSuccessionInput.
contracts.authoring.models — AuthoringReferenceExpectation, AuthoringSlotExpectation, AuthoringReferenceSuccessor, AuthoringProgramOperation, AuthoringProgramStamp, AuthoringExactContentObject, AuthoringClaimStatement, AuthoringExistingClaimDisposition, WorkingGitBlobCoordinate, WorkingDigestCoordinate, WorkingAnchorWindow, WorkingSelectionObservation, SelfSourceBody, ExistingCaptureCitationSource, ClaimDependencyDrafts, ClaimDerivationBinding, ClaimAuthoringPayload, AuthoringArtifactReference, AuthoringCandidateReference, ResolutionContractAuthoringPayload, AttestationAuthoringPayload, SubjectAuthoringPayload, QueryDefinitionAuthoringPayload, ApprovalPolicyAuthoringPayload, ProcedureRuntimePolicyAuthoringPayload, MandateScopeAuthoring, MandateConditionAuthoring, ProcedureMandateAuthoringPayload, CaptureContractAuthoringPayload, LineAuthoringPayload, TriggerAuthoringPayload, ProcedureAuthoringPayload, ClaimTypeAuthoringPayload, ClaimTypeSuccessionDependent, ClaimTypeSuccessionMember, ClaimRetirementMember, ChangeSetAuthoringPayload, RepairAlternative, AuthoringDiagnostic, BlockedCheck, DiagnosticFrontierLimits, DiagnosticFrontier, AcceptanceCondition, CandidateStatus, PreflightCertificate, PreflightResult, ChangeSetClaimIdentity, AuthoringIntent, AuthoringIntentView, AuthoringIntentList, AuthoringIntentCompileRequest, AuthoringIntentPreflightRequest, AuthoringIntentSubmitRequest, AuthoringSubmitMember, AuthoringSubmitResult, BlockSyncSuccessorCandidate, BlockSyncReadRequest, ProjectionDependencyIssue, BlockSyncReadResult, ProjectionCheckRequest, ProjectionCheckResult, BlockSyncItem, BlockSyncResult, BlockDetachResult, AuthoringNoneClaimObject, AuthoringCompileSubmitRequest, ResolvedTriggerCaptureContract, RunbookAuthoringPayload, RunbookStepAuthoring, CaptureLandingByNameSchedule, CaptureEventByNameWindow, WindowCloseAuthoringSchedule, SubjectKindAuthoringPayload, CapabilityAuthoringPayload, ContractAuthoringPayload, SubjectCreationAuthoringPayload, NoteAuthoringPayload, SectionSelector.
contracts.authoring_profiles — AuthoringProfileError, ClaimTypeProfileDefinition, ClaimTypeProfileInput, ClaimTypeExpansionEvidence, ClaimTypeExpansionResult.
contracts.candidates — SemanticCandidate, DependencyProofReference, LawEvaluationCoordinate, MemberLawEvaluation, CandidateMemberLawEvidence, ClosureProof, CandidateRecord.
contracts.canonical — Sha256Value, BootstrapRoot, ArtifactDigest, CandidateDigest, AcceptanceLawDigest, ApprovalDigest, ProposalDigest, SemanticDiffDigest, ChangeSetDigest, MerkleNodeDigest, SemanticMerkleRoot, DependencyEdgeRoot, SemanticRoot, GenerationRoot, LogicalDigest, CasDigest.
contracts.capture_journal — CaptureJournalError, CaptureLandingEventV1, CaptureLandingEvent, CaptureCursor, InMemoryCaptureLandingJournal.
contracts.capture_erasure — CaptureErasureRecord, CaptureEraseRequest, CaptureEraseResult, CaptureEraseRefusedError, RecordedCaptureErasure.
contracts.capture_reads — CaptureReadRequest, CaptureRead.
contracts.captures — CaptureFormatError, CanonicalDuration, CaptureSelectionBudget, CaptureRetentionErasurePolicy, CaptureContract, CaptureComponentRegistry, AcceptedCaptureContract, CaptureContractLawResult, CaptureRunCoordinateV1, CaptureRunCoordinate, SourceEffectiveTime, CaptureEnvelopeV1, ProviderInvocationCaptureEvidence, ProcedureEgressCaptureEvidence, ProcedureProducerReceiptProtocol, CaptureProductionRecord, VerifiedCaptureMemo, ProducerReceiptResolverProtocol, CaptureProductionUnproven, ProviderProducerReceiptResolution, ProviderResultToExternalCapture, CaptureEnvelope, InputReceiptSetManifest, DirectClaimSource, DirectByteSpanSelection, DirectExternalSelection, DirectForeignSourceSelection, CaptureObjectStoreProtocol, LedgerMaterialResolverProtocol, DirectCaptureBuildResult, CaptureBuildResult, CaptureCsvDecoding, CaptureDecoding, CaptureDecodingLimits, LazyKeyedOverlay, ProducerVersions, ObservedContent, CaptureContractV1, CaptureContractComponents, CaptureErasureLookupProtocol, CaptureDerivation, DeriveReducer.
contracts.cas_contracts — BodyAccessContext, CasObjectMetadata, BodyProjectionProtocol.
contracts.change_control — StateCoordinate, ChangeControlRequest.
contracts.claim_attestation_store — ClaimAttestationStoreManifest, ClaimAttestationEventPayload, ClaimAttestationEvent, ClaimAttestationPartitionGenesis, ClaimAttestationPartitionHead, ClaimAttestationHeadMapEntry, ClaimAttestationHeadMapNode, ClaimAttestationHeadMapDelta, ClaimAttestationPublishedRoot, ClaimAttestationPublishedPointer.
contracts.claim_attestations — ClaimAttestationError, ClaimAttestationStatementV1, ClaimAttestationV1, VerifiedClaimAttestationV1, ClaimAttestationStatement, ClaimAttestation, ClaimAttestationCaptureReference, PreparedClaimAttestationRequest, ClaimAttestationResolvedArtifact, VerifiedClaimAttestation, ClaimAttestationAppendRequest, ClaimAttestationAppendResult.
contracts.claim_reads — ClaimReadBatchRequest, ClaimReadBatchResult, ClaimBackingsRequest, ClaimBackingsResult, ClaimValuesRequest, ClaimValueRecord, ClaimValuesResult.
contracts.claim_type_structure — ClaimTypeStructure, ClaimTypeStructuralCheck.
contracts.claim_types — ClaimTypeFormatError, ClaimTypeFreshnessHorizonInvalid, ClaimFreshnessDuration, ClaimEvidenceFreshness, ClaimAttestationConsequenceRule, ClaimAttestationConsequencePolicy, ClaimTypeMemberDescription, ClaimType, AcceptedClaimType, ClaimTypeLawResult, ClaimInverse, ClaimInverseObjectKey, ClaimInverseObjectKeyPart, ClaimInverseSlotKey, ClaimTypeContention.
contracts.claim_verdicts — ClaimAdjudicationRule, CaptureVerdictEvidence, EvidenceControlComponent, EvidenceFreshnessExpiration, ClaimVerdictResult, CaptureReobservationEvidence.
contracts.claims — ClaimFormatError, ClaimUnsupportedFormatError, LiteralClaimObject, SubjectClaimObject, ClaimStatement, ClaimStatementCard, ClaimReferentContext, ClaimCitation, ClaimBacking, ClaimRetirementAttribution, ClaimRetireDependent, ClaimArtifact, AcceptedClaim, ClaimLawEvidence, ClaimLawResult, CitedSourceWindow, CaptureEvidenceKindEvaluation, ClaimUnitKey, NoneClaimObject.
contracts.compact_query — QueryFilterEq, QueryFilterNe, QueryFilterLt, QueryFilterLte, QueryFilterGt, QueryFilterGte, QueryFilterIn, QueryFilterExists, QueryFilterContains, QueryFollow, QueryRequest, QueryClaim, QueryClaimValue, QueryColumn, QueryReplay, QueryReceipt, QueryResultRecord, QueryNone.
contracts.compiler_upgrade — CompilerUpgrade.
contracts.cron — CronExpressionError, CronSpec.
contracts.declared_blocks — PresentationPolicyV1, ProjectionAdvisoryPolicy, PresentationPolicy, ProjectionCoverageBinding, ProjectionCoverageObservation, ReviewWorkspaceObservation, ProjectionClaimBacking, ProjectionArtifactBacking, ProjectionResolvedParameterBinding, ProjectionQueryBacking, ProjectionBlockStampV1, ProjectionBlockStamp, ProjectionMarkerSummary, ProjectionMarkerError, ProjectionProcessingPolicy, ProjectionProcessingLimitExceeded, ProjectionBootstrapUnstampedError, ParsedProjectionBlock, ProjectionWindow, BlockRepinResult, DeclaredBlockPageObservation.
contracts.diagnostics — LocalDraftEdit, GovernedOperationReference, CompilerDiagnostic.
contracts.discovery — DiscoveryBudget, DiscoveryMatchBasis, DiscoveryHit, DiscoveryRequest, DiscoveryPage.
contracts.documents — DocumentLink, DocumentPin, DocumentAuthority, DocumentLifecycle, DocumentShell, DocumentArtifactAdapter, BodyVerifierProtocol, AcceptedDocument, DocumentLawResult.
contracts.errors — CruxibleError, CanonicalEncodingError, MerkleIntegrityError, FormatError, SinceRequestInvalid, ClaimAttestationRequestInvalid, InstanceIncompatiblePrereleaseContent, ReseedRequired, InstanceDecommissioned, SemanticDeltaLimitError, BootstrapError, ObjectFormatConflict, GitError, SigningKeyError, CasError, JournalError, JournalConflictError, JournalIntegrityError, ExecutionError, DocumentFormatError, DocumentNotFoundError, SubjectFormatError, SubjectNotFoundError, ClaimNotFoundError, ProposalAdmissionError, ProposalWithdrawnError, ProposalRejectedError, ProposalNotFoundError, ProposalSelectorAmbiguousError, ProposalContentUnavailable, ProposalReadmitAlreadyAccepted, ProposalReadmitNotStale, ProposalStale, ProposalReadmitRequiresResubmission, ProposalActivationRequestInvalid, ProposalIntegrityError, ProposalEvaluationIntegrityError, ApprovalIntegrityError, PrincipalIntegrityError, SettlementIntegrityError, SettlementEvidenceUnproven, ReplayCheckpointError, ReadRefusalError, WriteRefusalError, ProjectionError, ProjectionCoordinateError, ProjectionFormatError, ProjectionPublicationError, ProjectionIntegrityError, ApprovalRequirementUnmet, ApprovalSignerAfterBase, ProposalAlreadyAccepted, ProposalReadmitNotAuthor, ProposalWithdrawNotAuthor.
contracts.floor — FloorEntry, FloorManifest, FloorHead, FloorDeltaFile, FloorDelta, FloorApplyResult.
contracts.text_display — the text str() and the CLI print for orient results, coordinates, write outcomes, landings, intents and vocabulary-file results: render_orient, write_outcome_lines, landing_lines, render_intent, vocabulary_plan_lines, render_vocabulary_export, render_vocabulary_apply. A query page prints the table cruxible query prints (render_query_table). A next page prints through next_lines and a get card through render_get, the renderers cruxible next and cruxible get print with.
contracts.get_display — GetValueDisplay.
contracts.get_reads — ByteRange, GetRequest, GetCoordinate, GetContender, GetClaimCard, GetSubjectClaim, GetSubjectCard, GetEvidenceRule, GetClaimTypeCard, GetDocumentCard, GetProcedureTrackRecord, GetProcedureNode, GetProcedureCard, GetQueryParameter, GetQueryCard, GetCaptureContractCard, GetTriggerCard, GetProposalChange, GetProposalRefusal, GetProposalCard, GetPrincipalCard, GetApprovalPolicyCard, GetProcedureRuntimePolicyCard, GetProviderCard, GetCaptureEvidence, GetAttestationEvidence, GetEvidence, GetRevision, GetHistory, GetBody, GetResult, GetBatchRequest, GetBatchResult, Backlink, GetBacklinks, GetCapabilityCard, GetContractCard, GetNoteCard, GetContractField, GetSubjectKindCard, GetChangeSetReason, GetProposedReason, GetDocumentLink, GetFieldChanged, GetFieldRebound, GetFieldReobserved, GetFieldRetired, GetFieldStated, GetGuidance, GetIncoming, GetEndPairs, GetKindEnd, GetPairEnd, GetPairs, GetIncomingClaim, GetLineRuns, GetPendingProposal, GetNone, GetSubjectHistory.
contracts.governance — ApprovalRequirement, AcceptanceLawCoordinate.
contracts.kits — KitArtifact, KitProviderFile, KitProvider, KitProviderFileBytes, KitProvenance, KitManifest, KitArtifactBytes, KitBundle, KitInstalledArtifact, KitKeptDivergence, KitReceipt, KitBuildProvider, KitBuildRequest, KitBuildResult, KitAddRequest, KitRemoveRequest, KitPathPlan, KitProviderStep, KitChangeResult, KitProviderStatus, InstalledKit, KitStatus.
contracts.laws — InstalledAcceptanceLaw, AcceptanceLawRegistry.
contracts.ledger_mirror — LedgerMirrorUrlInvalid, LedgerMirrorUnset.
contracts.line_dispatch — LineEvaluateRequest, LineTriggerVersion, LineTriggerOccurrence, LineEvaluateResult, LineDispatchRequest, LineEnablementPrincipal, LineEnablement, LineDispatchItem, LineDispatchResult.
contracts.line_inbox — InboxLinkProposal, InboxLinkSubject, InboxAcknowledged, InboxDismissed, InboxLinked, InboxSighting, InboxItemEnvelope, InboxListEntry, InboxList, InboxItem, InboxDismissRequest, InboxLinkRequest, InboxDispositionResult, InboxRow, InboxRows.
contracts.merkle — MerkleDomainFamily, MerkleNode, MerkleTree.
contracts.operational_reads — LiveHead, LiveView, RunRow, GetLineEnablement, GetLineOccurrence, GetLineTrigger, GetLineCard, GetCaptureErasure, GetCaptureCard, GetPredictionWindow, GetResolutionContractCard, GetMandateCard, GetRunNode, GetRunCurrentNode, GetRunTrigger, GetPendingInput, GetRunOutcome, GetProcedureRunCard, OrientLine, OrientCapture, OrientCaptureContract, OrientPrediction, OrientMandate, GetCaptureDerivation, GetCaptureReducer, GetRunListMember, GetRunbookCard, GetRunbookStep, MandateConditionView, MandateScope, OrientRunbook, OrientSource, OrientSourceContract, OrientSourceLanding.
contracts.orient — OrientYou, OrientPredicate, OrientKind, OrientKindDetail, OrientClaimCounts, OrientArtifactCounts, OrientQuery, OrientDocument, OrientProcedure, OrientEnablements, OrientAttention, OrientFloor, Head, OrientResult, OrientActivityCaptureErased, OrientActivityCaptureLanded, OrientActivityGenerationAccepted, OrientActivityInboxDisposed, OrientActivityInboxPosted, OrientActivityLineStateChanged, OrientActivityOccurrenceDue, OrientActivityOccurrenceLapsed, OrientActivityRecordUnavailable, OrientActivityRunFinished, OrientActivityRunStarted, OrientGeneration, OrientGraph, OrientGraphEdge, OrientGraphNode, OrientGraphTotals, OrientPin, OrientOperation, OrientKindSummary, OrientCapability, OrientContract, OrientKindEnd, OrientSubjectKind, OrientVocabularyFile.
contracts.persistent — PersistentMap, MapMutation.
contracts.policies — CorroborationRequirement, FreezeRequirement, ClaimAdmissionPolicy, ClaimResolutionPolicy, ClaimEvidenceAdmissionRule, ClaimEvidenceAdmissionPolicy, ClaimCorroborationResult, ClaimAdmissionEvaluationAccount, ClaimAdmissionCandidateContext, ClaimAdmissionCandidateResult, EvidenceAdmissionInput, ClaimEvidenceAdmissionResult, ClaimEvidenceAdmissionTrace, ResolutionContender, ClaimResolutionResult, CaptureContractAdmission.
contracts.policy_rows — PolicyInForce.
contracts.predictions — ResolutionContractInput, PredictRequest, PredictResult, ObservationSettlementEvidence, TerminalSettlementEvidence, SettleRequest, SettleResult.
contracts.principals — AuthoringRefusal, PrincipalRegistrySnapshot.
contracts.procedure_mandates — ProcedureMandateError, AcceptedProcedureMandate, ProcedureMandateLawResult, ScopedClaimType, ProcedureMandateInvocation, ProcedureMandateEvaluation, MandateClaimScope, MandateCondition, ProcedureMandate, ProcedureMandateAny.
contracts.procedure_runtime_policy — ProcedureRuntimePolicyFormatError, ProcedureRuntimePolicy.
contracts.procedures.artifacts — ProcedureFormatError, ProcedureArtifact, ProcedureNodeSupport, AcceptedProcedure, ProcedureLawResult.
contracts.procedures.contracts — ProcedureContractValidationError, ProcedureContractItemBudgetExceeded, ProcedureContractListObservation, ValidatedProcedureContract, AcceptedProcedureContractValidator.
contracts.procedures.graph — ProcedureGraphFormatError, ProcedureGraph, ProcedureNodeDigests.
contracts.procedures.line_specs — LineSpecFormatError, LineSpec, AcceptedLineSpec, LineSpecLawResult, EphemeralLineSpec, LineBudgets, LineBudgetsInput, BindingSide, SlotBindingVerdict, SlotNeed, SlotCapabilityUnresolved.
contracts.procedures.measurements — ProcedureMeasurementExpectation, AcceptedQueryProcedureMeasurement, ClaimAttestationProcedureMeasurement, ClaimStatementProcedureMeasurement, ProcedureMeasurementSituationShape, ProcedureMeasurementReviewTrigger, ProcedureMeasurementDeclaration.
contracts.procedures.pin_expectations — PinExpectation.
contracts.procedures.readings — ProcedureMeasurementEligibility, ProcedureMeasurementResolutionSummary, ProcedureReadingSummary, ProcedureMeasurementRow, ProcedureMeasureRequest, ProcedureMeasureResult, ProcedureMeasurementContractStatus, ProcedureReadingsRequest, ProcedureReadingsResult.
contracts.procedures.results — ProcedureJournalCoordinate, ProcedureBudgetRefusalDetail, ProcedureAdmissionRefusal, ProcedureNodeRefusal, ProcedureOperationalFailure, ProcedureInternalFailure, ProcedureRunAttribution, ProcedureRunAttributionWithheld, ProcedureRunReceiptWithheld, ProcedureChildInvocation, ProcedureBudgetExceededDetail, ProcedureBudgetExhausted, ProcedureHaltTerminal, ProcedureBudgetBoundaryObservation, ProcedureRunBudgetObserved, ProcedureRunNodePinSet, ProcedureReplayInputProjection, ProcedureProviderBinding, ProcedureSelectionDecision, ProcedureAdmissionMaterialMember, ProcedureAdmissionMaterialManifest, ProcedureAcquisitionPlan, ProcedureSourceObservation, ProcedureSourceCaptureAssociation, ProcedureTerminalEgressChild, InboxPostTruncation, ProcedureTerminalEgress, ProcedureRunBudgetDeclared, ProcedureRunBudget, ProcedureRunReceipt, ProcedureFailureCause, LineOpenProposalOutcome.
contracts.procedures.windows — CaptureEventSelector, TriggerEventReference, FixedWindow, CaptureEventWindow, BoundObservationWindow, LineTriggerBinding.
contracts.projection — AcceptedProjectionCoordinate, AcceptedCoordinate, CandidateGenerationProjectionCoordinate.
contracts.projection_extensions — ProjectionFactDeclaration, ProjectionFact, ProjectionExtensionRegistry.
contracts.proposal_models — AuthenticatedActor, ProposalReceiveLimits, ProposalAdmissionRequest, ProposalWithdrawalRecord, ProposalSettleSubmission, ProposalReadmissionLink, ProposalAdmissionRecord, ProposalEvaluationRecord, ProposalResult, ProposalPreviewEvaluation, ProposalPreview, ProposalTransportProtocol, ProposalItemReason, ProposalItemReasonLink.
contracts.provider_execution — ProviderSecretReference, ProviderSecretBindingIdentity, ProviderSecretReceiptReference, ProviderSecretResolutionPlan, ProviderBudgetTranslation, ProviderEgressObservation, VerifiedProviderBinding, ProviderExternalOccurrencePlan, ProviderInvocationOutcome, ProviderInvocationReceipt, ProviderInvocationOutputDigest, ProcedureDerivedSourceRequest, ProviderInvocationStarted, ProviderInvocationCompleted.
contracts.provider_installation — ProviderWheelObject, ProviderInstallRequest, ProviderOperationReadiness, ProviderInstallResult, ProviderPackageSummary, InstalledProvider, ProviderCatalog.
contracts.providers — ProviderFormatError, ProviderSigningKey, ProviderV1, ProviderDistributionRef, ProviderImplementationManifest, ProviderRuntimeManifest, ProviderDistributionPin, ProviderLocalDistributionPin, ProviderImageProvenance, ProviderContainerBackendPin, ProviderLocalEnvBackendPin, ProviderRuntimeArtifactPayloadV1, ProviderRuntimeArtifactPayload, ProviderLocalMaterializationReference, ProviderContainerMaterializationReference, ProviderImplementationRecord, ProviderV2, Provider, AcceptedProvider, ProviderLawResult, ProviderBuild, ProviderBuildName.
contracts.query.definitions — QueryDefinitionFormatError, QueryEvaluationPolicy, QueryDefinition, QueryDefinitionSpec, AcceptedQueryDefinition, QueryDefinitionLawResult.
contracts.query.grammar — QueryReferenceInventory, QueryLiteralRef, QueryParameterRef, QueryClaimValueRef, QuerySubjectFieldRef, QueryEvaluationTimeRef, QueryComparisonFilter, QueryMembershipFilter, QueryClaimPresenceFilter, QueryConjunctionFilter, QueryDisjunctionFilter, QueryNegationFilter, QueryParameterDeclaration, QueryEntry, QueryArtifactsEntry, QueryTraversalStep, QueryOrdering, QueryProjectionField, QueryProjection, QueryInclude, QueryBudgets, QueryClaimFieldRef, QueryDiscriminatorMissingError, QueryPairPart, QueryPairStep.
contracts.query.parameters — QueryParameters.
contracts.query.results — QueryArtifactDefinition, QueryClaimVisibility, QueryConflict, QueryRefusal, QueryRowBinding, QueryProjectedField, QueryProjectedFields, QueryIncludeItem, QueryIncludeResult, QueryResultRow, QueryTruncation, QueryVerdictExclusion, QueryVerdictVisibility, QueryParameterBinding, ClaimQueryResult, QueryExecutionReceipt.
contracts.query.values — QueryTypedValue.
contracts.read_values — WholeValueRead, TruncatedText, ShownObject, ClaimLine.
contracts.records — Record, RecordConstructor.
contracts.repairs — RepairOperation, HandEditInstruction, HandEditRepair, ServedRepairEnvelope.
contracts.resolution_contracts — ClaimVersionReference, ResolutionContract, ResolutionContractReference, InvestigationBinding, ResolutionContractsRequest, ResolutionContractView, ResolutionContractsResult.
contracts.resolution_rules — PredictionEqualityRule, PredictionThresholdRule, PredictionPresenceRule, PredictionObservationSelector.
contracts.runtime_credentials — RuntimeCredentialMintStatement, RuntimeCredentialPrincipalProof.
contracts.semantic — SemanticSelector, SemanticAddress, ContentSpan, SourceMapping.
contracts.file_catalog — FileCatalogEntry, ProcedureProjectionCatalogEntry, FileCatalog, ResolvedFileInput, CompiledFileDocument, FileCompilationManifest, FileCompilationBundle, FileAlignment, FileCatalogRenameRequired.
contracts.source_references — ProvisionalSemanticReadCoordinate, CandidateGenerationReadCoordinate, LedgerSourceReference, CasSourceReference, ExternalSourceReference, SourceSchemaRegistry, EvidenceCommitment, CoverageDescriptor, SourceHandle, BodyAccessResult, SourceDereferenceResult, OpenSourceRequest.
contracts.subjects — SubjectShell, AcceptedSubject, SubjectLawResult, SubjectAssignment.
contracts.triggers — TriggerFormatError, CadenceSchedule, CronSchedule, CaptureLandingSchedule, WindowCloseSchedule, GenerationAcceptedSchedule, NoTriggerInput, CaptureEventInput, InternalActionSpec, LineTarget, ActionTarget, Trigger, AcceptedTrigger, TriggerLawResult, RunbookTarget.
contracts.types — StrictModel, PrincipalRecord, TrustRoot, StorageLayout, CompilerCoordinate, GenesisCoordinate, GenerationDescriptor, AuthorityMatrix, Decommission, Descriptor, PrincipalInspection, Inspection.
contracts.workspace_advertisement — WorkspaceAdvertisement.
contracts.workspace_file — WorkspaceFileSourceRequest, SourceReadReceipt, ExecutedWorkspaceFileSourceRequestV2, WorkspaceReadProblem, WorkspaceBindingDigestAuthored, WorkspaceFileGlobRequestV1, WorkspaceFileRequest, WorkspaceFileSourceRequestV2, WorkspaceFilesRequest, WorkspaceReadShape, WorkspaceReadShapeRefused.
contracts.workspace_layout — WorkspaceError, WorkspaceDirectoryConflict.
contracts.write — SelfEvidence, CaptureEvidence, ContractEvidence, FileEvidence, SlotRef, SetChange, AddChange, RetireChange, SetRequest, RetireRequest, WriteRequest, ChangeOutcome, WriteProposalRef, ApprovalNeeded, VerdictNotSupportedWarning, NewerCaptureNotCitableWarning, WriteRefusal, WriteOutcome, DocConfirmationOutcome, AboutChange, AppendSection, DocEditObservation, DocOutcome, ReplaceSection, SectionEvidence, CataloguedFile, CreateChange, CreateKeyPart, CreatedSubject, NoneValue, RebindChange.
contracts.actions — ActionRunRequest, ActionRunOutcome, ActionRunResult.
contracts.attestation_evidence — ClaimAttestationEvidenceRequest, ClaimAttestationEvidenceResult.
contracts.authoring_landing — AuthoringLanded, AuthoringProposed, AuthoringRefused.
contracts.backlinks — BacklinksRequest, BacklinksResult.
contracts.canonical_forms — CanonicalFormDidNotConverge.
contracts.capabilities — CapabilityFormatError, CapabilityRef, Capability, CapabilitySlot.
contracts.capability_fit — Fits, Unfit, EffectUnequal, TruncationUnfit, FitUnresolved.
contracts.capture_contract_inputs — CaptureContractInputRecord.
contracts.capture_layouts — LayoutRecordSet, CaptureLayout, DeclaredCaptureKind, LayoutGap.
contracts.claim_evidence — ExtractedBasis, CaptureBasis, DerivedBasis, MeasuredBasis, CompleteWhenResult, AbsenceWitness, ClaimEvidenceReceipt, ClaimsDiagnostic, CompletenessReason, RunCompleteness.
contracts.claim_type_inputs — ClaimTypeInputValidationError, ClaimEvidenceFreshnessInput, ClaimTypeMemberDescriptionInput, ClaimInverseInput, ClaimTypeInputRecord, ClaimTypeInputIncomplete, ClaimTypeEvidenceRulesRequired, ClaimTypeInputReferenceError, ClaimTypeMemberDescriptionsStale, ClaimTypeDefaultRoleNotPermitted, ClaimTypeSourcesRetired, ClaimTypeFamilyRuleNotAuthored, ClaimTypePerFileEvidenceRule.
contracts.compiler_upgrade_landing — CompilerUpgradeLanded, CompilerUpgradeProposed, CompilerUpgradeSigningKey, CompilerUpgradeResult.
contracts.content_memo — FrozenDict, FrozenList, ParseMemo, ValueMemo.
contracts.doc_sections — DocSectionError, DocSection, SectionDocument, SectionEdit.
contracts.duplicates — DuplicatesAuditRequest, DuplicateSubject, DuplicateSubjectGroup, DuplicateKeyGroup, DuplicateValue, DuplicateValueGroup, DuplicatesAuditScanned, DuplicatesAuditResult.
contracts.floor_inventory — FloorInventory, FloorManifestState.
contracts.identity_normalizers — KeyNormalizationRefused, NoneNormalizer, LowercaseNormalizer, Pep503Normalizer, PurlTypeNormalizer, PurlTypeRule, PurlIdentity.
contracts.kit_requires — KitRequirement.
contracts.law_problems — LawProblem.
contracts.mandate_scope — MandateChangeScope, MandateChanges, MandateValueCondition, SettleScopeGap.
contracts.notes — NoteFormatError, Note, AcceptedNote, NoteLawResult.
contracts.procedures.acquisition_rules — LineAcquisitionRule, AcquisitionRule, AcquisitionInputDecision.
contracts.procedures.authored — ReadStep, CallStep, ProjectStep, ShapeFieldSpec, ShapeSpec, FilterSpec, JoinSpec, AggregateSpec, DedupeSpec, UnionSpec, DeriveCaseSpec, DeriveSpec, TransformStep, AbortDetail, AbortAction, HaltAction, GotoAction, GuardStep, InboxStep, ClaimsSubjectSpec, ClaimTemplateSpec, ClaimsExpectBySpec, ClaimsStep, EmitStep, InvokeStep, SelectStep, RepeatCall, RepeatTransform, RepeatStep, HaltStep, ProcedureLimits, ReturnFrom, ReturnFields, ProcedureSpec, ProcedureSpecError.
contracts.procedures.authored_base — StepOptions.
contracts.procedures.capture_outputs — CaptureOutputDescriptor, TriggerTargetRefused.
contracts.procedures.claims — ClaimsSubject, ClaimsExpectByEnd, ClaimTemplate, ClaimsNode.
contracts.procedures.decompile — ProcedureNotDecompilable.
contracts.procedures.dispositions — ProcedureResolutionDispositionRequest, ResolutionDispositionSummary, ProcedureResolutionDispositionResult, ProcedureMeasurementReview.
contracts.procedures.extract — ExtractField, CompleteWhen, ExtractNode.
contracts.procedures.layout_extract — LayoutExtractRefused, KeyTypeOverride, LayoutExtractNode, LayoutExtractStep.
contracts.procedures.models — ProcedureBudget, ProcedureHardCaps, ProcedureDefinition.
contracts.procedures.node_summary — ExtractCompleteWhen, ExtractRunSummary, TransformRunSummary, ReadRunSummary, CallRunSummary, GuardOperand, GuardRunSummary, ClaimsRunSummary, EgressRunSummary, HaltRunSummary, RepeatRunSummary, RunRefusalCount, RunCounts.
contracts.procedures.nodes — ReadNode, CallNode, ShapeField, TransformShapeSpec, TransformFilterSpec, TransformJoinSpec, TransformAggregateSpec, TransformDedupeSpec, TransformUnionSpec, DeriveCase, TransformDeriveSpec, TransformNode, GuardNode, ProjectNode, RepeatBodyNode, RepeatNode, CaptureEgressNode, InboxEgressNode, HaltNode, RetiredNodeKind, SelectNode, InvokeNode.
contracts.procedures.reads — ProcedureReadCeiling.
contracts.proposal_summary — ReviewSummaryValue, ReviewSummaryCounts, ReviewSummaryRow, ReviewSummaryGroup, ReviewGuidance, ProposalReviewSummary.
contracts.provider_operations — OperationRefusal, OperationSignature, LineBinding, OperationValueRefused, OperationItemBudgetExceeded.
contracts.provider_registration — RegistrationResource, RegistrationRuntimeRequirement, OperationSource, DeclaredOperation, BuiltAgainstCapability, BuiltAgainstCaptureKind, ProviderDeclares, PackageRegistration.
contracts.public_names — NamePair, PublicNameMap.
contracts.query.authored — QueryMaximumInput, QueryOrderInput, QuerySpecInput, QuerySpecError, FilterOperand, FilterExpression, QuerySpecResolver.
contracts.recompilation — RecompiledMemberChange, ProposalRecompiled.
contracts.refs — Ref.
contracts.refusal_receipts — RefusedClaim, PriorRefusalReceipt, PriorRefusalCoverage.
contracts.runbooks — RunbookFormatError, Runbook, AcceptedRunbook, RunbookLineState, RunbookLawResult, RunbookStepOutcome, RunbookRunResult, RunbookRunRequest, RunbookPreviewRead, RunbookPreviewWrite, RunbookPreviewCall, RunbookPreviewInputLimits, RunbookPreviewInput, RunbookSettleChange, RunbookSettleScope, RunbookPreviewAuthority, RunbookPreviewCascade, RunbookPreviewStep, RunbookOrderProblem, RunbookPreview.
contracts.shapes — ContractFormatError, ContractTypeRefused, ContractRef, StringType, IntType, DecimalType, NumberType, BoolType, DateType, DateTimeType, DurationType, EnumType, EnumOfType, ListType, NestedType, VariantType, KeyType, KeyPartType, SubjectType, CaptureType, FieldResultType, RecordType, ResultType, RefusalType, ContractField, Contract, ContractLawProblem, Problem, FieldPresent, FieldAbsent, FieldInvalid, RecordValue, RecordArm, InvalidRecordArm, DuplicateArm, KeyValueRefused, KeyPartOutOfBounds, KeyCanonicalizer, LiteralOperand, CountOperand, Comparison, Membership, Presence, AllOf, AnyOf, Not.
contracts.subject_kinds — SubjectKindFormatError, SubjectEnd, SubjectKeyRule, SubjectKindKeys, SubjectKindMinted, SubjectKind, AcceptedSubjectKind, SubjectKindLawResult, KeyClaimTypeShape, SubjectIdUnassignable, SubjectKeyPart, SubjectKeyReference.
contracts.uploads — CaptureUploadOpenRequest, CaptureUploadSession, CaptureUploadCompleteRequest, CaptureUploadCompleteResult.
contracts.vocabulary_file — VocabularyFileError, VocabularyBaselineError, VocabularyExportRefused, VocabularyBaseline, VocabularyMemberMapping, VocabularyField, VocabularyKind, VocabularyFile, VocabularyExportResult, VocabularyPlanEntry, VocabularyClaimChange, VocabularyPreflight, VocabularyPlan, VocabularyApplyResult.
contracts.workspace_root — WorkspaceRoot, WorkspaceBoundaryRefused.
Examples
These are usage examples, not additional API definitions. Instance-dependent examples require the named accepted ontology, definitions, and caller authority.
Connect, snapshot, and review
Configure CRUXIBLE_SERVER_BEARER_TOKEN with the credential supplied by your
instance operator. Keep it out of source files and command output. The SDK uses
that credential for the explicit instance; it does not create a principal or
obtain approval authority by connecting.
from pathlib import Path
from cruxible_client import Cruxible
with Cruxible.connect(
target="http://localhost:8000", # Or unix:/path/to/daemon.sock
instance="your-instance-id",
workspace=Path.cwd(),
) as cx:
world = cx.world()
print(world.coordinate)
Accepted reads on cx use the current head by default. Each request resolves
one coordinate on the daemon; pagination retains that coordinate. cx.coordinate
reports the last observed coordinate without performing I/O. Typed references
carry explicit coordinates and remain pinned. Mixed-coordinate Claim batches
refuse rather than silently moving a reference.
Use snapshot = cx.at(coordinate) (or Cruxible.connect(..., at=coordinate))
for a fixed context. snapshot.world() and its lazy reads stay at that coordinate.
cx.world() returns an independent snapshot that remains readable after the live
client advances. refresh() on a pinned context refreshes that same snapshot.
Borrowed contexts share the original connection's lifetime; closing one does not
close the original transport.
cx.activate(proposal_id) requests acceptance and returns its exact coordinate;
it writes nothing locally and approves nothing. For exact readback,
even if another writer has advanced the head again:
receipt = cx.activate(proposal_id)
if receipt.accepted_coordinate is not None:
accepted = cx.at(receipt.accepted_coordinate)
claims = [accepted.get(claim_id).value for claim_id in claim_ids]
Drafts retain their observed vocabulary/reference coordinate; admission still checks current state and reports stale inputs. Operational queues, signing and write admission retain their current authority/evidence checks; a pinned reading context does not rewind operational state.
World attributes return live Claim contenders rather than silently selecting a
scalar. Use world.prefetch(subjects=(...), predicates=(...)) for bounded reads
of known selections, then inspect each Claim's value and verdict; when only
values and verdicts are needed, world.values(subjects=(...), predicates=(...))
returns them through query without full Claim views, overturned and ineligible
contenders included. To find something by name across kinds, grep the exported
floor under .cruxible/floor/ and pass the reference you find to cx.get(...).
A returned
Claim's subject path can be passed directly to cx.claim(subject=...) or a
changeset Claim writer when revising it. Acceptance and
evidential support are distinct: an accepted Claim may remain unsupported under
its evidence policy.
File-backed authoring requires a declared .cruxible/files.yaml catalog in the
workspace. Supplying a body with self_source is an explicit self-assertion, not
an observation of an independent source. The SDK's derived_by() method raises
CapabilityNotServed; it is not a supported derivation writer.
Review and approve an exact candidate
Save intent.intent_id after preparation. After a process interruption, reopen
the daemon-owned work through the same instance and authenticated actor:
intent = cx.resume_intent(saved_intent_id)
if intent.refused:
print(intent.diagnostics)
proposal = intent.proposal # Last observed proposal, without another HTTP call.
status = intent.status() # Explicitly check the current lifecycle state.
Resuming reads the latest revision and persisted preflight diagnostics. It does not prepare again, submit, approve, accept, or refresh the local floor. In particular, recover an uncertain submission this way before deciding what to do next. Python call-site locations and response-only lint warnings are not persisted and are unavailable on the reopened handle. Review tokens are also process-local; review the proposal again before signing in a new process.
The signer is an ApprovalSigner for an existing accepted principal:
cx.signer("reviewer") opens that principal's key on disk by the lookup order
in Cruxible.signer, or your operator supplies one.
Signing is local: no private key bytes are sent to the daemon, and connecting
grants no approval authority. Under independent approval the approver is not
the proposal's author, so run this on the reviewer's connection
(Cruxible.connect(principal_id="reviewer")) with configured_signer = cx.signer().
proposal = cx.proposal(intent.status().proposal_id)
reviewed = proposal.review()
review = reviewed.details # Inspect all members, evidence, governance and provenance.
# After deciding to approve this exact candidate. The approval that completes
# it activates it; approval.not_activated says why not otherwise.
approval = proposal.approve(signer=configured_signer, reviewed=reviewed)
# To keep acceptance a separate decision, sign with hold=True, then later:
# receipt = cx.activate(proposal.proposal_id)
world = cx.world()
ReviewedProposal is a process-local, originating-session/instance-bound snapshot.
details returns a fresh copy; editing it cannot alter the approved candidate.
The token binds identity, not proof that a human or agent actually read it.
The helper obtains fresh governance/challenge data, checks the reviewed candidate,
root and signer, verifies the local signature and submits it. It activates only
a candidate this approval completes, when the caller's tier may activate and
hold is not set; it never refreshes the local floor. The authenticated submitter may differ from the signer.
This convenience path requires a complete unredacted review. An
ApprovalReviewMismatch includes a repair instruction and never automatically
reviews or signs a replacement candidate. If the receipt check fails after
submission, inspect proposal status before retrying. Existing raw
CruxibleClient review/challenge/attestation APIs remain available for advanced
external signing and partial-visibility workflows under the server's policy.
For operator configuration, LocalEd25519ApprovalSigner.open(...) takes an explicit
principal ID, private key path, expected public key, and forbidden custody roots.
It preserves existing file permissions, nonsymlink/no-follow reads, and key checks
on every signature. The ApprovalSigner protocol is also the seam for a separately
provided signer backend; hardware and broker implementations are not included.
The complete disposable example authors a
source-backed Claim, prompts for review and acceptance, reads its World state,
detects changed source evidence with free audit/next, and repairs the same Claim.
It needs an initialized disposable instance and operator-provisioned signer;
it does not bootstrap authority. World's qualified Claim IDs can be passed
directly to revises and dispositions; duplicate normalized keys are refused.
Complete local Procedure preview
This example needs no daemon and invokes no provider:
from cruxible_client.authoring.procedures import Sequence, item
sequence = Sequence(
"catalog.acme-discontinued",
params={"path": "string{min_len: 1, max_len: 256}"},
slots={"read": {"capability": "workspace.file@1"}},
)
listing = sequence.call(
"listing", slot="read", captures={"capture": "catalog.acme-discontinued"},
input={"logical_source": "acme.discontinued", "relative_path": sequence.params["path"]},
)
parts = sequence.extract("parts", capture=listing["capture"], records="parts")
sequence.claims(
({"type": "catalog.part.discontinued", "value": True,
"rationale": "Listed in Acme's discontinued-parts file."},),
for_each=parts["records"],
subject={"kind": "catalog.part", "key": {"name": item("key", "part")}},
)
preview = sequence.preview()
preview.errors # ()
preview.authority # 'settle'
preview.pending_checks # what only prepare and admission can check: capability pins, values, budgets
spec = sequence.spec() # the ProcedureSpec every surface submits
With an existing cx, cx.procedure(definition=sequence).prepare() creates and
preflights an authoring intent. Submission, review, approval where required,
and acceptance remain separate operations. To include related definitions,
use cx.changes(rationale=...).procedure(definition=sequence) before preparing
the changeset.
Kit and provider upgrades return automation_carries alongside repins/moved
and true retirement stops. Its discriminated kind is line (successor arrives
disabled) or mandate (same-name propose successor, with loses_settle and a
Subject-creation namespace limitation when applicable). phase="planned" has no
final digests before provider installation; phase="validated" names the exact
successors. Triggers stay unchanged. Procedure-definition changes carry automation
too. Use line.enable() to resume and ordinary Mandate authoring/approval to
restore settle. --keep-build preserves automation when its Procedure is unchanged.
Metadata
Release files for cruxible-client 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cruxible_client-0.5.0.tar.gz | 1.2 MB | With provenance | Details for cruxible_client-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cruxible_client-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for cruxible_client-0.5.0-py3-none-any.whl |
Total release size: 2.4 MB
Release files / cruxible_client-0.5.0.tar.gz
| Download URL | cruxible_client-0.5.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
236fd979232aad4472805f2778ba9120397b1e10f594814f11b44b196fe61417
|
|
BLAKE2b-256 checksum How to use checksums |
c6126b308fe786bee0cee1eacfd23fccd710ba73743286a68c72ceb740790c3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / cruxible_client-0.5.0-py3-none-any.whl
| Download URL | cruxible_client-0.5.0-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1db43a40919d909265719a15cbe1dc0384753a064d0066ef2ba7237bce265495
|
|
BLAKE2b-256 checksum How to use checksums |
e7ab09fd6d0df54afdf07672751bf37d3b18b00f7bdfaa42bc13e9a889496bec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for cruxible-client 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for cruxible_client-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.