Reference
Remy Reference/agent/checkAppRole
?

checkAppRole

Check whether the current user has a specific app role and branch accordingly.
mindstudio.checkAppRole({ roleName }) → Result

Checks whether the current user holds a given app role and returns a result you branch on, rather than throwing. It is the action-style counterpart to auth.hasRole, for flows that route on the answer instead of gating a method outright.

Parameters
roleName
string
RequiredThe role name to check (supports {{variables}})
hasRoleStepId
string
Step to transition to if the user has the role (same workflow)
hasRoleWorkflowId
string
Workflow to jump to if the user has the role (cross workflow)
noRoleStepId
string
Step to transition to if the user does not have the role (same workflow)
noRoleWorkflowId
string
Workflow to jump to if the user does not have the role (cross workflow)
Call from a method
import { mindstudio } from '@mindstudio-ai/agent';

const result = await mindstudio.checkAppRole({
  roleName: /* ... */
});