| Methods |
public
|
__construct(
Client $client,
int<1, max> $stallCeiling = 60,
CancellableDelayInterface $delay = new EventLoopDelay(),
int<1, max> $minPollIntervalMs = self::DEFAULT_MIN_POLL_INTERVAL_MS,
)
Parameters
| $stallCeiling |
Consecutive input_required polls sending no
answers before awaitTask() gives up
|
| $minPollIntervalMs |
Floor a shorter server-suggested pollIntervalMs is raised to
|
|
#
|
public
|
callToolAsTask(
string $name,
?array $arguments = null,
?array $inputResponses = null,
?string $requestState = null,
): CallToolResult|CreateTaskResult|InputRequiredResult
Calls a tool, the continuation parameters re-issuing a call that answered
an InputRequiredResult.
Calls a tool, the continuation parameters re-issuing a call that answered
an InputRequiredResult.
Implements
|
#
|
public
|
getTask(string $taskId): GetTaskResult
|
#
|
public
|
updateTask(string $taskId, array $inputResponses): void
Supplies input responses to a task waiting in input_required.
Supplies input responses to a task waiting in input_required.
Implements
|
#
|
public
|
cancelTask(string $taskId): void
Requests cooperative cancellation of a task.
Requests cooperative cancellation of a task.
Implements
|
#
|
public
|
awaitTask(
CreateTaskResult $task,
?Closure $resolveInputRequests = null,
?Cancellation $cancellation = null,
): GetTaskResult
Polls a task at the server-suggested interval until it settles,
dispatching new input requests to $resolveInputRequests and answering
through tasks/update, unless $cancellation aborts the loop.
Polls a task at the server-suggested interval until it settles,
dispatching new input requests to $resolveInputRequests and answering
through tasks/update, unless $cancellation aborts the loop.
Implements
|
#
|