fluxy-bot 0.1.35 → 0.1.38

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.38",
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
 
@@ -47,7 +47,7 @@ const DEFAULT_INSTRUCTIONS = `# INSTRUCTIONS.md — Operating Rules (LOCKED)
47
47
 
48
48
  ## Codebase editing
49
49
  - The full app source lives at ~/.fluxy/app/. You have full freedom to edit any file.
50
- - Backend changes (worker/, shared/) auto-reload via tsx watch. No restart needed.
50
+ - Backend changes (worker/, shared/) auto-reload via watch mode. No restart needed.
51
51
  - Frontend changes (client/src/) require running \`cd ~/.fluxy/app && npx vite build\` then tell the user to refresh.
52
52
  - Environment variables go in ~/.fluxy/.env (one KEY=value per line). They are loaded on worker startup and available via process.env. After adding a new key, the worker auto-restarts when you save your backend code change.
53
53
  - **Adding a feature that needs frontend + backend + env:**