nex-code 0.3.11 → 0.3.13

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 (3) hide show
  1. package/README.md +13 -8
  2. package/dist/nex-code.js +203 -185
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -328,11 +328,12 @@ Automatic bracketed paste mode: pasting multi-line text into the prompt is detec
328
328
 
329
329
  ### Ctrl+C Cancellation
330
330
  Pressing Ctrl+C during a running request immediately cancels the active HTTP stream and returns to the prompt:
331
- - An `AbortController` signal flows from the SIGINT handler through the agent loop to the provider's HTTP request
331
+ - An `AbortController` signal flows from the readline SIGINT handler through the agent loop to the provider's HTTP request
332
332
  - All providers (Ollama, OpenAI, Anthropic, Gemini, local) destroy the response stream on abort
333
333
  - No EPIPE errors after cancellation (stdout writes are EPIPE-guarded)
334
- - 2x Ctrl+C during processing force-exits the process
334
+ - During processing: first Ctrl+C aborts the task and returns to prompt; second Ctrl+C force-exits
335
335
  - At the idle prompt: first Ctrl+C shows `(Press Ctrl+C again to exit)`, second Ctrl+C exits (hint resets after 2 s)
336
+ - readline intercepts Ctrl+C on TTY (`rl.on('SIGINT')`) to prevent readline close → `process.exit(0)` race
336
337
 
337
338
  ### Diff Preview
338
339
  Every file change is shown in a diff-style format before being applied:
@@ -384,13 +385,14 @@ Persistent project memory that survives across sessions:
384
385
  Also loads `NEX.md` from project root for project-level instructions.
385
386
 
386
387
  ### Plan Mode
387
- Analyze before executing — the agent creates a plan, you review and approve:
388
+ Analyze before executing — the agent explores the codebase with read-only tools, produces a structured plan, then you approve before any changes are made:
388
389
  ```
389
- /plan refactor the auth module
390
- /plan status
391
- /plan approve
392
- /auto semi-auto # set autonomy level
390
+ /plan refactor the auth module # enter plan mode
391
+ /plan status # show plan progress
392
+ /plan approve # approve and exit plan mode (all tools re-enabled)
393
+ /auto semi-auto # set autonomy level
393
394
  ```
395
+ Plan mode is **hard-enforced**: only read-only tools (`read_file`, `list_directory`, `search_files`, `glob`, `grep`, `web_search`, `web_fetch`, `git_status`, `git_diff`, `git_log`, `git_show`, `ask_user`) are available. Any attempt to call a write tool is blocked at the API level — the LLM cannot make changes even if it tries. The plan text is saved to `.nex/plans/current-plan.md` for review.
394
396
 
395
397
  ### Undo / Redo
396
398
  In-session undo/redo for all file changes (write, edit, patch):
@@ -515,10 +517,13 @@ Models are auto-classified, or override per-model in `.nex/config.json`:
515
517
  "deepseek-r1": "essential",
516
518
  "local:*": "essential",
517
519
  "qwen3-coder": "full"
518
- }
520
+ },
521
+ "maxIterations": 100
519
522
  }
520
523
  ```
521
524
 
525
+ `maxIterations` sets the agentic loop limit project-wide (default: 50). The `--max-turns <n>` CLI flag overrides it per run.
526
+
522
527
  Tiers are also used by sub-agent routing — when a sub-agent auto-selects a model, its tool set is filtered to match that model's tier.
523
528
 
524
529
  ---