import { prepareGoalCommand } from '../goal/workflowController.js'; import type { ManagedCommandController } from './types.js'; const CONTROLLERS: Readonly> = { goal: (inputs, options) => { const context = (options.context ?? {}) as Partial< Parameters[1] >; return prepareGoalCommand(inputs, { ...context, cwd: options.cwd, runtimeContext: options.runtimeContext, }); }, }; /** 业务运行时注册在内核控制层;Workflow Runner 只按声明请求适配器。 */ export function managedCommandController(kind: string): ManagedCommandController | null { return CONTROLLERS[kind] ?? null; }