feat: 换到 Gin 主流栈并补齐运维能力
HTTP 用 Gin,配置用 Viper,日志用 zap,数据用 sqlx;保留原有接口与会商行为。 顺带补上就绪探活、请求号、滚动日志、systemd 与 Dockerfile。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0c45b86d67
commit
bd427b57a1
26 files changed
+1213
-302
No files matched your search
+28
-24
@@ -4,31 +4,35 @@ import "time"
|
||||
|
||||
// AnalysisJob 一场会商作业(服务端「研讨录像带」)。
|
||||
// JSON 字段名与前端 mapJob / Java 实体对齐,少做二次映射。
|
||||
//
|
||||
// plan 里约定的键:seatIndex(下一席)、manualIntervention、pendingInject(用户补充)、awaitReason。
|
||||
// access 里约定的键:taskOwnerAccountIds、adminAccountIds、seatAccounts(席位 id → 账号列表)。
|
||||
// 对话正文落在表的 chain_json,不是单独的 dialogues 列。
|
||||
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"`
|
||||
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。
|
||||
|
||||
Reference in new issue
Block a user