Member Junction
    Preparing search index...

    Coordinates creation of persistent MJ: AI Agent Requests rows, response-form classification, hierarchical assignment strategy resolution, and List-based (RoundRobin, LeastBusy, Random) user assignment.

    Index

    Constructors

    Methods

    • Creates and saves a persistent MJ: AI Agent Requests row for a Chat or Plan step, returning the new request's ID when saved or null on failure.

      Who saves the row. MJAIAgentRequestEntityServer.Validate keeps requests private: a non-Owner-type user may save a request only for themselves, and Owner-type users (the scheduler's system user among them) are exempt. That rule guards direct saves, such as a GraphQL create where the caller types in RequestForUserID, and this method leaves it untouched. The assignee here comes from one of two places, held to different standards:

      • Metadata (agent type, agent category, request type): an administrator configured the strategy and the caller cannot change it. When it picks someone other than a non-Owner caller, the row is saved as the system user, the cross-user path the rule exempts (the same way AgentWakeTriggerService saves a wake routine for another user). Saving it as the caller would fail validation and lose the request: no inbox row, no resume.
      • The caller (ExecuteAgentParams.assignmentStrategy): held to the rule a direct save meets. A non-Owner caller who names someone else gets the request assigned to themselves (logged), and the row is saved as the caller, so the entity rule still backs this up. The reads that choose the assignee (list members, open counts) run as the caller either way.

      Returns Promise<string>

    • Resolves the MJ: AI Agent Request Types ID for a Chat or Plan step decision:

      • If the responseForm has only approve/reject-style buttons, uses "Approval"
      • If there's a responseForm with fields, uses "Information"
      • Otherwise defaults to "Information"

      Request types come from the AI engine's cached MJ: AI Agent Request Types rows (AIEngineBase.ResolveAgentRequestTypeID), the same source the agent actions use.

      Parameters

      Returns Promise<string>