Commit graph

3264 commits

Author SHA1 Message Date
Armin Ronacher
71efc6f0c1 Add [Unreleased] section for next cycle
Some checks are pending
CI / build-check-test (push) Waiting to run
2026-07-30 00:24:23 +02:00
Armin Ronacher
845d6ff1f6 Release v0.83.0 2026-07-30 00:24:19 +02:00
Armin Ronacher
f0499a63ff docs: audit changelogs since v0.82.1 2026-07-30 00:00:54 +02:00
David Brailovsky
bff5ab7174
fix(coding-agent): show system prompt files in startup context (#7266)
Shows file-backed SYSTEM.md and APPEND_SYSTEM.md entries in the interactive startup [Context] section.

fixes #7096
2026-07-29 17:05:22 +02:00
Arunprasad Rajkumar
cced6a21da
fix(coding-agent): stop loading AGENTS.md twice in nested git worktrees (#7221)
Running from a linked worktree nested under its main repo loaded the
project's AGENTS.md/CLAUDE.md twice. The ancestor walk climbs from cwd to
the filesystem root, so it picked up the worktree's copy and then the main
repo's copy above it, even though both are the same tracked file.

The walk now drops that one duplicate: the main repo root's copy is skipped
when the worktree root has a context file of the same name. Nothing else
changes. The worktree still inherits the main repo's copy when it has none,
directories above the main repo keep loading, and ordinary repos, sibling
worktrees, submodules and bare layouts are untouched.
2026-07-29 10:31:50 +02:00
Petr Houška
f9476a61e5
fix(ai): update TypeBox nullable array validation (#7243)
Bump TypeBox to 1.3.7 so compiled validators guard array-specific keywords when null is accepted, and cover tool-argument validation with a regression test.

Breaking for extensions: TypeBox 1.3 removes deprecated APIs including Type.Base, Type.Awaited, Type.Promise, Type.AsyncIterator, Type.Iterator, Type.Options, and Value.Mutate. Extensions using these through Pi's bundled TypeBox aliases must migrate to supported TypeBox APIs.

Fixes #7003
2026-07-29 10:31:07 +02:00
Steve Immanuel
0c32e83a35
fix(coding-agent): enable streaming usage for llama.cpp provider (#7258)
llama-server supports OpenAI-spec stream_options.include_usage since
b2b6b55a59 (Sep 2025); any server new enough for router mode sends the
final usage chunk when requested. With the flag hardcoded to false the
provider never requests it, so streamed responses record zero tokens
and session/context accounting stays empty.

Verified against llama-server b10094: with include_usage sent, the
final chunk carries usage (incl. prompt_tokens_details.cached_tokens);
without it, nothing.
2026-07-29 10:03:59 +02:00
David Brailovsky
47ca25fcd8 Revert "fix(coding-agent): build-check-test (#7206)"
This reverts commit f145195516.
2026-07-28 15:09:46 +02:00
David Brailovsky
0d008b7468 fix(coding-agent): show tool expansion status
fixes #7180
2026-07-28 15:07:19 +02:00
xu0o0
f145195516
fix(coding-agent): build-check-test (#7206) 2026-07-28 14:46:56 +02:00
Thomas Mustier
cefa40ed8f
***WIP it's a PoC *** fix(coding-agent): guard tree navigation during responses (#7022)
* fix(coding-agent): guard tree navigation during responses

* fix(coding-agent): simplify tree navigation regression

* fix(coding-agent): abort active run on session replacement and tree navigation

Session replacement (resume, new, fork, import) now settles the active
response in teardownCurrent before disposing the outgoing session, so the
aborted turn and its tool results persist instead of leaving a dangling
tool call. Tree navigation aborts the active response directly once the
user commits, without a confirmation gate.
2026-07-28 14:46:30 +02:00
xu0o0
0563a7c017
fix(coding-agent): clean up failed git installs (#7210) 2026-07-28 14:43:22 +02:00
Christian Basch
f1ea6c0d05
fix(coding-agent): reset model selector selection to top row when filtering (#7211)
Typing a model name in the /model selector only clamped selectedIndex to
the filtered list length, leaving the highlight wherever it happened to
be instead of moving to the best match. Reset selectedIndex to 0 when a
non-empty query is present so the top row is highlighted in both the All
and Scoped tabs. Keep the clamp behavior when the query is cleared.

fixes #7209
2026-07-28 14:42:42 +02:00
Cristina Poncela Cubeiro
5d548ae969
fix: rpc bash no longer bypass user_bash (#7214)
* fix: rpc bash no longer bypass user_bash

* fix: rpc bash no longer bypass user_bash
2026-07-28 14:41:39 +02:00
David Brailovsky
66eead6524
fix(coding-agent): preserve resource metadata after extension resource reloads (#7218)
fixes #6968
2026-07-28 14:39:23 +02:00
Cristina Poncela Cubeiro
b6fb91e5b3
fix(coding-agent): include scoped models in TUI extension context (#7215) 2026-07-28 13:20:11 +02:00
Thomas Mustier
063fb963c5
fix(coding-agent): isolate autoload-disabled package test from real home directory (#7167)
* fix(coding-agent): isolate autoload-disabled package test from real home directory

The test asserted result.skills is exactly empty, but resolve() also
scans ~/.agents/skills via getHomeDir(). On machines where that
directory is populated the test failed; CI runners have no
~/.agents/skills, so it always passed there. Stub HOME to the temp
dir with the same save/restore pattern used by neighbouring tests.

* fix(coding-agent): use vi.stubEnv for home directory isolation

Replaces the manual try/finally save/restore with vi.stubEnv plus
vi.unstubAllEnvs in afterEach, shrinking the fix to two added lines.

* fix(coding-agent): plant decoy user skill so the empty-skills assertion cannot pass vacuously

With an empty sandbox, result.skills equal to [] could not distinguish
the package skill being correctly excluded from skill resolution being
broken entirely. A decoy skill in the stubbed HOME's .agents/skills
proves scanning still works while the package skill stays excluded.

* fix(coding-agent): simplify home isolation test
2026-07-28 08:40:26 +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
Cristina Poncela Cubeiro
99e34013d1
feat: auth print (#7168)
Some checks are pending
CI / build-check-test (push) Waiting to run
2026-07-27 16:13:06 +02:00
Michael Yu
2efa728d2e
fix(coding-agent): support concurrent user bash cancellation (#7103) 2026-07-27 12:00:24 +02:00
Michael Yu
c2275d6703
fix(coding-agent): prevent duplicate messages on startup session switch (#7110) 2026-07-27 11:59:27 +02:00
Rafael
61da9e2f37
feat(ai): add manual redirect URL fallback to OpenRouter OAuth login (#7114)
The OpenRouter PKCE flow only completed through the loopback callback
server, so remote/headless sessions (e.g. pi over SSH) could never
finish login: the browser runs on another machine and cannot reach
127.0.0.1 on the host running pi.

Race the callback server against a manual_code prompt, matching the
existing Anthropic and OpenAI Codex flows. Users can paste the final
redirect URL (or the bare authorization code) and the flow exchanges
it with the same PKCE verifier. A claimed callback keeps priority so
a pasted code cannot interrupt an in-flight exchange.

The callback server object follows the OAuthServerInfo shape from the
OpenAI Codex flow: waitForCredential() resolves null when cancelWait()
hands the login over to manual entry, and close() is pure cleanup that
never settles the wait.

Refs #7078
2026-07-27 11:58:04 +02:00
Lucas Meijer
f9a49869c2
feat(ai): expose pending stop reason while streaming (#7151)
* feat(ai): expose pending streaming stop reason

Closes #7142

* manual tidy up of human facing copy
2026-07-27 11:56:15 +02:00
Thomas Mustier
f08f58f5f9
fix(coding-agent): run coding-agent tests offline by default (#7031) 2026-07-27 11:27:43 +02:00
Armin Ronacher
cee5ff7520 ref: remove openclaw reference from readme 2026-07-26 18:29:38 +02:00
Armin Ronacher
5bc1c2c0a6 Add [Unreleased] section for next cycle
Some checks failed
CI / build-check-test (push) Has been cancelled
2026-07-25 14:37:15 +02:00
Armin Ronacher
b4f293684b Release v0.82.1 2026-07-25 14:37:11 +02:00
Armin Ronacher
62a7074188 docs: audit changelogs for commits since v0.82.0
Add missing entries for the llama.cpp catalog cache and resource loader
directory fix, duplicate ai-side changes into coding-agent, add missing
external PR attributions, restore the 0.82.0 section that was modified
after release, and add the New Features section.
2026-07-25 14:09:45 +02:00
Duncan Ogilvie
58c0bc2fba
fix(coding-agent): exclude directories from resource loader (#7106)
This fixes the following warning:

Warning: Could not read /Users/duncan/Projects/AGENTS.md: Error: EISDIR: illegal operation on a directory, read
2026-07-25 14:05:16 +02:00
Armin Ronacher
b1c444d956 feat(coding-agent): revalidate remote model catalogs with ETag 2026-07-25 12:26:19 +02:00
Alexey Zaytsev
518855dd50
feat(coding-agent): expose output padding to custom renderers (#7045)
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-07-25 08:29:34 +02:00
David Brailovsky
2a2b0a39f0
fix(coding-agent): cache llama.cpp model catalog (#7072) 2026-07-25 08:27:05 +02:00
Christian Klotz
eafe11fb94
feat(coding-agent): add vitest eval harness (#7085) 2026-07-25 08:22:32 +02:00
Christian Klotz
a3ee1d286e
fix(coding-agent): expose unavailable scoped models (#7032)
* fix(coding-agent): expose unavailable scoped models

Keep missing configured models editable in the scoped-model selector. This fixes #6949.

* fix(coding-agent): reuse model scope diagnostics

* fix(coding-agent): classify model scope diagnostics
2026-07-25 07:19:56 +02:00
Armin Ronacher
24e5cc04f4
fix(ai): support Anthropic bearer token env (#6148)
Fixes #5871
2026-07-24 15:13:22 +02:00
Armin Ronacher
7df73a00c6 Add [Unreleased] section for next cycle 2026-07-24 08:00:35 +02:00
Armin Ronacher
083e616212 Release v0.82.0 2026-07-24 08:00:31 +02:00
Armin Ronacher
e16172069f docs(coding-agent): add model reload changelog entry 2026-07-24 07:56:05 +02:00
Armin Ronacher
f87468131f
fix(coding-agent): reload model config in picker (#7036) 2026-07-24 07:52:49 +02:00
Armin Ronacher
8472c486f4 docs(coding-agent): add missing clipboard changelog entry 2026-07-24 07:40:57 +02:00
Armin Ronacher
fc8048d237 fix(coding-agent): bundle model data in release source 2026-07-24 07:33:09 +02:00
Armin Ronacher
ee0dca45b4 docs: audit unreleased changelog entries 2026-07-24 07:33:09 +02:00
Shakti
2d3f555429
fix: await wl-copy exit code and fall through to xclip on failure (#7009)
The /copy command always set copied=true after spawning wl-copy without
awaiting its exit code. When wl-copy fails (e.g. in a sandboxed
environment that inherits WAYLAND_DISPLAY but not the socket), the
xclip/OSC 52 fallbacks never ran because copied was already true.

Fix: await the wl-copy spawn exit code and only claim success on exit
code 0. On failure, fall through to the x11 clipboard fallback.

Fixes #6872.
2026-07-24 06:58:37 +02:00
Armin Ronacher
24bace27cf
feat(ai): support constrained sampling (#6341)
Add the constrained sampling API and provider plumbing for OpenAI and Anthropic tool calls, including grammar sampling variants and model capability metadata.
2026-07-23 23:48:40 +02:00
Armin Ronacher
ec1a87e856 fix(coding-agent): require protobufjs 7.6.5, closes #7005 2026-07-23 23:16:07 +02:00
Christian Klotz
6abb4b0640
fix(coding-agent): use llama context for output limit (#7034)
Fixes #6994.
2026-07-23 23:06:03 +02:00
Thomas Mustier
241431c69b
fix(agent,ai): don't cache write compaction or branch summaries (#6618)
avoid cache writes for compaction and branch summaries

Co-authored-by: Armin Ronacher <armin.ronacher@active-4.com>
2026-07-23 23:03:23 +02:00
David Brailovsky
ab55c15fbd
Merge pull request #7016 from earendil-works/fix/bundled-models-generated-time
fix bundled models generation time
2026-07-23 15:42:22 +02:00
David Brailovsky
bc3d364742 fix bundled models generation time
Fresh package installs could give bundled model catalog
files newer filesystem mtimes than the remote catalog’s Last-Modified timestamp,
causing Pi to ignore newer remote models.
Use the catalog’s recorded generation time instead of installation-dependent file metadata.
2026-07-23 13:34:51 +00:00
Anantha Kumaran
fc85bdd88b
feat(coding-agent): emit bash_execution_update events (#6971) 2026-07-23 12:28:12 +02:00