Files
MineNasAI/config/config.json5

132 lines
2.8 KiB
Plaintext
Raw Normal View History

{
// MineNASAI 配置文件
// 使用 JSON5 格式,支持注释
// 基础配置
"app": {
"name": "MineNASAI",
"version": "0.1.0",
"debug": false,
"timezone": "Asia/Shanghai"
},
// Agent 配置
"agents": {
"default_model": "claude-sonnet-4-20250514",
"max_tokens": 8192,
"temperature": 0.7,
"list": [
{
"id": "main",
"name": "主Agent",
"workspace_path": "~/.config/minenasai/workspace",
"tools": {
"allow": ["read", "write", "python", "web_search"],
"deny": ["delete", "system_config"]
},
"sandbox": {
"mode": "workspace",
"allowed_paths": ["~/.config/minenasai/workspace"]
}
}
]
},
// Gateway 配置
"gateway": {
"host": "0.0.0.0",
"port": 8000,
"websocket_path": "/ws",
"cors_origins": ["*"]
},
// 通讯渠道配置
"channels": {
"wework": {
"enabled": false,
"webhook_path": "/webhook/wework"
},
"feishu": {
"enabled": false,
"webhook_path": "/webhook/feishu"
}
},
// Web TUI 配置
"webtui": {
"enabled": true,
"host": "0.0.0.0",
"port": 8080,
"session_timeout": 3600,
"ssh": {
"host": "localhost",
"port": 22,
"connect_timeout": 10
}
},
// 智能路由配置
"router": {
"mode": "agent", // "agent" 或 "heuristic"
"thresholds": {
"simple_max_tokens": 100,
"complex_min_tools": 2
}
},
// 存储配置
"storage": {
"database_path": "~/.config/minenasai/database.db",
"sessions_path": "~/.config/minenasai/sessions",
"logs_path": "~/.config/minenasai/logs"
},
// 日志配置
"logging": {
"level": "INFO",
"format": "json",
"console": true,
"file": true,
"audit": {
"enabled": true,
"path": "~/.config/minenasai/logs/audit.jsonl"
}
},
// 代理配置(境外 API 使用)
"proxy": {
"enabled": true,
"http": "http://127.0.0.1:7890",
"https": "http://127.0.0.1:7890",
"no_proxy": ["localhost", "127.0.0.1", ".local"],
"auto_detect": true,
"fallback_ports": [7890, 7891, 1080, 1087, 10808]
},
// LLM 多模型配置
"llm": {
"default_provider": "anthropic",
"default_model": "claude-sonnet-4-20250514",
// API Keys 建议在 .env 中配置,此处留空
"anthropic_api_key": "",
"openai_api_key": "",
"deepseek_api_key": "",
"zhipu_api_key": "",
"minimax_api_key": "",
"moonshot_api_key": "",
"gemini_api_key": ""
},
// 安全配置
"security": {
"danger_levels": {
"safe": ["read", "list", "search"],
"low": ["write", "python"],
"medium": ["exec", "docker"],
"high": ["delete", "chmod"],
"critical": ["format", "rm_rf"]
},
"require_confirmation": ["high", "critical"]
}
}