@runfusion/fusion 0.53.1 → 0.54.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 (186) hide show
  1. package/dist/bin.js +457 -168
  2. package/dist/client/.vite/manifest.json +233 -233
  3. package/dist/client/assets/{AgentDetailView-DYiAlisV.js → AgentDetailView-BJditQat.js} +1 -1
  4. package/dist/{desktop/client/assets/AgentPermissionPolicyEditor-KMUDm0nu.js → client/assets/AgentPermissionPolicyEditor-D2AQ6swg.js} +1 -1
  5. package/dist/client/assets/{AgentsView-YfJlxZoN.js → AgentsView-DwEFPKuN.js} +3 -3
  6. package/dist/{desktop/client/assets/ChatView-EeFLKmZB.js → client/assets/ChatView-B4bjPXFN.js} +1 -1
  7. package/dist/client/assets/{CommandCenter-CIwFDUKg.js → CommandCenter-BABqoSkg.js} +1 -1
  8. package/dist/client/assets/{DevServerView-DDRHfATy.js → DevServerView-DlgOzRdC.js} +1 -1
  9. package/dist/client/assets/{DirectoryPicker-C6HRGnSQ.js → DirectoryPicker-BwMSmxYS.js} +1 -1
  10. package/dist/{desktop/client/assets/DocumentsView-DCS-N7cU.js → client/assets/DocumentsView-BfaRXFg5.js} +1 -1
  11. package/dist/client/assets/{EvalsView-B9DCS8sV.js → EvalsView-CQBNrO5n.js} +1 -1
  12. package/dist/client/assets/{ExperimentalAgentOnboardingModal-DGmpwghz.js → ExperimentalAgentOnboardingModal-2SDqP2lc.js} +1 -1
  13. package/dist/client/assets/{GoalsView-B2hr3p6f.js → GoalsView-BgkX-_SB.js} +1 -1
  14. package/dist/client/assets/{InsightsView-DM3eYN2S.js → InsightsView-CJY4eZcO.js} +1 -1
  15. package/dist/{desktop/client/assets/MemoryView-D2OAkbGv.js → client/assets/MemoryView-5Crtfanz.js} +1 -1
  16. package/dist/{desktop/client/assets/PiExtensionsManager-DLrKJDwr.js → client/assets/PiExtensionsManager-COmzskVa.js} +1 -1
  17. package/dist/client/assets/{PluginManager-C1YuxOWu.js → PluginManager-CGWXqZMa.js} +1 -1
  18. package/dist/{desktop/client/assets/PullRequestView-DhTrKHeu.js → client/assets/PullRequestView-DAHh0FVM.js} +1 -1
  19. package/dist/{desktop/client/assets/ResearchView-BQwV9L4h.js → client/assets/ResearchView-cSUka3sd.js} +1 -1
  20. package/dist/{desktop/client/assets/SecretsView-Boby9tkU.js → client/assets/SecretsView-ChFAfFRY.js} +1 -1
  21. package/dist/client/assets/{SessionTerminal-BSeQ5i5F.js → SessionTerminal-CtQKDaqI.js} +1 -1
  22. package/dist/client/assets/{SettingsModal-CQuHnNXu.js → SettingsModal-BYaotQ2o.js} +3 -3
  23. package/dist/client/assets/{SettingsModal-_04cEhgW.js → SettingsModal-pAz_hOoN.js} +1 -1
  24. package/dist/client/assets/{SetupWizardModal-Dk9VO68p.js → SetupWizardModal-eHZHi8VP.js} +2 -2
  25. package/dist/{desktop/client/assets/ShadcnColorPicker-0ZZqsOqD.js → client/assets/ShadcnColorPicker-CsfgWpf6.js} +1 -1
  26. package/dist/{desktop/client/assets/SkillsView-Pzo5lSju.js → client/assets/SkillsView-BSUplEYb.js} +1 -1
  27. package/dist/client/assets/{TodoView-DaXGwdTQ.js → TodoView-DhBseLvM.js} +1 -1
  28. package/dist/client/assets/{WorkflowNodeEditor-DmJI-3Qp.js → WorkflowNodeEditor-Bi12CNif.js} +1 -1
  29. package/dist/client/assets/{agentSkills-B_n4hPLc.js → agentSkills-qVb0x_G3.js} +1 -1
  30. package/dist/{desktop/client/assets/architectureDiagram-3BPJPVTR-CrjMDhPI.js → client/assets/architectureDiagram-3BPJPVTR-DEt4eIEQ.js} +1 -1
  31. package/dist/client/assets/{blockDiagram-GPEHLZMM-DpwJlK7i.js → blockDiagram-GPEHLZMM-CJuX0UM_.js} +1 -1
  32. package/dist/client/assets/{c4Diagram-AAUBKEIU-DV115Z4B.js → c4Diagram-AAUBKEIU-a46Lm113.js} +1 -1
  33. package/dist/client/assets/channel-BGI9APMr.js +1 -0
  34. package/dist/client/assets/{chunk-2J33WTMH-B5BtZWCx.js → chunk-2J33WTMH-iBhwyS0c.js} +1 -1
  35. package/dist/client/assets/{chunk-4BX2VUAB-CJvgQM9e.js → chunk-4BX2VUAB-C7lS5wER.js} +1 -1
  36. package/dist/client/assets/{chunk-55IACEB6-ClrKLhVZ.js → chunk-55IACEB6-CQ6YOncn.js} +1 -1
  37. package/dist/client/assets/{chunk-727SXJPM-DhfUMdP5.js → chunk-727SXJPM-CveMaMKK.js} +1 -1
  38. package/dist/{desktop/client/assets/chunk-AQP2D5EJ-DegV3EMW.js → client/assets/chunk-AQP2D5EJ-DErjGUEk.js} +1 -1
  39. package/dist/client/assets/{chunk-FMBD7UC4-sLs4-jLA.js → chunk-FMBD7UC4-DXUvEFfJ.js} +1 -1
  40. package/dist/client/assets/{chunk-ND2GUHAM-BaptHWZM.js → chunk-ND2GUHAM-w5RqSj1J.js} +1 -1
  41. package/dist/client/assets/{chunk-QZHKN3VN-CArEOzHE.js → chunk-QZHKN3VN-CAi0lJ7V.js} +1 -1
  42. package/dist/client/assets/classDiagram-4FO5ZUOK-g6hCcufy.js +1 -0
  43. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-g6hCcufy.js +1 -0
  44. package/dist/{desktop/client/assets/cose-bilkent-S5V4N54A-DWz6vuMa.js → client/assets/cose-bilkent-S5V4N54A-Ck2h4uV5.js} +1 -1
  45. package/dist/{desktop/client/assets/dagre-BM42HDAG-GgO-3j8E.js → client/assets/dagre-BM42HDAG-BCRTXNj6.js} +1 -1
  46. package/dist/{desktop/client/assets/dashboard-view-CosTtyxo.js → client/assets/dashboard-view-BfLJ60Kd.js} +1 -1
  47. package/dist/client/assets/{dashboard-view-Bc5cz2DG.js → dashboard-view-D9rF_PCq.js} +1 -1
  48. package/dist/{desktop/client/assets/diagram-2AECGRRQ-BZQIXBBG.js → client/assets/diagram-2AECGRRQ-DTTk-DYO.js} +1 -1
  49. package/dist/client/assets/{diagram-5GNKFQAL-fRigQDqm.js → diagram-5GNKFQAL-jDc9kMi2.js} +1 -1
  50. package/dist/{desktop/client/assets/diagram-KO2AKTUF-B2lApC5l.js → client/assets/diagram-KO2AKTUF-CcLmzlGr.js} +1 -1
  51. package/dist/client/assets/{diagram-LMA3HP47-BVRY5C4e.js → diagram-LMA3HP47-DCW8XKQj.js} +1 -1
  52. package/dist/client/assets/{diagram-OG6HWLK6-DdP1xMRM.js → diagram-OG6HWLK6-wbbKquPs.js} +1 -1
  53. package/dist/client/assets/{erDiagram-TEJ5UH35-BU5DG9IX.js → erDiagram-TEJ5UH35-Fo933Mo7.js} +1 -1
  54. package/dist/{desktop/client/assets/flowDiagram-I6XJVG4X-Zk7IzQc2.js → client/assets/flowDiagram-I6XJVG4X-Dfum7HZP.js} +1 -1
  55. package/dist/client/assets/{folder-open-CV5ek-IV.js → folder-open-B8vOwFeP.js} +1 -1
  56. package/dist/client/assets/{ganttDiagram-6RSMTGT7-BFVLXtHC.js → ganttDiagram-6RSMTGT7-BzEBCn01.js} +1 -1
  57. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-TiwSURa4.js → gitGraphDiagram-PVQCEYII-CgovghHs.js} +1 -1
  58. package/dist/client/assets/{index-CEUULqTR.js → index-BjELA24x.js} +210 -210
  59. package/dist/client/assets/index-DwGW7OJh.css +1 -0
  60. package/dist/client/assets/{infoDiagram-5YYISTIA-Drkf3o26.js → infoDiagram-5YYISTIA-BzpU4Wys.js} +1 -1
  61. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-a9ZSlbx2.js → ishikawaDiagram-YF4QCWOH-cpp5pozu.js} +1 -1
  62. package/dist/client/assets/{journeyDiagram-JHISSGLW-DF_3fPPW.js → journeyDiagram-JHISSGLW-BVjcw6oo.js} +1 -1
  63. package/dist/client/assets/{kanban-definition-UN3LZRKU-B6dXVyXh.js → kanban-definition-UN3LZRKU-4unAhBzo.js} +1 -1
  64. package/dist/client/assets/{mermaid.core-BGFpwAba.js → mermaid.core-DzIyUj9t.js} +4 -4
  65. package/dist/client/assets/{mindmap-definition-RKZ34NQL-D5bZ0zCy.js → mindmap-definition-RKZ34NQL-Be_yfVir.js} +1 -1
  66. package/dist/client/assets/{pieDiagram-4H26LBE5-Dh6rUd7R.js → pieDiagram-4H26LBE5-Cfnw2aji.js} +1 -1
  67. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-D9Fy6Nl1.js → quadrantDiagram-W4KKPZXB-BFlC-_Uo.js} +1 -1
  68. package/dist/{desktop/client/assets/requirementDiagram-4Y6WPE33-C8S5lJeA.js → client/assets/requirementDiagram-4Y6WPE33-DpVPzCOx.js} +1 -1
  69. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-Cs9Bx7N3.js → sankeyDiagram-5OEKKPKP-DM-gKKP0.js} +1 -1
  70. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-BV7DAI0_.js → sequenceDiagram-3UESZ5HK-DjhZCZhd.js} +1 -1
  71. package/dist/{desktop/client/assets/shield-alert-BHWZI_om.js → client/assets/shield-alert-DCfkjjYc.js} +1 -1
  72. package/dist/client/assets/{stateDiagram-AJRCARHV-CTvWoU00.js → stateDiagram-AJRCARHV-BCA96rdI.js} +1 -1
  73. package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-ZSZ46LWU.js → stateDiagram-v2-BHNVJYJU-DHds08RS.js} +1 -1
  74. package/dist/{desktop/client/assets/timeline-definition-PNZ67QCA-BrtDAg8s.js → client/assets/timeline-definition-PNZ67QCA-CHW2OQRw.js} +1 -1
  75. package/dist/client/assets/{upload-CNW5goS6.js → upload-EJc5PJPz.js} +1 -1
  76. package/dist/{desktop/client/assets/users-2kEJQeOu.js → client/assets/users-C-e-99Vp.js} +1 -1
  77. package/dist/{desktop/client/assets/vennDiagram-CIIHVFJN-CVjr2RxJ.js → client/assets/vennDiagram-CIIHVFJN-shGh4eBY.js} +1 -1
  78. package/dist/client/assets/{wardley-L42UT6IY-Bt1vdMb3.js → wardley-L42UT6IY-l0RGrVhn.js} +1 -1
  79. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-B_Dlx683.js → wardleyDiagram-YWT4CUSO-C-USmO8A.js} +1 -1
  80. package/dist/{desktop/client/assets/xychartDiagram-2RQKCTM6-B0o0ggVt.js → client/assets/xychartDiagram-2RQKCTM6-CHX9Umta.js} +1 -1
  81. package/dist/client/index.html +2 -2
  82. package/dist/client/version.json +1 -1
  83. package/dist/desktop/client/.vite/manifest.json +236 -236
  84. package/dist/desktop/client/assets/{AgentDetailView-SJpg9JA5.js → AgentDetailView-CmKvdHMb.js} +1 -1
  85. package/dist/{client/assets/AgentPermissionPolicyEditor-CMtzKP_x.js → desktop/client/assets/AgentPermissionPolicyEditor-C-A5YsOB.js} +1 -1
  86. package/dist/desktop/client/assets/{AgentsView-CITigHGD.js → AgentsView-Ci8aGe-d.js} +3 -3
  87. package/dist/{client/assets/ChatView-Diuc5LOe.js → desktop/client/assets/ChatView-_ZTSW2bn.js} +1 -1
  88. package/dist/desktop/client/assets/{CommandCenter-DmqJyMvs.js → CommandCenter-B7_gwqKx.js} +1 -1
  89. package/dist/desktop/client/assets/{DevServerView-Ckhpio_x.js → DevServerView-BFF8C0F8.js} +1 -1
  90. package/dist/desktop/client/assets/{DirectoryPicker-j-rxo0kC.js → DirectoryPicker-CfhD5v7D.js} +1 -1
  91. package/dist/{client/assets/DocumentsView-C5RTxVSE.js → desktop/client/assets/DocumentsView-DpeUtihC.js} +1 -1
  92. package/dist/desktop/client/assets/{EvalsView-Dd26ipFU.js → EvalsView-BcBDpBZQ.js} +1 -1
  93. package/dist/desktop/client/assets/{ExperimentalAgentOnboardingModal-BqgWIa9n.js → ExperimentalAgentOnboardingModal-CGeNiEm7.js} +1 -1
  94. package/dist/desktop/client/assets/{GoalsView-C5gWzKqI.js → GoalsView-t-86-sWc.js} +1 -1
  95. package/dist/desktop/client/assets/{InsightsView-2SPZDH3m.js → InsightsView-BKdG05Yh.js} +1 -1
  96. package/dist/{client/assets/MemoryView-8Yg8r9qS.js → desktop/client/assets/MemoryView-BhT-vG17.js} +1 -1
  97. package/dist/{client/assets/PiExtensionsManager-DbZ5qtAF.js → desktop/client/assets/PiExtensionsManager-C5kqG7zt.js} +1 -1
  98. package/dist/desktop/client/assets/{PluginManager-B0CMG4RR.js → PluginManager-4nZ3Dccd.js} +1 -1
  99. package/dist/{client/assets/PullRequestView-CMVvVGaP.js → desktop/client/assets/PullRequestView-m0-ygvgV.js} +1 -1
  100. package/dist/{client/assets/ResearchView-BjvgxMjL.js → desktop/client/assets/ResearchView-Be0JmVPT.js} +1 -1
  101. package/dist/{client/assets/SecretsView-gChNSW57.js → desktop/client/assets/SecretsView-BpjSNOmd.js} +1 -1
  102. package/dist/desktop/client/assets/{SessionTerminal-CT_DUO7z.js → SessionTerminal-B2tZ8AY1.js} +1 -1
  103. package/dist/desktop/client/assets/{SettingsModal-Dijfj3cb.js → SettingsModal-COlmbl7p.js} +3 -3
  104. package/dist/desktop/client/assets/{SettingsModal-CvsRQchW.js → SettingsModal-pY1WnN3a.js} +1 -1
  105. package/dist/desktop/client/assets/{SetupWizardModal-BIiJIXkh.js → SetupWizardModal-BFzU4EUM.js} +2 -2
  106. package/dist/{client/assets/ShadcnColorPicker-DyPMec2U.js → desktop/client/assets/ShadcnColorPicker-DnTw9J9K.js} +1 -1
  107. package/dist/{client/assets/SkillsView-BAMinq2_.js → desktop/client/assets/SkillsView-BeOeeV_9.js} +1 -1
  108. package/dist/desktop/client/assets/{TodoView-ClCgLTmi.js → TodoView-Yb7RPsSG.js} +1 -1
  109. package/dist/desktop/client/assets/{WorkflowNodeEditor-8XHmq-V2.js → WorkflowNodeEditor-ygM9IC7d.js} +1 -1
  110. package/dist/desktop/client/assets/{agentSkills-D5osLOR5.js → agentSkills-hS-ir3dK.js} +1 -1
  111. package/dist/{client/assets/architectureDiagram-3BPJPVTR-DysoZtiI.js → desktop/client/assets/architectureDiagram-3BPJPVTR-WcTzF6ME.js} +1 -1
  112. package/dist/desktop/client/assets/{blockDiagram-GPEHLZMM-CTQo88ZR.js → blockDiagram-GPEHLZMM-BYmICOh-.js} +1 -1
  113. package/dist/desktop/client/assets/{c4Diagram-AAUBKEIU-YjMRExC0.js → c4Diagram-AAUBKEIU-3ags6jHx.js} +1 -1
  114. package/dist/desktop/client/assets/channel-CxoQ1L5k.js +1 -0
  115. package/dist/desktop/client/assets/{chunk-2J33WTMH-O2741OpT.js → chunk-2J33WTMH-C2YTcAIE.js} +1 -1
  116. package/dist/desktop/client/assets/{chunk-4BX2VUAB-E8A3umbR.js → chunk-4BX2VUAB-CM-ULeCo.js} +1 -1
  117. package/dist/desktop/client/assets/{chunk-55IACEB6-B052cwdC.js → chunk-55IACEB6-puic6XS6.js} +1 -1
  118. package/dist/desktop/client/assets/{chunk-727SXJPM-BKI0HQTP.js → chunk-727SXJPM-D19Luj8o.js} +1 -1
  119. package/dist/{client/assets/chunk-AQP2D5EJ-CGKqiWfs.js → desktop/client/assets/chunk-AQP2D5EJ-CMrfBV_j.js} +1 -1
  120. package/dist/desktop/client/assets/{chunk-FMBD7UC4-B7tLsOki.js → chunk-FMBD7UC4-C_7tmt8f.js} +1 -1
  121. package/dist/desktop/client/assets/{chunk-ND2GUHAM-2xF-Tg95.js → chunk-ND2GUHAM-CS1wETTI.js} +1 -1
  122. package/dist/desktop/client/assets/{chunk-QZHKN3VN-DUl8dvkQ.js → chunk-QZHKN3VN-BUFmz9j9.js} +1 -1
  123. package/dist/desktop/client/assets/classDiagram-4FO5ZUOK-CkwAKz6i.js +1 -0
  124. package/dist/desktop/client/assets/classDiagram-v2-Q7XG4LA2-CkwAKz6i.js +1 -0
  125. package/dist/{client/assets/cose-bilkent-S5V4N54A-DZ4jAfQc.js → desktop/client/assets/cose-bilkent-S5V4N54A-CKNwQVxq.js} +1 -1
  126. package/dist/{client/assets/dagre-BM42HDAG-CMhtRslH.js → desktop/client/assets/dagre-BM42HDAG-CUUNF5LG.js} +1 -1
  127. package/dist/{client/assets/dashboard-view-Buq7raMZ.js → desktop/client/assets/dashboard-view-DTUxDN-H.js} +1 -1
  128. package/dist/desktop/client/assets/{dashboard-view-Cw1KM3Az.js → dashboard-view-DqJev4PV.js} +1 -1
  129. package/dist/{client/assets/diagram-2AECGRRQ-6uVCJGM-.js → desktop/client/assets/diagram-2AECGRRQ-D2jVjZrI.js} +1 -1
  130. package/dist/desktop/client/assets/{diagram-5GNKFQAL-B1pdxoln.js → diagram-5GNKFQAL-DfwBCAme.js} +1 -1
  131. package/dist/{client/assets/diagram-KO2AKTUF-DeLeKk1C.js → desktop/client/assets/diagram-KO2AKTUF-CBWuxzRU.js} +1 -1
  132. package/dist/desktop/client/assets/{diagram-LMA3HP47-BRqKMh4D.js → diagram-LMA3HP47-DIdjbaEx.js} +1 -1
  133. package/dist/desktop/client/assets/{diagram-OG6HWLK6-Dl7BJ0tE.js → diagram-OG6HWLK6-DU6aJ_ab.js} +1 -1
  134. package/dist/desktop/client/assets/{erDiagram-TEJ5UH35-DS6QZa9s.js → erDiagram-TEJ5UH35-CB7jraE9.js} +1 -1
  135. package/dist/{client/assets/flowDiagram-I6XJVG4X-CFSihB_T.js → desktop/client/assets/flowDiagram-I6XJVG4X-DAuaVo8C.js} +1 -1
  136. package/dist/desktop/client/assets/{folder-open-BhDX2lOd.js → folder-open-B3OWnACS.js} +1 -1
  137. package/dist/desktop/client/assets/{ganttDiagram-6RSMTGT7-CJuYCcjE.js → ganttDiagram-6RSMTGT7-BF3vyyoq.js} +1 -1
  138. package/dist/desktop/client/assets/{gitGraphDiagram-PVQCEYII-BmCm6tvH.js → gitGraphDiagram-PVQCEYII-kfNrpgK7.js} +1 -1
  139. package/dist/desktop/client/assets/{index-CoS-MsCg.js → index-lGrAUOVY.js} +240 -240
  140. package/dist/desktop/client/assets/{infoDiagram-5YYISTIA-Ds6lrlTh.js → infoDiagram-5YYISTIA-CuKJEoCg.js} +1 -1
  141. package/dist/desktop/client/assets/{ishikawaDiagram-YF4QCWOH-D3deq-vb.js → ishikawaDiagram-YF4QCWOH-CE_2WBE3.js} +1 -1
  142. package/dist/desktop/client/assets/{journeyDiagram-JHISSGLW-BuHVkT2m.js → journeyDiagram-JHISSGLW-BYQgXH_-.js} +1 -1
  143. package/dist/desktop/client/assets/{kanban-definition-UN3LZRKU-DdoE5oU5.js → kanban-definition-UN3LZRKU-sr34WcdB.js} +1 -1
  144. package/dist/desktop/client/assets/{mermaid.core-_nbzHc5D.js → mermaid.core-CY1aILvw.js} +4 -4
  145. package/dist/desktop/client/assets/{mindmap-definition-RKZ34NQL-Bq-XuCz_.js → mindmap-definition-RKZ34NQL-BAxyJwWa.js} +1 -1
  146. package/dist/desktop/client/assets/{pieDiagram-4H26LBE5-BgcfpW6J.js → pieDiagram-4H26LBE5-DV4jRFhI.js} +1 -1
  147. package/dist/desktop/client/assets/{quadrantDiagram-W4KKPZXB-Xys80jUW.js → quadrantDiagram-W4KKPZXB-CRtFlWS-.js} +1 -1
  148. package/dist/{client/assets/requirementDiagram-4Y6WPE33-Bky271Dr.js → desktop/client/assets/requirementDiagram-4Y6WPE33-C3kGj3sc.js} +1 -1
  149. package/dist/desktop/client/assets/{sankeyDiagram-5OEKKPKP-B_3GGQyd.js → sankeyDiagram-5OEKKPKP-rH_2R8B6.js} +1 -1
  150. package/dist/desktop/client/assets/{sequenceDiagram-3UESZ5HK-DIu6iwmX.js → sequenceDiagram-3UESZ5HK-BUlBU-AX.js} +1 -1
  151. package/dist/{client/assets/shield-alert-BEwCrI8k.js → desktop/client/assets/shield-alert-CXSmWFIA.js} +1 -1
  152. package/dist/desktop/client/assets/{stateDiagram-AJRCARHV-CnaR2a9t.js → stateDiagram-AJRCARHV-CZloQCqS.js} +1 -1
  153. package/dist/desktop/client/assets/{stateDiagram-v2-BHNVJYJU-VHc1xbe0.js → stateDiagram-v2-BHNVJYJU-CMUjVDVd.js} +1 -1
  154. package/dist/{client/assets/timeline-definition-PNZ67QCA-DSJscSa7.js → desktop/client/assets/timeline-definition-PNZ67QCA-ChiOOBC-.js} +1 -1
  155. package/dist/desktop/client/assets/{upload-DOLP3Bv3.js → upload-BHs6kHbo.js} +1 -1
  156. package/dist/{client/assets/users-BhzdPkLN.js → desktop/client/assets/users-PPo03TKl.js} +1 -1
  157. package/dist/{client/assets/vennDiagram-CIIHVFJN-CziD-NoU.js → desktop/client/assets/vennDiagram-CIIHVFJN-Dq4yiSea.js} +1 -1
  158. package/dist/desktop/client/assets/{wardley-L42UT6IY-CVstgB5f.js → wardley-L42UT6IY-Ctho3NZr.js} +1 -1
  159. package/dist/desktop/client/assets/{wardleyDiagram-YWT4CUSO-Da3szr-D.js → wardleyDiagram-YWT4CUSO-CXcLpQ87.js} +1 -1
  160. package/dist/{client/assets/xychartDiagram-2RQKCTM6-cYDRrhyM.js → desktop/client/assets/xychartDiagram-2RQKCTM6-B4tWIB07.js} +1 -1
  161. package/dist/desktop/client/index.html +1 -1
  162. package/dist/desktop/client/version.json +1 -1
  163. package/dist/droid-cli/package.json +1 -1
  164. package/dist/extension.js +371 -118
  165. package/dist/pi-claude-cli/package.json +1 -1
  166. package/dist/plugin-sdk/index.d.ts +2 -0
  167. package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
  168. package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
  169. package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
  170. package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
  171. package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
  172. package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
  173. package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
  174. package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
  175. package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
  176. package/dist/plugins/fusion-plugin-reports/package.json +1 -1
  177. package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
  178. package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +2 -1
  179. package/package.json +1 -1
  180. package/dist/client/assets/channel-BgnsK1mp.js +0 -1
  181. package/dist/client/assets/classDiagram-4FO5ZUOK-ZkHxi9su.js +0 -1
  182. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-ZkHxi9su.js +0 -1
  183. package/dist/client/assets/index-D1IHwGhg.css +0 -1
  184. package/dist/desktop/client/assets/channel-ByWi0lfq.js +0 -1
  185. package/dist/desktop/client/assets/classDiagram-4FO5ZUOK-C6nL18EV.js +0 -1
  186. package/dist/desktop/client/assets/classDiagram-v2-Q7XG4LA2-C6nL18EV.js +0 -1
package/dist/bin.js CHANGED
@@ -1372,6 +1372,11 @@ var init_settings_schema = __esm({
1372
1372
  // coverage. Falls back to package/explicit command when no tests resolve.
1373
1373
  scopeVerificationToChangedFiles: true,
1374
1374
  ephemeralAgentsEnabled: true,
1375
+ /*
1376
+ FNXC:EphemeralAgentTaskCreation 2026-07-01-00:00:
1377
+ Default-on so ephemeral task-worker agents keep the ability to open follow-up tasks via fn_task_create. Operators who want to confine task creation to humans/permanent agents flip this off.
1378
+ */
1379
+ ephemeralAgentsCanCreateTasks: true,
1375
1380
  agentProvisioning: {},
1376
1381
  sandboxProvisioning: {},
1377
1382
  defaultAgentPermissionPolicy: void 0,
@@ -51649,7 +51654,7 @@ function filterRepairOverlapIgnoredPaths(paths, ignorePaths) {
51649
51654
  if (ignorePaths.length === 0) return paths;
51650
51655
  return paths.filter((path10) => !ignorePaths.some((ignorePath) => repairIgnoredOverlapPath(path10, ignorePath)));
51651
51656
  }
51652
- var serializeTaskAutoMerge, serializeTaskAutoMergeProvenance, TASK_COLUMN_DESCRIPTORS, TASK_COLUMN_DESCRIPTOR_BY_COLUMN, TASK_PERSIST_SQL_COLUMNS, TASK_UPSERT_SQL_ASSIGNMENTS, TASK_BRANCH_CONTEXT_METADATA_KEY, DEFAULT_TASK_ACTIVITY_LOG_ENTRY_LIMIT, DEFAULT_TASK_ACTIVITY_LOG_OUTCOME_LIMIT, taskActivityLogEntryLimit, taskActivityLogOutcomeLimit, ARCHIVE_AGENT_LOG_SNAPSHOT_LIMIT, ARCHIVE_AGENT_LOG_SNIPPET_LIMIT, RECONCILE_ORPHAN_TASK_DIR_MAX_AGE_MS, storeLog, coreLog, TaskHasDependentsError, TaskDeletedError, TombstonedTaskResurrectionError, TaskHasLineageChildrenError, InvalidFileScopeError, SELF_DEFEATING_OPERATION_VERBS, SelfDefeatingDependencyError, DependencyCycleError, MergeQueueTaskNotFoundError, MergeQueueInvalidColumnError, MergeQueueLeaseOwnershipError, InvalidMergeQueueLeaseDurationError, HandoffInvariantViolationError, TransitionRejectionError, WORKFLOW_MOVE_POLICY_TIMEOUT_MS, LEGACY_AUTO_MERGE_STAMP_MARKER_KEY, LEGACY_AUTO_MERGE_STAMP_MARKER_VERSION, TaskStore;
51657
+ var serializeTaskAutoMerge, serializeTaskAutoMergeProvenance, TASK_COLUMN_DESCRIPTORS, TASK_COLUMN_DESCRIPTOR_BY_COLUMN, TASK_PERSIST_SQL_COLUMNS, TASK_UPSERT_SQL_ASSIGNMENTS, TASK_BRANCH_CONTEXT_METADATA_KEY, DEFAULT_TASK_ACTIVITY_LOG_ENTRY_LIMIT, DEFAULT_TASK_ACTIVITY_LOG_OUTCOME_LIMIT, taskActivityLogEntryLimit, taskActivityLogOutcomeLimit, ARCHIVE_AGENT_LOG_SNAPSHOT_LIMIT, ARCHIVE_AGENT_LOG_SNIPPET_LIMIT, RECONCILE_ORPHAN_TASK_DIR_MAX_AGE_MS, storeLog, coreLog, TaskHasDependentsError, TaskSelfDeleteError, TaskDeletedError, TombstonedTaskResurrectionError, TaskHasLineageChildrenError, InvalidFileScopeError, SELF_DEFEATING_OPERATION_VERBS, SelfDefeatingDependencyError, DependencyCycleError, MergeQueueTaskNotFoundError, MergeQueueInvalidColumnError, MergeQueueLeaseOwnershipError, InvalidMergeQueueLeaseDurationError, HandoffInvariantViolationError, TransitionRejectionError, WORKFLOW_MOVE_POLICY_TIMEOUT_MS, LEGACY_AUTO_MERGE_STAMP_MARKER_KEY, LEGACY_AUTO_MERGE_STAMP_MARKER_VERSION, TaskStore;
51653
51658
  var init_store = __esm({
51654
51659
  "../core/src/store.ts"() {
51655
51660
  "use strict";
@@ -51901,6 +51906,15 @@ var init_store = __esm({
51901
51906
  this.dependentIds = dependentIds;
51902
51907
  }
51903
51908
  };
51909
+ TaskSelfDeleteError = class extends Error {
51910
+ taskId;
51911
+ code = "TASK_SELF_DELETE";
51912
+ constructor(taskId) {
51913
+ super(`Task ${taskId} cannot delete itself`);
51914
+ this.name = "TaskSelfDeleteError";
51915
+ this.taskId = taskId;
51916
+ }
51917
+ };
51904
51918
  TaskDeletedError = class extends Error {
51905
51919
  constructor(taskId, deletedAt) {
51906
51920
  super(`Task ${taskId} is soft-deleted (deletedAt=${deletedAt}) and cannot be read or mutated`);
@@ -60175,6 +60189,9 @@ ${newTask.description}
60175
60189
  */
60176
60190
  async deleteTask(id, options) {
60177
60191
  const deletedTask = await this.withTaskLock(id, async () => {
60192
+ if (options?.auditContext?.taskId === id) {
60193
+ throw new TaskSelfDeleteError(id);
60194
+ }
60178
60195
  this.flushAgentLogBuffer();
60179
60196
  const task = this.readTaskFromDb(id, { includeDeleted: true });
60180
60197
  if (!task) {
@@ -128528,6 +128545,17 @@ function createTaskCreateTool(store, provenance, options) {
128528
128545
  parameters: taskCreateParams,
128529
128546
  execute: async (_id, params) => {
128530
128547
  try {
128548
+ if (options?.callerIsEphemeral) {
128549
+ const settings = typeof store.getSettings === "function" ? await store.getSettings().catch(() => ({})) : {};
128550
+ if (settings.ephemeralAgentsCanCreateTasks === false) {
128551
+ const message = "Ephemeral task-worker agents are not allowed to create tasks (ephemeralAgentsCanCreateTasks is disabled for this project).";
128552
+ return {
128553
+ content: [{ type: "text", text: `ERROR: ${message}` }],
128554
+ details: { error: message, rule: "ephemeral-agents-cannot-create-tasks" },
128555
+ isError: true
128556
+ };
128557
+ }
128558
+ }
128531
128559
  const workflowId = params.workflow_id?.trim() || void 0;
128532
128560
  const { task, wasDuplicate } = await createAgentTask(store, {
128533
128561
  description: params.description,
@@ -164412,25 +164440,91 @@ function buildReviewRequest(taskId, stepNumber, stepName, reviewType, promptCont
164412
164440
  );
164413
164441
  return parts.join("\n");
164414
164442
  }
164415
- function extractVerdict(review) {
164416
- const jsonMatch = review.match(
164417
- /\{\s*"verdict"\s*:\s*"(APPROVE|REVISE|RETHINK)"\s*\}/i
164443
+ function proseSignalsClearApproval(rawOutput) {
164444
+ const text = rawOutput.trim();
164445
+ if (text.length === 0) return false;
164446
+ const blockingSignal = new RegExp(
164447
+ [
164448
+ /\bREVIS(?:E|ED|ES|ING|ION|IONS)\b/,
164449
+ /\bRETHINK\b/,
164450
+ /\bREQUEST(?:ING|ED)?\s+(?:REVISION|CHANGES?)\b/,
164451
+ /\bNEEDS?\s+(?:REVISION|CHANGES?|WORK|FIXE?S?)\b/,
164452
+ /\bMUST\s+(?:BE\s+)?(?:FIX|CHANG|CORRECT|ADDRESS|RESOLV|UPDAT)\w*/,
164453
+ /\bSHOULD\s+(?:BE\s+)?(?:FIX|CHANG|CORRECT|ADDRESS|RESOLV|UPDAT|REVIS)\w*/,
164454
+ /\bPLEASE\s+(?:FIX|CHANG|CORRECT|ADDRESS|UPDAT|REVIS)\w*/,
164455
+ /\bWANTS?\s+(?:\w+\s+){0,3}?(?:CHANG|FIX|CORRECT|ADDRESS|REVIS)\w*/,
164456
+ /\bBEFORE\s+MERG\w*/,
164457
+ /\bREJECT(?:ED|ING|S)?\b/,
164458
+ /\bDISAPPROVE\b/
164459
+ ].map((r) => r.source).join("|"),
164460
+ "i"
164418
164461
  );
164419
- if (jsonMatch) {
164420
- reviewerLog.log(`Verdict extracted via JSON block: ${jsonMatch[1].toUpperCase()}`);
164421
- return jsonMatch[1].toUpperCase();
164462
+ const negatedApproval = /\b(?:not|no|never|cannot|can['’]?t|don['’]?t|doesn['’]?t|won['’]?t|without)\s+approv/i;
164463
+ if (blockingSignal.test(text) || negatedApproval.test(text)) return false;
164464
+ const approvalSignal = /\b(?:approv(?:e|ed|es|ing|al)|approve[_\s]with[_\s]notes|looks?\s+good|lgtm|ship\s+it|no\s+(?:blocking\s+)?(?:issues|concerns|problems|objections)|passes?\s+(?:the\s+)?review|all\s+good|acceptable|good\s+to\s+(?:go|merge)|out\s+of\s+scope)\b/i;
164465
+ return approvalSignal.test(text);
164466
+ }
164467
+ function extractJsonObjectCandidates(text) {
164468
+ const out = [];
164469
+ const starts = [];
164470
+ let inString = false;
164471
+ let escaped = false;
164472
+ for (let i = 0; i < text.length; i += 1) {
164473
+ const ch = text[i];
164474
+ if (inString) {
164475
+ if (escaped) escaped = false;
164476
+ else if (ch === "\\") escaped = true;
164477
+ else if (ch === '"') inString = false;
164478
+ continue;
164479
+ }
164480
+ if (ch === '"') inString = true;
164481
+ else if (ch === "{") starts.push(i);
164482
+ else if (ch === "}") {
164483
+ const start = starts.pop();
164484
+ if (start !== void 0 && starts.length === 0) out.push(text.slice(start, i + 1));
164485
+ }
164422
164486
  }
164487
+ return out;
164488
+ }
164489
+ function classifyReviewVerdictToken(raw) {
164490
+ const v2 = raw.trim().toUpperCase();
164491
+ if (v2.startsWith("APPROVE") || v2.startsWith("APPROVAL")) return "APPROVE";
164492
+ if (v2.startsWith("REVISE") || v2.startsWith("REQUEST_REVISION") || v2.startsWith("REJECT")) return "REVISE";
164493
+ if (v2.startsWith("RETHINK")) return "RETHINK";
164494
+ return null;
164495
+ }
164496
+ function extractVerdict(review) {
164423
164497
  const headingMatch = review.match(
164424
- /^[>\s]*(?:###?\s*|[*_]{1,2})Verdict[:\s]*[*_]{0,2}\s*(APPROVE|REVISE|RETHINK)\b/im
164498
+ /^[>\s]*(?:###?\s*|[*_]{1,2})Verdict[:\s]*[*_]{0,2}\s*([A-Za-z_]+)/im
164425
164499
  );
164426
164500
  if (headingMatch) {
164427
- return headingMatch[1].toUpperCase();
164501
+ const classified = classifyReviewVerdictToken(headingMatch[1]);
164502
+ if (classified) return classified;
164428
164503
  }
164429
164504
  const lineFallback = review.match(
164430
- /^[>\s]*(?:verdict|decision)\s*[-:]\s*(APPROVE|REVISE|RETHINK)\b/im
164505
+ /^[>\s]*(?:verdict|decision)\s*[-:]\s*([A-Za-z_]+)/im
164431
164506
  );
164432
164507
  if (lineFallback) {
164433
- return lineFallback[1].toUpperCase();
164508
+ const classified = classifyReviewVerdictToken(lineFallback[1]);
164509
+ if (classified) return classified;
164510
+ }
164511
+ const jsonCandidates = extractJsonObjectCandidates(review);
164512
+ for (let i = jsonCandidates.length - 1; i >= 0; i -= 1) {
164513
+ try {
164514
+ const parsed = JSON.parse(jsonCandidates[i]);
164515
+ if (typeof parsed?.verdict === "string") {
164516
+ const classified = classifyReviewVerdictToken(parsed.verdict);
164517
+ if (classified) {
164518
+ reviewerLog.log(`Verdict extracted via JSON payload: ${classified}`);
164519
+ return classified;
164520
+ }
164521
+ }
164522
+ } catch {
164523
+ }
164524
+ }
164525
+ if (proseSignalsClearApproval(review)) {
164526
+ reviewerLog.log(`Verdict extracted via lenient prose approval (${review.length} chars) \u2192 APPROVE`);
164527
+ return "APPROVE";
164434
164528
  }
164435
164529
  reviewerLog.warn(`Could not extract verdict from review (${review.length} chars). Returning UNAVAILABLE.`);
164436
164530
  return "UNAVAILABLE";
@@ -173603,18 +173697,21 @@ function parseWorkflowStepVerdict(rawOutput) {
173603
173697
  for (const match of fencedMatches) {
173604
173698
  candidates.push(match[1].trim());
173605
173699
  }
173606
- const jsonObjectMatches = trimmed.match(/\{[\s\S]*\}/g);
173607
- if (jsonObjectMatches) {
173608
- candidates.push(...jsonObjectMatches.map((value) => value.trim()));
173609
- }
173700
+ candidates.push(...extractJsonObjectCandidates(trimmed));
173610
173701
  for (let i = candidates.length - 1; i >= 0; i -= 1) {
173611
173702
  try {
173612
173703
  const parsed = JSON.parse(candidates[i]);
173613
- if (!parsed || typeof parsed.verdict !== "string" || !WORKFLOW_STEP_VERDICTS.has(parsed.verdict)) {
173614
- continue;
173615
- }
173704
+ if (!parsed || typeof parsed.verdict !== "string") continue;
173705
+ const token = parsed.verdict.trim().toUpperCase();
173706
+ let verdict = null;
173707
+ if (token.startsWith("APPROVE") || token.startsWith("APPROVAL")) {
173708
+ verdict = token.includes("NOTE") ? "APPROVE_WITH_NOTES" : "APPROVE";
173709
+ } else if (token.startsWith("REVISE") || token.startsWith("REQUEST_REVISION") || token.startsWith("REJECT")) {
173710
+ verdict = "REVISE";
173711
+ }
173712
+ if (!verdict) continue;
173616
173713
  return {
173617
- verdict: parsed.verdict,
173714
+ verdict,
173618
173715
  notes: typeof parsed.notes === "string" ? parsed.notes : ""
173619
173716
  };
173620
173717
  } catch {
@@ -173635,7 +173732,7 @@ function inferWorkflowStepVerdictFromProse(rawOutput) {
173635
173732
  notes: ""
173636
173733
  };
173637
173734
  }
173638
- if (/\b(approve|approved|looks good|no issues|out of scope)\b/i.test(trimmed)) {
173735
+ if (proseSignalsClearApproval(trimmed)) {
173639
173736
  return { verdict: "APPROVE", notes: "" };
173640
173737
  }
173641
173738
  return null;
@@ -173882,6 +173979,11 @@ Please adjust your approach based on this feedback.`;
173882
173979
  function hasNonTerminalWorkflowSteps(task) {
173883
173980
  return task.steps.length > 0 && task.steps.some((step) => step.status !== "done" && step.status !== "skipped");
173884
173981
  }
173982
+ function clearTerminalWorkflowStepFailures(results) {
173983
+ const current = results ?? [];
173984
+ const kept = current.filter((result) => result.status !== "failed" && result.status !== "advisory_failure");
173985
+ return kept.length === current.length ? current : kept;
173986
+ }
173885
173987
  function workflowStepResultPassed(task, workflowStepId) {
173886
173988
  const results = task?.workflowStepResults ?? [];
173887
173989
  return results.some(
@@ -173982,7 +174084,7 @@ function detectReviewHandoffIntent(commentText) {
173982
174084
  ];
173983
174085
  return handoffPhrases.some((phrase) => text.includes(phrase));
173984
174086
  }
173985
- var execAsync32, AGENT_BROWSER_NAVIGATION_SKILL_ID, yieldEventLoop3, tokenCacheMetricsLog, OPTIONAL_STEP_REVISION_KEY_MARKER2, STEP_STATUSES, MAX_WORKFLOW_STEP_RETRIES, MAX_TASK_DONE_SESSION_RETRIES, MAX_TASK_DONE_REQUEUE_RETRIES, MAX_TRANSIENT_GRAPH_RESUME_RETRIES, TRANSIENT_GRAPH_RESUME_RETRY_BACKOFF_MS, COMPLETED_TASK_WATCHDOG_MS, WORKFLOW_RERUN_WATCHDOG_MS, LOOP_COMPACTION_TIMEOUT_MS, TASK_DONE_REFUSAL_SUFFIX, TRANSIENT_WORKTREE_TASK_JSON_ENOENT_PATTERN, DISSENT_PATTERNS, WORKFLOW_SCRIPT_OUTPUT_MAX_CHARS, NonRetryableWorktreeError, taskUpdateParams, taskAddDepParams, spawnAgentParams, FUSION_WORKFLOW_STEP_CONVENTIONS_PREAMBLE, WORKFLOW_STEP_VERDICTS, reviewStepParams, EXECUTOR_SYSTEM_PROMPT, TaskExecutor;
174087
+ var execAsync32, AGENT_BROWSER_NAVIGATION_SKILL_ID, yieldEventLoop3, tokenCacheMetricsLog, OPTIONAL_STEP_REVISION_KEY_MARKER2, STEP_STATUSES, MAX_WORKFLOW_STEP_RETRIES, MAX_TASK_DONE_SESSION_RETRIES, MAX_TASK_DONE_REQUEUE_RETRIES, MAX_TRANSIENT_GRAPH_RESUME_RETRIES, TRANSIENT_GRAPH_RESUME_RETRY_BACKOFF_MS, COMPLETED_TASK_WATCHDOG_MS, WORKFLOW_RERUN_WATCHDOG_MS, LOOP_COMPACTION_TIMEOUT_MS, TASK_DONE_REFUSAL_SUFFIX, TRANSIENT_WORKTREE_TASK_JSON_ENOENT_PATTERN, DISSENT_PATTERNS, WORKFLOW_SCRIPT_OUTPUT_MAX_CHARS, NonRetryableWorktreeError, taskUpdateParams, taskAddDepParams, spawnAgentParams, FUSION_WORKFLOW_STEP_CONVENTIONS_PREAMBLE, reviewStepParams, EXECUTOR_SYSTEM_PROMPT, TaskExecutor;
173986
174088
  var init_executor = __esm({
173987
174089
  "../engine/src/executor.ts"() {
173988
174090
  "use strict";
@@ -174142,7 +174244,6 @@ You are running as a Fusion autonomous workflow step \u2014 NOT an interactive C
174142
174244
  3. Dispatching a \`ce-<persona>\` subagent: do NOT use a raw \`Task ce-*(...)\` call. Instead, read the persona definition from \`$FUSION_CE_AGENTS_DIR/<persona>.md\`, strip its YAML frontmatter, and pass the remaining body as the \`systemPromptOverride\` argument to the \`fn_spawn_agent\` tool. Resolve the path strictly inside \`$FUSION_CE_AGENTS_DIR\` \u2014 reject any \`<persona>\` containing \`/\` or \`..\` (path traversal), and skip a def whose body is empty or implausibly large. If \`fn_spawn_agent\` is not available (a readonly step), do the persona's work inline yourself instead of spawning.
174143
174245
 
174144
174246
  `;
174145
- WORKFLOW_STEP_VERDICTS = /* @__PURE__ */ new Set(["APPROVE", "APPROVE_WITH_NOTES", "REVISE"]);
174146
174247
  reviewStepParams = Type6.Object({
174147
174248
  step: Type6.Number({ description: "Step number to review (0-indexed; matches the `### Step N:` numbers in PROMPT.md \u2014 Step 0 is Preflight)." }),
174148
174249
  type: Type6.Union(
@@ -175855,6 +175956,18 @@ The tool prevents your session from being killed by the inactivity watchdog duri
175855
175956
  * this as a successful retry, since the original bounce may itself be
175856
175957
  * stuck.
175857
175958
  */
175959
+ /*
175960
+ FNXC:ReviewLeniency 2026-07-02-02:10:
175961
+ Clear prior terminal failure results (failed/advisory_failure — incl. optional gate nodes like code-review) so a retry starts clean. Call this ONLY once the task has left the mergeable in-review column (i.e. it is in `todo`): clearing while still in-review drops the merge blocker during the rerun-bounce window and could let a concurrent auto-merge sweep merge an empty-`steps` graph-native task with its gate failure unaddressed. `moveTask(in-review→todo)` already clears ALL results (applyReopenFieldClears), so this is chiefly for the in-progress→todo bounce path where the move does not. Passed/skipped/pending evidence is kept.
175962
+ */
175963
+ async clearTerminalStepFailuresForRetry(taskId) {
175964
+ const live = await this.store.getTask(taskId).catch(() => null);
175965
+ if (!live) return;
175966
+ const cleared = clearTerminalWorkflowStepFailures(live.workflowStepResults);
175967
+ if (cleared !== live.workflowStepResults) {
175968
+ await this.store.updateTask(taskId, { workflowStepResults: cleared }, this.getRunContextFor(taskId));
175969
+ }
175970
+ }
175858
175971
  async performWorkflowRerunBounce(taskId, worktreePath, preserveResumeState = true) {
175859
175972
  const pauseLabel = await this.getExecutionPauseLabel();
175860
175973
  if (pauseLabel) {
@@ -175894,6 +176007,7 @@ The tool prevents your session from being killed by the inactivity watchdog duri
175894
176007
  executorLog.log(`${taskId}: workflow rerun parked in todo \u2014 ${pauseLabelAfterTodo} became active during bounce`);
175895
176008
  return "deferred-paused";
175896
176009
  }
176010
+ await this.clearTerminalStepFailuresForRetry(taskId);
175897
176011
  await this.store.moveTask(taskId, "in-progress");
175898
176012
  return "bounced";
175899
176013
  }
@@ -175904,6 +176018,7 @@ The tool prevents your session from being killed by the inactivity watchdog duri
175904
176018
  executorLog.log(`${taskId}: workflow rerun parked in todo \u2014 ${pauseLabelBeforeResume} became active before resume`);
175905
176019
  return "deferred-paused";
175906
176020
  }
176021
+ await this.clearTerminalStepFailuresForRetry(taskId);
175907
176022
  await this.store.moveTask(taskId, "in-progress");
175908
176023
  return "bounced";
175909
176024
  }
@@ -178821,9 +178936,10 @@ ${prompt}`;
178821
178936
  if (cfg.summaryTarget === "task" && typeof stepOutput === "string" && stepOutput.trim()) {
178822
178937
  contextPatch.summary = stepOutput.trim();
178823
178938
  }
178824
- const advisoryFailureValue = outcome.malformed ? "advisory_failure" : "failed";
178939
+ const malformed = outcome.malformed === true;
178940
+ const advisoryFailureValue = malformed ? "advisory_failure" : "failed";
178825
178941
  return {
178826
- outcome: outcome.success || !blocking ? "success" : "failure",
178942
+ outcome: outcome.success || !blocking || malformed ? "success" : "failure",
178827
178943
  value: verdict ?? (outcome.success ? "passed" : advisoryFailureValue),
178828
178944
  ...Object.keys(contextPatch).length > 0 ? { contextPatch } : {}
178829
178945
  };
@@ -178988,6 +179104,29 @@ ${prompt}`;
178988
179104
  if (MERGE_REGION_KINDS.has(failedNode)) return true;
178989
179105
  return failedNode === "merge-manual-hold" || failedNode === "merge-retry";
178990
179106
  }
179107
+ /*
179108
+ FNXC:WorkflowRemediation 2026-07-01-23:40:
179109
+ A live agent session surface for a task proves the work is still executing, independent of the persisted column/pause/status row that handleGraphFailure re-fetches. This mirrors clearPhantomExecutorBinding's `hasLiveSessionSurface` (FN-6736) but deliberately EXCLUDES `this.executing` and graph-routing membership: those are still set for the graph run that is currently ending (graphRouting is cleared in maybeExecuteWorkflowGraph's finally, AFTER handleGraphFailure returns), so including them would report every ending run as "still executing" and suppress all failures. Only a registered coding/step/CLI session surface means a SEPARATE, live agent is working the task.
179110
+ */
179111
+ hasLiveTaskSessionSurface(taskId) {
179112
+ return this.activeSessions.has(taskId) || this.activeStepExecutors.has(taskId) || this.activeWorkflowStepSessions.has(taskId) || this.activeCliTaskSessions.has(taskId);
179113
+ }
179114
+ /*
179115
+ FNXC:WorkflowRemediation 2026-07-01-23:40:
179116
+ A `pre-merge-remediation` / `plan-replan` node (e.g. `code-review-remediation`) is a FIRE-AND-FORGET async scheduler, not a terminal work node: its job is to hand off an implementation fix (sendTaskBackForFix re-dispatches the coding session) and stop traversal. These nodes carry only a `success` rework edge back to their gate and NO `failure` out-edge, so when their schedule call cannot re-arm (missing rehydrated failureContext after a restart → `missing-remediation-context`, `remediation-not-scheduled`, or an exhausted rework budget) the failure bubbles out as the terminal graph outcome and handleGraphFailure would stamp `status:"failed"` — even while a previously-scheduled fix/reviewer session is still live. Classify these nodes so that terminal sink can preserve a still-executing task instead of flagging a spurious failure. Detection prefers the resolved IR `workflowAction` (covers custom workflows), with a node-id fallback for the built-in ids when the IR cannot be resolved.
179117
+ */
179118
+ async isRemediationGraphNode(taskId, failedNode) {
179119
+ if (!failedNode) return false;
179120
+ try {
179121
+ const ir2 = await resolveWorkflowIrForTask(this.store, taskId);
179122
+ const node = ir2?.nodes?.find((n) => n.id === failedNode);
179123
+ const action = node?.config?.workflowAction;
179124
+ if (action === "pre-merge-remediation" || action === "plan-replan") return true;
179125
+ if (node) return false;
179126
+ } catch {
179127
+ }
179128
+ return failedNode === "code-review-remediation" || failedNode === "browser-verification-remediation" || failedNode === "plan-replan";
179129
+ }
178991
179130
  isTerminalMergeGraphFailureValue(value) {
178992
179131
  if (!value) return false;
178993
179132
  const normalized = value.toLowerCase();
@@ -179497,6 +179636,13 @@ ${prompt}`;
179497
179636
  return;
179498
179637
  }
179499
179638
  }
179639
+ if (this.hasLiveTaskSessionSurface(task.id) && await this.isRemediationGraphNode(task.id, failedNode)) {
179640
+ const benignMessage = `Workflow graph ended at remediation node '${failedNode ?? "unknown"}' while a live agent session is still executing \u2014 not flagging as failed; live session preserved`;
179641
+ executorLog.warn(`${task.id}: ${benignMessage}`);
179642
+ await this.store.logEntry(task.id, benignMessage, void 0, this.getRunContextFor(task.id));
179643
+ await this.persistTokenUsage(task.id);
179644
+ return;
179645
+ }
179500
179646
  const message = `Workflow graph terminated with failure at node '${failedNode ?? "unknown"}'`;
179501
179647
  executorLog.warn(`${task.id}: ${message}`);
179502
179648
  await this.store.logEntry(task.id, message, void 0, this.getRunContextFor(task.id));
@@ -179530,6 +179676,7 @@ ${prompt}`;
179530
179676
  recoveryRehome: true
179531
179677
  });
179532
179678
  }
179679
+ await this.clearTerminalStepFailuresForRetry(live.id);
179533
179680
  await this.persistTokenUsage(live.id);
179534
179681
  return true;
179535
179682
  }
@@ -179706,6 +179853,41 @@ ${prompt}`;
179706
179853
  executorLog.log(`${liveTask.id}: executor dispatch blocked by unmet dependencies: ${unmetDeps.join(", ")}`);
179707
179854
  return true;
179708
179855
  }
179856
+ /*
179857
+ FNXC:EphemeralAgents 2026-07-01-00:00:
179858
+ `ephemeralAgentsEnabled: false` means "never spawn short-lived executor-FN-XXXX workers; only permanent agents run work" (see types.ts ephemeralAgentsEnabled). The legacy spawn refusal lives in EphemeralWorkerManager.onTaskStart (ephemeral-worker-manager.ts), but that runs as a fire-and-forget bookkeeping callback AFTER execution has already begun, so it cannot stop a run. The workflow-engine dispatch paths (maybeExecuteWorkflowGraph, workflowAuthoritativeDispatch, maybeDispatchWorkflowWorkEngine) execute tasks in-process without ever consulting the toggle. Any task that reaches execute() without a permanent assignment via a non-scheduler path (resume-after-restart, heartbeat re-entry, mission/autopilot, work-engine claim) therefore ran despite the operator disabling ephemeral agents.
179859
+
179860
+ This guard is the executor's last line of defense, mirroring the scheduler cutover gate (scheduler.ts:2464) and the spawn refusal (ephemeral-worker-manager.ts:132). It runs once at the top of the outer dispatch — before all three workflow paths — so a single check covers every workflow dispatch entry point. A task explicitly assigned to a permanent (non-ephemeral) agent is exactly how ephemeral-off mode is meant to run, so those are allowed through; everything else is re-queued for the scheduler to auto-assign a permanent agent or hold.
179861
+ */
179862
+ async blockOuterDispatchWhenEphemeralDisabled(task) {
179863
+ const settings = await this.store.getSettings();
179864
+ if (settings.ephemeralAgentsEnabled !== false) return false;
179865
+ const assignedId = task.assignedAgentId?.trim();
179866
+ if (assignedId) {
179867
+ if (!this.options.agentStore) return false;
179868
+ const agent = await this.options.agentStore.getAgent(assignedId).catch(() => null);
179869
+ if (agent && !isEphemeralAgent(agent)) return false;
179870
+ }
179871
+ const liveTask = await this.store.getTask(task.id).catch(() => null) ?? task;
179872
+ if (liveTask.column !== "todo") {
179873
+ await this.store.moveTask(liveTask.id, "todo", {
179874
+ preserveProgress: true,
179875
+ preserveWorktree: true,
179876
+ preserveResumeState: true,
179877
+ moveSource: "engine",
179878
+ recoveryRehome: true
179879
+ });
179880
+ }
179881
+ await this.store.updateTask(liveTask.id, { status: "queued" }, this.getRunContextFor(liveTask.id));
179882
+ await this.store.logEntry(
179883
+ liveTask.id,
179884
+ "queued \u2014 ephemeral agents disabled; no permanent executor assigned",
179885
+ "Executor pre-dispatch ephemeral gate blocked workflow/authoritative execution.",
179886
+ this.getRunContextFor(liveTask.id)
179887
+ );
179888
+ executorLog.log(`${liveTask.id}: executor dispatch blocked \u2014 ephemeralAgentsEnabled=false and no permanent agent assigned`);
179889
+ return true;
179890
+ }
179709
179891
  async execute(task) {
179710
179892
  this.completionFinalizedTaskIds.delete(task.id);
179711
179893
  await this.clearStalePauseAbortBeforeDispatch(task);
@@ -179715,6 +179897,7 @@ ${prompt}`;
179715
179897
  return;
179716
179898
  }
179717
179899
  if (await this.blockOuterDispatchWhenDependenciesUnmet(task)) return;
179900
+ if (await this.blockOuterDispatchWhenEphemeralDisabled(task)) return;
179718
179901
  const graphOwned = await this.maybeExecuteWorkflowGraph(task);
179719
179902
  if (graphOwned) return;
179720
179903
  const authoritativeOwned = await this.options.workflowAuthoritativeDispatch?.(task);
@@ -180580,7 +180763,7 @@ ${summary}`,
180580
180763
  const customTools = [
180581
180764
  this.createTaskUpdateTool(task.id, codeReviewVerdicts, sessionRef, stepCheckpoints, stuckDetector),
180582
180765
  this.createTaskLogTool(task.id),
180583
- this.createTaskCreateTool(),
180766
+ this.createTaskCreateTool(!identityAgent || isEphemeralAgent(identityAgent)),
180584
180767
  this.createTaskAddDepTool(task.id),
180585
180768
  this.createTaskDoneTool(task.id, worktreePath, detail.prompt ?? "", codeReviewVerdicts, () => {
180586
180769
  taskDone = true;
@@ -182144,8 +182327,12 @@ ${summary}`,
182144
182327
  createTaskLogTool(taskId) {
182145
182328
  return createTaskLogTool(this.store, taskId);
182146
182329
  }
182147
- createTaskCreateTool() {
182148
- return createTaskCreateTool(this.store, { sourceType: "api" }, { rootDir: this.rootDir });
182330
+ /*
182331
+ FNXC:EphemeralAgentTaskCreation 2026-07-01-00:00:
182332
+ A task-execution session is an ephemeral worker when no permanent identity agent governs it (default executor-FN-XXXX worker) or the governing agent is itself ephemeral. Pass that through so fn_task_create honors the project `ephemeralAgentsCanCreateTasks` toggle; permanent-agent sessions are never gated.
182333
+ */
182334
+ createTaskCreateTool(callerIsEphemeral) {
182335
+ return createTaskCreateTool(this.store, { sourceType: "api" }, { rootDir: this.rootDir, callerIsEphemeral });
182149
182336
  }
182150
182337
  createTaskDocumentWriteTool(taskId) {
182151
182338
  return createTaskDocumentWriteTool(this.store, taskId);
@@ -184283,7 +184470,7 @@ Review the work done in this worktree and evaluate it against the criteria in yo
184283
184470
  if (parsed.malformed) {
184284
184471
  await this.store.logEntry(
184285
184472
  task.id,
184286
- `[pre-merge] Workflow step '${workflowStep.name}' produced malformed output \u2014 blocking gate success`
184473
+ `[pre-merge] Workflow step '${workflowStep.name}' produced malformed output (no parseable verdict) \u2014 recorded as non-blocking advisory`
184287
184474
  );
184288
184475
  if (workflowStep.requiresBrowser === true) {
184289
184476
  await logBrowserVerificationActivity(`[browser-verification] finished browser verification for task ${task.id}: malformed output`);
@@ -184333,16 +184520,18 @@ Review the work done in this worktree and evaluate it against the criteria in yo
184333
184520
  }
184334
184521
  };
184335
184522
  const primaryOutcome = await runOnce(primaryProvider, primaryModelId, "primary");
184336
- if (!primaryOutcome.timedOut) return primaryOutcome;
184523
+ const primaryMalformed = primaryOutcome.malformed === true;
184524
+ if (!primaryOutcome.timedOut && !primaryMalformed) return primaryOutcome;
184337
184525
  if (!fallback2) {
184338
- executorLog.warn(`${task.id}: workflow step '${workflowStep.name}' timed out and no fallback model is configured`);
184526
+ const reason = primaryOutcome.timedOut ? "timed out" : "produced malformed output";
184527
+ executorLog.warn(`${task.id}: workflow step '${workflowStep.name}' ${reason} and no fallback model is configured`);
184339
184528
  await this.store.logEntry(
184340
184529
  task.id,
184341
- `Workflow step '${workflowStep.name}' timed out \u2014 no fallback model configured (set settings.validatorFallbackProvider/Id or fallbackProvider/Id)`
184530
+ `Workflow step '${workflowStep.name}' ${reason} \u2014 no fallback model configured (set settings.validatorFallbackProvider/Id or fallbackProvider/Id)`
184342
184531
  );
184343
184532
  return primaryOutcome;
184344
184533
  }
184345
- executorLog.log(`${task.id}: retrying workflow step '${workflowStep.name}' with fallback ${fallback2.provider}/${fallback2.modelId} (label=${fallback2.label})`);
184534
+ executorLog.log(`${task.id}: retrying workflow step '${workflowStep.name}' with fallback ${fallback2.provider}/${fallback2.modelId} (label=${fallback2.label}) after primary ${primaryOutcome.timedOut ? "timeout" : "malformed output"}`);
184346
184535
  return runOnce(fallback2.provider, fallback2.modelId, "fallback");
184347
184536
  }
184348
184537
  MAX_WORKTREE_RETRIES = 3;
@@ -238005,7 +238194,7 @@ var init_task_planner_chat_context = __esm({
238005
238194
  DEFAULT_STEP_LIMIT = 20;
238006
238195
  DEFAULT_DEPENDENCY_LIMIT = 20;
238007
238196
  TASK_PLANNER_CHAT_CONTEXT_PROMPT_GUIDANCE = `## Task Planner Chat Context
238008
- You are answering in the task detail Chat tab for a single Fusion task. Use the bounded server-supplied context below to answer questions about current status, progress, dependencies, recent activity, source/review state, and the task prompt or plan. For token counts, cost, runtime, elapsed/wall-clock duration, timing events, workflow-step duration, or per-model usage, call \`fn_task_planner_get_task_metrics\` and answer from the tool result; state when pricing is unavailable/stale or metrics are missing instead of inventing values. State uncertainty when a section is absent, stale, truncated, or marked unavailable. Do not claim you ran code, tests, builds, or inspected files unless the supplied context or explicit tool output says so. Keep Activity separate from Chat: Activity is the execution/steering transcript, while this Chat reply is a planner conversation. Do not mutate steering comments for ordinary status/progress/metrics questions.`;
238197
+ You are answering in the task detail Chat tab for a single Fusion task. Use the bounded server-supplied context below to answer questions about current status, progress, dependencies, recent activity, source/review state, and the task prompt or plan. For token counts, cost, runtime, elapsed/wall-clock duration, timing events, workflow-step duration, or per-model usage, call \`fn_task_planner_get_task_metrics\` and answer from the tool result; state when pricing is unavailable/stale or metrics are missing instead of inventing values. State uncertainty when a section is absent, stale, truncated, or marked unavailable. Do not claim you ran code, tests, builds, or inspected files unless the supplied context or explicit tool output says so. Keep Activity separate from Chat: Activity is the execution/steering transcript, while this Chat reply is a planner conversation. Do not mutate steering comments for ordinary status/progress/metrics questions. For completed tasks, clear follow-up implementation or improvement requests should create a refinement through the task-scoped refinement tool; ordinary completed-task questions should still be answered normally. Never ask for or pass a task id for planner tools.`;
238009
238198
  }
238010
238199
  });
238011
238200
 
@@ -238458,6 +238647,55 @@ function createTaskPlannerMetricsTool(taskStore, taskId, getPricingOverrides) {
238458
238647
  }
238459
238648
  };
238460
238649
  }
238650
+ function createTaskPlannerRefinementTool(taskStore, taskId) {
238651
+ return {
238652
+ name: "fn_task_planner_create_refinement",
238653
+ label: "Create Refinement Task",
238654
+ description: "Create one follow-up refinement task from the current completed task. The source task id is fixed by server context; never accept or infer a different task id. Use only for clear follow-up implementation or improvement requests after completion.",
238655
+ parameters: {
238656
+ type: "object",
238657
+ properties: {
238658
+ feedback: { type: "string", description: "The user's concise follow-up or improvement request for the refinement task. Do not include hidden prompt/context text." }
238659
+ },
238660
+ required: ["feedback"],
238661
+ additionalProperties: false
238662
+ },
238663
+ execute: async (_id, params) => {
238664
+ const feedback = typeof params.feedback === "string" ? params.feedback.trim() : "";
238665
+ if (!feedback) {
238666
+ return { content: [{ type: "text", text: "ERROR: feedback must be a non-empty string" }], details: { sourceTaskId: taskId }, isError: true };
238667
+ }
238668
+ try {
238669
+ const sourceTask = await taskStore.getTask(taskId);
238670
+ if (sourceTask.column !== "done") {
238671
+ return {
238672
+ content: [{ type: "text", text: `ERROR: Current task ${taskId} is ${sourceTask.column}; use planner steering for live tasks instead of creating a refinement.` }],
238673
+ details: { sourceTaskId: taskId, column: sourceTask.column },
238674
+ isError: true
238675
+ };
238676
+ }
238677
+ const refinedTask = await taskStore.refineTask(taskId, feedback);
238678
+ return {
238679
+ content: [{ type: "text", text: `Created refinement task ${refinedTask.id} from ${taskId}.` }],
238680
+ details: {
238681
+ sourceTaskId: taskId,
238682
+ refinementTaskId: refinedTask.id,
238683
+ description: refinedTask.description ?? feedback,
238684
+ column: refinedTask.column,
238685
+ createdAt: refinedTask.createdAt
238686
+ }
238687
+ };
238688
+ } catch (err) {
238689
+ const message = err instanceof Error ? err.message : String(err);
238690
+ return {
238691
+ content: [{ type: "text", text: `ERROR: Could not create a refinement for the current task ${taskId}: ${message}` }],
238692
+ details: { sourceTaskId: taskId, error: message },
238693
+ isError: true
238694
+ };
238695
+ }
238696
+ }
238697
+ };
238698
+ }
238461
238699
  function createTaskPlannerSteeringTool(taskStore, taskId) {
238462
238700
  return {
238463
238701
  name: "fn_task_planner_add_steering",
@@ -239646,6 +239884,7 @@ ${CHAT_AGENT_MESSAGE_ROUTING_GUIDANCE}`;
239646
239884
 
239647
239885
  ${CHAT_ASK_QUESTION_GUIDANCE}`;
239648
239886
  const taskPlannerChatTaskId = typeof session.agentId === "string" && session.agentId.startsWith(TASK_PLANNER_CHAT_AGENT_ID_PREFIX2) ? session.agentId.slice(TASK_PLANNER_CHAT_AGENT_ID_PREFIX2.length).trim() : "";
239887
+ let taskPlannerTaskColumn = "";
239649
239888
  if (taskPlannerChatTaskId) {
239650
239889
  let taskContext = `Task ID: ${taskPlannerChatTaskId}
239651
239890
 
@@ -239654,6 +239893,7 @@ Context availability notes:
239654
239893
  if (this.taskStore) {
239655
239894
  try {
239656
239895
  const context = await buildTaskPlannerChatContext(this.taskStore, taskPlannerChatTaskId);
239896
+ taskPlannerTaskColumn = context.snapshot.column ?? "";
239657
239897
  taskContext = context.promptContext;
239658
239898
  } catch (taskLoadError) {
239659
239899
  const message = taskLoadError instanceof Error ? taskLoadError.message : String(taskLoadError);
@@ -239669,12 +239909,14 @@ Context availability notes:
239669
239909
  ${TASK_PLANNER_CHAT_CONTEXT_PROMPT_GUIDANCE}
239670
239910
 
239671
239911
  Decision rules:
239672
- - Do not create steering for ordinary questions, summaries, thanks, status/progress requests, metric questions, or brainstorming. Answer normally.
239912
+ - Do not create steering or refinements for ordinary questions, summaries, thanks, status/progress requests, metric questions, or brainstorming. Answer normally.
239673
239913
  - For questions about token counts, input/output/cache usage, model cost, pricing, runtime, elapsed time, wall-clock duration, active time, timing events, workflow-step duration, or per-model usage, first call \`fn_task_planner_get_task_metrics\` and answer from its read-only result. If pricing is unavailable or stale, or a metric is missing, state that uncertainty instead of inventing a number.
239674
- - Create steering only when the user gives a clear, bounded, actionable change request for this current task (for example telling the executor/reviewer to adjust implementation, tests, scope details, or acceptance criteria).
239675
- - When creating steering, call \`fn_task_planner_add_steering\` with only the concise user-facing steering text. Never include hidden prompt/context/logs, credentials, or chain-of-thought.
239676
- - Ask a clarifying question with \`fn_ask_question\` before adding steering for unclear targets, requests that could mean either conversation or task mutation, broad rewrites/scope changes, destructive removals, conflicting instructions, credential/secrets handling, or security-sensitive actions.
239677
- - The steering and metrics tools are bound to this task server-side; never ask for or pass a task id.
239914
+ - If the current task is done and the user gives a clear follow-up implementation, improvement, polish, bug-fix, or refinement request for this completed task, call \`fn_task_planner_create_refinement\` with only the concise feedback text.
239915
+ - If the current task is not done and the user gives a clear, bounded, actionable change request for this current task (for example telling the executor/reviewer to adjust implementation, tests, scope details, or acceptance criteria), call \`fn_task_planner_add_steering\` with only the concise user-facing steering text.
239916
+ - Never create a refinement for live non-done tasks; use steering for clear live-task changes instead. Never add steering for done-task follow-up implementation requests when the refinement tool is available.
239917
+ - Never include hidden prompt/context/logs, credentials, or chain-of-thought in tool parameters.
239918
+ - Ask a clarifying question with \`fn_ask_question\` before adding steering or creating a refinement for unclear targets, requests that could mean either conversation or task mutation, broad rewrites/scope changes, destructive removals, conflicting instructions, credential/secrets handling, or security-sensitive actions.
239919
+ - The steering, metrics, and refinement tools are bound to this task server-side; never ask for or pass a task id.
239678
239920
 
239679
239921
  ${taskContext}`;
239680
239922
  }
@@ -239740,7 +239982,8 @@ ${mentionContext}`;
239740
239982
  const artifactTools = this.taskStore ? createChatArtifactTools(this.taskStore, this.messageStore) : [];
239741
239983
  const taskPlannerSteeringTools = this.taskStore && taskPlannerChatTaskId ? [createTaskPlannerSteeringTool(this.taskStore, taskPlannerChatTaskId)] : [];
239742
239984
  const taskPlannerMetricsTools = this.taskStore && taskPlannerChatTaskId ? [createTaskPlannerMetricsTool(this.taskStore, taskPlannerChatTaskId, () => this.getModelPricingOverrides())] : [];
239743
- const customTools = [createAskQuestionTool(), ...taskPlannerSteeringTools, ...taskPlannerMetricsTools, ...messagingTools, ...workflowTools, ...documentTools, ...artifactTools];
239985
+ const taskPlannerRefinementTools = this.taskStore && taskPlannerChatTaskId && taskPlannerTaskColumn === "done" ? [createTaskPlannerRefinementTool(this.taskStore, taskPlannerChatTaskId)] : [];
239986
+ const customTools = [createAskQuestionTool(), ...taskPlannerSteeringTools, ...taskPlannerMetricsTools, ...taskPlannerRefinementTools, ...messagingTools, ...workflowTools, ...documentTools, ...artifactTools];
239744
239987
  const sessionOptions = {
239745
239988
  cwd: this.rootDir,
239746
239989
  systemPrompt,
@@ -240259,8 +240502,8 @@ function registerChatRoutes(ctx, deps) {
240259
240502
  res.json({ session: session2 });
240260
240503
  return;
240261
240504
  }
240262
- if (task.column === "done" || task.column === "archived") {
240263
- throw badRequest(`Task ${task.id} is ${task.column}; planner chat can only be started while a task is live`);
240505
+ if (task.column === "archived") {
240506
+ throw badRequest(`Task ${task.id} is archived; planner chat cannot be started for archived tasks`);
240264
240507
  }
240265
240508
  const session = chatStore.createSession({
240266
240509
  agentId,
@@ -292908,7 +293151,7 @@ var init_src8 = __esm({
292908
293151
  }
292909
293152
  });
292910
293153
 
292911
- // ../../plugins/fusion-plugin-paperclip-runtime/dist/paperclip-client.js
293154
+ // ../../plugins/fusion-plugin-paperclip-runtime/src/paperclip-client.ts
292912
293155
  function normalizeApiUrl(url2) {
292913
293156
  return url2.replace(/\/+$/, "");
292914
293157
  }
@@ -292936,19 +293179,18 @@ async function parseJsonBody(response) {
292936
293179
  try {
292937
293180
  return { value: JSON.parse(raw), raw };
292938
293181
  } catch {
292939
- throw new Error(`Paperclip API ${response.status} ${response.statusText}: invalid JSON response body`);
293182
+ throw new Error(
293183
+ `Paperclip API ${response.status} ${response.statusText}: invalid JSON response body`
293184
+ );
292940
293185
  }
292941
293186
  }
292942
293187
  function toErrorMessage2(status, statusText, body, raw) {
292943
293188
  if (body && typeof body === "object") {
292944
293189
  const b2 = body;
292945
- if (typeof b2.error === "string")
292946
- return b2.error;
292947
- if (typeof b2.message === "string")
292948
- return b2.message;
293190
+ if (typeof b2.error === "string") return b2.error;
293191
+ if (typeof b2.message === "string") return b2.message;
292949
293192
  }
292950
- if (raw.trim() !== "")
292951
- return raw.slice(0, 200).trim();
293193
+ if (raw.trim() !== "") return raw.slice(0, 200).trim();
292952
293194
  return `${status} ${statusText}`.trim();
292953
293195
  }
292954
293196
  async function request2(apiUrl, path10, options) {
@@ -292971,8 +293213,7 @@ async function request2(apiUrl, path10, options) {
292971
293213
  if (!response.ok) {
292972
293214
  const msg = toErrorMessage2(response.status, response.statusText, value, raw);
292973
293215
  const full = `Paperclip API ${response.status} (${method} ${path10}): ${msg}`;
292974
- if (response.status === 409)
292975
- throw new ConflictError(full);
293216
+ if (response.status === 409) throw new ConflictError(full);
292976
293217
  throw new Error(full);
292977
293218
  }
292978
293219
  return value;
@@ -292982,7 +293223,9 @@ function getSettingString(settings, key) {
292982
293223
  return typeof v2 === "string" && v2.trim() !== "" ? v2.trim() : void 0;
292983
293224
  }
292984
293225
  function resolvePaperclipConfig(settings) {
292985
- const apiUrl = normalizeApiUrl(getSettingString(settings, "apiUrl") ?? process.env.PAPERCLIP_API_URL?.trim() ?? "http://localhost:3100");
293226
+ const apiUrl = normalizeApiUrl(
293227
+ getSettingString(settings, "apiUrl") ?? process.env.PAPERCLIP_API_URL?.trim() ?? "http://localhost:3100"
293228
+ );
292986
293229
  const apiKey = getSettingString(settings, "apiKey") ?? (process.env.PAPERCLIP_API_KEY?.trim() || void 0);
292987
293230
  const agentId = getSettingString(settings, "agentId") ?? process.env.PAPERCLIP_AGENT_ID?.trim() ?? void 0;
292988
293231
  const companyId = getSettingString(settings, "companyId") ?? process.env.PAPERCLIP_COMPANY_ID?.trim() ?? void 0;
@@ -292994,9 +293237,18 @@ function resolvePaperclipConfig(settings) {
292994
293237
  const parentIssueId = getSettingString(settings, "parentIssueId") ?? process.env.PAPERCLIP_PARENT_ISSUE_ID?.trim() ?? void 0;
292995
293238
  const projectId = getSettingString(settings, "projectId") ?? process.env.PAPERCLIP_PROJECT_ID?.trim() ?? void 0;
292996
293239
  const goalId = getSettingString(settings, "goalId") ?? process.env.PAPERCLIP_GOAL_ID?.trim() ?? void 0;
292997
- const runTimeoutMs = parseInt(getSettingString(settings, "runTimeoutMs") ?? process.env.PAPERCLIP_RUN_TIMEOUT_MS ?? "600000", 10);
292998
- const pollIntervalMs = parseInt(getSettingString(settings, "pollIntervalMs") ?? process.env.PAPERCLIP_POLL_INTERVAL_MS ?? "500", 10);
292999
- const pollIntervalMaxMs = parseInt(getSettingString(settings, "pollIntervalMaxMs") ?? process.env.PAPERCLIP_POLL_INTERVAL_MAX_MS ?? "2000", 10);
293240
+ const runTimeoutMs = parseInt(
293241
+ getSettingString(settings, "runTimeoutMs") ?? process.env.PAPERCLIP_RUN_TIMEOUT_MS ?? "600000",
293242
+ 10
293243
+ );
293244
+ const pollIntervalMs = parseInt(
293245
+ getSettingString(settings, "pollIntervalMs") ?? process.env.PAPERCLIP_POLL_INTERVAL_MS ?? "500",
293246
+ 10
293247
+ );
293248
+ const pollIntervalMaxMs = parseInt(
293249
+ getSettingString(settings, "pollIntervalMaxMs") ?? process.env.PAPERCLIP_POLL_INTERVAL_MAX_MS ?? "2000",
293250
+ 10
293251
+ );
293000
293252
  return {
293001
293253
  apiUrl,
293002
293254
  apiKey,
@@ -293089,25 +293341,20 @@ async function getRunEvents(apiUrl, apiKey, runId, afterSeq, limit = 100) {
293089
293341
  apiKey,
293090
293342
  query
293091
293343
  });
293092
- if (Array.isArray(result))
293093
- return result;
293344
+ if (Array.isArray(result)) return result;
293094
293345
  const r = result;
293095
- if (Array.isArray(r.events))
293096
- return r.events;
293346
+ if (Array.isArray(r.events)) return r.events;
293097
293347
  return [];
293098
293348
  }
293099
293349
  async function listCompanies(apiUrl, apiKey) {
293100
293350
  const raw = await request2(apiUrl, "/companies", { apiKey });
293101
- if (!Array.isArray(raw))
293102
- return [];
293351
+ if (!Array.isArray(raw)) return [];
293103
293352
  const out = [];
293104
293353
  for (const entry of raw) {
293105
- if (!entry || typeof entry !== "object")
293106
- continue;
293354
+ if (!entry || typeof entry !== "object") continue;
293107
293355
  const r = entry;
293108
293356
  const id = typeof r.id === "string" ? r.id : void 0;
293109
- if (!id)
293110
- continue;
293357
+ if (!id) continue;
293111
293358
  const name = typeof r.name === "string" ? r.name : id;
293112
293359
  const urlKey = typeof r.urlKey === "string" ? r.urlKey : typeof r.slug === "string" ? r.slug : void 0;
293113
293360
  out.push({ id, name, urlKey });
@@ -293116,16 +293363,13 @@ async function listCompanies(apiUrl, apiKey) {
293116
293363
  }
293117
293364
  async function listCompanyAgents(apiUrl, apiKey, companyId) {
293118
293365
  const raw = await request2(apiUrl, `/companies/${companyId}/agents`, { apiKey });
293119
- if (!Array.isArray(raw))
293120
- return [];
293366
+ if (!Array.isArray(raw)) return [];
293121
293367
  const out = [];
293122
293368
  for (const entry of raw) {
293123
- if (!entry || typeof entry !== "object")
293124
- continue;
293369
+ if (!entry || typeof entry !== "object") continue;
293125
293370
  const r = entry;
293126
293371
  const id = typeof r.id === "string" ? r.id : void 0;
293127
- if (!id)
293128
- continue;
293372
+ if (!id) continue;
293129
293373
  const name = typeof r.name === "string" ? r.name : id;
293130
293374
  const role = typeof r.role === "string" ? r.role : void 0;
293131
293375
  const cId = typeof r.companyId === "string" ? r.companyId : companyId;
@@ -293235,7 +293479,11 @@ async function mintAgentApiKeyViaCli(opts) {
293235
293479
  } catch (err) {
293236
293480
  const code = err.code;
293237
293481
  if (code === "ENOENT") {
293238
- reject2(new Error(`paperclipai binary not found at ${bin}; install via \`npm i -g paperclipai\``));
293482
+ reject2(
293483
+ new Error(
293484
+ `paperclipai binary not found at ${bin}; install via \`npm i -g paperclipai\``
293485
+ )
293486
+ );
293239
293487
  } else {
293240
293488
  reject2(err instanceof Error ? err : new Error(String(err)));
293241
293489
  }
@@ -293256,22 +293504,24 @@ async function mintAgentApiKeyViaCli(opts) {
293256
293504
  const lines = chunk.toString("utf-8").split("\n");
293257
293505
  for (const line of lines) {
293258
293506
  const stripped = stripAnsi2(line).trim();
293259
- if (stripped)
293260
- stderrLines.push(stripped);
293507
+ if (stripped) stderrLines.push(stripped);
293261
293508
  }
293262
293509
  });
293263
293510
  child.on("error", (err) => {
293264
293511
  clearTimeout(timer);
293265
293512
  if (err.code === "ENOENT") {
293266
- reject2(new Error(`paperclipai binary not found at ${bin}; install via \`npm i -g paperclipai\``));
293513
+ reject2(
293514
+ new Error(
293515
+ `paperclipai binary not found at ${bin}; install via \`npm i -g paperclipai\``
293516
+ )
293517
+ );
293267
293518
  } else {
293268
293519
  reject2(err);
293269
293520
  }
293270
293521
  });
293271
293522
  child.on("close", (code) => {
293272
293523
  clearTimeout(timer);
293273
- if (killed)
293274
- return;
293524
+ if (killed) return;
293275
293525
  const rawStdout = Buffer.concat(stdoutChunks).toString("utf-8");
293276
293526
  const cleanedStdout = stripAnsi2(rawStdout).trim();
293277
293527
  if (code !== 0) {
@@ -293283,20 +293533,30 @@ async function mintAgentApiKeyViaCli(opts) {
293283
293533
  }
293284
293534
  if (!cleanedStdout) {
293285
293535
  const hint = "run `paperclipai onboard` to authenticate the CLI";
293286
- reject2(new Error(`paperclipai agent local-cli produced no output \u2014 ${hint}`));
293536
+ reject2(
293537
+ new Error(`paperclipai agent local-cli produced no output \u2014 ${hint}`)
293538
+ );
293287
293539
  return;
293288
293540
  }
293289
293541
  let parsed;
293290
293542
  try {
293291
293543
  parsed = JSON.parse(cleanedStdout);
293292
293544
  } catch {
293293
- reject2(new Error(`paperclipai agent local-cli returned non-JSON output: ${cleanedStdout.slice(0, 200)}`));
293545
+ reject2(
293546
+ new Error(
293547
+ `paperclipai agent local-cli returned non-JSON output: ${cleanedStdout.slice(0, 200)}`
293548
+ )
293549
+ );
293294
293550
  return;
293295
293551
  }
293296
293552
  const r = parsed;
293297
293553
  const apiKey = (typeof r.apiKey === "string" ? r.apiKey : void 0) ?? (typeof r.api_key === "string" ? r.api_key : void 0) ?? (typeof r.token === "string" ? r.token : void 0);
293298
293554
  if (!apiKey) {
293299
- reject2(new Error(`paperclipai agent local-cli JSON missing apiKey/api_key/token field: ${cleanedStdout.slice(0, 200)}`));
293555
+ reject2(
293556
+ new Error(
293557
+ `paperclipai agent local-cli JSON missing apiKey/api_key/token field: ${cleanedStdout.slice(0, 200)}`
293558
+ )
293559
+ );
293300
293560
  return;
293301
293561
  }
293302
293562
  const apiBase = (typeof r.apiBase === "string" ? r.apiBase : void 0) ?? (typeof r.api_base === "string" ? r.api_base : void 0);
@@ -293309,7 +293569,9 @@ async function mintAgentApiKeyViaCli(opts) {
293309
293569
  function remapSpawnError(err, bin) {
293310
293570
  const code = err?.code;
293311
293571
  if (code === "ENOENT") {
293312
- return new Error(`paperclipai binary not found at ${bin}; install via \`npm i -g paperclipai\``);
293572
+ return new Error(
293573
+ `paperclipai binary not found at ${bin}; install via \`npm i -g paperclipai\``
293574
+ );
293313
293575
  }
293314
293576
  return err instanceof Error ? err : new Error(String(err));
293315
293577
  }
@@ -293345,8 +293607,7 @@ async function spawnPaperclipCliJson(args, opts) {
293345
293607
  const lines = chunk.toString("utf-8").split("\n");
293346
293608
  for (const line of lines) {
293347
293609
  const stripped = stripAnsi2(line).trim();
293348
- if (stripped)
293349
- stderrLines.push(stripped);
293610
+ if (stripped) stderrLines.push(stripped);
293350
293611
  }
293351
293612
  });
293352
293613
  child.on("error", (err) => {
@@ -293355,12 +293616,17 @@ async function spawnPaperclipCliJson(args, opts) {
293355
293616
  });
293356
293617
  child.on("close", (code) => {
293357
293618
  clearTimeout(timer);
293358
- if (killed)
293359
- return;
293360
- const cleaned = stripAnsi2(Buffer.concat(stdoutChunks).toString("utf-8")).trim();
293619
+ if (killed) return;
293620
+ const cleaned = stripAnsi2(
293621
+ Buffer.concat(stdoutChunks).toString("utf-8")
293622
+ ).trim();
293361
293623
  if (code !== 0) {
293362
293624
  const lastErr = stderrLines.filter(Boolean).pop() ?? "";
293363
- reject2(new Error(lastErr ? `${label} exited ${code}: ${lastErr}` : `${label} exited ${code}`));
293625
+ reject2(
293626
+ new Error(
293627
+ lastErr ? `${label} exited ${code}: ${lastErr}` : `${label} exited ${code}`
293628
+ )
293629
+ );
293364
293630
  return;
293365
293631
  }
293366
293632
  if (!cleaned) {
@@ -293370,23 +293636,22 @@ async function spawnPaperclipCliJson(args, opts) {
293370
293636
  try {
293371
293637
  resolve75(JSON.parse(cleaned));
293372
293638
  } catch {
293373
- reject2(new Error(`${label} returned non-JSON output: ${cleaned.slice(0, 200)}`));
293639
+ reject2(
293640
+ new Error(`${label} returned non-JSON output: ${cleaned.slice(0, 200)}`)
293641
+ );
293374
293642
  }
293375
293643
  });
293376
293644
  });
293377
293645
  }
293378
293646
  async function listCompaniesViaCli(opts) {
293379
293647
  const raw = await spawnPaperclipCliJson(["company", "list"], opts);
293380
- if (!Array.isArray(raw))
293381
- return [];
293648
+ if (!Array.isArray(raw)) return [];
293382
293649
  const out = [];
293383
293650
  for (const entry of raw) {
293384
- if (!entry || typeof entry !== "object")
293385
- continue;
293651
+ if (!entry || typeof entry !== "object") continue;
293386
293652
  const r = entry;
293387
293653
  const id = typeof r.id === "string" ? r.id : void 0;
293388
- if (!id)
293389
- continue;
293654
+ if (!id) continue;
293390
293655
  const name = typeof r.name === "string" ? r.name : id;
293391
293656
  const urlKey = typeof r.urlKey === "string" ? r.urlKey : typeof r.slug === "string" ? r.slug : void 0;
293392
293657
  out.push({ id, name, urlKey });
@@ -293394,17 +293659,17 @@ async function listCompaniesViaCli(opts) {
293394
293659
  return out;
293395
293660
  }
293396
293661
  async function listCompanyAgentsViaCli(opts) {
293397
- const raw = await spawnPaperclipCliJson(["agent", "list", "--company-id", opts.companyId], opts);
293398
- if (!Array.isArray(raw))
293399
- return [];
293662
+ const raw = await spawnPaperclipCliJson(
293663
+ ["agent", "list", "--company-id", opts.companyId],
293664
+ opts
293665
+ );
293666
+ if (!Array.isArray(raw)) return [];
293400
293667
  const out = [];
293401
293668
  for (const entry of raw) {
293402
- if (!entry || typeof entry !== "object")
293403
- continue;
293669
+ if (!entry || typeof entry !== "object") continue;
293404
293670
  const r = entry;
293405
293671
  const id = typeof r.id === "string" ? r.id : void 0;
293406
- if (!id)
293407
- continue;
293672
+ if (!id) continue;
293408
293673
  const name = typeof r.name === "string" ? r.name : id;
293409
293674
  const role = typeof r.role === "string" ? r.role : void 0;
293410
293675
  const cId = typeof r.companyId === "string" ? r.companyId : opts.companyId;
@@ -293416,40 +293681,49 @@ async function listCompanyAgentsViaCli(opts) {
293416
293681
  async function createIssueViaCli(opts) {
293417
293682
  const args = ["issue", "create", "--company-id", opts.companyId];
293418
293683
  args.push("--title", opts.body.title);
293419
- if (opts.body.description)
293420
- args.push("--description", opts.body.description);
293421
- if (opts.body.status)
293422
- args.push("--status", opts.body.status);
293684
+ if (opts.body.description) args.push("--description", opts.body.description);
293685
+ if (opts.body.status) args.push("--status", opts.body.status);
293423
293686
  if (opts.body.assigneeAgentId)
293424
293687
  args.push("--assignee-agent-id", opts.body.assigneeAgentId);
293425
- if (opts.body.parentId)
293426
- args.push("--parent-id", opts.body.parentId);
293427
- if (opts.body.projectId)
293428
- args.push("--project-id", opts.body.projectId);
293429
- if (opts.body.goalId)
293430
- args.push("--goal-id", opts.body.goalId);
293688
+ if (opts.body.parentId) args.push("--parent-id", opts.body.parentId);
293689
+ if (opts.body.projectId) args.push("--project-id", opts.body.projectId);
293690
+ if (opts.body.goalId) args.push("--goal-id", opts.body.goalId);
293431
293691
  const raw = await spawnPaperclipCliJson(args, opts);
293432
293692
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
293433
- throw new Error(`paperclipai issue create returned unexpected payload: ${JSON.stringify(raw).slice(0, 200)}`);
293693
+ throw new Error(
293694
+ `paperclipai issue create returned unexpected payload: ${JSON.stringify(raw).slice(0, 200)}`
293695
+ );
293434
293696
  }
293435
293697
  return raw;
293436
293698
  }
293437
293699
  async function getIssueViaCli(opts) {
293438
- const raw = await spawnPaperclipCliJson(["issue", "get", opts.issueId], opts);
293700
+ const raw = await spawnPaperclipCliJson(
293701
+ ["issue", "get", opts.issueId],
293702
+ opts
293703
+ );
293439
293704
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
293440
- throw new Error(`paperclipai issue get returned unexpected payload: ${JSON.stringify(raw).slice(0, 200)}`);
293705
+ throw new Error(
293706
+ `paperclipai issue get returned unexpected payload: ${JSON.stringify(raw).slice(0, 200)}`
293707
+ );
293441
293708
  }
293442
293709
  return raw;
293443
293710
  }
293444
293711
  async function agentsMeViaCli(opts) {
293445
- const raw = await spawnPaperclipCliJson(["agent", "get", opts.agentId], opts);
293712
+ const raw = await spawnPaperclipCliJson(
293713
+ ["agent", "get", opts.agentId],
293714
+ opts
293715
+ );
293446
293716
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
293447
- throw new Error(`paperclipai agent get returned unexpected payload: ${JSON.stringify(raw).slice(0, 200)}`);
293717
+ throw new Error(
293718
+ `paperclipai agent get returned unexpected payload: ${JSON.stringify(raw).slice(0, 200)}`
293719
+ );
293448
293720
  }
293449
293721
  const id = typeof raw.id === "string" ? raw.id : void 0;
293450
293722
  const cId = typeof raw.companyId === "string" ? raw.companyId : void 0;
293451
293723
  if (!id || !cId) {
293452
- throw new Error("paperclipai agent get returned a response missing `id` or `companyId`");
293724
+ throw new Error(
293725
+ "paperclipai agent get returned a response missing `id` or `companyId`"
293726
+ );
293453
293727
  }
293454
293728
  return {
293455
293729
  agentId: id,
@@ -293464,8 +293738,7 @@ async function probePaperclipViaCli(opts) {
293464
293738
  let apiUrl = "(via paperclipai CLI)";
293465
293739
  try {
293466
293740
  const disc = await discoverPaperclipCliConfig({ configPath: opts.cliConfigPath });
293467
- if (disc.ok)
293468
- apiUrl = disc.apiUrl;
293741
+ if (disc.ok) apiUrl = disc.apiUrl;
293469
293742
  } catch {
293470
293743
  }
293471
293744
  try {
@@ -293482,7 +293755,7 @@ async function probePaperclipViaCli(opts) {
293482
293755
  }
293483
293756
  var ConflictError;
293484
293757
  var init_paperclip_client = __esm({
293485
- "../../plugins/fusion-plugin-paperclip-runtime/dist/paperclip-client.js"() {
293758
+ "../../plugins/fusion-plugin-paperclip-runtime/src/paperclip-client.ts"() {
293486
293759
  "use strict";
293487
293760
  ConflictError = class extends Error {
293488
293761
  status = 409;
@@ -293494,7 +293767,7 @@ var init_paperclip_client = __esm({
293494
293767
  }
293495
293768
  });
293496
293769
 
293497
- // ../../plugins/fusion-plugin-paperclip-runtime/dist/runtime-adapter.js
293770
+ // ../../plugins/fusion-plugin-paperclip-runtime/src/runtime-adapter.ts
293498
293771
  import { randomUUID as randomUUID36 } from "node:crypto";
293499
293772
  function sleep6(ms2) {
293500
293773
  return new Promise((resolve75) => setTimeout(resolve75, ms2));
@@ -293523,22 +293796,20 @@ function pickIssueId(issue2) {
293523
293796
  return issueId;
293524
293797
  }
293525
293798
  function normalizeMode3(mode) {
293526
- if (mode && VALID_MODES2.has(mode))
293527
- return mode;
293799
+ if (mode && VALID_MODES2.has(mode)) return mode;
293528
293800
  return "rolling-issue";
293529
293801
  }
293530
293802
  function pickLatestVisibleComment(comments) {
293531
293803
  for (let i = comments.length - 1; i >= 0; i--) {
293532
293804
  const c = comments[i];
293533
293805
  const body = asString3(c.body)?.trim();
293534
- if (body)
293535
- return body;
293806
+ if (body) return body;
293536
293807
  }
293537
293808
  return void 0;
293538
293809
  }
293539
293810
  var TERMINAL_RUN_STATUSES2, VALID_MODES2, PaperclipRuntimeAdapter;
293540
293811
  var init_runtime_adapter4 = __esm({
293541
- "../../plugins/fusion-plugin-paperclip-runtime/dist/runtime-adapter.js"() {
293812
+ "../../plugins/fusion-plugin-paperclip-runtime/src/runtime-adapter.ts"() {
293542
293813
  "use strict";
293543
293814
  init_paperclip_client();
293544
293815
  TERMINAL_RUN_STATUSES2 = /* @__PURE__ */ new Set([
@@ -293558,7 +293829,9 @@ var init_runtime_adapter4 = __esm({
293558
293829
  config;
293559
293830
  logger;
293560
293831
  constructor(config2, logger3) {
293561
- const resolved = resolvePaperclipConfig(config2);
293832
+ const resolved = resolvePaperclipConfig(
293833
+ config2
293834
+ );
293562
293835
  this.config = {
293563
293836
  ...resolved,
293564
293837
  mode: normalizeMode3(resolved.mode),
@@ -293574,13 +293847,17 @@ var init_runtime_adapter4 = __esm({
293574
293847
  configPath: this.config.cliConfigPath
293575
293848
  });
293576
293849
  if (!discovery.ok) {
293577
- throw new Error(`Paperclip CLI mode failed: ${discovery.reason} (Switch to API mode in settings if paperclipai isn't installed.)`);
293850
+ throw new Error(
293851
+ `Paperclip CLI mode failed: ${discovery.reason} (Switch to API mode in settings if paperclipai isn't installed.)`
293852
+ );
293578
293853
  }
293579
293854
  effectiveApiUrl = discovery.apiUrl;
293580
293855
  if (!effectiveApiKey) {
293581
293856
  effectiveApiKey = discovery.apiKey;
293582
293857
  }
293583
- this.logger.info(`Paperclip CLI mode resolved apiUrl=${effectiveApiUrl} (deploymentMode=${discovery.deploymentMode ?? "unknown"})`);
293858
+ this.logger.info(
293859
+ `Paperclip CLI mode resolved apiUrl=${effectiveApiUrl} (deploymentMode=${discovery.deploymentMode ?? "unknown"})`
293860
+ );
293584
293861
  }
293585
293862
  let agentId = this.config.agentId;
293586
293863
  let companyId = this.config.companyId;
@@ -293588,7 +293865,9 @@ var init_runtime_adapter4 = __esm({
293588
293865
  try {
293589
293866
  if (this.config.transport === "cli") {
293590
293867
  if (!agentId) {
293591
- throw new Error("agentId is required in Local CLI mode (paperclipai has no `agents/me` equivalent \u2014 pick an agent in settings)");
293868
+ throw new Error(
293869
+ "agentId is required in Local CLI mode (paperclipai has no `agents/me` equivalent \u2014 pick an agent in settings)"
293870
+ );
293592
293871
  }
293593
293872
  const me2 = await agentsMeViaCli({
293594
293873
  agentId,
@@ -293603,11 +293882,15 @@ var init_runtime_adapter4 = __esm({
293603
293882
  }
293604
293883
  } catch (error2) {
293605
293884
  const reason = error2 instanceof Error ? error2.message : String(error2);
293606
- throw new Error(`Paperclip runtime could not derive agentId/companyId. Configure them explicitly or check the API key / CLI auth. Underlying error: ${reason}`);
293885
+ throw new Error(
293886
+ `Paperclip runtime could not derive agentId/companyId. Configure them explicitly or check the API key / CLI auth. Underlying error: ${reason}`
293887
+ );
293607
293888
  }
293608
293889
  }
293609
293890
  if (!agentId || !companyId) {
293610
- throw new Error("Paperclip runtime is missing required config: agentId or companyId. Configure plugin settings (apiUrl, apiKey, agentId, companyId) or PAPERCLIP_* env vars.");
293891
+ throw new Error(
293892
+ "Paperclip runtime is missing required config: agentId or companyId. Configure plugin settings (apiUrl, apiKey, agentId, companyId) or PAPERCLIP_* env vars."
293893
+ );
293611
293894
  }
293612
293895
  const session = {
293613
293896
  apiUrl: effectiveApiUrl,
@@ -293704,18 +293987,15 @@ var init_runtime_adapter4 = __esm({
293704
293987
  if (!finalText) {
293705
293988
  const comments = await getIssueComments(session.apiUrl, session.apiKey, issueId);
293706
293989
  const latest = pickLatestVisibleComment(comments);
293707
- if (latest)
293708
- finalText = latest;
293990
+ if (latest) finalText = latest;
293709
293991
  }
293710
293992
  } catch (error2) {
293711
293993
  const reason = error2 instanceof Error ? error2.message : String(error2);
293712
293994
  this.logger.warn(`Paperclip post-run fetch failed: ${reason}`);
293713
293995
  }
293714
293996
  }
293715
- if (finalText)
293716
- session.onText?.(finalText);
293717
- if (stream.thinking)
293718
- session.onThinking?.(stream.thinking);
293997
+ if (finalText) session.onText?.(finalText);
293998
+ if (stream.thinking) session.onThinking?.(stream.thinking);
293719
293999
  const isError = stream.runStatus === "failed" || stream.runStatus === "timed_out";
293720
294000
  session.onToolEnd?.("paperclip.run", isError || stream.timedOutLocally, {
293721
294001
  runId,
@@ -293763,24 +294043,27 @@ var init_runtime_adapter4 = __esm({
293763
294043
  while (true) {
293764
294044
  let events = [];
293765
294045
  try {
293766
- events = await getRunEvents(session.apiUrl, session.apiKey, runId, afterSeq, 200);
294046
+ events = await getRunEvents(
294047
+ session.apiUrl,
294048
+ session.apiKey,
294049
+ runId,
294050
+ afterSeq,
294051
+ 200
294052
+ );
293767
294053
  } catch (error2) {
293768
294054
  const reason = error2 instanceof Error ? error2.message : String(error2);
293769
294055
  this.logger.warn(`Paperclip getRunEvents failed: ${reason}`);
293770
294056
  }
293771
294057
  for (const ev of events) {
293772
- if (typeof ev.seq === "number" && ev.seq > afterSeq)
293773
- afterSeq = ev.seq;
294058
+ if (typeof ev.seq === "number" && ev.seq > afterSeq) afterSeq = ev.seq;
293774
294059
  const type = ev.type ?? "";
293775
294060
  const payload = ev.payload ?? {};
293776
294061
  if (type === "heartbeat.run.status") {
293777
294062
  const next = asString3(payload.status);
293778
- if (next)
293779
- runStatus = next;
294063
+ if (next) runStatus = next;
293780
294064
  } else if (type === "heartbeat.run.log") {
293781
294065
  const chunk = asString3(payload.chunk) ?? "";
293782
- if (!chunk)
293783
- continue;
294066
+ if (!chunk) continue;
293784
294067
  if (payload.stream === "stdout") {
293785
294068
  textBuf += chunk;
293786
294069
  session.onText?.(chunk);
@@ -293792,11 +294075,12 @@ var init_runtime_adapter4 = __esm({
293792
294075
  }
293793
294076
  }
293794
294077
  }
293795
- if (TERMINAL_RUN_STATUSES2.has(runStatus))
293796
- break;
294078
+ if (TERMINAL_RUN_STATUSES2.has(runStatus)) break;
293797
294079
  if (Date.now() - startedAt > session.runTimeoutMs) {
293798
294080
  timedOutLocally = true;
293799
- this.logger.warn(`Paperclip run ${runId} exceeded local runTimeoutMs=${session.runTimeoutMs}; abandoning poll. Run continues server-side.`);
294081
+ this.logger.warn(
294082
+ `Paperclip run ${runId} exceeded local runTimeoutMs=${session.runTimeoutMs}; abandoning poll. Run continues server-side.`
294083
+ );
293800
294084
  break;
293801
294085
  }
293802
294086
  await sleep6(interval);
@@ -293808,17 +294092,20 @@ var init_runtime_adapter4 = __esm({
293808
294092
  }
293809
294093
  });
293810
294094
 
293811
- // ../../plugins/fusion-plugin-paperclip-runtime/dist/index.js
294095
+ // ../../plugins/fusion-plugin-paperclip-runtime/src/index.ts
293812
294096
  function getSettingsConfig(settings) {
293813
294097
  return resolvePaperclipConfig(settings ?? {});
293814
294098
  }
293815
294099
  async function paperclipRuntimeFactory(ctx) {
293816
294100
  const config2 = getSettingsConfig(ctx.settings);
293817
- return new PaperclipRuntimeAdapter(config2, ctx.logger);
294101
+ return new PaperclipRuntimeAdapter(
294102
+ config2,
294103
+ ctx.logger
294104
+ );
293818
294105
  }
293819
294106
  var paperclipRuntime, plugin4;
293820
- var init_dist = __esm({
293821
- "../../plugins/fusion-plugin-paperclip-runtime/dist/index.js"() {
294107
+ var init_src9 = __esm({
294108
+ "../../plugins/fusion-plugin-paperclip-runtime/src/index.ts"() {
293822
294109
  "use strict";
293823
294110
  init_src5();
293824
294111
  init_paperclip_client();
@@ -293863,7 +294150,9 @@ var init_dist = __esm({
293863
294150
  });
293864
294151
  if (status.available) {
293865
294152
  const ident = status.identity;
293866
- ctx.logger.info(ident ? `Paperclip reachable as ${ident.agentName} (${ident.role ?? "agent"}) at ${ident.companyName ?? ident.companyId}` : `Paperclip reachable at ${config2.apiUrl}`);
294153
+ ctx.logger.info(
294154
+ ident ? `Paperclip reachable as ${ident.agentName} (${ident.role ?? "agent"}) at ${ident.companyName ?? ident.companyId}` : `Paperclip reachable at ${config2.apiUrl}`
294155
+ );
293867
294156
  } else {
293868
294157
  ctx.logger.warn(`Paperclip probe failed: ${status.reason ?? "unknown"}`);
293869
294158
  }
@@ -293953,7 +294242,7 @@ var init_runtime_provider_probes = __esm({
293953
294242
  init_src6();
293954
294243
  init_src7();
293955
294244
  init_src8();
293956
- init_dist();
294245
+ init_src9();
293957
294246
  }
293958
294247
  });
293959
294248
 
@@ -302096,7 +302385,7 @@ var init_server = __esm({
302096
302385
 
302097
302386
  // ../../plugins/fusion-plugin-roadmap/src/index.ts
302098
302387
  var plugin5;
302099
- var init_src9 = __esm({
302388
+ var init_src10 = __esm({
302100
302389
  "../../plugins/fusion-plugin-roadmap/src/index.ts"() {
302101
302390
  "use strict";
302102
302391
  init_src5();
@@ -302207,7 +302496,7 @@ var init_roadmap_routes3 = __esm({
302207
302496
  "../dashboard/src/roadmap-routes.ts"() {
302208
302497
  "use strict";
302209
302498
  init_src();
302210
- init_src9();
302499
+ init_src10();
302211
302500
  init_project_store_resolver();
302212
302501
  }
302213
302502
  });
@@ -312368,7 +312657,7 @@ var init_plugins = __esm({
312368
312657
  });
312369
312658
 
312370
312659
  // ../dashboard/src/index.ts
312371
- var init_src10 = __esm({
312660
+ var init_src11 = __esm({
312372
312661
  "../dashboard/src/index.ts"() {
312373
312662
  "use strict";
312374
312663
  init_server2();
@@ -314831,7 +315120,7 @@ var FUSION_LOGO_LINES, FUSION_LOGO_LARGE_LINES, FUSION_TAGLINE, FUSION_URL, FUSI
314831
315120
  var init_logo = __esm({
314832
315121
  "src/commands/dashboard-tui/logo.ts"() {
314833
315122
  "use strict";
314834
- init_src10();
315123
+ init_src11();
314835
315124
  FUSION_LOGO_LINES = [
314836
315125
  "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2557",
314837
315126
  "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551",
@@ -321540,7 +321829,7 @@ var init_cli_catalogs = __esm({
321540
321829
  });
321541
321830
 
321542
321831
  // ../i18n/src/index.ts
321543
- var init_src11 = __esm({
321832
+ var init_src12 = __esm({
321544
321833
  "../i18n/src/index.ts"() {
321545
321834
  "use strict";
321546
321835
  init_config();
@@ -321594,7 +321883,7 @@ var init_i18n = __esm({
321594
321883
  "src/i18n/index.ts"() {
321595
321884
  "use strict";
321596
321885
  init_src();
321597
- init_src11();
321886
+ init_src12();
321598
321887
  initialized = false;
321599
321888
  }
321600
321889
  });
@@ -321879,7 +322168,7 @@ var DETACH_CHORD_BYTE, DETACH_CHORD_LABEL, ALT_SCREEN_ENTER, ALT_SCREEN_LEAVE, D
321879
322168
  var init_terminal_attach = __esm({
321880
322169
  "src/commands/dashboard-tui/terminal-attach.ts"() {
321881
322170
  "use strict";
321882
- init_src10();
322171
+ init_src11();
321883
322172
  DETACH_CHORD_BYTE = 29;
321884
322173
  DETACH_CHORD_LABEL = "Ctrl-]";
321885
322174
  ALT_SCREEN_ENTER = "\x1B[?1049h";
@@ -325056,7 +325345,7 @@ var init_dashboard = __esm({
325056
325345
  "src/commands/dashboard.ts"() {
325057
325346
  "use strict";
325058
325347
  init_src();
325059
- init_src10();
325348
+ init_src11();
325060
325349
  init_src4();
325061
325350
  init_task_lifecycle();
325062
325351
  init_port_prompt();
@@ -326333,7 +326622,7 @@ var init_serve = __esm({
326333
326622
  "src/commands/serve.ts"() {
326334
326623
  "use strict";
326335
326624
  init_src();
326336
- init_src10();
326625
+ init_src11();
326337
326626
  init_src4();
326338
326627
  init_task_lifecycle();
326339
326628
  init_port_prompt();
@@ -327034,7 +327323,7 @@ var init_daemon = __esm({
327034
327323
  "src/commands/daemon.ts"() {
327035
327324
  "use strict";
327036
327325
  init_src();
327037
- init_src10();
327326
+ init_src11();
327038
327327
  init_src4();
327039
327328
  init_task_lifecycle();
327040
327329
  init_port_prompt();
@@ -327235,7 +327524,7 @@ var init_desktop = __esm({
327235
327524
  "src/commands/desktop.ts"() {
327236
327525
  "use strict";
327237
327526
  init_src();
327238
- init_src10();
327527
+ init_src11();
327239
327528
  init_src4();
327240
327529
  init_ensure_project_registered();
327241
327530
  require4 = createRequire10(import.meta.url);
@@ -327556,7 +327845,7 @@ var init_pr = __esm({
327556
327845
  init_src();
327557
327846
  init_gh_cli();
327558
327847
  init_src4();
327559
- init_src10();
327848
+ init_src11();
327560
327849
  init_project_context();
327561
327850
  }
327562
327851
  });
@@ -329077,7 +329366,7 @@ var init_task = __esm({
329077
329366
  init_src();
329078
329367
  init_src4();
329079
329368
  init_planning();
329080
- init_src10();
329369
+ init_src11();
329081
329370
  init_gh_cli();
329082
329371
  init_project_context();
329083
329372
  init_node();
@@ -330425,7 +330714,7 @@ var init_branch_group = __esm({
330425
330714
  "use strict";
330426
330715
  init_src();
330427
330716
  init_src4();
330428
- init_src10();
330717
+ init_src11();
330429
330718
  init_project_context();
330430
330719
  init_task_lifecycle();
330431
330720
  }