@mclean-capital/neura 2.0.0 → 2.1.0

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 CHANGED
@@ -16,6 +16,34 @@ This fetches the CLI **plus** the bundled core service and its native dependenci
16
16
 
17
17
  Requires **Node.js >= 22**.
18
18
 
19
+ ### Supported platforms
20
+
21
+ | Platform | Supported |
22
+ | ----------------------------------- | :-------: |
23
+ | macOS — Apple Silicon (M1/M2/M3/M4) | Yes |
24
+ | macOS — Intel (x64) | **No** |
25
+ | Windows — x64 / arm64 | Yes |
26
+ | Linux — x64 / arm64 | Yes |
27
+
28
+ **Intel Macs are not supported.** Neura's wake-word detector runs on
29
+ `onnxruntime-node`, and upstream dropped Intel Mac (`darwin/x64`) binaries
30
+ starting with version 1.24. Because voice is a required feature — not an
31
+ optional one — `npm install -g @mclean-capital/neura` will appear to
32
+ succeed but core will crash at startup with
33
+ `Cannot find module '../bin/napi-v6/darwin/x64/onnxruntime_binding.node'`.
34
+
35
+ If you're on an Apple Silicon Mac but see the `darwin/x64` error, you've
36
+ installed the Intel build of Node under Rosetta. Reinstall Node as arm64:
37
+
38
+ ```bash
39
+ nvm uninstall <version>
40
+ arch -arm64 nvm install <version>
41
+ ```
42
+
43
+ For true Intel Macs, there's no workaround short of self-building against
44
+ an older onnxruntime-node — we recommend running Neura on a supported
45
+ machine instead.
46
+
19
47
  ## Quick start
20
48
 
21
49
  ```bash
@@ -26,7 +54,21 @@ neura listen # voice chat (mic + speaker, wake-word ready)
26
54
  neura chat # text chat from your terminal
27
55
  ```
28
56
 
29
- After `neura install` completes, core runs as a background OS service (launchd on macOS, systemd on Linux). Say your wake word — by default **"jarvis"** — and Neura activates a voice session. Stop talking for 5 minutes and it drops back to passive listening.
57
+ After `neura install` completes, core runs as a background OS service launchd on macOS, systemd on Linux, a Scheduled Task (or Startup folder shim as fallback) on Windows. Say your wake word — by default **"jarvis"** — and Neura activates a voice session. Stop talking for 5 minutes and it drops back to passive listening.
58
+
59
+ ### Windows notes
60
+
61
+ Windows doesn't have a clean "run as background service" path for a voice-first assistant. A proper Windows Service (via `sc.exe`, nssm, or WinSW) runs in **Session 0**, which is isolated from every interactive user session and cannot access the user's microphone or audio devices — a hard blocker for wake-word detection. So on Windows we use a per-user **Scheduled Task** instead, registered by `schtasks.exe` with `/SC ONLOGON /RL LIMITED`. No UAC prompt, no admin rights, no bundled binaries.
62
+
63
+ If `schtasks /Create` refuses (some corporate / GPO-locked Windows configurations require elevation even for user-level tasks), `neura install` transparently falls back to a `neura-core.cmd` launcher in `%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\`. The core still starts on next logon — `neura install` will tell you which path was taken so you know what to expect.
64
+
65
+ Trade-offs you should know about on Windows:
66
+
67
+ - **The core only runs while you're logged in.** When you log out, it stops; when you log back in, Windows starts it again. There's no pre-login boot. If you need 24/7 availability, use macOS or Linux.
68
+ - **Status telemetry is thinner** than a real service. `neura status` reports up/down by pid, but there's no Windows event-log integration or automatic crash-restart policy beyond "start fresh on next logon".
69
+ - **The Task Scheduler path is manageable from the GUI.** Open Task Scheduler and look for `neura-core` under the top-level Task Scheduler Library. If you took the Startup folder fallback, the shim is at the path above — delete the file to disable.
70
+
71
+ `neura config set` works normally on Windows. The launcher shim only exports `NEURA_HOME`, so the core re-reads `config.json` on every restart — same behavior as macOS and Linux. Changes take effect on the next `neura restart` without needing `neura install`.
30
72
 
31
73
  ## Update
32
74
 
@@ -50558,7 +50558,7 @@ var Logger = class _Logger {
50558
50558
  };
50559
50559
 
50560
50560
  // src/server/lifecycle.ts
50561
- import { existsSync as existsSync3, readFileSync as readFileSync3, rmSync, unlinkSync } from "fs";
50561
+ import { existsSync as existsSync3, readFileSync as readFileSync3, rmSync, unlinkSync, writeFileSync as writeFileSync2 } from "fs";
50562
50562
  import { dirname as dirname2, join as join2 } from "path";
50563
50563
  import { fileURLToPath } from "url";
50564
50564
 
@@ -69098,6 +69098,23 @@ async function initServices() {
69098
69098
  if (config.xaiApiKey && !process.env.XAI_API_KEY) process.env.XAI_API_KEY = config.xaiApiKey;
69099
69099
  if (config.googleApiKey && !process.env.GOOGLE_API_KEY)
69100
69100
  process.env.GOOGLE_API_KEY = config.googleApiKey;
69101
+ if (process.platform === "win32") {
69102
+ const corePidFile = join2(config.neuraHome, "neura-core.pid");
69103
+ try {
69104
+ writeFileSync2(corePidFile, String(process.pid));
69105
+ const cleanup = () => {
69106
+ try {
69107
+ unlinkSync(corePidFile);
69108
+ } catch {
69109
+ }
69110
+ };
69111
+ process.on("exit", cleanup);
69112
+ process.on("SIGINT", cleanup);
69113
+ process.on("SIGTERM", cleanup);
69114
+ } catch (err) {
69115
+ log6.warn("failed to write neura-core.pid", { err: String(err) });
69116
+ }
69117
+ }
69101
69118
  let store = null;
69102
69119
  const backupPath = join2(config.neuraHome, "memory-backup.json");
69103
69120
  if (config.pgDataPath) {