feat: 新增主动拉取与多类型回调功能

- 新增 ActivePull 实体、DAO、DTO 及 Service,支持主动拉取任务管理
- 新增 ComposeCallback、VideoCallback、HttpNodeCallback 多类型回调接口
- FlowExecution 增加 NodeGroupId 和 TotalTokens 字段,支持节点组追踪与 Token 统计
- ExecutedNodes 结构由字符串列表改为包含执行状态的节点对象列表
- 重构回调通知机制,统一 Notify 函数调用
- 优化输出项类型判断逻辑,新增文件类型标识
This commit is contained in:
2026-06-10 14:23:55 +08:00
parent ab3a2d967e
commit 03c95c3601
33 changed files with 3207 additions and 615 deletions

View File

@@ -11,6 +11,7 @@ type FlowExecution struct {
// 业务字段
FlowUserId int64 `orm:"flow_user_id" json:"flowUserId" description:"流程ID"`
FlowName string `orm:"flow_name" json:"flowName" description:"流程名称"`
NodeGroupId string `orm:"node_group_id" json:"nodeGroupId" description:"节点组ID"`
TriggerType flow.FlowExecutionTriggerType `orm:"trigger_type" json:"triggerType" description:"触发类型"`
DurationMs int64 `orm:"duration_ms" json:"durationMs" description:"执行时长(毫秒)"`
Status flow.FlowExecutionStatus `orm:"status" json:"status" description:"状态:1-运行中,2-成功,3-失败"`
@@ -20,12 +21,14 @@ type FlowExecution struct {
ErrorMessage string `orm:"error_message" json:"errorMessage" description:"错误信息"`
TraceId string `orm:"trace_id" json:"traceId" description:"跟踪ID"`
SessionId string `orm:"session_id" json:"sessionId" description:"会话ID"`
TotalTokens int `orm:"total_tokens" json:"totalTokens" description:"总token消耗"`
}
type flowExecutionCol struct {
beans.SQLBaseCol
FlowUserId string
FlowName string
NodeGroupId string
TriggerType string
DurationMs string
Status string
@@ -35,12 +38,14 @@ type flowExecutionCol struct {
ErrorMessage string
TraceId string
SessionId string
TotalTokens string
}
var FlowExecutionCol = flowExecutionCol{
SQLBaseCol: beans.DefSQLBaseCol,
FlowUserId: "flow_user_id",
FlowName: "flow_name",
NodeGroupId: "node_group_id",
TriggerType: "trigger_type",
DurationMs: "duration_ms",
Status: "status",
@@ -50,4 +55,5 @@ var FlowExecutionCol = flowExecutionCol{
ErrorMessage: "error_message",
TraceId: "trace_id",
SessionId: "session_id",
TotalTokens: "total_tokens",
}