Skip to content

v0.5.0

Choose a tag to compare

@johanneslatzel johanneslatzel released this 15 Jun 13:25

Major rework of the system prompt system, JSON hooks, multi-result tool support, and message origin tracking.

Breaking

  • chat.system(content)chat.system().child('general').prompt('id').setContent(content)
  • ChatJSON.systemMessageChatJSON.systemPrompt
  • ChatMessage.origin is now required (enum: User/Model/Hook/Tool/System)
  • ChatInterface.addAll() removed (method still exists on Chat class)
  • Chat.clear() now clears message hook listeners by default (was: hooks survived)
  • ChunkStream.clear() now clears chunk listeners by default (was: listeners survived)
  • Tool.execute() returns ToolResult[]
  • ToolSuite.executeTool() returns arrays, never throws (returns error result)
  • ToolPackage is abstract class (was interface); dispose() removed
  • ChatService.needsResend() removed; use setNeedsResend(), send() loops automatically
  • MessageQueue.system() and .addAll() removed

Features

  • Composable system prompts via PromptContainer/Prompt tree
  • ChatMessageOrigin on every message; HookMessageWriter interface
  • ResultBuilder for multi-result tool chains
  • JsonHookRegistry: load .json hooks from a directory (chat/stream/tool targets)
  • ToolPackage.tutorial() auto-populates the system prompt
  • ChatService.init() (eager loading), .clear() (full reset), .resetTutorials()
  • ChunkStream.summary() / .clearSummaries()
  • clear(retainHooks?) on Chat, ChunkStream, ToolSuite
  • systemPromptDir with auto-created default .md files on first access
  • LLM_CHAT_HOOKS_DIR and LLM_CHAT_SYSTEM_PROMPT_DIR env vars
  • envOptionalString() helper for optional env var config
  • Coverage thresholds raised to 100%

Full Changelog: v0.4.0...v0.5.0