feat(trigger): 新增"任务创建"触发机制(on_task_create)
自定义 agent 触发条件从 5 种扩展到 6 种,新增任务被创建时触发。 用 tasks.id 单调水位线 + scheduler_state 防重复,重启不补触发; 触发消息完整分行给出任务ID/描述/目标。DB 加列并带 ALTER 迁移。 Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
5962826f2d
commit
4cf622593a
6 files changed
+128
-27
No files matched your search
@@ -293,11 +293,13 @@ export interface AgentTrigger {
|
||||
on_goal_met: boolean; // 任意任务达成目标时触发
|
||||
on_task_timeout: boolean; // 任意任务超时时触发
|
||||
on_tool_call: boolean; // 选中工具被调用(执行完成)时触发
|
||||
on_task_create: boolean; // 任意任务被创建时触发
|
||||
interval_message: string; // 各触发条件的独立用户消息
|
||||
finding_message: string;
|
||||
goal_message: string;
|
||||
task_timeout_message: string;
|
||||
tool_call_message: string;
|
||||
task_create_message: string;
|
||||
tool_names: string[]; // on_tool_call 选中的工具 key(至少一个)
|
||||
last_fire?: string;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user