import { type SynapSdkLike } from "./types.js"; declare const SUPPORTED_STYLES: readonly ["structured", "narrative", "bullet_points"]; export type SynapShortTermStyle = (typeof SUPPORTED_STYLES)[number]; export type SynapShortTermOnError = "fallback" | "raise"; export interface SynapShortTermResult { /** * Synap's compaction, ready to splice into a system prompt. Empty before the * first compaction. Does not repeat the recent turns. */ formattedContext: string; /** Whether the server reported any short-term context (compaction or recent turns). */ available: boolean; } export interface FetchSynapShortTermOptions { sdk: SynapSdkLike; conversationId: string; style?: SynapShortTermStyle; /** Defaults to 'fallback'. */ onError?: SynapShortTermOnError; } /** * Fetch Synap short-term context for `conversationId`. * * Returns `{ formattedContext: '', available: false }` on no content, and also * on SDK failure with the default `onError: 'fallback'`. * * @throws if `conversationId` is empty or `style` is unknown. * @throws the underlying SDK error when `onError: 'raise'`. */ export declare function fetchSynapShortTerm(opts: FetchSynapShortTermOptions): Promise; export interface BuildSynapShortTermMarkdownOptions { /** Wrapping tags. Pass `null` to drop the wrapper. */ preambleOpen?: string | null; preambleClose?: string | null; } /** * Wrap a short-term result as markdown for a `defineInstructions` message. * Returns the empty string when there is no context — the caller emits `null`. */ export declare function buildSynapShortTermMarkdown(result: SynapShortTermResult, opts?: BuildSynapShortTermMarkdownOptions): string; export interface SynapInstructionsOptions extends BuildSynapShortTermMarkdownOptions { sdk: SynapSdkLike; /** Explicit conversation id. Defaults to the eve session id (`ctx.session.id`). */ conversationId?: string; style?: SynapShortTermStyle; /** Defaults to 'fallback' — a recall failure degrades to no injected context. */ onError?: SynapShortTermOnError; } /** * Build the per-turn Synap short-term instructions resolver for * `agent/instructions/`. Evaluated at `turn.started`; returns * `defineInstructions({ markdown })` when there is context, else `null`. */ export declare function createSynapInstructions(options: SynapInstructionsOptions): import("eve/tools").DynamicSentinel<{ markdown: string; } | null>; export {}; //# sourceMappingURL=short_term.d.ts.map