From c2fe76bd66cb150a80448005b1653d302a869304 Mon Sep 17 00:00:00 2001 From: fylorn <249551762+fylorn@users.noreply.github.com> Date: Thu, 24 Sep 2026 11:50:36 +0800 Subject: [PATCH] Use core v0.40.0: one circuit-breaker state machine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Core v0.40.0 moves the upstream breaker onto tw-breaker, the state machine the server edition's route and MCP breakers now run too. The desktop keeps its policy — three consecutive failures, a 60-second cooldown, one probe — and its own rules: fail open when every provider is down, no breaker at all for a single provider. A provider whose cooldown is over reads "ok" on the upstreams page, as before. tw-api, CONTROL_API_VERSION and the message codes are unchanged. Co-authored-by: Claude Opus 5.5 --- src-tauri/Cargo.lock | 8 ++++---- src-tauri/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 079667f1..79cc6a2d 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -5067,8 +5067,8 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tw-api" -version = "0.39.0" -source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.39.0#8c424b92688b7bb54f6b71645d47afdc7fb30783" +version = "0.40.0" +source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.40.0#579217ac4addeceb0858c7b744dd9fc38a2a070c" dependencies = [ "serde", "serde_json", @@ -5077,8 +5077,8 @@ dependencies = [ [[package]] name = "tw-types" -version = "0.39.0" -source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.39.0#8c424b92688b7bb54f6b71645d47afdc7fb30783" +version = "0.40.0" +source = "git+https://github.com/ThinkWatchProject/ThinkWatch-Core.git?tag=v0.40.0#579217ac4addeceb0858c7b744dd9fc38a2a070c" dependencies = [ "serde", "serde_json", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 35f858e3..05b77422 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -31,7 +31,7 @@ tauri-plugin-deep-link = "2" # 编出来的东西不一样;而更要紧的是,打进 `.app` 的那个 twcore 二进制 # 必须和这里编译进去的协议镜像来自同一个 core 版本 —— 打包脚本正是从 # 这个 tag 去取二进制的(见 scripts/fetch-core.sh)。 -tw-api = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.39.0" } +tw-api = { git = "https://github.com/ThinkWatchProject/ThinkWatch-Core.git", tag = "v0.40.0" } anyhow = "1" # 生成控制面的凭据(见 src/token.rs)