htmlgraph 0.28.0__py3-none-any.whl → 0.28.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
htmlgraph/__init__.py CHANGED
@@ -123,7 +123,7 @@ from htmlgraph.types import (
123
123
  )
124
124
  from htmlgraph.work_type_utils import infer_work_type, infer_work_type_from_id
125
125
 
126
- __version__ = "0.28.0"
126
+ __version__ = "0.28.1"
127
127
  __all__ = [
128
128
  # Exceptions
129
129
  "HtmlGraphError",
htmlgraph/api/main.py CHANGED
@@ -380,6 +380,31 @@ def get_app(db_path: str) -> FastAPI:
380
380
  finally:
381
381
  await db.close()
382
382
 
383
+ # ========== PRESENCE WIDGET DEMO (Phase 6) ==========
384
+
385
+ @app.get("/views/presence-widget", response_class=HTMLResponse)
386
+ async def presence_widget_demo(request: Request) -> HTMLResponse:
387
+ """Phase 6 Demo: Real-time Presence Widget showing active agents across sessions.
388
+
389
+ This widget demonstrates:
390
+ - WebSocket connections to broadcast stream
391
+ - Real-time presence updates (<100ms latency)
392
+ - Multi-session agent coordination
393
+ - Integration with Phase 5 broadcast API
394
+
395
+ Try it out:
396
+ 1. Open this page in your browser
397
+ 2. In another terminal, emit presence events
398
+ 3. Watch the dashboard update in real-time!
399
+ """
400
+ widget_path = Path(__file__).parent / "static" / "presence-widget-demo.html"
401
+ if widget_path.exists():
402
+ return HTMLResponse(content=widget_path.read_text())
403
+ else:
404
+ raise HTTPException(
405
+ status_code=404, detail="Presence widget demo not found"
406
+ )
407
+
383
408
  # ========== ACTIVITY FEED ENDPOINTS ==========
384
409
 
385
410
  @app.get("/views/activity-feed", response_class=HTMLResponse)