Go 实现 /api/v1/analysis 契约、Demo/Live Worker、DeerFlow SSE;含设计文档与冒烟脚本。 Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
530 B
Go
19 lines
530 B
Go
package deerflow
|
|
|
|
// StreamResult 一次 run/stream 汇总(与 Java StreamResult 对齐)。
|
|
type StreamResult struct {
|
|
Content string
|
|
AgentName string
|
|
Dispatched [][2]string // [agentId, task]
|
|
Clarification bool
|
|
ClarificationDetail string
|
|
InvalidDelivery bool
|
|
Aborted bool
|
|
}
|
|
|
|
// TextDeltaHandler 流式正文增量(可含 <think>)。
|
|
type TextDeltaHandler func(delta string) error
|
|
|
|
// CancelCheck 读 SSE 前询问是否已取消。
|
|
type CancelCheck func() bool
|