agentscope-ai / agentscope-ai/agentscope-java

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

未關閉
#1,985 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area/harness bug
主要語言
Java
星號
5.6k
分支
1.3k
平均合併
4 天 12 小時
30 天內合併 PR
77

描述

**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

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。