Commit Graph
100 Commits
Author SHA1 Message Date
Mario Zechner 2d4fa997bc Merge pull request #567 from ferologics/feat/bun-update-notification
fix(coding-agent): show release URL for bun binary updates
2026-01-08 14:51:29 +01:00
Mario Zechner 6c3f82a696 fix(ci): update clipboard bindings to @mariozechner/clipboard fork
fixes #556
2026-01-08 12:21:26 +01:00
Mario Zechner cfa63c255d Add [Unreleased] section for next cycle 2026-01-08 04:53:51 +01:00
Mario Zechner 4b084d0f9d Release v0.38.0 2026-01-08 04:52:55 +01:00
Mario Zechner bf9a415541 Switch to @mariozechner/clipboard fork with musl support
fixes #533
2026-01-08 04:50:37 +01:00
Mario Zechner b1fb910625 refactor(coding-agent): unify tool and event handler context creation
Tools now use ExtensionRunner.createContext() instead of a separate
inline context factory. This ensures tools and event handlers share
the same context, fixing ctx.shutdown() and other context methods.

- Made ExtensionRunner.createContext() public
- Changed wrapRegisteredTools to accept ExtensionRunner instead of getContext callback
- Create ExtensionRunner when SDK custom tools are present (not just extensions)
- Removed redundant inline context factory from sdk.ts
2026-01-08 03:45:39 +01:00
Mario Zechner cf0466d96c fix(coding-agent): make ctx.shutdown() work from extension tools
The tool execution context was created with a no-op shutdown handler.
Now it delegates to ExtensionRunner.shutdown() which uses the handler
set by the mode via initialize().
2026-01-08 03:40:09 +01:00
Mario Zechner baf6fe4b39 fix(coding-agent): add PR attribution to ctx.shutdown() changelog, fix example comments 2026-01-08 03:31:55 +01:00
Mario Zechner 7f3fa417c4 feat(coding-agent): add --no-extensions flag to disable extension discovery
Adds --no-extensions CLI flag that skips automatic extension discovery
while still allowing explicit -e paths. Three modes now available:

1. Default: auto-discover + any -e additions
2. --no-extensions: no extensions at all
3. --no-extensions -e foo.js: only load explicit extensions

Useful for debugging or running subagent instances without auto-discovered
extensions.

closes #524
2026-01-08 03:22:38 +01:00
Mario Zechner 0b680c67fb docs(coding-agent): add overflow changelog entry 2026-01-08 03:19:00 +01:00
Mario Zechner 6bcce1914a Merge branch 'codex-error-details-clean' 2026-01-08 03:17:33 +01:00
Mario Zechner 946efe4b45 fix(ai): detect context_length_exceeded overflow 2026-01-08 03:16:59 +01:00
Mario Zechner b1f32b9c8d fix(coding-agent): update test expectation for extension loader error message 2026-01-08 03:11:10 +01:00
Mario ZechnerandMelih Mucuk f97dcbf92f Merge branch 'feat/custom-thinking-budgets'
feat: add thinkingBudgets setting to customize token budgets per thinking level

Allows users to override default token budgets for minimal/low/medium/high
thinking levels via settings.json. Useful for token-based providers.

closes #529

Co-authored-by: Melih Mucuk <melih@monkeysteam.com>
2026-01-08 03:02:08 +01:00
Mario Zechner c5a930fbd2 docs(coding-agent): add cross-package changelog entries
- OpenAI Codex model aliases removed (breaking, from @ghoulr #536)
- OpenAI Codex context window fix (from @ghoulr #536)
- SSH input batching fix (#538)
2026-01-08 02:56:55 +01:00
Mario Zechner c8460dec7e docs(coding-agent): restore SDK breaking changes to changelog
ExtensionRunner and LoadExtensionsResult API changes affect SDK users.
2026-01-08 02:55:05 +01:00
Mario Zechner e671f63c5d docs(coding-agent): add missing changelog entries for SDK changes
- LoadedExtension -> Extension type rename (breaking)
- Run mode exports for custom SDK usage
2026-01-08 02:49:14 +01:00
Mario Zechner 8045b3c7ec docs(coding-agent): clean up changelog, add missing contributor entries
- Remove verbose internal type export noise
- Add missing entries for #513 (@austinm911), #535 (@mitsuhiko)
- Add PR links to existing entries #522, #527, #540
2026-01-08 02:38:59 +01:00
Mario Zechner 696e1b51d3 refactor(coding-agent): revert preloadedExtensionsResult back to preloadedExtensions
The rename was unnecessary.
2026-01-08 02:35:37 +01:00
Mario ZechnerandAos Dabbagh 6f726a2178 feat(coding-agent): add PI_SKIP_VERSION_CHECK env variable
Skip new version check at startup when set. Useful for Nix or other
package manager installs where npm install is not used.

Also documents PI_CODING_AGENT_DIR and other environment variables
in the README.

closes #549

Co-authored-by: Aos Dabbagh <25783780+aos@users.noreply.github.com>
2026-01-08 02:29:51 +01:00
Mario Zechner e483521075 feat(coding-agent): export run mode utilities with options interfaces
- Add PrintModeOptions interface, update runPrintMode signature
- Export InteractiveMode, InteractiveModeOptions, runPrintMode, PrintModeOptions, runRpcMode from main package
- Document run modes in docs/sdk.md with usage examples
- Update CHANGELOG
2026-01-08 01:53:24 +01:00
Mario Zechner 5d39074a35 refactor(coding-agent): simplify InteractiveMode API
- Replace 11-param runInteractiveMode with InteractiveModeOptions
- Add InteractiveMode.run() that handles init, warnings, prompts, and loop
- Move version check, changelog loading, fdPath discovery inside InteractiveMode
- Detect resumed sessions via session.state.messages.length
- Export InteractiveModeOptions from modes/index.ts
2026-01-08 01:38:12 +01:00
Mario Zechner cb3ac0ba9e refactor(coding-agent): simplify extension runtime architecture
- Replace per-extension closures with shared ExtensionRuntime
- Split context actions: ExtensionContextActions (required) + ExtensionCommandContextActions (optional)
- Rename LoadedExtension to Extension, remove setter methods
- Change runner.initialize() from options object to positional params
- Derive hasUI from uiContext presence (no separate param)
- Add warning when extensions override built-in tools
- RPC and print modes now provide full command context actions

BREAKING CHANGE: Extension system types and initialization API changed.
See CHANGELOG.md for migration details.
2026-01-07 23:50:18 +01:00
Mario Zechner faa26ffbf9 Merge PR #536: align openai-codex models list and context window size to codex defaults
closes #536
2026-01-07 20:39:55 +01:00
Mario Zechner 39fa25eb67 fix(ai): clean up openai-codex models and token limits
- Remove model aliases (gpt-5, gpt-5-mini, gpt-5-nano, codex-mini-latest, gpt-5-codex, gpt-5.1-codex, gpt-5.1-chat-latest)
- Fix context window from 400k to 272k tokens to match Codex CLI defaults
- Keep maxTokens at 128k (original value)
- Simplify reasoning effort clamping

closes #536
2026-01-07 20:39:46 +01:00
Mario Zechner 8bf2b975a5 docs: add changelog citation format check to PR review prompt 2026-01-07 20:20:48 +01:00
Mario Zechner f3b7b0b179 fix(tui): handle batched input over SSH with StdinBuffer
Adds StdinBuffer class (adapted from OpenTUI, MIT license) to split
batched stdin into individual sequences before they reach components.

This fixes key presses being dropped when batched with release events,
which commonly occurs over SSH due to network buffering.

- Each handleInput() call now receives a single event
- matchesKey() and isKeyRelease() work correctly without batching awareness
- Properly buffers incomplete escape sequences across chunks
- Handles bracketed paste mode

Addresses #538
2026-01-07 17:50:06 +01:00
Mario Zechner 09471ebc7d feat(coding-agent): add ctx.ui.setEditorComponent() extension API
- Add setEditorComponent() to ctx.ui for custom editor components
- Add CustomEditor base class for extensions (handles app keybindings)
- Add keybindings parameter to ctx.ui.custom() factory (breaking change)
- Add modal-editor.ts example (vim-like modes)
- Add rainbow-editor.ts example (animated text highlighting)
- Update docs: extensions.md, tui.md Pattern 7
- Clean up terminal on TUI render errors
2026-01-07 16:11:49 +01:00
Mario Zechner 10e651f99b Merge pull request #513 from austinm911/fix/async-extension-factories
feat(extensions): support async extension factory functions
2026-01-07 11:48:33 +01:00
Mario Zechner 9dfe5bf895 Merge pull request #527 from ferologics/fix/preserve-settings-on-save
fix: preserve externally-added settings when saving
2026-01-07 11:44:14 +01:00
Mario Zechner 1f2dbb57f6 Merge pull request #522 from nicobailon/feat/dialog-timeout-countdown
feat(coding-agent): add timeout option to extension dialogs with live countdown
2026-01-07 10:04:21 +01:00
Mario Zechner fcb3b4aa72 Add [Unreleased] section for next cycle 2026-01-07 01:33:34 +01:00
Mario Zechner 5514d4ffdb Release v0.37.8 2026-01-07 01:32:53 +01:00
Mario Zechner 41fe329cdd fix(tui): filter key release events by default
Components must set wantsKeyRelease=true to receive release events.
Fixes double-processing of keys in editors when Kitty protocol flag 2 is enabled.
2026-01-07 01:31:24 +01:00
Mario Zechner 7508a51599 Add [Unreleased] section for next cycle 2026-01-07 01:02:34 +01:00
Mario Zechner a4f2bb5c27 Release v0.37.7 2026-01-07 01:01:55 +01:00
Mario Zechner 62919fc1d4 docs(tui): add changelog entry for matchesKey fix 2026-01-07 00:57:28 +01:00
Mario Zechner 7a44cf0db0 fix(tui): matchesKey now matches Kitty sequences for unmodified letter keys
Needed for key release events which come as CSI sequences even for plain letters.
2026-01-07 00:57:10 +01:00
Mario Zechner 9330f5a10a Add [Unreleased] section for next cycle 2026-01-07 00:43:25 +01:00
Mario Zechner befbeb30e4 Release v0.37.6 2026-01-07 00:42:45 +01:00
Mario Zechner a2f032a426 feat(tui): add Kitty keyboard protocol flag 2 support for key release events
- Enable flag 2 in Kitty protocol for event type reporting
- Add isKeyRelease() and isKeyRepeat() functions
- Parse event type suffix (:1/:2/:3) in Kitty sequences
- Export KeyEventType type
2026-01-07 00:41:44 +01:00
Mario Zechner d863c8eb21 fix: add --force to npm install for cross-platform native bindings 2026-01-07 00:16:35 +01:00
Mario Zechner f054150ea3 Add changelog entries for bridge prompt export (#510) 2026-01-07 00:11:21 +01:00
Mario Zechner 2015964c40 Merge pull request #512 from nicobailon/feat/abort-signal-ui-dialogs
Add AbortSignal support to extension UI dialogs
2026-01-07 00:10:20 +01:00
Mario Zechner 03e3f0d801 Merge pull request #510 from mitsuhiko/annotate-bridge-prompt
Annotate bridge prompt
2026-01-06 23:47:02 +01:00
Mario Zechner 282273e156 Fix preset.ts example to use gpt-5.2-codex for plan mode 2026-01-06 23:29:20 +01:00
Mario Zechner a00322175f Add [Unreleased] section for next cycle 2026-01-06 23:25:53 +01:00
Mario Zechner fe95983dcf Release v0.37.5 2026-01-06 23:25:12 +01:00
Mario Zechner 59d8b7948c Add ExtensionAPI methods, preset example, and TUI documentation improvements
- ExtensionAPI: setModel(), getThinkingLevel(), setThinkingLevel() methods
- New preset.ts example with plan/implement presets for model/thinking/tools switching
- Export all UI components from pi-coding-agent for extension use
- docs/tui.md: Common Patterns section with copy-paste code for SelectList, BorderedLoader, SettingsList, setStatus, setWidget, setFooter
- docs/tui.md: Key Rules section for extension UI development
- docs/extensions.md: Exhaustive example links for all ExtensionAPI methods and events
- System prompt now references docs/tui.md for TUI development

Fixes #509, relates to #347
2026-01-06 23:24:23 +01:00
Mario Zechner c35a18b2b3 Export all UI components for extensions 2026-01-06 23:09:58 +01:00
Mario Zechner 7c99ea54bf Export truncation utilities for custom tools, add truncated-tool example
- Export truncateHead, truncateTail, truncateLine, formatSize, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES from package
- Add examples/extensions/truncated-tool.ts showing proper output truncation with custom rendering
- Document output truncation best practices in docs/extensions.md
2026-01-06 22:13:08 +01:00
Mario Zechner f87fb0a38a Add [Unreleased] section for next cycle 2026-01-06 21:29:03 +01:00
Mario Zechner b08a6b22ce Release v0.37.4 2026-01-06 21:28:24 +01:00
Mario Zechner 999f97cd49 fix(coding-agent): update help text for ctrl+k and add !! shortcut 2026-01-06 21:27:35 +01:00
Mario Zechner 512ae4b4c0 fix: OAuth token refresh failure returns undefined instead of throwing
When OAuth refresh fails during model discovery, getApiKey() now returns
undefined instead of throwing. This allows the app to start and fall back
to other providers, so the user can /login to re-authenticate.

fixes #498

feat(coding-agent): support searching/resuming sessions by ID

- Session picker (pi -r) now searches session IDs in addition to message content
- --session flag accepts UUID prefix (e.g., pi --session a8ec1c2a)
- Documented in README.md

fixes #495
2026-01-06 21:09:11 +01:00
Mario Zechner d2f3b42deb fix: OAuth token refresh failure returns undefined instead of throwing
When OAuth refresh fails during model discovery, getApiKey() now returns
undefined instead of throwing. This allows the app to start and fall back
to other providers, so the user can /login to re-authenticate.

fixes #498
2026-01-06 20:57:42 +01:00
Mario Zechner cd797cc407 docs(coding-agent): add changelog entry for #503 2026-01-06 20:06:40 +01:00
Mario Zechner 43d6912848 Merge pull request #505 from kim0/fix/google-thoughtsignature-thinking-classification
fix(ai): classify Google thoughtSignature as thinking
2026-01-06 20:02:25 +01:00
Mario Zechner a236e62025 Add [Unreleased] section for next cycle 2026-01-06 13:44:28 +01:00
Mario Zechner 86fea6379c Release v0.37.3 2026-01-06 13:43:47 +01:00
Mario Zechner 7210086677 Extensions: add pi.sendUserMessage() for sending user messages
Adds sendUserMessage() to the extension API, allowing extensions to send
actual user messages (role: user) rather than custom messages. Unlike
sendMessage(), this always triggers a turn and behaves as if the user
typed the message.

- Add SendUserMessageHandler type and sendUserMessage() to ExtensionAPI
- Wire handler through loader, runner, and all modes
- Implement via prompt() with expandPromptTemplates: false
- Add send-user-message.ts example with /ask, /steer, /followup commands
- Document in extensions.md

fixes #483
2026-01-06 13:40:24 +01:00
Mario Zechner f023af0dab Add ctx.ui.setFooter() for extensions to replace footer component
Extensions can now replace the built-in footer with a custom component:
- setFooter(factory) replaces with custom component
- setFooter(undefined) restores built-in footer

Includes example extension demonstrating context usage display.

Closes #481
2026-01-06 12:39:45 +01:00
Mario Zechner 2bc445498a fix: install cross-platform native bindings for bun cross-compilation
fixes #485
2026-01-06 12:19:24 +01:00
Mario Zechner 90e0b95c81 Merge branch 'fix/image-paste-in-wayland'
# Conflicts:
#	packages/coding-agent/CHANGELOG.md
2026-01-06 12:12:17 +01:00
Mario Zechner df5ad091b3 docs: add blockImages setting to README 2026-01-06 12:01:16 +01:00
Mario Zechner a1d0b1c151 Merge PR #492: Add blockImages setting
- Setting controls filtering at convertToLlm layer
- Images are always stored in session, filtered dynamically based on current setting
- Toggle mid-session works: LLM sees/doesn't see images already in session
- Fixed SettingsManager.save() to handle inMemory mode for all setters

Closes #492
2026-01-06 12:00:15 +01:00
Mario Zechner 1fc2a912d4 Add blockImages setting to prevent images from being sent to LLM providers
- Setting controls filtering at convertToLlm layer (defense-in-depth)
- Images are always stored in session, filtered dynamically based on current setting
- Toggle mid-session works: LLM sees/doesn't see images already in session
- Fixed SettingsManager.save() to handle inMemory mode for all setters

Closes #492
2026-01-06 11:59:09 +01:00
Mario Zechner 0761356684 Merge branch 'worktree-statusbar'
# Conflicts:
#	packages/coding-agent/CHANGELOG.md
2026-01-06 11:13:44 +01:00
Mario Zechner edb0da9611 feat(ai,agent,coding-agent): add sessionId for provider session-based caching
- Add sessionId to StreamOptions for providers that support session-based caching
- OpenAI Codex provider uses sessionId for prompt_cache_key and routing headers
- Agent class now accepts and forwards sessionId to stream functions
- coding-agent passes session ID from SessionManager and updates on session changes
- Update ai package README with table of contents, OpenAI Codex OAuth docs, and env vars table
- Increase Codex instructions cache TTL from 15 minutes to 24 hours
- Add tests for sessionId forwarding in ai and agent packages
2026-01-06 11:08:42 +01:00
Mario Zechner 858c6bae8a refactor(ai): streamline codex prompt handling 2026-01-06 10:27:51 +01:00
Mario Zechner b04ce9fe95 Add minimatch dependency to coding-agent 2026-01-06 09:29:05 +01:00
Mario Zechner 9063a71fe6 Add [Unreleased] section for next cycle 2026-01-06 00:54:00 +01:00
Mario Zechner 6f4d16d76f Release v0.37.2 2026-01-06 00:53:18 +01:00
Mario Zechner aad93a1ec8 docs: add changelog entry for #484 2026-01-06 00:51:17 +01:00
Mario Zechner cfa2ba544f docs: add changelog entry for #479 2026-01-06 00:48:32 +01:00
Mario Zechner c6aa0407e7 docs: add changelog entry for share deep link fix 2026-01-06 00:43:25 +01:00
Mario Zechner 58a77f3b70 docs: update changelog for #480 2026-01-06 00:42:51 +01:00
Mario Zechner 1922db81a2 fix: inject URL params for share links in iframe context 2026-01-06 00:37:45 +01:00
Mario Zechner 2da853e9d6 Add [Unreleased] section for next cycle 2026-01-06 00:32:56 +01:00
Mario Zechner a20112f45f Release v0.37.1 2026-01-06 00:32:09 +01:00
Mario Zechner 0b39e21f30 docs: add changelog entry for share link fix 2026-01-06 00:31:13 +01:00
Mario Zechner 8b963f833a fix: copy link in shared sessions uses correct URL instead of about:srcdoc 2026-01-06 00:22:32 +01:00
Mario Zechner 0c712659b3 Add [Unreleased] section for next cycle 2026-01-06 00:07:57 +01:00
Mario Zechner d3d53392e8 Release v0.37.0 2026-01-06 00:07:15 +01:00
Mario Zechner b85cb53dfb chore: update generated models from OpenRouter 2026-01-06 00:06:56 +01:00
Mario Zechner e824b6dfa4 fix: add missing scripts to pi-extension-with-deps example 2026-01-06 00:06:41 +01:00
Mario Zechner 38eb4f7aa6 docs: add changelog entry for #477 2026-01-06 00:00:54 +01:00
Mario ZechnerandThomas Mustier e182b123a9 feat(coding-agent): queue compaction submissions, closes #475
Messages submitted during compaction are queued and delivered after
compaction completes, preserving steer vs follow-up behavior. Extension
commands execute immediately during compaction.

Co-authored-by: Thomas Mustier <tmustier@users.noreply.github.com>
2026-01-05 23:47:40 +01:00
Mario Zechner 4d87196801 fix(tui): remove alt+enter from newLine default keybinding
alt+enter is used by coding-agent for follow-up messages.
Having it also mapped to newLine caused a conflict.
2026-01-05 23:17:34 +01:00
Mario Zechner 9c17af9367 fix(coding-agent): use shx for cross-platform build scripts
Windows npm runs scripts through cmd.exe even from Git Bash.
Use shx to wrap Unix commands (mkdir -p, cp, rm -rf, chmod).
2026-01-05 22:56:22 +01:00
Mario Zechner c5d54a8413 feat(tui): query Kitty keyboard protocol support before enabling
- Query terminal with CSI ? u before enabling Kitty protocol
- Only enable protocol if terminal responds (100ms timeout)
- Mode-aware key parsing: when Kitty active, interpret legacy
  sequences as custom terminal mappings (e.g. \x1b\r = shift+enter)
- Add Terminal Setup section to README with Ghostty/wezterm config

fixes #439
2026-01-05 22:52:13 +01:00
Mario Zechner 0b9e3ada0c fix: clean up Codex thinking level handling
- Remove per-thinking-level model variants (gpt-5.2-codex-high, etc.)
- Remove thinkingLevels from Model type
- Provider clamps reasoning effort internally
- Omit reasoning field when thinking is off

fixes #472
2026-01-05 21:58:26 +01:00
Mario Zechner 22870ae0c2 chore: remove deprecation comment from getToolsDir, add changelog entry for #470 2026-01-05 20:26:48 +01:00
Mario Zechner 168d114750 Add changelog entries for headless OAuth and truecolor detection 2026-01-05 20:16:59 +01:00
Mario Zechner b4fb6770e4 Assume truecolor for most terminals (fixes SSH color detection)
Only fall back to 256color for truly limited terminals (dumb, empty, linux).
Virtually all modern terminals support truecolor, no need to be conservative.
2026-01-05 20:11:10 +01:00
Mario Zechner 9c87eeb805 Fix Anthropic login not showing URL (showPrompt should not clear content) 2026-01-05 20:03:07 +01:00
Mario Zechner 9b12719ab1 Improve OAuth login UI with consistent dialog component
- Add LoginDialogComponent with proper borders (top/bottom DynamicBorder)
- Refactor all OAuth providers to use racing approach (browser callback vs manual paste)
- Add onEscape handler to Input component for cancellation
- Add abortable sleep for GitHub Copilot polling (instant cancel on Escape)
- Show OS-specific click hint (Cmd+click on macOS, Ctrl+click elsewhere)
- Clear content between login phases (fixes GitHub Copilot two-phase flow)
- Use InteractiveMode's showStatus/showError for result messages
- Reorder providers: Anthropic, ChatGPT, GitHub Copilot, Gemini CLI, Antigravity
2026-01-05 19:58:44 +01:00
Mario Zechner 817221b79f fix(tui): trim trailing whitespace in wrapped lines to prevent width overflow
fixes #457
2026-01-05 18:16:54 +01:00
Mario Zechner 60ec863354 Merge branch 'pr-457-wrap-whitespace' 2026-01-05 18:16:39 +01:00
Mario Zechner 7919c40907 docs: remove CLI-specific --extension mention from SDK example 2026-01-05 18:03:41 +01:00