Commit Graph

3641 Commits

Author SHA1 Message Date
Danila Poyarkov
a2ec01e12f fix(coding-agent): coerce stringified JSON edits in edit tool (#3370)
Some models (Opus 4.6, GLM-5.1) send the edits parameter as a JSON
string instead of a parsed array. This fails AJV validation with
'must be array' and models fall back to sed/python.

Parse stringified edits in prepareEditArguments before validation.
2026-04-18 18:29:23 +02:00
Neon
182d4ceea3 fix manifest glob expansion and add regression test (#3350) 2026-04-18 13:16:39 +02:00
Mario Zechner
00887125c0 Add [Unreleased] section for next cycle 2026-04-18 01:32:50 +02:00
Mario Zechner
a1edb8a463 Release v0.67.68 2026-04-18 01:31:38 +02:00
Mario Zechner
454b9619c7 fix(ai): use SDK token auth and omit Bedrock display in GovCloud closes #3359 2026-04-18 01:24:13 +02:00
Mario Zechner
2dddc5ba25 fix(ai): sanitize Mistral tool schemas closes #3361 2026-04-18 00:54:46 +02:00
Aliou Diallo
bfa11a50e4 feat(agent,coding-agent): per-tool executionMode override for sequential tool execution (#3345)
* feat(agent,coding-agent): add per-tool executionMode field to AgentTool and ToolDefinition

Add optional executionMode?: ToolExecutionMode to AgentTool and
ToolDefinition interfaces. Propagate through wrapToolDefinition and
createToolDefinitionFromAgentTool. No behavioral change yet — agent
loop will read this field in a follow-up.

* feat(agent): support per-tool executionMode override for sequential execution

When a tool defines executionMode='sequential', the agent loop
forces sequential execution of all tool calls in that batch,
even if the global config is parallel.

* feat(coding-agent): re-export ToolExecutionMode from @mariozechner/pi-agent-core

Makes the type available to extensions that want to set
executionMode on tool definitions.

* feat(coding-agent): add tic-tac-toe extension example with executionMode: sequential

Demonstrates per-tool executionMode: the agent plays via move/play
tool calls that share a cursor. Without sequential execution, play
can resolve before earlier moves finish, landing on the wrong cell.
2026-04-18 00:45:57 +02:00
Mario Zechner
cbf0d1fbfa Add [Unreleased] section for next cycle 2026-04-17 23:06:48 +02:00
Mario Zechner
1c0b628882 Release v0.67.67 2026-04-17 23:06:48 +02:00
Mario Zechner
27620f9383 fix(release): use npx shx for explicit versions 2026-04-17 23:06:48 +02:00
Mario Zechner
1573d46ac2 chore: allow explicit release versions 2026-04-17 23:06:48 +02:00
github-actions[bot]
6121a35827 chore: approve contributor vekexasia 2026-04-17 21:05:58 +00:00
Mario Zechner
b0c2579fd7 chore(changelog): update unreleased entries 2026-04-17 22:54:02 +02:00
Mario Zechner
62778a82d5 fix(ai): use reasoning_effort for Mistral Small 4 closes #3338 2026-04-17 22:44:27 +02:00
xu0o0
e6f473f432 fix(coding-agent): prevent text selection from triggering click toggles in exported HTML (#3332) 2026-04-17 19:23:47 +02:00
Mario Zechner
e3f6912d49 fix(ai): preserve qwen chat-template thinking closes #3325 2026-04-17 16:59:00 +02:00
Mario Zechner
0bb4ccf11f fix(coding-agent): keep scoped-model reorder inert in implicit all-enabled state closes #3331 2026-04-17 16:58:49 +02:00
Mario Zechner
3cea63cf29 fix(coding-agent): resolve captured commands on close closes #3027 2026-04-17 16:45:05 +02:00
Mario Zechner
c15e4d4913 fix(coding-agent): retry connection lost errors
closes #3317
2026-04-17 16:45:05 +02:00
github-actions[bot]
346c82425e chore: approve contributor mpazik 2026-04-17 14:06:22 +00:00
Armin Ronacher
32a305cb9b fix(coding-agent): disambiguate compact extension labels
closes #3308
2026-04-17 09:46:47 +02:00
Mario Zechner
ddbf642179 chore(coding-agent): update changelog for git install devDependency omission closes #3009 2026-04-17 01:53:20 +02:00
Markus Ylisiurunen
2cdac7382a fix(ai): trust requested Codex service tier (#3307) 2026-04-17 01:50:04 +02:00
Mario Zechner
e9808b5854 fix(coding-agent): restore afterToolCall error overrides closes #3051 2026-04-17 01:49:34 +02:00
Mario Zechner
32c52a86a8 chore: remove dyyz1993 from approved contributors 2026-04-17 01:25:23 +02:00
Mario Zechner
7f55605aa2 chore(coding-agent): reference stable date format fix (fixes #2814) 2026-04-17 01:22:52 +02:00
Mario Zechner
f81acc6679 fix(coding-agent): use stable date format in system prompt 2026-04-17 01:21:38 +02:00
Mario Zechner
ef1fcfcec2 fix(coding-agent): omit devDependencies when installing packages (fixes #3009) 2026-04-17 01:21:31 +02:00
Mario Zechner
36bffc1d13 fix(coding-agent): restore /import error flow and document throws 2026-04-17 00:59:53 +02:00
Mario Zechner
3ba0d85fa2 fix(coding-agent): restore assistant/user turn spacing 2026-04-17 00:52:14 +02:00
Mario Zechner
e5f86f25f2 fix(coding-agent): honor PI_PACKAGE_DIR for bun asset paths closes #3074 2026-04-17 00:38:34 +02:00
Mario Zechner
8404fbafdb test(ai): align adaptive thinking payload assertions 2026-04-17 00:35:07 +02:00
Mario Zechner
b2ed851e84 Merge branch 'main' of https://github.com/badlogic/pi-mono
# Conflicts:
#	packages/coding-agent/CHANGELOG.md
2026-04-17 00:28:14 +02:00
Mario Zechner
b0490310c3 fix(coding-agent): stabilize user message OSC 133 padding closes #3090 2026-04-17 00:22:39 +02:00
Armin Ronacher
165603189b fix(coding-agent): parse quoted import paths and missing files 2026-04-17 00:02:14 +02:00
Mario Zechner
9078230b1a fix(coding-agent): export rpc client from root entrypoint
closes #3275
2026-04-16 23:56:59 +02:00
Mario Zechner
b9cd557d1d fix(agent): guard afterToolCall hook errors in finalization
closes #3084
2026-04-16 23:51:38 +02:00
Armin Ronacher
b789900570 fix(ai): type bedrock bearer auth middleware 2026-04-16 23:50:29 +02:00
wirjo
22085a9a17 feat(bedrock): support Bearer token auth for Converse API (#3125)
Adds bearer token authentication for the Bedrock Converse API, enabling
users to authenticate with an API key instead of SigV4/IAM credentials.

When a bearer token is available (via `options.bearerToken` or the
`AWS_BEARER_TOKEN_BEDROCK` env var), the provider:
1. Sets dummy credentials to prevent SDK credential resolution errors
2. Injects middleware after SigV4 signing that replaces the Authorization
   header with `Bearer <token>` and removes SigV4-specific headers

This uses the official `bedrock:CallWithBearerToken` IAM action, which
is a documented AWS feature for API key auth on Bedrock endpoints.

Use case: users who receive a Bedrock API key (bearer token) from the
AWS console or their admin, without having IAM access keys or instance
roles. Similar to how ANTHROPIC_API_KEY works for direct Anthropic API.

Required IAM permission on the token's identity:
  bedrock:CallWithBearerToken

Tested: Bearer token successfully authenticates against Bedrock Converse
API (returns correct 403 for missing IAM permission, not auth format error).
SigV4 path is unchanged when no bearer token is set.
2026-04-16 23:34:18 +02:00
Mario Zechner
5476b56e41 Add [Unreleased] section for next cycle 2026-04-16 23:26:44 +02:00
Mario Zechner
2a356dca4d Release v0.67.6 2026-04-16 23:25:54 +02:00
Mario Zechner
cab5f758e7 docs(coding-agent): audit [Unreleased] entries since v0.67.5
Add missing entries and cross-package duplications:
- after_provider_response extension hook (#3128)
- Compact startup header with Ctrl+O toggle (#3267)
- preset example: restore original state on (none) (#3272)
- OSC 8 hyperlinks in markdown (#3248)
- Hyperlink capability detection tightening (#3248)
- OpenAI Responses session_id headers for proxies (#3264)

Add New Features summary at the top of [Unreleased].
2026-04-16 23:23:58 +02:00
Mario Zechner
9f523babcd docs(coding-agent,tui): move argument-hint changelog entries to [Unreleased]
Move the argument-hint entries added in #2780 out of the already-released
0.65.0 sections and into [Unreleased], and credit the external contributor
with a PR link per AGENTS.md changelog rules.
2026-04-16 23:16:20 +02:00
Mario Zechner
1d4fdbad26 fix(coding-agent): scope nested .gitignore rules to their subtree in find
The find tool previously collected every .gitignore under the search
path and passed them to fd via --ignore-file. fd treats --ignore-file
entries as a single global ignore source, so rules from a/.gitignore
also filtered files under sibling b/.

Drop the manual collection and pass --no-require-git instead, which
makes fd apply hierarchical .gitignore semantics whether or not a git
repo is present.

closes #3303
2026-04-16 23:03:41 +02:00
Andrés Vinueza
aa25726ebf feat(coding-agent,tui): support argument-hint frontmatter in prompt templates (#2780)
* feat(coding-agent,tui): support argument-hint frontmatter in prompt templates

Parse argument-hint from prompt template frontmatter and display it
in the autocomplete dropdown description, matching Claude Code's
convention for custom commands.

Frontmatter format:
  ---
  description: Code review
  argument-hint: "[file | #PR | PR-URL]"
  ---

The hint renders in the description column of the autocomplete list:
  review   [file | #PR | PR-URL] — Code review

Closes #2761

* docs(coding-agent,tui): add argument-hint documentation, tests, and built-in hints

- Document argument-hint frontmatter in prompt-templates.md with <required>/[optional] convention
- Add argument-hint to built-in prompts: pr, is, wr
- Expand tests: required/optional hints, missing hints, empty hints, special characters
- Add changelog entries for coding-agent and tui
2026-04-16 23:02:35 +02:00
Mario Zechner
f84c4c89f5 fix(ai): restore FakeOpenAI mock .withResponse() so openai-completions tests pass
The openai-completions provider now calls .withResponse() on the
create() result to surface HTTP status/headers for the new onResponse
hook (d131fcd4). The FakeOpenAI test mock only returned an async
iterable, so 4 tests in openai-completions-tool-choice.test.ts that
actually consume the stream failed with "withResponse is not a function".

Updated the mock to return a Promise augmented with .withResponse()
resolving to { data: <async iterable>, response: { status, headers } }.

closes #3304
2026-04-16 22:57:30 +02:00
Mario Zechner
c5451af749 fix(coding-agent): make find tool match path-based glob patterns
fd --glob matches against the basename unless --full-path is set, so
patterns containing '/' (e.g. 'src/**/*.spec.ts') silently returned no
results. When the pattern contains '/', switch fd into --full-path mode
and prepend '**/' unless the pattern already starts with '/', '**/', or
is '**'. Basename patterns keep the default matcher.

closes #3302
2026-04-16 22:53:45 +02:00
Mario Zechner
ab518d8651 docs(ai): changelog for openai-responses session header fix
closes #3196
2026-04-16 22:42:40 +02:00
Vegard Stikbakke
45f1a2cd00 fix(ai): set session id headers for all OpenAI compatible responses (#3264) 2026-04-16 22:38:40 +02:00
Mario Zechner
30a8a41fc3 fix(tui): default hyperlinks off for unknown terminals and tmux/screen
OSC 8 hyperlinks landed in #3248, but detectCapabilities() returned
hyperlinks: true in the unknown-terminal fallback. Terminals that
silently swallow OSC 8 (most xterm-compatible hosts, tmux/screen
without passthrough) end up dropping the URL from rendered markdown
links entirely, since the fallback 'text (url)' rendering is skipped
whenever hyperlinks is true.

- Unknown terminals now default to hyperlinks: false.
- tmux and screen (TMUX env, TERM starting with tmux/screen) force
  hyperlinks: false even when the outer terminal would otherwise
  advertise OSC 8 support. Image protocols also left disabled.
- Added detectCapabilities tests covering the known-capable set and
  the tmux/screen/unknown cases.
2026-04-16 22:19:38 +02:00