@songsid/agend 2.0.2-beta.3 → 2.0.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: multi-channel
|
|
3
|
+
description: Setting up multiple platforms (Telegram + Discord) with proper general routing
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Multi-Channel Setup
|
|
7
|
+
|
|
8
|
+
When using multiple platforms (e.g. Telegram + Discord), use `channels:` array instead of single `channel:`:
|
|
9
|
+
|
|
10
|
+
```yaml
|
|
11
|
+
channels:
|
|
12
|
+
- id: discord
|
|
13
|
+
type: discord
|
|
14
|
+
mode: topic
|
|
15
|
+
bot_token_env: AGEND_DISCORD_TOKEN
|
|
16
|
+
group_id: "123456789"
|
|
17
|
+
options:
|
|
18
|
+
general_channel_id: "987654321"
|
|
19
|
+
- id: telegram
|
|
20
|
+
type: telegram
|
|
21
|
+
mode: topic
|
|
22
|
+
bot_token_env: AGEND_BOT_TOKEN
|
|
23
|
+
group_id: "-1001234567890"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Critical: each adapter needs its own general instance.**
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
instances:
|
|
30
|
+
general:
|
|
31
|
+
working_directory: ~/.agend/general
|
|
32
|
+
topic_id: "987654321" # DC general channel
|
|
33
|
+
general_topic: true
|
|
34
|
+
channel_id: discord # binds to discord adapter
|
|
35
|
+
general-telegram:
|
|
36
|
+
working_directory: ~/.agend/general-telegram
|
|
37
|
+
topic_id: 1 # TG general topic (thread_id 1)
|
|
38
|
+
general_topic: true
|
|
39
|
+
channel_id: telegram # binds to telegram adapter
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Auto-Detection
|
|
43
|
+
|
|
44
|
+
On startup, AgEnD checks each adapter has a bound general. If missing, it auto-creates one with a warning log:
|
|
45
|
+
```
|
|
46
|
+
WARN: No general instance for adapter — auto-creating
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The `channel_id` field explicitly binds a general to an adapter. Without it, matching falls back to instance name containing the adapter id (e.g. `general-telegram` matches `telegram`).
|
|
50
|
+
|
|
51
|
+
## Common Mistakes
|
|
52
|
+
|
|
53
|
+
| Mistake | Symptom | Fix |
|
|
54
|
+
|---------|---------|-----|
|
|
55
|
+
| One general for two platforms | TG messages reply in DC | Add a second general with `channel_id` |
|
|
56
|
+
| `channels:` without unique `id` per entry | Adapter collision | Set `id: discord` / `id: telegram` |
|
|
57
|
+
| Using `channel:` (singular) for multi-platform | Second platform ignored | Switch to `channels:` array |
|
|
58
|
+
|
|
59
|
+
## Single → Multi Migration
|
|
60
|
+
|
|
61
|
+
1. Change `channel:` to `channels:` array, add `id` to existing entry
|
|
62
|
+
2. Add new platform entry with its own `id`
|
|
63
|
+
3. Add a general instance for the new platform with `channel_id: <new-adapter-id>`
|
|
64
|
+
4. Restart fleet: `agend fleet restart`
|
package/package.json
CHANGED