reasonix.toml 5.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Reasonix configuration.
  2. # Resolution order: flag > ./reasonix.toml > ~/.reasonix/config.toml > built-in defaults.
  3. # Fields marked user/global only are not overridden by ./reasonix.toml.
  4. # Secrets are named via api_key_env and stored in Reasonix's global .env; never put keys here.
  5. config_version = 4 # schema marker for diagnostics; old versions may ignore it
  6. default_model = "deepseek-flash"
  7. # language = "zh" # ui/model language; empty = auto-detect from $LANG / $REASONIX_LANG
  8. [agent]
  9. # system_prompt = """...""" # omit to use the built-in prompt for this version
  10. # system_prompt_file = "prompts/system.md" # overrides system_prompt when set
  11. temperature = 0.0
  12. # reasoning_language = "zh" # visible reasoning language: auto|zh|en
  13. # auto_plan_classifier = "deepseek-flash" # optional; only used for borderline tasks
  14. soft_compact_ratio = 0.5 # notice only; keeps cache-first prefix intact
  15. tool_result_snip_ratio = 0.6 # snip stale tool results at this fraction before summary compaction
  16. compact_ratio = 0.8 # try compacting when prompt reaches this fraction
  17. compact_force_ratio = 0.9 # force compacting at this high-water mark
  18. # keep = ["errors"] # compaction keep policy: errors, user_marked
  19. # recent_keep = 2 # minimum recent messages kept verbatim
  20. cold_resume_prune = true # elide stale tool results when reopening a session past the provider cache window
  21. # plan_mode_allowed_tools = ["custom_reader"] # extra read-only declarations; cannot unlock known blocked tools or unsafe bash
  22. plan_mode_read_only_commands = ["git -C"] # concrete read-only shell prefixes available while planning
  23. # planner_model = "deepseek-pro" # optional: enable two-model collaboration
  24. # subagent_model = "deepseek-pro" # optional default for runAs=subagent skills
  25. # subagent_models = { review = "deepseek-pro", security_review = "deepseek-pro" } # per-skill overrides
  26. # subagent_effort = "high" # optional default effort for subagents
  27. # subagent_efforts = { review = "max", task = "high" } # per-tool/skill effort overrides
  28. # max_subagent_depth = 2 # nested subagent delegation depth; set 1 to disable nested delegation
  29. # output_style = "explanatory" # explanatory | learning | concise | custom; empty = default
  30. [tools]
  31. enabled = [] # empty = all built-in tools
  32. bash_timeout_seconds = 120 # foreground safety cap; set 0 for no tool-local cap
  33. mcp_call_timeout_seconds = 300 # default MCP call safety cap; per-plugin/tool overrides may raise it
  34. [tools.background_jobs]
  35. stalled_warning_seconds = 900 # warn once per background job after this many quiet seconds; 0 disables
  36. [tools.shell]
  37. # prefer = "auto" # auto|bash|powershell|pwsh; empty/default = auto-detect
  38. # path = "/opt/homebrew/bin/bash" # absolute path to the shell executable; empty = PATH lookup
  39. [lsp]
  40. enabled = true # language server tools; servers launch lazily when used
  41. # [lsp.servers.go]
  42. # command = "gopls"
  43. # args = []
  44. # extensions = [".go"]
  45. [skills]
  46. # paths = ["~/my-skills", "../shared/skills"] # extra custom skill roots
  47. # excluded_paths = ["~/.agents/skills"] # hide convention roots without deleting folders
  48. # max_depth = 3 # nested scan depth; set 1 for legacy root-only discovery
  49. # disabled_skills = ["review"] # hide noisy or unwanted skills
  50. [permissions]
  51. # Per-call gating. mode = writer fallback when no rule matches: ask|allow|deny.
  52. # Readers always default to allow. Precedence: deny > ask > allow > fallback.
  53. # Rules are "Tool" or "Tool(specifier)"; e.g. Bash(go test:*), Edit(src/**).
  54. mode = "ask"
  55. # deny = ["Bash(rm -rf*)", "Bash(git push*)"] # hard-blocked in every mode
  56. # allow = ["Bash(go test:*)", "Bash(git status:*)"] # never prompted
  57. # ask = ["Edit(src/**)"] # force a prompt even if otherwise allowed
  58. [sandbox]
  59. # Confine tool blast radius. File-writers (write_file/edit_file/multi_edit/move_file)
  60. # may only write under workspace_root (empty = current dir) and allow_write extras.
  61. # bash = "enforce" jails each command in an OS sandbox when available;
  62. # without one, bash execution is refused. Empty defaults to enforce on macOS/Linux
  63. # and off on Windows. Set bash = "off" to restore pre-1.16 unconfined shell execution.
  64. # network allows sandboxed bash egress.
  65. # workspace_root = "" # default: current working directory
  66. # allow_write = ["/tmp"] # extra dirs writers may also modify
  67. # forbid_read = [] # dirs the agent cannot read or list
  68. bash = "enforce"
  69. network = true
  70. [statusline]
  71. # A custom status line: a command whose first stdout line replaces the built-in
  72. # data row. It receives {"model","contextUsed","contextWindow","cwd"} as JSON on stdin.
  73. # command = "my-statusline.sh"
  74. # External MCP servers. type: "stdio" (default, a subprocess) | "http" | "sse".
  75. # ${VAR} / ${VAR:-default} are expanded from the environment in command/args/env/url/headers.
  76. # [[plugins]]
  77. # name = "example"
  78. # command = "reasonix-plugin-example"
  79. # call_timeout_seconds = 600 # optional per-server MCP call timeout
  80. # tool_timeout_seconds = { "generate_video" = 1800 } # raw MCP tool names
  81. # trusted_read_only_tools = ["search"] # optional pre-seeded MCP read-only trust
  82. # [[plugins]] # a remote server over Streamable HTTP
  83. # name = "stripe"
  84. # type = "http"
  85. # url = "https://mcp.stripe.com"
  86. # headers = { Authorization = "Bearer ${STRIPE_KEY}" }