Commit Graph

709 Commits

Author SHA1 Message Date
can1357 ecd1554eba feat: renamed subagent handoff flow to use yield instead of submit_result
- Renamed subagent completion flow from `submit_result` to `yield` across SDK tools, prompts, and docs.
- Updated executor/task handling to require and parse `yield` calls, replacing legacy submit-result extraction and state flags.
- Added `subagent-yield-reminder` and updated system prompts to require `yield` with `result.data` or `result.error`.
- Renamed hidden-tool and registration plumbing to `yield`, including discovery helpers and renderer/test surface.
2026-04-26 00:29:52 +02:00
can1357 d1da849b71 chore: bump version to 14.3.0 2026-04-25 19:12:49 +02:00
can1357 1fb22e1e9a chore: bump version to 14.2.1 2026-04-24 05:55:59 +02:00
can1357 06697b3f28 chore: bump version to 14.2.0 2026-04-24 01:05:06 +02:00
can1357 601c029c20 fix: stabilize apply_patch custom tool integration 2026-04-24 00:25:21 +02:00
Hans Josephsen 2a367bf043 feat(coding-agent/edit): add codex apply_patch as a new edit mode
Slots a new "apply_patch" variant alongside the existing edit modes
(replace, patch, hashline, chunk, vim). The mode accepts a single input
string containing a Codex *** Begin Patch / *** End Patch envelope,
parses it with a new lenient parser (heredoc-tolerant), and fans each
file-op out to the existing executePatchSingle so LSP writethrough,
plan-mode guards, fs-cache invalidation and diagnostics are shared
with the patch mode.

Exposes both tool shapes from the spec: the JSON function-tool variant
(§1.2, {input: string}) and the OpenAI custom-tool / Lark-grammar
"freeform" variant (§1.1, raw patch string). The edit tool advertises
a Lark grammar via customFormat and a wire name via customWireName;
openai-responses emits it as a grammar-constrained custom tool when a
model opts in with applyPatchToolType: "freeform" in models.json.
custom_tool_call / custom_tool_call_output are plumbed end-to-end
through the shared responses code (emission, streaming, history
replay), and the agent-loop dispatcher matches tool calls by either
name or customWireName so returned calls route correctly.

Also threads preview/diff rendering for apply_patch through the TUI
(tool-execution + edit renderer) so streaming patches show per-file
diffs like the other edit modes.

Default edit mode is unchanged (hashline); opt in via edit.mode or
PI_EDIT_VARIANT=apply_patch.
2026-04-24 00:15:17 +02:00
can1357 d24d11a274 fix: resolved AI/OAuth helper duplication via shared modules
- Standardized missing-file read errors and now return `File not found: <path>` for absent edit targets.
- Centralized AI provider, usage, and OAuth helpers into shared modules to remove duplicated logic.
- Migrated OAuth/API-key login flows to shared factory helpers and removed inline prompt/token-exchange code.
- Reused shared tools and formatter utilities for discovery, stream tails, LSP batching, and source formatting.
- Consolidated repeated test helpers and fixtures into shared modules, replacing inline helper duplicates.
2026-04-23 21:02:14 +02:00
can1357 e952773e24 chore: bump version to 14.1.4 2026-04-17 18:50:13 +02:00
can1357 397617e1c3 chore: bump version to 14.1.3 2026-04-17 18:07:35 +02:00
can1357 028f8c5436 chore: bump version to 14.1.2 2026-04-14 19:29:04 +02:00
can1357 bae191227d chore: bump version to 14.1.1 2026-04-14 10:53:45 +02:00
can1357 debb76723d chore: catalog imports 2026-04-13 01:06:01 +02:00
can1357 b4887e37b7 fix: address PR regression follow-ups 2026-04-13 00:48:13 +02:00
can1357 fafc5c24ed merge: PR #628 2026-04-13 00:31:40 +02:00
can1357 f96422d911 chore: bump version to 14.1.0 2026-04-11 13:22:08 +02:00
can1357 1bb5234477 chore: bump version to 14.0.5 2026-04-11 06:39:46 +02:00
djdembeck ce225ddf83 fix: sanitize tool execution events and streamline handling
- agent-loop: sanitize text content in tool_execution result/partialResult
- ai/cursor: fix ANSI escape handling, add incomplete escape detection
- coding-agent/cursor: fix per-delta sanitization with tracked state
- print-mode: flush stderr before exit to prevent data loss
- add unit tests for bash execution clamp display line
2026-04-10 14:51:27 -05:00
djdembeck c2b4ac34a7 Merge branch 'main' into fix/tui-width-overflow-crash 2026-04-10 13:57:26 -05:00
djdembeck a6bd1d29dd fix: add missing pi-natives deps and fix ANSI stream handling 2026-04-10 13:54:03 -05:00
djdembeck 82c502b9eb fix: sanitize tool result content in agent-loop
- Add sanitizeText import

- Sanitize text content before creating ToolResultMessage

- Prevents terminal escape sequences from leaking through
2026-04-10 13:54:03 -05:00
can1357 0e5dfd542b chore: bump version to 14.0.4 2026-04-10 13:34:27 +02:00
can1357 fa12644267 chore: bump version to 14.0.3 2026-04-09 20:03:21 +02:00
can1357 a4e44208da chore: bump version to 14.0.2 2026-04-09 02:35:59 +02:00
can1357 52719d1a7c refactor: restructured monorepo TypeScript config and build tasks for unified setup
- Migrated all package tsconfig files to extend tsconfig.workspace.json for unified TypeScript configuration across monorepo.
- Consolidated build and check scripts across 10+ packages to use biome for linting/formatting with separate type checking via tsgo.
- Renamed build scripts from build:native and build:binary to build for simplified command naming across packages/natives and packages/coding-agent.
- Refactored CI workflow to invoke bun tasks instead of inline shell scripts, reducing workflow complexity by 40+ lines.
- Removed sync-exports.ts and repro-stuck.ts scripts; deleted path aliases from tsconfig.base.json in favor of workspace-based configuration.
- Updated turbo.json with new task definitions (check:types, lint, fmt, fix) and removed build:native/embed:native tasks.
2026-04-08 17:05:20 +02:00
can1357 f2fceb27ad chore: bump version to 14.0.1 2026-04-08 15:07:01 +02:00
can1357 757bdca7a1 feat: added assistant message event interception for streaming edit abort control
- Added `onAssistantMessageEvent` callback to Agent API for inspecting and aborting assistant streaming events.
- Added `setAssistantMessageEventInterceptor()` method to dynamically update assistant message event handlers.
- Converted `checkAutoGeneratedFileContent()` from async to synchronous for improved streaming edit abort detection performance.
- Implemented LRU caching in auto-generated file detection with early path-based checks to prevent unnecessary edits.
- Refactored streaming edit pre-caching to use assistant message event interception for real-time abort capability.
- Extracted `peekFile()` utility for efficient file prefix reading with pooled buffer reuse strategy.
2026-04-08 14:51:15 +02:00
can1357 99fac3419b chore: bump version to 14.0.0 2026-04-08 11:51:59 +02:00
can1357 d116b44b81 chore: bump version to 13.19.0 2026-04-05 17:38:13 +02:00
can1357 279ae220a4 chore: bump version to 13.18.0 2026-04-02 06:00:18 +02:00
can1357 84e71f2c66 chore: bump version to 13.17.6 2026-04-02 01:07:43 +02:00
can1357 264e02fde3 chore: bump version to 13.17.5 2026-04-02 00:17:12 +02:00
can1357 bb01e58865 chore: bump version to 13.17.4 2026-04-01 23:50:36 +02:00
can1357 236fedaf2e chore: bump version to 13.17.3 2026-04-01 20:57:14 +02:00
can1357 5fbfbafa58 chore: bump version to 13.17.2 2026-04-01 19:32:22 +02:00
can1357 9b453ce2e5 chore: bump version to 13.17.1 2026-04-01 05:19:32 +02:00
can1357 862593d736 chore: bump version to 13.17.0 2026-03-30 14:00:34 +02:00
can1357 f44e007f7c chore: bump version to 13.16.5 2026-03-29 17:58:13 +02:00
can1357 1a616f80e5 chore: bump version to 13.16.4 2026-03-28 13:47:18 +01:00
can1357 b84ba76df1 chore: bump version to 13.16.3 2026-03-28 06:11:51 +01:00
can1357 660c5652d5 chore: bump version to 13.16.2 2026-03-27 12:12:54 +01:00
can1357 f114cd8122 chore: bump version to 13.16.1 2026-03-27 11:41:22 +01:00
can1357 c7989526c1 chore: bump version to 13.16.0 2026-03-27 04:39:25 +01:00
can1357 ebf58f7c28 chore: bump version to 13.15.3 2026-03-26 16:17:37 +01:00
can1357 b8b1c75d20 chore: bump version to 13.15.2 2026-03-26 14:51:40 +01:00
can1357 80d7a8f413 chore: bump version to 13.15.1 2026-03-26 14:09:28 +01:00
can1357 4adaee02da chore: bump version to 13.15.0 2026-03-23 05:58:44 +01:00
can1357 7fb18faf4c fix(coding-agent): backported pi-mono changes (1feccfed..b21b42d0)
packages/ai:
- feat: expose provider responseId on AssistantMessage
- feat: lazy-load provider modules for faster startup
- fix: hash foreign Responses API tool call IDs exceeding 64-char limit
- fix: ignore null chunks in openai-completions streams
- fix: keep image tool results inline for Gemini 3+ and Antigravity
- fix: correct Bedrock Claude 4.6 context window to 200k
- fix: support prompt caching for Bedrock application inference profiles
- fix: add OpenRouter reasoning payload format
- fix: ignore placeholder Vertex API keys
- fix: skip AJV validation in restricted runtimes
- fix: Anthropic OAuth client injection and responseId extraction
- fix: Codex incomplete/failed response status handling

packages/agent:
- fix: defer steering until after tool execution completes

packages/tui:
- feat: namespaced keybinding IDs with KeybindingsManager conflict detection
- feat: configurable select list column sizing (#2154 by @markusylisiurunen)
- fix: stream truncateToWidth for large strings
- fix: skip Termux height redraws
- fix: stop evicting unrelated default keybindings
- fix: resolve raw backspace ambiguity on Windows Terminal
- fix: clear stale scrollback on session switch (#2155 by @Perlence)
- fix: remove trailing markdown block spacing (#2152 by @markusylisiurunen)

packages/coding-agent:
- feat: add resizable share sidebar (#2435 by @dmmulroy)
- feat: emit OSC 133 command-executed marker
- feat: reload custom themes from disk watcher
- feat: add --fork session flag
- feat: file mutation queue for serialized writes
- feat: initial message consolidation utility
- fix: keybindings migrated to namespaced IDs
- fix: resolve waitForRetry() race when auto-retry produces tool calls
- fix: handle slash-delimited /model refs
- fix: refresh active model after provider updates
- fix: extended transient error patterns for retry
2026-03-22 18:28:40 +01:00
can1357 7be29ab70f chore: bump version to 13.14.2 2026-03-21 17:34:47 +01:00
can1357 b89631541a chore: bump version to 13.14.1 2026-03-21 17:09:04 +01:00
can1357 32e6379fbe chore: bump version to 13.14.0 2026-03-20 23:53:34 +01:00