Official Discord channel plugin: harness-neutral routing and native thread policy #756

Closed
opened 2026-07-14 17:56:49 +00:00 by jason.woltje · 0 comments
Owner

Objective

Deliver the official Mosaic Discord channel plugin as a harness-neutral channel adapter. Discord bindings remain attached to a stable logical agent/session while the gateway may switch the underlying Claude, Codex, Pi, OpenCode, or future runtime provider.

Scope

  • Normalize channel/plugin contracts so future Matrix, Slack, and other first-party adapters can share routing and authorization semantics.
  • In authorized bound channels, untagged messages route to the agent and responses stay in-channel.
  • A bot mention in a parent channel creates/uses a Discord thread; messages already inside a thread remain in that thread without requiring repeated mentions.
  • Preserve default-deny guild/channel/user authorization and per-user roles.
  • Keep Discord connection/session keys independent of harness/provider identifiers.
  • Add focused behavior, permission-boundary, and routing tests plus operator/developer documentation.

Boundaries

  • Do not modify the active orchestrator-to-Pi migration or connector lease/fencing implementation (#754/#755).
  • Do not store Discord credentials in source or durable handoffs.
  • Gateway remains the policy/audit boundary.
  • Dynamic admin UI and production deployment are out of scope for this slice.

Acceptance

  1. Behavior is identical for all runtime providers because the plugin routes only by stable logical agent/session identity.
  2. Mentioned parent-channel messages create/use threads and replies target the thread.
  3. Untagged authorized channel messages receive responses in the channel.
  4. Unauthorized guilds, channels, and users fail closed, including thread-parent authorization.
  5. Shared contracts are transport-neutral and suitable for Matrix/Slack adapters.
  6. Focused tests, baseline checks, independent code/security review, docs, and CI pass.
## Objective Deliver the official Mosaic Discord channel plugin as a harness-neutral channel adapter. Discord bindings remain attached to a stable logical agent/session while the gateway may switch the underlying Claude, Codex, Pi, OpenCode, or future runtime provider. ## Scope - Normalize channel/plugin contracts so future Matrix, Slack, and other first-party adapters can share routing and authorization semantics. - In authorized bound channels, untagged messages route to the agent and responses stay in-channel. - A bot mention in a parent channel creates/uses a Discord thread; messages already inside a thread remain in that thread without requiring repeated mentions. - Preserve default-deny guild/channel/user authorization and per-user roles. - Keep Discord connection/session keys independent of harness/provider identifiers. - Add focused behavior, permission-boundary, and routing tests plus operator/developer documentation. ## Boundaries - Do not modify the active orchestrator-to-Pi migration or connector lease/fencing implementation (#754/#755). - Do not store Discord credentials in source or durable handoffs. - Gateway remains the policy/audit boundary. - Dynamic admin UI and production deployment are out of scope for this slice. ## Acceptance 1. Behavior is identical for all runtime providers because the plugin routes only by stable logical agent/session identity. 2. Mentioned parent-channel messages create/use threads and replies target the thread. 3. Untagged authorized channel messages receive responses in the channel. 4. Unauthorized guilds, channels, and users fail closed, including thread-parent authorization. 5. Shared contracts are transport-neutral and suitable for Matrix/Slack adapters. 6. Focused tests, baseline checks, independent code/security review, docs, and CI pass.
jason.woltje referenced this issue from a commit 2026-07-14 20:26:18 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#756