agentscope-ai / agentscope-ai/agentscope-java

[BUG]: 使用默认镜像运行沙箱命令,write_file和edit_file工具报错

Abierto
#2,365 1 comentario 0 reacciones 0 asignados Ver en GitHub
area/extensions bug
Lenguaje dominante
Java
Estrellas
5.6k
Forks
1.3k
Merge medio
4 d 12 h
PR fusionados (30 d)
77

Descripción

# 运行版本:

2.0 GA

# 运行环境:

windows 10 + docker+ubuntu:22.04镜像

# 问题描述:

我在windows10下使用docker沙箱方式运行智能体,我用的默认镜像ubuntu:22.04

通过跟踪代码发现,BaseSandboxFilesystem.write方法执行如下命令:
``` bash
"if [ -e 'outputs/f1b0c43599814be3bcfc2778c1d7bd72zzz/test3.txt' ]; then echo 'EXISTS'; exit 1; fi; mkdir -p "$(dirname 'outputs/f1b0c43599814be3bcfc2778c1d7bd72zzz/test3.txt')" 2>&1"
```

checkResult返回如下信息:
``` bash
"'outputs/f1b0c43599814be3bcfc2778c1d7bd72zzz/test3.txt') 2>&1: 1: Syntax error: end of file unexpected (expecting ")")"
```
checkResult.exitCode是2

此时程序报错信息:
``` bash
"Error: Failed to write file 'outputs/f1b0c43599814be3bcfc2778c1d7bd72zzz/test3.txt'"
```

另外,调用BaseSandboxFilesystem.edit时, 会报如下错误:
``` bash
unexpected server response: sys,: 1: python3: not found
```

# 期望结果

1、报错信息应能反应明确的出错原因。
2、使用源代码默认的镜像,应能正确运行相关命令。否则,请给出特定镜像版本要求。

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.