Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmd/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,14 +510,16 @@ func runGateway() {
toolsReg.Register(tools.NewMessageTool())
slog.Info("session + message tools registered")

// Allow read_file to access skills directories (outside workspace).
// Allow read_file to access skills directories and CLI workspaces (outside workspace).
// Skills can live in ~/.goclaw/skills/, ~/.agents/skills/, ~/.goclaw/skills-store/, etc.
// CLI workspaces live in ~/.goclaw/cli-workspaces/ (agent working files).
homeDir, _ := os.UserHomeDir()
if readTool, ok := toolsReg.Get("read_file"); ok {
if pa, ok := readTool.(tools.PathAllowable); ok {
pa.AllowPaths(globalSkillsDir)
if homeDir != "" {
pa.AllowPaths(filepath.Join(homeDir, ".agents", "skills"))
pa.AllowPaths(filepath.Join(homeDir, ".goclaw", "cli-workspaces"))
}
// Also allow the skills store directory (uploaded skill content).
if pgStores.Skills != nil {
Expand Down