feat(loop-engine): auto 步的卡答过了就收步

四个前提都成立才收:声明了 auto、卡发过、这一拍没有未答的卡、配方也没再发新卡。
卡还没发过就不收 —— 那才是替人签字。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LKMZDwMbyKzjw6Hembwvet
This commit is contained in:
xcs
2026-08-29 04:47:07 +08:00
co-authored by Claude Opus 5
parent 80e9b01f84
commit 343a281af5
3 changed files with 73 additions and 1 deletions
@@ -54,6 +54,11 @@ export type AutoOutcome = {
const keyText = (key: Readonly<Record<string, string>>): string => Object.values(key).join('|');
/** 这份配方会不会发卡 —— 「卡答过了就收步」那道门要问它 */
export function recipeIssuesCard(recipe: AutoRecipe): boolean {
return recipe.do.some((action) => action.kind === 'card');
}
export function createAutoRunner(deps: AutoRunnerDeps): {
run(recipe: AutoRecipe, ctx: AutoContext): Promise<AutoOutcome>;
} {