@must-b/must-b 1.72.16 → 1.72.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.72.16",
4
- "gitHash": "d03b1601",
5
- "buildTime": "2026-04-28T20:21:01.714Z",
3
+ "version": "1.72.18",
4
+ "gitHash": "cfb8e4b1",
5
+ "buildTime": "2026-04-28T21:40:30.432Z",
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-28T20:20:21.519Z",
3
+ "generatedAt": "2026-04-28T21:39:47.472Z",
4
4
  "count": 57,
5
5
  "skills": [
6
6
  {
package/dist/index.cjs CHANGED
@@ -4440,7 +4440,7 @@ ${Q}${m}`+p.repeat(E)+`${Q}`,I}function l(E,B,g,Q){return`${B}${Q}`+g.repeat(E)+
4440
4440
  \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
4441
4441
  \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
4442
4442
  \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
4443
- \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 oFe(){try{return"1.72.16"}catch{return"1.0.0"}}function lFe(){try{return"d03b1601"}catch{return""}}function n0(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 CmA(e="\u2500",A=58){return dl(" "+e.repeat(A))}function VI(e,A){let t=oFe(),i=lFe();console.log(DmA(sFe)),console.log(""),console.log(n0(rFe(aFe("Must-b"))+" "+ImA("v"+t))),console.log(n0(dl("Professional AI Operating System"))),console.log(""),console.log(n0(DmA("\u26A1 Autonomous \xB7 Precise \xB7 Always On"))),console.log(n0(dl("Vision")+dl(" \xB7 ")+dl("Voice")+dl(" \xB7 ")+dl("OS Control")+dl(" \xB7 ")+dl("Multi-Agent Hierarchy"))),console.log(""),console.log(CmA()),console.log("");let a=[`Node ${process.version}`,`Mode: ${e.toUpperCase()}`,`PID ${process.pid}`,i?`#${i}`:null].filter(Boolean).join(dl(" \xB7 "));console.log(n0(dl(a))),e==="web"&&(console.log(""),console.log(n0(nFe("\u25B6 ")+ImA(`http://localhost:${A}`))),console.log(n0(dl("Dashboard is live \u2014 open in your browser")))),console.log(""),console.log(CmA()),console.log(n0(dl("Built by Auto Step \xB7 https://must-b.com"))),console.log("")}var kmA=require("events"),vmA=require("module"),SM=VA(require("path"),1),_M=VA(require("fs"),1),RE=VA(require("os"),1);function bmA(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 cFe(e,A){let t=`${e}
4443
+ \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 oFe(){try{return"1.72.18"}catch{return"1.0.0"}}function lFe(){try{return"cfb8e4b1"}catch{return""}}function n0(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 CmA(e="\u2500",A=58){return dl(" "+e.repeat(A))}function VI(e,A){let t=oFe(),i=lFe();console.log(DmA(sFe)),console.log(""),console.log(n0(rFe(aFe("Must-b"))+" "+ImA("v"+t))),console.log(n0(dl("Professional AI Operating System"))),console.log(""),console.log(n0(DmA("\u26A1 Autonomous \xB7 Precise \xB7 Always On"))),console.log(n0(dl("Vision")+dl(" \xB7 ")+dl("Voice")+dl(" \xB7 ")+dl("OS Control")+dl(" \xB7 ")+dl("Multi-Agent Hierarchy"))),console.log(""),console.log(CmA()),console.log("");let a=[`Node ${process.version}`,`Mode: ${e.toUpperCase()}`,`PID ${process.pid}`,i?`#${i}`:null].filter(Boolean).join(dl(" \xB7 "));console.log(n0(dl(a))),e==="web"&&(console.log(""),console.log(n0(nFe("\u25B6 ")+ImA(`http://localhost:${A}`))),console.log(n0(dl("Dashboard is live \u2014 open in your browser")))),console.log(""),console.log(CmA()),console.log(n0(dl("Built by Auto Step \xB7 https://must-b.com"))),console.log("")}var kmA=require("events"),vmA=require("module"),SM=VA(require("path"),1),_M=VA(require("fs"),1),RE=VA(require("os"),1);function bmA(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 cFe(e,A){let t=`${e}
4444
4444
 
4445
4445
  COORDINATOR INSTRUCTION: Generate ONLY research steps (read-only, no file writes).
4446
4446
  Steps must use ONLY these tools: filesystem_read, filesystem_list, filesystem_search,
package/dist/index.js CHANGED
@@ -4440,7 +4440,7 @@ ${Q}${m}`+p.repeat(E)+`${Q}`,I}function l(E,B,g,Q){return`${B}${Q}`+g.repeat(E)+
4440
4440
  \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
4441
4441
  \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
4442
4442
  \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
4443
- \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 oFe(){try{return"1.72.16"}catch{return"1.0.0"}}function lFe(){try{return"d03b1601"}catch{return""}}function n0(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 CmA(e="\u2500",A=58){return dl(" "+e.repeat(A))}function VI(e,A){let t=oFe(),i=lFe();console.log(DmA(sFe)),console.log(""),console.log(n0(rFe(aFe("Must-b"))+" "+ImA("v"+t))),console.log(n0(dl("Professional AI Operating System"))),console.log(""),console.log(n0(DmA("\u26A1 Autonomous \xB7 Precise \xB7 Always On"))),console.log(n0(dl("Vision")+dl(" \xB7 ")+dl("Voice")+dl(" \xB7 ")+dl("OS Control")+dl(" \xB7 ")+dl("Multi-Agent Hierarchy"))),console.log(""),console.log(CmA()),console.log("");let a=[`Node ${process.version}`,`Mode: ${e.toUpperCase()}`,`PID ${process.pid}`,i?`#${i}`:null].filter(Boolean).join(dl(" \xB7 "));console.log(n0(dl(a))),e==="web"&&(console.log(""),console.log(n0(nFe("\u25B6 ")+ImA(`http://localhost:${A}`))),console.log(n0(dl("Dashboard is live \u2014 open in your browser")))),console.log(""),console.log(CmA()),console.log(n0(dl("Built by Auto Step \xB7 https://must-b.com"))),console.log("")}var kmA=require("events"),vmA=require("module"),SM=VA(require("path"),1),_M=VA(require("fs"),1),RE=VA(require("os"),1);function bmA(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 cFe(e,A){let t=`${e}
4443
+ \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 oFe(){try{return"1.72.18"}catch{return"1.0.0"}}function lFe(){try{return"cfb8e4b1"}catch{return""}}function n0(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 CmA(e="\u2500",A=58){return dl(" "+e.repeat(A))}function VI(e,A){let t=oFe(),i=lFe();console.log(DmA(sFe)),console.log(""),console.log(n0(rFe(aFe("Must-b"))+" "+ImA("v"+t))),console.log(n0(dl("Professional AI Operating System"))),console.log(""),console.log(n0(DmA("\u26A1 Autonomous \xB7 Precise \xB7 Always On"))),console.log(n0(dl("Vision")+dl(" \xB7 ")+dl("Voice")+dl(" \xB7 ")+dl("OS Control")+dl(" \xB7 ")+dl("Multi-Agent Hierarchy"))),console.log(""),console.log(CmA()),console.log("");let a=[`Node ${process.version}`,`Mode: ${e.toUpperCase()}`,`PID ${process.pid}`,i?`#${i}`:null].filter(Boolean).join(dl(" \xB7 "));console.log(n0(dl(a))),e==="web"&&(console.log(""),console.log(n0(nFe("\u25B6 ")+ImA(`http://localhost:${A}`))),console.log(n0(dl("Dashboard is live \u2014 open in your browser")))),console.log(""),console.log(CmA()),console.log(n0(dl("Built by Auto Step \xB7 https://must-b.com"))),console.log("")}var kmA=require("events"),vmA=require("module"),SM=VA(require("path"),1),_M=VA(require("fs"),1),RE=VA(require("os"),1);function bmA(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 cFe(e,A){let t=`${e}
4444
4444
 
4445
4445
  COORDINATOR INSTRUCTION: Generate ONLY research steps (read-only, no file writes).
4446
4446
  Steps must use ONLY these tools: filesystem_read, filesystem_list, filesystem_search,
@@ -827,7 +827,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
827
827
  group-hover:bg-red-500/10 transition-all shrink-0`,children:r.jsx(tf,{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 s6=4,r6=3e3;function i6(){return r.jsxs(H.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:s6}).map((e,t)=>r.jsx(H.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(H.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(Ds,{size:26,className:"text-orange-400"})}),r.jsx(H.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 a6(){const[e,t]=h.useState(!1),n=h.useRef(null),s=h.useCallback(()=>{t(!0),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>t(!1),r6)},[]);return h.useEffect(()=>(window.addEventListener("mustb:wake",s),()=>{window.removeEventListener("mustb:wake",s),n.current&&clearTimeout(n.current)}),[s]),r.jsx(se,{children:e&&r.jsx(i6,{},"wake-aura")})}const o6={browser_navigate:"navigate",web_search:"search",http_request:"request"},l6=20,c6=5e3;function u6(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e.slice(0,30)}}function d6(e){try{return new URL(e).pathname.slice(0,40)||"/"}catch{return""}}function h6(e){return e==="search"?r.jsx(Xt,{size:10}):e==="request"?r.jsx(Gr,{size:10}):r.jsx(We,{size:10})}function db(e){return e==="search"?"#a78bfa":e==="request"?"#94a3b8":"#38bdf8"}function f6({domain:e,kind:t}){var i;const n=((i=e[0])==null?void 0:i.toUpperCase())??"?",s=db(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 p6({entry:e,isLatest:t}){var a;const n=db(e.kind),s=e.domain??"",i=e.query??(e.url?d6(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(f6,{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:h6(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 m6(){const[e,t]=h.useState([]),[n,s]=h.useState(!1),[i,a]=h.useState(!1),[o,l]=h.useState(!1),c=h.useRef(null),u=h.useCallback(()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{s(!1),t([]),l(!1)},c6)},[]);return h.useEffect(()=>{const d=at(),p=f=>{const{type:m}=f;if(m==="planStart"){c.current&&clearTimeout(c.current),l(!0);return}if(m==="planFinish"){l(!1),t(b=>b.map(y=>({...y,done:!0}))),u();return}if(m==="stepStart"&&f.step){const b=f.step,y=b.tool?o6[b.tool]:void 0;if(!y)return;const v=b.parameters??{},g=String(v.url??v.endpoint??"").trim(),x=String(v.query??"").trim();if(!g&&!x)return;const w={id:`v-${Date.now()}-${Math.random().toString(36).slice(2,5)}`,kind:y,url:g||void 0,query:x||void 0,domain:g?u6(g):void 0,ts:Date.now(),done:!1};t(j=>[w,...j].slice(0,l6)),s(!0),a(!1)}};return d.on("agentUpdate",p),()=>{d.off("agentUpdate",p),c.current&&clearTimeout(c.current)}},[u]),!n||e.length===0?null:r.jsx(H.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(d=>!d),children:[r.jsx(kC,{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(H.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:d=>{d.stopPropagation(),s(!1),t([])},className:"text-white/20 hover:text-white/50 transition-colors flex-shrink-0 ml-1",children:r.jsx(et,{size:10})}),r.jsx("span",{className:"text-white/20 flex-shrink-0",children:i?r.jsx(Ml,{size:10}):r.jsx(Kr,{size:10})})]}),r.jsx(se,{children:!i&&r.jsxs(H.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(se,{mode:"popLayout",children:e.map((d,p)=>r.jsx(H.div,{layout:!0,initial:{opacity:0,x:16},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},children:r.jsx(p6,{entry:d,isLatest:p===0&&o})},d.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(d=>d.kind==="navigate").length," gezinti ·"," ",e.filter(d=>d.kind==="search").length," arama ·"," ",e.filter(d=>d.kind==="request").length," istek"]})})]})})]})})}function g6(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 x6=["Today","Yesterday","Last 7 Days","Older"],y6="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",v6="bg-orange-500/15 text-orange-300 border border-orange-500/25",b6="text-white/80 hover:text-white/95 hover:bg-white/6";function w6(e){return Xe(y6,e?v6:b6)}function k6(e){return e?"text-orange-400 shrink-0":"text-white/70 shrink-0"}function j6({onClose:e}){const{t}=pt(),n=hs(),s=mn(),i=n.pathname,[a,o]=h.useState([]),[l,c]=h.useState(null),[u,d]=h.useState(""),[p,f]=h.useState(null),[m,b]=h.useState(null),[y,v]=h.useState(""),[g,x]=h.useState(""),[w,j]=h.useState(!1),k=h.useCallback(async()=>{try{const T=await $("/api/chats");if(!T.ok)return;const V=await T.json();o(V);const R=new Set([...V.map(I=>I.id),"default"]);for(let I=localStorage.length-1;I>=0;I--){const L=localStorage.key(I);L!=null&&L.startsWith("mustb_chat_turns_")&&!R.has(L.slice(17))&&localStorage.removeItem(L)}}catch{}},[]);h.useEffect(()=>{k();const T=setInterval(k,1e4);return()=>clearInterval(T)},[k]),h.useEffect(()=>{const T=V=>{const{id:R,title:I}=V.detail;o(L=>L.map(z=>z.id===R?{...z,title:I}:z))};return window.addEventListener("mustb:chat-renamed",T),()=>window.removeEventListener("mustb:chat-renamed",T)},[]),h.useEffect(()=>{$("/api/setup/status").then(T=>T.ok?T.json():null).then(T=>{T&&(v(T.activeProvider??""),x(T.activeModel??""))}).catch(()=>{}),fetch("/api/auth/user-status").then(T=>T.json()).then(T=>j(!!T.authenticated)).catch(()=>{})},[]);const N=async()=>{try{const T=await $("/api/chats",{method:"POST",body:JSON.stringify({title:"New Chat"})});if(!T.ok){ue.error("Failed to create chat.");return}const V=await T.json();o(R=>[V,...R]),s(`/app?chat=${V.id}`),e()}catch{ue.error("Gateway unreachable.")}},S=async()=>{if(p){try{await $(`/api/chats/${p}`,{method:"DELETE"}),o(T=>T.filter(V=>V.id!==p)),ue.success("Chat deleted."),i.includes(p)&&s("/app")}catch{ue.error("Failed to delete chat.")}f(null)}},E=async T=>{b(null);try{await $(`/api/chats/${T}`,{method:"PATCH",body:JSON.stringify({archived:!0})}),o(V=>V.filter(R=>R.id!==T)),ue.success("Chat archived.")}catch{ue.error("Failed to archive chat.")}},P=async()=>{if(!l||!u.trim()){c(null);return}try{await $(`/api/chats/${l}`,{method:"PATCH",body:JSON.stringify({title:u})}),o(T=>T.map(V=>V.id===l?{...V,title:u}:V)),ue.success("Chat renamed.")}catch{ue.error("Failed to rename chat.")}c(null)},M=[{to:"/app/browser",icon:r.jsx(We,{size:14}),label:t.nav.browser},{to:"/app/automations",icon:r.jsx($C,{size:14}),label:t.nav.workflows},{to:"/app/skills",icon:r.jsx(ze,{size:14}),label:t.nav.skills},{to:"/app/plugins",icon:r.jsx(Ir,{size:14}),label:t.nav.plugins},{to:"/app/store",icon:r.jsx(pv,{size:14}),label:"Store"},{to:"/app/channels",icon:r.jsx(rf,{size:14}),label:t.nav.channels},{to:"/app/files",icon:r.jsx(ps,{size:14}),label:t.nav.files},{to:"/app/memory",icon:r.jsx(va,{size:14}),label:t.nav.memory,exact:!0},{to:"/app/settings",icon:r.jsx(af,{size:14}),label:t.nav.settings,exact:!0},{to:"/app/settings?tab=api-keys",icon:r.jsx(av,{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(Ei,{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:N,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(zl,{size:14}),t.sidebar.newChat]})}),r.jsxs("div",{className:"flex-1 overflow-y-auto scrollbar-hide px-2 pb-4",onClick:()=>m&&b(null),children:[(()=>{const T={Today:[],Yesterday:[],"Last 7 Days":[],Older:[]};for(const V of a)T[g6(V)].push(V);return x6.map(V=>{const R=T[V];return R.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:V}),r.jsx("div",{className:"space-y-0.5",children:R.map(I=>r.jsx("div",{className:"group relative",children:l===I.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:u,onChange:L=>d(L.target.value),className:"flex-1 bg-transparent text-[13px] text-white/80 outline-none min-w-0",autoFocus:!0,onKeyDown:L=>{L.key==="Enter"&&P(),L.key==="Escape"&&c(null)}}),r.jsx("button",{onClick:P,className:"p-1 text-green-400 hover:bg-green-400/10 rounded transition-colors",children:r.jsx(zt,{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(et,{size:12})})]}):r.jsxs(r.Fragment,{children:[r.jsxs(Ei,{to:`/app?chat=${I.id}`,onClick:e,className:Xe("flex items-center gap-2.5 px-2.5 py-2 rounded-lg transition-all text-[13px] font-medium pr-8",i.includes(I.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(Os,{size:13,className:i.includes(I.id)?"text-orange-400 shrink-0":"text-white/30 shrink-0"}),r.jsx("span",{className:"flex-1 truncate",children:I.title})]}),r.jsx("button",{onClick:L=>{L.preventDefault(),L.stopPropagation(),b(m===I.id?null:I.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(lC,{size:14})}),m===I.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:L=>L.stopPropagation(),children:[r.jsxs("button",{onClick:()=>{b(null),c(I.id),d(I.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(TC,{size:12,className:"text-white/35 shrink-0"})," Rename"]}),r.jsxs("button",{onClick:()=>E(I.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(Z4,{size:12,className:"text-white/35 shrink-0"})," Archive"]}),r.jsx("hr",{className:"my-1 border-white/8"}),r.jsxs("button",{onClick:L=>{L.preventDefault(),L.stopPropagation(),b(null),f(I.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(Us,{size:12,className:"shrink-0"})," Delete"]})]})]})},I.id))})]},V)})})(),r.jsx("hr",{className:"my-3 border-white/10"}),M.map(({to:T,icon:V,label:R,exact:I})=>{const L=T.split("?")[0],z=I?i===L:i.startsWith(L);return r.jsxs(Ei,{to:T,onClick:e,className:w6(z),children:[r.jsx("span",{className:k6(z),children:V}),R]},T)})]}),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}),y&&r.jsx("p",{className:"text-white/30 text-[10px] capitalize",children:y})]}),w&&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(tf,{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:()=>f(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:S,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 pe(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 N6({panel:e,title:t,onClose:n}){return h.useEffect(()=>{const s=i=>{i.key==="Escape"&&n()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[n]),r.jsxs(se,{children:[r.jsx(H.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(H.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
828
828
  w-full max-w-2xl max-h-[calc(100vh-92px)]
829
829
  glass-panel rounded-3xl overflow-hidden flex flex-col
830
- 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(et,{size:14})})]}),r.jsxs("div",{className:"flex-1 overflow-hidden min-h-0",children:[e==="memory"&&r.jsx(RP,{}),e==="plugins"&&r.jsx(OP,{}),e==="skills"&&r.jsx(FP,{}),e==="workspace"&&r.jsx(WP,{}),e==="livesight"&&r.jsx(KP,{})]})]},"stage-card")]})}function S6(){const{t:e}=pt(),t=hs(),n=mn(),[s,i]=h.useState(!1),[a,o]=h.useState(""),[l,c]=h.useState(null),[u,d]=h.useState(!1);h.useEffect(()=>{const b=y=>{d(y.detail.active)};return window.addEventListener("mustb:safeMode",b),()=>window.removeEventListener("mustb:safeMode",b)},[]),h.useEffect(()=>{i(!1)},[t.pathname]),t.pathname,h.useCallback(b=>o(y=>y===b?"":b),[]),h.useCallback(b=>{c(b),o("")},[]);const p=h.useCallback(()=>c(null),[]),f=e.dock;f.cat_webTools,f.skill_webSearch,f.desc_webSearch,f.skill_webFetch,f.desc_webFetch,f.skill_browserControl,f.desc_browserControl,f.cat_fileMedia,f.skill_pdfReader,f.desc_pdfReader,f.skill_imageAnalysis,f.desc_imageAnalysis,f.skill_imageGeneration,f.desc_imageGeneration,f.skill_tts,f.desc_tts,f.cat_aiAgents,f.skills,f.skill_spawnAgent,f.desc_spawnAgent,f.skill_agentSessions,f.desc_agentSessions,f.skill_canvas,f.desc_canvas,f.skill_git,f.desc_git,f.cat_systemTools,f.skill_gateway,f.desc_gateway,f.skill_fileManager,f.desc_fileManager,f.skill_cron,f.desc_cron,f.skill_messages,f.desc_messages,f.cat_knowledgeBase,f.mem_browse,f.desc_memBrowse,f.mem_search,f.desc_memSearch,f.mem_add,f.desc_memAdd,f.cat_personalOrg,f.mem_contacts,f.desc_contacts,f.mem_calendar,f.desc_calendar,f.cat_pluginManager,f.plug_marketplace,f.desc_marketplace,f.plug_installed,f.desc_installed,f.plug_mcp,f.desc_mcp,f.cat_developer,f.plug_bundleMcp,f.desc_bundleMcp,f.plug_cliCmds,f.desc_cliCmds,f.cat_automation,f.wf_automations,f.desc_automations,f.wf_scheduled,f.desc_scheduled,f.wf_commands,f.desc_commands,f.cat_advanced,f.wf_nodes,f.desc_nodes,f.wf_multiAgent,f.desc_multiAgent;const m={memory:f.memory,plugins:f.plugins,skills:f.skills,workspace:f.files,livesight:"Visual Audit"};return r.jsx(R5,{reducedMotion:u?"always":"never",children:r.jsxs("div",{className:"relative min-h-screen overflow-x-hidden font-sans bg-transparent",children:[l&&r.jsx(N6,{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(b=>!b),"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(NC,{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(Ei,{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(sC,{size:14}),r.jsx("span",{className:"hidden sm:inline",children:e.nav.voice})]}),r.jsx(H.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(MP,{})}),r.jsx(n6,{})]})]}),r.jsx(se,{children:s&&r.jsx(H.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(j6,{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(Lk,{})}),r.jsx(qP,{}),r.jsx(e6,{}),r.jsx(a6,{}),r.jsx(m6,{})]})})}const C6=[{decision:"duplicate",label:"Create New Agent",sublabel:"Keep both — cloud data is copied to a separate folder",icon:hC,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:aC,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:LC,accent:"border-green-500/30 bg-green-500/8 hover:border-green-500/50 text-green-400"}];function E6(){const[e,t]=h.useState(null),[n,s]=h.useState(!1),[i,a]=h.useState(!1);h.useEffect(()=>{const c=at(),u=d=>{d.type==="CONFLICT_DETECTED"&&(t({localAgentName:d.localAgentName??null,cloudAgentName:d.cloudAgentName??null,localMtime:d.localMtime??null,cloudTimestamp:d.cloudTimestamp??null}),a(!1)),d.type==="syncResolveFinish"&&(a(!0),setTimeout(()=>{t(null),a(!1)},1800))};return c.on("agentUpdate",u),()=>{c.off("agentUpdate",u)}},[]);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(se,{children:e&&r.jsx(H.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(H.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(os,{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"]}):C6.map(c=>{const u=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(ne,{size:16,className:"animate-spin flex-shrink-0"}):r.jsx(u,{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 _6="1.72.16";function T6(){const[e,t]=h.useState("idle"),[n,s]=h.useState(null),[i,a]=h.useState(""),[o,l]=h.useState(""),c=h.useRef(!1),u=h.useCallback(async()=>{var m,b;t("checking"),a("");try{const y=await $("/api/system/version");if(!y.ok)throw new Error(`Server returned ${y.status}`);const g=await y.json(),x=(g==null?void 0:g.current)??((m=g==null?void 0:g.data)==null?void 0:m.current),w=(g==null?void 0:g.latest)??((b=g==null?void 0:g.data)==null?void 0:b.latest);if(!x||!w)throw new Error("Version endpoint returned incomplete data");s({current:x,latest:w}),P6(w,x)>0?t("update-available"):(t("up-to-date"),setTimeout(()=>t("idle"),3e3))}catch(y){a((y==null?void 0:y.message)??"Check failed"),t("error"),setTimeout(()=>{t("idle"),a("")},4e3)}},[]);h.useEffect(()=>{if(e!=="restarting")return;const m=setTimeout(()=>window.close(),1e4),b=setInterval(async()=>{try{(await fetch("/api/system/health",{credentials:"include"})).ok&&(clearInterval(b),clearTimeout(m),c.current=!0,t("done"),window.close())}catch{}},3e3);return()=>{clearInterval(b),clearTimeout(m)}},[e]),h.useEffect(()=>{const b=setInterval(()=>{t(y=>((y==="idle"||y==="up-to-date")&&u(),y))},288e5);return()=>clearInterval(b)},[u]);const d=h.useCallback(async()=>{t("downloading"),l("");try{const m=await fetch("/api/system/update",{method:"POST",credentials:"include"});if(!m.body)throw new Error("No response body");const b=m.body.getReader(),y=new TextDecoder;let v="";for(;;){const{done:g,value:x}=await b.read();if(g)break;const w=y.decode(x);v+=w,l(j=>j+w)}v.includes("__MUSTB_SHUTTING_DOWN__")?t("restarting"):v.includes("❌")?(a("Install failed — see log above"),t("error"),setTimeout(()=>{t("idle"),a("")},5e3)):t("done")}catch(m){a((m==null?void 0:m.message)??"Update failed"),t("error")}},[]),p=h.useCallback(async()=>{t("restarting");try{await $("/api/system/restart",{method:"POST"})}catch{}const m=at();let b=0;const y=setInterval(()=>{b++,m.connected&&(clearInterval(y),window.location.reload()),b>60&&clearInterval(y)},500)},[]),f=(n==null?void 0:n.current)??_6;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:[!["update-available","downloading","done","restarting"].includes(e)&&r.jsxs("button",{onClick:e==="idle"||e==="up-to-date"||e==="error"?u:void 0,disabled:["checking","downloading","restarting"].includes(e),title:"Check for updates",className:Xe("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":e==="error"?"bg-amber-900/90 backdrop-blur-md border border-amber-500/60 text-white hover:bg-amber-800 hover:border-amber-400/70":"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(ne,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="update-available"&&r.jsx(Ai,{size:13,className:"text-red-300 shrink-0"}),e==="up-to-date"&&r.jsx(br,{size:13,className:"text-emerald-400 shrink-0"}),e==="downloading"&&r.jsx(ne,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="done"&&r.jsx(br,{size:13,className:"text-emerald-400 shrink-0"}),e==="restarting"&&r.jsx(ne,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="error"&&r.jsx(wt,{size:13,className:"text-amber-300 shrink-0"}),e==="idle"&&r.jsx(de,{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:f})]}),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.jsxs("span",{className:"text-amber-300/90 max-w-[140px] truncate",children:["Check failed",i?` — ${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(Ai,{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(Ai,{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(ne,{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"&&!c.current&&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(br,{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:p,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(de,{size:13}),r.jsx("span",{children:"Restart Now"})]})]})]}),e==="done"&&c.current&&r.jsx("div",{className:"fixed inset-0 z-[9999] flex flex-col items-center justify-center bg-black",children:r.jsxs("div",{className:"font-mono text-center px-8 max-w-xl w-full",children:[r.jsxs("div",{className:"flex items-center justify-center gap-2 mb-8",children:[r.jsx(br,{size:18,className:"text-green-400 shrink-0"}),r.jsx("span",{className:"text-green-400 text-xs tracking-widest uppercase",children:"must-b terminal"})]}),r.jsx("pre",{className:"text-green-400 text-sm leading-relaxed text-left inline-block",children:`╔══════════════════════════════════════════════════════╗
830
+ 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(et,{size:14})})]}),r.jsxs("div",{className:"flex-1 overflow-hidden min-h-0",children:[e==="memory"&&r.jsx(RP,{}),e==="plugins"&&r.jsx(OP,{}),e==="skills"&&r.jsx(FP,{}),e==="workspace"&&r.jsx(WP,{}),e==="livesight"&&r.jsx(KP,{})]})]},"stage-card")]})}function S6(){const{t:e}=pt(),t=hs(),n=mn(),[s,i]=h.useState(!1),[a,o]=h.useState(""),[l,c]=h.useState(null),[u,d]=h.useState(!1);h.useEffect(()=>{const b=y=>{d(y.detail.active)};return window.addEventListener("mustb:safeMode",b),()=>window.removeEventListener("mustb:safeMode",b)},[]),h.useEffect(()=>{i(!1)},[t.pathname]),t.pathname,h.useCallback(b=>o(y=>y===b?"":b),[]),h.useCallback(b=>{c(b),o("")},[]);const p=h.useCallback(()=>c(null),[]),f=e.dock;f.cat_webTools,f.skill_webSearch,f.desc_webSearch,f.skill_webFetch,f.desc_webFetch,f.skill_browserControl,f.desc_browserControl,f.cat_fileMedia,f.skill_pdfReader,f.desc_pdfReader,f.skill_imageAnalysis,f.desc_imageAnalysis,f.skill_imageGeneration,f.desc_imageGeneration,f.skill_tts,f.desc_tts,f.cat_aiAgents,f.skills,f.skill_spawnAgent,f.desc_spawnAgent,f.skill_agentSessions,f.desc_agentSessions,f.skill_canvas,f.desc_canvas,f.skill_git,f.desc_git,f.cat_systemTools,f.skill_gateway,f.desc_gateway,f.skill_fileManager,f.desc_fileManager,f.skill_cron,f.desc_cron,f.skill_messages,f.desc_messages,f.cat_knowledgeBase,f.mem_browse,f.desc_memBrowse,f.mem_search,f.desc_memSearch,f.mem_add,f.desc_memAdd,f.cat_personalOrg,f.mem_contacts,f.desc_contacts,f.mem_calendar,f.desc_calendar,f.cat_pluginManager,f.plug_marketplace,f.desc_marketplace,f.plug_installed,f.desc_installed,f.plug_mcp,f.desc_mcp,f.cat_developer,f.plug_bundleMcp,f.desc_bundleMcp,f.plug_cliCmds,f.desc_cliCmds,f.cat_automation,f.wf_automations,f.desc_automations,f.wf_scheduled,f.desc_scheduled,f.wf_commands,f.desc_commands,f.cat_advanced,f.wf_nodes,f.desc_nodes,f.wf_multiAgent,f.desc_multiAgent;const m={memory:f.memory,plugins:f.plugins,skills:f.skills,workspace:f.files,livesight:"Visual Audit"};return r.jsx(R5,{reducedMotion:u?"always":"never",children:r.jsxs("div",{className:"relative min-h-screen overflow-x-hidden font-sans bg-transparent",children:[l&&r.jsx(N6,{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(b=>!b),"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(NC,{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(Ei,{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(sC,{size:14}),r.jsx("span",{className:"hidden sm:inline",children:e.nav.voice})]}),r.jsx(H.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(MP,{})}),r.jsx(n6,{})]})]}),r.jsx(se,{children:s&&r.jsx(H.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(j6,{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(Lk,{})}),r.jsx(qP,{}),r.jsx(e6,{}),r.jsx(a6,{}),r.jsx(m6,{})]})})}const C6=[{decision:"duplicate",label:"Create New Agent",sublabel:"Keep both — cloud data is copied to a separate folder",icon:hC,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:aC,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:LC,accent:"border-green-500/30 bg-green-500/8 hover:border-green-500/50 text-green-400"}];function E6(){const[e,t]=h.useState(null),[n,s]=h.useState(!1),[i,a]=h.useState(!1);h.useEffect(()=>{const c=at(),u=d=>{d.type==="CONFLICT_DETECTED"&&(t({localAgentName:d.localAgentName??null,cloudAgentName:d.cloudAgentName??null,localMtime:d.localMtime??null,cloudTimestamp:d.cloudTimestamp??null}),a(!1)),d.type==="syncResolveFinish"&&(a(!0),setTimeout(()=>{t(null),a(!1)},1800))};return c.on("agentUpdate",u),()=>{c.off("agentUpdate",u)}},[]);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(se,{children:e&&r.jsx(H.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(H.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(os,{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"]}):C6.map(c=>{const u=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(ne,{size:16,className:"animate-spin flex-shrink-0"}):r.jsx(u,{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 _6="1.72.18";function T6(){const[e,t]=h.useState("idle"),[n,s]=h.useState(null),[i,a]=h.useState(""),[o,l]=h.useState(""),c=h.useRef(!1),u=h.useCallback(async()=>{var m,b;t("checking"),a("");try{const y=await $("/api/system/version");if(!y.ok)throw new Error(`Server returned ${y.status}`);const g=await y.json(),x=(g==null?void 0:g.current)??((m=g==null?void 0:g.data)==null?void 0:m.current),w=(g==null?void 0:g.latest)??((b=g==null?void 0:g.data)==null?void 0:b.latest);if(!x||!w)throw new Error("Version endpoint returned incomplete data");s({current:x,latest:w}),P6(w,x)>0?t("update-available"):(t("up-to-date"),setTimeout(()=>t("idle"),3e3))}catch(y){a((y==null?void 0:y.message)??"Check failed"),t("error"),setTimeout(()=>{t("idle"),a("")},4e3)}},[]);h.useEffect(()=>{if(e!=="restarting")return;const m=setTimeout(()=>window.close(),1e4),b=setInterval(async()=>{try{(await fetch("/api/system/health",{credentials:"include"})).ok&&(clearInterval(b),clearTimeout(m),c.current=!0,t("done"),window.close())}catch{}},3e3);return()=>{clearInterval(b),clearTimeout(m)}},[e]),h.useEffect(()=>{const b=setInterval(()=>{t(y=>((y==="idle"||y==="up-to-date")&&u(),y))},288e5);return()=>clearInterval(b)},[u]);const d=h.useCallback(async()=>{t("downloading"),l("");try{const m=await fetch("/api/system/update",{method:"POST",credentials:"include"});if(!m.body)throw new Error("No response body");const b=m.body.getReader(),y=new TextDecoder;let v="";for(;;){const{done:g,value:x}=await b.read();if(g)break;const w=y.decode(x);v+=w,l(j=>j+w)}v.includes("__MUSTB_SHUTTING_DOWN__")?t("restarting"):v.includes("❌")?(a("Install failed — see log above"),t("error"),setTimeout(()=>{t("idle"),a("")},5e3)):t("done")}catch(m){a((m==null?void 0:m.message)??"Update failed"),t("error")}},[]),p=h.useCallback(async()=>{t("restarting");try{await $("/api/system/restart",{method:"POST"})}catch{}const m=at();let b=0;const y=setInterval(()=>{b++,m.connected&&(clearInterval(y),window.location.reload()),b>60&&clearInterval(y)},500)},[]),f=(n==null?void 0:n.current)??_6;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:[!["update-available","downloading","done","restarting"].includes(e)&&r.jsxs("button",{onClick:e==="idle"||e==="up-to-date"||e==="error"?u:void 0,disabled:["checking","downloading","restarting"].includes(e),title:"Check for updates",className:Xe("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":e==="error"?"bg-amber-900/90 backdrop-blur-md border border-amber-500/60 text-white hover:bg-amber-800 hover:border-amber-400/70":"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(ne,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="update-available"&&r.jsx(Ai,{size:13,className:"text-red-300 shrink-0"}),e==="up-to-date"&&r.jsx(br,{size:13,className:"text-emerald-400 shrink-0"}),e==="downloading"&&r.jsx(ne,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="done"&&r.jsx(br,{size:13,className:"text-emerald-400 shrink-0"}),e==="restarting"&&r.jsx(ne,{size:13,className:"animate-spin text-orange-400 shrink-0"}),e==="error"&&r.jsx(wt,{size:13,className:"text-amber-300 shrink-0"}),e==="idle"&&r.jsx(de,{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:f})]}),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.jsxs("span",{className:"text-amber-300/90 max-w-[140px] truncate",children:["Check failed",i?` — ${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(Ai,{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(Ai,{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(ne,{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"&&!c.current&&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(br,{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:p,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(de,{size:13}),r.jsx("span",{children:"Restart Now"})]})]})]}),e==="done"&&c.current&&r.jsx("div",{className:"fixed inset-0 z-[9999] flex flex-col items-center justify-center bg-black",children:r.jsxs("div",{className:"font-mono text-center px-8 max-w-xl w-full",children:[r.jsxs("div",{className:"flex items-center justify-center gap-2 mb-8",children:[r.jsx(br,{size:18,className:"text-green-400 shrink-0"}),r.jsx("span",{className:"text-green-400 text-xs tracking-widest uppercase",children:"must-b terminal"})]}),r.jsx("pre",{className:"text-green-400 text-sm leading-relaxed text-left inline-block",children:`╔══════════════════════════════════════════════════════╗
831
831
  ║ ║
832
832
  ║ MUST-B IS BACK ONLINE ║
833
833
  ║ ───────────────────────────────────────────── ║
@@ -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-BSmqWPIl.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-BCR3gJ3u.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="/assets/index-BT9QLfgp.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.72.16",
4
- "description": "Must-b v1.72.16 — Autonomous AI agent with Computer Use + Voice pipeline + cross-platform OS abstraction + MetaTrader 5 finance bridge, 57+ embedded skills — Dual-channel distribution (NPM + GitHub) with AI co-authorship",
3
+ "version": "1.72.18",
4
+ "description": "Must-b v1.72.18 — Autonomous AI agent with Computer Use + Voice pipeline + cross-platform OS abstraction + MetaTrader 5 finance bridge, 57+ embedded skills — Dual-channel distribution (NPM + GitHub) with AI co-authorship",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Must-b Inc.",
7
7
  "homepage": "https://must-b.com",
@@ -200,14 +200,22 @@ function dualPublishPack(packName, packDir, version) {
200
200
  }
201
201
  }
202
202
 
203
- const safeUrl = token ? repoUrl.replace(token, "***") : repoUrl;
203
+ // Write commit message to a file blank line before trailer must be literal,
204
+ // shell -m flags mangle newlines on Windows and break GitHub's parser.
205
+ const commitMsgFile = join(tmpDir, "COMMIT_MSG.txt");
206
+ writeFileSync(
207
+ commitMsgFile,
208
+ `chore: publish ${pkgName}@${version}\n\nCo-authored-by: Must-bCode <168143655+Must-bCode@users.noreply.github.com>`,
209
+ "utf-8",
210
+ );
211
+
204
212
  const gitCmds = [
205
213
  "git init -b main",
206
- 'git config user.email "bot@must-b.com"',
207
- 'git config user.name "Must-b Bot"',
214
+ 'git config user.email "168143655+Must-bCode@users.noreply.github.com"',
215
+ 'git config user.name "Must-bCode"',
208
216
  `git remote add origin "${repoUrl}"`,
209
217
  "git add .",
210
- `git commit -m "chore: publish ${pkgName}@${version}" -m "Co-authored-by: Must-b <bot@must-b.com>"`,
218
+ `git commit -F "${commitMsgFile}"`,
211
219
  "git push --force origin main",
212
220
  ];
213
221
 
@@ -345,13 +345,23 @@ if (PUBLISH) {
345
345
  }
346
346
  }
347
347
 
348
+ // Write the commit message to a temp file so the blank line before the
349
+ // Co-authored-by trailer is preserved exactly — shell -m flags mangle
350
+ // newlines on Windows and break GitHub's trailer parser.
351
+ const commitMsgFile = join(tmpDir, "COMMIT_MSG.txt");
352
+ writeFileSync(
353
+ commitMsgFile,
354
+ `chore: publish ${NAME}@${VERSION}\n\nCo-authored-by: Must-bCode <168143655+Must-bCode@users.noreply.github.com>`,
355
+ "utf-8",
356
+ );
357
+
348
358
  const gitCmds = [
349
359
  "git init -b main",
350
- 'git config user.email "bot@must-b.com"',
351
- 'git config user.name "Must-b Bot"',
360
+ 'git config user.email "168143655+Must-bCode@users.noreply.github.com"',
361
+ 'git config user.name "Must-bCode"',
352
362
  `git remote add origin "${repoUrl}"`,
353
363
  "git add .",
354
- `git commit -m "chore: publish ${NAME}@${VERSION}" -m "Co-authored-by: Must-b <bot@must-b.com>"`,
364
+ `git commit -F "${commitMsgFile}"`,
355
365
  "git push --force origin main",
356
366
  ];
357
367