Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(bots): keep downgraded clients from dispatching nightly learning

Chris8335e99f6d7e
diff --git a/apps/desktop/src/main/bot-autonomy/nightlyLearningRoutine.ts b/apps/desktop/src/main/bot-autonomy/nightlyLearningRoutine.ts
index 90500d483a..9fe85a83c3 100644
--- a/apps/desktop/src/main/bot-autonomy/nightlyLearningRoutine.ts
+++ b/apps/desktop/src/main/bot-autonomy/nightlyLearningRoutine.ts
@@ -40,6 +40,9 @@ export function buildNightlyLearningRoutineInput(frequency: NightlyLearningFrequ
prompt: 'Nightly learning runs inside the host: tidy this teammate\'s memories and Skills from conversations since the last run.',
enabled: true,
silentWhenIdle: true,
+ // 本版在 execute 里提前返回,不会执行这个前置检查;降级后的旧版不认识这条内置规则,
+ // 会把它当普通规则派给伙伴,前置检查以 exit 2 跳过,不调用模型。
+ preRunHook: { command: 'exit 2', timeoutMs: 10_000 },
triggers: [{ id: `nightly-${frequency}`, kind: 'cron', expression: NIGHTLY_LEARNING_CRON[frequency], timezone }],
};
}