Support Input and Steam endpoints
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3572933. -->
Reported by: [b_sharpe](https://www.drupal.org/user/2512258)
Related to !12 !9
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>From <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/agui/-/work_items/3572388" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/agui/-/work_items/3572388</a></span></p>
<p>Since we're going to support a non-streaming (Drupal) api, using a pub/sub or SSE responder, we should have a way to define the runner endpoint, but still stream to the main one.</p>
<p>Something like the following workflow:</p>
<ul>
<li>User submits chat</li>
<li>SDC posts to runner api endpoint (Drupal)</li>
<li>SDC listens to stream endpoint (i.e. Mercure)</li>
<li>Optional: Heartbeat to API (polling) for long-running checks?</li>
</ul>
<pre>┌─────────────┐ 1. POST /chat ┌──────────────────────┐<br>│ Browser │ ───────────────────────► │ Transport Layer │<br>│ (AG-UI) │ ◄─────────────────────── │ (MercureChatCtrl/ │<br>│ │ { runId, threadId } │ WebSocket/Polling) │<br>│ │ └──────────────────────┘<br>│ │ │<br>│ │ ▼<br>│ │ ┌──────────────────────┐<br>│ │ │ AgentOrchestrator │<br>│ │ │ - Validate params │<br>│ │ │ - Create agent │<br>│ │ │ - Execute action │<br>│ │ │ - Return result │<br>│ │ └──────────────────────┘<br>│ │ │<br>│ │ ▼<br>│ │ ┌──────────────────────┐<br>│ │ 2. GET /sse │ AI Agent Layer │<br>│ │ ───────────────────────► │ (AiAgentManager + │<br>│ │ ◄─── SSE events ──────── │ Agent Plugins) │<br>└─────────────┘ (via Mercure) └──────────────────────┘</pre>
issue