fluxy-bot 0.1.35 → 0.1.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxy-bot",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "Self-hosted AI bot — run your own AI assistant from anywhere",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -14,12 +14,19 @@ export function getWorkerPort(basePort: number): number {
14
14
  export function spawnWorker(port: number): ChildProcess {
15
15
  const workerPath = path.join(PKG_DIR, 'worker', 'index.ts');
16
16
 
17
- // Use tsx watch for hot-reload agent edits to worker/shared code
18
- // auto-restart the worker without manual intervention.
19
- // tsx watch keeps the parent process alive and internally manages restarts.
20
- const tsxBin = path.join(PKG_DIR, 'node_modules', '.bin', 'tsx');
21
-
22
- child = spawn(tsxBin, ['watch', workerPath], {
17
+ // --watch: Node built-in file watcher (stable since Node 22).
18
+ // Keeps the parent process alive and internally restarts
19
+ // the worker when imported files change.
20
+ // --watch-path: scope watching to worker/ and shared/ so frontend
21
+ // edits don't cause unnecessary restarts.
22
+ child = spawn(process.execPath, [
23
+ '--watch',
24
+ '--watch-preserve-output',
25
+ `--watch-path=${path.join(PKG_DIR, 'worker')}`,
26
+ `--watch-path=${path.join(PKG_DIR, 'shared')}`,
27
+ '--import', 'tsx/esm',
28
+ workerPath,
29
+ ], {
23
30
  cwd: PKG_DIR,
24
31
  stdio: ['ignore', 'pipe', 'pipe'],
25
32
  env: { ...process.env, WORKER_PORT: String(port) },
@@ -46,7 +53,7 @@ export function spawnWorker(port: number): ChildProcess {
46
53
  }
47
54
  });
48
55
 
49
- log.ok(`Worker spawned on port ${port} (tsx watch)`);
56
+ log.ok(`Worker spawned on port ${port} (watch mode)`);
50
57
  return child;
51
58
  }
52
59