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
36 lines • 1.03 kB
JavaScript
/**
* Marketplace Source Registry
*
* Registers marketplace source adapters and resolves a parsed identifier
* to its adapter.
*
* @implements #787
*/
import { ClawHubSource } from './sources/clawhub.js';
import { GitSource } from './sources/git.js';
/**
* Registered source adapters keyed by source id.
* Additional adapters (cursor, codex, claude) will be registered here as
* their implementations land.
*/
const adapters = new Map();
adapters.set('clawhub', new ClawHubSource());
adapters.set('git', new GitSource());
/**
* Get the adapter for a given source.
*/
export function getSource(source) {
const adapter = adapters.get(source);
if (!adapter) {
throw new Error(`No adapter registered for marketplace source '${source}'. ` +
`Registered sources: ${Array.from(adapters.keys()).join(', ')}`);
}
return adapter;
}
/**
* List all registered source ids
*/
export function listRegisteredSources() {
return Array.from(adapters.keys());
}
//# sourceMappingURL=registry.js.map