/** * Pipeline spec validation — shared between `agentsmarket run` and `agentsmarket validate`. * * Returns: * { ok: true, usesStages, warnings } — spec is valid * { ok: false, error } — spec has issue * * v0.2 additions: * - `uses@version` syntax validation (semver-like hint; full validation at runtime) * - `output_format: structured_json` requires non-empty `fields: [...]` * - `mcp_servers`/`mcp_tools` are arrays of strings (declaration-level only) * - `working_dir` is a non-empty string * - `uses_parallel` (v0.3) is rejected with a clear message * * v0.3 R6 additions (Provider ≠ Model): * - When a stage declares `provider:`, the (provider, model) pair must be * registered in `PROVIDER_REGISTRY` (openai, anthropic, minimax, * openrouter, replicate). Validated via `validateProviderModel()` from * `@agentsmarket/pipeline-runtime`. Auto-dispatch by model name removed. */ export interface PipelineFileSpec { name: string; version?: string; description?: string; inputs?: Record; defaults?: { model?: string; }; stages: Array<{ id: string; model?: string; system?: string; prompt?: string; uses?: unknown; uses_parallel?: unknown; input?: unknown; output_format?: string; fields?: string[]; mcp_servers?: string[]; mcp_tools?: string[]; working_dir?: string; shell?: string | { cmd: string; args?: string[]; cwd?: string; timeout_ms?: number; }; loop?: { max_iterations?: number; exit_when?: string | { outputs_key: string; operator: '>=' | '<=' | '==' | '!=' | '>' | '<'; value: number | boolean | string; }; body: Array>; }; provider?: string; retry?: { attempts?: number; backoff?: 'exponential' | 'linear' | 'fixed'; retryable_status?: number[]; initial_ms?: number; }; run_if?: string; when?: string | { all: string[]; } | { any: string[]; }; model_params?: { temperature?: number; max_tokens?: number; top_p?: number; seed?: number; reasoning_effort?: 'low' | 'medium' | 'high'; response_format?: 'text' | 'json_object'; stop?: string[]; provider_params?: Record; }; }>; } export declare const COST_PER_LLM_CALL_USDC = 0.01; export type ValidationResult = { ok: true; usesStages: string[]; warnings: string[]; } | { ok: false; error: string; }; export declare function validatePipelineSpec(spec: unknown): ValidationResult;