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

53 lines 2.23 kB
/** * Project-Local Bundle Discovery * * Scans `.aiwg/{extensions,addons,frameworks,plugins}/<name>/manifest.json` * and validates each manifest against the unified schema. Read-only — no * deployment side effects. * * @implements #1034 * @architecture .aiwg/architecture/adr-aiwg-directory-layout.md (#1039) * @architecture .aiwg/architecture/design-manifest-schema.md (#1044) */ import { type BundleManifest, type ProjectLocalType, type ManifestValidationError } from './manifest.js'; export interface ProjectLocalBundle { /** Bundle id from manifest */ id: string; /** Bundle type from manifest */ type: ProjectLocalType; /** Validated manifest */ manifest: BundleManifest; /** Absolute path to the bundle directory */ bundlePath: string; /** Path of the bundle directory relative to project root (e.g., ".aiwg/extensions/foo/") */ localPath: string; /** Path of the manifest.json relative to project root */ manifestPath: string; } export interface ProjectLocalDiscoveryResult { bundles: ProjectLocalBundle[]; errors: ManifestValidationError[]; /** True if no `.aiwg/<type>/` dirs exist or none contain bundles. */ isEmpty: boolean; /** Counts per type (only populated when bundles found) */ counts: Record<ProjectLocalType, number>; } export interface DiscoveryOptions { /** Allow symlinked bundle directories (default false per #1042 T3) */ allowSymlinks?: boolean; } /** * Scan all four `.aiwg/<type>/` directories for project-local bundles. Returns * a structured result with bundles, errors, and counts. Missing directories * are silently skipped (per #1039 §3 / UC-PL-6). */ export declare function discoverProjectLocalBundles(projectDir: string, options?: DiscoveryOptions): Promise<ProjectLocalDiscoveryResult>; /** * Read a single manifest.json, validate it, and return either a bundle or * structured errors. Used by the scanner; exported for tests. */ export declare function loadAndValidateManifest(manifestPath: string, expectedType: ProjectLocalType, projectDir: string): Promise<{ bundle?: ProjectLocalBundle; errors: ManifestValidationError[]; }>; //# sourceMappingURL=project-local-discovery.d.ts.map