import { type ProjectPathKey, type ProjectPaths } from '../core/paths.js'; import type { IntegrationName } from '../types.js'; /** How a tool's configuration file is written, which decides how it is validated. */ export type ManagedConfigFormat = 'json' | 'jsonc' | 'toml' | 'yaml'; /** * The file a tool reads its MCP servers from. * * Commands that walk every integration take the path, the label and the parser from * here instead of each keeping its own list. Integrations whose file depends on an * option (Claude Code and Copilot CLI share `.mcp.json`, Claude Desktop has a * platform path) carry no descriptor and are handled where that choice is made. */ export interface ManagedConfigDescriptor { pathKey: ProjectPathKey; format: ManagedConfigFormat; /** Label for a project file. Without one the label is built from the path. */ label?: string; /** * In global mode the file moves under the home directory and the static label stops * describing it. Only OpenCode does this: the others keep the same relative path. */ homeLabel?: boolean; /** * Set when the managed servers live under one key of a JSON or JSONC document, which * is enough for `agents reset` to remove them without a cleanup routine of its own. * Formats with a managed block (Codex, Grok) or their own document shape (Goose, * OpenCode, Gemini) are cleaned by the code that knows them. */ managedEntries?: { key: string; generatedPathKey: ProjectPathKey; statePathKey: ProjectPathKey; shortLabel: string; }; } export interface IntegrationDefinition { id: IntegrationName; label: string; requiredBinary?: string; /** The configuration file this integration reads, when it is the same file every time. */ config?: ManagedConfigDescriptor; /** * The tool discovers `.agents/skills` on its own, so no bridge directory is created * for it. Antigravity is not one of these: it does not follow symlinks and does not * read nested skills, so it gets a flat copy at `.gemini/skills` instead. */ nativeSkills?: boolean; } export declare const INTEGRATIONS: IntegrationDefinition[]; export declare const INTEGRATION_IDS: IntegrationName[]; /** * Resolve where an integration's configuration is and how to call it in output. * * One place decides this, so `status`, `doctor` and the cleanup paths cannot drift * apart on which file belongs to which tool. */ export declare function resolveManagedConfig(paths: ProjectPaths, descriptor: ManagedConfigDescriptor): { filePath: string; label: string; }; /** Every enabled integration whose configuration is one known file. */ export declare function listManagedConfigs(paths: ProjectPaths, enabled: IntegrationName[]): Array<{ id: IntegrationName; descriptor: ManagedConfigDescriptor; filePath: string; label: string; }>; /** * Alternate names accepted on the CLI, mapped to the canonical integration id. * `windsurf` kept its id when the product was renamed to Devin Desktop, so both spellings work. */ export declare const INTEGRATION_ALIASES: Record; /** Resolve a user-supplied integration name, accepting aliases. */ export declare function resolveIntegrationName(input: string): IntegrationName | undefined; /** Look up an integration definition by its canonical id. */ export declare function getIntegration(id: IntegrationName): IntegrationDefinition | undefined; /** Whether the tool finds `.agents/skills` itself, so no bridge directory is needed. */ export declare function hasNativeSkillsDiscovery(id: IntegrationName): boolean; /** * Parse a comma-separated `--llm` value into canonical integration ids. * * @throws When a name is neither an id nor a known alias. */ export declare function parseIntegrationList(input: string): IntegrationName[];