MCPcopy Create free account
hub / github.com/vercel/examples / emit_event

Function emit_event

python/vibe-coding-ide/backend/src/sse.py:21–30  ·  view source on GitHub ↗
(
    task_id: str, event_type: str, data: Any = None, error: Any = None
)

Source from the content-addressed store, hash-verified

19
20
21def emit_event(
22 task_id: str, event_type: str, data: Any = None, error: Any = None
23) -> dict[str, Any]:
24 return {
25 "event_type": event_type,
26 "task_id": task_id,
27 "timestamp": time.strftime("%Y-%m-%dT%H:%M:%S+00:00", time.gmtime()),
28 "data": data,
29 "error": error,
30 }
31
32
33def tool_started_sse(task_id: str, ev: dict[str, Any]) -> str:

Callers 6

missing_generatorFunction · 0.90
event_generatorFunction · 0.90
run_agent_flowFunction · 0.90
resume_agent_flowFunction · 0.90
tool_started_sseFunction · 0.85
tool_completed_sseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected