mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 09:13:08 +00:00
chore(06-01): create index.ts with exports
- Export AutoModeServiceFacade class - Export createAutoModeFacade convenience factory function - Re-export all types from types.ts for route consumption - Re-export types from extracted services (AutoModeConfig, RunningFeature, etc.) All 1809 server tests pass.
This commit is contained in:
71
apps/server/src/services/auto-mode/index.ts
Normal file
71
apps/server/src/services/auto-mode/index.ts
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
/**
|
||||||
|
* Auto Mode Service Module
|
||||||
|
*
|
||||||
|
* Entry point for auto-mode functionality. Exports:
|
||||||
|
* - AutoModeServiceFacade: Clean facade for auto-mode operations
|
||||||
|
* - createAutoModeFacade: Convenience factory function
|
||||||
|
* - Types for route consumption
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Main facade export
|
||||||
|
export { AutoModeServiceFacade } from './facade.js';
|
||||||
|
|
||||||
|
// Convenience factory function
|
||||||
|
import { AutoModeServiceFacade } from './facade.js';
|
||||||
|
import type { FacadeOptions } from './types.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an AutoModeServiceFacade instance for a specific project.
|
||||||
|
*
|
||||||
|
* This is a convenience wrapper around AutoModeServiceFacade.create().
|
||||||
|
*
|
||||||
|
* @param projectPath - The project path this facade operates on
|
||||||
|
* @param options - Configuration options including events, settingsService, featureLoader
|
||||||
|
* @returns A new AutoModeServiceFacade instance
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* ```typescript
|
||||||
|
* import { createAutoModeFacade } from './services/auto-mode';
|
||||||
|
*
|
||||||
|
* const facade = createAutoModeFacade('/path/to/project', {
|
||||||
|
* events: eventEmitter,
|
||||||
|
* settingsService,
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
* // Start auto mode
|
||||||
|
* await facade.startAutoLoop(null, 3);
|
||||||
|
*
|
||||||
|
* // Check status
|
||||||
|
* const status = facade.getStatusForProject();
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
export function createAutoModeFacade(
|
||||||
|
projectPath: string,
|
||||||
|
options: FacadeOptions
|
||||||
|
): AutoModeServiceFacade {
|
||||||
|
return AutoModeServiceFacade.create(projectPath, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type exports from types.ts
|
||||||
|
export type {
|
||||||
|
FacadeOptions,
|
||||||
|
AutoModeStatus,
|
||||||
|
ProjectAutoModeStatus,
|
||||||
|
WorktreeCapacityInfo,
|
||||||
|
RunningAgentInfo,
|
||||||
|
OrphanedFeatureInfo,
|
||||||
|
} from './types.js';
|
||||||
|
|
||||||
|
// Re-export types from extracted services for route convenience
|
||||||
|
export type {
|
||||||
|
AutoModeConfig,
|
||||||
|
ProjectAutoLoopState,
|
||||||
|
RunningFeature,
|
||||||
|
AcquireParams,
|
||||||
|
WorktreeInfo,
|
||||||
|
PipelineContext,
|
||||||
|
PipelineStatusInfo,
|
||||||
|
PlanApprovalResult,
|
||||||
|
ResolveApprovalResult,
|
||||||
|
ExecutionState,
|
||||||
|
} from './types.js';
|
||||||
Reference in New Issue
Block a user