UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

22 lines (21 loc) • 1.17 kB
import type { RendererId } from "./catalog/schema.js"; import { type PromptSelectors } from "./select.js"; import type { SectionRenderInputs } from "./types.js"; export interface RendererSpec { readonly id: RendererId; readonly version: number; readonly stability: "static" | "session" | "leg"; readonly reads: "inputs" | "facts" | "env" | "memory" | "mcp" | "mark" | "selectors"; readonly external: boolean; /** The catalog messages this renderer's output is (an overlay targets them). */ readonly messages?: readonly string[]; } export declare const RENDERERS: Readonly<Record<RendererId, RendererSpec>>; /** The renderer version vector — the identity's renderer element (a changed output bumps a version). */ export declare function rendererVector(): Readonly<Record<RendererId, number>>; /** One renderer's output for these inputs (and the variant it rendered, when it rendered a catalog message); * undefined ⇒ the section is absent this run. */ export declare function runRenderer(id: RendererId, inputs: SectionRenderInputs, selectors: PromptSelectors): { readonly text: string; readonly variant?: string; } | undefined;