import { type ApprovalDecision, type ApprovalRequest } from "../../core/index.js"; import { type ConsentAsk } from "./build-beat.js"; /** ENG-216 — who is asking, in the user's language: one of the quiet notes under * the question (M1 retired the byline row, and "runs as you" is already the * agency note there, so only the venue phrase itself rides here). * * THE DEFECT this exists for: the byline printed `approval.ctx.appId` verbatim, * so a bank customer read "Runs as you · asked in an app · app_1". The wire * carries only that id; a name arrives only when the SURFACE knows one (the * activities queue resolves it off the automations list), and without one the * bare phrase is the honest answer. An unknown venue says nothing rather * than print its slug. */ export declare function venuePhrase(venue: string, venueName?: string): string | undefined; export interface ApprovalCardProps { approval: ApprovalRequest; onDecide(decision: ApprovalDecision): void | PromiseLike; /** * The in-thread native resume path (`addToolApprovalResponse`) has no * channel for `ApprovalDecision.remember`, so thread chrome hides the * disclosure rather than dropping the answer silently. Queue surfaces * (the real wire decision) keep it. Default true. */ allowRemember?: boolean; /** * ENG-216 — show the venue context note. Queue surfaces carry a real server * `ctx` and keep it (default true); the in-thread card sets this false because * the live conversation is already the context and the wire carries no ctx to * display honestly. */ showContext?: boolean; /** * A human name for the app/automation that asked, when the SURFACE knows one * (the wire's `ctx` carries only an id). Absent ⇒ the bare venue phrase; an * id-shaped value is refused, since an id in front of a user is the defect * this prop exists to remove. */ venueName?: string; /** * The ask ALREADY IN WORDS, for the one surface that cannot derive them: an * agent outside your product parks a call and ships only the rendered ask, so * there is no `ApprovalRequest` here for the shared ladder to read. Given, * `consentAsk` is skipped and these words render verbatim — not a second * vocabulary, because the door composed them off the very descriptor the * ladder would have read (apps' `BUILD_CONSENT_ASK`). */ ask?: ConsentAsk; } /** The consumer's half of a refusal (spec §16 law 3) — the same defect the * connect and standing-access cards carried: this card rendered whatever * `onDecide` threw, and the wire's sentences carry approval and app ids. The * developer sentence keeps its home in the server's own error; the person * looking at the card is told what it means for them. `refusalCopy` in * grant-set-card.tsx is the pattern. */ export declare function refusalCopy(reason: unknown): string; /** The approve/decline line the consent ladder settles into, once. Three * surfaces (this card's callers in thread/parts.tsx, vendo-approval.tsx and * embeds.tsx) used to hardcode their own copy of these sentences, and one of * them told the person a call had RUN when only the approval had landed — * the words were the only thing distinguishing the two, and they drifted. * `underWay` is the decide-resolved moment (the call itself may still be in * flight); `ran` is only for a surface that polled the call's own outcome. */ export declare const APPROVAL_LINES: { readonly underWay: "Approved — under way"; readonly ran: "Approved — ran"; readonly declined: "Declined — nothing ran"; }; /** 01-core §5; 08-ui §4; spec §16 — the one consent surface, on the one card shell: the ask as a question, one quiet line carrying every real input the question doesn't already name plus what approving does, and two buttons. */ export declare function ApprovalCard({ approval, onDecide, allowRemember, showContext, venueName, ask: composed }: ApprovalCardProps): import("react").JSX.Element;