fluxy-bot 0.8.10 → 0.9.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 +53 -84
- package/bin/cli.js +1717 -6
- package/components.json +18 -18
- package/package.json +98 -109
- package/postcss.config.js +3 -3
- package/scripts/install.ps1 +1 -1
- package/scripts/install.sh +1 -1
- package/scripts/postinstall.js +47 -58
- package/shared/ai.ts +118 -202
- package/shared/config.ts +37 -39
- package/shared/logger.ts +6 -14
- package/shared/paths.ts +10 -16
- package/shared/relay.ts +89 -98
- package/supervisor/backend.ts +77 -89
- package/supervisor/chat/ARCHITECTURE.md +13 -14
- package/supervisor/chat/OnboardWizard.tsx +2194 -3419
- package/supervisor/chat/fluxy-main.tsx +495 -633
- package/supervisor/chat/fluxy.html +24 -36
- package/supervisor/chat/onboard-main.tsx +8 -8
- package/supervisor/chat/onboard.html +10 -13
- package/supervisor/chat/src/components/Chat/AudioBubble.tsx +94 -108
- package/supervisor/chat/src/components/Chat/ChatView.tsx +14 -36
- package/supervisor/chat/src/components/Chat/ImageLightbox.tsx +71 -89
- package/supervisor/chat/src/components/Chat/InputBar.tsx +498 -728
- package/supervisor/chat/src/components/Chat/MessageBubble.tsx +154 -246
- package/supervisor/chat/src/components/Chat/MessageList.tsx +114 -138
- package/supervisor/chat/src/components/Chat/TypingIndicator.tsx +38 -50
- package/supervisor/chat/src/components/LoginScreen.tsx +245 -296
- package/supervisor/chat/src/hooks/useChat.ts +210 -259
- package/supervisor/chat/src/hooks/useFluxyChat.ts +232 -322
- package/supervisor/chat/src/hooks/useSpeechRecognition.ts +126 -148
- package/supervisor/chat/src/lib/auth.ts +20 -23
- package/supervisor/chat/src/lib/ws-client.ts +113 -125
- package/supervisor/chat/src/styles/globals.css +76 -85
- package/supervisor/file-saver.ts +39 -52
- package/supervisor/fluxy-agent.ts +213 -292
- package/supervisor/index.ts +895 -1263
- package/supervisor/scheduler.ts +237 -299
- package/supervisor/tunnel.ts +113 -167
- package/supervisor/vite-dev.ts +51 -61
- package/supervisor/widget.js +135 -147
- package/supervisor/worker.ts +45 -49
- package/tsconfig.json +18 -24
- package/vite.config.ts +48 -55
- package/vite.fluxy.config.ts +34 -34
- package/worker/claude-auth.ts +202 -265
- package/worker/codex-auth.ts +144 -181
- package/worker/db.ts +63 -191
- package/worker/index.ts +601 -842
- package/workspace/MYSELF.md +1 -1
- package/workspace/PULSE.json +6 -6
- package/workspace/backend/index.ts +16 -19
- package/workspace/client/index.html +47 -60
- package/workspace/client/public/manifest.json +21 -21
- package/workspace/client/public/sw.js +29 -31
- package/workspace/client/src/App.tsx +91 -136
- package/workspace/client/src/components/Dashboard/DashboardPage.tsx +68 -72
- package/workspace/client/src/components/ErrorBoundary.tsx +11 -11
- package/workspace/client/src/components/Layout/DashboardLayout.tsx +35 -35
- package/workspace/client/src/components/Layout/Footer.tsx +12 -12
- package/workspace/client/src/components/Layout/MobileNav.tsx +23 -23
- package/workspace/client/src/components/Layout/Sidebar.tsx +81 -81
- package/workspace/client/src/components/ui/avatar.tsx +85 -85
- package/workspace/client/src/components/ui/badge.tsx +40 -41
- package/workspace/client/src/components/ui/button.tsx +56 -57
- package/workspace/client/src/components/ui/card.tsx +75 -75
- package/workspace/client/src/components/ui/dialog.tsx +114 -117
- package/workspace/client/src/components/ui/dropdown-menu.tsx +191 -199
- package/workspace/client/src/components/ui/input.tsx +17 -17
- package/workspace/client/src/components/ui/scroll-area.tsx +47 -47
- package/workspace/client/src/components/ui/select.tsx +145 -151
- package/workspace/client/src/components/ui/separator.tsx +21 -21
- package/workspace/client/src/components/ui/sheet.tsx +102 -102
- package/workspace/client/src/components/ui/skeleton.tsx +10 -10
- package/workspace/client/src/components/ui/switch.tsx +26 -26
- package/workspace/client/src/components/ui/tabs.tsx +69 -69
- package/workspace/client/src/components/ui/textarea.tsx +14 -14
- package/workspace/client/src/components/ui/tooltip.tsx +37 -37
- package/workspace/client/src/lib/utils.ts +1 -1
- package/workspace/client/src/main.tsx +3 -3
- package/workspace/client/src/styles/globals.css +76 -85
- package/workspace/skills/code-reviewer/.claude-plugin/plugin.json +3 -3
- package/workspace/skills/code-reviewer/skills/code-reviewer/SKILL.md +0 -6
- package/workspace/skills/daily-standup/.claude-plugin/plugin.json +3 -3
- package/workspace/skills/daily-standup/skills/daily-standup/SKILL.md +0 -7
- package/workspace/skills/workspace-helper/.claude-plugin/plugin.json +3 -3
- package/workspace/skills/workspace-helper/skills/workspace-helper/SKILL.md +0 -2
- package/bin/cli.backup.js +0 -2138
- package/cli/commands/daemon.ts +0 -42
- package/cli/commands/init.ts +0 -173
- package/cli/commands/start.ts +0 -113
- package/cli/commands/tunnel.temp.ts +0 -206
- package/cli/commands/tunnel.ts +0 -227
- package/cli/commands/update.ts +0 -163
- package/cli/core/base-adapter.ts +0 -156
- package/cli/core/cloudflared.ts +0 -113
- package/cli/core/config.ts +0 -73
- package/cli/core/os-detector.ts +0 -43
- package/cli/core/server.ts +0 -115
- package/cli/core/types.ts +0 -15
- package/cli/index.ts +0 -72
- package/cli/platforms/darwin.ts +0 -146
- package/cli/platforms/index.ts +0 -21
- package/cli/platforms/linux.ts +0 -156
- package/cli/platforms/win32.ts +0 -34
- package/cli/utils/ui.ts +0 -37
package/README.md
CHANGED
|
@@ -11,8 +11,8 @@ Fluxy is three separate codebases working together:
|
|
|
11
11
|
1. **Fluxy Bot** (this repo) -- runs on the user's machine. Supervisor process, worker API, workspace app, chat UI.
|
|
12
12
|
2. **Fluxy Relay** (separate server at `api.fluxy.bot`) -- optional cloud service that maps `username.fluxy.bot` to the user's Cloudflare tunnel. Routes HTTP and WebSocket traffic. Only used with Quick Tunnels.
|
|
13
13
|
3. **Cloudflare Tunnel** -- exposes `localhost:3000` to the internet. Two modes:
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
- **Quick Tunnel** -- zero-config, no account needed, random `*.trycloudflare.com` URL that changes on restart. Optionally paired with the relay for a permanent domain.
|
|
15
|
+
- **Named Tunnel** -- persistent URL with the user's own domain. Requires a Cloudflare account and DNS setup. No relay needed.
|
|
16
16
|
|
|
17
17
|
The user chooses their tunnel mode during `fluxy init` via an interactive selector.
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ The user chooses their tunnel mode during `fluxy init` via an interactive select
|
|
|
22
22
|
|
|
23
23
|
When `fluxy start` runs, the CLI spawns a single supervisor process. The supervisor then spawns child processes and manages their lifecycle:
|
|
24
24
|
|
|
25
|
-
```
|
|
25
|
+
```
|
|
26
26
|
CLI (bin/cli.js)
|
|
27
27
|
|
|
|
28
28
|
spawns
|
|
@@ -46,22 +46,20 @@ All child processes auto-restart up to 3 times on crash (reset counter if alive
|
|
|
46
46
|
|
|
47
47
|
The supervisor is a raw `http.createServer` (no Express) that routes every incoming request:
|
|
48
48
|
|
|
49
|
-
| Path
|
|
50
|
-
|
|
51
|
-
| `/fluxy/widget.js`
|
|
52
|
-
| `/sw.js`, `/fluxy/sw.js` | Embedded service worker
|
|
53
|
-
| `/app/api/*`
|
|
54
|
-
| `/api/*`
|
|
55
|
-
| `/fluxy/*`
|
|
56
|
-
| Everything else
|
|
49
|
+
| Path | Target | Notes |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `/fluxy/widget.js` | Direct file serve | Chat bubble script, no-cache |
|
|
52
|
+
| `/sw.js`, `/fluxy/sw.js` | Embedded service worker | PWA + push notification support |
|
|
53
|
+
| `/app/api/*` | Backend (port 3004) | Strips `/app/api` prefix before forwarding |
|
|
54
|
+
| `/api/*` | Worker (port 3001) | Auth middleware checks Bearer token on mutations |
|
|
55
|
+
| `/fluxy/*` | Static files from `dist-fluxy/` | Pre-built chat SPA. HTML: no-cache. Hashed assets: immutable, 1yr max-age |
|
|
56
|
+
| Everything else | Vite dev server (port 3002) | Dashboard + HMR |
|
|
57
57
|
|
|
58
58
|
WebSocket upgrades:
|
|
59
|
-
|
|
60
59
|
- `/fluxy/ws` -- Fluxy chat. Auth-gated via query param token. Handled by an in-process `WebSocketServer`.
|
|
61
60
|
- Everything else -- proxied to Vite dev server for HMR.
|
|
62
61
|
|
|
63
62
|
The supervisor also:
|
|
64
|
-
|
|
65
63
|
- Manages the Cloudflare tunnel lifecycle (start, stop, health watchdog every 30s) for both quick and named tunnels
|
|
66
64
|
- Registers with the relay and maintains heartbeats (quick tunnel mode only)
|
|
67
65
|
- Runs the Claude Agent SDK when users send chat messages
|
|
@@ -87,7 +85,6 @@ Express server on port 3001. Owns the database and all platform API logic. The s
|
|
|
87
85
|
**Database:** `~/.fluxy/memory.db` (SQLite via better-sqlite3, WAL mode)
|
|
88
86
|
|
|
89
87
|
Tables:
|
|
90
|
-
|
|
91
88
|
- `conversations` -- chat sessions (id, title, model, session_id, timestamps)
|
|
92
89
|
- `messages` -- individual messages (role, content, tokens_in, tokens_out, model, audio_data, attachments as JSON)
|
|
93
90
|
- `settings` -- key-value store (onboard config, provider, model, portal credentials, etc.)
|
|
@@ -97,7 +94,6 @@ Tables:
|
|
|
97
94
|
Auto-migrations add missing columns on startup (session_id, audio_data, attachments).
|
|
98
95
|
|
|
99
96
|
Key endpoints:
|
|
100
|
-
|
|
101
97
|
- `/api/conversations` -- CRUD for conversations and messages (paginated with `before` cursor)
|
|
102
98
|
- `/api/settings` -- key-value read/write
|
|
103
99
|
- `/api/onboard` -- saves wizard configuration (provider, model, portal password, whisper key, names)
|
|
@@ -122,7 +118,7 @@ Portal passwords are hashed with scrypt (random 16-byte salt, stored as `salt:ha
|
|
|
122
118
|
|
|
123
119
|
The workspace is a full-stack app template that Claude can freely modify. It lives at `workspace/` in the project and gets copied to `~/.fluxy/workspace/` on first install.
|
|
124
120
|
|
|
125
|
-
```
|
|
121
|
+
```
|
|
126
122
|
workspace/
|
|
127
123
|
client/ React + Vite + Tailwind dashboard
|
|
128
124
|
src/App.tsx Main app entry (error boundary, rebuild overlay, onboard iframe)
|
|
@@ -154,12 +150,12 @@ The workspace is the only directory Claude is allowed to modify. The system prom
|
|
|
154
150
|
|
|
155
151
|
The agent has no persistent memory between sessions except through files in the workspace:
|
|
156
152
|
|
|
157
|
-
| File
|
|
158
|
-
|
|
159
|
-
| `MYSELF.md`
|
|
160
|
-
| `MYHUMAN.md`
|
|
161
|
-
| `MEMORY.md`
|
|
162
|
-
| `memory/YYYY-MM-DD.md` | Daily notes. Raw, append-only log of events and observations for that day.
|
|
153
|
+
| File | Purpose |
|
|
154
|
+
|---|---|
|
|
155
|
+
| `MYSELF.md` | Agent identity, personality, operating manual. The agent's self-authored description of who it is. |
|
|
156
|
+
| `MYHUMAN.md` | Profile of the user -- preferences, context, everything the agent has learned about them. |
|
|
157
|
+
| `MEMORY.md` | Long-term curated knowledge. Distilled from daily notes into durable insights. |
|
|
158
|
+
| `memory/YYYY-MM-DD.md` | Daily notes. Raw, append-only log of events and observations for that day. |
|
|
163
159
|
|
|
164
160
|
All four are injected into the system prompt at query time by `fluxy-agent.ts`. The agent reads and writes these files itself -- there's no external process managing them.
|
|
165
161
|
|
|
@@ -174,11 +170,7 @@ The scheduler runs in-process within the supervisor, checking every 60 seconds.
|
|
|
174
170
|
Periodic wake-ups configured in `workspace/PULSE.json`:
|
|
175
171
|
|
|
176
172
|
```json
|
|
177
|
-
{
|
|
178
|
-
"enabled": true,
|
|
179
|
-
"intervalMinutes": 30,
|
|
180
|
-
"quietHours": { "start": "23:00", "end": "07:00" }
|
|
181
|
-
}
|
|
173
|
+
{ "enabled": true, "intervalMinutes": 30, "quietHours": { "start": "23:00", "end": "07:00" } }
|
|
182
174
|
```
|
|
183
175
|
|
|
184
176
|
When a pulse fires, the scheduler triggers the agent with a system-generated prompt. The agent can check in, review notes, or take proactive action. Quiet hours suppress pulses.
|
|
@@ -188,21 +180,12 @@ When a pulse fires, the scheduler triggers the agent with a system-generated pro
|
|
|
188
180
|
Scheduled tasks configured in `workspace/CRONS.json`:
|
|
189
181
|
|
|
190
182
|
```json
|
|
191
|
-
[
|
|
192
|
-
{
|
|
193
|
-
"id": "...",
|
|
194
|
-
"schedule": "0 9 * * *",
|
|
195
|
-
"task": "Check the weather",
|
|
196
|
-
"enabled": true,
|
|
197
|
-
"oneShot": false
|
|
198
|
-
}
|
|
199
|
-
]
|
|
183
|
+
[{ "id": "...", "schedule": "0 9 * * *", "task": "Check the weather", "enabled": true, "oneShot": false }]
|
|
200
184
|
```
|
|
201
185
|
|
|
202
186
|
Uses `cron-parser` to match cron expressions against the current minute. One-shot crons are auto-removed after firing.
|
|
203
187
|
|
|
204
188
|
When a cron or pulse fires:
|
|
205
|
-
|
|
206
189
|
1. The scheduler calls `startFluxyAgentQuery` with the task
|
|
207
190
|
2. It extracts `<Message>` blocks from the agent's response
|
|
208
191
|
3. It sends push notifications for those messages
|
|
@@ -237,14 +220,12 @@ If Claude introduces a bug that crashes the dashboard, the chat stays alive. The
|
|
|
237
220
|
### Widget (supervisor/widget.js)
|
|
238
221
|
|
|
239
222
|
Vanilla JS that injects:
|
|
240
|
-
|
|
241
223
|
- A floating video bubble (60px, bottom-right corner, with Safari fallback image)
|
|
242
224
|
- A slide-out panel (480px wide, full screen on mobile) containing the iframe at `/fluxy/`
|
|
243
225
|
- A backdrop for dismissal
|
|
244
226
|
- Keyboard dismiss (Escape key)
|
|
245
227
|
|
|
246
228
|
Communicates with the iframe via `postMessage`:
|
|
247
|
-
|
|
248
229
|
- `fluxy:close` -- iframe requests panel close
|
|
249
230
|
- `fluxy:install-app` -- iframe requests PWA install prompt
|
|
250
231
|
- `fluxy:show-ios-install` -- iframe requests iOS-specific install modal
|
|
@@ -259,7 +240,6 @@ Panel state persisted in localStorage (`fluxy_widget_open`) to survive HMR reloa
|
|
|
259
240
|
### Chat Protocol (WebSocket)
|
|
260
241
|
|
|
261
242
|
Client -> Server:
|
|
262
|
-
|
|
263
243
|
- `user:message` -- `{ content, conversationId?, attachments? }` where attachments are `{ type, name, mediaType, data(base64) }`
|
|
264
244
|
- `user:stop` -- abort current agent query
|
|
265
245
|
- `user:clear-context` -- clear conversation and agent session
|
|
@@ -267,7 +247,6 @@ Client -> Server:
|
|
|
267
247
|
- `settings:save` -- `{ ...settings }` (bypasses relay POST limitation)
|
|
268
248
|
|
|
269
249
|
Server -> Client:
|
|
270
|
-
|
|
271
250
|
- `bot:typing` -- agent started
|
|
272
251
|
- `bot:token` -- streamed text chunk
|
|
273
252
|
- `bot:tool` -- tool invocation (name, status)
|
|
@@ -287,7 +266,6 @@ Auto-reconnects with exponential backoff (1s -> 8s cap). Queues messages during
|
|
|
287
266
|
### PWA Support
|
|
288
267
|
|
|
289
268
|
The chat SPA handles:
|
|
290
|
-
|
|
291
269
|
- `beforeinstallprompt` for Android PWA install
|
|
292
270
|
- iOS-specific install modal with step-by-step instructions
|
|
293
271
|
- Standalone mode detection
|
|
@@ -331,7 +309,7 @@ The user selects a tunnel mode during `fluxy init`. The mode is stored in `~/.fl
|
|
|
331
309
|
|
|
332
310
|
Zero configuration. No Cloudflare account needed.
|
|
333
311
|
|
|
334
|
-
```
|
|
312
|
+
```
|
|
335
313
|
Phone browser
|
|
336
314
|
|
|
|
337
315
|
| https://bruno.fluxy.bot (via relay, optional)
|
|
@@ -356,7 +334,7 @@ Supervisor User's machine
|
|
|
356
334
|
|
|
357
335
|
Persistent URL with the user's own domain. Requires a Cloudflare account + domain.
|
|
358
336
|
|
|
359
|
-
```
|
|
337
|
+
```
|
|
360
338
|
Phone browser
|
|
361
339
|
|
|
|
362
340
|
| https://bot.mydomain.com
|
|
@@ -387,7 +365,6 @@ Supervisor User's machine
|
|
|
387
365
|
Node.js/Express + http-proxy + MongoDB. Hosted on Railway. Only used when the user opts into Quick Tunnel mode and registers a handle.
|
|
388
366
|
|
|
389
367
|
**Registration flow:**
|
|
390
|
-
|
|
391
368
|
1. User picks a username during onboarding
|
|
392
369
|
2. Bot calls `POST /api/register` with username + tier
|
|
393
370
|
3. Relay stores tokenHash (SHA-256) in MongoDB, returns raw token + relay URL
|
|
@@ -396,7 +373,6 @@ Node.js/Express + http-proxy + MongoDB. Hosted on Railway. Only used when the us
|
|
|
396
373
|
6. Relay marks bot online, starts accepting proxied traffic
|
|
397
374
|
|
|
398
375
|
**Request proxying:**
|
|
399
|
-
|
|
400
376
|
1. Request hits `bruno.fluxy.bot`
|
|
401
377
|
2. Subdomain middleware extracts username + tier from hostname
|
|
402
378
|
3. MongoDB lookup returns the bot's tunnel URL
|
|
@@ -404,18 +380,16 @@ Node.js/Express + http-proxy + MongoDB. Hosted on Railway. Only used when the us
|
|
|
404
380
|
5. Response streams back to the user's browser
|
|
405
381
|
|
|
406
382
|
**Presence:**
|
|
407
|
-
|
|
408
383
|
- Bot sends `POST /api/heartbeat` every 30 seconds with its tunnel URL
|
|
409
384
|
- Relay considers a bot stale if no heartbeat in 120 seconds
|
|
410
385
|
- Stale bots get a 503 offline page (auto-refreshes every 15s)
|
|
411
386
|
- On graceful shutdown, bot calls `POST /api/disconnect`
|
|
412
387
|
|
|
413
388
|
**Domain tiers:**
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
|
417
|
-
|
|
|
418
|
-
| Free | `bruno.my.fluxy.bot` | `my.fluxy.bot/bruno` | Free |
|
|
389
|
+
| Tier | Subdomain | Path shortcut | Cost |
|
|
390
|
+
|---|---|---|---|
|
|
391
|
+
| Premium | `bruno.fluxy.bot` | `fluxy.bot/bruno` | $5/mo |
|
|
392
|
+
| Free | `bruno.my.fluxy.bot` | `my.fluxy.bot/bruno` | Free |
|
|
419
393
|
|
|
420
394
|
Same username can exist on both tiers independently. Compound unique index on `username + tier`.
|
|
421
395
|
|
|
@@ -451,22 +425,21 @@ Settings are saved via WebSocket (`settings:save` message) to bypass relay POST
|
|
|
451
425
|
|
|
452
426
|
The CLI is the user-facing entry point. Commands:
|
|
453
427
|
|
|
454
|
-
| Command
|
|
455
|
-
|
|
456
|
-
| `fluxy init`
|
|
457
|
-
| `fluxy start`
|
|
458
|
-
| `fluxy status` | Health check via `/api/health`, shows uptime, tunnel URL, and relay URL
|
|
459
|
-
| `fluxy update` | Downloads latest from npm registry, updates code directories, rebuilds UI, restarts daemon
|
|
460
|
-
| `fluxy tunnel` | Named tunnel management (subcommands below)
|
|
461
|
-
| `fluxy daemon` | Linux systemd management: install, start, stop, restart, status, logs, uninstall
|
|
428
|
+
| Command | Description |
|
|
429
|
+
|---|---|
|
|
430
|
+
| `fluxy init` | First-time setup: interactive tunnel mode chooser (Quick or Named), creates config, installs cloudflared, boots server, optionally installs systemd daemon |
|
|
431
|
+
| `fluxy start` | Boot the supervisor (or detect existing daemon and show status) |
|
|
432
|
+
| `fluxy status` | Health check via `/api/health`, shows uptime, tunnel URL, and relay URL |
|
|
433
|
+
| `fluxy update` | Downloads latest from npm registry, updates code directories, rebuilds UI, restarts daemon |
|
|
434
|
+
| `fluxy tunnel` | Named tunnel management (subcommands below) |
|
|
435
|
+
| `fluxy daemon` | Linux systemd management: install, start, stop, restart, status, logs, uninstall |
|
|
462
436
|
|
|
463
437
|
**`fluxy tunnel` subcommands:**
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
|
467
|
-
| `fluxy tunnel
|
|
468
|
-
| `fluxy tunnel
|
|
469
|
-
| `fluxy tunnel reset` | Switch back to quick tunnel mode |
|
|
438
|
+
| Subcommand | Description |
|
|
439
|
+
|---|---|
|
|
440
|
+
| `fluxy tunnel setup` | Interactive named tunnel setup: login to Cloudflare, create tunnel, enter domain, generate config YAML, print CNAME instructions |
|
|
441
|
+
| `fluxy tunnel status` | Show current tunnel mode and configuration |
|
|
442
|
+
| `fluxy tunnel reset` | Switch back to quick tunnel mode |
|
|
470
443
|
|
|
471
444
|
**`fluxy init` tunnel chooser:**
|
|
472
445
|
|
|
@@ -488,19 +461,15 @@ On Linux, `fluxy daemon` generates a systemd unit file that runs the supervisor
|
|
|
488
461
|
Two installation paths:
|
|
489
462
|
|
|
490
463
|
**Via curl (production):**
|
|
491
|
-
|
|
492
|
-
```shell
|
|
464
|
+
```
|
|
493
465
|
curl -fsSL https://fluxy.bot/install | sh
|
|
494
466
|
```
|
|
495
|
-
|
|
496
467
|
The install script (`scripts/install.sh`) detects OS/arch, checks for Node.js >= 18 (or bundles Node 22.14.0), downloads the npm package, extracts to `~/.fluxy/`, and adds `fluxy` to PATH.
|
|
497
468
|
|
|
498
469
|
**Via npm (development):**
|
|
499
|
-
|
|
500
|
-
```shell
|
|
470
|
+
```
|
|
501
471
|
npm install fluxy-bot
|
|
502
472
|
```
|
|
503
|
-
|
|
504
473
|
The `postinstall` script (`scripts/postinstall.js`) copies code directories to `~/.fluxy/`, runs `npm install --omit=dev` there, builds the chat UI if missing, and creates a `fluxy` symlink.
|
|
505
474
|
|
|
506
475
|
Windows: `scripts/install.ps1` (PowerShell equivalent).
|
|
@@ -509,16 +478,16 @@ Windows: `scripts/install.ps1` (PowerShell equivalent).
|
|
|
509
478
|
|
|
510
479
|
## Data Locations
|
|
511
480
|
|
|
512
|
-
| Path
|
|
513
|
-
|
|
514
|
-
| `~/.fluxy/config.json`
|
|
515
|
-
| `~/.fluxy/cloudflared-config.yml`
|
|
516
|
-
| `~/.fluxy/memory.db`
|
|
517
|
-
| `~/.fluxy/bin/cloudflared`
|
|
518
|
-
| `~/.fluxy/workspace/`
|
|
519
|
-
| `~/.codex/codedeck-auth.json`
|
|
520
|
-
| `~/.claude/.credentials.json`
|
|
521
|
-
| macOS Keychain `Claude Code-credentials` | Claude OAuth tokens (macOS, source of truth)
|
|
481
|
+
| Path | Contents |
|
|
482
|
+
|---|---|
|
|
483
|
+
| `~/.fluxy/config.json` | Port, username, AI provider, tunnel mode/config, relay token, tunnel URL |
|
|
484
|
+
| `~/.fluxy/cloudflared-config.yml` | Named tunnel config (generated by `fluxy tunnel setup`) |
|
|
485
|
+
| `~/.fluxy/memory.db` | SQLite -- conversations, messages, settings, sessions, push subscriptions |
|
|
486
|
+
| `~/.fluxy/bin/cloudflared` | Cloudflare tunnel binary |
|
|
487
|
+
| `~/.fluxy/workspace/` | User's workspace copy (client, backend, memory files, skills, config) |
|
|
488
|
+
| `~/.codex/codedeck-auth.json` | OpenAI OAuth tokens |
|
|
489
|
+
| `~/.claude/.credentials.json` | Claude OAuth tokens (Linux/Windows) |
|
|
490
|
+
| macOS Keychain `Claude Code-credentials` | Claude OAuth tokens (macOS, source of truth) |
|
|
522
491
|
|
|
523
492
|
---
|
|
524
493
|
|
|
@@ -526,7 +495,7 @@ Windows: `scripts/install.ps1` (PowerShell equivalent).
|
|
|
526
495
|
|
|
527
496
|
### Sacred (never modified by the agent)
|
|
528
497
|
|
|
529
|
-
```
|
|
498
|
+
```
|
|
530
499
|
bin/cli.js CLI entry point, startup sequence, update logic, daemon management
|
|
531
500
|
supervisor/
|
|
532
501
|
index.ts HTTP server, request routing, WebSocket handler, process orchestration
|
|
@@ -577,7 +546,7 @@ scripts/
|
|
|
577
546
|
|
|
578
547
|
### Workspace (agent-modifiable)
|
|
579
548
|
|
|
580
|
-
```
|
|
549
|
+
```
|
|
581
550
|
workspace/
|
|
582
551
|
client/
|
|
583
552
|
index.html Dashboard HTML shell, PWA manifest, widget script tag
|