diff --git a/skillagent/skillengine.py b/skillagent/skillengine.py index 7815f25..8044a24 100644 --- a/skillagent/skillengine.py +++ b/skillagent/skillengine.py @@ -65,11 +65,11 @@ async def run_subprocess(command, cwd, env, timeout=30.0): raise Exception(f"{command} 执行超时") # 对应 text=True,手动解码 - return { + return DictObject(**{ "stdout": stdout.decode().strip(), "stderr": stderr.decode().strip(), "return_code": process.returncode - } + }) except Exception as e: print(f"{command} 执行异常: {e}") @@ -239,7 +239,11 @@ class IndustrialSkillEngine: # 决策:是直接回答还是执行脚本 decision = await self.llm(f"上下文: {context}\n问题: {user_prompt}\n决定动作:EXEC: 或 ANSWER: 或 REPLY: ") - + output = { + "status": "PROCESSING", + "hint": f"决策完成:{decision=}" + } + await self.write_output(output) if "REPLY" in decision: sessionkey = getID() await self.write_output({