Skip to main content

capabilities API

SDK 1.0.1. This reference describes the supported authoring interface.

Behavior​

type Behavior = Literal['read', 'inference', 'proposal', 'execute']

Mode​

type Mode = Literal['unary', 'server_streaming', 'client_streaming', 'bidirectional']

Domain​

type Domain = Literal['local', 'private_site', 'external']

InterfaceErrorCode​

type InterfaceErrorCode = Literal['invalid_descriptor', 'invalid_payload', 'unavailable', 'not_read', 'unsupported_mode']

CapabilityInterfaceError​

A bounded interface refusal without descriptor, argument or caller data.

CapabilityInterfaceError.__init__​

Retain only a stable refusal code; do not retain the failed input.

def __init__(self, code: InterfaceErrorCode) -> None:
...

CapabilityDescription​

An owned, native-validated declaration, not proof of current permission.

CapabilityDescription.from_endpoint​

Read a declaration through the native reader, without contacting a host.

The input may come from configuration or a directory observation. It supplies no signed custody, current readiness or execution authority.

def from_endpoint(cls, destination: CapabilityEndpoint) -> CapabilityDescription:
...

CapabilityDescription.descriptor​

Return a defensive copy of the complete native portable declaration.

def descriptor(self) -> dict[str, JsonValue]:
...

CapabilityDescription.behavior​

Return the signed declaration's effect classification without relabelling.

def behavior(self) -> Behavior:
...

CapabilityDescription.io_mode​

Return the exact declared input/output lifecycle.

def io_mode(self) -> Mode:
...

CapabilityDescription.processing_domain​

Return the declared processing boundary; this is not caller consent.

def processing_domain(self) -> Domain:
...

CapabilityDescription.summary​

Return the declaration's descriptive text, never an authority decision.

def summary(self) -> str:
...

Fields​

endpoint: CapabilityEndpoint
FieldDescriptionDeclared defaults and constraints
endpoint——

CapabilityProposal​

Immutable request data for review; it contains no caller or approval proof.

Use prepare to construct an intent. Export is explicit because arguments and request hashes may be private. No method submits or executes this object. A host must independently authenticate the caller and admit any later work.

CapabilityProposal.prepare​

Validate and copy an inert JSON request without I/O or dispatch.

Supports unary and server-output requests. Input-media streams cannot be represented by an initial JSON object alone and are refused. A governed declaration can be described here but gains no execution path.

def prepare(cls, destination: CapabilityEndpoint, payload: dict[str, JsonValue]) -> CapabilityProposal:
...

CapabilityProposal.canonical​

Explicitly export exact intent bytes; these bytes grant no authority.

def canonical(self) -> bytes:
...

CapabilityProposal.payload​

Return an owned argument copy without exposing internal storage.

def payload(self) -> dict[str, JsonValue]:
...

CapabilityProposal.request_bytes​

Explicitly export the exact canonical request bound by the intent.

def request_bytes(self) -> bytes:
...

CapabilityProposal.digest​

Identify this exact intent for comparison; the digest is not approval.

def digest(self) -> str:
...

CapabilityClient​

Common interfaces bound to one actual invocation and its original caller.

CapabilityClient.__init__​

Retain the invocation only; no replacement caller or bearer is accepted.

def __init__(self, invocation: Invocation) -> None:
...

CapabilityClient.describe​

Freshly resolve one exact permitted descriptor without caching authority.

async def describe(self, destination: CapabilityEndpoint) -> CapabilityDescription:
...

CapabilityClient.read​

Perform one declared unary read using original-caller native dispatch.

Reject inference/proposal/execute declarations before transport. Current permissions and signed destination are independently checked at dispatch; cancellation, revocation and uncertain outcomes retain existing custody. A configured read does not require the optional discovery channel.

async def read(self, destination: CapabilityEndpoint, payload: dict[str, JsonValue] | bytes, *, deadline_unix_ms: int | None=None) -> CallReply:
...

CapabilityClient.propose​

Prepare an inert intent after current caller-filtered observation.

No handler is invoked and no child-effect sequence is consumed. Hosts that do not expose governed destinations still refuse them; this method cannot replace that boundary with a service identity or an approval.

async def propose(self, destination: CapabilityEndpoint, payload: dict[str, JsonValue]) -> CapabilityProposal:
...