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(RootModel[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)Usage Documentation
A Pydantic
BaseModelfor the root object of the model.- Attributes
- -----=
root- The root object of the model.
__pydantic_root_model__- Whether the model is a RootModel.
__pydantic_private__- Private fields in the model.
__pydantic_extra__- Extra fields in the model.
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
- pydantic.root_model.RootModel[Union[AnyOf1, AnyOf2]]
- 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[ AnyUrl, 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 : pydantic.networks.AnyUrlvar 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[ AnyUrl, 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 : pydantic.networks.AnyUrlvar 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