Skip to content

Releases: johanneslatzel/llm-chat

v0.6.0

Choose a tag to compare

@johanneslatzel johanneslatzel released this 23 Jun 10:14

Breaking

  • src/chats/ split into src/chat/ and src/service/; src/tools/base.ts split into tool.ts, parameter.ts, result.ts, package.ts, hook.ts — update deep imports
  • executeTool() return type changed from {result, status}[] to ToolResult[] (adds tool and optional error fields)

Features

  • reasoningEffort config (NoneXHigh), env LLM_CHAT_OPENAI_REASONING_EFFORT
  • toolChoice config (None/Auto/Required), env LLM_CHAT_OPENAI_TOOL_CHOICE
  • verbosity config (Low/Medium/High), env LLM_CHAT_OPENAI_VERBOSITY
  • ChatRole.Developer; useDeveloperRole flag maps system messages to role: developer
  • systemPrompt config string bypasses the prompt tree
  • trimMessages option strips whitespace from assistant/reasoning content
  • ToolParameterProperty sub-schemas + ObjectPropertyBuilder; recursive toJSON() for properties, required, and custom array items
  • beforeSendLoop/afterSendLoop/beforeSend/afterSend service hooks via service.hook(), reentrant-safe
  • ToolSuite.get(name); executeTool(name, args, silent); ChatService.injectToolCall()
  • reasoning_details/reasoning/reasoning_content extraction from stream deltas, priority cascade
  • Service, message, and tool hooks await async callbacks

Internal

  • Stream types extracted to src/service/stream-types.ts
  • _drainQueue() extracted — 4 inline drain blocks in send() consolidated
  • _pendingReentrant cleared each iteration, fixing infinite loop
  • ChatMessageOrigin.Hook guard prevents infinite JSON hook→queue→hook loops
  • Added p-map and openai dependencies
  • Documentation updated

Full Changelog: v0.5.0...v0.6.0

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

v0.4.0

Choose a tag to compare

@johanneslatzel johanneslatzel released this 09 Jun 19:15
  • MessageWriter interface implemented by Chat and the new MessageQueue
  • Chat now uses mutex
  • new service.interrupt handling (breaking change!)
  • FinishReason.Aborted for interrupted conversations
  • ToolPackage packages tools for easy consumption

Full Changelog: v0.3.1...v0.4.0

v0.3.1

Choose a tag to compare

@johanneslatzel johanneslatzel released this 07 Jun 15:39
  • refactor: extract env var helpers into dedicated module
  • test: increase coverage to 100%
  • docs: add references to llm-chat-file and llm-chat-skill

Full Changelog: v0.1.2...v0.3.1

v0.3.0

Choose a tag to compare

@johanneslatzel johanneslatzel released this 06 Jun 17:43
  • Added session IDs to chats
  • Strongly typed ToolParameter properties
  • Clear separation of system message from other messages
  • Added JSDocs to all exported classes/interfaces
  • Tools can now safely throw Errors (caught automatically)
  • Tool validateRequiredParams support
  • Reasoning-only responses no longer produce empty assistant messages

Full Changelog: v0.1.2...v0.3.0

v0.2.0

Choose a tag to compare

@johanneslatzel johanneslatzel released this 04 Jun 14:49
  • chunk streaming (ChunkStream, new) and message gathering (Chat) separated; removed ChatEvent
  • hooks are now standardised: someResource.hook().someFilter(...).someOtherFiler(...).do(yourHandler)
  • added timestamps to ChatMessage and optional timestamp injection in OpenAIService messages
  • systemMessage deduplicated and now systemMessage is singular, meaning every chat.system(...) call override the singular systemMessage that is always prepended to all other messages

Full Changelog: v0.1.2...v0.2.0

v0.1.2

Choose a tag to compare

@johanneslatzel johanneslatzel released this 03 Jun 14:31

Published npm package

Full Changelog: v0.1.0...v0.1.2

v0.1.0

Choose a tag to compare

@johanneslatzel johanneslatzel released this 02 Jun 09:26

Initial release