import type { Logger } from '@takeshape/logger';
import type { AgentJSON, FormConfig, GuardJSON, ProjectSchemaJSON, QueryJSON, ServiceConfigJSON, ShapeJSON, ToolJSON, Workflow } from '../project-schema/index.ts';
import type { EncryptFn, SafeDecryptFn } from '../services/types.ts';
export type ProjectSchemaMigrationContext = {
    label: string;
    generateDataKeyFn: () => Promise<string>;
    encryptFn: EncryptFn;
    decryptFn: SafeDecryptFn;
    logger: Logger;
};
export declare const AGENTS_UPDATE_KEY = "agents";
export declare const GUARDS_UPDATE_KEY = "guards";
export declare const MCP_TOOLS_UPDATE_KEY = "mcp.tools";
export type ProjectSchemaUpdate = {
    queries?: Record<string, QueryJSON | null>;
    mutations?: Record<string, QueryJSON | null>;
    shapes?: Record<string, ShapeJSON | null>;
    [AGENTS_UPDATE_KEY]?: Record<string, AgentJSON | null>;
    [GUARDS_UPDATE_KEY]?: Record<string, GuardJSON | null>;
    [MCP_TOOLS_UPDATE_KEY]?: Record<string, ToolJSON | null>;
    forms?: Record<string, FormConfig | null>;
    workflows?: Record<string, Workflow | null>;
    services?: Record<string, ServiceConfigJSON | null>;
    deactivated?: number;
} & Omit<Partial<ProjectSchemaJSON>, 'queries' | 'mutations' | 'shapes' | 'agents' | 'guards' | 'mcp' | 'forms' | 'workflows' | 'services'>;
export type MigrateFunction<FromSchema, ToSchema> = (context: ProjectSchemaMigrationContext, fromSchema: FromSchema) => Promise<ToSchema>;
