feat(opencode): migrate agent runtime to v2

This commit is contained in:
2026-08-04 16:56:04 +08:00
parent 07016451d6
commit 764a1f4e82
33 changed files with 1662 additions and 1057 deletions
+15 -22
View File
@@ -1,32 +1,25 @@
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"providers": {
"deepseek": {
"options": {
"settings": {
"apiKey": "{env:DEEPSEEK_API_KEY}"
}
}
},
"model": "deepseek/deepseek-v4-flash",
"server": {
"hostname": "127.0.0.1",
"port": 4096
},
"permission": {
"*": "allow",
"external_directory": "ask",
"bash": {
"*": "allow",
"rm *": "ask",
"rmdir *": "ask",
"mv *": "ask",
"chmod *": "ask",
"chown *": "ask",
"sudo *": "ask",
"curl *": "ask",
"wget *": "ask"
},
"edit": "ask"
},
"permissions": [
{ "action": "*", "resource": "*", "effect": "allow" },
{ "action": "external_directory", "resource": "*", "effect": "ask" },
{ "action": "shell", "resource": "rm *", "effect": "ask" },
{ "action": "shell", "resource": "rmdir *", "effect": "ask" },
{ "action": "shell", "resource": "mv *", "effect": "ask" },
{ "action": "shell", "resource": "chmod *", "effect": "ask" },
{ "action": "shell", "resource": "chown *", "effect": "ask" },
{ "action": "shell", "resource": "sudo *", "effect": "ask" },
{ "action": "shell", "resource": "curl *", "effect": "ask" },
{ "action": "shell", "resource": "wget *", "effect": "ask" },
{ "action": "edit", "resource": "*", "effect": "ask" }
],
"default_agent": "instruction"
}