58 lines
2.2 KiB
Go
58 lines
2.2 KiB
Go
package bizdev
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"chat-agent-system/internal/squad"
|
|
)
|
|
|
|
type TaskMeta = squad.TaskMeta
|
|
|
|
type MaterialInput struct {
|
|
Filename string `json:"filename"`
|
|
Content []byte `json:"content"`
|
|
}
|
|
|
|
type Attachment = squad.Attachment
|
|
|
|
type TaskRunRequest struct {
|
|
TaskKey string `json:"task_key"`
|
|
ProjectName string `json:"project_name"`
|
|
CustomerName string `json:"customer_name"`
|
|
DeviceType string `json:"device_type"`
|
|
IntendedUse string `json:"intended_use"`
|
|
TargetMarket string `json:"target_market"`
|
|
Fields map[string]string `json:"fields"`
|
|
Materials []MaterialInput `json:"materials"`
|
|
Backend string `json:"backend"`
|
|
Timeout time.Duration `json:"timeout"`
|
|
WorkDir string `json:"work_dir"`
|
|
CustomSteps []squad.StepSpec `json:"custom_steps,omitempty"`
|
|
AutoRepair bool `json:"auto_repair,omitempty"`
|
|
KnowledgeHits []squad.KnowledgeHit `json:"knowledge_hits,omitempty"`
|
|
PriorDocs []squad.PriorDocItem `json:"prior_docs,omitempty"`
|
|
}
|
|
|
|
type TaskRunResult struct {
|
|
TaskKey string `json:"task_key"`
|
|
ArtifactTitle string `json:"artifact_title"`
|
|
MarkdownBody string `json:"markdown_body"`
|
|
ExtractedData map[string]string `json:"extracted_data"`
|
|
Attachments []Attachment `json:"attachments"`
|
|
WorkDir string `json:"work_dir"`
|
|
BackendUsed string `json:"backend_used"`
|
|
Duration time.Duration `json:"duration"`
|
|
Success bool `json:"success"`
|
|
ErrorReason string `json:"error_reason"`
|
|
QualityReport *squad.QualityReport `json:"quality_report,omitempty"`
|
|
Manifest *squad.Manifest `json:"manifest,omitempty"`
|
|
}
|
|
|
|
type BizdevService interface {
|
|
ListTasks() []TaskMeta
|
|
ExecuteTask(ctx context.Context, req TaskRunRequest) (*TaskRunResult, error)
|
|
InspectWorkspace(ctx context.Context, workDir string) (*squad.WorkspaceState, error)
|
|
ResumeOrModifyWorkspace(ctx context.Context, req squad.ModifyWorkflowRequest) (*squad.SquadRunResult, error)
|
|
}
|