|
|
|
|
@@ -90,6 +90,7 @@ interface TaskRow {
|
|
|
|
|
attachments: string | null;
|
|
|
|
|
steeringComments: string | null;
|
|
|
|
|
comments: string | null;
|
|
|
|
|
review: string | null;
|
|
|
|
|
workflowStepResults: string | null;
|
|
|
|
|
prInfo: string | null;
|
|
|
|
|
issueInfo: string | null;
|
|
|
|
|
@@ -751,6 +752,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
|
|
|
|
});
|
|
|
|
|
return deduped.length > 0 ? deduped : undefined;
|
|
|
|
|
})(),
|
|
|
|
|
review: fromJson<import("./types.js").TaskReview>(row.review) ?? undefined,
|
|
|
|
|
workflowStepResults: (() => { const w = fromJson<import("./types.js").WorkflowStepResult[]>(row.workflowStepResults); return w && w.length > 0 ? w : undefined; })(),
|
|
|
|
|
prInfo: fromJson<import("./types.js").PrInfo>(row.prInfo),
|
|
|
|
|
issueInfo: fromJson<import("./types.js").IssueInfo>(row.issueInfo),
|
|
|
|
|
@@ -813,6 +815,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
|
|
|
|
sourceIssue: slim ? undefined : entry.sourceIssue,
|
|
|
|
|
attachments: slim ? undefined : entry.attachments,
|
|
|
|
|
comments: entry.comments,
|
|
|
|
|
review: slim ? undefined : entry.review,
|
|
|
|
|
log: slim ? [] : entry.log ?? [],
|
|
|
|
|
timedExecutionMs: slim ? this.computeTimedExecutionMs(entry.log) : undefined,
|
|
|
|
|
createdAt: entry.createdAt,
|
|
|
|
|
@@ -936,6 +939,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
|
|
|
|
sourceIssue: task.sourceIssue,
|
|
|
|
|
attachments: task.attachments,
|
|
|
|
|
comments: task.comments,
|
|
|
|
|
review: task.review,
|
|
|
|
|
prompt,
|
|
|
|
|
...agentLogFields,
|
|
|
|
|
log: [{ timestamp: archivedAt, action: "Task archived" }],
|
|
|
|
|
@@ -1014,7 +1018,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
|
|
|
|
"error", "summary", "thinkingLevel", "executionMode",
|
|
|
|
|
"tokenUsageInputTokens", "tokenUsageOutputTokens", "tokenUsageCachedTokens", "tokenUsageTotalTokens", "tokenUsageFirstUsedAt", "tokenUsageLastUsedAt",
|
|
|
|
|
"createdAt", "updatedAt", "columnMovedAt", "executionStartedAt", "executionCompletedAt",
|
|
|
|
|
"dependencies", "steps", "comments", "workflowStepResults", "steeringComments",
|
|
|
|
|
"dependencies", "steps", "comments", "review", "workflowStepResults", "steeringComments",
|
|
|
|
|
"attachments", "prInfo", "issueInfo", "sourceIssueProvider", "sourceIssueRepository", "sourceIssueExternalIssueId", "sourceIssueNumber", "sourceIssueUrl", "mergeDetails",
|
|
|
|
|
"breakIntoSubtasks", "enabledWorkflowSteps", "modifiedFiles",
|
|
|
|
|
"missionId", "sliceId", "assignedAgentId", "pausedByAgentId", "assigneeUserId", "nodeId", "effectiveNodeId", "effectiveNodeSource",
|
|
|
|
|
@@ -1064,7 +1068,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
|
|
|
|
"tokenUsageInputTokens", "tokenUsageOutputTokens", "tokenUsageCachedTokens", "tokenUsageTotalTokens", "tokenUsageFirstUsedAt", "tokenUsageLastUsedAt",
|
|
|
|
|
"createdAt", "updatedAt", "columnMovedAt", "executionStartedAt", "executionCompletedAt",
|
|
|
|
|
"dependencies", "steps", "attachments", "steeringComments",
|
|
|
|
|
"comments", "workflowStepResults", "prInfo", "issueInfo", "sourceIssueProvider", "sourceIssueRepository", "sourceIssueExternalIssueId", "sourceIssueNumber", "sourceIssueUrl", "mergeDetails",
|
|
|
|
|
"comments", "review", "workflowStepResults", "prInfo", "issueInfo", "sourceIssueProvider", "sourceIssueRepository", "sourceIssueExternalIssueId", "sourceIssueNumber", "sourceIssueUrl", "mergeDetails",
|
|
|
|
|
"breakIntoSubtasks", "enabledWorkflowSteps", "modifiedFiles",
|
|
|
|
|
"missionId", "sliceId", "assignedAgentId", "pausedByAgentId", "assigneeUserId", "nodeId", "effectiveNodeId", "effectiveNodeSource",
|
|
|
|
|
"sourceType", "sourceAgentId", "sourceRunId", "sourceSessionId", "sourceMessageId", "sourceParentTaskId", "sourceMetadata",
|
|
|
|
|
@@ -1107,11 +1111,11 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
|
|
|
|
tokenUsageTotalTokens, tokenUsageFirstUsedAt, tokenUsageLastUsedAt, createdAt, updatedAt, columnMovedAt,
|
|
|
|
|
executionStartedAt, executionCompletedAt,
|
|
|
|
|
dependencies, steps, log, attachments, steeringComments,
|
|
|
|
|
comments, workflowStepResults, prInfo, issueInfo,
|
|
|
|
|
comments, review, workflowStepResults, prInfo, issueInfo,
|
|
|
|
|
sourceIssueProvider, sourceIssueRepository, sourceIssueExternalIssueId, sourceIssueNumber, sourceIssueUrl,
|
|
|
|
|
mergeDetails, breakIntoSubtasks, enabledWorkflowSteps, modifiedFiles, missionId, sliceId, assignedAgentId, pausedByAgentId, assigneeUserId, nodeId, effectiveNodeId, effectiveNodeSource, sourceType, sourceAgentId, sourceRunId, sourceSessionId, sourceMessageId, sourceParentTaskId, sourceMetadata, checkedOutBy, checkedOutAt
|
|
|
|
|
) VALUES (
|
|
|
|
|
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
|
|
|
|
|
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
|
|
|
|
|
)
|
|
|
|
|
ON CONFLICT(id) DO UPDATE SET
|
|
|
|
|
title = excluded.title,
|
|
|
|
|
@@ -1166,6 +1170,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
|
|
|
|
attachments = excluded.attachments,
|
|
|
|
|
steeringComments = excluded.steeringComments,
|
|
|
|
|
comments = excluded.comments,
|
|
|
|
|
review = excluded.review,
|
|
|
|
|
workflowStepResults = excluded.workflowStepResults,
|
|
|
|
|
prInfo = excluded.prInfo,
|
|
|
|
|
issueInfo = excluded.issueInfo,
|
|
|
|
|
@@ -1249,6 +1254,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
|
|
|
|
toJson(task.attachments || []),
|
|
|
|
|
toJson(task.steeringComments || []),
|
|
|
|
|
toJson(task.comments || []),
|
|
|
|
|
toJsonNullable(task.review),
|
|
|
|
|
toJson(task.workflowStepResults || []),
|
|
|
|
|
toJsonNullable(task.prInfo),
|
|
|
|
|
toJsonNullable(task.issueInfo),
|
|
|
|
|
@@ -3170,7 +3176,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
|
|
|
|
|
|
|
|
|
async updateTask(
|
|
|
|
|
id: string,
|
|
|
|
|
updates: { title?: string; description?: string; priority?: TaskPriority | null; prompt?: string; worktree?: string | null; status?: string | null; dependencies?: string[]; steps?: import("./types.js").TaskStep[]; currentStep?: number; blockedBy?: string | null; assignedAgentId?: string | null; pausedByAgentId?: string | null; assigneeUserId?: string | null; nodeId?: string | null; effectiveNodeId?: string | null; effectiveNodeSource?: string | null; checkedOutBy?: string | null; checkedOutAt?: string | null; paused?: boolean; baseBranch?: string | null; branch?: string | null; executionStartBranch?: string | null; baseCommitSha?: string | null; size?: "S" | "M" | "L"; reviewLevel?: number; executionMode?: import("./types.js").ExecutionMode | null; mergeRetries?: number; workflowStepRetries?: number; stuckKillCount?: number | null; postReviewFixCount?: number | null; recoveryRetryCount?: number | null; taskDoneRetryCount?: number | null; verificationFailureCount?: number | null; mergeConflictBounceCount?: number | null; nextRecoveryAt?: string | null; enabledWorkflowSteps?: string[]; modelProvider?: string | null; modelId?: string | null; validatorModelProvider?: string | null; validatorModelId?: string | null; planningModelProvider?: string | null; planningModelId?: string | null; thinkingLevel?: string | null; error?: string | null; summary?: string | null; sessionFile?: string | null; executionStartedAt?: string | null; executionCompletedAt?: string | null; workflowStepResults?: import("./types.js").WorkflowStepResult[] | null; mergeDetails?: import("./types.js").MergeDetails | null; sourceIssue?: import("./types.js").TaskSourceIssue | null; tokenUsage?: import("./types.js").TaskTokenUsage | null; modifiedFiles?: string[] | null; missionId?: string | null; sliceId?: string | null },
|
|
|
|
|
updates: { title?: string; description?: string; priority?: TaskPriority | null; prompt?: string; worktree?: string | null; status?: string | null; dependencies?: string[]; steps?: import("./types.js").TaskStep[]; currentStep?: number; blockedBy?: string | null; assignedAgentId?: string | null; pausedByAgentId?: string | null; assigneeUserId?: string | null; nodeId?: string | null; effectiveNodeId?: string | null; effectiveNodeSource?: string | null; checkedOutBy?: string | null; checkedOutAt?: string | null; paused?: boolean; baseBranch?: string | null; branch?: string | null; executionStartBranch?: string | null; baseCommitSha?: string | null; size?: "S" | "M" | "L"; reviewLevel?: number; executionMode?: import("./types.js").ExecutionMode | null; mergeRetries?: number; workflowStepRetries?: number; stuckKillCount?: number | null; postReviewFixCount?: number | null; recoveryRetryCount?: number | null; taskDoneRetryCount?: number | null; verificationFailureCount?: number | null; mergeConflictBounceCount?: number | null; nextRecoveryAt?: string | null; enabledWorkflowSteps?: string[]; modelProvider?: string | null; modelId?: string | null; validatorModelProvider?: string | null; validatorModelId?: string | null; planningModelProvider?: string | null; planningModelId?: string | null; thinkingLevel?: string | null; error?: string | null; summary?: string | null; sessionFile?: string | null; executionStartedAt?: string | null; executionCompletedAt?: string | null; review?: import("./types.js").TaskReview | null; workflowStepResults?: import("./types.js").WorkflowStepResult[] | null; mergeDetails?: import("./types.js").MergeDetails | null; sourceIssue?: import("./types.js").TaskSourceIssue | null; tokenUsage?: import("./types.js").TaskTokenUsage | null; modifiedFiles?: string[] | null; missionId?: string | null; sliceId?: string | null },
|
|
|
|
|
runContext?: RunMutationContext,
|
|
|
|
|
): Promise<Task> {
|
|
|
|
|
return this.withTaskLock(id, async () => {
|
|
|
|
|
@@ -3440,6 +3446,11 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
|
|
|
|
} else if (updates.executionCompletedAt !== undefined) {
|
|
|
|
|
task.executionCompletedAt = updates.executionCompletedAt;
|
|
|
|
|
}
|
|
|
|
|
if (updates.review === null) {
|
|
|
|
|
task.review = undefined;
|
|
|
|
|
} else if (updates.review !== undefined) {
|
|
|
|
|
task.review = updates.review;
|
|
|
|
|
}
|
|
|
|
|
if (updates.workflowStepResults === null) {
|
|
|
|
|
task.workflowStepResults = undefined;
|
|
|
|
|
} else if (updates.workflowStepResults !== undefined) {
|
|
|
|
|
@@ -6088,6 +6099,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
|
|
|
|
size: entry.size,
|
|
|
|
|
reviewLevel: entry.reviewLevel,
|
|
|
|
|
prInfo: entry.prInfo,
|
|
|
|
|
review: entry.review,
|
|
|
|
|
issueInfo: entry.issueInfo,
|
|
|
|
|
sourceIssue: entry.sourceIssue,
|
|
|
|
|
attachments: entry.attachments,
|
|
|
|
|
|