Adds a new 'consult' tool that makes single tool-less calls to a configured consultant model. The feature includes: - Consult backend (consult.rs) with permission checks - Call limit (default 5 per session) tracked in State - Three nudge triggers: before exit_plan, after edits, after 3 failed tools - Side-panel card showing consultant status and call count - Config keys: consultant = "<model>" to enable; consultant_max_calls for limit - All nudges are always on; disable by unsetting the consultant config The consultant model sees the question and context (passed by itself since the tool has no context visibility). Token usage counts toward subagent quotas.
76 lines
4.8 KiB
TOML
76 lines
4.8 KiB
TOML
## hx config: ~/.hx/config.toml (global) or .hx/config.toml (project, overrides global).
|
|
## Every setting is commented out and shows its default or an example; uncomment to change it.
|
|
|
|
# provider = "claude" # claude | codex | custom; default: the first logged-in provider
|
|
# model = "claude-sonnet-5-5" # model for the chosen provider; "auto" = pick per prompt (see [auto])
|
|
# claude_model = "claude-sonnet-5-5" # default: the account's latest Sonnet
|
|
# codex_model = "gpt-5.6-sol" # default: Codex's top-listed model
|
|
# max_turns = 200 # model calls per prompt before the run stops (CLI: --max-turns)
|
|
# subagents = false # do not offer the `task` tool (default true; every call asks first)
|
|
# explore_model = "claude-haiku-4-5" # read-only `task` subagents; default: cheapest tier of the provider
|
|
# subagent_parallel = 3 # subagents running at once
|
|
# subagent_max_turns = 40 # turn limit per subagent (an agent file's max_turns wins)
|
|
# subagent_max_tokens = 500000 # stop a subagent that spends more tokens than this; default: no limit
|
|
# subagent_timeout_secs = 600 # stop a subagent run after this long; default: no limit
|
|
# consultant = "claude-fable-5-2" # stronger model behind the `consult` tool (off when unset; each call asks first)
|
|
# consultant_max_calls = 5 # calls allowed per session (resets on /new)
|
|
# remember_model = true # reuse the last model picked with /model or /provider
|
|
# compact_at = 900000 # auto-compact at this many tokens; default: 90% of the context window
|
|
# max_tokens = 16384
|
|
# permissions = "ask" # ask | auto (refuse dangerous calls, run safe ones) | yolo (nothing asks)
|
|
# sessions_dir = "~/Nextcloud/hx-sessions" # default ~/.hx/sessions; point at a synced/mounted cloud folder (env HX_SESSIONS_DIR wins)
|
|
# sessions_host = false # true: prefix project folders with the host name (machines sharing one sessions_dir)
|
|
# mouse = true # wheel scrolling; false keeps terminal text selection
|
|
# codemode = false # `codemode` tool: JS scripts that call other tools in a sandbox
|
|
# system_prompt = "..." # replaces the built-in prompt; AGENTS.md is still appended
|
|
|
|
## Sandbox: bash, LSP servers, lens and test runners run under bwrap (Linux) / sandbox-exec (macOS).
|
|
## Project dir + /tmp writable, $HOME hidden except `ro`/`rw`, filtered env (no API keys/tokens), no network.
|
|
## File tools (read/write/edit) obey the same paths. mode = "on" without a working backend refuses to start.
|
|
# [sandbox]
|
|
# mode = "off" # off | on (CLI: --sandbox / --no-sandbox)
|
|
# backend = "auto" # auto | bwrap | seatbelt
|
|
# network = false
|
|
# rw = ["~/.cargo/registry", "~/.cargo/git"] # extra writable paths
|
|
# ro = ["~/.cargo", "~/.rustup", "~/.local", "~/.nvm", "~/.npm"] # readable parts of $HOME
|
|
# env_allow = ["PATH", "HOME", "TERM", "LC_*", "CARGO_*"] # trailing * = prefix
|
|
|
|
## Auto model (/model auto): pin a tier to a model, even of another provider.
|
|
# [auto]
|
|
# fast = "claude-haiku-4-5"
|
|
# balanced = "claude-sonnet-5-5"
|
|
# deep = "gpt-5.6-sol"
|
|
# down_after = 3 # light prompts in a row before dropping to a cheaper tier
|
|
|
|
## OpenAI-compatible endpoint (Ollama, vLLM, LM Studio, OpenRouter), used with provider = "custom".
|
|
# [openai_compat]
|
|
# base_url = "http://localhost:11434/v1"
|
|
# api_key_env = "OPENROUTER_API_KEY" # name of the env var holding the key; the key never goes here
|
|
# models = [] # fixed list; empty = ask GET {base_url}/models
|
|
# context_window = 128000 # for models that don't report one
|
|
|
|
# [web] # web_fetch is always on (asks once per domain); web_search needs a backend
|
|
# search = "brave" # brave (default; key in $BRAVE_API_KEY) | searxng
|
|
# searxng_url = "https://searx.example.org" # instance must allow `json` in search.formats
|
|
|
|
# [lsp]
|
|
# mode = "turn_end" # turn_end | agent_end | off
|
|
# tests = "turn_end" # affected tests: turn_end | agent_end | off
|
|
# disable = [] # built-in server ids, e.g. ["clangd"]
|
|
# enable_runners = [] # opt-in (slow): ["clippy"]
|
|
# disable_runners = [] # ruff, biome, eslint, ast-grep, rustfmt, ruff-format, biome-format
|
|
|
|
## Add or override an LSP server (same id replaces a built-in).
|
|
# [[lsp.servers]]
|
|
# id = "zls"
|
|
# language = "zig"
|
|
# extensions = ["zig"]
|
|
# command = ["zls"]
|
|
# roots = ["build.zig"]
|
|
# install = ["brew", "install", "zls"] # offered by the lsp tool when `zls` is missing
|
|
|
|
## Subprocess extensions (JSON-RPC over stdio); global and project lists are concatenated.
|
|
# [[extensions]]
|
|
# command = ["node", "my-ext.js"]
|
|
# timeout_secs = 10
|