import { AgencyConfig } from "../config.js"; import { spawn as realSpawn } from "child_process"; /** * Extract the debug flags (`--trace`, `--log`) from a bundled agent's * forwarded argv, as a config override. This is the ONE place these flags are * handled — every bundled agent gets them for free by going through * `runBundledAgent`; no agent writes flag code. * * Tokenization is `node:util.parseArgs` (which `std::args` is itself built on) * after the same bare-flag normalization std::args applies, so `--flag=value`, * the `--` terminator, last-wins-on-repeat, AND a following-flag-is-not-a-value * all match the agent's own parser. An empty/bare `--trace` maps to a per-run * trace file in cwd; the flag→config meaning lives in `applyCliFlags`. */ export declare function agentConfigOverride(args: string[]): Partial; /** * Extract `--agent-home ` — the flag form of the AGENCY_AGENT_HOME env * var — from a bundled agent's forwarded argv, using the same pre-scan * tokenization rules as `agentConfigOverride`. Returns the directory resolved * to an absolute path (the child would otherwise resolve a relative one * against whatever its cwd happens to be), or null when the flag is absent or * bare. A bare `--agent-home` is a usage error the agent's own parser * reports, so it is only skipped here, never defaulted. */ export declare function agentHomeOverride(args: string[]): string | null; export declare function runBundledAgent(config: AgencyConfig, agentName: string, args?: string[], deps?: { spawn?: typeof realSpawn; }, budget?: { maxCost?: string; maxTime?: string; }): void;