File Check Hook • AI Agent SDK
FileCheckHook: Declarative file-assertion verification hook (no shell involved).
FileCheckHook
Defined in the verification module.
AI Agent
Declarative file-assertion verification hook (no shell involved).
Checks portable filesystem facts: – `exists : the file exists (default True). - non_empty : the file has non-zero size. - contains : the file text contains a substring. - json_field/equals` : the JSON value at a dotted path equals a value.
Constructor
ParamField
strNo description available.
ParamField
strNo description available.
ParamField
boolNo description available.
ParamField
boolNo description available.
ParamField
Optional[str]No description available.
ParamField
Optional[str]No description available.
ParamField
AnyNo description available.
ParamField
boolNo description available.
Usage
hook = FileCheckHook(name="changelog", path="CHANGELOG.md", non_empty=True)
hook = FileCheckHook(name="cfg", path="out.json",
json_field="status.code", equals=0)Source
View on GitHubpraisonaiagents/hooks/verification.py at line 275