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

Function validateNetworkSendKindScope

internal/cli/network.go:2034–2042  ·  view source on GitHub ↗
(kind string, surface string, threadID string, directID string, workID string)

Source from the content-addressed store, hash-verified

2032}
2033
2034func validateNetworkSendKindScope(kind string, surface string, threadID string, directID string, workID string) error {
2035 if networkKindForbidsConversation(kind) && (surface != "" || threadID != "" || directID != "" || workID != "") {
2036 return fmt.Errorf("cli: --kind %s cannot include --surface, --thread, --direct, or --work", kind)
2037 }
2038 if networkKindRequiresWork(kind) && workID == "" {
2039 return fmt.Errorf("cli: --kind %s requires --work", kind)
2040 }
2041 return nil
2042}
2043
2044func networkKindForbidsConversation(kind string) bool {
2045 switch kind {

Callers 1

validateNetworkSendFlagsFunction · 0.85

Calls 2

networkKindRequiresWorkFunction · 0.85

Tested by

no test coverage detected