feat(11-04): add initiative and phase repositories to tRPC context
- Import InitiativeRepository and PhaseRepository types - Add optional initiativeRepository to TRPCContext interface - Add optional phaseRepository to TRPCContext interface - Update CreateContextOptions and createContext function
This commit is contained in:
@@ -9,6 +9,8 @@ import type { EventBus, DomainEvent } from '../events/types.js';
|
||||
import type { AgentManager } from '../agent/types.js';
|
||||
import type { TaskRepository } from '../db/repositories/task-repository.js';
|
||||
import type { MessageRepository } from '../db/repositories/message-repository.js';
|
||||
import type { InitiativeRepository } from '../db/repositories/initiative-repository.js';
|
||||
import type { PhaseRepository } from '../db/repositories/phase-repository.js';
|
||||
import type { DispatchManager } from '../dispatch/types.js';
|
||||
import type { CoordinationManager } from '../coordination/types.js';
|
||||
|
||||
@@ -35,6 +37,10 @@ export interface TRPCContext {
|
||||
dispatchManager?: DispatchManager;
|
||||
/** Coordination manager for merge queue operations (optional until server wiring complete) */
|
||||
coordinationManager?: CoordinationManager;
|
||||
/** Initiative repository for initiative CRUD operations (optional until server wiring complete) */
|
||||
initiativeRepository?: InitiativeRepository;
|
||||
/** Phase repository for phase CRUD operations (optional until server wiring complete) */
|
||||
phaseRepository?: PhaseRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,6 +55,8 @@ export interface CreateContextOptions {
|
||||
messageRepository?: MessageRepository;
|
||||
dispatchManager?: DispatchManager;
|
||||
coordinationManager?: CoordinationManager;
|
||||
initiativeRepository?: InitiativeRepository;
|
||||
phaseRepository?: PhaseRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,5 +75,7 @@ export function createContext(options: CreateContextOptions): TRPCContext {
|
||||
messageRepository: options.messageRepository,
|
||||
dispatchManager: options.dispatchManager,
|
||||
coordinationManager: options.coordinationManager,
|
||||
initiativeRepository: options.initiativeRepository,
|
||||
phaseRepository: options.phaseRepository,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user