@weppy/roblox-mcp 2.9.1 → 2.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +1 -1
  3. package/dashboard/dist/assets/{AssetsPage-CC3FW3XG.js → AssetsPage-CqgdG2Ni.js} +1 -1
  4. package/dashboard/dist/assets/{ChangelogDetailPage-B1zg2f56.js → ChangelogDetailPage-DTl_Tw_v.js} +1 -1
  5. package/dashboard/dist/assets/{ChangelogPage-CbfWdVtL.js → ChangelogPage-BqASaB-l.js} +1 -1
  6. package/dashboard/dist/assets/{ConfirmModal-BCviiJ3_.js → ConfirmModal-knJOxPTQ.js} +1 -1
  7. package/dashboard/dist/assets/{ConnectionPage-Dskqof1W.js → ConnectionPage-BkkqcLRE.js} +1 -1
  8. package/dashboard/dist/assets/{ControlsPage-C_38U6b0.js → ControlsPage-da-JrES8.js} +1 -1
  9. package/dashboard/dist/assets/{CurrentPlaceScope-CHEqGWYd.js → CurrentPlaceScope-BOfr5n7U.js} +1 -1
  10. package/dashboard/dist/assets/{GameChangeDetail-DAEU3IYH.js → GameChangeDetail-sTt5o48Z.js} +1 -1
  11. package/dashboard/dist/assets/{InfoLabel-DCq3Fmko.js → InfoLabel-DwsCwdUw.js} +1 -1
  12. package/dashboard/dist/assets/{OverviewPage-lOYmwxzd.js → OverviewPage-9cIh9Q5a.js} +1 -1
  13. package/dashboard/dist/assets/{PageHeader-Do_AQ2vQ.js → PageHeader-DwlcGnaB.js} +1 -1
  14. package/dashboard/dist/assets/{PlaytestPage-CKcxZyhl.js → PlaytestPage-BeRZc6wz.js} +1 -1
  15. package/dashboard/dist/assets/SettingsPage-BiCf2ur7.js +1 -0
  16. package/dashboard/dist/assets/{StatusBadge-DRbLpCd0.js → StatusBadge-CYejTjWf.js} +1 -1
  17. package/dashboard/dist/assets/{SyncPage-BFsgItgP.js → SyncPage-CHe2NPfN.js} +1 -1
  18. package/dashboard/dist/assets/{Tabs-CGfFE3L1.js → Tabs-wK2yL-C6.js} +1 -1
  19. package/dashboard/dist/assets/{ToolsPage-DHhF-Y_W.js → ToolsPage-Cq8crPCz.js} +1 -1
  20. package/dashboard/dist/assets/{TooltipText-CfI7WgY4.js → TooltipText-LAwR8aaI.js} +1 -1
  21. package/dashboard/dist/assets/{UiStudioPage-RAd0qXzL.js → UiStudioPage-xZ96a4BR.js} +1 -1
  22. package/dashboard/dist/assets/{WhatsNewPage-CLnx6v4u.js → WhatsNewPage-B9st_b8H.js} +1 -1
  23. package/dashboard/dist/assets/{copy-BIZzQcB-.js → copy-DwoEPqC3.js} +1 -1
  24. package/dashboard/dist/assets/{index-DYezp9b1.js → index-CJJYSnlB.js} +3 -3
  25. package/dashboard/dist/assets/{sample-requests-CnV4bBG4.js → sample-requests-tNeuJCdB.js} +1 -1
  26. package/dashboard/dist/assets/{useLiveUptime-BYmnk4Ph.js → useLiveUptime-DM28rhji.js} +1 -1
  27. package/dashboard/dist/assets/{useSettings-HzhprVq7.js → useSettings-CYVeWZ0i.js} +1 -1
  28. package/dashboard/dist/index.html +1 -1
  29. package/dist/index.js +78 -78
  30. package/package.json +1 -1
  31. package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
  32. package/dashboard/dist/assets/SettingsPage-C0PubIFP.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weppy/roblox-mcp",
3
- "version": "2.9.1",
3
+ "version": "2.9.3",
4
4
  "description": "MCP (Model Context Protocol) server for Roblox Studio integration - enables AI coding agents to interact with Roblox Studio in real-time",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
Binary file
@@ -1 +0,0 @@
1
- import{u as V,e as ae,r as u,j as e,g as le,a as I,d as re,T as ce,A as de,S as ue}from"./index-DYezp9b1.js";import{P as pe}from"./PageHeader-Do_AQ2vQ.js";import{I as v}from"./InfoLabel-DCq3Fmko.js";import{T as d}from"./TooltipText-CfI7WgY4.js";import{s as i,u as ge}from"./useSettings-HzhprVq7.js";import{C as he}from"./ConfirmModal-BCviiJ3_.js";import{D as ie,f as ne,r as me,s as ye,a as oe,d as K,S as te,b as ve}from"./sample-requests-CnV4bBG4.js";import"./ConfirmModal.module-NrFlfTWy.js";const xe="_card_1jlvt_4",je="_cardEmbedded_1jlvt_14",fe="_cardTitle_1jlvt_21",Se="_usageRow_1jlvt_30",be="_usageTotal_1jlvt_36",_e="_usageBreakdown_1jlvt_42",Ne="_usageCounts_1jlvt_47",Ce="_divider_1jlvt_53",ke="_lastRunRow_1jlvt_60",Re="_lastRunLabel_1jlvt_69",Le="_errorIcon_1jlvt_75",we="_tooltip_1jlvt_83",He="_cleanupRow_1jlvt_106",Pe="_cleanupLabel_1jlvt_113",Be="_cleanupBtn_1jlvt_120",De="_cleanupBtnDanger_1jlvt_143",Ae="_retentionSection_1jlvt_155",Te="_retentionTitle_1jlvt_161",Me="_retentionFieldset_1jlvt_170",Ee="_proOverlay_1jlvt_185",$e="_radioRow_1jlvt_197",Ie="_radioLabel_1jlvt_204",Ue="_presetGroup_1jlvt_224",ze="_presetBtn_1jlvt_232",Oe="_presetBtnActive_1jlvt_249",Fe="_freeInput_1jlvt_256",qe="_inputError_1jlvt_272",Ge="_inputUnit_1jlvt_276",We="_cascadeRow_1jlvt_283",Ye="_retentionActions_1jlvt_302",Ke="_saveBtn_1jlvt_308",Ve="_runNowBtn_1jlvt_330",Je="_errorMsg_1jlvt_353",n={card:xe,cardEmbedded:je,cardTitle:fe,usageRow:Se,usageTotal:be,usageBreakdown:_e,usageCounts:Ne,divider:Ce,lastRunRow:ke,lastRunLabel:Re,errorIcon:Le,tooltip:we,cleanupRow:He,cleanupLabel:Pe,cleanupBtn:Be,cleanupBtnDanger:De,retentionSection:Ae,retentionTitle:Te,retentionFieldset:Me,proOverlay:Ee,radioRow:$e,radioLabel:Ie,presetGroup:Ue,presetBtn:ze,presetBtnActive:Oe,freeInput:Fe,inputError:qe,inputUnit:Ge,cascadeRow:We,retentionActions:Ye,saveBtn:Ke,runNowBtn:Ve,errorMsg:Je};function Qe(t,s){return!!(t.mode==="off"&&s.mode!=="off"||t.mode==="age"&&s.mode==="age"&&(s.ageDays??0)<(t.ageDays??0)||t.mode==="size"&&s.mode==="size"&&(s.sizeMb??0)<(t.sizeMb??0)||!t.cascadeSnapshots&&s.cascadeSnapshots)}function se(t){return t.mode==="age"?Number.isInteger(t.ageDays)&&t.ageDays>=1&&t.ageDays<=365:t.mode==="size"?Number.isInteger(t.sizeMb)&&t.sizeMb>=50&&t.sizeMb<=1e4:!0}function Xe(t,s){return t.mode===s.mode&&t.ageDays===s.ageDays&&t.sizeMb===s.sizeMb&&t.cascadeSnapshots===s.cascadeSnapshots}function z(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${(t/(1024*1024*1024)).toFixed(2)} GB`}function Ze({placeId:t,tier:s,currentPolicy:l,onSaved:x}){const{t:o}=V(),{trackEvent:N}=ae(),[a,g]=u.useState(l),[p,P]=u.useState(()=>[7,14,30,90].includes(l.ageDays??-1)?"":String(l.ageDays??30)),[k,B]=u.useState(()=>[100,500,1e3].includes(l.sizeMb??-1)?"":String(l.sizeMb??500)),[S,D]=u.useState(null),[h,y]=u.useState(!1),[A,R]=u.useState(!1),[_,L]=u.useState(!1),[w,H]=u.useState(null);u.useEffect(()=>{g(l);const c=[7,14,30,90],b=[100,500,1e3];P(c.includes(l.ageDays??-1)?"":String(l.ageDays??30)),B(b.includes(l.sizeMb??-1)?"":String(l.sizeMb??500))},[l]);const C=s==="basic",j=se(a),r=Xe(l,a),T=j&&!r&&!A,f=c=>{g(b=>{const U={...b,mode:c};return c==="age"&&(U.ageDays=parseInt(p,10)||30),c==="size"&&(U.sizeMb=parseInt(k,10)||500),U})},m=c=>{P(""),g(b=>({...b,ageDays:c}))},O=c=>{B(""),g(b=>({...b,sizeMb:c}))},J=c=>{P(c);const b=parseInt(c,10);Number.isNaN(b)||g(U=>({...U,ageDays:b}))},E=c=>{B(c);const b=parseInt(c,10);Number.isNaN(b)||g(U=>({...U,sizeMb:b}))},Q=async()=>{if(H(null),N("dashboard_click_event",{click_target:"ui_studio_cleanup_save",page:"settings"}),Qe(l,a)){try{const c=await ne(t,{mode:a.mode,ageDays:a.ageDays,sizeMb:a.sizeMb,cascadeSnapshots:a.cascadeSnapshots});D(c.dryRun),y(!0)}catch(c){H(c.message)}return}await Y()},Y=async()=>{R(!0);try{await ye(t,a),y(!1),x()}catch(c){throw H(c.message),c}finally{R(!1)}},X=async()=>{H(null),N("dashboard_click_event",{click_target:"ui_studio_cleanup_run_now",page:"settings"}),L(!0);try{await me(t),x()}catch(c){H(c.message)}finally{L(!1)}},Z=S?`${o("uiStudio.cleanup.policy.confirm.messageStrict","이 정책으로 즉시")} ${S.wouldRemoveRequests}${o("uiStudio.cleanup.policy.confirm.requests","건")} / ${S.wouldRemoveSnapshots}${o("uiStudio.cleanup.policy.confirm.snapshots","개 화면 캡처")} / ${z(S.wouldFreeBytes)} ${o("uiStudio.cleanup.policy.confirm.freed","가 삭제됩니다 — 적용?")}`:"",$=a.mode==="age"&&!se(a),ee=a.mode==="size"&&!se(a);return e.jsxs("div",{className:n.retentionSection,children:[e.jsx("h3",{className:n.retentionTitle,children:e.jsx(v,{label:o("uiStudio.cleanup.policy.title","자동 삭제 정책"),tooltip:o("uiStudio.cleanup.policy.title.tooltip","Rules that automatically remove old or large captures.")})}),e.jsxs("div",{style:{position:"relative"},children:[C&&e.jsx("div",{className:n.proOverlay,title:o("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능"),children:e.jsx("div",{className:n.tooltip,children:o("uiStudio.cleanup.policy.proRequired","Pro에서 사용 가능")})}),e.jsxs("fieldset",{className:n.retentionFieldset,disabled:C,style:C?{opacity:.45,pointerEvents:"none"}:void 0,children:[e.jsx("div",{className:n.radioRow,children:e.jsx(d,{text:o("uiStudio.cleanup.policy.modeOff.tooltip","Turn off auto-cleanup. Data stays until you remove it manually."),children:e.jsxs("label",{className:n.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"off",checked:a.mode==="off",onChange:()=>f("off")}),o("uiStudio.cleanup.policy.modeOff","사용 안 함 (off)")]})})}),e.jsxs("div",{children:[e.jsx("div",{className:n.radioRow,children:e.jsx(d,{text:o("uiStudio.cleanup.policy.modeAge.tooltip","Automatically delete data older than the configured number of days."),children:e.jsxs("label",{className:n.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"age",checked:a.mode==="age",onChange:()=>f("age")}),o("uiStudio.cleanup.policy.modeAge","기간 기반 (age)")]})})}),a.mode==="age"&&e.jsxs("div",{className:n.presetGroup,children:[[7,14,30,90].map(c=>e.jsx(d,{text:o("uiStudio.cleanup.policy.agePreset.tooltip","Delete data older than this many days."),children:e.jsxs("button",{type:"button",className:`${n.presetBtn} ${a.ageDays===c&&p===""?n.presetBtnActive:""}`,onClick:()=>m(c),children:[c,o("uiStudio.cleanup.policy.daysUnit","일")]})},c)),e.jsx(d,{text:o("uiStudio.cleanup.policy.ageInput.tooltip","Enter any value between 1 and 365 days."),children:e.jsx("input",{type:"number",className:`${n.freeInput} ${$?n.inputError:""}`,value:p,min:1,max:365,onChange:c=>J(c.target.value)})}),e.jsxs("span",{className:n.inputUnit,children:["1–365",o("uiStudio.cleanup.policy.daysUnit","일")]})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:n.radioRow,children:e.jsx(d,{text:o("uiStudio.cleanup.policy.modeSize.tooltip","When total usage exceeds the limit, the oldest data is removed first."),children:e.jsxs("label",{className:n.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"size",checked:a.mode==="size",onChange:()=>f("size")}),o("uiStudio.cleanup.policy.modeSize","용량 기반 (size)")]})})}),a.mode==="size"&&e.jsxs("div",{className:n.presetGroup,children:[[100,500,1e3].map(c=>e.jsx(d,{text:o("uiStudio.cleanup.policy.sizePreset.tooltip","Keep total usage under this size."),children:e.jsxs("button",{type:"button",className:`${n.presetBtn} ${a.sizeMb===c&&k===""?n.presetBtnActive:""}`,onClick:()=>O(c),children:[c,o("uiStudio.cleanup.policy.mbUnit","MB")]})},c)),e.jsx(d,{text:o("uiStudio.cleanup.policy.sizeInput.tooltip","Enter any value between 50 MB and 10000 MB (10 GB)."),children:e.jsx("input",{type:"number",className:`${n.freeInput} ${ee?n.inputError:""}`,value:k,min:50,max:1e4,onChange:c=>E(c.target.value)})}),e.jsxs("span",{className:n.inputUnit,children:["50–10000",o("uiStudio.cleanup.policy.mbUnit","MB")]})]})]}),e.jsx(d,{text:o("uiStudio.cleanup.policy.cascade.tooltip","Also delete the capture images linked to those records. If off, the images stay."),children:e.jsxs("label",{className:n.cascadeRow,children:[e.jsx("input",{type:"checkbox",checked:a.cascadeSnapshots,onChange:c=>g(b=>({...b,cascadeSnapshots:c.target.checked}))}),o("uiStudio.cleanup.policy.cascade","연결된 화면 캡처도 함께 삭제")]})}),e.jsxs("div",{className:n.retentionActions,children:[e.jsx(d,{text:o("uiStudio.cleanup.policy.save.tooltip","Save the current cleanup rule. It runs in the background from then on."),children:e.jsx("button",{type:"button",className:n.saveBtn,onClick:()=>void Q(),disabled:!T,children:o("uiStudio.cleanup.policy.save","정책 저장")})}),e.jsx(d,{text:o("uiStudio.cleanup.policy.runNow.tooltip","Run the current rule once now, without waiting for the next scheduled run."),children:e.jsx("button",{type:"button",className:n.runNowBtn,onClick:()=>void X(),disabled:_,children:o("uiStudio.cleanup.policy.runNow","지금 정리")})})]}),w&&e.jsx("div",{className:n.errorMsg,children:w})]})]}),h&&S&&e.jsx(ie,{title:o("uiStudio.cleanup.policy.confirm.title","정책 적용 확인"),message:Z,danger:!0,confirmLabel:o("uiStudio.cleanup.policy.save","정책 저장"),busy:A,onConfirm:Y,onClose:()=>y(!1)})]})}function et({placeId:t,tier:s,onChanged:l,sampleUsage:x,sampleRetention:o,embedded:N=!1}){const{t:a}=V(),g=s==="basic"&&x!=null&&o!=null,[p,P]=u.useState(g?x:null),[k,B]=u.useState(g?o:null),[S,D]=u.useState(null),[h,y]=u.useState(null),[A,R]=u.useState(null),_=u.useCallback(async()=>{if(!g&&t!=null){D(null);try{const[f,m]=await Promise.all([oe(t),ne(t)]);P(f),B(m.policy)}catch(f){D(f.message)}}},[t,g]);u.useEffect(()=>{_()},[_]);const L=u.useCallback(()=>{_(),l==null||l()},[_,l]),w=u.useCallback(async()=>{if(h&&t!=null){R(null);try{h.kind==="keep7"?await K(t,{olderThanDays:7,alsoSnapshots:!0}):h.kind==="keep30"?await K(t,{olderThanDays:30,alsoSnapshots:!0}):await K(t,{all:!0,alsoSnapshots:!0}),y(null),_(),l==null||l()}catch(f){throw R(f.message),f}}},[h,t,_,l]);function H(f){const m=a("uiStudio.cleanup.studioPreservedNote","This deletes saved change records and screenshots on disk only; Roblox Studio instances are not affected.");return f.kind==="keep7"?`${a("uiStudio.cleanup.cleanupConfirmMessage.keep7","7일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${m}`:f.kind==="keep30"?`${a("uiStudio.cleanup.cleanupConfirmMessage.keep30","30일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${m}`:`${((p==null?void 0:p.requestCount)??0)+((p==null?void 0:p.snapshotCount)??0)}${a("uiStudio.cleanup.cleanupConfirmMessage.all","개의 저장된 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${m}`}if(t==null&&!g)return null;if(S)return e.jsx("div",{className:`${n.card} ${N?n.cardEmbedded:""}`,children:e.jsx("p",{className:n.errorMsg,children:S})});if(!p||!k)return e.jsx("div",{className:`${n.card} ${N?n.cardEmbedded:""}`,children:e.jsx("p",{style:{fontSize:12,color:"var(--text-muted)",margin:0},children:a("uiStudio.storage.loading","로딩 중...")})});const C=k.lastRunAt,j=k.lastRunStats,r=C?new Date(C).toLocaleString():null,T=t??0;return e.jsxs("div",{className:`${n.card} ${N?n.cardEmbedded:""}`,children:[e.jsx("h3",{className:n.cardTitle,children:e.jsx(v,{label:a("uiStudio.storage.title","UI Studio 저장 데이터"),tooltip:a("uiStudio.storage.title.tooltip","Disk usage of UI Studio change records and screenshots.")})}),e.jsxs("div",{className:n.usageRow,children:[e.jsx(d,{text:a("uiStudio.storage.usageLabel.tooltip","Disk space currently used by UI Studio for this project."),children:e.jsxs("div",{className:n.usageTotal,children:[a("uiStudio.storage.usageLabel","사용 중")," ",z(p.totalBytes)]})}),e.jsxs("div",{className:n.usageBreakdown,children:[e.jsx(d,{text:a("uiStudio.storage.historyBytes.tooltip","Space taken by change record data (JSON)."),children:e.jsxs("span",{children:[a("uiStudio.storage.historyBytes","변경 이력")," ",z(p.historyBytes)]})})," · ",e.jsx(d,{text:a("uiStudio.storage.snapshotBytes.tooltip","Space taken by captured PNG image files."),children:e.jsxs("span",{children:[a("uiStudio.storage.snapshotBytes","화면 캡처")," ",z(p.snapshotBytes)]})})]}),e.jsxs("div",{className:n.usageCounts,children:[e.jsx(d,{text:a("uiStudio.storage.requestCount.tooltip","Number of actions where AI changed the UI."),children:e.jsxs("span",{children:[a("uiStudio.storage.requestCount","변경 기록")," ",p.requestCount.toLocaleString(),a("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(d,{text:a("uiStudio.storage.mutationCount.tooltip","Number of detail changes inside actions (one property edit = 1)."),children:e.jsxs("span",{children:[a("uiStudio.storage.mutationCount","변경 상세")," ",p.mutationCount.toLocaleString(),a("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(d,{text:a("uiStudio.storage.snapshotCount.tooltip","Number of saved capture image files."),children:e.jsxs("span",{children:[a("uiStudio.storage.snapshotCount","화면 캡처")," ",p.snapshotCount.toLocaleString(),a("uiStudio.storage.countSuffix","개")]})})]})]}),e.jsx("hr",{className:n.divider}),e.jsx(Ze,{placeId:T,tier:s,currentPolicy:k,onSaved:L}),e.jsx("hr",{className:n.divider}),e.jsxs("div",{className:n.lastRunRow,children:[e.jsx("span",{className:n.lastRunLabel,children:e.jsx(v,{label:a("uiStudio.storage.lastRun","마지막 자동 정리"),tooltip:a("uiStudio.storage.lastRun.tooltip","When the auto-cleanup policy last ran, and what it removed.")})}),r?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r}),j&&e.jsxs("span",{children:["· ",a("uiStudio.storage.requestCount","변경 기록")," ",j.removedRequests,a("uiStudio.storage.countSuffix","개")," / ",a("uiStudio.storage.snapshotCount","화면 캡처")," ",j.removedSnapshots,a("uiStudio.storage.countSuffix","개")," / ",z(j.freedBytes)," ",a("uiStudio.storage.lastRunFreed","회수")]}),j&&j.errors>0&&e.jsxs("span",{className:n.errorIcon,title:`${a("uiStudio.storage.lastRunErrors","오류")} ${j.errors}건`,children:["⚠",e.jsxs("span",{className:n.tooltip,children:[a("uiStudio.storage.lastRunErrors","오류")," ",j.errors,a("uiStudio.storage.countSuffix","건")]})]})]}):e.jsx("span",{children:a("uiStudio.storage.lastRunNever","—")})]}),e.jsx("hr",{className:n.divider}),e.jsxs("div",{className:n.cleanupRow,children:[e.jsx("span",{className:n.cleanupLabel,children:e.jsx(v,{label:a("uiStudio.cleanup.label","수동 정리"),tooltip:a("uiStudio.cleanup.label.tooltip","Manually clean up change records and captures whenever you want.")})}),e.jsx(d,{text:a("uiStudio.cleanup.keep7.tooltip","Delete change records and captures older than 7 days."),children:e.jsx("button",{type:"button",className:n.cleanupBtn,onClick:()=>y({kind:"keep7"}),disabled:s==="basic",children:a("uiStudio.cleanup.keepLastNDays","최근 7일만 남기기").replace("{n}","7")})}),e.jsx(d,{text:a("uiStudio.cleanup.keep30.tooltip","Delete change records and captures older than 30 days."),children:e.jsx("button",{type:"button",className:n.cleanupBtn,onClick:()=>y({kind:"keep30"}),disabled:s==="basic",children:a("uiStudio.cleanup.keepLastNDays","최근 30일만 남기기").replace("{n}","30")})}),e.jsx(d,{text:a("uiStudio.cleanup.deleteAll.tooltip","Delete every change record and capture for this project. The actual UI in Roblox Studio is not affected."),children:e.jsx("button",{type:"button",className:`${n.cleanupBtn} ${n.cleanupBtnDanger}`,onClick:()=>y({kind:"all"}),disabled:s==="basic",children:a("uiStudio.cleanup.deleteAll","전체 삭제…")})})]}),A&&e.jsx("div",{className:n.errorMsg,children:A}),h&&e.jsx(ie,{title:a("uiStudio.cleanup.cleanupConfirmTitle","정리 확인"),message:H(h),danger:!0,confirmLabel:a("common.delete","삭제"),onConfirm:w,onClose:()=>{y(null),R(null)}})]})}const tt={toolsActivity:null,toolStats:null,toolSessions:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null},st={toolsActivity:null,toolStats:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null};function at(t){var s;return t?t.pluginConnected?t.activePlaceId:t.lastActivePlaceId??((s=t.places[0])==null?void 0:s.placeId)??null:null}async function M(t){try{return await t}catch{return null}}function G(t){return t?typeof t.total=="number"?t.total:Array.isArray(t.entries)?t.entries.length:null:null}function W(t,s,l,x){return s===null?t("settings.dataHistory.metric.unavailable","Unavailable"):`${s.toLocaleString()} ${t(l,x)}`}function F(t,s,l){const x=l===null?t("settings.dataHistory.metric.sizeUnavailable","size unavailable"):z(l);return`${s} · ${x}`}function q(t,s){var x;const l=(x=t==null?void 0:t[s])==null?void 0:x.bytes;return typeof l=="number"&&Number.isFinite(l)?l:null}function it(t,s){return s?[`${s.requestCount.toLocaleString()} ${t("uiStudio.storage.requestCount","change records")}`,`${s.snapshotCount.toLocaleString()} ${t("uiStudio.storage.snapshotCount","screenshots")}`,z(s.totalBytes)].join(" · "):t("settings.dataHistory.metric.unavailable","Unavailable")}function nt({tier:t}){const{t:s}=V(),[l,x]=u.useState(tt),[o,N]=u.useState(st),[a,g]=u.useState(t==="basic"?te:null),[p,P]=u.useState(null),[k,B]=u.useState(!0),[S,D]=u.useState(!0),[h,y]=u.useState(null),[A,R]=u.useState(!1),[_,L]=u.useState(null),w=u.useCallback(async()=>{B(!0);const m=await M(le()),O=at(m);P(O);const[J,E,Q,Y,X,Z,$]=await Promise.all([M(I.get("/api/dashboard/history",{limit:"1",offset:"0"})),M(I.get("/api/dashboard/tool-stats")),M(I.get("/sync/history",{limit:"1",offset:"0"})),M(I.get("/api/dashboard/playtest/history")),M(I.get("/api/dashboard/changelog",{limit:"1",offset:"0"})),M(I.get("/api/dashboard/connection-log")),M(I.get("/api/dashboard/storage-summary"))]),ee=t==="basic"?te:O===null?null:await M(oe(O));x({toolsActivity:G(J),toolStats:(E==null?void 0:E.totalCalls)??null,toolSessions:(E==null?void 0:E.totalSessions)??null,syncLog:G(Q),playtestReports:G(Y),projectChanges:G(X),connectionLog:G(Z)}),N({toolsActivity:q($,"toolsActivity"),toolStats:q($,"toolStats"),syncLog:q($,"syncLog"),playtestReports:q($,"playtestReports"),projectChanges:q($,"projectChanges"),connectionLog:q($,"connectionLog")}),g(ee),B(!1)},[t]);u.useEffect(()=>{w()},[w]);const H=u.useMemo(()=>[{key:"toolsActivity",title:s("settings.dataHistory.toolsActivity.title","Tool activity"),description:s("settings.dataHistory.toolsActivity.description","Saved tool runs shown on the Tools page."),metric:F(s,W(s,l.toolsActivity,"settings.dataHistory.metric.records","records"),o.toolsActivity),metricTooltip:s("settings.dataHistory.toolsActivity.metric.tooltip","Number of saved tool runs and the disk space they use."),route:"/tools",clearEndpoint:"/api/dashboard/tools/history/clear"},{key:"toolStats",title:s("settings.dataHistory.toolStats.title","Tool usage statistics"),description:s("settings.dataHistory.toolStats.description","Aggregated tool counts and status totals."),metric:F(s,l.toolStats===null?s("settings.dataHistory.metric.unavailable","Unavailable"):`${l.toolStats.toLocaleString()} ${s("settings.dataHistory.metric.runs","runs")} · ${(l.toolSessions??0).toLocaleString()} ${s("settings.dataHistory.metric.sessions","sessions")}`,o.toolStats),metricTooltip:s("settings.dataHistory.toolStats.metric.tooltip","Aggregated total runs and session counts."),route:"/tools",clearEndpoint:"/api/dashboard/tools/statistics/clear"},{key:"syncLog",title:s("settings.dataHistory.syncLog.title","Sync log"),description:s("settings.dataHistory.syncLog.description","Saved file sync events for the active place."),metric:F(s,W(s,l.syncLog,"settings.dataHistory.metric.records","records"),o.syncLog),metricTooltip:s("settings.dataHistory.syncLog.metric.tooltip","Number of saved sync events and the disk space they use."),route:"/sync",clearEndpoint:"/api/dashboard/sync/history/clear"},{key:"playtestReports",title:s("settings.dataHistory.playtest.title","Playtest reports"),description:s("settings.dataHistory.playtest.description","Saved automated playtest reports and logs."),metric:F(s,W(s,l.playtestReports,"settings.dataHistory.metric.reports","reports"),o.playtestReports),metricTooltip:s("settings.dataHistory.playtestReports.metric.tooltip","Number of saved playtest reports and the disk space they use."),route:"/playtest",clearEndpoint:"/api/dashboard/playtest/history/clear"},{key:"projectChanges",title:s("settings.dataHistory.projectChanges.title","Project change summary"),description:s("settings.dataHistory.projectChanges.description","Saved summaries of project changes."),metric:F(s,W(s,l.projectChanges,"settings.dataHistory.metric.records","records"),o.projectChanges),metricTooltip:s("settings.dataHistory.projectChanges.metric.tooltip","Number of saved project change summaries and the disk space they use."),route:"/changelog",clearEndpoint:"/api/dashboard/changelog/clear"},{key:"connectionLog",title:s("settings.dataHistory.connectionLog.title","Connection log"),description:s("settings.dataHistory.connectionLog.description","Saved MCP and Studio connection events."),metric:F(s,W(s,l.connectionLog,"settings.dataHistory.metric.records","records"),o.connectionLog),metricTooltip:s("settings.dataHistory.connectionLog.metric.tooltip","Number of saved connection events and the disk space they use."),route:"/connection",clearEndpoint:"/api/dashboard/connection-log/clear"}],[l,o,s]),C=async()=>{if(h){R(!0),L(null);try{if(h.kind==="uiStudio"){if(t!=="pro"||p===null)throw new Error("UI Studio place is unavailable");await K(p,{all:!0,alsoSnapshots:!0}),L(s("settings.dataHistory.uiStudio.clear.success","UI Studio saved data cleared."))}else await I.post(h.row.clearEndpoint),L(s("settings.dataHistory.clear.success","Saved data cleared."));y(null),await w()}catch{L(h.kind==="uiStudio"?s("settings.dataHistory.uiStudio.clear.failed","Failed to clear UI Studio saved data."):s("settings.dataHistory.clear.failed","Failed to clear saved data."))}finally{R(!1)}}},j=t==="pro"?p:0,r=t==="pro"&&p!==null,T=(h==null?void 0:h.kind)==="uiStudio",f=s("settings.dataHistory.title","Data & History");return e.jsxs(e.Fragment,{children:[e.jsxs("section",{id:"data-history",className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(v,{label:s("settings.dataHistory.title","Data & History"),tooltip:s("settings.dataHistory.title.tooltip","Manage saved dashboard data in one place.")}),e.jsxs("div",{className:i.cardHeaderActions,children:[e.jsx(d,{text:s("settings.dataHistory.scope.tooltip","Clear actions apply to the current project and active place where applicable."),children:e.jsx("span",{className:i.headerBadge,children:k?s("common.loading","Loading"):s("settings.dataHistory.scope","Current project")})}),e.jsx(d,{text:s("settings.dataHistory.toggle.tooltip","Collapse or expand this section."),children:e.jsx("button",{className:i.collapseButton,type:"button","aria-expanded":S,"aria-controls":"settings-data-history-body","aria-label":S?s("settings.dataHistory.collapse","Collapse {title}").replace("{title}",f):s("settings.dataHistory.expand","Expand {title}").replace("{title}",f),onClick:()=>D(m=>!m),children:S?"▾":"▸"})})]})]}),S&&e.jsxs("div",{id:"settings-data-history-body",children:[e.jsx("p",{className:i.dataHistoryIntro,children:s("settings.dataHistory.intro","Review saved dashboard data, open the related page, or clear stored records from one place.")}),e.jsxs("div",{className:i.dataHistoryList,children:[H.map(m=>e.jsxs("div",{className:i.dataHistoryRow,children:[e.jsxs("div",{className:i.dataHistoryMain,children:[e.jsx("div",{className:i.dataHistoryTitle,children:m.title}),e.jsx("div",{className:i.dataHistoryDescription,children:m.description})]}),e.jsx(d,{text:m.metricTooltip,children:e.jsx("div",{className:i.dataHistoryMetric,children:m.metric})}),e.jsxs("div",{className:i.dataHistoryActions,children:[e.jsx(d,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:i.linkButton,href:`#${m.route}`,children:s("settings.dataHistory.open","Open")})}),e.jsx(d,{text:s("settings.dataHistory.clear.tooltip","Delete only the records saved for this item. Roblox Studio data is not changed."),children:e.jsx("button",{className:i.dangerButton,type:"button",onClick:()=>y({kind:"row",row:m}),children:s("common.clear","Clear")})})]})]},m.key)),e.jsxs("div",{className:`${i.dataHistoryRow} ${i.uiStudioDataHistoryRow}`,children:[e.jsxs("div",{className:i.dataHistoryMain,children:[e.jsx("div",{className:i.dataHistoryTitle,children:s("settings.dataHistory.uiStudio.title","UI Studio history and screenshots")}),e.jsx("div",{className:i.dataHistoryDescription,children:s("settings.dataHistory.uiStudio.description","Saved UI Studio change records, screenshots, and cleanup policy.")})]}),e.jsx(d,{text:s("settings.dataHistory.uiStudio.metric.tooltip","UI Studio change record and capture counts, plus total disk usage."),children:e.jsx("div",{className:i.dataHistoryMetric,children:it(s,a)})}),e.jsxs("div",{className:i.dataHistoryActions,children:[e.jsx(d,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:i.linkButton,href:"#/ui-studio?tab=history",children:s("settings.dataHistory.open","Open")})}),e.jsx(d,{text:s("settings.dataHistory.clear.tooltip","Delete only the records saved for this item. Roblox Studio data is not changed."),children:e.jsx("button",{className:i.dangerButton,type:"button",disabled:!r,onClick:()=>y({kind:"uiStudio"}),children:s("common.clear","Clear")})})]})]}),e.jsx("div",{className:`${i.dataHistoryDetail} ${i.uiStudioDataHistoryDetail}`,children:e.jsx(et,{placeId:j,tier:t,onChanged:w,embedded:!0,...t==="basic"?{sampleUsage:te,sampleRetention:ve}:{}})})]}),_&&e.jsx("p",{className:i.inlineStatus,children:_})]})]}),e.jsx(he,{open:h!==null,title:T?s("settings.dataHistory.uiStudio.clear.title","Clear UI Studio saved data?"):s("settings.dataHistory.clear.title","Clear saved data?"),message:T?s("settings.dataHistory.uiStudio.clear.message","This deletes saved UI Studio change records and screenshots only. Roblox Studio instances and project objects are not changed."):s("settings.dataHistory.clear.message","This deletes saved dashboard records only. Roblox Studio instances and project objects are not changed."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:s("common.clear","Clear"),loading:A,onCancel:()=>!A&&y(null),onConfirm:()=>void C()})]})}const ot={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia",de:"Deutsch","fr-fr":"Français"};function lt(t){return t==="active"?i.statusActive:t==="grace"?i.statusGrace:t==="invalid"||t==="revoked"?i.statusError:i.statusInactive}function rt(t,s){return t.refreshBlockedReason==="missing_session_token"?{label:s("settings.license.status.activationRequired","Activation Required"),tooltip:s("settings.license.status.activationRequired.tooltip","Manual license activation is required before WEPPY Dashboard can refresh this status."),detail:s("settings.license.detail.missingSessionToken","Refresh is blocked because the current session token is missing."),detailTone:i.licenseNoticeWarning}:t.statusDetail==="active_cancel_pending"?{label:s("settings.license.active","Active"),tooltip:s("settings.license.status.activeCancelPending.tooltip","Cancellation is pending, but Pro access remains active until the current billing period ends."),detail:s("settings.license.detail.cancelPending","Cancellation is scheduled. Pro access remains active until the current billing period ends."),detailTone:i.licenseNoticeInfo}:t.statusDetail==="grace_provider_unavailable"?{label:s("settings.license.status.grace","Grace"),tooltip:s("settings.license.status.grace.tooltip","Provider verification is temporarily unavailable, but Pro access remains active during the grace period."),detail:s("settings.license.detail.graceProviderUnavailable","Provider unavailable. Pro access remains active during grace mode."),detailTone:i.licenseNoticeInfo}:t.statusDetail==="grace_expired"||t.statusDetail==="grace_payment_failed"?{label:s("settings.license.status.grace","Grace"),tooltip:s("settings.license.status.graceBilling.tooltip","Pro access is still available during a billing-related grace period."),detail:s("settings.license.detail.graceBilling","Pro access remains available during a billing grace period."),detailTone:i.licenseNoticeInfo}:{label:s(`settings.license.${t.status}`,t.status),tooltip:s(`settings.license.${t.status}.tooltip`,"Current license activation state."),detail:t.refreshRequired?s("settings.license.detail.refreshRecommended","License verification should be refreshed soon."):null,detailTone:i.licenseNoticeMuted}}function vt(){const{t,selectedLocale:s,setLocale:l}=V(),{trackEvent:x}=ae(),{search:o}=re(),{settings:N,license:a,licenseControlsDisabled:g,licenseSubmitting:p,licenseMessage:P,activateLicense:k,refreshLicense:B,resetLicense:S,loading:D}=ge(),[h,y]=u.useState(""),A=a?rt(a,t):null,R=(a==null?void 0:a.tier)==="pro",_=(a==null?void 0:a.tier)==="pro"?a.maskedKey:void 0,L=a!=null&&a.provider&&a.provider!=="auto"?a.provider:void 0,w=(a==null?void 0:a.tier)==="pro"?"pro":"basic",H=u.useRef(null),C=u.useRef(null),j=u.useMemo(()=>new URLSearchParams(o).get("section")==="license",[o]);return u.useEffect(()=>{var T;if(!j||D)return;const r=H.current;if((T=r==null?void 0:r.scrollIntoView)==null||T.call(r,{block:"start",behavior:"smooth"}),C.current&&!C.current.disabled){C.current.focus();return}r==null||r.focus()},[D,g,p,j]),D?e.jsx("div",{className:i.page,children:e.jsx("div",{className:i.loading,children:t("common.loading")})}):e.jsxs("div",{className:i.page,children:[e.jsx(pe,{title:t("page.settings.title","Settings"),description:t("page.settings.description","Manage license, saved data, server environment, and language."),helpTopicId:"settings",helpState:{tier:w}}),e.jsxs("div",{id:"settings-license",ref:H,tabIndex:-1,"data-testid":"settings-license-card",className:[i.card,j?i.licenseCardTarget:"",(a==null?void 0:a.tier)==="pro"?i.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(v,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(d,{text:g?t("settings.license.disconnected.tooltip","Reconnect to the MCP server to manage license actions from WEPPY Dashboard."):t("settings.license.live.tooltip","License actions are sent to the MCP server immediately."),children:e.jsx("span",{className:`${i.headerBadge} ${g?"":i.headerBadgeLive}`,children:g?t("settings.license.disconnected","Disconnected"):t("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[a?e.jsxs(e.Fragment,{children:[(()=>{const r=A;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:i.licenseGrid,children:[e.jsx("dt",{children:e.jsx(v,{label:t("settings.license.status","Status"),tooltip:t("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${i.statusDot} ${lt(a.status)}`}),e.jsx(d,{text:(r==null?void 0:r.tooltip)??t(`settings.license.${a.status}.tooltip`,"Current license activation state."),children:(r==null?void 0:r.label)??t(`settings.license.${a.status}`,a.status)})]}),e.jsx("dt",{children:e.jsx(v,{label:t("settings.license.tier","Tier"),tooltip:t("settings.license.tier.tooltip","Current subscription tier for available WEPPY Dashboard features.")})}),e.jsx("dd",{className:a.tier==="pro"?i.proBadge:"",children:e.jsx(d,{text:t(`tier.${a.tier}.tooltip`,"Available feature set for the connected license."),children:a.tier==="pro"?t("tier.pro","Pro"):t("tier.basic","Basic")})}),_&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(v,{label:t("settings.license.key","Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(d,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:_})})]}),L&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(v,{label:t("settings.license.provider","Provider"),tooltip:t("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(d,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:L})})]})]}),(r==null?void 0:r.detail)&&e.jsx("p",{className:`${i.licenseNotice} ${r.detailTone}`,children:a.refreshBlockedReason==="missing_session_token"?t("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):r.detail}),a.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${i.licenseNotice} ${i.licenseNoticeMuted}`,children:r==null?void 0:r.detail})]})})(),a.tier==="basic"&&e.jsx(d,{text:t("tier.upgrade.tooltip","View Pro features and purchase options."),children:e.jsx("a",{className:i.upgradeLink,href:ce.settingsLicense,target:"_blank",rel:"noopener noreferrer",onClick:()=>x("dashboard_click_event",{click_target:"upgrade_cta",placement:"settings_license",page:"settings"}),children:t("tier.upgrade","View Pro")})})]}):e.jsx("div",{className:i.loading,children:t("settings.license.unavailable")}),e.jsxs("div",{className:i.licenseControls,children:[e.jsxs("div",{className:i.licenseControlRow,children:[e.jsx(d,{text:t("settings.license.refresh.tooltip","Re-fetch the current state from the license server. Useful when a billing change hasn't appeared yet."),children:e.jsx("button",{type:"button",className:i.actionBtn,disabled:g||p||!R,onClick:()=>{B()},children:p?t("common.loading"):t("settings.license.refresh","Refresh License")})}),e.jsx(d,{text:t("settings.license.reset.tooltip","Remove the currently registered license key. Use this before activating with a different key."),children:e.jsx("button",{type:"button",className:i.actionBtn,disabled:g||p||!R,onClick:()=>{S()},children:p?t("common.loading"):t("settings.license.reset","Reset License")})})]}),e.jsxs("div",{className:i.licenseControlRow,children:[e.jsxs("label",{className:`${i.licenseField} ${i.licenseFieldGrow}`,children:[e.jsx("span",{className:i.controlLabel,children:e.jsx(v,{label:t("settings.license.keyInput","License Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("input",{ref:C,"aria-label":t("settings.license.keyInput","License Key"),className:i.textInput,type:"text",value:h,disabled:g||p,onChange:r=>y(r.target.value)})]}),e.jsx(d,{text:t("settings.license.activate.tooltip","Activate Pro features with the entered license key."),children:e.jsx("button",{type:"button",className:i.actionBtn,disabled:g||p,onClick:()=>{(async()=>await k(h)&&y(""))()},children:p?t("common.loading"):t("settings.license.activate","Activate License")})})]}),P&&e.jsx("p",{className:i.licenseMessage,children:P})]})]})]}),e.jsx(nt,{tier:w}),e.jsxs("div",{className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(v,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(d,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from WEPPY Dashboard."),children:e.jsx("span",{className:i.headerBadge,children:t("settings.readOnly","Read-only")})})]}),N?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:i.coldGrid,children:[e.jsx("dt",{children:e.jsx(v,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP WEPPY Dashboard HTTP server.")})}),e.jsx("dd",{children:N.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(v,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP WEPPY Dashboard HTTP server binds to.")})}),e.jsx("dd",{children:N.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(v,{label:"DASHBOARD_AUTO_OPEN",tooltip:t("settings.cold.dashboardAutoOpen.tooltip","Controls whether WEPPY Dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(d,{text:t("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening WEPPY Dashboard in a browser."),children:String(N.cold.DASHBOARD_AUTO_OPEN)})})]}),e.jsx("p",{className:i.coldHint,children:t("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:i.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:i.card,children:[e.jsx("div",{className:i.cardHeader,children:e.jsx(v,{label:t("settings.language.title","Language"),tooltip:t("settings.language.title.tooltip","Choose how the WEPPY Dashboard interface text is localized.")})}),e.jsxs("div",{className:i.langRow,children:[e.jsx("label",{children:e.jsx(v,{label:t("settings.language.dashboard","WEPPY Dashboard Language"),tooltip:t("settings.language.dashboard.tooltip","Overrides the WEPPY Dashboard language or follows the system language when set to Auto.")})}),e.jsx(d,{text:t("settings.language.auto.tooltip","Follow the operating system's language. Falls back to English when not supported."),children:e.jsxs("select",{className:i.select,value:s,onChange:r=>l(r.target.value),children:[e.jsx("option",{value:de,children:t("settings.language.auto","Auto")}),ue.map(r=>e.jsx("option",{value:r,children:ot[r]??r},r))]})})]})]})]})}export{vt as Component};