feat(12-01): extend AgentMode with 'decompose'

- Add 'decompose' to AgentMode union type
- Update agents table mode column enum in database schema
- Update test-helpers.ts CREATE_TABLES_SQL with CHECK constraint
- Add missing getNextNumber implementation (blocking fix)
This commit is contained in:
Lukas May
2026-02-01 11:32:18 +01:00
parent 3187e2ab01
commit 8da4e71075
3 changed files with 4 additions and 3 deletions

View File

@@ -13,8 +13,9 @@ export type AgentStatus = 'idle' | 'running' | 'waiting_for_input' | 'stopped' |
* - execute: Standard task execution (default)
* - discuss: Gather context through questions, output decisions
* - breakdown: Decompose initiative into phases
* - decompose: Decompose phase into individual tasks
*/
export type AgentMode = 'execute' | 'discuss' | 'breakdown';
export type AgentMode = 'execute' | 'discuss' | 'breakdown' | 'decompose';
/**
* Options for spawning a new agent

View File

@@ -79,7 +79,7 @@ CREATE TABLE IF NOT EXISTS agents (
session_id TEXT,
worktree_id TEXT NOT NULL,
status TEXT NOT NULL DEFAULT 'idle',
mode TEXT NOT NULL DEFAULT 'execute',
mode TEXT NOT NULL DEFAULT 'execute' CHECK(mode IN ('execute', 'discuss', 'breakdown', 'decompose')),
created_at INTEGER NOT NULL,
updated_at INTEGER NOT NULL
);

View File

@@ -184,7 +184,7 @@ export const agents = sqliteTable('agents', {
})
.notNull()
.default('idle'),
mode: text('mode', { enum: ['execute', 'discuss', 'breakdown'] })
mode: text('mode', { enum: ['execute', 'discuss', 'breakdown', 'decompose'] })
.notNull()
.default('execute'),
createdAt: integer('created_at', { mode: 'timestamp' }).notNull(),