/**
 * TanStack Start CDN build preparation.
 *
 * Before `vite build`, ensures:
 * 1. A server entry exists with TanStack `transformAssets` wired to Agentuity CDN env
 * 2. Vite `base` is empty so client-side lazy chunks resolve against the CDN entry
 *
 * Changes are applied to the project tree for the duration of the build and reverted
 * afterward when we generated or patched files (same pattern as buildFileReplacements).
 */
/** Default TanStack Start server entry when the scaffold omitted one. */
export declare const GENERATED_TANSTACK_SERVER_TS = "/**\n * Agentuity CDN wiring for TanStack Start (generated during agentuity build).\n * @see https://tanstack.com/start/latest/docs/framework/react/guide/cdn-asset-urls\n */\nimport {\n\tcreateStartHandler,\n\tdefaultStreamHandler,\n} from '@tanstack/react-start/server';\nimport { createServerEntry } from '@tanstack/react-start/server-entry';\n\nfunction resolveCdnOrigin(): string | undefined {\n\tconst explicit = process.env.AGENTUITY_CDN_ORIGIN?.replace(/\\/+$/, '');\n\tif (explicit) return explicit;\n\tconst deploymentId = process.env.AGENTUITY_CLOUD_DEPLOYMENT_ID;\n\treturn deploymentId ? `https://cdn.agentuity.com/${deploymentId}` : undefined;\n}\n\nconst cdnOrigin = resolveCdnOrigin();\n\nconst handler = createStartHandler({\n\thandler: defaultStreamHandler,\n\ttransformAssets: cdnOrigin\n\t\t? { prefix: cdnOrigin, crossOrigin: 'anonymous' }\n\t\t: undefined,\n});\n\nexport default createServerEntry({ fetch: handler });\n";
export interface TanStackCdnBuildPreparation {
    cleanup: () => void;
    logs: string[];
}
export declare function findTanStackServerEntry(projectDir: string): string | null;
export declare function findViteConfigPath(projectDir: string): string | null;
/** Inject `base: ''` when unset, or replace `base: '/'` for CDN-relative chunks. */
export declare function patchViteConfigBase(source: string): {
    content: string;
    changed: boolean;
};
export declare function prepareTanStackCdnBuild(projectDir: string, logger: {
    debug: (...args: unknown[]) => void;
}): TanStackCdnBuildPreparation;
//# sourceMappingURL=cdn-build.d.ts.map