Commit graph

606 commits

Author SHA1 Message Date
Armin Ronacher
8c61663f30 feat(ai): add developer message role 2026-07-11 13:07:54 +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
d7a48d30a0 fix(coding-agent): fall back to text clipboard paste 2026-07-10 21:46:15 +02:00
Armin Ronacher
3b686ac224 feat(coding-agent): add message copy shortcut 2026-07-10 21:35:53 +02:00
Armin Ronacher
3ea064ea2a fix: support Bedrock API key login 2026-07-10 19:34:11 +02:00
Aaron Ky-Riesenbach
1a2542b11b
feat(coding-agent): expand ~ in shellPath setting (#6470)
getShellPath() now runs the configured shellPath through the existing
normalizePath() helper, mirroring getSessionDir(). This lets shellPath
point at a home-directory-relative shell wrapper (e.g.
~/.local/bin/agent-shell-sandbox) and resolves consistently across
machines and OSes with different home directories.

refs #6458
2026-07-09 23:23:06 +02:00
Armin Ronacher
a9ecf301fb feat(ai): add input-based pricing tiers 2026-07-09 22:44:29 +02:00
Mario Zechner
fbdd46389c feat(ai): add max thinking level 2026-07-09 22:30:53 +02:00
Armin Ronacher
a98778e21c test(coding-agent): fix interactive mode fixture 2026-07-09 21:01:50 +02:00
Armin Ronacher
3f9aa5d10b
feat(coding-agent): add prompt cache miss tracking (#6427)
Detect prompt cache misses per turn by comparing each assistant message's
cache reads against the previous request's prompt tokens (core/cache-stats.ts).
Significant misses emit a warning-colored transcript notice at the turn they
occur, noting idle gaps past the cache TTL and model switches when relevant.

/session gained cache statistics: a compact token/cache breakdown with hit
rate, a $-prefixed cost section with per-model cost breakdown, and the
cumulative cost re-billed due to cache misses.
2026-07-09 14:12:57 +02:00
Mario Zechner
a6f720e6ca fix(coding-agent): count custom messages in compaction budget
Some checks are pending
CI / build-check-test (push) Waiting to run
closes #6326
2026-07-09 12:46:03 +02:00
Mario Zechner
e9fa5a68a1 fix(coding-agent): add settled agent lifecycle event
closes #6363
2026-07-09 12:42:08 +02:00
Mario Zechner
c4281a7dd1 fix(coding-agent): warn when session-id creates a session
closes #6407
2026-07-09 11:37:07 +02:00
Mario Zechner
c6251a866b fix(coding-agent): apply modelOverrides to extension providers
closes #6367
2026-07-09 11:22:35 +02:00
Armin Ronacher
312bc713bb feat(coding-agent): support provider arguments for login
Some checks are pending
CI / build-check-test (push) Waiting to run
2026-07-08 12:06:26 +02:00
David Brailovsky
62f45badae
Fix native clipboard in bun release (#6418)
* copy native clipboard .node files to the clipboard package

under the bun binary packaging, require("@mariozechner/clipboard-linux-x64-gnu")
doesn't work so instead we rely on require("./clipboard.linux-x64-gnu.node")
for that we need to copy the .node files to the clipboard package dir

* fallback to xclip if native clipboard fails on x11
2026-07-08 11:20:24 +02:00
Mat
244f1deaf1
feat(coding-agent): add before_provider_headers extension hook (#6350)
* feat(coding-agent): add before_provider_headers extension hook

Extensions can already rewrite the request payload through before_provider_request, but there is no way to adjust the outgoing HTTP
headers of a provider call. This hook fills that gap for cases like request tracing, session correlation, or tenant routing.

Handlers mutate the headers map in place - a null value deletes a header - and the return value is ignored, so a handler cannot accidentally drop auth or attribution headers by
forgetting to spread.

* docs(coding-agent): document before_provider_headers extension hook

Add the before_provider_headers section and lifecycle-diagram entry to
extensions.md; drop the now-superseded proposal file.
2026-07-06 22:35:56 +02:00
Victor Araújo
b3dff19a04
feat(coding-agent): add InlineExtension type for named inline extension factories (#6267)
* feat(coding-agent): add InlineExtension type for named inline extension factories

* test(coding-agent): update utilities and add regression test for InlineExtension
2026-07-06 20:59:37 +02:00
Armin Ronacher
c8ada4e76e
Improve project-local pi config (#6309)
* feat(coding-agent): improve config resource overrides

* fix(coding-agent): simplify config resource overrides
2026-07-06 20:50:30 +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
75ac0cb0e6 fix(coding-agent): stabilize auto-compaction threshold test 2026-07-05 23:14:10 +02:00
Vegard Stikbakke
83cbfc6521 fix(coding-agent): remove Vercel AI Gateway attribution 2026-07-03 15:14:01 +02:00
Raj
4a9c962b59
fix(coding-agent): add pnpm self-update prune hint (#6279)
Some checks are pending
CI / build-check-test (push) Waiting to run
Adds a pnpm-specific self-update recovery hint when pi update fails during self-update.
Fixes #6215.
2026-07-03 12:58:35 +02:00
Vegard Stikbakke
ca09b2b1a8 fix(coding-agent): skip unauthenticated default model
closes #6231
2026-07-02 10:48:11 +02:00
Vegard Stikbakke
f8bec25f34 fix(coding-agent): surface auth storage save failures
closes #6223
2026-07-01 21:24:26 +02:00
Mario Zechner
ba10b60b51 fix(coding-agent): add entry renderers for session entries 2026-07-01 11:30:26 +02:00
Vegard Stikbakke
040f0a5197 feat(coding-agent): expose model resolution helpers
closes #6201
2026-07-01 10:22:35 +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
9be55bc773 fix(coding-agent): apply output padding to user messages
Some checks failed
CI / build-check-test (push) Has been cancelled
closes #6168
2026-06-30 11:55:40 +02:00
Alexey Zaytsev
6564d94717
feat(coding-agent): add configurable assistant output padding
Closes #6168
2026-06-30 11:44:34 +02:00
Alexey Zaytsev
726a9c526c fix(coding-agent): emit session name changes to extensions 2026-06-30 00:40:15 -05:00
Mario Zechner
927e98068c fix(coding-agent): fix compaction event regression test 2026-06-29 17:12:19 +02:00
Mario Zechner
5d499272a8 fix(coding-agent): stabilize interactive status indicators
Closes #6026
2026-06-29 16:53:39 +02:00
Mario Zechner
a8c692c712
Merge pull request #6074 from yzhg1983/private/pre-prompt-compaction-no-continue
fix(coding-agent): avoid pre-prompt compaction continue
2026-06-28 17:49:12 +02:00
Mario Zechner
234c2ad54c
Merge pull request #6078 from geraschenko/rpc-get-entries-tree
feat(coding-agent): add get_entries and get_tree RPC commands
2026-06-28 17:46:26 +02:00
Armin Ronacher
5a073885b5 feat(coding-agent): add external editor setting
Some checks are pending
CI / build-check-test (push) Waiting to run
Closes #6122
2026-06-27 23:57:46 +02:00
Anton Geraschenko
7ba1b6bfef feat(coding-agent): add get_entries and get_tree RPC commands
Adds two read-only RPC commands exposing existing SessionManager reads:

- get_entries: all session entries in append order, with optional since-entry-id cursor (strictly-after semantics, error on unknown id), plus current leafId.
- get_tree: getTree() roots plus current leafId.

Since sessions are append-only trees with stable entry ids, an entry id is a durable cursor: external orchestrators can use these commands to catch up after a restart without losing pre-compaction history, and can observe branch structure (/tree jumps, abandoned branches) that get_messages hides.
2026-06-25 09:38:35 -07:00
Michael Yu
73581ea995 fix(coding-agent): avoid pre-prompt compaction continue 2026-06-25 21:43:03 +08:00
Mario Zechner
0d145e895c fix(coding-agent): shorten invalid session error
Follow-up to #6002
2026-06-25 15:20:08 +02:00
Mario Zechner
774288587f fix(coding-agent): update OpenAI default model 2026-06-25 15:18:18 +02:00
Mario Zechner
543710f643 fix(coding-agent): reject invalid session files
closes #6002
2026-06-25 15:16:18 +02:00
Mario Zechner
f14b3594c1 fix(coding-agent): show length stop errors
closes #4290
2026-06-25 14:50:14 +02:00
Armin Ronacher
e454f50b48 fix(coding-agent): allow session id for no-session runs
closes #6070
2026-06-25 14:44:44 +02:00
Armin Ronacher
4cc339f58d fix(coding-agent): process BMP images from disk
closes #6047
2026-06-25 12:52:21 +02:00
Armin Ronacher
371adcf371 fix(coding-agent): retry explicit provider retry errors
closes #6019
2026-06-24 18:14:06 +02:00
haoqixu
c5440162b8 fix(coding-agent): show resources before messages when resuming session 2026-06-24 20:41:34 +08:00
Mario Zechner
cd95c2749f fix(ai): require OpenAI Responses terminal events 2026-06-23 16:35:45 +02:00
Mario Zechner
129eb460cd feat(ai): complete models runtime migration 2026-06-23 15:29:46 +02:00
Mario Zechner
470a4736a3
Merge pull request #5784 from Perlence/fix/threaded-session-latest-activity
fix(coding-agent): sort threaded sessions by latest activity in the subtree
2026-06-23 15:20:14 +02:00