Skip to content

feat(webhooks): Real-Time Webhooks & Server-Sent Events (SSE) Streamer #18

Description

@sdageltc

Summary & Motivation

For teams embedding letitloop into continuous delivery pipelines, Slack notifications, Discord bots, or custom web dashboards, polling state.json on disk is inefficient.

Adding a lightweight Webhook & SSE Event Streamer will allow external systems to subscribe to real-time execution telemetry.


Proposed Features

  1. Configurable Webhook Dispatcher (orchestrator/webhooks.py):
    • Supports outgoing HTTP POST webhooks to user-configured endpoints (e.g. Slack incoming webhooks, GitHub commit status API, custom server).
    • Event types: goal.started, contract.working, contract.verified, contract.qc_passed, contract.failed, impossibility.generated, goal.completed.
  2. Lightweight SSE Server (lil serve --port 8080):
    • Zero-dependency stdlib http.server streaming Server-Sent Events (text/event-stream) for browser-based monitoring tools.
  3. Payload Signature Verification:
    • HMAC-SHA256 signature header (X-LetItLoop-Signature) for secure webhook payload validation.

Acceptance Criteria

  • Asynchronous non-blocking HTTP webhook delivery (does not slow down supervisor loop).
  • HMAC signature verification for webhook receivers.
  • Unit tests for webhook dispatch and payload serialization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededintegrationsWorker adapters, LLM providers, and external tools

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions