MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / isVisibleToViewer

Method isVisibleToViewer

server/src/agent-service.ts:82–86  ·  view source on GitHub ↗

* Whether the given agent visibility is visible to a viewer whose tier * either does or does not grant API access. Owners see their own agents * regardless; this helper is for non-owner listings only.

(visibility: AgentVisibility, viewerHasApiAccess: boolean)

Source from the content-addressed store, hash-verified

80 * regardless; this helper is for non-owner listings only.
81 */
82 private isVisibleToViewer(visibility: AgentVisibility, viewerHasApiAccess: boolean): boolean {
83 if (visibility === 'public') return true;
84 if (visibility === 'members_only') return viewerHasApiAccess;
85 return false;
86 }
87
88 /**
89 * Get agent by URL

Callers 2

listAgentsMethod · 0.95
getAgentByUrlMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected