YHH 4fbbca6a99 refactor(go): adopt modern stdlib idioms and gate them (#7831)
* refactor(go): adopt modern stdlib idioms across kernel and desktop

Mechanical sweep with golangci-lint's modernize/intrange/copyloopvar/
usestdlibvars fixers plus hand-fixes for what they could not rewrite:
slices.Contains, min/max, slices.Backward, WaitGroup.Go, reflect.TypeFor,
maps.Copy, strings.Cut/CutPrefix/SplitSeq, strings.Builder, range-over-int.
Net -549 lines with no behavior change.

Three loops in session.go stay index-based: slices.Backward yields element
copies, so the fixer's rewrite silently dropped writes to DecisionReceipts
and ToolCalls (caught by TestDelivery* and TestDependentSameBatch*). All 49
slices.Backward sites were audited for that shape; only these three write
through the index, and they carry a nolint with the reason.

CaptureAfter's scan loop had an empty body and never ran any logic, so the
fixer could not express it. Drop it and the accessor it was the only caller
of. omitzero is deliberately untouched: turning omitempty into omitzero
changes the JSON written for nested structs, which is a wire-format change
to session files and the extension protocol.

* build(lint): gate the modern-idiom linters

Nothing stopped the codebase from drifting back to pre-1.22 idioms. Both
modules are now clean for modernize, intrange, copyloopvar, and
usestdlibvars, so enable them rather than leaving the sweep as a one-off.

omitzero stays disabled with the reason inline; usetesting, perfsprint, and
errorlint still have residue and land separately.
2026-08-07 15:30:33 +08:00

Reasonix

English  ·  简体中文  ·  Guide  ·  ACP  ·  Extensions  ·  Spec  ·  Website  ·  Discord

npm version CI license downloads GitHub stars AtomGit stars contributors Discussions Discord

esengine/DeepSeek-Reasonix | Trendshift esengine/DeepSeek-Reasonix | Trendshift


A DeepSeek-native AI coding agent for your terminal.

A config- and plugin-driven harness — a single static Go binary, tuned around DeepSeek's prefix cache so token costs stay low across long sessions.


Important

Community · 加入社区 — bilingual Discord for setup help (#help / #求助), workflow showcases, and feature ideas. → https://discord.gg/XF78rEME2D


Features

  • Config-driven. Providers, the agent, enabled tools, and plugins are all declared in reasonix.toml. No hardcoded models.
  • Multi-model & composable. DeepSeek ships as a preset; any OpenAI-compatible endpoint is a config entry, not new code. Optionally run two models together (executor + planner) in separate, cache-stable sessions.
  • Plugin-driven. MCP servers contribute tools, prompts, and resources; Extension Protocol v1 sidecars can also intercept runtime events, contribute Providers and structured UI, and ship versioned plugin packages.
  • Cache-aware context maintenance. Startup injects a small stable environment summary, stale tool output is snipped/pruned before summary compaction, and the built-in tool schema contract is documented for regression review.
  • Zero-friction distribution. CGO_ENABLED=0 single binary; cross-compile to six targets with one command. The result is a fully self-contained static binary — nothing to install on the target machine beyond the binary itself.

Install

Choose the path that matches how you want to use Reasonix. The CLI/TUI, desktop app, and VS Code extension all use the same local Reasonix engine.

Path A: CLI / TUI

Install the native binary through npm on any supported platform, or use Homebrew on macOS:

npm i -g reasonix                  # any OS; pulls the prebuilt native binary
brew install esengine/reasonix/reasonix   # macOS

Prebuilt archives (darwin|linux|windows × amd64|arm64) and SHA256SUMS are on every GitHub release.

Path B: Desktop app

Use the official download page for the latest desktop build.

Platform Package Architecture
macOS Universal .dmg or .zip Apple Silicon / Intel
Windows Installer .exe or portable .zip x64 / ARM64
Linux .deb or .tar.gz x64

Windows installers are code-signed through SignPath.io with a free certificate provided by the SignPath Foundation.

Path C: VS Code extension

Complete Path A first. The extension does not bundle the CLI; it starts your local reasonix acp backend and adds native chat, editor context, tool-call approvals, model selection, and workspace sessions.

Path D: Build from source

git clone https://github.com/esengine/DeepSeek-Reasonix.git
cd DeepSeek-Reasonix
make build      # -> bin/reasonix(.exe)
make cross      # -> dist/ (darwin|linux|windows × amd64|arm64)

Quick start

CLI / TUI

These commands are for the CLI/TUI installed through Path A:

reasonix setup                      # configure a provider and model
reasonix                            # start an interactive session
reasonix run "implement the TODOs in main.go"

In an interactive session, run /init when you want Reasonix to create project instructions.

Desktop app

Download the installer for your platform from the official download page, install and launch Reasonix, then configure a provider and model in the app. The CLI commands above are not required for the desktop app.

For advanced CLI usage and configuration, see the CLI reference, Guide, and configuration paths.

Documentation

Star History

Star History Chart

Acknowledgments

A small list of folks whose work has shaped Reasonix the most — the current top 20 contributors by commit count. The full contributor graph is on GitHub.

Contributor Contributor Contributor Contributor
SivanCola esengine ttmouse lifu963
reasonix (anonymous) HUQIANTAO GTC2080 light-front-theory
merge-order-check (anonymous) Li-Charles-One eghrhegpe wufengfan (anonymous)
CVEngineer66 dependabot[bot] lanshi17 SuMuxi66
CnsMaple cyq1017 JesonChou XTLine

Also a separate thank-you to Bernardxu123 for designing the project logo, and to AIGC Link for promoting the project on XiaoHongShu.

Contributors to esengine/DeepSeek-Reasonix



MIT — see LICENSE
Built by the community at esengine/DeepSeek-Reasonix


Support this project

If Reasonix has been useful and you'd like to say thanks, you can. It stays a coffee, not a contract — donations don't buy feature priority or change how issues get triaged.

WeChat Pay QR code

2026-11-06 17:13:39 -10:00
Languages
Go 69.3%
TypeScript 20.4%
JavaScript 3.9%
HTML 2.6%
CSS 1.7%
Other 2%