1.8 KiB
Changelog
[Unreleased]
[0.31.0] - 2026-01-02
Breaking Changes
-
Transport abstraction removed:
ProviderTransport,AppTransport, andAgentTransportinterface have been removed. Use thestreamFnoption directly for custom streaming implementations. -
Agent options renamed:
transport→ removed (usestreamFninstead)messageTransformer→convertToLlmpreprocessor→transformContext
-
AppMessagerenamed toAgentMessage: All references toAppMessagehave been renamed toAgentMessagefor consistency. -
CustomMessagesrenamed toCustomAgentMessages: The declaration merging interface has been renamed. -
UserMessageWithAttachmentsandAttachmenttypes removed: Attachment handling is now the responsibility of theconvertToLlmfunction. -
Agent loop moved from
@mariozechner/pi-ai: TheagentLoop,agentLoopContinue, and related types have moved to this package. Import from@mariozechner/pi-agentinstead.
Added
-
streamFnoption onAgentfor custom stream implementations. Default usesstreamSimplefrom pi-ai. -
streamProxy()utility function for browser apps that need to proxy LLM calls through a backend server. Replaces the removedAppTransport. -
getApiKeyoption for dynamic API key resolution (useful for expiring OAuth tokens like GitHub Copilot). -
agentLoop()andagentLoopContinue()low-level functions for running the agent loop without theAgentclass wrapper. -
New exported types:
AgentLoopConfig,AgentContext,AgentTool,AgentToolResult,AgentToolUpdateCallback,StreamFn.
Changed
-
Agentconstructor now has all options optional (empty options use defaults). -
queueMessage()is now synchronous (no longer returns a Promise).