Files
oh-my-pi/packages/agent/CHANGELOG.md
T
2026-01-20 16:30:47 +01:00

5.4 KiB

Changelog

[Unreleased]

[6.8.0] - 2026-01-20

Changed

  • Updated proxy stream processing to use utility function for reading lines

[6.2.0] - 2026-01-19

Added

  • Enhanced getToolContext to receive tool call batch information including batchId, index, total count, and tool call details

[5.6.7] - 2026-01-18

Fixed

  • Added proper tool result messages for tool calls that are aborted or error out
  • Ensured tool_use/tool_result pairing is maintained when tool execution fails

[4.6.0] - 2026-01-12

Changed

  • Modified assistant message handling to split messages around tool results for improved readability when using Cursor tools

Fixed

  • Fixed tool result ordering in Cursor mode by buffering results and emitting them at the correct position within assistant messages

[4.3.0] - 2026-01-11

Added

  • Added cursorExecHandlers and cursorOnToolResult options for local tool execution with cursor-based streaming
  • Added emitExternalEvent method to allow external event injection into the agent state

[4.0.0] - 2026-01-10

Added

  • Added popLastSteer() and popLastFollowUp() methods to remove and return the last queued message (LIFO) for dequeue operations
  • thinkingBudgets option on Agent and AgentOptions to customize token budgets per thinking level
  • sessionId option on Agent to forward session identifiers to LLM providers for session-based caching

Fixed

  • minimal thinking level now maps to minimal reasoning effort instead of being treated as low

[3.33.0] - 2026-01-08

Fixed

  • Ensured aborted assistant responses always include an error message for callers.
  • Filtered thinking blocks from Cerebras request context to keep multi-turn prompts compatible.

[3.21.0] - 2026-01-06

Changed

  • Switched from local @oh-my-pi/pi-ai to upstream @oh-my-pi/pi-ai package

Added

  • Added sessionId option for provider caching (e.g., OpenAI Codex session-based prompt caching)
  • Added sessionId getter/setter on Agent class for runtime session switching

[3.20.0] - 2026-01-06

Breaking Changes

  • Replaced queueMessage/queueMode with steering + follow-up queues: use steer, setSteeringMode, and getSteeringMode for mid-run interruptions, and followUp, setFollowUpMode, and getFollowUpMode for post-turn messages
  • Agent loop callbacks now use getSteeringMessages and getFollowUpMessages instead of getQueuedMessages

Added

  • Added follow-up message queue support so new user messages can continue a run after the agent would otherwise stop
  • Added RenderResultOptions.spinnerFrame for animated tool-result rendering

Changed

  • prompt() and continue() now throw when the agent is already streaming; use steering or follow-up queues instead

[3.4.1337] - 2026-01-03

Added

  • Added popMessage() method to Agent class for removing and retrieving the last message
  • Added abort signal checks during response streaming for faster interruption handling

Fixed

  • Fixed abort handling to properly return aborted message state when stream is interrupted mid-response

[1.341.0] - 2026-01-03

Added

  • Added interruptMode option to control when queued messages interrupt tool execution.
  • Implemented "immediate" mode (default) to check queue after each tool and interrupt remaining tools.
  • Implemented "wait" mode to defer queue processing until the entire turn completes.
  • Added getter and setter methods for interruptMode on Agent class.

[1.337.1] - 2026-01-02

Changed

  • Forked to @oh-my-pi scope with unified versioning across all packages

[1.337.0] - 2026-01-02

Initial release under @oh-my-pi scope. See previous releases at badlogic/pi-mono.

[0.31.0] - 2026-01-02

Breaking Changes

  • Transport abstraction removed: ProviderTransport, AppTransport, and AgentTransport interface have been removed. Use the streamFn option directly for custom streaming implementations.

  • Agent options renamed:

    • transport → removed (use streamFn instead)
    • messageTransformer → convertToLlm
    • preprocessor → transformContext
  • AppMessage renamed to AgentMessage: All references to AppMessage have been renamed to AgentMessage for consistency.

  • CustomMessages renamed to CustomAgentMessages: The declaration merging interface has been renamed.

  • UserMessageWithAttachments and Attachment types removed: Attachment handling is now the responsibility of the convertToLlm function.

  • Agent loop moved from @oh-my-pi/pi-ai: The agentLoop, agentLoopContinue, and related types have moved to this package. Import from @oh-my-pi/pi-agent instead.

Added

  • streamFn option on Agent for custom stream implementations. Default uses streamSimple from pi-ai.

  • streamProxy() utility function for browser apps that need to proxy LLM calls through a backend server. Replaces the removed AppTransport.

  • getApiKey option for dynamic API key resolution (useful for expiring OAuth tokens like GitHub Copilot).

  • agentLoop() and agentLoopContinue() low-level functions for running the agent loop without the Agent class wrapper.

  • New exported types: AgentLoopConfig, AgentContext, AgentTool, AgentToolResult, AgentToolUpdateCallback, StreamFn.

Changed

  • Agent constructor now has all options optional (empty options use defaults).

  • queueMessage() is now synchronous (no longer returns a Promise).