Commit Graph

3303 Commits

Author SHA1 Message Date
can1357 cfaee4c0dc fix(coding-agent/modes): added checks to skip writing error messages to
- Added checks to skip writing error messages to stderr when stopReason is 'error' or 'aborted', as these cases already handle error output separately.
- This prevents duplicate error reporting in print mode when the assistant encounters terminal error conditions.
2026-04-26 03:44:56 +02:00
can1357 0fcc2846cb feat(coding-agent/config): added atom option to edit mode schema
- Extended the edit.mode enum in the coding-agent configuration schema to include atom as an additional option.
2026-04-26 03:36:34 +02:00
can1357 9a6116bb85 fix(ai): resolved strict tool fallback in AI streaming providers
- Added `examples` option to `StringEnum` so generated schemas include examples metadata.
- Added session-state tracking and strict-tools fallback flags for Anthropic and OpenAI streaming providers.
- Added first-token retry fallback from strict to non-strict for Anthropic/OpenRouter 400 compiled-grammar errors.
- Added strict tool-schema normalization, stripping unsupported fields, capping strict tools, and nullable conversion.
- Added assistant `errorMessage` rendering in print mode and assistant message components.
- Added tests for strict retries, grammar-error handling, and strict-schema alignment behavior.
2026-04-26 03:36:21 +02:00
can1357 5cba717ff7 feat(coding-agent): added locator-based atom edits with loc selectors
- Added locator-based atom edits with required `loc`, including inline `file:line`, range, and `^`/`$` selectors.
- Added path resolution via top-level path, entry path, or `path:loc` selectors and flattened multi-target atom execution.
- Removed `del`; required `set/pre/post` to use line arrays and mapped `set: []` to deletion semantics.
- Changed `sub` payloads to required `[find, replace]` tuples and tightened parsing to accept null optional verbs and array-or-null lines.
2026-04-26 03:34:33 +02:00
can1357 17411f3a4b fix(coding-agent): fixed tool validation and branch-cache fallback handling
- Added a regression test for tool argument coercion that preserves quoted edit arrays while stripping optional null fields.
- Updated footer branch-watcher initialization to clear cached branch state when resolving git head fails.
- Set the report_tool_issue tool definition to non-strict mode for looser argument handling.
2026-04-26 03:20:43 +02:00
can1357 c82df1367d fix(edit): collapsed unchanged diff context between distant edit blocks
- Updated generateDiffString to preserve bounded context at both edges of unchanged regions between adjacent changes by adding a middle skip and ellipsis.
- Added a test covering distant edit hunks to verify unchanged lines in the gap are collapsed while change lines remain visible.
2026-04-26 03:17:55 +02:00
can1357 985f2049ab fix(coding-agent/tools): disabled strict tool parameter validation across built-in tools
- Added an optional strict field to CustomTool definitions to support non-strict execution mode.
- Set strict to false across built-in AgentTool and custom tool registrations, including browser, calculator, GitHub, image generation, and related utilities.
- Updated inspect-image tests to reflect the relaxed strict setting on the tool.
2026-04-26 03:17:30 +02:00
can1357 537ee2237e fix(coding-agent/utils): handled ENFILE/EMFILE as optional git metadata errors
- Extended optional git metadata checks to treat ENFILE and EMFILE like missing paths.
- Updated sync and async helper functions to return null for those filesystem errors instead of throwing.
- Documented the status-line branch-rendering fallback for ENFILE/EMFILE failures in the changelog.
2026-04-26 03:16:44 +02:00
can1357 4f85ebe472 fix(coding-agent): corrected gutter marker alignment in diff rendering
- Added `CodeFrameMarker` and `formatCodeFrameLine()` to centralize code-frame gutter formatting.
- Extended diff rendering to preserve `|` and `│` separators, aligning gutter markers and line numbers.
- Reworked AST, grep, hashline, Vim, and diff renderers to use shared line formatting with computed `lineNumberWidth`.
- Updated atom editing flow and tests, including `resolveAtomEntryPaths` migration and new loc-based/edge-case coverage.
- Adjusted benchmark runner early-stop configuration by passing `buildEarlyStop` through prompt collection.
2026-04-26 03:00:51 +02:00
can1357 d0dd8430f7 fix: major codex regression, wth?? 2026-04-26 02:54:40 +02:00
can1357 f101cdd5e2 feat(coding-agent): added openai image-gen support
- Added `openai` and `openai-codex` as image providers and let `providers.image=auto` prefer GPT images.
- Updated settings, selector, and SDK wiring so OpenAI image providers pass through `setPreferredImageProvider`.
- Replaced Gemini-only image tooling with `image-gen` and added OpenAI/Codex hosted-image execution with SSE parsing.
- Added image-gen and handoff tests, including final-yield no-compaction regression and OpenAI payload/header assertions.
2026-04-26 02:46:46 +02:00
can1357 50cf1999b7 fix(coding-agent/session): tracked successful yield completions before post-turn maintenance
- Added tracking of the last successful non-error yield tool call when a yield execution ends.
- Cleared the tracked yield ID and skipped post-turn maintenance when appropriate, including when the last assistant message was a successful yield.
- Standardized unchanged-result error messages in atom and replace edit modes.
2026-04-26 02:33:21 +02:00
can1357 0e83d1a3c3 fix(coding-agent): corrected atom/hashline anchors for full line+suffix
- Changed hashline/atom parsing to require full `line+suffix` anchors and emit full-anchor guidance on failures.
- Updated atom/hashline prompt docs, `atom.test.ts`, and changelog entries to require exact full anchors like `160sr`.
- Added preformatted `displayContent` for read/grep/ast tools and switched renderers to prefer it in TUI output.
- Updated mismatch and grep/ast renderers to show context with `*` markers and gutter lines, removing legacy helpers.
2026-04-26 02:28:29 +02:00
can1357 cb45cba98e feat: implemented LINEID hashline parsing/output with pre/post atom ops
- Expanded hashline and chunk bigram tables to 647 entries and moved chunk checksums to a 40-item namespace.
- Changed hashline anchors from `LINE#ID`/`:` to concatenated `LINEID`\t forms across parsing and tool outputs.
- Removed line-number padding and routed diff/read/grep/renderer output through raw numbers, tabs, and `toDisplayLine` formatting.
- Renamed atom ops to `pre`/`post`, removed `ins`, and updated schemas, prompts, and tests for new insertion behavior.
2026-04-26 02:18:32 +02:00
can1357 033a4b704e fix(coding-agent/exec): adjusted minimized output artifact handling and footer text
- Guarded minimized output handling so the minimized text was only applied when it changed from the original output.
- Replaced the artifact footer text with a shorter `[full result: artifact://...]` marker when a minimized save artifact was created.
2026-04-26 01:22:22 +02:00
can1357 e89b3cf7e8 feat(coding-agent/tools): added examples to coding-agent tools
- Added `examples` support to `StringEnum` schemas and propagated it to tool metadata.
- Added concise descriptions and example values across coding-agent tool schemas for clearer guidance.
- Documented the new StringEnum examples capability in `packages/ai/CHANGELOG.md`.
- Cast `real` to `HASHLINE_BIGRAMS` elements in `staleBigramFor` test setup.
2026-04-26 01:03:21 +02:00
can1357 778054c742 feat(coding-agent/edit): added tuple-based set syntax for block-body atom replacements
- Updated the atom edit schema and tool prompt docs to replace the standalone `between` form with a 2-tuple `set` form for exclusive block-body replacement.
- Adjusted `resolveAtomToolEdit` so `set` accepts either a single anchor or `[open, close]`, translates tuple input to an internal between-style op, and rejects tuple values that are not anchor strings.
- Expanded tests to verify tuple-based `set` resolution and to enforce validation errors for invalid `set` array inputs.
2026-04-26 00:46:02 +02:00
can1357 803eb5f384 docs(coding-agent): updated path guidance to prefer cwd-relative paths
- Updated reviewer prompt field descriptions to refer to file paths generally instead of absolute paths.
- Reworded notebook and write tool metadata to remove absolute-path constraints.
- Added system guidance to prefer cwd-relative paths for path-style tool arguments.
2026-04-26 00:39:31 +02:00
can1357 23a1277d83 feat(coding-agent): added between atom edits with anchor validation
- Added `between` atom edits with `after`/`before` anchors and logged them in changelog docs.
- Added `between` docs to prompt tooling, including two-anchor exception and anchor-order rules.
- Added `between` validation to reject stale anchors, invalid ranges, overlap, and nested interior edits.
- Reworked `applyAtomEdits` to apply `between` operations as bottom-up interior splices and adjacent-line inserts.
- Updated `file_path` schema description in review tool to "Path to the file".
- Added `AtomEdit` tests for `between` parsing and edge-case success/failure coverage.
2026-04-26 00:39:04 +02:00
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 6bd4cf24fd chore(scripts): updated tooling scripts and benchmark workflow configuration
- Enabled Biome VCS settings and expanded fix scripts with new `fix:all` and `fix:tools:all` commands.
- Updated `fix:ts` and `fix:tools` to separate changed-only checks from full-run formatting and generation tasks.
- Simplified edit-benchmark variant parsing by removing hardcoded validation logic, and removed deprecated flags from `run-rs-task.ts`.
2026-04-26 00:29:18 +02:00
can1357 480d40f2a8 fix: corrected optional edit path fallback across chunk hashline modes
- Added raw read output propagation so read/archive commands bypass anchors, line numbers, and chunk formatting.
- Fixed atom/hashline editing by tightening hashline prefixes and applying grouped anchor edits in stable order.
- Hardened chunk parsing and path handling by using `bigram_end` checks and resolving edit paths via shared `args.path` fallback.
- Updated path-related behavior for chunk, replace, patch, and hashline previews to honor optional edit paths.
- Removed mode-level param validators and replaced them with runtime handling, then removed obsolete validation tests.
2026-04-26 00:29:18 +02:00
can1357 79bad40cfd feat(coding-agent): added atom mode to EditTool with path fallback
- Added `atom` edit mode to `EditTool` with single-point hashline-style dispatch and `executeAtomSingle`.
- Added `AtomToolEdit`/`AtomParams` schema and `atom` prompt docs to require one op per edit entry.
- Changed `EditTool` entry processing to inherit per-entry `path` from a top-level request `path` fallback.
- Added top-level `path` defaults to patch and replace schemas and now reject missing entry paths.
- Added an `atom` streaming strategy and registered it in `EDIT_MODE_STRATEGIES` for live mode support.
- Enabled hashline read anchors for `atom` mode via `file-display-mode.ts` path-display logic.
- Added `atom` unit tests covering schema checks, anchor conflicts, and hash mismatch diagnostics.
2026-04-26 00:29:17 +02:00
can1357 6d154a17f5 feat(coding-agent): added HASHLINE_BIGRAMS-based hashline/chunk handling
- Aligned hashline and chunk token handling to `HASHLINE_BIGRAMS` in `computeLineHash` and parsing regexes.
- Removed hashline file-level `move`/`delete` options from schemas and execution so edits are in-place updates only.
- Hardened hashline prefix parsing to reject non-bigram IDs, preventing false stripping of `#` comment lines.
- Updated `read()`/prompt wording so raw reads skip prefixes and examples now show anchors like `123#th`.
- Updated hashline chunk tests for new `HASHLINE_BIGRAMS` IDs and replaced stale hash constants.
2026-04-26 00:29:17 +02:00
can1357 5c1b8eaaaa feat(coding-agent): compressed examples in prompts
- Prevented template compile failures from `}}}` sequences by normalizing closing braces before `handlebars.compile`.
- Updated Unreleased `CHANGELOG.md` to describe current hashline/edit/path behavior changes.
- Standardized tool prompt example formatting by replacing `<example>` blocks with unified `<examples>` sections.
2026-04-26 00:29:17 +02:00
Can Bölük 1f2a47e8f5 Merge pull request #780 from a-lavis/feat/provider-headers-config
Fix provider transport override durability across refresh and source handoff
2026-04-26 00:27:55 +02:00
Can Bölük 2fb2254658 Merge pull request #777 from JupiterFeng/fix/bash-snapshot-nonpty-timeout
Fix non-PTY bash timeout from large shell snapshots
2026-04-26 00:27:24 +02:00
can1357 d1da849b71 chore: bump version to 14.3.0 2026-04-25 19:12:49 +02:00
can1357 ce17e4d1da fix(coding-agent): harden CPU info and PR push target
Fixes #779

Fixes #778
2026-04-25 18:56:47 +02:00
can1357 a815a25afe fix(coding-agent): reject empty write & align promotion tests to gpt-5.5
- Add explicit validation rejecting write:"" with the expected error message in normalizeChunkEditOperations.
- Update spark context-promotion tests (it_1, it_2, concurrent it_5) to expect promotion to gpt-5.5 (the new chain target on openai-codex), since spark variants now promote to gpt-5.5 rather than the base codex model.
2026-04-25 17:52:33 +02:00
Aidan 36f80f89cf test(coding-agent): remove redundant runtime overlay case 2026-04-24 18:28:17 -04:00
Aidan cb7febdc50 test(coding-agent): compact runtime provider refresh assertions 2026-04-24 18:24:44 -04:00
Aidan 89ad9926de fix(coding-agent): clear source handoff transport state eagerly 2026-04-24 17:56:17 -04:00
Aidan ff1549fd2c fix(coding-agent): preserve runtime provider transport override precedence 2026-04-24 17:45:06 -04:00
Aidan 1dbfa78dac Fix runtime provider override leakage across source handoff 2026-04-24 16:58:03 -04:00
can1357 bcf2e9e584 refactor(coding-agent/edit): removed chunk read:true operation from chunk editing
- Removed `read: true` from chunk edit schema and validation logic, including mixed read/write checks and read-only execution paths.
- Updated chunk edit normalization to treat chunk operations as mutating and removed unused read-result handling.
- Updated prompts and changelog guidance to require `open` for inspection and document that chunk edits use only `write`, `insert`, or `delete`.
2026-04-24 22:40:25 +02:00
can1357 d82377cda8 revert: "read-to-open"
This reverts commit c48d2e6080.
2026-04-24 22:36:44 +02:00
Aidan a5d4a0058e Keep models re-registration override state consistent 2026-04-24 15:48:27 -04:00
Aidan 1f1c81c143 Clarify changelog for provider override durability 2026-04-24 15:28:49 -04:00
can1357 99a21b95ba feat(pi-natives-chunk): enabled row chunk support in pi-natives-chunk
- Added markdown `Row` chunk support by introducing `ChunkKind::Row`, mapping it to tag `"row"`, and emitting row chunks for table rows.
- Updated Go chunk parsing to support method signatures (`func (recv) Name`), prefer method parsing in signatures, and adjust root rules to classify package/import chunks correctly.
- Changed chunk-edit behavior to add read-only `read:true`, replace `write:null` deletes with explicit `delete`, and require one explicit action per entry.
- Added safer chunk-edit execution with region matching, replacement reindentation, table-row append handling, and stricter warnings/errors for boundary and invalid operations.
2026-04-24 21:26:56 +02:00
Aidan f6d067eec5 Simplify runtime provider override application 2026-04-24 15:25:54 -04:00
Aidan bb542022a7 Preserve runtime baseUrl on headers-only overrides 2026-04-24 15:17:28 -04:00
Aidan 5e89736bc9 Keep runtime provider overrides on overlay refresh 2026-04-24 15:13:26 -04:00
Aidan df81f26867 Test refreshProvider runtime override durability 2026-04-24 15:06:27 -04:00
Aidan d74f9a82d1 Persist runtime provider overrides across refresh 2026-04-24 14:59:26 -04:00
can1357 83e897d5ea fix(pi-natives-chunk): corrected chunk edits to reject invalid ^/~ ops
- Fixed chunk edits to reject invalid `^`/`~` operations on code-leaf chunks.
- Fixed multiline replacement behavior to preserve literal insertion text and adjust multiline match starts.
- Fixed unsupported-region handling to warn, fall back to whole-chunk edits, and clear invalid region targets.
- Documented chunk-edit behavior for raw whitespace, parser boundaries, `sel="?"` refresh, markdown spacing, and streaming headers.
2026-04-24 19:56:42 +02:00
can1357 ead830283e docs(coding-agent/prompts): expanded open tool prompts with URL, archive, and selector docs
- Updated open-chunk prompt docs to describe URL handling, document/image extraction, and directory/archive traversal.
- Expanded selector behavior documentation for full-file, chunk, line-range, and raw reads, including the one-line `L20-L20` format.
- Updated the generic open prompt table to clarify `L50` shorthand as a range-to-EOF read and add single-line range support.
2026-04-24 19:44:22 +02:00
can1357 e3ca350f95 fix(coding-agent): added partial JSON path extraction for streamed edit calls
- Added helper utilities in the edit renderer to parse partial JSON fragments and extract the `path` field.
- Used the extracted path as a fallback when resolving the edit target file, enabling partial streamed edit calls to show the path.
- Built and stored the render context before call rendering, and added a test covering partial JSON edit path rendering.
2026-04-24 19:38:38 +02:00
can1357 c48d2e6080 feat(coding-agent): implemented read-to-open tool aliasing in runtime
- Canonicalized file and CLI defaults from `read` to `open` across tool registration and prompts.
- Added `resolveToolAlias()` and applied alias-normalized tool selection so legacy `read` maps to `open`.
- Updated runtime, UI, and export layers to treat `open` as first-class while preserving `read` compatibility.
- Renamed read prompt docs to `open.md`/`open-chunk.md` and refreshed system guidance to recommend `open`.
- Updated tool-related tests and expectations from `read` to `open` (including test fixtures and aliases).
2026-04-24 19:13:11 +02:00
can1357 b7d881a7f8 docs(coding-agent/prompts): added mandatory LSP guidance for symbol-aware refactors
- Updated the LSP prompt to require symbol-aware operations to use `lsp` when a language server is available.
- Added explicit warnings against cross-file text-based renames, recommending `lsp` rename and code actions for server-known fixes.
2026-04-24 18:52:59 +02:00