/** * @fractary/core - Manager Factories * * Factory functions for creating authenticated managers. * Provides a convenient way to create WorkManager and RepoManager * with automatic configuration loading and authentication. */ import { WorkManager } from './work'; import { RepoManager } from './repo'; import { LoadedConfig } from './config/loader'; /** * Options for creating managers */ export interface CreateManagerOptions { /** Pre-loaded configuration (optional - will load if not provided) */ config?: LoadedConfig; /** Working directory for repository operations */ cwd?: string; /** Skip authentication (use existing gh CLI auth instead) */ skipAuth?: boolean; } /** * Create an authenticated WorkManager * * Loads configuration automatically and creates a WorkManager * with proper authentication. * * @param options Creation options * @returns Configured WorkManager instance * * @example * ```typescript * // Simple usage - auto-loads config and auth * const workManager = await createWorkManager(); * const issues = await workManager.searchIssues('bug'); * * // With pre-loaded config * const config = await loadConfig(); * const workManager = await createWorkManager({ config }); * ``` */ export declare function createWorkManager(options?: CreateManagerOptions): Promise; /** * Create an authenticated RepoManager * * Loads configuration automatically and creates a RepoManager * with proper authentication. * * @param options Creation options * @returns Configured RepoManager instance * * @example * ```typescript * // Simple usage - auto-loads config and auth * const repoManager = await createRepoManager(); * const status = repoManager.getStatus(); * * // With explicit working directory * const repoManager = await createRepoManager({ cwd: '/path/to/repo' }); * * // With pre-loaded config * const config = await loadConfig(); * const repoManager = await createRepoManager({ config }); * ``` */ export declare function createRepoManager(options?: CreateManagerOptions): Promise; /** * Create both WorkManager and RepoManager with shared config * * Useful when you need both managers and want to share * configuration and authentication. * * @param options Creation options * @returns Object with both managers * * @example * ```typescript * const { work, repo } = await createManagers(); * * // Fetch issue and create branch * const issue = await work.fetchIssue(123); * await repo.createBranch(`feature/${issue.number}-${slug(issue.title)}`); * ``` */ export declare function createManagers(options?: CreateManagerOptions): Promise<{ work: WorkManager; repo: RepoManager; }>; //# sourceMappingURL=factories.d.ts.map