#!/usr/bin/env node import { A as AgentMode, a as AgentPreset, b as AgentResponseLanguage, c as AgentConfig, d as discoverNodeWorkspaceRoot, H as HostProfile, e as AgentLLMConfig, L as LLM } from '../../nodeWorkspaceDiscovery-Ami1UkMt.js'; import '../../effect-DbEMiMvv.js'; type AgentEnvFileLoadResult = { readonly cwd: string; readonly disabled: boolean; readonly explicitPath?: string; readonly filesChecked: readonly string[]; readonly paths: readonly string[]; readonly loadedKeys: readonly string[]; readonly alreadySetKeys: readonly string[]; readonly emptyKeys: readonly string[]; readonly ignoredKeys: readonly string[]; readonly invalidLines: readonly string[]; readonly errors: readonly string[]; }; type AgentInitProfile = "default" | "google" | "openai-compatible" | "fake"; type CliOutputMode = "human" | "json" | "events-json" | "protocol-json"; type CliApprovalMode = "auto" | "interactive" | "approve" | "deny"; type CliPreset = AgentPreset; type ParsedCliArgs = { readonly cwd: string; readonly discoverWorkspace: boolean; readonly where: boolean; readonly goalText: string; readonly mode: AgentMode; readonly modeSpecified: boolean; readonly showHelp: boolean; readonly output: CliOutputMode; readonly outputSpecified: boolean; readonly approval: CliApprovalMode; readonly approvalSpecified: boolean; readonly configPath?: string; readonly noConfig: boolean; readonly envFile?: string; readonly noEnvFile: boolean; readonly protocolFullPatches: boolean; readonly patchFile?: string; readonly patchFileMode: "apply" | "rollback"; readonly saveRunDir?: string; readonly ci: boolean; readonly failOnPatchProposed: boolean; readonly preset?: CliPreset; readonly batchFile?: string; readonly batchStopOnFailure?: boolean; readonly doctor: boolean; readonly init: boolean; readonly initForce: boolean; readonly initProfile: AgentInitProfile; readonly initDryRun: boolean; readonly language?: AgentResponseLanguage; readonly hostProfile: boolean; }; type CliBatchRun = { readonly index: number; readonly cwd: string; readonly goalText: string; readonly mode: AgentMode; readonly patchFile?: string; readonly patchFileMode: "apply" | "rollback"; readonly saveRunDir?: string; }; type ResolvedCliArgs = ParsedCliArgs & { readonly config: AgentConfig; readonly workspaceDiscovery: ReturnType; readonly resolvedConfigPath?: string; readonly batchRuns: readonly CliBatchRun[]; readonly batchStopOnFailureResolved: boolean; readonly envFileLoad: AgentEnvFileLoadResult; }; declare const parseCliArgs: (argv: readonly string[]) => ParsedCliArgs; declare const buildHostProfileFromProcess: (resolved: ResolvedCliArgs) => HostProfile; declare const printHostProfileHuman: (profile: HostProfile) => void; /** * Applies capability-driven defaults from the host profile to the resolved CLI args. * * When the user has NOT explicitly specified an output mode: * - If supportsStreamingEvents is true → default to "events-json" * - Else if wantsJson is true → default to "json" * - (When both are true, supportsStreamingEvents takes priority → "events-json") * * When the user has NOT explicitly specified an approval mode: * - If canAskApproval is false → default to "deny" * * **Validates: Requirements 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8** */ declare const applyCapabilityDefaults: (resolved: ResolvedCliArgs) => ResolvedCliArgs; /** * Returns an LLM instance when a provider is explicitly configured or credentials * are auto-detected. Returns undefined when no provider is configured and * auto-detection finds no credentials (instead of falling back to fake LLM). * The fake LLM is ONLY instantiated when explicitly configured via * BRASS_LLM_PROVIDER=fake or config.llm.provider=fake. */ declare const makeLLMFromEnvOptional: (config?: AgentLLMConfig) => LLM | undefined; export { type ParsedCliArgs, type ResolvedCliArgs, applyCapabilityDefaults, buildHostProfileFromProcess, makeLLMFromEnvOptional, parseCliArgs, printHostProfileHuman };