( ctx context.Context, runID string, action string, request any, credentials agentidentity.Credentials, )
| 5227 | } |
| 5228 | |
| 5229 | func (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 | |
| 5244 | func (c *unixSocketClient) extensionAction(ctx context.Context, name string, action string) (ExtensionRecord, error) { |
| 5245 | var response struct { |
no test coverage detected