mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-31 14:13:27 +08:00
feat: orchestration harness, selective install, observer improvements
This commit is contained in:
42
scripts/lib/install/runtime.js
Normal file
42
scripts/lib/install/runtime.js
Normal file
@@ -0,0 +1,42 @@
|
||||
'use strict';
|
||||
|
||||
const {
|
||||
createLegacyInstallPlan,
|
||||
createManifestInstallPlan,
|
||||
} = require('../install-executor');
|
||||
|
||||
function createInstallPlanFromRequest(request, options = {}) {
|
||||
if (!request || typeof request !== 'object') {
|
||||
throw new Error('A normalized install request is required');
|
||||
}
|
||||
|
||||
if (request.mode === 'manifest') {
|
||||
return createManifestInstallPlan({
|
||||
target: request.target,
|
||||
profileId: request.profileId,
|
||||
moduleIds: request.moduleIds,
|
||||
includeComponentIds: request.includeComponentIds,
|
||||
excludeComponentIds: request.excludeComponentIds,
|
||||
projectRoot: options.projectRoot,
|
||||
homeDir: options.homeDir,
|
||||
sourceRoot: options.sourceRoot,
|
||||
});
|
||||
}
|
||||
|
||||
if (request.mode === 'legacy') {
|
||||
return createLegacyInstallPlan({
|
||||
target: request.target,
|
||||
languages: request.languages,
|
||||
projectRoot: options.projectRoot,
|
||||
homeDir: options.homeDir,
|
||||
claudeRulesDir: options.claudeRulesDir,
|
||||
sourceRoot: options.sourceRoot,
|
||||
});
|
||||
}
|
||||
|
||||
throw new Error(`Unsupported install request mode: ${request.mode}`);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
createInstallPlanFromRequest,
|
||||
};
|
||||
Reference in New Issue
Block a user