Releases: danny-avila/agents
Release list
v3.1.72
What's Changed
- feat: emit codeSessionContext for read_file requests by @danny-avila in #118
Full Changelog: v3.1.71...v3.1.72
v3.1.71
What's Changed
- fix: tolerate trailing tool_use without a thinking block by @danny-avila in #116
- 🪢 feat: Reference Previous Tool Outputs in Subsequent Calls by @danny-avila in #114
- refactor: lazy-annotate tool output refs at LLM request time by @danny-avila in #117
Full Changelog: v3.1.70...v3.1.71
v3.1.70
What's Changed
- 🗝️ feat: Make CODE_API_KEY optional for sandbox tools by @danny-avila in #113
- feat: agent skills, subagents, & hooks initial support by @danny-avila in #98
Full Changelog: v3.1.68...v3.1.70
v3.1.68
What's Changed
- 🔊 fix: warn when
summarization.trigger.typeis unrecognized by @danny-avila in #108 - 🔊 fix: surface provider, model, and status in summarization error logs by @danny-avila in #109
- 🛡️ fix: validate edge agent refs early in MultiAgentGraph by @danny-avila in #111
- fix(summarization): log and recover from model init errors by @danny-avila in #112
Full Changelog: v3.1.67...v3.1.68
v3.1.67
What's Changed
- 🧠 chore: Widen
AnthropicClientOptionsThinking for Opus 4.7 Display by @danny-avila in #106
Full Changelog: v3.1.66...v3.1.67
v3.1.66
What's Changed
- 🔍 fix: exclude deferred tools from instruction token accounting by @danny-avila in #105
Full Changelog: v3.1.65...v3.1.66
v3.1.65
What's Changed
- 🔍 fix: Preserve Anthropic
server_tool_useblock types by @danny-avila in #92 - 📦 chore: update mathjs to v15.2.0 by @danny-avila in 64573b0
Full Changelog: v3.1.64...v3.1.65
v3.1.64
What's Changed
- 📦 chore: update
axiosto v1.15.0 by @danny-avila in #86
Full Changelog: v3.1.63...v3.1.64
v3.1.63
What's Changed
- 🪗 feat: Staged Context Compaction Pipeline with LLM Summarization by @danny-avila in #72
- 🤖 feat: add agentName to Langfuse trace metadata by @dustinhealy in #80
- 📦 chore: bump dependabot packages by @danny-avila in #81
- 📦 chore: pin exact
axiosversion@1.13.6, bump agents SDK by @danny-avila in #82
Full Changelog: v3.1.56...v3.1.63
v3.1.56
What's Changed
Fix: ensureThinkingBlockInMessages now scoped to trailing sequence only (#75)
Before: The function iterated all messages from index 0, converting every AI→Tool sequence that lacked a thinking block into a HumanMessage — including already-accepted history from prior turns. This corrupted prompt caching and added unnecessary token overhead on every multi-turn request.
After: The function finds the last HumanMessage in the array, preserves everything before it untouched, and only validates/converts the trailing AI→Tool sequence that will actually be sent to the provider. Earlier history is never re-examined.
Fix: Image blocks preserved in ensureThinkingBlockInMessages — prevents 174× token amplification (#71)
Before: When converting AI→Tool sequences to a buffer string for thinking-block compatibility, base64-encoded image content was serialized as plain text. A single modest image could inflate token counts by 174× or more.
After: Introduced buildToolSequenceContent / appendMessageContent / flushTextChunks helpers that walk the message content array and route each block type correctly: image blocks (image_url, image) are shallow-copied into the structured content array as-is, tool_use blocks are serialized as text annotations, and tool_calls metadata is only appended when the content array contains no tool_use blocks (preventing double serialization). Binary image data never becomes text tokens.
A chainHasThinkingBlock helper was also added to detect Bedrock-style multi-turn reasoning chains where follow-up AI messages emit content: "" with tool_calls only — these are correctly identified as continuations of a thinking-enabled turn and are not converted.
Feat: auth and expires_at fields on ToolCall structures (#74)
ToolCallDelta, ToolCallPart, and PartMetadata now carry optional auth?: string and expires_at?: number fields. createContentAggregator propagates these fields through ON_RUN_STEP_DELTA events and merges them into the final ToolCallContent part during aggregation. This enables downstream consumers to surface authentication URLs and expiration timestamps for tool calls that require user interaction (e.g., OAuth flows).
Refactor: Replace js-tiktoken with ai-tokenizer (#69)
js-tiktoken (a WASM-backed port) has been replaced with the lighter ai-tokenizer package. Key changes:
getTokenizer()now uses dynamicimport()for encoding data (o200k_baseorclaude), so encoding tables are only loaded when needed.createTokenCounteris nowasyncand awaits tokenizer initialization.- A
TokenEncoderManager.reset()method clears cached tokenizer instances for memory management. encodingForModel()selectsclaudeencoding for Claude model names,o200k_baseotherwise.- All legacy Tiktoken implementation code removed.
CI: ESLint and TypeScript type-checking added to workflows
ESLint is now run against src/**/*.ts in both the PR (ci.yml) and publish (publish.yml) workflows. The publish workflow additionally runs tsc --noEmit before building, ensuring type errors cannot reach a published package.
Chore: npm audit fix
Resolved flagged dependency vulnerabilities in package-lock.json with no API surface changes.
Full Changelog: v3.1.55...v3.1.56