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
42 lines • 1.95 kB
TypeScript
/**
* Deployed-artifact discovery for the context-pipeline.
*
* Walks the per-provider deploy paths after `aiwg use` has completed and emits
* IndexEntry[] arrays for the four canonical AGENTS.md sections (Agents, Rules,
* Skills, Behaviors). The generator-runs-after-deploy invariant from ADR-1 §7
* means the discovery is filesystem-observed: only files that actually landed
* appear in the link index. Failed deploys produce shorter indexes, never
* broken links.
*
* Skill discovery is folder-based (each skill is a directory containing
* SKILL.md). Agent/rule/behavior discovery is file-based (each artifact is
* one .md file). The asymmetry mirrors the deploy-path conventions defined in
* `src/cli/handlers/use.ts` PROVIDER_PATHS.
*/
import type { AgentsMdSection, IndexedArtifactType } from './types.js';
/**
* Path map for one provider's deploy targets. Subset of the PROVIDER_PATHS
* record in `src/cli/handlers/use.ts` — only the four indexed types are
* needed here. Empty string means "this provider does not deploy this type
* to a discrete directory" (e.g. Hermes agents are aggregated into AGENTS.md
* itself; OpenCode commands derive from skills; Codex commands hit a static
* built-in enum that does not auto-scan files).
*/
export interface DiscoveryPaths {
agents: string;
rules: string;
skills: string;
behaviors: string;
}
/**
* Discover one section's deployed artifacts.
*
* Type determines whether to scan files (agents/rules/behaviors) or folders
* (skills). Empty `relativeDir` short-circuits to an empty section.
*/
export declare function discoverSection(type: IndexedArtifactType, projectPath: string, relativeDir: string): Promise<AgentsMdSection>;
/**
* Discover all four canonical AGENTS.md sections at once.
*/
export declare function discoverDeployedArtifacts(projectPath: string, paths: DiscoveryPaths): Promise<AgentsMdSection[]>;
//# sourceMappingURL=discovery.d.ts.map