import type { Command } from "commander"; import { FleetCoordinator } from "./coordinator.js"; import { OutcomeAggregator } from "./aggregator.js"; import { PortfolioReporter } from "./reporter.js"; import { createClient } from "../providers/factory.js"; import { decomposeGoal } from "./decomposer.js"; import { decomposeGoalDeep } from "./decomposer-deep.js"; import type { FleetManifest } from "./manifest.js"; import type { PortfolioReport } from "./reporter.js"; export type { PortfolioReport }; /** * Resolve the ABSOLUTE shared blackboard path for a fleet run. * Returns undefined when no blackboard is configured. * * ADR-5: the caller bears the absolute-path responsibility — resolve() is * applied here so downstream modules receive an absolute path directly. */ export declare function resolveBlackboardPath(manifest: FleetManifest): string | undefined; export interface FleetDeps { coordinator?: FleetCoordinator; aggregator?: OutcomeAggregator; reporter?: PortfolioReporter; } export interface FleetOptions { /** Override manifest.concurrency */ concurrency?: number; /** Override manifest.rootDir */ rootDir?: string; } /** * Load a fleet manifest, fail fast on missing credentials, fan-out all * children through the coordinator, aggregate outcomes, build a portfolio * report, write it to /.bober/fleet-report.json, and return it. * * Per-child failures are data in the report — this function only throws on * batch-setup errors (bad manifest, missing credentials, report-write IO). * * @param manifestPath - Absolute or relative path to the fleet manifest JSON. * @param options - Optional overrides for concurrency and rootDir. * @param deps - Optional DI for testing (coordinator / aggregator / reporter). */ export declare function runFleet(manifestPath: string, options?: FleetOptions, deps?: FleetDeps): Promise; export interface FleetExpandOptions { /** Soft target for number of children to decompose */ count?: string; /** Override the decomposer LLM provider (default: "openai-compat") */ provider?: string; /** Override the decomposer LLM model (default: "deepseek-v4-pro") */ model?: string; /** Override the manifest rootDir (default: ".") */ root?: string; /** Override manifest concurrency (default: 3) */ concurrency?: string; /** Override the output path for the written manifest */ out?: string; /** When true, chain into runFleet(outPath) after writing */ yes?: boolean; } export interface FleetExpandDeps { decompose?: typeof decomposeGoal; runFleet?: typeof runFleet; createClient?: typeof createClient; } /** * Core logic for `fleet expand `: * * 1. Build the DeepSeek LLMClient (credential fail-fast BEFORE any IO). * 2. Call decomposeGoal to get a children-only FleetManifest. * 3. Assemble { rootDir, concurrency, children }. * 4. Atomically write the manifest to outPath (overwrite with notice). * 5. Print the manifest + a review hint. * 6. If --yes, chain into runFleet(outPath) and print Fleet Summary. * Otherwise stop (exit 0). * * @param goal - The high-level goal to decompose into children. * @param opts - Parsed Commander options. * @param deps - Optional DI seams for testing (decompose, runFleet, createClient). */ export declare function runFleetExpand(goal: string, opts: FleetExpandOptions, deps?: FleetExpandDeps): Promise; export interface FleetExpandDeepOptions { /** Soft target for number of children to decompose */ count?: string; /** Override the decomposer LLM provider (default: "openai-compat") */ provider?: string; /** Override the decomposer LLM model (default: "deepseek-v4-pro") */ model?: string; /** Override the manifest rootDir (default: ".") */ root?: string; /** Override manifest concurrency (default: 3) */ concurrency?: string; /** Override the output path for the written manifest */ out?: string; /** When true, chain into runFleet(outPath) after writing */ yes?: boolean; /** When true, run a fresh-context critic gate that re-expands degenerate manifests */ critique?: boolean; } export interface FleetExpandDeepDeps { decomposeDeep?: typeof decomposeGoalDeep; runFleet?: typeof runFleet; createClient?: typeof createClient; } /** * Core logic for `fleet expand-deep `: * * 1. Build the DeepSeek LLMClient (credential fail-fast BEFORE any IO). * 2. Call decomposeGoalDeep to get a children-only FleetManifest (two-stage plan→expand). * 3. Assemble { rootDir, concurrency, children }. * 4. Atomically write the manifest to outPath (overwrite with notice). * 5. Print the manifest + a review hint. * 6. If --yes, chain into runFleet(outPath) and print Fleet Summary. * Otherwise stop (exit 0). * * @param goal - The high-level goal to decompose into children. * @param opts - Parsed Commander options. * @param deps - Optional DI seams for testing (decomposeDeep, runFleet, createClient). */ export declare function runFleetExpandDeep(goal: string, opts: FleetExpandDeepOptions, deps?: FleetExpandDeepDeps): Promise; /** * Attach `expand-deep ` as a child subcommand of the existing `fleet` command. * Options: --count, --provider, --model, --root, --concurrency, --out, --yes. * * The action body is a thin wrapper around runFleetExpandDeep for testability. */ export declare function registerFleetExpandDeepSubcommand(fleet: Command): void; /** * Attach `expand ` as a child subcommand of the existing `fleet` command. * Options: --count, --provider, --model, --root, --concurrency, --out, --yes. * * The action body is a thin wrapper around runFleetExpand for testability. */ export declare function registerFleetExpandSubcommand(fleet: Command): void; /** * Register `agent-bober fleet ` with the commander program. * * Exit codes: * 0 — always on per-child failures (failures are reported, not fatal) * 1 — only on batch-setup errors (bad manifest, missing credentials, * report IO failure) */ export declare function registerFleetCommand(program: Command): void; //# sourceMappingURL=index.d.ts.map