Commit Graph
100 Commits
Author SHA1 Message Date
Armin Ronacher d2931ad3d5 fix(coding-agent): validate codemode image() base64 and detect image type
image() now rejects malformed base64 and data without a PNG, JPEG, GIF,
or WebP signature, and derives the MIME type from the signature. Invalid
image blocks were persisted and made every later provider request fail.

closes #10215
2026-09-30 12:10:30 +02:00
Armin Ronacher 6a4af07d61 Add [Unreleased] section for next cycle 2026-09-29 20:07:07 +02:00
Armin Ronacher d86654abb8 Release v0.99.1 2026-09-29 20:06:55 +02:00
Armin Ronacher a879e23ca7 docs(coding-agent): audit unreleased changelog 2026-09-29 20:01:50 +02:00
Armin Ronacher 72abf01ba9 fix(coding-agent): bundle openai-chatgpt OAuth flow
The lazy OAuth entry list in the bundle build was missing openai-chatgpt,
so /login with OpenAI failed with a missing module error. Also fail the
build if any importOAuthModule() target in load.ts has no lazy entry.
2026-09-29 20:00:11 +02:00
Armin Ronacher 12c416e1a6 feat(ai,coding-agent): add GPT-6.1 Sol and make it the Codex default
Add gpt-6.1-sol to the OpenAI, Azure OpenAI Responses, and OpenAI Codex
providers with official pricing ($2 input, $0.10 cached input, $2.50
cache writes, $10 output, long-context tier above 272k). The model
rejects reasoning.effort "none", so off is unsupported and clamps to
the lowest effort.
2026-09-29 19:43:27 +02:00
Armin Ronacher 312184edb6 Add [Unreleased] section for next cycle 2026-09-29 19:04:43 +02:00
Armin Ronacher 4b060d3a98 Release v0.99.0 2026-09-29 19:04:28 +02:00
Armin Ronacher dfbb4a21ed fix: include codemode and mcp in local release packages 2026-09-29 19:01:55 +02:00
Armin Ronacher f81cf5520d docs: audit changelogs for 0.99.0 2026-09-29 19:01:43 +02:00
Armin Ronacher 8eb2bccf26 fix: bump vitest to 4.1.11 and gondolin's undici to 6.29.0
Addresses GHSA-82fw-gwwq-j7x9 (vitest mocker path traversal) and
GHSA-3wwx-pv8p-q78v (undici 6.x permessage-deflate DoS). Both are
dev/example-only; the shipped coding-agent shrinkwrap is unchanged.
2026-09-29 18:38:07 +02:00
Armin Ronacher 1ff5b6fddf feat(coding-agent): return up to 1 MiB of bash output to codemode scripts
Structured bash results now hold the full output up to 1 MiB instead of the
model-facing 2000 lines or 50KB, keeping the first and last 512 KiB of longer
output, and add truncated and full_output_path.
2026-09-29 18:06:50 +02:00
Armin Ronacher 9a100c7cc4 feat(coding-agent): report codemode classifier and nested tool usage in session cost
Codemode sums the usage of models.classify() calls into its tool result and shows each call's cost. Usage of tools called through ctx.executeTool() is added to the calling tool's result usage instead of being dropped.
2026-09-29 16:21:39 +02:00
Armin Ronacher 89a5c7bdaa feat(ai): report token usage and cost for System One classify results
System One services (TypeSafe, OpenRouter, OpenCode Zen, Cloudflare Workers AI) return usage.input_tokens/output_tokens. ClassifierResult now carries usage priced from the model catalog like chat usage.
2026-09-29 16:08:22 +02:00
Armin Ronacher 33e2033543 feat(ai): expose Jev on Vercel AI Gateway and OpenCode Zen
Vercel evaluation models are generated from the AI Gateway catalog and
routed through its TypeSafe-compatible /typesafe/v1/systemone endpoint.
OpenCode Zen's jev-1.13 and jev-1.13-free are routed through
/zen/v1/systemone.
2026-09-29 15:32:10 +02:00
Armin Ronacher 5257d0d5f3 feat(coding-agent): show tool call arguments for MCP and fallback-rendered tools
Tools without a custom call renderer now show their arguments as key=value
pairs when collapsed and one key: value line per argument when expanded.
MCP tools get a server/tool title and results that collapse to 5 lines.
2026-09-29 14:10:12 +02:00
Armin Ronacher 30a1d1849d feat(coding-agent): support +name/-name in defaultTools
Entries of only +name/-name modify the inherited tool selection, so
"defaultTools": ["+codemode"] enables codemode without repeating the
defaults. Project entries layer on top of user settings. Document how to
enable codemode without MCP and how to use classifier models from it.
2026-09-29 14:02:57 +02:00
Armin Ronacher 4df1574339 feat(ai,coding-agent): share OAuth callback server and sign-in page
Anthropic, OpenAI Codex, OpenRouter, and Radius now use one loopback callback server in pi-ai. MCP sign-in renders the same browser page through a new renderPage option on the pi-mcp callback server.
2026-09-29 12:10:50 +02:00
Armin Ronacher 4259686d92 refactor(coding-agent): resolve built-in extensions as builtin:<name> paths (#10159)
Built-in extensions (mcp, llama.cpp, codemode, tool-search) are now extension resources like files: the package manager resolves them as builtin:<name>, the extensions setting disables them with -builtin:<name> (per project too), pi config lists them, and --no-extensions turns them off unless loaded with -e builtin:<name>. They load after project trust is resolved and after file and package extensions.

Built-in extensions and tools are named builtin:<name> in errors, diagnostics, RPC source info, and bug reports.
2026-09-29 10:51:01 +02:00
Armin Ronacher 1d74741e17 fix(coding-agent): serialize MCP OAuth refreshes across processes
Refreshes hold a per-server lock file from reading the tokens to saving new ones, and use tokens another process already refreshed. Rotating refresh tokens (Cloudflare) were lost when two pi processes refreshed at once, leaving the server needing sign-in. Closing a connection waits for a running refresh so shutdown does not drop rotated tokens.
2026-09-29 10:19:05 +02:00
Armin Ronacher f1927c2d56 feat(tui,coding-agent): configurable fullscreen wheel scrolling with auto acceleration
Adds fullscreenWheelScrollLines ("auto" or 1-100). Auto keeps one line
per event in local macOS terminals and scales with wheel velocity
elsewhere, capped at six lines per event.

closes #9758
2026-09-29 09:57:53 +02:00
Armin Ronacher 8562bcf66a feat(coding-agent): codemode and MCP
This adds codemode and MCP support to pi. Codemode (packages/codemode) runs
model-written JavaScript in a QuickJS wasm VM inside a worker. From there the
script calls pi's tools as async functions, uses a per-session store, and can
read the model catalog and run classifiers. The codemode tool in coding-agent
is compatible with Codex's exec tool, and codemode.mode works like Codex's
tool modes (on or only). Large results are written to a JSON temp file. MCP
(packages/mcp) is a standalone client for stdio and streamable HTTP servers,
with OAuth.

The core only gets general mechanisms; codemode, tool_search and MCP are
built-in extensions that use them. Other extensions can replace these
built-ins. Tools declare an exposure: direct, model-only, codemode, deferred
or hidden. prepareLoadout() lets an orchestrating tool change which tool
declarations the model sees. ctx.executeTool() runs nested calls through
validation and the tool_call/tool_result hooks. Those calls emit events with
parentToolCallId and are recorded as bounded nestedCalls on the parent
result, which compaction and HTML export use. Tools can also return
structuredContent with an outputSchema, and can report errors with isError
instead of throwing. MCP servers come from mcp.json (global, or per project
after the project is trusted) or from pi.registerMcpServer(). They are
managed with /mcp and pi mcp list|login|logout, and their runtimes load on
first use.

Closes #10040
2026-09-29 09:12:50 +02:00
Armin Ronacher b485fa3128 fix(tui,coding-agent): reduce render cost of theme changes and streaming
Theme previews re-render the whole transcript, and streaming re-renders
every frame, so per-line and per-session work dominated in long sessions.

- visibleWidth: fast path for ANSI-styled ASCII, allocation-free escape scanning
- Box: compare unpadded child lines and skip a second width measurement
- Markdown: reuse parsed tokens across invalidation
- footer: cache usage totals and context usage per session state
- bash results: cache the collapsed preview including the expand hint
- sanitizeBinaryOutput: single regex replace
2026-09-29 08:23:46 +02:00
Armin Ronacher 28fd590868 fix(ai,coding-agent): replace removed Together Kimi K2.6 with Kimi K3
Together no longer lists Kimi K2.6, which broke type checks against the hydrated catalog. Tests use Kimi K3 and the Together default model now points at it.
2026-09-29 08:11:56 +02:00
Armin Ronacher 540e174c72 feat(coding-agent): Virtual models (#10035)
This adds experimental support for virtual models. A virtual model is a catalog entry that an extension registers with pi.registerVirtualModel(). It does not talk to a provider itself; for every request it picks a physical model and thinking level. The motivation is to make routing policies pluggable: plan on a strong model and implement on a cheap one, pick a model with a classifier, or move to a larger window when the context grows. Today this needs model switching by hand or hacks in prepareRequest.

The selection stays virtual: model_change records it, resume restores it, and each response records the physical model and thinking level that produced it. Router state can be stored on the session branch, so it follows /tree and forks and survives compaction. Context limits, compaction and image sizing use the physical model a request was routed to. examples/extensions/jev-router.ts shows a full router that uses the Jev classifier to pick Sol or Terra for planning and hands off to Luna after the first edit. docs/virtual-models.md describes the API.
2026-09-28 23:30:45 +02:00
Armin Ronacher c90d9ea586 feat(ai,coding-agent): add Claude Sonnet 5.5 support 2026-09-28 20:46:38 +02:00
Armin Ronacher 04efdfc380 feat(ai): Discount jev (#10119)
Add the llama-cpp-classify classifier API. Each question becomes one chat prompt with single-token answer labels; llama-server's pre-sampling next-token log-probabilities give the softmax over those labels. Missing labels are retried with deeper readouts and then reported as errors.
2026-09-28 14:19:07 +02:00
Armin Ronacher e1787702d3 fix(coding-agent): default OpenCode Go to Kimi K3 after Kimi K2.6 removal 2026-09-28 12:08:56 +02:00
Armin Ronacher ebced83431 fix(ai): update tests for removed OpenCode Go Kimi K2.6
models.dev dropped Kimi K2.6 from OpenCode Go, which broke type checks
against the regenerated catalog. Use OpenCode Go Kimi K3 for
provider-level tests and OpenCode Zen Kimi K2.6 for thinking format tests.
2026-09-28 12:01:02 +02:00
Armin Ronacher 6f7551516b fix(ai,coding-agent): update Fireworks tests and default for removed models
models.dev dropped Kimi K2.6, GLM 5.2, and the dated DeepSeek V4 Fireworks
models, which broke type checks against the regenerated catalog.
2026-09-28 00:22:39 +02:00
Armin Ronacher 2b0a123de9 feat(coding-agent): remove themes section from startup banner 2026-09-26 14:37:30 +02:00
Armin Ronacher bf8e4b9531 feat(coding-agent,tui): System theme (#10067)
* feat(coding-agent,tui): add system theme derived from terminal colors

The new default system theme builds pi's colors from the terminal's reported foreground, background, and ANSI palette. Tokens take their hue and relative saturation from a palette slot; lightness is placed by OKLab lightness difference and WCAG 2 contrast minimums. Terminals that report only a background get built-in hues, and terminals that report nothing get ANSI indices with faint secondary text.

The TUI queries OSC 10, 11, and 4 in one burst ended by DA1, so replies complete in one round trip, and reports replies that arrive after the timeout. Startup never waits: the system theme starts in grayscale and updates when colors arrive. Light/dark detection now uses the reported colors instead of the ?996 query; mode 2031 notifications trigger a new query.

* fix(coding-agent): wait for terminal colors before building the startup header

The header and startup notices bake theme colors into their text. When the color replies arrived after they were built, as in Windows Terminal, they stayed grayscale. Startup now waits for the first color query, which ends at the DA1 reply or after 100 ms.

* fix(coding-agent): rebuild header and notices on theme changes

The startup header, loaded resources, and chat notices baked theme colors into their text, so they kept the old colors after a theme switch or when the system theme received the terminal's colors. They now use ThemedText, which rebuilds its text from a function whenever the UI is invalidated.

* fix(tui): keep focus on components that forward mouse events to children

A component that forwards a mouse event to a child it hosts, such as SettingsList with an open submenu, left keyboard focus on the child. When the host removed the child, focus stayed on a detached component and all keys were lost. The forwarding component now keeps focus, like delegating containers do.

* feat(coding-agent): describe the system theme in the theme selector

* feat(coding-agent): list the system theme above automatic in the theme selector

* refactor(coding-agent,tui): remove leftovers of the light/dark startup detection

Theme detection only reports dark or light now; the source and confidence fields only served saving the detected theme. The first-time setup no longer shows the detected appearance. Removes the TUI's unused queryTerminalColorScheme(), queryTerminalBackgroundColor(), queryTerminalForegroundColor(), and parseOsc11BackgroundColor(); queryTerminalColors() covers them.

* feat(coding-agent): match the reviewed system and light/dark theme design

The system theme now follows the reviewed design: color families with OKHSL saturation curves, palette slots per family, contrast rules per token and panel, relaxation for mid-gray backgrounds, and the terminal foreground for body text. Each contrast level is a target-lightness curve fitted to the reviewed output. The built-in dark and light themes use the reviewed Pi dark and light colors.

* feat(coding-agent): show the pi logo in the startup header

A two-line pixel logo replaces the app name. Its first line carries the version, its second line the first line of key hints.

* feat(tui,coding-agent): support OKHSL colors in themes

parseColor() accepts okhsl(H S L), and okhslColor() and colorToOkhsl() construct and read OKHSL colors. OKHSL saturation is relative to the sRGB gamut, so every value is in gamut. Theme files accept okhsl() values; HTML exports convert them to hex. The OKHSL code moves from coding-agent into pi-tui, where colors.ts now shares its Oklab conversion instead of keeping a second copy.

* refactor(coding-agent): write the built-in themes in OKHSL

The built-in dark and light themes use okhsl() values, with variables for colors that several roles share, so they read as color families and serve as editable templates. Near-identical values collapsed into one; no color changes visibly.

* refactor(coding-agent,tui): simplify terminal color and theme code

Share the terminal color query between startup and the theme controller, merge the query's resolve/late-reply state into one callback, keep a single global for terminal colors, use oklab.ts arrays directly in colors.ts, and drop leftover helpers and exports.

* fix(coding-agent): use one terminal light/dark decision everywhere

Theme pairs, the system theme, and Theme.appearance now share getTerminalTheme(): the reported background decides, then the terminal's light/dark report, then COLORFGBG, then dark.

COLORFGBG is classified by palette index like Vim (0-6 and 8 dark) and only reads the last field, so rxvt's "default" no longer picks up the foreground index.

Simplify the tests added on this branch.

* fix(ai): use an OpenRouter model that still exists in beta test

OpenRouter removed anthropic/claude-3-haiku, which broke type checking in CI after model regeneration.
2026-09-26 13:33:47 +02:00
Armin Ronacher ca7460d16b feat: build with TypeScript 7 and run sources with plain node
Replace the tsgo native preview with typescript@7.0.2 and port the check scripts to the TS 7 API. Target ES2024, drop useDefineForClassFields: false and unused decorator options, and enable verbatimModuleSyntax. Replace tsx with node plus the source resolver hook, passed to --import as a file URL.

closes #9965
2026-09-25 13:14:33 +02:00
Armin Ronacher d5629e2048 fix(tui): autocomplete paths after opening wrappers like ( and backticks 2026-09-24 15:08:54 +02:00
Armin Ronacher 5674690966 feat(tui,coding-agent): add color values and theme styling (#8398)
Expose theme colors as values and add theme.style() for combined styling.

- @earendil-works/pi-tui gains a Color type (palette index, sRGB, OKLCH) with parseColor(), mixColors(), colorToHex(), colorToRgb(), styleText() and related helpers.
- Theme JSON accepts #rgb and oklch(...) values and an optional appearance ("dark" or "light"), detected from the theme colors when omitted.
- theme.style() combines tokens or concrete colors with text attributes; theme.colors exposes concrete colors, including the terminal's reported default colors (OSC 10/11) for tokens set to "".
- Terminals with TERM=*-direct are detected as truecolor.
2026-09-24 14:42:22 +02:00
Armin Ronacher a7d17e39aa feat(ai): serve Jev classifier through OpenRouter and Cloudflare Workers AI
OpenRouter decision models use its TypeSafe-compatible /api/v1/systemone endpoint. Cloudflare Workers AI gets a cloudflare-workers-ai-system-one classifier API for the /ai/run envelope. Request and answer parsing is shared in system-one-shared.ts.
2026-09-24 12:34:58 +02:00
Armin Ronacher 8676a0dcd8 fix(coding-agent): require advertised X11 clipboard images
closes #9786
2026-09-24 09:15:58 +02:00
Armin Ronacher 7fd564cbb7 feat: share model catalog protocol with pi.dev (#9763)
Move catalog layout, index validation, version selection, and request
negotiation into scripts/model-catalog-protocol.ts. pi.dev keeps an
identical copy, so the publisher and a test running the current client
exercise the same selection pi.dev performs. Replaces the cross-repository
compatibility dispatch.

Related to #9099.
2026-09-23 20:08:05 +02:00
Armin Ronacher a328aa89ad feat(ai,coding-agent): unify image and classifier model infrastructure (#9948) 2026-09-23 17:41:19 +02:00
Armin Ronacher 8d897edaa6 fix(coding-agent): prevent duplicate extension runtimes (closes #9863) 2026-09-23 15:33:56 +02:00
Armin Ronacher 36af9dc48e fix(tui): restore skill prefix autocomplete, closes #9944 2026-09-23 14:32:09 +02:00
Armin Ronacher fde38ed7c2 fix(ai): stabilize Copilot Claude Opus 5.5 effort levels 2026-09-23 11:41:33 +02:00
Armin Ronacher 4c2dfd9362 chore: regenerate image models 2026-09-23 11:32:31 +02:00
Armin Ronacher a8ed497713 Add [Unreleased] section for next cycle 2026-09-22 21:28:09 +02:00
Armin Ronacher f07218c4d4 Release v0.87.1 2026-09-22 21:28:02 +02:00
Armin Ronacher 3a4c777f26 docs(coding-agent): complete unreleased changelog 2026-09-22 21:26:21 +02:00
Armin Ronacher b7f4b05c7f fix(ai): stabilize Claude Opus 5.5 effort levels 2026-09-22 21:26:09 +02:00
Armin Ronacher 27c072e98f feat(ai,coding-agent): add new Copilot models 2026-09-22 21:14:13 +02:00
Armin Ronacher db91e03319 feat(ai,coding-agent): add GPT-6 Sol and Luna support 2026-09-22 20:57:04 +02:00
Armin Ronacher 3a624b82dd fix(ai): update reported Claude Code version 2026-09-22 20:52:39 +02:00
Armin Ronacher b4588f26af feat(ai,coding-agent): add Claude Opus 5.5 support 2026-09-22 18:46:17 +02:00
Armin Ronacher 1a584a7a56 feat(ai,coding-agent): add Grok 4.7 support 2026-09-22 00:07:34 +02:00
Armin Ronacher 4c8eb393c7 Add [Unreleased] section for next cycle 2026-09-21 18:31:58 +02:00
Armin Ronacher 16787ad5b2 Release v0.87.0 2026-09-21 18:31:52 +02:00
Armin Ronacher eaf72ed4d8 fix(coding-agent): update stale test expectations 2026-09-21 18:26:29 +02:00
Armin Ronacher 7f06f9cf16 docs(coding-agent): complete unreleased changelog 2026-09-21 17:22:53 +02:00
Armin Ronacher aef5fc429b fix(coding-agent): keep prompt and tool state across context handlers (#9846)
Since 0.86 the prompt and tool declarations live in transcript system
messages, so a context handler that filters or slices messages could drop
them. After extension-driven compaction this sent requests without built-in
tools and made Codex emit raw tool-call text.

context handlers now see the conversation only. An unchanged list keeps the
transcript as is; a changed list gets the replayed prompt sections and tool
declarations as one leading system message. Handler-added system messages
are kept after it.

Add context_with_system, which runs after every context handler on the full
transcript and sends its result verbatim, for extensions that need to edit
system messages per request. Dropping the leading system message is reported
as an extension error.

closes #9789, closes #9822
2026-09-21 17:14:22 +02:00
Armin Ronacher 9ac95c7151 docs(coding-agent): audit unreleased changelog 2026-09-21 16:03:40 +02:00
Armin Ronacher c7cdb460aa fix(coding-agent): reject bug reports offline 2026-09-21 10:49:12 +02:00
Armin Ronacher 8bfef4de88 fix(ai): update strict mode test expectations 2026-09-21 09:39:21 +02:00
Armin Ronacher 890f920884 fix(ai): default unknown providers to non-strict tools (closes #9816) 2026-09-21 01:14:53 +02:00
Armin Ronacher 63787ee6ba feat(coding-agent): identify extensions in crash stacks 2026-09-21 01:00:43 +02:00
Armin Ronacher f5c946480c feat(ai,coding-agent): add image input limits (closes #9631) 2026-09-20 22:59:16 +02:00
Armin Ronacher 3390bd9363 fix(coding-agent): skip late cache warming refreshes 2026-09-20 15:53:22 +02:00
Armin Ronacher 19451accde Add [Unreleased] section for next cycle 2026-09-20 13:04:18 +02:00
Armin Ronacher 13cbf77df2 Release v0.86.1 2026-09-20 13:04:11 +02:00
Armin Ronacher 68f98022e3 docs: audit Cerebras fix changelog entries 2026-09-20 13:00:29 +02:00
Armin Ronacher 199160a6a8 docs(coding-agent): document inherited z.ai overflow fix 2026-09-20 13:00:00 +02:00
Armin Ronacher 0e283203c7 fix(ai): detect z.ai prompt-too-long errors
closes #9805
2026-09-20 12:46:49 +02:00
Armin Ronacher 6dff740fab fix(coding-agent): restore OSC 52 clipboard fallback for headless sessions
3349e1db1 (#9618) limited OSC 52 to SSH/mosh so a desktop terminal that ignores
it no longer reports a false success. That also disabled the only clipboard
route for containers and WSL without WSLg, which have no display to gate on.

Emit OSC 52 again on display-less Linux. On WSL, write the Windows clipboard
through PowerShell (verified, no OSC 52 size cap), preferring OSC 52 in
Windows Terminal where it is known to work. Desktop sessions with a display
still report the failure.

closes #9688
2026-09-20 12:42:15 +02:00
Armin Ronacher ee2df312e5 docs: audit post-release changelog entries 2026-09-20 12:15:11 +02:00
Armin Ronacher d875512cc4 fix(coding-agent): suppress bug hints for expected failures 2026-09-20 12:06:14 +02:00
Armin Ronacher 60740991c0 feat(coding-agent): cache compiled Node CLI modules 2026-09-20 12:06:14 +02:00
Armin Ronacher d1230ea200 fix(coding-agent): preserve multiline bug descriptions 2026-09-20 01:40:27 +02:00
Armin Ronacher 50d766cba2 Add [Unreleased] section for next cycle 2026-09-20 01:00:48 +02:00
Armin Ronacher ecac0a9c4e Release v0.86.0 2026-09-20 01:00:41 +02:00
Armin Ronacher 12032deb70 docs: complete unreleased changelog audit 2026-09-20 00:55:19 +02:00
Armin Ronacher dd01f5b240 fix(coding-agent): speed up recent session discovery 2026-09-20 00:50:10 +02:00
Armin Ronacher dfbf793b78 feat(coding-agent): load session picker progressively 2026-09-20 00:48:26 +02:00
Armin Ronacher 803f0e906d fix(tui): preserve fullscreen images in WezTerm
closes #9169
2026-09-20 00:25:51 +02:00
Armin Ronacher b7f7881949 fix(coding-agent): await terminal remote prompt event 2026-09-19 23:33:02 +02:00
Armin Ronacher fa0e1f48ac fix(tui): improve LaTeX compatibility and layouts
closes #8827
2026-09-19 23:28:04 +02:00
Armin Ronacher 40c256cccb feat(coding-agent): defer extension loader dependencies
Load ordinary jiti lazily on Node while retaining jiti/static for Bun and SEA binaries. This closes #9540.
2026-09-19 23:25:47 +02:00
Armin Ronacher c596d09d9c feat(coding-agent): add prompt cache warming (#9668) 2026-09-19 21:18:15 +02:00
Armin Ronacher 7d5eb0ee3b fix(ai): mock Radius in model generation tests 2026-09-19 19:41:20 +02:00
Armin Ronacher eba619879c docs: audit unreleased changelogs 2026-09-19 19:33:31 +02:00
Armin Ronacher 4d38031fbd feat(ai): ship Radius model catalog 2026-09-19 19:23:31 +02:00
Armin Ronacher de2de549bc fix(coding-agent): close compaction cancellation races
Closes #9340 and closes #9777.
2026-09-19 19:18:18 +02:00
Armin Ronacher 3c75b27479 feat(coding-agent): add bug reporting 2026-09-19 17:55:49 +02:00
Armin Ronacher 16292398af fix(coding-agent): send forced system prompts without recording them
Remove SystemMessage.replace. A prompt forced from before_agent_start is a rendering
of the current prompt for the run, not conversation state: persisting it as a
replacing system message wrote the full prompt and tool list on every change,
lost the structured sections while forced, and disabled mid-conversation system
messages for the rest of the session once a replacement existed.

The transcript now always records section patches. AgentSession wraps
transformContext and, when a forced prompt is active, collapses the system
messages into one head carrying the forced text and the current tools. Providers
receive the same request as before; nothing is persisted and the projection ends
with the run.

The evals harness validated the without_docs variant from the transcript, which
relied on the persisted replacement. Its transform extension now records the
prompt it forced and validates that instead.
2026-09-17 20:02:23 +02:00
Armin Ronacher e4c75a7322 fix(coding-agent): replace the system prompt when a handler forces it
Add SystemMessage.replace: replaying a system message with the flag discards the
accumulated prompt content, sections, and tools before applying it, and providers
collapse the transcript into one leading system message whenever a later message
replaces it.

A forced prompt from before_agent_start is opaque, so it is persisted as a replace
message holding the text in content with no sections (the agent loop fills in the
full tool set). Leaving force mode persists another replace message with the
structured sections. Previously the forced prompt became a preamble section patch,
so models with native mid-conversation system messages kept the original prompt
as their leading system prompt and received the forced one as a later update.
2026-09-16 23:35:01 +02:00
Armin Ronacher bdee230f1e feat(ai): refresh generated image model catalog 2026-09-16 18:00:42 +02:00
Armin Ronacher 1247476e6d fix(coding-agent): update eval prompt section markers 2026-09-16 17:47:13 +02:00
Armin Ronacher 9e05370b29 Mid conversation system messages (#9548)
This change makes system prompt text and tool changes part of the transcript rather than silently rewriting its starting conditions. This lets Pi record when instructions changed or tools became available, restore that state after resuming or navigating branches, and preserve cached prompt prefixes where the upstream supports it.
2026-09-16 15:54:07 +02:00
Armin Ronacher 60e7e76bd7 fix(coding-agent): surface clipboard backend failures
closes #9618
2026-09-16 01:29:52 +02:00
Armin Ronacher 3349e1db18 fix(coding-agent): reject unverified local clipboard writes
fixes #9618
2026-09-16 00:08:02 +02:00
Armin Ronacher f9bcd351dc docs(ai): document Codex WebSocket cleanup 2026-09-14 23:58:15 +02:00
Armin Ronacher 71dca871bc fix(ci): Fix a broken test 2026-09-11 19:42:45 +02:00
Armin Ronacher 4a6ed01945 fix(coding-agent): update runtime dependencies (#9341) 2026-09-08 16:04:35 +02:00
Armin Ronacher 9767ba275f fix(coding-agent): select Radius models after catalog discovery 2026-09-06 00:30:17 +02:00