@nexus-cortex/cli 4.34.5 → 4.34.7

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/bin/cortex.js +11 -1
  2. package/package.json +2 -2
package/bin/cortex.js CHANGED
@@ -301,7 +301,17 @@ async function startServer() {
301
301
  }
302
302
  serverProcess = spawn('node', serverArgs, {
303
303
  stdio: ['ignore', 'pipe', 'pipe'],
304
- env: { ...process.env, PORT: BASE_PORT },
304
+ // Run the server in — and treat as project root — the directory cortex was invoked
305
+ // from, so `cd foo && cortex "..."` operates on `foo` (not the home dir or a stale
306
+ // PROJECT_PATH from the global ~/.cortex/.env). An explicitly-exported PROJECT_PATH /
307
+ // PROJECT_ROOT still wins (e.g. the autoresearch container sets one deliberately).
308
+ cwd: process.cwd(),
309
+ env: {
310
+ ...process.env,
311
+ PORT: BASE_PORT,
312
+ PROJECT_PATH: process.env.PROJECT_PATH || process.cwd(),
313
+ PROJECT_ROOT: process.env.PROJECT_ROOT || process.cwd(),
314
+ },
305
315
  detached: true,
306
316
  });
307
317
  serverProcess.unref();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-cortex/cli",
3
- "version": "4.34.5",
3
+ "version": "4.34.7",
4
4
  "description": "Nexus Cortex CLI - Terminal interface for multi-provider LLM orchestration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  "prepack": "node ../../scripts/copy-pkg-cortex-scaffold.mjs"
20
20
  },
21
21
  "dependencies": {
22
- "@nexus-cortex/core": "^4.34.5",
22
+ "@nexus-cortex/core": "^4.34.7",
23
23
  "chalk": "^4.1.2",
24
24
  "cli-spinners": "^2.9.0",
25
25
  "commander": "^11.0.0",