cayu.tools.grants
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.
TARGETED_TOOL_GRANT_DEFAULT_LIFETIME_SECONDS
Section titled “TARGETED_TOOL_GRANT_DEFAULT_LIFETIME_SECONDS”from cayu.tools import TARGETED_TOOL_GRANT_DEFAULT_LIFETIME_SECONDSTARGETED_TOOL_GRANT_DEFAULT_LIFETIME_SECONDS = 300Release source · Runtime guarantees · Capability guides
TARGETED_TOOL_GRANT_INSPECTION_MAX_RECORDS
Section titled “TARGETED_TOOL_GRANT_INSPECTION_MAX_RECORDS”from cayu.tools import TARGETED_TOOL_GRANT_INSPECTION_MAX_RECORDSTARGETED_TOOL_GRANT_INSPECTION_MAX_RECORDS = 256Release source · Runtime guarantees · Capability guides
TARGETED_TOOL_GRANT_MAX_CALLS
Section titled “TARGETED_TOOL_GRANT_MAX_CALLS”from cayu.tools import TARGETED_TOOL_GRANT_MAX_CALLSTARGETED_TOOL_GRANT_MAX_CALLS = 32Release source · Runtime guarantees · Capability guides
TARGETED_TOOL_GRANT_MAX_LIFETIME_SECONDS
Section titled “TARGETED_TOOL_GRANT_MAX_LIFETIME_SECONDS”from cayu.tools import TARGETED_TOOL_GRANT_MAX_LIFETIME_SECONDSTARGETED_TOOL_GRANT_MAX_LIFETIME_SECONDS = 86400Release source · Runtime guarantees · Capability guides
TARGETED_TOOL_GRANT_MAX_REQUESTS
Section titled “TARGETED_TOOL_GRANT_MAX_REQUESTS”from cayu.tools import TARGETED_TOOL_GRANT_MAX_REQUESTSTARGETED_TOOL_GRANT_MAX_REQUESTS = 32Release source · Runtime guarantees · Capability guides
TARGETED_TOOL_GRANT_SCHEMA_VERSION
Section titled “TARGETED_TOOL_GRANT_SCHEMA_VERSION”from cayu.tools import TARGETED_TOOL_GRANT_SCHEMA_VERSIONTARGETED_TOOL_GRANT_SCHEMA_VERSION = 1Release source · Runtime guarantees · Capability guides
TargetedToolGrant
Section titled “TargetedToolGrant”from cayu.tools import TargetedToolGrantApplication request for bounded addressability to one registered tool.
A request contains no executable, schema, policy, or authorization material. The runtime resolves all such identity from the registered catalogue.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
schema_version |
Literal[1] |
TARGETED_TOOL_GRANT_SCHEMA_VERSION |
request_id |
str |
Field(max_length=TARGETED_TOOL_GRANT_REQUEST_ID_MAX_CHARS) |
tool_id |
str |
required |
max_calls |
StrictInt |
Field(default=1, ge=1, le=TARGETED_TOOL_GRANT_MAX_CALLS) |
lifetime_seconds |
StrictInt |
Field(default=TARGETED_TOOL_GRANT_DEFAULT_LIFETIME_SECONDS, ge=1, le=TARGETED_TOOL_GRANT_MAX_LIFETIME_SECONDS) |
expires_after_interaction |
Literal[True] |
True |
origin |
str | None |
None |
validate_schema_version (method)
Section titled “validate_schema_version (method)”TargetedToolGrant.validate_schema_version(value: object) -> objectvalidate_request_id (method)
Section titled “validate_request_id (method)”TargetedToolGrant.validate_request_id(value: str) -> strvalidate_interaction_expiry (method)
Section titled “validate_interaction_expiry (method)”TargetedToolGrant.validate_interaction_expiry(value: object) -> objectvalidate_tool_id (method)
Section titled “validate_tool_id (method)”TargetedToolGrant.validate_tool_id(value: str) -> strvalidate_origin (method)
Section titled “validate_origin (method)”TargetedToolGrant.validate_origin(value: str | None) -> str | NoneRelease source · Runtime guarantees · Capability guides
TargetedToolGrantInspection
Section titled “TargetedToolGrantInspection”from cayu.tools import TargetedToolGrantInspectionPublic grant state with aliased scope and no principal authority.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
schema_version |
Literal[1] |
TARGETED_TOOL_GRANT_SCHEMA_VERSION |
grant_id |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
tool_ref |
str |
required |
request_id |
str |
Field(max_length=TARGETED_TOOL_GRANT_REQUEST_ID_MAX_CHARS) |
session_id |
str |
required |
interaction_id |
str |
required |
generation_id |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
agent_name |
str |
required |
task_id |
str | None |
None |
environment_name |
str | None |
None |
tool_id |
str |
required |
tool_name |
str |
required |
catalogue_revision |
str |
required |
descriptor_version |
str |
required |
schema_fingerprint |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
issued_at |
datetime |
required |
expires_at |
datetime |
required |
expires_after_interaction |
Literal[True] |
True |
max_calls |
StrictInt |
Field(ge=1, le=TARGETED_TOOL_GRANT_MAX_CALLS) |
used_calls |
StrictInt |
Field(ge=0, le=TARGETED_TOOL_GRANT_MAX_CALLS) |
origin |
str | None |
None |
revoked_at |
datetime | None |
None |
validate_schema_version (method)
Section titled “validate_schema_version (method)”TargetedToolGrantInspection.validate_schema_version(value: object) -> objectvalidate_interaction_expiry (method)
Section titled “validate_interaction_expiry (method)”TargetedToolGrantInspection.validate_interaction_expiry(value: object) -> objectvalidate_tool_ref (method)
Section titled “validate_tool_ref (method)”TargetedToolGrantInspection.validate_tool_ref(value: str) -> strvalidate_request_identity (method)
Section titled “validate_request_identity (method)”TargetedToolGrantInspection.validate_request_identity(value: str) -> strvalidate_scope_identity (method)
Section titled “validate_scope_identity (method)”TargetedToolGrantInspection.validate_scope_identity(value: str, info) -> strvalidate_optional_scope_identity (method)
Section titled “validate_optional_scope_identity (method)”TargetedToolGrantInspection.validate_optional_scope_identity(value: str | None, info) -> str | Nonevalidate_tool_id (method)
Section titled “validate_tool_id (method)”TargetedToolGrantInspection.validate_tool_id(value: str) -> strvalidate_catalogue_revision (method)
Section titled “validate_catalogue_revision (method)”TargetedToolGrantInspection.validate_catalogue_revision(value: str) -> strvalidate_descriptor_version (method)
Section titled “validate_descriptor_version (method)”TargetedToolGrantInspection.validate_descriptor_version(value: str) -> strvalidate_origin (method)
Section titled “validate_origin (method)”TargetedToolGrantInspection.validate_origin(value: str | None) -> str | Nonenormalize_timestamp (method)
Section titled “normalize_timestamp (method)”TargetedToolGrantInspection.normalize_timestamp(value: datetime | None, info) -> datetime | Nonevalidate_lifecycle (method)
Section titled “validate_lifecycle (method)”TargetedToolGrantInspection.validate_lifecycle() -> TargetedToolGrantInspectionremaining_calls (property)
Section titled “remaining_calls (property)”TargetedToolGrantInspection.remaining_calls() -> intRelease source · Runtime guarantees · Capability guides
TargetedToolGrantIssueOutcome
Section titled “TargetedToolGrantIssueOutcome”from cayu.tools import TargetedToolGrantIssueOutcomeBases: StrEnum.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
ISSUED |
class attribute |
'issued' |
REUSED |
class attribute |
'reused' |
Release source · Runtime guarantees · Capability guides
TargetedToolGrantIssueResult
Section titled “TargetedToolGrantIssueResult”from cayu.tools import TargetedToolGrantIssueResultBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
records |
tuple[TargetedToolGrantRecord, ...] |
required |
outcomes |
tuple[TargetedToolGrantIssueOutcome, ...] |
required |
events |
tuple[Event, ...] |
required |
copy_records (method)
Section titled “copy_records (method)”TargetedToolGrantIssueResult.copy_records(value: object) -> objectcopy_events (method)
Section titled “copy_events (method)”TargetedToolGrantIssueResult.copy_events(value: object) -> objectbound_outcomes (method)
Section titled “bound_outcomes (method)”TargetedToolGrantIssueResult.bound_outcomes(value: object) -> objectvalidate_lengths (method)
Section titled “validate_lengths (method)”TargetedToolGrantIssueResult.validate_lengths() -> TargetedToolGrantIssueResultRelease source · Runtime guarantees · Capability guides
TargetedToolGrantReconstructionResult
Section titled “TargetedToolGrantReconstructionResult”from cayu.tools import TargetedToolGrantReconstructionResultValidated grants remaining callable within one recovered interaction.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
valid |
tuple[TargetedToolGrantRecord, ...] |
() |
rejected |
tuple[tuple[str, TargetedToolUseRejectionReason], ...] |
() |
events |
tuple[Event, ...] |
() |
copy_valid_records (method)
Section titled “copy_valid_records (method)”TargetedToolGrantReconstructionResult.copy_valid_records(value: object) -> objectcopy_events (method)
Section titled “copy_events (method)”TargetedToolGrantReconstructionResult.copy_events(value: object) -> objectbound_rejections (method)
Section titled “bound_rejections (method)”TargetedToolGrantReconstructionResult.bound_rejections(value: object) -> objectvalidate_shape (method)
Section titled “validate_shape (method)”TargetedToolGrantReconstructionResult.validate_shape() -> TargetedToolGrantReconstructionResultRelease source · Runtime guarantees · Capability guides
TargetedToolGrantRecord
Section titled “TargetedToolGrantRecord”from cayu.tools import TargetedToolGrantRecordImmutable durable state for one issued targeted reference.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
schema_version |
Literal[1] |
TARGETED_TOOL_GRANT_SCHEMA_VERSION |
grant_id |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
tool_ref |
str |
required |
request_id |
str |
Field(max_length=TARGETED_TOOL_GRANT_REQUEST_ID_MAX_CHARS) |
session_id |
str |
required |
interaction_id |
str |
required |
generation_id |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
agent_name |
str |
required |
task_id |
str | None |
None |
environment_name |
str | None |
None |
principal |
str | None |
None |
tenant |
str | None |
None |
tool_id |
str |
required |
tool_name |
str |
required |
catalogue_revision |
str |
required |
descriptor_version |
str |
required |
schema_fingerprint |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
issued_at |
datetime |
required |
expires_at |
datetime |
required |
expires_after_interaction |
StrictBool |
True |
max_calls |
StrictInt |
Field(ge=1, le=TARGETED_TOOL_GRANT_MAX_CALLS) |
used_calls |
StrictInt |
Field(default=0, ge=0, le=TARGETED_TOOL_GRANT_MAX_CALLS) |
origin |
str | None |
None |
revoked_at |
datetime | None |
None |
revocation_reason |
str | None |
None |
validate_schema_version (method)
Section titled “validate_schema_version (method)”TargetedToolGrantRecord.validate_schema_version(value: object) -> objectvalidate_required_text (method)
Section titled “validate_required_text (method)”TargetedToolGrantRecord.validate_required_text(value: str, info) -> strvalidate_request_identity (method)
Section titled “validate_request_identity (method)”TargetedToolGrantRecord.validate_request_identity(value: str) -> strvalidate_tool_ref (method)
Section titled “validate_tool_ref (method)”TargetedToolGrantRecord.validate_tool_ref(value: str) -> strvalidate_scope_identity (method)
Section titled “validate_scope_identity (method)”TargetedToolGrantRecord.validate_scope_identity(value: str, info) -> strvalidate_tool_id (method)
Section titled “validate_tool_id (method)”TargetedToolGrantRecord.validate_tool_id(value: str) -> strvalidate_catalogue_revision (method)
Section titled “validate_catalogue_revision (method)”TargetedToolGrantRecord.validate_catalogue_revision(value: str) -> strvalidate_descriptor_version (method)
Section titled “validate_descriptor_version (method)”TargetedToolGrantRecord.validate_descriptor_version(value: str) -> strvalidate_optional_text (method)
Section titled “validate_optional_text (method)”TargetedToolGrantRecord.validate_optional_text(value: str | None, info) -> str | Nonevalidate_origin (method)
Section titled “validate_origin (method)”TargetedToolGrantRecord.validate_origin(value: str | None) -> str | Nonevalidate_revocation_reason (method)
Section titled “validate_revocation_reason (method)”TargetedToolGrantRecord.validate_revocation_reason(value: str | None) -> str | Nonenormalize_timestamp (method)
Section titled “normalize_timestamp (method)”TargetedToolGrantRecord.normalize_timestamp(value: datetime | None, info) -> datetime | Nonevalidate_lifecycle (method)
Section titled “validate_lifecycle (method)”TargetedToolGrantRecord.validate_lifecycle() -> TargetedToolGrantRecordremaining_calls (property)
Section titled “remaining_calls (property)”TargetedToolGrantRecord.remaining_calls() -> intRelease source · Runtime guarantees · Capability guides
TargetedToolGrantStateSnapshot
Section titled “TargetedToolGrantStateSnapshot”from cayu.tools import TargetedToolGrantStateSnapshotComplete typed grant state for trusted durable export and validation.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
schema_version |
Literal[1] |
TARGETED_TOOL_GRANT_SCHEMA_VERSION |
records |
tuple[TargetedToolGrantRecord, ...] |
() |
uses |
tuple[TargetedToolUseBinding, ...] |
() |
validate_schema_version (method)
Section titled “validate_schema_version (method)”TargetedToolGrantStateSnapshot.validate_schema_version(value: object) -> objectrequire_materialized_sequences (method)
Section titled “require_materialized_sequences (method)”TargetedToolGrantStateSnapshot.require_materialized_sequences(value: object, info) -> objectvalidate_state (method)
Section titled “validate_state (method)”TargetedToolGrantStateSnapshot.validate_state() -> TargetedToolGrantStateSnapshotRelease source · Runtime guarantees · Capability guides
TargetedToolUseBinding
Section titled “TargetedToolUseBinding”from cayu.tools import TargetedToolUseBindingPermanent digest-only evidence for one accepted grant use.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
schema_version |
Literal[1] |
TARGETED_TOOL_GRANT_SCHEMA_VERSION |
grant_id |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
use_id |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
session_id |
str |
required |
interaction_id |
str |
required |
model_step_id |
str |
required |
outer_tool_call_id |
str |
required |
arguments_sha256 |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
invocation_id |
str |
required |
bound_at |
datetime |
required |
validate_schema_version (method)
Section titled “validate_schema_version (method)”TargetedToolUseBinding.validate_schema_version(value: object) -> objectvalidate_required_text (method)
Section titled “validate_required_text (method)”TargetedToolUseBinding.validate_required_text(value: str, info) -> strvalidate_scope_identity (method)
Section titled “validate_scope_identity (method)”TargetedToolUseBinding.validate_scope_identity(value: str, info) -> strvalidate_execution_identity (method)
Section titled “validate_execution_identity (method)”TargetedToolUseBinding.validate_execution_identity(value: str, info) -> strnormalize_timestamp (method)
Section titled “normalize_timestamp (method)”TargetedToolUseBinding.normalize_timestamp(value: datetime) -> datetimevalidate_use_id (method)
Section titled “validate_use_id (method)”TargetedToolUseBinding.validate_use_id() -> TargetedToolUseBindingRelease source · Runtime guarantees · Capability guides
TargetedToolUseDisposition
Section titled “TargetedToolUseDisposition”from cayu.tools import TargetedToolUseDispositionBases: StrEnum.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
BOUND |
class attribute |
'bound' |
REJOINED |
class attribute |
'rejoined' |
REJECTED |
class attribute |
'rejected' |
Release source · Runtime guarantees · Capability guides
TargetedToolUseRejectionReason
Section titled “TargetedToolUseRejectionReason”from cayu.tools import TargetedToolUseRejectionReasonBases: StrEnum.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
MALFORMED |
class attribute |
'malformed' |
UNKNOWN |
class attribute |
'unknown' |
NOT_YET_VALID |
class attribute |
'not_yet_valid' |
EXPIRED |
class attribute |
'expired' |
REVOKED |
class attribute |
'revoked' |
EXHAUSTED |
class attribute |
'exhausted' |
CROSS_SESSION |
class attribute |
'cross_session' |
CROSS_INTERACTION |
class attribute |
'cross_interaction' |
CROSS_GENERATION |
class attribute |
'cross_generation' |
PRINCIPAL_MISMATCH |
class attribute |
'principal_mismatch' |
TENANT_MISMATCH |
class attribute |
'tenant_mismatch' |
AGENT_MISMATCH |
class attribute |
'agent_mismatch' |
TASK_MISMATCH |
class attribute |
'task_mismatch' |
ENVIRONMENT_MISMATCH |
class attribute |
'environment_mismatch' |
OUT_OF_CEILING |
class attribute |
'out_of_ceiling' |
CATALOGUE_DRIFT |
class attribute |
'catalogue_drift' |
DESCRIPTOR_DRIFT |
class attribute |
'descriptor_drift' |
INVALID_ARGUMENTS |
class attribute |
'invalid_arguments' |
ALTERED_REPLAY |
class attribute |
'altered_replay' |
Release source · Runtime guarantees · Capability guides
TargetedToolUseRequest
Section titled “TargetedToolUseRequest”from cayu.tools import TargetedToolUseRequestBounded identities required to reserve one future effective invocation.
Bases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
tool_ref |
str |
required |
session_id |
str |
required |
interaction_id |
str |
required |
generation_id |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
agent_name |
str |
required |
task_id |
str | None |
None |
environment_name |
str | None |
None |
principal |
str | None |
None |
tenant |
str | None |
None |
catalogue_revision |
str |
required |
descriptor_version |
str |
required |
schema_fingerprint |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
tool_id |
str |
required |
tool_name |
str |
required |
model_step_id |
str |
required |
outer_tool_call_id |
str |
required |
arguments_sha256 |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
invocation_id |
str |
required |
expected_run_epoch |
StrictInt |
Field(ge=0) |
validate_tool_ref (method)
Section titled “validate_tool_ref (method)”TargetedToolUseRequest.validate_tool_ref(value: str) -> strvalidate_scope_identity (method)
Section titled “validate_scope_identity (method)”TargetedToolUseRequest.validate_scope_identity(value: str, info) -> strvalidate_execution_identity (method)
Section titled “validate_execution_identity (method)”TargetedToolUseRequest.validate_execution_identity(value: str, info) -> strvalidate_tool_id (method)
Section titled “validate_tool_id (method)”TargetedToolUseRequest.validate_tool_id(value: str) -> strvalidate_catalogue_revision (method)
Section titled “validate_catalogue_revision (method)”TargetedToolUseRequest.validate_catalogue_revision(value: str) -> strvalidate_descriptor_version (method)
Section titled “validate_descriptor_version (method)”TargetedToolUseRequest.validate_descriptor_version(value: str) -> strvalidate_optional_text (method)
Section titled “validate_optional_text (method)”TargetedToolUseRequest.validate_optional_text(value: str | None, info) -> str | NoneRelease source · Runtime guarantees · Capability guides
TargetedToolUseResult
Section titled “TargetedToolUseResult”from cayu.tools import TargetedToolUseResultBases: BaseModel.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
disposition |
TargetedToolUseDisposition |
required |
reason |
TargetedToolUseRejectionReason | None |
None |
grant |
TargetedToolGrantRecord | None |
None |
binding |
TargetedToolUseBinding | None |
None |
event |
Event | None |
None |
copy_grant (method)
Section titled “copy_grant (method)”TargetedToolUseResult.copy_grant(value: object) -> objectcopy_event_evidence (method)
Section titled “copy_event_evidence (method)”TargetedToolUseResult.copy_event_evidence(value: object) -> objectvalidate_shape (method)
Section titled “validate_shape (method)”TargetedToolUseResult.validate_shape() -> TargetedToolUseResult