/** * v3 humanGate 审批卡 — 复用 v0.2 审批卡的视觉(header 配色 / 字段 / freeze 态), * 但**自带 action namespace + value 形态**(codex review #4): * - action: `v3_gate_approve` / `v3_gate_reject` * - value: `{ action, runId, waitId, nodeId, nonce, selected }` * 刻意不复用已下线的 v2 wait path —— v3 的 wait 权威是 * `waits/.json + journal.ndjson`,跟 v0.2 events schema 不同(见 humanGate * daemon-card 设计 §4.3)。本文件**纯函数**,不碰 daemon / IO,单测友好。 */ export declare const V3_GATE_APPROVE_ACTION = "v3_gate_approve"; export declare const V3_GATE_REJECT_ACTION = "v3_gate_reject"; export type V3GateResolutionKind = 'approved' | 'rejected'; /** card 按钮回传的 value 形态——v3-gate-card-handler 据此解析。 */ export interface V3GateActionValue { action: typeof V3_GATE_APPROVE_ACTION | typeof V3_GATE_REJECT_ACTION; runId: string; /** waitId = `${nodeId}-gate`;nodeId 单独带,免得 handler 去 strip 后缀(节点名可能含 -gate)。 */ waitId: string; nodeId: string; nonce: string; selected?: string; } export interface V3GateCardInput { runId: string; waitId: string; nodeId: string; prompt: string; /** 卡 nonce(防 stale 卡重复触发);省略则按 runId/waitId 推导。 */ nonce?: string; webDetailUrl?: string; promptMaxChars?: number; options?: string[]; approveOptions?: string[]; approvers?: string[]; /** Host-only trusted identity. The hash is rendered independently from the * authored prompt so a long prompt can never truncate away what is approved. */ hostApproval?: { attemptId: string; approvalDigest: string; inputHash: string; }; /** 有值 → 渲染冻结的「已通过 / 已拒绝」卡(无按钮,防 stale UI 重复提交)。 */ resolution?: { kind: V3GateResolutionKind; by?: string; selected?: string; }; } /** 稳定 nonce:同一 run 同一 wait 的卡 nonce 固定,重发卡也一致(幂等校验用)。 */ export declare function v3GateCardNonce(runId: string, waitId: string): string; /** v3 run 在 dashboard 的详情页 URL(跟 v0.2 的 #/workflows 对称,走 #/v3)。 * 远程访问开+已绑定时走平台子域,否则 BOTMUX_PUBLIC_URL / 本地——详见 * {@link buildV3RunDetailUrl},让远程用户点卡片够得着 SPA 才能触发一键登录。 */ export declare function v3RunDetailUrl(runId: string): string; export declare function buildV3GateCard(input: V3GateCardInput): string; //# sourceMappingURL=v3-gate-card.d.ts.map