- 创建 .gitignore 排除敏感配置文件、日志、缓存 - 移除 openclaw-config.json 和 config.yaml 从 git 跟踪 - 添加脱敏模板文件 (openclaw-config.json.example, config.yaml.example) - 更新 IDENTITY.md 和 USER.md - 添加 mem0 集成测试文件 - 添加 agents 目录结构 安全改进:API keys 现在通过环境变量管理,不再硬编码提交master
parent
b6467da698
commit
6a84c4abac
9 changed files with 330 additions and 241 deletions
@ -0,0 +1,40 @@ |
|||||||
|
# 敏感配置(包含 API keys、密码等) |
||||||
|
openclaw-config.json |
||||||
|
skills/*/config.yaml |
||||||
|
skills/*/.env |
||||||
|
*.env |
||||||
|
*.pem |
||||||
|
*.key |
||||||
|
|
||||||
|
# 日志和缓存 |
||||||
|
logs/ |
||||||
|
*.pyc |
||||||
|
__pycache__/ |
||||||
|
.cache/ |
||||||
|
.pytest_cache/ |
||||||
|
|
||||||
|
# 运行时 |
||||||
|
.pid |
||||||
|
*.pid |
||||||
|
*.log |
||||||
|
|
||||||
|
# 记忆文件(每日日志量大,单独备份) |
||||||
|
memory/*.md |
||||||
|
!memory/.gitkeep |
||||||
|
|
||||||
|
# 备份目录 |
||||||
|
backup/ |
||||||
|
|
||||||
|
# 系统文件 |
||||||
|
.DS_Store |
||||||
|
Thumbs.db |
||||||
|
*.swp |
||||||
|
*.swo |
||||||
|
*~ |
||||||
|
|
||||||
|
# Node modules(如果有) |
||||||
|
node_modules/ |
||||||
|
|
||||||
|
# Python 虚拟环境 |
||||||
|
venv/ |
||||||
|
.venv/ |
||||||
@ -1,207 +0,0 @@ |
|||||||
{ |
|
||||||
"meta": { |
|
||||||
"lastTouchedVersion": "2026.2.19-2", |
|
||||||
"lastTouchedAt": "2026-02-20T08:45:00.000Z" |
|
||||||
}, |
|
||||||
"env": { |
|
||||||
"TAVILY_API_KEY": "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" |
|
||||||
}, |
|
||||||
"wizard": { |
|
||||||
"lastRunAt": "2026-02-20T03:54:18.096Z", |
|
||||||
"lastRunVersion": "2026.2.17", |
|
||||||
"lastRunCommand": "doctor", |
|
||||||
"lastRunMode": "local" |
|
||||||
}, |
|
||||||
"auth": { |
|
||||||
"profiles": { |
|
||||||
"minimax-cn:default": { |
|
||||||
"provider": "minimax-cn", |
|
||||||
"mode": "api_key" |
|
||||||
}, |
|
||||||
"qwen-portal:default": { |
|
||||||
"provider": "qwen-portal", |
|
||||||
"mode": "oauth" |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
"models": { |
|
||||||
"mode": "merge", |
|
||||||
"providers": { |
|
||||||
"minimax-cn": { |
|
||||||
"baseUrl": "https://api.minimaxi.com/anthropic", |
|
||||||
"api": "anthropic-messages", |
|
||||||
"models": [ |
|
||||||
{ |
|
||||||
"id": "MiniMax-M2.5", |
|
||||||
"name": "MiniMax M2.5", |
|
||||||
"reasoning": true, |
|
||||||
"input": [ |
|
||||||
"text" |
|
||||||
], |
|
||||||
"cost": { |
|
||||||
"input": 15, |
|
||||||
"output": 60, |
|
||||||
"cacheRead": 2, |
|
||||||
"cacheWrite": 10 |
|
||||||
}, |
|
||||||
"contextWindow": 200000, |
|
||||||
"maxTokens": 8192 |
|
||||||
} |
|
||||||
] |
|
||||||
}, |
|
||||||
"bailian": { |
|
||||||
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1", |
|
||||||
"apiKey": "sk-c1715ee0479841399fd359c574647648", |
|
||||||
"api": "openai-completions", |
|
||||||
"models": [ |
|
||||||
{ |
|
||||||
"id": "qwen3.5-plus", |
|
||||||
"name": "qwen3.5-plus", |
|
||||||
"reasoning": true, |
|
||||||
"input": [ |
|
||||||
"text" |
|
||||||
], |
|
||||||
"cost": { |
|
||||||
"input": 0, |
|
||||||
"output": 0, |
|
||||||
"cacheRead": 0, |
|
||||||
"cacheWrite": 0 |
|
||||||
}, |
|
||||||
"contextWindow": 262144, |
|
||||||
"maxTokens": 65536 |
|
||||||
}, |
|
||||||
{ |
|
||||||
"id": "qwen3.5-plus-2026-02-15", |
|
||||||
"name": "qwen3.5-plus-2026-02-15", |
|
||||||
"reasoning": true, |
|
||||||
"input": [ |
|
||||||
"text" |
|
||||||
], |
|
||||||
"cost": { |
|
||||||
"input": 0, |
|
||||||
"output": 0, |
|
||||||
"cacheRead": 0, |
|
||||||
"cacheWrite": 0 |
|
||||||
}, |
|
||||||
"contextWindow": 262144, |
|
||||||
"maxTokens": 65536 |
|
||||||
} |
|
||||||
] |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
"agents": { |
|
||||||
"defaults": { |
|
||||||
"model": { |
|
||||||
"primary": "bailian/qwen3.5-plus", |
|
||||||
"fallbacks": [ |
|
||||||
"bailian/qwen3.5-plus-2026-02-15", |
|
||||||
"minimax-cn/MiniMax-M2.5" |
|
||||||
] |
|
||||||
}, |
|
||||||
"models": { |
|
||||||
"minimax-cn/MiniMax-M2.5": { |
|
||||||
"alias": "Minimax" |
|
||||||
}, |
|
||||||
"bailian/qwen3.5-plus": { |
|
||||||
"alias": "qwen3.5-plus" |
|
||||||
}, |
|
||||||
"bailian/qwen3.5-plus-2026-02-15": { |
|
||||||
"alias": "qwen3.5-plus-thinking" |
|
||||||
} |
|
||||||
}, |
|
||||||
"workspace": "/root/.openclaw/workspace", |
|
||||||
"contextPruning": { |
|
||||||
"mode": "cache-ttl", |
|
||||||
"ttl": "5m" |
|
||||||
}, |
|
||||||
"compaction": { |
|
||||||
"mode": "safeguard" |
|
||||||
}, |
|
||||||
"maxConcurrent": 4, |
|
||||||
"subagents": { |
|
||||||
"maxConcurrent": 8, |
|
||||||
"model": "minimax/MiniMax-M2.1" |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
"messages": { |
|
||||||
"ackReactionScope": "group-mentions" |
|
||||||
}, |
|
||||||
"commands": { |
|
||||||
"native": "auto", |
|
||||||
"nativeSkills": "auto", |
|
||||||
"restart": true |
|
||||||
}, |
|
||||||
"hooks": { |
|
||||||
"internal": { |
|
||||||
"enabled": true, |
|
||||||
"entries": { |
|
||||||
"command-logger": { |
|
||||||
"enabled": true |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
"channels": { |
|
||||||
"telegram": { |
|
||||||
"enabled": true, |
|
||||||
"dmPolicy": "pairing", |
|
||||||
"botToken": "7047245486:AAF504oCHZpfEIx3-3VXJYSSS9XelkV6o3g", |
|
||||||
"groupPolicy": "allowlist", |
|
||||||
"streamMode": "partial" |
|
||||||
} |
|
||||||
}, |
|
||||||
"gateway": { |
|
||||||
"port": 18789, |
|
||||||
"mode": "local", |
|
||||||
"bind": "lan", |
|
||||||
"auth": { |
|
||||||
"mode": "token", |
|
||||||
"token": "9e2e91b31a56fb56a35e91821c025267292ec44c26169b12" |
|
||||||
}, |
|
||||||
"trustedProxies": [ |
|
||||||
"127.0.0.1", |
|
||||||
"::1" |
|
||||||
], |
|
||||||
"tailscale": { |
|
||||||
"mode": "off", |
|
||||||
"resetOnExit": false |
|
||||||
}, |
|
||||||
"nodes": {} |
|
||||||
}, |
|
||||||
"memory": { |
|
||||||
"backend": "qmd", |
|
||||||
"citations": "auto", |
|
||||||
"qmd": { |
|
||||||
"includeDefaultMemory": true, |
|
||||||
"update": { |
|
||||||
"interval": "5m", |
|
||||||
"debounceMs": 15000 |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
"skills": { |
|
||||||
"install": { |
|
||||||
"nodeManager": "npm" |
|
||||||
}, |
|
||||||
"entries": { |
|
||||||
"tavily": { |
|
||||||
"enabled": true |
|
||||||
}, |
|
||||||
"find-skills-robin": { |
|
||||||
"enabled": true |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
"plugins": { |
|
||||||
"entries": { |
|
||||||
"telegram": { |
|
||||||
"enabled": true |
|
||||||
}, |
|
||||||
"qwen-portal-auth": { |
|
||||||
"enabled": true |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -0,0 +1,53 @@ |
|||||||
|
{ |
||||||
|
"meta": { |
||||||
|
"lastTouchedVersion": "2026.2.19-2", |
||||||
|
"lastTouchedAt": "2026-02-20T08:45:00.000Z" |
||||||
|
}, |
||||||
|
"env": { |
||||||
|
"TAVILY_API_KEY": "${TAVILY_API_KEY}" |
||||||
|
}, |
||||||
|
"wizard": { |
||||||
|
"lastRunAt": "2026-02-20T03:54:18.096Z", |
||||||
|
"lastRunVersion": "2026.2.17", |
||||||
|
"lastRunAt": "2026.2.17", |
||||||
|
"lastRunCommand": "doctor", |
||||||
|
"lastRunMode": "local" |
||||||
|
}, |
||||||
|
"auth": { |
||||||
|
"profiles": { |
||||||
|
"minimax-cn:default": { |
||||||
|
"provider": "minimax-cn", |
||||||
|
"mode": "api_key" |
||||||
|
}, |
||||||
|
"qwen-portal:default": { |
||||||
|
"provider": "qwen-portal", |
||||||
|
"mode": "oauth" |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
"models": { |
||||||
|
"mode": "merge", |
||||||
|
"providers": { |
||||||
|
"minimax-cn": { |
||||||
|
"baseUrl": "https://api.minimaxi.com/anthropic", |
||||||
|
"api": "anthropic-messages", |
||||||
|
"models": [ |
||||||
|
{ |
||||||
|
"id": "MiniMax-M2.5", |
||||||
|
"name": "MiniMax M2.5", |
||||||
|
"reasoning": true, |
||||||
|
"input": ["text"], |
||||||
|
"cost": { |
||||||
|
"input": 15, |
||||||
|
"output": 60, |
||||||
|
"cacheRead": 2, |
||||||
|
"cacheWrite": 10 |
||||||
|
}, |
||||||
|
"contextWindow": 200000, |
||||||
|
"maxTokens": 8192 |
||||||
|
} |
||||||
|
] |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue