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

Method Run

pkg/runtime/remote_runtime.go:315–325  ·  view source on GitHub ↗

Run starts the agent's interaction loop and returns the final messages

(ctx context.Context, sess *session.Session)

Source from the content-addressed store, hash-verified

313
314// Run starts the agent's interaction loop and returns the final messages
315func (r *RemoteRuntime) Run(ctx context.Context, sess *session.Session) ([]session.Message, error) {
316 eventsChan := r.RunStream(ctx, sess)
317
318 for event := range eventsChan {
319 if errEvent, ok := event.(*ErrorEvent); ok {
320 return nil, fmt.Errorf("%s", errEvent.Error)
321 }
322 }
323
324 return sess.GetAllMessages(), nil
325}
326
327// Steer enqueues a user message for mid-turn injection into the running
328// agent loop on the remote server.

Callers

nothing calls this directly

Calls 2

RunStreamMethod · 0.95
GetAllMessagesMethod · 0.80

Tested by

no test coverage detected