From 842ad711ff4306ecf546a9104a4e0f31a4d765ef Mon Sep 17 00:00:00 2001 From: fylorn <249551762+fylorn@users.noreply.github.com> Date: Mon, 19 Oct 2026 14:34:51 +0800 Subject: [PATCH] v0.77.0 Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 38 +++++++++++++++++++------------------- Cargo.toml | 2 +- release-notes/0.77.0.md | 13 +++++++++++++ 3 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 release-notes/0.77.0.md diff --git a/Cargo.lock b/Cargo.lock index aa6d27e0..07f69193 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3143,7 +3143,7 @@ dependencies = [ [[package]] name = "tw-api" -version = "0.76.0" +version = "0.77.0" dependencies = [ "serde", "serde_json", @@ -3154,7 +3154,7 @@ dependencies = [ [[package]] name = "tw-bedrock" -version = "0.76.0" +version = "0.77.0" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -3175,7 +3175,7 @@ dependencies = [ [[package]] name = "tw-breaker" -version = "0.76.0" +version = "0.77.0" dependencies = [ "serde", "serde_json", @@ -3183,7 +3183,7 @@ dependencies = [ [[package]] name = "tw-config" -version = "0.76.0" +version = "0.77.0" dependencies = [ "blake3", "libc", @@ -3208,7 +3208,7 @@ dependencies = [ [[package]] name = "tw-control" -version = "0.76.0" +version = "0.77.0" dependencies = [ "axum", "base64", @@ -3251,7 +3251,7 @@ dependencies = [ [[package]] name = "tw-dialect" -version = "0.76.0" +version = "0.77.0" dependencies = [ "memchr", "serde", @@ -3260,7 +3260,7 @@ dependencies = [ [[package]] name = "tw-engine" -version = "0.76.0" +version = "0.77.0" dependencies = [ "chrono", "serde", @@ -3274,7 +3274,7 @@ dependencies = [ [[package]] name = "tw-gateway" -version = "0.76.0" +version = "0.77.0" dependencies = [ "arc-swap", "async-stream", @@ -3325,7 +3325,7 @@ dependencies = [ [[package]] name = "tw-guard" -version = "0.76.0" +version = "0.77.0" dependencies = [ "aho-corasick", "base64", @@ -3343,7 +3343,7 @@ dependencies = [ [[package]] name = "tw-link" -version = "0.76.0" +version = "0.77.0" dependencies = [ "serde", "serde_json", @@ -3357,7 +3357,7 @@ dependencies = [ [[package]] name = "tw-observe" -version = "0.76.0" +version = "0.77.0" dependencies = [ "tokio", "tracing", @@ -3366,7 +3366,7 @@ dependencies = [ [[package]] name = "tw-plugin" -version = "0.76.0" +version = "0.77.0" dependencies = [ "libc", "rand 0.10.2", @@ -3381,7 +3381,7 @@ dependencies = [ [[package]] name = "tw-pricing" -version = "0.76.0" +version = "0.77.0" dependencies = [ "arc-swap", "flate2", @@ -3394,14 +3394,14 @@ dependencies = [ [[package]] name = "tw-secret" -version = "0.76.0" +version = "0.77.0" dependencies = [ "thiserror", ] [[package]] name = "tw-store" -version = "0.76.0" +version = "0.77.0" dependencies = [ "blake3", "bytes", @@ -3421,7 +3421,7 @@ dependencies = [ [[package]] name = "tw-types" -version = "0.76.0" +version = "0.77.0" dependencies = [ "serde", "serde_json", @@ -3430,7 +3430,7 @@ dependencies = [ [[package]] name = "tw-watch" -version = "0.76.0" +version = "0.77.0" dependencies = [ "libc", "notify", @@ -3441,7 +3441,7 @@ dependencies = [ [[package]] name = "tw-yaml" -version = "0.76.0" +version = "0.77.0" dependencies = [ "saphyr-parser", "serde_yaml_ng", @@ -3451,7 +3451,7 @@ dependencies = [ [[package]] name = "twcore" -version = "0.76.0" +version = "0.77.0" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index 8d4796e5..8ba3c123 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,7 @@ categories = ["network-programming", "web-programming::http-server"] # 二进制走 CalVer,crate 走 SemVer —— 两者是两回事,卖给不同的人。 # 这里是 crate 的版本。 -version = "0.76.0" +version = "0.77.0" [workspace.dependencies] # ── 内部 crate ─────────────────────────────────────────── diff --git a/release-notes/0.77.0.md b/release-notes/0.77.0.md new file mode 100644 index 00000000..2f9f30d4 --- /dev/null +++ b/release-notes/0.77.0.md @@ -0,0 +1,13 @@ +This release stops the tool-call check from deciding on arguments that are still arriving, and records hits that are only logged with the whole call. + +**Upgrade notes** + +- The control-plane protocol version is still 49. ThinkWatch Lite releases with protocol 49 work with 0.77.0. +- The request store's schema and the configuration are unchanged; nothing is cleared. +- For crates that embed `tw_guard`: `Wall::cut_early` and `Wall::finish` are new. Pass `cut_early(false)` when the stream cannot be cut (observe mode), and call `finish()` when a stream ends normally, so Chat calls without a `finish_reason` or `[DONE]` are checked. `Rule::find_in` and `Rule::find_all_in` are new; `Rule::find` and `Rule::find_all` behave as before. + +**Tool calls in streamed answers.** The streaming check looked at the arguments as far as they had arrived. A destination cut off in the middle of its host looked like an external host, and a hit that was only recorded was written at that moment, with the rest of the call missing. +- A hit on arguments that are still arriving counts only once it is settled. A host cut off at `http://127` (before `.0.0.1`) is no longer taken for an external one, and a `$` or `\b` at the end of what has arrived no longer fires. A credential at the very end is not counted until it is complete. +- While a call streams, only rules that cut are checked, so a cut still happens as early as possible. Every rule runs again on the complete call: Anthropic `content_block_stop`, Responses `output_item.done`, Chat `finish_reason`, `[DONE]` or the end of the stream. A hit that is only recorded, and every hit in observe mode, is recorded with the whole call. +- The end of a stream (bytes held back to restore placeholders, and the closing frames of a converted stream) now goes through the check too. +- `-T` counts as uploading a file only inside a curl command. `docker compose exec -T` and `ssh -T`, which turn off the terminal, no longer look like uploads.