import type { OrganizationPortabilityEnvInput, OrganizationPortabilityFileEntry, OrganizationPortabilityInclude, OrganizationPortabilitySidebarOrder } from "@rudderhq/shared";
import { type ResolvedSource } from "./organization-portability.core.js";
export declare function normalizeInclude(input?: Partial<OrganizationPortabilityInclude>): OrganizationPortabilityInclude;
export declare function normalizePortablePath(input: string): string;
export declare function resolvePortablePath(fromPath: string, targetPath: string): string;
export declare function isPortableBinaryFile(value: OrganizationPortabilityFileEntry): value is Extract<OrganizationPortabilityFileEntry, {
    encoding: "base64";
}>;
export declare function readPortableTextFile(files: Record<string, OrganizationPortabilityFileEntry>, filePath: string): string | null;
export declare function inferContentTypeFromPath(filePath: string): "image/svg+xml" | "image/png" | "image/jpeg" | "image/gif" | "image/webp" | null;
export declare function resolveCompanyLogoExtension(contentType: string | null | undefined, originalFilename: string | null | undefined): string;
export declare function portableBinaryFileToBuffer(entry: Extract<OrganizationPortabilityFileEntry, {
    encoding: "base64";
}>): Buffer<ArrayBuffer>;
export declare function portableFileToBuffer(entry: OrganizationPortabilityFileEntry, filePath: string): Buffer<ArrayBuffer>;
export declare function bufferToPortableBinaryFile(buffer: Buffer, contentType: string | null): OrganizationPortabilityFileEntry;
export declare function streamToBuffer(stream: NodeJS.ReadableStream): Promise<Buffer<ArrayBuffer>>;
export declare function normalizeFileMap(files: Record<string, OrganizationPortabilityFileEntry>, rootPath?: string | null): Record<string, OrganizationPortabilityFileEntry>;
export declare function pickTextFiles(files: Record<string, OrganizationPortabilityFileEntry>): Record<string, string>;
export declare function collectSelectedExportSlugs(selectedFiles: Set<string>): {
    agents: Set<string>;
    projects: Set<string>;
    tasks: Set<string>;
    automations: Set<string>;
};
export declare function normalizePortableSlugList(value: unknown): string[];
export declare function normalizePortableSidebarOrder(value: unknown): OrganizationPortabilitySidebarOrder | null;
export declare function sortAgentsBySidebarOrder<T extends {
    id: string;
    name: string;
    reportsTo: string | null;
}>(agents: T[]): T[];
export declare function filterPortableExtensionYaml(yaml: string, selectedFiles: Set<string>): string;
export declare function filterExportFiles(files: Record<string, OrganizationPortabilityFileEntry>, selectedFilesInput: string[] | undefined, rudderExtensionPath: string): Record<string, OrganizationPortabilityFileEntry>;
export declare function findPaperclipExtensionPath(files: Record<string, OrganizationPortabilityFileEntry>): string | null;
export declare function ensureMarkdownPath(pathValue: string): string;
export declare function normalizePortableConfig(value: unknown): Record<string, unknown>;
export declare function isAbsoluteCommand(value: string): boolean;
export declare function extractPortableEnvInputs(agentSlug: string, envValue: unknown, warnings: string[]): OrganizationPortabilityEnvInput[];
export declare function jsonEqual(left: unknown, right: unknown): boolean;
export declare function isPathDefault(pathSegments: string[], value: unknown, rules: Array<{
    path: string[];
    value: unknown;
}>): boolean;
export declare function pruneDefaultLikeValue(value: unknown, opts: {
    dropFalseBooleans: boolean;
    path?: string[];
    defaultRules?: Array<{
        path: string[];
        value: unknown;
    }>;
}): unknown;
export declare function renderYamlScalar(value: unknown): string;
export declare function isEmptyObject(value: unknown): boolean;
export declare function isEmptyArray(value: unknown): boolean;
export declare function stripEmptyValues(value: unknown, opts?: {
    preserveEmptyStrings?: boolean;
}): unknown;
export declare const YAML_KEY_PRIORITY: readonly ["name", "description", "title", "schema", "kind", "slug", "reportsTo", "skills", "owner", "assignee", "project", "schedule", "version", "license", "authors", "homepage", "tags", "includes", "requirements", "role", "icon", "capabilities", "brandColor", "logoPath", "adapter", "runtime", "permissions", "budgetMonthlyCents", "metadata"];
export declare const YAML_KEY_PRIORITY_INDEX: Map<string, number>;
export declare function compareYamlKeys(left: string, right: string): number;
export declare function orderedYamlEntries(value: Record<string, unknown>): [string, unknown][];
export declare function renderYamlBlock(value: unknown, indentLevel: number): string[];
export declare function renderFrontmatter(frontmatter: Record<string, unknown>): string;
export declare function buildMarkdown(frontmatter: Record<string, unknown>, body: string): string;
export declare function normalizeSelectedFiles(selectedFiles?: string[]): Set<string> | null;
export declare function filterCompanyMarkdownIncludes(companyPath: string, markdown: string, selectedFiles: Set<string>): string;
export declare function applySelectedFilesToSource(source: ResolvedSource, selectedFiles?: string[]): ResolvedSource;
//# sourceMappingURL=organization-portability.files.d.ts.map