UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

16 lines (15 loc) • 1.01 kB
/** * The one text rendering of a content block, for every model-facing reader that shows a block as text: a text block is * its own text; any other block is its marker — `[image: image/png]`, `[document: application/pdf]`, `[<type>]` — never * its payload. Readers: the `tool_end.output` projection's cut block, the observer digest, the sub-agent step outcome, * the auto-mode classifier window and the user-attachment view. Two readers omit non-text blocks instead of showing them * (no second rendering): the compaction summarizer's message flatten and the host-facing post-tool-batch digest. * A leaf module (no imports); consumers outside `src/engine` reach it through the `src/internal/llm.ts` facade. */ /** A text block: `{ type: "text", text: string }`. */ export declare const isTextBlock: (b: unknown) => b is { type: "text"; text: string; }; /** The block as text: a text block's text, any other block's marker. */ export declare const renderContentBlock: (b: unknown) => string;