import type { MastraCodeState } from '@mastra/code-sdk/schema'; import type { AgentController } from '@mastra/core/agent-controller'; import { RequestContext } from '@mastra/core/request-context'; import type { MemorySettingsStorage } from '../storage/domains/memory-settings/base.js'; import type { SourceControlStorageHandle } from '../storage/domains/source-control/base.js'; import type { CreateWorkItemInput, WorkItemsStorage } from '../storage/domains/work-items/base.js'; import type { FactoryTransitionService } from './transition-service.js'; import type { FactoryRuleStage, FactoryTransitionResult } from './types.js'; export interface FactoryStartRequest { orgId: string; userId: string; factoryProjectId: string; sessionId: string; threadTitle: string; kickoffKey: string; /** Where the arrival path lands the card; a session opened on an existing card names none. */ destinationStage?: FactoryRuleStage; defaultModelId?: string; workItem: { id?: string; role: string; input: CreateWorkItemInput; }; requestContext?: RequestContext; } export declare class FactoryStartTransitionError extends Error { readonly result: Extract; constructor(result: Extract); } export interface FactoryStartPreparedResult { workItemId: string; bindingId: string; threadId: string; resourceId: string; sessionId: string; branch: string; revision: number; kickoffStatus: 'pending' | 'leased' | 'retry' | 'sent' | 'failed'; replayed: boolean; } type FactoryController = AgentController; export declare class FactoryStartCoordinator { #private; constructor(controller: FactoryController, storage: WorkItemsStorage, transitionService?: Pick, sourceControl?: SourceControlStorageHandle, memorySettings?: MemorySettingsStorage); prepare(request: FactoryStartRequest): Promise; } export {}; //# sourceMappingURL=start-coordinator.d.ts.map