Chat tools: follow-up ids, cancel_followup, run-triggered follow-ups, show_html warnings

- schedule_followup returns the follow-up id and lists pending follow-ups;
  count-then-queue is serialised so the 3-pending bound holds under
  concurrent calls.
- cancel_followup {id} removes one of the chat's undelivered follow-ups.
- schedule_followup {run_id, on: finished|attention} queues a durable
  follow-up (7-day deadline) that is released with the run's state when the
  run ends or waits on a human; run must exist and not already meet the
  condition; watches are re-armed from the restored queue after a restart.
- show_html results warn about scripts, remote resources (blocked by the
  sandbox) and missing dark-mode support.
- The ambiguous-call error advice fits each tool instead of always
  suggesting a different title.
- references/chat.md and the SKILL.md chat paragraph document the above, and
  questions are no longer described as Claude-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 00:23:22 +00:00
parent accb9970b6
commit d275ffe643
13 changed files with 737 additions and 43 deletions
+4
View File
@@ -27,6 +27,10 @@ func TestValidateArgumentsRefusesUnknownAndMistypedFields(t *testing.T) {
{ToolNotify, `{"title":"t","message":"m","priority":"urgent"}`, "priority must be one of low, default, high"},
{ToolScheduleFollowup, `{"message":"m","after_minutes":5}`, ""},
{ToolScheduleFollowup, `{"message":"m","in_minutes":5,"delay":1}`, `unknown arguments "delay", "in_minutes"`},
{ToolScheduleFollowup, `{"message":"m","run_id":7,"on":"attention"}`, ""},
{ToolScheduleFollowup, `{"message":"m","run_id":7,"on":"done"}`, "on must be one of finished, attention"},
{ToolCancelFollowup, `{"id":"followup-1"}`, ""},
{ToolCancelFollowup, `{}`, "id is required"},
}
for _, c := range cases {
err := ValidateArguments(c.tool, json.RawMessage(c.args))