Commit Graph

912 Commits

Author SHA1 Message Date
程序员阿江(Relakkes) a24931002d fix(mcp): enforce disabled state across active sessions 2026-09-10 18:09:43 +08:00
程序员阿江(Relakkes) 7004677af1 merge: integrate QA-003 retention fix 2026-09-10 17:59:49 +08:00
程序员阿江(Relakkes) 85650d70db fix: honor disabled session retention across writes and resume 2026-09-10 17:58:58 +08:00
程序员阿江(Relakkes) e2478bb083 fix(desktop): preserve provider 1m flags in runtime selection 2026-09-10 17:56:12 +08:00
程序员阿江(Relakkes) 2da1e9a7f0 merge: add computer-use screenshot pixel dimensions 2026-09-10 16:30:56 +08:00
程序员阿江(Relakkes) 0fff908e0e fix(computer-use): include pixel dimensions with screenshots 2026-09-10 16:30:22 +08:00
程序员阿江(Relakkes) 74f87a27e4 revert(session): remove protocol-based session restrictions
Revert efe5cae19 so existing sessions remain usable and models can be
switched without protocol admission checks. Retain the additive index
schema for already-upgraded caches and rebuild their summaries.
2026-09-10 14:00:50 +08:00
程序员阿江(Relakkes) 56c6a9aa8e feat(computer-use): align native app automation with Codex
Add a persistent isolated JavaScript worker for native app actions and batch
known operations without a model round trip between each input. Preserve
per-cell context, native errors, screenshot coordinates, and image types.

Align macOS gesture, key, inventory, capture, scroll, and clipboard behavior;
include a signed native receiver fixture and compiled sidecar regression tests.
Keep the Windows pixel route and fix cancellation with session-owned mouse
cleanup, lock revalidation, and portable signing-fixture tests.
2026-09-10 03:34:39 +08:00
程序员阿江(Relakkes) a2b3f59aaf feat(session): keep transcripts for 365 days by default
Transcripts now default to a 365-day retention and can be changed from
Settings > General, where a change previews how many files the new window
removes and requires confirmation before anything is deleted. Plans, file
history, debug logs, pastes and agent worktrees keep the previous 30-day
window instead of inheriting the transcript setting.

Also cleans subagent transcripts together with their parent session, and
restricts the bulk cleanup endpoint to the desktop process token so an H5
token cannot wipe every transcript in one request.
2026-09-09 23:24:38 +08:00
程序员阿江(Relakkes) efe5cae19e fix(session): lock model switching to the session API protocol 2026-09-09 23:05:33 +08:00
程序员阿江(Relakkes) 9c731d8ea5 feat(provider): add ApiSmart sponsorship and image generation support 2026-09-09 21:32:04 +08:00
程序员阿江(Relakkes) e2b636081a fix(computer-use): preserve window identity and snapshots after overlay failure 2026-09-09 20:30:05 +08:00
程序员阿江(Relakkes) 8546f43ec3 fix(desktop): load older sessions while scrolling within projects 2026-09-08 16:05:48 +08:00
程序员阿江(Relakkes) 0d8a1a11fa fix(desktop): add bounded full session history browsing
Keep historical conversations reachable beyond the recent sidebar limit, hydrate only opened sessions, and restore old tabs through metadata-only lookups. Preserve newer metadata across history and restore races. Refs #1287.
2026-09-08 15:32:36 +08:00
程序员阿江(Relakkes) f0acdc4ce0 fix(anthropic): avoid duplicate /v1 in compatible endpoints (#1279)
Normalize a terminal API version at Anthropic request boundaries while
preserving gateway prefixes and saved provider settings. Cover SDK messages,
token counting, proxy streams, connectivity, titles, files, and recovery CLI.

Fixes #1279
2026-09-08 15:32:36 +08:00
zhb 7d13cc6d3c fix(model): preserve provider capabilities across context markers
Use the shared model identity rules for capability matching and cache keys.
Preserve Fable overrides and explicit capability opt-outs across 1M aliases.
2026-09-08 15:32:36 +08:00
程序员阿江(Relakkes) 3b8531bba6 fix(api): preserve explicit context betas for Anthropic relays 2026-09-08 15:08:12 +08:00
程序员阿江(Relakkes) 82447fcf23 fix(proxy): preserve DeepSeek vision images in OpenAI chat (#1304) 2026-09-08 15:08:12 +08:00
程序员阿江(Relakkes) 5c48991967 fix(openai): stop policy rejection retries and support Astra context
Adapt structured policy-error handling and Astra model metadata from sub2api's recent compatibility updates. Preserve rejection codes through HTTP and SSE, stop retry and non-streaming replay, and add Astra's effective context to the official runtime.

Reference: https://github.com/Wei-Shaw/sub2api/pull/6636 and https://github.com/Wei-Shaw/sub2api/pull/6572. Implementation uses the existing TypeScript runtime and local regression harnesses.
2026-09-08 15:08:12 +08:00
程序员阿江(Relakkes) 6c6c4d08a2 fix(openai): use desktop OAuth credentials for model discovery 2026-09-08 15:08:12 +08:00
程序员阿江(Relakkes) cfc15ecbf6 Merge remote-tracking branch 'origin/main' into fix/pr-1301-maintainer 2026-09-07 23:39:51 +08:00
程序员阿江(Relakkes) a981779996 test(server): synchronize inspection and cancellation regressions 2026-09-07 23:35:01 +08:00
程序员阿江(Relakkes) 2d2fc1b432 test(history): wait for complete records after append rollback 2026-09-07 23:10:14 +08:00
程序员阿江(Relakkes) 8e6664f7e9 test(proxy): cover Anthropic upstream failure traces 2026-09-07 23:09:52 +08:00
程序员阿江(Relakkes) eb5726297c fix(media): harden proxy forwarding and packaged image loading 2026-09-07 23:02:13 +08:00
程序员阿江(Relakkes) 2845d29873 test(mcp): restore mocked modules between regression suites 2026-09-07 22:56:52 +08:00
程序员阿江(Relakkes) 01c0dfc585 fix(mcp): preserve newer connections during stale cleanup 2026-09-07 22:53:10 +08:00
程序员阿江(Relakkes) f0ebaf8b64 Merge remote-tracking branch 'origin/main' into fix/pr-1301-maintainer 2026-09-07 22:47:14 +08:00
程序员阿江(Relakkes) ff7b7812ac Merge remote-tracking branch 'origin/main' into fix/pr-1299-maintainer 2026-09-07 22:47:09 +08:00
程序员阿江(Relakkes) 8a4be0dee7 fix(ci): make runtime validation portable to Linux 2026-09-07 21:56:11 +08:00
程序员阿江(Relakkes) 9c081af746 fix(models): complete Fable 5.1 runtime compatibility 2026-09-07 21:41:31 +08:00
程序员阿江(Relakkes) 823f95fad6 Merge remote-tracking branch 'origin/main' into fix/fable-5-1-runtime 2026-09-07 21:26:23 +08:00
vzionv 0bb641ecc6 test: verify tool result media across API boundaries 2026-09-06 23:53:32 +08:00
vzionv 4b181facc4 fix: preserve tool result media across provider and MCP paths 2026-09-06 22:33:53 +08:00
vzionv 001a62efe4 test: add MCP reconnect race coverage
Cover MCP connection-close lifecycle, automatic retry outcomes, headless reconnect and toggle flows, stale OAuth results, and MCP state replacement with deterministic mocks. Configure the headless tests with an isolated placeholder credential so they exercise no live provider.
2026-09-06 09:30:35 +08:00
vzionv 51d4a52832 fix: close stale reconnect results without racing re-enable
Stale connections closed by the disabled-state guard now go through
client.cleanup() so their caches are cleared by the close handler at
close time, never by a post-close invalidation that could hit a
connection created by a concurrent re-enable. The post-OAuth reconnect
gets the same disabled check, with the config check and disabled state
write kept synchronous (no await in between) so a later enable cannot
be overwritten by the stale OAuth result.
2026-09-06 08:59:21 +08:00
vzionv 65a9fedcfe fix: keep disabled state across in-flight reconnect results
A reconnect request that completes after the server was disabled no
longer overwrites the disabled state. Connection attempts fold into
disabled when the config no longer allows the server, closing any
fresh connection and clearing its caches; the mcp_toggle enable and
mcp_reconnect handlers apply the same check before writing their
results, and the reconnect failure path keeps disabled when the server
was disabled mid-flight.
2026-09-06 08:59:21 +08:00
vzionv b6fced9af5 refactor: unify MCP connection close handling and disable paths
A single onclose registered at connection creation now clears caches
and notifies a session-registered handler that updates AppState and
decides whether to reconnect; it is unregistered on unmount so shutdown
closes never reconnect. Disabling a connected server clears its caches
and updates AppState directly, so the disabled state never depends on
the close handler firing (headless sessions and cleanup failures
included). Queued disabled updates are dropped when the server was
re-enabled before the batch flush.
2026-09-06 08:59:20 +08:00
程序员阿江(Relakkes) 817ced2061 test(skills): cover Computer Use settings transitions in slash commands 2026-09-06 04:10:29 +08:00
程序员阿江(Relakkes) fe7ea03b86 chore(sponsors): retire expired placements while preserving saved providers 2026-09-06 00:10:51 +08:00
程序员阿江(Relakkes) 814c02a786 feat(im): add scan-to-create Feishu bots plus WeCom, QQ and Slack adapters
Connecting Feishu meant creating a bot by hand on the open platform and
pasting an App ID and App Secret back. Feishu also exposes an RFC 8628
device-authorization flow, so the desktop can now render a QR code, and
confirming it in the app creates the bot and stores its credentials
directly. `adapters/feishu/registration.ts` implements that protocol
rather than importing `registerApp` from `@larksuiteoapi/node-sdk@1.73`:
the repository pins 1.60 for the chat client, and the SDK runs the whole
poll inside one un-cancellable promise where the desktop needs the
stateless begin/poll pair the DingTalk registration already uses. The
scan is create-only, so it can never rewrite the configuration of a bot
the user already runs, and it pre-fills exactly the scopes, events and
callbacks this adapter calls. International tenants finish on Lark's
domain, which is now persisted and honoured by the client.

WeCom, QQ and Slack join the same session model. WeCom and QQ bind by
scanning; Slack has no scan flow, so it uses an app manifest that
pre-fills the scopes and Socket Mode. All three run over long
connections, so no public callback URL is needed, and all three accept
private chats only — pairing authorizes one person, and answering in a
group would extend that authorization to everyone else in the room.

They are built on a new `adapters/common/chat-runtime.ts` instead of a
fourth copy of the loop the five existing adapters each carry. A platform
supplies a `ChatPort` — how to say something, how to open a streaming
reply, optionally how to send an image — and the runtime owns pairing,
command routing, session restore, permission bookkeeping and the
translation of the server's stream. The existing five are deliberately
left on their own copies; migrating them is a separate change with its
own regression surface.

Attachments are downloaded through a deferred loader that runs after the
pairing gate and inside the per-chat queue. Resolving them eagerly would
let an unpaired stranger make the adapter fetch bytes and write them
under ~/.claude/im-downloads — on Slack with the bot token attached —
and would let a slow attachment overtake a text message sent after it.

The sidecar launcher's per-adapter branches become one table. It is
declared above the mode dispatch on purpose: `runAdapters` is hoisted and
runs at module top level, so a table declared below it is still in its
temporal dead zone when the adapters mode reads it — which type checks,
lints and unit tests all miss, and only the compiled binary reveals.

Verified with the checks `check:impact` selects: adapters, server,
desktop, electron, policy, chat-contract, agent-flow, docs, native
(sidecar compile, packaging and an adapters-mode smoke against the real
binary) and coverage. The scan flows themselves are not verified against
live platforms — that needs real WeCom, QQ and Slack accounts and would
create real bots.

Claude-Session: https://claude.ai/code/session_01CCGoP316AK7wdQG3Ms6Uwq
2026-09-05 23:46:50 +08:00
Relakkes Yang 90a4a11d28 fix(computer-use): remove per-app approval prompts 2026-09-05 03:09:15 +08:00
Relakkes Yang d93d8248c9 fix(computer-use): align Windows virtual cursor with macOS 2026-09-04 23:35:10 +08:00
MAC ca43297dae feat(models): add Fable 5.1 with reasoning effort support
Add claude-fable-5-1 (Fable 5.1) to the official model catalog and the
server fallback model list, with reasoning effort enabled
(low/medium/high/xhigh/max, default high) to match Opus 4.8 / Sonnet 5.
Previously only Fable 5 was selectable.

Update the affected fixtures in ModelSelector and settings API tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MxSMcKdN6WWQjtJEUhLGR
2026-09-02 21:53:58 +08:00
程序员阿江(Relakkes) 19e88db8ea fix(computer-use): keep startup enumeration out of turns 2026-09-02 10:43:12 +08:00
程序员阿江(Relakkes) 7dd09a4964 fix(computer-use): retire daemon on client shutdown 2026-09-02 09:53:45 +08:00
程序员阿江(Relakkes) 79f15a08a4 fix(trace): preserve semantics for truncated requests 2026-09-02 09:05:52 +08:00
程序员阿江(Relakkes) f3d23631cf fix(rewind): scope checkpoints to replacement turns 2026-09-02 09:04:36 +08:00
程序员阿江(Relakkes) 4926a00232 fix(desktop): clarify cached token usage 2026-09-02 09:00:42 +08:00
程序员阿江(Relakkes) 8d8169ea70 fix(models): add GLM 5.3 reasoning capabilities (#1283) 2026-09-01 21:56:49 +08:00