chore: 初始化 eightbf-analysis-go(对齐 Java 会商作业服务)

Go 实现 /api/v1/analysis 契约、Demo/Live Worker、DeerFlow SSE;含设计文档与冒烟脚本。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
gozerosandCursor committed 2026-11-03 00:13:46 +08:00
commit 0c45b86d67
29 files changed
+3789

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
package domain
import "time"
// AnalysisJob 一场会商作业(服务端「研讨录像带」)。
// JSON 字段名与前端 mapJob / Java 实体对齐,少做二次映射。
type AnalysisJob struct {
ID string `json:"id"`
RequestID string `json:"requestId,omitempty"`
TaskID string `json:"taskId,omitempty"`
DraftID string `json:"draftId,omitempty"`
DraftKey string `json:"draftKey,omitempty"`
Status string `json:"status"`
Phase string `json:"phase,omitempty"`
Cycle int `json:"cycle"`
ActiveAgentID string `json:"activeAgentId,omitempty"`
ConsensusPercentage int `json:"consensusPercentage"`
PendingClarification string `json:"pendingClarification,omitempty"`
OrchestrationMode string `json:"orchestrationMode,omitempty"`
Model string `json:"model,omitempty"`
Error string `json:"error,omitempty"`
OwnerAccountID string `json:"ownerAccountId,omitempty"`
Agents []map[string]interface{} `json:"agents"`
Dialogues []map[string]interface{} `json:"dialogues"`
ThreadIDs map[string]interface{} `json:"threadIds,omitempty"`
Plan map[string]interface{} `json:"plan"`
Access map[string]interface{} `json:"access"`
Progress map[string]interface{} `json:"progress"`
Result map[string]interface{} `json:"result,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}
// EnsurePlan plan 为空时补可写 Map。
func (j *AnalysisJob) EnsurePlan() map[string]interface{} {
if j.Plan == nil {
j.Plan = map[string]interface{}{}
}
return j.Plan
}
// EnsureProgress progress 为空时补可写 Map。
func (j *AnalysisJob) EnsureProgress() map[string]interface{} {
if j.Progress == nil {
j.Progress = map[string]interface{}{}
}
return j.Progress
}
// EnsureDialogues dialogues 为空时补切片。
func (j *AnalysisJob) EnsureDialogues() []map[string]interface{} {
if j.Dialogues == nil {
j.Dialogues = []map[string]interface{}{}
}
return j.Dialogues
}