Skip to content

cayu.collaboration.mandates

Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.

from cayu.collaboration import CollaborationMandate

One frozen step in an authenticated root-to-leaf delegation chain.

Bases: ContractValue.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
unordered_fields class attribute frozenset({'audiences', 'scopes', 'actions', 'resources', 'budgets'})
reference ObjectRef required
root ObjectRef required
parent ObjectRef | None required
issuer OwnerRef required
principal Identifier required
participant ParticipantRef | None required
audiences tuple[OwnerRef, ...] Field(max_length=16)
scopes tuple[Identifier, ...] Field(max_length=16)
actions tuple[MandateAction, ...] Field(max_length=16)
resources tuple[ResourceSelector, ...] Field(max_length=32)
remaining_delegations StrictInt Field(ge=0, le=8)
sponsor ObjectRef | None required
budgets tuple[ObjectRef, ...] Field(max_length=16)
restrictions MandateRestrictions required
expires_at_ms Expiry required
revocation_generation Generation required
CollaborationMandate.bounded_input(value: object) -> Any
CollaborationMandate.immutable_fields() -> ContractValue
CollaborationMandate.exact_authority() -> CollaborationMandate

Release source · Runtime guarantees · Capability guides

from cayu.collaboration import InputChannel
InputChannel = Literal['prompt', 'context', 'tool', 'retrieval', 'artifact', 'source']

Release source · Runtime guarantees · Capability guides

from cayu.collaboration import MandateAccessContext

Authenticated host input, separate from any public operation proposal.

Bases: ContractValue.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
issuer OwnerRef required
principal Identifier required
participant ParticipantRef | None None
mandate ObjectRef | None None
MandateAccessContext.bounded_input(value: object) -> Any
MandateAccessContext.immutable_fields() -> ContractValue

Release source · Runtime guarantees · Capability guides

from cayu.collaboration import MandateAction
MandateAction = Literal['consult', 'source', 'prepare', 'execute', 'publish', 'commission', 'accept_responsibility', 'accept_result', 'administer', 'readback', 'expose', 'release', 'retire']

Release source · Runtime guarantees · Capability guides

from cayu.collaboration import MandateChain

Ordered history authenticated together under current revocation policy.

Bases: ContractValue.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
entries tuple[CollaborationMandate, ...] Field(min_length=1, max_length=9)
MandateChain.bounded_input(value: object) -> Any
MandateChain.immutable_fields() -> ContractValue
MandateChain.exact_lineage() -> MandateChain

Release source · Runtime guarantees · Capability guides

from cayu.collaboration import MandateDenied

Bases: PermissionError.

MandateDenied.__init__() -> None

Release source · Runtime guarantees · Capability guides

from cayu.collaboration import MandateResolution

Bases: ContractValue.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
principal PrincipalResolution required
chain MandateChain required
MandateResolution.bounded_input(value: object) -> Any
MandateResolution.immutable_fields() -> ContractValue

Release source · Runtime guarantees · Capability guides

from cayu.collaboration import MandateResolver

Bases: ABC.

MandateResolver.ref() -> ObjectRef

Stable versioned implementation/configuration, never an ambient default.

MandateResolver.acquire(context: MandateAccessContext) -> AbstractAsyncContextManager[MandateResolution]

Authenticate identity and the whole chain, holding current revocation.

Deny replaced/missing issuers, mandates or ancestor generations. Keep the guard held across owned effects/exposure; historical values alone cannot renew it. This extension is trusted application code, not an auth service.

Release source · Runtime guarantees · Capability guides

from cayu.collaboration import MandateRestrictions

Bases: ContractValue.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
unordered_fields class attribute frozenset({'channels', 'excluded_sources'})
channels tuple[InputChannel, ...] Field(max_length=6)
excluded_sources tuple[ObjectRef, ...] Field(max_length=32)
independence_policy ObjectRef required
disclosure_policy ObjectRef required
MandateRestrictions.bounded_input(value: object) -> Any
MandateRestrictions.immutable_fields() -> ContractValue
MandateRestrictions.pinned_policy_and_exclusions() -> MandateRestrictions

Release source · Runtime guarantees · Capability guides

from cayu.collaboration import PrincipalResolution

Fresh resolver output, not a portable credential or participant owner claim.

Bases: ContractValue.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
unordered_fields class attribute frozenset({'participants', 'audiences', 'actions', 'scopes'})
resolver ObjectRef required
issuer OwnerRef required
principal Identifier required
participants tuple[ParticipantRef, ...] Field(max_length=16)
audiences tuple[OwnerRef, ...] Field(max_length=16)
actions tuple[MandateAction, ...] Field(max_length=16)
scopes tuple[Identifier, ...] Field(max_length=16)
expires_at_ms Expiry required
PrincipalResolution.bounded_input(value: object) -> Any
PrincipalResolution.immutable_fields() -> ContractValue
PrincipalResolution.registered_issuer() -> PrincipalResolution

Release source · Runtime guarantees · Capability guides

from cayu.collaboration import ResourceSelector

An exact revision or a subtree understood only by its registered owner.

A bounded union is a tuple of these selectors. Subtree names are not paths that Cayu compares by prefix; their interpretation belongs to the owner.

Bases: ContractValue.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
resource ObjectRef required
mode Literal['exact', 'subtree'] 'exact'
ResourceSelector.bounded_input(value: object) -> Any
ResourceSelector.immutable_fields() -> ContractValue
ResourceSelector.pinned_revision() -> ResourceSelector

Release source · Runtime guarantees · Capability guides

from cayu.collaboration import ResourceSelectorOwner

Bases: ABC.

ResourceSelectorOwner.canonical_resource_kinds() -> tuple[str, ...] | None

Immutable owner-configuration scope; None explicitly covers all kinds.

Other kinds retain generic exact-identity semantics, not subtree or resource-effect authority. Bind changes to the owner’s configuration.

ResourceSelectorOwner.owner() -> OwnerRef

Exact registered resource owner/configuration incarnation.

ResourceSelectorOwner.canonicalize(selector: ResourceSelector) -> ResourceSelector

Resolve aliases to a pinned, bounded canonical selector, without effects.

ResourceSelectorOwner.contains(parent: ResourceSelector, child: ResourceSelector) -> bool

Positively validate owner-defined subtree containment, not string prefixes.

Release source · Runtime guarantees · Capability guides