import type { AgencyConfig } from "../../config/config.js"; export type BundleFile = { /** Upload key — the basename, which is all statelog's flat store keeps. */ name: string; contents: string; /** Real on-disk path — passed as `sourcePath` so the pre-flight compile * resolves this file's relative imports against its siblings. */ absPath: string; }; export type AgencyBundle = { /** Basename of the entrypoint file, echoed as the upload's `entrypoint`. */ entrypoint: string; files: BundleFile[]; }; export type CollectBundleResult = { ok: true; bundle: AgencyBundle; } | { ok: false; error: string; }; /** * Collect the entrypoint and every local `.agency` file it imports * (transitively) into one flat bundle. Refuses agents statelog cannot host: * imports that resolve outside the entrypoint's directory (the flat store can't * represent subpaths), and local TypeScript/JavaScript interop imports (the * server only compiles `.agency` source). */ export declare function collectAgencyBundle(entrypointPath: string, config: AgencyConfig): CollectBundleResult; export type ValidateResult = { ok: true; } | { ok: false; error: string; }; /** * Compile each bundle file locally for fast feedback before the upload. Each is * compiled at its real path (`sourcePath`), so a file's relative `.agency` * imports resolve against its siblings — the same way statelog compiles them. * A pass here is a pre-flight, not a guarantee the server (which may run a * different agency-lang) accepts it. */ export declare function validateBundleCompiles(bundle: AgencyBundle, config: AgencyConfig): ValidateResult;