agentscope-ai / agentscope-ai/agentscope-java

[Bug]:agentscope-builder模块本地运行skills加载报错

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

Descripción

**AgentScope-Java is an open-source project. To involve a broader community, we recommend asking your questions in English.**

**Describe the bug**
本地运行agentscope-builder模块,界面skills list加载失败报错

**To Reproduce**
Steps to reproduce the behavior:

1. 本地运行agentscope-builder模块代码
2. http://localhost:8081/agents/default/skills 界面
3. 界面报错:Failed to list workspace skills (500)

**Expected behavior**
正常展示skills列表

**Error messages**
页面:

Image

控制台报错:
ava.lang.SecurityException: Absolute path /skills is not within an allowed root. Filesystem root: /Users/xululu/.agentscope/builder/workspace; additional roots: [/Users/xululu/Documents/code/github-ai/agentscope-java, /Users/xululu/.agentscope/builder/workspace]
at io.agentscope.harness.agent.filesystem.local.LocalFilesystem.resolveRooted(LocalFilesystem.java:640)
Suppressed: The stacktrace has been enhanced by Reactor, refer to additional information below:
Error has been observed at the following site(s):
*__checkpoint ⇢ Handler io.agentscope.builder.web.api.AgentSkillsController#listWorkspaceSkills(String, Authentication) [DispatcherHandler]
*__checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ JwtAuthFilter [DefaultWebFilterChain]
*__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ CorsWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
*__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy@10357889
*__checkpoint ⇢ HTTP GET "/api/agents/default/skills/workspace" [ExceptionHandlingWebHandler]
Original Stack Trace:
at io.agentscope.harness.agent.filesystem.local.LocalFilesystem.resolveRooted(LocalFilesystem.java:640)
at io.agentscope.harness.agent.filesystem.local.LocalFilesystem.resolvePath(LocalFilesystem.java:598)
at io.agentscope.harness.agent.filesystem.local.LocalFilesystem.ls(LocalFilesystem.java:239)
at io.agentscope.harness.agent.filesystem.OverlayFilesystem.ls(OverlayFilesystem.java:140)
at io.agentscope.harness.agent.filesystem.BakedContextFilesystem.ls(BakedContextFilesystem.java:53)
at io.agentscope.builder.web.api.AgentSkillsController.lambda$listWorkspaceSkills$0(AgentSkillsController.java:137)
at reactor.core.publisher.MonoCallable$MonoCallableSubscription.request(MonoCallable.java:134)
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:172)
at reactor.core.publisher.MonoSingle$SingleSubscriber.doOnRequest(MonoSingle.java:104)
at reactor.core.publisher.Operators$MonoInnerProducerBase.request(Operators.java:2925)

**Environment (please complete the following information):**

- AgentScope-Java Version: [2.0.0-SNAPSHOT]
- Java Version: [17]
- OS: [macos]

**Additional context**
我使用qoder帮我修复下之后,程序正常,修改内容为
agentscope-java/agentscope-examples/agents/agentscope-builder/src/main/java/io/agentscope/builder/web/config/BuilderConfig.java

Image

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.