Skip to content

API Reference parrot.auth.approval_token

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.auth.approval_token

View source

Approval token of the host write confirmation (FEAT-622 M8) — split out of confirmation.py.

ToolManager binds the token after a confirmed guard decision; AbstractTool consumes it exactly once. parrot.auth.confirmation re-exports every public name, so import paths are unchanged.

Function consume_confirmed_call

True once when the bound token names exactly tool + parameters; the token is spent (single use).

consume_confirmed_call(tool: Any, parameters: dict) -> bool

Parameter Type Default Description
tool Any
parameters dict

Returns: bool

Function current_confirmed_call

(id(tool), args_hash) of the call ToolManager approved, or None (FEAT-622 M8).

current_confirmed_call() -> Optional[tuple[int, str]]

Returns: Optional[tuple[int, str]]

Function is_enforced_write_class

Whether instances of cls are host write tools whose execution needs an enforced confirmation.

A standalone host AbstractTool whose access is "write" or undeclared (None is treated as write, like host toolkit methods); decided from the class, without instantiating it (FEAT-622 M8).

is_enforced_write_class(cls: type) -> bool

Returns: bool

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally