Soundwave integration

Teleparsy는 Telegram 공지를 구조화한 뒤 Soundwave 등 분석 프로덕트로 전송합니다. 패턴 탐지·전략 수립은 Soundwave 측에서 비정형→정형 데이터를 소비합니다.

Pipeline

  1. Telegram live collector → raw ingest
  2. Processor → normalize + parser enrich (funding_fee_alert.v1 / oi_alert.v1 / text)
  3. message_structured_records + search_documents 저장
  4. analytics_deliveries 큐 → analytics cron → Soundwave POST

Payload schema: soundwave.ingest.v1

{
  "schema": "soundwave.ingest.v1",
  "event_id": "sw_<message_uuid>",
  "ingested_at": "2026-06-30T12:00:00Z",
  "workspace_id": "...",
  "source": { "id", "title", "username", "parser_profile" },
  "message": { "id", "text", "date_utc", ... },
  "structured": {
    "schema": "funding_fee_alert.v1 | oi_alert.v1 | text.document.v1",
    "confidence": 0.85,
    "fields": { "alerts": [...], "alert_count": N }
  },
  "tags": ["funding|oi", "crypto", "telegram"]
}

auto 프로필은 Open Interest Tracker / Funding Rate 문구를 감지해 스키마를 고릅니다. Soundwave는 FOI 텍스트를 시그널로 재분류하고, oi_alert.v1을 구조화 이벤트로도 수신합니다.

ACK vs 처리

Teleparsy 전달은 Soundwave가 영수증을 커밋(ACK)하면 끝입니다. ACK 이후 Heatwave/지표 지연은 Soundwave 내부 처리 SLO입니다. ACK받은 건을 Teleparsy outbox로 되돌리지 않습니다. 남은 내구성 작업(reaper, critic SHA)은 Soundwave 저장소입니다. Wave 실행·go_live는 Teleparsy가 하지 않습니다.

Setup

  1. Production API: https://soundwave-api-production-d168.up.railway.app/ingest/teleparsy
  2. App → Analytics → destination (or Railway SOUNDWAVE_INGEST_* auto-bootstrap)
  3. Shared secret: TELEPARSY_INGEST_SECRET (Soundwave) = destination auth (Teleparsy)
  4. Sources → parser profile per channel

Soundwave receiver (예시)

Soundwave ingest 기본 인증 헤더는 X-Teleparsy-Secret입니다 (옵션으로 destination에서 Authorization: Bearer도 가능). x-teleparsy-schema: soundwave.ingest.v1와 함께 보내며, structured.fields를 시계열/패턴 분석 입력으로 사용하세요.

Multi-tenant (다른 유저)