cayu.tools.discovery
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.
TOOL_DISCOVERY_INSPECTION_MAX_GRANTS
Section titled “TOOL_DISCOVERY_INSPECTION_MAX_GRANTS”from cayu.tools import TOOL_DISCOVERY_INSPECTION_MAX_GRANTSTOOL_DISCOVERY_INSPECTION_MAX_GRANTS = TOOL_DISCOVERY_MAX_GRANTSRelease source · Runtime guarantees · Capability guides
ToolDiscoveryGrantInspection
Section titled “ToolDiscoveryGrantInspection”from cayu.tools import ToolDiscoveryGrantInspectionContent-minimized discovery grant state safe for control-plane reads.
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] |
TOOL_DISCOVERY_SCHEMA_VERSION |
tool_id |
str |
required |
tool_name |
str |
required |
descriptor_version |
str |
required |
schema_fingerprint |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
created_at |
datetime |
required |
discovered_revision |
StrictInt |
Field(ge=1, le=TOOL_DISCOVERY_MAX_GRANTS) |
validate_schema_version (method)
Section titled “validate_schema_version (method)”ToolDiscoveryGrantInspection.validate_schema_version(value: object) -> objectvalidate_tool_id (method)
Section titled “validate_tool_id (method)”ToolDiscoveryGrantInspection.validate_tool_id(value: str) -> strvalidate_tool_name (method)
Section titled “validate_tool_name (method)”ToolDiscoveryGrantInspection.validate_tool_name(value: str) -> strvalidate_descriptor_version (method)
Section titled “validate_descriptor_version (method)”ToolDiscoveryGrantInspection.validate_descriptor_version(value: str) -> strnormalize_created_at (method)
Section titled “normalize_created_at (method)”ToolDiscoveryGrantInspection.normalize_created_at(value: datetime) -> datetimeRelease source · Runtime guarantees · Capability guides
ToolDiscoveryGrantRecord
Section titled “ToolDiscoveryGrantRecord”from cayu.tools import ToolDiscoveryGrantRecordOne persistent, branch-local addressability grant created by search.
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] |
TOOL_DISCOVERY_SCHEMA_VERSION |
grant_id |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
tool_ref |
str |
Field(pattern=TOOL_DISCOVERY_REFERENCE_PATTERN) |
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) |
origin_query_sha256 |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
origin_model_step_id |
str |
required |
created_at |
datetime |
required |
discovered_revision |
StrictInt |
Field(ge=1, le=TOOL_DISCOVERY_MAX_GRANTS) |
validate_schema_version (method)
Section titled “validate_schema_version (method)”ToolDiscoveryGrantRecord.validate_schema_version(value: object) -> objectvalidate_tool_ref (method)
Section titled “validate_tool_ref (method)”ToolDiscoveryGrantRecord.validate_tool_ref(value: str) -> strvalidate_bounded_text (method)
Section titled “validate_bounded_text (method)”ToolDiscoveryGrantRecord.validate_bounded_text(value: str, info) -> strvalidate_tool_id (method)
Section titled “validate_tool_id (method)”ToolDiscoveryGrantRecord.validate_tool_id(value: str) -> strvalidate_catalogue_revision (method)
Section titled “validate_catalogue_revision (method)”ToolDiscoveryGrantRecord.validate_catalogue_revision(value: str) -> strvalidate_descriptor_version (method)
Section titled “validate_descriptor_version (method)”ToolDiscoveryGrantRecord.validate_descriptor_version(value: str) -> strnormalize_created_at (method)
Section titled “normalize_created_at (method)”ToolDiscoveryGrantRecord.normalize_created_at(value: datetime) -> datetimeRelease source · Runtime guarantees · Capability guides
ToolDiscoveryMode
Section titled “ToolDiscoveryMode”from cayu.tools import ToolDiscoveryModeApplication-selected tool-discovery delivery policy.
Bases: 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 |
|---|---|---|
SEARCH_TOOLS |
class attribute |
SEARCH_TOOLS_NAME |
OPENAI_TOOL_SEARCH_CLIENT |
class attribute |
'openai_tool_search_client' |
OPENAI_TOOL_SEARCH_CLIENT_OR_SEARCH_TOOLS |
class attribute |
'openai_tool_search_client_or_search_tools' |
OPENAI_TOOL_SEARCH_HOSTED |
class attribute |
'openai_tool_search_hosted' |
OPENAI_TOOL_SEARCH_HOSTED_OR_SEARCH_TOOLS |
class attribute |
'openai_tool_search_hosted_or_search_tools' |
Release source · Runtime guarantees · Capability guides
ToolDiscoveryProjectionKind
Section titled “ToolDiscoveryProjectionKind”from cayu.tools import ToolDiscoveryProjectionKindOne concrete provider projection selected for an invocation.
Bases: 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 |
|---|---|---|
SEARCH_TOOLS |
class attribute |
SEARCH_TOOLS_NAME |
OPENAI_TOOL_SEARCH_CLIENT |
class attribute |
'openai_tool_search_client' |
OPENAI_TOOL_SEARCH_HOSTED |
class attribute |
'openai_tool_search_hosted' |
Release source · Runtime guarantees · Capability guides
ToolDiscoverySearchMatch
Section titled “ToolDiscoverySearchMatch”from cayu.tools import ToolDiscoverySearchMatchBounded model-facing descriptor returned by search_tools.
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 |
Field(pattern=TOOL_DISCOVERY_REFERENCE_PATTERN) |
tool_id |
str |
required |
name |
str |
required |
description |
str |
required |
input_schema |
Mapping[str, Any] |
required |
descriptor_version |
str |
required |
schema_fingerprint |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
readiness |
Literal['registered'] |
'registered' |
validate_tool_ref (method)
Section titled “validate_tool_ref (method)”ToolDiscoverySearchMatch.validate_tool_ref(value: str) -> strvalidate_tool_id (method)
Section titled “validate_tool_id (method)”ToolDiscoverySearchMatch.validate_tool_id(value: str) -> strvalidate_name (method)
Section titled “validate_name (method)”ToolDiscoverySearchMatch.validate_name(value: str) -> strvalidate_description (method)
Section titled “validate_description (method)”ToolDiscoverySearchMatch.validate_description(value: str) -> strcopy_schema (method)
Section titled “copy_schema (method)”ToolDiscoverySearchMatch.copy_schema(value: object) -> dict[str, Any]freeze_schema (method)
Section titled “freeze_schema (method)”ToolDiscoverySearchMatch.freeze_schema(value: Mapping[str, Any]) -> Mapping[str, Any]serialize_schema (method)
Section titled “serialize_schema (method)”ToolDiscoverySearchMatch.serialize_schema(value: Mapping[str, Any]) -> dict[str, Any]validate_descriptor_version (method)
Section titled “validate_descriptor_version (method)”ToolDiscoverySearchMatch.validate_descriptor_version(value: str) -> strvalidate_schema_fingerprint (method)
Section titled “validate_schema_fingerprint (method)”ToolDiscoverySearchMatch.validate_schema_fingerprint() -> ToolDiscoverySearchMatchRelease source · Runtime guarantees · Capability guides
ToolDiscoverySearchResult
Section titled “ToolDiscoverySearchResult”from cayu.tools import ToolDiscoverySearchResultDeterministic result and durable view revision from one catalogue search.
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] |
TOOL_DISCOVERY_SCHEMA_VERSION |
query |
str |
required |
matches |
tuple[ToolDiscoverySearchMatch, ...] |
required |
view_revision |
StrictInt |
Field(ge=0) |
truncated |
StrictBool |
False |
validate_schema_version (method)
Section titled “validate_schema_version (method)”ToolDiscoverySearchResult.validate_schema_version(value: object) -> objectvalidate_query (method)
Section titled “validate_query (method)”ToolDiscoverySearchResult.validate_query(value: str) -> strbound_matches (method)
Section titled “bound_matches (method)”ToolDiscoverySearchResult.bound_matches(value: object) -> objectbound_serialized_result (method)
Section titled “bound_serialized_result (method)”ToolDiscoverySearchResult.bound_serialized_result() -> ToolDiscoverySearchResultRelease source · Runtime guarantees · Capability guides
ToolDiscoveryViewInconsistentError
Section titled “ToolDiscoveryViewInconsistentError”from cayu.tools import ToolDiscoveryViewInconsistentErrorRaised when durable view state conflicts with current session authority.
Bases: RuntimeError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
ToolDiscoveryViewInitialization
Section titled “ToolDiscoveryViewInitialization”from cayu.tools import ToolDiscoveryViewInitializationTyped authority needed to initialize one session-local discovery view.
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 |
|---|---|---|
session_id |
str |
required |
agent_name |
str |
required |
catalogue_revision |
str |
required |
ceiling_fingerprint |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
validate_required_text (method)
Section titled “validate_required_text (method)”ToolDiscoveryViewInitialization.validate_required_text(value: str, info) -> strvalidate_catalogue_revision (method)
Section titled “validate_catalogue_revision (method)”ToolDiscoveryViewInitialization.validate_catalogue_revision(value: str) -> strRelease source · Runtime guarantees · Capability guides
ToolDiscoveryViewInspection
Section titled “ToolDiscoveryViewInspection”from cayu.tools import ToolDiscoveryViewInspectionBounded current-view projection without schemas or callable references.
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] |
TOOL_DISCOVERY_SCHEMA_VERSION |
session_id |
str |
required |
generation_id |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
agent_name |
str |
required |
catalogue_revision |
str |
required |
ceiling_fingerprint |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
revision |
StrictInt |
Field(ge=0, le=TOOL_DISCOVERY_MAX_GRANTS) |
grant_count |
StrictInt |
Field(ge=0, le=TOOL_DISCOVERY_MAX_GRANTS) |
grants |
tuple[ToolDiscoveryGrantInspection, ...] |
() |
grants_truncated |
StrictBool |
required |
validate_schema_version (method)
Section titled “validate_schema_version (method)”ToolDiscoveryViewInspection.validate_schema_version(value: object) -> objectvalidate_required_text (method)
Section titled “validate_required_text (method)”ToolDiscoveryViewInspection.validate_required_text(value: str, info) -> strvalidate_catalogue_revision (method)
Section titled “validate_catalogue_revision (method)”ToolDiscoveryViewInspection.validate_catalogue_revision(value: str) -> strbound_grants (method)
Section titled “bound_grants (method)”ToolDiscoveryViewInspection.bound_grants(value: object) -> objectvalidate_projection (method)
Section titled “validate_projection (method)”ToolDiscoveryViewInspection.validate_projection() -> ToolDiscoveryViewInspectionRelease source · Runtime guarantees · Capability guides
ToolDiscoveryViewNotEnabledError
Section titled “ToolDiscoveryViewNotEnabledError”from cayu.tools import ToolDiscoveryViewNotEnabledErrorRaised when a session has no configured discovery view.
Bases: RuntimeError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
ToolDiscoveryViewState
Section titled “ToolDiscoveryViewState”from cayu.tools import ToolDiscoveryViewStateVersioned durable tool view for one session branch.
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] |
TOOL_DISCOVERY_SCHEMA_VERSION |
session_id |
str |
required |
generation_id |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
agent_name |
str |
required |
catalogue_revision |
str |
required |
ceiling_fingerprint |
str |
Field(pattern=TARGETED_TOOL_DIGEST_PATTERN) |
revision |
StrictInt |
Field(ge=0, le=TOOL_DISCOVERY_MAX_GRANTS) |
grants |
tuple[ToolDiscoveryGrantRecord, ...] |
() |
validate_schema_version (method)
Section titled “validate_schema_version (method)”ToolDiscoveryViewState.validate_schema_version(value: object) -> objectvalidate_required_text (method)
Section titled “validate_required_text (method)”ToolDiscoveryViewState.validate_required_text(value: str, info) -> strvalidate_catalogue_revision (method)
Section titled “validate_catalogue_revision (method)”ToolDiscoveryViewState.validate_catalogue_revision(value: str) -> strbound_grants (method)
Section titled “bound_grants (method)”ToolDiscoveryViewState.bound_grants(value: object) -> objectvalidate_grants (method)
Section titled “validate_grants (method)”ToolDiscoveryViewState.validate_grants() -> ToolDiscoveryViewStaterecord_for_reference (method)
Section titled “record_for_reference (method)”ToolDiscoveryViewState.record_for_reference(tool_ref: str) -> ToolDiscoveryGrantRecord | NoneResolve an exact opaque reference inside this view.