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

Method activeRoleSession

internal/daemon/task_role_runtime.go:319–333  ·  view source on GitHub ↗
(
	ctx context.Context,
	activation taskRoleActivation,
)

Source from the content-addressed store, hash-verified

317}
318
319func (r *taskRoleRuntime) activeRoleSession(
320 ctx context.Context,
321 activation taskRoleActivation,
322) (*session.Info, error) {
323 infos, err := r.sessions.ListAll(ctx)
324 if err != nil {
325 return nil, fmt.Errorf("daemon: list sessions for task role activation: %w", err)
326 }
327 for _, info := range infos {
328 if taskRoleSessionMatches(info, activation) {
329 return info, nil
330 }
331 }
332 return nil, nil
333}
334
335func (r *taskRoleRuntime) startRoleSession(
336 ctx context.Context,

Callers 2

activateRunMethod · 0.95
activateForStarvationMethod · 0.95

Calls 2

taskRoleSessionMatchesFunction · 0.85
ListAllMethod · 0.65

Tested by

no test coverage detected