refactor: infer Meta types from zod schema instead of hand-writing
This commit is contained in:
parent
645f0bacf2
commit
f1720eea5e
@ -3,10 +3,10 @@ import { createCursorRole } from "@uncaged/nerve-workflow-utils";
|
||||
import { coderPrompt } from "./prompt.js";
|
||||
import { z } from "zod";
|
||||
|
||||
export type CoderMeta = { filesCreated: boolean };
|
||||
export const coderMetaSchema = z.object({
|
||||
filesCreated: z.boolean().describe("true if the sense files were created"),
|
||||
});
|
||||
export type CoderMeta = z.infer<typeof coderMetaSchema>;
|
||||
|
||||
export type BuildCoderDeps = {
|
||||
provider: LlmProvider;
|
||||
|
||||
@ -3,10 +3,10 @@ import { createCursorRole } from "@uncaged/nerve-workflow-utils";
|
||||
import { plannerPrompt } from "./prompt.js";
|
||||
import { z } from "zod";
|
||||
|
||||
export type PlannerMeta = { senseName: string };
|
||||
export const plannerMetaSchema = z.object({
|
||||
senseName: z.string().describe("kebab-case sense name from the plan"),
|
||||
});
|
||||
export type PlannerMeta = z.infer<typeof plannerMetaSchema>;
|
||||
|
||||
export type BuildPlannerDeps = {
|
||||
provider: LlmProvider;
|
||||
|
||||
@ -3,10 +3,10 @@ import { createHermesRole } from "@uncaged/nerve-workflow-utils";
|
||||
import { testerPrompt } from "./prompt.js";
|
||||
import { z } from "zod";
|
||||
|
||||
export type TesterMeta = { passed: boolean };
|
||||
export const testerMetaSchema = z.object({
|
||||
passed: z.boolean().describe("true if all e2e checks passed"),
|
||||
});
|
||||
export type TesterMeta = z.infer<typeof testerMetaSchema>;
|
||||
|
||||
export type BuildTesterDeps = {
|
||||
provider: LlmProvider;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user