/** Configuration Loader for MCPC CLI * * This module provides utilities to load MCPC configuration from command-line arguments, * environment variables, or files. * * Command-line arguments: * - `--config ` - Inline JSON configuration string * - `--config-url ` - Fetch configuration from URL (e.g., GitHub raw) * - `--config-file ` - Path to configuration file * - No arguments - Uses ./mcpc.config.json if available * * Environment variables: * - `MCPC_CONFIG` - Inline JSON configuration string (same as --config) * - `MCPC_CONFIG_URL` - URL to fetch configuration from (same as --config-url) * - `MCPC_CONFIG_FILE` - Path to configuration file (same as --config-file) * * Priority order: * 1. --config (inline JSON) * 2. MCPC_CONFIG environment variable * 3. --config-url or MCPC_CONFIG_URL * 4. --config-file or MCPC_CONFIG_FILE * 5. ~/.mcpc/config.json (user config) * 6. ./mcpc.config.json (local config) * * @example * ```bash * # Inline JSON config * deno run --allow-all src/bin.ts --config '[{"name":"my-agent","description":"..."}]' * * # Using environment variable * export MCPC_CONFIG='[{"name":"my-agent","description":"..."}]' * deno run --allow-all src/bin.ts * * # From URL * deno run --allow-all src/bin.ts --config-url https://example.com/config.json * * # From file * deno run --allow-all src/bin.ts --config-file ./my-config.json * * # Default (uses ./mcpc.config.json) * deno run --allow-all src/bin.ts * ``` * * @module */ import type { ComposeInput } from "@jsr/mcpc__core"; export interface MCPCConfig { /** * Server name */ name?: string; /** * Server version */ version?: string; /** * Server capabilities */ capabilities?: { tools?: Record; sampling?: Record; }; /** * Agent composition definitions (can include markdown file paths) */ agents: ComposeInput[]; /** * Skills directories to scan for domain-specific knowledge * @see https://agentskills.io/specification */ skills?: string[]; } /** * Load configuration from command-line arguments, environment variables, or default file * @returns Configuration object or null if no configuration found */ export declare function loadConfig(): Promise; /** * Validate configuration structure */ export declare function validateConfig(config: MCPCConfig): void; //# sourceMappingURL=loader.d.ts.map