MCPcopy Index your code
hub / github.com/docker/docker-agent / loadTeam

Method loadTeam

cmd/root/debug.go:74–87  ·  view source on GitHub ↗

loadTeam loads an agent team from the given agent file. Callers should defer stopToolSets(ctx, t) to clean up.

(ctx context.Context, agentFilename string, opts ...teamloader.Opt)

Source from the content-addressed store, hash-verified

72// loadTeam loads an agent team from the given agent file.
73// Callers should defer stopToolSets(ctx, t) to clean up.
74func (f *debugFlags) loadTeam(ctx context.Context, agentFilename string, opts ...teamloader.Opt) (*team.Team, error) {
75 agentSource, err := config.Resolve(agentFilename, f.runConfig.EnvProvider())
76 if err != nil {
77 return nil, err
78 }
79
80 opts = append(loaderdefaults.Opts(), opts...)
81 t, err := teamloader.Load(ctx, agentSource, &f.runConfig, opts...)
82 if err != nil {
83 return nil, err
84 }
85
86 return t, nil
87}
88
89func (f *debugFlags) runDebugConfigCommand(cmd *cobra.Command, args []string) (commandErr error) {
90 telemetry.TrackCommand(cmd.Context(), "debug", append([]string{"config"}, args...))

Callers 3

runDebugSkillsCommandMethod · 0.95
runDebugTitleCommandMethod · 0.95

Calls 3

ResolveFunction · 0.92
LoadFunction · 0.92
EnvProviderMethod · 0.80

Tested by

no test coverage detected