/** * v3 耗尽 loop 追加一轮卡 —— loop 跑满 maxIterations 仍没达成 exit 条件时 * (decision=exhausted → loop blocked)的飞书入口。和 blocked 重试卡是两张卡、 * 两个 action:这里没有任何东西"失败",只是不收敛——按钮语义是「追加 1 轮」 * (append loopIterationGranted)而不是「重跑某 attempt」。 * * stale 防护与 blocked 卡同构(expectedAttemptId 的同款教训):nonce 以 * `iteration` 为 freshness key —— 一旦 grant 被消费 / 新一轮再次耗尽,旧卡的 * iteration 对不上 core 的 expectedIteration 比对,天然失效。 */ export declare const V3_LOOP_GRANT_ACTION = "v3_loop_grant"; /** card 按钮回传的 value 形态——v3-loop-grant-card-handler 据此解析。 */ export interface V3LoopGrantActionValue { action: typeof V3_LOOP_GRANT_ACTION; runId: string; loopId: string; /** 耗尽时的 iteration —— nonce + core expectedIteration 的 freshness key。 */ iteration: number; nonce: string; } export interface V3LoopGrantCardInput { runId: string; loopId: string; /** 耗尽时的 iteration。 */ iteration: number; /** 编排时的轮数上限(展示用,可缺)。 */ maxIterations?: number; /** 已追加过的轮数。 */ granted?: number; /** 最后一轮 decision detail(如 `result.passed=false (iteration 3/3)`)。 */ detail?: string; /** 省略则按 runId/loopId/iteration 推导。 */ nonce?: string; webDetailUrl?: string; detailMaxChars?: number; /** 有值 → 渲染冻结的「已追加」卡(无按钮,防 stale UI 重复提交)。 */ grantedNow?: { nextIteration: number; by?: string; }; } /** 稳定 nonce:同一 run 同一 loop 同一耗尽轮的卡 nonce 固定(重发卡一致); * iteration 入 nonce —— 追加被消费后旧卡对不上新耗尽轮,不会误触。 */ export declare function v3LoopGrantCardNonce(runId: string, loopId: string, iteration: number): string; export declare function buildV3LoopGrantCard(input: V3LoopGrantCardInput): string; //# sourceMappingURL=v3-loop-grant-card.d.ts.map