fluxy-bot 0.5.73 → 0.6.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/bin/cli.js +99 -15
- package/dist-fluxy/assets/{fluxy-DY1qqSPl.js → fluxy-BYgsBU2u.js} +1 -1
- package/dist-fluxy/assets/{globals-CPiSYSCG.js → globals-4_SxttFw.js} +7 -7
- package/dist-fluxy/assets/{onboard-DIYa2MSV.js → onboard-CT-gVJYw.js} +1 -1
- package/dist-fluxy/fluxy.html +2 -2
- package/dist-fluxy/onboard.html +2 -2
- package/package.json +1 -1
- package/supervisor/chat/OnboardWizard.tsx +66 -10
- package/supervisor/index.ts +2 -2
- package/worker/index.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o,j as e,R as n,O as r}from"./globals-
|
|
1
|
+
import{b as o,j as e,R as n,O as r}from"./globals-4_SxttFw.js";function a(){const t=()=>{window.parent?.postMessage({type:"fluxy:onboard-complete"},"*")};return e.jsx(r,{onComplete:t,isInitialSetup:!0})}o.createRoot(document.getElementById("root")).render(e.jsx(n.StrictMode,{children:e.jsx(a,{})}));
|
package/dist-fluxy/fluxy.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, interactive-widget=resizes-content" />
|
|
6
6
|
<title>Fluxy Chat</title>
|
|
7
|
-
<script type="module" crossorigin src="/fluxy/assets/fluxy-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-
|
|
7
|
+
<script type="module" crossorigin src="/fluxy/assets/fluxy-BYgsBU2u.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-4_SxttFw.js">
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/fluxy/assets/globals-DXmThOn-.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body class="bg-background text-foreground">
|
package/dist-fluxy/onboard.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, interactive-widget=resizes-content" />
|
|
6
6
|
<title>Fluxy Setup</title>
|
|
7
|
-
<script type="module" crossorigin src="/fluxy/assets/onboard-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-
|
|
7
|
+
<script type="module" crossorigin src="/fluxy/assets/onboard-CT-gVJYw.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-4_SxttFw.js">
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/fluxy/assets/globals-DXmThOn-.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body class="bg-background text-foreground">
|
package/package.json
CHANGED
|
@@ -128,7 +128,7 @@ export default function OnboardWizard({ onComplete, isInitialSetup = false, onSa
|
|
|
128
128
|
const handleDebounce = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
129
129
|
|
|
130
130
|
// Tunnel mode (step 2 branching)
|
|
131
|
-
const [tunnelMode, setTunnelMode] = useState<'quick' | 'named'>('quick');
|
|
131
|
+
const [tunnelMode, setTunnelMode] = useState<'quick' | 'named' | 'off'>('quick');
|
|
132
132
|
const [tunnelDomain, setTunnelDomain] = useState('');
|
|
133
133
|
const [tunnelUrl, setTunnelUrl] = useState('');
|
|
134
134
|
const [handleChoice, setHandleChoice] = useState<'tunnel' | 'relay'>('relay');
|
|
@@ -235,6 +235,9 @@ export default function OnboardWizard({ onComplete, isInitialSetup = false, onSa
|
|
|
235
235
|
// Skip reset if this is the initial pre-fill setting the existing handle
|
|
236
236
|
if (!prefillDone.current) return;
|
|
237
237
|
|
|
238
|
+
// Private network mode — no handle registration needed
|
|
239
|
+
if (tunnelMode === 'off') return;
|
|
240
|
+
|
|
238
241
|
// Don't reset state if this is the already-registered handle
|
|
239
242
|
if (existingHandle && registered && botName === existingHandle.username) {
|
|
240
243
|
return;
|
|
@@ -474,6 +477,7 @@ export default function OnboardWizard({ onComplete, isInitialSetup = false, onSa
|
|
|
474
477
|
case 0: return true;
|
|
475
478
|
case 1: return userName.trim().length > 0;
|
|
476
479
|
case 2: {
|
|
480
|
+
if (tunnelMode === 'off') return botName.trim().length >= 3;
|
|
477
481
|
if (tunnelMode === 'named') return botName.trim().length >= 3;
|
|
478
482
|
if (handleChoice === 'tunnel') return botName.trim().length >= 3;
|
|
479
483
|
return registered;
|
|
@@ -623,6 +627,47 @@ export default function OnboardWizard({ onComplete, isInitialSetup = false, onSa
|
|
|
623
627
|
)}
|
|
624
628
|
|
|
625
629
|
{/* ── Step 2: Name your bot + Claim handle ── */}
|
|
630
|
+
{step === 2 && tunnelMode === 'off' && (
|
|
631
|
+
<div>
|
|
632
|
+
<h1 className="text-xl font-bold text-white tracking-tight">
|
|
633
|
+
Name your bot
|
|
634
|
+
</h1>
|
|
635
|
+
<p className="text-white/40 text-[13px] mt-1.5 leading-relaxed">
|
|
636
|
+
Give your bot a name. This is used throughout the app as your bot's identity.
|
|
637
|
+
</p>
|
|
638
|
+
|
|
639
|
+
<div className="relative mt-5">
|
|
640
|
+
<input
|
|
641
|
+
type="text"
|
|
642
|
+
value={botName}
|
|
643
|
+
onChange={(e) => onBotNameInput(e.target.value)}
|
|
644
|
+
maxLength={30}
|
|
645
|
+
placeholder="your-bot-name"
|
|
646
|
+
spellCheck={false}
|
|
647
|
+
autoCapitalize="none"
|
|
648
|
+
autoCorrect="off"
|
|
649
|
+
autoFocus
|
|
650
|
+
className={inputCls + ' pr-10 font-mono'}
|
|
651
|
+
/>
|
|
652
|
+
</div>
|
|
653
|
+
|
|
654
|
+
<div className="mt-4 bg-white/[0.03] border border-white/[0.06] rounded-xl px-4 py-3">
|
|
655
|
+
<p className="text-white/40 text-[12px] leading-relaxed">
|
|
656
|
+
Private network mode — your bot is only accessible via your local network or VPN. No public URL will be created.
|
|
657
|
+
</p>
|
|
658
|
+
</div>
|
|
659
|
+
|
|
660
|
+
<button
|
|
661
|
+
onClick={next}
|
|
662
|
+
disabled={!canNext}
|
|
663
|
+
className="w-full mt-5 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40"
|
|
664
|
+
>
|
|
665
|
+
Continue
|
|
666
|
+
<ArrowRight className="h-4 w-4" />
|
|
667
|
+
</button>
|
|
668
|
+
</div>
|
|
669
|
+
)}
|
|
670
|
+
|
|
626
671
|
{step === 2 && tunnelMode === 'named' && (
|
|
627
672
|
<div>
|
|
628
673
|
<h1 className="text-xl font-bold text-white tracking-tight">
|
|
@@ -1345,17 +1390,21 @@ export default function OnboardWizard({ onComplete, isInitialSetup = false, onSa
|
|
|
1345
1390
|
|
|
1346
1391
|
{/* ── Step 6: All Set (initial onboard only) ── */}
|
|
1347
1392
|
{step === 6 && isInitialSetup && (() => {
|
|
1393
|
+
const isPrivate = tunnelMode === 'off';
|
|
1348
1394
|
const finalUrl = (() => {
|
|
1395
|
+
if (isPrivate) return window.location.origin;
|
|
1349
1396
|
if (tunnelMode === 'named') return `https://${tunnelDomain}`;
|
|
1350
1397
|
if (handleChoice === 'relay' && registeredUrl) return registeredUrl;
|
|
1351
1398
|
return tunnelUrl || `http://localhost:${3000}`;
|
|
1352
1399
|
})();
|
|
1353
1400
|
const finalUrlFull = finalUrl.startsWith('http') ? finalUrl : `https://${finalUrl}`;
|
|
1354
|
-
const descriptionText =
|
|
1355
|
-
? '
|
|
1356
|
-
:
|
|
1357
|
-
? '
|
|
1358
|
-
:
|
|
1401
|
+
const descriptionText = isPrivate
|
|
1402
|
+
? 'Your agent is running on your private network. Access it from any device on your local network or VPN.'
|
|
1403
|
+
: tunnelMode === 'named'
|
|
1404
|
+
? 'Access your agent at your custom domain.'
|
|
1405
|
+
: handleChoice === 'relay' && registeredUrl
|
|
1406
|
+
? 'Your agent is live and ready. From now on, access it using your custom URL below.'
|
|
1407
|
+
: 'Your agent is live and ready. Your tunnel URL is shown below. Note: this URL changes on restart.';
|
|
1359
1408
|
return (
|
|
1360
1409
|
<div className="flex flex-col items-center text-center">
|
|
1361
1410
|
<div className="w-16 h-16 rounded-full bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center mb-5">
|
|
@@ -1406,19 +1455,26 @@ export default function OnboardWizard({ onComplete, isInitialSetup = false, onSa
|
|
|
1406
1455
|
</div>
|
|
1407
1456
|
</div>
|
|
1408
1457
|
|
|
1409
|
-
{/* Redirect button */}
|
|
1458
|
+
{/* Redirect / done button */}
|
|
1410
1459
|
<button
|
|
1411
1460
|
onClick={() => {
|
|
1412
|
-
(
|
|
1461
|
+
if (isPrivate) {
|
|
1462
|
+
(window.top || window).location.href = '/';
|
|
1463
|
+
} else {
|
|
1464
|
+
(window.top || window).location.href = finalUrlFull;
|
|
1465
|
+
}
|
|
1413
1466
|
}}
|
|
1414
1467
|
className="w-full mt-6 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2"
|
|
1415
1468
|
>
|
|
1416
|
-
Go to your agent
|
|
1469
|
+
{isPrivate ? 'Go to dashboard' : 'Go to your agent'}
|
|
1417
1470
|
<ExternalLink className="h-4 w-4" />
|
|
1418
1471
|
</button>
|
|
1419
1472
|
|
|
1420
1473
|
<p className="text-white/20 text-[11px] mt-3 leading-relaxed">
|
|
1421
|
-
|
|
1474
|
+
{isPrivate
|
|
1475
|
+
? 'Access from any device on your network using the URL above.'
|
|
1476
|
+
: `You'll be redirected to your ${tunnelMode === 'named' ? 'custom domain' : handleChoice === 'relay' ? 'custom URL' : 'tunnel URL'}.`
|
|
1477
|
+
}
|
|
1422
1478
|
</p>
|
|
1423
1479
|
</div>
|
|
1424
1480
|
);
|
package/supervisor/index.ts
CHANGED
|
@@ -262,9 +262,9 @@ export async function startSupervisor() {
|
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
// Auth check for
|
|
265
|
+
// Auth check for mutation routes (POST/PUT/DELETE) — GET/HEAD are read-only, skip auth
|
|
266
266
|
const method = req.method || 'GET';
|
|
267
|
-
if (method !== 'GET' && !isExemptRoute(method, req.url || '')) {
|
|
267
|
+
if (method !== 'GET' && method !== 'HEAD' && !isExemptRoute(method, req.url || '')) {
|
|
268
268
|
const needsAuth = await isAuthRequired();
|
|
269
269
|
if (needsAuth) {
|
|
270
270
|
const authHeader = req.headers['authorization'];
|
package/worker/index.ts
CHANGED
|
@@ -276,7 +276,6 @@ app.get('/api/onboard/status', (_, res) => {
|
|
|
276
276
|
const settings = getAllSettings();
|
|
277
277
|
const cfg = loadConfig();
|
|
278
278
|
const hasToken = !!cfg.relay?.token;
|
|
279
|
-
log.ok(`Onboard status: relay.token=${hasToken ? 'yes' : 'no'}, username=${cfg.username || '(none)'}, provider=${cfg.ai?.provider || '(none)'}, model=${cfg.ai?.model || '(none)'}`);
|
|
280
279
|
res.json({
|
|
281
280
|
userName: settings.user_name || '',
|
|
282
281
|
agentName: settings.agent_name || '',
|