Skip to content

Feat/reasonix support - #2

Open
qazmlpwsxedc wants to merge 2 commits into
LLK-LL:mainfrom
qazmlpwsxedc:feat/reasonix-support
Open

Feat/reasonix support#2
qazmlpwsxedc wants to merge 2 commits into
LLK-LL:mainfrom
qazmlpwsxedc:feat/reasonix-support

Conversation

@qazmlpwsxedc

Copy link
Copy Markdown

What changed

Describe the focused change and why it is needed.

Validation

  • Relevant Python checks run
  • git diff --check passes
  • Solver version and unit system recorded when applicable
  • Documentation or references updated when behavior changes

Privacy review

  • No secrets, tokens, cookies, private paths, raw conversations, proprietary geometry, customer data, or unreleased research included

Reasonix has no `mcp add` CLI, so the academic-search fallback is registered by
appending a `[[plugins]]` entry to the Reasonix `config.toml` instead.

- setup_academic_mcp.py: add a `reasonix` client.
  * `reasonix_home()` resolves REASONIX_HOME, then the platform default that
    already holds a config.toml (%APPDATA%\reasonix on Windows, ~/.reasonix
    elsewhere).
  * `_detect_toml()` now recognises both `[mcp_servers.*]` and `[[plugins]]`,
    on the tomllib path and the regex fallback (Python 3.8-3.10).
  * `register_reasonix_plugin()` appends the entry through an atomic replace and
    preserves the existing bytes, including line endings.
  * `ensure_mcp()` gains a reasonix branch that never shells out, and keeps the
    fail-closed behaviour: no `uv` means no write and no success report.
- install-reasonix.sh / install-reasonix.cmd: one-click deployment of the skill
  into the Reasonix skills directory plus the MCP setup step.
- vendor/academic-search-mcp/.python-version: pin 3.12, because the fallback's
  dependencies have no wheels for the newest CPython that uv would otherwise
  select.
- README/README.zh-CN: document the Reasonix install path and how its MCP
  registration differs from Codex and Claude Code.
- tests: reasonix home resolution, plugin detection, idempotent registration,
  reuse of an existing registration, fail-closed without uv, line-ending
  preservation and atomic writes; packaging checks cover the new installers.
install-reasonix.sh/.cmd selected the Reasonix home from directory existence,
while setup_academic_mcp.py's reasonix_home() prefers the candidate that
actually holds a config.toml. On a machine where %APPDATA%\reasonix exists
without a config.toml, the two could disagree and deploy the skill into one
directory while registering the MCP in another.

Both installers now mirror the Python helper: prefer a candidate that contains
config.toml, then fall back to the platform default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants