import { GlobalOptions } from "../types.js";
import { Workspace } from "../commands/workspace/workspace.js";
import { ScriptLanguage } from "./script_common.js";
import { SyncCodebase } from "./codebase.js";
export declare class LockfileGenerationError extends Error {
    constructor(message: string);
}
export declare function generateAllMetadata(): Promise<void>;
export declare function getRawWorkspaceDependencies(): Promise<Record<string, string>>;
export declare function workspaceDependenciesPathToLanguageAndFilename(path: string): {
    name: string | undefined;
    language: ScriptLanguage;
} | undefined;
export declare function blueColor(): Promise<(x: string) => void>;
export declare function generateScriptMetadataInternal(scriptPath: string, workspace: Workspace, opts: GlobalOptions & {
    lockOnly?: boolean | undefined;
    schemaOnly?: boolean | undefined;
    defaultTs?: "bun" | "deno";
}, dryRun: boolean, noStaleMessage: boolean, rawWorkspaceDependencies: Record<string, string>, codebases: SyncCodebase[], justUpdateMetadataLock?: boolean): Promise<string | undefined>;
export declare function updateScriptSchema(scriptContent: string, language: ScriptLanguage, metadataContent: Record<string, any>, path: string): Promise<void>;
export declare function inferSchema(language: ScriptLanguage, content: string, currentSchema: any, path: string): Promise<{
    schema: any;
    has_preprocessor: boolean | undefined;
    no_main_func: boolean | undefined;
}>;
export declare function replaceLock(o?: {
    lock?: string | string[];
}): void;
export declare function parseMetadataFile(scriptPath: string, generateMetadataIfMissing: (GlobalOptions & {
    path: string;
    workspaceRemote: Workspace;
    schemaOnly?: boolean;
    rawWorkspaceDependencies: Record<string, string>;
    codebases: SyncCodebase[];
}) | undefined): Promise<{
    isJson: boolean;
    payload: any;
    path: string;
}>;
interface Lock {
    version?: "v2";
    locks?: {
        [path: string]: string | {
            [subpath: string]: string;
        };
    };
}
export declare function readLockfile(): Promise<Lock>;
export declare function checkifMetadataUptodate(path: string, hash: string, conf: Lock | undefined, subpath?: string): Promise<boolean>;
export declare function generateScriptHash(rawWorkspaceDependencies: Record<string, string>, scriptContent: string, newMetadataContent: string): Promise<string>;
export declare function clearGlobalLock(path: string): Promise<void>;
export declare function updateMetadataGlobalLock(path: string, hash: string, subpath?: string): Promise<void>;
export {};
//# sourceMappingURL=metadata.d.ts.map