00b70298f2
Add ImageQuality/ImageCount to AgentRequest, AgentChatRequest and Job, add OutputFormat to GeneratorTaskInputArgs, and introduce the LayeredDocument types and LayeredDocumentGenerator port for PSD output. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
55 lines
1.4 KiB
Go
55 lines
1.4 KiB
Go
package design
|
|
|
|
import "context"
|
|
|
|
type JobKind string
|
|
|
|
const (
|
|
JobCreateProjectGeneration JobKind = "canvas:create-project-generation"
|
|
JobFollowupGeneration JobKind = "canvas:followup-generation"
|
|
JobNodeActionGeneration JobKind = "canvas:node-action-generation"
|
|
JobAgentConversation JobKind = "canvas:agent-conversation"
|
|
JobTextExtraction JobKind = "canvas:text-extraction"
|
|
JobMockupModelGeneration JobKind = "canvas:mockup-model-generation"
|
|
JobLayerMergeGeneration JobKind = "canvas:layer-merge-generation"
|
|
JobAssetCleanup JobKind = "asset:cleanup"
|
|
)
|
|
|
|
type Job struct {
|
|
Kind JobKind
|
|
UserID string
|
|
ProjectID string
|
|
ThreadID string
|
|
Prompt string
|
|
Mode string
|
|
ImageModel string
|
|
ImageSize string
|
|
ImageQuality string
|
|
ImageCount int
|
|
TaskPlan AgentTaskPlan
|
|
EnableWebSearch bool
|
|
Isolated bool
|
|
Target Node
|
|
Request NodeActionRequest
|
|
MessageID string
|
|
Conversation AgentConversationRequest
|
|
Messages []AgentChatMessage
|
|
Feature string
|
|
PlaceholderID string
|
|
SourceNodes []Node
|
|
Title string
|
|
PublicURLs []string
|
|
}
|
|
|
|
type JobQueue interface {
|
|
Enqueue(ctx context.Context, job Job) error
|
|
}
|
|
|
|
type JobProcessor interface {
|
|
ProcessJob(ctx context.Context, job Job) error
|
|
}
|
|
|
|
type JobFailureHandler interface {
|
|
HandleJobFailure(ctx context.Context, job Job, err error) error
|
|
}
|