scai
Version:
> **AI-powered CLI for local code analysis, commit message suggestions, and natural-language queries.** 100% local, private, GDPR-friendly, made in Denmark/EU with ❤️.
15 lines (14 loc) • 614 B
JavaScript
// src/agents/WorkflowResolver.ts
import { resolveModulesByNames } from "../pipeline/registry/moduleRegistry.js";
/**
* Simple resolver function to compute module order (honours before/after relationships).
* This replaces the previous Workflow class used only to resolve modules.
*
* Returns an array of PromptModuleMeta (the existing shape your registry returns).
*/
export function resolveModules(goals) {
// Trim and validate names here (defensive)
const trimmed = goals.map((g) => (typeof g === "string" ? g.trim() : g));
const modules = resolveModulesByNames(trimmed);
return modules;
}