reasonix 1.4.0-rc.1 → 1.6.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 +24 -220
  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,210 +110,24 @@ 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 fresh model context while saving the previous transcript for
226
- history/resume; `/clear` is the Claude Code-compatible alias.
227
- `/tree` shows saved conversation branches, `/branch [name]` forks the current
228
- conversation tip, `/branch <turn> [name]` forks from an earlier checkpointed turn,
229
- and `/switch <id|name>` loads another branch. **Custom commands** are Markdown files under
230
- `.reasonix/commands/` (project) or `~/.config/reasonix/commands/` (user) —
231
- `review.md` becomes `/review`, a subdirectory namespaces it (`git/commit.md` →
232
- `/git:commit`). The body is a prompt template; invoking the command sends it as a
233
- turn.
234
-
235
- ```markdown
236
- ---
237
- description: Review the staged diff
238
- argument-hint: [focus-area]
239
- ---
240
- Review the staged diff. Focus on $ARGUMENTS, list bugs with file:line.
241
- ```
242
-
243
- `$ARGUMENTS` expands to all space-separated args, `$1`…`$N` to positional ones.
244
- MCP prompts also appear here as `/mcp__<server>__<prompt>`.
245
-
246
- ### @ references
247
-
248
- Embed `@` references in a message and Reasonix resolves them before sending, as
249
- tagged context blocks: `@path/to/file` (or `@dir`) injects a local file's
250
- contents (or a directory listing), and `@<server>:<uri>` injects an MCP
251
- resource. A local path is only treated as a reference when it actually exists,
252
- so ordinary `@mentions` stay literal. Typing `/` or `@` opens an autocomplete
253
- menu — slash commands, or hierarchical file navigation (one directory level at a
254
- time, descend into folders) plus MCP resources.
255
-
256
- ### Two-model collaboration (optional)
257
-
258
- `reasonix setup` keeps first-run minimal: pick provider → keys (every SKU of a
259
- chosen provider is enabled). Running two models together (executor + planner,
260
- separate cache-stable sessions) is a one-line edit afterwards — set
261
- `planner_model` to any other enabled provider:
262
-
263
- ```toml
264
- [agent]
265
- planner_model = "deepseek-pro" # used as the low-frequency planner
266
- planner_max_steps = 12 # read-only tool-call rounds before pausing
267
113
  ```
268
114
 
269
- The planner sees loaded `REASONIX.md` / `AGENTS.md` memory and a small read-only
270
- research tool set, so it can inspect relevant files before handing a plan to the
271
- executor. Writer and workflow tools remain executor-only. `max_steps` limits the
272
- executor; `planner_max_steps` limits only the planner, and either can be set to
273
- `0` for no round limit.
274
-
275
- Keep personal step-limit preferences in the user config. Add them to a project's
276
- `./reasonix.toml` only when that repository needs a shared override, such as a
277
- larger planner limit for a very large codebase.
278
-
279
- Subagent skills inherit the executor model by default. Set `subagent_model` to
280
- run them on another configured model, or use `subagent_models` to override only
281
- specific skills such as `review` or `security_review`.
282
-
283
- For interactive frontends, plan mode is manual by default. Set
284
- `agent.auto_plan = "on"` to make complex-looking tasks enter plan mode
285
- automatically: Reasonix first drafts a read-only plan, then waits for approval
286
- before editing or running side-effecting commands. `auto_plan_classifier` can
287
- name a cheap provider such as `deepseek-flash`; it is only called for borderline
288
- inputs and falls back to the heuristic if classification fails. Use
289
- `/auto-plan off|on` in `reasonix chat` to change the user-level setting, or
290
- `reasonix config auto-plan off|on` from a shell/script. Pass `--local` to the
291
- shell command only when you intentionally want a project-local override.
292
-
293
- ## Architecture
294
-
295
- Three tiers of extensibility, all behind registries the core resolves by name:
296
-
297
- 1. **Registry** — `Provider` and `Tool` are interfaces; the core has no
298
- `switch model`.
299
- 2. **Compile-time built-ins** — providers (`provider/openai`) and tools
300
- (`tool/builtin`) self-register via `init()`; `main` blank-imports them.
301
- Adding a built-in is one file plus one import.
302
- 3. **Runtime plugins** — executables declared in config, spoken to over
303
- newline-delimited JSON-RPC 2.0 on stdin/stdout (the MCP stdio convention).
304
- Each remote tool is adapted to the `Tool` interface.
305
-
306
- ## Status
307
-
308
- Done: registry-based providers/tools, OpenAI-compatible streaming with tool
309
- calls (bounded retry on 429/5xx), built-in tools (read_file, write_file,
310
- edit_file, multi_edit, bash, ls, glob, grep, web_fetch, task, todo_write, ask),
311
- TOML config, an interactive `reasonix setup` wizard, two-model collaboration
312
- (executor + planner in separate, cache-stable sessions), low-frequency context
313
- compaction, sub-agents (`task`), a bubbletea chat TUI (markdown, plan mode with
314
- controller-driven approval, live token/activity readout, pinned task list,
315
- `ask` question chooser, `/compact` `/new` `/tree` `/branch` `/switch` `/todo`), session persistence + resume,
316
- per-call **permissions** (allow/ask/deny rules; chat prompts before writers, deny
317
- rules hard-block everywhere), a **workspace sandbox** confining file-writers to
318
- the project (symlink/`..`-safe), an MCP client — **stdio + Streamable HTTP**
319
- transports, tools (`mcp__server__tool`, `readOnlyHint`-aware), prompts (slash
320
- commands), resources (`@`-references), and `/mcp`, configured via `[[plugins]]`
321
- or a project `.mcp.json` — custom slash commands (`.reasonix/commands/*.md`),
322
- `@file` / `@resource` references, plus a runnable reference plugin
323
- (`cmd/reasonix-plugin-example`), the harness loop, and CLI. A Wails desktop
324
- client (`desktop/`) drives the same kernel. Next: an OS-level sandbox for `bash`
325
- (macOS Seatbelt / Linux bubblewrap), an Anthropic-native provider, MCP OAuth +
326
- legacy SSE. See `docs/SPEC.md` §9.
115
+ Resolution order is **flag > `./reasonix.toml` > `~/.config/reasonix/config.toml` >
116
+ built-in defaults**; secrets come from the environment via `api_key_env` and are
117
+ never written to config files. Permissions, the sandbox, plugins (MCP), slash
118
+ commands, `@` references, and two-model setup are all in the
119
+ **[Guide](./docs/GUIDE.md)**.
120
+
121
+ ## Documentation
122
+
123
+ - **[Guide](./docs/GUIDE.md)** configuration, permissions & sandbox, plugins
124
+ (MCP), slash commands, `@` references, two-model collaboration.
125
+ - **[Spec](./docs/SPEC.md)** engineering contract: architecture, registries,
126
+ data types, and roadmap.
127
+ - **[Migrating from 0.x](./docs/MIGRATING.md)** moving from the legacy
128
+ TypeScript releases to the 1.0 Go rewrite.
129
+ - **[Checkpoints & rewind](./docs/CHECKPOINTS.md)** the snapshot-based edit
130
+ safety net (Esc-Esc / `/rewind`).
327
131
 
328
132
  <br/>
329
133
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reasonix",
3
- "version": "1.4.0-rc.1",
3
+ "version": "1.6.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.4.0-rc.1",
33
- "@reasonix/cli-darwin-x64": "1.4.0-rc.1",
34
- "@reasonix/cli-linux-arm64": "1.4.0-rc.1",
35
- "@reasonix/cli-linux-x64": "1.4.0-rc.1",
36
- "@reasonix/cli-win32-arm64": "1.4.0-rc.1",
37
- "@reasonix/cli-win32-x64": "1.4.0-rc.1"
32
+ "@reasonix/cli-darwin-arm64": "1.6.0-rc.1",
33
+ "@reasonix/cli-darwin-x64": "1.6.0-rc.1",
34
+ "@reasonix/cli-linux-arm64": "1.6.0-rc.1",
35
+ "@reasonix/cli-linux-x64": "1.6.0-rc.1",
36
+ "@reasonix/cli-win32-arm64": "1.6.0-rc.1",
37
+ "@reasonix/cli-win32-x64": "1.6.0-rc.1"
38
38
  }
39
39
  }