Skip to content

v0.2.0

Latest

Choose a tag to compare

@arnavsurve arnavsurve released this 28 Feb 02:19

What's New

  • section() helpersection(id, render) is the single API for creating sections. Return a string to include, null to exclude.
  • XML formatbuilder.build(ctx, { format: 'xml' }) wraps each section in <id> tags. Both Claude and Gemini recommend this for structured prompts.
  • Groups.group('tools', b => b.use(...)) nests sections under a named XML wrapper. Transparent in text mode. Supports nesting.
  • .useOneOf() — Mutually exclusive sections. First candidate that renders wins, the rest are excluded.
  • Default type parametersPromptSection, PromptContext, and PromptBuilder all have defaults. Static sections work in any builder without type annotations.
  • PromptFormat type — Extensible format system with exhaustive switch for adding new output formats.

Install

pnpm add @anythingai/teleprompt@0.2.0