Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 39 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ categories = ["network-programming", "web-programming::http-server"]

# 二进制走 CalVer,crate 走 SemVer —— 两者是两回事,卖给不同的人。
# 这里是 crate 的版本。
version = "0.83.2"
version = "0.84.0"

[workspace.dependencies]
# ── 内部 crate ───────────────────────────────────────────
Expand Down Expand Up @@ -172,7 +172,7 @@ uuid = { version = "1", features = ["v4", "serde"] }
rand = "0.10"
# 发给 Codex 后端的请求体用 zstd 压缩(Codex 直连它时就这么发)。只要流式编码,
# 不开旧格式和字典训练
zstd = { version = "0.13", default-features = false }
zstd = { version = "0.14", default-features = false }

clap = { version = "4", features = ["derive"] }
# 配置包的口令加密(scrypt)与同步版本的密钥加密(X25519)。默认特性是空的:不要
Expand Down
16 changes: 16 additions & 0 deletions release-notes/0.84.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
This release keeps a usage history that outlives the request records, for the past-year view in ThinkWatch Lite's overview.

**Upgrade notes**

- The control-plane protocol version goes from 54 to 55.
- The request store's schema and the configuration are unchanged; nothing is cleared.
- A new file, `usage.db`, appears in the data directory next to `data.db` (permissions 0600). On first start it is filled from the request records already kept.
- No new message codes.

**Usage history.** Every finished request is added to an hourly total (UTC hours): requests, failures, input, output, cache read and cache write tokens, exact and estimated cost, requests without a price or without usage, and bytes sent and received. Locally answered requests and token counts estimated by the gateway are not included, the same as in the summaries.

- The totals live in their own file and keep their own schema version, so they are not deleted when request records pass the retention period, and not cleared when the request store is rebuilt after a schema change.
- `GET /summary/history` (`UsageHistory`) takes the same `from_ms`, `to_ms` and `bucket_ms` as `/summary/buckets` and returns the buckets plus two times: `since_ms`, from when the history has data (days before it are not recorded, not unused), and `detail_since_ms`, the oldest request record still kept (views computed from request records are empty before it).
- `/summary/buckets` and the history now share one definition of the totals.

**zstd updated.** The zstd crates move to zstd 0.14.3, zstd-safe 8.2.0 and zstd-sys 2.1.2, which fix RUSTSEC-2026-0391, RUSTSEC-2026-0398, RUSTSEC-2026-0403 and RUSTSEC-2026-0410. Compressed request bodies and Codex-bound bodies are handled as before.
Loading