feat(02-03): add MediaAttachment model, WhatsApp normalizer, and signature verification
- Add MediaType(StrEnum) and MediaAttachment(BaseModel) to shared/models/message.py - Add media: list[MediaAttachment] field to MessageContent - Add whatsapp_app_secret, whatsapp_verify_token, and MinIO settings to shared/config.py - Add normalize_whatsapp_event() to gateway/normalize.py (text, image, document support) - Create whatsapp.py adapter with verify_whatsapp_signature() and verify_hub_challenge() - 30 new passing tests (signature verification + normalizer)
This commit is contained in:
@@ -65,6 +65,38 @@ class Settings(BaseSettings):
|
||||
description="Slack app-level token for Socket Mode (xapp-...)",
|
||||
)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# WhatsApp
|
||||
# -------------------------------------------------------------------------
|
||||
whatsapp_app_secret: str = Field(
|
||||
default="",
|
||||
description="WhatsApp app secret for HMAC-SHA256 webhook signature verification",
|
||||
)
|
||||
whatsapp_verify_token: str = Field(
|
||||
default="",
|
||||
description="WhatsApp webhook verification token (hub.verify_token)",
|
||||
)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# MinIO / Object Storage
|
||||
# -------------------------------------------------------------------------
|
||||
minio_endpoint: str = Field(
|
||||
default="http://localhost:9000",
|
||||
description="MinIO endpoint URL (S3-compatible)",
|
||||
)
|
||||
minio_access_key: str = Field(
|
||||
default="minioadmin",
|
||||
description="MinIO access key",
|
||||
)
|
||||
minio_secret_key: str = Field(
|
||||
default="minioadmin",
|
||||
description="MinIO secret key",
|
||||
)
|
||||
minio_media_bucket: str = Field(
|
||||
default="konstruct-media",
|
||||
description="MinIO bucket name for media attachments",
|
||||
)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# LLM Providers
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user