MCPcopy Create free account
hub / github.com/docker/docker-agent / IsExternalReference

Function IsExternalReference

pkg/config/resolve.go:259–262  ·  view source on GitHub ↗

IsExternalReference reports whether the input is an external agent reference (OCI image or URL) rather than a local agent name defined in the same config. Local agent names never contain "/", so the slash check distinguishes them from OCI references like "agentcatalog/pirate" or "docker.io/org/agent

(input string)

Source from the content-addressed store, hash-verified

257// from OCI references like "agentcatalog/pirate" or "docker.io/org/agent:v1".
258// It also handles the "name:ref" syntax (e.g. "reviewer:agentcatalog/review-pr").
259func IsExternalReference(input string) bool {
260 _, ref := ParseExternalAgentRef(input)
261 return isExternalRef(ref)
262}
263
264// ParseExternalAgentRef parses an external agent reference that may include an
265// explicit name prefix. The syntax is "name:reference" where name is a simple

Callers 4

resolveAgentRefsFunction · 0.92
TestIsExternalReferenceFunction · 0.85
validateConfigFunction · 0.85
validateForceHandoffsFunction · 0.85

Calls 2

ParseExternalAgentRefFunction · 0.85
isExternalRefFunction · 0.85

Tested by 1

TestIsExternalReferenceFunction · 0.68