/** Build the in-thread `ApprovalRequest` from the `data-vendo-approval` wire part. * * The descriptor must travel with the approval: without the declared * `inputSchema`, `declaredMoneyUnit` has nothing to read and a $47.50 transfer * renders as "4750 (unit not specified)" in the thread while the same ask * formats correctly in the queue. */ import type { ApprovalRequest, JsonSchema, RiskLabel } from "../../../core/index.js"; /** Only the field this builder reads off the host's `tools` map (a `ToolMetaMap` at every call site). Structural, so this builder does not depend on the wider `ToolMeta` shape. */ type ToolDescriptions = Record; export interface ApprovalWirePart { /** `part.approval.id` — the guard record this card decides. */ approvalId: string; /** `part.toolCallId`. */ toolCallId: string; /** The raw wire tool id (the card humanizes it). */ tool: string; /** The REAL inputs the model passed. */ args?: unknown; /** Absent means `ungraded` — never read-only; see the default in the builder. */ risk?: RiskLabel; invalidatedGrant?: ApprovalRequest["invalidatedGrant"]; /** Descriptor fields the wire part carries when the server has them. */ descriptor?: { title?: string; description?: string; inputSchema?: JsonSchema; }; } /** The in-thread ApprovalRequest — real descriptor first, host metadata second, * never a fabricated sentence. */ export declare function buildApprovalRequest(part: ApprovalWirePart, tools: ToolDescriptions): ApprovalRequest; export {};