@runfusion/fusion 0.78.0-beta.2 → 0.78.0-beta.4

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 (165) hide show
  1. package/dist/bin.js +5142 -5151
  2. package/dist/child-process-worker.js +3720 -3649
  3. package/dist/client/.vite/manifest.json +262 -262
  4. package/dist/client/assets/{AgentDetailView-4tEdPTG2.js → AgentDetailView-BVDrAj1Y.js} +3 -3
  5. package/dist/client/assets/AgentDetailView-DaSEdzYy.css +1 -0
  6. package/dist/client/assets/{AgentPermissionPolicyEditor-DIGxjQFE.js → AgentPermissionPolicyEditor--11QLSt_.js} +1 -1
  7. package/dist/client/assets/{AgentsView-BXFYQAPe.js → AgentsView-D3mLjE0-.js} +4 -4
  8. package/dist/client/assets/{CommandCenter-vknNrxBN.js → CommandCenter-CPy2a26y.js} +1 -1
  9. package/dist/client/assets/{DevServerView-COFb49kW.js → DevServerView-CWHhisoR.js} +1 -1
  10. package/dist/client/assets/{DirectoryPicker-C-wYRUc5.js → DirectoryPicker-DMd9MEtq.js} +1 -1
  11. package/dist/client/assets/DocumentsView-YeYy6DJV.js +1 -0
  12. package/dist/client/assets/{EvalsView-BcOgXvPe.js → EvalsView-DfvYGoX4.js} +1 -1
  13. package/dist/client/assets/{ExperimentalAgentOnboardingModal-B0zF29ER.js → ExperimentalAgentOnboardingModal-CFjRfBUk.js} +1 -1
  14. package/dist/client/assets/{GoalsView--Cj2se_t.js → GoalsView-DdlI85_-.js} +1 -1
  15. package/dist/client/assets/InsightsView-Du2UKeQE.js +11 -0
  16. package/dist/client/assets/{MemoryView-Ca0Y2fYg.js → MemoryView-DeSuPKc7.js} +1 -1
  17. package/dist/client/assets/{PatchnodeView--E259o36.js → PatchnodeView-Ow5ErHE3.js} +1 -1
  18. package/dist/client/assets/{PiExtensionsManager-DKKLn5YE.js → PiExtensionsManager-D65p_Z4a.js} +1 -1
  19. package/dist/client/assets/{PluginManager-e0Rnv7RI.js → PluginManager-BruzVBGM.js} +1 -1
  20. package/dist/client/assets/{PullRequestView-BFe77u-d.js → PullRequestView-BTzsKxrq.js} +1 -1
  21. package/dist/client/assets/{ReportModal-DvyDEj8D.js → ReportModal-YpkrGp21.js} +2 -2
  22. package/dist/client/assets/ResearchView-D0oWTBMk.js +2 -0
  23. package/dist/client/assets/{SecretsView-DTrrJEt9.js → SecretsView-B6ZH6O1O.js} +1 -1
  24. package/dist/client/assets/{SettingsModal-DnTX4rMK.js → SettingsModal-CN4NVtbD.js} +1 -1
  25. package/dist/client/assets/SettingsModal-CmPRFol7.css +1 -0
  26. package/dist/client/assets/SettingsModal-CwUcFHcw.js +21 -0
  27. package/dist/client/assets/{SettingsTextareaRow-y3gQ4u_G.js → SettingsTextareaRow-B_iNwevV.js} +1 -1
  28. package/dist/client/assets/{SetupWizardModal-ClAbtrU0.js → SetupWizardModal-BSAtv8xH.js} +2 -2
  29. package/dist/client/assets/{SkillsView-BpEJE16a.js → SkillsView-DhhiUAPO.js} +1 -1
  30. package/dist/client/assets/{WorkflowNodeEditor-CSbhpY5K.js → WorkflowNodeEditor-YeZ_DH3a.js} +1 -1
  31. package/dist/client/assets/{agent-import-generation-BT0ZBGQA.js → agent-import-generation-BPFU14s8.js} +1 -1
  32. package/dist/client/assets/{agentsOrgChartLayout-C_tkb_Pq.js → agentsOrgChartLayout-CWqQ9XMW.js} +1 -1
  33. package/dist/client/assets/app-BVuhE-pB.js +3 -0
  34. package/dist/client/assets/app-BVz53oEh.js +9 -0
  35. package/dist/client/assets/app-BfzM5z-d.js +9 -0
  36. package/dist/client/assets/app-BgtLSw3s.js +9 -0
  37. package/dist/client/assets/app-BpjF_vWi.js +9 -0
  38. package/dist/client/assets/app-Cjqb3Hrq.js +3 -0
  39. package/dist/client/assets/app-CoyPSunU.js +9 -0
  40. package/dist/client/assets/{architectureDiagram-3BPJPVTR-BfPYqDRS.js → architectureDiagram-3BPJPVTR-DX2xxWsB.js} +1 -1
  41. package/dist/client/assets/{blockDiagram-GPEHLZMM-BEcaGTmc.js → blockDiagram-GPEHLZMM-tVB-pLpH.js} +1 -1
  42. package/dist/client/assets/{c4Diagram-AAUBKEIU-BX1xrinF.js → c4Diagram-AAUBKEIU-BEV-l4nl.js} +1 -1
  43. package/dist/client/assets/channel-BoqUD_yo.js +1 -0
  44. package/dist/client/assets/{chunk-2J33WTMH-OksyoE_c.js → chunk-2J33WTMH-DduonyQt.js} +1 -1
  45. package/dist/client/assets/{chunk-4BX2VUAB-C5ivKrB5.js → chunk-4BX2VUAB-BPCXybBl.js} +1 -1
  46. package/dist/client/assets/{chunk-55IACEB6-C7vkVq-W.js → chunk-55IACEB6-ByqbaUCB.js} +1 -1
  47. package/dist/client/assets/{chunk-727SXJPM-c-khhz21.js → chunk-727SXJPM-DdtczHe_.js} +1 -1
  48. package/dist/client/assets/{chunk-AQP2D5EJ-DwxYJXXQ.js → chunk-AQP2D5EJ-V5pHkNOZ.js} +1 -1
  49. package/dist/client/assets/{chunk-FMBD7UC4-BKhdu4up.js → chunk-FMBD7UC4-i0P_U91V.js} +1 -1
  50. package/dist/client/assets/{chunk-ND2GUHAM-okVZM2p2.js → chunk-ND2GUHAM-BWdXSws9.js} +1 -1
  51. package/dist/client/assets/{chunk-QZHKN3VN-DDso7rM3.js → chunk-QZHKN3VN-C7vpw2O4.js} +1 -1
  52. package/dist/client/assets/classDiagram-4FO5ZUOK-5Yk5cF5o.js +1 -0
  53. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-5Yk5cF5o.js +1 -0
  54. package/dist/client/assets/{cose-bilkent-S5V4N54A-CNT9ltBk.js → cose-bilkent-S5V4N54A-C_OJmqvv.js} +1 -1
  55. package/dist/client/assets/{dagre-BM42HDAG-C5a30-g5.js → dagre-BM42HDAG-DlxhXtcR.js} +1 -1
  56. package/dist/client/assets/{dashboard-view-Brqe-SVE.js → dashboard-view-C_aj9Avl.js} +2 -2
  57. package/dist/client/assets/{dashboard-view-DyAQ_agZ.js → dashboard-view-CtFwciFc.js} +1 -1
  58. package/dist/client/assets/dashboard-view-Cy2aXOHq.js +1 -0
  59. package/dist/client/assets/{dashboard-view-WFOf0Kpl.js → dashboard-view-ZNgeI6tK.js} +1 -1
  60. package/dist/client/assets/{diagram-2AECGRRQ-DG7EyUNe.js → diagram-2AECGRRQ-B5OQ5SjT.js} +1 -1
  61. package/dist/client/assets/{diagram-5GNKFQAL-DE7lhEna.js → diagram-5GNKFQAL-OnHyeSDX.js} +1 -1
  62. package/dist/client/assets/{diagram-KO2AKTUF-DFtJNqNF.js → diagram-KO2AKTUF-BESRlk6K.js} +1 -1
  63. package/dist/client/assets/{diagram-LMA3HP47-DUAuxZQD.js → diagram-LMA3HP47-jc5KVOgo.js} +1 -1
  64. package/dist/client/assets/{diagram-OG6HWLK6-DCKETcWy.js → diagram-OG6HWLK6-CbvV1B1C.js} +1 -1
  65. package/dist/client/assets/{erDiagram-TEJ5UH35-pa0blyAD.js → erDiagram-TEJ5UH35-CU4gukmG.js} +1 -1
  66. package/dist/client/assets/{flowDiagram-I6XJVG4X-D7Veqs1W.js → flowDiagram-I6XJVG4X-Dq9UKge4.js} +1 -1
  67. package/dist/client/assets/{folder-open-CojKP0zy.js → folder-open-CF9O-sX4.js} +1 -1
  68. package/dist/client/assets/{ganttDiagram-6RSMTGT7-CsqBMy2D.js → ganttDiagram-6RSMTGT7-BWA_00UM.js} +1 -1
  69. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-BRrVKZJo.js → gitGraphDiagram-PVQCEYII-DKdPzNtQ.js} +1 -1
  70. package/dist/client/assets/index-CiVIbypZ.js +2949 -0
  71. package/dist/client/assets/index-Duxgoh_Y.css +1 -0
  72. package/dist/client/assets/{infoDiagram-5YYISTIA-o2GEmmb2.js → infoDiagram-5YYISTIA-BvusFnLt.js} +1 -1
  73. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-k1p6nWtj.js → ishikawaDiagram-YF4QCWOH-NLucC59B.js} +1 -1
  74. package/dist/client/assets/{journeyDiagram-JHISSGLW-B43V37S0.js → journeyDiagram-JHISSGLW-OMF0ZqP2.js} +1 -1
  75. package/dist/client/assets/{kanban-definition-UN3LZRKU-HRMYyAQB.js → kanban-definition-UN3LZRKU-DcIw1Gei.js} +1 -1
  76. package/dist/client/assets/{mermaid.core-6vt3zKxL.js → mermaid.core-BXdGnca4.js} +4 -4
  77. package/dist/client/assets/{mindmap-definition-RKZ34NQL-D3VJuvfj.js → mindmap-definition-RKZ34NQL-CJdZ2giE.js} +1 -1
  78. package/dist/client/assets/{pieDiagram-4H26LBE5-D0RjFhk9.js → pieDiagram-4H26LBE5-CIS3IXyQ.js} +1 -1
  79. package/dist/client/assets/{puzzle-D3dJEsTf.js → puzzle-DLP4jrVO.js} +1 -1
  80. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-DHaEqU3Q.js → quadrantDiagram-W4KKPZXB-CyXg_FqY.js} +1 -1
  81. package/dist/client/assets/{requirementDiagram-4Y6WPE33-DnfFCRP0.js → requirementDiagram-4Y6WPE33-Cl5zZfEW.js} +1 -1
  82. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-D6GCuiqV.js → sankeyDiagram-5OEKKPKP-RPvS_KDe.js} +1 -1
  83. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-DaGYYzxS.js → sequenceDiagram-3UESZ5HK-mqxbDVma.js} +1 -1
  84. package/dist/client/assets/{standing-instructions-template-CN8Kp4Hq.js → standing-instructions-template-oByMjuf9.js} +1 -1
  85. package/dist/client/assets/{stateDiagram-AJRCARHV-ek4Wb8ai.js → stateDiagram-AJRCARHV-BMThgwA0.js} +1 -1
  86. package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-EPn8Vq7v.js → stateDiagram-v2-BHNVJYJU-BQQVmi0s.js} +1 -1
  87. package/dist/client/assets/{timeline-definition-PNZ67QCA-CyAwCbnE.js → timeline-definition-PNZ67QCA-DxRT4zz3.js} +1 -1
  88. package/dist/client/assets/{upload-BhpNL3xI.js → upload-C1hBXwxT.js} +1 -1
  89. package/dist/client/assets/{users-Bka1cIkR.js → users-CUTsjdYo.js} +1 -1
  90. package/dist/client/assets/{vennDiagram-CIIHVFJN-Bd8-8r3a.js → vennDiagram-CIIHVFJN-CplrXnmO.js} +1 -1
  91. package/dist/client/assets/{wardley-L42UT6IY-nNvWflNF.js → wardley-L42UT6IY-DN3nUl9Y.js} +1 -1
  92. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-Dy7XrvPx.js → wardleyDiagram-YWT4CUSO-C0hUcS3e.js} +1 -1
  93. package/dist/client/assets/{xychartDiagram-2RQKCTM6-38VTptR4.js → xychartDiagram-2RQKCTM6-CDB05pHe.js} +1 -1
  94. package/dist/client/index.html +2 -2
  95. package/dist/client/version.json +1 -1
  96. package/dist/droid-cli/package.json +1 -1
  97. package/dist/extension.js +4041 -4181
  98. package/dist/pi-claude-cli/package.json +1 -1
  99. package/dist/plugin-sdk/index.d.ts +108 -101
  100. package/dist/plugin-sdk/index.js +37 -95
  101. package/dist/plugins/fusion-plugin-acp-runtime/bundled.js +37 -95
  102. package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
  103. package/dist/plugins/fusion-plugin-claude-runtime/bundled.js +37 -95
  104. package/dist/plugins/fusion-plugin-claude-runtime/package.json +1 -1
  105. package/dist/plugins/fusion-plugin-cli-printing-press/bundled.js +37 -95
  106. package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
  107. package/dist/plugins/fusion-plugin-compound-engineering/bundled.js +37 -95
  108. package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
  109. package/dist/plugins/fusion-plugin-cursor-runtime/bundled.js +37 -95
  110. package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
  111. package/dist/plugins/fusion-plugin-dependency-graph/bundled.js +37 -95
  112. package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
  113. package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +37 -95
  114. package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
  115. package/dist/plugins/fusion-plugin-grok-runtime/bundled.js +37 -95
  116. package/dist/plugins/fusion-plugin-grok-runtime/package.json +1 -1
  117. package/dist/plugins/fusion-plugin-hermes-runtime/bundled.js +37 -95
  118. package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
  119. package/dist/plugins/fusion-plugin-linear-import/bundled.js +37 -95
  120. package/dist/plugins/fusion-plugin-linear-import/package.json +1 -1
  121. package/dist/plugins/fusion-plugin-omp-runtime/bundled.js +37 -95
  122. package/dist/plugins/fusion-plugin-omp-runtime/package.json +1 -1
  123. package/dist/plugins/fusion-plugin-openclaw-runtime/bundled.js +37 -95
  124. package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
  125. package/dist/plugins/fusion-plugin-paperclip-runtime/bundled.js +37 -95
  126. package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
  127. package/dist/plugins/fusion-plugin-quality/bundled.js +37 -95
  128. package/dist/plugins/fusion-plugin-quality/package.json +1 -1
  129. package/dist/plugins/fusion-plugin-reports/bundled.js +37 -95
  130. package/dist/plugins/fusion-plugin-reports/package.json +1 -1
  131. package/dist/plugins/fusion-plugin-roadmap/bundled.js +37 -95
  132. package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
  133. package/dist/plugins/fusion-plugin-todos/bundled.js +37 -95
  134. package/dist/plugins/fusion-plugin-todos/package.json +1 -1
  135. package/dist/plugins/fusion-plugin-whatsapp-chat/bundled.js +37 -95
  136. package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
  137. package/package.json +1 -1
  138. package/skill/fusion/SKILL.md +1 -1
  139. package/skill/fusion/references/best-practices.md +2 -2
  140. package/skill/fusion/references/cli-commands.md +0 -2
  141. package/skill/fusion/references/engine-tools.md +2 -2
  142. package/skill/fusion/references/extension-tools.md +1 -18
  143. package/skill/fusion/references/fusion-capabilities.md +1 -4
  144. package/skill/fusion/references/task-structure.md +1 -1
  145. package/skill/fusion/workflows/task-lifecycle.md +5 -9
  146. package/skill/fusion/workflows/task-management.md +1 -3
  147. package/dist/client/assets/AgentDetailView-DPoh46Ym.css +0 -1
  148. package/dist/client/assets/DocumentsView-B-uzhK3C.js +0 -1
  149. package/dist/client/assets/InsightsView-qMoM8oFe.js +0 -11
  150. package/dist/client/assets/ResearchView-DROedGZR.js +0 -2
  151. package/dist/client/assets/SettingsModal-CSbSmwxZ.js +0 -21
  152. package/dist/client/assets/SettingsModal-Crai1dEI.css +0 -1
  153. package/dist/client/assets/app-B0hINWeH.js +0 -5
  154. package/dist/client/assets/app-BSxI9vvS.js +0 -13
  155. package/dist/client/assets/app-BeDYumHl.js +0 -13
  156. package/dist/client/assets/app-C8jogXBu.js +0 -13
  157. package/dist/client/assets/app-C8kudFlj.js +0 -13
  158. package/dist/client/assets/app-DZ5j1n3j.js +0 -5
  159. package/dist/client/assets/app-hEhR2PdL.js +0 -13
  160. package/dist/client/assets/channel-BjDq20V4.js +0 -1
  161. package/dist/client/assets/classDiagram-4FO5ZUOK-B114c_Fi.js +0 -1
  162. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-B114c_Fi.js +0 -1
  163. package/dist/client/assets/dashboard-view-DxpkE7dL.js +0 -1
  164. package/dist/client/assets/index-Cv_ouAgx.js +0 -2959
  165. package/dist/client/assets/index-Dliz9s5K.css +0 -1
@@ -1 +0,0 @@
1
- import{U as a,C as n}from"./mermaid.core-6vt3zKxL.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as t,C as e}from"./chunk-727SXJPM-c-khhz21.js";import{_ as i}from"./mermaid.core-6vt3zKxL.js";import"./vendor-reactflow-BlIeoTu4.js";import"./chunk-FMBD7UC4-BKhdu4up.js";import"./chunk-ND2GUHAM-okVZM2p2.js";import"./chunk-55IACEB6-C7vkVq-W.js";import"./chunk-2J33WTMH-OksyoE_c.js";import"./index-Cv_ouAgx.js";import"./vendor-react-SZ_qB27O.js";import"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-xterm-BNq00GSj.js";import"./step-yuy0qJer.js";var k={parser:t,get db(){return new e},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{k as diagram};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as t,C as e}from"./chunk-727SXJPM-c-khhz21.js";import{_ as i}from"./mermaid.core-6vt3zKxL.js";import"./vendor-reactflow-BlIeoTu4.js";import"./chunk-FMBD7UC4-BKhdu4up.js";import"./chunk-ND2GUHAM-okVZM2p2.js";import"./chunk-55IACEB6-C7vkVq-W.js";import"./chunk-2J33WTMH-OksyoE_c.js";import"./index-Cv_ouAgx.js";import"./vendor-react-SZ_qB27O.js";import"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-xterm-BNq00GSj.js";import"./step-yuy0qJer.js";var k={parser:t,get db(){return new e},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{k as diagram};
@@ -1 +0,0 @@
1
- import{r as e,j as I}from"./vendor-react-SZ_qB27O.js";import{dq as At,dr as vt,ds as Xt,dt as Yt}from"./index-Cv_ouAgx.js";import{Z as _t,a as jt,M as $t,R as Gt}from"./zoom-out-DzDzWQt1.js";import"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-reactflow-BlIeoTu4.js";import"./vendor-xterm-BNq00GSj.js";import"./createLucideIcon-CshVyKO4.js";const xt=4,wt=300,Wt=24;function Ft({taskId:n,position:s,scale:r,canDrag:i,onPositionChange:p,onDragStateChange:a,onDragEnd:k,onDoubleTap:b}){const[D,H]=e.useState(!1),M=e.useRef(null),C=e.useRef(s),v=e.useRef(!1),o=e.useRef(null),c=e.useRef(!1);C.current=s,c.current=D;const d=e.useCallback(()=>{o.current=null},[]),g=e.useCallback(l=>{M.current=null,H(!1),c.current=!1,l&&(a?.(!1),k?.(),v.current=!0,d())},[k,a,d]),Y=e.useCallback(l=>{if(!l.isPrimary)return;if(l.defaultPrevented){d();return}const f=Date.now();o.current&&f-o.current.timeStamp>wt&&d(),i&&l.stopPropagation();const N=l.currentTarget;i&&typeof N.setPointerCapture=="function"&&N.setPointerCapture(l.pointerId),M.current={pointerId:l.pointerId,pointerType:l.pointerType,startPointer:{x:l.clientX,y:l.clientY},startPosition:C.current,defaultPrevented:l.defaultPrevented,movedBeyondThreshold:!1}},[i,d]),O=e.useCallback(l=>{const f=M.current;if(!f||f.pointerId!==l.pointerId)return;i&&l.stopPropagation();const N=l.clientX-f.startPointer.x,E=l.clientY-f.startPointer.y,J=Math.hypot(N,E);if(J>=xt&&(f.movedBeyondThreshold=!0),!i){f.movedBeyondThreshold&&d();return}if(!c.current&&J>=xt&&(H(!0),c.current=!0,a?.(!0),d()),J<xt)return;const U=r>0?r:1;p(n,{x:f.startPosition.x+N/U,y:f.startPosition.y+E/U})},[i,a,p,d,r,n]),L=e.useCallback((l,f)=>{if(!b||f.defaultPrevented||f.movedBeyondThreshold)return Date.now()-(o.current?.timeStamp??0)>wt&&d(),!1;if(f.pointerType==="mouse")return d(),!1;const N={timeStamp:Date.now(),point:{x:f.startPointer.x,y:f.startPointer.y}},E=o.current;return!E||N.timeStamp-E.timeStamp>wt||Math.hypot(N.point.x-E.point.x,N.point.y-E.point.y)>Wt?(o.current=N,!1):(v.current=!0,d(),b(),!0)},[b,d]),B=e.useCallback(l=>{const f=M.current;if(!f||f.pointerId!==l.pointerId)return;i&&l.stopPropagation(),i&&typeof l.currentTarget.hasPointerCapture=="function"&&l.currentTarget.hasPointerCapture(l.pointerId)&&typeof l.currentTarget.releasePointerCapture=="function"&&l.currentTarget.releasePointerCapture(l.pointerId);const N=c.current;!N&&L(l,f)&&l.preventDefault(),g(N)},[i,g,L]),X=e.useCallback(l=>{const f=M.current;!f||f.pointerId!==l.pointerId||(i&&l.stopPropagation(),i&&typeof l.currentTarget.hasPointerCapture=="function"&&l.currentTarget.hasPointerCapture(l.pointerId)&&typeof l.currentTarget.releasePointerCapture=="function"&&l.currentTarget.releasePointerCapture(l.pointerId),d(),g(c.current))},[i,g,d]),G=e.useCallback(l=>{v.current&&(v.current=!1,l.preventDefault(),l.stopPropagation())},[]);return e.useMemo(()=>({isDragging:D,onPointerDown:Y,onPointerMove:O,onPointerUp:B,onPointerCancel:X,onClickCapture:G}),[D,G,X,Y,O,B])}const Lt=new Set(["planning","researching","executing","finalizing","merging","merging-fix"]);function Ut(n){return n?n.charAt(0).toUpperCase()+n.slice(1):"Executing"}function Bt({taskColumnFlags:n,style:s,position:r,scale:i,isSelected:p=!1,isHighlighted:a=!1,isDimmed:k=!1,onMouseEnter:b,onMouseLeave:D,onClick:H,onNodePositionChange:M,onNodeDragStateChange:C,onNodeDragEnd:v,...o}){const{task:c,globalPaused:d,onOpenDetail:g}=o,Y=c.status==="failed",O=c.paused===!0,L=c.column==="in-progress"||Lt.has(c.status),B=c.status==="awaiting-approval"&&!L,X=!d&&!Y&&!O&&!B&&L,G=typeof c.currentStep=="number"&&c.currentStep>=0&&Array.isArray(c.steps)&&c.currentStep<c.steps.length,l=c.column==="in-review",f=Ft({taskId:c.id,position:r,scale:i,canDrag:p,onPositionChange:M,onDragStateChange:C,onDragEnd:v,onDoubleTap:()=>g(c)});return I.jsxs("div",{className:`graph-task-node${p?" graph-node--draggable graph-task-node--selected":""}${f.isDragging?" graph-node--dragging":""}${a?" graph-task-node--highlighted graph-node--highlighted":""}${k?" graph-task-node--dimmed graph-node--dimmed":""}${X?" graph-task-node--active":""}${l?" graph-task-node--in-review":""}`,style:s,draggable:!1,"data-testid":`graph-task-node-${c.id}`,"data-current-step":X&&G?String(c.currentStep):void 0,onMouseEnter:b,onMouseLeave:D,onClick:H,onDoubleClick:N=>{N.defaultPrevented||g(c)},onClickCapture:f.onClickCapture,onPointerDown:f.onPointerDown,onPointerMove:f.onPointerMove,onPointerUp:f.onPointerUp,onPointerCancel:f.onPointerCancel,children:[X?I.jsx("div",{className:"graph-task-active-indicator",children:I.jsx("span",{className:"graph-task-active-indicator-text",children:Ut(c.status)})}):null,I.jsx(At,{...o,taskColumnFlags:n,onOpenDetail:()=>{}})]})}function Zt({zoom:n,onZoomIn:s,onZoomOut:r,onFitToGraph:i,onResetView:p}){return I.jsxs("div",{className:"graph-toolbar","data-testid":"graph-toolbar",children:[I.jsx("button",{className:"btn btn-icon",title:"Zoom in (Ctrl+=)","aria-label":"Zoom in",onClick:s,children:I.jsx(_t,{size:16})}),I.jsx("button",{className:"btn btn-icon",title:"Zoom out (Ctrl+-)","aria-label":"Zoom out",onClick:r,children:I.jsx(jt,{size:16})}),I.jsxs("div",{className:"graph-toolbar__zoom-label","aria-live":"polite",children:[Math.round(n*100),"%"]}),I.jsx("button",{className:"btn btn-icon",title:"Fit to graph (Ctrl+Shift+F)","aria-label":"Fit to graph",onClick:i,children:I.jsx($t,{size:16})}),I.jsx("button",{className:"btn btn-icon",title:"Reset view (Ctrl+0)","aria-label":"Reset view",onClick:p,children:I.jsx(Gt,{size:16})})]})}const Kt=280,Vt=100;function qt({edges:n,positions:s,nodeWidth:r=Kt,nodeHeight:i=Vt,nodeHeights:p,highlightedEdgeIds:a}){const k=!!(a&&a.size>0);return I.jsxs("svg",{className:"dependency-graph-edges","aria-hidden":"true",children:[I.jsx("defs",{children:I.jsx("marker",{id:"dependency-graph-arrowhead",markerWidth:"10",markerHeight:"7",refX:"10",refY:"3.5",orient:"auto",markerUnits:"strokeWidth",children:I.jsx("path",{d:"M 0 0 L 10 3.5 L 0 7 z",style:{fill:"var(--border)"}})})}),n.map(b=>{const D=s.get(b.source),H=s.get(b.target);if(!D||!H)return null;const M=`${b.source}->${b.target}`,C=k&&(a?.has(M)??!1),v=D.x+r/2,o=D.y+(p?.get(b.source)??i),c=H.x+r/2,d=H.y,g=o+(d-o)/2;return I.jsx("path",{"data-testid":"dependency-edge","data-edge-id":M,className:`dependency-graph-edge${C?" graph-edge--highlighted":""}${k&&!C?" graph-edge--dimmed":""}`,d:`M ${v} ${o} C ${v} ${g}, ${c} ${g}, ${c} ${d}`,fill:"none",markerEnd:"url(#dependency-graph-arrowhead)",style:{opacity:k&&!C?.15:1,stroke:C?"var(--todo)":"var(--border)",strokeWidth:C?"var(--space-xs)":"var(--btn-border-width)",transition:"opacity var(--transition-fast), stroke var(--transition-fast), stroke-width var(--transition-fast)"}},M)})]})}const Jt=new Set(["done","archived"]);function Qt(n){return n.filter(s=>typeof s.column=="string"&&s.column.length>0&&!Jt.has(s.column))}const te={nodeWidth:280,nodeHeight:100,horizontalGap:40,verticalGap:80,orientation:"vertical"};function kt(n,s){const r={...te,...s},i=n.nodes.map(o=>o.task.id);if(i.length===0)return new Map;const p=new Map,a=new Map;for(const o of i)a.set(o,0),p.set(o,[]);for(const o of n.edges)!a.has(o.source)||!a.has(o.target)||(p.get(o.target)?.push(o.source),a.set(o.source,(a.get(o.source)??0)+1));const k=i.filter(o=>(a.get(o)??0)===0),b=[];for(;k.length>0;){const o=k.shift();b.push(o);for(const c of p.get(o)??[]){const d=(a.get(c)??0)-1;a.set(c,d),d===0&&k.push(c)}}for(const o of i)b.includes(o)||b.push(o);const D=new Map;for(const o of b){const c=n.edges.filter(g=>g.source===o).map(g=>g.target);let d=0;for(const g of c)d=Math.max(d,(D.get(g)??0)+1);D.set(o,d)}const H=new Map;for(const o of i){const c=D.get(o)??0,d=H.get(c)??[];d.push(o),H.set(c,d)}const M=new Map,C=Array.from(H.keys()).sort((o,c)=>o-c),v=new Map;if(r.orientation==="vertical"){let o=0;for(const c of C){v.set(c,o);const d=H.get(c)??[],g=Math.max(r.nodeHeight,...d.map(Y=>r.measuredHeights?.get(Y)??r.nodeHeight));o+=g+r.verticalGap}}for(const o of C){const c=H.get(o)??[];if(c.sort(),r.orientation==="horizontal"){const L=-(c.reduce((G,l)=>G+(r.measuredHeights?.get(l)??r.nodeHeight),0)+Math.max(0,c.length-1)*r.verticalGap)/2,B=o*(r.nodeWidth+r.horizontalGap);let X=L;for(const G of c)M.set(G,{x:B,y:X}),X+=(r.measuredHeights?.get(G)??r.nodeHeight)+r.verticalGap;continue}const Y=-(c.length*r.nodeWidth+Math.max(0,c.length-1)*r.horizontalGap)/2;c.forEach((O,L)=>{const B=Y+L*(r.nodeWidth+r.horizontalGap),X=v.get(o)??o*(r.nodeHeight+r.verticalGap);M.set(O,{x:B,y:X})})}return M}function ee(n){return e.useMemo(()=>{const s=n.map(p=>({task:p})),r=new Set(n.map(p=>p.id)),i=n.flatMap(p=>(p.dependencies??[]).filter(a=>r.has(a)).map(a=>({source:p.id,target:a})));return{nodes:s,edges:i}},[n])}const ut=.1,lt=3,Rt=40,ne=200;function nt(n,s,r){return Math.min(r,Math.max(s,n))}function re(n){if(!(n instanceof HTMLElement))return!1;const s=n.tagName.toLowerCase();return n.isContentEditable||s==="input"||s==="textarea"||s==="select"}function oe(){const[n,s]=e.useState({x:0,y:0}),[r,i]=e.useState(1),[p,a]=e.useState(!1),k=e.useRef(n),b=e.useRef(r),D=e.useRef(null),H=e.useRef(null),M=e.useRef(new Map),C=e.useRef(null),v=e.useRef({minX:0,minY:0,maxX:0,maxY:0});e.useEffect(()=>{k.current=n},[n]),e.useEffect(()=>{b.current=r},[r]),e.useEffect(()=>()=>{D.current!==null&&window.clearTimeout(D.current)},[]);const o=e.useMemo(()=>`translate(${n.x}px, ${n.y}px) scale(${r})`,[n.x,n.y,r]),c=e.useMemo(()=>Math.round(r*100),[r]),d=e.useCallback(u=>{if(!u){D.current!==null&&(window.clearTimeout(D.current),D.current=null),a(!1);return}a(!0),D.current!==null&&window.clearTimeout(D.current),D.current=window.setTimeout(()=>{a(!1),D.current=null},ne)},[]),g=e.useCallback((u,m,y,T=b.current)=>{const P=v.current;if(P.maxX<=P.minX||P.maxY<=P.minY)return{x:nt(u.x,-m,m),y:nt(u.y,-y,y)};const W=m-P.maxX*T,A=-P.minX*T,_=y-P.maxY*T,K=-P.minY*T,ot=W>A?(W+A)/2:nt(u.x,W,A),$=_>K?(_+K)/2:nt(u.y,_,K);return{x:ot,y:$}},[]),Y=e.useCallback((u,m,y,T)=>{const P=b.current,W=k.current,A=nt(u,ut,lt),_=A/P,K=g({x:m.x-(m.x-W.x)*_,y:m.y-(m.y-W.y)*_},y,T,A);i(A),s(K)},[g]),O=e.useCallback((u,m,y,T)=>{d(!1);const P=T??{x:m/2,y:y/2};Y(b.current*u,P,m,y)},[d,Y]),L=e.useCallback((u,m)=>{if(u&&m){O(1.2,u,m);return}i(y=>nt(y+.1,ut,lt))},[O]),B=e.useCallback((u,m)=>{if(u&&m){O(1/1.2,u,m);return}i(y=>nt(y-.1,ut,lt))},[O]),X=e.useCallback(()=>{d(!0),s({x:0,y:0}),i(1)},[d]),G=e.useCallback((u,m,y,T)=>{if(d(!0),u.size===0){s({x:0,y:0}),i(1);return}const P=T?.nodeWidth??280,W=T?.nodeHeight??100,A=Array.from(u.entries()),_=Math.min(...A.map(([,et])=>et.x)),K=Math.min(...A.map(([,et])=>et.y)),ot=Math.max(...A.map(([,et])=>et.x+P)),$=Math.max(...A.map(([et,mt])=>mt.y+(T?.measuredHeights?.get(et)??W))),Q=Math.max(1,ot-_),V=Math.max(1,$-K),ct=Math.max(1,m-Rt*2),ft=Math.max(1,y-Rt*2),tt=nt(Math.min(ct/Q,ft/V),ut,lt),pt=(m-Q*tt)/2-_*tt,ht=(y-V*tt)/2-K*tt;i(tt),s(g({x:pt,y:ht},m,y,tt))},[g,d]),l=e.useCallback((u,m)=>{if(M.current.set(u,m),M.current.size===2){const[y,T]=Array.from(M.current.values());C.current={distance:Math.hypot(y.x-T.x,y.y-T.y),zoom:b.current,pan:k.current,midpoint:{x:(y.x+T.x)/2,y:(y.y+T.y)/2}},H.current=null;return}H.current={start:m,panStart:k.current}},[]),f=e.useCallback((u,m,y,T)=>{if(M.current.has(u)&&M.current.set(u,m),M.current.size===2&&C.current){d(!1);const[A,_]=Array.from(M.current.values()),ot=Math.hypot(A.x-_.x,A.y-_.y)/Math.max(1,C.current.distance),$={x:(A.x+_.x)/2,y:(A.y+_.y)/2},Q=nt(C.current.zoom*ot,ut,lt),V=Q/C.current.zoom,ct=g({x:$.x-(C.current.midpoint.x-C.current.pan.x)*V,y:$.y-(C.current.midpoint.y-C.current.pan.y)*V},y,T);i(Q),s(ct);return}const P=H.current;if(!P)return;d(!1);const W={x:P.panStart.x+(m.x-P.start.x),y:P.panStart.y+(m.y-P.start.y)};s(g(W,y,T))},[g,d]),N=e.useCallback(u=>{if(M.current.delete(u),M.current.size<2&&(C.current=null),M.current.size===1){const[m]=Array.from(M.current.values());H.current={start:m,panStart:k.current};return}M.current.size===0&&(H.current=null)},[]),E=e.useCallback((u,m,y,T)=>{d(!1);const P={x:k.current.x-u,y:k.current.y-m};s(g(P,y,T))},[g,d]),J=e.useCallback((u,m,y,T)=>{const P=u<0?1.1:.9;d(!1),Y(b.current*P,m,y,T)},[d,Y]),U=e.useCallback(u=>{v.current=u},[]),Z=e.useCallback((u,m,y,T,P)=>{if(re(u.target))return;const W=u.metaKey||u.ctrlKey;if(u.key==="Escape"){u.preventDefault(),X();return}if(W){if(u.key==="="||u.key==="+"){u.preventDefault(),O(1.2,m,y);return}if(u.key==="-"){u.preventDefault(),O(1/1.2,m,y);return}if(u.key==="0"){u.preventDefault(),X();return}(u.key==="f"||u.key==="F")&&u.shiftKey&&(u.preventDefault(),G(T,m,y,P))}},[G,X,O]);return{pan:n,zoom:r,zoomPercent:c,transform:o,transitioning:p,zoomIn:L,zoomOut:B,resetView:X,fitToGraph:G,setAnimate:d,onPointerDown:l,onPointerMove:f,onPointerUp:N,onWheelPan:E,onWheelZoom:J,handleKeyDown:Z,setGraphBounds:U}}function se(n){const{upstreamMap:s,downstreamMap:r}=e.useMemo(()=>{const p=new Map,a=new Map;for(const k of n)p.set(k.id,new Set(k.dependencies??[])),a.has(k.id)||a.set(k.id,new Set);for(const k of n)for(const b of k.dependencies??[])a.has(b)||a.set(b,new Set),a.get(b)?.add(k.id);return{upstreamMap:p,downstreamMap:a}},[n]);return{getChain:e.useCallback(p=>{if(!s.has(p)&&!r.has(p))return new Set;const a=new Set([p]),k=(b,D)=>{const H=[b],M=new Set([b]);for(;H.length>0;){const C=H.shift();if(!C)continue;const v=D.get(C);if(v)for(const o of v)M.has(o)||(M.add(o),a.add(o),H.push(o))}};return k(p,s),k(p,r),a},[r,s])}}const Mt="fusion-plugin-dependency-graph:positions";function dt(n){if(!n||typeof n!="object")return!1;const s=n;return typeof s.x=="number"&&Number.isFinite(s.x)&&typeof s.y=="number"&&Number.isFinite(s.y)}function ie(n){const s=vt(Mt,n);if(!s)return{};try{const r=JSON.parse(s);if(!r||typeof r!="object")return{};const i={};for(const[p,a]of Object.entries(r))dt(a)&&(i[p]=a);return i}catch{return{}}}function ae(n,s,r){const i={};for(const[p,a]of Object.entries(n))s.has(p)&&dt(a)&&(i[p]=a);Xt(Mt,JSON.stringify(i),r)}function ce(n){Yt(Mt,n)}function ue(n,s,r){const i={};for(const[p,a]of Object.entries(n))r.has(p)&&dt(a)&&(i[p]=a);for(const[p,a]of Object.entries(s))r.has(p)&&dt(a)&&(i[p]=a);return i}function le(n,s){const r={};for(const[i,p]of Object.entries(n))s.has(i)&&(r[i]=p);return r}function de({projectId:n,visibleTaskIds:s}){const[r,i]=e.useState(null);e.useEffect(()=>{i(ie(n))},[n]);const p=e.useCallback(k=>{ae(k,s,n),i(le(k,s))},[n,s]),a=e.useCallback(()=>{ce(n),i(null)},[n]);return{savedPositions:r,persistPositions:p,clearSavedPositions:a}}const at=280,rt=100,fe=768,Dt=4;function pe({tasks:n,projectId:s,columnFlagsByTaskId:r,onOpenTaskDetail:i,onOpenDetail:p,addToast:a,globalPaused:k,onUpdateTask:b,onArchiveTask:D,onUnarchiveTask:H,onDeleteTask:M,onRetryTask:C,onOpenDetailWithTab:v,onOpenMission:o,onMoveTask:c,lastFetchTimeMs:d}){const g=e.useRef(null),Y=e.useRef(null),O=e.useRef(!1),L=e.useRef(new Map),[B,X]=e.useState(null),[G,l]=e.useState(null),[f,N]=e.useState({width:0,height:0}),[E,J]=e.useState(new Map),U=e.useMemo(()=>Qt(n),[n]),Z=ee(U),{getChain:u}=se(U),m=B??G,y=e.useMemo(()=>m?u(m):new Set,[m,u]),T=e.useMemo(()=>{const t=f.width||(typeof window<"u"?window.innerWidth:0);return(f.height||(typeof window<"u"?window.innerHeight:0))>t||t<fe?"horizontal":"vertical"},[f.height,f.width]),P=e.useMemo(()=>({nodeWidth:at,nodeHeight:rt,horizontalGap:40,verticalGap:80,orientation:T,measuredHeights:E}),[E,T]),W=e.useMemo(()=>kt(Z,P),[Z,P]),A=e.useMemo(()=>new Set(U.map(t=>t.id)),[U]),{savedPositions:_,persistPositions:K,clearSavedPositions:ot}=de({projectId:s,visibleTaskIds:A}),[$,Q]=e.useState(W),[V,ct]=e.useState(!1);e.useEffect(()=>{const t={};for(const[x,S]of W.entries())t[x]=S;const h=_?ue(t,_,A):t;Q(new Map(Object.entries(h)))},[W,_,A]),e.useEffect(()=>{const t=g.current;if(!t)return;const h=(S,z)=>{N(w=>w.width===S&&w.height===z?w:{width:S,height:z})};if(typeof ResizeObserver>"u"){h(t.clientWidth||(typeof window<"u"?window.innerWidth:0),t.clientHeight||(typeof window<"u"?window.innerHeight:0));return}h(t.clientWidth,t.clientHeight);const x=new ResizeObserver(S=>{const z=S[0];z&&h(z.contentRect.width,z.contentRect.height)});return x.observe(t),()=>x.disconnect()},[]),e.useEffect(()=>{const t=g.current;if(!t)return;const h=new Set(Z.nodes.map(w=>w.task.id)),x=new Map;for(const w of h){const R=t.querySelector(`[data-testid="graph-task-node-${w}"]`);R&&x.set(w,R)}L.current=x,J(w=>{let R=!1;const j=new Map;for(const[q,it]of w.entries()){if(!h.has(q)){R=!0;continue}j.set(q,it)}return R?j:w});const S=(w,R)=>{J(j=>{const q=j.get(w);if(q!==void 0&&Math.abs(q-R)<1)return j;const it=new Map(j);return it.set(w,R),it})};for(const[w,R]of x.entries())S(w,R.offsetHeight||rt);if(typeof ResizeObserver>"u")return;const z=new ResizeObserver(w=>{for(const R of w){const j=R.target,q=Array.from(x.entries()).find(([,it])=>it===j)?.[0];q&&S(q,j.offsetHeight||rt)}});for(const w of x.values())z.observe(w);return()=>z.disconnect()},[Z.nodes,$,f.height,f.width]);const{transform:ft,zoom:tt,transitioning:pt,zoomIn:ht,zoomOut:et,resetView:mt,fitToGraph:gt,onPointerDown:It,onPointerMove:Ht,onPointerUp:bt,onWheelPan:zt,onWheelZoom:Et,handleKeyDown:Ot,setGraphBounds:Pt}=oe(),F=e.useMemo(()=>{const t=Array.from($.values());if(t.length===0)return{minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};const h=Math.min(...t.map(w=>w.x)),x=Math.min(...t.map(w=>w.y)),S=Math.max(...t.map(w=>w.x+at)),z=Math.max(...Array.from($.entries()).map(([w,R])=>R.y+(E.get(w)??rt)));return{minX:h,minY:x,maxX:S,maxY:z,width:Math.max(0,S-h),height:Math.max(0,z-x)}},[E,$]),st=e.useMemo(()=>{if($.size===0)return $;const t=new Map;for(const[h,x]of $.entries())t.set(h,{x:x.x-F.minX,y:x.y-F.minY});return t},[F.minX,F.minY,$]);e.useEffect(()=>{Pt({minX:0,minY:0,maxX:F.width,maxY:F.height})},[F.height,F.width,Pt]);const Ct=e.useMemo(()=>Array.from(st.keys()).sort().join("|"),[st]),yt=e.useMemo(()=>[Ct,f.width,f.height,F.width,F.height,Array.from(E.entries()).sort(([t],[h])=>t.localeCompare(h)).map(([t,h])=>`${t}:${Math.round(h)}`).join("|")].join("::"),[F.height,F.width,Ct,E,f.height,f.width]),Tt=e.useRef(null);e.useEffect(()=>{if(U.length===0||st.size===0)return;const t=g.current;if(!t)return;const h=t.clientWidth||f.width,x=t.clientHeight||f.height;if(h===0||x===0||Tt.current===yt)return;let S=0,z=0;const w=()=>{const R=g.current;if(!R)return;const j=R.clientWidth||f.width,q=R.clientHeight||f.height;j===0||q===0||(gt(st,j,q,{nodeWidth:at,nodeHeight:rt,measuredHeights:E}),Tt.current=yt)};return typeof requestAnimationFrame=="function"?S=requestAnimationFrame(()=>{z=requestAnimationFrame(w)}):w(),()=>{S&&cancelAnimationFrame(S),z&&cancelAnimationFrame(z)}},[U.length,yt,gt,E,st,f.height,f.width]);const St=e.useCallback(()=>{ot();const t=kt(Z,P);Q(t)},[ot,Z,P]),Nt=e.useCallback(()=>{const t={};for(const[h,x]of $.entries())t[h]=x;K(t)},[K,$]);return I.jsxs("section",{className:"dependency-graph","data-testid":"dependency-graph",children:[I.jsx("div",{ref:g,className:"dependency-graph__viewport",onPointerDown:t=>{V||(Y.current={x:t.clientX,y:t.clientY},O.current=!1,It(t.pointerId,{x:t.clientX,y:t.clientY}))},onPointerMove:t=>{if(V)return;const h=g.current;if(!h)return;const x=Y.current;if(x){const S=Math.abs(t.clientX-x.x),z=Math.abs(t.clientY-x.y);(S>Dt||z>Dt)&&(O.current=!0)}Ht(t.pointerId,{x:t.clientX,y:t.clientY},h.clientWidth,h.clientHeight)},onPointerUp:t=>{V||bt(t.pointerId),Y.current=null},onPointerCancel:t=>{V||bt(t.pointerId),Y.current=null,O.current=!1},onWheel:t=>{t.preventDefault();const h=g.current;if(h){if(t.ctrlKey||t.metaKey){const x=h.getBoundingClientRect();Et(t.deltaY,{x:t.clientX-x.left,y:t.clientY-x.top},h.clientWidth,h.clientHeight);return}zt(t.deltaX,t.deltaY,h.clientWidth,h.clientHeight)}},onKeyDown:t=>{const h=g.current;h&&Ot(t,h.clientWidth,h.clientHeight,st,{nodeWidth:at,nodeHeight:rt,measuredHeights:E})},tabIndex:0,onClick:()=>{O.current||V||l(null)},children:U.length===0?I.jsx("div",{className:"dependency-graph__empty",children:"No active tasks to display in graph view."}):I.jsxs("div",{className:`graph-canvas-transform${pt?" graph-canvas-transform--animate":""}`,style:{transform:ft,width:`${F.width}px`,height:`${F.height}px`},children:[I.jsx(qt,{edges:Z.edges,positions:st,nodeWidth:at,nodeHeight:rt,nodeHeights:E,highlightedEdgeIds:y.size>0?new Set(Z.edges.filter(t=>y.has(t.source)&&y.has(t.target)).map(t=>`${t.source}->${t.target}`)):void 0}),I.jsx("div",{className:"dependency-graph__nodes-layer",children:Z.nodes.map(t=>{const h=st.get(t.task.id);return h?I.jsx(Bt,{task:t.task,projectId:s,taskColumnFlags:r?.get(t.task.id),isSelected:G===t.task.id,style:{minHeight:`${rt}px`,left:`${h.x}px`,top:`${h.y}px`},position:h,scale:tt,onNodePositionChange:(x,S)=>{Q(z=>{const w={x:S.x+F.minX,y:S.y+F.minY},R=z.get(x);if(R&&R.x===w.x&&R.y===w.y)return z;const j=new Map(z);return j.set(x,w),j})},onNodeDragStateChange:ct,onNodeDragEnd:Nt,isHighlighted:y.size>0&&y.has(t.task.id),isDimmed:y.size>0&&!y.has(t.task.id),onOpenDetail:p??(x=>i?.(x.id)),addToast:a??(()=>{}),globalPaused:k,onUpdateTask:b,onArchiveTask:D,onUnarchiveTask:H,onDeleteTask:M,onRetryTask:C,onOpenDetailWithTab:v,onOpenMission:o,onMoveTask:c,lastFetchTimeMs:d,onMouseEnter:()=>X(t.task.id),onMouseLeave:()=>X(null),onClick:x=>{x.stopPropagation(),O.current=!1,l(S=>S===t.task.id?null:t.task.id)}},t.task.id):null})})]})}),I.jsx(Zt,{zoom:tt,onZoomIn:()=>{const t=g.current;t&&ht(t.clientWidth,t.clientHeight)},onZoomOut:()=>{const t=g.current;t&&et(t.clientWidth,t.clientHeight)},onFitToGraph:()=>{St();const t=g.current;if(!t)return;const h=kt(Z,P),x=new Map,S=Array.from(h.values()),z=S.length>0?Math.min(...S.map(R=>R.x)):0,w=S.length>0?Math.min(...S.map(R=>R.y)):0;for(const[R,j]of h.entries())x.set(R,{x:j.x-z,y:j.y-w});gt(x,t.clientWidth,t.clientHeight,{nodeWidth:at,nodeHeight:rt,measuredHeights:E})},onResetView:()=>{St(),mt()}})]})}function be({context:n}){return e.createElement(pe,{tasks:n?.tasks??[],projectId:n?.projectId,columnFlagsByTaskId:n?.columnFlagsByTaskId,onOpenDetail:n?.openTaskDetail})}export{pe as DependencyGraph,be as DependencyGraphDashboardView,be as default};