From a9c45cce3930a09eff7722f8029997e0fdde5f70 Mon Sep 17 00:00:00 2001 From: Rekey Date: Sun, 14 Jun 2026 18:44:43 +0800 Subject: [PATCH] chore: add Reasonix config files and env.yaml symlink MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .reasonix.toml / reasonix.toml — Reasonix 工具配置 - data/env.yaml — 软链接指向项目根目录 env.yaml(统一配置加载路径) --- .reasonix.toml | 4 +++ data/env.yaml | 1 + reasonix.toml | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 .reasonix.toml create mode 120000 data/env.yaml create mode 100644 reasonix.toml diff --git a/.reasonix.toml b/.reasonix.toml new file mode 100644 index 0000000..d6becdd --- /dev/null +++ b/.reasonix.toml @@ -0,0 +1,4 @@ +# 项目级 Reasonix 配置 — 优先级高于全局 config.toml +# 参考: ~/Library/Application Support/reasonix/config.toml +[agent] +reasoning_language = "zh" # 强制推理过程使用中文 diff --git a/data/env.yaml b/data/env.yaml new file mode 120000 index 0000000..9e40e9a --- /dev/null +++ b/data/env.yaml @@ -0,0 +1 @@ +../env.yaml \ No newline at end of file diff --git a/reasonix.toml b/reasonix.toml new file mode 100644 index 0000000..5ff36d5 --- /dev/null +++ b/reasonix.toml @@ -0,0 +1,88 @@ +# Reasonix configuration. +# Resolution order: flag > ./reasonix.toml > ~/Library/Application Support/reasonix/config.toml > built-in defaults. +# Secrets come from the environment via api_key_env; never put keys here. + +config_version = 2 # schema marker for diagnostics; old versions may ignore it +default_model = "deepseek-flash" +# language = "zh" # ui/model language; empty = auto-detect from $LANG / $REASONIX_LANG + +[agent] +# system_prompt = """...""" # omit to use the built-in prompt for this version +# system_prompt_file = "prompts/system.md" # overrides system_prompt when set +max_steps = 0 # executor tool-call rounds; 0 = no limit +planner_max_steps = 12 # planner read-only tool-call rounds; 0 = no limit +temperature = 0.0 +auto_plan = "off" # off|on; off keeps plan mode manual +# reasoning_language = "zh" # visible reasoning language: auto|zh|en +# auto_plan_classifier = "deepseek-flash" # optional; only used for borderline tasks +soft_compact_ratio = 0.5 # notice only; keeps cache-first prefix intact +compact_ratio = 0.8 # try compacting when prompt reaches this fraction +compact_force_ratio = 0.9 # force compacting at this high-water mark +cold_resume_prune = true # elide stale tool results when reopening a session past the provider cache window +# planner_model = "mimo" # optional: enable two-model collaboration +# subagent_model = "deepseek-pro" # optional default for runAs=subagent skills +# subagent_models = { review = "deepseek-pro", security_review = "deepseek-pro" } # per-skill overrides +# subagent_effort = "high" # optional default effort for subagents +# subagent_efforts = { review = "max", task = "high" } # per-tool/skill effort overrides +# output_style = "explanatory" # explanatory | learning | concise | custom; empty = default + +[tools] +enabled = [] # empty = all built-in tools +bash_timeout_seconds = 120 # foreground safety cap; set 0 for no tool-local cap + +[codegraph] +enabled = true # built-in MCP server; off by default for first-run sessions +auto_install = true # fetch the runtime when CodeGraph is enabled but missing +# path = "" # empty = cache, then PATH, then a bundle beside reasonix + +[builtin_mcp] +time_enabled = true # built-in Time MCP; off until manually enabled +context7_enabled = false # built-in Context7 MCP; off until manually enabled + +[lsp] +enabled = true # language server tools; servers launch lazily when used +# [lsp.servers.go] +# command = "gopls" +# args = [] +# extensions = [".go"] + +[skills] +# paths = ["~/my-skills", "../shared/skills"] # extra custom skill roots +# excluded_paths = ["~/.agents/skills"] # hide convention roots without deleting folders +# max_depth = 3 # nested scan depth; set 1 for legacy root-only discovery +# disabled_skills = ["review"] # hide noisy or unwanted skills + +[permissions] +# Per-call gating. mode = writer fallback when no rule matches: ask|allow|deny. +# Readers always default to allow. Precedence: deny > ask > allow > fallback. +# Rules are "Tool" or "Tool(specifier)"; e.g. Bash(go test:*), Edit(src/**). +mode = "ask" +# deny = ["Bash(rm -rf*)", "Bash(git push*)"] # hard-blocked in every mode +allow = ["Bash(cd /Users/rekey/Documents/Code/trade && git status)", "Bash(cd /Users/rekey/Documents/Code/trade && cat reasonix.toml)"] +# ask = ["Edit(src/**)"] # force a prompt even if otherwise allowed + +[sandbox] +# Confine tool blast radius. File-writers (write_file/edit_file/multi_edit) +# may only write under workspace_root (empty = current dir) + allow_write. +# bash = "enforce" (default) jails each command in an OS sandbox (macOS now; +# graceful fallback elsewhere); "off" disables it. network allows egress. +# workspace_root = "" # default: current working directory +# allow_write = ["/tmp"] # extra dirs writers may also modify +bash = "enforce" +network = true + +[statusline] +# A custom status line: a command whose first stdout line replaces the built-in +# data row. It receives {"model","contextUsed","contextWindow","cwd"} as JSON on stdin. +# command = "my-statusline.sh" + +# External MCP servers. type: "stdio" (default, a subprocess) | "http" | "sse". +# ${VAR} / ${VAR:-default} are expanded from the environment in command/args/env/url/headers. +# [[plugins]] +# name = "example" +# command = "reasonix-plugin-example" +# [[plugins]] # a remote server over Streamable HTTP +# name = "stripe" +# type = "http" +# url = "https://mcp.stripe.com" +# headers = { Authorization = "Bearer ${STRIPE_KEY}" }