Commit Graph
310 Commits
Author SHA1 Message Date
Max Hsu d9ceae15be fix(mcp): let streamable HTTP read timeout cover tool_timeout
The streamable HTTP client used httpx.Timeout(30.0, connect=10.0), so the
read timeout was fixed at 30s regardless of tool_timeout. A server that
stays silent until the result is ready (e.g. FastMCP json_response=True)
hit ReadTimeout after 30s; the tool call then hung until tool_timeout
fired and reported "(MCP tool call timed out after Ns)".

Use the MCP SDK's own httpx defaults (30s, read=300s) and raise the read
timeout to tool_timeout when it is larger. Connect stays at 10s.

Fixes #6065
2026-10-06 01:41:10 +08:00
takiAA 9dc0abae4f fix(documents): read cells beyond declared XLSX dimensions 2026-10-05 22:33:30 +08:00
chengyongru 6ff96f2a8f feat(subagent): add session-owned task messaging and cancellation (#5985)
let's go!
2026-10-05 05:16:33 +08:00
RaycarlLei 8052c3a460 fix(tools): scope recursive directory ignores to listed root 2026-10-03 20:40:37 +08:00
Xubin Ren 5e54043492 test(tools): verify nullable enum with multiple union types 2026-10-03 20:03:48 +08:00
Shuhan Si 9ea3268dfb fix: 执行 null 参数的类型和枚举校验 2026-10-03 20:03:48 +08:00
Shuhan Si ae6801d3eb fix(tools): preserve supplied newlines when creating files 2026-10-03 17:38:18 +08:00
Kail Tian 042bcbbe46 fix(tools): preserve indentation in newline-terminated fallback edits 2026-10-03 17:15:11 +08:00
Kail Tian e36a016b6f fix(tools): preserve separator whitespace in inline replacements 2026-10-03 16:57:04 +08:00
Kail Tian 432421bceb fix(tools): preserve valid JSON Schema union arguments 2026-10-03 01:16:54 +08:00
Kail Tian 1535cb1b6b fix(exec): enforce session hard timeouts without polling 2026-10-03 00:22:31 +08:00
chengyongru 54d85059a5 fix(tools): preserve PATH for argument-vector commands 2026-09-30 13:09:30 +08:00
chengyongru b7abbcd70b fix(agent): require subagent consolidator at construction 2026-09-29 15:28:05 +08:00
Kail Tian 4f7479ca64 fix(web): propagate web_fetch failures as structured tool errors 2026-09-28 15:44:56 +08:00
chengyongru e0b8efa0be feat(tools): use installed ripgrep for native file search (#5948)
* feat(tools): expose installed ripgrep through exec

* refactor(tools): launch ripgrep with native argument vectors

* refactor(tools): reuse the fresh exec parameter schema

* fix(tools): select search backend in loader and display rg arguments

* fix(ui): simplify rg previews and localize search completion

* docs: simplify ripgrep configuration note

* docs: keep ripgrep note on one line
2026-09-28 13:44:51 +08:00
chengyongru 932b06f0de fix(providers): preserve tool optionality in Responses requests 2026-09-27 18:47:48 +08:00
Kail Tian f62e0da9f6 fix(mcp): load all pages of server tools before registration 2026-09-26 20:52:14 +08:00
chengyongru 6eccc2859a test: consolidate repetitive cases across the suite 2026-09-25 14:28:21 +08:00
chengyongru c406024b59 test: consolidate redundant compaction and tool tests 2026-09-25 14:28:21 +08:00
chengyongru cab3a360ea fix(tools): make oversized line truncation explicit 2026-09-24 16:24:06 +08:00
FanouZeng-TT f57eba2b07 fix(tools): keep read_file progressing when a single line exceeds the output budget
ReadFileTool stops at the first numbered line that does not fit the
128 KiB budget. When that line is the first one, no line is appended and
the tool returns an empty page that reports lines 2-1 and repeats the
same offset, so the caller can never reach the rest of the file. A long
line further down has the same effect for everything after it.

Emit a bounded prefix of that line and advance the continuation offset
past it, so every read returns content and makes progress.
2026-09-24 16:24:06 +08:00
chengyongru a4a733d965 refactor(tools): remove unused global file state compatibility 2026-09-24 13:08:08 +08:00
chengyongru c5f78bbd5c fix(mcp): handle OAuth interruptions through Loguru 2026-09-23 18:29:52 +08:00
chengyongru f9048dc514 fix(linear): retain issue context and clarify OAuth diagnostics 2026-09-23 18:29:52 +08:00
chengyongru 27b3e81434 refactor(tools): build grep context pages incrementally 2026-09-23 14:39:41 +08:00
chengyongru c8ed6a1209 fix(tools): keep searches scoped and results resumable 2026-09-23 14:04:08 +08:00
chengyongru a721806a50 fix(files): treat BOM-only text as empty 2026-09-23 00:29:52 +08:00
Zihan Xu 6707004a2a test(files): cover BOM-marked Unicode text 2026-09-23 00:29:52 +08:00
Kail Tian d37e2a7a0e fix(tools): handle boolean JSON subschemas during argument validation 2026-09-23 00:06:45 +08:00
Zihan Xu ac89579206 fix(exec): run quoted Windows executables without arguments 2026-09-23 00:04:19 +08:00
Xubin Ren d37d7c07c0 fix(agent): redact private recovery and reconnect diagnostics 2026-09-21 15:24:38 +08:00
Xubin Ren 2640251076 fix(agent): respect temporary chat privacy in tool execution 2026-09-21 15:24:38 +08:00
chengyongru 4e2173c9eb fix(agent): serialize session inbox processing 2026-09-17 22:18:38 +08:00
chengyongru d386ba138e fix(tools): scope file-read dedup to model context (#5775)
* fix(tools): scope file-read dedup to model context

* refactor(tools): narrow file-read context and build results lazily
2026-09-15 16:09:56 +08:00
chengyongru 1c3c68262f refactor(tools): unify edit summaries with shared fast diffs
Return compact, workspace-relative summaries from edit_file and apply_patch.
Compute one RapidFuzz line alignment per file and reuse it for summary counts
and WebUI unified diffs, checking snapshots before reuse. Summarize batched
edits by their final file state.

Warn only when a recorded file version changed, without asking for a read
after an edit has already succeeded. Preserve existing edit errors.

Validate summary and activity reuse, repetitive files, diff formatting,
snapshot changes, file creation, and read-state behavior.
2026-09-15 11:25:01 +08:00
Kail Tian 3a725b35a7 fix(tools): preserve line boundaries when deleting inline suffixes 2026-09-15 11:25:01 +08:00
ggbond 524e96ff68 test(security): keep proxy-clearing fixtures hermetic on hosts with OS-level proxies 2026-09-14 13:21:45 +08:00
chengyongru 73410e0217 fix: stream internal model calls with idle timeouts (#5730)
* fix: stream internal model calls with idle timeouts

* fix(providers): reject streams without terminal events
2026-09-11 13:06:43 +08:00
chengyongru 55093dd75b fix(mcp): refresh expired OAuth tokens automatically (#5573)
* fix(mcp): refresh expired OAuth tokens

* fix(mcp): bind refreshed tokens to OAuth issuer

* fix(mcp): activate OAuth tools before probe cleanup

* fix(webui): preserve failed MCP OAuth status

* fix(mcp): preserve OAuth refresh across discovery retries

* test(mcp): align OAuth issuer fixture with SDK validation
2026-09-10 13:27:50 +08:00
Booty Destroyer 6969 dfed706bc0 fix(exec): preserve UTF-8 across streaming output chunks 2026-09-10 11:36:33 +08:00
Xubin Ren 61ea3ed3c4 test(exec): keep Seatbelt identity fixtures portable on Windows 2026-09-10 00:00:44 +08:00
Xubin Ren 19074b5122 fix(exec): preserve Seatbelt readonly roots and fail closed on cwd errors
Prevent renaming writable ancestors of effective read-only roots while preserving explicit read-write overrides, filesystem case aliases, and unrelated child writes.

Exit before evaluating shell lists when the sandbox working directory cannot be entered. Add native and portable regressions for both boundaries and document the ancestor restriction.
2026-09-10 00:00:44 +08:00
Xubin Ren 8b9e35bf78 fix(exec): tighten Seatbelt filesystem and launcher boundaries
Keep temporary work inside the granted workspace instead of exposing host scratch trees, enforce read-only roots, and pin the system sandbox launcher before PATH lookup. Preserve documented network access and the narrow system paths needed by shell and Git.

Add native macOS containment and launcher regressions plus shared backend contract coverage. Document scratch and custom-tool requirements without changing existing bwrap or Windows behavior.
2026-09-10 00:00:44 +08:00
LuckTerence 947ed17e8b test(sandbox): handle Windows path escaping in Seatbelt backend assertions
On Windows runners, workspace and tmp paths contain backslashes which are escaped by _sbpl_quote into double backslashes in the generated SBPL profile. Use _sbpl_quote in TestSeatbeltBackend assertions and escape backslashes in quote test to ensure assertions pass on Windows.
2026-09-10 00:00:44 +08:00
LuckTerence e217468e0a feat(exec): add a macOS Seatbelt sandbox backend
`tools.exec.sandbox` only supported bubblewrap, which depends on Linux
kernel namespaces, so macOS had no process-level isolation for shell
commands: SECURITY.md told macOS users the sandbox was simply
unavailable.

Add a `seatbelt` backend that generates an SBPL profile for
sandbox-exec(1) with the same policy bwrap applies. The workspace is
read-write, the media directory is read-only, the workspace's parent is
unreadable so config.json and its API keys stay hidden, and everything
else is denied by default.

Two macOS details the profile has to get right, both found by running
the generated command rather than by reading the SBPL reference:

- sh(1) reads `/` while resolving a path, and `(subpath "/usr")` does
  not cover the root itself. Without `(literal "/")` every wrapped
  command aborts during shell startup.
- Denying the parent directory also blocks traversal into the
  workspace, so commands fail with ENOTDIR before they run. The
  ancestors of every allowed path are therefore re-allowed for
  `file-read-metadata` only: they stay searchable, but the config
  directory still cannot be listed or read.

Paths are SBPL-escaped so a quote or backslash in a workspace path
cannot terminate a literal early and widen the rules that follow it.

Network access stays unrestricted to match bwrap, which does not pass
`--unshare-net`. Windows keeps its existing warn-and-run-unsandboxed
path, and selecting `seatbelt` on Linux fails loudly on the missing
sandbox-exec(1) exactly as selecting `bwrap` does on macOS today.

Verified on macOS 26.6.2 against the real sandbox-exec(1): workspace
writes, media reads and /tmp scratch succeed, while writing media,
reading config.json, listing the config directory, writing outside the
workspace and reading ~/.ssh are all denied.

Refs #1448
Refs #2569
2026-09-10 00:00:44 +08:00
n1uz1 104917aaec fix(tools): support recursive glob filters in file searches 2026-09-08 16:13:26 +08:00
Ben Whittaker 7aaff4f66b fix(exec): resolve relative working_dir from workspace 2026-09-08 13:31:28 +08:00
cleverLucky c039a7052a feat(web-search): add AnySearch provider (key-optional, anonymous quota) (#5607)
* feat(web-search): add AnySearch provider (key-optional, anonymous quota)

* docs(configuration): add AnySearch web search provider
2026-09-08 11:41:10 +08:00
chengyongru 192e2e90dc refactor(events): unify scoped runtime notifications across clients (#5670)
* refactor(events): unify scoped runtime notifications across clients

* style(tests): sort auto-compaction event imports

* refactor(events): scope connections and remove retry callback plumbing

* docs: remove runtime notification design write-up

* refactor(bus): route operation events through the message bus

* fix(channels): isolate outbound sends by destination

* style(events): group shared notification imports

* refactor(events): converge runtime and hook delivery on MessageBus

* test(events): migrate fixtures to unified message bus
2026-09-06 02:11:19 +08:00
chengyongru 3495281282 test: remove obsolete nonexistence checks 2026-09-05 23:58:38 +08:00