reasonix 1.5.0-rc.1 → 1.7.0-rc.1

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.
Files changed (2) hide show
  1. package/README.md +28 -221
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -7,6 +7,8 @@
7
7
   · 
8
8
  <a href="./README.zh-CN.md">简体中文</a>
9
9
  &nbsp;·&nbsp;
10
+ <a href="./docs/GUIDE.md">Guide</a>
11
+ &nbsp;·&nbsp;
10
12
  <a href="./docs/SPEC.md">Spec</a>
11
13
  &nbsp;·&nbsp;
12
14
  <a href="https://esengine.github.io/DeepSeek-Reasonix/">Website</a>
@@ -21,13 +23,13 @@
21
23
 
22
24
  <p align="center">
23
25
  <a href="https://www.npmjs.com/package/reasonix"><img src="https://img.shields.io/npm/v/reasonix.svg?style=flat-square&color=cb3837&labelColor=161b22&logo=npm&logoColor=white" alt="npm version"/></a>
24
- <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&labelColor=161b22&logo=githubactions&logoColor=white" alt="CI"/></a>
26
+ <a href="https://github.com/esengine/DeepSeek-Reasonix/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/esengine/DeepSeek-Reasonix/ci.yml?style=flat-square&label=ci&labelColor=161b22&logo=githubactions&logoColor=white" alt="CI"/></a>
25
27
  <a href="./LICENSE"><img src="https://img.shields.io/npm/l/reasonix.svg?style=flat-square&color=8b949e&labelColor=161b22" alt="license"/></a>
26
28
  <a href="https://www.npmjs.com/package/reasonix"><img src="https://img.shields.io/npm/dm/reasonix.svg?style=flat-square&color=3fb950&labelColor=161b22&label=downloads" alt="downloads"/></a>
27
- <a href="https://github.com/esengine/reasonix/stargazers"><img src="https://img.shields.io/github/stars/esengine/reasonix.svg?style=flat-square&color=dbab09&labelColor=161b22&logo=github&logoColor=white" alt="GitHub stars"/></a>
29
+ <a href="https://github.com/esengine/DeepSeek-Reasonix/stargazers"><img src="https://img.shields.io/github/stars/esengine/DeepSeek-Reasonix.svg?style=flat-square&color=dbab09&labelColor=161b22&logo=github&logoColor=white" alt="GitHub stars"/></a>
28
30
  <a href="https://atomgit.com/esengine/DeepSeek-Reasonix"><img src="https://atomgit.com/esengine/DeepSeek-Reasonix/star/badge.svg" alt="AtomGit stars"/></a>
29
- <a href="https://github.com/esengine/reasonix/graphs/contributors"><img src="https://img.shields.io/github/contributors/esengine/reasonix.svg?style=flat-square&color=bc8cff&labelColor=161b22&logo=github&logoColor=white" alt="contributors"/></a>
30
- <a href="https://github.com/esengine/reasonix/discussions"><img src="https://img.shields.io/github/discussions/esengine/reasonix.svg?style=flat-square&color=58a6ff&labelColor=161b22&logo=github&logoColor=white" alt="Discussions"/></a>
31
+ <a href="https://github.com/esengine/DeepSeek-Reasonix/graphs/contributors"><img src="https://img.shields.io/github/contributors/esengine/DeepSeek-Reasonix.svg?style=flat-square&color=bc8cff&labelColor=161b22&logo=github&logoColor=white" alt="contributors"/></a>
32
+ <a href="https://github.com/esengine/DeepSeek-Reasonix/discussions"><img src="https://img.shields.io/github/discussions/esengine/DeepSeek-Reasonix.svg?style=flat-square&color=58a6ff&labelColor=161b22&logo=github&logoColor=white" alt="Discussions"/></a>
31
33
  <a href="https://discord.gg/XF78rEME2D"><img src="https://img.shields.io/badge/discord-join-5865F2.svg?style=flat-square&labelColor=161b22&logo=discord&logoColor=white" alt="Discord"/></a>
32
34
  </p>
33
35
 
@@ -97,22 +99,10 @@ echo "explain this code" | reasonix run
97
99
 
98
100
  ## Configuration
99
101
 
100
- Resolution order: **flag > `./reasonix.toml` > `~/.config/reasonix/config.toml` >
101
- built-in defaults**. Secrets come from the environment via `api_key_env` and are
102
- never stored in config files.
102
+ A minimal `reasonix.toml` one provider and a default model — is enough to start:
103
103
 
104
104
  ```toml
105
- default_model = "deepseek-flash" # executor; set [agent].planner_model to add a planner
106
- # language = "zh" # ui language; empty = auto-detect from $LANG / $REASONIX_LANG
107
-
108
- [agent]
109
- max_steps = 0 # executor tool-call rounds; 0 = no limit
110
- planner_max_steps = 12 # planner read-only tool-call rounds; 0 = no limit
111
- # planner_model = "mimo-pro" # optional low-frequency planner
112
- # subagent_model = "deepseek-pro" # optional default for runAs=subagent skills
113
- # subagent_models = { review = "deepseek-pro", security_review = "deepseek-pro" }
114
- auto_plan = "off" # off|on; off keeps plan mode manual
115
- # auto_plan_classifier = "deepseek-flash" # optional; only borderline tasks call it
105
+ default_model = "deepseek-flash"
116
106
 
117
107
  [[providers]]
118
108
  name = "deepseek-flash"
@@ -120,211 +110,28 @@ kind = "openai"
120
110
  base_url = "https://api.deepseek.com"
121
111
  model = "deepseek-v4-flash"
122
112
  api_key_env = "DEEPSEEK_API_KEY"
123
- # also preset: deepseek-pro, mimo-pro (mimo-v2.5-pro), mimo-flash (mimo-v2-flash) @ api.xiaomimimo.com/v1
124
-
125
- [tools]
126
- enabled = [] # omit/empty = all built-ins
127
- bash_timeout_seconds = 120 # foreground safety cap; set 0 for no tool-local cap
128
-
129
- [skills]
130
- # paths = ["~/my-skills", "../shared/skills"] # extra custom skill roots
131
- # excluded_paths = ["~/.agents/skills"] # hide convention roots without deleting folders
132
- # disabled_skills = ["review"] # hide skills until /skill enable <name>
133
-
134
- [permissions]
135
- mode = "ask" # writer fallback when no rule matches: ask|allow|deny
136
- deny = ["Bash(rm -rf*)", "Bash(git push*)"] # hard-blocked in every mode
137
- allow = ["Bash(go test:*)"] # never prompted
138
-
139
- [sandbox]
140
- # workspace_root = "" # file-writers confined here; empty = current dir
141
- # allow_write = ["/tmp"] # extra dirs write_file/edit_file/multi_edit may touch
142
-
143
- [[plugins]]
144
- name = "example"
145
- command = "reasonix-plugin-example"
146
- ```
147
-
148
- Permissions gate each tool call: `deny` > `ask` > `allow` > fallback. Bash and
149
- file mutation tools require approval by default; read-only tools generally do
150
- not. Approvals are stored and matched as permission rules, not button labels:
151
- for example `Bash(npm run build)`, `Bash(npm run test:*)`, and `Edit(docs/**)`.
152
- `reasonix chat` can grant Bash as an exact command or as a conservative command
153
- prefix (for example `Bash(go test:*)`), while file-editing tools share session
154
- edit grants and persist path-scoped rules such as `Edit(src/app.go)`.
155
- `reasonix run` stays autonomous but still honours `deny`. See
156
- [`docs/SPEC.md`](docs/SPEC.md) for the full schema and contract.
157
-
158
- Permissions are *policy* (which calls to allow / prompt). The **sandbox** is
159
- *enforcement*: the file-writers (`write_file` / `edit_file` / `multi_edit`)
160
- refuse any path outside `[sandbox] workspace_root` (default: the current dir, so
161
- edits stay in the project), resolving symlinks and `..` so a link can't tunnel
162
- out. Reads are unrestricted. `bash` is itself jailed on macOS by default
163
- (`[sandbox] bash`, Seatbelt): commands may write only those same roots (plus
164
- temp and toolchain caches) and reach the network only when `[sandbox] network`
165
- is set. Other platforms fall back to running unconfined for now (see
166
- `docs/SPEC.md` §9 for the escape-prompt and Linux support still to come).
167
-
168
- ### Plugins (MCP)
169
-
170
- Reasonix is an MCP client. A `[[plugins]]` entry's `type` selects the transport:
171
- `stdio` (default) launches a local subprocess (`command`/`args`/`env`); `http`
172
- (Streamable HTTP) connects to a remote `url` with optional static `headers`
173
- (`${VAR}` / `${VAR:-default}` expanded from the environment, so tokens stay out
174
- of the file). Tools surface to the model as `mcp__<server>__<tool>`; a tool
175
- declaring MCP's `readOnlyHint: true` joins parallel dispatch and the permission
176
- reader-default.
177
-
178
- A server's **prompts** surface as `/mcp__<server>__<prompt>` slash commands
179
- (positional args after the command); its **resources** are pulled in by writing
180
- `@<server>:<uri>` in a message; `/mcp` lists connected servers and what each
181
- exposes. `make build` also produces `bin/reasonix-plugin-example` — a runnable
182
- reference stdio server (`echo`, `wordcount`, a `review` prompt, a style-guide
183
- resource) you can copy.
184
-
185
- ```toml
186
- [[plugins]] # local stdio server
187
- name = "example"
188
- command = "reasonix-plugin-example"
189
-
190
- [[plugins]] # remote server over Streamable HTTP
191
- name = "stripe"
192
- type = "http"
193
- url = "https://mcp.stripe.com"
194
- headers = { Authorization = "Bearer ${STRIPE_KEY}" }
195
- ```
196
-
197
- Enabled MCP servers start connecting automatically in the background after a
198
- session begins, so chat stays usable while tools come online. Use `/mcp` or the
199
- desktop MCP panel to refresh status, reconnect a server, inspect failures, or
200
- disable a server for the current session.
201
-
202
- **Already have an `.mcp.json`?** Drop it in the project root and Reasonix
203
- reads it as-is — the `mcpServers` spec (`command`/`args`/`env`, `type`/`url`/
204
- `headers`, `${VAR}` expansion) maps field-for-field onto `[[plugins]]`. Both
205
- sources are merged; on a name collision `reasonix.toml` wins.
206
-
207
- ```json
208
- {
209
- "mcpServers": {
210
- "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path"] },
211
- "stripe": { "type": "http", "url": "https://mcp.stripe.com", "headers": { "Authorization": "Bearer ${STRIPE_KEY}" } }
212
- }
213
- }
214
- ```
215
-
216
- **Upgrading from `0.x`?** Your old `~/.reasonix/config.json` is still read for its
217
- `mcpServers` (honouring `mcpDisabled`) as a lowest-priority source, so MCP servers
218
- keep working — move them into `reasonix.toml`'s `[[plugins]]` or a `.mcp.json` when
219
- convenient.
220
-
221
- ### Slash commands
222
-
223
- In `reasonix chat`, built-in commands (`/compact`, `/new`, `/clear`, `/rewind`, `/tree`,
224
- `/branch`, `/switch`, `/todo`, `/model`, `/effort`, `/mcp`, `/memory`, `/help`) run locally.
225
- `/new` starts a new session while saving the previous transcript for
226
- history/resume; `/clear` asks for confirmation, then discards the current context
227
- without saving it.
228
- `/tree` shows saved conversation branches, `/branch [name]` forks the current
229
- conversation tip, `/branch <turn> [name]` forks from an earlier checkpointed turn,
230
- and `/switch <id|name>` loads another branch. **Custom commands** are Markdown files under
231
- `.reasonix/commands/` (project) or `~/.config/reasonix/commands/` (user) —
232
- `review.md` becomes `/review`, a subdirectory namespaces it (`git/commit.md` →
233
- `/git:commit`). The body is a prompt template; invoking the command sends it as a
234
- turn.
235
-
236
- ```markdown
237
- ---
238
- description: Review the staged diff
239
- argument-hint: [focus-area]
240
- ---
241
- Review the staged diff. Focus on $ARGUMENTS, list bugs with file:line.
242
- ```
243
-
244
- `$ARGUMENTS` expands to all space-separated args, `$1`…`$N` to positional ones.
245
- MCP prompts also appear here as `/mcp__<server>__<prompt>`.
246
-
247
- ### @ references
248
-
249
- Embed `@` references in a message and Reasonix resolves them before sending, as
250
- tagged context blocks: `@path/to/file` (or `@dir`) injects a local file's
251
- contents (or a directory listing), and `@<server>:<uri>` injects an MCP
252
- resource. A local path is only treated as a reference when it actually exists,
253
- so ordinary `@mentions` stay literal. Typing `/` or `@` opens an autocomplete
254
- menu — slash commands, or hierarchical file navigation (one directory level at a
255
- time, descend into folders) plus MCP resources.
256
-
257
- ### Two-model collaboration (optional)
258
-
259
- `reasonix setup` keeps first-run minimal: pick provider → keys (every SKU of a
260
- chosen provider is enabled). Running two models together (executor + planner,
261
- separate cache-stable sessions) is a one-line edit afterwards — set
262
- `planner_model` to any other enabled provider:
263
-
264
- ```toml
265
- [agent]
266
- planner_model = "deepseek-pro" # used as the low-frequency planner
267
- planner_max_steps = 12 # read-only tool-call rounds before pausing
268
113
  ```
269
114
 
270
- The planner sees loaded `REASONIX.md` / `AGENTS.md` memory and a small read-only
271
- research tool set, so it can inspect relevant files before handing a plan to the
272
- executor. Writer and workflow tools remain executor-only. `max_steps` limits the
273
- executor; `planner_max_steps` limits only the planner, and either can be set to
274
- `0` for no round limit.
275
-
276
- Keep personal step-limit preferences in the user config. Add them to a project's
277
- `./reasonix.toml` only when that repository needs a shared override, such as a
278
- larger planner limit for a very large codebase.
279
-
280
- Subagent skills inherit the executor model by default. Set `subagent_model` to
281
- run them on another configured model, or use `subagent_models` to override only
282
- specific skills such as `review` or `security_review`.
283
-
284
- For interactive frontends, plan mode is manual by default. Set
285
- `agent.auto_plan = "on"` to make complex-looking tasks enter plan mode
286
- automatically: Reasonix first drafts a read-only plan, then waits for approval
287
- before editing or running side-effecting commands. `auto_plan_classifier` can
288
- name a cheap provider such as `deepseek-flash`; it is only called for borderline
289
- inputs and falls back to the heuristic if classification fails. Use
290
- `/auto-plan off|on` in `reasonix chat` to change the user-level setting, or
291
- `reasonix config auto-plan off|on` from a shell/script. Pass `--local` to the
292
- shell command only when you intentionally want a project-local override.
293
-
294
- ## Architecture
295
-
296
- Three tiers of extensibility, all behind registries the core resolves by name:
297
-
298
- 1. **Registry** — `Provider` and `Tool` are interfaces; the core has no
299
- `switch model`.
300
- 2. **Compile-time built-ins** — providers (`provider/openai`) and tools
301
- (`tool/builtin`) self-register via `init()`; `main` blank-imports them.
302
- Adding a built-in is one file plus one import.
303
- 3. **Runtime plugins** — executables declared in config, spoken to over
304
- newline-delimited JSON-RPC 2.0 on stdin/stdout (the MCP stdio convention).
305
- Each remote tool is adapted to the `Tool` interface.
306
-
307
- ## Status
308
-
309
- Done: registry-based providers/tools, OpenAI-compatible streaming with tool
310
- calls (bounded retry on 429/5xx), built-in tools (read_file, write_file,
311
- edit_file, multi_edit, bash, ls, glob, grep, web_fetch, task, todo_write, ask),
312
- TOML config, an interactive `reasonix setup` wizard, two-model collaboration
313
- (executor + planner in separate, cache-stable sessions), low-frequency context
314
- compaction, sub-agents (`task`), a bubbletea chat TUI (markdown, plan mode with
315
- controller-driven approval, live token/activity readout, pinned task list,
316
- `ask` question chooser, `/compact` `/new` `/tree` `/branch` `/switch` `/todo`), session persistence + resume,
317
- per-call **permissions** (allow/ask/deny rules; chat prompts before writers, deny
318
- rules hard-block everywhere), a **workspace sandbox** confining file-writers to
319
- the project (symlink/`..`-safe), an MCP client — **stdio + Streamable HTTP**
320
- transports, tools (`mcp__server__tool`, `readOnlyHint`-aware), prompts (slash
321
- commands), resources (`@`-references), and `/mcp`, configured via `[[plugins]]`
322
- or a project `.mcp.json` — custom slash commands (`.reasonix/commands/*.md`),
323
- `@file` / `@resource` references, plus a runnable reference plugin
324
- (`cmd/reasonix-plugin-example`), the harness loop, and CLI. A Wails desktop
325
- client (`desktop/`) drives the same kernel. Next: an OS-level sandbox for `bash`
326
- (macOS Seatbelt / Linux bubblewrap), an Anthropic-native provider, MCP OAuth +
327
- legacy SSE. See `docs/SPEC.md` §9.
115
+ Resolution order is **flag > `./reasonix.toml` > the user config file >
116
+ built-in defaults**; the user file lives in your OS config dir `~/.config/reasonix/`
117
+ on Linux, `~/Library/Application Support/reasonix/` on macOS, `%AppData%\reasonix\` on
118
+ Windows. Secrets come from the environment via `api_key_env` and are
119
+ never written to config files. Permissions, the sandbox, plugins (MCP), slash
120
+ commands, `@` references, and two-model setup are all in the
121
+ **[Guide](./docs/GUIDE.md)**.
122
+
123
+ ## Documentation
124
+
125
+ - **[Guide](./docs/GUIDE.md)** configuration, permissions & sandbox, plugins
126
+ (MCP), slash commands, `@` references, two-model collaboration.
127
+ - **[Bot guide](./docs/BOT_GUIDE.md)** connect Feishu, Lark, and WeChat bots
128
+ from the desktop app, then use approvals, YOLO, and commands from IM.
129
+ - **[Spec](./docs/SPEC.md)** engineering contract: architecture, registries,
130
+ data types, and roadmap.
131
+ - **[Migrating from 0.x](./docs/MIGRATING.md)** moving from the legacy
132
+ TypeScript releases to the 1.0 Go rewrite.
133
+ - **[Checkpoints & rewind](./docs/CHECKPOINTS.md)** the snapshot-based edit
134
+ safety net (Esc-Esc / `/rewind`).
328
135
 
329
136
  <br/>
330
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reasonix",
3
- "version": "1.5.0-rc.1",
3
+ "version": "1.7.0-rc.1",
4
4
  "description": "Cache-first DeepSeek coding agent for the terminal.",
5
5
  "bin": {
6
6
  "reasonix": "bin/reasonix.js"
@@ -29,11 +29,11 @@
29
29
  "tui"
30
30
  ],
31
31
  "optionalDependencies": {
32
- "@reasonix/cli-darwin-arm64": "1.5.0-rc.1",
33
- "@reasonix/cli-darwin-x64": "1.5.0-rc.1",
34
- "@reasonix/cli-linux-arm64": "1.5.0-rc.1",
35
- "@reasonix/cli-linux-x64": "1.5.0-rc.1",
36
- "@reasonix/cli-win32-arm64": "1.5.0-rc.1",
37
- "@reasonix/cli-win32-x64": "1.5.0-rc.1"
32
+ "@reasonix/cli-darwin-arm64": "1.7.0-rc.1",
33
+ "@reasonix/cli-darwin-x64": "1.7.0-rc.1",
34
+ "@reasonix/cli-linux-arm64": "1.7.0-rc.1",
35
+ "@reasonix/cli-linux-x64": "1.7.0-rc.1",
36
+ "@reasonix/cli-win32-arm64": "1.7.0-rc.1",
37
+ "@reasonix/cli-win32-x64": "1.7.0-rc.1"
38
38
  }
39
39
  }