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
38 changes: 19 additions & 19 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ───────────────────────────────────────────
Expand Down
13 changes: 13 additions & 0 deletions release-notes/0.77.0.md
Original file line number Diff line number Diff line change
@@ -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.
Loading