@runfusion/fusion 0.54.0 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/bin.js +3384 -768
  2. package/dist/client/.vite/manifest.json +283 -251
  3. package/dist/client/assets/AgentDetailView-B_VfFSlt.js +18 -0
  4. package/dist/client/assets/{AgentDetailView-BzSyldiW.css → AgentDetailView-D7UY2Tup.css} +1 -1
  5. package/dist/client/assets/{AgentPermissionPolicyEditor-D2AQ6swg.js → AgentPermissionPolicyEditor-QZhz41AU.js} +1 -1
  6. package/dist/client/assets/{AgentsView-DwEFPKuN.js → AgentsView-hkhJ8SUq.js} +6 -6
  7. package/dist/client/assets/ChatView-B4WnXLYA.js +6 -0
  8. package/dist/client/assets/{CommandCenter-BABqoSkg.js → CommandCenter-B3fAajUO.js} +16 -16
  9. package/dist/client/assets/{DevServerView-DlgOzRdC.js → DevServerView-BR0ngFBw.js} +1 -1
  10. package/dist/client/assets/{DirectoryPicker-BwMSmxYS.js → DirectoryPicker-BiS41Hca.js} +1 -1
  11. package/dist/client/assets/DocumentsView-BnRvIUpa.js +1 -0
  12. package/dist/client/assets/{EvalsView-CQBNrO5n.js → EvalsView-Bvx18QyC.js} +1 -1
  13. package/dist/client/assets/{ExperimentalAgentOnboardingModal-2SDqP2lc.js → ExperimentalAgentOnboardingModal-CKGJcfXI.js} +1 -1
  14. package/dist/client/assets/{GoalsView-BgkX-_SB.js → GoalsView-Bj1yVIiv.js} +1 -1
  15. package/dist/client/assets/{InsightsView-CJY4eZcO.js → InsightsView-DBX8DI60.js} +2 -2
  16. package/dist/client/assets/{MemoryView-5Crtfanz.js → MemoryView-CqkRH2fa.js} +1 -1
  17. package/dist/client/assets/{PiExtensionsManager-COmzskVa.js → PiExtensionsManager-BMMmGWe2.js} +2 -2
  18. package/dist/client/assets/PluginManager-C1bdfN2W.js +1 -0
  19. package/dist/client/assets/{PullRequestView-DAHh0FVM.js → PullRequestView-D0CsXWLl.js} +2 -2
  20. package/dist/client/assets/{ResearchView-cSUka3sd.js → ResearchView-CVgmXAlj.js} +1 -1
  21. package/dist/client/assets/{SecretsView-ChFAfFRY.js → SecretsView-Bv_gw5Ix.js} +1 -1
  22. package/dist/client/assets/{SessionTerminal-D4R3ScvQ.css → SessionTerminal-BvK8A98c.css} +1 -1
  23. package/dist/client/assets/{SessionTerminal-CtQKDaqI.js → SessionTerminal-VLdVV3Ji.js} +1 -1
  24. package/dist/client/assets/{SettingsModal-BzZNPNIh.css → SettingsModal-4t8rV7rh.css} +1 -1
  25. package/dist/client/assets/{SettingsModal-pAz_hOoN.js → SettingsModal-D7YgojbV.js} +1 -1
  26. package/dist/client/assets/SettingsModal-gcrh5EOG.js +21 -0
  27. package/dist/client/assets/SetupWizardModal-DvmTlFP_.js +2 -0
  28. package/dist/client/assets/{ShadcnColorPicker-CsfgWpf6.js → ShadcnColorPicker-DM2fqGwl.js} +1 -1
  29. package/dist/client/assets/{SkillsView-BSUplEYb.js → SkillsView-Bb-JTo99.js} +1 -1
  30. package/dist/client/assets/{TodoView-DhBseLvM.js → TodoView-bV-7deOh.js} +1 -1
  31. package/dist/client/assets/{WorkflowNodeEditor-Bi12CNif.js → WorkflowNodeEditor-Ui1q_fFI.js} +3 -3
  32. package/dist/client/assets/{agentSkills-qVb0x_G3.js → agentSkills-DGFyuKuP.js} +1 -1
  33. package/dist/client/assets/{app-DczBmsP4.js → app--OM-ul6R.js} +3 -3
  34. package/dist/client/assets/{app-BhtYYxin.js → app-BCvqf8qq.js} +3 -3
  35. package/dist/client/assets/app-BZqqEiWR.js +13 -0
  36. package/dist/client/assets/{app-5S4z84u5.js → app-DQeH1UDD.js} +3 -3
  37. package/dist/client/assets/{app-Cts0__Vx.js → app-FiYwRatp.js} +3 -3
  38. package/dist/client/assets/{app-_GFUqcMK.js → app-rGdYcsAA.js} +3 -3
  39. package/dist/client/assets/{architectureDiagram-3BPJPVTR-DEt4eIEQ.js → architectureDiagram-3BPJPVTR-DP7vOyXY.js} +1 -1
  40. package/dist/client/assets/{blockDiagram-GPEHLZMM-CJuX0UM_.js → blockDiagram-GPEHLZMM-Di9v1pV8.js} +1 -1
  41. package/dist/client/assets/{c4Diagram-AAUBKEIU-a46Lm113.js → c4Diagram-AAUBKEIU-Dvb8RSfr.js} +1 -1
  42. package/dist/client/assets/channel-C5g9M3Sk.js +1 -0
  43. package/dist/client/assets/{chunk-2J33WTMH-iBhwyS0c.js → chunk-2J33WTMH-gLcAuGjI.js} +1 -1
  44. package/dist/client/assets/{chunk-4BX2VUAB-C7lS5wER.js → chunk-4BX2VUAB-B-B0wjkx.js} +1 -1
  45. package/dist/client/assets/{chunk-55IACEB6-CQ6YOncn.js → chunk-55IACEB6-XUDeC0Co.js} +1 -1
  46. package/dist/client/assets/{chunk-727SXJPM-CveMaMKK.js → chunk-727SXJPM-1eebiGA2.js} +1 -1
  47. package/dist/client/assets/{chunk-AQP2D5EJ-DErjGUEk.js → chunk-AQP2D5EJ-D9VOB5QS.js} +1 -1
  48. package/dist/client/assets/{chunk-FMBD7UC4-DXUvEFfJ.js → chunk-FMBD7UC4-EFNFEaAz.js} +1 -1
  49. package/dist/client/assets/{chunk-ND2GUHAM-w5RqSj1J.js → chunk-ND2GUHAM-CbeQailD.js} +1 -1
  50. package/dist/client/assets/{chunk-QZHKN3VN-CAi0lJ7V.js → chunk-QZHKN3VN-D55N6EBz.js} +1 -1
  51. package/dist/client/assets/classDiagram-4FO5ZUOK-B-wdlvD6.js +1 -0
  52. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-B-wdlvD6.js +1 -0
  53. package/dist/client/assets/{cose-bilkent-S5V4N54A-Ck2h4uV5.js → cose-bilkent-S5V4N54A-B0zbhkX3.js} +1 -1
  54. package/dist/client/assets/createLucideIcon-CshVyKO4.js +21 -0
  55. package/dist/client/assets/{dagre-BM42HDAG-BCRTXNj6.js → dagre-BM42HDAG-BL6peXwl.js} +1 -1
  56. package/dist/client/assets/dashboard-view-Bsdq3OM4.css +1 -0
  57. package/dist/client/assets/dashboard-view-CS1H5SQN.js +1 -0
  58. package/dist/client/assets/dashboard-view-DafOfnxI.js +1 -0
  59. package/dist/client/assets/{dashboard-view-D9rF_PCq.js → dashboard-view-Db3n_W85.js} +1320 -1335
  60. package/dist/client/assets/{diagram-2AECGRRQ-DTTk-DYO.js → diagram-2AECGRRQ-cYKwSHk7.js} +1 -1
  61. package/dist/client/assets/{diagram-5GNKFQAL-jDc9kMi2.js → diagram-5GNKFQAL-DHIwTGuM.js} +1 -1
  62. package/dist/client/assets/{diagram-KO2AKTUF-CcLmzlGr.js → diagram-KO2AKTUF-DfHBJ4aX.js} +1 -1
  63. package/dist/client/assets/{diagram-LMA3HP47-DCW8XKQj.js → diagram-LMA3HP47-pWhYmB6Z.js} +1 -1
  64. package/dist/client/assets/{diagram-OG6HWLK6-wbbKquPs.js → diagram-OG6HWLK6-GzWqbi_m.js} +1 -1
  65. package/dist/client/assets/{erDiagram-TEJ5UH35-Fo933Mo7.js → erDiagram-TEJ5UH35-CCVm5eiR.js} +1 -1
  66. package/dist/client/assets/{flowDiagram-I6XJVG4X-Dfum7HZP.js → flowDiagram-I6XJVG4X-CUTdnU6S.js} +1 -1
  67. package/dist/client/assets/{folder-open-B8vOwFeP.js → folder-open-DOCy9GVC.js} +1 -1
  68. package/dist/client/assets/{ganttDiagram-6RSMTGT7-BzEBCn01.js → ganttDiagram-6RSMTGT7-CW4ENJaC.js} +1 -1
  69. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-CgovghHs.js → gitGraphDiagram-PVQCEYII-QXXMfSzp.js} +1 -1
  70. package/dist/client/assets/index-B6ttSchA.js +1336 -0
  71. package/dist/client/assets/index-CPE2Kwra.css +1 -0
  72. package/dist/client/assets/{infoDiagram-5YYISTIA-BzpU4Wys.js → infoDiagram-5YYISTIA-CZyHbj0n.js} +1 -1
  73. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-cpp5pozu.js → ishikawaDiagram-YF4QCWOH-Dea84lqZ.js} +1 -1
  74. package/dist/client/assets/{journeyDiagram-JHISSGLW-BVjcw6oo.js → journeyDiagram-JHISSGLW-Db2iKGU5.js} +1 -1
  75. package/dist/client/assets/{kanban-definition-UN3LZRKU-4unAhBzo.js → kanban-definition-UN3LZRKU-CB9loIqR.js} +1 -1
  76. package/dist/client/assets/loader-circle-CMNcxXXr.js +16 -0
  77. package/dist/client/assets/{mermaid.core-DzIyUj9t.js → mermaid.core-CoQ8aCb0.js} +4 -4
  78. package/dist/client/assets/{mindmap-definition-RKZ34NQL-Be_yfVir.js → mindmap-definition-RKZ34NQL-JPb2wF-K.js} +1 -1
  79. package/dist/client/assets/{pieDiagram-4H26LBE5-Cfnw2aji.js → pieDiagram-4H26LBE5-pdZzOreP.js} +1 -1
  80. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-BFlC-_Uo.js → quadrantDiagram-W4KKPZXB-Dh9Ids90.js} +1 -1
  81. package/dist/client/assets/{requirementDiagram-4Y6WPE33-DpVPzCOx.js → requirementDiagram-4Y6WPE33-BVPOSvHU.js} +1 -1
  82. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-DM-gKKP0.js → sankeyDiagram-5OEKKPKP-BqSMUpsx.js} +1 -1
  83. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-DjhZCZhd.js → sequenceDiagram-3UESZ5HK-B8nepQ6X.js} +1 -1
  84. package/dist/client/assets/{shield-alert-DCfkjjYc.js → shield-alert-CtSaIQNY.js} +1 -1
  85. package/dist/client/assets/{stateDiagram-AJRCARHV-BCA96rdI.js → stateDiagram-AJRCARHV-CQv9RdRp.js} +1 -1
  86. package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-DHds08RS.js → stateDiagram-v2-BHNVJYJU-BZ_mlvie.js} +1 -1
  87. package/dist/client/assets/{timeline-definition-PNZ67QCA-CHW2OQRw.js → timeline-definition-PNZ67QCA-CAjwM-Z5.js} +1 -1
  88. package/dist/client/assets/{upload-EJc5PJPz.js → upload-0_pT1euA.js} +1 -1
  89. package/dist/client/assets/{users-C-e-99Vp.js → users--1B6mnm8.js} +1 -1
  90. package/dist/client/assets/{vennDiagram-CIIHVFJN-shGh4eBY.js → vennDiagram-CIIHVFJN-BO3Um3rH.js} +1 -1
  91. package/dist/client/assets/{wardley-L42UT6IY-l0RGrVhn.js → wardley-L42UT6IY-BzqJcqDA.js} +1 -1
  92. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-C-USmO8A.js → wardleyDiagram-YWT4CUSO-Bctxc6_5.js} +1 -1
  93. package/dist/client/assets/{xychartDiagram-2RQKCTM6-CHX9Umta.js → xychartDiagram-2RQKCTM6-CgDuiMFR.js} +1 -1
  94. package/dist/client/assets/zoom-out-DzDzWQt1.js +21 -0
  95. package/dist/client/index.html +13 -4
  96. package/dist/client/version.json +1 -1
  97. package/dist/droid-cli/package.json +1 -1
  98. package/dist/extension.js +2066 -271
  99. package/dist/pi-claude-cli/package.json +1 -1
  100. package/dist/plugin-sdk/index.d.ts +61 -1
  101. package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
  102. package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
  103. package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
  104. package/dist/plugins/fusion-plugin-cursor-runtime/bundled.js +70 -25
  105. package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
  106. package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
  107. package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
  108. package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
  109. package/dist/plugins/fusion-plugin-linear-import/bundled.js +658 -0
  110. package/dist/plugins/fusion-plugin-linear-import/manifest.json +48 -0
  111. package/dist/plugins/fusion-plugin-linear-import/package.json +11 -0
  112. package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
  113. package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
  114. package/dist/plugins/fusion-plugin-reports/package.json +1 -1
  115. package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
  116. package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
  117. package/package.json +2 -1
  118. package/skill/fusion/SKILL.md +2 -2
  119. package/skill/fusion/references/engine-tools.md +1 -0
  120. package/skill/fusion/references/extension-tools.md +81 -0
  121. package/skill/fusion/references/fusion-capabilities.md +7 -0
  122. package/dist/client/assets/AgentDetailView-BJditQat.js +0 -18
  123. package/dist/client/assets/ChatView-B4bjPXFN.js +0 -6
  124. package/dist/client/assets/DocumentsView-BfaRXFg5.js +0 -1
  125. package/dist/client/assets/PluginManager-CGWXqZMa.js +0 -1
  126. package/dist/client/assets/SettingsModal-BYaotQ2o.js +0 -21
  127. package/dist/client/assets/SetupWizardModal-eHZHi8VP.js +0 -2
  128. package/dist/client/assets/app-B1VYocx2.js +0 -13
  129. package/dist/client/assets/channel-BGI9APMr.js +0 -1
  130. package/dist/client/assets/classDiagram-4FO5ZUOK-g6hCcufy.js +0 -1
  131. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-g6hCcufy.js +0 -1
  132. package/dist/client/assets/dashboard-view-BfLJ60Kd.js +0 -1
  133. package/dist/client/assets/index-BjELA24x.js +0 -1336
  134. package/dist/client/assets/index-DwGW7OJh.css +0 -1
  135. package/dist/client/assets/zoom-out-NWbVkreR.js +0 -41
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ExperimentalAgentOnboardingModal-2SDqP2lc.js","assets/vendor-react-SZ_qB27O.js","assets/index-BjELA24x.js","assets/vendor-i18n-GF3RlKbq.js","assets/vendor-reactflow-CnI7NMXG.js","assets/vendor-reactflow-C5ap-Sga.css","assets/vendor-xterm-BNq00GSj.js","assets/vendor-xterm-LZoznX6r.css","assets/vendor-codemirror-jBKmHyH0.js","assets/index-DwGW7OJh.css","assets/ExperimentalAgentOnboardingModal-3ZEFv8sr.css"])))=>i.map(i=>d[i]);
2
- import{A as g,g as b,m as R,u as te,d as ae,r as re,a as ne,b as ie,e as le,X as oe,L as v,C as de,f as E,S as ce,h as S,E as ue,_ as pe}from"./index-BjELA24x.js";import{r as l,j as e}from"./vendor-react-SZ_qB27O.js";import{D as me}from"./DirectoryPicker-BwMSmxYS.js";import{s as y}from"./projectDetection-G3XuxD2X.js";import{u as ge}from"./vendor-i18n-GF3RlKbq.js";import"./vendor-reactflow-CnI7NMXG.js";import"./vendor-xterm-BNq00GSj.js";import"./vendor-codemirror-jBKmHyH0.js";import"./folder-open-B8vOwFeP.js";function C(c){const u=c.replace(/[^a-zA-Z]/g,"").toUpperCase();return u.length>=2&&u.length<=4?u:u.length>4?u.slice(0,4):"FN"}const he=l.lazy(()=>pe(()=>import("./ExperimentalAgentOnboardingModal-2SDqP2lc.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(c=>({default:c.ExperimentalAgentOnboardingModal})));function Ce({onProjectRegistered:c,onClose:u,agentOnboardingEnabled:P=!1,includeAgentStep:z=!0}){const{t:a}=ge("app"),F="https://discord.gg/ksrfuy7WYR",x=l.useMemo(()=>b("ceo")??g[0],[]),[T,U]=l.useState(!0),[s,i]=l.useState(()=>({step:"manual",manualMode:"existing",manualPath:"",manualCloneUrl:"",manualName:"",manualIsolationMode:"in-process",manualNodeId:"",manualTaskPrefix:"",detectedRepos:[],workspaceMode:!1,isDetectingWorkspace:!1,registeredProject:null,selectedPresetId:x.id,agentDraft:R(x),isCreatingAgent:!1,isRegistering:!1,error:null,agentError:null,agentOutcome:null})),[A,W]=l.useState(!1),[I,j]=l.useState(!1),D=l.useRef(null),{nodes:M,loading:L}=te(),O=M.find(t=>t.type==="local")?.id,f=l.useCallback(()=>{U(!1),u?.()},[u]),_=l.useCallback(()=>{if(s.registeredProject){c(s.registeredProject);return}f()},[f,c,s.registeredProject]);l.useEffect(()=>{s.agentError&&D.current?.focus()},[s.agentError]);const N=l.useRef(0),H=l.useCallback(t=>{if(i(r=>{const n={manualPath:t,detectedRepos:[],workspaceMode:!1};t&&(!r.manualName||r.manualName===y(r.manualPath))&&(n.manualName=y(t));const o=n.manualName??r.manualName;return o&&(!r.manualTaskPrefix||r.manualTaskPrefix===C(y(r.manualPath)))&&(n.manualTaskPrefix=C(o)),{...r,...n}}),s.manualMode==="existing"&&t.trim()&&t.trim()!=="/"){const r=++N.current;i(n=>({...n,isDetectingWorkspace:!0})),ae(t.trim()).then(n=>{r===N.current&&i(o=>({...o,isDetectingWorkspace:!1,detectedRepos:n.repos,workspaceMode:n.isWorkspace}))}).catch(()=>{r===N.current&&i(n=>({...n,isDetectingWorkspace:!1}))})}},[s.manualMode]),B=l.useCallback(async()=>{const t=s.manualPath.trim(),r=s.manualName.trim(),n=s.manualCloneUrl.trim();if(!(!t||!r)&&!(s.manualMode==="clone"&&!n)){i(o=>({...o,isRegistering:!0,error:null}));try{const o={name:r,path:t,isolationMode:s.manualIsolationMode,nodeId:s.manualNodeId||void 0,cloneUrl:s.manualMode==="clone"?n:void 0,workspaceMode:s.workspaceMode,taskPrefix:s.manualTaskPrefix.trim()||void 0},d=await re(o);if(!z){i(m=>({...m,isRegistering:!1})),c(d);return}i(m=>({...m,step:"agent",registeredProject:d,isRegistering:!1}))}catch(o){i(d=>({...d,isRegistering:!1,error:o instanceof Error?o.message:"Failed to register project"}))}}},[z,c,s.manualPath,s.manualName,s.manualCloneUrl,s.manualMode,s.manualIsolationMode,s.manualNodeId,s.workspaceMode,s.manualTaskPrefix]),w=l.useCallback(t=>{const r=b(t);r&&i(n=>({...n,selectedPresetId:r.id,agentDraft:R(r),agentError:null}))},[]),$=l.useCallback((t,r)=>{const n=g.findIndex(se=>se.id===r);if(n<0)return;const o=g.length-1;let d=null;if(t.key==="ArrowDown"||t.key==="ArrowRight"?d=n===o?0:n+1:t.key==="ArrowUp"||t.key==="ArrowLeft"?d=n===0?o:n-1:t.key==="Home"?d=0:t.key==="End"&&(d=o),d===null)return;t.preventDefault();const m=g[d];w(m.id),requestAnimationFrame(()=>{document.querySelector(`[data-agent-preset-id="${m.id}"]`)?.focus()})},[w]),Y=l.useCallback(t=>{i(r=>({...r,selectedPresetId:"",agentDraft:ne(t),agentError:null}))},[]),G=l.useCallback(async()=>{if(!(!s.registeredProject||!s.agentDraft.name.trim())){i(t=>({...t,isCreatingAgent:!0,agentError:null}));try{await ie(le(s.agentDraft),s.registeredProject.id),i(t=>({...t,step:"complete",isCreatingAgent:!1,agentOutcome:"created"}))}catch(t){i(r=>({...r,isCreatingAgent:!1,agentError:t instanceof Error?t.message:a("setup.firstAgentCreateError","Failed to create agent")}))}}},[s.agentDraft,s.registeredProject,a]),q=l.useCallback(()=>{i(t=>({...t,step:"complete",agentError:null,agentOutcome:"skipped"}))},[]);if(!T)return null;const k=s.manualMode==="existing",p=s.manualMode==="clone",K=s.manualPath.trim().length>0,Z=s.manualName.trim().length>0,V=s.manualCloneUrl.trim().length>0,X=s.isRegistering||!K||!Z||p&&!V,J=s.selectedPresetId?b(s.selectedPresetId):void 0,h=s.isCreatingAgent,Q=s.selectedPresetId||x.id,ee=`modal setup-wizard-modal${s.step==="agent"?" setup-wizard-modal--agent":""}`;return e.jsxs("div",{className:"modal-overlay open setup-wizard-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"wizard-title",children:[e.jsxs("div",{className:ee,children:[e.jsxs("div",{className:"setup-wizard-header",children:[e.jsxs("div",{className:"setup-wizard-heading",children:[e.jsxs("div",{className:"setup-wizard-brand","aria-label":a("setup.brandName","Fusion"),children:[e.jsxs("svg",{className:"setup-wizard-brand-logo",width:28,height:28,viewBox:"0 0 128 128",fill:"none","aria-label":a("setup.brandLogo","Fusion logo"),role:"img",children:[e.jsx("circle",{cx:"64",cy:"64",r:"52",stroke:"currentColor",strokeWidth:"8"}),e.jsx("path",{d:"M26 101C44 82 62 64 82 45C90 37 98 30 104 24C96 35 89 47 81 60C70 79 57 95 43 108C38 112 32 108 26 101Z",fill:"currentColor"})]}),e.jsx("span",{className:"setup-wizard-brand-name",children:a("setup.brandName","Fusion")})]}),e.jsxs("h2",{id:"wizard-title",className:"setup-wizard-title",children:[s.step==="manual"&&a("setup.welcomeToFusion","Welcome to Fusion"),s.step==="agent"&&a("setup.firstAgentTitle","Create your first agent"),s.step==="complete"&&a("setup.setupCompleteTitle","Setup Complete!")]})]}),s.step!=="complete"&&s.step!=="agent"&&e.jsx("button",{className:"modal-close",onClick:f,"aria-label":a("setup.closeWizard","Close wizard"),children:e.jsx(oe,{size:20})})]}),e.jsxs("div",{className:"setup-wizard-content",children:[s.step==="manual"&&e.jsxs("div",{className:"setup-wizard-manual",children:[e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"project-name",children:a("setup.projectName","Project Name")}),e.jsx("input",{id:"project-name",type:"text",value:s.manualName,onChange:t=>i(r=>({...r,manualName:t.target.value})),placeholder:a("setup.projectNamePlaceholder","my-project")}),e.jsx("p",{className:"form-hint",children:p?a("setup.projectNameHintClone","By default this follows the destination folder name unless you edit it."):a("setup.projectNameHintExisting","By default this follows the selected directory name unless you edit it.")})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"project-path",children:p?a("setup.destinationDirectory","Destination Directory"):a("setup.projectDirectory","Project Directory")}),e.jsx(me,{value:s.manualPath,onChange:H,nodeId:s.manualNodeId||void 0,localNodeId:O,placeholder:p?a("setup.clonePathPlaceholder","/path/for/new-clone"):a("setup.projectPathPlaceholder","/path/to/your/project")}),e.jsx("p",{className:"form-hint",children:p?a("setup.clonePathHint","Select or type an absolute destination path. Fusion will clone into this directory."):a("setup.projectPathHint","Select or type the absolute path to your project")})]}),k&&s.manualPath.trim()&&e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:"workspace-mode",className:"checkbox-label",children:[e.jsx("input",{id:"workspace-mode",type:"checkbox",checked:s.workspaceMode,onChange:t=>i(r=>({...r,workspaceMode:t.target.checked}))}),a("setup.workspaceMode","Workspace mode (multi-repo)")]}),s.isDetectingWorkspace&&e.jsxs("p",{className:"form-hint",children:[e.jsx(v,{size:12,className:"animate-spin",style:{display:"inline-block",verticalAlign:"middle",marginRight:4}}),a("setup.detectingWorkspace","Detecting sub-repositories...")]}),!s.isDetectingWorkspace&&s.detectedRepos.length>0&&e.jsxs("p",{className:"form-hint",children:[a("setup.detectedRepos","Found {{count}} repositories:",{count:s.detectedRepos.length})," ",s.detectedRepos.join(", ")]}),!s.isDetectingWorkspace&&s.detectedRepos.length===0&&s.workspaceMode===!1&&s.manualPath.trim()&&e.jsx("p",{className:"form-hint",children:a("setup.noSubReposDetected","No sub-repositories detected. Enable if this is a multi-repo workspace.")})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"task-prefix",children:a("setup.taskPrefix","Task Prefix")}),e.jsx("input",{id:"task-prefix",type:"text",value:s.manualTaskPrefix,onChange:t=>i(r=>({...r,manualTaskPrefix:t.target.value.toUpperCase()})),placeholder:C(s.manualName||"FN"),maxLength:5}),e.jsx("p",{className:"form-hint",children:a("setup.taskPrefixHint",'Used for task IDs (e.g. "{{prefix}}-1"). Derived from project name.',{prefix:s.manualTaskPrefix||"FN"})})]}),e.jsxs("div",{className:"setup-wizard-advanced",children:[e.jsxs("button",{type:"button",className:"setup-wizard-advanced-toggle","aria-expanded":A,onClick:()=>W(t=>!t),children:[e.jsx(de,{size:16,className:"setup-wizard-advanced-chevron"}),e.jsx("span",{children:a("setup.advancedSettings","Advanced settings")})]}),A&&e.jsxs("div",{className:"setup-wizard-advanced-panel",children:[e.jsxs("fieldset",{className:"setup-wizard-mode-switch","aria-label":"Project setup mode",children:[e.jsx("legend",{children:a("setup.setupMode","Setup Mode")}),e.jsxs("label",{className:`setup-wizard-mode-option${k?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"setup-mode",value:"existing",checked:k,onChange:()=>i(t=>({...t,manualMode:"existing",error:null}))}),e.jsx("span",{children:a("setup.useExistingDirectory","Use Existing Directory")})]}),e.jsxs("label",{className:`setup-wizard-mode-option${p?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"setup-mode",value:"clone",checked:p,onChange:()=>i(t=>({...t,manualMode:"clone",error:null}))}),e.jsx("span",{children:a("setup.cloneGitRepository","Clone Git Repository")})]})]}),p&&e.jsxs("div",{className:"form-group",children:[e.jsx("label",{htmlFor:"project-clone-url",children:a("setup.repositoryUrl","Repository URL")}),e.jsx("input",{id:"project-clone-url",type:"text",value:s.manualCloneUrl,onChange:t=>i(r=>({...r,manualCloneUrl:t.target.value})),placeholder:a("setup.repositoryUrlPlaceholder","https://github.com/owner/repo.git")}),e.jsx("p",{className:"form-hint",children:a("setup.cloneGitHint","Fusion will run git clone into the destination directory, then register that cloned folder.")})]}),e.jsx("div",{className:"form-group",children:e.jsxs("div",{className:"project-node-selector",children:[e.jsx("span",{className:"project-node-selector__label",children:a("setup.runtimeNode","Runtime Node")}),e.jsxs("select",{value:s.manualNodeId,onChange:t=>i(r=>({...r,manualNodeId:t.target.value})),disabled:L||s.isRegistering,children:[e.jsx("option",{value:"",children:a("setup.localNode","Local node")}),M.map(t=>e.jsxs("option",{value:t.id,children:[t.name," (",t.type,")"]},t.id))]})]})}),e.jsxs("div",{className:"form-group",children:[e.jsx("label",{children:a("setup.isolationMode","Isolation Mode")}),e.jsxs("div",{className:"setup-wizard-isolation-options",children:[e.jsxs("label",{className:`setup-wizard-isolation-option${s.manualIsolationMode==="in-process"?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"isolation-mode",value:"in-process",checked:s.manualIsolationMode==="in-process",onChange:()=>i(t=>({...t,manualIsolationMode:"in-process"}))}),e.jsxs("div",{className:"setup-wizard-isolation-option-content",children:[e.jsx("strong",{children:a("setup.inProcess","In-Process")}),e.jsx("span",{children:a("setup.inProcessDesc","Lower overhead, shared memory. Best for most projects.")}),e.jsx("span",{className:"wizard-option-recommended",children:a("setup.recommended","Recommended")})]})]}),e.jsxs("label",{className:`setup-wizard-isolation-option${s.manualIsolationMode==="child-process"?" selected":""}`,children:[e.jsx("input",{type:"radio",name:"isolation-mode",value:"child-process",checked:s.manualIsolationMode==="child-process",onChange:()=>i(t=>({...t,manualIsolationMode:"child-process"}))}),e.jsxs("div",{className:"setup-wizard-isolation-option-content",children:[e.jsx("strong",{children:a("setup.childProcess","Child-Process")}),e.jsx("span",{children:a("setup.childProcessDesc","Isolated execution with crash containment.")})]})]})]})]})]})]}),s.error&&e.jsx("div",{className:"wizard-error",role:"alert",children:s.error})]}),s.step==="agent"&&e.jsxs("div",{className:"setup-wizard-agent-step",children:[e.jsx("p",{className:"setup-wizard-agent-intro",children:a("setup.firstAgentIntro","Agents are optional. Fusion can build tasks without one by starting temporary agents for planning, coding, review, and merge. Create an agent only if you want help coordinating tasks and direction.")}),e.jsxs("div",{className:"setup-wizard-agent-layout",children:[e.jsxs("section",{className:"setup-wizard-agent-presets","aria-labelledby":"setup-first-agent-presets-heading",children:[e.jsx("div",{className:"setup-wizard-agent-section-heading",id:"setup-first-agent-presets-heading",children:a("setup.firstAgentTemplates","Templates")}),e.jsx("div",{className:"setup-wizard-agent-preset-list",role:"radiogroup","aria-label":a("setup.firstAgentTemplates","Templates"),children:g.map(t=>{const r=s.selectedPresetId===t.id;return e.jsxs("button",{type:"button",className:`setup-wizard-agent-preset${r?" selected":""}`,role:"radio","aria-checked":r,"aria-label":r?a("setup.selectedAgentTemplate","{{name}} selected",{name:t.name}):t.name,tabIndex:t.id===Q?0:-1,"data-agent-preset-id":t.id,disabled:h,onClick:()=>w(t.id),onKeyDown:n=>$(n,t.id),children:[e.jsx(E,{agent:{id:t.id,icon:t.icon,name:t.name},size:28}),e.jsxs("span",{className:"setup-wizard-agent-preset-copy",children:[e.jsxs("span",{className:"setup-wizard-agent-preset-name",children:[t.name,t.id==="ceo"&&e.jsx("span",{className:"wizard-option-recommended",children:a("setup.recommended","Recommended")})]}),e.jsx("span",{className:"setup-wizard-agent-preset-description",children:t.description})]})]},t.id)})})]}),e.jsxs("section",{className:"setup-wizard-agent-preview","aria-labelledby":"setup-first-agent-preview-heading",children:[e.jsx("div",{className:"setup-wizard-agent-section-heading",id:"setup-first-agent-preview-heading",children:a("setup.firstAgentPreview","Preview")}),e.jsxs("div",{className:"setup-wizard-agent-preview-card",children:[e.jsxs("div",{className:"setup-wizard-agent-preview-title-row",children:[e.jsx(E,{agent:{id:s.selectedPresetId||"draft",icon:s.agentDraft.icon,name:s.agentDraft.name},size:36}),e.jsxs("div",{children:[e.jsx("h3",{children:s.agentDraft.name||a("setup.firstAgentDraftName","Draft agent")}),e.jsx("p",{children:s.agentDraft.title||J?.title||a("setup.firstAgentCustomDraft","Custom agent draft")})]})]}),e.jsxs("dl",{className:"setup-wizard-agent-preview-list",children:[e.jsxs("div",{children:[e.jsx("dt",{children:a("agents.fieldRole","Role")}),e.jsx("dd",{children:s.agentDraft.role})]}),e.jsxs("div",{children:[e.jsx("dt",{children:a("agents.fieldInstructionsText","Inline Instructions")}),e.jsx("dd",{children:s.agentDraft.instructionsText||a("setup.firstAgentNoInstructions","No inline instructions yet")})]})]}),P&&e.jsxs("button",{type:"button",className:"btn setup-wizard-agent-ai-btn",onClick:()=>j(!0),disabled:h,children:[e.jsx(ce,{size:16}),e.jsx("span",{children:a("agents.aiInterview","AI Interview")})]})]})]})]}),s.agentError&&e.jsx("div",{className:"wizard-error",role:"alert",tabIndex:-1,ref:D,children:s.agentError})]}),s.step==="complete"&&e.jsxs("div",{className:"setup-wizard-complete",children:[e.jsxs("div",{className:"setup-wizard-success-streak","aria-hidden":"true",children:[e.jsx("div",{className:"setup-wizard-success-streak-core"}),e.jsx("div",{className:"setup-wizard-success-streak-glow"})]}),e.jsx(S,{size:64,className:"success-icon"}),e.jsx("h3",{children:a("setup.allSet","All Set!")}),e.jsx("p",{children:s.agentOutcome==="created"?a("setup.firstAgentCreatedSuccess","Your project is registered and your first agent is ready."):a("setup.projectRegisteredSuccess","Your project has been registered successfully.")}),e.jsx("p",{children:s.agentOutcome==="skipped"?a("setup.firstAgentSkippedHint","You can create agents later from the Agents view."):a("setup.addMoreProjectsHint","You can add more projects anytime from the project overview.")})]})]}),e.jsxs("div",{className:"setup-wizard-footer",children:[e.jsx("a",{className:"btn setup-wizard-help-link",href:F,target:"_blank",rel:"noopener noreferrer",children:a("setup.needHelp","Need help?")}),s.step==="manual"&&e.jsx("button",{className:"btn btn-primary",onClick:B,disabled:X,children:s.isRegistering?e.jsxs(e.Fragment,{children:[e.jsx(v,{size:16,className:"animate-spin"}),e.jsx("span",{children:a("setup.registering","Registering...")})]}):e.jsx("span",{children:a("setup.registerProject","Register Project")})}),s.step==="agent"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"btn",onClick:q,disabled:h,children:a("setup.skipFirstAgent","Skip for now")}),e.jsx("button",{className:"btn btn-primary",onClick:()=>void G(),disabled:h||!s.agentDraft.name.trim(),"aria-busy":s.isCreatingAgent,children:s.isCreatingAgent?e.jsxs(e.Fragment,{children:[e.jsx(v,{size:16,className:"animate-spin"}),e.jsx("span",{children:a("setup.creatingFirstAgent","Creating agent...")})]}):e.jsx("span",{children:a("setup.createFirstAgent","Create Agent")})})]}),s.step==="complete"&&e.jsxs("button",{className:"btn btn-primary",onClick:_,children:[e.jsx(S,{size:16}),e.jsx("span",{children:a("setup.getStarted","Get Started")})]})]})]}),P&&I&&e.jsx(ue,{level:"modal",fallback:e.jsxs("div",{className:"wizard-error setup-wizard-agent-interview-error",role:"alert",children:[e.jsx("span",{children:a("setup.firstAgentInterviewLoadError","AI interview could not load. You can still create an agent from a template or skip this step.")}),e.jsx("button",{type:"button",className:"btn",onClick:()=>j(!1),children:a("setup.firstAgentContinueWithTemplates","Continue with templates")})]}),children:e.jsx(l.Suspense,{fallback:e.jsx("div",{className:"wizard-error setup-wizard-agent-interview-error",role:"status",children:a("setup.firstAgentInterviewLoading","Loading AI Interview...")}),children:e.jsx(he,{isOpen:I,onClose:()=>j(!1),onUseDraft:Y,projectId:s.registeredProject?.id,existingAgents:[],mode:"create"})})})]})}export{Ce as SetupWizardModal};