Skip to main content

VerificationHook

Defined in the verification module.
Protocol for verification hooks. Verification hooks are used by Agent autonomy to validate actions. They run after file writes or at configured checkpoints. Implementations must provide:
  • name: Unique identifier for the hook
  • run(): Execute verification and return result

Properties

name
str
No description available.

Methods

Usage

class LintRunner:
        name = "ruff"
        
        def run(self, context=None):
            import subprocess
            result = subprocess.run(["ruff", "check", "."], capture_output=True)
            return VerificationResult(
                success=result.returncode == 0,
                output=result.stdout.decode()
            )