Commit Graph

3313 Commits

Author SHA1 Message Date
can1357 2c8da2ce09 refactor(ast-tools): reorganized ast-edit+grep hashline sep and lax strict
- Applied HASHLINE_CONTENT_SEPARATOR in AstEditTool output so hashline entries share a shared delimiter.
- Set AstEditTool and AstGrepTool strict defaults to false for more permissive tool call input handling.
2026-04-26 05:01:52 +02:00
can1357 d493f945e0 feat(hashline-formatting): added hashline colon separators across tooling
- Added `HASHLINE_CONTENT_SEPARATOR` and switched hashline formatting to colon separators across hashline helpers.
- Updated hashline prefix regexes in `edit/modes/hashline.ts` to require `:` and stop accepting tab separators.
- Updated `read.ts` and `write.ts` hashline prepending/stripping to match `LINE+ID:` content prefixes.
- Updated `match-line-format.ts` and hashline read-mode docs to document and emit `LINE+ID:content` lines.
2026-04-26 05:01:52 +02:00
can1357 b670d67652 fix(grep-tool): patched grep-tool skip-limit message and test assertion
- Updated GrepTool result-limit messaging to include a concrete next skip hint.
- Updated grep tool test assertion to verify the new skip-hint limit message.
2026-04-26 05:01:52 +02:00
can1357 956e053103 chore(session-payloads): removed task notes from serialized task entries
- Removed task notes from AgentSession serialized task entries.
2026-04-26 05:01:52 +02:00
can1357 e3f7496deb feat(coding-agent): added ordered todo_write ops and sequential execution
- Changed `todo_write` to an ordered `op`-array model with `replace`, `start`, `done`, `rm`, `drop`, `append`.
- Removed legacy multi-field todo payloads and updated tests/fixtures to use ordered `{op, task?, phase?, items?}[]` args.
- Reworked todo operation execution to apply entries sequentially and validate missing or unknown task/phase IDs.
- Updated todo rendering to use `todo.content` only and changed bash artifact labels from `full result` to `raw output`.
2026-04-26 05:00:54 +02:00
can1357 b22837f898 feat(coding-agent): added unified path targets for grep family
- Consolidated grep, ast-grep, and ast-edit on required `path`, replacing `glob`/`lang`/`sel` with inline file, dir, glob, list, and URL targets.
- Changed ast-grep and grep schemas to require a single `pat` string and use `skip` pagination instead of array patterns or offsets.
- Updated argument validation to reject empty `path` and invalid `skip`, and routed grep context to session settings only.
- Updated tool prompts and tests to reflect new path globbing semantics and `first N` truncation output text.
2026-04-26 04:33:38 +02:00
can1357 44ea247cf8 fix(coding-agent/tools): corrected json-tree inline arg truncation logic
- Updated inline argument formatting in formatArgsInline to truncate key/value pairs by width and show ellipsis when values overflow.
- Fixed JSON-tree output to hide harness-internal INTENT_FIELD and __partialJson keys from top-level tool argument rendering.
- Fixed multiline scalar rendering and empty-structure display paths in renderJsonTreeLines after tree-prefix traversal changes.
2026-04-26 04:32:27 +02:00
can1357 d294b8021d fix(coding-agent/tools): aligned Python tool execution to session cwd and removed cwd option
- Disabled strict schema enforcement on AskTool to relax request validation.
- Removed the optional `cwd` field from Python tool parameters and used `session.cwd` for warmup and execution context.
- Updated atom edit test fixtures to pass `set` as arrays instead of scalar strings.
2026-04-26 04:01:33 +02:00
can1357 d0a3791ea6 fix(agent): changed intent tracing marker from _i to i
- Updated the agent loop intent marker constant to use `i` instead of `_i` for tracing fields.
- Updated intent tracing documentation to describe a generic string marker field and cleanup behavior.
- Adjusted related Anthropic and coding-agent tests to match the renamed intent field via shared `INTENT_FIELD` usage.
2026-04-26 03:58:56 +02:00
can1357 fd42aa4c8f fix(coding-agent): adjusted strict validation settings across coding-agent tools
- Updated `CustomToolAdapter` to read `strict` from the wrapped tool instead of hard-coding it.
- Disabled strict validation for `LspTool` and `ResolveTool` by setting their `strict` flags to false.
- Updated `YieldTool` to set `strict` false in its fallback path and remove the local strict accumulator.
2026-04-26 03:47:48 +02:00
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