scai
Version:
> **A local-first AI CLI for understanding, querying, and iterating on large codebases.** > **100% local • No token costs • No cloud • No prompt injection • Private by design**
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;
}