Agentic.Protocol.ACP.Permission
(agentic v0.2.2)
Copy Markdown
Bridges ACP permission requests to Agentic tool permission system.
When an ACP agent sends a session/request_permission request, this module
translates between ACP's permission option model and Agentic's tool_permissions
map.
Permission Policies
:ask-- Delegate to the host application via callback:allow_all-- Always approve (auto-approve all tool calls):deny_all-- Always reject
Summary
Functions
Build an allow-once outcome.
Build a deny-once outcome.
Delegate permission decision to a callback.
Handle an incoming permission request from the agent.
Functions
@spec auto_allow([Agentic.Protocol.ACP.Types.permission_option()] | nil, String.t()) :: map()
Build an allow-once outcome.
@spec auto_deny([Agentic.Protocol.ACP.Types.permission_option()] | nil, String.t()) :: map()
Build a deny-once outcome.
@spec delegate_to_callback( [Agentic.Protocol.ACP.Types.permission_option()] | nil, String.t(), map() | nil ) :: map()
Delegate permission decision to a callback.
@spec handle_request( map(), Agentic.Protocol.ACP.Types.permission_option() | nil, atom(), map() | nil ) :: map()
Handle an incoming permission request from the agent.
Returns the ACP response map to send back to the agent.