Commit Graph
7731 Commits
Author SHA1 Message Date
roboomp abc2fe663f style: bun run fix 2026-06-08 21:56:11 +00:00
roboomp 4461d89617 fix(ai): preserve completed thinking signatures when a turn is aborted mid-output
Interrupting the model during its visible output produced an assistant turn
whose thinking block had already finished streaming (fully signed) followed
by partial text. `transformMessages` stripped the signature from every
thinking block of an aborted/errored turn, so the valid signature was
replayed empty (`signature: ""`) and signature-enforcing Anthropic
rejected the next request with HTTP 400 "Invalid `signature` in
`thinking` block" — including when routed through an LLM gateway baseUrl.

Anthropic delivers a block's signature at `content_block_stop` before the
next block's `content_block_start`, so a thinking block followed by
text/tool_use is necessarily complete and valid. Only the single mid-stream
block at the abort point can hold a partial signature. Strip just that
final block now; completed thinking blocks keep their replayable
signatures. Abandoned end_turn+tool_use turns are unchanged (all their
signatures remain stripped).

Co-authored-by: DeprecatedLuke <16418011+DeprecatedLuke@users.noreply.github.com>
Fixes #2144
2026-06-08 21:55:23 +00:00
can1357 53e74c9e68 test(ai): expect provider-qualified modelId in pi-native client request
The auth-gateway client now sends `${provider}/${id}` (008981112) and the
gateway registry keys on the qualified id first. Update the stale request-shape
assertion that still expected the bare `claude-sonnet-4-5`.
2026-06-08 22:52:42 +02:00
can1357 7d2eb3c550 chore: bump version to 15.10.6 2026-06-08 22:39:20 +02:00
Can BölükandGitHub 5e660db897 Merge pull request #2138 from can1357/farm/7680ea37/fix-opencode-zen-login-clipboard-paste
fix(tui): route enhanced-paste text to the focused Input prompt
2026-06-08 22:37:01 +02:00
Can BölükandGitHub c03b7c26d8 Merge branch 'main' into farm/7680ea37/fix-opencode-zen-login-clipboard-paste 2026-06-08 22:36:54 +02:00
Can BölükandGitHub 4a944da8b4 Merge pull request #2137 from can1357/farm/1e55f33b/fix-tmux-rewind-scrollback-highwater
fix(tui): reset scrollbackHighWater on full repaint inside multiplexers
2026-06-08 22:36:36 +02:00
Can BölükandGitHub 227b62041f Merge pull request #2135 from can1357/farm/44203ced/shake-fallback-when-threshold-stays-above
fix(coding-agent): fall back to context-full when shake cannot drop below the threshold
2026-06-08 22:36:22 +02:00
Can BölükandGitHub 15f597b71d Merge branch 'main' into farm/44203ced/shake-fallback-when-threshold-stays-above 2026-06-08 22:36:14 +02:00
Can BölükandGitHub 3e528595f2 Merge pull request #2132 from can1357/farm/3b7d0183/skill-keywords-in-skill-args
fix(coding-agent): honor magic keywords in skill args
2026-06-08 22:36:01 +02:00
Can BölükandGitHub 066c0a0cca Merge branch 'main' into farm/3b7d0183/skill-keywords-in-skill-args 2026-06-08 22:35:51 +02:00
Can BölükandGitHub 6457889f0f Merge pull request #2133 from can1357/farm/7904dac6/mcp-add-url-clickable
fix(cli): keep MCP auth URLs clickable
2026-06-08 22:35:39 +02:00
Can BölükandGitHub 0726551894 Merge branch 'main' into farm/3b7d0183/skill-keywords-in-skill-args 2026-06-08 22:35:37 +02:00
Can BölükandGitHub 249bba2c66 Merge branch 'main' into farm/7904dac6/mcp-add-url-clickable 2026-06-08 22:35:16 +02:00
roboomp 336b993126 fix(tui): route enhanced-paste text to the focused Input prompt
On kitty (Linux/Wayland) and any terminal supporting OSC 5522 enhanced
paste, the /login API-key prompt for OpenCode Zen — and any other modal
Input prompt (Perplexity OTP, GitHub Enterprise URL, manual OAuth
redirect URL, …) — silently dropped pasted content. The user could not
paste their API key; on Enter or Esc the key surfaced in the main
prompt.

Cause: InputController.#setupEnhancedPaste enables kitty's enhanced
clipboard protocol on TUI start and consumes the resulting OSC 5522
packets in an addInputListener that runs *before* focus dispatch in
tui.#handleInput. The controller's pasteText callback then routed
unconditionally to this.ctx.editor.pasteText(text) — the main
CustomEditor — even when selector-controller had cleared editorContainer
and focused a temporary Input. The text accumulated in the detached
editor and only resurfaced when the modal was dismissed.

Fix:
- TUI.getFocused() exposes the currently focused component.
- Input.pasteText(text) mirrors Editor.pasteText so any Input can absorb
  a payload from a non-bracketed transport.
- InputController's enhanced-paste callback consults getFocused() and
  routes text to the focused component when it exposes pasteText,
  falling back to the editor only when no modal target is in focus.
- Image pastes refuse with a status message when a modal Input is
  focused, instead of stuffing a binary blob into the hidden editor.

Regression tests in packages/tui/test/input.test.ts and
packages/coding-agent/test/issue-2127-repro.test.ts pin both the new
TUI/Input contract and the InputController routing source.

Fixes #2127
2026-06-08 20:34:50 +00:00
roboomp be4990b6e0 fix(tui): reset scrollbackHighWater on full repaint inside multiplexers
Inside tmux/screen/zellij, rewinding/branching after a streamed reply had
grown past the viewport permanently anchored the input box to the pane
top: every subsequent frame repainted the visible viewport blank and
parked the cursor at screen row 0.

`requestRender(true, { clearScrollback: true })` dispatches the
`sessionReplace` intent, which re-emits the entire transcript through
`#emitFullPaint` with `options.clearScrollback === false` inside
multiplexers (ED 3 is a no-op in pane history). `#emitFullPaint` only
reset `#scrollbackHighWater` inside the `clearScrollback` branch and
otherwise raised it monotonically (`if (pushedNow > #scrollbackHighWater)`),
so the high-water from the pre-rewind streaming peak survived the
shrink. On the next frame `#planLiveRegionPinnedRender` saw
`#scrollbackHighWater` far above the new natural viewport top, computed
`renderViewportTop` past the actual content, and `#emitLiveRegionPinnedRepaint`
clamped `viewportTop` to `lines.length` — writing eight empty viewport
rows and parking the cursor at screen row 0.

A full repaint with `clearViewport: true` physically re-emits the entire
transcript from row 0, so the rows committed to native scrollback by that
paint are exactly `max(0, lines.length - height)` regardless of whether
ED 3 cleared pre-paint scrollback. Mirror the existing `#maxLinesRendered`
pattern and assign instead of monotonic-max so the renderer's bookkeeping
matches the freshly painted transcript in both mux and non-mux modes.

Fixes #2130
2026-06-08 20:34:33 +00:00
roboomp a190298414 fix(coding-agent): fell back to context-full when shake cannot drop below threshold
Threshold-driven auto-compaction with strategy=shake auto-continued even when
the shake reclaimed nothing material, and the next agent turn re-triggered the
same shake (which had nothing new to drop on a second pass), spinning forever.
After shake completes, recompute the post-shake context estimate; when it
still exceeds the auto-compact threshold (or shake reclaimed nothing on overflow
recovery), emit a one-shot fallback warning and hand off to the summarization
driven context-full path so progress actually resumes. Idle is exempt — its
60s+ timer self-throttles and cannot dead-loop on its own.

Fixes #2119
2026-06-08 20:34:16 +00:00
roboomp ef212c7cc2 fix(cli): kept mcp auth urls clickable
Rendered the MCP OAuth fallback as a short terminal hyperlink plus a single unwrapped copy URL line so terminals do not receive hard-broken authorization URLs.\n\nFixes #2121
2026-06-08 20:33:22 +00:00
can1357 eb33112440 chore: reformat 2026-06-08 22:32:46 +02:00
roboomp ef49122afe fix(coding-agent): honored skill prompt magic keywords
Skill prompt custom messages now scan user-authored skill args for magic keywords and turn budgets, matching normal prompt steering behavior without scanning skill body text.

Added a regression test for workflowz and hard turn-budget args on skill prompts.

Fixes #2128
2026-06-08 20:32:22 +00:00
can1357 5e6a001f5e fix(python/robomp): raised runtime errors for agent stopReason=error
- In _run_rpc_blocking, added a check for an assistant_message stopReason after timeout handling.
- When stopReason is "error", the worker now reads errorMessage (or a default message) and raises a RuntimeError.
2026-06-08 22:31:34 +02:00
can1357 0089811129 fix(coding-agent/cli): qualified model IDs to avoid cross-provider collisions
- Updated PI native streaming requests to send model identifiers as provider-qualified keys.
- Updated the auth-gateway model registry to store `${provider}/${id}` first and retain legacy bare IDs as fallback keys.
2026-06-08 22:31:34 +02:00
can1357 532e2b1b16 feat(coding-agent): added manual /plan-review command for reopening latest local plan
- Added an `openPlanReview` flow that selected the newest `local://<slug>-plan.md`, resolved its title, and reopened approval.
- Registered a new `/plan-review` builtin slash command that invokes that flow and clears the editor text.
- Added tests covering latest-plan selection plus warnings when plan mode is inactive or when no local plan file exists.
2026-06-08 22:31:34 +02:00
can1357 d6f2ff38bb fix(coding-agent/task): fixed task result rendering to show error and success glyphs correctly
- Updated `renderResult` to inspect `isError` on detail-less task results and render an error state with the error glyph.
- Replaced success/completed status symbols in agent, review, and result outputs with the shared `status.done` symbol.
- Added tests for detail-less task rendering to verify failed results show error and successful results show the done glyph.
2026-06-08 22:31:33 +02:00
Can BölükandGitHub 5a92a35c4c Merge pull request #2120 from danzaio/fix/easy-issues-batch
fix: close several issues
2026-06-08 22:30:41 +02:00
Can BölükandGitHub 19ce6b28c4 Merge pull request #2116 from danzaio/fix/split-commit-empty-hunks
fix(commit): reject empty split hunk selectors
2026-06-08 22:29:16 +02:00
can1357 eca1623b83 chore(ai): align AIML registry import 2026-06-08 15:50:12 -03:00
can1357 5ec1814f66 fix(ai): exclude AIML media models 2026-06-08 15:48:21 -03:00
can1357 2b569f8518 fix(ai): filter AIML chat catalog 2026-06-08 15:48:21 -03:00
can1357 59a688f5c0 fix: address easy issues review 2026-06-08 15:47:57 -03:00
can1357 5591a55fb2 fix(agent-dashboard): handle Ctrl+Enter LF submit 2026-06-08 15:47:22 -03:00
can1357 8f23ba511b fix: close several easy issues 2026-06-08 15:47:21 -03:00
can1357 243ad581e6 perf(commit): reuse split diff parser 2026-06-08 15:17:38 -03:00
can1357 22b152e220 fix(commit): allow deferred changelog targets 2026-06-08 14:56:36 -03:00
can1357 348ba44293 chore: bump version to 15.10.5 2026-06-08 19:11:24 +02:00
can1357 f8c214574f test: migrated repro test to package subpath imports
- Replaced relative `../src` imports with `@oh-my-pi/pi-ai` subpaths.
2026-06-08 19:10:47 +02:00
can1357 502c5bfae4 Merge remote-tracking branch 'origin/farm/461547d7/fix-moonshot-kimi-k26-empty-stream' 2026-06-08 19:08:40 +02:00
can1357 6ceda1d477 Merge remote-tracking branch 'origin/farm/dd3aaf05/expand-agents-md-at-imports' 2026-06-08 19:08:37 +02:00
can1357 9edf773b81 feat(coding-agent): centralized tool filtering for discovery mode with forced tool activation
- Introduced filterInitialToolsForDiscoveryAll() to centralize tool filtering when discovery mode is "all", replacing inline logic in createAgentSession.
- Added forceActive parameter to ensure tools required by forced tool_choice features (e.g., eager todo) remain active in the request, preventing provider 400 errors.
- Updated eager todo enforcement to check active tool set instead of registry, ensuring it respects tool discovery hiding.
2026-06-08 19:08:31 +02:00
can1357 9d457f73d9 test: migrated test imports to package subpath exports
- Replaced relative `../src` imports with `@oh-my-pi/pi-ai` and `@oh-my-pi/pi-agent-core` subpaths.
2026-06-08 19:03:55 +02:00
can1357 e79415e78b revert: codex obfuscation parameters 2026-06-08 19:03:49 +02:00
can1357 31b6f0bf31 refactor(ai): consolidated provider config into single-source registry
- Derived descriptors, default-model map, env keys, login list, and refresh dispatch from one ProviderDefinition per provider.
- Disabled OpenAI Codex stream obfuscation and interrupted whitespace-only tool-call argument deltas.
- Derived auth-broker callback ports and paste-code login set from the registry.
2026-06-08 18:48:43 +02:00
can1357 9cfb63fd07 fix(agent): retained mid-stream tool calls on deliberate aborts
- Kept committed tool-call blocks on TTSR/user-interrupt aborts, pairing them with a labeled placeholder result.
- Dropped incomplete tool calls only on anonymous `abort()` where partial args are unsafe to replay.
2026-06-08 18:31:20 +02:00
can1357 5d468a2378 fix(commit): reject empty split hunk selectors 2026-06-08 13:31:09 -03:00
can1357 bda3102451 ux(coding-agent): updated status glyphs and fixed extension model discovery refresh
- Added status.done and tool.* symbols to theme mappings and presets.
- Replaced generic success glyphs with contextual +/-, tool icons, and warnings.
- Mapped tool/task/job completions to status.done or status.enabled with icon overrides.
- Triggered runtime provider refresh after extension registration and warned on failure.
2026-06-08 18:28:15 +02:00
can1357 5ba7180d48 feat(pi-shell): added nohup builtin that doesn't mask SIGHUP
- Ran the operand as an ordinary descendant so it is reaped with the host instead of leaking as an orphan.
- Propagated the command's exit status; reported missing operand and exit 125 with no operand.
- Updated the bash tool prompt's daemon guidance away from nohup/setsid/disown detachment.
- Switched shell renderer success icon/state to "done".
2026-06-08 18:28:08 +02:00
can1357 347f857f03 feat(eval): raised per-cell timeout ceiling from 600s to 3600s
- Matched the `bash` tool's max in the Zod schema and runtime clamp.
- Allowed heavy local-compute cells to request budgets above 10 minutes.
- Updated docs and prompt to reflect the new 1-3600s range.
2026-06-08 18:28:08 +02:00
can1357 4a85add1f1 feat(builtins): implemented previously stubbed builtin behaviors
- Added fc editor mode, history -n/-r, and mapfile callbacks.
- Implemented symbolic umask parsing, unset namerefs, and declare -I.
- Rendered builtin man pages and replaced unimp errors with diagnostics.
- Added regex/substring tests, nameref unset, and exec-in-subshell paths.
2026-06-08 18:28:07 +02:00
can1357 3169e30a27 fix(ai): disabled stream obfuscation for openai-codex requests
- Set stream_options.include_obfuscation to false on transformed requests.
- Added stream_options to the request body type.
2026-06-08 18:28:07 +02:00
can1357 b5582278a0 feat(builtins): implemented wait for pids, -f, -n, and -p flags
- Added process ID resolution and selectors for waited jobs.
- Implemented terminate-only waits and next-job polling.
- Recorded completed job IDs into the variable named by -p.
- Added shell integration tests covering the new wait paths.
2026-06-08 18:28:07 +02:00