Versions in this module Expand all Collapse all v0 v0.3.0 May 30, 2026 Changes in this version + const CookieCSRF + const HeaderActiveWorkspaceID + const HeaderCSRF + const HeaderRequestID + const RunEventSSEEvent + const RunHeartbeatSSEEvent + const RunOverflowSSEEvent + const RunSnapshotSSEEvent + const WorkspaceErrorSocketType + const WorkspaceEventSocketType + const WorkspaceHeartbeatSocketType + const WorkspaceOverflowSocketType + func ActiveWorkspaceIDFromContext(ctx context.Context) string + func ErrorMiddleware() gin.HandlerFunc + func EventAfterCursor(event events.Event, cursor StreamCursor) bool + func FormatCursor(timestamp time.Time, sequence uint64) string + func RegisterRoutes(router gin.IRouter, handlers *Handlers) + func RequestIDFromContext(ctx context.Context) string + func RequestIDMiddleware() gin.HandlerFunc + func RespondError(c *gin.Context, err error) + func WithActiveWorkspaceID(ctx context.Context, workspaceID string) context.Context + func WithRequestID(ctx context.Context, requestID string) context.Context + func WorkspacePathMissingProblem(workspaceID string, rootDir string, err error) error + func WriteSSE(writer FlushWriter, msg SSEMessage) error + func WriteWorkspaceSocketMessage(ctx context.Context, conn *websocket.Conn, message WorkspaceSocketMessage) error + type ArchiveRequest = contract.WorkflowArchiveRequest + type ArchiveResult = contract.ArchiveResult + type ContentBlock = contract.ContentBlock + type ContentBlockType = contract.ContentBlockType + type DaemonDatabaseDiagnostics = contract.DaemonDatabaseDiagnostics + type DaemonHealth = contract.DaemonHealth + type DaemonModeCount = contract.DaemonModeCount + type DaemonReconcileDiagnostics = contract.DaemonReconcileDiagnostics + type DaemonService interface + Health func(context.Context) (DaemonHealth, error) + Metrics func(context.Context) (MetricsPayload, error) + Status func(context.Context) (DaemonStatus, error) + Stop func(context.Context, bool) error + type DaemonStatus = contract.DaemonStatus + type ExecRequest = contract.ExecRequest + type ExecService interface + Start func(context.Context, ExecRequest) (Run, error) + type FlushWriter interface + func PrepareSSE(c *gin.Context) (FlushWriter, error) + type HandlerConfig struct + Daemon DaemonService + Exec ExecService + HeartbeatInterval time.Duration + Logger *slog.Logger + Now func() time.Time + Reviews ReviewService + Runs RunService + StreamDone <-chan struct{} + Sync SyncService + Tasks TaskService + TransportName string + WorkspaceEvents WorkspaceEventService + WorkspaceSocketOriginPatterns []string + Workspaces WorkspaceService + type Handlers struct + Daemon DaemonService + Exec ExecService + HeartbeatInterval time.Duration + Logger *slog.Logger + Now func() time.Time + Reviews ReviewService + Runs RunService + Sync SyncService + Tasks TaskService + TransportName string + WorkspaceEvents WorkspaceEventService + Workspaces WorkspaceService + func NewHandlers(cfg *HandlerConfig) *Handlers + func (h *Handlers) ArchiveTaskWorkflow(c *gin.Context) + func (h *Handlers) CancelRun(c *gin.Context) + func (h *Handlers) Clone() *Handlers + func (h *Handlers) DaemonHealth(c *gin.Context) + func (h *Handlers) DaemonMetrics(c *gin.Context) + func (h *Handlers) DaemonStatus(c *gin.Context) + func (h *Handlers) DeleteWorkspace(c *gin.Context) + func (h *Handlers) FetchReview(c *gin.Context) + func (h *Handlers) GetLatestReview(c *gin.Context) + func (h *Handlers) GetReviewIssue(c *gin.Context) + func (h *Handlers) GetReviewRound(c *gin.Context) + func (h *Handlers) GetRun(c *gin.Context) + func (h *Handlers) GetRunSnapshot(c *gin.Context) + func (h *Handlers) GetRunTranscript(c *gin.Context) + func (h *Handlers) GetTaskBoard(c *gin.Context) + func (h *Handlers) GetTaskItemDetail(c *gin.Context) + func (h *Handlers) GetTaskWorkflow(c *gin.Context) + func (h *Handlers) GetWorkflowMemory(c *gin.Context) + func (h *Handlers) GetWorkflowMemoryFile(c *gin.Context) + func (h *Handlers) GetWorkflowSpec(c *gin.Context) + func (h *Handlers) GetWorkspace(c *gin.Context) + func (h *Handlers) ListReviewIssues(c *gin.Context) + func (h *Handlers) ListRunEvents(c *gin.Context) + func (h *Handlers) ListRuns(c *gin.Context) + func (h *Handlers) ListTaskItems(c *gin.Context) + func (h *Handlers) ListTaskWorkflows(c *gin.Context) + func (h *Handlers) ListWorkspaces(c *gin.Context) + func (h *Handlers) RegisterWorkspace(c *gin.Context) + func (h *Handlers) ResolveWorkspace(c *gin.Context) + func (h *Handlers) SetStreamDone(done <-chan struct{}) + func (h *Handlers) StartExecRun(c *gin.Context) + func (h *Handlers) StartReviewRun(c *gin.Context) + func (h *Handlers) StartReviewWatch(c *gin.Context) + func (h *Handlers) StartTaskRun(c *gin.Context) + func (h *Handlers) StopDaemon(c *gin.Context) + func (h *Handlers) StreamRun(c *gin.Context) + func (h *Handlers) StreamWorkspaceSocket(c *gin.Context) + func (h *Handlers) SyncWorkflow(c *gin.Context) + func (h *Handlers) SyncWorkspaces(c *gin.Context) + func (h *Handlers) UpdateWorkspace(c *gin.Context) + func (h *Handlers) ValidateTaskWorkflow(c *gin.Context) + type HealthDetail = contract.HealthDetail + type HeartbeatPayload = contract.HeartbeatPayload + type MarkdownDocument struct + ID string + Kind string + Markdown string + Metadata json.RawMessage + Title string + UpdatedAt time.Time + type MetricsPayload struct + Body string + ContentType string + type OverflowPayload = contract.OverflowPayload + type Problem = contract.Problem + func NewProblem(status int, code string, message string, details map[string]any, err error) *Problem + type ReviewDetailPayload struct + Document MarkdownDocument + Issue ReviewIssueDetail + RelatedRuns []Run + Round ReviewRound + Workflow WorkflowSummary + Workspace Workspace + type ReviewFetchRequest = contract.ReviewFetchRequest + type ReviewFetchResult = contract.ReviewFetchResult + type ReviewIssue = contract.ReviewIssue + type ReviewIssueDetail struct + ID string + IssueNumber int + Severity string + Status string + UpdatedAt time.Time + type ReviewRound = contract.ReviewRound + type ReviewRunRequest = contract.ReviewRunRequest + type ReviewService interface + Fetch func(context.Context, string, string, ReviewFetchRequest) (ReviewFetchResult, error) + GetLatest func(context.Context, string, string) (ReviewSummary, error) + GetRound func(context.Context, string, string, int) (ReviewRound, error) + ListIssues func(context.Context, string, string, int) ([]ReviewIssue, error) + ReviewDetail func(context.Context, string, string, int, string) (ReviewDetailPayload, error) + StartRun func(context.Context, string, string, int, ReviewRunRequest) (Run, error) + StartWatch func(context.Context, string, string, ReviewWatchRequest) (Run, error) + type ReviewSummary = contract.ReviewSummary + type ReviewWatchRequest = contract.ReviewWatchRequest + type ReviewWatchResponse = contract.RunResponse + type Run = contract.Run + type RunArtifactSyncEntry struct + ChangeKind string + Checksum string + RelativePath string + Sequence uint64 + SyncedAt time.Time + type RunDetailPayload struct + ArtifactSync []RunArtifactSyncEntry + JobCounts RunJobCounts + Run Run + Runtime RunRuntimeSummary + Snapshot RunSnapshot + Timeline []events.Event + type RunEventPage = contract.RunEventPage + type RunEventPageQuery = contract.RunEventPageQuery + type RunJobCounts struct + Canceled int + Completed int + Failed int + Queued int + Retrying int + Running int + type RunJobState = contract.RunJobState + type RunJobSummary = contract.RunJobSummary + type RunListQuery = contract.RunListQuery + type RunRuntimeSummary struct + AccessModes []string + IDEs []string + Models []string + PresentationModes []string + ReasoningEfforts []string + type RunService interface + Cancel func(context.Context, string) error + Events func(context.Context, string, RunEventPageQuery) (RunEventPage, error) + Get func(context.Context, string) (Run, error) + List func(context.Context, RunListQuery) ([]Run, error) + OpenStream func(context.Context, string, StreamCursor) (RunStream, error) + RunDetail func(context.Context, string) (RunDetailPayload, error) + Snapshot func(context.Context, string) (RunSnapshot, error) + Transcript func(context.Context, string) (RunTranscript, error) + type RunShutdownState = contract.RunShutdownState + type RunSnapshot = contract.RunSnapshot + type RunStream interface + Close func() error + Errors func() <-chan error + Events func() <-chan RunStreamItem + type RunStreamItem struct + Event *events.Event + Overflow *RunStreamOverflow + type RunStreamOverflow struct + Reason string + type RunTranscript = contract.RunTranscript + type RunTranscriptMessage = contract.RunTranscriptMessage + type RunUIMessage = contract.RunUIMessage + type RunUIMessagePart = contract.RunUIMessagePart + type SSEMessage = contract.SSEMessage + func EventMessage(event events.Event) SSEMessage + func HeartbeatMessage(runID string, cursor StreamCursor, now time.Time) SSEMessage + func OverflowMessage(runID string, cursor StreamCursor, now time.Time, reason string) SSEMessage + type SessionAvailableCommand = contract.SessionAvailableCommand + type SessionEntry = contract.SessionEntry + type SessionEntryKind = contract.SessionEntryKind + type SessionMetaState = contract.SessionMetaState + type SessionPlanEntry = contract.SessionPlanEntry + type SessionPlanState = contract.SessionPlanState + type SessionStatus = contract.SessionStatus + type SessionViewSnapshot = contract.SessionViewSnapshot + type StreamCursor = contract.StreamCursor + func CursorFromEvent(event events.Event) StreamCursor + func ParseCursor(raw string) (StreamCursor, error) + type SyncRequest = contract.SyncRequest + type SyncResult = contract.SyncResult + type SyncService interface + Sync func(context.Context, SyncRequest) (SyncResult, error) + type TaskBoardPayload struct + Lanes []TaskLane + TaskCounts WorkflowTaskCounts + Workflow WorkflowSummary + Workspace Workspace + type TaskCard struct + DependsOn []string + Status string + TaskID string + TaskNumber int + Title string + Type string + UpdatedAt time.Time + type TaskDetailPayload struct + Document MarkdownDocument + LiveTailAvailable bool + MemoryEntries []WorkflowMemoryEntry + RelatedRuns []Run + Task TaskCard + Workflow WorkflowSummary + Workspace Workspace + type TaskItem = contract.TaskItem + type TaskLane struct + Items []TaskCard + Status string + Title string + type TaskRunRequest = contract.TaskRunRequest + type TaskService interface + Archive func(context.Context, string, string, ArchiveRequest) (ArchiveResult, error) + GetWorkflow func(context.Context, string, string) (WorkflowSummary, error) + ListItems func(context.Context, string, string) ([]TaskItem, error) + ListWorkflows func(context.Context, string) ([]WorkflowSummary, error) + StartRun func(context.Context, string, string, TaskRunRequest) (Run, error) + TaskBoard func(context.Context, string, string) (TaskBoardPayload, error) + TaskDetail func(context.Context, string, string, string) (TaskDetailPayload, error) + Validate func(context.Context, string, string) (ValidationSuccess, error) + WorkflowMemoryFile func(context.Context, string, string, string) (MarkdownDocument, error) + WorkflowMemoryIndex func(context.Context, string, string) (WorkflowMemoryIndex, error) + WorkflowOverview func(context.Context, string, string) (WorkflowOverviewPayload, error) + WorkflowSpec func(context.Context, string, string) (WorkflowSpecDocument, error) + type ToolCallState = contract.ToolCallState + type TransportError = contract.TransportError + type ValidationSuccess = contract.ValidationSuccess + type WorkflowMemoryEntry struct + DisplayPath string + FileID string + Kind string + SizeBytes int64 + Title string + UpdatedAt time.Time + type WorkflowMemoryIndex struct + Entries []WorkflowMemoryEntry + Workflow WorkflowSummary + Workspace Workspace + type WorkflowOverviewPayload struct + ArchiveEligible bool + ArchiveReason string + LatestReview *ReviewSummary + RecentRuns []Run + TaskCounts WorkflowTaskCounts + Workflow WorkflowSummary + Workspace Workspace + type WorkflowSpecDocument struct + ADRs []MarkdownDocument + PRD *MarkdownDocument + TechSpec *MarkdownDocument + Workflow WorkflowSummary + Workspace Workspace + type WorkflowSummary = contract.WorkflowSummary + type WorkflowTaskCounts = contract.WorkflowTaskCounts + type Workspace = contract.Workspace + type WorkspaceEvent struct + Kind WorkspaceEventKind + Mode string + Paths []string + RunID string + Seq uint64 + Status string + TS time.Time + WorkflowID *string + WorkflowSlug string + WorkspaceID string + type WorkspaceEventKind string + const WorkspaceEventKindArtifactChanged + const WorkspaceEventKindRunCreated + const WorkspaceEventKindRunStatusChanged + const WorkspaceEventKindRunTerminal + const WorkspaceEventKindWorkflowSyncCompleted + type WorkspaceEventService interface + OpenWorkspaceStream func(context.Context, string) (WorkspaceEventStream, error) + type WorkspaceEventStream interface + Close func() error + Errors func() <-chan error + Events func() <-chan WorkspaceStreamItem + type WorkspaceRegisterResult = contract.WorkspaceRegisterResult + type WorkspaceService interface + Delete func(context.Context, string) error + Get func(context.Context, string) (Workspace, error) + List func(context.Context) ([]Workspace, error) + Register func(context.Context, string, string) (WorkspaceRegisterResult, error) + Resolve func(context.Context, string) (Workspace, error) + Sync func(context.Context) (WorkspaceSyncResult, error) + Update func(context.Context, string, WorkspaceUpdateInput) (Workspace, error) + type WorkspaceSocketHeartbeatPayload struct + TS time.Time + WorkspaceID string + type WorkspaceSocketMessage struct + ID string + Payload json.RawMessage + Type string + func WorkspaceErrorSocketMessage(payload TransportError) (WorkspaceSocketMessage, error) + func WorkspaceEventSocketMessage(event WorkspaceEvent) (WorkspaceSocketMessage, error) + func WorkspaceHeartbeatSocketMessage(workspaceID string, now time.Time) (WorkspaceSocketMessage, error) + func WorkspaceOverflowSocketMessage(workspaceID string, now time.Time, reason string) (WorkspaceSocketMessage, error) + type WorkspaceSocketOverflowPayload struct + Reason string + TS time.Time + WorkspaceID string + type WorkspaceStreamItem struct + Event *WorkspaceEvent + Overflow *WorkspaceStreamOverflow + type WorkspaceStreamOverflow struct + Reason string + type WorkspaceSyncResult = contract.WorkspaceSyncResult + type WorkspaceUpdateInput = contract.WorkspaceUpdateInput