Commit graph

172 commits

Author SHA1 Message Date
Duncan Ogilvie
b987ead358
feat(agent): expose expandPromptTemplates in sendUserMessage (#7857) 2026-08-11 11:14:28 +02:00
muyiyr
1eb988cfe8
feat(agent): allow blocked tool calls to terminate (#7715)
Closes #5998
2026-08-06 17:14:48 +02:00
Mario Zechner
fed6009cc9 fix(coding-agent): make model refresh cancellation caller-owned
Add generation-safe catalog publication, cancellable auth and storage operations, locally consistent credential mutations, and cache-first interactive model flows.
2026-08-04 00:03:52 +02:00
Alexey Zaytsev
714978bf51
Markdown api (#7231)
* feat(tui): export bundled Marked parser

* feat(coding-agent): add width-aware Markdown transformers

---------

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-07-30 22:39:04 +02:00
pungggi
04b15259b2
feat(extensions): expose ctx.scopedModels to extensions (#7191)
Extensions have no way to read the session's scoped model set (the models
resolved from --models / enabledModels against the available catalogue --
the same list /scoped-models shows). The only model surfaces on
ExtensionContext are ctx.model (active) and ctx.modelRegistry.getAvailable()
(the whole catalogue, unfiltered), so an extension that wants a scoped
model picker must either enumerate everything or re-implement pi's scope
resolution (minimatch on provider/modelId / bare modelId + enabledModels +
--models) from disk -- duplicating core logic.

Add ctx.scopedModels: readonly ScopedModel[] to ExtensionContext, mirroring
how ctx.model is exposed (field -> bindCore -> lazy getter in createContext()).
Empty when no scoping is configured (all available models usable). Each entry
is { model, thinkingLevel? }.

- types.ts: ExtensionContext.scopedModels + ExtensionContextActions.getScopedModels
- runner.ts: field, bindCore wiring, lazy scopedModels getter
- agent-session.ts: provide getScopedModels: () => this._scopedModels
- test: assert ctx.scopedModels reflects the action (default [] + live ref)
- docs/extensions.md: document the new field

Co-authored-by: ngSoftware <alessandro@pungitore.ch>
2026-07-28 08:31:01 +02:00
Alexey Zaytsev
518855dd50
feat(coding-agent): expose output padding to custom renderers (#7045)
Some checks are pending
CI / build-check-test (push) Waiting to run
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-07-25 08:29:34 +02:00
Armin Ronacher
bb3d7d399c
feat(coding-agent): expose session metadata to bash tools (#6967) 2026-07-22 20:15:02 +02:00
Mario Zechner
f8b74a4507 fix: complete extension usage accounting
closes #6509
2026-07-20 17:06:22 +02:00
Mario Zechner
019e4ad687 feat(coding-agent): accept native extension providers
Allow extensions to register complete pi-ai Provider objects while preserving models.json composition and resolved provider auth access.

Refs #4823 and #4824.
2026-07-17 10:58:48 +02:00
Mario Zechner
58575888f5 docs(coding-agent): fix obsolete extension UI examples closes #6735 2026-07-17 09:36:59 +02:00
Mario Zechner
bd9e09db44 feat(coding-agent): expose dynamic provider refresh 2026-07-15 12:56:50 +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
Mario Zechner
fbdd46389c feat(ai): add max thinking level 2026-07-09 22:30:53 +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
1ffca0f2aa fix(coding-agent): align reload descriptions
closes #6395
2026-07-09 11:47:44 +02:00
Mat
244f1deaf1
feat(coding-agent): add before_provider_headers extension hook (#6350)
Some checks are pending
CI / build-check-test (push) Waiting to run
* 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
Mario Zechner
ba10b60b51 fix(coding-agent): add entry renderers for session entries 2026-07-01 11:30:26 +02:00
Alexey Zaytsev
726a9c526c fix(coding-agent): emit session name changes to extensions 2026-06-30 00:40:15 -05:00
Enrico
5b9b70d29c
feat(coding-agent): add compaction reason and willRetry to extension compact events (#5962)
session_before_compact and session_compact now carry
reason ("manual" | "threshold" | "overflow") and willRetry, matching
what the RPC protocol already exposes via auto_compaction_start/end.
Extensions can now distinguish manual /compact from threshold
auto-compaction and overflow recovery through the public API instead
of monkeypatching AgentSession internals.
2026-06-22 10:36:16 +02:00
Vegard Stikbakke
008c76f955 feat(coding-agent): export project config dir name
Some checks are pending
CI / build-check-test (push) Waiting to run
2026-06-18 10:27:11 +02:00
Armin Ronacher
b5e13bcd8a docs(coding-agent): clarify active tools docs
closes #5729
2026-06-15 00:02:31 +02:00
Armin Ronacher
3fcfb7abf7 docs(coding-agent): document extension resource lifecycle 2026-06-14 02:05:11 +02:00
Mario Zechner
b7e721cb38 feat(tui): support autocomplete trigger characters
closes #4703
2026-06-09 14:15:39 +02:00
Armin Ronacher
5cb4f597f7 feat(ui): Improved project approval settings 2026-06-09 13:25:54 +02:00
Mario Zechner
db3f9953ee feat(coding-agent): expose project trust to extensions
closes #5523
2026-06-09 13:03:59 +02:00
Mario Zechner
d8aef0feff feat(coding-agent): allow project trust extensions to defer 2026-06-08 13:38:29 +02:00
Mario Zechner
718215bd95 feat(coding-agent): add extension project trust decisions 2026-06-08 12:59:08 +02:00
Mario Zechner
89a92207f1 feat(coding-agent): add project trust gating
Some checks failed
CI / build-check-test (push) Has been cancelled
2026-06-05 10:51:43 +02:00
Vegard Stikbakke
86314bf38d
docs: add containerization guide and Gondolin example (#5356) 2026-06-03 15:53:16 +02:00
Alexey Zaytsev
8216cca5a7 Add system prompt options to extension commands 2026-06-01 15:42:56 -05:00
Mario Zechner
e56521e323 Add extension mode context
Some checks are pending
CI / build-check-test (push) Waiting to run
2026-06-01 18:32:03 +02:00
Nico Bailon
91a2f86600 fix(tui): harden overlay focus restoration 2026-05-31 21:20:33 -07:00
Armin Ronacher
3e9f717445 fix(coding-agent): make config env references explicit
closes #5095
2026-05-28 11:58:38 +02:00
Mario Zechner
edd26444af Expose tool prompt guidelines to extensions
closes #4879
2026-05-28 11:03:25 +02:00
Mario Zechner
8e77f8797b
Merge pull request #5115 from DanielThomas/dannyt/sendUserMessage-agent-end
fix(coding-agent): drain follow-ups queued during agent_end
2026-05-28 10:47:31 +02:00
Danny Thomas
a29a7902e9 fix(coding-agent): drain follow-ups queued during agent_end
When an extension queues a follow-up during `agent_end` it
gets stuck on the follow-up queue until after the next user
message.

Add a hasQueuedMessages() check to _handlePostAgentRun
so the existing while/continue loop drains them.

- One-line fix in _handlePostAgentRun
- Integration test in agent-session-queue
- git-merge-and-resolve example extension with tests
2026-05-28 18:27:39 +10:00
Danny Thomas
bcea4b2e27 feat(coding-agent): expose streamingBehavior on InputEvent
Add streamingBehavior to InputEvent so extensions can distinguish
idle prompts from mid-stream steers and queued follow-ups.

- Add streamingBehavior field to InputEvent type
- Thread it through ExtensionRunner.emitInput() and AgentSession.prompt()
- Add streaming-aware input gate example with tests
- Document in extensions.md
2026-05-28 15:52:38 +10:00
Julien Chaumond
656bd2cadf
docs(coding-agent): fix invalid notify type in extensions example
The notify() API only accepts "info" | "warning" | "error" — "success"
was a copy-paste error in the example.

Co-Authored-By: julien-agent <Agents+cyolo@huggingface.co>
2026-05-15 20:23:34 +02:00
Mario Zechner
3e5ad67e0f chore: migrate pi packages to earendil works scope 2026-05-07 15:59:42 +02:00
Mario Zechner
ddb8ed0c73 fix(coding-agent): honor registered model base urls
closes #4063
2026-05-01 22:19:06 +02:00
Mario Zechner
95ae590279 fix(coding-agent): refresh thinking border from extensions
closes #3888
2026-04-30 22:50:00 +02:00
Mario Zechner
40c6eabb8f feat(coding-agent): allow message_end replacements
closes #3982
2026-04-30 21:24:36 +02:00
Mario Zechner
cf5ec23240 feat(coding-agent): add provider display names
closes #3956
2026-04-30 00:10:38 +02:00
Mario Zechner
d698647b12 feat(coding-agent): add composable editor factory access
closes #3935
2026-04-29 23:26:25 +02:00
Armin Ronacher
4166cfa921 docs(coding-agent): reorganize session docs 2026-04-28 12:06:21 +02:00
Mario Zechner
6580dae400 feat(coding-agent): allow hiding working loader
closes #3674
2026-04-24 23:17:43 +02:00
Mario Zechner
ebbc67df5d docs(coding-agent): fix extension flag lookup docs
closes #3614
2026-04-24 11:41:51 +02:00
Mario Zechner
8700ac1f0e fix(coding-agent): support custom npmCommand for git deps
closes #3604
2026-04-23 22:32:32 +02:00
Mario Zechner
f0cf8a59d2 fix(coding-agent): handle stale extension contexts
fixes #3606
2026-04-23 22:07:13 +02:00
Mario Zechner
e38647f376 fix(coding-agent): restore builtin-only tool disabling
closes #3592
2026-04-23 21:36:16 +02:00