Yue_chen and Claude Opus 4.8
a680d8fcfa
fix(tools): gate write_file overwrite guidance on available tools
...
#3150 reworded write_file's description, overwrite parameter, and guard
error to prefer append_file/edit_file. But those tools register via their
own enable flags and the per-agent allowlist, so a config exposing only
write_file was steered toward tools it does not have — a dead end in the
most restrictive setups.
WriteFileTool now tracks which non-destructive alternatives are available
and names only the ones present; when none are, the guard still blocks the
overwrite without pointing anywhere. The agent wiring registers the editors
before write_file and resolves availability via registry.HasRegistered,
which reflects both the enable flag and the allowlist.
Tests: conditional copy at the tool level (none/one/both) and agent wiring
across the enable-flag and allowlist dimensions.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-07 20:40:27 +08:00
..
2026-05-19 16:38:47 +08:00
2026-05-19 16:38:47 +08:00
2026-07-04 14:04:37 +08:00
2026-05-11 16:13:27 +08:00
2026-06-14 21:22:53 +02:00
2026-04-21 10:55:50 +08:00
2026-05-08 13:48:47 +02:00
2026-05-08 13:48:47 +02:00
2026-07-02 15:23:35 +02:00
2026-05-22 10:06:40 +08:00
2026-04-26 15:36:03 +08:00
2026-06-30 17:42:07 +08:00
2026-05-05 19:24:15 +02:00
2026-05-04 13:10:02 +02:00
2026-07-04 04:14:03 +08:00
2026-04-21 10:55:50 +08:00
2026-05-05 19:36:09 +08:00
2026-06-14 21:22:53 +02:00
2026-06-14 21:22:53 +02:00
2026-05-18 21:11:21 +02:00
2026-05-18 21:11:21 +02:00
2026-04-03 14:15:20 +08:00
2026-07-04 14:04:37 +08:00
2026-07-04 14:04:37 +08:00
2026-04-13 11:04:45 +08:00
2026-05-26 14:05:20 +08:00
2026-04-08 10:57:22 +08:00
2026-07-04 14:04:37 +08:00
2026-04-15 20:18:09 +08:00
2026-06-06 00:28:32 +08:00
2026-06-08 16:52:00 +08:00
2026-03-29 14:06:19 +02:00
2026-03-29 23:41:32 +02:00
2026-05-08 22:23:50 +02:00
2026-05-08 22:23:50 +02:00
2026-04-13 22:51:44 +08:00
2026-04-13 22:51:44 +08:00
2026-06-30 17:42:07 +08:00
2026-06-30 17:42:07 +08:00
2026-05-11 16:13:27 +08:00
2026-04-26 16:55:02 +08:00
2026-04-27 13:09:03 +08:00
2026-05-11 16:13:27 +08:00
2026-06-24 23:29:46 +08:00
2026-06-24 23:29:46 +08:00
2026-04-27 13:09:03 +08:00
2026-04-27 13:09:03 +08:00
2026-04-26 16:28:41 +08:00
2026-04-26 16:39:35 +08:00
2026-04-26 16:39:35 +08:00
2026-04-26 16:55:02 +08:00
2026-07-07 20:40:27 +08:00
2026-07-07 20:40:27 +08:00
2026-05-11 16:13:27 +08:00
2026-06-06 00:32:49 +08:00
2026-06-13 11:38:08 +02:00
2026-02-27 16:35:07 +08:00
2026-02-19 22:05:15 +02:00
2026-05-20 13:42:21 +08:00
2026-05-20 13:42:21 +08:00
2026-05-11 16:13:27 +08:00
2026-06-13 00:25:45 +02:00
2026-05-22 10:06:40 +08:00
2026-06-22 15:38:46 +02:00
2026-06-13 11:38:08 +02:00
2026-05-21 11:07:39 +08:00
2026-06-22 13:15:35 +02:00
2026-04-21 10:55:50 +08:00
2026-05-22 10:06:40 +08:00
2026-05-22 10:06:40 +08:00
2026-06-13 11:38:08 +02:00
2026-06-13 00:25:45 +02:00
2026-03-29 22:43:20 +02:00
2026-05-08 22:23:50 +02:00
2026-06-15 01:32:13 +08:00
2026-04-26 19:28:26 +08:00
2026-04-26 16:23:58 +08:00
2026-05-22 13:15:56 +08:00
2026-05-04 08:41:17 +02:00
2026-05-07 11:25:41 +08:00
2026-05-22 10:06:40 +08:00
2026-03-05 09:51:18 +08:00
2026-05-21 11:07:39 +08:00
2026-05-09 10:35:13 +02:00
2026-05-09 10:35:13 +02:00
2026-04-26 16:55:02 +08:00
2026-06-02 19:58:09 +08:00
2026-06-13 11:38:08 +02:00
2026-05-22 10:06:40 +08:00
2026-05-22 13:42:35 +08:00
2026-05-19 09:18:39 +02:00
2026-06-14 21:22:53 +02:00