@raolin2025/claude-code-node 2.6.3 → 2.6.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/core/cli.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raolin2025/claude-code-node",
3
- "version": "2.6.3",
3
+ "version": "2.6.4",
4
4
  "description": "Node.js AI Code Agent CLI - Zero dependencies, pure JavaScript, security hardened, multi-channel notifications, Telegram & QQ Bot remote programming, rich media upload, multi-account management",
5
5
  "type": "module",
6
6
  "main": "src/core/index.js",
package/src/core/cli.js CHANGED
@@ -907,7 +907,9 @@ const systemPrompt = cliArgs.systemPrompt || DEFAULT_SYSTEM_PROMPT
907
907
  // - Telegram 消息会作为 REPL 输入,与 CLI 共享同一个引擎和对话记忆
908
908
  // ============================================================
909
909
  const tgToken = process.env.CC_NODE_CHANNEL_TELEGRAM_TOKEN || config.get('channels')?.telegram?.token || ''
910
- if (tgToken) {
910
+ // 关键修复: 使用 --with-notify 时,由 startBuiltinListeners 统一启动 Telegram 监听器,
911
+ // 这里不能再独立启动一个,否则同一 token 会有两个 getUpdates 长轮询 → Telegram 报 HTTP 409 Conflict。
912
+ if (tgToken && !cliArgs.withNotify) {
911
913
  try {
912
914
  tgListener = new TelegramListener({
913
915
  channels: {