export declare const EDITOR_FLAG = "--editor"; export interface EditorFlagParse { /** The value passed to --editor, or undefined when the flag was absent. */ editor?: string; /** argv with the flag and its value removed, so existing parsing is untouched. */ rest: string[]; } /** * Pull `--editor ` (or `--editor=`) out of an argument list. * * Every other argument is returned untouched and in order, including other * flags: this must not become a general-purpose argument parser, because * several of these subcommands forward the remainder verbatim. */ export declare function parseEditorFlag(argv: string[]): EditorFlagParse; /** One editor the server is configured to drive. */ export interface ConfiguredEditor { /** The handle the running server answers to, from the same rule it uses. */ name: string; /** Absolute .uproject path, or the directory argument when no file resolves. */ projectPath: string; /** Which client config this came from, for error messages. */ source: string; } /** * The session names a server started with these positionals would assign. * * Mirrors SessionRegistry: the project's base name, de-duplicated with a * numeric suffix in registration order. Kept here rather than imported so the * CLI does not construct a ProjectContext (and therefore does not need the * project to be loadable) just to learn what it would be called. */ export declare function namesForProjects(projectPaths: string[]): string[]; /** * Every editor the MCP client configs on this machine say the server drives. * * Read-only and best-effort: a malformed or absent config contributes nothing * rather than failing the subcommand that only wanted to deploy to cwd. */ export declare function discoverConfiguredEditors(cwd?: string): ConfiguredEditor[]; export declare class EditorFlagError extends Error { } /** * Turn `--editor ` into a project path. * * Name first: a registered session name, then its project name. Path second: a * .uproject file, or a directory holding exactly one. Anything else is an * error naming what IS registered, because silently falling back to cwd would * run a deploy or a build against the wrong project. */ export declare function resolveEditorFlag(editor: string, cwd?: string): string; /** * Read `--editor` out of argv and turn it into a project path. * * Returns the remaining argv either way, so a subcommand keeps parsing exactly * what it parsed before when the flag is absent. */ export declare function takeEditorTarget(argv: string[], cwd?: string): { projectPath?: string; rest: string[]; };