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

68 lines 2.31 kB
/** * MCP Profile Registry (TypeScript) * * Named, ordered subsets of registered MCP servers. * Stored in ~/.aiwg/mcp-profiles.json. * * This module is used for type checking and vitest. * profiles.mjs is the runtime ESM version used by cli.mjs. * * @implements #889 */ import { McpServerRegistry, McpServerDefinition } from './registry.js'; export interface McpProfileProviderOverride { toolDeny?: string[]; toolAllow?: string[]; } export interface McpProfile { /** Profile name (unique, [a-z0-9-]+) */ name: string; /** Human-readable description */ description?: string; /** Server names referenced from the server registry. '__all__' expands to all servers. */ servers: string[]; /** Per-provider tool allow/deny overrides */ providerOverrides?: Record<string, McpProfileProviderOverride>; /** ISO timestamp */ createdAt?: string; /** ISO timestamp */ updatedAt?: string; } export interface McpProfileRegistryData { apiVersion: string; kind: string; profiles: Record<string, McpProfile>; } export interface ProfileEditChanges { description?: string; addServers?: string[]; removeServers?: string[]; } export declare const PRESET_PROFILES: Record<string, Omit<McpProfile, 'name'>>; export declare class McpProfileRegistry { private readonly configDir; private cache; constructor(configDirOverride?: string); getPath(): string; load(): Promise<McpProfileRegistryData>; save(): Promise<void>; private validateName; private validateServers; add(profile: McpProfile, serverRegistry?: McpServerRegistry): Promise<void>; get(name: string): Promise<McpProfile | undefined>; list(): Promise<McpProfile[]>; edit(name: string, changes: ProfileEditChanges, serverRegistry?: McpServerRegistry): Promise<McpProfile>; remove(name: string): Promise<void>; resolveServers(name: string, serverRegistry?: McpServerRegistry): Promise<McpServerDefinition[] | string[]>; importFrom(filePath: string): Promise<{ added: number; updated: number; }>; exportTo(filePath: string, profileName?: string): Promise<void>; initPresets(): Promise<{ added: number; total: number; }>; clearCache(): void; } //# sourceMappingURL=profiles.d.ts.map