Commit Graph

934 Commits

Author SHA1 Message Date
can1357 5ff277349c refactor(coding-agent): consolidated tool surface onto xd:// devices and hub
- Added the `xd://` virtual device protocol (`internal-urls/xd-protocol.ts`, `tools/xdev.ts`): tools declaring `loadMode: "discoverable"` are unmounted from the request tools array and driven via `read xd://` (list/docs+schema) and `write xd://<tool>` (execute), gated by the `tools.xdev` setting (default on) and inlined into the system prompt.
- Merged the `irc`, `job`, and `launch` tools into a single `hub` tool (`tools/hub/`, `async/job-manager.ts`): messaging keeps `send`/`inbox`/`list`, job control maps to `wait`/`cancel`/`jobs`, process supervision keeps `start`/`logs`/`stop`/`restart`/`describe` with `ps`, and the unified `wait` races background jobs against peer messages; SDK `IrcTool`/`JobTool`/`LaunchTool` are replaced by `HubTool`.
- Removed the hidden `resolve` tool in favor of the `xd://resolve`/`xd://reject`/`xd://propose` resolution devices, auto-including `write` whenever a deferrable tool or plan mode is present.
- Removed the BM25 tool-discovery system: the `search_tool_bm25` tool, the `tool-discovery` module, the `tools.discoveryMode`/`mcp.discoveryMode`/`mcp.discoveryDefaultServers`/`tools.essentialOverride` settings, per-tool MCP selection, and the `mcp_tool_selection` message type.
- Unified tool presentation on `ToolLoadMode` (`essential`|`discoverable`), replacing the custom-tool `xdev?: boolean` opt-out; custom, extension, MCP, RPC host, image-generation, and TTS tools now default to `discoverable`, and added a `satisfies` predicate to `SoftToolRequirement`.
- Removed the standalone `ssh` command tool and `ssh/ssh-executor` (the `ssh://` read/write/search protocol stays), and made `--tools` address hidden built-ins.
- Updated collab-web to render `xd://` dispatches and `hub` op families, dropped the `search_tool_bm25`/`ssh`/`report-finding` renderers, refreshed tool docs and prompts, and migrated the affected tests and changelogs.
2026-07-15 15:16:29 +02:00
can1357 af1832af1b feat(coding-agent/prompts): refined tool prompts for shell, browser, and eval workflows
- Simplified `bash` guidance to tighten allowed command patterns, pipeline limits, and launch-based process handling.
- Reworked `browser` instructions into grouped helper sections while preserving selector restrictions and key action semantics.
- Harmonized `eval`, `irc`, `read`, and `todo` prompt wording around state reuse, messaging, selector formats, and task operations.
2026-07-15 03:28:21 +02:00
can1357 425e583ae0 feat(coding-agent): added support for task-agent field and model resolution
- Added schema and type updates for task-agent fields and model resolver settings.
- Extended discovery helper logic to carry resolved task-agent metadata through execution setup.
- Updated task/agent registration and execution paths to use the new capability/field data.
- Expanded test coverage for agent-field parsing, model resolution, and executor prewalk behavior.
2026-07-15 00:50:55 +02:00
roboomp ea320d745b fix(bash): resolved nested internal URLs
- Tracked quote context independently inside command substitutions.
- Covered unquoted skill URLs nested under outer double quotes.

Fixes #5535
2026-07-14 22:21:53 +00:00
can1357 a9c038818d feat(tools): removed separate selector args from read and grep APIs
- Removed `selector`/`sel` arguments from read and grep tool schemas and related execution arg handling.
- Reworked read and grep path processing to parse line selectors from `path` suffixes instead of separate fields, including inline range propagation.
- Updated delegation and execution call paths (including JS/Python preludes and executor tests) to pass selectors embedded in `path`.
- Updated read/grep prompt docs and changelog for the breaking inline-selector API, and removed obsolete selector-specific tests and expectations.
2026-07-15 00:04:02 +02:00
can1357 ad396fb8fe Merge PR #5529: fix(tools): strip stray leading colon from tool paths (@roboomp) 2026-07-14 23:11:12 +02:00
can1357 5447312c5f Merge PR #5498: fix(tools): accept empty GitHub search date placeholders (@roboomp) 2026-07-14 23:11:12 +02:00
can1357 6b381eb765 Merge PR #5451: fix(eval): honor timeout zero and classify session deadlines (@roboomp) 2026-07-14 22:58:49 +02:00
can1357 6f8a3ab94a Merge PR #5458: fix(browser): bound headless browser close to unblock tab cleanup (@roboomp) 2026-07-14 22:58:47 +02:00
roboomp e0e24efaf6 fix(tools): strip stray leading colon from tool paths
Some models intermittently prefix an otherwise-valid path with a leading
`:` (e.g. `:/abs/path`, `:../rel`). read/edit/grep hard-failed because
resolveToCwd left the colon intact and resolution missed the real file.
The #4618 literal-preferring probe cannot recover it: the literal
`:/abs/path` does not exist on disk, so the peel proceeds to an empty
path.

Strip the mangled prefix in expandPath — the shared resolution funnel for
read (resolveReadPath), grep (resolveToolSearchScope), and edit
(resolvePlanPath) — mirroring the existing @-prefix normalization. The
lookahead only fires before `/`, `~/`, `./`, or `../`, so selector-shaped
tokens like `:raw` are untouched.

Fixes #5508
2026-07-14 20:41:45 +00:00
roboomp de72e15fa8 fix(tools): accepted empty GitHub search date placeholders
Normalized optional since and until values before enforcing code-search date restrictions.

Covered empty placeholders, real date bounds, and successful validated searches.

Fixes #5370
2026-07-14 19:19:09 +00:00
roboomp 33e87d5930 fix(browser): bound headless browser close to unblock tab cleanup
disposeBrowserHandle awaited Puppeteer's browser.close() for the headless
kind with no timeout. browser.close() resolves only once Chromium fully
exits, so a wedged process (a Windows failure mode) left releaseTab stuck
in the "Closing tab" phase forever.

Cap the close at 5s and force-kill the Chromium process tree on timeout so
the tool call always releases.

Fixes #5260
2026-07-14 17:48:18 +00:00
roboomp 8e6d26b1e8 fix(eval): honored unlimited cell timeouts
- Disabled the eval watchdog when timeout is explicitly zero.
- Classified session deadline aborts as TimeoutError while preserving their message.
- Documented and tested both timeout contracts.

Fixes #5250
2026-07-14 17:33:56 +00:00
can1357 bda0d5ddcd test(lsp): require initial configuration before hover 2026-07-14 19:16:09 +02:00
can1357 1e81cde985 Merge PR #5277: fix(lsp): send initial workspace configuration (@roboomp) 2026-07-14 19:16:08 +02:00
can1357 5e74444c27 fix(test): repair auth-storage-rotation merge resolution and normalize changelogs 2026-07-14 18:50:47 +02:00
can1357 5105b2cd4e fix(browser): prevent stealth logger crashes 2026-07-14 18:47:55 +02:00
can1357 946ba4bcea Merge PR #5044: fix(cli): parse max-time duration suffixes (@roboomp)
# Conflicts:
#	packages/coding-agent/src/cli/flag-tables.ts
2026-07-14 18:46:14 +02:00
can1357 28b001970b Merge PR #5099: fix(agent): abort repeated empty yield results (@roboomp) 2026-07-14 18:45:03 +02:00
can1357 a9998ae07b Merge PR #5086: fix(agent): isolate memory root resolution (@roboomp)
# Conflicts:
#	packages/coding-agent/src/internal-urls/memory-protocol.ts
2026-07-14 18:41:54 +02:00
can1357 79d7b74e24 Merge PR #5327: fix(coding-agent): isolate eval runtimes from terminal (@masonc15) 2026-07-14 18:41:16 +02:00
Vu Anh Nguyen 570f8af57c fix(coding-agent): support GPT-5.6 Codex web search 2026-07-14 17:51:33 +07:00
can1357 3047c27c33 fix(test): skip real-browser tab.evaluate test when chromium cannot exec
- Exported ensureChromiumExecutable so the test can probe launchability.
- CI runner holds the downloaded Chrome but lacks libnspr4 & co., so the
  binary fails at dynamic-link time; probe --version and skipIf instead
  of failing the release run.
2026-07-14 02:12:21 +02:00
can1357 df7193731f fix(test): raised timeout for real-browser tab.evaluate test
- CI runner cold Chromium launch exceeded bun's 5s default test timeout,
  failing the v16.5.0 release run; only test in suite launching a real browser.
2026-07-14 01:53:11 +02:00
can1357 f9f6ed9e8d feat(coding-agent): replaced legacy pi/ role alias prefix with
- Replaced legacy `pi/` role alias prefix with canonical `@` syntax across model resolution, documentation, and tests.
- Added support for bare `*` default alias and multiple alias prefix detection with custom role resolution in `resolveConfiguredRolePattern()`.
- Enhanced thinking suffix parsing to accept unambiguous abbreviations (minimum 2 characters) for effort and level selectors.
- Extended `resolveCliModel()` and `filterAvailableModelsByEnabledPatterns()` to accept settings parameter for role alias resolution from `--model` flag.
2026-07-13 23:26:33 +02:00
can1357 4c1c5f40d8 feat(launch): rendered launch logs from daemon terminal byte streams
- Changed daemon log reads to return both sanitized display text and a raw `terminalText` slice, and included it on log RPC responses for PTY runs when grep was not used.
- Extended the logs result contract and launch tool rendering to consume `terminalText`, reconstruct terminal output, and display it in framed, preview-capped sections.
- Kept terminal row layout stable by writing space characters for empty cells when reading rows, preserving spacing during output reconstruction.
2026-07-13 19:21:45 +02:00
can1357 896c4bb17b fix(coding-agent/tools): capped expanded streaming diff previews to a viewport-sized tail
- Bounded expanded partial edit diff rendering in `formatStreamingDiff` to `previewWindowRows()` instead of an unbounded budget, preventing runaway preview growth during live updates.
- Updated streaming diff tests to simulate terminal height and verify expanded previews stay full only within the viewport, then switch to a truncated tail with the `more lines above` marker when too tall.
- Reinitialized in-memory `Settings` before each initial-messages test since the test suite reads global display configuration and needs isolation.
2026-07-13 19:00:26 +02:00
can1357 d8ad39320d test(launch): validated terminal screen replay rendering and state
- Verify terminal screen row replay correctly handles cursor rewrites.
- Ensure final text color and weight are preserved during terminal output rendering.
- Assert that superseded text is excluded from the rendered output.
2026-07-13 18:27:26 +02:00
can1357 6fcb1b3008 chore(test): synchronized test expectations with output and cleanup formatting
- Updated `hashline` test expectations to match new recovery message strings.
- Initialized settings in `interactive-mode-status` tests to prevent state leakage.
- Added ANSI color code verification to `launch` tool tests to align with updated output.
- Cleaned up whitespace in `tan-context-switch.md` system prompt.
2026-07-13 18:27:25 +02:00
Colin Mason 640d7c83b9 propagate ipc clone errors to eval cells 2026-07-13 09:57:20 -04:00
can1357 e770cdc4d9 fix(coding-agent): unified tool renderer and clarified launch diagnostics
- Implemented a consolidated TUI renderer for launch tool operations to unify status headers and metadata.
- Added tracking for unfulfilled readiness conditions to distinguish between timeout causes and daemon states.
- Enhanced timeout reporting to explicitly surface specific unmet log or port conditions.
- Included comprehensive unit and regression tests for tool rendering and start-timeout diagnostics.
2026-07-13 05:16:36 +02:00
can1357 f83e409218 feat(coding-agent): added toggle for launch tool
- Added a configuration setting `launch.enabled` to control the availability of the project-scoped launch tool.
- Integrated the setting into the bash tool and tool registry to conditionally enable or disable the launch functionality.
- Updated documentation and settings schema to include the new toggle.
2026-07-13 04:22:28 +02:00
can1357 4cfec93458 feat(coding-agent/launch): introduced persistent project service tool
- Introduced a project-scoped `launch` tool to orchestrate long-running services, debuggers, and watchers with persistent execution capabilities.
- Implemented a robust daemon broker with Unix/Windows IPC transport that manages process lifecycles, readiness monitoring, and automatic log rotation.
- Added detached process support to ensure services persist independently of the main application lifecycle, including recovery and cleanup mechanisms.
- Updated the `bash` interceptor to prioritize the new `launch` tool for background processes and provided comprehensive documentation for lifecycle and signal handling.
2026-07-13 04:21:55 +02:00
can1357 87a64b2f6a feat(coding-agent): improved background job lifecycle and display
- Stop propagating real-time updates for backgrounded Bash jobs to avoid UI flickering once a job enters the background.
- Refine background task tracking in `EventController` to distinguish between persistent background tasks and transient backgrounded Bash commands.
- Update UI rendering to display cleaner background job metadata in the footer instead of inline text notices.
2026-07-13 00:54:51 +02:00
can1357 d0f90f35ae refactor(coding-agent): removed unreliable web search providers
- Removed unreliable Bing and Yahoo HTML-scraping search providers.
- Deleted `src/web/search/providers/bing.ts` and `src/web/search/providers/yahoo.ts` implementation files.
- Updated `provider.ts`, `types.ts`, and `public.ts` to prune provider registration and configuration.
- Adjusted `web-search-public.test.ts` to exclude removed engines from test coverage.
2026-07-13 00:34:27 +02:00
can1357 8c8afaf477 fix(browser): made tab evaluation use the main world 2026-07-13 00:05:43 +02:00
can1357 0d07da529a feat(coding-agent-tools): implemented browser execution safety controls
- Implemented cell budget clamping for timeouts to prevent stalled browser operations from exceeding execution limits.
- Added `recover` capabilities for tab workers to clear blocking dialogs and safely terminate hung navigations.
- Introduced `//!world=main` support for `tab.evaluate` via Puppeteer patch to allow execution in main execution contexts.
- Improved failure attribution for tab terminations by tracking dialogs, stalled operations, and specific termination reasons.
2026-07-13 00:05:43 +02:00
can1357 bd7d395222 feat(coding-agent/tools): added predicate polling support to wait()
- Enhanced `wait()` in browser tools to accept a predicate function in addition to milliseconds.
- Implemented automatic polling with configurable timeout and interval, resolving with the first truthy value.
- Throws a descriptive `ToolError` on timeout instead of waiting for the full execution deadline.
- Added comprehensive unit tests to verify polling behavior, cancellation, and error handling.
2026-07-13 00:05:42 +02:00
roboomp a327992c86 fix(lsp): sent initial workspace configuration
Sent workspace/didChangeConfiguration after initialized so servers waiting for client configuration finish startup before semantic requests.

Added a fake-LSP regression covering notification order and settings payload.

Fixes #5276
2026-07-12 13:38:42 +00:00
can1357 a643e94466 chore: remove redundant tests 2026-07-11 19:50:23 +02:00
can1357 d39a3ed453 chore: fix stale tests 2026-07-11 19:10:40 +02:00
can1357 7a0ae70313 feat(coding-agent/tools): implemented bulk conflict resolution via conflict://*
- Added `conflict://*` support to the `write` tool, allowing resolution of multiple conflicts in a single call using per-id directives.
- Implemented `parseBulkDirectives` to interpret `ID: @side` mappings from the raw input content.
- Enabled partial bulk resolution where unlisted conflict IDs remain registered for subsequent operations.
- Updated conflict documentation and tool summaries to reflect the new bulk resolution capability.
2026-07-11 18:23:57 +02:00
can1357 0828c53cab feat(coding-agent): integrated liveness monitoring into irc wait operations
- Update `IrcBus.wait` to accept a `liveness` configuration, automatically aborting waits if the specified sender or relevant peers transition to an idle state.
- Enhance `IrcTool` to utilize liveness monitoring during `wait` operations, ensuring the agent does not hang if target peers become unreachable.
- Refactor `IrcBus.wait` to unify internal settlement logic and improve cleanup robustness.
2026-07-11 17:14:03 +02:00
can1357 7e5e7e864d feat(coding-agent-tools): implemented auto-trimming for echo lines
- Implemented logic to automatically detect and trim redundant lines duplicating adjacent file content within conflict markers.
- Added delimiter balancing and boundary tracking to ensure accurate removal of echoed text while preserving EOL formatting.
- Updated user feedback to report the number of trimmed echo lines during write and conflict resolution operations.
- Expanded test coverage to include multi-line echo scenarios and integration validation of the repair process.
2026-07-11 17:04:23 +02:00
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