fix(tools): allow sandbox access to temp media files

This commit is contained in:
Hoshina
2026-03-14 12:02:06 +08:00
parent b9aaad95cd
commit 1bc05e8392
7 changed files with 241 additions and 23 deletions
+3
View File
@@ -117,6 +117,8 @@ func registerSharedTools(
registry *AgentRegistry,
provider providers.LLMProvider,
) {
allowReadPaths := buildAllowReadPatterns(cfg)
for _, agentID := range registry.ListAgentIDs() {
agent, ok := registry.GetAgent(agentID)
if !ok {
@@ -195,6 +197,7 @@ func registerSharedTools(
cfg.Agents.Defaults.RestrictToWorkspace,
cfg.Agents.Defaults.GetMaxMediaSize(),
nil,
allowReadPaths,
)
agent.Tools.Register(sendFileTool)
}