Releases: johanneslatzel/llm-chat
Releases · johanneslatzel/llm-chat
Release list
v0.6.0
Breaking
src/chats/split intosrc/chat/andsrc/service/;src/tools/base.tssplit intotool.ts,parameter.ts,result.ts,package.ts,hook.ts— update deep importsexecuteTool()return type changed from{result, status}[]toToolResult[](addstooland optionalerrorfields)
Features
reasoningEffortconfig (None–XHigh), envLLM_CHAT_OPENAI_REASONING_EFFORTtoolChoiceconfig (None/Auto/Required), envLLM_CHAT_OPENAI_TOOL_CHOICEverbosityconfig (Low/Medium/High), envLLM_CHAT_OPENAI_VERBOSITYChatRole.Developer;useDeveloperRoleflag maps system messages torole: developersystemPromptconfig string bypasses the prompt treetrimMessagesoption strips whitespace from assistant/reasoning contentToolParameterPropertysub-schemas +ObjectPropertyBuilder; recursivetoJSON()forproperties,required, and custom arrayitemsbeforeSendLoop/afterSendLoop/beforeSend/afterSendservice hooks viaservice.hook(), reentrant-safeToolSuite.get(name);executeTool(name, args, silent);ChatService.injectToolCall()reasoning_details/reasoning/reasoning_contentextraction from stream deltas, priority cascade- Service, message, and tool hooks
awaitasync callbacks
Internal
- Stream types extracted to
src/service/stream-types.ts _drainQueue()extracted — 4 inline drain blocks insend()consolidated_pendingReentrantcleared each iteration, fixing infinite loopChatMessageOrigin.Hookguard prevents infinite JSON hook→queue→hook loops- Added
p-mapandopenaidependencies - Documentation updated
Full Changelog: v0.5.0...v0.6.0
v0.5.0
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.systemMessage→ChatJSON.systemPromptChatMessage.originis now required (enum: User/Model/Hook/Tool/System)ChatInterface.addAll()removed (method still exists onChatclass)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()returnsToolResult[]ToolSuite.executeTool()returns arrays, never throws (returns error result)ToolPackageis abstract class (was interface);dispose()removedChatService.needsResend()removed; usesetNeedsResend(), send() loops automaticallyMessageQueue.system()and.addAll()removed
Features
- Composable system prompts via
PromptContainer/Prompttree ChatMessageOriginon every message;HookMessageWriterinterfaceResultBuilderfor multi-result tool chainsJsonHookRegistry: load.jsonhooks from a directory (chat/stream/tool targets)ToolPackage.tutorial()auto-populates the system promptChatService.init()(eager loading),.clear()(full reset),.resetTutorials()ChunkStream.summary()/.clearSummaries()clear(retainHooks?)on Chat, ChunkStream, ToolSuitesystemPromptDirwith auto-created default.mdfiles on first accessLLM_CHAT_HOOKS_DIRandLLM_CHAT_SYSTEM_PROMPT_DIRenv varsenvOptionalString()helper for optional env var config- Coverage thresholds raised to 100%
Full Changelog: v0.4.0...v0.5.0
v0.4.0
- 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
- 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
- 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
- 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
Published npm package
Full Changelog: v0.1.0...v0.1.2