MCPcopy Create free account
hub / github.com/compozy/agh / ClearTaskBlockAsAgent

Method ClearTaskBlockAsAgent

internal/cli/client.go:4498–4511  ·  view source on GitHub ↗
(
	ctx context.Context,
	id string,
	blockID string,
	request ClearTaskBlockRequest,
	credentials agentidentity.Credentials,
)

Source from the content-addressed store, hash-verified

4496}
4497
4498func (c *unixSocketClient) ClearTaskBlockAsAgent(
4499 ctx context.Context,
4500 id string,
4501 blockID string,
4502 request ClearTaskBlockRequest,
4503 credentials agentidentity.Credentials,
4504) (TaskBlockRecord, error) {
4505 var response contract.TaskBlockResponse
4506 path := taskBlocksPath(id) + "/" + url.PathEscape(strings.TrimSpace(blockID)) + "/clear"
4507 if err := c.doAgentJSON(ctx, http.MethodPost, path, nil, request, credentials, &response); err != nil {
4508 return TaskBlockRecord{}, err
4509 }
4510 return response.Block, nil
4511}
4512
4513func (c *unixSocketClient) RecoverTask(
4514 ctx context.Context,

Callers

nothing calls this directly

Calls 2

doAgentJSONMethod · 0.95
taskBlocksPathFunction · 0.85

Tested by

no test coverage detected