返回源码地图

packages/agent/CHANGELOG.md

v1.3.0 · 71023aec1546 · 05:1.3.0回溯至1.0.1的相关变更

完整原文供逐行核对;页面收录不代表每行都经过人工语义审核。MIT 许可见 许可证。

1# Changelog
2
3## [1.3.0] - 2026-10-15
4
5## [1.2.0] - 2026-10-12
6
7## [1.1.0] - 2026-10-07
8
9### Added
10
11- Added `durationMs` to tool result messages, `AgentToolCallOutcome`, and `tool_execution_end` events: how long `execute()` took, measured with a monotonic clock and excluding hooks. Calls that did not run have none ([#10549](https://github.com/earendil-works/pi/issues/10549))
12
13### Changed
14
15- `streamProxy()` returns an `AssistantMessageEventStream`, so proxied responses get `durationMs` like direct ones
16
17## [1.0.4] - 2026-10-05
18
19## [1.0.3] - 2026-10-05
20
21## [1.0.2] - 2026-10-04
22
23## [1.0.1] - 2026-10-03
24
25## [1.0.0] - 2026-10-01
26
27### Breaking Changes
28
29- Removed the experimental harness from `@earendil-works/pi-agent-core`: `AgentHarness`, sessions and session storage, the durable runtime, pico3, harness tools, compaction, skills, prompt templates, system prompt helpers, telemetry schemas, the search service types, and the `uuidv7` and pi-telemetry re-exports. The `./node`, `./harness/*`, and `./experimental/pico3` subpath exports are gone. The package now contains only `Agent`, the agent loop, the proxy stream, and their types. Use `@earendil-works/pi-durable` for durable sessions.
30
31## [0.99.2] - 2026-09-30
32
33## [0.99.1] - 2026-09-29
34
35## [0.99.0] - 2026-09-29
36
37### Added
38
39- Added the `onProviderStreamEvent` agent option, which is passed to provider streams to observe parsed provider events before normalization ([#9784](https://github.com/earendil-works/pi/issues/9784), [#9901](https://github.com/earendil-works/pi/pull/9901) by [@davidbrai](https://github.com/davidbrai)).
40- The agent loop now records the requested thinking level as `thinkingLevel` on each assistant message.
41
42## [0.87.1] - 2026-09-22
43
44## [0.87.0] - 2026-09-21
45
46### Breaking Changes
47
48- Removed `AgentOptions.shouldStopAfterTurn` and `AgentLoopConfig.shouldStopAfterTurn`. Use `finishTurn` and return `{ action: "end" }` to stop after the completed turn:
49
50 ```ts
51 // Before
52 shouldStopAfterTurn: async (turn, signal) => await shouldStop(turn, signal),
53
54 // After
55 finishTurn: async (turn, signal) => {
56 // shouldStopAfterTurn previously ran only for normal responses.
57 if (turn.message.stopReason === "error" || turn.message.stopReason === "aborted") return;
58 return (await shouldStop(turn, signal)) ? { action: "end" } : undefined;
59 },
60 ```
61
62 `finishTurn` runs after the assistant and all tool results are finalized but before `turn_end`; its decision is applied after `turn_end`. It also runs for error and aborted responses, whose decisions are ignored because those responses remain hard exits. The guard in the migration preserves the old hook's normal-response-only invocation, including avoiding predicate side effects on hard exits. Returning `{ action: "end" }` leaves steering and follow-up queues untouched and skips `prepareNextTurn`.
63
64### Added
65
66- Added `prepareRequest`, which runs before every provider request, including the first. For example, return `{ context: { ...context, messages: persistedMessages } }` to install canonical context after already-selected input is emitted without introducing another queue poll.
67- Added `finishTurn`, which runs after assistant/tool-result finalization and before `turn_end` for normal, error, and aborted responses. Return `{ action: "end" }` to end a normal run after `turn_end`, or `undefined` to preserve normal scheduling. `{ action: "continue" }` ensures one next provider request: existing tool-result, steering, or follow-up scheduling can satisfy that request without adding another one; otherwise the loop makes one context-only request. Error and aborted responses remain hard exits.
68- Added `Agent.peekQueuedMessages()` to preview the next queue-selected batch without consuming it.
69
70### Fixed
71
72- Fixed harness reads misclassifying text files beginning with `GIF` as images ([#9755](https://github.com/earendil-works/pi/issues/9755)).
73
74## [0.86.1] - 2026-09-20
75
76## [0.86.0] - 2026-09-19
77
78## [0.85.1] - 2026-09-05
79
80## [0.85.0] - 2026-09-04
81
82### Fixed
83
84- Fixed proxied assistant responses dropping persisted provider-native thinking levels.
85- Fixed the write tool reporting UTF-16 code-unit counts as byte counts by removing the misleading count ([#8979](https://github.com/earendil-works/pi/issues/8979)).
86
87## [0.84.4] - 2026-08-28
88
89### Breaking Changes
90
91- Changed `prepareNextTurn` and `prepareNextTurnWithContext` to run only after `shouldStopAfterTurn` and queued-message checks determine that the agent loop will start another assistant turn. They no longer run after final or terminating turns; move end-of-run work to `agent_end` handling ([#6879](https://github.com/earendil-works/pi/issues/6879)).
92
93### Fixed
94
95- Fixed Windows `NodeExecutionEnv` aborts crashing when `taskkill.exe` is unavailable on `PATH` ([#6596](https://github.com/earendil-works/pi/issues/6596)).
96
97### Removed
98
99- Removed the withdrawn manual-drive configuration, action inspection methods, action outcomes, and snapshot action field from `AgentHarness`.
100
101## [0.84.3] - 2026-08-24
102
103### Fixed
104
105- Fixed single-object `edit` tool inputs failing validation by accepting them as one-edit arrays ([#7835](https://github.com/earendil-works/pi/issues/7835)).
106- Fixed root Markdown files such as `README.md` and `AGENTS.md` in skill directories being reported as broken skills unless they declare valid skill frontmatter ([#7805](https://github.com/earendil-works/pi/issues/7805)).
107
108## [0.84.2] - 2026-08-14
109
110### Fixed
111
112- Fixed `streamProxy()` dropping finalized tool-call metadata such as OpenAI Responses namespaces ([#7709](https://github.com/earendil-works/pi/issues/7709)).
113
114## [0.84.1] - 2026-08-07
115
116### Added
117
118- Added `BeforeToolCallResult.terminate` so blocked tool calls can participate in the existing batch early-termination rule ([#7715](https://github.com/earendil-works/pi/pull/7715) by [@muyiyr](https://github.com/muyiyr)).
119
120### Fixed
121
122- Fixed `Agent.reset()` clearing transcript and runtime state during active runs; it now rejects until the agent is idle ([#7717](https://github.com/earendil-works/pi/pull/7717) by [@wesleyzhangwq](https://github.com/wesleyzhangwq)).
123
124## [0.84.0] - 2026-08-06
125
126### Breaking Changes
127
128- Replaced the legacy harness session model with the v4 lane-based `Session`, `SessionStorage`, and `SessionRepo` APIs, including durable operation records, global facts, shared sequence numbers, and tree-scoped lane views.
129- Promoted the v2 session and `AgentHarness` API from the experimental entrypoint to the default package export and removed the experimental subpaths.
130- Removed the legacy JSONL and in-memory repository APIs. Use the v4 `JsonlSessionRepo` or `InMemorySessionRepo`, both implementing the new `SessionRepo` contract.
131- Added the required `FileSystem.renameFile()` operation to harness execution environments for atomic JSONL publication; custom file-system implementations must provide same-filesystem replacement semantics ([#7707](https://github.com/earendil-works/pi/pull/7707) by [@davidbrai](https://github.com/davidbrai)).
132
133### Added
134
135- Added typed AI-request and harness telemetry schemas, their combined schema tuple, callback helpers, and a generated schema reference.
136- Added bounded `Session.findEntriesOnBranch()` and `findEntryOnBranch()` queries with explicit traversal, filtering, ordering, and limit options.
137- Added a compile-complete `AgentHarness` v2 scaffold; unfinished operation paths reject with `HarnessNotImplemented` while durable execution is implemented.
138- Added `JsonlSessionRepo`, a v4 append-only JSONL session repository with metadata validation and shared storage semantics ([#7611](https://github.com/earendil-works/pi/pull/7611) by [@davidbrai](https://github.com/davidbrai)).
139- Added indexed `Session.findOpenOperations()` recovery queries and `RecordQuery.operationKind` filtering ([#7646](https://github.com/earendil-works/pi/pull/7646)).
140- Added `AgentOptions.shouldStopAfterTurn` for gracefully stopping after a completed turn before queued messages or another model call are processed. See [Agent Options](README.md#agent-options) ([#7367](https://github.com/earendil-works/pi/pull/7367) by [@acmerfight](https://github.com/acmerfight)).
141- Added proxy forwarding for arbitrary OpenAI-compatible `samplingParams` ([#7568](https://github.com/earendil-works/pi/pull/7568) by [@mrexodia](https://github.com/mrexodia)).
142
143### Fixed
144
145- Fixed Windows path handling for `NodeExecutionEnv` file basenames, recursive skill loading, and prompt template names.
146- Fixed `JsonlSessionRepo` enforcing session IDs globally across working directories; IDs are now unique within each working directory.
147- Fixed JSONL session forks and torn-tail repairs to publish atomically, avoiding partially written or corrupted sessions after interrupted writes ([#7707](https://github.com/earendil-works/pi/pull/7707) by [@davidbrai](https://github.com/davidbrai)).
148
149## [0.83.0] - 2026-07-29
150
151## [0.82.1] - 2026-07-25
152
153## [0.82.0] - 2026-07-24
154
155### Breaking Changes
156
157- Replaced `AgentHarness`'s `ExecutionEnv` dependency and context-free `AgentTool` inputs with application-defined `toolContext` values and context-aware `AgentHarnessTool` definitions.
158
159### Added
160
161- Added context-aware `read`, `write`, `edit`, and `bash` harness tools backed by `ExecutionEnv`, including async bash execution preparation.
162
163### Changed
164
165- Aligned harness tool path handling, edit serialization, shell output capture, explicit non-inherited environments, and cross-platform process cleanup with coding-agent behavior.
166
167### Fixed
168
169- Fixed compaction and branch-summary requests to use fresh routing session IDs with prompt caching disabled where supported ([#6618](https://github.com/earendil-works/pi/pull/6618) by [@tmustier](https://github.com/tmustier)).
170
171## [0.81.1] - 2026-07-21
172
173### Added
174
175- Added retry policy support and lifecycle events for compaction and branch-summary operations in `AgentHarness` ([#6901](https://github.com/earendil-works/pi/pull/6901) by [@davidbrai](https://github.com/davidbrai)).
176
177### Fixed
178
179- Restored the `Agent` `streamFn` option and host-configurable fallback for omitted agent-loop stream functions without reintroducing a `pi-ai/compat` dependency ([#6915](https://github.com/earendil-works/pi/issues/6915)).
180
181## [0.81.0] - 2026-07-21
182
183### Breaking Changes
184
185- Changed `SessionStorage` to use `getPathToRootOrCompaction()`, require session name and statistics methods, support cursor-based entry reads, and store retained compaction tails as self-contained checkpoints ([#6594](https://github.com/earendil-works/pi/pull/6594) by [@cristinaponcela](https://github.com/cristinaponcela)).
186- Moved the `uuidv7` export to `@earendil-works/pi-ai` ([#6834](https://github.com/earendil-works/pi/pull/6834) by [@xl0](https://github.com/xl0)).
187- Replaced the optional `Agent` `streamFn` fallback with a required `streamFunction` and made low-level loop stream functions required, preventing `@earendil-works/pi-ai/compat` and all built-in providers from entering selective-provider bundles ([#6851](https://github.com/earendil-works/pi/issues/6851)).
188
189### Added
190
191- Added usage metadata to tool results, compaction entries, and branch summaries in the agent harness ([#6671](https://github.com/earendil-works/pi/pull/6671) by [@davidbrai](https://github.com/davidbrai)).
192
193## [0.80.10] - 2026-07-16
194
195## [0.80.9] - 2026-07-16
196
197## [0.80.8] - 2026-07-16
198
199## [0.80.7] - 2026-07-14
200
201### Added
202
203- Added `AgentToolResult.addedToolNames` propagation to `ToolResultMessage` so tools introduced by a result can be loaded from that transcript point onward ([#6474](https://github.com/earendil-works/pi-mono/pull/6474)).
204
205## [0.80.6] - 2026-07-09
206
207### Added
208
209- Added the `max` model thinking level after `xhigh`.
210
211## [0.80.5] - 2026-07-09
212
213## [0.80.4] - 2026-07-09
214
215### Added
216
217- Added configurable harness session context entry transforms and custom-entry message projectors.
218- Added custom metadata support in JSONL session headers ([#6417](https://github.com/earendil-works/pi/pull/6417) by [@ArcadiaLin](https://github.com/ArcadiaLin)).
219- Exported `InMemorySessionStorage` and `JsonlSessionStorage` ([#6435](https://github.com/earendil-works/pi/issues/6435)).
220
221### Fixed
222
223- Fixed harness split-turn compaction to serialize summary requests so single-concurrency providers are not asked to run overlapping generations ([#5536](https://github.com/earendil-works/pi/issues/5536)).
224- Fixed harness tool calls from length-truncated assistant messages to fail instead of waiting for missing tool results ([#6285](https://github.com/earendil-works/pi/pull/6285)).
225- Fixed harness session ingestion to normalize `null` message content before context projection, avoiding crashes on lax imported transcripts ([#6343](https://github.com/earendil-works/pi/pull/6343)).
226- Fixed non-positive or oversized harness shell execution timeouts to fail with a clear validation error instead of being clamped to an immediate timeout ([#6181](https://github.com/earendil-works/pi/issues/6181)).
227- Fixed harness session storage short entry ids to use the random tail of the generated uuidv7 instead of the timestamp prefix, which was nearly constant between calls ([#6242](https://github.com/earendil-works/pi/issues/6242)).
228
229## [0.80.3] - 2026-06-30
230
231### Added
232
233- Added `prepareNextTurnWithContext` for `Agent` users that need the next-turn loop context.
234
235### Fixed
236
237- Fixed `Agent.prepareNextTurn` to keep receiving the run abort signal instead of the next-turn context.
238
239## [0.80.2] - 2026-06-23
240
241### Changed
242
243- Renamed the public harness shell execution options type from `ExecutionEnvExecOptions` to `ShellExecOptions`.
244
245## [0.80.1] - 2026-06-23
246
247## [0.80.0] - 2026-06-23
248
249### Breaking Changes
250
251- `AgentHarnessOptions.models` is required and is the only auth path: the harness streams turns, compaction, and branch summarization through the provided `Models` instance (`models.streamSimple()`/`completeSimple()`), resolving auth through the providers. `AgentHarnessOptions.getApiKeyAndHeaders` is removed — apps that resolved keys per request now express that as provider auth (`ApiKeyAuth`/`OAuthAuth`) on the providers in the `Models` collection. Build one with `createModels()` + provider factories (or `builtinModels()` from `@earendil-works/pi-ai/providers/all`); tests use `fauxProvider()`.
252- `compact()`, `generateSummary()`, and `generateBranchSummary()` take a `Models` parameter and no longer accept explicit `apiKey`/`headers`.
253- `StreamFn` is defined structurally (`(model, context, options?) => AssistantMessageEventStream | Promise<...>`); `Models.streamSimple` satisfies it.
254- Removed the `@earendil-works/pi-agent-core/base` selective-provider entrypoint; use the root package with an explicit `Models` instance instead.
255
256### Fixed
257
258- Fixed harness session names to normalize newline characters before storing labels ([#5999](https://github.com/earendil-works/pi/pull/5999) by [@haoqixu](https://github.com/haoqixu)).
259- Fixed harness compaction estimates to ignore malformed all-zero assistant usage after truncated responses ([#5526](https://github.com/earendil-works/pi/pull/5526) by [@dmmulroy](https://github.com/dmmulroy)).
260
261## [0.79.10] - 2026-06-22
262
263## [0.79.9] - 2026-06-20
264
265### Fixed
266
267- Fixed Node execution environment commands through legacy WSL `bash.exe` to pass scripts over stdin so shell variables expand in the target bash ([#5893](https://github.com/earendil-works/pi/issues/5893)).
268
269## [0.79.8] - 2026-06-19
270
271### Added
272
273- Added `@earendil-works/pi-agent-core/base` for bundlers that want to pair the agent core with selective `@earendil-works/pi-ai/base` provider registration ([#5348](https://github.com/earendil-works/pi/pull/5348) by [@FredKSchott](https://github.com/FredKSchott)).
274
275## [0.79.7] - 2026-06-18
276
277## [0.79.6] - 2026-06-16
278
279## [0.79.5] - 2026-06-16
280
281## [0.79.4] - 2026-06-15
282
283## [0.79.3] - 2026-06-13
284
285## [0.79.2] - 2026-06-12
286
287### Fixed
288
289- Fixed late tool progress callbacks after tool settlement to be ignored instead of emitting stale `tool_execution_update` events ([#5573](https://github.com/earendil-works/pi/issues/5573)).
290
291## [0.79.1] - 2026-06-09
292
293## [0.79.0] - 2026-06-08
294
295### Fixed
296
297- Fixed the compaction summarization system prompt to use neutral AI assistant wording for non-coding agents ([#5401](https://github.com/earendil-works/pi/issues/5401)).
298
299## [0.78.1] - 2026-06-04
300
301## [0.78.0] - 2026-05-29
302
303## [0.77.0] - 2026-05-28
304
305### Breaking Changes
306
307- Renamed agent harness `model_select` and `thinking_level_select` events to `model_update` and `thinking_level_update`.
308
309### Added
310
311- Added agent harness tool registry APIs, `tools_update` events, branch-scoped active-tool persistence, and duplicate tool validation.
312
313## [0.76.0] - 2026-05-27
314
315### Fixed
316
317- Fixed context token estimates to count user image attachments consistently with tool result images ([#4983](https://github.com/earendil-works/pi/issues/4983)).
318
319## [0.75.5] - 2026-05-23
320
321## [0.75.4] - 2026-05-20
322
323### Changed
324
325- Changed source syntax to avoid TypeScript constructs that require JavaScript emit, keeping the package compatible with Node.js strip-only TypeScript checks.
326- Removed the package-level development watch script now that the root TypeScript check validates strip-only-compatible sources.
327
328### Fixed
329
330- Fixed tool-call preflight to stop preparing sibling tool calls after the run is aborted ([#4276](https://github.com/earendil-works/pi/issues/4276)).
331- Fixed tail truncation for oversized single-line output that ends with a trailing newline ([#4715](https://github.com/earendil-works/pi/issues/4715)).
332- Fixed Windows Node execution environment command spawns to hide helper console windows from background processes ([#4699](https://github.com/earendil-works/pi/issues/4699)).
333
334## [0.75.3] - 2026-05-18
335
336## [0.75.2] - 2026-05-18
337
338## [0.75.1] - 2026-05-18
339
340## [0.75.0] - 2026-05-17
341
342### Breaking Changes
343
344- Raised the minimum supported Node.js version to 22.19.0.
345
346## [0.74.1] - 2026-05-16
347
348## [0.74.0] - 2026-05-07
349
350## [0.73.1] - 2026-05-07
351
352## [0.73.0] - 2026-05-04
353
354## [0.72.1] - 2026-05-02
355
356### Changed
357
358- Changed the default agent transport to `auto` so providers can use their best available transport by default ([#4083](https://github.com/badlogic/pi-mono/issues/4083)).
359
360## [0.72.0] - 2026-05-01
361
362### Added
363
364- Added `shouldStopAfterTurn` to the low-level agent loop config for gracefully exiting after a completed turn before polling queued messages or starting another LLM call.
365
366## [0.71.1] - 2026-05-01
367
368## [0.71.0] - 2026-04-30
369
370## [0.70.6] - 2026-04-28
371
372## [0.70.5] - 2026-04-27
373
374## [0.70.4] - 2026-04-27
375
376## [0.70.3] - 2026-04-27
377
378## [0.70.2] - 2026-04-24
379
380## [0.70.1] - 2026-04-24
381
382## [0.70.0] - 2026-04-23
383
384## [0.69.0] - 2026-04-22
385
386### Breaking Changes
387
388- Migrated public TypeBox-facing types and examples from `@sinclair/typebox` 0.34.x to `typebox` 1.x. Install and import from `typebox` instead of relying on `@sinclair/typebox` transitively ([#3112](https://github.com/badlogic/pi-mono/issues/3112))
389
390### Added
391
392- Added `terminate: true` tool-result hints to skip the automatic follow-up LLM call when every finalized tool result in the current batch opts into early termination ([#3525](https://github.com/badlogic/pi-mono/issues/3525))
393
394## [0.68.1] - 2026-04-22
395
396### Fixed
397
398- Fixed `streamProxy()` to preserve the proxy-safe serializable subset of stream options, including session, transport, retry-delay, metadata, header, cache-retention, and thinking-budget settings ([#3512](https://github.com/badlogic/pi-mono/issues/3512))
399- Fixed parallel tool execution to emit `tool_execution_end` as soon as each tool is finalized, while still emitting persisted tool-result messages in assistant source order ([#3503](https://github.com/badlogic/pi-mono/issues/3503))
400
401## [0.68.0] - 2026-04-20
402
403### Changed
404
405- Clarified parallel tool execution ordering docs to specify that final tool lifecycle and tool-result artifacts are emitted in tool completion order.
406
407## [0.67.68] - 2026-04-17
408
409## [0.67.67] - 2026-04-17
410
411### Fixed
412
413- Fixed parallel tool-call finalization to convert `afterToolCall` hook throws into error tool results instead of aborting the batch ([#3084](https://github.com/badlogic/pi-mono/issues/3084))
414
415## [0.67.6] - 2026-04-16
416
417## [0.67.5] - 2026-04-16
418
419## [0.67.4] - 2026-04-16
420
421## [0.67.3] - 2026-04-15
422
423## [0.67.2] - 2026-04-14
424
425## [0.67.1] - 2026-04-13
426
427## [0.67.0] - 2026-04-13
428
429## [0.66.1] - 2026-04-08
430
431## [0.66.0] - 2026-04-08
432
433## [0.65.2] - 2026-04-06
434
435## [0.65.1] - 2026-04-05
436
437## [0.65.0] - 2026-04-03
438
439### Breaking Changes
440
441- `AgentState` has been reshaped:
442 - `streamMessage` was renamed to `streamingMessage`
443 - `error` was renamed to `errorMessage`
444 - `isStreaming`, `streamingMessage`, `pendingToolCalls`, and `errorMessage` are now readonly in the public API
445 - `pendingToolCalls` is now typed as `ReadonlySet<string>`
446 - `tools` and `messages` are now accessor properties, and assigning either field copies the provided top-level array instead of preserving array identity
447- `AgentOptions.initialState` no longer accepts runtime-owned fields. Remove `isStreaming`, `streamingMessage`, `pendingToolCalls`, and `errorMessage` from `initialState` values.
448- Removed `Agent` mutator methods in favor of direct property access:
449 - `agent.setSystemPrompt(value)` -> `agent.state.systemPrompt = value`
450 - `agent.setModel(model)` -> `agent.state.model = model`
451 - `agent.setThinkingLevel(level)` -> `agent.state.thinkingLevel = level`
452 - `agent.setTools(tools)` -> `agent.state.tools = tools`
453 - `agent.replaceMessages(messages)` -> `agent.state.messages = messages`
454 - `agent.appendMessage(message)` -> `agent.state.messages.push(message)`
455 - `agent.clearMessages()` -> `agent.state.messages = []`
456 - `agent.setToolExecution(mode)` -> `agent.toolExecution = mode`
457 - `agent.setBeforeToolCall(fn)` -> `agent.beforeToolCall = fn`
458 - `agent.setAfterToolCall(fn)` -> `agent.afterToolCall = fn`
459 - `agent.setTransport(transport)` -> `agent.transport = transport`
460- Removed queue mode getter/setter methods in favor of properties:
461 - `agent.setSteeringMode(mode)` -> `agent.steeringMode = mode`
462 - `agent.getSteeringMode()` -> `agent.steeringMode`
463 - `agent.setFollowUpMode(mode)` -> `agent.followUpMode = mode`
464 - `agent.getFollowUpMode()` -> `agent.followUpMode`
465- `Agent.subscribe()` listeners are now awaited and receive the active `AbortSignal`:
466 - `agent.subscribe((event) => { ... })` -> `agent.subscribe(async (event, signal) => { ... })`
467 - `agent_end` is now the final emitted event for a run, but not the idle boundary
468 - `agent.waitForIdle()`, `agent.prompt(...)`, and `agent.continue()` now settle only after awaited `agent_end` listeners finish
469 - `agent.state.isStreaming` remains `true` until that settlement completes
470
471## [0.64.0] - 2026-03-29
472
473### Added
474
475- Added `AgentTool.prepareArguments` hook to prepare raw tool call arguments before schema validation, enabling compatibility shims for resumed sessions with outdated tool schemas
476
477## [0.63.2] - 2026-03-29
478
479### Added
480
481- Added `Agent.signal` to expose the active abort signal for the current turn, allowing callers to forward cancellation into nested async work ([#2660](https://github.com/badlogic/pi-mono/issues/2660))
482
483## [0.63.1] - 2026-03-27
484
485## [0.63.0] - 2026-03-27
486
487## [0.62.0] - 2026-03-23
488
489## [0.61.1] - 2026-03-20
490
491## [0.61.0] - 2026-03-20
492
493## [0.60.0] - 2026-03-18
494
495## [0.59.0] - 2026-03-17
496
497## [0.58.4] - 2026-03-16
498
499### Fixed
500
501- Fixed steering messages to wait until the current assistant message's tool-call batch fully finishes instead of skipping pending tool calls.
502
503## [0.58.3] - 2026-03-15
504
505## [0.58.2] - 2026-03-15
506
507## [0.58.1] - 2026-03-14
508
509## [0.58.0] - 2026-03-14
510
511### Added
512
513- Added `beforeToolCall` and `afterToolCall` hooks to `AgentOptions` and `AgentLoopConfig` for preflight blocking and post-execution tool result mutation.
514
515### Changed
516
517- Added configurable tool execution mode to `Agent` and `agentLoop` via `toolExecution: "parallel" | "sequential"`, with `parallel` as the default. Parallel mode preflights tool calls sequentially, executes allowed tools concurrently, and emits final tool results in assistant source order.
518
519## [0.57.1] - 2026-03-07
520
521## [0.57.0] - 2026-03-07
522
523## [0.56.3] - 2026-03-06
524
525## [0.56.2] - 2026-03-05
526
527## [0.56.1] - 2026-03-05
528
529## [0.56.0] - 2026-03-04
530
531## [0.55.4] - 2026-03-02
532
533## [0.55.3] - 2026-02-27
534
535## [0.55.2] - 2026-02-27
536
537## [0.55.1] - 2026-02-26
538
539## [0.55.0] - 2026-02-24
540
541## [0.54.2] - 2026-02-23
542
543## [0.54.1] - 2026-02-22
544
545## [0.54.0] - 2026-02-19
546
547## [0.53.1] - 2026-02-19
548
549## [0.53.0] - 2026-02-17
550
551## [0.52.12] - 2026-02-13
552
553### Added
554
555- Added `transport` to `AgentOptions` and `AgentLoopConfig` forwarding, allowing stream transport preference (`"sse"`, `"websocket"`, `"auto"`) to flow into provider calls.
556
557## [0.52.11] - 2026-02-13
558
559## [0.52.10] - 2026-02-12
560
561## [0.52.9] - 2026-02-08
562
563## [0.52.8] - 2026-02-07
564
565## [0.52.7] - 2026-02-06
566
567### Fixed
568
569- Fixed `continue()` to resume queued steering/follow-up messages when context currently ends in an assistant message, and preserved one-at-a-time steering ordering during assistant-tail resumes ([#1312](https://github.com/badlogic/pi-mono/pull/1312) by [@ferologics](https://github.com/ferologics))
570
571## [0.52.6] - 2026-02-05
572
573## [0.52.5] - 2026-02-05
574
575## [0.52.4] - 2026-02-05
576
577## [0.52.3] - 2026-02-05
578
579## [0.52.2] - 2026-02-05
580
581## [0.52.1] - 2026-02-05
582
583## [0.52.0] - 2026-02-05
584
585## [0.51.6] - 2026-02-04
586
587## [0.51.5] - 2026-02-04
588
589## [0.51.4] - 2026-02-03
590
591## [0.51.3] - 2026-02-03
592
593## [0.51.2] - 2026-02-03
594
595## [0.51.1] - 2026-02-02
596
597## [0.51.0] - 2026-02-01
598
599## [0.50.9] - 2026-02-01
600
601## [0.50.8] - 2026-02-01
602
603### Added
604
605- Added `maxRetryDelayMs` option to `AgentOptions` to cap server-requested retry delays. Passed through to the underlying stream function. ([#1123](https://github.com/badlogic/pi-mono/issues/1123))
606
607## [0.50.7] - 2026-01-31
608
609## [0.50.6] - 2026-01-30
610
611## [0.50.5] - 2026-01-30
612
613## [0.50.3] - 2026-01-29
614
615## [0.50.2] - 2026-01-29
616
617## [0.50.1] - 2026-01-26
618
619## [0.50.0] - 2026-01-26
620
621## [0.49.3] - 2026-01-22
622
623## [0.49.2] - 2026-01-19
624
625## [0.49.1] - 2026-01-18
626
627## [0.49.0] - 2026-01-17
628
629## [0.48.0] - 2026-01-16
630
631## [0.47.0] - 2026-01-16
632
633## [0.46.0] - 2026-01-15
634
635## [0.45.7] - 2026-01-13
636
637## [0.45.6] - 2026-01-13
638
639## [0.45.5] - 2026-01-13
640
641## [0.45.4] - 2026-01-13
642
643## [0.45.3] - 2026-01-13
644
645## [0.45.2] - 2026-01-13
646
647## [0.45.1] - 2026-01-13
648
649## [0.45.0] - 2026-01-13
650
651## [0.44.0] - 2026-01-12
652
653## [0.43.0] - 2026-01-11
654
655## [0.42.5] - 2026-01-11
656
657## [0.42.4] - 2026-01-10
658
659## [0.42.3] - 2026-01-10
660
661## [0.42.2] - 2026-01-10
662
663## [0.42.1] - 2026-01-09
664
665## [0.42.0] - 2026-01-09
666
667## [0.41.0] - 2026-01-09
668
669## [0.40.1] - 2026-01-09
670
671## [0.40.0] - 2026-01-08
672
673## [0.39.1] - 2026-01-08
674
675## [0.39.0] - 2026-01-08
676
677## [0.38.0] - 2026-01-08
678
679### Added
680
681- `thinkingBudgets` option on `Agent` and `AgentOptions` to customize token budgets per thinking level ([#529](https://github.com/badlogic/pi-mono/pull/529) by [@melihmucuk](https://github.com/melihmucuk))
682
683## [0.37.8] - 2026-01-07
684
685## [0.37.7] - 2026-01-07
686
687## [0.37.6] - 2026-01-06
688
689## [0.37.5] - 2026-01-06
690
691## [0.37.4] - 2026-01-06
692
693## [0.37.3] - 2026-01-06
694
695### Added
696
697- `sessionId` option on `Agent` to forward session identifiers to LLM providers for session-based caching.
698
699## [0.37.2] - 2026-01-05
700
701## [0.37.1] - 2026-01-05
702
703## [0.37.0] - 2026-01-05
704
705### Fixed
706
707- `minimal` thinking level now maps to `minimal` reasoning effort instead of being treated as `low`.
708
709## [0.36.0] - 2026-01-05
710
711## [0.35.0] - 2026-01-05
712
713## [0.34.2] - 2026-01-04
714
715## [0.34.1] - 2026-01-04
716
717## [0.34.0] - 2026-01-04
718
719## [0.33.0] - 2026-01-04
720
721## [0.32.3] - 2026-01-03
722
723## [0.32.2] - 2026-01-03
724
725## [0.32.1] - 2026-01-03
726
727## [0.32.0] - 2026-01-03
728
729### Breaking Changes
730
731- **Queue API replaced with steer/followUp**: The `queueMessage()` method has been split into two methods with different delivery semantics ([#403](https://github.com/badlogic/pi-mono/issues/403)):
732 - `steer(msg)`: Interrupts the agent mid-run. Delivered after current tool execution, skips remaining tools.
733 - `followUp(msg)`: Waits until the agent finishes. Delivered only when there are no more tool calls or steering messages.
734- **Queue mode renamed**: `queueMode` option renamed to `steeringMode`. Added new `followUpMode` option. Both control whether messages are delivered one-at-a-time or all at once.
735- **AgentLoopConfig callbacks renamed**: `getQueuedMessages` split into `getSteeringMessages` and `getFollowUpMessages`.
736- **Agent methods renamed**:
737 - `queueMessage()` → `steer()` and `followUp()`
738 - `clearMessageQueue()` → `clearSteeringQueue()`, `clearFollowUpQueue()`, `clearAllQueues()`
739 - `setQueueMode()`/`getQueueMode()` → `setSteeringMode()`/`getSteeringMode()` and `setFollowUpMode()`/`getFollowUpMode()`
740
741### Fixed
742
743- `prompt()` and `continue()` now throw if called while the agent is already streaming, preventing race conditions and corrupted state. Use `steer()` or `followUp()` to queue messages during streaming, or `await` the previous call.
744
745## [0.31.1] - 2026-01-02
746
747## [0.31.0] - 2026-01-02
748
749### Breaking Changes
750
751- **Transport abstraction removed**: `ProviderTransport`, `AppTransport`, and `AgentTransport` interface have been removed. Use the `streamFn` option directly for custom streaming implementations.
752
753- **Agent options renamed**:
754 - `transport` → removed (use `streamFn` instead)
755 - `messageTransformer` → `convertToLlm`
756 - `preprocessor` → `transformContext`
757
758- **`AppMessage` renamed to `AgentMessage`**: All references to `AppMessage` have been renamed to `AgentMessage` for consistency.
759
760- **`CustomMessages` renamed to `CustomAgentMessages`**: The declaration merging interface has been renamed.
761
762- **`UserMessageWithAttachments` and `Attachment` types removed**: Attachment handling is now the responsibility of the `convertToLlm` function.
763
764- **Agent loop moved from `@mariozechner/pi-ai`**: The `agentLoop`, `agentLoopContinue`, and related types have moved to this package. Import from `@mariozechner/pi-agent-core` instead.
765
766### Added
767
768- `streamFn` option on `Agent` for custom stream implementations. Default uses `streamSimple` from pi-ai.
769
770- `streamProxy()` utility function for browser apps that need to proxy LLM calls through a backend server. Replaces the removed `AppTransport`.
771
772- `getApiKey` option for dynamic API key resolution (useful for expiring OAuth tokens like GitHub Copilot).
773
774- `agentLoop()` and `agentLoopContinue()` low-level functions for running the agent loop without the `Agent` class wrapper.
775
776- New exported types: `AgentLoopConfig`, `AgentContext`, `AgentTool`, `AgentToolResult`, `AgentToolUpdateCallback`, `StreamFn`.
777
778### Changed
779
780- `Agent` constructor now has all options optional (empty options use defaults).
781
782- `queueMessage()` is now synchronous (no longer returns a Promise).