type BundleMode = "managed" | "external";
type AgentLike = {
    id: string;
    orgId: string;
    name: string;
    role?: string | null;
    workspaceKey?: string | null;
    agentRuntimeConfig: unknown;
};
type AgentInstructionsFileSummary = {
    path: string;
    size: number;
    language: string;
    markdown: boolean;
    isEntryFile: boolean;
    editable: boolean;
    deprecated: boolean;
    virtual: boolean;
};
type AgentInstructionsFileDetail = AgentInstructionsFileSummary & {
    content: string;
    editable: boolean;
};
type AgentInstructionsBundle = {
    agentId: string;
    orgId: string;
    mode: BundleMode | null;
    rootPath: string | null;
    managedRootPath: string;
    entryFile: string;
    resolvedEntryPath: string | null;
    editable: boolean;
    warnings: string[];
    legacyPromptTemplateActive: boolean;
    legacyBootstrapPromptTemplateActive: boolean;
    files: AgentInstructionsFileSummary[];
};
type ReconciledBundleResult = {
    bundle: AgentInstructionsBundle;
    agentRuntimeConfig: Record<string, unknown>;
    changed: boolean;
};
type BundleState = {
    config: Record<string, unknown>;
    mode: BundleMode | null;
    rootPath: string | null;
    entryFile: string;
    resolvedEntryPath: string | null;
    warnings: string[];
    legacyPromptTemplateActive: boolean;
    legacyBootstrapPromptTemplateActive: boolean;
};
export declare function syncInstructionsBundleConfigFromFilePath(agent: AgentLike, agentRuntimeConfig: Record<string, unknown>): Record<string, unknown>;
export declare function agentInstructionsService(): {
    getBundle: (agent: AgentLike) => Promise<AgentInstructionsBundle>;
    reconcileBundle: (agent: AgentLike) => Promise<ReconciledBundleResult>;
    readFile: (agent: AgentLike, relativePath: string) => Promise<AgentInstructionsFileDetail>;
    updateBundle: (agent: AgentLike, input: {
        mode?: BundleMode;
        rootPath?: string | null;
        entryFile?: string;
        clearLegacyPromptTemplate?: boolean;
    }) => Promise<{
        bundle: AgentInstructionsBundle;
        agentRuntimeConfig: Record<string, unknown>;
    }>;
    writeFile: (agent: AgentLike, relativePath: string, content: string, options?: {
        clearLegacyPromptTemplate?: boolean;
    }) => Promise<{
        bundle: AgentInstructionsBundle;
        file: AgentInstructionsFileDetail;
        agentRuntimeConfig: Record<string, unknown>;
    }>;
    deleteFile: (agent: AgentLike, relativePath: string) => Promise<{
        bundle: AgentInstructionsBundle;
        agentRuntimeConfig: Record<string, unknown>;
    }>;
    exportFiles: (agent: AgentLike) => Promise<{
        files: Record<string, string>;
        entryFile: string;
        warnings: string[];
    }>;
    ensureManagedBundle: (agent: AgentLike, options?: {
        clearLegacyPromptTemplate?: boolean;
    }) => Promise<{
        agentRuntimeConfig: Record<string, unknown>;
        state: BundleState;
    }>;
    materializeManagedBundle: (agent: AgentLike, files: Record<string, string>, options?: {
        clearLegacyPromptTemplate?: boolean;
        replaceExisting?: boolean;
        entryFile?: string;
    }) => Promise<{
        bundle: AgentInstructionsBundle;
        agentRuntimeConfig: Record<string, unknown>;
    }>;
};
export {};
//# sourceMappingURL=agent-instructions.d.ts.map