Class McpTaskUpdateContext
The request has already passed Soklet's structural validation and
admission pipeline. A task manager must authorize and apply the update as
one application-owned operation. It must ignore unknown, already-consumed,
or no-longer-outstanding response keys, ignore a response whose MCP union
variant does not match the outstanding request, and make accepted responses
idempotent according to the MCP Tasks contract. Implementations may perform
that correlation through
McpInputRequest.matchesInputResponse(McpJsonValue).
Instances intentionally retain reference identity. The nested request context represents one independently admitted invocation and may carry application principal and context objects; structurally equal-looking carriers must not be treated as the same authorization decision.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull McpTaskUpdateContextfromComponents(@NonNull McpRequestContext requestContext, @NonNull String taskId, @NonNull McpInputResponses inputResponses) Creates a task-update context from its components.
-
Method Details
-
fromComponents
public static @NonNull McpTaskUpdateContext fromComponents(@NonNull McpRequestContext requestContext, @NonNull String taskId, @NonNull McpInputResponses inputResponses) Creates a task-update context from its components.This factory is useful for exercising application-provided task managers in isolation; Soklet constructs the authoritative contexts used for live requests.
- Parameters:
requestContext- request context to supply to the task managertaskId- nonblank task identifier without carriage-return or newline charactersinputResponses- immutable client responses supplied by the update- Returns:
- immutable task-update context
- Throws:
NullPointerException- if an argument is nullIllegalArgumentException- if the task ID is blank or contains a carriage-return or newline character
-
getRequestContext
- Returns:
- independently admitted current request
-
getTaskId
-
getInputResponses
- Returns:
- immutable client responses supplied by this update
-