import { type AgencyConfig } from "../../config/config.js"; import type { RootCarriers } from "../childEnv.js"; import { runAgencyNode } from "../util.js"; import type { ToolImport } from "./toolImports.js"; import type { TrustedModules } from "../../compiler/trustedModules.js"; export type DriverCall = { /** The project directory. The temp folder goes in its `.agency-tmp`. */ dir: string; imports: ToolImport[]; /** The project's resolved list: a tool module under a trusted source * directory is imported from its compiled file. */ trustedModules: TrustedModules[]; node: string; args: unknown[]; config: AgencyConfig; carriers?: RootCarriers; }; export type DriverOutcome = { ok: true; data: unknown; } | { ok: false; message: string; }; export type NodeRunner = typeof runAgencyNode; export declare function runDriver(call: DriverCall, run?: NodeRunner): Promise;