Intent Bridge — Discord to Mesh Translation #232

Closed
opened 2026-07-15 11:34:18 +00:00 by Mark · 0 comments
Owner

Phase 2: Intent Bridge — Discord to Mesh Translation

Goal: Translate incoming Discord messages into mesh intents that the existing intent routing infrastructure can process. Map Discord threads to mesh threads.

Approach candidates:

  • New runtime/discord_ingress.py module that implements the MeshIntent protocol used by runtime/intent_router.py
  • Extend existing runtime/ingress_coordinator.py with a Discord-specific handler
  • Use existing substrate/backplane.py API for intent submission — the ingress pattern is already established by the REST API in docker/api_gateway.py

Outputs:

  • runtime/discord_ingress.py — Discord-to-mesh intent translation module
  • Thread mapping: Discord thread/channel ID ↔ mesh thread ID (via existing substrate/ledger.py or substrate/task_store.py)
  • Tests in tests/unit/test_discord_ingress.py and tests/integration/test_discord_ingress.py

Acceptance criteria:

  • Incoming Discord message creates a mesh intent with correct intent type metadata
  • Discord thread/channel IDs map to mesh threads; replies in Discord thread continue the same mesh conversation
  • New Discord thread spawns new mesh thread automatically
  • Existing mesh thread intents (conversational, research, write) are all routable from Discord
  • Unit tests cover message→intent parsing for plain text, attachments, and reply chains
  • Integration test verifies end-to-end: message in → intent routed → response generated

Files touched: runtime/discord_ingress.py (create), runtime/__init__.py (amend), tests/unit/test_discord_ingress.py (create), tests/integration/test_discord_ingress.py (create)



Decomposed from mesh-seed#134

## Phase 2: Intent Bridge — Discord to Mesh Translation **Goal:** Translate incoming Discord messages into mesh intents that the existing intent routing infrastructure can process. Map Discord threads to mesh threads. **Approach candidates:** - New `runtime/discord_ingress.py` module that implements the `MeshIntent` protocol used by `runtime/intent_router.py` - Extend existing `runtime/ingress_coordinator.py` with a Discord-specific handler - Use existing `substrate/backplane.py` API for intent submission — the ingress pattern is already established by the REST API in `docker/api_gateway.py` **Outputs:** - `runtime/discord_ingress.py` — Discord-to-mesh intent translation module - Thread mapping: Discord thread/channel ID ↔ mesh thread ID (via existing `substrate/ledger.py` or `substrate/task_store.py`) - Tests in `tests/unit/test_discord_ingress.py` and `tests/integration/test_discord_ingress.py` **Acceptance criteria:** - [ ] Incoming Discord message creates a mesh intent with correct intent type metadata - [ ] Discord thread/channel IDs map to mesh threads; replies in Discord thread continue the same mesh conversation - [ ] New Discord thread spawns new mesh thread automatically - [ ] Existing mesh thread intents (`conversational`, `research`, `write`) are all routable from Discord - [ ] Unit tests cover message→intent parsing for plain text, attachments, and reply chains - [ ] Integration test verifies end-to-end: message in → intent routed → response generated **Files touched:** `runtime/discord_ingress.py` (create), `runtime/__init__.py` (amend), `tests/unit/test_discord_ingress.py` (create), `tests/integration/test_discord_ingress.py` (create) --- --- _Decomposed from [mesh-seed#134](https://forgejo.tail018ac4.ts.net/Mark/mesh-seed/issues/134)_
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/mesh-seed#232
No description provided.