Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
// SPDX-License-Identifier: LicenseRef-Carbon-Commercial
// Carbon Enterprise file, licensed only under the Carbon Commercial License
// (packages/ee/LICENSE). Not AGPL. Running, modifying, or copying it beyond those terms requires a commercial license.
import type { WorkflowNode, WorkflowNodeType } from "../definition/schema";
import { actionExecutor } from "./action";
import { computeExecutor } from "./compute";
import { conditionExecutor } from "./condition";
import { filterExecutor } from "./filter";
import { integrationExecutor } from "./integration";
import { lookupExecutor } from "./lookup";
import type { NodeExecutor } from "./types";
// One entry per node kind that can run; a missing entry means the kind refuses to execute.
// Permission and execution share an entry so the permission check cannot silently drift.
const EXECUTORS: {
[K in WorkflowNodeType]?: NodeExecutor<Extract<WorkflowNode, { type: K }>>;
} = {
action: actionExecutor,
compute: computeExecutor,
condition: conditionExecutor,
filter: filterExecutor,
integration: integrationExecutor,
lookup: lookupExecutor
};
export function executorFor<N extends WorkflowNode>(
node: N
): NodeExecutor<N> | undefined {
return EXECUTORS[node.type] as unknown as NodeExecutor<N> | undefined;
}