sam
|
f4787a819d
|
feat: email channel + Channel interface with config schema validation
Email channel (internal/channels/email):
- SMTP server receiving inbound emails on configurable port
- Multipart body extraction (text/plain from MIME)
- SMTP relay for outbound replies with STARTTLS + AUTH
- 8 tests, race-clean
Channel interface (internal/channels/channel.go):
- ConfigSchema() — JSON Schema for channel configuration
- ValidateConfig() — validates channel-specific config at startup
- All three channels (Telegram, Email, Webhook) implement it
- Compile-time guard: var _ channels.Channel = (*Gateway)(nil)
Config: ChatConfig.Email added (listen_addr, relay_addr).
Daemon: email gateway wired into main.go behind chat.email block.
40 packages pass with -race.
|
2026-07-26 13:36:56 +10:00 |
|
sam
|
20a1210d0e
|
feat: webhook platform + persona registry (items 5+6)
Webhook platform (internal/channels/webhook):
- Gateway adapter with HTTP server, HMAC validation, dot-notation template extraction
- Per-route configuration with secret-based signing
- Deliver-to-origin mode for sync responses
- 11 tests, race-clean
Persona registry (internal/gateway/persona.go):
- PersonaRegistry with per-session active persona selection
- DefaultPersonas(): helpful, concise, technical, creative, teacher
- Persona prompt prepended to system prompt in LLMResponder
- Thread-safe, 5 tests
Config: ChatConfig.WebhookAddr added for webhook listen address.
All 39 packages pass with -race.
Closes abg.5.3, abg.34.
|
2026-07-26 10:39:58 +10:00 |
|