push architecture slice 7: graph-status + practice surfaces ride the events channel; coverage polls accepted-by-design; stale poll comments + architecture.md observability section rewritten to the push model
This commit is contained in:
@@ -3,12 +3,13 @@ import { isTurnRunning, listJobs } from "@/src/server";
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
/**
|
||||
* Job status polling endpoint (contracts.ts "THE ASYNC PROTOCOL" §4): the
|
||||
* client's ONE central poller fetches this while any job runs (and slowly
|
||||
* otherwise) to drive the dispatch cards, the sub-agents panel, and the
|
||||
* re-sync when a job settles. `turnInFlight` rides along so the client can
|
||||
* adopt a server-side wake turn (busy state + composer gate) — the same
|
||||
* machinery as returning to a session mid-turn.
|
||||
* Job status endpoint (contracts.ts "THE ASYNC PROTOCOL" §4): the chat
|
||||
* view's jobs fetch lands here — once on mount, per jobs-changed
|
||||
* announcement (the store emits post-write, debounced client-side), and
|
||||
* on channel resync (push-architecture S4, 2026-10-02 — the old interval
|
||||
* poll is retired). It drives the dispatch cards, the sub-agents panel,
|
||||
* and the re-sync when a job settles. `turnInFlight` rides along for the
|
||||
* settle logic's idle check.
|
||||
*/
|
||||
export async function GET(req: Request) {
|
||||
const chatId = new URL(req.url).searchParams.get("chatId");
|
||||
|
||||
Reference in New Issue
Block a user