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

Method doAgentJSON

internal/cli/client.go:5354–5372  ·  view source on GitHub ↗
(
	ctx context.Context,
	method string,
	path string,
	query url.Values,
	requestBody any,
	credentials agentidentity.Credentials,
	responseBody any,
)

Source from the content-addressed store, hash-verified

5352}
5353
5354func (c *unixSocketClient) doAgentJSON(
5355 ctx context.Context,
5356 method string,
5357 path string,
5358 query url.Values,
5359 requestBody any,
5360 credentials agentidentity.Credentials,
5361 responseBody any,
5362) error {
5363 response, err := c.doRequestWithCredentials(ctx, method, path, query, requestBody, "", credentials)
5364 if err != nil {
5365 return err
5366 }
5367 defer func() {
5368 _ = response.Body.Close()
5369 }()
5370
5371 return c.decodeJSONResponse(ctx, method, path, response, responseBody)
5372}
5373
5374func (c *unixSocketClient) decodeJSONResponse(
5375 _ context.Context,

Callers 13

CreateTaskAsAgentMethod · 0.95
BlockTaskAsAgentMethod · 0.95
ClearTaskBlockAsAgentMethod · 0.95
AgentMeMethod · 0.95
AgentContextMethod · 0.95
AgentSpawnMethod · 0.95
AgentChannelsMethod · 0.95
AgentChannelRecvMethod · 0.95
AgentChannelSendMethod · 0.95
AgentChannelReplyMethod · 0.95

Calls 3

decodeJSONResponseMethod · 0.95
CloseMethod · 0.65

Tested by

no test coverage detected