/** * How an agent target string is parsed and resolved. A target names an agent * entry point: `path`, `path:node`, or a directory (meaning its main.agency). * Consumed by the eval commands, the optimizer, and `agency test`. */ /** Split `path:node` on its last colon, but only when the text after it is a * node name, so a path with a colon in it (`C:\agents\a.agency`) stays whole. * `nodeName` is "" when the target names no node. */ export declare function parseTarget(target: string): { filename: string; nodeName: string; }; /** Resolve a target into the agent file, node (default "main"), and the * display label run results carry. */ export declare function resolveEvalRunTarget(target: string): { agentFile: string; node: string; label: string; }; /** What runs as the agent, and what evidence it produces. `file` is the * classic seeded-and-compiled .agency target; `command` is a CLI run in the * workdir (Agency CLIs only — the statelog is the evidence contract). A * future non-Agency variant would be a third kind with a weaker record. */ export type EvalTarget = { kind: "file"; agentFile: string; node: string; label: string; } | { kind: "command"; tokens: string[]; label: string; }; /** Resolve the runner-side agent choice. Exactly one of --agent / * --agent-cmd; the command's {input} placeholder is validated here, before * any run. Commands come ONLY from these flags, never from suite content — * suites can be remote git sources, and a suite that named its own command * would be remote code execution. */ export declare function resolveEvalTarget(opts: { agent?: string; agentCmd?: string; }): EvalTarget; /** * Fail fast when the agent's shape does not match what the tests deliver. * A test's input reaches a file agent as the entry node's single positional * parameter and a command agent as `{input}`; a test with no input reaches a * node that takes none / a command with no placeholder. Within one suite the * tests must agree (all carry an input, or none does), so the agent has one * shape to be. Checked before any workdir is seeded or agent compiled: a * mis-shaped agent is a configuration error, not a per-test run failure — * and the optimizer would pay it once per candidate. The subprocess * bootstrap re-checks the file case at run time (resolveNodeCallArgs). * * The file check is best-effort: an unreadable or unparseable file, or a * node defined elsewhere than the entry file, is left for compile/run to * report with better errors than a pre-parse could. */ export declare function assertTargetMatchesInputs(target: EvalTarget, tests: { input?: unknown; }[]): void;