dotfiles/dot_kimi-code/private_config.toml
Anton Volnuhin 5b58460618 Track agent CLI configs, with codex secrets externalized
codex's config.toml held nine live API keys inline under
[mcp_servers.*.env] -- deepseek, gemini, kimi, mimo, qwen, glm, cursor,
an OpenAI key and a Home Assistant token -- so it could not be tracked
as it stood. TOML env tables take literal values only, with no ${VAR}
indirection or env_file, so the keys cannot simply be named there.

Move them to ~/.codex/secrets.env (0600, ignored) and route the four
affected servers through mcp-with-secrets.sh, which sources that file
and execs the real command. Doing it in the wrapper rather than relying
on exported shell vars means it does not depend on how codex handles
environment inheritance, and works on ssh-only boxes with no keychain or
1Password agent, which is why this was preferred over a chezmoi
template.

Adds configs for claude, codex, pi, grok, kimi, kimi-code and reasonix,
and extends .chezmoiignore so credentials, session logs, local state and
.bak files stay out even if a directory is ever added whole.

Held back for still containing live keys: opencode.json (bailian), and
reasonix config.json and .env.
2026-08-06 02:23:49 +03:00

139 lines
3.4 KiB
TOML

default_plan_mode = false
merge_all_available_skills = false
telemetry = true
default_model = "kimi-code/k3"
[loop_control]
max_retries_per_step = 3
reserved_context_size = 50000
[background]
max_running_tasks = 4
keep_alive_on_exit = false
[services.moonshot_search]
base_url = "https://api.kimi.com/coding/v1/search"
api_key = ""
[services.moonshot_search.oauth]
storage = "file"
key = "oauth/kimi-code"
[services.moonshot_fetch]
base_url = "https://api.kimi.com/coding/v1/fetch"
api_key = ""
[services.moonshot_fetch.oauth]
storage = "file"
key = "oauth/kimi-code"
[thinking]
enabled = true
effort = "high"
[providers."managed:kimi-code"]
type = "kimi"
api_key = ""
base_url = "https://api.kimi.com/coding/v1"
[providers."managed:kimi-code".oauth]
storage = "file"
key = "oauth/kimi-code"
[models."kimi-code/kimi-for-coding"]
provider = "managed:kimi-code"
model = "kimi-for-coding"
max_context_size = 262144
capabilities = [ "thinking", "always_thinking", "image_in", "video_in", "tool_use" ]
display_name = "K2.7 Coding"
[models."kimi-code/kimi-for-coding-highspeed"]
provider = "managed:kimi-code"
model = "kimi-for-coding-highspeed"
max_context_size = 262144
capabilities = [ "thinking", "always_thinking", "image_in", "video_in", "tool_use" ]
display_name = "K2.7 Coding Highspeed"
[models."kimi-code/k3"]
provider = "managed:kimi-code"
model = "k3"
max_context_size = 1048576
capabilities = [ "thinking", "always_thinking", "image_in", "video_in", "tool_use" ]
display_name = "K3"
support_efforts = [ "low", "high", "max" ]
default_effort = "high"
[models."kimi-k.3.0"]
provider = "managed:kimi-code"
model = "kimi-k.3.0"
max_context_size = 1048576
capabilities = [ "thinking", "always_thinking", "image_in", "video_in", "tool_use" ]
display_name = "kimi-k.3.0"
# >>> herdr kimi integration
[[hooks]]
event = "SessionStart"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' session"
timeout = 10
[[hooks]]
event = "UserPromptSubmit"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' working"
timeout = 10
[[hooks]]
event = "PreToolUse"
matcher = "^(?!AskUserQuestion$).*$"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' working"
timeout = 10
[[hooks]]
event = "PreToolUse"
matcher = "^AskUserQuestion$"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' blocked"
timeout = 10
[[hooks]]
event = "PostToolUse"
matcher = "^AskUserQuestion$"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' working"
timeout = 10
[[hooks]]
event = "PostToolUseFailure"
matcher = "^AskUserQuestion$"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' working"
timeout = 10
[[hooks]]
event = "SubagentStart"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' working"
timeout = 10
[[hooks]]
event = "PreCompact"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' working"
timeout = 10
[[hooks]]
event = "PermissionRequest"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' blocked"
timeout = 10
[[hooks]]
event = "PermissionResult"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' working"
timeout = 10
[[hooks]]
event = "Stop"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' idle"
timeout = 10
[[hooks]]
event = "Interrupt"
command = "bash '/Users/anton/.kimi-code/hooks/herdr-agent-state.sh' idle"
timeout = 10
# <<< herdr kimi integration