Skip to content

Commit 73ce189

Browse files
fix: preserve integer type for Telegram allowed_user_ids
Devin Review caught a red issue: quoting ${TELEGRAM_OWNER_ID} inside a flow sequence (e.g. ["${TELEGRAM_OWNER_ID}"]) makes the YAML valid but changes the parsed type from int to str after env-var substitution. Telegram user IDs are numeric and Hermes compares them with strict type matching, so a string-typed list would reject all messages. Switched all 4 templates + 2 reference architectures + the wizard generator to block-sequence style: allowed_user_ids: - ${TELEGRAM_OWNER_ID} Verified with PyYAML that post-substitution type is int across all 4 templates. Also: localized READMEs (zh + ja) now use 'sudo bash' to match the main README, since vps-bootstrap.sh requires root. Co-Authored-By: Rob <onerobby@gmail.com>
1 parent 69e3ab2 commit 73ce189

9 files changed

Lines changed: 16 additions & 9 deletions

File tree

README-ja.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
```bash
1010
# 新しい Debian 12 / Ubuntu 24.04 VPS で実行
11-
curl -sSL https://raw.githubusercontent.com/OnlyTerp/hermes-optimization-guide/main/scripts/vps-bootstrap.sh | bash
11+
curl -sSL https://raw.githubusercontent.com/OnlyTerp/hermes-optimization-guide/main/scripts/vps-bootstrap.sh | sudo bash
1212
```
1313

1414
もしくは [docs/quickstart.md](./docs/quickstart.md)(5 分で Telegram Bot)を参照。

README-zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
```bash
1010
# 新建 Debian 12 / Ubuntu 24.04 VPS 上运行
11-
curl -sSL https://raw.githubusercontent.com/OnlyTerp/hermes-optimization-guide/main/scripts/vps-bootstrap.sh | bash
11+
curl -sSL https://raw.githubusercontent.com/OnlyTerp/hermes-optimization-guide/main/scripts/vps-bootstrap.sh | sudo bash
1212
```
1313

1414
或阅读 [docs/quickstart.md](./docs/quickstart.md)(5 分钟 Telegram 机器人)。

docs/reference-architectures/homelab.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ gateways:
9595
bots:
9696
admin:
9797
token: "${TELEGRAM_ADMIN_BOT_TOKEN}"
98-
allowed_user_ids: ["${TELEGRAM_OWNER_ID}"]
98+
allowed_user_ids:
99+
- ${TELEGRAM_OWNER_ID}
99100

100101
memory:
101102
backend: lightrag

docs/reference-architectures/road-warrior.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ gateways:
6868
bots:
6969
admin:
7070
token: "${TELEGRAM_ADMIN_BOT_TOKEN}"
71-
allowed_user_ids: ["${TELEGRAM_OWNER_ID}"]
71+
allowed_user_ids:
72+
- ${TELEGRAM_OWNER_ID}
7273

7374
# The money section
7475
remote_sandbox:

docs/wizard/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ <h1>Hermes Config Wizard</h1>
322322
lines.push(` bots:`);
323323
lines.push(` admin:`);
324324
lines.push(` token: "$\{TELEGRAM_ADMIN_BOT_TOKEN\}"`);
325-
lines.push(` allowed_user_ids: ["$\{TELEGRAM_OWNER_ID\}"]`);
325+
lines.push(` allowed_user_ids:`);
326+
lines.push(` - $\{TELEGRAM_OWNER_ID\}`);
326327
lines.push(` trust_label: high`);
327328
}
328329
if (gateways.discord) {

templates/config/cost-optimized.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ gateways:
6060
bots:
6161
admin:
6262
token: ${TELEGRAM_ADMIN_BOT_TOKEN}
63-
allowed_user_ids: ["${TELEGRAM_OWNER_ID}"]
63+
allowed_user_ids:
64+
- ${TELEGRAM_OWNER_ID}
6465

6566
memory:
6667
backend: lightrag

templates/config/production.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ gateways:
6262
bots:
6363
admin:
6464
token: ${TELEGRAM_ADMIN_BOT_TOKEN}
65-
allowed_user_ids: ["${TELEGRAM_OWNER_ID}"]
65+
allowed_user_ids:
66+
- ${TELEGRAM_OWNER_ID}
6667
trust_label: high
6768
discord:
6869
enabled: true

templates/config/security-hardened.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ gateways:
4646
bots:
4747
admin:
4848
token: ${TELEGRAM_ADMIN_BOT_TOKEN}
49-
allowed_user_ids: ["${TELEGRAM_OWNER_ID}"]
49+
allowed_user_ids:
50+
- ${TELEGRAM_OWNER_ID}
5051
profile: trusted
5152
public:
5253
token: ${TELEGRAM_PUBLIC_BOT_TOKEN}

templates/config/telegram-bot.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ gateways:
3030
# Primary / admin bot — this is YOU
3131
admin:
3232
token: ${TELEGRAM_ADMIN_BOT_TOKEN}
33-
allowed_user_ids: ["${TELEGRAM_OWNER_ID}"]
33+
allowed_user_ids:
34+
- ${TELEGRAM_OWNER_ID}
3435
trust_label: high
3536
default_skill: default
3637
# Public bot — strangers talk to this one (optional, comment out to skip)

0 commit comments

Comments
 (0)