EventType (websocket/events.py)

AutoResearchClaw · researchclaw/server/websocket/events.py · python · MIT
realtime

Defines WebSocket event types and serializable Event dataclass.

# Source: https://github.com/aiming-lab/AutoResearchClaw | License: MIT | Copyright 2026 Aiming Lab
# Provided via justclaw.it.com; keep this notice with the code.
"""WebSocket event type definitions."""

from __future__ import annotations

from dataclasses import asdict, dataclass, field
from enum import Enum
from typing import Any
import json
import time


class EventType(str, Enum):
    """All WebSocket event types."""

    # Lifecycle
    CONNECTED = "connected"
    HEARTBEAT = "heartbeat"
    ERROR = "error"

    # Pipeline
    PIPELINE_STARTED = "pipeline_started"
    PIPELINE_COMPLETED = "pipeline_completed"
    STAGE_START = "stage_start"
    STAGE_COMPLETE = "stage_complete"
    STAGE_FAIL = "stage_fail"
    METRIC_UPDATE = "metric_update"
    LOG_LINE = "log_line"
    PAPER_READY

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key