Commit Graph

737 Commits

Author SHA1 Message Date
Mario Zechner 3dcb411e89 Add [Unreleased] section for next cycle 2026-07-21 15:28:05 +02:00
Mario Zechner 9c480b6ad2 Release v0.81.0 2026-07-21 15:28:05 +02:00
Mario Zechner d35237cfda fix: build packages before release tests 2026-07-21 14:51:22 +02:00
Mario Zechner c901d9a877 docs: audit unreleased changelogs 2026-07-21 14:47:00 +02:00
Mario Zechner 109c4125d2 feat(agent): prepare SQLite storage package for publishing 2026-07-21 14:13:14 +02:00
Cristina Poncela Cubeiro 9e7582aa03 feat: sqlite session storage (#6594)
This PR:

- Adds retainedTail to compaction entries in the new agent harness so we don't have to walk up the tree for the 2000 tokens before compaction,
- Changes getPathToRoot to getPathToRootOrCompaction to only load until last compaction, as unnecessary to access all nodes where it is called,
- Adds a SQLite storage backend, in a separate packages/session-backend-sqlite, with a migration system and schemas as per on-site discussions: sessions to match session header messages (except for metadata, which I couldn't understand what it's used for or where it gets written, so I omitted it), session_entries for shared entry types as columns plus payload as a json for what remains, session_sequences to represent the append-only, serialized nature of the jsonl files, branch_entries to attribute nodes to branches (relationship one-to-many), and session_materialized with the session info (see /session in TUI) to act as a "cache" or quick-access for costs, message count, token info, labels, session name, and model-thinking-level config (e.g. for fast resume).
- This is compatible with the new agent harness Session abstraction.
2026-07-21 11:36:31 +02:00
Mario Zechner 1235c0ec64 fix(agent): decouple agent streams from compat
closes #6851
2026-07-20 17:54:36 +02:00
Mario Zechner f8b74a4507 fix: complete extension usage accounting
closes #6509
2026-07-20 17:06:22 +02:00
David Brailovsky 2fd3868401 add usage info to branch summary, compaction and tool result entries (#6671)
* add usage info to branch summary entries

* add usage to compaction entries

* allow custom tools to report llm usage in tool results

* allow observing and patching usage in tool_result hooks

* agent-harness: save usage in entries

for compaction, branch summaries and tool results
2026-07-20 16:41:43 +02:00
Alexey Zaytsev 94373d815d feat(ai): add shared contentText utility (#6840)
Co-authored-by: Armin Ronacher <armin.ronacher@active-4.com>
2026-07-20 01:50:36 +02:00
Alexey Zaytsev d2f8dafb0f fix(ai,agent,coding-agent): share UUIDv7 and use for Codex (#6834) 2026-07-20 01:23:47 +02:00
Armin Ronacher 216e672e7c Add [Unreleased] section for next cycle 2026-07-16 23:59:44 +02:00
Armin Ronacher 8dc78834cd Release v0.80.10 2026-07-16 23:59:41 +02:00
Armin Ronacher f7e0603745 Add [Unreleased] section for next cycle 2026-07-16 19:18:00 +02:00
Armin Ronacher 2d16f92973 Release v0.80.9 2026-07-16 19:17:57 +02:00
David Brailovsky e022eec37d Add [Unreleased] section for next cycle 2026-07-16 16:35:19 +02:00
David Brailovsky fae7176cb9 Release v0.80.8 2026-07-16 16:35:16 +02:00
Mario Zechner 5e336cfa80 Merge origin/main into model runtime changes 2026-07-15 13:00:45 +02:00
Mario Zechner cd7cad4ee2 feat(coding-agent): merge origin/main into model runtime facade 2026-07-15 12:25:36 +02:00
Armin Ronacher 9d09075c53 Add [Unreleased] section for next cycle 2026-07-14 18:36:49 +02:00
Armin Ronacher 818d67457c Release v0.80.7 2026-07-14 18:36:46 +02:00
Mario Zechner 9993c96907 feat(coding-agent): replace model registry with model runtime
Move provider auth and OAuth flows onto pi-ai Models, compose models.json and extension overlays through ModelRuntime, and retain ModelRegistry as an extension compatibility facade.
2026-07-14 17:48:45 +02:00
Armin Ronacher 4c1861033b docs: audit unreleased changelogs 2026-07-11 00:01:31 +02:00
Armin Ronacher 3d8f74357c feat(ai): support message-anchored tool loading (#6474)
This adds cache-friendly dynamic tool loading anchored to tool results. Purely additive active-tool changes are recorded with `addedToolNames`, allowing supported Anthropic and OpenAI Responses models to load tool definitions at the point they become available instead of placing them in the cached prompt prefix.

It retains safe fallback behavior for unsupported models and non-additive changes but it will wipe caches.
2026-07-10 23:52:54 +02:00
Armin Ronacher 34582ef34b Add [Unreleased] section for next cycle 2026-07-10 01:16:58 +02:00
Armin Ronacher 2b3fda9921 Release v0.80.6 2026-07-10 01:16:55 +02:00
Mario Zechner fbdd46389c feat(ai): add max thinking level 2026-07-09 22:30:53 +02:00
Armin Ronacher e3513193bf Add [Unreleased] section for next cycle 2026-07-09 21:04:09 +02:00
Armin Ronacher cc62baa442 Release v0.80.5 2026-07-09 21:04:06 +02:00
Armin Ronacher ef793a983b Add [Unreleased] section for next cycle 2026-07-09 20:53:01 +02:00
Armin Ronacher 912d0953f6 Release v0.80.4 2026-07-09 20:52:57 +02:00
Armin Ronacher bf75b8aa39 docs: audit unreleased changelogs 2026-07-09 20:45:28 +02:00
Mario Zechner cb222bf99d feat(agent): export InMemorySessionStorage and JsonlSessionStorage
Export both session storage implementations from @earendil-works/pi-agent-core
so they can be imported and extended directly instead of via repo workaround.

closes #6435
2026-07-09 10:22:30 +02:00
Mario Zechner dd1c690f36 fix(agent): add session context entry projection 2026-07-08 14:59:16 +02:00
ArcadiaLin 7198e78f99 feat(agent): support custom metadata in jsonl session headers (#6417)
Allow callers to attach an opaque JSON object to the session header so
application context needed to rebuild a harness (for example an agent
profile reference) is readable from the first line alone, without
scanning session entries. The field is optional and ignored by readers
that do not use it; fork inherits the source metadata unless overridden.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 11:18:43 +02:00
Armin Ronacher 351efc828b fix(agent): fail tool calls from length-truncated assistant messages (#6285)
* fix(ai,agent): stop salvaging malformed tool-call argument JSON

Finalized tool-call arguments must strict-parse (allowing only lossless
string-escape repair). When the streamed JSON is truncated or malformed,
the raw JSON is preserved on ToolCall.malformedArguments, arguments
become {}, and the agent loop refuses to execute the call with an error
tool result instead of running it with silently salvaged partial
arguments. Partial parsing is now only used for streaming previews.

* fix(agent): fail tool calls from length-truncated assistant messages

Reverts the malformed-arguments tracking approach in favor of handling
truncation in the agent loop: when an assistant message stops with
"length", all tool calls in it are potentially borked (streamed
arguments are salvage-parsed), so none are executed. Each gets an error
tool result telling the model to re-issue the call, and the loop
continues. No new fields on ToolCall and no provider changes.

fixes #6284
2026-07-07 14:30:31 +02:00
Armin Ronacher 8c0ccd14b3 fix(ai,agent,coding-agent): normalize null message content at ingestion boundaries (#6343)
The Message types require content to always be present, but untyped JS
extension tools, hand-built histories, and old or hand-edited session
files can violate that contract, crashing rendering, compaction, and
provider request conversion with 'content is not iterable'.

Normalize null/missing content to an empty array at the ingestion
boundaries instead of guarding every consumer:

- transformMessages (choke point before every provider request)
- createToolResultMessage in the agent loop
- session entry loading (message and custom_message entries)
- extension custom messages (sendCustomMessage, before_agent_start)
- message_end extension replacements

fixes #6259, fixes #6276
2026-07-06 20:47:08 +02:00
Armin Ronacher 1dac099022 fix(agent): derive short session entry ids from the uuidv7 random tail (closes #6242)
The uuidv7 prefix is timestamp-derived and nearly constant between calls, so slicing the first 8 chars degenerated short ids to full-UUID fallbacks. Regression from 80c918c2 which replaced randomUUID with uuidv7.
2026-07-05 23:35:53 +02:00
Armin Ronacher 478301342b test: use quiet dot reporters and show output only for failing tests
Switch vitest packages (ai, agent, coding-agent) to the dot reporter
with silent: passed-only so passing tests stay quiet while failing
tests still print their console output and full diffs. Add the
github-actions reporter on CI for inline annotations. Switch the tui
node:test runner to the dot reporter as well.
2026-07-05 23:17:17 +02:00
Armin Ronacher 035ea9c856 fix: remove redundant record guards 2026-07-05 18:55:09 +02:00
Vegard Stikbakke f58c115626 fix(coding-agent): serialize split-turn compaction summaries
closes #5536
2026-07-01 15:37:00 +02:00
Vegard Stikbakke 85b7c24741 fix(coding-agent): reject non-positive bash timeouts 2026-07-01 09:03:00 +02:00
Vegard Stikbakke cbcf4e04c3 fix(coding-agent): reject oversized bash timeouts
closes #6181
2026-07-01 08:49:31 +02:00
Mario Zechner dd87c02cbf Add [Unreleased] section for next cycle 2026-06-30 22:29:44 +02:00
Mario Zechner a23abe4a69 Release v0.80.3 2026-06-30 22:29:41 +02:00
Mario Zechner fd6659dd5d fix(coding-agent): preserve run prompt during tool refresh
closes #6162
2026-06-30 14:08:48 +02:00
Mat e547bb9f41 fix(coding-agent): refresh session state before next turn 2026-06-30 13:56:04 +02:00
Mario Zechner c29bbc0958 docs(agent): update models phase 9 plan 2026-06-24 14:46:13 +02:00
Armin Ronacher 8277bd6896 Add [Unreleased] section for next cycle 2026-06-23 23:45:39 +02:00
Armin Ronacher 0201806adf Release v0.80.2 2026-06-23 23:45:36 +02:00