NAME

Claude::Agent::Hook::Result - Hook result factory for Claude Agent SDK

SYNOPSIS

use Claude::Agent::Hook::Result;

# In a hook callback:
return Claude::Agent::Hook::Result->proceed();

return Claude::Agent::Hook::Result->allow(
    updated_input => { command => 'safe command' },
    reason => 'Modified for safety',
);

return Claude::Agent::Hook::Result->deny(
    reason => 'Operation not permitted',
);

DESCRIPTION

Factory methods for creating hook results.

METHODS

proceed

my $result = Claude::Agent::Hook::Result->proceed();

Continue (proceed) without modification.

allow

my $result = Claude::Agent::Hook::Result->allow(
    updated_input => \%new_input,
    reason => 'reason string',
);

Allow the operation, optionally with modified input.

deny

my $result = Claude::Agent::Hook::Result->deny(
    reason => 'reason string',
);

Deny the operation.

AUTHOR

LNATION, <email at lnation.org>

LICENSE

This software is Copyright (c) 2026 by LNATION.

This is free software, licensed under The Artistic License 2.0 (GPL Compatible).