···11import { Type, type Static } from "@sinclair/typebox";
22-import { FactoryError } from "./errors.js";
22+import { MillError } from "./errors.js";
3344export const SubagentSchema = Type.Object({
55 task: Type.String({ description: "Label/description for this program run." }),
···13131414export function validateParams(params: SubagentParams): SubagentParams {
1515 if (!params.task?.trim()) {
1616- throw new FactoryError({
1616+ throw new MillError({
1717 code: "INVALID_INPUT",
1818 message: "'task' is required.",
1919 recoverable: true,
2020 });
2121 }
2222 if (!params.code?.trim()) {
2323- throw new FactoryError({
2323+ throw new MillError({
2424 code: "INVALID_INPUT",
2525 message: "'code' is required and must be non-empty.",
2626 recoverable: true,