Repository navigation
Conversation
71020a7 to
60feef8
Compare
|
|
||
| What a generic client cannot do is interpret that output without learning each server's own rules: | ||
|
|
||
| - A value of `["A"]` followed by `["A", "B"]` can mean replace or append. Two clients can accept the same JSON and show different output. |
There was a problem hiding this comment.
I believe events always append? @pja-ant can you confirm?
There was a problem hiding this comment.
Thanks @LucaButBoring for the review. I agree the event stream always appends. This line is about what a client shows from each event's data: after ["A"] and then ["A", "B"], one client shows A, B because it replaces the view, and another shows A, A, B because it adds to it. Events leaves data to each event type's payloadSchema, so both readings are valid today. This SEP picks replace, and I reworded this line to say that.
There was a problem hiding this comment.
If the event stream always appends, is it not incorrect to show A, B instead of A, A, B?
There was a problem hiding this comment.
Or rather, it is not incorrect for the client to emit A, B after previously emitting A, but the host should interpret that as an append and maintain its own A, A, B if it wants to present a useful view of the data to the model (or else the model might get confused, which would be a poor user experience).
There was a problem hiding this comment.
@LucaButBoring Each event here carries the whole current view, so if the host appends them, the model sees A, A, B when the task only produced A, B. That's why this SEP picks replace for the client's view. I agree the host can still keep its own history for the model, like adding each new view as a message with its revision. I'm happy to add a line on this in the Replacement section if that helps.
| - **Author(s)**: Girish Konda (@girishkvs) | ||
| - **Sponsor**: None (seeking sponsor) | ||
| - **Extension Identifier**: `io.modelcontextprotocol/tasks` | ||
| - **Amends**: the Tasks extension ([SEP-2663](https://modelcontextprotocol.io/seps/2663-tasks-extension)), using Events ([SEP-3415](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/3415), `io.modelcontextprotocol/events`) and Task Event Sources ([ext-events#2](https://github.com/modelcontextprotocol/ext-events/pull/2)). Proposes three changes to Events. |
There was a problem hiding this comment.
FWIW I've seen little intent to accept modelcontextprotocol/ext-events#2 yet
There was a problem hiding this comment.
I think this SEP should not depend on it, so I made ext-events#2 optional. A client that has the task ID can subscribe to mcp.task.output.updated with { "taskId": ... } directly, without eventSource. The SEP also takes three rules from that PR, and I stated them in the SEP itself: the same authorization as tasks/get, the event stream ending when the task ends, and task status staying with Tasks. Let me know if that works.
Draft SEP that moves modelcontextprotocol/agents-ig#30 to ext-tasks, rebuilt on Events (SEP-3415), with Task Event Sources (ext-events#2) as an optional binding.
60feef8 to
7d05c70
Compare
Draft SEP that moves modelcontextprotocol/agents-ig#30 (bounded task-output views) to ext-tasks and rebuilds it on Events (SEP-3415), so Tasks does not get a second output channel.
mcp.task.output.updated, bound to a task througheventSourcefrom Draft: Task Event Sources ext-events#2.revision,availability(available,emptyorunavailable),maxBytesand content blocks. Over the bound means unavailable, never cut.tasks/get.truncated, and a normal end. Each comes with an alternative that needs no Events change.Related: modelcontextprotocol/modelcontextprotocol#3237, modelcontextprotocol/agents-ig#26. No sponsor yet.