DocsCommontoolsToolApproval
Package: @hexos/common

Represents a pending tool approval request waiting for user decision.

Created when a tool with requiresApproval is invoked. The runtime holds execution until an ApprovalDecision is submitted. Includes the tool name, arguments, and the agent that requested execution.

Related: ApprovalDecision resolves the request, ToolDefinition.requiresApproval triggers this flow, useToolApproval manages the frontend UI.

interface ToolApproval {
    toolCallId: string;
    toolName: string;
    args: unknown;
    agentId: string;
    timestamp: Date;
}

toolCallId

string

toolName

string

args

unknown

agentId

string

timestamp

Date