refactor(llm, memory): Use generic types prompt builder and prompt component for actor,intent and handoff

This commit is contained in:
2026-07-19 18:20:28 +05:30
parent 1e34becec7
commit ee25bf4a4c
11 changed files with 267 additions and 158 deletions

View File

@@ -1,6 +1,22 @@
import { z } from "zod";
import { ProviderRegistry } from "./registry.js";
export interface PromptComponent {
label: string;
type: "system" | "world" | "events" | "memories" | "input" | "other";
content: string;
}
export interface PromptBreakdown {
systemPrompt: string;
userContext: string;
components?: PromptComponent[];
}
export interface IPromptBuilder<TArgs extends any[]> {
build(...args: TArgs): PromptBreakdown;
}
export interface LLMRequest<T extends z.ZodTypeAny> {
systemPrompt: string;
userContext: string;