import type { CanonicalGjcWorkflowSkill } from "../skill-state/active-state"; export interface NormalizeLegacyStateResult { state: Record; changed: boolean; } export interface MigrateAndPersistLegacyStateArgs { cwd: string; skill: string; statePath: string; sessionId: string; } export interface MigrateAndPersistLegacyStateResult { migrated: boolean; path: string; } export interface MigrateWorkflowStateResult { state: Record; fromVersion: number; toVersion: number; changed: boolean; } export type WorkflowStateMigration = (state: Record, skill: CanonicalGjcWorkflowSkill) => Record; export declare function migrateWorkflowState(raw: Record, skill: string): MigrateWorkflowStateResult; /** * Pure legacy state normalizer for background/internal readers. * * Readers that need compatibility with old on-disk workflow state shapes must call * this in-memory helper and must never call `migrateAndPersistLegacyState`. The * persist variant is reserved for explicit state migration commands because it is * the only path allowed to write normalized upgrades back to `.gjc/state/**`. */ export declare function normalizeLegacyState(raw: Record, skill: string): NormalizeLegacyStateResult; export declare function migrateAndPersistLegacyState(args: MigrateAndPersistLegacyStateArgs): Promise;