MCPcopy Create free account
hub / github.com/Facets-cloud/flow / Task

Struct Task

internal/flowdb/db.go:143–178  ·  view source on GitHub ↗

Task mirrors the tasks table. ProjectSlug is nullable for floating tasks.

Source from the content-addressed store, hash-verified

141
142// Task mirrors the tasks table. ProjectSlug is nullable for floating tasks.
143type Task struct {
144 Slug string
145 Name string
146 ProjectSlug sql.NullString
147 Status string
148 Kind string // 'regular' | 'playbook_run'
149 PlaybookSlug sql.NullString // set when Kind='playbook_run'
150 Priority string
151 WorkDir string
152 WaitingOn sql.NullString
153 DueDate sql.NullString
154 Assignee sql.NullString
155 StatusChangedAt sql.NullString
156 SessionID sql.NullString
157 SessionStarted sql.NullString
158 SessionLastResumed sql.NullString
159 // Harness records which agent CLI (claude/codex/gemini/…) owns the
160 // task's session. NULL/empty is treated as "claude" by callers — a
161 // back-compat convention so pre-harness-column DBs Just Work.
162 // Set on first `flow do` or `flow do --here` from the ambient
163 // harness's session env var; immutable afterward.
164 Harness sql.NullString
165 // Autonomous-run bookkeeping (set by `flow do --auto`). AutoRunStatus
166 // is NULL for tasks that were never run in --auto mode; otherwise one
167 // of 'running' | 'completed' | 'dead'. AutoRunPID is the detached
168 // supervisor process's PID (used for read-time liveness reconciliation
169 // while status='running'); cleared on finalize.
170 AutoRunStatus sql.NullString
171 AutoRunPID sql.NullInt64
172 AutoRunStarted sql.NullString
173 AutoRunFinished sql.NullString
174 AutoRunLog sql.NullString
175 CreatedAt string
176 UpdatedAt string
177 ArchivedAt sql.NullString
178}
179
180// Workdir mirrors the workdirs convenience registry.
181type Workdir struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected