#!/usr/bin/env node import { type ParsedArgs } from 'minimist'; import { type MultiModelConfig } from '@zhixuan92/multi-model-agent-core'; /** * Minimal I/O dependencies — allows tests to intercept stdout/stderr and * override process.argv / process.exit. */ interface CliDeps { /** * argv[0..] (not including node path or script path) passed to minimist. * Defaults to process.argv.slice(2). */ argv?: () => string[]; /** * Current working directory. Defaults to process.cwd(). * Used only for resolving the CWD/.multi-model-agent.json discovery path. */ cwd?: () => string; /** * Home directory. Defaults to os.homedir(). * Used only for resolving the ~/.mma/config.json discovery path. */ homeDir?: () => string; /** * Environment variable accessor. Defaults to process.env. */ env?: () => Record; /** Write to stdout. Defaults to process.stdout.write.bind(process.stdout). */ stdout?: (s: string) => boolean; /** Write to stderr. Defaults to process.stderr.write.bind(process.stderr). */ stderr?: (s: string) => boolean; /** Exit the process. Defaults to process.exit. */ exit?: (code: number) => never; } /** Parse minimist args from an argv array. */ export declare function parseArgs(argv: string[]): ParsedArgs; /** * Load config using the discovery order. * Tries each candidate in priority order and returns the first successfully * loaded config. Returns an error listing all attempted paths if none are found * or every found file is unreadable/invalid. */ export declare function loadConfig(explicitPath: string | undefined, deps: Pick): Promise; /** * Main entry point — exported so it can be unit-tested without subprocess spawning. * * @param deps I/O dependencies (defaults to real process globals). */ export declare function main(deps?: CliDeps): Promise; /** * Absolute path of THIS distribution's CLI entrypoint, for the Claude Desktop config. * * Uses the same `process.argv[1]` + realpath technique as {@link isMain}, for the same * reason: npm installs the bin as a symlink in `node_modules/.bin/`, so argv[1] points * at the link rather than the real file. Resolving it matters because the Desktop entry * must name the build doing the installing — a bare `mma` on PATH may be an older * install, producing a config that looks right and runs the wrong binary. */ export declare function resolveCliEntrypoint(): string; export type { MultiModelConfig }; //# sourceMappingURL=index.d.ts.map