Commit Graph

3253 Commits

Author SHA1 Message Date
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
can1357 501106a3c4 fix(coding-agent): fixed local plan URL path separator handling in chunk edits
- Updated `chunkReadPathSeparatorIndex` to detect URL schemes and split at the final selector colon only after the URL path.
- Added tests for `parseChunkEditPath` and `parseChunkReadPath` covering local plan URLs with selectors and scheme-only URLs.
2026-04-24 18:51:32 +02:00
can1357 ddff481260 docs(coding-agent/prompts): documented read tool preference over browser for static content
- Updated browser tool guidance to prefer `read` for static web content and use browser automation only when JavaScript, authentication, or interaction is required.
- Expanded the `read` tool documentation to include broader document and URL formats and to call out reader-mode text extraction.
- Strengthened instructions by requiring `read` for file/directory/archive/URL reads and discouraging browser/puppeteer for static web content.
2026-04-24 18:48:53 +02:00
can1357 4f8697234a chore: reformat 2026-04-24 14:04:56 +02:00
can1357 ec8405bb2c fix(pi-natives/shell): resolved shell minimizer bypass for compound/piped
- Updated minimizer mode selection so `Compound`, `Piped`, and `Unsupported` plans now skip minimization.
- Removed `MarkedCommands` mode and marker-stripping paths from shell minimizer and buffering flow.
- Updated minimizer tests and changelog to document compound/piped commands bypassing minimization.
- Deleted marker metadata and helper infrastructure (`markers.rs` types/helpers) and related imports.
2026-04-24 14:00:04 +02:00
can1357 ac76f0d66a perf(coding-agent/session): reduced session listing via strided workers
- Parallelized `collectSessionsFromFiles` via strided workers sized by file count and CPU parallelism, reducing large-list latency.
- Read only a fixed 1024-byte prefix per session file in `collectSessionFromFile`, avoiding full-file scans.
- Added partial-prefix fallbacks to extract session title and first user message when JSONL parsing is incomplete.
2026-04-24 13:57:39 +02:00
can1357 f772dd9f6a feat(coding-agent/modes): implemented ACP extension methods for session and extension endpoints
- Added cached retrieval of all sessions in AcpAgent with a 60s TTL, in-flight deduplication, and cache invalidation when creating a session.
- Implemented `extMethod` handlers for `omp/sessions/listAll`, `omp/projects/list`, `omp/chats/byCwd`, `omp/usage`, and `omp/extensions` to return sorted/bounded session and project data.
- Added extension toggling through `omp/extensions/toggle` using stored disabled provider IDs and capability enable/disable functions.
2026-04-24 13:52:21 +02:00
can1357 caef52f5e2 fix(coding-agent/session): switched session listing to async glob scanning
- Updated SessionManager.listAll to retrieve session files with Bun.Glob.scan instead of scanSync.
- Awaited the async glob scan results via Array.fromAsync before collecting session metadata.
2026-04-24 13:50:51 +02:00
can1357 c61a5b9a56 feat(config): added minimizer output fields and compact shell summaries
- Added minimizer API fields (`MinimizerResult.text`, `settingsHash`) and shell options for minimized output behavior.
- Changed bash execution to print minimized text output and append artifact footers only after minimized output is saved.
- Added UTF-8-safe shell streaming with `on_chunk` callback routing and `replace()` output sink updates.
- Added core filter enhancements for git, cargo, go, and listing/python outputs to produce compact summaries.
- Added RTK command filters and fixtures to strip noise, truncate output, and normalize success fallbacks.
2026-04-24 11:13:43 +02:00
can1357 57b5a7e8cb fix(coding-agent/modes): used expanded editor text for input handling when available
- Updated input handling to call getExpandedText when available and fall back to getText.
2026-04-24 09:54:10 +02:00
can1357 18231ce151 fix: resolved command completion marker and exit-code handling
- Added command-marker metadata and lifecycle in process execution, including completion markers and exit-code writes.
- Refactored minimization to support `MarkedCommands` mode, token-based detection, and marker-aware stripping.
- Added `onMinimizedSave` and `saveBashOriginalArtifact` to persist full bash-original output artifacts.
- Expanded public exports and marker hooks so external command launch metadata can be controlled by consumers.
2026-04-24 09:51:00 +02:00
can1357 163eca4cb7 style: biome-format bash-executor jsdoc and minimizer sink line 2026-04-24 09:32:06 +02:00
can1357 084ffd2058 feat(cross-cutting): added shell minimizer planning from AST command parsing
- Added AST-based minimizer planning with brush-parser to classify commands before minimization.
- Added original text capture and byte-metric `minimized` telemetry to shell execution results.
- Added minimizer configuration controls, including trust-gated loading via `settingsHash` and limits.
- Added `onMinimizedSave` callback wiring to persist minimized outputs and annotate Bash sinks with artifact IDs.
2026-04-24 09:15:18 +02:00
can1357 21d50d5703 feat(coding-agent): added mode-aware streaming preview for edit outputs
- Added mode-aware streaming mode resolution and strategy registration in tool execution flow.
- Changed edit rendering to propagate mode and file-scoped diff previews across edit/vim tool outputs.
- Added chunk-mode streaming helpers (`loadChunkSource`, `computeChunkDiff`, `dropIncompleteLastEdit`) with abort-aware error fallbacks.
- Added strategy-specific streaming preview support for replace, patch, hashline, apply_patch, and vim modes.
- Fixed streaming previews by dropping incomplete trailing edits and handling invalid chunk or aborted inputs.
- Expanded streaming and chunk-diff tests for partial JSON, open edits, empty paths, abort signals, and file loading checks.
2026-04-24 08:24:30 +02:00
can1357 4940961e01 feat: added shell minimizer settings and dispatch by program
- Added configurable minimizer settings to native and coding-agent APIs, including shellMinimizer options.
- Added minimizer execution plumbing through shell config, session-key generation, and buffered output capture.
- Added command identity detection and dispatching by program/subcommand with safe fallback to passthrough output.
- Added filter suites for git, docker, go, bun, cloud, and system commands to strip ANSI and compact noisy output.
- Added unit tests for detection and minimizer behavior across command support, failures, and passthrough paths.
2026-04-24 08:00:04 +02:00
Can Bölük 77bf79e79a Merge pull request #509 from apoc/fix/mcp-manager-propagation
fix(mcp): propagate mcpManager to nested subagent sessions
2026-04-24 07:37:44 +02:00
Can Bölük 8a3b7ff1a5 Merge pull request #728 from azais-corentin/feat/726-opus-4.7-support
feat(ai): support Claude Opus 4.7
2026-04-24 07:35:17 +02:00
makoMakoGo 311608eff3 fix(coding-agent/codex-search): force web_search tool_choice and add citation fallback
When the Codex Responses API synthesizes an answer without emitting
url_citation annotations, previously-empty sources made cited results
look ungrounded. Add:

- tool_choice: { type: "web_search" } so Codex must call the tool
- markdown-link + bare-URL extraction from the answer as a fallback
  that only runs when no structured citations were returned

The model-resolution path is unchanged; getBundledModels already
returns a usable Codex catalog on main.

Closes #724
2026-04-24 07:34:15 +02:00
Corentin AZAIS cc33fe5366 test(ai): add Opus 4.7 catalog and alignment coverage
- Register claude-opus-4-7 model entry in models.json
- Cover adaptive thinking/sampling payload shape in anthropic-alignment test
- Assert Opus 4.7 surfaces in ModelRegistry available models
2026-04-24 07:29:48 +02:00
JunghwanNA 0d6968f7a6 Keep sqlite where filters inside the paginated helper
The SQLite read helper is documented as a structured selector path
with explicit pagination, while raw SQL already has a separate
q=SELECT escape hatch. This change rejects SQL control syntax outside
quoted strings so helper filters cannot override LIMIT/OFFSET, while
still allowing semicolons inside quoted literals such as LIKE '%;%'.

Constraint: Preserve the documented q=SELECT raw SQL path unchanged
Rejected: Replace where= with a new filter DSL | too broad for a regression fix
Confidence: high
Scope-risk: narrow
Directive: Keep table?where=... as a structured helper; if broader SQL is needed, route it through q=SELECT instead
Tested: bun --cwd=packages/natives run build; bun --cwd=packages/coding-agent run check; bun --cwd=packages/coding-agent test test/tools/sqlite.test.ts
Not-tested: Manual interactive omp read invocation against a live SQLite file
2026-04-24 07:25:09 +02:00
can1357 f5e69ea37f chore: reformat 2026-04-24 07:18:17 +02:00
Can Bölük daa3f6237d Merge pull request #715 from willzhqiang/fix/hashline-anchor-corruption
fix(coding-agent): handle truncation markers and nested anchors in hashline stripping
2026-04-24 07:11:39 +02:00
Can Bölük 54c29424e3 Merge pull request #635 from itertea/fix/auto-handoff-autocontinue
fix(coding-agent): continue after auto-handoff compaction
2026-04-24 06:54:26 +02:00
Vu Anh Nguyen 12c666f4c0 Fix mermaid markdown test expectations 2026-04-24 06:47:56 +02:00
Vu Anh Nguyen a7845b3b86 Fix mermaid assistant test settings init 2026-04-24 06:47:56 +02:00
Vu Anh Nguyen 81fd90ecc0 Fix Mermaid markdown rendering on non-image terminals 2026-04-24 06:47:56 +02:00
Can Bölük fd10e51b64 Merge pull request #682 from cgrossde/fix/657_pi-protocol-sourcePath
fix: grep tool silently mangles pi:// URLs and produces misleading Path not found error
2026-04-24 06:36:12 +02:00
can1357 6cfca06d8e fix(edit): mark stale-hash rejections as 'Edit rejected' instead of an info-shaped message
The previous mismatch text ('1 line has changed since last read. Use
the updated LINE#ID references shown below.') reads like a successful
edit followed by an informational note. Providers whose tool-result
plumbing does not surface `isError: true` to the model (e.g. Qwen via
the OpenAI-completions shim, where mitmproxy traces show the model only
receives the content text) treat the response as a success and proceed
with stale state.

Reword the message to start with 'Edit rejected:' and explicitly state
'The edit was NOT applied' so the failure is unambiguous in plaintext.
The structural payload (>>> markers, updated LINE#IDs) is unchanged.

Fixes #742
2026-04-24 06:33:20 +02:00
can1357 7f81179b40 feat(config): add commands.enableOpencode{User,Project} settings
Mirror the existing `commands.enableClaudeUser`/`commands.enableClaudeProject`
schema entries so the OpenCode discovery provider exposes the same
user/project toggle surface as Claude. Default remains true to preserve
current behavior.

Fixes #661
2026-04-24 06:33:20 +02:00
can1357 cafa86a6cf fix(tools/sqlite): reject comments, terminators, and pagination keywords in where=
The structured SQLite helper interpolates `where=` directly into SQL.
A crafted clause like `where=1=1 LIMIT 1000000 --` could comment out
the helper's bound `LIMIT ? OFFSET ?`, returning the full table in
violation of the documented pagination contract.

Validate where= at the selector boundary and reject SQL comments,
statement terminators, and pagination/attach/pragma keywords. Raw SQL
remains available via ?q=SELECT... for callers that need it.

Fixes #735
2026-04-24 06:33:20 +02:00
Can Bölük 98df8b72c7 Merge pull request #668 from robinmordasiewicz/fix/lsp-startup-noise
fix(lsp): filter informational log lines from LSP startup warnings
2026-04-24 06:31:53 +02:00
Can Bölük 84f6dc30f1 Merge pull request #740 from kagura-agent/fix/tools-equals-syntax
fix(cli): support --flag=value equals syntax for all CLI flags
2026-04-24 06:11:50 +02:00
can1357 bd07ebed53 fix(coding-agent/vim): force-emit kbd steps so pendingInput streams reliably 2026-04-24 06:10:01 +02:00
can1357 1fb22e1e9a chore: bump version to 14.2.1 2026-04-24 05:55:59 +02:00
can1357 661449df09 test(coding-agent/core): removed stale chunk-tree test suite from core
- Removed stale test suite file `packages/coding-agent/test/core/chunk-tree.test.ts`.
2026-04-24 05:54:10 +02:00
can1357 cb134f6446 refactor(find): consolidate path relativization and drop gitignore fallback
Extracts a single `formatMatchPath` helper used by both the
fast-glob/native code paths and the streaming onMatch callback so
relative paths, trailing-slash handling, and directory markers are
produced consistently. Also drops the retry-without-gitignore fallback
when the gitignored pass returns zero matches, so a broad hidden-file
pattern that is fully ignored stays fully ignored instead of silently
flipping gitignore off on the second attempt.
2026-04-24 05:49:16 +02:00
can1357 c5666e153f feat(grep): route comma-separated explicit files to exact-file grep
resolveMultiSearchPath now reports `exactFilePaths` when every token
resolves to a plain file (no globs, no suffix glob) and accepts a
single resolvable token so partially-missing lists still search the
resolvable subset. grep iterates those exact files individually
instead of collapsing them into a brace-union glob, which preserves
the user's explicit file set even when siblings share a basename.

Also adds a small `[grep] match lines use ':'; context lines use '-'`
banner when context lines are rendered, and splits the per-file
rendering helpers so files with no remaining matches no longer emit
empty headers.
2026-04-24 05:49:10 +02:00
can1357 e51f0b5321 fix(ast-edit): detect stale previews on apply
Apply now recomputes per-file replacement counts from the actual apply
pass and compares them against the preview. If totals or per-file
counts drift (file changed between preview and apply, or apply matched
nothing), the tool returns an isError result explaining that the
preview is stale instead of silently claiming success with mismatched
numbers.
2026-04-24 05:49:02 +02:00
can1357 3c8aced08c feat(resolve): pass through source result details and mark failed applies
The resolve tool now preserves the underlying tool result's details on
ResolveToolDetails.sourceResultDetails instead of dropping them, and
the renderer distinguishes a failed apply ("Failed") from a user
discard ("Discard") so errored applies are no longer mislabelled.
2026-04-24 05:48:57 +02:00
can1357 36b21cfb16 docs(ast-grep): note C++ qualified call semicolon footgun
tree-sitter-cpp parses `ns::doThing($ARG)` without a trailing
semicolon as declaration-like syntax, so ast_grep returns no matches.
Tell agents up-front to include the statement semicolon (or use a
looser `$CALLEE($ARG)` pattern) instead of debugging silently empty
results.
2026-04-24 05:48:52 +02:00
can1357 3add2b8a3a feat(bash): surface timeout-clamp notice in tool output
When a bash tool call requests a timeout outside the allowed 1-3600s
range, the effective clamped value and the originally requested value
are now emitted as a notice appended to the tool output and exposed on
BashToolDetails via requestedTimeoutSeconds. The renderer shows the
clamped+requested pair inline in the timeout badge.
2026-04-24 05:48:46 +02:00
can1357 ab0f50281c fix(coding-agent/dap): handled unhandled waitForEvent rejections in stop outcome setup
- Reworked #prepareStopOutcome to collect stopped, terminated, and exited event waits before racing them.
- Attached noop rejection handlers to each pending wait promise to prevent unhandled rejection noise after the race settles.
- Returned Promise.race(promises) so stop outcome preparation still waits for the first relevant lifecycle event.
2026-04-24 05:18:54 +02:00
can1357 6b976f6eeb fix(coding-agent/lsp): serialized LSP writes and retried references after project load
- Queued outbound JSON-RPC messages behind a per-client promise queue to serialize writes.
- Added a project-load gate for project-aware LSP operations before diagnostics and reference lookups.
- Retried declaration-only references with a short delay until project metadata is available, then proceeded with normal results.
2026-04-24 05:08:11 +02:00
can1357 1a3a3830b3 fix(coding-agent): validated bare-path chunk deletes in chunk mode
- Relaxed chunk-mode parameter validation to accept `{path}`-only edits as valid delete operations.
- Updated the invalid-parameters help text to document accepted chunk delete payloads.
- Added a test that verifies a bare `{path}` edit removes the targeted chunk when null values are stripped.
2026-04-24 04:35:59 +02:00
can1357 50e354c745 style: format Codex web search default model array 2026-04-24 01:20:06 +02:00
can1357 a7d78a459b fix(coding-agent): default Codex web search to gpt-5-codex-mini 2026-04-24 01:18:51 +02:00
can1357 06697b3f28 chore: bump version to 14.2.0 2026-04-24 01:05:06 +02:00
can1357 ffb5ad4880 fix(coding-agent): refresh Gemini web search credentials
Fixes #449
2026-04-24 01:02:36 +02:00
can1357 bf6b5f4989 fix(coding-agent): choose current Codex web search model
Fixes #723

Fixes #724
2026-04-24 01:02:30 +02:00