Commit Graph

3624 Commits

Author SHA1 Message Date
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
Mario Zechner
c3ded498ad docs(ai): drop incorrect anthropic sdk bump changelog entry
The @anthropic-ai/sdk range was already ^0.90.0 in the previous commit.
Only node_modules was stale; no dependency version actually changed.
2026-04-16 22:16:48 +02:00
Omair Ahmed
e8743e870b feat(tui): use OSC 8 hyperlinks in Markdown when terminal supports them (#3248)
TerminalCapabilities already tracks hyperlinks: boolean and returns true
for Ghostty, Kitty, WezTerm, and iTerm2, but nothing generated OSC 8
sequences. This completes that stub.

Changes to packages/tui:
- terminal-image.ts: add hyperlink(text, url) and setCapabilities()
- index.ts: export hyperlink and setCapabilities
- utils.ts: extend AnsiCodeTracker to track active OSC 8 URLs
  - process() now handles OSC 8 open/close sequences
  - getActiveCodes() re-emits the OSC 8 open at each line start
  - getLineEndReset() closes the OSC 8 hyperlink before each line break
  This ensures hyperlinks wrap correctly across multiple lines.
- components/markdown.ts: link renderer uses hyperlink() when
  getCapabilities().hyperlinks is true; falls back to (url) text
- Tests: new wrap-ansi tests for OSC 8 line-wrapping; terminal-image
  tests for hyperlink(); markdown tests covering both code paths;
  table-cell width test pinned to hyperlinks:false (checks raw columns)

closes #3239

Co-authored-by: AI (Pi/Claude Sonnet 4.6) <noreply@pi.dev>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-16 22:13:36 +02:00
Mario Zechner
acbf8eca06 feat(ai): add thinkingDisplay option for Anthropic and Bedrock Claude
Exposes the new ThinkingConfig.display field on Anthropic and Bedrock
Claude providers. Defaults to 'summarized' so Claude Opus 4.7 and Mythos
Preview keep returning thinking text despite Anthropic's silent default
change to 'omitted'. Set to 'omitted' explicitly to skip thinking
streaming for faster time-to-first-text-token.
2026-04-16 22:12:06 +02:00
Mario Zechner
7b45c52807 fix(coding-agent): restore verbose startup expansion
closes #3147
2026-04-16 21:42:57 +02:00
Armin Ronacher
f822408c77 fix(coding-agent): compact startup header and resource listings (#3267)
Use ctrl+o expansion for startup help and loaded resources, with compact comma-separated collapsed lists and full expanded context paths.

fixes #3147
2026-04-16 21:37:20 +02:00
stembi
3b575e3ffb Restore full state when cycling through presets for none preset (#3272)
Added OriginalState interface to manage preset state and updated preset clearing logic to restore original state.
2026-04-16 20:38:31 +02:00
Mario Zechner
a5f9f47d13 fix(ai): restore changelog and sdk type compatibility 2026-04-16 20:32:23 +02:00
Mario Zechner
d131fcd4ba feat(coding-agent): add after_provider_response hook closes #3128 2026-04-16 20:28:08 +02:00
Armin Ronacher
aa78fa91fe Add [Unreleased] section for next cycle 2026-04-16 20:06:43 +02:00
Armin Ronacher
23259e5f19 Release v0.67.5 2026-04-16 20:05:42 +02:00
Armin Ronacher
85ff56a0b4 docs(changelog): add missing unreleased entries 2026-04-16 20:04:24 +02:00
Armin Ronacher
5b84152b17 revert(tui): temporarily undo Zellij Kitty-query bypass
This reverts 3929e0c181.

The Zellij-specific Kitty-query skip regresses Shift+Enter newline handling in Zellij. Restoring the previous behavior for now while we work on a safer fix that preserves both Alt and modified Enter handling.\n\nContext: https://github.com/badlogic/pi-mono/issues/3259
2026-04-16 20:00:54 +02:00
Armin Ronacher
54bbaece5c fix(ai): rebuild models 2026-04-16 19:58:40 +02:00
Markus Ylisiurunen
d1c6cb1e0f fix(ai): Fix a configuration bug with Opus 4.7 adaptive thinking (#3286) 2026-04-16 19:57:19 +02:00
Armin Ronacher
72619e9246 Add [Unreleased] section for next cycle 2026-04-16 17:56:55 +02:00
Armin Ronacher
01949c1d4f Release v0.67.4 2026-04-16 17:32:50 +02:00
Armin Ronacher
b071e99b27 docs(changelog): audit unreleased entries since v0.67.3 2026-04-16 17:31:34 +02:00