/** * IDE preset catalog — single source of truth for the frontend. * * Each entry describes one launch target the "Open in editor" menu can * offer. The token in `command` is what the user-preference + per-Vibe * override store on the backend; it's also what the agent's * `/api/editor/open` allowlist matches against. Keep this list in sync * with: * - wspace-vibecontrols-svc settings.service `KNOWN_IDE_COMMANDS` * - vibecontrols-agent routes/editor.routes `ALLOWED_COMMANDS` * * `protocol` is optional — when present, the menu offers a one-click * deep-link launch that doesn't require an online agent. Browsers * silently no-op the navigation when the OS has no handler registered, * which is why we also surface the agent-exec fallback for every entry. */ export type IdeLaunchMode = 'protocol' | 'agent' | 'both'; export interface IdePreset { /** Allowlisted command token. Frozen contract — see header. */ command: string; /** Display name shown in menus. */ label: string; /** Short vendor / family tag, used to group in pickers. */ family: 'vscode' | 'jetbrains' | 'terminal' | 'other'; /** * `vscode`/`cursor`/`idea`/`pycharm`/... — these IDEs ship URL * handlers; we deep-link via `://file/` (VS Code * family) or `://open?file=` (JetBrains family). * When unset, only agent-exec works. */ protocol?: string; /** Shape of the protocol URL — varies by IDE family. */ protocolShape?: 'vscode' | 'jetbrains'; /** Hint shown as the menu item subtitle / tooltip. */ hint?: string; } export declare const IDE_PRESETS: readonly IdePreset[]; export declare function getIdePreset(command: string | null | undefined): IdePreset | null; /** * Build the IDE-specific deep-link URL for `path`. Returns `null` when * the preset has no registered protocol. * * vscode-family → `vscode://file/` * jetbrains → `idea://open?file=` */ export declare function buildProtocolUrl(preset: IdePreset, path: string): string | null; /** * Resolve the effective IDE command for a Vibe, applying the * vibeOverride → userDefault → 'code' precedence chain. */ export declare function resolveEffectiveIdeCommand(vibeId: string, userDefault: string | null | undefined, perVibeOverrides: Record | null | undefined): string;