reasonix 0.26.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,123 +1,169 @@
1
1
  <p align="center">
2
- <img src="docs/logo.svg" alt="Reasonix — DeepSeek-native agent framework" width="640"/>
2
+ <img src="docs/logo.svg" alt="Reasonix" width="640"/>
3
3
  </p>
4
4
 
5
5
  <p align="center">
6
- <strong>English</strong> · <a href="./README.zh-CN.md">简体中文</a> · <a href="https://esengine.github.io/reasonix/">Website</a>
6
+ <strong>English</strong>
7
+ &nbsp;·&nbsp;
8
+ <a href="./README.zh-CN.md">简体中文</a>
9
+ &nbsp;·&nbsp;
10
+ <a href="https://esengine.github.io/reasonix/">Website</a>
11
+ &nbsp;·&nbsp;
12
+ <a href="./docs/ARCHITECTURE.md">Architecture</a>
13
+ &nbsp;·&nbsp;
14
+ <a href="./benchmarks/">Benchmarks</a>
7
15
  </p>
8
16
 
9
17
  <p align="center">
10
- <a href="https://www.npmjs.com/package/reasonix"><img src="https://img.shields.io/npm/v/reasonix.svg" alt="npm version"/></a>
11
- <a href="https://github.com/esengine/reasonix/actions/workflows/ci.yml"><img src="https://github.com/esengine/reasonix/actions/workflows/ci.yml/badge.svg" alt="CI"/></a>
12
- <a href="./LICENSE"><img src="https://img.shields.io/npm/l/reasonix.svg" alt="license"/></a>
13
- <a href="https://www.npmjs.com/package/reasonix"><img src="https://img.shields.io/npm/dm/reasonix.svg" alt="downloads"/></a>
14
- <a href="./package.json"><img src="https://img.shields.io/node/v/reasonix.svg" alt="node"/></a>
15
- <a href="https://github.com/esengine/reasonix/stargazers"><img src="https://img.shields.io/github/stars/esengine/reasonix.svg?style=flat&logo=github&label=stars" alt="GitHub stars"/></a>
16
- <a href="https://github.com/esengine/reasonix/discussions"><img src="https://img.shields.io/github/discussions/esengine/reasonix.svg?logo=github&label=discussions" alt="Discussions"/></a>
18
+ <a href="https://www.npmjs.com/package/reasonix"><img src="https://img.shields.io/npm/v/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22" alt="npm version"/></a>
19
+ <a href="https://github.com/esengine/reasonix/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/esengine/reasonix/ci.yml?style=flat-square&label=ci&color=0d1117&labelColor=161b22" alt="CI"/></a>
20
+ <a href="./LICENSE"><img src="https://img.shields.io/npm/l/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22" alt="license"/></a>
21
+ <a href="https://www.npmjs.com/package/reasonix"><img src="https://img.shields.io/npm/dm/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22" alt="downloads"/></a>
22
+ <a href="./package.json"><img src="https://img.shields.io/node/v/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22" alt="node"/></a>
23
+ <a href="https://github.com/esengine/reasonix/stargazers"><img src="https://img.shields.io/github/stars/esengine/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22&logo=github" alt="GitHub stars"/></a>
24
+ <a href="https://github.com/esengine/reasonix/graphs/contributors"><img src="https://img.shields.io/github/contributors/esengine/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22&logo=github" alt="contributors"/></a>
25
+ <a href="https://github.com/esengine/reasonix/discussions"><img src="https://img.shields.io/github/discussions/esengine/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22&logo=github" alt="Discussions"/></a>
17
26
  </p>
18
27
 
19
- <p align="center">
20
- <strong>A DeepSeek-native AI coding agent for your terminal.</strong> Engineered around DeepSeek's prefix-cache, so the savings are real and the loop stays cheap enough to leave on.
21
- </p>
28
+ <br/>
29
+
30
+ <h3 align="center">A DeepSeek-native AI coding agent for your terminal.</h3>
31
+ <p align="center">Engineered around prefix-cache stability — so token costs stay low across long sessions, and you can leave it running.</p>
32
+
33
+ <br/>
22
34
 
23
35
  <p align="center">
24
- <img src="docs/assets/hero-stats.svg" alt="94% live prefix-cache hit · ~30× cheaper per task vs Claude Code · MIT terminal-native" width="860"/>
36
+ <img src="docs/assets/hero-terminal.svg" alt="Reasonix code mode assistant proposes a SEARCH/REPLACE edit; nothing on disk until /apply" width="860"/>
25
37
  </p>
26
38
 
27
- ---
39
+ <br/>
40
+
41
+ > [!TIP]
42
+ > **Cache stability isn't a feature you turn on; it's an invariant the loop is designed around.** That's the whole reason Reasonix is DeepSeek-only — every layer is tuned to the byte-stable prefix-cache mechanic.
43
+
44
+ <br/>
28
45
 
29
- ## Quick start
46
+ ## Install
30
47
 
31
48
  ```bash
32
49
  cd my-project
33
50
  npx reasonix code # paste a DeepSeek API key on first run; persists after
34
51
  ```
35
52
 
36
- <p align="center">
37
- <img src="docs/assets/hero-terminal.svg" alt="Reasonix code mode — assistant proposes a SEARCH/REPLACE edit; nothing on disk until /apply" width="860"/>
38
- </p>
53
+ Requires Node ≥ 22. Tested on macOS · Linux · Windows (PowerShell · Git Bash · Windows Terminal). Get a [DeepSeek API key →](https://platform.deepseek.com/api_keys) · `reasonix code --help` for flags.
39
54
 
40
- Requires Node ≥ 22. Tested on macOS, Linux, and Windows (PowerShell, Git Bash, Windows Terminal). Get a [DeepSeek API key →](https://platform.deepseek.com/api_keys) · `reasonix code --help` for flags.
55
+ <br/>
41
56
 
42
- ---
57
+ ## What makes Reasonix different
43
58
 
44
- ## How it compares
59
+ The loop is organized around four pillars. Each one solves a problem generic agent frameworks don't even see — because they were designed for a different cache mechanic.
45
60
 
46
- | | Reasonix | Claude Code | Cursor | Aider |
47
- |-----------------------------------|------------------|-----------------|--------------------|------------------|
48
- | Backend | DeepSeek V4 | Anthropic | OpenAI / Anthropic | any (OpenRouter) |
49
- | **Cost / typical task** | **~¥0.01–0.04** | ~¥0.40–4 | ¥150/mo + usage | varies |
50
- | License | **MIT** | closed | closed | Apache 2 |
51
- | **DeepSeek prefix-cache hit** | **94%** (live) | n/a | n/a | ~33% (baseline) |
52
- | Embedded web dashboard | yes | — | n/a (IDE) | — |
53
- | Persistent per-workspace sessions | yes | partial | n/a | — |
61
+ <p align="center">
62
+ <a href="./docs/ARCHITECTURE.md"><img src="docs/assets/pillars.svg" alt="Reasonix four pillars — Cache-first loop, R1 thought harvesting, Tool-call repair, Cost control" width="880"/></a>
63
+ </p>
54
64
 
55
- Plan mode, edit review, MCP, skills, hooks, and sandboxing are all `yes` for Reasonix and most peers — see the feature grid below for what they actually do here.
65
+ <sub align="center">
56
66
 
57
- Numbers from `benchmarks/tau-bench-lite` (8 multi-turn tasks × 3 repeats, live `deepseek-chat`). [Committed transcripts →](./benchmarks/)
67
+ Click any card to read the full architecture writeup → [Pillar 1](./docs/ARCHITECTURE.md#pillar-1--cache-first-loop) · [Pillar 2](./docs/ARCHITECTURE.md#pillar-2--r1-thought-harvesting-opt-in) · [Pillar 3](./docs/ARCHITECTURE.md#pillar-3--tool-call-repair) · [Pillar 4](./docs/ARCHITECTURE.md#pillar-4--cost-control-v06)
58
68
 
59
- <details>
60
- <summary><strong>Why DeepSeek-only? — the cache economics</strong></summary>
69
+ </sub>
61
70
 
62
- Cheap tokens alone is half the story. DeepSeek's prefix-cache is **byte-stable**: the cache fingerprints from byte 0 of the prompt. Reasonix's loop is engineered around that — append-only growth, no re-ordering, no marker-based compaction — so the cache prefix survives every tool call.
71
+ <br/>
63
72
 
64
- By comparison, Claude Code is built around Anthropic's `cache_control` markers (a fundamentally different mechanic). Pointing it at DeepSeek's Anthropic-compat endpoint keeps the cheap tokens but loses the cache hits — markers are ignored, and the underlying prefix isn't byte-stable. Generic-backend tools (Aider / Cline / Continue) hit the same wall from the other direction: their compaction patterns destroy byte stability.
73
+ ## Capabilities
65
74
 
66
- At DeepSeek's pricing — $0.07/Mtok uncached, $0.014/Mtok cached — **the difference between 50% and 94% hit is roughly 2.5× on input cost alone.** Same model, same API; the loop's invariants are what changed.
75
+ <p align="center">
76
+ <img src="docs/assets/feature-grid.svg" alt="Reasonix capabilities — cell-diff renderer, MCP, plan mode, permissions, dashboard, persistent sessions, hooks/skills/memory, semantic search, auto-checkpoints, /effort knob, transcript replay, event log" width="880"/>
77
+ </p>
67
78
 
68
- A few DeepSeek-specific fixes generic loops miss:
79
+ <br/>
69
80
 
70
- | Generic loops assume | DeepSeek actually does | Reasonix's fix |
71
- |---|---|---|
72
- | Reasoning emitted as a structured `thinking` block | R1 sometimes leaks tool-call JSON inside `<think>` tags | a `scavenge` pass that pulls escaped tool calls back out |
73
- | Tool schemas validated strictly | DeepSeek silently drops deeply-nested object/array params | auto-flatten — nested params get rewritten to single-level prefixed names |
74
- | Tool-call args are well-formed JSON | DeepSeek occasionally produces `string="false"` and other malformed fragments | dedicated `ToolCallRepair` heals the common shapes before dispatch |
75
- | Reasoning depth tuned via system-level switches | V4 exposes a `reasoning_effort` knob (`max` / `high`) | `/effort` slash + `--effort` flag for cheap turns |
81
+ ## How it compares
76
82
 
77
- Cache stability isn't a feature you turn on; it's an invariant the loop is designed around. That's the entire reason Reasonix is DeepSeek-only.
83
+ | | Reasonix | Claude Code | Cursor | Aider |
84
+ |-----------------------------------|------------------|-------------------|---------------------|--------------------|
85
+ | Backend | DeepSeek | Anthropic | OpenAI / Anthropic | any (OpenRouter) |
86
+ | License | **MIT** | closed | closed | Apache 2 |
87
+ | Cost profile | **low per task** | premium | subscription + use | varies |
88
+ | DeepSeek prefix-cache | **engineered** | not applicable | not applicable | incidental |
89
+ | Embedded web dashboard | yes | — | n/a (IDE) | — |
90
+ | Persistent per-workspace sessions | yes | partial | n/a | — |
91
+ | Plan mode · MCP · hooks · skills | yes | yes | yes | partial |
92
+ | Open community development | yes | — | — | yes |
78
93
 
79
- </details>
94
+ For live cache-hit rates, costs, and methodology, see [`benchmarks/`](./benchmarks/) — the numbers move with model pricing, so they live with the harness, not in the README.
80
95
 
81
- ---
96
+ <br/>
82
97
 
83
- ## What's in the box
98
+ ## Documentation
84
99
 
85
- <p align="center">
86
- <img src="docs/assets/feature-grid.svg" alt="Feature grid cache-first loop, plan mode, MCP first-class, sessions and dashboard, hooks, memory and skills" width="860"/>
87
- </p>
100
+ - [**Architecture**](./docs/ARCHITECTURE.md) — the four pillars, cache-first loop, harvesting, scaffolds
101
+ - [**Benchmarks**](./benchmarks/)τ-bench-lite harness, transcripts, cost methodology
102
+ - [**Website**](https://esengine.github.io/reasonix/) — getting started, dashboard mockup, TUI mockup
103
+ - [**Contributing**](./CONTRIBUTING.md) — comment policy, error-handling rules, library-over-hand-rolled
104
+ - [**Code of Conduct**](./CODE_OF_CONDUCT.md) · [**Security policy**](./SECURITY.md)
88
105
 
89
- Permissions (`allow` / `ask` / `deny`), tool-call repair (flatten · scavenge · truncation · storm), and `/effort` for cheap turns round out the loop. [Architecture →](./docs/ARCHITECTURE.md) · [Dashboard mockup →](https://esengine.github.io/reasonix/design/agent-dashboard.html) · [TUI mockup →](https://esengine.github.io/reasonix/design/agent-tui-terminal.html) · [Website →](https://esengine.github.io/reasonix/)
106
+ <br/>
90
107
 
91
- ---
108
+ ## Community
109
+
110
+ > [!NOTE]
111
+ > Reasonix is open source and community-developed. The contributors wall below isn't decoration — every avatar is a real PR that shipped.
92
112
 
93
- ## Contributing
113
+ Scoped starter tickets — each with background, code pointers, acceptance criteria, and hints — live under the [`good first issue`](https://github.com/esengine/reasonix/labels/good%20first%20issue) label. Pick anything open.
94
114
 
95
- Reasonix is solo-maintained but designed to grow. Scoped starter tickets each with background, code pointers, acceptance criteria, and hints — live under the [`good first issue`](https://github.com/esengine/reasonix/labels/good%20first%20issue) label. Pick anything open.
115
+ **Open Discussionsopinions wanted:**
96
116
 
97
- **Open Discussions** — opinions wanted:
98
117
  - [#20 · CLI / TUI design](https://github.com/esengine/reasonix/discussions/20) — what's broken, what's missing, what would you change?
99
118
  - [#21 · Dashboard design](https://github.com/esengine/reasonix/discussions/21) — react against the [proposed mockup](https://esengine.github.io/reasonix/design/agent-dashboard.html)
100
119
  - [#22 · Future feature wishlist](https://github.com/esengine/reasonix/discussions/22) — what would you build into Reasonix next?
101
120
 
102
- **Before your first PR**: read [`CONTRIBUTING.md`](./CONTRIBUTING.md) short, strict project rules (comments, errors, libraries-over-hand-rolled). `tests/comment-policy.test.ts` enforces the comment ones; `npm run verify` is the pre-push gate. By participating you agree to the [Code of Conduct](./CODE_OF_CONDUCT.md). Security issues [SECURITY.md](./SECURITY.md).
121
+ **Already using Reasonix and willing to help others discover it?** Publish blog posts, articles, screenshots, talks, or videos to [**Show and tell**](https://github.com/esengine/reasonix/discussions/categories/show-and-tell). The project has no marketing budget community word of mouth is how new users find it. Sustained advocates earn the badge below, displayed next to the contributors wall once awarded:
122
+
123
+ <p align="center">
124
+ <a href="https://github.com/esengine/reasonix/discussions/categories/show-and-tell">
125
+ <img src="https://img.shields.io/badge/REASONIX-📣%20ADVOCATE-c4b5fd?style=for-the-badge&labelColor=0d1117" alt="Reasonix Advocate badge — earned by sustained advocates"/>
126
+ </a>
127
+ </p>
103
128
 
104
- ### Contributors
129
+ **Before your first PR**: read [`CONTRIBUTING.md`](./CONTRIBUTING.md) — short, strict rules (comments, errors, libraries-over-hand-rolled). `tests/comment-policy.test.ts` enforces the comment ones; `npm run verify` is the pre-push gate. By participating you agree to the [Code of Conduct](./CODE_OF_CONDUCT.md). Security issues → [SECURITY.md](./SECURITY.md).
105
130
 
106
- <a href="https://github.com/esengine/reasonix/graphs/contributors">
107
- <img src="https://contrib.rocks/image?repo=esengine/reasonix" alt="Contributors to esengine/reasonix"/>
108
- </a>
131
+ <p align="center">
132
+ <a href="https://github.com/esengine/reasonix/graphs/contributors">
133
+ <img src="https://contrib.rocks/image?repo=esengine/reasonix&max=100&columns=12" alt="Contributors to esengine/reasonix" width="860"/>
134
+ </a>
135
+ </p>
109
136
 
110
- ---
137
+ <br/>
111
138
 
112
139
  ## Non-goals
113
140
 
114
- - **Multi-provider flexibility.** DeepSeek-only on purpose — every layer is tuned around DeepSeek's specific cache mechanic and pricing. Coupling to one backend is the feature.
115
- - **IDE integration.** Terminal-first; the diff lives in `git diff`, the file tree in `ls`. The dashboard is a companion, not a Cursor replacement.
116
- - **Hardest-leaderboard reasoning.** Claude Opus still wins some benchmarks. DeepSeek V4 is competitive on coding; if your work is "solve this PhD proof" rather than "fix this auth bug," start with Claude.
141
+ > [!IMPORTANT]
142
+ > Reasonix is opinionated. Some things it deliberately *doesn't* do listed here so you can pick the right tool for your work.
143
+
144
+ - **Multi-provider flexibility.** DeepSeek-only on purpose. Coupling to one backend is the feature, not a limitation.
145
+ - **IDE integration.** Terminal-first. The diff lives in `git diff`, the file tree in `ls`. The dashboard is a companion, not a Cursor replacement.
146
+ - **Hardest-leaderboard reasoning.** Claude Opus still wins some benchmarks. DeepSeek is competitive on coding; if your work is "solve this PhD proof" rather than "fix this auth bug," start with Claude.
117
147
  - **Air-gapped / fully-free.** Reasonix needs a paid DeepSeek API key. For air-gapped or zero-cost runs see Aider + Ollama or [Continue](https://continue.dev).
118
148
 
119
- ---
149
+ <br/>
150
+
151
+ ## Star History
152
+
153
+ <a href="https://www.star-history.com/?repos=esengine%2Freasonix&type=timeline&logscale=&legend=top-left">
154
+ <picture>
155
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=esengine/reasonix&type=timeline&theme=dark&logscale&legend=top-left" />
156
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=esengine/reasonix&type=timeline&logscale&legend=top-left" />
157
+ <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=esengine/reasonix&type=timeline&logscale&legend=top-left" />
158
+ </picture>
159
+ </a>
120
160
 
121
- ## License
161
+ <br/>
122
162
 
123
- MIT — see [LICENSE](./LICENSE).
163
+ ---
164
+
165
+ <p align="center">
166
+ <sub>MIT — see <a href="./LICENSE">LICENSE</a></sub>
167
+ <br/>
168
+ <sub>Built by the community at <a href="https://github.com/esengine/reasonix/graphs/contributors">esengine/reasonix</a></sub>
169
+ </p>
package/README.zh-CN.md CHANGED
@@ -1,123 +1,169 @@
1
1
  <p align="center">
2
- <img src="docs/logo.svg" alt="Reasonix — DeepSeek 原生的 agent 框架" width="640"/>
2
+ <img src="docs/logo.svg" alt="Reasonix" width="640"/>
3
3
  </p>
4
4
 
5
5
  <p align="center">
6
- <a href="./README.md">English</a> · <strong>简体中文</strong> · <a href="https://esengine.github.io/reasonix/">官方网站</a>
6
+ <a href="./README.md">English</a>
7
+ &nbsp;·&nbsp;
8
+ <strong>简体中文</strong>
9
+ &nbsp;·&nbsp;
10
+ <a href="https://esengine.github.io/reasonix/">官方网站</a>
11
+ &nbsp;·&nbsp;
12
+ <a href="./docs/ARCHITECTURE.md">架构文档</a>
13
+ &nbsp;·&nbsp;
14
+ <a href="./benchmarks/">基准测试</a>
7
15
  </p>
8
16
 
9
17
  <p align="center">
10
- <a href="https://www.npmjs.com/package/reasonix"><img src="https://img.shields.io/npm/v/reasonix.svg" alt="npm version"/></a>
11
- <a href="https://github.com/esengine/reasonix/actions/workflows/ci.yml"><img src="https://github.com/esengine/reasonix/actions/workflows/ci.yml/badge.svg" alt="CI"/></a>
12
- <a href="./LICENSE"><img src="https://img.shields.io/npm/l/reasonix.svg" alt="license"/></a>
13
- <a href="https://www.npmjs.com/package/reasonix"><img src="https://img.shields.io/npm/dm/reasonix.svg" alt="downloads"/></a>
14
- <a href="./package.json"><img src="https://img.shields.io/node/v/reasonix.svg" alt="node"/></a>
15
- <a href="https://github.com/esengine/reasonix/stargazers"><img src="https://img.shields.io/github/stars/esengine/reasonix.svg?style=flat&logo=github&label=stars" alt="GitHub stars"/></a>
16
- <a href="https://github.com/esengine/reasonix/discussions"><img src="https://img.shields.io/github/discussions/esengine/reasonix.svg?logo=github&label=discussions" alt="Discussions"/></a>
18
+ <a href="https://www.npmjs.com/package/reasonix"><img src="https://img.shields.io/npm/v/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22" alt="npm version"/></a>
19
+ <a href="https://github.com/esengine/reasonix/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/esengine/reasonix/ci.yml?style=flat-square&label=ci&color=0d1117&labelColor=161b22" alt="CI"/></a>
20
+ <a href="./LICENSE"><img src="https://img.shields.io/npm/l/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22" alt="license"/></a>
21
+ <a href="https://www.npmjs.com/package/reasonix"><img src="https://img.shields.io/npm/dm/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22" alt="downloads"/></a>
22
+ <a href="./package.json"><img src="https://img.shields.io/node/v/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22" alt="node"/></a>
23
+ <a href="https://github.com/esengine/reasonix/stargazers"><img src="https://img.shields.io/github/stars/esengine/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22&logo=github" alt="GitHub stars"/></a>
24
+ <a href="https://github.com/esengine/reasonix/graphs/contributors"><img src="https://img.shields.io/github/contributors/esengine/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22&logo=github" alt="contributors"/></a>
25
+ <a href="https://github.com/esengine/reasonix/discussions"><img src="https://img.shields.io/github/discussions/esengine/reasonix.svg?style=flat-square&color=0d1117&labelColor=161b22&logo=github" alt="Discussions"/></a>
17
26
  </p>
18
27
 
19
- <p align="center">
20
- <strong>DeepSeek 原生的终端 AI 编程代理。</strong> 围绕 DeepSeek 的前缀缓存机制打造——省钱是真省,loop 便宜到可以一直开着。
21
- </p>
28
+ <br/>
29
+
30
+ <h3 align="center">DeepSeek 原生的终端 AI 编程代理。</h3>
31
+ <p align="center">围绕前缀缓存稳定性设计 —— 长会话下 token 成本始终低位运行,可以一直开着。</p>
32
+
33
+ <br/>
22
34
 
23
35
  <p align="center">
24
- <img src="docs/assets/hero-stats.zh-CN.svg" alt="94% 实测前缀缓存命中 · 单任务比 Claude Code 便宜 ~30 倍 · MIT 终端原生" width="860"/>
36
+ <img src="docs/assets/hero-terminal.zh-CN.svg" alt="Reasonix code 模式预览 助手提出 SEARCH/REPLACE 编辑,未 /apply 不落盘" width="860"/>
25
37
  </p>
26
38
 
27
- ---
39
+ <br/>
28
40
 
29
- ## 快速上手
41
+ > [!TIP]
42
+ > **缓存稳定不是开关,而是循环要围绕设计的不变量。** 这就是 Reasonix 只支持 DeepSeek 的根本原因 —— 每一层都为 DeepSeek 字节稳定的前缀缓存机制调过。
43
+
44
+ <br/>
45
+
46
+ ## 安装
30
47
 
31
48
  ```bash
32
49
  cd my-project
33
50
  npx reasonix code # 首次运行粘贴 DeepSeek API Key,之后会记住
34
51
  ```
35
52
 
36
- <p align="center">
37
- <img src="docs/assets/hero-terminal.zh-CN.svg" alt="Reasonix code 模式预览 — 助手提出 SEARCH/REPLACE 编辑,未 /apply 不落盘" width="860"/>
38
- </p>
53
+ 要求 Node ≥ 22。已在 macOS · Linux · Windows(PowerShell · Git Bash · Windows Terminal)测过。[去拿 DeepSeek API Key →](https://platform.deepseek.com/api_keys) · 完整 flag 看 `reasonix code --help`。
39
54
 
40
- 要求 Node ≥ 22。已在 macOS、Linux、Windows(PowerShell · Git Bash · Windows Terminal)测过。[去拿 DeepSeek API Key →](https://platform.deepseek.com/api_keys) · 完整 flag 看 `reasonix code --help`。
55
+ <br/>
41
56
 
42
- ---
57
+ ## Reasonix 的不同之处
43
58
 
44
- ## 横向对比
59
+ 整个循环围绕四根支柱组织。每一根解决的都是通用 agent 框架根本看不见的问题 —— 因为它们是为另一种缓存机制设计的。
45
60
 
46
- | | Reasonix | Claude Code | Cursor | Aider |
47
- |----------------------------|-------------------|-----------------|--------------------|-------------------|
48
- | 后端 | DeepSeek V4 | Anthropic | OpenAI / Anthropic | 任意(OpenRouter)|
49
- | **单任务成本** | **~¥0.01–0.04** | ~¥0.40–4 | ¥150/月 + 用量 | 不一 |
50
- | 协议 | **MIT** | 闭源 | 闭源 | Apache 2 |
51
- | **DeepSeek 前缀缓存命中** | **94%**(实测) | 不适用 | 不适用 | ~33%(基线) |
52
- | 内嵌 web 仪表盘 | 支持 | — | 不适用 (IDE) | — |
53
- | 持久化的工作区会话 | 支持 | 部分 | 不适用 | — |
61
+ <p align="center">
62
+ <a href="./docs/ARCHITECTURE.md"><img src="docs/assets/pillars.zh-CN.svg" alt="Reasonix 四大支柱 — 缓存优先循环、R1 思维提取、工具调用修复、成本控制" width="880"/></a>
63
+ </p>
54
64
 
55
- 计划模式、编辑审查、MCP、skill、Hooks、沙箱在 Reasonix 和大多数同类里都是"支持"——具体怎么做的看下面的功能一览。
65
+ <sub align="center">
56
66
 
57
- 数据来自 `benchmarks/tau-bench-lite`(8 个多轮任务 × 3 次重放,真实 `deepseek-chat`)。[完整 transcript →](./benchmarks/)
67
+ 各支柱完整说明 → [Pillar 1](./docs/ARCHITECTURE.md#pillar-1--cache-first-loop) · [Pillar 2](./docs/ARCHITECTURE.md#pillar-2--r1-thought-harvesting-opt-in) · [Pillar 3](./docs/ARCHITECTURE.md#pillar-3--tool-call-repair) · [Pillar 4](./docs/ARCHITECTURE.md#pillar-4--cost-control-v06)
58
68
 
59
- <details>
60
- <summary><strong>为什么只支持 DeepSeek?— 缓存经济学</strong></summary>
69
+ </sub>
61
70
 
62
- 便宜的 token 只是故事的一半。DeepSeek 的前缀缓存是**字节稳定**的:缓存指纹从 prompt 第 0 字节开始算。Reasonix 整个循环都围绕这一点设计——只追加、不重排、不做基于标记的 compaction,所以缓存前缀能跨过每一次工具调用存活下来。
71
+ <br/>
63
72
 
64
- 对比一下:Claude Code 是围绕 Anthropic 的 `cache_control` 标记构建的(完全不同的机制)。把 Claude Code 指向 DeepSeek 的 Anthropic 兼容端点,能拿到便宜的 token,但缓存命中没了——标记被忽略,底下的前缀本来就不字节稳定。通用后端工具(Aider / Cline / Continue)从另一个方向撞上同一堵墙:它们的 compaction 模式会破坏字节稳定。
73
+ ## 能力一览
65
74
 
66
- DeepSeek 的定价 —— $0.07/Mtok 未命中、$0.014/Mtok 命中 —— **50% 命中和 94% 命中之间的差距,光是输入成本就大约 2.5 倍。** 同模型、同 API;变的只是循环本身的不变量。
75
+ <p align="center">
76
+ <img src="docs/assets/feature-grid.zh-CN.svg" alt="Reasonix 能力一览 — cell-diff 渲染器、MCP、计划模式、权限、仪表盘、持久化会话、Hooks/Skills/Memory、语义检索、自动 checkpoint、/effort 旋钮、transcript 重放、事件日志" width="880"/>
77
+ </p>
67
78
 
68
- 通用循环漏掉的几个 DeepSeek 专属修复:
79
+ <br/>
69
80
 
70
- | 通用循环假设的 | DeepSeek 实际表现 | Reasonix 的处理 |
71
- |---|---|---|
72
- | reasoning 在结构化的 `thinking` 块里 | R1 偶尔把 tool-call JSON 漏在 `<think>` 标签里 | 一个 `scavenge` pass 把逃逸的 tool call 拉回来 |
73
- | 工具 schema 严格校验 | DeepSeek 会静默丢掉深层嵌套的 object/array 参数 | 自动 flatten——嵌套参数被改写成单层带前缀的名字 |
74
- | tool-call 参数是合法 JSON | DeepSeek 偶尔吐 `string="false"` 之类的破碎片段 | 专门的 `ToolCallRepair` 在 dispatch 前把常见形状修好 |
75
- | reasoning 深度靠系统级开关调 | V4 暴露了 `reasoning_effort` 旋钮(`max` / `high`) | `/effort` 斜杠 + `--effort` flag,便宜回合可以降档 |
81
+ ## 横向对比
76
82
 
77
- 缓存稳定不是个开关,是循环要围绕设计的不变量。这就是 Reasonix 只支持 DeepSeek 的根本原因。
83
+ | | Reasonix | Claude Code | Cursor | Aider |
84
+ |----------------------------|-------------------|-------------------|---------------------|--------------------|
85
+ | 后端 | DeepSeek | Anthropic | OpenAI / Anthropic | 任意(OpenRouter) |
86
+ | 协议 | **MIT** | 闭源 | 闭源 | Apache 2 |
87
+ | 单任务成本 | **低** | 高 | 订阅 + 用量 | 不一 |
88
+ | DeepSeek 前缀缓存 | **专门工程化** | 不适用 | 不适用 | 偶发命中 |
89
+ | 内嵌 web 仪表盘 | 支持 | — | 不适用 (IDE) | — |
90
+ | 持久化的工作区会话 | 支持 | 部分 | 不适用 | — |
91
+ | 计划模式 · MCP · Hooks | 支持 | 支持 | 支持 | 部分 |
92
+ | 开放社区共建 | 支持 | — | — | 支持 |
78
93
 
79
- </details>
94
+ 实测缓存命中率、成本、方法论看 [`benchmarks/`](./benchmarks/) —— 这些数会随模型定价变化,所以归在 harness 里,不进 README。
80
95
 
81
- ---
96
+ <br/>
82
97
 
83
- ## 功能一览
98
+ ## 文档
84
99
 
85
- <p align="center">
86
- <img src="docs/assets/feature-grid.zh-CN.svg" alt="功能一览 缓存优先循环、计划模式、MCP 一等公民、会话与仪表盘、HooksMemory 与 Skills" width="860"/>
87
- </p>
100
+ - [**架构**](./docs/ARCHITECTURE.md) —— 四大支柱、缓存优先循环、思维提取、脚手架
101
+ - [**基准测试**](./benchmarks/) —— τ-bench-lite harnesstranscript、成本方法论
102
+ - [**官方网站**](https://esengine.github.io/reasonix/) —— 入门、Dashboard 设计稿、TUI 设计稿
103
+ - [**贡献指南**](./CONTRIBUTING.md) —— 注释规则、错误处理、用现成库不手写
104
+ - [**行为准则**](./CODE_OF_CONDUCT.md) · [**安全策略**](./SECURITY.md)
88
105
 
89
- 权限系统(`allow` / `ask` / `deny`)、tool-call repair(flatten · scavenge · truncation · storm)、`/effort` 给便宜回合降档——一起把整个 loop 兜起来。[架构文档 →](./docs/ARCHITECTURE.md) · [Dashboard 设计稿 →](https://esengine.github.io/reasonix/design/agent-dashboard.html) · [TUI 设计稿 →](https://esengine.github.io/reasonix/design/agent-tui-terminal.html) · [官网 →](https://esengine.github.io/reasonix/)
106
+ <br/>
90
107
 
91
- ---
108
+ ## 社区
92
109
 
93
- ## 参与贡献
110
+ > [!NOTE]
111
+ > Reasonix 是开源、社区共建的项目。下面贡献者墙不是装饰 —— 每一个头像都对应一次真实合并的 PR。
94
112
 
95
- Reasonix 现在主要是单人维护,但是为协作设计的。给新手准备的入门 issue —— 每个都带背景说明、代码定位、验收标准、提示 —— 全部挂在 [`good first issue`](https://github.com/esengine/reasonix/labels/good%20first%20issue) 标签下。挑任意一个还没人认领的就行。
113
+ 给新手准备的入门 issue —— 每个都带背景说明、代码定位、验收标准、提示 —— 全部挂在 [`good first issue`](https://github.com/esengine/reasonix/labels/good%20first%20issue) 标签下。挑任意一个还没人认领的就行。
96
114
 
97
115
  **正在征集意见的 Discussions:**
98
- - [#20 · CLI / TUI 设计](https://github.com/esengine/reasonix/discussions/20) — 哪里坏了、哪里少东西、哪里你会怎么改?
99
- - [#21 · Dashboard 设计](https://github.com/esengine/reasonix/discussions/21) — 对着[设计稿](https://esengine.github.io/reasonix/design/agent-dashboard.html)拍砖
100
- - [#22 · 未来功能愿望单](https://github.com/esengine/reasonix/discussions/22) — 你希望 Reasonix 长出什么功能?
101
116
 
102
- **第一次提 PR 之前**:先读 [`CONTRIBUTING.md`](./CONTRIBUTING.md) —— 短小、严格的项目规则(注释、错误处理、用现成库不手写)。`tests/comment-policy.test.ts` 静态强制执行注释那部分,`npm run verify` 是 push 前的闸。参与本项目即同意 [行为准则](./CODE_OF_CONDUCT.md)。安全相关问题请走 [SECURITY.md](./SECURITY.md)。
117
+ - [#20 · CLI / TUI 设计](https://github.com/esengine/reasonix/discussions/20) —— 哪里坏了、哪里少东西、哪里你会怎么改?
118
+ - [#21 · Dashboard 设计](https://github.com/esengine/reasonix/discussions/21) —— 对着[设计稿](https://esengine.github.io/reasonix/design/agent-dashboard.html)拍砖
119
+ - [#22 · 未来功能愿望单](https://github.com/esengine/reasonix/discussions/22) —— 你希望 Reasonix 长出什么功能?
103
120
 
104
- ### 贡献者
121
+ **正在使用 Reasonix,愿意让更多人了解它?** 欢迎将相关博客、文章、截图、演讲或视频发布到 [**Show and tell**](https://github.com/esengine/reasonix/discussions/categories/show-and-tell)。项目没有营销预算,新用户主要通过社区口碑找到这里。持续参与传播的用户将获得下方这枚徽章,颁发后会展示在贡献者墙旁:
105
122
 
106
- <a href="https://github.com/esengine/reasonix/graphs/contributors">
107
- <img src="https://contrib.rocks/image?repo=esengine/reasonix" alt="esengine/reasonix 贡献者"/>
108
- </a>
123
+ <p align="center">
124
+ <a href="https://github.com/esengine/reasonix/discussions/categories/show-and-tell">
125
+ <img src="https://img.shields.io/badge/REASONIX-📣%20ADVOCATE-c4b5fd?style=for-the-badge&labelColor=0d1117" alt="Reasonix Advocate 徽章 —— 授予持续参与传播的用户"/>
126
+ </a>
127
+ </p>
109
128
 
110
- ---
129
+ **第一次提 PR 之前**:先读 [`CONTRIBUTING.md`](./CONTRIBUTING.md) —— 短小、严格的项目规则(注释、错误处理、用现成库不手写)。`tests/comment-policy.test.ts` 静态强制执行注释那部分,`npm run verify` 是 push 前的闸。参与本项目即同意 [行为准则](./CODE_OF_CONDUCT.md)。安全相关问题请走 [SECURITY.md](./SECURITY.md)。
130
+
131
+ <p align="center">
132
+ <a href="https://github.com/esengine/reasonix/graphs/contributors">
133
+ <img src="https://contrib.rocks/image?repo=esengine/reasonix&max=100&columns=12" alt="esengine/reasonix 贡献者" width="860"/>
134
+ </a>
135
+ </p>
136
+
137
+ <br/>
111
138
 
112
139
  ## 不做的事
113
140
 
114
- - **多供应商灵活性。** 故意只做 DeepSeek —— 每一层都为 DeepSeek 特定的缓存机制和定价调过。绑死一个后端是 feature,不是要克服的限制。
115
- - **IDE 集成。** 终端优先;diff `git diff`,文件树在 `ls`。仪表盘是 TUI 的伴生,不是 Cursor 的替代。
116
- - **追最难的 reasoning 榜单。** Claude Opus 在某些榜单上还是赢家。DeepSeek V4 在编程任务上有竞争力;如果你的工作是"解一个 PhD 级证明"而不是"修个 auth bug",先用 Claude。
141
+ > [!IMPORTANT]
142
+ > Reasonix 是有立场的。有些事它故意 *不做* —— 列在这里方便你为自己的工作挑对工具。
143
+
144
+ - **多供应商灵活性。** 故意只做 DeepSeek。绑死一个后端是 feature,不是限制。
145
+ - **IDE 集成。** 终端优先。diff 在 `git diff`,文件树在 `ls`。仪表盘是 TUI 的伴生,不是 Cursor 的替代。
146
+ - **追最难的 reasoning 榜单。** Claude Opus 在某些榜单上还是赢家。DeepSeek 在编程任务上有竞争力;如果你的工作是"解一个 PhD 级证明"而不是"修个 auth bug",先用 Claude。
117
147
  - **完全离线 / 永远免费。** Reasonix 需要付费的 DeepSeek API Key。要离线 / 零成本,看 Aider + Ollama 或 [Continue](https://continue.dev)。
118
148
 
119
- ---
149
+ <br/>
150
+
151
+ ## Star 趋势
152
+
153
+ <a href="https://www.star-history.com/?repos=esengine%2Freasonix&type=timeline&logscale=&legend=top-left">
154
+ <picture>
155
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=esengine/reasonix&type=timeline&theme=dark&logscale&legend=top-left" />
156
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=esengine/reasonix&type=timeline&logscale&legend=top-left" />
157
+ <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=esengine/reasonix&type=timeline&logscale&legend=top-left" />
158
+ </picture>
159
+ </a>
160
+
161
+ <br/>
120
162
 
121
- ## 协议
163
+ ---
122
164
 
123
- MIT —— 见 [LICENSE](./LICENSE)。
165
+ <p align="center">
166
+ <sub>MIT —— 见 <a href="./LICENSE">LICENSE</a></sub>
167
+ <br/>
168
+ <sub>由 <a href="https://github.com/esengine/reasonix/graphs/contributors">esengine/reasonix</a> 社区共建</sub>
169
+ </p>
package/dashboard/app.css CHANGED
@@ -690,8 +690,19 @@ main { padding: 32px 40px 60px 32px; min-width: 0; }
690
690
  .crumbs .sep { color: var(--fg-4); }
691
691
 
692
692
  /* ── Sessions panel ──────────────────────────────────────────────────── */
693
- .sessions-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; min-height: 540px; }
694
- .sessions-list { background: var(--bg-elev); border: 1px solid var(--bd); border-radius: var(--r); display: flex; flex-direction: column; overflow: hidden; }
693
+ .sessions-grid {
694
+ display: grid;
695
+ grid-template-columns: 320px minmax(0, 1fr);
696
+ /* `minmax(0, 1fr)` on the row + `min-height: 0` on the children is the
697
+ standard recipe for "let the inner overflow:auto take effect" — without
698
+ it the grid items default to min-height: auto (= content size) and
699
+ grow past the parent's max-height, dragging .app-body along. */
700
+ grid-template-rows: minmax(0, 1fr);
701
+ gap: 14px;
702
+ min-height: 540px;
703
+ max-height: calc(100vh - 140px);
704
+ }
705
+ .sessions-list { background: var(--bg-elev); border: 1px solid var(--bd); border-radius: var(--r); display: flex; flex-direction: column; overflow: hidden; min-height: 0; min-width: 0; }
695
706
  .sessions-list .ssl-h { padding: 10px 12px; border-bottom: 1px solid var(--bd); display: flex; align-items: center; gap: 8px; }
696
707
  .sessions-list .ssl-h input {
697
708
  flex: 1; background: var(--bg-input); border: 1px solid var(--bd); border-radius: var(--r);
@@ -710,7 +721,7 @@ main { padding: 32px 40px 60px 32px; min-width: 0; }
710
721
  .ssl-row .meta { display: flex; gap: 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4); margin-top: 2px; }
711
722
  .ssl-row .meta .v { color: var(--fg-2); }
712
723
 
713
- .sessions-detail { background: var(--bg-elev); border: 1px solid var(--bd); border-radius: var(--r); padding: 14px 16px; overflow: auto; }
724
+ .sessions-detail { background: var(--bg-elev); border: 1px solid var(--bd); border-radius: var(--r); padding: 14px 16px; overflow: auto; min-height: 0; min-width: 0; }
714
725
  .sessions-detail-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--bd); }
715
726
  .sessions-detail-h .name { font-family: var(--font-mono); font-size: 14px; color: var(--fg-0); font-weight: 600; }
716
727
  .sessions-detail-h .ws { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }