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.04 kB
JavaScript
/**
* ClawHub Source Adapter
*
* Fetches plugins from the ClawHub registry. ClawHub is OpenClaw's central
* package registry.
*
* Status: scaffold. Full implementation requires ClawHub API spec or CLI
* integration.
*
* @implements #787
*/
export class ClawHubSource {
source = 'clawhub';
async fetch(packageId, _version) {
// TODO: invoke ClawHub CLI or HTTP API to fetch the package tarball,
// extract to a temp directory, parse clawhub.json, and return a
// normalized PackageBundle. For now, throw with a clear message.
throw new Error(`ClawHub source adapter is a scaffold. Full implementation pending. ` +
`Tried to fetch: clawhub:${packageId}`);
}
async search(_query, _options) {
throw new Error('ClawHub search not yet implemented');
}
validate(manifest) {
const errors = [];
const warnings = [];
if (typeof manifest !== 'object' || manifest === null) {
return { valid: false, errors: ['Manifest is not an object'], warnings };
}
const m = manifest;
// Required fields per ClawHub spec
if (typeof m.name !== 'string')
errors.push('Missing required field: name');
if (typeof m.version !== 'string')
errors.push('Missing required field: version');
if (typeof m.description !== 'string')
errors.push('Missing required field: description');
// Namespace collision check
if (typeof m.name === 'string' && m.name.startsWith('aiwg-') && m.author !== 'AIWG Contributors') {
warnings.push(`Package name '${m.name}' uses the aiwg- prefix but is not authored by AIWG. ` +
`This may cause namespace collisions.`);
}
return {
valid: errors.length === 0,
errors,
warnings,
};
}
async getVersions(_packageId) {
throw new Error('ClawHub getVersions not yet implemented');
}
}
//# sourceMappingURL=clawhub.js.map