Support progress notification trees for task fanout #929
jonathanhefner
started this conversation in
Ideas - General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
Currently, when sending progress notifications, there is no way to represent concurrent subtasks. If a tool kicks off a workflow with concurrent subtasks, and each subtask emits its own progress notifications, the tool must find a way to coalesce those notifications (or just drop them).
Proposal
Add a
notifications/progress/createTrackernotification that allows the sender to declare a newprogressTokento the receiver. For example:{ "jsonrpc": "2.0", "method": "notifications/progress/createTracker", "params": { "progressToken": "New progressToken from server", "parent": "Prior progressToken from client OR from another notifications/progress/createTracker" "title": "Optional human-readable label" } }Subsequent progress notifications can then use the declared
progressToken. Thus, after a tool sends an appropriatenotifications/progress/createTrackernotification, it can simply forward progress notifications that are emitted by its subtasks. Furthermore, the tool can also forwardnotifications/progress/createTrackernotifications that are emitted by its subtasks, enabling passthrough notifications from nested subtasks.Communicating subtask completion
There is an open question about how to communicate when a subtask is finished so that its progress tracker can be hidden.
One approach approach would be to add a dedicated notification, like
notifications/progress/destroyTrackerornotifications/progress/removeTracker.Another approach would be to reserve special values for
notifications/progressnotifications. For example anotifications/progressnotification with{ progress: -1, total: -1 }.Yet another approach would be to extend
notifications/progresswith an optional boolean field likedone. For example,{ progress: 100, done: true }.Beta Was this translation helpful? Give feedback.
All reactions