Files
awoooi/capabilities.json
OG T df0afa654f feat(soul): SOUL.md + capabilities.json v5.0 → v5.5
- AI fallback: ollama_tool→openclaw_nemo→gemini→nvidia (ADR-052)
- Phase 25 能力:Config Drift Detection / Auto-Harvesting / Sensor Agent
- ADR-059 K8s ClusterIP override 文件化
- Telegram dedup TTL=600s + model name 顯示
- Discord 移除(已停用)
- capabilities.json: llama3.1:8b / DB 10 / stream key awoooi:signals

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 23:40:40 +08:00

221 lines
6.3 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"name": "OpenClaw Capabilities",
"version": "5.5.0",
"description": "OpenClaw AI Agent 允許調用的工具與操作權限定義",
"updated_at": "2026-04-09",
"kubernetes": {
"allowed_operations": [
{
"name": "RESTART_DEPLOYMENT",
"command": "kubectl rollout restart deployment/{name} -n {namespace}",
"risk_level": "medium",
"requires_approval": true,
"description": "重啟 Deployment觸發 Rolling Update"
},
{
"name": "DELETE_POD",
"command": "kubectl delete pod {name} -n {namespace}",
"risk_level": "medium",
"requires_approval": true,
"description": "刪除 Pod由 ReplicaSet 自動重建"
},
{
"name": "DELETE_PODS_BY_LABEL",
"command": "kubectl delete pods -l {selector} -n {namespace}",
"risk_level": "medium",
"requires_approval": true,
"description": "依 Label 批量刪除 Pod"
},
{
"name": "SCALE_DEPLOYMENT",
"command": "kubectl scale deployment/{name} --replicas={count} -n {namespace}",
"risk_level": "low",
"requires_approval": false,
"description": "水平擴展 Deployment 副本數"
},
{
"name": "GET_LOGS",
"command": "kubectl logs {pod} -n {namespace} --tail={lines}",
"risk_level": "low",
"requires_approval": false,
"description": "查看 Pod 日誌"
},
{
"name": "GET_STATUS",
"command": "kubectl get pods/deployments/services -n {namespace}",
"risk_level": "low",
"requires_approval": false,
"description": "查看資源狀態列表"
},
{
"name": "DESCRIBE_RESOURCE",
"command": "kubectl describe {resource_type} {name} -n {namespace}",
"risk_level": "low",
"requires_approval": false,
"description": "查看資源詳細狀態"
}
],
"forbidden_operations": [
{
"pattern": "kubectl delete namespace *",
"reason": "影響範圍過大,可能導致整個命名空間被刪除"
},
{
"pattern": "kubectl delete pvc *",
"reason": "可能導致持久化資料遺失"
},
{
"pattern": "kubectl apply -f *",
"reason": "未審核的 YAML 可能引入惡意配置"
},
{
"pattern": "* --force",
"reason": "強制操作繞過安全檢查"
},
{
"pattern": "kubectl exec *",
"reason": "直接進入容器可能造成安全風險"
}
],
"namespaces": {
"allowed": ["awoooi-prod", "default", "kube-system"],
"forbidden": ["kube-public", "cert-manager"]
},
"api_server": {
"in_cluster_override": "K8S_API_SERVER_URL",
"fallback_url": "https://192.168.0.120:6443",
"reason": "ADR-059: ClusterIP 10.43.0.1 不可達時使用節點 IP"
}
},
"notifications": {
"channels": [
{
"name": "telegram",
"enabled": true,
"config_key": "OPENCLAW_TG_BOT_TOKEN",
"features": ["alerts", "approvals", "status_updates"],
"format": {
"max_total_chars": 500,
"show_model_name": true,
"show_backend": true,
"dedup_ttl_seconds": 600
}
},
{
"name": "sse",
"enabled": true,
"endpoint": "/api/v1/stream",
"features": ["real_time_updates", "approvals"]
}
]
},
"ai_providers": {
"fallback_order": ["ollama_tool", "openclaw_nemo", "gemini", "nvidia"],
"router_toggle": "USE_AI_ROUTER",
"providers": [
{
"name": "ollama_tool",
"endpoint": "http://192.168.0.188:11434",
"model": "llama3.1:8b",
"cost_per_1k_tokens": 0,
"timeout_seconds": 30,
"description": "OllamaToolProvider — 本地 tool calling最優先"
},
{
"name": "openclaw_nemo",
"endpoint": "http://192.168.0.188:11434",
"model": "nemotron-mini",
"cost_per_1k_tokens": 0,
"timeout_seconds": 60,
"description": "Nemotron via Ollama — 本地 RCA 分析"
},
{
"name": "gemini",
"endpoint": "https://generativelanguage.googleapis.com/v1beta",
"model": "gemini-1.5-flash",
"cost_per_1k_tokens": 0.001,
"timeout_seconds": 30,
"description": "Gemini Flash — 雲端備援"
},
{
"name": "nvidia",
"endpoint": "https://integrate.api.nvidia.com/v1",
"model": "nvidia/llama-3.1-nemotron-ultra-253b-v1",
"cost_per_1k_tokens": 0.002,
"timeout_seconds": 30,
"description": "NVIDIA NIM — 最後備援"
}
]
},
"phase25_capabilities": {
"config_drift_detection": {
"enabled": true,
"schedule": "0 * * * *",
"description": "每小時比對 Git YAML vs K8s 實際狀態"
},
"auto_harvesting": {
"enabled": true,
"dedup_key": "symptoms_hash",
"description": "Anti-Pattern 閉環攔截symptoms_hash 去重"
},
"sensor_agent": {
"enabled": true,
"stream_key": "awoooi:signals",
"redis_db": 10,
"dedup_ttl_seconds": 600,
"collectors": ["node_metrics", "journal_errors", "service_probes"],
"hosts": {
"188": {
"role": "AI/Web 中心",
"services": ["PostgreSQL", "Redis", "Ollama", "Nginx", "SigNoz"]
},
"110": {
"role": "基礎設施金庫",
"services": ["Harbor", "Gitea", "GH-Runner"]
}
},
"thresholds": {
"cpu_pct_high": 85.0,
"mem_pct_high": 90.0,
"disk_pct_high": 85.0,
"load_factor": 2.0,
"journal_err_min": 10
}
}
},
"security": {
"telegram_whitelist": {
"description": "允許透過 Telegram 簽核的 user_id 清單",
"users": []
},
"webhook_hmac": {
"algorithm": "sha256",
"header": "X-Signature-256"
},
"nonce_ttl_seconds": 300,
"trust_engine": {
"risk_levels": {
"LOW": "auto_execute",
"MEDIUM": "single_approval",
"CRITICAL": "multi_sig_2"
}
}
},
"limits": {
"max_concurrent_approvals": 10,
"max_daily_operations": 100,
"token_budget": {
"gemini_daily": 70000,
"nvidia_daily": 35000,
"monthly_cost_limit_usd": 10
}
}
}