+
    }i                    ,  a  0 t $ R t^ RIHt ^ RIHtHtHtHt ^ RI	H
t
HtHt ^ RIHtHt ^ RIHt RtRtR]R&    ! R R]4      t]R,          tR]R&    ! R R]4      t ! R R]4      t ! R R]]4      t ! R R	]]4      tRtR]R&    ! R R
]]4      tR# )z!!! abstract "Usage Documentation"
    [Build a Plugin](../concepts/plugins.md#build-a-plugin)

Plugin interface for Pydantic plugins, and related types.
)annotations)AnyCallableLiteral
NamedTuple)
CoreConfig
CoreSchemaValidationError)Protocol	TypeAlias)ExtraValuesPydanticPluginProtocolBaseValidateHandlerProtocolValidatePythonHandlerProtocolValidateJsonHandlerProtocolValidateStringsHandlerProtocolNewSchemaReturnsSchemaTypePath
SchemaKindvtuple[ValidatePythonHandlerProtocol | None, ValidateJsonHandlerProtocol | None, ValidateStringsHandlerProtocol | None]r   c                  0    ] tR t^t$ RtR]R&   R]R&   RtR# )r   zQPath defining where `schema_type` was defined, or where `TypeAdapter` was called.strmodulename N)__name__
__module____qualname____firstlineno____doc____annotations____static_attributes__r       j/Users/ahmad/.openclaw/workspace/my-crawler/.venv/lib/python3.14/site-packages/pydantic/plugin/__init__.pyr   r      s    [K
Ir"   c                  &    ] tR t^(tRtR R ltRtR# )r   z5Protocol defining the interface for Pydantic plugins.c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )   schemar   schema_typer   schema_type_pathr   schema_kindr   configzCoreConfig | Noneplugin_settingszdict[str, object]returnr   r   )formats   "r#   __annotate__#PydanticPluginProtocol.__annotate__+   sY     _ __ _ )	_
  _ "_ +_
_r"   c                    \        R4      h)a  This method is called for each plugin every time a new [`SchemaValidator`][pydantic_core.SchemaValidator]
is created.

It should return an event handler for each of the three validation methods, or `None` if the plugin does not
implement that method.

Args:
    schema: The schema to validate against.
    schema_type: The original type which the schema was created from, e.g. the model class.
    schema_type_path: Path defining where `schema_type` was defined, or where `TypeAdapter` was called.
    schema_kind: The kind of schema to validate against.
    config: The config to use for validation.
    plugin_settings: Any plugin settings.

Returns:
    A tuple of optional event handlers for each of the three validation methods -
        `validate_python`, `validate_json`, `validate_strings`.
z9Pydantic plugins should implement `new_schema_validator`.)NotImplementedError)selfr'   r(   r)   r*   r+   r,   s   &&&&&&&r#   new_schema_validator+PydanticPluginProtocol.new_schema_validator+   s    : ""]^^r"   r   N)r   r   r   r   r   r4   r!   r   r"   r#   r   r   (   s    ?_ _r"   c                  L    ] tR t^Kt$ RtR]R&    R R ltR R ltR R	 ltR
t	R# )r   zBase class for plugin callbacks protocols.

You shouldn't implement this protocol directly, instead use one of the subclasses with adds the correctly
typed `on_error` method.
zCallable[..., None]on_enterc                    V ^8  d   QhRRRR/# )r&   resultr   r-   Noner   )r.   s   "r#   r/   (BaseValidateHandlerProtocol.__annotate__U   s        r"   c                    R# )zcCallback to be notified of successful validation.

Args:
    result: The result of the validation.
Nr   )r3   r9   s   &&r#   
on_success&BaseValidateHandlerProtocol.on_successU        	r"   c                    V ^8  d   QhRRRR/# )r&   errorr	   r-   r:   r   )r.   s   "r#   r/   r;   ]   s      o $ r"   c                    R# )zVCallback to be notified of validation errors.

Args:
    error: The validation error.
Nr   )r3   rA   s   &&r#   on_error$BaseValidateHandlerProtocol.on_error]   r?   r"   c                    V ^8  d   QhRRRR/# )r&   	exception	Exceptionr-   r:   r   )r.   s   "r#   r/   r;   e   s      i D r"   c                    R# )zpCallback to be notified of validation exceptions.

Args:
    exception: The exception raised during validation.
Nr   )r3   rF   s   &&r#   on_exception(BaseValidateHandlerProtocol.on_exceptione   r?   r"   r   N)
r   r   r   r   r   r    r=   rC   rI   r!   r   r"   r#   r   r   K   s&     "!E r"   c                  F    ] tR t^ntRtRRRRRRRRRRRRR	R/R
 R lltRtR# )r   z4Event handler for `SchemaValidator.validate_python`.strictNextrafrom_attributescontextself_instanceby_aliasby_namec               <    V ^8  d   QhRRRRRRRRRR	R
R	RRRRRR/	# )r&   inputr   rL   bool | NonerM   ExtraValues | NonerN   rO   
Any | NonerP   rQ   rR   r-   r:   r   )r.   s   "r#   r/   *ValidatePythonHandlerProtocol.__annotate__q   sd       	
 " %  "   
r"   c                   R# )a  Callback to be notified of validation start, and create an instance of the event handler.

Args:
    input: The input to be validated.
    strict: Whether to validate the object in strict mode.
    extra: Whether to ignore, allow, or forbid extra data during model validation.
    from_attributes: Whether to validate objects as inputs by extracting attributes.
    context: The context to use for validation, this is passed to functional validators.
    self_instance: An instance of a model to set attributes on from validation, this is used when running
        validation from the `__init__` method of a model.
    by_alias: Whether to use the field's alias to match the input data to an attribute.
    by_name: Whether to use the field's name to match the input data to an attribute.
Nr   )	r3   rT   rL   rM   rN   rO   rP   rQ   rR   s	   &&$$$$$$$r#   r7   &ValidatePythonHandlerProtocol.on_enterq       r"   r   r   r   r   r   r   r7   r!   r   r"   r#   r   r   n   sU    > #	
 %) (, # %) !%  $ r"   c                  B    ] tR t^tRtRRRRRRRRRRRR/R	 R
 lltRtR# )r   z2Event handler for `SchemaValidator.validate_json`.rL   NrM   rO   rP   rQ   rR   c               8    V ^8  d   QhRRRRRRRRR	RR
RRRRR/# )r&   rT   zstr | bytes | bytearrayrL   rU   rM   rV   rO   rW   rP   rQ   rR   r-   r:   r   )r.   s   "r#   r/   (ValidateJsonHandlerProtocol.__annotate__   sZ      & 	
 "  "   
r"   c                   R# )a  Callback to be notified of validation start, and create an instance of the event handler.

Args:
    input: The JSON data to be validated.
    strict: Whether to validate the object in strict mode.
    extra: Whether to ignore, allow, or forbid extra data during model validation.
    context: The context to use for validation, this is passed to functional validators.
    self_instance: An instance of a model to set attributes on from validation, this is used when running
        validation from the `__init__` method of a model.
    by_alias: Whether to use the field's alias to match the input data to an attribute.
    by_name: Whether to use the field's name to match the input data to an attribute.
Nr   )r3   rT   rL   rM   rO   rP   rQ   rR   s   &&$$$$$$r#   r7   $ValidateJsonHandlerProtocol.on_enter   r[   r"   r   r\   r   r"   r#   r   r      sK    < #	
 %) # %) !%  $ r"   zdict[str, StringInput]StringInputc            
      >    ] tR t^tRtRRRRRRRRRR/R R	 lltR
tR# )r   z5Event handler for `SchemaValidator.validate_strings`.rL   NrM   rO   rQ   rR   c               4    V ^8  d   QhRRRRRRRRR	RR
RRR/# )r&   rT   rb   rL   rU   rM   rV   rO   rW   rQ   rR   r-   r:   r   )r.   s   "r#   r/   +ValidateStringsHandlerProtocol.__annotate__   sP       	
 "    
r"   c                   R# )a"  Callback to be notified of validation start, and create an instance of the event handler.

Args:
    input: The string data to be validated.
    strict: Whether to validate the object in strict mode.
    extra: Whether to ignore, allow, or forbid extra data during model validation.
    context: The context to use for validation, this is passed to functional validators.
    by_alias: Whether to use the field's alias to match the input data to an attribute.
    by_name: Whether to use the field's name to match the input data to an attribute.
Nr   )r3   rT   rL   rM   rO   rQ   rR   s   &&$$$$$r#   r7   'ValidateStringsHandlerProtocol.on_enter   r[   r"   r   r\   r   r"   r#   r   r      sA    ? #	
 %) # !%  $ r"   N)r   r   r   r   r   r   r   r   )	BaseModelTypeAdapter	dataclasscreate_modelvalidate_call)__conditional_annotations__r   
__future__r   typingr   r   r   r   pydantic_corer   r   r	   typing_extensionsr
   r   pydantic.configr   __all__r   r    r   r   r   r   r   r   rb   r   )rm   s   @r#   <module>rt      s    # 5 5 A A 1 '	 W )  WZ    hi
I i _X  _F (  F$? <"=x 8 2Y 1%@( r"   