Add Process Abstraction Layer to Core AI Module
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3493240. --> Reported by: [seogow](https://www.drupal.org/user/3065779) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Implement a core process abstraction layer in the AI module to standardize handling of AI operations across different components (Agents, Automators, etc.).</p> <p>Currently, different AI operations (Automators, Agents, Assistant) handle their processes independently, leading to:</p> <ul> <li>Duplicate code for process management</li> <li>Inconsistent status tracking</li> <li>Difficult process monitoring</li> <li>No standardized way to handle long-running operations</li> </ul> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ol> <li>Core Interfaces <ul> <li>Process interface defining standard operations and states</li> <li>Process storage interface for persistence</li> <li>Process manager interface for lifecycle management</li> </ul> </li> <li>Storage Layer <ul> <li>Database schema for process tracking</li> <li>Basic CRUD operations</li> <li>Query capabilities for process listing</li> </ul> </li> <li>Event System <ul> <li>Process lifecycle events</li> <li>Status change events</li> <li>Error events</li> </ul> </li> <li>Base Implementation <ul> <li>Abstract process class</li> <li>Default storage implementation</li> <li>Process manager service</li> </ul> </li> </ol> <h3 id="summary-api-changes">API changes</h3> <ul> <li>New interfaces in Process namespace</li> <li>New events for process lifecycle</li> </ul> <h3 id="summary-data-model-changes">Data model changes</h3> <ul> <li>New database table for process tracking.</li> </ul>
issue