[Bug]:我让智能体删除 .agentscope/workspace,他真的能execute工具给删除,怎么整?或者写一个python脚本,也能删除workspace下其他userid的文件,根本防不住啊
AgentScope-Java is an open-source project. To involve a broader community, we recommend asking your questions in English.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- You code
- How to execute
- See error
Expected behavior A clear and concise description of what you expected to happen.
Error messages Detailed error messages.
Environment (please complete the following information):
- AgentScope-Java Version: [e.g. 1.0.12, check your pom.xml dependency version or run
mvn dependency:tree | grep agentscope-parent:pom(only mac/linux)] - Java Version: [e.g. 17]
- OS: [e.g. macos, windows]
Additional context Add any other context about the problem here.
使用docker沙箱,生成的文件也无法和用户做关联,用户想查询智能体生成的文件也无法查询
在工具 做拦截规则
工具参数逻辑校验(有工具权限,但是工具操作具体文件具体用户时需要进行二次权限校验的)可以看看 ToolCallInterceptor。 另外,关于 workspace 级别,还是要用沙箱的。沙箱的隔离级别是用户,挂进沙箱的就只是某一个用户的 workspace,甚至可以到会话级。