mirror of
https://github.com/affaan-m/ECC.git
synced 2026-08-31 04:09:51 +02:00
Following the hermes/openclaw (#2433) and kimi (#2441) adapter recipe. What's included (adal-project adapter, project kind, ./.adal root, same shape as kimi-project/joycode-project): - scripts/lib/install-targets/adal-project.js — 10-line project-kind adapter targeting ./.adal - Registry + helpers platform-ownership wiring - adal target on the 5 shared modules (rules-core, agents-core, commands-core, platform-configs, workflow-quality) + SUPPORTED_INSTALL_TARGETS + legacy-compat module - .adal in platform-configs paths - Both schema enums (install-modules, ecc-install-config), npm files allowlist, installer help text, .adal/README.md stub AdaL (adalagent.ai) is a terminal-based AI coding agent (by SylphAI) built on AdalFlow, with native MCP support and project-scoped config under ./.adal/ (skills, custom tools, memory) plus a root-level AGENTS.md instructions file — matching the shape ECC already installs into other AGENTS.md-based harnesses (Codex, OpenCode, Kimi). Verified: full suite matches main's baseline (3334 passed, same pre-existing failures unrelated to this change — OpenCode build/npm-pack surface tests requiring build tooling not present in this sandbox); catalog check passes (67 agents / 94 commands / 281 skills); dry-run resolves Target: adal / Adapter: adal-project / root ./.adal with all 5 modules planned; doctor reports OK after a real install; uninstall cleanly reverses all 458 operations. Co-Authored-By: AdaL <adal@sylph.ai>
92 lines
2.7 KiB
JavaScript
92 lines
2.7 KiB
JavaScript
const adalProject = require('./adal-project');
|
|
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 kimiProject = require('./kimi-project');
|
|
const openclawHome = require('./openclaw-home');
|
|
const opencodeHome = require('./opencode-home');
|
|
const qwenHome = require('./qwen-home');
|
|
const zedProject = require('./zed-project');
|
|
const { resolveInvocationEnvironment } = require('../invocation-environment');
|
|
|
|
const ADAPTERS = Object.freeze([
|
|
claudeHome,
|
|
claudeProject,
|
|
cursorProject,
|
|
antigravityProject,
|
|
codexHome,
|
|
geminiProject,
|
|
hermesHome,
|
|
opencodeHome,
|
|
openclawHome,
|
|
codebuddyProject,
|
|
joycodeProject,
|
|
kimiProject,
|
|
qwenHome,
|
|
zedProject,
|
|
adalProject,
|
|
]);
|
|
|
|
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 exemptValidationCodes = new Set(Array.isArray(options.exemptValidationCodes) ? options.exemptValidationCodes : []);
|
|
const planningInput = {
|
|
repoRoot: options.repoRoot,
|
|
projectRoot: options.projectRoot || options.repoRoot,
|
|
homeDir: options.homeDir,
|
|
env: resolveInvocationEnvironment(options),
|
|
};
|
|
const validationIssues = adapter.validate(planningInput);
|
|
const blockingIssues = validationIssues.filter(issue => (
|
|
issue.severity === 'error' && !exemptValidationCodes.has(issue.code)
|
|
));
|
|
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,
|
|
};
|