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

Method NetworkWork

internal/cli/client.go:2157–2178  ·  view source on GitHub ↗
(
	ctx context.Context,
	workspaceRef string,
	workID string,
)

Source from the content-addressed store, hash-verified

2155}
2156
2157func (c *unixSocketClient) NetworkWork(
2158 ctx context.Context,
2159 workspaceRef string,
2160 workID string,
2161) (NetworkWorkRecord, error) {
2162 workID, err := requireNetworkPathValue("work_id", workID)
2163 if err != nil {
2164 return NetworkWorkRecord{}, err
2165 }
2166 var response struct {
2167 Work NetworkWorkRecord `json:"work"`
2168 }
2169 path, err := networkBasePath(workspaceRef)
2170 if err != nil {
2171 return NetworkWorkRecord{}, err
2172 }
2173 path += "/work/" + url.PathEscape(workID)
2174 if err := c.doJSON(ctx, http.MethodGet, path, nil, nil, &response); err != nil {
2175 return NetworkWorkRecord{}, err
2176 }
2177 return response.Work, nil
2178}
2179
2180func (c *unixSocketClient) NetworkSend(ctx context.Context, request NetworkSendRequest) (NetworkSendRecord, error) {
2181 var response struct {

Callers 1

Calls 3

doJSONMethod · 0.95
requireNetworkPathValueFunction · 0.85
networkBasePathFunction · 0.85

Tested by 1