49 lines
1.5 KiB
TypeScript
49 lines
1.5 KiB
TypeScript
import { z } from "zod";
|
|
|
|
export const workerNames = [
|
|
"fast-lo",
|
|
"fast-hi",
|
|
"good-lo",
|
|
"good-hi",
|
|
"deep-lo",
|
|
"deep-hi",
|
|
] as const;
|
|
|
|
const assignment = z.strictObject({
|
|
model: z.string().trim().min(1),
|
|
effort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]),
|
|
});
|
|
|
|
const common = {
|
|
provider: z.string().trim().min(1).default("openai"),
|
|
lunaPriority: z.boolean().default(true),
|
|
playwright: z.boolean().default(false),
|
|
};
|
|
|
|
export const settings = z.discriminatedUnion("mode", [
|
|
z.strictObject({ ...common, mode: z.literal("gpt") }),
|
|
z.strictObject({
|
|
...common,
|
|
mode: z.literal("custom"),
|
|
agents: z.strictObject({
|
|
"fast-lo": assignment,
|
|
"fast-hi": assignment,
|
|
"good-lo": assignment,
|
|
"good-hi": assignment,
|
|
"deep-lo": assignment,
|
|
"deep-hi": assignment,
|
|
// Deprecated compatibility field. Coordinate is derived from deep-lo/good-lo.
|
|
coordinate: assignment.optional(),
|
|
}),
|
|
}),
|
|
]);
|
|
|
|
export const gptAgents = {
|
|
"fast-lo": { model: "gpt-5.6-luna", effort: "low" },
|
|
"fast-hi": { model: "gpt-5.6-luna", effort: "high" },
|
|
"good-lo": { model: "gpt-5.6-sol", effort: "low" },
|
|
"good-hi": { model: "gpt-5.6-sol", effort: "high" },
|
|
"deep-lo": { model: "gpt-6-astra", effort: "low" },
|
|
"deep-hi": { model: "gpt-6-astra", effort: "high" },
|
|
} satisfies Record<(typeof workerNames)[number], z.infer<typeof assignment>>;
|