/** * v3 blocked 重试卡点击处理 —— card-handler 的 v3 分支(对称于 * `v3-gate-card-handler`)。把一次「🔄 重试」点击翻译成: * 权限校验 → `requestV3Retry`(幂等:unconsumed reservation → already-requested) * → 冻结卡 / toast + 触发 `driveV3Run` 以新 attempt 重跑。 * * 纯逻辑 + 注入 seam(requestRetry / driveRun / canResolve),单测友好。 */ import { type V3BlockedActionValue, type V3AskAnswerActionValue } from './v3-blocked-card.js'; import { requestV3Retry } from '../../workflows/v3/daemon-run.js'; import { type RunChatBinding } from '../../workflows/v3/grill-state.js'; export declare function isV3BlockedAction(action: unknown): boolean; export interface V3BlockedCardHandlerDeps { baseDir?: string; /** Re-enter the run after a retry append. Fire-and-forget (daemon logs errors). */ driveRun: (runId: string) => void; /** Permission: may this operator retry nodes of this run? Same semantics as * the gate handler's canResolve (daemon injects a canOperate-backed check). */ canResolve?: (binding: RunChatBinding | undefined, operatorOpenId: string | undefined) => boolean; /** Injectable for tests. Default = real requestV3Retry. */ requestRetry?: typeof requestV3Retry; } /** * Handle a v3 blocked-card retry click. Returns the Lark card-action response: * a frozen「已重试」card, or a `{ toast }`. Triggers `driveRun` on success. */ export declare function handleV3BlockedAction(value: V3BlockedActionValue | V3AskAnswerActionValue, operatorOpenId: string | undefined, deps: V3BlockedCardHandlerDeps, formValue?: Record): Promise; //# sourceMappingURL=v3-blocked-card-handler.d.ts.map