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