feat(FN-2246): add executionMode support to task APIs and storage

- Add ExecutionMode type contracts and executionMode field to core task interfaces
- Persist executionMode through SQLite schema mappings and TaskStore read/write paths
- Validate executionMode in dashboard route handlers and API request handling
- Expand core and dashboard test coverage for executionMode persistence and route behavior
This commit is contained in:
Fusion
2026-04-22 10:34:11 -07:00
committed by gsxdsm
parent 46b80323e4
commit 086dbe80bd
14 changed files with 325 additions and 28 deletions

View File

@@ -51,7 +51,7 @@ describe("TaskStore task documents", () => {
expect(tableNames.has("task_documents")).toBe(true);
expect(tableNames.has("task_document_revisions")).toBe(true);
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
const index = db
.prepare(

View File

@@ -131,7 +131,7 @@ describe("Database", () => {
});
it("seeds schema version", () => {
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
});
it("seeds lastModified", () => {
@@ -154,7 +154,7 @@ describe("Database", () => {
it("is idempotent - calling init() twice does not fail", () => {
expect(() => db.init()).not.toThrow();
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
});
it("does not overwrite existing config on re-init", () => {
@@ -761,7 +761,7 @@ describe("schema migrations", () => {
db.init();
// Verify version bumped to 29 (includes v1→v2 through v26→v29)
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
// Verify new columns exist and existing data is intact
const cols = db.prepare("PRAGMA table_info(tasks)").all() as Array<{ name: string }>;
@@ -786,11 +786,11 @@ describe("schema migrations", () => {
const db = new Database(kbDir);
db.init();
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
// Re-init should not fail
db.init();
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
db.close();
});
@@ -806,7 +806,7 @@ describe("schema migrations", () => {
db.init();
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'agentRatings'").all() as Array<{ name: string }>;
expect(tables).toEqual([{ name: "agentRatings" }]);
@@ -830,7 +830,7 @@ describe("schema migrations", () => {
db.init();
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'mission_events'").all() as Array<{ name: string }>;
expect(tables).toEqual([{ name: "mission_events" }]);
@@ -934,7 +934,7 @@ describe("schema migrations", () => {
db.init();
// Verify version bumped to 29
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
// Verify new columns exist and existing data is intact
const cols = db.prepare("PRAGMA table_info(tasks)").all() as Array<{ name: string }>;
@@ -1303,7 +1303,7 @@ describe("createDatabase factory", () => {
const db = createDatabase(kbDir);
db.init();
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
expect(db.getLastModified()).toBeGreaterThan(0);
db.close();

View File

@@ -59,7 +59,7 @@ export function fromJson<T>(json: string | null | undefined): T | undefined {
// ── Schema Definition ────────────────────────────────────────────────
const SCHEMA_VERSION = 40;
const SCHEMA_VERSION = 42;
function normalizeTaskComments(
steeringComments: SteeringComment[] | undefined,
@@ -151,6 +151,7 @@ CREATE TABLE IF NOT EXISTS tasks (
error TEXT,
summary TEXT,
thinkingLevel TEXT,
executionMode TEXT DEFAULT 'standard',
createdAt TEXT NOT NULL,
updatedAt TEXT NOT NULL,
columnMovedAt TEXT,
@@ -1633,6 +1634,21 @@ export class Database {
});
}
// Task execution mode contract (FN-2246)
// Adds executionMode column to tasks table with default 'standard'.
// Normalizes null/empty legacy values to 'standard'.
if (version < 42) {
this.applyMigration(42, () => {
this.addColumnIfMissing("tasks", "executionMode", "TEXT DEFAULT 'standard'");
// Normalize any existing null/empty executionMode values to 'standard'
this.db.exec(`
UPDATE tasks
SET executionMode = 'standard'
WHERE executionMode IS NULL OR executionMode = '' OR executionMode NOT IN ('standard', 'fast')
`);
});
}
}
/**

View File

@@ -1,5 +1,5 @@
export { COLUMNS, COLUMN_LABELS, COLUMN_DESCRIPTIONS, VALID_TRANSITIONS, DEFAULT_SETTINGS, DEFAULT_GLOBAL_SETTINGS, DEFAULT_PROJECT_SETTINGS, GLOBAL_SETTINGS_KEYS, PROJECT_SETTINGS_KEYS, isGlobalSettingsKey, isProjectSettingsKey, THINKING_LEVELS, THEME_MODES, COLOR_THEMES, WORKFLOW_STEP_TEMPLATES, AGENT_PERMISSIONS, agentToConfigSnapshot, diffConfigSnapshots, isEphemeralAgent, hasAgentIdentity, CheckoutConflictError } from "./types.js";
export type { Column, IssueInfo, IssueState, PrInfo, PrStatus, Task, TaskAttachment, TaskComment, TaskCommentInput, TaskDocument, TaskDocumentRevision, TaskDocumentCreateInput, TaskDocumentWithTask, TaskCreateInput, TaskDetail, InboxTask, AgentLogEntry, AgentLogType, AgentRole, BoardConfig, MergeDetails, MergeResult, Settings, GlobalSettings, ProjectSettings, SettingsScope, DaemonTokenSettings, TaskStep, StepStatus, TaskLogEntry, RunMutationContext, ActivityLogEntry, ActivityEventType, ThinkingLevel, ThemeMode, ColorTheme, PlanningQuestion, PlanningSummary, PlanningResponse, PlanningQuestionType, ArchivedTaskEntry, BatchStatusRequest, BatchStatusResponse, BatchStatusEntry, BatchStatusResult, ModelPreset, WorkflowStep, WorkflowStepMode, WorkflowStepPhase, WorkflowStepInput, WorkflowStepResult, WorkflowStepTemplate, Agent, OrgTreeNode, AgentState, AgentDetail, AgentCreateInput, AgentUpdateInput, AgentApiKey, AgentApiKeyCreateResult, AgentCapability, AgentPromptTemplate, AgentPromptsConfig, AgentPermission, TaskAssignSource, AgentAccessState, AgentHeartbeatConfig, AgentBudgetConfig, AgentBudgetStatus, InstructionsBundleConfig, MessageResponseMode, AgentHeartbeatEvent, AgentHeartbeatRun, BlockedStateSnapshot, HeartbeatInvocationSource, AgentTaskSession, AgentRating, AgentRatingSummary, AgentRatingInput, AgentConfigSnapshot, RevisionFieldDiff, AgentConfigRevision, AgentStats, ReflectionTrigger, ReflectionMetrics, AgentReflection, AgentPerformanceSummary, NtfyNotificationEvent, SteeringComment, ParticipantType, MessageType, Message, MessageCreateInput, MessageFilter, Mailbox, CheckoutLease, RunAuditDomain, RunAuditEvent, RunAuditEventInput, RunAuditEventFilter } from "./types.js";
export { COLUMNS, COLUMN_LABELS, COLUMN_DESCRIPTIONS, VALID_TRANSITIONS, DEFAULT_SETTINGS, DEFAULT_GLOBAL_SETTINGS, DEFAULT_PROJECT_SETTINGS, GLOBAL_SETTINGS_KEYS, PROJECT_SETTINGS_KEYS, isGlobalSettingsKey, isProjectSettingsKey, THINKING_LEVELS, THEME_MODES, COLOR_THEMES, WORKFLOW_STEP_TEMPLATES, AGENT_PERMISSIONS, agentToConfigSnapshot, diffConfigSnapshots, isEphemeralAgent, hasAgentIdentity, CheckoutConflictError, EXECUTION_MODES, DEFAULT_EXECUTION_MODE } from "./types.js";
export type { Column, IssueInfo, IssueState, PrInfo, PrStatus, Task, TaskAttachment, TaskComment, TaskCommentInput, TaskDocument, TaskDocumentRevision, TaskDocumentCreateInput, TaskDocumentWithTask, TaskCreateInput, TaskDetail, InboxTask, AgentLogEntry, AgentLogType, AgentRole, BoardConfig, MergeDetails, MergeResult, Settings, GlobalSettings, ProjectSettings, SettingsScope, DaemonTokenSettings, TaskStep, StepStatus, TaskLogEntry, RunMutationContext, ActivityLogEntry, ActivityEventType, ThinkingLevel, ThemeMode, ColorTheme, ExecutionMode, PlanningQuestion, PlanningSummary, PlanningResponse, PlanningQuestionType, ArchivedTaskEntry, BatchStatusRequest, BatchStatusResponse, BatchStatusEntry, BatchStatusResult, ModelPreset, WorkflowStep, WorkflowStepMode, WorkflowStepPhase, WorkflowStepInput, WorkflowStepResult, WorkflowStepTemplate, Agent, OrgTreeNode, AgentState, AgentDetail, AgentCreateInput, AgentUpdateInput, AgentApiKey, AgentApiKeyCreateResult, AgentCapability, AgentPromptTemplate, AgentPromptsConfig, AgentPermission, TaskAssignSource, AgentAccessState, AgentHeartbeatConfig, AgentBudgetConfig, AgentBudgetStatus, InstructionsBundleConfig, MessageResponseMode, AgentHeartbeatEvent, AgentHeartbeatRun, BlockedStateSnapshot, HeartbeatInvocationSource, AgentTaskSession, AgentRating, AgentRatingSummary, AgentRatingInput, AgentConfigSnapshot, RevisionFieldDiff, AgentConfigRevision, AgentStats, ReflectionTrigger, ReflectionMetrics, AgentReflection, AgentPerformanceSummary, NtfyNotificationEvent, SteeringComment, ParticipantType, MessageType, Message, MessageCreateInput, MessageFilter, Mailbox, CheckoutLease, RunAuditDomain, RunAuditEvent, RunAuditEventInput, RunAuditEventFilter } from "./types.js";
export { AGENT_VALID_TRANSITIONS } from "./types.js";
export {
BUILTIN_AGENT_PROMPTS,

View File

@@ -776,7 +776,7 @@ describe("Migration: pre-33 DB upgrade", () => {
// Step 1: Create a fresh database at v33 (runs all migrations up to 33)
const db1 = createDatabase(legacyDir);
db1.init();
expect(db1.getSchemaVersion()).toBe(41);
expect(db1.getSchemaVersion()).toBe(42);
db1.close();
// Step 2: Manually downgrade to version 32 and drop insight tables
@@ -811,7 +811,7 @@ describe("Migration: pre-33 DB upgrade", () => {
expect(tableNamesBefore).not.toContain("project_insight_runs");
// Now run init — this triggers the v32→v33 migration
db3.init();
expect(db3.getSchemaVersion()).toBe(41);
expect(db3.getSchemaVersion()).toBe(42);
// Step 4: Verify insight tables exist after migration
const tablesAfter = db3.prepare(
@@ -842,12 +842,12 @@ describe("Migration: pre-33 DB upgrade", () => {
try {
const db1 = createDatabase(testDir);
db1.init();
expect(db1.getSchemaVersion()).toBe(41);
expect(db1.getSchemaVersion()).toBe(42);
db1.close();
const db2 = createDatabase(testDir);
expect(() => db2.init()).not.toThrow();
expect(db2.getSchemaVersion()).toBe(41);
expect(db2.getSchemaVersion()).toBe(42);
db2.close();
} finally {
rmSync(testDir, { recursive: true, force: true });

View File

@@ -2628,7 +2628,7 @@ describe("MissionStore", () => {
describe("Loop State & Validator Run Schema (v31)", () => {
it("schema version is 40 after migration", () => {
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
});
it("mission_features table has loop state columns", () => {

View File

@@ -739,7 +739,7 @@ describe("RoadmapStore", () => {
describe("schema version", () => {
it("schema version is 40 after init", () => {
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
});
});

View File

@@ -465,7 +465,7 @@ describe("Run Audit", () => {
});
it("schema version is bumped to 40", () => {
expect(db.getSchemaVersion()).toBe(41);
expect(db.getSchemaVersion()).toBe(42);
});
});
});

View File

@@ -3348,6 +3348,89 @@ describe("TaskStore", () => {
});
});
describe("executionMode persistence", () => {
it("sets executionMode to 'fast' via createTask and persists", async () => {
const created = await store.createTask({
description: "Task with fast execution mode",
executionMode: "fast",
});
expect(created.executionMode).toBe("fast");
const persisted = await store.getTask(created.id);
expect(persisted.executionMode).toBe("fast");
});
it("sets executionMode to 'standard' via createTask and persists", async () => {
const created = await store.createTask({
description: "Task with standard execution mode",
executionMode: "standard",
});
expect(created.executionMode).toBe("standard");
const persisted = await store.getTask(created.id);
expect(persisted.executionMode).toBe("standard");
});
it("persists executionMode as 'standard' by default when not specified", async () => {
const created = await store.createTask({
description: "Task without execution mode",
});
// The field should be undefined in the Task object (optional field)
expect(created.executionMode).toBeUndefined();
const persisted = await store.getTask(created.id);
// The persisted value should be 'standard' in the database
expect(persisted.executionMode).toBeUndefined();
});
it("updates executionMode via updateTask", async () => {
const created = await store.createTask({
description: "Task for execution mode update",
executionMode: "standard",
});
expect(created.executionMode).toBe("standard");
const updated = await store.updateTask(created.id, { executionMode: "fast" });
expect(updated.executionMode).toBe("fast");
const reloaded = await store.getTask(created.id);
expect(reloaded.executionMode).toBe("fast");
});
it("clears executionMode via null in updateTask", async () => {
const task = await store.createTask({
description: "Task with execution mode to clear",
executionMode: "fast",
});
expect(task.executionMode).toBe("fast");
const updated = await store.updateTask(task.id, { executionMode: null });
expect(updated.executionMode).toBeUndefined();
});
it("preserves executionMode when updating unrelated fields", async () => {
const task = await store.createTask({
description: "Task with execution mode to preserve",
executionMode: "fast",
});
const updated = await store.updateTask(task.id, { title: "Updated title" });
expect(updated.executionMode).toBe("fast");
expect(updated.title).toBe("Updated title");
});
it("returns executionMode in listTasks", async () => {
await store.createTask({ description: "Fast task", executionMode: "fast" });
await store.createTask({ description: "Unspecified task" });
const tasks = await store.listTasks();
const fastTask = tasks.find((t) => t.description === "Fast task");
const unspecifiedTask = tasks.find((t) => t.description === "Unspecified task");
expect(fastTask?.executionMode).toBe("fast");
expect(unspecifiedTask?.executionMode).toBeUndefined();
});
});
describe("updateTask — PROMPT.md regeneration", () => {
it("regenerates PROMPT.md when title is updated", async () => {
const task = await store.createTask({ description: "Test task", column: "todo" });

View File

@@ -366,6 +366,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
error: row.error || undefined,
summary: row.summary || undefined,
thinkingLevel: row.thinkingLevel || undefined,
executionMode: row.executionMode || undefined,
createdAt: row.createdAt,
updatedAt: row.updatedAt,
columnMovedAt: row.columnMovedAt || undefined,
@@ -612,7 +613,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
"validatorModelProvider", "validatorModelId",
"planningModelProvider", "planningModelId",
"mergeRetries", "workflowStepRetries", "stuckKillCount", "postReviewFixCount", "recoveryRetryCount", "taskDoneRetryCount", "nextRecoveryAt",
"error", "summary", "thinkingLevel",
"error", "summary", "thinkingLevel", "executionMode",
"createdAt", "updatedAt", "columnMovedAt",
"dependencies", "steps", "comments", "workflowStepResults", "steeringComments",
"attachments", "prInfo", "issueInfo", "mergeDetails",
@@ -630,7 +631,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
"validatorModelProvider", "validatorModelId",
"planningModelProvider", "planningModelId",
"mergeRetries", "workflowStepRetries", "stuckKillCount", "postReviewFixCount", "recoveryRetryCount", "taskDoneRetryCount", "nextRecoveryAt",
"error", "summary", "thinkingLevel",
"error", "summary", "thinkingLevel", "executionMode",
"createdAt", "updatedAt", "columnMovedAt",
"dependencies", "steps", "attachments", "steeringComments",
"comments", "workflowStepResults", "prInfo", "issueInfo", "mergeDetails",
@@ -671,13 +672,13 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
worktree, blockedBy, paused, baseBranch, branch, baseCommitSha, modelPresetId, modelProvider,
modelId, validatorModelProvider, validatorModelId, planningModelProvider, planningModelId, mergeRetries,
workflowStepRetries, stuckKillCount, postReviewFixCount, recoveryRetryCount, taskDoneRetryCount, nextRecoveryAt, error,
summary, thinkingLevel, createdAt, updatedAt, columnMovedAt,
summary, thinkingLevel, executionMode, createdAt, updatedAt, columnMovedAt,
dependencies, steps, log, attachments, steeringComments,
comments, workflowStepResults, prInfo, issueInfo, mergeDetails,
breakIntoSubtasks, enabledWorkflowSteps, modifiedFiles, missionId, sliceId, assignedAgentId, assigneeUserId, checkedOutBy, checkedOutAt
) VALUES (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)
ON CONFLICT(id) DO UPDATE SET
title = excluded.title,
@@ -710,6 +711,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
error = excluded.error,
summary = excluded.summary,
thinkingLevel = excluded.thinkingLevel,
executionMode = excluded.executionMode,
createdAt = excluded.createdAt,
updatedAt = excluded.updatedAt,
columnMovedAt = excluded.columnMovedAt,
@@ -764,6 +766,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
task.error ?? null,
task.summary ?? null,
task.thinkingLevel ?? null,
task.executionMode ?? null,
task.createdAt,
task.updatedAt,
task.columnMovedAt ?? null,
@@ -1683,6 +1686,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
planningModelId: input.planningModelId,
thinkingLevel: input.thinkingLevel,
reviewLevel: input.reviewLevel,
executionMode: input.executionMode,
missionId: input.missionId,
sliceId: input.sliceId,
steps: [],
@@ -2211,7 +2215,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
async updateTask(
id: string,
updates: { title?: string; description?: string; prompt?: string; worktree?: string | null; status?: string | null; dependencies?: string[]; steps?: import("./types.js").TaskStep[]; blockedBy?: string | null; assignedAgentId?: string | null; assigneeUserId?: string | null; checkedOutBy?: string | null; checkedOutAt?: string | null; paused?: boolean; baseBranch?: string | null; branch?: string | null; baseCommitSha?: string | null; size?: "S" | "M" | "L"; reviewLevel?: number; mergeRetries?: number; workflowStepRetries?: number; stuckKillCount?: number | null; postReviewFixCount?: number | null; recoveryRetryCount?: number | null; taskDoneRetryCount?: 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; workflowStepResults?: import("./types.js").WorkflowStepResult[] | null; mergeDetails?: import("./types.js").MergeDetails | null; modifiedFiles?: string[] | null; missionId?: string | null; sliceId?: string | null },
updates: { title?: string; description?: string; prompt?: string; worktree?: string | null; status?: string | null; dependencies?: string[]; steps?: import("./types.js").TaskStep[]; blockedBy?: string | null; assignedAgentId?: string | null; assigneeUserId?: string | null; checkedOutBy?: string | null; checkedOutAt?: string | null; paused?: boolean; baseBranch?: string | null; branch?: 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; 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; workflowStepResults?: import("./types.js").WorkflowStepResult[] | null; mergeDetails?: import("./types.js").MergeDetails | null; modifiedFiles?: string[] | null; missionId?: string | null; sliceId?: string | null },
runContext?: RunMutationContext,
): Promise<Task> {
return this.withTaskLock(id, async () => {
@@ -2369,6 +2373,11 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
} else if (updates.thinkingLevel !== undefined) {
task.thinkingLevel = updates.thinkingLevel as import("./types.js").ThinkingLevel;
}
if (updates.executionMode === null) {
task.executionMode = undefined;
} else if (updates.executionMode !== undefined) {
task.executionMode = updates.executionMode as import("./types.js").ExecutionMode;
}
if (updates.error === null) {
task.error = undefined;
} else if (updates.error !== undefined) {

View File

@@ -5,6 +5,18 @@ export type ThinkingLevel = (typeof THINKING_LEVELS)[number];
export const COLUMNS = ["triage", "todo", "in-progress", "in-review", "done", "archived"] as const;
export type Column = (typeof COLUMNS)[number];
/**
* Execution mode for task implementation.
* Controls how the executor agent approaches the task:
* - "standard": Full execution with complete review workflow (default)
* - "fast": Expedited execution with minimal overhead for simple tasks
*/
export const EXECUTION_MODES = ["standard", "fast"] as const;
export type ExecutionMode = (typeof EXECUTION_MODES)[number];
/** Default execution mode for new tasks */
export const DEFAULT_EXECUTION_MODE: ExecutionMode = "standard";
/** Theme mode for light/dark/system preference */
export const THEME_MODES = ["dark", "light", "system"] as const;
export type ThemeMode = (typeof THEME_MODES)[number];
@@ -747,6 +759,11 @@ export interface Task {
nextRecoveryAt?: string;
/** Thinking level for AI agent sessions — controls reasoning effort (off/minimal/low/medium/high) */
thinkingLevel?: ThinkingLevel;
/** Execution mode for task implementation.
* - "standard": Full execution with complete review workflow (default)
* - "fast": Expedited execution with minimal overhead for simple tasks
* Defaults to "standard" when not specified. */
executionMode?: ExecutionMode;
/** Explicitly assigned agent ID for task-agent linking. Distinct from Agent.taskId active execution state. */
assignedAgentId?: string;
/** Explicitly assigned user ID for task-user linking. Used during review handoff to indicate
@@ -831,6 +848,11 @@ export interface TaskCreateInput {
assigneeUserId?: string;
/** Review level for task execution — controls review rigor: 0=None, 1=Plan Only, 2=Plan and Code, 3=Full */
reviewLevel?: number;
/** Execution mode for task implementation.
* - "standard": Full execution with complete review workflow (default)
* - "fast": Expedited execution with minimal overhead for simple tasks
* Defaults to "standard" when not specified. */
executionMode?: ExecutionMode;
}
// ── Settings Scope Types ────────────────────────────────────────────────
@@ -1503,6 +1525,10 @@ export interface ArchivedTaskEntry {
currentStep: number;
size?: "S" | "M" | "L";
reviewLevel?: number;
/** Execution mode for task implementation at time of archival.
* - "standard": Full execution with complete review workflow (default)
* - "fast": Expedited execution with minimal overhead for simple tasks */
executionMode?: ExecutionMode;
prInfo?: PrInfo;
issueInfo?: IssueInfo;
/** Attachment metadata (filenames, mime types, etc.) without file content */