Commit Graph

15552 Commits

Author SHA1 Message Date
omp-eval c8b37c8d2e fix(plugins): return bare Kitty delete sequences from legacy pi-tui shim
Upstream Pi's deleteKittyImage/deleteAllKittyImages return unwrapped control
sequences; legacy callers such as pi-sprite wrap tmux passthrough themselves.
Aliasing OMP's auto-wrapping encodeKittyDeleteImage (and hand-wrapping
deleteAllKittyImages) double-wrapped under tmux, so the outer terminal dropped
the delete command. Match the upstream bare-sequence contract and pin it in
the regression test.
2026-07-26 15:41:31 +02:00
can1357 5905ec0430 Merge PR #6507: fix(plugins): restore pi-sprite legacy compatibility (@roboomp) 2026-07-26 15:41:31 +02:00
can1357 9b8715ee78 Merge PR #6493: fix(coding-agent): bypass extension guards during shutdown (@roboomp) 2026-07-26 15:41:31 +02:00
can1357 60b0968e1f Merge PR #6484: fix(coding-agent): resume agent after /tree ask re-answer (@roboomp) 2026-07-26 15:41:31 +02:00
can1357 525173615c Merge PR #6500: fix(coding-agent): count only rendered skills in /context accounting (@roboomp) 2026-07-26 15:41:30 +02:00
can1357 0a83d9f364 Merge PR #6570: fix(plan-mode): prefer newest draft during review (@roboomp) 2026-07-26 15:41:30 +02:00
can1357 e1b607f9ee Merge PR #6584: fix(coding-agent): re-export estimateTokens from legacy pi shim (@roboomp) 2026-07-26 15:41:30 +02:00
can1357 bc5b660d19 Merge PR #6649: fix(coding-agent): restore legacy pi automode compatibility (@roboomp) 2026-07-26 15:41:30 +02:00
can1357 1ebe2cc63a Merge PR #6608: fix(coding-agent): handle vibe session commands safely (@roboomp) 2026-07-26 15:41:30 +02:00
can1357 97ea63920b fix(coding-agent): keep bun/npm routing for regular-file entries on Windows
Bun's global bin entry on Windows is a regular-file .exe shim, not a
symlink, so the standalone-binary override would have rerouted a
legitimate bun-managed install to in-place binary replacement and
clobbered the shim. Gate the override on POSIX, where package-manager
bin entries are always symlinks; add a regression test.
2026-07-26 15:41:30 +02:00
can1357 e0c26cc262 Merge PR #6527: fix(coding-agent): self-update binary install when its dir overlaps npm/bun bin dir (@am423) 2026-07-26 15:41:29 +02:00
can1357 5aa599f9ac fix(cli): treat cleared (empty-string) credentials as unset in config list
The settings panel persists "" when a credential is cleared and renders
that as unset; config list now uses the same semantics instead of
masking the empty string as a configured credential.
2026-07-26 15:41:29 +02:00
can1357 a0f03309a9 Merge PR #6588: fix(cli): redact credential settings in config list (@wolfiesch) 2026-07-26 15:41:29 +02:00
can1357 18bd043c86 fix(cli): keep CLI --models scope pinned and defer scoped thinking with the role
The #6694 deferral must not apply when the scope comes from the --models
flag: createAgentSession re-resolves the default role against
settings.enabledModels only and never sees parsed.models, so leaving
options.model unset let a saved out-of-scope default silently escape an
explicit CLI scope. Pin scopedModels[0] for CLI scopes as before.

When the default role IS deferred (settings-derived scope), also skip
seeding options.thinkingLevel from scopedModels[0]'s explicit suffix —
explicit options win in createAgentSession and would override the
re-resolved role's own thinking selector.
2026-07-26 15:41:29 +02:00
can1357 57bfdbc4c1 Merge PR #6698: fix(cli): defer out-of-scope default role so extension models resolve (@roboomp) 2026-07-26 15:41:29 +02:00
can1357 56a8ab1413 Merge PR #6697: fix(coding-agent): match bash deny/prompt patterns per command segment (@roboomp) 2026-07-26 15:41:28 +02:00
can1357 0e3f695a56 Merge PR #6701: fix(coding-agent): stop the live advisor runtime when /settings disables it (@paolomazzitti) 2026-07-26 15:41:28 +02:00
can1357 ca4f0d6c56 Merge PR #6494: fix(session): cancel in-flight session_stop handlers (@roboomp) 2026-07-26 15:41:28 +02:00
can1357 e758f10a96 Merge PR #6660: fix(prewalk): apply same-model effort downgrades instead of skipping (@roboomp) 2026-07-26 15:41:28 +02:00
can1357 c5a819b162 Merge PR #6669: fix(session): retry reasonless tool-call aborts (@roboomp) 2026-07-26 15:41:28 +02:00
can1357 26f89bd897 Merge PR #6556: fix(omp): fit native compaction after large tool output (@oleksoleksoleks) 2026-07-26 15:41:27 +02:00
can1357 e7987cc9fb Merge PR #6502: fix(cursor): synthesize missing exec MCP tool calls (@roboomp) 2026-07-26 15:41:27 +02:00
can1357 daf2680298 fix(cursor): bound the dispatch drain by the abort signal and settle todo calls when the host sync callback throws
Two defects flagged by review on the final head, both in the new drain/settle
machinery:

- drainInFlightDispatches looped on Promise.all unconditionally. Exec handlers
  have no cancellation contract (the bridge calls tool.execute with no signal),
  so a hung or long-running tool held the terminal error hostage after Ctrl+C.
  The drain now returns once the signal aborts; late results were discarded
  after agent_end regardless.

- A host todoSync callback that throws (session persistence on disk failure)
  skipped both the paired result and toolcall_end, stranding the live card and
  leaving the resolved block to be stripped from rebuilt transcripts. The
  callback is now caught and the call settles as a failure carrying the thrown
  message.

Both regression tests fail without their fix (the first by hanging the stream).
2026-07-26 15:41:27 +02:00
can1357 9b651f2869 Merge PR #6616: fix(cursor): sync native todo list from server-resolved tool calls (@quantmind-br) 2026-07-26 15:41:27 +02:00
can1357 d15c77ad62 docs(ai): changelog entry for Cursor history image data-URI fix 2026-07-26 15:41:27 +02:00
can1357 b8d0174503 Merge PR #6564: fix(cursor): embed data URI for images in root-prompt history (@sethmorton) 2026-07-26 15:41:27 +02:00
can1357 9e741f5010 Merge PR #6666: fix(catalog): keep reference-less Copilot Claude models reasoning-capable and cache-stable (@roboomp) 2026-07-26 15:41:27 +02:00
can1357 93ddcccc47 Merge PR #6622: fix(catalog): retry empty model discovery (@roboomp) 2026-07-26 15:41:26 +02:00
can1357 637e2c51f3 Merge PR #6601: fix(catalog): downgrade forced tool choice for thinking-locked Kimi Code aliases (@voidfreud) 2026-07-26 15:41:26 +02:00
can1357 27798df315 Merge PR #6683: fix(providers): add China (Beijing) region for alibaba-token-plan (@roboomp)
# Conflicts:
#	packages/ai/src/registry/alibaba-token-plan.ts
#	packages/ai/test/alibaba-token-plan.test.ts
2026-07-26 15:41:26 +02:00
can1357 7bbe140914 Merge PR #6626: fix(advisor): propagate advisor provider session id via metadata (@roboomp) 2026-07-26 15:38:52 +02:00
can1357 2cc6b28d98 Merge PR #6537: fix(advisor): bound Codex SSE retries (@jeffscottward) 2026-07-26 15:38:52 +02:00
can1357 0f078e8af2 Merge PR #6521: fix(ai): repair Alibaba Token Plan usage reporting (@eggpeat) 2026-07-26 15:38:52 +02:00
can1357 d43e68b01c Merge PR #6505: fix(ai): retry statusless provider capacity errors (@roboomp) 2026-07-26 15:38:52 +02:00
can1357 62fc652056 Merge PR #6613: fix(ai): preserved Bedrock ARN thinking signatures (@roboomp) 2026-07-26 15:38:52 +02:00
can1357 b1f3bdbda7 Merge PR #6590: fix(ai): disable adaptive-only thinking on disableReasoning and forced tool choice (@roboomp)
# Conflicts:
#	packages/ai/test/anthropic-alignment.test.ts
2026-07-26 15:38:51 +02:00
can1357 dde9b30363 docs(ai): move Codex meter-isolation changelog entries to Unreleased
The entries were appended inside the released 17.1.3 section under a
duplicate '### Fixed' heading, retroactively mutating published release
history while leaving Unreleased empty.
2026-07-26 15:38:20 +02:00
can1357 0df4a22649 Merge PR #6541: fix(ai): stop one Codex window's limit from blocking the others (@paralin) 2026-07-26 15:38:19 +02:00
can1357 1408afd30a Merge PR #6513: fix(ai): strip output-only statuses from Responses replay (@Ant39140) 2026-07-26 15:38:19 +02:00
can1357 c1b77c9c44 Merge PR #6628: fix(natives): stabilize forwarded PulseAudio capture and playback (@anatoli-tsinovoy)
# Conflicts:
#	packages/ai/src/providers/anthropic.ts
#	packages/ai/src/registry/oauth/anthropic.ts
#	packages/ai/src/usage/claude.ts
2026-07-26 15:38:19 +02:00
can1357 33f4484118 Merge PR #6533: fix(computer-use): correct Codex subscription routing (@usr-bin-roygbiv)
# Conflicts:
#	packages/ai/src/providers/anthropic.ts
#	packages/ai/src/registry/oauth/anthropic.ts
2026-07-26 15:37:25 +02:00
can1357 690946046f Merge PR #6667: fix(ai): break anthropic oauth<->providers circular import (claudeCodeVersion TDZ) (@oldschoola) 2026-07-26 15:35:39 +02:00
Diogo Soares Rodrigues 07b813b948 fix(cursor): honor MCP application errors carried inside the success variant
describeExecResult treated every `success` oneof variant as a
successful call, but MCP encodes application-level tool failures inside
that variant as McpSuccess.is_error (agent.proto:2058), mirroring the
MCP spec. A handler using the TResult-only form that returned such a
result therefore reached Cursor as a failed tool while the rebuilt
transcript recorded success - the same inconsistency the previous fix
closed for the error/rejected variants.

The success branch now inspects is_error and, when set, flattens the
payload content into the transcript body instead of the generic
placeholder. Image items carry no text, so an all-image failure falls
back to a generic message. McpSuccess is the only *Success message in
agent.proto with an is_error field, so no other shape needs this.
2026-07-26 09:29:13 -03:00
Diogo Soares Rodrigues 90b89bf3c4 fix(cursor): drain exec dispatches on transport error and preserve raw failure state
Two P2 findings on the exec-handler path.

1. The success path waits for in-flight exec dispatches before pushing
   done, but the catch path did not. When the HTTP/2 completion rejects
   while a handler decoded from the last chunk is still running, the
   Agent finalizes the synthesized call from the terminal error and
   clears its Cursor result buffer; the handler then lands its real
   result after agent_end and it is discarded at the next run - even
   though the tool may already have performed side effects. The barrier
   is now a shared helper and inFlightDispatches is hoisted out of the
   try so both exits drain it.

2. resolveExecHandler always synthesized "Tool produced no transcript
   result" with isError: false for the TResult-only handler form. A
   rejected or error protocol result therefore reached Cursor as a
   failure while the rebuilt transcript recorded the same call as
   successful. Every exec result is a proto oneof whose only non-failure
   variant is success, so describeExecResult() derives the state from
   the variant and reuses its own error/reason text - the same string
   the server received.
2026-07-26 09:29:13 -03:00
Diogo Soares Rodrigues 9088fe821b fix(cursor): await error-drain transforms and sanitize mirrored todo labels
Two boundary defects on the mirrored-todo path.

1. The Agent error drain snapshotted #cursorToolResultBuffer without
   awaiting entry.pending, unlike #emitCursorSplitAssistantMessage. An
   async cursorOnToolResult still running when the provider errored
   patched an entry the catch path had already detached, so the
   pre-transform payload was persisted. A provider error is exactly when
   a transform is most likely to be in flight.

2. The todo renderer interpolated mirrored provider text straight into
   terminal output. A Cursor snapshot carries model-authored task
   content, phase names and summary text verbatim, so a label holding
   ANSI/C0 sequences rewrote the terminal on every render and replay.
   sanitizeText alone is not enough - it preserves tabs, which punch
   holes in bordered output - so every display path now funnels through
   one forDisplay() helper: task labels, blocker notes, phase headers,
   the zero-task fallback, and the streaming renderCall preview. Raw
   values are untouched; content and phase name are the identity keys
   the local list is looked up by and what gets persisted.
2026-07-26 09:29:13 -03:00
Diogo Soares Rodrigues ffc5ad50f7 test(cursor): release the gated exec handler even when the assertion fails
The gate asserted the stream was unsettled and only then resolved
handlerDone. A failing assertion skipped the resolve, so the consuming
`for await` waited on a handler nobody would unblock and the real
failure surfaced as a timeout. Moved to a finally.
2026-07-26 09:29:13 -03:00
Diogo Soares Rodrigues c0f1f69e16 fix(cursor): await in-flight dispatches before emitting done
The h2 data loop parses every frame in a chunk synchronously and starts
each handleServerMessage with `void`, so the socket keeps draining while
a handler runs. Nothing tracked those promises: after h2Completion the
provider went straight to `done`.

When an exec request, turnEnded and the stream close arrive in ONE chunk
- routine, since the server has no reason to split them - the transport
completes while the exec handler (and any onToolResult transformer) is
still resolving. The Agent drains its Cursor result buffer on the
terminal event, so the result is reserved after the snapshot and never
persisted, leaving the synthesized (already resolved) toolCall block
unpaired and stripped on replay.

Dispatches are tracked in a Set and awaited after h2Completion. Each
already swallows its own rejection, so this only waits.

The test drives a real h2 server whose final chunk carries readArgs +
turnEnded, and releases the handler only once the server flushed its
response and the handler is known to be running - no wall-clock delay.
Verified it fails 5/5 without the barrier and passes 5/5 with it. A
microtask drain in place of the yield does NOT discriminate: the
client end handler is IO, not a microtask.
2026-07-26 09:29:13 -03:00
Diogo Soares Rodrigues c11a315c7b fix(cursor): read MCP tool calls from the protobuf oneof
ToolCall.tool is a oneof: a wire-decoded message exposes the selected
variant as { case, value } and never as a flat mcpToolCall property.
Both MCP reads — the streamed start that creates the block and the
completion that merges the decoded arg map — used the flat property, so
they saw undefined on every real message. Hand-shaped fixtures kept
passing, exactly as they did for the native todo calls this PR started
with; selectMcpCall mirrors selectTodoCalls, flat fallback included.

The streamed block also named itself `name || toolName` while
decodeMcpCall (and therefore the paired result) uses `toolName || name`.
Aligned, so the block and its result cannot disagree.

Test round-trips through toBinary/fromBinary with name != toolName, and
covers both reads: it fails if either goes back to the flat property or
the precedence flips.
2026-07-26 09:29:13 -03:00
Diogo Soares Rodrigues eaf7a3d605 fix(cursor): pair a result for every server-resolved call
Three orphan paths, same failure mode: the assistant block is marked
kCursorExecResolved before the work runs, so agent-loop.ts emits no
placeholder for it, and any path that produces no toolResult leaves the
call unpaired — buildSessionContext then strips the whole interaction
from every rebuilt transcript.

1. resolveExecHandler returned no toolResult on three exits (no handler
   installed, handler produced nothing, handler threw). Each now pairs a
   result carrying the same text the server sees in execResult, routed
   through onToolResult like a real one. `pairing` is a required
   parameter so a new callsite cannot silently recreate the orphan.

2. Agent only installed its result-buffer sink when cursorExecHandlers
   or cursorOnToolResult was set. Both are optional, so a bare SDK host
   dropped the provider result on the floor. Installed unconditionally;
   a non-Cursor provider never calls it.

3. A todo completion frame with no tool_call (the field is optional)
   skipped settlement entirely. It now settles as "nothing to mirror".

Also fixes an empty update_todos with a nonzero total_count being
mirrored as an authoritative clear: the length guard added earlier
skipped the mismatch check for empty responses, so a partial or
size-limited merge response deleted every local task at once.
2026-07-26 09:29:13 -03:00
Diogo Soares Rodrigues a9f1e3a257 fix(agent): await pending cursor result transformers before draining
An async cursorOnToolResult that resolved after the message_end drain
had its rewrite silently discarded: the reservation kept the call from
dangling, but the late patch mutated a buffer entry the drain had
already detached, so the persisted message kept the pre-transform
payload.

Each entry now records the in-flight transformer promise, and
#emitCursorSplitAssistantMessage awaits any that are still pending
before appending and emitting. This matches the exec-channel paths,
which already await onToolResult (cursor.ts:1461).

A rejecting transformer is swallowed per-entry, so a failing hook can
neither take the turn down nor cost the reserved result.

The previous test asserted the old limitation (late rewrite NOT
persisted) and its premise is now unreachable, so it is replaced by the
rejection contract. Stale limitation notes in agent.ts and types.ts are
updated.
2026-07-26 09:29:13 -03:00