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

Method agentTaskLeaseAction

internal/cli/client.go:5229–5242  ·  view source on GitHub ↗
(
	ctx context.Context,
	runID string,
	action string,
	request any,
	credentials agentidentity.Credentials,
)

Source from the content-addressed store, hash-verified

5227}
5228
5229func (c *unixSocketClient) agentTaskLeaseAction(
5230 ctx context.Context,
5231 runID string,
5232 action string,
5233 request any,
5234 credentials agentidentity.Credentials,
5235) (AgentTaskLeaseRecord, error) {
5236 var response contract.AgentTaskLeaseResponse
5237 path := "/api/agent/tasks/" + url.PathEscape(runID) + "/" + strings.TrimSpace(action)
5238 if err := c.doAgentJSON(ctx, http.MethodPost, path, nil, request, credentials, &response); err != nil {
5239 return AgentTaskLeaseRecord{}, err
5240 }
5241 return response.Lease, nil
5242}
5243
5244func (c *unixSocketClient) extensionAction(ctx context.Context, name string, action string) (ExtensionRecord, error) {
5245 var response struct {

Callers 4

AgentTaskHeartbeatMethod · 0.95
AgentTaskCompleteMethod · 0.95
AgentTaskFailMethod · 0.95
AgentTaskReleaseMethod · 0.95

Calls 1

doAgentJSONMethod · 0.95

Tested by

no test coverage detected