feat(11-03): add mode field to AgentRepository

- Add AgentMode import to agent-repository.ts
- Add mode optional field to CreateAgentData interface
- Update DrizzleAgentRepository.create() to handle mode (default 'execute')
This commit is contained in:
Lukas May
2026-01-31 19:11:12 +01:00
parent 3bf7e2c9cb
commit 75f8887b53
2 changed files with 3 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
*/
import type { Agent } from '../schema.js';
import type { AgentMode } from '../../agent/types.js';
/**
* Agent status values.
@@ -22,6 +23,7 @@ export interface CreateAgentData {
taskId?: string | null;
sessionId?: string | null;
status?: AgentStatus;
mode?: AgentMode; // Defaults to 'execute' if not provided
}
/**

View File

@@ -34,6 +34,7 @@ export class DrizzleAgentRepository implements AgentRepository {
sessionId: data.sessionId ?? null,
worktreeId: data.worktreeId,
status: data.status ?? 'idle',
mode: data.mode ?? 'execute',
createdAt: now,
updatedAt: now,
});