UNPKG

aiwg

Version:

Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo

84 lines 3.27 kB
/** * Platform-specific skill deployment path resolution * * @module smiths/skillsmith/platform-resolver */ import type { Platform } from '../../agents/types.js'; import type { PlatformSkillConfig } from './types.js'; /** * Resolve platform-specific skill paths */ export declare class PlatformSkillResolver { /** * Get platform configuration for skills */ static getConfig(platform: Platform): PlatformSkillConfig; /** * Get base directory for skills on a platform. * Supports home-dir paths (baseDir starting with `~/`) for platforms like Codex and OpenClaw. */ static getBaseDir(platform: Platform, projectPath: string): string; /** * Get path for a specific skill */ static getSkillPath(platform: Platform, projectPath: string, skillName: string): string; /** * Get path for SKILL.md file */ static getSkillFilePath(platform: Platform, projectPath: string, skillName: string): string; /** * Get path for references directory */ static getReferencesPath(platform: Platform, projectPath: string, skillName: string): string; /** * Check if platform natively supports skills */ static supportsSkills(platform: Platform): boolean; /** * Get alternative deployment strategy for platforms without skill support */ static getAlternativeStrategy(platform: Platform): 'command' | 'agent' | 'none' | undefined; /** * Compute the canonical namespaced slug for a skill. * * Idempotent: if `name` already starts with `{namespace}-`, returns `name` unchanged. * This prevents double-prefixing existing `aiwg-*` skills (e.g. `aiwg-sync` → `aiwg-sync`, * not `aiwg-aiwg-sync`). * * @param name - Skill folder name (e.g. 'sync', 'aiwg-sync') * @param namespace - Namespace prefix (e.g. 'aiwg') * @returns Canonical slug (e.g. 'aiwg-sync') */ static computeCanonicalSlug(name: string, namespace: string): string; /** * Get path for a namespaced skill deployment. * * Platforms with subdirectory support deploy under `{baseDir}/{namespace}/{slug}/`. * Windsurf (1-level discovery) deploys flat at `{baseDir}/{slug}/`. * * @param platform - Target platform * @param projectPath - Project root directory * @param skillName - Skill folder name (e.g. 'sync') * @param namespace - Namespace prefix (e.g. 'aiwg') * @returns Full deployment directory path */ static getNamespacedSkillPath(platform: Platform, projectPath: string, skillName: string, namespace: string): string; /** * Get path for the SKILL.md file under namespaced deployment layout. * * @param platform - Target platform * @param projectPath - Project root directory * @param skillName - Skill folder name * @param namespace - Namespace prefix (e.g. 'aiwg') * @returns Full path to SKILL.md */ static getNamespacedSkillFilePath(platform: Platform, projectPath: string, skillName: string, namespace: string): string; /** * Validate skill name format */ static validateSkillName(name: string): { valid: boolean; error?: string; }; } //# sourceMappingURL=platform-resolver.d.ts.map