@sema-agent/core
Version:
Stateless, task-oriented AI agent core
28 lines (27 loc) • 1.83 kB
TypeScript
import type { EngineText } from "../prompt-assembly/engine-text.js";
/**
* The longest output-style NAME the seat admits — the reference implementation's own bound (its `output_style`
* renderer checks `style.length` against `HQe`, declared `HQe=256`). Past it the reference drops the
* per-turn reminder and logs an error; here the seat is refused at prepare (`config.output_style_invalid`), so a
* name the deployment declared is never silently not stated.
*/
export declare const OUTPUT_STYLE_NAME_MAX = 256;
/** The seat as the door read it: a non-empty name within the bound, and the style's own turn reminder when it has one. */
export interface OutputStyleSeat {
readonly name: string;
readonly turnReminder?: string;
}
/**
* The frame body — the reference renderer's sentence (`core/event.output-style`): the name (escaped there; held to one
* neutralized line here), then the style's turn reminder or the default one (`core/event.output-style.default-reminder`),
* in `say`'s reading. Name and reminder are the deployment's declaration (caller-trusted, like `appendSystemPrompt`);
* the attachment wrap point still neutralizes the authority tags in the whole body.
*/
export declare function renderOutputStyle(seat: OutputStyleSeat, say: EngineText): string;
/**
* The seat's door: the seat as read, or `undefined` when it is absent. Every bad value is refused by name
* (`config.output_style_invalid`), never ignored — a seat the deployment believes it declared must not run as no
* seat. Four shapes: not an object of exactly `name` / `turnReminder`; a `name` that is not a string or is empty; a
* `name` longer than {@link OUTPUT_STYLE_NAME_MAX}; a `turnReminder` present but not a non-empty string.
*/
export declare function screenOutputStyle(seat: unknown): OutputStyleSeat | undefined;