refactor: inline types.ts into role index.ts, remove separate type files
This commit is contained in:
parent
34e42c5c3e
commit
e460d64786
@ -1,8 +1,8 @@
|
|||||||
import { END } from "@uncaged/nerve-core";
|
import { END } from "@uncaged/nerve-core";
|
||||||
import type { Moderator } from "@uncaged/nerve-core";
|
import type { Moderator } from "@uncaged/nerve-core";
|
||||||
import type { PlannerMeta } from "./roles/planner/types.js";
|
import type { PlannerMeta } from "./roles/planner/index.js";
|
||||||
import type { CoderMeta } from "./roles/coder/types.js";
|
import type { CoderMeta } from "./roles/coder/index.js";
|
||||||
import type { TesterMeta } from "./roles/tester/types.js";
|
import type { TesterMeta } from "./roles/tester/index.js";
|
||||||
|
|
||||||
export type SenseMeta = {
|
export type SenseMeta = {
|
||||||
planner: PlannerMeta;
|
planner: PlannerMeta;
|
||||||
|
|||||||
@ -1,8 +1,12 @@
|
|||||||
import type { LlmProvider } from "@uncaged/nerve-workflow-utils";
|
import type { LlmProvider } from "@uncaged/nerve-workflow-utils";
|
||||||
import { createCursorRole } from "@uncaged/nerve-workflow-utils";
|
import { createCursorRole } from "@uncaged/nerve-workflow-utils";
|
||||||
import { coderMetaSchema } from "./types.js";
|
|
||||||
import type { CoderMeta } from "./types.js";
|
|
||||||
import { coderPrompt } from "./prompt.js";
|
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 BuildCoderDeps = {
|
export type BuildCoderDeps = {
|
||||||
provider: LlmProvider;
|
provider: LlmProvider;
|
||||||
@ -19,3 +23,5 @@ export function buildCoderRole({ provider, cwd, sensesDir, nerveRoot }: BuildCod
|
|||||||
extract: { provider, schema: coderMetaSchema },
|
extract: { provider, schema: coderMetaSchema },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
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"),
|
|
||||||
});
|
|
||||||
@ -1,8 +1,12 @@
|
|||||||
import type { LlmProvider } from "@uncaged/nerve-workflow-utils";
|
import type { LlmProvider } from "@uncaged/nerve-workflow-utils";
|
||||||
import { createCursorRole } from "@uncaged/nerve-workflow-utils";
|
import { createCursorRole } from "@uncaged/nerve-workflow-utils";
|
||||||
import { plannerMetaSchema } from "./types.js";
|
|
||||||
import type { PlannerMeta } from "./types.js";
|
|
||||||
import { plannerPrompt } from "./prompt.js";
|
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 BuildPlannerDeps = {
|
export type BuildPlannerDeps = {
|
||||||
provider: LlmProvider;
|
provider: LlmProvider;
|
||||||
@ -18,3 +22,5 @@ export function buildPlannerRole({ provider, cwd, nerveYaml }: BuildPlannerDeps)
|
|||||||
extract: { provider, schema: plannerMetaSchema },
|
extract: { provider, schema: plannerMetaSchema },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
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"),
|
|
||||||
});
|
|
||||||
@ -1,8 +1,12 @@
|
|||||||
import type { LlmProvider } from "@uncaged/nerve-workflow-utils";
|
import type { LlmProvider } from "@uncaged/nerve-workflow-utils";
|
||||||
import { createHermesRole } from "@uncaged/nerve-workflow-utils";
|
import { createHermesRole } from "@uncaged/nerve-workflow-utils";
|
||||||
import { testerMetaSchema } from "./types.js";
|
|
||||||
import type { TesterMeta } from "./types.js";
|
|
||||||
import { testerPrompt } from "./prompt.js";
|
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 BuildTesterDeps = {
|
export type BuildTesterDeps = {
|
||||||
provider: LlmProvider;
|
provider: LlmProvider;
|
||||||
@ -16,3 +20,5 @@ export function buildTesterRole({ provider, sensesDir, nerveRoot }: BuildTesterD
|
|||||||
extract: { provider, schema: testerMetaSchema },
|
extract: { provider, schema: testerMetaSchema },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
import { z } from "zod";
|
|
||||||
|
|
||||||
export type TesterMeta = { passed: boolean };
|
|
||||||
|
|
||||||
export const testerMetaSchema = z.object({
|
|
||||||
passed: z.boolean().describe("true if all e2e checks passed"),
|
|
||||||
});
|
|
||||||
Loading…
x
Reference in New Issue
Block a user