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

Function networkSubscriptionBundle

internal/cli/network.go:1344–1370  ·  view source on GitHub ↗
(subscription NetworkSubscriptionRecord)

Source from the content-addressed store, hash-verified

1342}
1343
1344func networkSubscriptionBundle(subscription NetworkSubscriptionRecord) outputBundle {
1345 return outputBundle{
1346 jsonValue: contract.NetworkSubscriptionResponse{Subscription: subscription},
1347 human: func() (string, error) {
1348 return renderHumanSection("Network Subscription", []keyValue{
1349 {Label: networkChannelValue, Value: stringOrDash(subscription.Channel)},
1350 {Label: taskThreadValue, Value: stringOrDash(subscription.ThreadID)},
1351 {Label: taskPeerValue, Value: stringOrDash(subscription.PeerID)},
1352 {Label: networkModeValue, Value: stringOrDash(subscription.Mode)},
1353 {Label: "Keywords", Value: stringOrDash(strings.Join(subscription.KeywordFilters, ", "))},
1354 }), nil
1355 },
1356 toon: func() (string, error) {
1357 return renderToonObject(
1358 "network_subscription",
1359 []string{networkChannelKey, networkThreadIDKey, networkPeerIDKey, networkModeKey, "keyword_filters"},
1360 []string{
1361 subscription.Channel,
1362 subscription.ThreadID,
1363 subscription.PeerID,
1364 subscription.Mode,
1365 strings.Join(subscription.KeywordFilters, ","),
1366 },
1367 ), nil
1368 },
1369 }
1370}
1371
1372func networkSubscriptionDeleteBundle(channel string, threadID string, peerID string) outputBundle {
1373 payload := map[string]any{

Callers 1

Calls 3

renderHumanSectionFunction · 0.85
stringOrDashFunction · 0.85
renderToonObjectFunction · 0.85

Tested by

no test coverage detected