Module adcp.types.domains.governance.accepted_governance_agents
Classes
class AcceptedGovernanceAgents (**data: Any)-
Expand source code
class AcceptedGovernanceAgents(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) any_of: Annotated[list[AnyOf], Field(min_length=1)]Base model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.Important
The env var is resolved once at module import time. Set it in your shell or CI environment before
import adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport has no effect on already-imported model classes (they captured the policy at class-body evaluation).Consumers who want per-model strict validation can override
model_configon their subclass.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var any_of : list[AnyOf]var model_config
Inherited members
class AnyOf (root: RootModelRootType = PydanticUndefined, **data)-
Expand source code
class AnyOf(AdCPRootModel[AnyOf1 | AnyOf2]): root: Annotated[AnyOf1 | AnyOf2, Field(discriminator='kind')] def __getattr__(self, name: str) -> Any: """Proxy attribute access to the wrapped type.""" if name.startswith('_'): raise AttributeError(name) return getattr(self.root, name)RootModelunder the SDK's deferred-build policy.class X(RootModel[A | B])parametrizes a concrete class at theRootModel[…]expression, and that class carries pydantic's default config: its validator for the whole union is built right there, beforeXand any configXdeclares exist. For a composing root such asadagents.AdcpAgentsAuthorizationthat walked most of its domain into pydantic-core at import (#1694). Parametrizing this class instead inheritsdefer_build=TrueintoAdCPRootModel[A | B]and intoX, so the build waits for first use like every other generated model's.scripts/post_generate_fixes.defer_rootmodel_buildspoints every generated composing root here; a value root is a scalar subclass instead (adcp.types._scalar).Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPRootModel[Union[AnyOf1, AnyOf2]]
- AdCPRootModel
- pydantic.root_model.RootModel[~_RootT]
- pydantic.root_model.RootModel
- pydantic.main.BaseModel
- typing.Generic
Class variables
var model_configvar root : AnyOf1 | AnyOf2
class AnyOf1 (**data: Any)-
Expand source code
class AnyOf1(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) kind: Literal['agent_url'] = 'agent_url' agent_url: Annotated[ WireAnyUrl, Field( description='Exact canonical agent endpoint without userinfo, query, or fragment. Redirect targets, DNS aliases, and URLs asserted by the candidate do not satisfy this matcher.' ), ]Base model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.Important
The env var is resolved once at module import time. Set it in your shell or CI environment before
import adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport has no effect on already-imported model classes (they captured the policy at class-body evaluation).Consumers who want per-model strict validation can override
model_configon their subclass.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var agent_url : adcp.types._wire.WireAnyUrlvar kind : Literal['agent_url']var model_config
Inherited members
class AnyOf2 (**data: Any)-
Expand source code
class AnyOf2(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) kind: Literal['verification'] = 'verification' registry: Annotated[ WireAnyUrl, Field( description='Seller-configured trusted verification registry without userinfo, query, or fragment. The candidate cannot supply or override this URL; fetches use the registry-resolution security contract.' ), ] role: Annotated[ str, Field( description="Role asserted by the trusted registry's verified record, never by candidate self-description.", pattern='^[a-z][a-z0-9_-]*$', ), ] adcp_version: Annotated[ str, Field( description='Registry protocol version in canonical MAJOR.MINOR form.', pattern='^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$', ), ] verification_modes: Annotated[list[VerificationMode], Field(min_length=1)] max_age_seconds: Annotated[ SchemaInt, Field( description='Maximum age of the registry evidence at binding time. Zero requires a fresh result. Evidence is pinned to the accepted binding; later registry drift does not silently revoke an existing binding.', ge=0, ), ]Base model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.Important
The env var is resolved once at module import time. Set it in your shell or CI environment before
import adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport has no effect on already-imported model classes (they captured the policy at class-body evaluation).Consumers who want per-model strict validation can override
model_configon their subclass.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var adcp_version : strvar kind : Literal['verification']var max_age_seconds : intvar model_configvar registry : adcp.types._wire.WireAnyUrlvar role : strvar verification_modes : list[VerificationMode]
Inherited members
class VerificationMode (*args, **kwds)-
Expand source code
class VerificationMode(StrEnum): spec = 'spec' live = 'live'Enum where members are also (and must be) strings
Ancestors
- enum.StrEnum
- builtins.str
- enum.ReprEnum
- enum.Enum
Class variables
var livevar spec