refactor: infer Meta types from zod schema instead of hand-writing

This commit is contained in:
小橘 2026-04-28 04:52:21 +00:00
parent 645f0bacf2
commit f1720eea5e
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;