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

141 lines 4.45 kB
/** * FrameworkIsolator - Enforce framework-scoped isolation * * Ensures framework-specific resources (agents, commands, memory) are isolated * from each other while allowing shared resources (requirements, architecture) * to be accessible across all frameworks. * * FID-007 Framework-Scoped Workspaces isolation logic. * * @module src/plugin/framework-isolator * @version 1.0.0 * @since 2025-10-23 */ export interface ValidationResult { valid: boolean; errors: ValidationError[]; } export interface ValidationError { type: 'contamination' | 'permission' | 'symlink'; path: string; message: string; } export interface ResourceInfo { source: string; target?: string; type?: 'framework-specific' | 'shared'; } export interface FrameworkSuggestion { resource: string; suggestedFramework: string; confidence: number; } export interface CategorizedResources { frameworkSpecific: string[]; shared: string[]; } export declare class FrameworkIsolator { private projectRoot; private readonly FRAMEWORK_SPECIFIC; private readonly SHARED_RESOURCES; constructor(projectRoot: string); /** * Get framework-specific path * * @param framework - Framework name * @param resource - Optional resource path * @returns Full path to framework resource */ getFrameworkPath(framework: string, resource?: string): string; /** * Check if resource is shared across frameworks * * @param resourcePath - Resource path * @returns True if resource is shared */ isSharedResource(resourcePath: string): boolean; /** * Get framework-specific resources * * @param framework - Framework name * @param resourceType - Resource type (agents, commands, etc.) * @returns Array of resource paths */ getFrameworkResources(framework: string, resourceType: string): Promise<string[]>; /** * Get shared resources * * @param resourceType - Resource type * @param framework - Optional framework name (for access checking) * @returns Array of resource paths */ getSharedResources(resourceType: string, _framework?: string): Promise<string[]>; /** * Get framework-specific config * * @param framework - Framework name * @returns Framework configuration */ getFrameworkConfig(framework: string): Promise<any>; /** * Validate workspace isolation * * @returns Validation result */ validateIsolation(): Promise<ValidationResult>; /** * Check if framework can access resource * * @param framework - Framework name * @param resourcePath - Resource path * @returns True if access allowed */ canAccess(framework: string, resourcePath: string): Promise<boolean>; /** * Check if framework can read resource * * @param framework - Framework name * @param resourcePath - Resource path * @returns True if read allowed */ canRead(framework: string, resourcePath: string): Promise<boolean>; /** * Check if framework can write to resource * * @param framework - Framework name * @param resourcePath - Resource path * @returns True if write allowed */ canWrite(framework: string, resourcePath: string): Promise<boolean>; /** * Identify framework-specific resources in legacy workspace * * @param workspacePath - Workspace path * @returns Array of framework-specific resources */ identifyFrameworkSpecificResources(workspacePath: string): Promise<ResourceInfo[]>; /** * Identify shared resources in legacy workspace * * @param workspacePath - Workspace path * @returns Array of shared resources */ identifySharedResources(workspacePath: string): Promise<ResourceInfo[]>; /** * Categorize all resources * * @param workspacePath - Workspace path * @returns Categorized resources */ categorizeResources(workspacePath: string): Promise<CategorizedResources>; /** * Suggest target frameworks for resources * * @param workspacePath - Workspace path * @returns Array of framework suggestions */ suggestFrameworkTargets(workspacePath: string): Promise<FrameworkSuggestion[]>; private listFilesRecursive; private parseSimpleYaml; } //# sourceMappingURL=framework-isolator.d.ts.map