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:
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user