Implemented a unified path validation helper to ensure filesystem operations stay within the designated workspace. This now supports a 'restrict_to_workspace' option in config.json (enabled by default) to allow flexibility for specific environments while maintaining a secure default posture. I've updated read_file, write_file, list_dir, append_file, edit_file, and exec tools to respect this setting and included tests for both restricted and unrestricted modes.
92 lines
1.7 KiB
JSON
92 lines
1.7 KiB
JSON
{
|
|
"agents": {
|
|
"defaults": {
|
|
"workspace": "~/.picoclaw/workspace",
|
|
"restrict_to_workspace": true,
|
|
"model": "glm-4.7",
|
|
"max_tokens": 8192,
|
|
"temperature": 0.7,
|
|
"max_tool_iterations": 20
|
|
}
|
|
},
|
|
"channels": {
|
|
"telegram": {
|
|
"enabled": false,
|
|
"token": "YOUR_TELEGRAM_BOT_TOKEN",
|
|
"allow_from": ["YOUR_USER_ID"]
|
|
},
|
|
"discord": {
|
|
"enabled": false,
|
|
"token": "YOUR_DISCORD_BOT_TOKEN",
|
|
"allow_from": []
|
|
},
|
|
"maixcam": {
|
|
"enabled": false,
|
|
"host": "0.0.0.0",
|
|
"port": 18790,
|
|
"allow_from": []
|
|
},
|
|
"whatsapp": {
|
|
"enabled": false,
|
|
"bridge_url": "ws://localhost:3001",
|
|
"allow_from": []
|
|
},
|
|
"feishu": {
|
|
"enabled": false,
|
|
"app_id": "",
|
|
"app_secret": "",
|
|
"encrypt_key": "",
|
|
"verification_token": "",
|
|
"allow_from": []
|
|
},
|
|
"dingtalk": {
|
|
"enabled": false,
|
|
"client_id": "YOUR_CLIENT_ID",
|
|
"client_secret": "YOUR_CLIENT_SECRET",
|
|
"allow_from": []
|
|
}
|
|
},
|
|
"providers": {
|
|
"anthropic": {
|
|
"api_key": "",
|
|
"api_base": ""
|
|
},
|
|
"openai": {
|
|
"api_key": "",
|
|
"api_base": ""
|
|
},
|
|
"openrouter": {
|
|
"api_key": "sk-or-v1-xxx",
|
|
"api_base": ""
|
|
},
|
|
"groq": {
|
|
"api_key": "gsk_xxx",
|
|
"api_base": ""
|
|
},
|
|
"zhipu": {
|
|
"api_key": "YOUR_ZHIPU_API_KEY",
|
|
"api_base": ""
|
|
},
|
|
"gemini": {
|
|
"api_key": "",
|
|
"api_base": ""
|
|
},
|
|
"vllm": {
|
|
"api_key": "",
|
|
"api_base": ""
|
|
}
|
|
},
|
|
"tools": {
|
|
"web": {
|
|
"search": {
|
|
"api_key": "YOUR_BRAVE_API_KEY",
|
|
"max_results": 5
|
|
}
|
|
}
|
|
},
|
|
"gateway": {
|
|
"host": "0.0.0.0",
|
|
"port": 18790
|
|
}
|
|
}
|