Scopes support for Foundational Agents

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Currently, all foundational agents are available wherever chat is available. However, not every agent is useful on every area. For example, some will operate at project level, others are better suited at group level, or will have more capabilities at that level, like Duo Planner, and others are specific to a single page (like Agent Creation Assistant)

Proposal

Add scopes to FoundationChatAgentsDefinitions. At the minimum, scope should include [namespace, project, route, all]. For example:

{
  id: 2,
  reference: 'agent_creation_assistant',
  version: 'v1',
  name: 'Agent Creation Assistant',
  description: "Let Duo help you on creating your new agents"
  scope: [{route: '*/agent/new'}]
}

The current scope will need to be passed on the graphql call so that agents can be filtered

Edited by 🤖 GitLab Bot 🤖