/** * ServiceContainer — Central dependency injection and session-scoped caching. * * Replaces the 1022-line base-command.ts monolith. Creates all services once * per session and reuses them across MCP tool calls. * * Usage: * const container = await ServiceContainer.create({ projectRoot: '/path/to/project' }); * const taskService = container.taskService; * const result = await taskService.startTask({ issueNumber: 42 }); */ import type { IGraphQLClient, IIssueRepository, IProjectRepository, IRepositoryRepository, IEpicRepository, ITaskService, ITaskTransitionValidator, IContainerService, IEpicService, IIntegrityValidator, IDependencyService, IProjectConfig, IWorkflowConfig, IGitWorkflowConfig, IAuditService, IAnalyticsService, IAgentService, IComplianceService, IWorkDistributionService, IMergeReadinessService } from './interfaces.js'; import type { ILogger } from '../shared/logger.js'; import type { IEventBus } from '../shared/events/index.js'; import type { MethodologyProfile } from '../profiles/types.js'; export interface ServiceContainerConfig { /** Absolute path to the project root (containing .ido4/ directory) */ projectRoot: string; /** GitHub token override (otherwise reads from env / gh CLI) */ githubToken?: string; /** Logger instance (defaults to NoopLogger if not provided) */ logger?: ILogger; /** Session ID for log/event correlation (auto-generated if omitted) */ sessionId?: string; /** Agent identity for multi-agent scenarios */ agentId?: string; /** Event bus instance (defaults to InMemoryEventBus if not provided) */ eventBus?: IEventBus; } export declare class ServiceContainer { readonly sessionId: string; readonly agentId?: string; readonly eventBus: IEventBus; readonly logger: ILogger; readonly profile: MethodologyProfile; readonly projectConfig: IProjectConfig; readonly workflowConfig: IWorkflowConfig; readonly gitWorkflowConfig: IGitWorkflowConfig; readonly graphqlClient: IGraphQLClient; readonly issueRepository: IIssueRepository; readonly projectRepository: IProjectRepository; readonly repositoryRepository: IRepositoryRepository; readonly epicRepository: IEpicRepository; readonly taskService: ITaskService; readonly taskTransitionValidator: ITaskTransitionValidator; readonly containerService: IContainerService; readonly epicService: IEpicService; readonly integrityValidator: IIntegrityValidator; readonly dependencyService: IDependencyService; readonly auditService: IAuditService; readonly analyticsService: IAnalyticsService; readonly agentService: IAgentService; readonly complianceService: IComplianceService; readonly workDistributionService: IWorkDistributionService; readonly mergeReadinessService: IMergeReadinessService; private constructor(); /** * Create a fully initialized ServiceContainer. * * Loads project config, initializes GitHub client, constructs all services. * Call once per MCP session, reuse across tool calls. * * 9-layer initialization: * 1. Defaults (session ID, logger, event bus) * 2. Configuration (project config, workflow config, git workflow config) * 3. Infrastructure (credential manager, GraphQL client, repositories) * 4-5. Domain Services (epic, dependency, audit, agents, BRE) * 6. Facade (workflow, suggestion, task, container services) * 7. Analytics + Compliance * 8. Work Distribution * 9. Merge Readiness */ static create(config: ServiceContainerConfig): Promise; } //# sourceMappingURL=service-container.d.ts.map