Commit Graph

889 Commits

Author SHA1 Message Date
Mathews-Tom 5615f1ca8a test(task): use batch parameters in async fallback test 2026-07-11 21:49:50 +05:30
can1357 6f65a58d1b merge PR #4375: feat(ask): add rich interactive dialog
Closes #4375
2026-07-11 14:15:55 +02:00
can1357 9f93099e92 Merge remote-tracking branch 'origin/farm/41fa4cf3/fix-extension-header-data' 2026-07-11 13:45:13 +02:00
can1357 cb2153e9a5 feat(coding-agent-task): implemented agent-centric flat task structure
- Renamed task wire fields, replacing `assignment` and `description` with `task` and `name` while removing `role` references.
- Implemented automated task UI label generation using a tiny model to replace manual role descriptions.
- Updated task execution and rendering logic to support per-item agent resolution and dynamic badge display.
- Migrated schemas, prompts, and test suites to enforce the new flat task structure and agent-centric policy.
2026-07-11 13:44:04 +02:00
roboomp d7a71642c8 fix(coding-agent): guarded browser header generation
Lazy-initialized the header-generator dependency so compiled runtimes without its fs-loaded data_files fall back to the bundled Chrome header profile instead of failing extension imports.

Added a regression test that hides header-generator data_files in a fresh Bun subprocess and verifies fallback headers are returned.

Fixes #5178
2026-07-11 11:41:45 +00:00
can1357 61d3837a0c Merge remote-tracking branch 'origin/farm/43a6bd04/codex-image-opaque-key' 2026-07-11 12:29:11 +02:00
roboomp 748b2dff17 fix(tools): allowed opaque codex image keys
- Made GenerateImage omit chatgpt-account-id when Codex bearer tokens do not expose an account id.
- Added Codex hosted image coverage for opaque proxy keys and JWT-derived account headers.

Fixes #5174
2026-07-11 10:17:46 +00:00
can1357 337feb297d test: improved test null safety and type assertions
- Added explicit existence checks for objects prior to property access across various test suites.
- Replaced optional chaining with non-null assertions to satisfy TypeScript strictness requirements in test assertions.
2026-07-11 11:31:08 +02:00
lycaon 3f52e26a73 fix(ai): preserve CCA schemas with annotation conflicts 2026-07-11 00:10:47 -06:00
can1357 d469064d1a fix: handle stale tests 2026-07-11 07:54:19 +02:00
can1357 842df4ef38 Merge remote-tracking branch 'origin/farm/bd20559c/fix-skill-uri-directory-path' 2026-07-11 07:37:40 +02:00
can1357 ea632a518b feat(coding-agent): expanded search capabilities and scraping reliability
- Added six new search providers (Bing, Yahoo, Ecosia, Startpage, Mojeek, and Public) to expand coverage and parallel search capabilities.
- Implemented a unified `browserFetch` utility with headless-browser fallback and randomized Chrome profiles to improve scrape reliability.
- Integrated automated bot-defense mechanisms including CAPTCHA detection, ALTCHA proof-of-work, and homepage-token flows.
- Fixed hanging search CLI commands by ensuring proper closure of AuthStorage connections.
2026-07-11 07:33:22 +02:00
can1357 46fd8c5575 feat(coding-agent): improved vibe mode tool lifecycle management
- Transitioned vibe tools to an ephemeral registration model where they are installed only when entering `/vibe` mode and removed upon exit.
- Added `activateVibeTools` and `deactivateVibeTools` methods to `AgentSession` to manage these transient tool registrations.
- Removed vibe tools from the default global tool registry, preventing unnecessary background exposure.
2026-07-11 07:33:20 +02:00
can1357 b0d98d9e2b fix(coding-agent): decoupled lsp diagnostics from tool execution
- Offloaded slow LSP diagnostics to a deferred channel in the `write` tool to prevent blocking agent execution for the full 3-second poll window.
- Abstracted deferred diagnostic logic into a reusable `DeferredDiagnostics` class to standardize tracking and deduplication across tools.
- Updated `WriteTool` to support `beginDeferredDiagnosticsForPath` callbacks, surfacing diagnostics as an aside instead of stalling the tool result.
- Added a regression test validating that `write` completes immediately while diagnostics arrive asynchronously.
2026-07-11 07:33:19 +02:00
can1357 4c167eaa6d feat(coding-agent): integrated google search with shared browser utilities
- Implemented a new Google search provider using headless browser scraping and HTML parsing.
- Integrated automated bot-challenge detection and error reporting for search operations.
- Consolidated navigation headers into a shared utility and updated existing DuckDuckGo provider to use it.
- Added comprehensive test suites for Google search parsing, deduplication, and browser operation diagnostics.
2026-07-11 07:33:19 +02:00
can1357 295655255a test(coding-agent): validated behavioral consistency across core toolset
- Added regression tests for browser eval envelope to verify accurate error surfacing and type handling.
- Validated glob tool output to distinguish between incomplete timed-out scans and empty results.
- Verified exact raw range extraction in read tool to ensure no unwanted context padding is returned.
- Confirmed that numbered range reads maintain necessary context padding for readability.
2026-07-11 05:47:55 +02:00
can1357 2f97b7fe4b feat(coding-agent): removed plan subagent
- Removed the `plan` agent definition and associated prompt file from bundled agents.
- Updated documentation to reflect the removal of `plan` from available subagents.
- Cleaned up related tests to remove references to the deprecated agent.
2026-07-11 05:47:54 +02:00
roboomp cf4e510acd fix(tool): resolved bare skill urls to directories
Bare skill:// URLs now resolve to the skill directory for path-only tool operations while read still returns SKILL.md instructions.

Fixes #5087
2026-07-10 15:14:06 +00:00
can1357 6dbbfbe1e0 feat(coding-agent): renamed explore agent to scout
- Renamed the `explore` agent to `scout` throughout prompt templates, agent definitions, and configuration schemas.
- Updated documentation and internal tool references to reflect the new agent identity.
2026-07-10 12:51:50 +02:00
roboomp 993b21204e fix(lsp): handled go.work workspace diagnostics
Detected go.work before go.mod for workspace diagnostics and expanded go build package patterns from go.work use entries.

Added regression coverage for go.work-only roots and mixed go.work/go.mod workspaces.

Fixes #5038
2026-07-10 07:14:49 +00:00
can1357 ba91877b6e fix(tui): restored read selector previews for explicit selector args
The v16.3.12 explicit `selector` field (ff3b0c795c) was consumed by the
read tool but never threaded into the TUI renderers: ReadRenderArgs in
both readToolRenderer (read.ts) and ReadToolGroupComponent only derived
selectors from path-embedded `:sel` suffixes, so split-arg calls like
{ path, selector: "2-3" } rendered bare paths without line ranges or
raw modifiers.

Joined the explicit selector (trimmed, leading colons stripped, non-string
guarded) back onto the display path in renderCall, renderResult error and
success branches, and the grouped read summary, keeping hyperlinks on the
base path only.

Adopted from PR #4904 (both commits squashed), minus its unrelated
workflow-notice.md prompt churn.

Fixes #4899
2026-07-09 18:27:21 +02:00
can1357 0297202989 fix(tool): bounded ranged grep native fetch budgets
- Replaced the unbounded native fetch (no total cap; no per-file cap for
  open-ended ranges) adopted from PR #4903 with finite budgets: per-file
  fetch covers bounded ranges up to endLine and open-ended ranges up to
  startLine-1 plus the kept window, clamped to the native file-size
  ceiling; the global ceiling scales by the same amplification.
- Threaded the scaled ceiling through mergeGrepResults so mixed
  native+virtual ranged searches are not re-truncated pre-filter.
- Dropped the unrelated workflow-notice.md ellipsis churn from the PR.
- Added open-ended directory selector coverage.

Fixes #4898
2026-07-09 18:27:21 +02:00
roboomp 81a7749836 fix(tool): fetched ranged grep matches before filtering
- Raised or removed native grep pre-filter caps when line selectors are present so later selected lines are available to the post-filter.

- Added coverage for directory selectors beyond the normal multi-file per-file cap.
2026-07-09 18:27:21 +02:00
roboomp f9b425f4b7 fix(tool): allowed grep directory line selectors
- Applied explicit grep selectors as per-file line filters for directory and glob searches instead of pre-validating them as single files.

- Clarified the grep selector prompt/schema language and added regression coverage for directory searches.

Fixes #4898
2026-07-09 18:27:20 +02:00
can1357 2e189b6f9e test: aligned full suite with merged sweep contracts
- container stubs gained disposeChildren for the stale-renderer teardown paths
- login-stored API key assertions include the new source provenance field
- bash timeout test covers the zero-disable contract alongside the clamp
- skill keyword steering activates a task tool for the gated workflow notice
2026-07-08 16:52:28 +02:00
can1357 3f7581505c merge PR #4804: fix(coding-agent): launch browser on Microsoft Edge installs 2026-07-08 15:19:41 +02:00
can1357 be89a136aa merge PR #4616: fix(coding-agent/edit): sealed inverse video and preserved gutters in wrapped diff rows 2026-07-08 15:19:40 +02:00
can1357 d15e28336f merge PR #4622: fix(tools): prefer literal filesystem match over trailing :selector peel 2026-07-08 15:19:39 +02:00
can1357 613f6435f5 merge PR #4738: fix(coding-agent): preserve literal bash internal URLs 2026-07-08 15:19:37 +02:00
can1357 83896d274a merge PR #4644: fix(prompting): hide eval guidance when disabled 2026-07-08 15:19:36 +02:00
qfrtt e787a90a7d Fix Edge browser launch 2026-07-07 15:09:58 -04:00
roboomp 1adc202bf5 fix(coding-agent): preserved literal bash internal URLs
Left unresolved internal URLs unchanged during bash command expansion so quoted literal mentions can execute verbatim.

Skipped expansion for URL tokens embedded inside larger quoted shell text while preserving resolvable path-argument expansion.

Fixes #4737
2026-07-06 18:00:14 +00:00
can1357 0006252d6e test(utils): validated tool error handling and cleanup signal propagation
- Added comprehensive test suite for `postmortem` utility error handling, covering cleanup symbol marking, cause chain depth validation, and process exception suppression.
- Added tests for `browser-run-cancellation` ensuring proper `unhandledRejection` suppression and correct `ToolAbortError` propagation during teardown.
- Implemented `collectUnhandledRejections` helper to verify silence of process-level rejections during async race conditions in browser runs.
- Added integration-style probe tests for `postmortem` to verify that marked cleanup errors allow process survival while unmarked ones remain fatal.
2026-07-06 08:07:25 +02:00
can1357 dd5c329bc3 fix(coding-agent): resolved browser teardown crashes by tracking expected abort errors
- Added `markHandled` helper to prevent unhandled promise rejections in fire-and-forget browser tasks.
- Integrated `postmortem.markExpectedCleanupError` to distinguish between expected teardown aborts and actual runtime failures.
- Updated `runCmuxCode` and `WorkerCore` to propagate abort reasons via `ToolAbortError` cause chains.
- Modified `tab-protocol` and supervisor logic to signal expected cleanup states during tab release.
- Added test coverage for `ToolAbortError` wrapping and cause preservation.
2026-07-06 08:07:24 +02:00
roboomp 06f6762103 fix(agent): surfaced pending irc replies to wait
Drained pending IRC asides before parking irc wait so replies that arrive between wait calls are returned instead of being treated only as queued interrupts.

Added regression coverage for the already-aborted queued-IRC signal path and documented the fix in the coding-agent changelog.

Fixes #4657
2026-07-06 02:36:35 +00:00
Christian Stewart 1936d4f250 fix(prompting): refresh bash guidance on tool changes
Signed-off-by: Christian Stewart <christian@aperture.us>
2026-07-05 18:15:22 -07:00
Christian Stewart 96850a1642 fix(prompting): keep eval-disabled tool state coherent
Signed-off-by: Christian Stewart <christian@aperture.us>
2026-07-05 18:04:24 -07:00
roboomp a2e055fa9c fix(tools): closed two open literal-wins gaps flagged by codex
Two Codex bot findings from earlier PR reviews were still open.

1. local:// URL selector shadow (read.ts): the local:// branch resolved
   `local://foo:1-2` and rewrote readPath to `${localFile.path}:${sel}`,
   then let splitPathAndSelPreferringLiteral run on the synthesized
   string. A sibling literal `${localFile.path}:${sel}` file would win
   over the intended URL selector semantics. The branch now promotes the
   URL selector into the explicit-selector state and sets
   readPath = localFile.path, so downstream literal-preferring routing
   never re-splits the concatenation.

2. Delimited expansion before literal probe (path-utils.ts): grep called
   expandDelimitedPathEntries before parsePathSpecs, and
   splitDelimitedPathEntry only checked whether the peeled base of the
   entry resolved. A real POSIX file whose name contained a delimiter
   plus a selector-shaped tail (a;b:1-2) got split into ["a", "b:1-2"]
   and never reached the literal-preferring probe. splitDelimitedPathEntry
   now short-circuits on probeLiteralPathExists — "missing" is the only
   outcome that lets delimiter expansion run.

Added regressions: `read local://notes.md:1-2` still slices the base file
when a sibling `notes.md:1-2` literal exists, and grep searches a real
`a;b:1-2` file without semicolon-splitting.
2026-07-05 19:24:21 +00:00
roboomp 6c8e7625a2 fix(tools): tightened literal-path probe against stat ambiguity
resolveExistingReadPath treated any stat failure other than ENOENT/ENOTDIR as
"exists" and any other resolved path was considered a hit. That silently
reinterpreted a real literal path such as test:1-2 as test plus selector 1-2
whenever the raw path was a dangling symlink, sat under an unreadable parent,
or hit a transient I/O error.

The new probeLiteralPathExists returns "exists" / "missing" / "unknown" from
an lstat probe. splitPathAndSelPreferringLiteral now falls back to the strict
selector split only on "missing"; both "exists" and "unknown" keep the raw
path, so an unreachable literal is never reinterpreted. Grep and read use
the same probe: the explicit selector branch keeps the literal path when
existence is uncertain, and only a definitive ENOENT/ENOTDIR lets structured
archive/sqlite/pdf dispatch take over.

Added regressions covering probeLiteralPathExists exists/missing/dangling-
symlink cases and splitPathAndSelPreferringLiteral over a dangling symlink.
2026-07-05 18:17:59 +00:00
roboomp ff3b0c795c fix(tools): added explicit selector fields for read and grep
The literal-path stat fallback made selector-shaped filenames accessible, but it did not give callers a deterministic way to read or grep a range from a literal filename such as test:1-2. Encoding that as test:1-2:1-2 remained recursively ambiguous if a longer literal file later appeared.

Read now accepts an optional selector field that is parsed independently from path. When selector is present, path is treated as the exact path first, so { path: "test:1-2", selector: "1-2" } always means lines 1-2 from the literal file test:1-2. Inline :<sel> remains supported for compatibility.

Grep now accepts an optional line-range selector field with the same literal-path behavior. Explicit selectors bypass path suffix peeling, while archive/internal/URL routing still handles non-literal structured paths.

Updated read/grep tool prompts and added deterministic regressions proving that a longer literal file like test:1-2:5-6 or test:1-2:2-2 does not change the meaning of { path: "test:1-2", selector: ... }.
2026-07-05 18:09:29 +00:00
roboomp c493d12f95 fix(tools): preserved escaped literal selector-shaped paths
splitPathAndSelPreferringLiteral only statted resolveToCwd(rawPath), so shell-escaped paths such as dir/a\ b:1-2 missed the existing dir/a b:1-2 file and fell back to the strict selector peel. That let read target dir/a\ b with a range instead of the literal filename.

The helper now probes resolveReadPath(rawPath, cwd), reusing the read path resolver's existing escaped-space and filesystem variant normalization before deciding whether the literal file exists.

Grep also stores the resolved filesystem path for literal matches so the later search-scope parser does not reinterpret backslashes as path separators. Regression coverage now includes helper, read, and grep cases for dir/a\ b:1-2.
2026-07-05 17:47:06 +00:00
roboomp c40b0ff5da fix(tools): skipped grep archive materialization for literal filesystem matches
parsePathSpecs preserved an existing literal path like data.zip:1-2, but resolveArchiveSearchPaths only received the cleaned path strings and reparsed the same literal as archive data.zip plus member 1-2. If data.zip existed, grep materialized or errored on the archive member before searching the literal file.

GrepPathSpec now carries whether a local entry was kept because the raw filesystem path exists. Archive materialization consumes the specs instead of bare strings and skips those literal matches, while ordinary archive selectors still materialize as before.

Regression coverage adds grep over data.zip:1-2 with a real data.zip alongside, proving the literal file is searched instead of the archive member.
2026-07-05 17:38:20 +00:00
roboomp 48a6e46750 fix(tools): hoisted literal-preferring split ahead of archive/sqlite/pdf dispatch in read
The prior hunk placed the literal-preferring split after resolveArchiveReadPath,
resolveSqliteReadPath, and splitPdfImageMemberReadPath, so a real POSIX file
such as data.zip:1-2 or notes.db:1-2 still got hijacked: the archive/sqlite
resolvers matched the base extension, opened data.zip / notes.db, and errored
on the phantom :1-2 member before the literal file was ever considered.

Now the async splitter runs first. When the strict grammar would have peeled
a suffix but the literal path stats successfully, all three structured
dispatchers decline. Otherwise the ordering is unchanged, so archive/sqlite/
pdf-image reads keep working when the literal file does not exist.

Regression coverage adds `data.zip:1-2` and `notes.db:1-2` cases where the
base archive/sqlite file also exists on disk, exercising the exact ordering
bug the reviewer flagged.
2026-07-05 17:33:21 +00:00
roboomp c8df93ca31 fix(tools): preferred literal filesystem match over trailing :selector peel for read and grep
splitPathAndSel unconditionally peels a trailing :<sel> chunk whenever it
matches the read-tool selector grammar (raw, conflicts, N-M, N+K, ...). On
POSIX, filenames may legitimately contain colons, so a real file named
test:1-2 or log:raw was shredded to test/log before either read.ts or
grep.parsePathSpecs stated anything and both surfaced "Path not found".

Added splitPathAndSelPreferringLiteral(rawPath, cwd) alongside the strict
splitter: it only overrides the peel when fs.stat succeeds against the raw
path. Read (execute) and grep (parsePathSpecs) call the async variant for
non-URL paths; internal-URL splitting stays unchanged. Regression covers
splitter fallbacks, read/grep behavior on literal-colon files, and that
:1-2 selectors still work when the base file is the only real match.

Fixes #4618
2026-07-05 17:23:12 +00:00
chan1103 44daed1fff fix(coding-agent/edit): sealed inverse video and preserved gutters in wrapped diff rows
Two wrap artifacts in the Edit result card, both in wrapEditRendererLine:

- A row that broke inside an intra-line diff highlight ended with inverse
  video still active (only the foreground was reset), so the frame's
  right-edge padding painted as a default-foreground block. Every wrapped
  diff row now closes inverse alongside the foreground reset; the next row
  re-opens its own state, so highlights spanning the break render the same.

- The gutter matcher required a marker at column 0 immediately followed by
  digits, a shape only produced when marker and number exactly fill the
  gutter. Left-padded gutters (" -42│", any line number narrower than the
  widest in the diff) and dedup-blanked gutters ("   +│" on the added row
  of a single-line replacement) fell back to generic wrapping, so their
  continuation rows escaped into the line-number column. │-separated gutters
  now accept padded and blank line numbers; ASCII "|" gutters still require
  the canonical marker+number shape emitted by the plain fallback, so body
  lines that merely start with "|", "   |", or "123|" keep wrapping
  generically.

Regression tests cover continuation-gutter containment, net-inverse-off at
every row end (with a precondition proving a highlight actually crossed a
break), phantom-gutter rejection for pipe- and digit-leading body lines, and
the plain-fallback canonical-row path.
2026-07-06 00:34:23 +09:00
can1357 3458b037ae chore: update tests 2026-07-05 16:53:07 +02:00
can1357 76e21e9364 test(eval): cover JS worker exits 2026-07-05 13:39:09 +02:00
can1357 caef81cf0b Merge PR #4409: docs(tool): document bash timeout clamp (@roboomp) 2026-07-05 13:10:27 +02:00
can1357 535e8256b0 fix(lsp): avoid watched-file side effects 2026-07-05 13:10:26 +02:00
can1357 9a319b8a89 Merge PR #4462: fix(lsp): notify servers about harness file writes (@roboomp) 2026-07-05 13:10:26 +02:00