Changelog¶
All notable changes to this project will be documented in this file.
[2.3.0]¶
Added¶
- Tool lifecycle hooks via
IAgent.hooks:PreFuncruns before each tool executes (receivesctx,tool,params), andPostFuncruns after (receivesctx,tool,params,response). Both are chainable pipes —PostFunc's return value replaces the response passed downstream. Hooks run in bothcall()andstream().
Changed (breaking)¶
AgentOptionsinterface renamed toIAgent. Update type imports accordingly.Agentno longer acceptsnameordescriptionoptions. Pass behavior viarulesinstead (adescription-style string can be supplied as aRule).
[2.1.0]¶
Added¶
Ollamaprovider for running local open-source models via Ollama's OpenAI-compatible API. Options:{ model, base_url?, think?, num_ctx? }(noapi_key— defaults to"ollama").- Multimodal
Message.content: nowstring | ContentBlock[]. New exported types:TextBlock,ImageBlock,AudioBlock,DocumentBlock,ContentBlock,MessageContent. Each provider translates supported blocks to its wire format and drops unsupported ones (e.g. Claude drops audio, OpenAI drops document). - Extended thinking on
Message: optionalthinkingandthinking_signaturefields onassistantmessages, persisted across turns. Anthropic's signature is reinjected automatically so multi-turn thinking is accepted by the API. ProviderChunk { type: "signature_delta" }to carry the thinking signature in streaming mode.ResponseMessage.reasoning_signature?: stringoptional field.
Changed¶
Claudeprovider options reworked:base_urlis now the full endpoint URL (no/messagesappended),api_keyis optional (sent asAuthorization: Bearer), and a newbodyfield extends the request payload. This single provider now covers both the classic API key flow and the Claude Code OAuth flow (base_urlwith?beta=true+ OAuth token inapi_key+ betas inheaders).- OpenAI-compatible providers (
Groq,DeepSeek,Ollama) now extend theOpenAIbase class — minimal subclasses that only override defaults. - Providers read
delta.reasoningin addition todelta.reasoning_contentfor thinking (Ollama compatibility).
Removed (breaking)¶
ClaudeCodeprovider andClaudeCodeOptionstype. UseClaudewithbase_url, OAuth token inapi_key, and betas inheadersinstead.- The temporary
Thinkclass (it existed only internally) — thinking is now part ofMessage.
[2.0.0]¶
Changed (breaking)¶
Message.contenttype widened fromstringtostring | ContentBlock[]to support multimodal input/output. Plainstringcontent remains fully backward-compatible.
[1.8.0]¶
Added¶
branchesoption onAgentOptions: array of sub-agents (Agent,AgentOptions, or description string) that run sequentially before eachcall()/stream()turn, building accumulated thinking injected as ephemeralsystemmessage.Agent.stream()method: async generator yieldingStreamChunk(assistant,thinking,tool_call,toolroles).ProviderChunk { type: "thinking_delta" }: all built-in providers parse native model thinking.ResponseMessage.reasoning_content?: stringoptional field.- Built-in tools:
AgentTool,AskTool,ChoiceTool,SleepTool. - Context constructor now accepts plain objects:
metadataasRecord<string,string>,rulesasstring | string[],messagesasMessageOptions | MessageOptions[].
Changed¶
- Context setters (
messages,rules,tools) are now idempotent: filter inherited items by reference before storing locals. AgentOptions.nameandAgentOptions.descriptionare nowdeprecated—name/descriptionprops are alwaysundefinedat runtime;descriptionis converted to aRulein the internal Context.
Removed¶
Context.appendMessages()method.Context.spliceAt()method.
[1.7.0]¶
Added¶
- Five built-in provider classes:
OpenAI,Groq,DeepSeek,Claude,ClaudeCode.
[1.0.4] - 2025-07-17¶
Added¶
- Full integration of the agent’s name and description into the system message.
Improved¶
- Enhanced rule and limit handling during conversation flow.
- Optimized validation process for provider responses.
[1.0.3] - 2025-07-17¶
Changed¶
- Renamed the
Botclass toAgentto ensure consistent terminology. - Refactored related interfaces to adopt the "Agent" term.
Documentation¶
- Updated usage examples and improved main method documentation.
[1.0.2] - 2025-07-17¶
Added¶
- Extra integrity checks prior to publishing.
Fixed¶
- Minor type issues in core interfaces.
Changed¶
- Publication workflow now auto-increments patch version.
[1.0.1] - 2025-07-17¶
Changed¶
- Downgraded package version to
1.0.1to comply with semantic versioning. - Simplified internal logic for error handling in tool calls.
Improved¶
- Better compatibility with various OpenAI API versions.
[2.0.5] (reverted to 1.0.1) - 2025-07-17¶
Changed¶
- Updated package metadata and dependencies.
- Fixed version numbering to restore correct semantic structure.
Improved¶
- Optimized project metadata structure.
[1.0.0] - 2025-07-17¶
Added¶
yarn.lockfile to ensure dependency consistency.- Strict version control enforcement for cross-environment compatibility.
Documentation¶
- Improved installation and usage instructions.
[0.9.0] - 2025-07-17¶
Added¶
- Initial TypeScript compiler configuration with strict mode.
- Module aliasing for improved project structure.
- Optimized compilation options for maximum compatibility.