/** * Split-launcher / foreign-build `import.meta.url` handling. * * Atomic's release binaries use a split launcher: a tiny compiled `atomic` / * `atomic.exe` executable sets `ATOMIC_CODING_AGENT=true` and then dynamically * imports the bundled sidecar `app.js` (plus raw-TS built-in extensions) from * disk next to the executable. * * Unlike pi's single monolithic `bun --compile` binary — where `import.meta.url` * is always a `$bunfs://` virtual-FS URL — the split sidecar bundle carries the * build machine's source path baked in at bundle time (e.g. a macOS * `file:///Users/.../app.js` URL). On Windows, `fileURLToPath()` rejects that * URL with `ERR_INVALID_FILE_URL_PATH` ("File URL path must be an absolute * path") because `/Users/...` has no drive letter, so every site that decodes * `import.meta.url` to a filesystem path must tolerate it. * * These helpers centralize that tolerance: decode normally, and only when the * decode fails under the split launcher fall back to a path resolved relative to * the launcher executable (where the sidecar bundle and its assets actually * live). This mirrors pi's convention of a single detection point rather than * scattered ad-hoc guards. */ export declare function isSplitLauncherRuntime(): boolean; /** Directory containing the launcher executable and its sidecar bundle/assets. */ export declare function splitLauncherDir(): string; /** * Resolve a module's directory from its `import.meta.url`, tolerating the * split-launcher case where the bundled URL is a foreign-OS build path. * `execRelativeSegments` locate the equivalent directory next to the launcher. */ export declare function moduleDirFromMetaUrl(metaUrl: string, ...execRelativeSegments: string[]): string; /** * Resolve a module's filename from its `import.meta.url`, tolerating the * split-launcher case. `execRelativeFile` locates the equivalent file next to * the launcher (used as a stable resolution base, e.g. for `createRequire`). */ export declare function moduleFileFromMetaUrl(metaUrl: string, execRelativeFile: string): string; //# sourceMappingURL=split-launcher.d.ts.map