mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-06 09:47:53 +02:00
* feat: add Hermes and OpenClaw harness install targets - Add scripts/lib/install-targets/hermes-home.js and openclaw-home.js - Register new adapters in registry.js and helpers.js - Add hermes/openclaw to SUPPORTED_INSTALL_TARGETS, schema enum, and install help text - Add .hermes/ and .openclaw/ platform source directories with READMEs - Update install-modules.json so rules/agents/commands/platform-configs cover the new targets Verification: - npx ecc doctor reports all 13 targets OK (including hermes-home and openclaw-home) - install-targets regression guard passes for new targets - Catalog check passes * fix(install): register hermes/openclaw in install-modules schema enum + npm files allowlist --------- Co-authored-by: Lxcardoza993 <265670745+Lxcardoza993@users.noreply.github.com> Co-authored-by: Affaan Mustafa <me@affaanmustafa.com>
83 lines
2.3 KiB
JavaScript
83 lines
2.3 KiB
JavaScript
const antigravityProject = require('./antigravity-project');
|
|
const claudeHome = require('./claude-home');
|
|
const claudeProject = require('./claude-project');
|
|
const codebuddyProject = require('./codebuddy-project');
|
|
const codexHome = require('./codex-home');
|
|
const cursorProject = require('./cursor-project');
|
|
const geminiProject = require('./gemini-project');
|
|
const hermesHome = require('./hermes-home');
|
|
const joycodeProject = require('./joycode-project');
|
|
const openclawHome = require('./openclaw-home');
|
|
const opencodeHome = require('./opencode-home');
|
|
const qwenHome = require('./qwen-home');
|
|
const zedProject = require('./zed-project');
|
|
|
|
const ADAPTERS = Object.freeze([
|
|
claudeHome,
|
|
claudeProject,
|
|
cursorProject,
|
|
antigravityProject,
|
|
codexHome,
|
|
geminiProject,
|
|
hermesHome,
|
|
opencodeHome,
|
|
openclawHome,
|
|
codebuddyProject,
|
|
joycodeProject,
|
|
qwenHome,
|
|
zedProject,
|
|
]);
|
|
|
|
function listInstallTargetAdapters() {
|
|
return ADAPTERS.slice();
|
|
}
|
|
|
|
function getInstallTargetAdapter(targetOrAdapterId) {
|
|
const adapter = ADAPTERS.find(candidate => candidate.supports(targetOrAdapterId));
|
|
|
|
if (!adapter) {
|
|
throw new Error(`Unknown install target adapter: ${targetOrAdapterId}`);
|
|
}
|
|
|
|
return adapter;
|
|
}
|
|
|
|
function planInstallTargetScaffold(options = {}) {
|
|
const adapter = getInstallTargetAdapter(options.target);
|
|
const modules = Array.isArray(options.modules) ? options.modules : [];
|
|
const planningInput = {
|
|
repoRoot: options.repoRoot,
|
|
projectRoot: options.projectRoot || options.repoRoot,
|
|
homeDir: options.homeDir,
|
|
};
|
|
const validationIssues = adapter.validate(planningInput);
|
|
const blockingIssues = validationIssues.filter(issue => issue.severity === 'error');
|
|
if (blockingIssues.length > 0) {
|
|
throw new Error(blockingIssues.map(issue => issue.message).join('; '));
|
|
}
|
|
const targetRoot = adapter.resolveRoot(planningInput);
|
|
const installStatePath = adapter.getInstallStatePath(planningInput);
|
|
const operations = adapter.planOperations({
|
|
...planningInput,
|
|
modules,
|
|
});
|
|
|
|
return {
|
|
adapter: {
|
|
id: adapter.id,
|
|
target: adapter.target,
|
|
kind: adapter.kind,
|
|
},
|
|
targetRoot,
|
|
installStatePath,
|
|
validationIssues,
|
|
operations,
|
|
};
|
|
}
|
|
|
|
module.exports = {
|
|
getInstallTargetAdapter,
|
|
listInstallTargetAdapters,
|
|
planInstallTargetScaffold,
|
|
};
|