Durable storage for task records. createTask() MUST make the record visible
to findTask() before returning, and the trySet* transitions are sticky
once terminal.
| Methods | ||
|---|---|---|
public
|
createTask(
non-empty-string $toolName,
null|array<array-key, mixed> $arguments,
?int $ttlMs,
int $pollIntervalMs,
): TaskRecord
|
# |
public
|
findTask(non-empty-string $taskId): ?TaskRecord
|
# |
public
|
trySetWorking(non-empty-string $taskId): bool
|
# |
public
|
trySetCompleted(non-empty-string $taskId, array<string, mixed> $result): bool
|
# |
public
|
trySetFailed(non-empty-string $taskId, array<string, mixed> $error, null|non-empty-string $statusMessage = null): bool
|
# |
public
|
trySetCancelled(non-empty-string $taskId): bool
|
# |
public
|
trySetInputRequired(
non-empty-string $taskId,
array<int|non-empty-string, InputRequest> $inputRequests,
?string $requestState,
): bool
|
# |
public
|
resolveInputRequests(
non-empty-string $taskId,
array<int|non-empty-string, InputResponse> $inputResponses,
): null|TaskRecord
|
# |