@inetafrica/open-claudia 1.19.2 → 1.19.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.19.4
4
+ - Legacy/static env-only deployments with no persisted `auth.json` owner now treat configured `TELEGRAM_CHAT_ID` chats as owners for shared auth commands. This fixes authorized test chats being blocked from `/codex_login` when no `isOwner` metadata exists yet.
5
+
6
+ ## v1.19.3
7
+ - Owner-only auth commands now recognize chats marked as `isOwner: true` in `auth.json`, not only the first `TELEGRAM_CHAT_ID`. This fixes owner-authenticated Telegram chats being blocked from `/codex_login` and `/codex_setup_token`.
8
+
3
9
  ## v1.19.2
4
10
  - Docker images now bake in the OpenAI Codex CLI (`@openai/codex`), so `/codex` and Codex auth commands are available in container/Kubernetes deployments after rollout.
5
11
  - Documented that direct npm installs still need optional backend CLIs installed on the host, while Docker images include the Codex CLI.
package/bot-agent.js CHANGED
@@ -328,7 +328,15 @@ function isAuthorized(msg) {
328
328
  }
329
329
 
330
330
  function isOwner(msg) {
331
- return String(msg.chat.id) === CHAT_ID;
331
+ const chatId = String(msg.chat.id);
332
+ if (chatId === CHAT_ID) return true;
333
+ try {
334
+ const auth = JSON.parse(fs.readFileSync(AUTH_FILE, "utf-8"));
335
+ const authorized = Array.isArray(auth.authorized) ? auth.authorized : [];
336
+ if (authorized.some((a) => String(a.chatId) === chatId && a.isOwner === true)) return true;
337
+ if (!authorized.some((a) => a.isOwner === true) && CHAT_IDS.includes(chatId)) return true;
338
+ } catch (e) {}
339
+ return false;
332
340
  }
333
341
 
334
342
  function loadAuth() {
package/bot.js CHANGED
@@ -659,7 +659,15 @@ function isAuthorized(msg) {
659
659
  }
660
660
 
661
661
  function isOwner(msg) {
662
- return String(msg.chat.id) === CHAT_ID;
662
+ const chatId = String(msg.chat.id);
663
+ if (chatId === CHAT_ID) return true;
664
+ try {
665
+ const auth = JSON.parse(fs.readFileSync(AUTH_FILE, "utf-8"));
666
+ const authorized = Array.isArray(auth.authorized) ? auth.authorized : [];
667
+ if (authorized.some((a) => String(a.chatId) === chatId && a.isOwner === true)) return true;
668
+ if (!authorized.some((a) => a.isOwner === true) && CHAT_IDS.includes(chatId)) return true;
669
+ } catch (e) {}
670
+ return false;
663
671
  }
664
672
 
665
673
  function loadAuth() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inetafrica/open-claudia",
3
- "version": "1.19.2",
3
+ "version": "1.19.4",
4
4
  "description": "Your always-on AI coding assistant — Claude Code, Cursor Agent, and OpenAI Codex via Telegram",
5
5
  "main": "bot.js",
6
6
  "bin": {