nex-code 0.5.6 → 0.5.8
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 +24 -1
- package/dist/background-worker.js +1408 -0
- package/dist/benchmark.js +401 -384
- package/dist/nex-code.js +522 -505
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<img src="https://img.shields.io/badge/Ollama_Cloud-supported-brightgreen.svg" alt="Ollama Cloud: supported">
|
|
23
23
|
<img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg" alt="Node >= 18">
|
|
24
24
|
<img src="https://img.shields.io/badge/dependencies-2-green.svg" alt="Dependencies: 2">
|
|
25
|
-
<img src="https://img.shields.io/badge/tests-
|
|
25
|
+
<img src="https://img.shields.io/badge/tests-3929-blue.svg" alt="Tests: 3920">
|
|
26
26
|
<img src="https://img.shields.io/badge/VS_Code-extension-007ACC.svg" alt="VS Code extension">
|
|
27
27
|
</p>
|
|
28
28
|
|
|
@@ -140,6 +140,14 @@ DEFAULT_PROVIDER=ollama
|
|
|
140
140
|
DEFAULT_MODEL=devstral-2:123b
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
+
**Env file precedence.** nex-code loads `.env` from three places in this order:
|
|
144
|
+
|
|
145
|
+
1. Install directory `.env` — non-override, fills blanks only
|
|
146
|
+
2. `~/.nex-code/.env` — **override**, wins over ambient `process.env`
|
|
147
|
+
3. Current working directory `.env` — non-override, cannot clobber the global config
|
|
148
|
+
|
|
149
|
+
`~/.nex-code/.env` is the authoritative location for long-lived config like `OLLAMA_API_KEY`. The `override:true` on that file exists so that a rotated key written there takes effect on the next `nex-code` launch, even when nex-code is spawned by a long-running parent process (systemd daemon, supervisor agent, test runner) whose own environment was captured earlier and is now stale. If you rotate an API key, update `~/.nex-code/.env` **and** restart any long-running daemon that spawns nex-code — the `override:true` fixes subprocess launches but cannot refresh the parent's own captured `process.env`.
|
|
150
|
+
|
|
143
151
|
**Install from source:**
|
|
144
152
|
|
|
145
153
|
```bash
|
|
@@ -291,6 +299,21 @@ Multi-goal prompts auto-decompose into parallel sub-agents. Up to 5 agents run s
|
|
|
291
299
|
nex-code --task "fix type errors in src/, add JSDoc to utils/, update CHANGELOG"
|
|
292
300
|
```
|
|
293
301
|
|
|
302
|
+
### Background Agents
|
|
303
|
+
|
|
304
|
+
Sub-agents can run non-blocking in isolated forked processes. The main agent continues working while background workers complete, then results are automatically injected into the conversation.
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
# The model decides when to use background:true — no extra syntax needed.
|
|
308
|
+
# Example: the model might run the linter in background while explaining code.
|
|
309
|
+
spawn_agents([
|
|
310
|
+
{ task: "run the linter and report errors", background: true },
|
|
311
|
+
{ task: "explain the auth module" } ← main agent answers this immediately
|
|
312
|
+
])
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Background agents are shown in the spinner: `● Thinking [1 bg agent running]`. Results appear as `✓ Background agent done: …` when workers finish.
|
|
316
|
+
|
|
294
317
|
### Autoresearch
|
|
295
318
|
|
|
296
319
|
Autonomous optimization loops: edit -> experiment -> keep/revert, on a dedicated branch.
|