Module: MCPClient::Client::TaskWaitBoundaries
- Included in:
- TaskSupport
- Defined in:
- lib/mcp_client/client/task_wait_boundaries.rb
Overview
The boundaries a wait on a task can cross, and what it may still act on once it has crossed one.
A task lives in one server session and, within it, in one lifetime of its id: a restart ends it, and so does a CreateTaskResult that hands the id to another task. Either way what the wait was following is gone, and neither its TTL backstop, nor its pace, nor the answered keys of its bookkeeping say anything about what answers to that id now. This module is where the wait joins a session and a lifetime, notices that it has left one, and decides what a handle it was seeded with — or an answer that came back across the boundary — is still good for. Mixed into TaskSupport, which owns the polling loop.