feat(dashboard): orchestration canvas fase 2 — agents WS channel (2.1) - #12409
Merged
Merged
Conversation
4 of 5 tasks
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
diegosouzapw#12409) * feat(dashboard): agents WS channel + agent.task.updated event * feat(a2a): publish agent.task.updated on cloud-agent and a2a task writes * feat(dashboard): mirror conductor fleet transitions into agents channel * feat(dashboard): orchestration snapshot rides the agents WS channel (2.1) --------- Co-authored-by: Markus Hartung <diegosouzapw@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Orchestration Canvas — Fase 2 / PR-B1: canal WS
agents(item 2.1)Segunda das quatro PRs da Fase 2 (após #12393). O canvas de orquestração passa a receber transições de tasks dos 3 agentes em tempo real e rebaixa o polling de 5 s para 30 s enquanto o WebSocket está conectado (5 s segue como fallback).
Desenho
agent.task.updated{ source, taskId, state, timestamp }no canal novoagents; o snapshot continua vindo por REST (que já resolve owner-scoping/serialização). O WS nunca carrega dados de task.insertCloudAgentTask/updateCloudAgentTask(src/lib/cloudAgent/db.ts),A2ATaskManager.createTask/updateTask+ ramo TTL docleanupExpired, e um mirror do Conductor emhubProxy.getFleetSnapshot(cache do últimostatuspor task; 1 evento por task nova/mudada; a primeira foto só semeia; foto offline não zera o cache)."agents"emDashboardChannel/CHANNEL_EVENTS(src/lib/events/types.ts) e nas 3 unions desrc/server/ws/types.ts;liveServer.tsroteia viagetChannelForEventsem mudança.useOrchestrationSnapshot: subscreveagents(troca o gatilho-proxyrequests), debounce 1 s mantido;POLL_MS_WS_CONNECTED = 30_000quandoconnection.isConnected,POLL_MS = 5_000caso contrário.Validação
ws-agents-channel,agents-channel-publish(DB temporário + handles fechados),conductor-fleet-mirror; vitest do hook (evento → refetch debounced; intervalos 5 s/30 s; transição reprograma).typecheck:core,check:dashboard-typecheck,lint,test:vitest,check:cycles(ver relatório da última task).Refs #12392 (polish do canvas — minors desta PR anexados lá como comentário).
Spec:
_tasks/superpowers/specs/2026-09-01-orchestration-canvas-fase2-design.md§2 (privado). Segue PR-B2 (History) e PR-C (Repetir + memória).