/** * v3 humanGate 审批卡点击处理 —— card-handler 的 v3 分支(对称于 v0.2 的 * 走 v3 自己的 wait/journal 权威,不复用已下线的 v2 wait * path)。把一次点击翻译成:权限校验 → `resolveV3GateClick`(幂等 + terminal-safe) * → 冻结卡 / toast + 触发 `driveV3Run` 续跑。 * * 纯逻辑 + 注入 seam(resolveClick / driveRun / canResolve),单测友好;真正的 * Lark 发送 / driveV3Run 由 daemon 在 deps 里接。 */ import { type V3GateActionValue } from './v3-gate-card.js'; import { resolveV3GateClick } from '../../workflows/v3/daemon-run.js'; import { type RunChatBinding } from '../../workflows/v3/grill-state.js'; export declare function isV3GateAction(action: unknown): boolean; export interface V3GateCardHandlerDeps { baseDir?: string; /** Re-enter the run after a resolved gate. Fire-and-forget; the daemon logs * errors (this is the `driveV3Run` wiring with postGateCard/onTerminal). */ driveRun: (runId: string) => void; /** Permission: may this operator resolve gates for this run? Default: allow * (MVP — daemon injects a canOperate-backed check). */ canResolve?: (binding: RunChatBinding | undefined, operatorOpenId: string | undefined) => boolean; /** Injectable for tests. Default = real resolveV3GateClick. */ resolveClick?: typeof resolveV3GateClick; } /** * Handle a v3 gate card click. Returns the Lark card-action response: a frozen * card object (replaces the clicked card so its buttons can't re-submit), or a * `{ toast }` wrapper. Triggers `driveRun` as a side effect on a real resolve. */ export declare function handleV3GateAction(value: V3GateActionValue, operatorOpenId: string | undefined, deps: V3GateCardHandlerDeps): Promise; //# sourceMappingURL=v3-gate-card-handler.d.ts.map