fluxy-bot 0.8.9 → 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 -32
- 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 -109
- 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
|
@@ -1,125 +1,116 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import "tailwindcss";
|
|
2
2
|
|
|
3
3
|
@custom-variant dark (&:is(.dark *));
|
|
4
4
|
|
|
5
5
|
@theme inline {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
6
|
+
--color-background: #212121;
|
|
7
|
+
--color-foreground: #f5f5f5;
|
|
8
|
+
--color-card: #2a2a2a;
|
|
9
|
+
--color-card-foreground: #f5f5f5;
|
|
10
|
+
--color-popover: #2a2a2a;
|
|
11
|
+
--color-popover-foreground: #f5f5f5;
|
|
12
|
+
--color-primary: #3C8FFF;
|
|
13
|
+
--color-primary-foreground: #ffffff;
|
|
14
|
+
--color-secondary: #333333;
|
|
15
|
+
--color-secondary-foreground: #f5f5f5;
|
|
16
|
+
--color-muted: #333333;
|
|
17
|
+
--color-muted-foreground: #999999;
|
|
18
|
+
--color-accent: #333333;
|
|
19
|
+
--color-accent-foreground: #f5f5f5;
|
|
20
|
+
--color-destructive: #FD486B;
|
|
21
|
+
--color-destructive-foreground: #ffffff;
|
|
22
|
+
--color-border: #3a3a3a;
|
|
23
|
+
--color-input: #3a3a3a;
|
|
24
|
+
--color-ring: #3C8FFF;
|
|
25
|
+
--color-chart-1: #3C8FFF;
|
|
26
|
+
--color-chart-2: #FD486B;
|
|
27
|
+
--color-chart-3: #F59E0B;
|
|
28
|
+
--color-chart-4: #8B5CF6;
|
|
29
|
+
--color-chart-5: #10B981;
|
|
30
|
+
--color-sidebar: #1c1c1c;
|
|
31
|
+
--color-sidebar-foreground: #f5f5f5;
|
|
32
|
+
--color-sidebar-primary: #3C8FFF;
|
|
33
|
+
--color-sidebar-primary-foreground: #ffffff;
|
|
34
|
+
--color-sidebar-accent: #282828;
|
|
35
|
+
--color-sidebar-accent-foreground: #f5f5f5;
|
|
36
|
+
--color-sidebar-border: #3a3a3a;
|
|
37
|
+
--color-sidebar-ring: #3C8FFF;
|
|
38
|
+
--radius: 0.75rem;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
html {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
touch-action: manipulation;
|
|
43
|
+
-ms-touch-action: manipulation;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
body {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
background-color: var(--color-background);
|
|
48
|
+
color: var(--color-foreground);
|
|
49
|
+
-webkit-font-smoothing: antialiased;
|
|
50
|
+
-moz-osx-font-smoothing: grayscale;
|
|
51
|
+
overscroll-behavior: none;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
::selection {
|
|
55
|
-
|
|
55
|
+
background-color: rgba(175, 39, 227, 0.25);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
::-webkit-scrollbar {
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
::-webkit-scrollbar-
|
|
62
|
-
background: transparent;
|
|
63
|
-
}
|
|
64
|
-
::-webkit-scrollbar-thumb {
|
|
65
|
-
background: #3a3a3a;
|
|
66
|
-
border-radius: 3px;
|
|
67
|
-
}
|
|
68
|
-
::-webkit-scrollbar-thumb:hover {
|
|
69
|
-
background: #4a4a4a;
|
|
70
|
-
}
|
|
58
|
+
::-webkit-scrollbar { width: 6px; }
|
|
59
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
60
|
+
::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 3px; }
|
|
61
|
+
::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }
|
|
71
62
|
|
|
72
63
|
.text-gradient {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
64
|
+
background-clip: text;
|
|
65
|
+
-webkit-background-clip: text;
|
|
66
|
+
color: transparent;
|
|
67
|
+
-webkit-text-fill-color: transparent;
|
|
68
|
+
background-image: linear-gradient(135deg, #04D1FE, #AF27E3, #FB4072);
|
|
78
69
|
}
|
|
79
70
|
|
|
80
71
|
.bg-gradient-brand {
|
|
81
|
-
|
|
72
|
+
background-image: linear-gradient(135deg, #04D1FE, #AF27E3, #FB4072);
|
|
82
73
|
}
|
|
83
74
|
|
|
84
75
|
.glow-border {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
0 0 20px -5px rgba(175, 39, 227, 0.15);
|
|
76
|
+
box-shadow: 0 0 0 1px rgba(175, 39, 227, 0.1),
|
|
77
|
+
0 0 20px -5px rgba(175, 39, 227, 0.15);
|
|
88
78
|
}
|
|
89
79
|
|
|
90
80
|
.animated-border {
|
|
91
|
-
|
|
92
|
-
|
|
81
|
+
position: relative;
|
|
82
|
+
overflow: hidden;
|
|
93
83
|
}
|
|
94
84
|
.animated-border::before {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
85
|
+
content: '';
|
|
86
|
+
position: absolute;
|
|
87
|
+
inset: -150%;
|
|
88
|
+
background: conic-gradient(
|
|
89
|
+
from 0deg,
|
|
90
|
+
#04D1FE,
|
|
91
|
+
#AF27E3,
|
|
92
|
+
#FB4072,
|
|
93
|
+
#04D1FE
|
|
94
|
+
);
|
|
95
|
+
animation: border-spin 3s linear infinite;
|
|
100
96
|
}
|
|
101
97
|
.animated-border > * {
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
position: relative;
|
|
99
|
+
z-index: 1;
|
|
104
100
|
}
|
|
105
101
|
|
|
106
102
|
.animated-border-slow::before {
|
|
107
|
-
|
|
103
|
+
animation-duration: 5s;
|
|
108
104
|
}
|
|
109
105
|
|
|
110
106
|
.input-glow:focus {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
0 0 4px -1px rgba(4, 209, 254, 0.1);
|
|
107
|
+
border-color: rgba(175, 39, 227, 0.4);
|
|
108
|
+
box-shadow: 0 0 0 1px rgba(175, 39, 227, 0.15),
|
|
109
|
+
0 0 20px -5px rgba(175, 39, 227, 0.25),
|
|
110
|
+
0 0 4px -1px rgba(4, 209, 254, 0.1);
|
|
116
111
|
}
|
|
117
112
|
|
|
118
113
|
@keyframes border-spin {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
100% {
|
|
123
|
-
transform: rotate(360deg);
|
|
124
|
-
}
|
|
114
|
+
0% { transform: rotate(0deg); }
|
|
115
|
+
100% { transform: rotate(360deg); }
|
|
125
116
|
}
|
package/supervisor/file-saver.ts
CHANGED
|
@@ -3,61 +3,48 @@ import crypto from 'crypto';
|
|
|
3
3
|
import { paths } from '../shared/paths.js';
|
|
4
4
|
|
|
5
5
|
export interface SavedFile {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
type: 'image' | 'document';
|
|
7
|
+
name: string;
|
|
8
|
+
mediaType: string;
|
|
9
|
+
relPath: string;
|
|
10
|
+
absPath: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export function ensureFileDirs(): void {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
fs.mkdirSync(paths.filesAudio, { recursive: true });
|
|
15
|
+
fs.mkdirSync(paths.filesImages, { recursive: true });
|
|
16
|
+
fs.mkdirSync(paths.filesDocuments, { recursive: true });
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export function saveAttachment(att: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const dir =
|
|
51
|
-
category === 'images' ? paths.filesImages : paths.filesDocuments;
|
|
52
|
-
const absPath = `${dir}/${filename}`;
|
|
53
|
-
|
|
54
|
-
fs.writeFileSync(absPath, Buffer.from(att.data, 'base64'));
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
type: att.type === 'image' ? 'image' : 'document',
|
|
58
|
-
name: att.name,
|
|
59
|
-
mediaType: att.mediaType,
|
|
60
|
-
relPath,
|
|
61
|
-
absPath
|
|
62
|
-
};
|
|
19
|
+
export function saveAttachment(att: { type: 'image' | 'file'; name: string; mediaType: string; data: string }): SavedFile {
|
|
20
|
+
const category = att.type === 'image' ? 'images' : 'documents';
|
|
21
|
+
|
|
22
|
+
const now = new Date();
|
|
23
|
+
const ts = now.toISOString().replace(/[-:T]/g, '').slice(0, 14);
|
|
24
|
+
const stamp = `${ts.slice(0, 8)}_${ts.slice(8, 14)}`;
|
|
25
|
+
const rand = crypto.randomBytes(3).toString('hex');
|
|
26
|
+
|
|
27
|
+
// Extract extension from original name or mediaType
|
|
28
|
+
const extFromName = att.name?.includes('.') ? att.name.split('.').pop()! : '';
|
|
29
|
+
const extFromMime: Record<string, string> = {
|
|
30
|
+
'image/png': 'png', 'image/jpeg': 'jpg', 'image/gif': 'gif', 'image/webp': 'webp',
|
|
31
|
+
'application/pdf': 'pdf', 'text/plain': 'txt', 'text/csv': 'csv',
|
|
32
|
+
};
|
|
33
|
+
const ext = extFromName || extFromMime[att.mediaType] || 'bin';
|
|
34
|
+
|
|
35
|
+
const filename = `${stamp}_${rand}.${ext}`;
|
|
36
|
+
const relPath = `files/${category}/${filename}`;
|
|
37
|
+
|
|
38
|
+
const dir = category === 'images' ? paths.filesImages : paths.filesDocuments;
|
|
39
|
+
const absPath = `${dir}/${filename}`;
|
|
40
|
+
|
|
41
|
+
fs.writeFileSync(absPath, Buffer.from(att.data, 'base64'));
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
type: att.type === 'image' ? 'image' : 'document',
|
|
45
|
+
name: att.name,
|
|
46
|
+
mediaType: att.mediaType,
|
|
47
|
+
relPath,
|
|
48
|
+
absPath,
|
|
49
|
+
};
|
|
63
50
|
}
|