Commit Graph

1156 Commits

Author SHA1 Message Date
roboomp d4cb024b57 fix(coding-agent): preserve codex web search backend error diagnostics
The Codex SSE `type:"error"` branch read only top-level `code`/`message`,
so backend rejections emitted under a nested `error` or `response.error`
object collapsed to `Codex error (): Unknown error`, hiding the cause
(e.g. a regional/model-snapshot rejection). `response.failed` similarly
dropped the error code.

Add a shared `extractCodexSseError` that reads top-level, nested `error`,
and `response.error` envelopes, and wire both error paths through it so
the backend code and message survive in `SearchProviderError`. The
existing `web_search_call` requirement is untouched.

Fixes #7200
2026-07-31 20:56:54 +00:00
can1357 80627462b4 test(browser): gated real-Chromium attach tests behind launch probe
- Extracted the chromiumCanLaunch probe from browser-tab-evaluate into a
  shared test/tools/chromium-probe.ts helper.
- The two attached-navigation tests from PR #7006 launch real headless
  Chrome; CI runners without Chrome system libraries (libnspr4 & co.)
  cannot exec the downloaded binary, failing the native/unit bucket.
- Gave both tests 30s timeouts to survive CI cold starts.
2026-07-31 21:25:48 +02:00
can1357 a6c6257574 chore: applied formatter and deduplicated observer stubs in task fixtures 2026-07-31 19:51:52 +02:00
can1357 63d6bd3064 Merge PR #7060: fix(browser): own headless Chromium profile dir to survive Windows EBUSY cleanup (@roboomp) 2026-07-31 19:42:43 +02:00
can1357 f46af54f9c fix(browser): preserve screenshot correctness when attached 2026-07-31 19:42:42 +02:00
can1357 ce1ec2103f Merge PR #7006: fix(tools): stop browser automation from stealing focus in an attached browser (@terrxo)
# Conflicts:
#	packages/coding-agent/src/tools/browser/tab-supervisor.ts
2026-07-31 19:42:12 +02:00
can1357 9c1facec10 test(browser): cover attached tab navigation 2026-07-31 19:41:44 +02:00
can1357 e9dda1f867 chore: applied biome formatting to merged pull request sources 2026-07-31 19:32:42 +02:00
can1357 7205ed78c1 Merge PR #7069: fix(coding-agent): prevent stale LSP batch writes (@Ant39140) 2026-07-31 19:27:35 +02:00
can1357 48fce3aa85 fix(web-search): scope DuckDuckGo dates to metadata 2026-07-31 19:16:52 +02:00
can1357 060ae77d21 Merge PR #7122: fix(web-search): extract duckduckgo result timestamps for date bounds (@roboomp)
# Conflicts:
#	packages/coding-agent/src/web/search/providers/duckduckgo.ts
#	packages/coding-agent/test/tools/web-search-duckduckgo.test.ts
2026-07-31 19:16:52 +02:00
can1357 af2e2bf05c Merge PR #7121: fix(search): paginate DuckDuckGo HTML results (@roboomp) 2026-07-31 19:14:47 +02:00
can1357 80a46c2d4c fix(coding-agent): avoid splitting parameter expansions 2026-07-31 19:07:18 +02:00
can1357 969b4a34a5 Merge PR #7176: fix(coding-agent): inspect compound Bash commands in interceptor (@Vincent-Huang-2000) 2026-07-31 19:07:18 +02:00
Vincent Huang 296ece7ea5 fix(coding-agent): handle input fd redirects in interceptor 2026-08-01 00:34:19 +12:00
Vincent Huang 270590c225 fix(coding-agent): avoid splitting Bash redirection operators 2026-07-31 23:51:18 +12:00
Vincent Huang edb0deebb4 fix(coding-agent): inspect compound Bash commands in interceptor rules
Match interceptor regexes against conservative, raw shell command segments
in addition to the complete command, so anchored rules can detect commands
after &&, ||, ;, |, &, and newlines without treating quoted or escaped text
as commands.

Add extractFlatShellCommandSegments() to preserve source text for
user-configured regexes, unlike the token-based approval matcher.
Add skipShellWord() and environment-assignment stripping so rules can match
commands prefixed with NAME=value assignments. Preserve the original command
in interception errors after extracting a leading cd command.
2026-07-31 23:26:43 +12:00
can1357 5ea583e413 feat: replaced legacy editing commands with unified put and cut syntax
- Replaced legacy `SWAP`, `INS`, and `PASTE` commands with unified `PUT` and `CUT` hunks across parser, grammar, tokenizer, and test suites.
- Added support for named registers and span paste operations in clipboard and block execution logic.
- Implemented indentation repair and enhanced gap locator formatting for improved patch resilience.
- Updated documentation, system prompts, and session analysis scripts to reflect the new syntax and header shapes.
2026-07-31 00:19:52 +02:00
roboomp 81e34d90ad fix(web-search): extract duckduckgo result timestamps for date bounds
DuckDuckGo does not parse after:/before: operators, so the provider relies
on the shared lenient post-filter to enforce them. But parseHtmlResults()
discarded the ISO timestamps DuckDuckGo now emits per result row, so every
source was undated and passed the date filter unconditionally.

Extract the timestamp span into publishedDate/ageSeconds so
applyQueryConstraints can honor the requested window.

Fixes #7115
2026-07-30 22:10:04 +00:00
roboomp a07d782058 fix(search): paginated duckduckgo results
Followed DuckDuckGo's returned continuation form until the requested result limit is satisfied, preserving deduplication across pages and the existing search deadline.

Added regression coverage for continuation field submission and 20-result collection.

Fixes #7116
2026-07-30 22:09:44 +00:00
Ant39140 f816286725 fix(coding-agent): preserve BOMs in LSP batch flushes 2026-07-30 17:02:16 +08:00
Ant39140 40e09c9491 fix(coding-agent): flush pending LSP batch on write failure 2026-07-30 16:32:15 +08:00
Ant39140 b9804edc1a Merge remote-tracking branch 'upstream/main' into fix/lsp-batch-stale-replay 2026-07-30 16:05:41 +08:00
Ant39140 d112790fc7 fix(coding-agent): prevent stale LSP batch writes 2026-07-30 15:49:22 +08:00
roboomp d0649f9917 fix(browser): reused shared temp removal retries
Route Chromium profile cleanup through pi-utils removeWithRetries while preserving browser-specific warn-and-leave behavior.

Fixes #7058
2026-07-30 05:22:14 +00:00
roboomp afd6f8eed4 fix(browser): own headless chromium profile dir to survive windows ebusy cleanup
launchHeadlessBrowser let puppeteer-core create and delete a temporary
Chrome profile via an unretried rm() from an eager process-exit hook. On
Windows, when an orphaned browser tree still held the profile lock, that
rm threw EBUSY and rejected the eager promise with no handler attached,
crashing OMP with an unhandled rejection during cleanup.

OMP now passes an explicit --user-data-dir, which makes puppeteer treat
the profile as non-temporary (ChromeLauncher.cleanUserDataDir becomes a
no-op), and removes the directory itself on dispose with lock-tolerant
retry, warning and leaving it in place if it stays busy rather than
crashing.

Fixes #7058
2026-07-30 05:09:26 +00:00
can1357 ccd3bb9565 chore: reformat 2026-07-30 04:25:32 +02:00
can1357 091f670ea0 style: apply biome formatting to merged changes 2026-07-30 01:28:07 +02:00
can1357 da794ebb24 Merge PR #6938: feat(coding-agent): allow checkpoint/rewind/learn/manage_skill in subagents when explicitly requested (@szavadsky) 2026-07-30 01:26:49 +02:00
can1357 f2251b7d59 chore: normalize changelogs and formatting after merging open fixes 2026-07-29 23:09:40 +02:00
can1357 6527671c3a fix(lsp): sanitize expanded generic output
(cherry picked from commit 1260d0633a5fb533c492f272ee500fec60c46e22)
2026-07-29 23:09:14 +02:00
can1357 2adf484ef1 Merge PR #7042: fix(lsp): handle quick exits before reader teardown (@roboomp) 2026-07-29 23:09:13 +02:00
roboomp dca8f44b73 fix(lsp): handled quick exits before reader teardown
Waited briefly for process exit publication after clean stdout EOF so the process handler preserves the real exit code and stderr, while genuine reader errors still tear down immediately.

Cleared only the matching initialization failure for explicit reloads and added regressions for quick exits, reader errors, ordinary backoff, and immediate reload retries.

Fixes #7041

(cherry picked from commit a76522b759f14421202d4cc437ec611b78be20d1)
2026-07-29 23:09:13 +02:00
can1357 eb8f3e6c2c Merge PR #6993: fix(coding-agent): require web_search_call in codex search (@roboomp) 2026-07-29 23:08:55 +02:00
roboomp e5ea31b22c fix(coding-agent): require web_search_call in codex search
GPT-5.6 Responses-Lite models receive tool_choice "auto" (the forced
hosted choice is invalid under the lite shape, #5771/#5772), so the model
may answer without invoking the hosted web_search tool. The codex search
parser accepted any non-empty answer, returning a stale completion with
zero sources as a successful search.

callCodexSearch now tracks response.web_search_call.* events (and
web_search_call output items) and throws CodexNoWebSearchError when none
occurred. The candidate chain treats that error as retryable, advancing
default lite models to a non-lite model that forces web_search, and
surfaces a clear failure when the model was explicitly configured.

Fixes #6988

(cherry picked from commit a276cd0b3df1d0d041faf0a63fabcbb884e36a91)
2026-07-29 23:08:54 +02:00
can1357 7338be4d67 Merge PR #6845: fix(launch): isolate legacy xterm replay (@usr-bin-roygbiv) 2026-07-29 23:08:22 +02:00
usr-bin-roygbiv 197fd2df02 test: restore complete Worker descriptors
(cherry picked from commit a7d227e6227b2c1d20ae4a9d5107be57980463a1)
2026-07-29 23:08:22 +02:00
can1357 2c99f2f2e8 fix(git): preserve effective character locale
(cherry picked from commit ef7abf60ad1b80642ba1731e043f8eeb82c6a6aa)
2026-07-29 23:08:21 +02:00
usr-bin-roygbiv 8b81b1c0a0 fix(launch): preserve logs on replay failure
(cherry picked from commit 2bebc32a05553e75edef16f71218fa2bfbfc1f77)
2026-07-29 23:08:21 +02:00
Rolando Diaz e8bfd67d28 test(gh): bypass cached binary lookup
(cherry picked from commit 85d0ddca05640e95e7d750218c6533d6f936957d)
2026-07-29 23:08:20 +02:00
Rolando Diaz b1c3ba8b8e fix(git): preserve UTF-8 locale for gh subprocesses
(cherry picked from commit e703aa00892b4589baa6c9dcb5f3ab2a3afb1662)
2026-07-29 23:08:20 +02:00
Rolando Diaz 62cffde87a fix(git): treat empty LC_CTYPE as unset
(cherry picked from commit 02364899ad23031d0ffe47be574ed547e249efa5)
2026-07-29 23:08:20 +02:00
Rolando Diaz 6ddea85d07 fix(git): preserve inherited UTF-8 character locale
(cherry picked from commit 4d51427cf144dd6415ee3b61158b5650011a796e)
2026-07-29 23:08:19 +02:00
Rolando Diaz a38160e245 fix(git): preserve UTF-8 locale for child processes
(cherry picked from commit f7c46ea55fb016daf6c34ecadf87443dadc61047)
2026-07-29 23:08:19 +02:00
Nik Divjak b8b0d342da fix(tools): stop browser automation from stealing focus in an attached browser
Attaching over app.cdp_url points automation at a browser the user is driving,
so two behaviors that are correct for a browser we own are wrong there.

pickElectronTarget enumerated CDP targets and took the first usable one, which
is not necessarily the tab in front of the user, and #captureScreenshot always
called page.bringToFront(), which switches the user's visible tab and pulls
window focus on every screenshot.

Connected browsers now prefer a tab that reports document.visibilityState
"visible" and skip the pre-capture activation, accepting the compositor stall
risk that activation avoids. Headless and spawned browsers are unchanged.
2026-07-29 11:26:13 +02:00
Slava Zavadsky fdd46bd971 fix(coding-agent): pair checkpoint/rewind for restricted sessions too
The !restrictToolNames guard on the pairing blocks was wrong: a restricted
session with tools:[checkpoint] passes isToolAllowed (requestedTools is
defined) but the pairing is skipped, stranding the agent without rewind.
Remove the guard — this is a safety pairing, not a convenience widening.
Added restricted-session tests in both createTools and SDK active-set paths.
2026-07-28 21:18:43 -04:00
Slava Zavadsky abef08116e fix(coding-agent): auto-pair checkpoint/rewind and add changelog
Address review feedback on PR #6938:
- One-sided tools: list checkpoint without rewind (or vice versa) now
  auto-includes the sister tool, preventing a stuck subagent
- Add changelog entry under [Unreleased]
2026-07-28 18:12:01 -04:00
Slava Zavadsky afa76546a6 feat(coding-agent): allow checkpoint/rewind/learn/manage_skill in subagents when explicitly requested
Closes #3762

When an agent definition's frontmatter  list explicitly includes
checkpoint, rewind, learn, or manage_skill, allow them in subagents.
Previously all four were hard-gated to top-level sessions.

- Relax taskDepth gates in isToolAllowed using the already-captured
  requestedTools variable (no signature change needed)
- Remove isTopLevelSession function and its 4 guard sites from checkpoint.ts
- Update checkpoint prompt with enablement docs
- Add tests for subagent explicit-request, no-request, disabled-setting,
  and top-level paths
2026-07-28 17:57:02 -04:00
can1357 e7009452b4 feat(coding-agent/tools): simplified browser screenshot persistence and return paths
- Remove the per-call `save` option from `tab.screenshot()` to simplify usage.
- Update `tab.screenshot()` to return the saved file path as a promise string.
- Configure screenshot persistence to use daemon path or custom `browser.screenshotDir`.
- Add comprehensive tests verifying temp path return and custom directory saving.
2026-07-28 06:40:31 +02:00
can1357 21b3764b08 refactor(coding-agent): replaced xdevregistry with state interface and helpers
- Replaced the `XdevRegistry` class with the `XdevState` interface and pure helper functions across core and session tools.
- Updated session configurations, tool execution, and renderers to utilize canonical tool map initialization and sharing.
- Adapted unit tests and mocks to use `XdevState` and associated helper functions for permission and dispatch verification.
2026-07-28 03:34:36 +02:00