Commit 8132240
Subsystem 3a: team chat bridge (two-way #teamchat ↔ in-game) (#8)
* feat(abstractions): add TeamMessageReceivedEvent
* test(abstractions): assert ServerId in TeamMessageReceivedEvent test
* feat(connections): add team-chat send + received-message to the socket seam
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(connections): note SendTeamMessageAsync surfaces send failures
Unlike ConnectAsync/GetInfoAsync which use broad catches to return typed
outcomes, SendTeamMessageAsync intentionally lets exceptions propagate so
the upstream supervisor can classify them as a failed send result.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(connections): publish TeamMessageReceivedEvent + implement ITeamChatSender
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* harden(connections): guard team-message publish against shutdown dispose race
Add an early _disposed check in PublishTeamMessageAsync to prevent reading
_shutdown.Token after DisposeAsync has disposed it. Also add explanatory
comments on the shutdown-token choice and the fire-and-forget pattern.
* feat(workspace): provision a per-server #teamchat channel (EN/FR)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(connections): harden TeamChatSenderTests against parallel-load timeouts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(persistence): add GetChannelsByKeyAsync to the workspace store
Adds IWorkspaceStore.GetChannelsByKeyAsync and its EF Core implementation
for a cross-guild reverse lookup of ProvisionedChannel rows by ChannelKey,
needed by the upcoming team-chat channel locator (subsystem 3a Task 6).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(workspace): implement GetChannelsByKeyAsync on FakeWorkspaceStore
FakeWorkspaceStore was missing the new IWorkspaceStore member added in
the previous commit, causing the Workspace.Tests assembly to fail to
build (CS0535) and silently skip all 38 tests. Adds the in-memory
implementation filtered by ChannelKey over _channels.Values.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(workspace): add ITeamChatChannelLocator with a TTL cache
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(workspace): cover TeamChatChannelLocator TTL refresh; tidy field initializers
Add Cache_refreshes_after_ttl_expires test proving the locator serves
stale cache within the 30 s TTL and rebuilds after expiry. Change the
two explicit Dictionary<...> field initializers to target-typed new().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(chat): scaffold Features.Chat project + RelayDedupBuffer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(chat): add team-chat webhook poster seam + Discord.Net impl
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(chat): add TeamChatRelay (game -> Discord with echo drop)
* feat(chat): add TeamChatInboundProcessor (Discord -> game)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(chat): wire ChatHostedService, AddChat, and the Message Content intent
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs: document Message Content intent + Manage Webhooks for the chat bridge
Add ## Discord application setup (team chat bridge) section to
running-locally.md explaining the required privileged gateway intent and
Manage Webhooks permission. Apply jb ReformatAndReorder to all
chat-bridge source files (these were never jb-formatted before this
finalization pass).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(chat): address Copilot review on PR #8
- DiscordTeamChatWebhookPoster: dispose the redundant DiscordWebhookClient
when it loses the GetOrAdd cache race (no longer leaks a client/HttpClient).
- ChatRegistrationTests: replace the weak twice-resolve singleton assertion
with a behavioral test proving the DI-resolved relay and processor share the
same RelayDedupBuffer (processor records a line; the relay drops its echo).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 44d3447 commit 8132240
42 files changed
Lines changed: 1590 additions & 20 deletions
File tree
- docs/development
- src
- RustPlusBot.Abstractions/Events
- RustPlusBot.Discord
- RustPlusBot.Features.Chat
- Hosting
- Inbound
- Relaying
- Webhooks
- RustPlusBot.Features.Connections
- Listening
- Supervisor
- RustPlusBot.Features.Workspace
- Localization
- Locating
- Specs
- RustPlusBot.Host
- RustPlusBot.Persistence/Workspace
- tests
- RustPlusBot.Abstractions.Tests/Events
- RustPlusBot.Features.Chat.Tests
- RustPlusBot.Features.Connections.Tests
- Fakes
- RustPlusBot.Features.Workspace.Tests
- Fakes
- Locating
- Specs
- RustPlusBot.Persistence.Tests/Workspace
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
28 | 40 | | |
29 | 41 | | |
30 | 42 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
Lines changed: 114 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
0 commit comments