feat(14-08): add phaseDispatchManager to TestHarness
- Import PhaseDispatchManager type and DefaultPhaseDispatchManager - Add phaseDispatchManager property to TestHarness interface - Wire DefaultPhaseDispatchManager with phaseRepository and eventBus
This commit is contained in:
@@ -15,8 +15,9 @@ import { MockAgentManager, type MockAgentScenario } from '../agent/mock-manager.
|
|||||||
import type { PendingQuestions, QuestionItem } from '../agent/types.js';
|
import type { PendingQuestions, QuestionItem } from '../agent/types.js';
|
||||||
import type { Decision, PhaseBreakdown, TaskBreakdown } from '../agent/schema.js';
|
import type { Decision, PhaseBreakdown, TaskBreakdown } from '../agent/schema.js';
|
||||||
import type { WorktreeManager, Worktree, WorktreeDiff, MergeResult } from '../git/types.js';
|
import type { WorktreeManager, Worktree, WorktreeDiff, MergeResult } from '../git/types.js';
|
||||||
import type { DispatchManager } from '../dispatch/types.js';
|
import type { DispatchManager, PhaseDispatchManager } from '../dispatch/types.js';
|
||||||
import { DefaultDispatchManager } from '../dispatch/manager.js';
|
import { DefaultDispatchManager } from '../dispatch/manager.js';
|
||||||
|
import { DefaultPhaseDispatchManager } from '../dispatch/phase-manager.js';
|
||||||
import type { CoordinationManager } from '../coordination/types.js';
|
import type { CoordinationManager } from '../coordination/types.js';
|
||||||
import { DefaultCoordinationManager } from '../coordination/manager.js';
|
import { DefaultCoordinationManager } from '../coordination/manager.js';
|
||||||
import type { TaskRepository } from '../db/repositories/task-repository.js';
|
import type { TaskRepository } from '../db/repositories/task-repository.js';
|
||||||
@@ -195,6 +196,8 @@ export interface TestHarness {
|
|||||||
worktreeManager: MockWorktreeManager;
|
worktreeManager: MockWorktreeManager;
|
||||||
/** Real dispatch manager wired to mocks */
|
/** Real dispatch manager wired to mocks */
|
||||||
dispatchManager: DispatchManager;
|
dispatchManager: DispatchManager;
|
||||||
|
/** Real phase dispatch manager wired to phaseRepository */
|
||||||
|
phaseDispatchManager: PhaseDispatchManager;
|
||||||
/** Real coordination manager wired to mocks */
|
/** Real coordination manager wired to mocks */
|
||||||
coordinationManager: CoordinationManager;
|
coordinationManager: CoordinationManager;
|
||||||
|
|
||||||
@@ -418,6 +421,11 @@ export function createTestHarness(): TestHarness {
|
|||||||
eventBus
|
eventBus
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const phaseDispatchManager = new DefaultPhaseDispatchManager(
|
||||||
|
phaseRepository,
|
||||||
|
eventBus
|
||||||
|
);
|
||||||
|
|
||||||
const coordinationManager = new DefaultCoordinationManager(
|
const coordinationManager = new DefaultCoordinationManager(
|
||||||
worktreeManager,
|
worktreeManager,
|
||||||
taskRepository,
|
taskRepository,
|
||||||
@@ -453,6 +461,7 @@ export function createTestHarness(): TestHarness {
|
|||||||
mockAgentManager: agentManager, // Alias for clarity in tests
|
mockAgentManager: agentManager, // Alias for clarity in tests
|
||||||
worktreeManager,
|
worktreeManager,
|
||||||
dispatchManager,
|
dispatchManager,
|
||||||
|
phaseDispatchManager,
|
||||||
coordinationManager,
|
coordinationManager,
|
||||||
|
|
||||||
// Repositories
|
// Repositories
|
||||||
|
|||||||
Reference in New Issue
Block a user