/** * Platform Definitions * * Supported AI coding platforms, mirroring OpenSpec's AI_TOOLS config. * Reference: OpenSpec/src/core/config.ts */ import type { InstallScope } from './types.js'; export interface Platform { id: string; name: string; skillsDir: string; globalSkillsDir?: string; legacySkillsDirs?: string[]; /** Platform configuration and hook root when it differs from the Skill root. */ configDir?: string; /** Global platform configuration and hook root when it differs from the global Skill root. */ globalConfigDir?: string; detectionPaths?: string[]; openspecToolId: string; /** OpenSpec's generated tool root when it differs from Comet's canonical Skill root. */ openspecSkillsDir?: string; /** * When set, OpenSpec output for `openspecToolId` is copied into this * platform's Skill root. The generator platform's root is written only * when that platform was also selected. */ openspecMirrorFrom?: string; /** Platform's rules/instructions subdirectory relative to rulesBaseDir (defaults to baseDir). Omit if unsupported. */ rulesDir?: string; /** Override base directory for rules. When set, rules go to rulesBaseDir/rulesDir instead of skillsDir/rulesDir. Useful when rules live outside the skills config dir (e.g., Cline's .clinerules/ is at project root, not inside .cline/). */ rulesBaseDir?: string; /** Rule file format: 'md' = plain markdown, 'mdc' = Cursor MDC with frontmatter, 'copilot' = GitHub Copilot instructions format. */ rulesFormat?: 'md' | 'mdc' | 'copilot'; /** Whether this platform supports PreToolUse hooks. */ supportsHooks?: boolean; /** Hook configuration format. Determines how installCometHooksForPlatform writes the hook config. */ hookFormat?: 'claude-code' | 'gemini' | 'windsurf' | 'copilot' | 'qwen' | 'kiro' | 'qoder' | 'codebuddy' | 'trae'; /** Hook config filename relative to the platform config root when it differs from the format default. */ hookConfigFile?: string; /** Historical hook config filenames checked during migration and uninstall. */ legacyHookConfigFiles?: string[]; /** Installed PreToolUse matcher when it differs from the portable hook descriptor. */ hookMatcher?: string; } export declare function isValidPlatformId(platformId: string): boolean; export declare function getPlatformSkillsDir(platform: Platform, scope: InstallScope): string; export declare function getPlatformSkillsDirs(platform: Platform, scope: InstallScope): string[]; export declare function getPlatformConfigDir(platform: Platform, scope: InstallScope): string; export declare const PLATFORMS: Platform[]; export declare function getOpenSpecGeneratorPlatform(toolId: string): Platform | undefined; export declare function resolveOpenSpecMirrorPlatformIds(selectedPlatformIds: readonly string[]): string[]; export declare function getOpenSpecMirrorPlatforms(mirrorPlatformIds: readonly string[], generatorId: string): Platform[]; //# sourceMappingURL=platforms.d.ts.map