fix: wire errand repository through tRPC adapter
ErrandRepository was instantiated in the container but never passed from TrpcAdapterOptions into createContext(), causing all errand procedures to throw "Errand repository not available" at runtime.
This commit is contained in:
@@ -22,6 +22,7 @@ import type { LogChunkRepository } from '../db/repositories/log-chunk-repository
|
|||||||
import type { ConversationRepository } from '../db/repositories/conversation-repository.js';
|
import type { ConversationRepository } from '../db/repositories/conversation-repository.js';
|
||||||
import type { ChatSessionRepository } from '../db/repositories/chat-session-repository.js';
|
import type { ChatSessionRepository } from '../db/repositories/chat-session-repository.js';
|
||||||
import type { ReviewCommentRepository } from '../db/repositories/review-comment-repository.js';
|
import type { ReviewCommentRepository } from '../db/repositories/review-comment-repository.js';
|
||||||
|
import type { ErrandRepository } from '../db/repositories/errand-repository.js';
|
||||||
import type { AccountCredentialManager } from '../agent/credentials/types.js';
|
import type { AccountCredentialManager } from '../agent/credentials/types.js';
|
||||||
import type { DispatchManager, PhaseDispatchManager } from '../dispatch/types.js';
|
import type { DispatchManager, PhaseDispatchManager } from '../dispatch/types.js';
|
||||||
import type { CoordinationManager } from '../coordination/types.js';
|
import type { CoordinationManager } from '../coordination/types.js';
|
||||||
@@ -82,6 +83,8 @@ export interface TrpcAdapterOptions {
|
|||||||
reviewCommentRepository?: ReviewCommentRepository;
|
reviewCommentRepository?: ReviewCommentRepository;
|
||||||
/** Project sync manager for remote fetch/sync operations */
|
/** Project sync manager for remote fetch/sync operations */
|
||||||
projectSyncManager?: ProjectSyncManager;
|
projectSyncManager?: ProjectSyncManager;
|
||||||
|
/** Errand repository for errand CRUD operations */
|
||||||
|
errandRepository?: ErrandRepository;
|
||||||
/** Absolute path to the workspace root (.cwrc directory) */
|
/** Absolute path to the workspace root (.cwrc directory) */
|
||||||
workspaceRoot?: string;
|
workspaceRoot?: string;
|
||||||
}
|
}
|
||||||
@@ -166,6 +169,7 @@ export function createTrpcHandler(options: TrpcAdapterOptions) {
|
|||||||
chatSessionRepository: options.chatSessionRepository,
|
chatSessionRepository: options.chatSessionRepository,
|
||||||
reviewCommentRepository: options.reviewCommentRepository,
|
reviewCommentRepository: options.reviewCommentRepository,
|
||||||
projectSyncManager: options.projectSyncManager,
|
projectSyncManager: options.projectSyncManager,
|
||||||
|
errandRepository: options.errandRepository,
|
||||||
workspaceRoot: options.workspaceRoot,
|
workspaceRoot: options.workspaceRoot,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user