Let the agent join the workflow's shared editing and execution session

Ouverte
#9,464 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
14/100
Type d'issue
Refactorisation
Clarté
Plutôt claire
Activité
Active
Stack technique
scala
Domaine
backend, full-stack

Piste de recherche

Read the agent service's current workflow loading path (the copy it takes when a chat starts) alongside the existing collaboration client the open canvas uses to join the editing room and subscribe to computing-unit execution events; that client is the model for the new shared session client. Then trace how the agent's chat loop consumes execution events and where it would instead apply edits to the shared workflow and summarize deltas for the model. Done means the agent edits the server-saved workflow and sees every execution's events regardless of who started it, verified with two clients (browser plus agent) on one workflow.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Task Summary

Today the agent works on its own copy of the workflow, loaded when the chat starts, and only hears about executions it starts itself. So the user's later edits can be lost, and the agent can't tell why the user's execution failed or came back empty.

Texera already shares edits and executions live: every open canvas joins the workflow's editing room and receives the computing unit's execution events. The agent is the only participant left out. The room has gaps of its own, though. Its server is the stock y-websocket server, which checks no one's access. It runs on Kubernetes and in local development, but single-node starts none, so shared editing does not work there. And every browser loads the workflow into the room when it opens it, and saves the whole workflow five seconds after a change.

This task makes the session the server's, in three parts:

  1. A session service. It replaces the y-websocket server in every deployment. It checks each person's token and access to the workflow (viewers get a read-only connection), loads the workflow from the Dashboard Service, and saves it shortly after edits stop. Browsers no longer load or save the workflow themselves. The live service of the Texera 2.0 prototype does this on Hocuspocus (MIT) and can be ported. The shared document keeps main's layout, so the Angular app, this service and later the React app read it the same way.
  2. Reads and edits from the server. The service lets the agent's tools read the workflow as it stands and apply a patch from #9481 as one change, tagged with the user and the chat, so review mode (#9075) can tell the agent's changes apart. The agent shows among the co-editors while it works.
  3. Executions. A new read of the workflow's current or last execution on its computing unit, whoever started it: its state, each operator's state and row counts, and its errors and console errors. This becomes the get_execution tool. An execution the agent asks for does not end one that is still going (today SyncExecutionResource shuts the previous one down): the tool says who started it, and the agent asks the person first.

With them:

  • The agent edits the shared workflow instead of a copy.
  • It sees every execution, no matter who started it.
  • Its model sees a short summary of what changed at each step.
  • The server saves the workflow, so the agent's edits are kept even when no browser is open.

This also settles the open question in #9457 about which copy the agent edits, and makes the browser report in #9423 unnecessary.

The agent and the user in one shared session
Task Type
  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other
Langage dominant
Scala
Étoiles
333
Forks
202
Merge moyen
3 j 11 h
PR mergées (30 j)
185

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de apache/texera

Toutes les issues de apache/texera

Issues similaires

Plus d'issues Scala

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.