Skip to content

cayu.execution_profiles

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 import execution_profile_egress_authority_change

Return the conservative semantic classification for an egress difference.

execution_profile_egress_authority_change(expected: ExecutionProfileIdentity, candidate: ExecutionProfileIdentity, *, changed_component_classes: tuple[ExecutionProfileComponentClass, ...] | None=None) -> EgressAuthorityChangeKind | None

Release source · Runtime guarantees · Capability guides

from cayu import EXECUTION_PROFILE_FINGERPRINT_FIELD
EXECUTION_PROFILE_FINGERPRINT_FIELD = 'execution_profile_fingerprint'

Release source · Runtime guarantees · Capability guides

from cayu import EXECUTION_PROFILE_SCHEMA_VERSION
EXECUTION_PROFILE_SCHEMA_VERSION = 6

Release source · Runtime guarantees · Capability guides

from cayu import execution_profile_with_egress_authority

Return a schema-v5 profile with one typed egress authority replacement.

execution_profile_with_egress_authority(profile: ExecutionProfileIdentity, authority: EgressAuthorityIdentity | None) -> ExecutionProfileIdentity

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfileAdoptionIntent

Explicit caller intent to adopt the current application’s profile.

Bases: BaseModel.

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
idempotency_key str Field(max_length=EXECUTION_PROFILE_ADOPTION_ID_MAX_CHARS)
reason str Field(max_length=EXECUTION_PROFILE_ADOPTION_TEXT_MAX_CHARS)
requested_by ResolutionActor required
ExecutionProfileAdoptionIntent.validate_idempotency_key(value: str) -> str
ExecutionProfileAdoptionIntent.validate_reason(value: str) -> str
ExecutionProfileAdoptionIntent.copy_requested_by(value: ResolutionActor) -> ResolutionActor

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfileAuthorityDecision

Distinct authorization for a potentially authority-broadening change.

Bases: StrEnum.

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
NOT_REQUIRED class attribute 'not_required'
AUTHORIZED class attribute 'authorized'
DENIED class attribute 'denied'

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfileComponentClass

Stable classes of execution authority represented by a profile.

Bases: StrEnum.

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
RUNTIME class attribute 'runtime'
PROVIDER_TARGET class attribute 'provider_target'
DURABLE_SYSTEM_PROJECTION class attribute 'durable_system_projection'
DIRECT_TOOLS class attribute 'direct_tools'
TOOL_IMPLEMENTATIONS class attribute 'tool_implementations'
TOOL_VIEW_GRANTS class attribute 'tool_view_grants'
EXECUTION_POLICIES class attribute 'execution_policies'
INVOCATION_POLICIES class attribute 'invocation_policies'
RUNTIME_HOOKS class attribute 'runtime_hooks'
EXECUTION_ENVIRONMENT class attribute 'execution_environment'
EFFECT_AUTHORITY class attribute 'effect_authority'
EGRESS_AUTHORITY class attribute 'egress_authority'
CONTEXT_SELECTION class attribute 'context_selection'
AUTOMATIC_RECALL class attribute 'automatic_recall'
CONTEXT_COMPACTION class attribute 'context_compaction'
LIVE_STATE_PROJECTION class attribute 'live_state_projection'
PROVIDER_ADAPTER class attribute 'provider_adapter'
PROVIDER_REQUEST_POLICY class attribute 'provider_request_policy'
APPLICATION_BUDGET_POLICY class attribute 'application_budget_policy'
INVOCATION_BUDGET_POLICY class attribute 'invocation_budget_policy'
STRUCTURED_OUTPUT class attribute 'structured_output'
FINALIZATION class attribute 'finalization'

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfileComponentIdentity

Redacted identity for one typed execution-profile component.

Bases: BaseModel.

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
component_class ExecutionProfileComponentClass required
strength ExecutionProfileIdentityStrength required
availability ExecutionProfileIdentityAvailability required
fingerprint str | None required
ExecutionProfileComponentIdentity.validate_fingerprint(value: str | None) -> str | None
ExecutionProfileComponentIdentity.validate_availability() -> ExecutionProfileComponentIdentity

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfileDecision

Complete runtime-owned decision committed at profile admission.

Bases: BaseModel.

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
kind ExecutionProfileDecisionKind required
expected_profile ExecutionProfileIdentity required
candidate_profile ExecutionProfileIdentity required
changed_component_classes tuple[ExecutionProfileComponentClass, ...] required
policy_identity str Field(max_length=EXECUTION_PROFILE_ADOPTION_ID_MAX_CHARS)
policy_reason str Field(max_length=EXECUTION_PROFILE_ADOPTION_TEXT_MAX_CHARS)
authority_decision ExecutionProfileAuthorityDecision required
egress_authority_change EgressAuthorityChangeKind | None None
idempotency_identity str Field(max_length=EXECUTION_PROFILE_ADOPTION_ID_MAX_CHARS)
adoption_request_fingerprint str | None None
actor ResolutionActor | None None
reason str Field(max_length=EXECUTION_PROFILE_ADOPTION_TEXT_MAX_CHARS)
event Event required
ExecutionProfileDecision.validate_identity_text(value: str, info) -> str

validate_adoption_request_fingerprint (method)

Section titled “validate_adoption_request_fingerprint (method)”
ExecutionProfileDecision.validate_adoption_request_fingerprint(value: str | None) -> str | None
ExecutionProfileDecision.validate_reason_text(value: str, info) -> str
ExecutionProfileDecision.copy_decision_profile(value: object) -> ExecutionProfileIdentity
ExecutionProfileDecision.copy_actor(value: ResolutionActor | None) -> ResolutionActor | None
ExecutionProfileDecision.copy_decision_event(value: object) -> Event
ExecutionProfileDecision.validate_decision() -> ExecutionProfileDecision

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfileDecisionKind

Typed outcome of one execution-profile admission decision.

Bases: StrEnum.

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
EXACT_REUSE class attribute 'exact_reuse'
COMPATIBLE_REUSE class attribute 'compatible_reuse'
ADOPTED class attribute 'adopted'
MIGRATION_REQUIRED class attribute 'migration_required'
REJECTED class attribute 'rejected'

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfileIdentity

Versioned, redacted identity frozen before a session can execute.

Bases: BaseModel.

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, 2, 4, 5, 6, 7] EXECUTION_PROFILE_SCHEMA_VERSION
fingerprint str required
components tuple[ExecutionProfileComponentIdentity, ...] required
model_failover ModelFailoverProfileBinding | None Field(default=None, exclude_if=lambda value: value is None)
egress_authority EgressAuthorityIdentity | None None
runtime_build_provenance RuntimeBuildProvenance Field(default_factory=legacy_runtime_build_provenance)
ExecutionProfileIdentity.copy_model_failover(value: object) -> ModelFailoverProfileBinding | None
ExecutionProfileIdentity.copy_runtime_build_provenance(value: object) -> RuntimeBuildProvenance
ExecutionProfileIdentity.copy_egress_authority(value: object) -> EgressAuthorityIdentity | None
ExecutionProfileIdentity.validate_fingerprint(value: str) -> str
ExecutionProfileIdentity.validate_components() -> ExecutionProfileIdentity
ExecutionProfileIdentity.component(component_class: ExecutionProfileComponentClass) -> ExecutionProfileComponentIdentity

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfileIdentityAvailability

Whether a component can be compared at the admission boundary.

Bases: StrEnum.

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
AVAILABLE class attribute 'available'
UNAVAILABLE class attribute 'unavailable'

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfileIdentityStrength

How strongly one component is identified.

Bases: StrEnum.

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
APPLICATION_VERSIONED class attribute 'application_versioned'
STRUCTURAL class attribute 'structural'
PROCESS_LOCAL class attribute 'process_local'
UNAVAILABLE class attribute 'unavailable'

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfilePolicyAction

Application decision for one non-equal execution profile.

Bases: StrEnum.

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
COMPATIBLE_REUSE class attribute 'compatible_reuse'
ADOPT class attribute 'adopt'
MIGRATION_REQUIRED class attribute 'migration_required'
REJECT class attribute 'reject'

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfilePolicyRequest

Bounded application-policy input for one profile difference.

Bases: BaseModel.

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
session_id str required
expected_profile ExecutionProfileIdentity required
candidate_profile ExecutionProfileIdentity required
changed_component_classes tuple[ExecutionProfileComponentClass, ...] required
intent ExecutionProfileAdoptionIntent | None None
authority_review_required StrictBool False
egress_authority_change EgressAuthorityChangeKind | None None
source_provider_name str required
source_model str required
target_provider_name str required
target_model str required
ExecutionProfilePolicyRequest.validate_identity_text(value: str, info) -> str
ExecutionProfilePolicyRequest.copy_profile(value: object) -> ExecutionProfileIdentity
ExecutionProfilePolicyRequest.copy_intent(value: object) -> ExecutionProfileAdoptionIntent | None
ExecutionProfilePolicyRequest.validate_changed_components() -> ExecutionProfilePolicyRequest

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfilePolicyResult

Defensively copied result returned by an application policy.

Bases: BaseModel.

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
action ExecutionProfilePolicyAction required
reason str Field(max_length=EXECUTION_PROFILE_ADOPTION_TEXT_MAX_CHARS)
authority_decision ExecutionProfileAuthorityDecision ExecutionProfileAuthorityDecision.NOT_REQUIRED
ExecutionProfilePolicyResult.validate_reason(value: str) -> str

Release source · Runtime guarantees · Capability guides

from cayu import ExecutionProfileRejectionResult

Durable rejection event plus whether an exact prior write was replayed.

Bases: BaseModel.

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
event Event required
replayed StrictBool False
ExecutionProfileRejectionResult.copy_rejection_event(value: Event) -> Event

Release source · Runtime guarantees · Capability guides