/** Transactional host service for committing one converted v2 definition. */ import type { BotConfig } from '../../bot-registry.js'; import { type LoadedSavedWorkflowRevision, type SavedWorkflowMetadata, type SavedWorkflowOwner, type SavedWorkflowScope } from '../v3/library-schema.js'; import { type LegacyDefinitionIdentity, type LegacyMigrationRevisionRecord, type LegacyMigrationSourceRecord } from './v2-ledger.js'; import { type LegacyMigrationIssue } from './v2-to-v3.js'; export type LegacyMigrationCommitPhase = 'after-pending' | 'after-library-write' | 'after-publish'; export interface CommitLegacyWorkflowMigrationInput { dataDir: string; sourcePath: string; bots: BotConfig[]; owner: SavedWorkflowOwner; scope: SavedWorkflowScope; chatType?: 'group' | 'p2p'; acknowledgeWarnings?: boolean; /** Explicit recovery when an unmaterialized pending allocation lost its library CAS base. */ supersedePending?: boolean; now?: Date; /** Crash-injection/test seam. Production callers omit it. */ onPhase?: (phase: LegacyMigrationCommitPhase) => void | Promise; } export interface CommitLegacyWorkflowMigrationResult { identity: LegacyDefinitionIdentity; source: LegacyMigrationSourceRecord; revisionRecord: LegacyMigrationRevisionRecord; metadata: SavedWorkflowMetadata; revision: LoadedSavedWorkflowRevision; createdWorkflow: boolean; appendedRevision: boolean; issues: LegacyMigrationIssue[]; } export declare class LegacyWorkflowConversionError extends Error { readonly issues: LegacyMigrationIssue[]; constructor(issues: LegacyMigrationIssue[]); } export declare class LegacyWorkflowMigrationConflictError extends Error { constructor(message: string); } /** Commit one source revision. Definitions in a batch remain independent. */ export declare function commitLegacyWorkflowMigration(input: CommitLegacyWorkflowMigrationInput): Promise; //# sourceMappingURL=v2-migration-service.d.ts.map