From fd0fbc422dc6339b6a7f814bbf66a4154e0a8e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Wed, 1 Apr 2026 10:27:21 +0800 Subject: [PATCH] uuid2str --- agent/plugin_hook_loader.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/agent/plugin_hook_loader.py b/agent/plugin_hook_loader.py index c1629f3..271ebbf 100644 --- a/agent/plugin_hook_loader.py +++ b/agent/plugin_hook_loader.py @@ -165,11 +165,11 @@ async def _execute_command(skill_path: str, command: str, hook_type: str, config try: # 设置环境变量,传递给子进程 env = os.environ.copy() - env['ASSISTANT_ID'] = getattr(config, 'bot_id', '') - env['USER_IDENTIFIER'] = getattr(config, 'user_identifier', '') - env['TRACE_ID'] = getattr(config, 'trace_id', '') - env['SESSION_ID'] = getattr(config, 'session_id', '') - env['LANGUAGE'] = getattr(config, 'language', '') + env['ASSISTANT_ID'] = str(getattr(config, 'bot_id', '')) + env['USER_IDENTIFIER'] = str(getattr(config, 'user_identifier', '')) + env['TRACE_ID'] = str(getattr(config, 'trace_id', '')) + env['SESSION_ID'] = str(getattr(config, 'session_id', '')) + env['LANGUAGE'] = str(getattr(config, 'language', '')) env['HOOK_TYPE'] = hook_type # 合并 config 中的自定义 shell 环境变量