@must-b/must-b 1.71.17 → 1.71.18

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/dist/BUILD.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@must-b/must-b",
3
- "version": "1.71.17",
4
- "gitHash": "36ea72fd",
5
- "buildTime": "2026-04-20T11:07:16.768Z",
3
+ "version": "1.71.18",
4
+ "gitHash": "90d10bd0",
5
+ "buildTime": "2026-04-21T01:12:48.160Z",
6
6
  "node": "v24.14.0",
7
7
  "platform": "win32"
8
8
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.71.4",
3
- "generatedAt": "2026-04-20T11:06:10.036Z",
3
+ "generatedAt": "2026-04-21T01:11:13.197Z",
4
4
  "count": 57,
5
5
  "skills": [
6
6
  {
package/dist/index.cjs CHANGED
@@ -4338,7 +4338,7 @@ ${Q}${m}`+p.repeat(E)+`${Q}`,I}function l(E,B,g,Q){return`${B}${Q}`+g.repeat(E)+
4338
4338
  \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
4339
4339
  \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
4340
4340
  \u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
4341
- \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D `;function tFe(){try{return"1.71.17"}catch{return"1.0.0"}}function iFe(){try{return"36ea72fd"}catch{return""}}function e0(e,A=58){let t=e.replace(/\x1b\[[0-9;]*m/g,""),i=Math.max(0,Math.floor((A-t.length)/2));return" ".repeat(i)+e}function LpA(e="\u2500",A=58){return dl(" "+e.repeat(A))}function SI(e,A){let t=tFe(),i=iFe();console.log(YpA(eFe)),console.log(""),console.log(e0($xe(Zxe("Must-b"))+" "+PpA("v"+t))),console.log(e0(dl("Professional AI Operating System"))),console.log(""),console.log(e0(YpA("\u26A1 Autonomous \xB7 Precise \xB7 Always On"))),console.log(e0(dl("Vision")+dl(" \xB7 ")+dl("Voice")+dl(" \xB7 ")+dl("OS Control")+dl(" \xB7 ")+dl("Multi-Agent Hierarchy"))),console.log(""),console.log(LpA()),console.log("");let a=[`Node ${process.version}`,`Mode: ${e.toUpperCase()}`,`PID ${process.pid}`,i?`#${i}`:null].filter(Boolean).join(dl(" \xB7 "));console.log(e0(dl(a))),e==="web"&&(console.log(""),console.log(e0(AFe("\u25B6 ")+PpA(`http://localhost:${A}`))),console.log(e0(dl("Dashboard is live \u2014 open in your browser")))),console.log(""),console.log(LpA()),console.log(e0(dl("Built by Auto Step \xB7 https://must-b.com"))),console.log("")}var KpA=require("events"),qpA=require("module"),wM=Ae(require("path"),1),mM=Ae(require("fs"),1),vE=Ae(require("os"),1);function jpA(e){let A=e.toLowerCase();return[/\b(refactor|redesign|architect|migrate|overhaul)\b/i,/\ball\s+(files|modules|services|endpoints)\b/i,/\bacross\s+the\s+(codebase|project|repo)\b/i,/\bmultiple\s+files\b/i,/\bimplement\s+(a\s+)?(new\s+)?(feature|system|module|service|api)\b/i,/\badd\s+(support\s+for|full|complete)\b/i,/\b(investigate|diagnose|audit|analyze)\b.*\b(and|then)\s+(fix|implement|add)\b/i,/\bfind\s+(all|every|the\s+root)\b/i,/\bsecurity\b.*\b(audit|review|fix|vulnerability)\b/i,/\b(vulnerability|cve|exploit|injection|xss|sql.inject)\b/i,/\b(first|step\s+1|phase\s+1)\b.*\bthen\b.*\b(implement|update|change)\b/i,/\bresearch\b.*\b(and|then)\b/i,/\binvestigate\b/i].some(i=>i.test(A))}async function aFe(e,A){let t=`${e}
4341
+ \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D `;function tFe(){try{return"1.71.18"}catch{return"1.0.0"}}function iFe(){try{return"90d10bd0"}catch{return""}}function e0(e,A=58){let t=e.replace(/\x1b\[[0-9;]*m/g,""),i=Math.max(0,Math.floor((A-t.length)/2));return" ".repeat(i)+e}function LpA(e="\u2500",A=58){return dl(" "+e.repeat(A))}function SI(e,A){let t=tFe(),i=iFe();console.log(YpA(eFe)),console.log(""),console.log(e0($xe(Zxe("Must-b"))+" "+PpA("v"+t))),console.log(e0(dl("Professional AI Operating System"))),console.log(""),console.log(e0(YpA("\u26A1 Autonomous \xB7 Precise \xB7 Always On"))),console.log(e0(dl("Vision")+dl(" \xB7 ")+dl("Voice")+dl(" \xB7 ")+dl("OS Control")+dl(" \xB7 ")+dl("Multi-Agent Hierarchy"))),console.log(""),console.log(LpA()),console.log("");let a=[`Node ${process.version}`,`Mode: ${e.toUpperCase()}`,`PID ${process.pid}`,i?`#${i}`:null].filter(Boolean).join(dl(" \xB7 "));console.log(e0(dl(a))),e==="web"&&(console.log(""),console.log(e0(AFe("\u25B6 ")+PpA(`http://localhost:${A}`))),console.log(e0(dl("Dashboard is live \u2014 open in your browser")))),console.log(""),console.log(LpA()),console.log(e0(dl("Built by Auto Step \xB7 https://must-b.com"))),console.log("")}var KpA=require("events"),qpA=require("module"),wM=Ae(require("path"),1),mM=Ae(require("fs"),1),vE=Ae(require("os"),1);function jpA(e){let A=e.toLowerCase();return[/\b(refactor|redesign|architect|migrate|overhaul)\b/i,/\ball\s+(files|modules|services|endpoints)\b/i,/\bacross\s+the\s+(codebase|project|repo)\b/i,/\bmultiple\s+files\b/i,/\bimplement\s+(a\s+)?(new\s+)?(feature|system|module|service|api)\b/i,/\badd\s+(support\s+for|full|complete)\b/i,/\b(investigate|diagnose|audit|analyze)\b.*\b(and|then)\s+(fix|implement|add)\b/i,/\bfind\s+(all|every|the\s+root)\b/i,/\bsecurity\b.*\b(audit|review|fix|vulnerability)\b/i,/\b(vulnerability|cve|exploit|injection|xss|sql.inject)\b/i,/\b(first|step\s+1|phase\s+1)\b.*\bthen\b.*\b(implement|update|change)\b/i,/\bresearch\b.*\b(and|then)\b/i,/\binvestigate\b/i].some(i=>i.test(A))}async function aFe(e,A){let t=`${e}
4342
4342
 
4343
4343
  COORDINATOR INSTRUCTION: Generate ONLY research steps (read-only, no file writes).
4344
4344
  Steps must use ONLY these tools: filesystem_read, filesystem_list, filesystem_search,
package/dist/index.js CHANGED
@@ -4338,7 +4338,7 @@ ${Q}${m}`+p.repeat(E)+`${Q}`,I}function l(E,B,g,Q){return`${B}${Q}`+g.repeat(E)+
4338
4338
  \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
4339
4339
  \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
4340
4340
  \u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
4341
- \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D `;function tFe(){try{return"1.71.17"}catch{return"1.0.0"}}function iFe(){try{return"36ea72fd"}catch{return""}}function e0(e,A=58){let t=e.replace(/\x1b\[[0-9;]*m/g,""),i=Math.max(0,Math.floor((A-t.length)/2));return" ".repeat(i)+e}function LpA(e="\u2500",A=58){return dl(" "+e.repeat(A))}function SI(e,A){let t=tFe(),i=iFe();console.log(YpA(eFe)),console.log(""),console.log(e0($xe(Zxe("Must-b"))+" "+PpA("v"+t))),console.log(e0(dl("Professional AI Operating System"))),console.log(""),console.log(e0(YpA("\u26A1 Autonomous \xB7 Precise \xB7 Always On"))),console.log(e0(dl("Vision")+dl(" \xB7 ")+dl("Voice")+dl(" \xB7 ")+dl("OS Control")+dl(" \xB7 ")+dl("Multi-Agent Hierarchy"))),console.log(""),console.log(LpA()),console.log("");let a=[`Node ${process.version}`,`Mode: ${e.toUpperCase()}`,`PID ${process.pid}`,i?`#${i}`:null].filter(Boolean).join(dl(" \xB7 "));console.log(e0(dl(a))),e==="web"&&(console.log(""),console.log(e0(AFe("\u25B6 ")+PpA(`http://localhost:${A}`))),console.log(e0(dl("Dashboard is live \u2014 open in your browser")))),console.log(""),console.log(LpA()),console.log(e0(dl("Built by Auto Step \xB7 https://must-b.com"))),console.log("")}var KpA=require("events"),qpA=require("module"),wM=Ae(require("path"),1),mM=Ae(require("fs"),1),vE=Ae(require("os"),1);function jpA(e){let A=e.toLowerCase();return[/\b(refactor|redesign|architect|migrate|overhaul)\b/i,/\ball\s+(files|modules|services|endpoints)\b/i,/\bacross\s+the\s+(codebase|project|repo)\b/i,/\bmultiple\s+files\b/i,/\bimplement\s+(a\s+)?(new\s+)?(feature|system|module|service|api)\b/i,/\badd\s+(support\s+for|full|complete)\b/i,/\b(investigate|diagnose|audit|analyze)\b.*\b(and|then)\s+(fix|implement|add)\b/i,/\bfind\s+(all|every|the\s+root)\b/i,/\bsecurity\b.*\b(audit|review|fix|vulnerability)\b/i,/\b(vulnerability|cve|exploit|injection|xss|sql.inject)\b/i,/\b(first|step\s+1|phase\s+1)\b.*\bthen\b.*\b(implement|update|change)\b/i,/\bresearch\b.*\b(and|then)\b/i,/\binvestigate\b/i].some(i=>i.test(A))}async function aFe(e,A){let t=`${e}
4341
+ \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D `;function tFe(){try{return"1.71.18"}catch{return"1.0.0"}}function iFe(){try{return"90d10bd0"}catch{return""}}function e0(e,A=58){let t=e.replace(/\x1b\[[0-9;]*m/g,""),i=Math.max(0,Math.floor((A-t.length)/2));return" ".repeat(i)+e}function LpA(e="\u2500",A=58){return dl(" "+e.repeat(A))}function SI(e,A){let t=tFe(),i=iFe();console.log(YpA(eFe)),console.log(""),console.log(e0($xe(Zxe("Must-b"))+" "+PpA("v"+t))),console.log(e0(dl("Professional AI Operating System"))),console.log(""),console.log(e0(YpA("\u26A1 Autonomous \xB7 Precise \xB7 Always On"))),console.log(e0(dl("Vision")+dl(" \xB7 ")+dl("Voice")+dl(" \xB7 ")+dl("OS Control")+dl(" \xB7 ")+dl("Multi-Agent Hierarchy"))),console.log(""),console.log(LpA()),console.log("");let a=[`Node ${process.version}`,`Mode: ${e.toUpperCase()}`,`PID ${process.pid}`,i?`#${i}`:null].filter(Boolean).join(dl(" \xB7 "));console.log(e0(dl(a))),e==="web"&&(console.log(""),console.log(e0(AFe("\u25B6 ")+PpA(`http://localhost:${A}`))),console.log(e0(dl("Dashboard is live \u2014 open in your browser")))),console.log(""),console.log(LpA()),console.log(e0(dl("Built by Auto Step \xB7 https://must-b.com"))),console.log("")}var KpA=require("events"),qpA=require("module"),wM=Ae(require("path"),1),mM=Ae(require("fs"),1),vE=Ae(require("os"),1);function jpA(e){let A=e.toLowerCase();return[/\b(refactor|redesign|architect|migrate|overhaul)\b/i,/\ball\s+(files|modules|services|endpoints)\b/i,/\bacross\s+the\s+(codebase|project|repo)\b/i,/\bmultiple\s+files\b/i,/\bimplement\s+(a\s+)?(new\s+)?(feature|system|module|service|api)\b/i,/\badd\s+(support\s+for|full|complete)\b/i,/\b(investigate|diagnose|audit|analyze)\b.*\b(and|then)\s+(fix|implement|add)\b/i,/\bfind\s+(all|every|the\s+root)\b/i,/\bsecurity\b.*\b(audit|review|fix|vulnerability)\b/i,/\b(vulnerability|cve|exploit|injection|xss|sql.inject)\b/i,/\b(first|step\s+1|phase\s+1)\b.*\bthen\b.*\b(implement|update|change)\b/i,/\bresearch\b.*\b(and|then)\b/i,/\binvestigate\b/i].some(i=>i.test(A))}async function aFe(e,A){let t=`${e}
4342
4342
 
4343
4343
  COORDINATOR INSTRUCTION: Generate ONLY research steps (read-only, no file writes).
4344
4344
  Steps must use ONLY these tools: filesystem_read, filesystem_list, filesystem_search,
@@ -733,4 +733,4 @@ Burada senin hakkında öğrendiğim bilgiler yer alır.
733
733
  group-hover:bg-red-500/10 transition-all shrink-0`,children:r.jsx(xh,{size:13})}),r.jsx("span",{className:"text-[12px] font-semibold text-white/50 group-hover:text-red-400 transition-colors",children:i?"Signing out…":"Sign Out"})]})]}),r.jsx("div",{className:"px-4 py-2 border-t border-white/6",children:r.jsx("p",{className:"text-[9.5px] text-white/18 text-center",children:"must-b.com · Secure OAuth connection"})})]},"profile-panel")})]})}const g_=4,x_=3e3;function y_(){return r.jsxs(U.div,{className:"fixed inset-0 z-[200] pointer-events-none flex items-center justify-center",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},children:[r.jsx("div",{className:"absolute inset-0 bg-black/35"}),Array.from({length:g_}).map((e,t)=>r.jsx(U.span,{className:"absolute rounded-full",style:{border:"1.5px solid rgba(249,115,22,0.70)",boxShadow:"0 0 20px rgba(249,115,22,0.25)"},initial:{width:64,height:64,opacity:.9,scale:1},animate:{width:64+t*0,height:64+t*0,scale:[1,3.5+t*1.2],opacity:[.8,0]},transition:{duration:1.8,delay:t*.22,ease:"easeOut",repeat:1/0,repeatDelay:.1}},t)),r.jsx(U.div,{className:"relative z-10 w-16 h-16 rounded-full flex items-center justify-center",style:{background:"rgba(249,115,22,0.18)",border:"1.5px solid rgba(249,115,22,0.55)",backdropFilter:"blur(16px)",boxShadow:"0 0 32px rgba(249,115,22,0.35), 0 0 64px rgba(249,115,22,0.15)"},animate:{scale:[1,1.06,1]},transition:{duration:1.2,repeat:1/0,ease:"easeInOut"},children:r.jsx(Nr,{size:26,className:"text-orange-400"})}),r.jsx(U.p,{className:"absolute text-[12px] font-semibold text-orange-300/80 tracking-widest uppercase",style:{top:"calc(50% + 52px)"},initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:.15,duration:.3},children:"Dinliyorum…"})]})}function v_(){const[e,t]=f.useState(!1),n=f.useRef(null),s=f.useCallback(()=>{t(!0),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>t(!1),x_)},[]);return f.useEffect(()=>(window.addEventListener("mustb:wake",s),()=>{window.removeEventListener("mustb:wake",s),n.current&&clearTimeout(n.current)}),[s]),r.jsx(ee,{children:e&&r.jsx(y_,{},"wake-aura")})}const b_={browser_navigate:"navigate",web_search:"search",http_request:"request"},w_=20,k_=5e3;function j_(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e.slice(0,30)}}function N_(e){try{return new URL(e).pathname.slice(0,40)||"/"}catch{return""}}function S_(e){return e==="search"?r.jsx(qt,{size:10}):e==="request"?r.jsx(zr,{size:10}):r.jsx(Xe,{size:10})}function E1(e){return e==="search"?"#a78bfa":e==="request"?"#94a3b8":"#38bdf8"}function C_({domain:e,kind:t}){var i;const n=((i=e[0])==null?void 0:i.toUpperCase())??"?",s=E1(t);return r.jsx("span",{className:"w-6 h-6 rounded-lg flex items-center justify-center flex-shrink-0 text-[10px] font-black",style:{background:`${s}18`,border:`1px solid ${s}30`,color:s},children:n})}function __({entry:e,isLatest:t}){var a;const n=E1(e.kind),s=e.domain??"",i=e.query??(e.url?N_(e.url):"");return r.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2",style:{borderLeft:t?`2px solid ${n}`:"2px solid transparent",background:t?`${n}08`:"transparent"},children:[r.jsx(C_,{domain:s||"?",kind:e.kind}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-[11px] font-semibold text-white/80 truncate leading-tight",children:s||((a=e.query)==null?void 0:a.slice(0,30))||"—"}),i&&r.jsx("p",{className:"text-[9px] text-white/35 truncate font-mono mt-0.5",children:i})]}),r.jsx("span",{style:{color:n,opacity:.6},className:"flex-shrink-0",children:S_(e.kind)}),r.jsx("span",{className:"text-[9px] text-white/20 font-mono flex-shrink-0",children:new Date(e.ts).toLocaleTimeString("tr-TR",{hour:"2-digit",minute:"2-digit",second:"2-digit"})})]})}function E_(){const[e,t]=f.useState([]),[n,s]=f.useState(!1),[i,a]=f.useState(!1),[o,l]=f.useState(!1),c=f.useRef(null),d=f.useCallback(()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{s(!1),t([]),l(!1)},k_)},[]);return f.useEffect(()=>{const u=at(),p=h=>{const{type:m}=h;if(m==="planStart"){c.current&&clearTimeout(c.current),l(!0);return}if(m==="planFinish"){l(!1),t(y=>y.map(b=>({...b,done:!0}))),d();return}if(m==="stepStart"&&h.step){const y=h.step,b=y.tool?b_[y.tool]:void 0;if(!b)return;const v=y.parameters??{},g=String(v.url??v.endpoint??"").trim(),x=String(v.query??"").trim();if(!g&&!x)return;const k={id:`v-${Date.now()}-${Math.random().toString(36).slice(2,5)}`,kind:b,url:g||void 0,query:x||void 0,domain:g?j_(g):void 0,ts:Date.now(),done:!1};t(j=>[k,...j].slice(0,w_)),s(!0),a(!1)}};return u.on("agentUpdate",p),()=>{u.off("agentUpdate",p),c.current&&clearTimeout(c.current)}},[d]),!n||e.length===0?null:r.jsx(U.div,{className:"fixed right-4 z-[120] w-[300px]",style:{top:"88px"},initial:{opacity:0,x:20,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:16,scale:.96},transition:{type:"spring",stiffness:360,damping:30},children:r.jsxs("div",{className:"rounded-2xl overflow-hidden",style:{background:"rgba(5,3,1,0.88)",border:"1px solid rgba(56,189,248,0.22)",backdropFilter:"blur(24px)",boxShadow:"0 8px 40px rgba(0,0,0,0.65), 0 0 0 1px rgba(56,189,248,0.06), inset 0 1px 0 rgba(255,255,255,0.03)"},children:[r.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 cursor-pointer select-none",style:{borderBottom:i?"none":"1px solid rgba(255,255,255,0.06)"},onClick:()=>a(u=>!u),children:[r.jsx(BS,{size:11,className:"text-sky-400/70 flex-shrink-0"}),r.jsx("span",{className:"text-[11px] font-bold text-white/60 flex-1 tracking-wide uppercase",children:"Gezi Haritası"}),o&&r.jsxs("span",{className:"flex items-center gap-1.5 flex-shrink-0",children:[r.jsx(U.span,{className:"w-1.5 h-1.5 rounded-full bg-sky-400",animate:{opacity:[1,.3,1]},transition:{duration:1,repeat:1/0}}),r.jsx("span",{className:"text-[10px] text-sky-400/70 font-medium",children:"taranıyor"})]}),r.jsx("span",{className:"text-[10px] text-white/25 flex-shrink-0 font-mono ml-1",children:e.length}),r.jsx("button",{onClick:u=>{u.stopPropagation(),s(!1),t([])},className:"text-white/20 hover:text-white/50 transition-colors flex-shrink-0 ml-1",children:r.jsx(st,{size:10})}),r.jsx("span",{className:"text-white/20 flex-shrink-0",children:i?r.jsx(fh,{size:10}):r.jsx(ta,{size:10})})]}),r.jsx(ee,{children:!i&&r.jsxs(U.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.18},className:"overflow-hidden",children:[r.jsx("div",{className:"overflow-y-auto divide-y divide-white/4",style:{maxHeight:"260px"},children:r.jsx(ee,{mode:"popLayout",children:e.map((u,p)=>r.jsx(U.div,{layout:!0,initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},children:r.jsx(__,{entry:u,isLatest:p===0&&o})},u.id))})}),r.jsx("div",{className:"px-3 py-1.5 flex items-center justify-between",style:{borderTop:"1px solid rgba(255,255,255,0.04)"},children:r.jsxs("span",{className:"text-[9px] text-white/20 font-mono",children:[e.filter(u=>u.kind==="navigate").length," gezinti ·"," ",e.filter(u=>u.kind==="search").length," arama ·"," ",e.filter(u=>u.kind==="request").length," istek"]})})]})})]})})}function T_(e){if(!e.created_at)return"Older";const t=new Date,n=new Date(e.created_at),s=(t.getTime()-n.getTime())/864e5;return s<1&&t.getDate()===n.getDate()?"Today":s<2&&t.getDate()-n.getDate()===1?"Yesterday":s<7?"Last 7 Days":"Older"}const P_=["Today","Yesterday","Last 7 Days","Older"],A_="flex items-center gap-2.5 px-2.5 py-2 rounded-lg transition-all text-[13px] font-medium mb-0.5 w-full text-left",M_="bg-orange-500/15 text-orange-300 border border-orange-500/25",z_="text-white/80 hover:text-white/95 hover:bg-white/6";function R_(e){return Ke(A_,e?M_:z_)}function L_(e){return e?"text-orange-400 shrink-0":"text-white/70 shrink-0"}function D_({onClose:e}){const{t}=pt(),n=is(),s=un(),i=n.pathname,[a,o]=f.useState([]),[l,c]=f.useState(null),[d,u]=f.useState(""),[p,h]=f.useState(null),[m,y]=f.useState(null),[b,v]=f.useState(""),[g,x]=f.useState(""),[k,j]=f.useState(!1),w=f.useCallback(async()=>{try{const P=await $("/api/chats");if(!P.ok)return;const D=await P.json();o(D);const F=new Set([...D.map(O=>O.id),"default"]);for(let O=localStorage.length-1;O>=0;O--){const M=localStorage.key(O);M!=null&&M.startsWith("mustb_chat_turns_")&&!F.has(M.slice(17))&&localStorage.removeItem(M)}}catch{}},[]);f.useEffect(()=>{w();const P=setInterval(w,1e4);return()=>clearInterval(P)},[w]),f.useEffect(()=>{const P=D=>{const{id:F,title:O}=D.detail;o(M=>M.map(z=>z.id===F?{...z,title:O}:z))};return window.addEventListener("mustb:chat-renamed",P),()=>window.removeEventListener("mustb:chat-renamed",P)},[]),f.useEffect(()=>{$("/api/setup/status").then(P=>P.ok?P.json():null).then(P=>{P&&(v(P.activeProvider??""),x(P.activeModel??""))}).catch(()=>{}),fetch("/api/auth/user-status").then(P=>P.json()).then(P=>j(!!P.authenticated)).catch(()=>{})},[]);const S=async()=>{try{const P=await $("/api/chats",{method:"POST",body:JSON.stringify({title:"New Chat"})});if(!P.ok){pe.error("Failed to create chat.");return}const D=await P.json();o(F=>[D,...F]),s(`/app?chat=${D.id}`),e()}catch{pe.error("Gateway unreachable.")}},N=async()=>{if(p){try{await $(`/api/chats/${p}`,{method:"DELETE"}),o(P=>P.filter(D=>D.id!==p)),pe.success("Chat deleted."),i.includes(p)&&s("/app")}catch{pe.error("Failed to delete chat.")}h(null)}},C=async P=>{y(null);try{await $(`/api/chats/${P}`,{method:"PATCH",body:JSON.stringify({archived:!0})}),o(D=>D.filter(F=>F.id!==P)),pe.success("Chat archived.")}catch{pe.error("Failed to archive chat.")}},_=async()=>{if(!l||!d.trim()){c(null);return}try{await $(`/api/chats/${l}`,{method:"PATCH",body:JSON.stringify({title:d})}),o(P=>P.map(D=>D.id===l?{...D,title:d}:D)),pe.success("Chat renamed.")}catch{pe.error("Failed to rename chat.")}c(null)},E=[{to:"/app/browser",icon:r.jsx(Xe,{size:14}),label:t.nav.browser},{to:"/app/automations",icon:r.jsx(i4,{size:14}),label:t.nav.workflows},{to:"/app/skills",icon:r.jsx(Re,{size:14}),label:t.nav.skills},{to:"/app/plugins",icon:r.jsx(Sr,{size:14}),label:t.nav.plugins},{to:"/app/files",icon:r.jsx(os,{size:14}),label:t.nav.files},{to:"/app/memory",icon:r.jsx(il,{size:14}),label:t.nav.memory,exact:!0},{to:"/app/settings",icon:r.jsx(bh,{size:14}),label:t.nav.settings,exact:!0},{to:"/app/settings?tab=api-keys",icon:r.jsx(n1,{size:14}),label:t.nav.apiKeys}];return r.jsxs("aside",{className:"w-[280px] h-full bg-[#0d0703] border-r border-orange-500/10 flex flex-col overflow-hidden",children:[r.jsx("div",{className:"flex items-center h-[60px] pl-14 pr-4 shrink-0",children:r.jsxs(hi,{to:"/app",onClick:e,className:"flex items-center gap-2.5 hover:opacity-80 transition-opacity",children:[r.jsxs("div",{className:"relative w-7 h-7 shrink-0",children:[r.jsx("div",{className:"absolute inset-0 bg-orange-500 rounded-full blur-sm opacity-40"}),r.jsx("img",{src:"/logo.png",alt:"Must-b",className:"w-full h-full object-contain relative z-10"})]}),r.jsx("span",{className:"text-[18px] font-black tracking-tight text-white/90 leading-none select-none",children:"Must-b"})]})}),r.jsx("p",{className:"text-[10px] font-bold text-white/30 uppercase tracking-widest px-3 mb-2",children:"Sohbet"}),r.jsx("div",{className:"px-3 pb-3 shrink-0",children:r.jsxs("button",{onClick:S,className:"flex items-center justify-center gap-2 w-full px-3 py-1.5 rounded-lg border border-orange-500/20 bg-orange-500/10 text-orange-400 hover:bg-orange-500/20 hover:border-orange-500/30 transition-all text-[12px] font-medium",children:[r.jsx(ll,{size:14}),t.sidebar.newChat]})}),r.jsxs("div",{className:"flex-1 overflow-y-auto scrollbar-hide px-2 pb-4",onClick:()=>m&&y(null),children:[(()=>{const P={Today:[],Yesterday:[],"Last 7 Days":[],Older:[]};for(const D of a)P[T_(D)].push(D);return P_.map(D=>{const F=P[D];return F.length===0?null:r.jsxs("div",{children:[r.jsx("p",{className:"px-2 mt-3 mb-1 text-[9.5px] font-bold text-white/20 uppercase tracking-widest",children:D}),r.jsx("div",{className:"space-y-0.5",children:F.map(O=>r.jsx("div",{className:"group relative",children:l===O.id?r.jsxs("div",{className:"flex items-center gap-1 px-2 py-1.5 bg-orange-500/10 rounded-lg border border-orange-500/25",children:[r.jsx("input",{value:d,onChange:M=>u(M.target.value),className:"flex-1 bg-transparent text-[13px] text-white/80 outline-none min-w-0",autoFocus:!0,onKeyDown:M=>{M.key==="Enter"&&_(),M.key==="Escape"&&c(null)}}),r.jsx("button",{onClick:_,className:"p-1 text-green-400 hover:bg-green-400/10 rounded transition-colors",children:r.jsx(Kt,{size:12})}),r.jsx("button",{onClick:()=>c(null),className:"p-1 text-red-400 hover:bg-red-400/10 rounded transition-colors",children:r.jsx(st,{size:12})})]}):r.jsxs(r.Fragment,{children:[r.jsxs(hi,{to:`/app?chat=${O.id}`,onClick:e,className:Ke("flex items-center gap-2.5 px-2.5 py-2 rounded-lg transition-all text-[13px] font-medium pr-8",i.includes(O.id)?"bg-orange-500/15 text-orange-300 border border-orange-500/25":"text-white/55 hover:text-white/85 hover:bg-white/6"),children:[r.jsx(na,{size:13,className:i.includes(O.id)?"text-orange-400 shrink-0":"text-white/30 shrink-0"}),r.jsx("span",{className:"flex-1 truncate",children:O.title})]}),r.jsx("button",{onClick:M=>{M.preventDefault(),M.stopPropagation(),y(m===O.id?null:O.id)},className:"absolute right-1 top-1/2 -translate-y-1/2 p-1 rounded text-white/25 hover:text-white/70 hover:bg-white/8 opacity-0 group-hover:opacity-100 transition-all",children:r.jsx(CS,{size:14})}),m===O.id&&r.jsxs("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[150px] rounded-xl py-1 overflow-hidden",style:{background:"rgba(16,6,2,0.97)",border:"1px solid rgba(249,115,22,0.15)",backdropFilter:"blur(20px)"},onClick:M=>M.stopPropagation(),children:[r.jsxs("button",{onClick:()=>{y(null),c(O.id),u(O.title)},className:"flex items-center gap-2.5 w-full px-3 py-2 text-[12px] text-white/60 hover:bg-white/5 transition-colors",children:[r.jsx(GS,{size:12,className:"text-white/35 shrink-0"})," Rename"]}),r.jsxs("button",{onClick:()=>C(O.id),className:"flex items-center gap-2.5 w-full px-3 py-2 text-[12px] text-white/60 hover:bg-white/5 transition-colors",children:[r.jsx(yS,{size:12,className:"text-white/35 shrink-0"})," Archive"]}),r.jsx("hr",{className:"my-1 border-white/8"}),r.jsxs("button",{onClick:M=>{M.preventDefault(),M.stopPropagation(),y(null),h(O.id)},className:"flex items-center gap-2.5 w-full px-3 py-2 text-[12px] text-red-400 hover:bg-red-500/10 transition-colors",children:[r.jsx(Ls,{size:12,className:"shrink-0"})," Delete"]})]})]})},O.id))})]},D)})})(),r.jsx("hr",{className:"my-3 border-white/10"}),E.map(({to:P,icon:D,label:F,exact:O})=>{const M=P.split("?")[0],z=O?i===M:i.startsWith(M);return r.jsxs(hi,{to:P,onClick:e,className:R_(z),children:[r.jsx("span",{className:L_(z),children:D}),F]},P)})]}),r.jsxs("div",{className:"border-t border-orange-500/10 p-3 shrink-0",children:[g&&r.jsxs("div",{className:"mb-2 px-1",children:[r.jsx("p",{className:"text-[9px] text-white/25 font-bold uppercase tracking-[0.2em] mb-0.5",children:"Active Model"}),r.jsx("p",{className:"text-orange-400 text-[11px] font-bold truncate",children:g}),b&&r.jsx("p",{className:"text-white/30 text-[10px] capitalize",children:b})]}),k&&r.jsxs("button",{onClick:async()=>{try{await fetch("/api/auth/signout",{method:"POST"})}catch{}e(),s("/app"),window.location.reload()},className:"w-full flex items-center gap-2 px-2.5 py-2 rounded-lg text-white/30 hover:text-red-400 hover:bg-red-500/10 transition-all text-xs font-medium",children:[r.jsx(xh,{size:13}),t.sidebar.logout]}),r.jsxs("p",{className:"mt-2 text-[10px] text-white/20 px-1",children:[t.sidebar.poweredBy," ",r.jsx("span",{className:"text-orange-500/70 font-semibold",children:"Auto Step"})]})]}),p&&r.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",children:r.jsxs("div",{className:"rounded-2xl p-6 w-full max-w-sm shadow-2xl",style:{background:"rgba(16,6,2,0.97)",border:"1px solid rgba(249,115,22,0.18)"},children:[r.jsx("h3",{className:"text-lg font-bold text-white/90 mb-2",children:t.sidebar.deleteChat}),r.jsx("p",{className:"text-white/45 text-sm mb-6",children:t.sidebar.deleteConfirm}),r.jsxs("div",{className:"flex gap-3",children:[r.jsx("button",{onClick:()=>h(null),className:"flex-1 px-4 py-2 rounded-xl bg-white/8 hover:bg-white/12 text-white/70 text-sm font-medium transition-colors",children:t.sidebar.cancel}),r.jsx("button",{onClick:N,className:"flex-1 px-4 py-2 rounded-xl bg-red-600 hover:bg-red-500 text-white text-sm font-medium transition-colors",children:t.sidebar.delete})]})]})})]})}function he(e){window.dispatchEvent(new CustomEvent("mustb:invoke-skill",{detail:{skill:e}})),setTimeout(()=>{var t;return(t=document.querySelector("textarea"))==null?void 0:t.focus()},80)}function O_({panel:e,title:t,onClose:n}){return f.useEffect(()=>{const s=i=>{i.key==="Escape"&&n()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[n]),r.jsxs(ee,{children:[r.jsx(U.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},className:"fixed inset-0 z-40 bg-black/55 backdrop-blur-[3px]",onClick:n},"stage-backdrop"),r.jsxs(U.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:12},transition:{type:"spring",stiffness:380,damping:32},className:`fixed z-50 top-[72px] left-1/2 -translate-x-1/2
734
734
  w-full max-w-2xl max-h-[calc(100vh-92px)]
735
735
  glass-panel rounded-3xl overflow-hidden flex flex-col
736
- shadow-[0_24px_80px_rgba(0,0,0,0.7),0_0_0_1px_rgba(249,115,22,0.18)]`,onClick:s=>s.stopPropagation(),children:[r.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-orange-500/12 shrink-0",children:[r.jsx("span",{className:"text-[13px] font-bold text-white/80",children:t}),r.jsx("button",{onClick:n,className:"w-7 h-7 flex items-center justify-center rounded-full hover:bg-white/8 text-white/40 hover:text-white/70 transition-colors",children:r.jsx(st,{size:14})})]}),r.jsxs("div",{className:"flex-1 overflow-hidden min-h-0",children:[e==="memory"&&r.jsx(GC,{}),e==="plugins"&&r.jsx(YC,{}),e==="skills"&&r.jsx(ZC,{}),e==="workspace"&&r.jsx(r_,{}),e==="livesight"&&r.jsx(i_,{})]})]},"stage-card")]})}function I_(){const{t:e}=pt(),t=is(),n=un(),[s,i]=f.useState(!1),[a,o]=f.useState(""),[l,c]=f.useState(null),[d,u]=f.useState(!1);f.useEffect(()=>{const y=b=>{u(b.detail.active)};return window.addEventListener("mustb:safeMode",y),()=>window.removeEventListener("mustb:safeMode",y)},[]),f.useEffect(()=>{i(!1)},[t.pathname]),t.pathname,f.useCallback(y=>o(b=>b===y?"":y),[]),f.useCallback(y=>{c(y),o("")},[]);const p=f.useCallback(()=>c(null),[]),h=e.dock;h.cat_webTools,h.skill_webSearch,h.desc_webSearch,h.skill_webFetch,h.desc_webFetch,h.skill_browserControl,h.desc_browserControl,h.cat_fileMedia,h.skill_pdfReader,h.desc_pdfReader,h.skill_imageAnalysis,h.desc_imageAnalysis,h.skill_imageGeneration,h.desc_imageGeneration,h.skill_tts,h.desc_tts,h.cat_aiAgents,h.skills,h.skill_spawnAgent,h.desc_spawnAgent,h.skill_agentSessions,h.desc_agentSessions,h.skill_canvas,h.desc_canvas,h.skill_git,h.desc_git,h.cat_systemTools,h.skill_gateway,h.desc_gateway,h.skill_fileManager,h.desc_fileManager,h.skill_cron,h.desc_cron,h.skill_messages,h.desc_messages,h.cat_knowledgeBase,h.mem_browse,h.desc_memBrowse,h.mem_search,h.desc_memSearch,h.mem_add,h.desc_memAdd,h.cat_personalOrg,h.mem_contacts,h.desc_contacts,h.mem_calendar,h.desc_calendar,h.cat_pluginManager,h.plug_marketplace,h.desc_marketplace,h.plug_installed,h.desc_installed,h.plug_mcp,h.desc_mcp,h.cat_developer,h.plug_bundleMcp,h.desc_bundleMcp,h.plug_cliCmds,h.desc_cliCmds,h.cat_automation,h.wf_automations,h.desc_automations,h.wf_scheduled,h.desc_scheduled,h.wf_commands,h.desc_commands,h.cat_advanced,h.wf_nodes,h.desc_nodes,h.wf_multiAgent,h.desc_multiAgent;const m={memory:h.memory,plugins:h.plugins,skills:h.skills,workspace:h.files,livesight:"Visual Audit"};return r.jsx(J2,{reducedMotion:d?"always":"never",children:r.jsxs("div",{className:"relative min-h-screen overflow-x-hidden font-sans bg-transparent",children:[l&&r.jsx(O_,{panel:l,title:m[l],onClose:p}),r.jsx("div",{className:"fixed top-[14px] left-4 z-40 overflow-hidden",children:r.jsx("button",{onClick:()=>i(y=>!y),"aria-label":"Toggle sidebar",className:"p-2 rounded-full text-white/45 hover:text-white/90 hover:bg-white/8 transition-all leading-none",style:{backdropFilter:"blur(8px)",fontSize:0},children:r.jsx(VS,{size:17,"aria-hidden":"true",focusable:"false"})})}),r.jsxs("header",{className:"fixed top-0 inset-x-0 z-50 h-16 flex items-center justify-between px-6 pointer-events-none",children:[r.jsx("div",{}),r.jsxs("div",{className:"flex items-center gap-2.5 shrink-0 pointer-events-auto",children:[r.jsxs(hi,{to:"/app/voice",className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full text-[12px] font-medium transition-all select-none ${t.pathname==="/app/voice"?"bg-orange-500/20 text-orange-300 border border-orange-500/30":"text-white/45 hover:text-white/85 hover:bg-white/8"}`,title:e.nav.voice,children:[r.jsx(kS,{size:14}),r.jsx("span",{className:"hidden sm:inline",children:e.nav.voice})]}),r.jsx(U.div,{initial:{opacity:0,x:12},animate:{opacity:1,x:0},transition:{duration:.4,delay:.15},className:"flex items-center gap-1 px-2 py-1.5 rounded-full",style:{background:"rgba(255,255,255,0.05)",border:"1px solid rgba(255,255,255,0.09)"},children:r.jsx(HC,{})}),r.jsx(m_,{})]})]}),r.jsx(ee,{children:s&&r.jsx(U.div,{initial:{x:-280},animate:{x:0},exit:{x:-280},transition:{type:"spring",stiffness:340,damping:34},className:"fixed top-0 left-0 bottom-0 z-30 w-[280px]",children:r.jsx(D_,{onClose:()=>i(!1)})},"sidebar-panel")}),r.jsx("main",{className:"relative min-h-screen pt-16 transition-[margin] duration-300 bg-transparent",style:{marginLeft:s?280:0},children:r.jsx(e2,{})}),r.jsx(o_,{}),r.jsx(p_,{}),r.jsx(v_,{}),r.jsx(E_,{})]})})}const B_=[{decision:"duplicate",label:"Create New Agent",sublabel:"Keep both — cloud data is copied to a separate folder",icon:PS,accent:"border-blue-500/30 bg-blue-500/8 hover:border-blue-500/50 text-blue-400"},{decision:"restore",label:"Use Cloud (Overwrite)",sublabel:"Cloud wins — local memory is replaced with cloud version",icon:NS,accent:"border-orange-500/30 bg-orange-500/8 hover:border-orange-500/50 text-orange-400"},{decision:"upload",label:"Keep Mine",sublabel:"Local wins — cloud memory is overwritten with local data",icon:ZS,accent:"border-green-500/30 bg-green-500/8 hover:border-green-500/50 text-green-400"}];function F_(){const[e,t]=f.useState(null),[n,s]=f.useState(!1),[i,a]=f.useState(!1);f.useEffect(()=>{const c=at(),d=u=>{u.type==="CONFLICT_DETECTED"&&(t({localAgentName:u.localAgentName??null,cloudAgentName:u.cloudAgentName??null,localMtime:u.localMtime??null,cloudTimestamp:u.cloudTimestamp??null}),a(!1)),u.type==="syncResolveFinish"&&(a(!0),setTimeout(()=>{t(null),a(!1)},1800))};return c.on("agentUpdate",d),()=>{c.off("agentUpdate",d)}},[]);const o=async c=>{if(!n){s(!0);try{await fetch("/api/setup/sync-resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:c})})}catch{}s(!1)}},l=c=>{if(!c)return"—";try{return new Date(c).toLocaleString("en-US",{dateStyle:"medium",timeStyle:"short"})}catch{return c}};return r.jsx(ee,{children:e&&r.jsx(U.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/70 backdrop-blur-sm px-4",children:r.jsxs(U.div,{initial:{opacity:0,y:24,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:24,scale:.95},transition:{duration:.25},className:"w-full max-w-md bg-[#0c0f18] border border-white/10 rounded-2xl shadow-2xl overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-3 px-6 py-5 border-b border-white/8 bg-amber-500/5",children:[r.jsx("div",{className:"w-9 h-9 rounded-full bg-amber-500/15 flex items-center justify-center flex-shrink-0",children:r.jsx(es,{size:18,className:"text-amber-400"})}),r.jsxs("div",{children:[r.jsx("h2",{className:"text-white font-bold text-base",children:"Memory Conflict Detected"}),r.jsx("p",{className:"text-gray-500 text-xs mt-0.5",children:"Two agent identities found — action required"})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3 px-6 pt-5 pb-2",children:[r.jsxs("div",{className:"rounded-xl border border-white/8 bg-white/3 px-4 py-3",children:[r.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-1",children:"Local Agent"}),r.jsx("p",{className:"text-white font-bold text-sm",children:e.localAgentName??"—"}),r.jsx("p",{className:"text-gray-600 text-[10px] mt-1",children:l(e.localMtime)})]}),r.jsxs("div",{className:"rounded-xl border border-orange-500/20 bg-orange-500/5 px-4 py-3",children:[r.jsx("p",{className:"text-[10px] font-bold text-orange-400/60 uppercase tracking-widest mb-1",children:"Cloud Agent"}),r.jsx("p",{className:"text-orange-300 font-bold text-sm",children:e.cloudAgentName??"—"}),r.jsx("p",{className:"text-orange-400/40 text-[10px] mt-1",children:l(e.cloudTimestamp)})]})]}),r.jsx("div",{className:"px-6 py-4 space-y-2",children:i?r.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-green-400 text-sm font-semibold",children:[r.jsx("span",{className:"w-4 h-4 rounded-full border-2 border-green-400 flex items-center justify-center text-[10px]",children:"✓"}),"Conflict resolved"]}):B_.map(c=>{const d=c.icon;return r.jsxs("button",{onClick:()=>o(c.decision),disabled:n,className:`w-full flex items-center gap-3 px-4 py-3 rounded-xl border transition-all text-left disabled:opacity-50 disabled:cursor-not-allowed ${c.accent}`,children:[n?r.jsx(te,{size:16,className:"animate-spin flex-shrink-0"}):r.jsx(d,{size:16,className:"flex-shrink-0"}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold text-sm text-white",children:c.label}),r.jsx("p",{className:"text-[11px] text-gray-500 mt-0.5",children:c.sublabel})]})]},c.decision)})}),r.jsx("div",{className:"px-6 pb-5 pt-1",children:r.jsx("p",{className:"text-[10px] text-gray-700 text-center",children:'This action cannot be undone · If unsure, choose "Create New Agent" first'})})]})})})}const Km="1.71.17";function V_(){const[e,t]=f.useState("idle"),[n,s]=f.useState(null),[i,a]=f.useState(""),[o,l]=f.useState("");f.useEffect(()=>{const m=setInterval(()=>{t(y=>((y==="idle"||y==="up-to-date")&&c(),y))},288e5);return()=>clearInterval(m)},[c]);const c=f.useCallback(async()=>{var h,m;t("checking"),a("");try{const y=await $("/api/system/version"),b=(y==null?void 0:y.current)||((h=y==null?void 0:y.data)==null?void 0:h.current)||Km,v=(y==null?void 0:y.latest)||((m=y==null?void 0:y.data)==null?void 0:m.latest)||b;s({current:b,latest:v}),$_(v,b)>0?t("update-available"):(t("up-to-date"),setTimeout(()=>t("idle"),3e3))}catch(y){a((y==null?void 0:y.message)??"Failed to check"),t("error")}},[]),d=f.useCallback(async()=>{t("downloading"),l("");try{const h=await fetch("/api/system/update",{method:"POST",credentials:"include"});if(!h.body)throw new Error("No response body");const m=h.body.getReader(),y=new TextDecoder;for(;;){const{done:b,value:v}=await m.read();if(b)break;l(g=>g+y.decode(v))}t("done")}catch(h){a((h==null?void 0:h.message)??"Update failed"),t("error")}},[]),u=f.useCallback(async()=>{t("restarting");try{await $("/api/system/restart",{method:"POST"})}catch{}const h=at();let m=0;const y=setInterval(()=>{m++,h.connected&&(clearInterval(y),window.location.reload()),m>60&&clearInterval(y)},500)},[]),p=(n==null?void 0:n.current)??Km;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col items-end gap-2",children:[r.jsxs("button",{onClick:e==="idle"||e==="up-to-date"||e==="error"?c:void 0,disabled:["checking","downloading","restarting"].includes(e),title:"Check for updates",className:Ke("flex items-center gap-2","py-2 px-4 rounded-full shadow-2xl","text-xs font-medium","transition-all duration-200",e==="update-available"?"bg-red-900/90 backdrop-blur-md border border-red-500/50 text-white hover:bg-red-800 hover:border-red-400/60":"bg-gray-900/90 backdrop-blur-md border border-gray-700/50 text-gray-300 hover:bg-gray-800 hover:border-gray-600/60 hover:text-white",["checking","downloading","restarting"].includes(e)&&"cursor-wait opacity-80"),children:[e==="checking"&&r.jsx(te,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="update-available"&&r.jsx(xi,{size:13,className:"text-red-300 shrink-0"}),e==="up-to-date"&&r.jsx(nc,{size:13,className:"text-emerald-400 shrink-0"}),e==="downloading"&&r.jsx(te,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="done"&&r.jsx(nc,{size:13,className:"text-emerald-400 shrink-0"}),e==="restarting"&&r.jsx(te,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="error"&&r.jsx(ln,{size:13,className:"text-red-400 shrink-0"}),e==="idle"&&r.jsx(le,{size:13,className:"text-gray-500 shrink-0"}),r.jsxs("span",{className:"tabular-nums",children:[r.jsx("span",{children:"Must-b v"}),r.jsx("span",{children:p})]}),e==="checking"&&r.jsx("span",{className:"text-orange-400/80",children:"Checking…"}),e==="up-to-date"&&r.jsx("span",{className:"text-emerald-400/80",children:"Up to date"}),e==="downloading"&&r.jsx("span",{className:"text-orange-400/80",children:"Installing…"}),e==="done"&&r.jsx("span",{className:"text-emerald-400/80",children:"Installed!"}),e==="restarting"&&r.jsx("span",{className:"text-orange-400/80",children:"Restarting…"}),e==="error"&&r.jsx("span",{className:"text-red-400/80 max-w-[120px] truncate",children:i})]}),e==="update-available"&&n&&r.jsxs("div",{className:"flex flex-col gap-3 p-4 rounded-2xl bg-gray-900/95 border border-orange-500/30 backdrop-blur-md shadow-2xl w-60",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(xi,{size:16,className:"text-orange-400 shrink-0"}),r.jsx("span",{className:"text-orange-300 font-semibold text-sm",children:"Update Available"})]}),r.jsxs("div",{className:"text-gray-400 text-xs leading-relaxed",children:[r.jsx("span",{children:"Version "}),r.jsx("span",{className:"font-mono text-white",children:n.latest}),r.jsx("span",{children:" is ready to install."})]}),r.jsxs("div",{className:"flex items-center justify-between text-[11px] text-gray-500",children:[r.jsxs("span",{children:["Current: ",r.jsx("span",{className:"font-mono",children:n.current})]}),r.jsxs("span",{children:["Latest: ",r.jsx("span",{className:"font-mono text-orange-300",children:n.latest})]})]}),r.jsxs("button",{onClick:d,className:"flex items-center justify-center gap-2 bg-orange-600 hover:bg-orange-500 active:scale-95 text-white rounded-xl py-2 text-xs font-semibold transition-all duration-150 shadow-lg shadow-orange-900/30",children:[r.jsx(xi,{size:13}),r.jsx("span",{children:"Download & Install"})]}),r.jsx("button",{onClick:()=>t("idle"),className:"text-center text-[11px] text-gray-600 hover:text-gray-400 transition-colors",children:r.jsx("span",{children:"Dismiss"})})]}),e==="downloading"&&r.jsxs("div",{className:"p-4 rounded-2xl bg-gray-900/95 border border-white/10 backdrop-blur-md shadow-2xl w-60",children:[r.jsxs("div",{className:"flex items-center gap-2 text-xs text-orange-300 mb-3",children:[r.jsx(te,{size:13,className:"animate-spin shrink-0"}),r.jsx("span",{children:"Installing update…"})]}),r.jsx("pre",{className:"text-[10px] text-gray-400 max-h-24 overflow-y-auto whitespace-pre-wrap break-all font-mono bg-black/30 rounded-lg p-2",children:r.jsx("span",{children:o||"Connecting to npm registry…"})})]}),e==="done"&&r.jsxs("div",{className:"flex flex-col gap-3 p-4 rounded-2xl bg-gray-900/95 border border-emerald-500/30 backdrop-blur-md shadow-2xl w-60",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(nc,{size:16,className:"text-emerald-400 shrink-0"}),r.jsx("span",{className:"text-emerald-300 font-semibold text-sm",children:"Update Installed!"})]}),r.jsx("p",{className:"text-gray-400 text-xs",children:r.jsx("span",{children:"Restart Must-b to apply the new version."})}),r.jsxs("button",{onClick:u,className:"flex items-center justify-center gap-2 bg-emerald-700 hover:bg-emerald-600 active:scale-95 text-white rounded-xl py-2 text-xs font-semibold transition-all duration-150",children:[r.jsx(le,{size:13}),r.jsx("span",{children:"Restart Now"})]})]})]}),e==="restarting"&&r.jsxs("div",{className:"fixed inset-0 z-[9999] flex flex-col items-center justify-center bg-black/80 backdrop-blur-sm",children:[r.jsx(te,{size:44,className:"animate-spin text-orange-400 mb-5"}),r.jsx("p",{className:"text-white text-lg font-semibold",children:r.jsx("span",{children:"Restarting Must-b…"})}),r.jsx("p",{className:"text-gray-400 text-sm mt-2",children:r.jsx("span",{children:"The dashboard will reload automatically."})})]})]})}function $_(e,t){const n=a=>a.replace(/[^0-9.]/g,"").split(".").map(Number),[s,i]=[n(e),n(t)];for(let a=0;a<Math.max(s.length,i.length);a++){const o=(s[a]??0)-(i[a]??0);if(o!==0)return o}return 0}class U_ extends f.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){console.error("[ErrorBoundary]",t,n.componentStack)}render(){return this.state.error?r.jsxs("div",{className:"min-h-screen bg-[#02040a] flex flex-col items-center justify-center gap-4 text-center px-6",children:[r.jsx("span",{className:"text-3xl",children:"⚠️"}),r.jsx("p",{className:"text-orange-400 font-bold text-sm",children:"Something went wrong"}),r.jsx("p",{className:"text-gray-600 text-xs font-mono max-w-sm break-all",children:this.state.error.message}),r.jsx("button",{onClick:()=>this.setState({error:null}),className:"mt-2 px-4 py-2 rounded-xl bg-orange-500/10 border border-orange-500/20 text-orange-400 text-xs font-bold hover:bg-orange-500/20 transition-all",children:"Retry"})]}):this.props.children}}const pc="mustb_setup_complete";function H_({children:e}){const t=un(),[n,s]=f.useState(()=>localStorage.getItem(pc)==="1");return f.useEffect(()=>{if(localStorage.getItem(pc)==="1"){s(!0);return}let i=!1;return fetch("/api/setup/status").then(a=>a.ok?a.json():{configured:!0}).then(a=>{i||(a.configured?(localStorage.setItem(pc,"1"),s(!0)):t("/setup",{replace:!0}))}).catch(()=>{i||s(!0)}),()=>{i=!0}},[t]),n?r.jsx(r.Fragment,{children:e}):null}function W_(){return r.jsx(U_,{children:r.jsx(p4,{children:r.jsxs(d2,{children:[r.jsx(V2,{position:"top-right",theme:"dark",closeButton:!0,richColors:!0}),r.jsx(F_,{}),r.jsx(V_,{}),r.jsxs(n2,{children:[r.jsx(we,{path:"/",element:r.jsx(vm,{})}),r.jsx(we,{path:"/welcome",element:r.jsx(vm,{})}),r.jsx(we,{path:"/setup",element:r.jsx(v4,{})}),r.jsxs(we,{path:"/app",element:r.jsx(H_,{children:r.jsx(I_,{})}),children:[r.jsx(we,{index:!0,element:r.jsx(Lm,{})}),r.jsx(we,{path:"chat",element:r.jsx(Lm,{})}),r.jsx(we,{path:"settings",element:r.jsx(nC,{})}),r.jsx(we,{path:"active",element:r.jsx(rC,{})}),r.jsx(we,{path:"automations",element:r.jsx(oC,{})}),r.jsx(we,{path:"clients",element:r.jsx(dC,{})}),r.jsx(we,{path:"logs",element:r.jsx(fC,{})}),r.jsx(we,{path:"products",element:r.jsx(xC,{})}),r.jsx(we,{path:"memory",element:r.jsx(NC,{})}),r.jsx(we,{path:"memory/persona",element:r.jsx(_C,{})}),r.jsx(we,{path:"skills",element:r.jsx(TC,{})}),r.jsx(we,{path:"plugins",element:r.jsx(zC,{})}),r.jsx(we,{path:"files",element:r.jsx(DC,{})}),r.jsx(we,{path:"browser",element:r.jsx(FC,{})}),r.jsx(we,{path:"voice",element:r.jsx(UC,{})}),r.jsx(we,{path:"*",element:r.jsx(Kp,{to:"/app",replace:!0})})]}),r.jsx(we,{path:"/mobile",element:r.jsx(LC,{})}),r.jsx(we,{path:"*",element:r.jsx(Kp,{to:"/",replace:!0})})]})]})})})}lx(document.getElementById("root")).render(r.jsx(f.StrictMode,{children:r.jsx(W_,{})}));
736
+ shadow-[0_24px_80px_rgba(0,0,0,0.7),0_0_0_1px_rgba(249,115,22,0.18)]`,onClick:s=>s.stopPropagation(),children:[r.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-orange-500/12 shrink-0",children:[r.jsx("span",{className:"text-[13px] font-bold text-white/80",children:t}),r.jsx("button",{onClick:n,className:"w-7 h-7 flex items-center justify-center rounded-full hover:bg-white/8 text-white/40 hover:text-white/70 transition-colors",children:r.jsx(st,{size:14})})]}),r.jsxs("div",{className:"flex-1 overflow-hidden min-h-0",children:[e==="memory"&&r.jsx(GC,{}),e==="plugins"&&r.jsx(YC,{}),e==="skills"&&r.jsx(ZC,{}),e==="workspace"&&r.jsx(r_,{}),e==="livesight"&&r.jsx(i_,{})]})]},"stage-card")]})}function I_(){const{t:e}=pt(),t=is(),n=un(),[s,i]=f.useState(!1),[a,o]=f.useState(""),[l,c]=f.useState(null),[d,u]=f.useState(!1);f.useEffect(()=>{const y=b=>{u(b.detail.active)};return window.addEventListener("mustb:safeMode",y),()=>window.removeEventListener("mustb:safeMode",y)},[]),f.useEffect(()=>{i(!1)},[t.pathname]),t.pathname,f.useCallback(y=>o(b=>b===y?"":y),[]),f.useCallback(y=>{c(y),o("")},[]);const p=f.useCallback(()=>c(null),[]),h=e.dock;h.cat_webTools,h.skill_webSearch,h.desc_webSearch,h.skill_webFetch,h.desc_webFetch,h.skill_browserControl,h.desc_browserControl,h.cat_fileMedia,h.skill_pdfReader,h.desc_pdfReader,h.skill_imageAnalysis,h.desc_imageAnalysis,h.skill_imageGeneration,h.desc_imageGeneration,h.skill_tts,h.desc_tts,h.cat_aiAgents,h.skills,h.skill_spawnAgent,h.desc_spawnAgent,h.skill_agentSessions,h.desc_agentSessions,h.skill_canvas,h.desc_canvas,h.skill_git,h.desc_git,h.cat_systemTools,h.skill_gateway,h.desc_gateway,h.skill_fileManager,h.desc_fileManager,h.skill_cron,h.desc_cron,h.skill_messages,h.desc_messages,h.cat_knowledgeBase,h.mem_browse,h.desc_memBrowse,h.mem_search,h.desc_memSearch,h.mem_add,h.desc_memAdd,h.cat_personalOrg,h.mem_contacts,h.desc_contacts,h.mem_calendar,h.desc_calendar,h.cat_pluginManager,h.plug_marketplace,h.desc_marketplace,h.plug_installed,h.desc_installed,h.plug_mcp,h.desc_mcp,h.cat_developer,h.plug_bundleMcp,h.desc_bundleMcp,h.plug_cliCmds,h.desc_cliCmds,h.cat_automation,h.wf_automations,h.desc_automations,h.wf_scheduled,h.desc_scheduled,h.wf_commands,h.desc_commands,h.cat_advanced,h.wf_nodes,h.desc_nodes,h.wf_multiAgent,h.desc_multiAgent;const m={memory:h.memory,plugins:h.plugins,skills:h.skills,workspace:h.files,livesight:"Visual Audit"};return r.jsx(J2,{reducedMotion:d?"always":"never",children:r.jsxs("div",{className:"relative min-h-screen overflow-x-hidden font-sans bg-transparent",children:[l&&r.jsx(O_,{panel:l,title:m[l],onClose:p}),r.jsx("div",{className:"fixed top-[14px] left-4 z-40 overflow-hidden",children:r.jsx("button",{onClick:()=>i(y=>!y),"aria-label":"Toggle sidebar",className:"p-2 rounded-full text-white/45 hover:text-white/90 hover:bg-white/8 transition-all leading-none",style:{backdropFilter:"blur(8px)",fontSize:0},children:r.jsx(VS,{size:17,"aria-hidden":"true",focusable:"false"})})}),r.jsxs("header",{className:"fixed top-0 inset-x-0 z-50 h-16 flex items-center justify-between px-6 pointer-events-none",children:[r.jsx("div",{}),r.jsxs("div",{className:"flex items-center gap-2.5 shrink-0 pointer-events-auto",children:[r.jsxs(hi,{to:"/app/voice",className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full text-[12px] font-medium transition-all select-none ${t.pathname==="/app/voice"?"bg-orange-500/20 text-orange-300 border border-orange-500/30":"text-white/45 hover:text-white/85 hover:bg-white/8"}`,title:e.nav.voice,children:[r.jsx(kS,{size:14}),r.jsx("span",{className:"hidden sm:inline",children:e.nav.voice})]}),r.jsx(U.div,{initial:{opacity:0,x:12},animate:{opacity:1,x:0},transition:{duration:.4,delay:.15},className:"flex items-center gap-1 px-2 py-1.5 rounded-full",style:{background:"rgba(255,255,255,0.05)",border:"1px solid rgba(255,255,255,0.09)"},children:r.jsx(HC,{})}),r.jsx(m_,{})]})]}),r.jsx(ee,{children:s&&r.jsx(U.div,{initial:{x:-280},animate:{x:0},exit:{x:-280},transition:{type:"spring",stiffness:340,damping:34},className:"fixed top-0 left-0 bottom-0 z-30 w-[280px]",children:r.jsx(D_,{onClose:()=>i(!1)})},"sidebar-panel")}),r.jsx("main",{className:"relative min-h-screen pt-16 transition-[margin] duration-300 bg-transparent",style:{marginLeft:s?280:0},children:r.jsx(e2,{})}),r.jsx(o_,{}),r.jsx(p_,{}),r.jsx(v_,{}),r.jsx(E_,{})]})})}const B_=[{decision:"duplicate",label:"Create New Agent",sublabel:"Keep both — cloud data is copied to a separate folder",icon:PS,accent:"border-blue-500/30 bg-blue-500/8 hover:border-blue-500/50 text-blue-400"},{decision:"restore",label:"Use Cloud (Overwrite)",sublabel:"Cloud wins — local memory is replaced with cloud version",icon:NS,accent:"border-orange-500/30 bg-orange-500/8 hover:border-orange-500/50 text-orange-400"},{decision:"upload",label:"Keep Mine",sublabel:"Local wins — cloud memory is overwritten with local data",icon:ZS,accent:"border-green-500/30 bg-green-500/8 hover:border-green-500/50 text-green-400"}];function F_(){const[e,t]=f.useState(null),[n,s]=f.useState(!1),[i,a]=f.useState(!1);f.useEffect(()=>{const c=at(),d=u=>{u.type==="CONFLICT_DETECTED"&&(t({localAgentName:u.localAgentName??null,cloudAgentName:u.cloudAgentName??null,localMtime:u.localMtime??null,cloudTimestamp:u.cloudTimestamp??null}),a(!1)),u.type==="syncResolveFinish"&&(a(!0),setTimeout(()=>{t(null),a(!1)},1800))};return c.on("agentUpdate",d),()=>{c.off("agentUpdate",d)}},[]);const o=async c=>{if(!n){s(!0);try{await fetch("/api/setup/sync-resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:c})})}catch{}s(!1)}},l=c=>{if(!c)return"—";try{return new Date(c).toLocaleString("en-US",{dateStyle:"medium",timeStyle:"short"})}catch{return c}};return r.jsx(ee,{children:e&&r.jsx(U.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/70 backdrop-blur-sm px-4",children:r.jsxs(U.div,{initial:{opacity:0,y:24,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:24,scale:.95},transition:{duration:.25},className:"w-full max-w-md bg-[#0c0f18] border border-white/10 rounded-2xl shadow-2xl overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-3 px-6 py-5 border-b border-white/8 bg-amber-500/5",children:[r.jsx("div",{className:"w-9 h-9 rounded-full bg-amber-500/15 flex items-center justify-center flex-shrink-0",children:r.jsx(es,{size:18,className:"text-amber-400"})}),r.jsxs("div",{children:[r.jsx("h2",{className:"text-white font-bold text-base",children:"Memory Conflict Detected"}),r.jsx("p",{className:"text-gray-500 text-xs mt-0.5",children:"Two agent identities found — action required"})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3 px-6 pt-5 pb-2",children:[r.jsxs("div",{className:"rounded-xl border border-white/8 bg-white/3 px-4 py-3",children:[r.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-1",children:"Local Agent"}),r.jsx("p",{className:"text-white font-bold text-sm",children:e.localAgentName??"—"}),r.jsx("p",{className:"text-gray-600 text-[10px] mt-1",children:l(e.localMtime)})]}),r.jsxs("div",{className:"rounded-xl border border-orange-500/20 bg-orange-500/5 px-4 py-3",children:[r.jsx("p",{className:"text-[10px] font-bold text-orange-400/60 uppercase tracking-widest mb-1",children:"Cloud Agent"}),r.jsx("p",{className:"text-orange-300 font-bold text-sm",children:e.cloudAgentName??"—"}),r.jsx("p",{className:"text-orange-400/40 text-[10px] mt-1",children:l(e.cloudTimestamp)})]})]}),r.jsx("div",{className:"px-6 py-4 space-y-2",children:i?r.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-green-400 text-sm font-semibold",children:[r.jsx("span",{className:"w-4 h-4 rounded-full border-2 border-green-400 flex items-center justify-center text-[10px]",children:"✓"}),"Conflict resolved"]}):B_.map(c=>{const d=c.icon;return r.jsxs("button",{onClick:()=>o(c.decision),disabled:n,className:`w-full flex items-center gap-3 px-4 py-3 rounded-xl border transition-all text-left disabled:opacity-50 disabled:cursor-not-allowed ${c.accent}`,children:[n?r.jsx(te,{size:16,className:"animate-spin flex-shrink-0"}):r.jsx(d,{size:16,className:"flex-shrink-0"}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold text-sm text-white",children:c.label}),r.jsx("p",{className:"text-[11px] text-gray-500 mt-0.5",children:c.sublabel})]})]},c.decision)})}),r.jsx("div",{className:"px-6 pb-5 pt-1",children:r.jsx("p",{className:"text-[10px] text-gray-700 text-center",children:'This action cannot be undone · If unsure, choose "Create New Agent" first'})})]})})})}const Km="1.71.18";function V_(){const[e,t]=f.useState("idle"),[n,s]=f.useState(null),[i,a]=f.useState(""),[o,l]=f.useState(""),c=f.useCallback(async()=>{var h,m;t("checking"),a("");try{const y=await $("/api/system/version"),b=(y==null?void 0:y.current)||((h=y==null?void 0:y.data)==null?void 0:h.current)||Km,v=(y==null?void 0:y.latest)||((m=y==null?void 0:y.data)==null?void 0:m.latest)||b;s({current:b,latest:v}),$_(v,b)>0?t("update-available"):(t("up-to-date"),setTimeout(()=>t("idle"),3e3))}catch(y){a((y==null?void 0:y.message)??"Failed to check"),t("error")}},[]);f.useEffect(()=>{const m=setInterval(()=>{t(y=>((y==="idle"||y==="up-to-date")&&c(),y))},288e5);return()=>clearInterval(m)},[c]);const d=f.useCallback(async()=>{t("downloading"),l("");try{const h=await fetch("/api/system/update",{method:"POST",credentials:"include"});if(!h.body)throw new Error("No response body");const m=h.body.getReader(),y=new TextDecoder;for(;;){const{done:b,value:v}=await m.read();if(b)break;l(g=>g+y.decode(v))}t("done")}catch(h){a((h==null?void 0:h.message)??"Update failed"),t("error")}},[]),u=f.useCallback(async()=>{t("restarting");try{await $("/api/system/restart",{method:"POST"})}catch{}const h=at();let m=0;const y=setInterval(()=>{m++,h.connected&&(clearInterval(y),window.location.reload()),m>60&&clearInterval(y)},500)},[]),p=(n==null?void 0:n.current)??Km;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col items-end gap-2",children:[r.jsxs("button",{onClick:e==="idle"||e==="up-to-date"||e==="error"?c:void 0,disabled:["checking","downloading","restarting"].includes(e),title:"Check for updates",className:Ke("flex items-center gap-2","py-2 px-4 rounded-full shadow-2xl","text-xs font-medium","transition-all duration-200",e==="update-available"?"bg-red-900/90 backdrop-blur-md border border-red-500/50 text-white hover:bg-red-800 hover:border-red-400/60":"bg-gray-900/90 backdrop-blur-md border border-gray-700/50 text-gray-300 hover:bg-gray-800 hover:border-gray-600/60 hover:text-white",["checking","downloading","restarting"].includes(e)&&"cursor-wait opacity-80"),children:[e==="checking"&&r.jsx(te,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="update-available"&&r.jsx(xi,{size:13,className:"text-red-300 shrink-0"}),e==="up-to-date"&&r.jsx(nc,{size:13,className:"text-emerald-400 shrink-0"}),e==="downloading"&&r.jsx(te,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="done"&&r.jsx(nc,{size:13,className:"text-emerald-400 shrink-0"}),e==="restarting"&&r.jsx(te,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="error"&&r.jsx(ln,{size:13,className:"text-red-400 shrink-0"}),e==="idle"&&r.jsx(le,{size:13,className:"text-gray-500 shrink-0"}),r.jsxs("span",{className:"tabular-nums",children:[r.jsx("span",{children:"Must-b v"}),r.jsx("span",{children:p})]}),e==="checking"&&r.jsx("span",{className:"text-orange-400/80",children:"Checking…"}),e==="up-to-date"&&r.jsx("span",{className:"text-emerald-400/80",children:"Up to date"}),e==="downloading"&&r.jsx("span",{className:"text-orange-400/80",children:"Installing…"}),e==="done"&&r.jsx("span",{className:"text-emerald-400/80",children:"Installed!"}),e==="restarting"&&r.jsx("span",{className:"text-orange-400/80",children:"Restarting…"}),e==="error"&&r.jsx("span",{className:"text-red-400/80 max-w-[120px] truncate",children:i})]}),e==="update-available"&&n&&r.jsxs("div",{className:"flex flex-col gap-3 p-4 rounded-2xl bg-gray-900/95 border border-orange-500/30 backdrop-blur-md shadow-2xl w-60",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(xi,{size:16,className:"text-orange-400 shrink-0"}),r.jsx("span",{className:"text-orange-300 font-semibold text-sm",children:"Update Available"})]}),r.jsxs("div",{className:"text-gray-400 text-xs leading-relaxed",children:[r.jsx("span",{children:"Version "}),r.jsx("span",{className:"font-mono text-white",children:n.latest}),r.jsx("span",{children:" is ready to install."})]}),r.jsxs("div",{className:"flex items-center justify-between text-[11px] text-gray-500",children:[r.jsxs("span",{children:["Current: ",r.jsx("span",{className:"font-mono",children:n.current})]}),r.jsxs("span",{children:["Latest: ",r.jsx("span",{className:"font-mono text-orange-300",children:n.latest})]})]}),r.jsxs("button",{onClick:d,className:"flex items-center justify-center gap-2 bg-orange-600 hover:bg-orange-500 active:scale-95 text-white rounded-xl py-2 text-xs font-semibold transition-all duration-150 shadow-lg shadow-orange-900/30",children:[r.jsx(xi,{size:13}),r.jsx("span",{children:"Download & Install"})]}),r.jsx("button",{onClick:()=>t("idle"),className:"text-center text-[11px] text-gray-600 hover:text-gray-400 transition-colors",children:r.jsx("span",{children:"Dismiss"})})]}),e==="downloading"&&r.jsxs("div",{className:"p-4 rounded-2xl bg-gray-900/95 border border-white/10 backdrop-blur-md shadow-2xl w-60",children:[r.jsxs("div",{className:"flex items-center gap-2 text-xs text-orange-300 mb-3",children:[r.jsx(te,{size:13,className:"animate-spin shrink-0"}),r.jsx("span",{children:"Installing update…"})]}),r.jsx("pre",{className:"text-[10px] text-gray-400 max-h-24 overflow-y-auto whitespace-pre-wrap break-all font-mono bg-black/30 rounded-lg p-2",children:r.jsx("span",{children:o||"Connecting to npm registry…"})})]}),e==="done"&&r.jsxs("div",{className:"flex flex-col gap-3 p-4 rounded-2xl bg-gray-900/95 border border-emerald-500/30 backdrop-blur-md shadow-2xl w-60",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(nc,{size:16,className:"text-emerald-400 shrink-0"}),r.jsx("span",{className:"text-emerald-300 font-semibold text-sm",children:"Update Installed!"})]}),r.jsx("p",{className:"text-gray-400 text-xs",children:r.jsx("span",{children:"Restart Must-b to apply the new version."})}),r.jsxs("button",{onClick:u,className:"flex items-center justify-center gap-2 bg-emerald-700 hover:bg-emerald-600 active:scale-95 text-white rounded-xl py-2 text-xs font-semibold transition-all duration-150",children:[r.jsx(le,{size:13}),r.jsx("span",{children:"Restart Now"})]})]})]}),e==="restarting"&&r.jsxs("div",{className:"fixed inset-0 z-[9999] flex flex-col items-center justify-center bg-black/80 backdrop-blur-sm",children:[r.jsx(te,{size:44,className:"animate-spin text-orange-400 mb-5"}),r.jsx("p",{className:"text-white text-lg font-semibold",children:r.jsx("span",{children:"Restarting Must-b…"})}),r.jsx("p",{className:"text-gray-400 text-sm mt-2",children:r.jsx("span",{children:"The dashboard will reload automatically."})})]})]})}function $_(e,t){const n=a=>a.replace(/[^0-9.]/g,"").split(".").map(Number),[s,i]=[n(e),n(t)];for(let a=0;a<Math.max(s.length,i.length);a++){const o=(s[a]??0)-(i[a]??0);if(o!==0)return o}return 0}class U_ extends f.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){console.error("[ErrorBoundary]",t,n.componentStack)}render(){return this.state.error?r.jsxs("div",{className:"min-h-screen bg-[#02040a] flex flex-col items-center justify-center gap-4 text-center px-6",children:[r.jsx("span",{className:"text-3xl",children:"⚠️"}),r.jsx("p",{className:"text-orange-400 font-bold text-sm",children:"Something went wrong"}),r.jsx("p",{className:"text-gray-600 text-xs font-mono max-w-sm break-all",children:this.state.error.message}),r.jsx("button",{onClick:()=>this.setState({error:null}),className:"mt-2 px-4 py-2 rounded-xl bg-orange-500/10 border border-orange-500/20 text-orange-400 text-xs font-bold hover:bg-orange-500/20 transition-all",children:"Retry"})]}):this.props.children}}const pc="mustb_setup_complete";function H_({children:e}){const t=un(),[n,s]=f.useState(()=>localStorage.getItem(pc)==="1");return f.useEffect(()=>{if(localStorage.getItem(pc)==="1"){s(!0);return}let i=!1;return fetch("/api/setup/status").then(a=>a.ok?a.json():{configured:!0}).then(a=>{i||(a.configured?(localStorage.setItem(pc,"1"),s(!0)):t("/setup",{replace:!0}))}).catch(()=>{i||s(!0)}),()=>{i=!0}},[t]),n?r.jsx(r.Fragment,{children:e}):null}function W_(){return r.jsx(U_,{children:r.jsx(p4,{children:r.jsxs(d2,{children:[r.jsx(V2,{position:"top-right",theme:"dark",closeButton:!0,richColors:!0}),r.jsx(F_,{}),r.jsx(V_,{}),r.jsxs(n2,{children:[r.jsx(we,{path:"/",element:r.jsx(vm,{})}),r.jsx(we,{path:"/welcome",element:r.jsx(vm,{})}),r.jsx(we,{path:"/setup",element:r.jsx(v4,{})}),r.jsxs(we,{path:"/app",element:r.jsx(H_,{children:r.jsx(I_,{})}),children:[r.jsx(we,{index:!0,element:r.jsx(Lm,{})}),r.jsx(we,{path:"chat",element:r.jsx(Lm,{})}),r.jsx(we,{path:"settings",element:r.jsx(nC,{})}),r.jsx(we,{path:"active",element:r.jsx(rC,{})}),r.jsx(we,{path:"automations",element:r.jsx(oC,{})}),r.jsx(we,{path:"clients",element:r.jsx(dC,{})}),r.jsx(we,{path:"logs",element:r.jsx(fC,{})}),r.jsx(we,{path:"products",element:r.jsx(xC,{})}),r.jsx(we,{path:"memory",element:r.jsx(NC,{})}),r.jsx(we,{path:"memory/persona",element:r.jsx(_C,{})}),r.jsx(we,{path:"skills",element:r.jsx(TC,{})}),r.jsx(we,{path:"plugins",element:r.jsx(zC,{})}),r.jsx(we,{path:"files",element:r.jsx(DC,{})}),r.jsx(we,{path:"browser",element:r.jsx(FC,{})}),r.jsx(we,{path:"voice",element:r.jsx(UC,{})}),r.jsx(we,{path:"*",element:r.jsx(Kp,{to:"/app",replace:!0})})]}),r.jsx(we,{path:"/mobile",element:r.jsx(LC,{})}),r.jsx(we,{path:"*",element:r.jsx(Kp,{to:"/",replace:!0})})]})]})})})}lx(document.getElementById("root")).render(r.jsx(f.StrictMode,{children:r.jsx(W_,{})}));
@@ -11,7 +11,7 @@
11
11
  <meta property="og:type" content="website" />
12
12
  <link rel="preconnect" href="https://fonts.googleapis.com" />
13
13
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
14
- <script type="module" crossorigin src="/assets/index-pS4HhI16.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-7otqK4zu.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="/assets/index-CEfH8d-_.css">
16
16
  </head>
17
17
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@must-b/must-b",
3
- "version": "1.71.17",
4
- "description": "Must-b v1.71.17 — Autonomous AI agent with Computer Use + Voice pipeline + cross-platform OS abstraction + MetaTrader 5 finance bridge, 57+ embedded skills — 8-hour auto-update check + graceful ASCII terminal exit",
3
+ "version": "1.71.18",
4
+ "description": "Must-b v1.71.18 — Autonomous AI agent with Computer Use + Voice pipeline + cross-platform OS abstraction + MetaTrader 5 finance bridge, 57+ embedded skills — 8-hour auto-update check + graceful ASCII terminal exit",
5
5
  "license": "MIT",
6
6
  "author": "Must-b Inc.",
7
7
  "homepage": "https://must-b.com",