diff --git a/Cargo.lock b/Cargo.lock index 9e0abd8..ac604a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2492,7 +2492,7 @@ dependencies = [ [[package]] name = "tw-api" -version = "0.48.0" +version = "0.49.0" dependencies = [ "serde", "serde_json", @@ -2502,7 +2502,7 @@ dependencies = [ [[package]] name = "tw-breaker" -version = "0.48.0" +version = "0.49.0" dependencies = [ "serde", "serde_json", @@ -2510,7 +2510,7 @@ dependencies = [ [[package]] name = "tw-config" -version = "0.48.0" +version = "0.49.0" dependencies = [ "blake3", "libc", @@ -2534,7 +2534,7 @@ dependencies = [ [[package]] name = "tw-control" -version = "0.48.0" +version = "0.49.0" dependencies = [ "axum", "base64", @@ -2573,7 +2573,7 @@ dependencies = [ [[package]] name = "tw-dialect" -version = "0.48.0" +version = "0.49.0" dependencies = [ "serde", "serde_json", @@ -2581,7 +2581,7 @@ dependencies = [ [[package]] name = "tw-engine" -version = "0.48.0" +version = "0.49.0" dependencies = [ "serde", "serde_json", @@ -2594,7 +2594,7 @@ dependencies = [ [[package]] name = "tw-gateway" -version = "0.48.0" +version = "0.49.0" dependencies = [ "arc-swap", "async-stream", @@ -2638,7 +2638,7 @@ dependencies = [ [[package]] name = "tw-guard" -version = "0.48.0" +version = "0.49.0" dependencies = [ "base64", "regex", @@ -2651,7 +2651,7 @@ dependencies = [ [[package]] name = "tw-link" -version = "0.48.0" +version = "0.49.0" dependencies = [ "serde", "serde_json", @@ -2665,7 +2665,7 @@ dependencies = [ [[package]] name = "tw-observe" -version = "0.48.0" +version = "0.49.0" dependencies = [ "tokio", "tracing", @@ -2674,7 +2674,7 @@ dependencies = [ [[package]] name = "tw-pricing" -version = "0.48.0" +version = "0.49.0" dependencies = [ "arc-swap", "flate2", @@ -2687,14 +2687,14 @@ dependencies = [ [[package]] name = "tw-secret" -version = "0.48.0" +version = "0.49.0" dependencies = [ "thiserror", ] [[package]] name = "tw-store" -version = "0.48.0" +version = "0.49.0" dependencies = [ "bytes", "rusqlite", @@ -2711,7 +2711,7 @@ dependencies = [ [[package]] name = "tw-types" -version = "0.48.0" +version = "0.49.0" dependencies = [ "serde", "serde_json", @@ -2720,7 +2720,7 @@ dependencies = [ [[package]] name = "tw-watch" -version = "0.48.0" +version = "0.49.0" dependencies = [ "notify", "tempfile", @@ -2730,7 +2730,7 @@ dependencies = [ [[package]] name = "tw-yaml" -version = "0.48.0" +version = "0.49.0" dependencies = [ "saphyr-parser", "serde_yaml_ng", @@ -2740,7 +2740,7 @@ dependencies = [ [[package]] name = "twcore" -version = "0.48.0" +version = "0.49.0" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index ee41433..56772a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ categories = ["network-programming", "web-programming::http-server"] # 二进制走 CalVer,crate 走 SemVer —— 两者是两回事,卖给不同的人。 # 这里是 crate 的版本。 -version = "0.48.0" +version = "0.49.0" [workspace.dependencies] # ── 内部 crate ─────────────────────────────────────────── diff --git a/release-notes/0.49.0.md b/release-notes/0.49.0.md new file mode 100644 index 0000000..32c1332 --- /dev/null +++ b/release-notes/0.49.0.md @@ -0,0 +1,16 @@ +This release states how far back the route and rule hit counts reach, and reports the signed-in account in the status of a ChatGPT sign-in. Release pages now begin with a summary of the release and list the downloads for each platform with the commands for a server installation. + +**Upgrade notes** + +- The control-plane protocol version (`CONTROL_API_VERSION`) is now 22. ThinkWatch Lite connects only to a core with the same protocol version, so a server has to run the core version that the app includes. ThinkWatch Lite 2026.9.16 includes 0.47.0 (protocol 20) and does not connect to 0.49.0: a server used with it stays on 0.47.0 until the app is updated to a release that includes 0.49.0. `sudo twcore upgrade --version 0.47.0 --restart` switches a server back to 0.47.0. +- `GET /summary/routes` returns an object, `RouteStats { covered_since_ms, routes }`, instead of an array of `RouteHits`; `routes` holds what the array held. +- `ChatgptLoginStatus.plan` is removed. `ChatgptLoginStatus.account` carries the email and the plan. +- The request store's schema is unchanged (20), so 0.48.0 and 0.49.0 keep each other's request history. Upgrading from 0.47.0 or an earlier version empties the request history on the first start, as 0.48.0 does. + +**How far back the hit counts reach.** `GET /summary/routes` counts the stored requests, so its counts reach back only as far as the stored history. On a new installation, after an upgrade that emptied the request history, or when requests are kept for fewer days than the window, the oldest stored request is later than the start of the window, and before it a rule without hits is unknown rather than unused. `covered_since_ms` is the later of the window's start and the time the oldest stored request started; when it is set, it lies within the window. It is `null` when the stored history covers no part of the window: the store holds no request, or the oldest one started at or after the end of the window. + +**The account after a ChatGPT sign-in.** The status of a ChatGPT sign-in (`GET /chatgpt/login/{id}`) reports the account it signed in to in `account`, with the email and the plan. It is the same block as `ProviderView.oauth.account` and is read from the same access token, the one the sign-in saves in the configuration, so the sign-in and the upstream report the same account. + +**Release pages.** A release is titled "ThinkWatch Core" followed by its version. Its page begins with a summary of the release when one is written, followed by a table of the files for each platform, the commands that install the version on a Linux server and switch an existing installation to it, how to verify a download against its `.sha256`, and the list of pull requests. The pages of 0.47.0 and 0.48.0 carry the same sections. + +**Documentation.** The README describes installing the prebuilt binaries, the Linux install script and running `twcore` as a service on a server, and lists all of the crates, grouped by dependency order, including the three that ThinkWatch Enterprise depends on (`tw-dialect`, `tw-guard` and `tw-breaker`).