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

Function nativeAuthoredAgentPath

internal/daemon/native_tools.go:3717–3731  ·  view source on GitHub ↗
(workspace *workspacepkg.ResolvedWorkspace, agentName string)

Source from the content-addressed store, hash-verified

3715}
3716
3717func nativeAuthoredAgentPath(workspace *workspacepkg.ResolvedWorkspace, agentName string) string {
3718 name := strings.TrimSpace(agentName)
3719 if workspace == nil {
3720 return ""
3721 }
3722 for _, agent := range workspace.Agents {
3723 if strings.TrimSpace(agent.Name) == name && strings.TrimSpace(agent.SourcePath) != "" {
3724 return strings.TrimSpace(agent.SourcePath)
3725 }
3726 }
3727 if root := strings.TrimSpace(workspace.RootDir); root != "" && name != "" {
3728 return filepath.Join(root, aghconfig.DirName, aghconfig.AgentsDirName, name, "AGENT.md")
3729 }
3730 return ""
3731}
3732
3733func (n *daemonNativeTools) workspaceAgents(
3734 ctx context.Context,

Callers 1

authoredAgentTargetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected