diff --git a/Cargo.lock b/Cargo.lock index 3f760c20..9509e589 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2492,7 +2492,7 @@ dependencies = [ [[package]] name = "tw-api" -version = "0.51.0" +version = "0.52.0" dependencies = [ "serde", "serde_json", @@ -2502,7 +2502,7 @@ dependencies = [ [[package]] name = "tw-breaker" -version = "0.51.0" +version = "0.52.0" dependencies = [ "serde", "serde_json", @@ -2510,7 +2510,7 @@ dependencies = [ [[package]] name = "tw-config" -version = "0.51.0" +version = "0.52.0" dependencies = [ "blake3", "libc", @@ -2534,7 +2534,7 @@ dependencies = [ [[package]] name = "tw-control" -version = "0.51.0" +version = "0.52.0" dependencies = [ "axum", "base64", @@ -2573,7 +2573,7 @@ dependencies = [ [[package]] name = "tw-dialect" -version = "0.51.0" +version = "0.52.0" dependencies = [ "serde", "serde_json", @@ -2581,7 +2581,7 @@ dependencies = [ [[package]] name = "tw-engine" -version = "0.51.0" +version = "0.52.0" dependencies = [ "serde", "serde_json", @@ -2594,7 +2594,7 @@ dependencies = [ [[package]] name = "tw-gateway" -version = "0.51.0" +version = "0.52.0" dependencies = [ "arc-swap", "async-stream", @@ -2638,7 +2638,7 @@ dependencies = [ [[package]] name = "tw-guard" -version = "0.51.0" +version = "0.52.0" dependencies = [ "base64", "regex", @@ -2651,7 +2651,7 @@ dependencies = [ [[package]] name = "tw-link" -version = "0.51.0" +version = "0.52.0" dependencies = [ "serde", "serde_json", @@ -2665,7 +2665,7 @@ dependencies = [ [[package]] name = "tw-observe" -version = "0.51.0" +version = "0.52.0" dependencies = [ "tokio", "tracing", @@ -2674,7 +2674,7 @@ dependencies = [ [[package]] name = "tw-pricing" -version = "0.51.0" +version = "0.52.0" dependencies = [ "arc-swap", "flate2", @@ -2687,14 +2687,14 @@ dependencies = [ [[package]] name = "tw-secret" -version = "0.51.0" +version = "0.52.0" dependencies = [ "thiserror", ] [[package]] name = "tw-store" -version = "0.51.0" +version = "0.52.0" dependencies = [ "bytes", "rusqlite", @@ -2711,7 +2711,7 @@ dependencies = [ [[package]] name = "tw-types" -version = "0.51.0" +version = "0.52.0" dependencies = [ "serde", "serde_json", @@ -2720,7 +2720,7 @@ dependencies = [ [[package]] name = "tw-watch" -version = "0.51.0" +version = "0.52.0" dependencies = [ "notify", "tempfile", @@ -2730,7 +2730,7 @@ dependencies = [ [[package]] name = "tw-yaml" -version = "0.51.0" +version = "0.52.0" dependencies = [ "saphyr-parser", "serde_yaml_ng", @@ -2740,7 +2740,7 @@ dependencies = [ [[package]] name = "twcore" -version = "0.51.0" +version = "0.52.0" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index 860d9c06..e634b741 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ categories = ["network-programming", "web-programming::http-server"] # 二进制走 CalVer,crate 走 SemVer —— 两者是两回事,卖给不同的人。 # 这里是 crate 的版本。 -version = "0.51.0" +version = "0.52.0" [workspace.dependencies] # ── 内部 crate ─────────────────────────────────────────── diff --git a/release-notes/0.52.0.md b/release-notes/0.52.0.md new file mode 100644 index 00000000..92335521 --- /dev/null +++ b/release-notes/0.52.0.md @@ -0,0 +1,13 @@ +This release hands ThinkWatch Lite the upstream and proxy settings as they are written in the configuration, so its edit dialogs can show them, and stops repeating the version segment when an upstream's base URL ends with it. + +**Upgrade notes** + +- The control-plane protocol version (`CONTROL_API_VERSION`) is now 25. ThinkWatch Lite connects only to a core with the same protocol version, and has to regenerate its protocol types from this release to use it. ThinkWatch Lite 2026.9.18 includes 0.51.0 (protocol 24) and does not connect to 0.52.0: a server used with it stays on 0.51.0 until the app is updated to a release that includes 0.52.0. `sudo twcore upgrade --version 0.51.0 --restart` switches a server back to 0.51.0. +- The request store's schema is unchanged (21). Upgrading from 0.50.x or 0.51.0 keeps the request history. +- Changed in the protocol: `ProviderView.base_url`, `ProviderView.key` (now a string), `HeaderView.value`, the new `OAuthView.refresh` and `OAuthView.client_secret`, and `ProxyView.auth` (which replaces `has_auth`) carry the settings as written; `base_url_masked`, `SecretView` and `HeaderView.masked` are gone. `ProviderInput.base_url` is required, `ProviderInput.key` is an optional string and every `HeaderInput` has a `value`; `ProxyInput.auth` is optional. `SecretChange` and `ProxyAuthInput` are gone, and so is the message code `control.pass_has_expansion`. + +**Settings as written.** The upstream and proxy views used to mask what they showed. The base URL was cut down to its origin, so `https://bedrock-mantle.us-east-1.api.aws/v1` was shown without `/v1`, with a note that credentials had been hidden when there were none. API keys and header values were masked, and OAuth refresh tokens, client secrets and proxy credentials were left out. The app could not fill its edit dialogs in, and every save carried "keep what is saved" states instead of values. The views now carry the settings as they are written in `config.yaml`, and a save carries the whole definition. The access token of an OAuth credential stays out of the view, and an OAuth credential can still be kept as it is on save: while a dialog is open the gateway may renew the token and write back a new refresh token. `GET /config` already returned the file unmasked. Diagnostics bundles and logs still mask. + +**Proxy passwords from the environment.** A proxy password may be a `${NAME}` reference, as the configuration reference shows (`pass: ${PROXY_PASSWORD}`). A password containing `${` used to be refused. + +**Base URLs that end with a version segment.** A base URL written up to its version segment, as provider docs give it (`https://api.openai.com/v1`) and as the configuration reference says, got every request and every connection check sent to `.../v1/v1/...`: the client's path (`/v1/chat/completions`) was appended as it was. When the base URL's path ends with the version segment the request path starts with (`v1`, `v2`, `v1beta`, ...), that segment is now used once. Other segments are joined as before.