feat(epic3): progress и безопасная отмена Tool calls (Story 3.4, FR-14)
- request-scoped lifecycle одного tools/call: валидированный `_meta.progressToken` (строковый/числовой, 1..=128 байт) и bounded очередь реальных этапов (tool_resolved → authorization_resolved → execution_dispatched) в собственный SSE-stream запроса; без token или без stream-carrier результат не меняется; - сериализация `notifications/progress` по pinned схеме обеих revisions (progressToken/progress/message, total не изобретается); - отмена по revision: 2025-11-25 — `notifications/cancelled` через bounded in-flight таблицу (владение = session + platform credential, не progress token); 2026-07-28 — закрытие response stream; в обоих случаях drop будущего вызова = кооперативная остановка, terminal-сообщение не отправляется; - streamed ответ сохраняет проекцию Story 3.18: closed `notifications/message` перед финальным кадром (перенос logging-scope в тело стрима); - ATDD: 12 end-to-end тестов на реальном endpoint/каталоге/counted upstream (обе revisions, malformed/oversized/reused token, owner/foreign/late cancel, disconnect, ambiguous outbound, representative client smoke) + 7 unit-тестов границ lifecycle; entry в scripts/ci-story-checks.sh.
This commit is contained in:
1 parent
49c8af24ed
commit
862cde8559
18 files changed
+2207
-112
No files matched your search
@@ -14,6 +14,11 @@ pub(super) struct ToolCallParams {
|
||||
pub(super) name: String,
|
||||
#[serde(default, deserialize_with = "deserialize_arguments_object")]
|
||||
pub(super) arguments: Option<Value>,
|
||||
/// Story 3.4: the pinned `RequestMetaObject` of this request. Only the validated
|
||||
/// `progressToken` of it is read, and only to decide whether the client asked for out-of-band
|
||||
/// progress; a malformed or foreign `_meta` never fails the call.
|
||||
#[serde(default, rename = "_meta")]
|
||||
pub(super) meta: Option<Value>,
|
||||
}
|
||||
|
||||
/// The pinned `CallToolRequest.params.arguments` is an **optional object**. Omitting it stays valid
|
||||
|
||||
Reference in new issue
Block a user