(activation *taskRoleActivation, taskID string)
| 300 | } |
| 301 | |
| 302 | func (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 | |
| 319 | func (r *taskRoleRuntime) activeRoleSession( |
| 320 | ctx context.Context, |
no outgoing calls
no test coverage detected