Commit Graph
1370 Commits
Author SHA1 Message Date
can1357 9b54d9e9ac chore: bump version to 17.0.8 2026-07-23 00:41:54 +02:00
can1357 7d404686c2 chore: updated changelogs + remove summarization marker 2026-07-22 23:59:32 +02:00
can1357 0002905ec5 chore: untrack node_modules symlinks and harden ignore pattern
- An eval-worktree cherry-pick swept 16 packages/*/node_modules symlinks into the index; 'node_modules/' with a trailing slash only matches directories, so symlinked installs bypassed the ignore. Dropped the slash and removed the tracked links.
2026-07-22 21:43:22 +02:00
can1357 b9072f1991 fix(extensibility): validate Type.Unsafe against the draft-2020-12 upgraded schema
Aligns the shim's runtime safeParse/__validator with the wire/tool-call
path, so legacy draft-07 documents (tuple items) accept the same values
validateToolArguments does. Adds a regression test.
2026-07-22 21:13:21 +02:00
can1357 29a94ac49c Merge PR #6200: fix(session): retry past synthetic tool results after mid-tool-call stall (@roboomp) 2026-07-22 21:13:15 +02:00
can1357 f741936c56 test(agent): signal tool boundary from the gate itself
The Promise.withResolvers signal resolved inside the scripted model
response fires before the loop can possibly dispatch the tool, so the
parked-state assertions passed even with parking disabled (verified by
simulation: 20/20 green with waitUntilResumed stubbed out). Resolve the
readiness signal from a test-local wrap of agentPauseGate.waitUntilResumed
instead: deterministic (no wall-clock race with the cold yieldIfDue
timer), immune to sibling restoreAllMocks (manual patch, restored in
finally), and a non-parking regression now hangs the await and fails
the test.
2026-07-22 21:12:22 +02:00
can1357 206d812244 Merge PR #6185: test(agent): synchronize pause gate tool boundary (@any-victor) 2026-07-22 21:12:21 +02:00
can1357 50937ecf08 Merge PR #6136: fix(agent): recover tools after stream parse errors (@usr-bin-roygbiv) 2026-07-22 21:12:21 +02:00
Victor Araújo 3179a524be test(agent): synchronize pause gate tool boundary 2026-07-22 00:31:36 -03:00
Victor Araújo eee940c1c3 test(agent): avoid global pause gate spy 2026-07-21 23:29:13 -03:00
Victor Araújo b927c4d0c5 test(agent): synchronize pause gate tool boundary 2026-07-21 23:22:01 -03:00
roboomp 31e0c8a9ee fix(session): retry past synthetic tool results after mid-tool-call stall
A stream that stalls or aborts mid-tool-call ends the assistant turn with
stopReason error/aborted, then appends a synthetic tool_result per un-run
tool call to keep the provider's tool_use/tool_result pairing intact. That
placeholder trailed the failed turn, so AgentSession.retry() — which only
inspected the last message and required role assistant — short-circuited to
false and /retry printed 'Nothing to retry'.

retry() now walks back over trailing synthetic tool results (details
__synthetic true) before the assistant + stopReason check, stripping both
the placeholders and the failed turn. Only synthetic results are skipped, so
a turn whose tools actually ran stays non-retryable. Adds an exported
isSyntheticToolResultMessage guard in agent-loop.ts.

Fixes #6056
2026-07-21 20:30:44 +00:00
can1357 7b141199d5 chore: bump version to 17.0.7 2026-07-21 22:11:51 +02:00
usr_bin_roygbiv 7c6d691c10 fix(agent): recover tools after stream parse errors 2026-07-20 17:22:25 -05:00
can1357 aa1b89db49 chore: bump version to 17.0.6 2026-07-20 23:46:18 +02:00
can1357 9fd6e97113 chore: bump version to 17.0.5 2026-07-18 23:51:40 +02:00
can1357 546dce7638 chore: update changelogs 2026-07-18 23:51:15 +02:00
can1357 f7f8e1188c chore: normalized changelog sections after merges 2026-07-18 19:43:33 +02:00
can1357 65534c5c07 Merge PR #5947: perf(session): memoize convertToLlm and estimateTokens over settled history (@roboomp) 2026-07-18 19:42:52 +02:00
roboomp a713b941dc fix(agent): preserved side-effecting hub outcomes
Resolved tool interruptibility from each call's raw arguments so mixed-operation tools can keep side-effecting calls non-interruptible.

Restricted the unified hub to interrupt passive waits and followed logs while preserving start, send, and lifecycle operation results.

Fixes #5995
2026-07-18 14:41:19 +00:00
can1357 0ca454befa chore: bump version to 17.0.4 2026-07-18 06:41:08 +02:00
roboomp a28eb0f470 perf(session): memoized convertToLlm and estimateTokens over settled history
Long sessions re-walked the full live AgentMessage[] every turn: convertToLlm
re-converted the unchanged prefix and estimateTokens re-tokenized settled tool
results and assistants, redoing work only the newest suffix can change.

- Added a per-message estimate cache in agent-core keyed by identity, with a
  settle gate (assistants cache only with real usage + terminal non-error
  stopReason; streaming partials bypass) and dual option-split WeakMaps for the
  default vs compaction-floor estimates.
- Memoized convertToLlm per message identity + assistant interruptedNext flag,
  with an exact-repeat outer-array reuse and slice-on-growth for append-only
  turns, guarded by a boundary-identity check against interior splice-replaces.
- Invalidated both caches at the mutation seams: prune, shake, strip-images, and
  the prewalk plan-nudge scrub, via invalidateMessageCache /
  registerMessageCacheInvalidator across the package boundary.
- Added the llm-assembly bench (N=5000, robust MAD-noise gate): steady/append
  convert and repeat estimate are all >10x faster with noise under 20%.

Fixes #5934
2026-07-18 02:04:09 +00:00
can1357 2c225a0d00 chore: bump version to 17.0.3 2026-07-17 21:38:00 +02:00
can1357 d527259c26 chore: bump version to 17.0.2 2026-07-17 07:40:54 +02:00
can1357 731a2cb5b2 test(natives): gave timeout drain repro a spawn-proof deadline
The 50ms budget raced external-process spawn on cold CI runners: cancel
could fire before yes produced output, so the builtin tail flushed an
empty ring buffer (0 lines instead of 5, Linux x64 modern). 750ms keeps
the post-cancel drain scenario while outlasting spawn latency.
2026-07-17 06:09:51 +02:00
can1357 bcc7d34a9a merge PR #5651 via eval/pr-5651: fix(cursor): gated mounted device execution through approval 2026-07-17 04:37:09 +02:00
can1357 c0d0ad7629 merged PR #5538: fix(agent): surface provider stream failures 2026-07-16 18:38:53 +02:00
roboomp d8aaffa814 fix(cursor): resolved tools against the live model per call
The context refresh captured the run-start model, so mid-run switches into or out of cursor-agent (retry fallback, prewalk, plan-yolo) sent the wrong tool set. Resolve supplemental tools against this.#state.model each call.

Fixes #5650
2026-07-16 03:21:23 +00:00
roboomp 8386ab2c0b fix(cursor): exposed mounted xd devices to cursor-agent
Forwarded the session xd registry into Cursor provider tool contexts.

Routed Cursor MCP execution through the mounted registry fallback and added regression coverage for built-in devices and external MCP tools.

Fixes #5650
2026-07-16 03:15:32 +00:00
can1357 9fd19696e2 chore: bump version to 17.0.1 2026-07-16 04:56:03 +02:00
roboompandcan1357 ed4ddcba6c fix(session): await session.dispose() on non-interactive exit paths
Print-mode assistant-error/aborted exit, RPC pi.shutdown() and stdin-EOF
shutdowns, and the extension command-context shutdown() called
process.exit() before (or racing) session.dispose(), skipping the bounded
browser reaper (releaseTabsForOwner) installed in dispose(). An OMP-owned
Chromium could survive the parent and reparent to PID 1.

Route all four graceful paths through the idempotent, promise-memoized
session.dispose() and await it before the final exit. The RPC
performShutdown no longer emits session_shutdown directly (dispose() emits
it), avoiding a double emit.

Fixes #5643
2026-07-16 04:29:55 +02:00
can1357 e28197c694 Revert "merged PR #5602: fix(agent-loop): reclassify empty toolUse stop as retryable error"
This reverts commit 2baaea8782, reversing
changes made to 6783c3a473.
2026-07-16 04:09:44 +02:00
can1357 1df790a5d2 Revert "fix(agent-loop): discard incomplete sibling tool calls"
This reverts commit 7a2e34988b.
2026-07-16 04:08:59 +02:00
can1357 2c355102ce chore: applied biome formatting to merged sources 2026-07-16 03:52:48 +02:00
can1357 93cc1fed1c merged PR #5417: fix(openai): render native response images
# Conflicts:
#	packages/coding-agent/src/modes/components/chat-transcript-builder.ts
#	packages/coding-agent/test/agent-session-skill-keywords.test.ts
2026-07-16 03:48:21 +02:00
can1357 7a2e34988b fix(agent-loop): discard incomplete sibling tool calls 2026-07-16 03:31:57 +02:00
DarkPhilosophy a0b1541cb8 Merge remote-tracking branch 'can1357/main' into fix/visible-provider-errors 2026-07-16 02:13:42 +03:00
roboomp 4200dec047 fix(agent-loop): strip incomplete tool calls on empty toolUse stop
A dropped stream that emitted toolcall_start/delta but never toolcall_end
leaves an incomplete toolCall block in content. The prior guard bailed on
any toolCall block, so the outer loop dispatched empty or partially
parsed arguments instead of retrying the transport failure.

Track streamed tool-call ids (toolcall_start/delta) alongside completed
ones (toolcall_end): a call streamed but never completed is incomplete.
reclassifyEmptyToolUseStop now reclassifies unless a usable (atomic or
completed) tool call remains, stripping incomplete blocks first. Atomic
deliveries (single done/end(result) message, e.g. Cursor) emit no
granular events and stay usable.

Fixes #5600
2026-07-15 18:06:13 +00:00
roboomp 94fc54859f fix(agent-loop): reclassify empty toolUse in result-only completion
Streams finalized via end(result) with no terminal done/error event fall
through to the trailing-result branch, which returned response.result()
unchanged. An empty toolUse turn completing that way stayed a silent
success and never retried. Apply the same
retainCompletedToolCalls/recoverTransientErrorToolTurn/
reclassifyEmptyToolUseStop chain to the trailing branch.

Fixes #5600
2026-07-15 17:52:25 +00:00
roboomp f64a17c529 fix(agent-loop): reclassified empty toolUse stop as retryable error
A provider stream that closes after the thinking block but before the
tool call JSON is emitted finalizes with stopReason=toolUse and zero
toolCall content blocks. The loop treated this as a successful turn:
dispatched no tools, rendered an empty tool widget, and never retried.

reclassifyEmptyToolUseStop stamps such a turn as stopReason=error with
the Transient classifier bit set explicitly, so AgentSession's standard
retry-with-backoff path fires regardless of message-text matching.

Fixes #5600
2026-07-15 17:44:53 +00:00
can1357 1c9291b6e6 chore: bump version to 17.0.0 2026-07-15 19:17:34 +02:00
can1357 34bfa9ad50 chore: rewrite changelogs 2026-07-15 18:51:23 +02:00
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
DarkPhilosophy d00e5548e2 fix(agent): drop incomplete failed tool calls 2026-07-15 03:11:25 +03:00
DarkPhilosophy 5a7f107802 fix(agent): preserve Cursor results on stream failure 2026-07-15 03:01:09 +03:00
DarkPhilosophy 4086418227 fix(agent): pair tools on failed partial streams 2026-07-15 02:47:15 +03:00
DarkPhilosophy b3145170ab fix(agent): surface provider stream failures 2026-07-15 02:32:37 +03:00
can1357 7d02778c60 chore: bump version to 16.5.2 2026-07-15 00:04:32 +02:00
can1357 ff117fd107 chore: cleanup changelogs 2026-07-14 23:32:10 +02:00
can1357 f2b70eeede chore: normalized changelogs after landing farm fixes 2026-07-14 23:11:24 +02:00