Commit Graph
5884 Commits
Author SHA1 Message Date
Can BölükandGitHub ffdb2fdd6b Merge branch 'main' into feat/no-webp-llama-cpp 2026-05-25 13:00:46 +03:00
Can BölükandGitHub 101035579a Merge pull request #1303 from yahyasaqban-lab/fix/plan-silent-discard
fix: preserve slash command text in editor history when plan/goal mode is already active
2026-05-25 13:00:01 +03:00
Can BölükandGitHub ea7d10eb58 Merge pull request #1297 from can1357/farm/7f8acce1/loop-mode-can-auto-submit-again-before-t
fix(loop-mode): block auto-submit while post-prompt background work is pending
2026-05-25 12:59:04 +03:00
Can BölükandGitHub 98603c669b Merge branch 'main' into farm/7f8acce1/loop-mode-can-auto-submit-again-before-t 2026-05-25 12:58:57 +03:00
Can BölükandGitHub 2305690a03 Merge pull request #1339 from can1357/farm/fec0dca1/session-compaction-rewrite-can-fail-with
fix(session): handle EPERM during session rewrite
2026-05-25 12:57:05 +03:00
Can BölükandGitHub a92dd35812 Merge pull request #1336 from hanbinnoh/fix/xiaomi-tp-baseurl
fix(xiaomi): use token-plan base URL for tp- API keys
2026-05-25 12:56:47 +03:00
Can BölükandGitHub 8a0fc98a3a Merge pull request #1181 from watzon/feature/deepseek-provider
Add DeepSeek API provider login
2026-05-25 12:56:13 +03:00
Can BölükandGitHub 094bf9517b Merge pull request #1344 from H4vC/main
Append only mode for Deepseek Enjoyers
2026-05-25 12:53:20 +03:00
Brit 05232eaaee fix: include strict/customFormat/customWireName in tool fingerprint 2026-05-24 23:06:55 +02:00
Brit 79973d69de fix: preserve system prompt array structure in fingerprint 2026-05-24 23:01:41 +02:00
Brit 667350b552 fix: support multiple append-only setting subscribers 2026-05-24 22:55:39 +02:00
Brit c93126ee3f fix: re-evaluate append-only mode on setting changes (not just model switch) 2026-05-24 22:48:12 +02:00
Brit e71d2ff49e fix: detect content rewrites in syncMessages, reset append-only cache on model switch 2026-05-24 22:39:20 +02:00
Brit 648bbdc163 fix(agent): passed AbortSignal to transformContext and re-evaluated append-only on model switch 2026-05-24 22:28:38 +02:00
Brit ee04dd8e21 chore: bun check 2026-05-24 22:17:15 +02:00
Brit 2a86049f0f feat(agent): add append-only context mode for DeepSeek prefix-cache stability
ImmutablePrefix caches system prompt + tool specs after first build()
so subsequent turns reuse identical byte sequences. AppendOnlyLog
converts messages once via syncMessages() and only appends deltas
on further turns — prior-turn bytes stay stable.

- New module: packages/agent/src/append-only-context.ts
  StablePrefix, AppendOnlyLog, AppendOnlyContextManager
- AppendOnlyContextManager added to AgentLoopConfig
- Wired into streamAssistantResponse in agent-loop.ts
- Toggleable via provider.appendOnlyContext setting (auto/on/off)
- Default auto enables for deepseek provider
- 38 tests covering prefix, log, sync, compaction handling
- /session info surfaces current active state
2026-05-24 22:08:53 +02:00
roboomp 84eb837b00 fix(session): handled eperm during session rewrite
Replaced overwrite-style session rewrites with an EPERM fallback that moves the old session file aside before retrying and restores it if the retry fails.

Added regression coverage for active-session rewrite recovery so the session remains writable after the fallback.

Fixes #1337
2026-05-24 18:00:42 +00:00
Hanbin Lee 82f62c2e70 fix(xiaomi): let timeout aborts fall through to AMS fallback
Previously, any AbortError (including the 15s timeout from
AbortSignal.timeout) was immediately rethrown, which prevented the
SGP→AMS fallback loop from reaching AMS during regional SGP outages.

Now only re-throws AbortError when the caller explicitly cancelled
(signal?.aborted), letting timeout-induced aborts continue to the
next endpoint via the existing lastError/continue path.
2026-05-25 01:56:59 +09:00
Hanbin Lee 92e8ac06ba refactor(xiaomi): switch from Anthropic to OpenAI Chat Completions API
Xiaomi MiMo supports /v1/chat/completions in addition to the previously
used /anthropic/v1/messages. The Anthropic protocol's thinking-signature
mechanism, which Xiaomi does not implement, causes unsigned reasoning
blocks to be converted to visible text — leaking the model's internal
thinking into the conversation history and triggering repeated reasoning
loops.

OpenAI Chat Completions avoids this entirely:
- No signature-based thinking chain verification
- Standard reasoning_effort parameter instead of thinking blocks
- Already used by Kilo, NanoGPT, OpenRouter, and ZenMux for Xiaomi

Changes:
- xiaomiModelManagerOptions: anthropic-messages → openai-completions
- xiaomi.ts validation: /v1/messages → /v1/chat/completions
- tp- keys: try SGP first, fall back to AMS
- models.json: all 5 Xiaomi models updated to openai-completions + /v1
- Revert AnthropicHeaderOptions.usesApiKeyAuth (no longer needed)
- Remove AnthropicCompat.usesApiKeyAuth from types
- Update test expectations for SGP-first routing and OpenAI endpoints
2026-05-25 01:38:17 +09:00
Hanbin Lee 1a2dffd021 fix(xiaomi): use token-plan base URL for tp- API keys
Root cause: getProviderBaseUrl('xiaomi') returned the standard
endpoint baseUrl from the bundled catalog (api.xiaomimimo.com/anthropic),
overriding the token-plan URL (token-plan-ams.xiaomimimo.com/anthropic)
that should be used for tp- prefixed keys.

Fix:
- xiaomiModelManagerOptions: for tp- keys, compute baseUrl from the
  key prefix alone, ignoring config?.baseUrl from the bundled catalog.
- Add usesApiKeyAuth flag to AnthropicCompat / AnthropicHeaderOptions.
- Xiaomi models set usesApiKeyAuth: true so the anthropic provider sends
  X-Api-Key header (matching what the Xiaomi validation code expects)
  instead of Authorization: Bearer.
2026-05-25 00:47:18 +09:00
Chris Danis 72544278f1 feat: add OMP_NO_WEBP env var to exclude WebP from image resize
Gated WebP encoding behind OMP_NO_WEBP environment variable so that local
llama.cpp vision models (which use the STB library that lacks WebP
decoding support) can accept browser snapshots without returning HTTP 400.

Upstream reference: cline/cline PR #9837
(https://github.com/cline/cline/pull/9837) implements a similar workaround
for the same llama.cpp STB WebP incompatibility.
2026-05-23 15:48:03 -04:00
Chris Watson 21c3999e9d Add DeepSeek API provider login 2026-05-22 19:39:29 -06:00
Yahya Saqban ec5accff11 fix: preserve slash command text in editor history when plan/goal mode is already active
When /plan <text> or /goal set <text> is typed while plan/goal mode is
already active, the handler shows a warning and clears the editor, but
the typed text was silently discarded — the user could not recover it
with Up Arrow.

Fix: save the text to editor history before clearing, so it remains
recoverable via input history.

Fixes #1287
2026-05-22 23:39:02 +03:00
roboomp 5573270e5e fix(loop-mode): block auto-submit while post-prompt background work is pending
When session.prompt() returns, idle-flush tasks for async-job result
deliveries are scheduled via #schedulePostPromptTask (1ms delay) and
added to #postPromptTasks immediately.  The 800ms loop timer could fire
in that window before isStreaming became true, causing the loop to
submit the next prompt while the delivery turn was still pending.  The
delivery then hit AgentBusyError and the job result was silently dropped.

Add AgentSession.hasPostPromptWork (= #postPromptTasks.size > 0) and
include it in #isLoopAutoSubmitBlocked() alongside isStreaming and
isCompacting.  Add a regression test that verifies the loop defers when
hasPostPromptWork is true and fires once it becomes false.

Fixes #1294
2026-05-22 13:41:17 +00:00
Can Bölük 3b072a10b9 Merge remote-tracking branch 'origin/farm/a46597ca/clipboard-image-paste-ctrl-v-silently-fa' 2026-05-22 22:40:03 +09:00
roboomp 00233b24fa style: bun run fix 2026-05-22 09:47:52 +00:00
roboomp 8f83cbd9a9 fix(clipboard): route image reads through powershell.exe on WSL
WSLg exposes WAYLAND_DISPLAY, so readImageFromClipboard() took the
native arboard path on WSL2. arboard::Clipboard::get_image() returns
ContentNotAvailable on WSLg because the Wayland clipboard does not
carry image payloads from the Windows clipboard, and that surfaced as
silent 'No image in clipboard' on Ctrl+V.

Detect WSL via WSL_DISTRO_NAME / WSL_INTEROP and read the image with a
PowerShell one-liner that emits base64-encoded PNG bytes from
[System.Windows.Forms.Clipboard]::GetImage(). Fall back to the native
bridge when PowerShell returns nothing, exits non-zero, or is missing,
so non-WSLg Wayland setups continue working unchanged.

Fixes #1280
2026-05-22 09:47:47 +00:00
can1357 6ca92dd08d test(coding-agent): increased bash abort test timeout and runtime
- Extended the abort scenario shell command from a 5-second sleep to 60 seconds.
- Raised the corresponding test timeout to 15,000 ms for the abort test case.
2026-05-22 18:06:50 +09:00
can1357 e6c08c1155 chore: bump version to 15.2.4 2026-05-22 17:48:11 +09:00
can1357andCan Bölük ebd2f77770 feat: implemented canonical § hashlines with ≔/""/" ops in hashline parser
- Changed hashline format to canonical `§` section headers and `"`/`"`/`≔` operations across grammar, parser, and docs.
- Reworked range and op parsing so single anchors are valid, legacy `-`/`-=` ops error, and empty `≔` payloads now delete ranges.
- Removed legacy `HL_EDIT_SEP`, `$HSEP$`, and `hsep` plumbing, adopting raw payload lines.
- Updated execution, input, renderer, and streaming flows to use `HL_FILE_PREFIX` and `HL_OP_CHARS` helpers.
- Updated session-stats parsing to `§`/`≔`/`"`/`"` format, patch envelopes, and bumped parser versions.
- Removed the hashline-separator benchmark script and its PI_HL_SEP job orchestration.
2026-05-22 17:46:53 +09:00
can1357andCan Bölük f29e733b67 refactor(coding-agent/modes): reorganized working-message hints in modes
- Added a shared `interruptHint()` utility in the modes shared module to generate the interrupt suffix with themed bracket glyphs.
- Replaced hardcoded working-message interrupt text in interactive and event controllers with calls to `interruptHint()`.
- Updated working-message rendering to recognize and strip the new themed hint when applying shimmer styling.
2026-05-22 17:44:20 +09:00
can1357 cac98df6d7 fix(ai): mapped Fireworks reasoning effort to provider-supported literal
- Updated OpenAI completions compatibility logic to translate a disabled-reasoning `minimal` effort to `none` for Fireworks endpoints.
- Added a Fireworks-specific test confirming the disableReasoning payload uses `reasoning_effort: "none"`.
- Refactored the disable-reasoning tests to reuse a shared request-payload capture helper.
2026-05-22 16:06:33 +09:00
can1357 21280fcb85 test(ai): adjusted issue-1270 repro test token endpoint mocks
- Added constants for OAuth and metadata token endpoints in the Vertex AI repro test.
- Expanded the fetch mock in the issue #1270 test to return tokens for either token endpoint, accommodating different ADC environments.
2026-05-22 15:53:56 +09:00
can1357andCan Bölük 2ebb55134e fix(coding-agent): adjusted reasoning-disable handling and title generation for reasoned models
- Updated OpenAI completions parameterization to honor `disableReasoning` on effort-based compatible models by sending the minimum supported effort.
- Expanded commit and title generation token budgets so reasoning models can return output after internal thinking while non-reasoning calls keep existing limits.
- Switched title generation to request a `set_title` tool call, added extraction from tool-call arguments, and updated tests for the new behavior.
2026-05-22 15:51:32 +09:00
can1357 3e21ab8980 fix(coding-agent/modes): applied working-message accent to interactive spinner
- Updated interactive mode to render the loader spinner with the current working message accent when available.
- Added a fallback to theme accent and a reset color code when no working-message accent is provided.
2026-05-22 15:48:14 +09:00
Can Bölük 3868c3234b Merge remote-tracking branch 'origin/farm/0f01bcdc/chatgpt-plus-pro-codex-subscription-auth' 2026-05-22 15:42:02 +09:00
can1357 4ada748c61 feat(modes): added ANSI-capable shimmer accents to loading messages
- Loading message rendering now derived session-specific accent colors and applied them to shimmer output when a session name was available.
- Shimmer palettes were updated to accept raw ANSI color values as well as theme color names during compilation.
- A unit test was added to confirm shimmer text rendered with a supplied ANSI crest color.
2026-05-22 15:40:58 +09:00
roboomp c246d88dbb fix(ai): prevent Codex OAuth 403 from port-fallback redirect_uri mismatch
- OpenAICodexOAuthFlow now passes a fixed redirectUri option to
  OAuthCallbackFlow, preventing the silent fallback to a random port.
  OpenAI's /oauth/authorize accepts any localhost redirect URI (loose
  validation), so the browser callback could succeed even on a non-1455
  port; but /oauth/token rejects it with 403 because the port is not
  in the registered allowlist. The fix surfaces port conflicts as an
  immediate actionable error instead.
- exchangeCodeForToken now reads the 403 response body (error /
  error_description) and includes it in the thrown message, matching
  the existing refreshOpenAICodexToken error handling.
- Added loginOpenAICodexDevice (openai-codex-device provider): device-
  code flow via /api/accounts/deviceauth/usercode + polling, avoiding a
  local callback server entirely. Credentials are stored under the
  existing 'openai-codex' key so no model or tooling reconfiguration is
  needed. Useful when port 1455 is unavailable or the browser flow is
  blocked by network/proxy.

Fixes #1277
2026-05-22 04:47:46 +00:00
can1357 3ecfac846c chore: bump version to 15.2.3 2026-05-22 13:34:49 +09:00
can1357 a13c9bf6fc feat(coding-agent): added SettingsList#setItems with clamped selection
- Added SettingsList#setItems to replace items and clamp selection to a valid index after updates.
- Updated SettingsSelector to rebuild active memory items on backend changes and skip refresh when appropriate.
- Switched MCP wizard and command spinners to theme frames with themed initial frame and 80ms updates.
- Reworked welcome intro animation for a 3-second eased sweep with optional shine blending.
- Added memory backend refresh tests and aligned package changelogs with the updated behavior.
2026-05-22 13:19:35 +09:00
can1357andCan Bölük 796f963da9 feat(coding-agent): added coding-agent follow-up queue with onBeforeYield
- Added optional `onBeforeYield` configuration and `setOnBeforeYield` in Agent, executed before follow-up checks.
- Added `YieldQueue` to `AgentSession`, with setup/teardown and streaming/idle flush via `setOnBeforeYield`.
- Replaced immediate async-result follow-up dispatch with queued batch entries, including stale-state suppression.
- Added MCP follow-up queueing in SDK, deduplicating updates by `serverName` and `uri`.
- Added changelog entries for `onBeforeYield`, async-result batching, MCP dedupe, and `display.shimmer` modes.
- Added yield queue unit tests for streaming emission, debounced idle batches, stale filtering, and error isolation.
2026-05-22 13:08:51 +09:00
can1357 e39b48c405 feat(coding-agent): added shimmer modes and tuned loader timing cadence
- Added `display.shimmer` setting (`classic`, `kitt`, `disabled`) with default `classic` and UI metadata.
- Added shimmer mode resolution with defaulting plus classic/KITT intensity tier profiles and thresholds.
- Added `getFgAnsi` handling across shimmer compilation and progress-bar themes, with fallback ANSI output defaults.
- Reworked shimmer rendering to coalesce same-tier segments, cache palettes by symbol, and map disabled mode to mid-tier.
- Tuned loader timing to a 16ms render interval and 80ms spinner stepping for smoother ~60fps updates.
2026-05-22 13:03:03 +09:00
can1357 1228c96959 feat(coding-agent): added worktree list/clear CLI with orphan pruning
- Added the new `omp worktree` (`wt`) command with `list|clear`, `all/dry-run/json` options, and CLI registration.
- Added `listWorktrees`/`clearWorktrees` flows that scan worktrees, classify orphaned entries, emit JSON, and call `worktree.prune`.
- Replaced legacy path encoding with `hashPath` via `getWorktreeDir`, updating task isolation, storage keys, and PR checkout paths.
- Added bounded PR worktree path retries before `git worktree add` and updated checkout-path tests for hashed names.
2026-05-22 12:47:13 +09:00
can1357 cf94ded9d3 chore: bump version to 15.2.2 2026-05-22 11:29:03 +09:00
Can Bölük 4280f67ea8 Merge remote-tracking branch 'origin/farm/09bef25d/429-rate-limit-for-250k-token-min-trigge' 2026-05-22 11:28:36 +09:00
Can Bölük b66fd61b51 Merge remote-tracking branch 'origin/farm/b71ca8c7/cloud-code-assist-api-error-antigravity-' 2026-05-22 11:28:24 +09:00
Can Bölük 5da20dbda9 Merge remote-tracking branch 'origin/farm/64aed46f/404-error-when-calling-gemini-model-via-' 2026-05-22 11:28:13 +09:00
Can Bölük cb032371c3 Merge remote-tracking branch 'origin/farm/8f673404/rules-md-does-not-seem-to-be-injected' 2026-05-22 11:27:51 +09:00
Can Bölük 8e7a46588b Merge remote-tracking branch 'origin/farm/488a64b7/browser-stealth-script-crashes-when-docu' 2026-05-22 11:27:05 +09:00
roboomp 00179413cb chore: update lockfile after bun install 2026-05-22 00:34:14 +00:00