* fix lint and update config.example.json

This commit is contained in:
lxowalle 2026-03-04 17:14:31 +08:00
parent 07488bd852
commit 5d1976dd80
2 changed files with 91 additions and 8 deletions

View file

@ -226,7 +226,8 @@ func setupCronTool(
// Create and register CronTool if enabled // Create and register CronTool if enabled
var cronTool *tools.CronTool var cronTool *tools.CronTool
if cfg.Tools.IsToolEnabled("cron") { if cfg.Tools.IsToolEnabled("cron") {
cronTool, err := tools.NewCronTool(cronService, agentLoop, msgBus, workspace, restrict, execTimeout, cfg) var err error
cronTool, err = tools.NewCronTool(cronService, agentLoop, msgBus, workspace, restrict, execTimeout, cfg)
if err != nil { if err != nil {
log.Fatalf("Critical error during CronTool initialization: %v", err) log.Fatalf("Critical error during CronTool initialization: %v", err)
} }

View file

@ -225,24 +225,41 @@
} }
}, },
"tools": { "tools": {
"allow_read_paths": null,
"allow_write_paths": null,
"web": { "web": {
"enabled": true,
"brave": { "brave": {
"enabled": false, "enabled": false,
"api_key": "YOUR_BRAVE_API_KEY", "api_key": "YOUR_BRAVE_API_KEY",
"max_results": 5 "max_results": 5
}, },
"tavily": {
"enabled": false,
"api_key": "",
"base_url": "",
"max_results": 0
},
"duckduckgo": { "duckduckgo": {
"enabled": true, "enabled": true,
"max_results": 5 "max_results": 5
}, },
"perplexity": { "perplexity": {
"enabled": false, "enabled": false,
"api_key": "pplx-xxx", "api_key": "",
"max_results": 5 "max_results": 5
}, },
"proxy": "" "glm_search": {
"enabled": false,
"api_key": "",
"base_url": "https://open.bigmodel.cn/api/paas/v4/web_search",
"search_engine": "search_std",
"max_results": 5
},
"fetch_limit_bytes": 10485760
}, },
"cron": { "cron": {
"enabled": true,
"exec_timeout_minutes": 5 "exec_timeout_minutes": 5
}, },
"mcp": { "mcp": {
@ -311,19 +328,84 @@
} }
}, },
"exec": { "exec": {
"enable_deny_patterns": false, "enabled": true,
"custom_deny_patterns": [] "enable_deny_patterns": true,
"custom_deny_patterns": null,
"custom_allow_patterns": null
}, },
"skills": { "skills": {
"enabled": true,
"registries": { "registries": {
"clawhub": { "clawhub": {
"enabled": true, "enabled": true,
"base_url": "https://clawhub.ai", "base_url": "https://clawhub.ai",
"search_path": "/api/v1/search", "auth_token": "",
"skills_path": "/api/v1/skills", "search_path": "",
"download_path": "/api/v1/download" "skills_path": "",
"download_path": "",
"timeout": 0,
"max_zip_size": 0,
"max_response_size": 0
} }
},
"max_concurrent_searches": 2,
"search_cache": {
"max_size": 50,
"ttl_seconds": 300
} }
},
"media_cleanup": {
"enabled": true,
"max_age_minutes": 30,
"interval_minutes": 5
},
"append_file": {
"enabled": true
},
"cron_tool": {
"enabled": true
},
"edit_file": {
"enabled": true
},
"exec_tool": {
"enabled": true
},
"find_skills": {
"enabled": true
},
"i2c": {
"enabled": false
},
"install_skill": {
"enabled": true
},
"list_dir": {
"enabled": false
},
"message": {
"enabled": true
},
"read_file": {
"enabled": true
},
"spawn": {
"enabled": true
},
"spi": {
"enabled": false
},
"subagent": {
"enabled": true
},
"web_fetch": {
"enabled": true
},
"web_search": {
"enabled": true
},
"write_file": {
"enabled": true
} }
}, },
"heartbeat": { "heartbeat": {