/** * oh-my-kimi CLI * Multi-agent orchestration for Kimi Code CLI */ import { type SetupScope } from "./setup.js"; import { type NotifyTempContract, type ParseNotifyTempContractResult } from "../notifications/temp-contract.js"; export declare function resolveNotifyFallbackWatcherScript(pkgRoot?: string): string; export declare function resolveHookDerivedWatcherScript(pkgRoot?: string): string; export declare function resolveNotifyHookScript(pkgRoot?: string): string; type CliCommand = "launch" | "exec" | "setup" | "agents" | "agents-init" | "deepinit" | "uninstall" | "doctor" | "cleanup" | "ask" | "explore" | "sparkshell" | "team" | "session" | "resume" | "version" | "tmux-hook" | "hooks" | "hud" | "status" | "cancel" | "help" | "reasoning" | string; export interface ResolvedCliInvocation { command: CliCommand; launchArgs: string[]; } export declare function readPersistedSetupScope(cwd: string): SetupScope | undefined; export declare function readPersistedSetupPreferences(cwd: string): Partial<{ scope: SetupScope; }> | undefined; export declare function resolveCodexHomeForLaunch(cwd: string, env?: NodeJS.ProcessEnv): string | undefined; export declare function resolveSetupScopeArg(args: string[]): SetupScope | undefined; export declare function resolveCliInvocation(args: string[]): ResolvedCliInvocation; export declare function resolveNotifyTempContract(args: string[], env?: NodeJS.ProcessEnv): ParseNotifyTempContractResult; export declare function commandOwnsLocalHelp(command: CliCommand): boolean; export type CodexLaunchPolicy = "inside-tmux" | "detached-tmux" | "direct"; export declare function resolveCodexLaunchPolicy(env?: NodeJS.ProcessEnv, _platform?: NodeJS.Platform, tmuxAvailable?: boolean, nativeWindows?: boolean, stdinIsTTY?: boolean, stdoutIsTTY?: boolean): CodexLaunchPolicy; export interface CodexExecFailureClassification { kind: "exit" | "launch-error"; code?: string; message: string; exitCode?: number; signal?: NodeJS.Signals; } export declare function resolveSignalExitCode(signal: NodeJS.Signals | null | undefined): number; export declare function classifyCodexExecFailure(error: unknown): CodexExecFailureClassification; interface TmuxPaneSnapshot { paneId: string; currentCommand: string; startCommand: string; } export interface DetachedSessionTmuxStep { name: string; args: string[]; } export declare function parseTmuxPaneSnapshot(output: string): TmuxPaneSnapshot[]; export declare function isHudWatchPane(pane: TmuxPaneSnapshot): boolean; export declare function findHudWatchPaneIds(panes: TmuxPaneSnapshot[], currentPaneId?: string): string[]; export declare function buildHudPaneCleanupTargets(existingPaneIds: string[], createdPaneId: string | null, leaderPaneId?: string): string[]; export declare function main(args: string[]): Promise; export declare function launchWithHud(args: string[]): Promise; export declare function execWithOverlay(args: string[]): Promise; export declare function normalizeCodexLaunchArgs(args: string[]): string[]; /** * Returns the spark model string if --spark or --madmax-spark appears in the * raw (pre-normalize) args, or undefined if neither flag is present. * Used to route the spark model to team workers without affecting the leader. */ export declare function resolveWorkerSparkModel(args: string[], codexHomeOverride?: string): string | undefined; export declare function injectModelInstructionsBypassArgs(cwd: string, args: string[], env?: NodeJS.ProcessEnv, defaultFilePath?: string): string[]; export declare function collectInheritableTeamWorkerArgs(codexArgs: string[]): string[]; export declare function resolveTeamWorkerLaunchArgsEnv(existingRaw: string | undefined, codexArgs: string[], inheritLeaderFlags?: boolean, defaultModel?: string): string | null; export declare function readTopLevelTomlString(content: string, key: string): string | null; export declare function upsertTopLevelTomlString(content: string, key: string, value: string): string; export declare function buildTmuxSessionName(cwd: string, sessionId: string): string; export declare function buildDetachedSessionBootstrapSteps(sessionName: string, cwd: string, codexCmd: string, hudCmd: string, workerLaunchArgs: string | null, codexHomeOverride?: string, notifyTempContractRaw?: string | null, nativeWindows?: boolean, sessionId?: string): DetachedSessionTmuxStep[]; export declare function buildDetachedSessionFinalizeSteps(sessionName: string, hudPaneId: string | null, hookWindowIndex: string | null, enableMouse: boolean, nativeWindows?: boolean): DetachedSessionTmuxStep[]; export declare function buildDetachedSessionRollbackSteps(sessionName: string, hookTarget: string | null, hookName: string | null, clientAttachedHookName: string | null): DetachedSessionTmuxStep[]; export declare function buildNotifyTempStartupMessages(contract: NotifyTempContract, hasValidProviders: boolean): { infoLines: string[]; warningLines: string[]; }; export declare function buildNotifyFallbackWatcherEnv(env?: NodeJS.ProcessEnv, options?: { codexHomeOverride?: string; enableAuthority?: boolean; sessionId?: string; }): NodeJS.ProcessEnv; export declare function buildTmuxShellCommand(command: string, args: string[]): string; export declare function buildWindowsPromptCommand(command: string, args: string[]): string; /** * Wrap a command for tmux pane execution so the user's shell profile is * sourced. Without this, tmux runs `default-shell -c "cmd"` which is * non-interactive/non-login and skips .zshrc / .bashrc. */ export declare function buildTmuxPaneCommand(command: string, args: string[], shellPath?: string | undefined): string; export {}; //# sourceMappingURL=index.d.ts.map