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.
Files changed (106) hide show
  1. package/README.md +53 -84
  2. package/bin/cli.js +1717 -6
  3. package/components.json +18 -18
  4. package/package.json +98 -109
  5. package/postcss.config.js +3 -3
  6. package/scripts/install.ps1 +1 -1
  7. package/scripts/install.sh +1 -1
  8. package/scripts/postinstall.js +47 -58
  9. package/shared/ai.ts +118 -202
  10. package/shared/config.ts +37 -39
  11. package/shared/logger.ts +6 -14
  12. package/shared/paths.ts +10 -16
  13. package/shared/relay.ts +89 -98
  14. package/supervisor/backend.ts +77 -89
  15. package/supervisor/chat/ARCHITECTURE.md +13 -14
  16. package/supervisor/chat/OnboardWizard.tsx +2194 -3419
  17. package/supervisor/chat/fluxy-main.tsx +495 -633
  18. package/supervisor/chat/fluxy.html +24 -36
  19. package/supervisor/chat/onboard-main.tsx +8 -8
  20. package/supervisor/chat/onboard.html +10 -13
  21. package/supervisor/chat/src/components/Chat/AudioBubble.tsx +94 -108
  22. package/supervisor/chat/src/components/Chat/ChatView.tsx +14 -36
  23. package/supervisor/chat/src/components/Chat/ImageLightbox.tsx +71 -89
  24. package/supervisor/chat/src/components/Chat/InputBar.tsx +498 -728
  25. package/supervisor/chat/src/components/Chat/MessageBubble.tsx +154 -246
  26. package/supervisor/chat/src/components/Chat/MessageList.tsx +114 -138
  27. package/supervisor/chat/src/components/Chat/TypingIndicator.tsx +38 -50
  28. package/supervisor/chat/src/components/LoginScreen.tsx +245 -296
  29. package/supervisor/chat/src/hooks/useChat.ts +210 -259
  30. package/supervisor/chat/src/hooks/useFluxyChat.ts +232 -322
  31. package/supervisor/chat/src/hooks/useSpeechRecognition.ts +126 -148
  32. package/supervisor/chat/src/lib/auth.ts +20 -23
  33. package/supervisor/chat/src/lib/ws-client.ts +113 -125
  34. package/supervisor/chat/src/styles/globals.css +76 -85
  35. package/supervisor/file-saver.ts +39 -52
  36. package/supervisor/fluxy-agent.ts +213 -292
  37. package/supervisor/index.ts +895 -1263
  38. package/supervisor/scheduler.ts +237 -299
  39. package/supervisor/tunnel.ts +113 -167
  40. package/supervisor/vite-dev.ts +51 -61
  41. package/supervisor/widget.js +135 -147
  42. package/supervisor/worker.ts +45 -49
  43. package/tsconfig.json +18 -24
  44. package/vite.config.ts +48 -55
  45. package/vite.fluxy.config.ts +34 -34
  46. package/worker/claude-auth.ts +202 -265
  47. package/worker/codex-auth.ts +144 -181
  48. package/worker/db.ts +63 -191
  49. package/worker/index.ts +601 -842
  50. package/workspace/MYSELF.md +1 -1
  51. package/workspace/PULSE.json +6 -6
  52. package/workspace/backend/index.ts +16 -19
  53. package/workspace/client/index.html +47 -60
  54. package/workspace/client/public/manifest.json +21 -21
  55. package/workspace/client/public/sw.js +29 -31
  56. package/workspace/client/src/App.tsx +91 -136
  57. package/workspace/client/src/components/Dashboard/DashboardPage.tsx +68 -72
  58. package/workspace/client/src/components/ErrorBoundary.tsx +11 -11
  59. package/workspace/client/src/components/Layout/DashboardLayout.tsx +35 -35
  60. package/workspace/client/src/components/Layout/Footer.tsx +12 -12
  61. package/workspace/client/src/components/Layout/MobileNav.tsx +23 -23
  62. package/workspace/client/src/components/Layout/Sidebar.tsx +81 -81
  63. package/workspace/client/src/components/ui/avatar.tsx +85 -85
  64. package/workspace/client/src/components/ui/badge.tsx +40 -41
  65. package/workspace/client/src/components/ui/button.tsx +56 -57
  66. package/workspace/client/src/components/ui/card.tsx +75 -75
  67. package/workspace/client/src/components/ui/dialog.tsx +114 -117
  68. package/workspace/client/src/components/ui/dropdown-menu.tsx +191 -199
  69. package/workspace/client/src/components/ui/input.tsx +17 -17
  70. package/workspace/client/src/components/ui/scroll-area.tsx +47 -47
  71. package/workspace/client/src/components/ui/select.tsx +145 -151
  72. package/workspace/client/src/components/ui/separator.tsx +21 -21
  73. package/workspace/client/src/components/ui/sheet.tsx +102 -102
  74. package/workspace/client/src/components/ui/skeleton.tsx +10 -10
  75. package/workspace/client/src/components/ui/switch.tsx +26 -26
  76. package/workspace/client/src/components/ui/tabs.tsx +69 -69
  77. package/workspace/client/src/components/ui/textarea.tsx +14 -14
  78. package/workspace/client/src/components/ui/tooltip.tsx +37 -37
  79. package/workspace/client/src/lib/utils.ts +1 -1
  80. package/workspace/client/src/main.tsx +3 -3
  81. package/workspace/client/src/styles/globals.css +76 -85
  82. package/workspace/skills/code-reviewer/.claude-plugin/plugin.json +3 -3
  83. package/workspace/skills/code-reviewer/skills/code-reviewer/SKILL.md +0 -6
  84. package/workspace/skills/daily-standup/.claude-plugin/plugin.json +3 -3
  85. package/workspace/skills/daily-standup/skills/daily-standup/SKILL.md +0 -7
  86. package/workspace/skills/workspace-helper/.claude-plugin/plugin.json +3 -3
  87. package/workspace/skills/workspace-helper/skills/workspace-helper/SKILL.md +0 -2
  88. package/bin/cli.backup.js +0 -2138
  89. package/cli/commands/daemon.ts +0 -42
  90. package/cli/commands/init.ts +0 -32
  91. package/cli/commands/start.ts +0 -113
  92. package/cli/commands/tunnel.temp.ts +0 -206
  93. package/cli/commands/tunnel.ts +0 -227
  94. package/cli/commands/update.ts +0 -163
  95. package/cli/core/base-adapter.ts +0 -156
  96. package/cli/core/cloudflared.ts +0 -113
  97. package/cli/core/config.ts +0 -73
  98. package/cli/core/os-detector.ts +0 -43
  99. package/cli/core/server.ts +0 -109
  100. package/cli/core/types.ts +0 -15
  101. package/cli/index.ts +0 -72
  102. package/cli/platforms/darwin.ts +0 -146
  103. package/cli/platforms/index.ts +0 -21
  104. package/cli/platforms/linux.ts +0 -156
  105. package/cli/platforms/win32.ts +0 -34
  106. package/cli/utils/ui.ts +0 -37
@@ -1,125 +1,116 @@
1
- @import 'tailwindcss';
1
+ @import "tailwindcss";
2
2
 
3
3
  @custom-variant dark (&:is(.dark *));
4
4
 
5
5
  @theme inline {
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;
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
- touch-action: manipulation;
43
- -ms-touch-action: manipulation;
42
+ touch-action: manipulation;
43
+ -ms-touch-action: manipulation;
44
44
  }
45
45
 
46
46
  body {
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;
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
- background-color: rgba(175, 39, 227, 0.25);
55
+ background-color: rgba(175, 39, 227, 0.25);
56
56
  }
57
57
 
58
- ::-webkit-scrollbar {
59
- width: 6px;
60
- }
61
- ::-webkit-scrollbar-track {
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
- background-clip: text;
74
- -webkit-background-clip: text;
75
- color: transparent;
76
- -webkit-text-fill-color: transparent;
77
- background-image: linear-gradient(135deg, #04d1fe, #af27e3, #fb4072);
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
- background-image: linear-gradient(135deg, #04d1fe, #af27e3, #fb4072);
72
+ background-image: linear-gradient(135deg, #04D1FE, #AF27E3, #FB4072);
82
73
  }
83
74
 
84
75
  .glow-border {
85
- box-shadow:
86
- 0 0 0 1px rgba(175, 39, 227, 0.1),
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
- position: relative;
92
- overflow: hidden;
81
+ position: relative;
82
+ overflow: hidden;
93
83
  }
94
84
  .animated-border::before {
95
- content: '';
96
- position: absolute;
97
- inset: -150%;
98
- background: conic-gradient(from 0deg, #04d1fe, #af27e3, #fb4072, #04d1fe);
99
- animation: border-spin 3s linear infinite;
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
- position: relative;
103
- z-index: 1;
98
+ position: relative;
99
+ z-index: 1;
104
100
  }
105
101
 
106
102
  .animated-border-slow::before {
107
- animation-duration: 5s;
103
+ animation-duration: 5s;
108
104
  }
109
105
 
110
106
  .input-glow:focus {
111
- border-color: rgba(175, 39, 227, 0.4);
112
- box-shadow:
113
- 0 0 0 1px rgba(175, 39, 227, 0.15),
114
- 0 0 20px -5px rgba(175, 39, 227, 0.25),
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
- 0% {
120
- transform: rotate(0deg);
121
- }
122
- 100% {
123
- transform: rotate(360deg);
124
- }
114
+ 0% { transform: rotate(0deg); }
115
+ 100% { transform: rotate(360deg); }
125
116
  }
@@ -3,61 +3,48 @@ import crypto from 'crypto';
3
3
  import { paths } from '../shared/paths.js';
4
4
 
5
5
  export interface SavedFile {
6
- type: 'image' | 'document';
7
- name: string;
8
- mediaType: string;
9
- relPath: string;
10
- absPath: string;
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
- fs.mkdirSync(paths.filesAudio, { recursive: true });
15
- fs.mkdirSync(paths.filesImages, { recursive: true });
16
- fs.mkdirSync(paths.filesDocuments, { recursive: true });
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
- type: 'image' | 'file';
21
- name: string;
22
- mediaType: string;
23
- data: string;
24
- }): SavedFile {
25
- const category = att.type === 'image' ? 'images' : 'documents';
26
-
27
- const now = new Date();
28
- const ts = now.toISOString().replace(/[-:T]/g, '').slice(0, 14);
29
- const stamp = `${ts.slice(0, 8)}_${ts.slice(8, 14)}`;
30
- const rand = crypto.randomBytes(3).toString('hex');
31
-
32
- // Extract extension from original name or mediaType
33
- const extFromName = att.name?.includes('.')
34
- ? att.name.split('.').pop()!
35
- : '';
36
- const extFromMime: Record<string, string> = {
37
- 'image/png': 'png',
38
- 'image/jpeg': 'jpg',
39
- 'image/gif': 'gif',
40
- 'image/webp': 'webp',
41
- 'application/pdf': 'pdf',
42
- 'text/plain': 'txt',
43
- 'text/csv': 'csv'
44
- };
45
- const ext = extFromName || extFromMime[att.mediaType] || 'bin';
46
-
47
- const filename = `${stamp}_${rand}.${ext}`;
48
- const relPath = `files/${category}/${filename}`;
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
  }