Function calls have silent dependencies

Created on 26 March 2025, 20 days ago

Depends on 📌 Function calls have silent dependencies Active

Problem/Motivation

Currently, AI Agents includes a few agents that have dependencies on other modules that are not core dependencies of AI Agents (or it's dependants). This means there are agents that make use of services, classes, or entity types that are not available.

Steps to reproduce

Install AI Agents on a site that doesn't have node enabled. Try the Node Content Type Agent in the API explorer, you get a fatal error:

Error: Class "Drupal\node\Entity\NodeType" not found in Drupal\ai_agents\Plugin\AiAgent\ContentType->getNodeTypes() (line 489 of /var/www/html/docroot/modules/contrib/ai_agents/src/Plugin/AiAgent/ContentType.php).

Proposed resolution

Once 📌 Function calls have silent dependencies Active has been implemented, we should update the function calls to declare their dependencies.

📌 Task
Status

Active

Version

1.1

Component

Code

Created by

🇬🇧United Kingdom andrewbelcher

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024