myagent-ai 1.22.0 → 1.22.2
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/chatbot/whatsapp_bot.py +3 -16
- package/package.json +1 -1
- package/web/api_server.py +0 -1
package/chatbot/whatsapp_bot.py
CHANGED
|
@@ -92,22 +92,9 @@ class WhatsAppBot(BaseChatBot):
|
|
|
92
92
|
# 检查是否已安装依赖
|
|
93
93
|
node_modules = bridge_dir / "node_modules"
|
|
94
94
|
if not node_modules.exists():
|
|
95
|
-
self.logger.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"npm", "install", "--production",
|
|
99
|
-
cwd=str(bridge_dir),
|
|
100
|
-
stdout=asyncio.subprocess.PIPE,
|
|
101
|
-
stderr=asyncio.subprocess.PIPE,
|
|
102
|
-
)
|
|
103
|
-
stdout, stderr = await asyncio.wait_for(proc.communicate(), timeout=120)
|
|
104
|
-
if proc.returncode != 0:
|
|
105
|
-
self.logger.error(f"Baileys 安装失败: {stderr.decode()[:500]}")
|
|
106
|
-
return
|
|
107
|
-
self.logger.info("Baileys 依赖安装完成")
|
|
108
|
-
except Exception as e:
|
|
109
|
-
self.logger.error(f"Baileys 安装异常: {e}")
|
|
110
|
-
return
|
|
95
|
+
self.logger.warning("Baileys 依赖未安装,请手动执行:")
|
|
96
|
+
self.logger.warning(f" cd {bridge_dir} && npm install")
|
|
97
|
+
return
|
|
111
98
|
|
|
112
99
|
env = os.environ.copy()
|
|
113
100
|
env["SESSION_DIR"] = self._session_dir
|
package/package.json
CHANGED
package/web/api_server.py
CHANGED
|
@@ -220,7 +220,6 @@ class ApiServer:
|
|
|
220
220
|
# 任务列表内存存储(exec 模式,替代 task.md)
|
|
221
221
|
self._task_list_store: dict[str, list] = {} # session_id -> [{text, status}] (per-session, not per-agent)
|
|
222
222
|
# 模型链并发锁:防止并发请求互相覆盖 self.core.llm 配置
|
|
223
|
-
import asyncio
|
|
224
223
|
self._model_chain_lock = asyncio.Lock()
|
|
225
224
|
self._setup_routes()
|
|
226
225
|
self._runner: Optional[web.AppRunner] = None
|