From b458fa4815557c22a1beda66c9d8e799a7cfd88a Mon Sep 17 00:00:00 2001 From: AllenReder Date: Sun, 9 Aug 2026 14:56:13 +0800 Subject: [PATCH] feat(config): add agent configuration templates --- claude/settings.json | 54 +++++++++++++++++++++++ codex/config.toml | 27 ++++++++++++ opencode/opencode.json | 99 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+) create mode 100644 claude/settings.json create mode 100644 codex/config.toml create mode 100644 opencode/opencode.json diff --git a/claude/settings.json b/claude/settings.json new file mode 100644 index 0000000..6e9ba97 --- /dev/null +++ b/claude/settings.json @@ -0,0 +1,54 @@ +{ + "attribution": { + "commit": "", + "pr": "" + }, + "effortLevel": "high", + "env": { + "ANTHROPIC_AUTH_TOKEN": "", + "ANTHROPIC_BASE_URL": "https://api.example.top", + "ANTHROPIC_DEFAULT_FABLE_MODEL": "cc-gpt-5.6-sol", + "ANTHROPIC_DEFAULT_FABLE_MODEL_NAME": "gpt-5.6-sol", + "ANTHROPIC_DEFAULT_HAIKU_MODEL": "cc-gpt-5.6-luna", + "ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME": "gpt-5.6-luna", + "ANTHROPIC_DEFAULT_OPUS_MODEL": "cc-gpt-5.6-sol", + "ANTHROPIC_DEFAULT_OPUS_MODEL_NAME": "gpt-5.6-sol", + "ANTHROPIC_DEFAULT_SONNET_MODEL": "cc-gpt-5.6-terra", + "ANTHROPIC_DEFAULT_SONNET_MODEL_NAME": "gpt-5.6-terra", + "ANTHROPIC_MODEL": "cc-gpt-5.6-sol", + "BARK_DEVICE_KEYS": "", + "BARK_SERVER": "https://bark.example.top/push", + "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1", + "CLAUDE_CODE_MAX_CONTEXT_TOKENS": "262144", + "CLAUDE_CODE_SUBAGENT_MODEL": "cc-gpt-5.6-terra" + }, + "hooks": { + "PermissionRequest": [ + { + "hooks": [ + { + "async": true, + "command": "h=\"${HOST:-$(hostname)}\"; bark -t \"Claude Code @ $h\" -b \"需要你审批 Claude Code 的工具调用\" -i \"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.88.0/light/claudecode-color.png\" -g 'claude-code' -l 'timeSensitive' >/dev/null 2>&1 || true", + "timeout": 5, + "type": "command" + } + ] + } + ], + "Stop": [ + { + "hooks": [ + { + "async": true, + "command": "h=\"${HOST:-$(hostname)}\"; bark -t \"Claude Code @ $h\" -b \"本轮 Claude Code 回复已结束\" -i \"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.88.0/light/claudecode-color.png\" -g 'claude-code' -l 'active' >/dev/null 2>&1 || true", + "timeout": 5, + "type": "command" + } + ] + } + ] + }, + "model": "opus", + "skipWebFetchPreflight": true, + "tui": "default" +} \ No newline at end of file diff --git a/codex/config.toml b/codex/config.toml new file mode 100644 index 0000000..7fa2879 --- /dev/null +++ b/codex/config.toml @@ -0,0 +1,27 @@ +model_provider = "custom" +model = "gpt-5.6-sol" +model_reasoning_effort = "xhigh" + +service_tier = "default" +approvals_reviewer = "auto_review" + +[model_providers.custom] +name = "AllenPI" +wire_api = "responses" +requires_openai_auth = true +base_url = "https://api.example.top/v1" +experimental_bearer_token = "" + +[hooks] + +[[hooks.PermissionRequest]] +[[hooks.PermissionRequest.hooks]] +type = "command" +command = "zsh -lc 'host=\"${HOST:-$(hostname)}\"; bark -t \"Codex @ ${host}\" -b \"需要你审批 Codex 的工具调用\" -i \"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.88.0/light/codex-color.png\" -g \"codex\" -l \"timeSensitive\" >> /tmp/codex-bark-hook.log 2>&1 || true'" +timeout = 5 + +[[hooks.Stop]] +[[hooks.Stop.hooks]] +type = "command" +command = "zsh -lc 'host=\"${HOST:-$(hostname)}\"; bark -t \"Codex @ ${host}\" -b \"本轮 Codex 回复已结束\" -i \"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.88.0/light/codex-color.png\" -g \"codex\" -l \"active\" >> /tmp/codex-bark-hook.log 2>&1 || true'" +timeout = 5 diff --git a/opencode/opencode.json b/opencode/opencode.json new file mode 100644 index 0000000..376600d --- /dev/null +++ b/opencode/opencode.json @@ -0,0 +1,99 @@ +{ + "$schema": "https://opencode.ai/config.json", + "provider": { + "allenpi": { + "npm": "@ai-sdk/openai-compatible", + "options": { + "apiKey": "", + "baseURL": "https://api.example.top/v1", + "setCacheKey": true + }, + "models": { + "deepseek-v4-flash": { + "name": "DeepSeek V4 Flash", + "limit": { "context": 1000000, "output": 384000 }, + "variants": { + "low": { "thinking": { "type": "enabled" }, "reasoningEffort": "low" }, + "high": { "thinking": { "type": "enabled" }, "reasoningEffort": "high" }, + "xhigh": { "thinking": { "type": "enabled" }, "reasoningEffort": "xhigh" }, + "max": { "thinking": { "type": "enabled" }, "reasoningEffort": "max" }, + "off": { "thinking": { "type": "disabled" } } + } + }, + "deepseek-v4-pro": { + "name": "DeepSeek V4 Pro", + "limit": { "context": 1000000, "output": 384000 }, + "variants": { + "low": { "thinking": { "type": "enabled" }, "reasoningEffort": "low" }, + "high": { "thinking": { "type": "enabled" }, "reasoningEffort": "high" }, + "xhigh": { "thinking": { "type": "enabled" }, "reasoningEffort": "xhigh" }, + "max": { "thinking": { "type": "enabled" }, "reasoningEffort": "max" }, + "off": { "thinking": { "type": "disabled" } } + } + }, + "glm-5.2": { + "name": "GLM-5.2", + "limit": { "context": 1000000, "output": 131072 }, + "variants": { + "off": { "thinking": { "type": "disabled" } }, + "low": { "thinking": { "type": "enabled" }, "reasoningEffort": "low" }, + "medium": { "thinking": { "type": "enabled" }, "reasoningEffort": "medium" }, + "high": { "thinking": { "type": "enabled" }, "reasoningEffort": "high" }, + "max": { "thinking": { "type": "enabled" }, "reasoningEffort": "max" } + } + }, + "gpt-5.6-luna": { + "name": "GPT-5.6 Luna", + "limit": { "context": 256000, "output": 128000 }, + "variants": { + "light": { "reasoningEffort": "low", "textVerbosity": "low" }, + "medium": { "reasoningEffort": "medium", "textVerbosity": "low" }, + "high": { "reasoningEffort": "high", "textVerbosity": "low" }, + "xhigh": { "reasoningEffort": "xhigh", "textVerbosity": "low" }, + "max": { "reasoningEffort": "max", "textVerbosity": "low" } + } + }, + "gpt-5.6-sol": { + "name": "GPT-5.6 Sol", + "limit": { "context": 256000, "output": 128000 }, + "variants": { + "light": { "reasoningEffort": "low", "textVerbosity": "low" }, + "medium": { "reasoningEffort": "medium", "textVerbosity": "low" }, + "high": { "reasoningEffort": "high", "textVerbosity": "low" }, + "xhigh": { "reasoningEffort": "xhigh", "textVerbosity": "low" }, + "max": { "reasoningEffort": "max", "textVerbosity": "low" } + } + }, + "gpt-5.6-terra": { + "name": "GPT-5.6 Terra", + "limit": { "context": 256000, "output": 128000 }, + "variants": { + "light": { "reasoningEffort": "low", "textVerbosity": "low" }, + "medium": { "reasoningEffort": "medium", "textVerbosity": "low" }, + "high": { "reasoningEffort": "high", "textVerbosity": "low" }, + "xhigh": { "reasoningEffort": "xhigh", "textVerbosity": "low" }, + "max": { "reasoningEffort": "max", "textVerbosity": "low" } + } + }, + "kimi-k3": { + "name": "Kimi K3", + "limit": { "context": 262144, "output": 262144 }, + "variants": { + "off": { "thinking": { "type": "disabled" } }, + "low": { "thinking": { "type": "enabled" }, "reasoningEffort": "low" }, + "high": { "thinking": { "type": "enabled" }, "reasoningEffort": "high" }, + "max": { "thinking": { "type": "enabled" }, "reasoningEffort": "max" } + } + }, + "minimax-m3": { + "name": "MiniMax-M3", + "limit": { "context": 1000000, "output": 128000 }, + "variants": { + "off": { "thinking": { "type": "disabled" } }, + "on": { "thinking": { "type": "adaptive" } } + } + } + } + } + } +} \ No newline at end of file