export declare const BUN_VIRTUAL_ROOT: RegExp;
export declare function getAgentsBinPath(argv1?: string | undefined, execPath?: string): string;
/**
 * Directory that contains the `agents` launcher usable for PATH resolution.
 *
 * When the running entry IS the launcher (a compiled binary or an extension-less
 * shim named `agents`), this is just `dirname(getAgentsBinPath())`. When the
 * running entry is a script inside `dist/` reached via a symlink/shim elsewhere
 * (the npm global-install shape), we look for a launcher whose realpath points at
 * the same entry and return that launcher's directory. Falls back to the entry's
 * own directory when no launcher is found.
 */
export declare function getAgentsBinDir(): string;
/**
 * A CLI entry must be launched through the Node runtime when it is a Node
 * script — a `.js`/`.cjs`/`.mjs` file, OR a symlink/extension-less shim whose
 * shebang names `node`. Package installs link `bin/agents` to a `dist/index.js`
 * (a symlink) or drop an extension-less `#!/usr/bin/env node` shim, so an
 * extension check alone misses them and they get run directly. A real compiled
 * binary (Mach-O/ELF/PE) has no `#!node` shebang, so it takes the direct branch
 * and owns its own runtime resolution.
 */
export declare function isNodeScriptEntry(agentsBin: string): boolean;
/**
 * Build the `{ command, args }` to re-invoke this CLI with `sub` as its argv,
 * resolving the JS-vs-standalone shape above. This is the single primitive behind
 * both the daemon launch and the secrets-broker spawn — never hand-roll
 * `[process.execPath, process.argv[1], …]`, which appends the bun virtual entry
 * as a bogus subcommand on standalone builds.
 */
export declare function getCliLaunch(sub: string[], agentsBin?: string): {
    command: string;
    args: string[];
};
