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

Method applyActivationScope

internal/daemon/task_role_runtime.go:302–317  ·  view source on GitHub ↗
(activation *taskRoleActivation, taskID string)

Source from the content-addressed store, hash-verified

300}
301
302func (r *taskRoleRuntime) applyActivationScope(activation *taskRoleActivation, taskID string) error {
303 switch activation.Scope {
304 case taskpkg.ScopeWorkspace:
305 if activation.WorkspaceID == "" {
306 return fmt.Errorf("%w: workspace-scoped task %q has no workspace id", taskpkg.ErrValidation, taskID)
307 }
308 case taskpkg.ScopeGlobal:
309 if r.globalWorkspacePath == "" {
310 return errors.New("daemon: task role global workspace path is required")
311 }
312 activation.WorkspacePath = r.globalWorkspacePath
313 default:
314 return fmt.Errorf("%w: unsupported task scope %q for role activation", taskpkg.ErrValidation, activation.Scope)
315 }
316 return nil
317}
318
319func (r *taskRoleRuntime) activeRoleSession(
320 ctx context.Context,

Callers 2

activationForRunMethod · 0.95
starvationActivationMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected