molecule-core/platform/internal/channels
rabbitblood 19ab9667ee feat(slack): Level 1 auto-post + Level 2 inbound routing
Level 1 — Auto-post cron output to Slack:
- scheduler.go: captures A2A response body, extracts agent text via
  extractResponseSummary(), broadcasts to workspace's configured Slack
  channels on successful non-empty cron completions
- manager.go: adds BroadcastToWorkspaceChannels() — fans out to all
  enabled channels for a workspace (engineering+firehose for eng agents,
  research+firehose for research agents, etc.)
- main.go: wires scheduler → channel manager via SetChannels()
- Truncates output to 500 chars for Slack readability

Level 2 — Inbound Slack messages route to workspaces:
Already implemented by the existing webhook handler (POST /webhooks/slack)
+ the ParseWebhook method in slack.go which handles both Events API JSON
payloads and slash command form-encoded payloads. Needs Slack App Events
API URL configured to: https://<platform-host>/webhooks/slack

Also in this commit:
- slack.go: dual-mode adapter (bot_token + webhook fallback)
- 031 migration: pgvector guard wraps entire DO block

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 14:15:51 -07:00
..
adapter.go initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
channels_test.go feat(channels): add Slack adapter with webhook URL validation (#384) 2026-04-16 11:14:31 +00:00
discord_test.go fix(security): Ed25519 signature verification for Discord webhooks + strip token from error chain 2026-04-17 10:36:51 +00:00
discord.go fix(security): cap discord error response body read at 4096 bytes 2026-04-17 10:46:09 +00:00
lark_test.go feat(channels): Lark / Feishu adapter (outbound webhook + Events API inbound) 2026-04-16 07:10:58 -07:00
lark.go feat(channels): Lark / Feishu adapter (outbound webhook + Events API inbound) 2026-04-16 07:10:58 -07:00
manager.go feat(slack): Level 1 auto-post + Level 2 inbound routing 2026-04-17 14:15:51 -07:00
registry.go feat(channels): add Discord adapter (#625) 2026-04-17 07:02:50 +00:00
secret_test.go fix(security): encrypt channel_config bot_token at rest (closes #319) 2026-04-15 21:09:34 -07:00
secret.go fix(security): encrypt channel_config bot_token at rest (closes #319) 2026-04-15 21:09:34 -07:00
slack.go feat(slack): upgrade adapter to Bot API with per-agent identity + fix pgvector migration 2026-04-17 14:15:51 -07:00
telegram.go initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00