feat(web-floor): make floor streaming incremental and expand the harness roster - #14
Merged
Merged
Conversation
…ess roster What was done: floor_router.py / api: - Rewrote /api/floor/stream to stream incrementally. process_envelope now runs on a background thread while the HTTP response generator drains a live queue, so the client receives each working/idle progress change and each finalized event (in particular an utterance) as it happens, instead of a single aggregated envelope at the end of the exchange. - Added on_progress / on_event callback parameters and threaded them through deliver_and_collect and deliver_concurrently. - Added _deliver_with_retry: a timed-out delivery is retried with backoff. - Added _effective_timeout_seconds: only utterance events get the long fan-out timeout; control events keep the caller's timeout. - Fixed convener exclusion so only utterance broadcasts skip the convener; control events (invite, getManifests, etc.) now reach it again. - Removed the /debug-files and /debug routes. harness: - Added the strategy-convener agent roster (ports 8199-8208) to known_agents.json, cli.py, and gui.py. - Simplified the README prerequisites to Python + Tkinter. assistantClient: - Added http://localhost:8208/ to the known-agents lists. - Changed ui_components icon export to ~50% size, aspect ratio preserved. web UI: - Raised the max-words slider ceiling from 200 to 800 and bumped the app.js asset version. repo hygiene: - Added __pycache__/ and *.pyc to .gitignore and removed the 13 previously committed bytecode files from version control. - Added ignore rules for local scratch files (prompt drafts, transcripts, harness run output) and *.code-workspace. Signed-off-by: Deborah Dahl <dahl@conversational-technologies.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the web-floor stack to support truly incremental floor-managed streaming (progress + events), improves delivery robustness and convener routing behavior, and expands the harness/UI agent rosters and related UX/documentation.
Changes:
- Make
/api/floor/streamemit incremental NDJSON lines for live progress and finalized events; thread progress/event callbacks through the router. - Add delivery retry/logging behavior and fix several routing/spec compliance details (e.g., convener exclusion and
floorGrantedcontents). - Expand harness + UI known-agent rosters and adjust assorted UI/harness defaults and docs.
Reviewed changes
Copilot reviewed 14 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| implementations/web-floor/api/flask_gateway.py | Implements incremental NDJSON streaming by draining a live queue while process_envelope runs in a background thread; adjusts HTTP delivery error behavior. |
| implementations/web-floor/api/floor_router.py | Adds on_progress / on_event hooks, delivery retry/logging, fixes convener exclusion semantics, and makes floorGranted spec-correct (speaker URIs). |
| implementations/web-floor/tests/test_floor_router.py | Adds regression and behavior tests for convener inclusion, progress hooks, retry behavior, and event-finalization order. |
| implementations/web-floor/public/app.js | Switches utterance rounds to streaming consumption of {progress,event} lines; tweaks report rendering and expands known agents. |
| implementations/web-floor/public/index.html | Raises max-words slider ceiling and bumps the app asset cache-buster version. |
| implementations/web-floor/harness/known_agents.json | Adds the strategy-convener roster (8199–8208) to the harness agent list. |
| implementations/web-floor/harness/cli.py | Adds a pre-utterance grantFloor helper and sends it automatically before utterance runs. |
| implementations/web-floor/harness/gui.py | Adds a File menu, raises default timeout, improves results display wrapping, and pre-sends grantFloor for utterances. |
| implementations/web-floor/harness/README.md | Simplifies prerequisites and documents optional chart dependencies. |
| implementations/web-floor/ARCHITECTURE.md | Updates Mermaid diagrams to use graph LR. |
| implementations/web-floor/api/app.py | Keeps proxy logic aligned with gateway behavior, adds effective timeout handling and manual CORS header logic, removes debug route. |
| implementations/assistantClient/known_agents.py | Adds http://localhost:8208/ to known agents. |
| implementations/assistantClient/known_agents-Pegasus.py | Adds http://localhost:8208/ to known agents. |
| implementations/assistantClient/ui_components.py | Reduces exported icon size ~50% while preserving aspect ratio. |
| .gitignore | Adds Python bytecode/editor/scratch ignores and removes committed bytecode from tracking. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const textHtml = entry.text && !entry.html | ||
| ? `<p style="font-family:sans-serif;margin:0 0 12px;font-size:0.9rem;color:#333;line-height:1.5">${esc(entry.text)}</p>` | ||
| : ""; | ||
| return `<section style="margin-bottom:28px">${nameHtml}${textHtml}${entry.html}</section>`; |
Comment on lines
+252
to
+260
| except Exception as first_error: | ||
| if _is_timeout_error(first_error): | ||
| logger.warning( | ||
| "Agent at %s is unavailable (timed out after %.0fs) -- giving up on this turn", | ||
| conversant.service_url, timeout, | ||
| ) | ||
| return [] | ||
| logger.warning("Delivery to %s failed (%s), retrying once", conversant.service_url, first_error) | ||
|
|
Comment on lines
+66
to
+73
| { url: "http://127.0.0.1:8300/", conversationalName: "Cafeteria Ops Convener" }, | ||
| { url: "http://127.0.0.1:8301/", conversationalName: "Menu Designer" }, | ||
| { url: "http://127.0.0.1:8302/", conversationalName: "Nutrition Specialist" }, | ||
| { url: "http://127.0.0.1:8303/", conversationalName: "Recipe & Portion Specialist" }, | ||
| { url: "http://127.0.0.1:8304/", conversationalName: "Menu Optimization Specialist" }, | ||
| { url: "http://127.0.0.1:8305/", conversationalName: "Inventory Specialist" }, | ||
| { url: "http://127.0.0.1:8306/", conversationalName: "Procurement Specialist" }, | ||
| { url: "http://127.0.0.1:8310/", conversationalName: "Shopping List Specialist" }, |
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.
What was done
floor_router.py / api
/api/floor/streamto stream incrementally.process_envelopenow runs on a background thread while the HTTP response generator drains a live queue, so the client receives each working/idle progress change and each finalized event (in particular an utterance) as it happens, instead of a single aggregated envelope at the end of the exchange.on_progress/on_eventcallback parameters and threaded them throughdeliver_and_collectanddeliver_concurrently._deliver_with_retry: a timed-out delivery is retried with backoff._effective_timeout_seconds: only utterance events get the long fan-out timeout; control events keep the caller's timeout./debug-filesand/debugroutes.harness
known_agents.json,cli.py, andgui.py.assistantClient
http://localhost:8208/to the known-agents lists.ui_componentsicon export to ~50% size, aspect ratio preserved.web UI
app.jsasset version.repo hygiene
__pycache__/and*.pycto.gitignoreand removed the 13 previously committed bytecode files from version control.*.code-workspace.Testing
implementations/web-floor/tests/test_floor_router.pyexpanded (+275 lines).