Documentation
¶
Index ¶
- Constants
- type AckSummary
- type AddReportInput
- type CheckFeedbackInput
- type CheckFeedbackResult
- type CreateTaskInput
- type Feedback
- type FeedbackSession
- type MutationResult
- type PathReference
- type PathReferences
- type QueuedFeedback
- type Report
- type ReportPage
- type ReportResult
- type Segment
- type SendFeedbackInput
- type SessionImage
- type SessionImages
- type SetWaitPolicyInput
- type StringArray
- type SyncInput
- type SyncResult
- type SystemSetting
- type Task
- type TaskPage
- type TaskSummary
- type UpdateTaskInput
- type WaitPolicy
- type WaitStatus
- type WorkflowDraft
Constants ¶
View Source
const ( MaxSegmentBytes = 32 * 1024 MaxWorkOrderBytes = 48 * 1024 MaxTaskContentBytes = 128 * 1024 MaxReportingGuideBytes = 12 * 1024 MaxReportingExampleBytes = 16 * 1024 MaxMessageBytes = 32 * 1024 MaxPathReferences = 50 MaxSegments = 64 MaxPageSize = 100 MaxCommunicationPageBytes = 160 * 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AckSummary ¶
type AddReportInput ¶
type AddReportInput struct {
ProjectID string `json:"project_id"`
TaskID string `json:"task_id"`
AcknowledgedTaskRevision int64 `json:"acknowledged_task_revision"`
AcknowledgedFeedbackSequence int64 `json:"acknowledged_feedback_sequence"`
Kind string `json:"kind"`
Body string `json:"body"`
References []PathReference `json:"references,omitempty"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
}
type CheckFeedbackInput ¶
type CheckFeedbackInput struct {
ProjectID string `json:"project_id"`
TaskID string `json:"task_id"`
AfterFeedbackSequence int64 `json:"after_feedback_sequence"`
AcknowledgedTaskRevision int64 `json:"acknowledged_task_revision"`
AcknowledgedFeedbackSequence int64 `json:"acknowledged_feedback_sequence"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
}
type CheckFeedbackResult ¶
type CheckFeedbackResult struct {
Feedback []Feedback `json:"feedback,omitempty"`
Wait WaitStatus `json:"wait"`
}
type CreateTaskInput ¶
type CreateTaskInput struct {
ProjectID string `json:"project_id"`
TaskID string `json:"task_id,omitempty"`
Segments []Segment `json:"segments"`
WaitPolicy WaitPolicy `json:"wait_policy"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
}
type Feedback ¶
type Feedback struct {
ID uint `gorm:"primaryKey" json:"-"`
TaskID string `gorm:"index;not null;size:128" json:"task_id"`
Sequence int64 `gorm:"not null" json:"sequence"`
TaskRevision int64 `gorm:"default:0" json:"task_revision"`
Body string `gorm:"type:text;not null" json:"body"`
References PathReferences `gorm:"type:text" json:"references,omitempty"`
IdempotencyKey string `gorm:"size:128;index" json:"idempotency_key,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
type FeedbackSession ¶
type FeedbackSession struct {
ID string `gorm:"primaryKey;size:128" json:"session_id"`
WorkflowID string `gorm:"index;size:128" json:"workflow_id"`
HostName string `gorm:"size:128" json:"host_name,omitempty"`
ProjectDirectory string `gorm:"size:512" json:"project_directory"`
Title string `gorm:"size:256" json:"title"`
Summary string `gorm:"type:text;not null" json:"summary"`
Status string `gorm:"size:32;default:'pending'" json:"status"` // pending, completed, timeout, cancelled, archived
UserPresence string `gorm:"size:32;default:'online'" json:"user_presence"` // online, away, autopilot
ResponseText string `gorm:"type:text" json:"response_text"`
UserMessages StringArray `gorm:"type:text" json:"user_messages"`
Images SessionImages `gorm:"type:text" json:"images"`
ConsumedByAI bool `gorm:"default:false" json:"consumed_by_ai"`
TimeoutSeconds int `gorm:"default:600" json:"timeout_seconds"`
NoFeedbackChecks int `gorm:"default:0" json:"no_feedback_checks"`
MaxNoFeedbackChecks int `gorm:"default:24" json:"max_no_feedback_checks"`
PromptWaitMinutes int `gorm:"default:2" json:"prompt_wait_minutes"`
WaitCountdownMinutes int `gorm:"default:2" json:"wait_countdown_minutes"`
IsMCPActive bool `gorm:"-" json:"is_mcp_active"`
MCPActiveAt *time.Time `gorm:"-" json:"mcp_active_at,omitempty"`
MCPTimeoutSec int `gorm:"-" json:"mcp_timeout_seconds,omitempty"`
LastKeepaliveAt *time.Time `gorm:"-" json:"last_keepalive_at,omitempty"`
DeadlineAt *time.Time `json:"deadline_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type MutationResult ¶
type PathReference ¶
type PathReferences ¶
type PathReferences []PathReference
func (*PathReferences) Scan ¶
func (p *PathReferences) Scan(value interface{}) error
type QueuedFeedback ¶
type QueuedFeedback struct {
ID uint `gorm:"primaryKey" json:"id"`
WorkflowID string `gorm:"index;size:128" json:"workflow_id"`
HostName string `gorm:"size:128" json:"host_name,omitempty"`
ProjectDirectory string `gorm:"size:512" json:"project_directory"`
ResponseText string `gorm:"type:text" json:"response_text"`
UserMessages StringArray `gorm:"type:text" json:"user_messages"`
Images SessionImages `gorm:"type:text" json:"images"`
Status string `gorm:"size:32;default:'pending'" json:"status"` // pending, consumed, revoked
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type Report ¶
type Report struct {
ID uint `gorm:"primaryKey" json:"-"`
TaskID string `gorm:"index;not null;size:128" json:"task_id"`
Sequence int64 `gorm:"not null" json:"sequence"`
AcknowledgedTaskRevision int64 `gorm:"default:0" json:"acknowledged_task_revision"`
Kind string `gorm:"size:32;not null" json:"kind"` // progress, stage, evidence, question, completion
Body string `gorm:"type:text;not null" json:"body"`
References PathReferences `gorm:"type:text" json:"references,omitempty"`
IdempotencyKey string `gorm:"size:128;index" json:"idempotency_key,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
type ReportPage ¶
type ReportResult ¶
type ReportResult struct {
Report Report `json:"report"`
FeedbackSequence int64 `json:"feedback_sequence"`
Feedback []Feedback `json:"feedback,omitempty"`
Wait WaitStatus `json:"wait"`
}
type Segment ¶
type Segment struct {
ID uint `gorm:"primaryKey" json:"-"`
TaskID string `gorm:"index;not null;size:128" json:"task_id,omitempty"`
Name string `gorm:"size:64;not null" json:"name"`
Content string `gorm:"type:text;not null" json:"content"`
Position int `gorm:"default:0" json:"position"`
UpdatedRevision int64 `gorm:"default:1" json:"updated_revision"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
type SendFeedbackInput ¶
type SessionImage ¶
type SessionImages ¶
type SessionImages []SessionImage
func (*SessionImages) Scan ¶
func (s *SessionImages) Scan(value interface{}) error
type SetWaitPolicyInput ¶
type SetWaitPolicyInput struct {
ProjectID string `json:"project_id"`
TaskID string `json:"task_id"`
ExpectedRevision int64 `json:"expected_revision"`
WaitPolicy WaitPolicy `json:"wait_policy"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
}
type StringArray ¶
type StringArray []string
func (*StringArray) Scan ¶
func (s *StringArray) Scan(value interface{}) error
type SyncInput ¶
type SyncInput struct {
ProjectID string `json:"project_id"`
TaskID string `json:"task_id"`
KnownTaskRevision int64 `json:"known_task_revision"`
AcknowledgedTaskRevision int64 `json:"acknowledged_task_revision"`
AfterFeedbackSequence int64 `json:"after_feedback_sequence"`
AcknowledgedFeedbackSequence int64 `json:"acknowledged_feedback_sequence"`
}
type SyncResult ¶
type SyncResult struct {
TaskID string `json:"task_id"`
State string `json:"state"`
Revision int64 `json:"revision"`
ReportSequence int64 `json:"report_sequence"`
FeedbackSequence int64 `json:"feedback_sequence"`
AcknowledgedTaskRevision int64 `json:"acknowledged_task_revision"`
AcknowledgedFeedbackSequence int64 `json:"acknowledged_feedback_sequence"`
Segments []Segment `json:"segments,omitempty"`
Feedback []Feedback `json:"feedback,omitempty"`
Wait *WaitStatus `json:"wait,omitempty"`
}
type SystemSetting ¶
type Task ¶
type Task struct {
ID string `gorm:"primaryKey;size:128" json:"task_id"`
ProjectID string `gorm:"index;size:128;not null" json:"project_id"`
State string `gorm:"size:32;default:'active'" json:"state"` // active, closed, archived
Revision int64 `gorm:"default:1" json:"revision"`
ReportSequence int64 `gorm:"default:0" json:"report_sequence"`
FeedbackSequence int64 `gorm:"default:0" json:"feedback_sequence"`
AcknowledgedTaskRevision int64 `gorm:"default:0" json:"acknowledged_task_revision"`
AcknowledgedFeedbackSequence int64 `gorm:"default:0" json:"acknowledged_feedback_sequence"`
AcknowledgedReportSequence int64 `gorm:"default:0" json:"acknowledged_report_sequence"`
WaitPolicy WaitPolicy `gorm:"type:text" json:"wait_policy"`
Segments []Segment `gorm:"foreignKey:TaskID;constraint:OnDelete:CASCADE" json:"segments,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type TaskPage ¶
type TaskPage struct {
Tasks []TaskSummary `json:"tasks"`
NextCursor string `json:"next_cursor,omitempty"`
}
type TaskSummary ¶
type TaskSummary struct {
ID string `json:"task_id"`
ProjectID string `json:"project_id"`
State string `json:"state"`
Revision int64 `json:"revision"`
ReportSequence int64 `json:"report_sequence"`
FeedbackSequence int64 `json:"feedback_sequence"`
AcknowledgedReportSequence int64 `json:"acknowledged_report_sequence"`
UnreadReportCount int64 `json:"unread_report_count"`
UpdatedAt time.Time `json:"updated_at"`
}
type UpdateTaskInput ¶
type UpdateTaskInput struct {
ProjectID string `json:"project_id"`
TaskID string `json:"task_id"`
ExpectedRevision int64 `json:"expected_revision"`
Mode string `json:"mode"` // replace, patch
Segment string `json:"segment"`
OldText string `json:"old_text,omitempty"`
NewText string `json:"new_text"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
}
type WaitPolicy ¶
type WaitPolicy struct {
AfterMinutes int `json:"after_minutes"`
MaxNoFeedbackChecks int `json:"max_no_feedback_checks"`
WaitInstruction string `json:"wait_instruction"`
ExhaustedInstruction string `json:"exhausted_instruction"`
}
func (*WaitPolicy) Scan ¶
func (w *WaitPolicy) Scan(value interface{}) error
type WaitStatus ¶
type WaitStatus struct {
State string `json:"state"` // waiting, exhausted
SourceReportSequence int64 `json:"source_report_sequence,omitempty"`
NoFeedbackChecks int `json:"no_feedback_checks,omitempty"`
MaxChecks int `json:"max_checks,omitempty"`
AfterMinutes int `json:"after_minutes,omitempty"`
Instruction string `json:"instruction"`
}
Click to show internal directories.
Click to hide internal directories.