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
45 lines • 1.65 kB
JavaScript
/**
* Git (generic) Source Adapter
*
* Fetches plugins from any Git URL. Detects the manifest format automatically
* (looks for .claude-plugin/, .codex-plugin/, .cursor-plugin/, .factory-plugin/,
* clawhub.json in that order).
*
* Status: scaffold. Full implementation requires git-clone integration.
*
* @implements #787
*/
export class GitSource {
source = 'git';
async fetch(packageId, _version) {
// TODO: git clone into a temp dir, detect manifest format, normalize
throw new Error(`Git source adapter is a scaffold. Full implementation pending. ` +
`Tried to fetch: git:${packageId}`);
}
async search(_query, _options) {
// Git doesn't have a searchable registry — this is a no-op
return [];
}
validate(manifest) {
// Generic git manifest validation — accepts any of the known formats
if (typeof manifest !== 'object' || manifest === null) {
return { valid: false, errors: ['Manifest is not an object'], warnings: [] };
}
const m = manifest;
const errors = [];
if (typeof m.name !== 'string')
errors.push('Missing required field: name');
if (typeof m.version !== 'string')
errors.push('Missing required field: version');
return {
valid: errors.length === 0,
errors,
warnings: [],
};
}
async getVersions(_packageId) {
// Git "versions" would be tags or SHA references — requires git ls-remote
throw new Error('Git getVersions not yet implemented');
}
}
//# sourceMappingURL=git.js.map