import type { CustomBackendConfig } from "@automatalabs/acp-agents"; import type { SelectChoiceGroup, ValidateHarnessOptions } from "./validate.js"; export interface ProbeHarnessConfigOptions { /** Harness names to probe (built-in `claude` / `codex` / `opencode` / `pi` or a registered * custom name; any model spec routes like an agent() call's). Default: every routable * harness — the four built-ins plus each registered custom backend. */ harnesses?: string[]; /** Programmatic custom-backend registry, merged over the AGENTPRISM_BACKENDS env var * exactly like `createAcpRunner({ backends })`. */ backends?: Record; /** Session cwd for the probes. Default `process.cwd()` — harnesses may resolve * project-level configuration (and hence their catalog) from it. */ cwd?: string; /** Per-harness wall-clock bound. A timed-out harness reports `probed:false` without * affecting the others. Default 60000. */ timeoutMs?: number; } export interface HarnessConfigReport { /** True when every requested harness probed successfully. */ ok: boolean; /** 0 = all probed; 1 = at least one probe failed. */ exitCode: 0 | 1; /** One entry per requested harness, in request order — the same shape validate reports. */ harnessOptions: ValidateHarnessOptions[]; } /** * Probe each requested harness's advertised config-option catalog. A per-harness * spawn/auth/session failure (or timeout) is reported as `probed:false` on that entry — * never thrown. Only caller configuration errors throw: a malformed AGENTPRISM_BACKENDS / * `backends` registry (loud at construction, mirroring `createAcpRunner`) or invalid options. */ export declare function probeHarnessConfig(options?: ProbeHarnessConfigOptions): Promise; /** Render a HarnessConfigReport as the human-readable CLI output (validate's table format). */ export declare function formatHarnessConfigReport(report: HarnessConfigReport): string; /** One harness's slice of the `config --models[=]` view. Without a * filter it carries the provider/group breakdown (never the leaf ids); with a filter it * carries only the matching leaf ids. There is no unfiltered leaf dump on any surface. */ export interface HarnessModelsView { backendId: string; probed: boolean; /** Present when probed=false. */ error?: string; /** False when the harness advertises no `model` select option. */ hasModelOption: boolean; /** The filter as given, when one was supplied. */ filter?: string; /** Breakdown mode (no filter): total leaf count and per-group counts. */ total?: number; groups?: SelectChoiceGroup[]; /** Filter mode: the leaf model ids matching the filter. */ matches?: string[]; } /** Compile a `--models=` value into a leaf-value matcher. A value wrapped in * slashes (`/.../`) is a case-insensitive regex; anything else is a case-insensitive * substring. Throws a TypeError on an invalid regex (surfaced as a CLI usage error). */ export declare function buildModelFilter(filter: string): (value: string) => boolean; /** Build the per-harness `--models` view. `filter` undefined = breakdown mode. */ export declare function buildHarnessModelsView(report: HarnessConfigReport, filter?: string): HarnessModelsView[]; /** Render the `config --models[=]` view as human text. */ export declare function formatHarnessModels(views: readonly HarnessModelsView[]): string; //# sourceMappingURL=config.d.ts.map