Skip to content

[Feat] Add public Discord context to Memory - #1761

Merged
mrubens merged 5 commits into
developfrom
feature/discord-brain-collector-3gquo3q3vbjua
Aug 28, 2026
Merged

[Feat] Add public Discord context to Memory#1761
mrubens merged 5 commits into
developfrom
feature/discord-brain-collector-3gquo3q3vbjua

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @mrubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Add a Discord Memory collector using the existing deployment bot credentials and Discord provider.
  • Collect only active Discord installation guilds and their @everyone-visible channels that the bot can read, plus active public threads and forum posts; exclude deactivated servers, DMs, private channels, and private threads.
  • Store deterministic channel/day snapshots with stable chunk identities, linked Roomote people, reply context, attachment names, source permalinks, bounded incremental catch-up, and a durable 90-day backfill queue.
  • Reconcile edits, deletions, permission loss, archived threads, and permission restoration conservatively, with state changes committed only after replacement pages land.
  • Register Discord in Memory source policy, status types, settings summaries, provider SDK surfaces, tests, and public documentation.

Why this change was made

Memory already collects public Slack discussions, but Discord deployments had no equivalent durable context. This adds Discord-specific collection without widening the deployment-wide corpus beyond channels that are publicly visible inside each server.

Impact

Discord-connected deployments can recall accessible public server discussions through Memory. Deactivating any server, including the final active installation, keeps cleanup running until its already-indexed pages are retired; reactivation remains eligible for a safe replay. Collection is bounded by guild, partition, page, and history-window limits; interruptions resume from durable cursors without skipping messages, and removing Discord credentials preserves historical pages.

Verification evidence: root lint, full monorepo typechecking, Knip, pre-push checks, Mintlify validation and broken-link checks, the original focused suites, and 50 targeted Discord collector/engine regression tests passed.

@roomote-community

roomote-community Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

  • apps/bullmq/src/scheduled-jobs/brain-collectors/discord-public-channels.ts:313 Restrict discovery to active Discord installations so deactivated servers cannot continue populating Memory.
  • apps/bullmq/src/scheduled-jobs/brain-collectors/discord-public-channels.ts:930 Retire indexed pages when the final active Discord installation is deactivated.

Reviewed d10e6e0

Comment thread apps/bullmq/src/scheduled-jobs/brain-collectors/discord-public-channels.ts Outdated
@roomote-roomote

roomote-roomote Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Resolved the final-installation cleanup gap in d10e6e0. With valid Discord credentials, tracked inventory now keeps the collector enabled after the last installation is deactivated, allowing authoritative retirement to finish; once inventory is empty the collector disables normally. Removing credentials still preserves historical pages. Added a zero-active-installation regression covering enablement, retirement, and shutdown. All 50 targeted collector/engine tests, root lint, full typechecking, Knip, and pre-push checks pass.

Comment thread apps/bullmq/src/scheduled-jobs/brain-collectors/discord-public-channels.ts Outdated
@mrubens
mrubens marked this pull request as ready for review August 28, 2026 03:12
@mrubens
mrubens merged commit 5df5fa2 into develop Aug 28, 2026
18 checks passed
@mrubens
mrubens deleted the feature/discord-brain-collector-3gquo3q3vbjua branch August 28, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant