@runfusion/fusion 0.53.0 → 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.
- package/dist/bin.js +587 -304
- package/dist/client/.vite/manifest.json +233 -233
- package/dist/client/assets/{AgentDetailView-CHSaiBNh.js → AgentDetailView-BJditQat.js} +1 -1
- package/dist/client/assets/{AgentPermissionPolicyEditor-Bfy55DIO.js → AgentPermissionPolicyEditor-D2AQ6swg.js} +1 -1
- package/dist/client/assets/{AgentsView-CMB_7xly.js → AgentsView-DwEFPKuN.js} +3 -3
- package/dist/client/assets/{ChatView-IwWaNSeS.js → ChatView-B4bjPXFN.js} +1 -1
- package/dist/client/assets/{CommandCenter-B84TXfg6.js → CommandCenter-BABqoSkg.js} +1 -1
- package/dist/client/assets/{DevServerView-B9QEJETp.js → DevServerView-DlgOzRdC.js} +1 -1
- package/dist/client/assets/{DirectoryPicker-BnaH1pb_.js → DirectoryPicker-BwMSmxYS.js} +1 -1
- package/dist/client/assets/{DocumentsView-Cvm4OBRl.js → DocumentsView-BfaRXFg5.js} +1 -1
- package/dist/client/assets/{EvalsView-BpgA1nvW.js → EvalsView-CQBNrO5n.js} +1 -1
- package/dist/client/assets/{ExperimentalAgentOnboardingModal-D4Z1IAW2.js → ExperimentalAgentOnboardingModal-2SDqP2lc.js} +1 -1
- package/dist/client/assets/{GoalsView-ui2CM549.js → GoalsView-BgkX-_SB.js} +1 -1
- package/dist/client/assets/{InsightsView-qdJ5GhE_.js → InsightsView-CJY4eZcO.js} +1 -1
- package/dist/client/assets/{MemoryView-Csc-90G0.js → MemoryView-5Crtfanz.js} +1 -1
- package/dist/client/assets/{PiExtensionsManager-Dbm3IpQW.js → PiExtensionsManager-COmzskVa.js} +1 -1
- package/dist/client/assets/{PluginManager-B_zgRoI8.js → PluginManager-CGWXqZMa.js} +1 -1
- package/dist/client/assets/{PullRequestView-CB6L4vJw.js → PullRequestView-DAHh0FVM.js} +1 -1
- package/dist/client/assets/{ResearchView-CRtoNtCn.js → ResearchView-cSUka3sd.js} +1 -1
- package/dist/client/assets/{SecretsView-JB0lfuzZ.js → SecretsView-ChFAfFRY.js} +1 -1
- package/dist/client/assets/{SessionTerminal-CnxWsHxS.js → SessionTerminal-CtQKDaqI.js} +1 -1
- package/dist/client/assets/SettingsModal-BYaotQ2o.js +21 -0
- package/dist/client/assets/{SettingsModal-CS1-kUSO.js → SettingsModal-pAz_hOoN.js} +1 -1
- package/dist/client/assets/{SetupWizardModal-PYaS5VB9.js → SetupWizardModal-eHZHi8VP.js} +2 -2
- package/dist/client/assets/{ShadcnColorPicker-Tl1Xu-G4.js → ShadcnColorPicker-CsfgWpf6.js} +1 -1
- package/dist/client/assets/{SkillsView-CWVVQ3y_.js → SkillsView-BSUplEYb.js} +1 -1
- package/dist/client/assets/{TodoView-CCloQhKG.js → TodoView-DhBseLvM.js} +1 -1
- package/dist/client/assets/{WorkflowNodeEditor-Dz8TU3is.js → WorkflowNodeEditor-Bi12CNif.js} +1 -1
- package/dist/client/assets/{agentSkills-CFiw3LtX.js → agentSkills-qVb0x_G3.js} +1 -1
- package/dist/{desktop/client/assets/architectureDiagram-3BPJPVTR-MtAzQYUn.js → client/assets/architectureDiagram-3BPJPVTR-DEt4eIEQ.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-CRyxRdCJ.js → blockDiagram-GPEHLZMM-CJuX0UM_.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-CFjMzS7o.js → c4Diagram-AAUBKEIU-a46Lm113.js} +1 -1
- package/dist/client/assets/channel-BGI9APMr.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-BMvR_yYt.js → chunk-2J33WTMH-iBhwyS0c.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-BUPHOpQy.js → chunk-4BX2VUAB-C7lS5wER.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-C1paNu5q.js → chunk-55IACEB6-CQ6YOncn.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-CG4hnjZD.js → chunk-727SXJPM-CveMaMKK.js} +1 -1
- package/dist/{desktop/client/assets/chunk-AQP2D5EJ-whMl1uk-.js → client/assets/chunk-AQP2D5EJ-DErjGUEk.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-CY6d36wo.js → chunk-FMBD7UC4-DXUvEFfJ.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-cbKdnrGz.js → chunk-ND2GUHAM-w5RqSj1J.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-BPenWytO.js → chunk-QZHKN3VN-CAi0lJ7V.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-g6hCcufy.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-g6hCcufy.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-BCFGTolm.js → cose-bilkent-S5V4N54A-Ck2h4uV5.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-yVhB-t2h.js → dagre-BM42HDAG-BCRTXNj6.js} +1 -1
- package/dist/client/assets/{dashboard-view-C9dPtr0u.js → dashboard-view-BfLJ60Kd.js} +1 -1
- package/dist/client/assets/{dashboard-view-DHb5D1Hc.js → dashboard-view-D9rF_PCq.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-DtV2x39G.js → diagram-2AECGRRQ-DTTk-DYO.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-DwwRRghJ.js → diagram-5GNKFQAL-jDc9kMi2.js} +1 -1
- package/dist/{desktop/client/assets/diagram-KO2AKTUF-CFABtl0k.js → client/assets/diagram-KO2AKTUF-CcLmzlGr.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-C_AszN6R.js → diagram-LMA3HP47-DCW8XKQj.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-C-n05SOC.js → diagram-OG6HWLK6-wbbKquPs.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-B-9edACX.js → erDiagram-TEJ5UH35-Fo933Mo7.js} +1 -1
- package/dist/{desktop/client/assets/flowDiagram-I6XJVG4X-BCa7HuJ3.js → client/assets/flowDiagram-I6XJVG4X-Dfum7HZP.js} +1 -1
- package/dist/client/assets/{folder-open-DLACu19m.js → folder-open-B8vOwFeP.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-DaqvxM8Q.js → ganttDiagram-6RSMTGT7-BzEBCn01.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-CfWhxq7Y.js → gitGraphDiagram-PVQCEYII-CgovghHs.js} +1 -1
- package/dist/client/assets/index-BjELA24x.js +1336 -0
- package/dist/client/assets/index-DwGW7OJh.css +1 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA-BjDZFy9D.js → infoDiagram-5YYISTIA-BzpU4Wys.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-BoMTizU1.js → ishikawaDiagram-YF4QCWOH-cpp5pozu.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-BozwtvCa.js → journeyDiagram-JHISSGLW-BVjcw6oo.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-CvrpmIXn.js → kanban-definition-UN3LZRKU-4unAhBzo.js} +1 -1
- package/dist/client/assets/{mermaid.core-KeGuTimD.js → mermaid.core-DzIyUj9t.js} +4 -4
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-DMjY04EF.js → mindmap-definition-RKZ34NQL-Be_yfVir.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-r_9L-pQr.js → pieDiagram-4H26LBE5-Cfnw2aji.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-CcZKANsw.js → quadrantDiagram-W4KKPZXB-BFlC-_Uo.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-kqu_zuS5.js → requirementDiagram-4Y6WPE33-DpVPzCOx.js} +1 -1
- package/dist/{desktop/client/assets/sankeyDiagram-5OEKKPKP-DLGaZ5Gy.js → client/assets/sankeyDiagram-5OEKKPKP-DM-gKKP0.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-DAKxqBlR.js → sequenceDiagram-3UESZ5HK-DjhZCZhd.js} +1 -1
- package/dist/{desktop/client/assets/shield-alert-D-Fxd0Va.js → client/assets/shield-alert-DCfkjjYc.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-RJ2xY2-p.js → stateDiagram-AJRCARHV-BCA96rdI.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-BzhgwjfG.js → stateDiagram-v2-BHNVJYJU-DHds08RS.js} +1 -1
- package/dist/{desktop/client/assets/timeline-definition-PNZ67QCA-DHzoutyf.js → client/assets/timeline-definition-PNZ67QCA-CHW2OQRw.js} +1 -1
- package/dist/client/assets/{upload-B4v89B2G.js → upload-EJc5PJPz.js} +1 -1
- package/dist/{desktop/client/assets/users-DuxdQK9U.js → client/assets/users-C-e-99Vp.js} +1 -1
- package/dist/{desktop/client/assets/vennDiagram-CIIHVFJN-CKB5IBNU.js → client/assets/vennDiagram-CIIHVFJN-shGh4eBY.js} +1 -1
- package/dist/client/assets/{wardley-L42UT6IY-_KOTjC_D.js → wardley-L42UT6IY-l0RGrVhn.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-D16g9VQZ.js → wardleyDiagram-YWT4CUSO-C-USmO8A.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-CMIdike8.js → xychartDiagram-2RQKCTM6-CHX9Umta.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/version.json +1 -1
- package/dist/desktop/client/.vite/manifest.json +342 -340
- package/dist/desktop/client/assets/AgentDetailView-BzSyldiW.css +1 -0
- package/dist/desktop/client/assets/AgentDetailView-CmKvdHMb.js +18 -0
- package/dist/desktop/client/assets/AgentPermissionPolicyEditor-C-A5YsOB.js +6 -0
- package/dist/desktop/client/assets/AgentPermissionPolicyEditor-TpdlOWZW.css +1 -0
- package/dist/desktop/client/assets/AgentsView-Ci8aGe-d.js +24 -0
- package/dist/desktop/client/assets/ChatView-D_2wBIIx.css +1 -0
- package/dist/desktop/client/assets/ChatView-_ZTSW2bn.js +6 -0
- package/dist/desktop/client/assets/CommandCenter-B7_gwqKx.js +71 -0
- package/dist/desktop/client/assets/CommandCenter-B9q-zM9p.css +1 -0
- package/dist/desktop/client/assets/{DevServerView-CnEZI8Ax.js → DevServerView-BFF8C0F8.js} +1 -1
- package/dist/desktop/client/assets/{DirectoryPicker-BUIZKLgl.js → DirectoryPicker-CfhD5v7D.js} +1 -1
- package/dist/desktop/client/assets/{DocumentsView-BFq47DE7.js → DocumentsView-DpeUtihC.js} +1 -1
- package/dist/desktop/client/assets/{EvalsView-BEiGrFFa.js → EvalsView-BcBDpBZQ.js} +1 -1
- package/dist/desktop/client/assets/{ExperimentalAgentOnboardingModal-WzGxsxku.js → ExperimentalAgentOnboardingModal-CGeNiEm7.js} +1 -1
- package/dist/desktop/client/assets/{GoalsView-CUh8JBnJ.css → GoalsView-4-eEOeqw.css} +1 -1
- package/dist/desktop/client/assets/GoalsView-t-86-sWc.js +2 -0
- package/dist/desktop/client/assets/{InsightsView-C14VGuty.js → InsightsView-BKdG05Yh.js} +1 -1
- package/dist/desktop/client/assets/{MemoryView--XlaBNzQ.js → MemoryView-BhT-vG17.js} +1 -1
- package/dist/desktop/client/assets/{PiExtensionsManager-BaQnu6IY.js → PiExtensionsManager-C5kqG7zt.js} +1 -1
- package/dist/desktop/client/assets/{PluginManager-DqnMI_Zm.js → PluginManager-4nZ3Dccd.js} +1 -1
- package/dist/desktop/client/assets/PullRequestView-NkeImY1n.css +1 -0
- package/dist/desktop/client/assets/PullRequestView-m0-ygvgV.js +6 -0
- package/dist/desktop/client/assets/{ResearchView-OlGNDmqI.js → ResearchView-Be0JmVPT.js} +1 -1
- package/dist/desktop/client/assets/{SecretsView-vHezddkt.js → SecretsView-BpjSNOmd.js} +1 -1
- package/dist/desktop/client/assets/SessionTerminal-B2tZ8AY1.js +2 -0
- package/dist/desktop/client/assets/{SettingsModal-CvbiSIHS.css → SettingsModal-BzZNPNIh.css} +1 -1
- package/dist/{client/assets/SettingsModal-D7ArHi7z.js → desktop/client/assets/SettingsModal-COlmbl7p.js} +3 -3
- package/dist/desktop/client/assets/SettingsModal-CaE4JYxi.css +1 -0
- package/dist/desktop/client/assets/{SettingsModal-EWTm15Fk.js → SettingsModal-pY1WnN3a.js} +1 -1
- package/dist/desktop/client/assets/{SetupWizardModal-DsBTXY7k.js → SetupWizardModal-BFzU4EUM.js} +2 -2
- package/dist/desktop/client/assets/ShadcnColorPicker-3OgfenMo.css +1 -0
- package/dist/desktop/client/assets/ShadcnColorPicker-DnTw9J9K.js +11 -0
- package/dist/desktop/client/assets/SkillsView-BeOeeV_9.js +1 -0
- package/dist/desktop/client/assets/SkillsView-tAW7TTCz.css +1 -0
- package/dist/desktop/client/assets/{TodoView-CIsL_uvQ.css → TodoView--YoVYWvw.css} +1 -1
- package/dist/desktop/client/assets/{TodoView-CV7ma8AL.js → TodoView-Yb7RPsSG.js} +1 -1
- package/dist/desktop/client/assets/WorkflowNodeEditor-Df-_206_.css +1 -0
- package/dist/desktop/client/assets/WorkflowNodeEditor-ygM9IC7d.js +8 -0
- package/dist/desktop/client/assets/{agentSkills-BQzMaofj.js → agentSkills-hS-ir3dK.js} +1 -1
- package/dist/desktop/client/assets/app-5S4z84u5.js +13 -0
- package/dist/desktop/client/assets/app-B1VYocx2.js +13 -0
- package/dist/desktop/client/assets/app-BhtYYxin.js +13 -0
- package/dist/desktop/client/assets/app-Cts0__Vx.js +13 -0
- package/dist/desktop/client/assets/app-DczBmsP4.js +13 -0
- package/dist/desktop/client/assets/app-_GFUqcMK.js +13 -0
- package/dist/{client/assets/architectureDiagram-3BPJPVTR-DGp4hfr1.js → desktop/client/assets/architectureDiagram-3BPJPVTR-WcTzF6ME.js} +1 -1
- package/dist/desktop/client/assets/{blockDiagram-GPEHLZMM-zelYfqn3.js → blockDiagram-GPEHLZMM-BYmICOh-.js} +1 -1
- package/dist/desktop/client/assets/{c4Diagram-AAUBKEIU-D3hNx0Hv.js → c4Diagram-AAUBKEIU-3ags6jHx.js} +1 -1
- package/dist/desktop/client/assets/channel-CxoQ1L5k.js +1 -0
- package/dist/desktop/client/assets/{chunk-2J33WTMH-B9IKEZ0p.js → chunk-2J33WTMH-C2YTcAIE.js} +1 -1
- package/dist/desktop/client/assets/{chunk-4BX2VUAB-Dd7FeAwm.js → chunk-4BX2VUAB-CM-ULeCo.js} +1 -1
- package/dist/desktop/client/assets/{chunk-55IACEB6-DbzB46sJ.js → chunk-55IACEB6-puic6XS6.js} +1 -1
- package/dist/desktop/client/assets/{chunk-727SXJPM-CDmlBZKV.js → chunk-727SXJPM-D19Luj8o.js} +1 -1
- package/dist/{client/assets/chunk-AQP2D5EJ-Dm2nZ5Sz.js → desktop/client/assets/chunk-AQP2D5EJ-CMrfBV_j.js} +1 -1
- package/dist/desktop/client/assets/{chunk-FMBD7UC4-E1WzORFR.js → chunk-FMBD7UC4-C_7tmt8f.js} +1 -1
- package/dist/desktop/client/assets/{chunk-ND2GUHAM-e0FuVXk6.js → chunk-ND2GUHAM-CS1wETTI.js} +1 -1
- package/dist/desktop/client/assets/{chunk-QZHKN3VN-B6q2GrbB.js → chunk-QZHKN3VN-BUFmz9j9.js} +1 -1
- package/dist/desktop/client/assets/classDiagram-4FO5ZUOK-CkwAKz6i.js +1 -0
- package/dist/desktop/client/assets/classDiagram-v2-Q7XG4LA2-CkwAKz6i.js +1 -0
- package/dist/desktop/client/assets/{cose-bilkent-S5V4N54A-BjSZ5UKD.js → cose-bilkent-S5V4N54A-CKNwQVxq.js} +1 -1
- package/dist/desktop/client/assets/{dagre-BM42HDAG-DxMH6moD.js → dagre-BM42HDAG-CUUNF5LG.js} +1 -1
- package/dist/desktop/client/assets/{dashboard-view-BW8tRppT.js → dashboard-view-DTUxDN-H.js} +1 -1
- package/dist/desktop/client/assets/{dashboard-view-L_H47lEp.js → dashboard-view-DqJev4PV.js} +1633 -1633
- package/dist/desktop/client/assets/{diagram-2AECGRRQ-DDUjym9F.js → diagram-2AECGRRQ-D2jVjZrI.js} +1 -1
- package/dist/desktop/client/assets/{diagram-5GNKFQAL-nEqF7CSb.js → diagram-5GNKFQAL-DfwBCAme.js} +1 -1
- package/dist/{client/assets/diagram-KO2AKTUF-JLrDx8k8.js → desktop/client/assets/diagram-KO2AKTUF-CBWuxzRU.js} +1 -1
- package/dist/desktop/client/assets/{diagram-LMA3HP47-ButXw1gy.js → diagram-LMA3HP47-DIdjbaEx.js} +1 -1
- package/dist/desktop/client/assets/{diagram-OG6HWLK6-CA17ZRZI.js → diagram-OG6HWLK6-DU6aJ_ab.js} +1 -1
- package/dist/desktop/client/assets/{erDiagram-TEJ5UH35-DmROZaa0.js → erDiagram-TEJ5UH35-CB7jraE9.js} +1 -1
- package/dist/{client/assets/flowDiagram-I6XJVG4X-D5ThlzTR.js → desktop/client/assets/flowDiagram-I6XJVG4X-DAuaVo8C.js} +1 -1
- package/dist/desktop/client/assets/{folder-open-G_6UGFyI.js → folder-open-B3OWnACS.js} +1 -1
- package/dist/desktop/client/assets/{ganttDiagram-6RSMTGT7-BeAYpPxh.js → ganttDiagram-6RSMTGT7-BF3vyyoq.js} +1 -1
- package/dist/desktop/client/assets/{gitGraphDiagram-PVQCEYII-BLwp2lCj.js → gitGraphDiagram-PVQCEYII-kfNrpgK7.js} +1 -1
- package/dist/desktop/client/assets/index-BCe5TILt.css +1 -0
- package/dist/{client/assets/index-JlBzf2ck.js → desktop/client/assets/index-lGrAUOVY.js} +240 -240
- package/dist/desktop/client/assets/{infoDiagram-5YYISTIA-DF-q3NMx.js → infoDiagram-5YYISTIA-CuKJEoCg.js} +1 -1
- package/dist/desktop/client/assets/{ishikawaDiagram-YF4QCWOH-CKYDbUiH.js → ishikawaDiagram-YF4QCWOH-CE_2WBE3.js} +1 -1
- package/dist/desktop/client/assets/{journeyDiagram-JHISSGLW-BgkdCr6Q.js → journeyDiagram-JHISSGLW-BYQgXH_-.js} +1 -1
- package/dist/desktop/client/assets/{kanban-definition-UN3LZRKU-B9V97j0D.js → kanban-definition-UN3LZRKU-sr34WcdB.js} +1 -1
- package/dist/desktop/client/assets/{linear-dXivciGL.js → linear-CwI45w2t.js} +1 -1
- package/dist/desktop/client/assets/{mermaid.core-BBN7poU5.js → mermaid.core-CY1aILvw.js} +4 -4
- package/dist/desktop/client/assets/{mindmap-definition-RKZ34NQL-C2_Jhjnr.js → mindmap-definition-RKZ34NQL-BAxyJwWa.js} +1 -1
- package/dist/desktop/client/assets/{pieDiagram-4H26LBE5-DOrO8u2b.js → pieDiagram-4H26LBE5-DV4jRFhI.js} +1 -1
- package/dist/desktop/client/assets/{quadrantDiagram-W4KKPZXB-D4xxkMPR.js → quadrantDiagram-W4KKPZXB-CRtFlWS-.js} +1 -1
- package/dist/desktop/client/assets/{requirementDiagram-4Y6WPE33-BuyUaAlW.js → requirementDiagram-4Y6WPE33-C3kGj3sc.js} +1 -1
- package/dist/{client/assets/sankeyDiagram-5OEKKPKP-BLbamdKk.js → desktop/client/assets/sankeyDiagram-5OEKKPKP-rH_2R8B6.js} +1 -1
- package/dist/desktop/client/assets/{sequenceDiagram-3UESZ5HK-B3xhIZnf.js → sequenceDiagram-3UESZ5HK-BUlBU-AX.js} +1 -1
- package/dist/{client/assets/shield-alert-BdoEg9Yo.js → desktop/client/assets/shield-alert-CXSmWFIA.js} +1 -1
- package/dist/desktop/client/assets/{stateDiagram-AJRCARHV-3C2cVTwx.js → stateDiagram-AJRCARHV-CZloQCqS.js} +1 -1
- package/dist/desktop/client/assets/{stateDiagram-v2-BHNVJYJU-uyCHbCJn.js → stateDiagram-v2-BHNVJYJU-CMUjVDVd.js} +1 -1
- package/dist/desktop/client/assets/{time-DoDTxsna.js → time-Ckmi30gH.js} +1 -1
- package/dist/{client/assets/timeline-definition-PNZ67QCA-CT9ZQc6n.js → desktop/client/assets/timeline-definition-PNZ67QCA-ChiOOBC-.js} +1 -1
- package/dist/desktop/client/assets/{upload-Cv9kGgTr.js → upload-BHs6kHbo.js} +1 -1
- package/dist/{client/assets/users-vuVXnTg0.js → desktop/client/assets/users-PPo03TKl.js} +1 -1
- package/dist/desktop/client/assets/{vendor-reactflow-Bg-Qjzh8.js → vendor-reactflow-CnI7NMXG.js} +1 -1
- package/dist/{client/assets/vennDiagram-CIIHVFJN-DCcEEtaE.js → desktop/client/assets/vennDiagram-CIIHVFJN-Dq4yiSea.js} +1 -1
- package/dist/desktop/client/assets/{wardley-L42UT6IY-DUw_nnW7.js → wardley-L42UT6IY-Ctho3NZr.js} +1 -1
- package/dist/desktop/client/assets/{wardleyDiagram-YWT4CUSO-CgWLugtp.js → wardleyDiagram-YWT4CUSO-CXcLpQ87.js} +1 -1
- package/dist/desktop/client/assets/{xychartDiagram-2RQKCTM6-BWpeCtlX.js → xychartDiagram-2RQKCTM6-B4tWIB07.js} +1 -1
- package/dist/desktop/client/index.html +8 -8
- package/dist/desktop/client/theme-data.css +296 -0
- package/dist/desktop/client/version.json +1 -1
- package/dist/desktop/main.js +21 -15519
- package/dist/desktop/main.js.map +4 -4
- package/dist/droid-cli/package.json +1 -1
- package/dist/extension.js +486 -233
- package/dist/pi-claude-cli/package.json +1 -1
- package/dist/plugin-sdk/index.d.ts +2 -0
- package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
- package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
- package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
- package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-reports/package.json +1 -1
- package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
- package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +2 -1
- package/package.json +1 -1
- package/dist/client/assets/channel-C9LQN4ee.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-C5TeEr7c.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-C5TeEr7c.js +0 -1
- package/dist/client/assets/index-D1IHwGhg.css +0 -1
- package/dist/desktop/client/assets/AgentDetailView-CVv4BoTE.js +0 -18
- package/dist/desktop/client/assets/AgentDetailView-CgbB51Iw.css +0 -1
- package/dist/desktop/client/assets/AgentPermissionPolicyEditor-CGxjOr6G.css +0 -1
- package/dist/desktop/client/assets/AgentPermissionPolicyEditor-CQLNC_-O.js +0 -6
- package/dist/desktop/client/assets/AgentsView-DybRxzuI.js +0 -29
- package/dist/desktop/client/assets/ChatView-BtjkE0V7.css +0 -1
- package/dist/desktop/client/assets/ChatView-D_byETJX.js +0 -19
- package/dist/desktop/client/assets/CommandCenter-DDjpYkPe.css +0 -1
- package/dist/desktop/client/assets/CommandCenter-DEXoC2F7.js +0 -71
- package/dist/desktop/client/assets/GoalsView-C6Qsc-VS.js +0 -2
- package/dist/desktop/client/assets/PullRequestView-C8kBQljB.js +0 -6
- package/dist/desktop/client/assets/PullRequestView-CpdE3Yo_.css +0 -1
- package/dist/desktop/client/assets/SessionTerminal-ClbvT_Fb.js +0 -2
- package/dist/desktop/client/assets/SettingsModal-CL4GS1q-.js +0 -21
- package/dist/desktop/client/assets/SettingsModal-ino68pI2.css +0 -1
- package/dist/desktop/client/assets/ShadcnColorPicker-BciIe8Ls.js +0 -11
- package/dist/desktop/client/assets/ShadcnColorPicker-pqVWCC5-.css +0 -1
- package/dist/desktop/client/assets/SkillsView-CJ8snrma.css +0 -1
- package/dist/desktop/client/assets/SkillsView-UyhBA4_r.js +0 -1
- package/dist/desktop/client/assets/WorkflowNodeEditor-BOouksjw.css +0 -1
- package/dist/desktop/client/assets/WorkflowNodeEditor-ThUL4msx.js +0 -8
- package/dist/desktop/client/assets/app-BJGkp7Tt.js +0 -13
- package/dist/desktop/client/assets/app-BKLUvvm8.js +0 -13
- package/dist/desktop/client/assets/app-BaoNC9zg.js +0 -13
- package/dist/desktop/client/assets/app-CZQ_fFNf.js +0 -13
- package/dist/desktop/client/assets/app-DAu3AzsS.js +0 -13
- package/dist/desktop/client/assets/app-DgezOJub.js +0 -13
- package/dist/desktop/client/assets/channel-Dj1-27Yg.js +0 -1
- package/dist/desktop/client/assets/classDiagram-4FO5ZUOK-36LCOV5F.js +0 -1
- package/dist/desktop/client/assets/classDiagram-v2-Q7XG4LA2-36LCOV5F.js +0 -1
- package/dist/desktop/client/assets/index-CSVe-MIA.css +0 -1
- package/dist/desktop/client/assets/index-DIURDjTF.js +0 -1301
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
|
|
164416
|
-
const
|
|
164417
|
-
|
|
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
|
-
|
|
164420
|
-
|
|
164421
|
-
|
|
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*(
|
|
164498
|
+
/^[>\s]*(?:###?\s*|[*_]{1,2})Verdict[:\s]*[*_]{0,2}\s*([A-Za-z_]+)/im
|
|
164425
164499
|
);
|
|
164426
164500
|
if (headingMatch) {
|
|
164427
|
-
|
|
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*(
|
|
164505
|
+
/^[>\s]*(?:verdict|decision)\s*[-:]\s*([A-Za-z_]+)/im
|
|
164431
164506
|
);
|
|
164432
164507
|
if (lineFallback) {
|
|
164433
|
-
|
|
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
|
-
|
|
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"
|
|
173614
|
-
|
|
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
|
|
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 (
|
|
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,
|
|
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
|
|
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
|
-
|
|
182148
|
-
|
|
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
|
|
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
|
-
|
|
184523
|
+
const primaryMalformed = primaryOutcome.malformed === true;
|
|
184524
|
+
if (!primaryOutcome.timedOut && !primaryMalformed) return primaryOutcome;
|
|
184337
184525
|
if (!fallback2) {
|
|
184338
|
-
|
|
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}'
|
|
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;
|
|
@@ -220380,19 +220569,17 @@ var init_src5 = __esm({
|
|
|
220380
220569
|
}
|
|
220381
220570
|
});
|
|
220382
220571
|
|
|
220383
|
-
// ../../plugins/fusion-plugin-hermes-runtime/
|
|
220572
|
+
// ../../plugins/fusion-plugin-hermes-runtime/src/cli-spawn.ts
|
|
220384
220573
|
import { spawn as spawn10, spawnSync as spawnSync4 } from "node:child_process";
|
|
220385
220574
|
import os7 from "node:os";
|
|
220386
220575
|
import path6, { sep as PATH_SEP } from "node:path";
|
|
220387
220576
|
function resolveBinaryForSpawn(binary) {
|
|
220388
|
-
if (process.platform !== "win32")
|
|
220389
|
-
return binary;
|
|
220577
|
+
if (process.platform !== "win32") return binary;
|
|
220390
220578
|
if (binary.includes(PATH_SEP) || binary.includes("/") || /\.[a-z]{2,4}$/i.test(binary)) {
|
|
220391
220579
|
return binary;
|
|
220392
220580
|
}
|
|
220393
220581
|
const cached2 = resolvedBinaryCache.get(binary);
|
|
220394
|
-
if (cached2)
|
|
220395
|
-
return cached2;
|
|
220582
|
+
if (cached2) return cached2;
|
|
220396
220583
|
try {
|
|
220397
220584
|
const result = spawnSync4("where", [binary], { encoding: "utf-8" });
|
|
220398
220585
|
if (result.status === 0) {
|
|
@@ -220410,19 +220597,15 @@ function parseProfileListOutput(raw) {
|
|
|
220410
220597
|
const lines = raw.replace(ANSI_RE, "").replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n");
|
|
220411
220598
|
const profiles = [];
|
|
220412
220599
|
for (const line of lines) {
|
|
220413
|
-
if (line.trim() === "")
|
|
220414
|
-
|
|
220415
|
-
if (
|
|
220416
|
-
continue;
|
|
220417
|
-
if (PROFILE_RULE_RE.test(line))
|
|
220418
|
-
continue;
|
|
220600
|
+
if (line.trim() === "") continue;
|
|
220601
|
+
if (/^\s*Profile\b/.test(line)) continue;
|
|
220602
|
+
if (PROFILE_RULE_RE.test(line)) continue;
|
|
220419
220603
|
const stripped = line.replace(/^\s+/, "");
|
|
220420
220604
|
const columns = stripped.split(/\s{2,}/);
|
|
220421
220605
|
const rawName = columns[0] ?? "";
|
|
220422
220606
|
const isDefault = rawName.startsWith("\u25C6");
|
|
220423
220607
|
const name = rawName.replace(/^◆/, "").trim();
|
|
220424
|
-
if (!name)
|
|
220425
|
-
continue;
|
|
220608
|
+
if (!name) continue;
|
|
220426
220609
|
const toUndef = (v2) => v2 === void 0 || v2.trim() === "" || v2.trim() === EM_DASH ? void 0 : v2.trim();
|
|
220427
220610
|
profiles.push({
|
|
220428
220611
|
name,
|
|
@@ -220436,8 +220619,7 @@ function parseProfileListOutput(raw) {
|
|
|
220436
220619
|
}
|
|
220437
220620
|
function hermesProfileHome(profileName) {
|
|
220438
220621
|
const base = process.env.HERMES_HOME ?? path6.join(os7.homedir(), ".hermes");
|
|
220439
|
-
if (profileName === "default" || profileName === "")
|
|
220440
|
-
return base;
|
|
220622
|
+
if (profileName === "default" || profileName === "") return base;
|
|
220441
220623
|
return path6.join(base, "profiles", profileName);
|
|
220442
220624
|
}
|
|
220443
220625
|
async function listHermesProfiles(opts) {
|
|
@@ -220450,8 +220632,7 @@ async function listHermesProfiles(opts) {
|
|
|
220450
220632
|
env: { ...process.env }
|
|
220451
220633
|
});
|
|
220452
220634
|
const timer = setTimeout(() => {
|
|
220453
|
-
if (settled)
|
|
220454
|
-
return;
|
|
220635
|
+
if (settled) return;
|
|
220455
220636
|
settled = true;
|
|
220456
220637
|
try {
|
|
220457
220638
|
child.kill("SIGKILL");
|
|
@@ -220468,16 +220649,18 @@ async function listHermesProfiles(opts) {
|
|
|
220468
220649
|
stderr += chunk.toString("utf-8");
|
|
220469
220650
|
});
|
|
220470
220651
|
child.on("error", (err) => {
|
|
220471
|
-
if (settled)
|
|
220472
|
-
return;
|
|
220652
|
+
if (settled) return;
|
|
220473
220653
|
settled = true;
|
|
220474
220654
|
clearTimeout(timer);
|
|
220475
220655
|
const isNotFound = err.code === "ENOENT";
|
|
220476
|
-
reject2(
|
|
220656
|
+
reject2(
|
|
220657
|
+
new Error(
|
|
220658
|
+
isNotFound ? `hermes profile list failed: binary not found at "${opts?.binaryPath ?? "hermes"}"` : `hermes profile list failed: ${err.message}`
|
|
220659
|
+
)
|
|
220660
|
+
);
|
|
220477
220661
|
});
|
|
220478
220662
|
child.on("close", (code) => {
|
|
220479
|
-
if (settled)
|
|
220480
|
-
return;
|
|
220663
|
+
if (settled) return;
|
|
220481
220664
|
settled = true;
|
|
220482
220665
|
clearTimeout(timer);
|
|
220483
220666
|
if (code !== 0) {
|
|
@@ -220493,22 +220676,18 @@ ${combined}`));
|
|
|
220493
220676
|
function resolveCliSettings(settings) {
|
|
220494
220677
|
const str = (v2) => typeof v2 === "string" && v2.trim().length > 0 ? v2.trim() : void 0;
|
|
220495
220678
|
const num = (v2, envKey, fallback2) => {
|
|
220496
|
-
if (typeof v2 === "number" && Number.isFinite(v2) && v2 > 0)
|
|
220497
|
-
return v2;
|
|
220679
|
+
if (typeof v2 === "number" && Number.isFinite(v2) && v2 > 0) return v2;
|
|
220498
220680
|
const raw = str(v2) ?? str(process.env[envKey]);
|
|
220499
220681
|
if (raw !== void 0) {
|
|
220500
220682
|
const parsed = Number(raw);
|
|
220501
|
-
if (Number.isFinite(parsed) && parsed > 0)
|
|
220502
|
-
return parsed;
|
|
220683
|
+
if (Number.isFinite(parsed) && parsed > 0) return parsed;
|
|
220503
220684
|
}
|
|
220504
220685
|
return fallback2;
|
|
220505
220686
|
};
|
|
220506
220687
|
const bool = (v2, envKey, fallback2) => {
|
|
220507
|
-
if (typeof v2 === "boolean")
|
|
220508
|
-
return v2;
|
|
220688
|
+
if (typeof v2 === "boolean") return v2;
|
|
220509
220689
|
const raw = str(v2) ?? str(process.env[envKey]);
|
|
220510
|
-
if (raw !== void 0)
|
|
220511
|
-
return raw === "1" || raw.toLowerCase() === "true";
|
|
220690
|
+
if (raw !== void 0) return raw === "1" || raw.toLowerCase() === "true";
|
|
220512
220691
|
return fallback2;
|
|
220513
220692
|
};
|
|
220514
220693
|
return {
|
|
@@ -220574,8 +220753,7 @@ async function invokeHermesCli(prompt, settings, resumeSessionId, signal) {
|
|
|
220574
220753
|
env: spawnEnv
|
|
220575
220754
|
});
|
|
220576
220755
|
const hardKillTimer = setTimeout(() => {
|
|
220577
|
-
if (settled)
|
|
220578
|
-
return;
|
|
220756
|
+
if (settled) return;
|
|
220579
220757
|
settled = true;
|
|
220580
220758
|
try {
|
|
220581
220759
|
child.kill("SIGKILL");
|
|
@@ -220584,8 +220762,7 @@ async function invokeHermesCli(prompt, settings, resumeSessionId, signal) {
|
|
|
220584
220762
|
reject2(new Error(`hermes: process timed out after ${settings.cliTimeoutMs}ms`));
|
|
220585
220763
|
}, settings.cliTimeoutMs);
|
|
220586
220764
|
const onAbort = () => {
|
|
220587
|
-
if (settled)
|
|
220588
|
-
return;
|
|
220765
|
+
if (settled) return;
|
|
220589
220766
|
settled = true;
|
|
220590
220767
|
clearTimeout(hardKillTimer);
|
|
220591
220768
|
try {
|
|
@@ -220610,17 +220787,19 @@ async function invokeHermesCli(prompt, settings, resumeSessionId, signal) {
|
|
|
220610
220787
|
stderr += chunk.toString("utf-8");
|
|
220611
220788
|
});
|
|
220612
220789
|
child.on("error", (err) => {
|
|
220613
|
-
if (settled)
|
|
220614
|
-
return;
|
|
220790
|
+
if (settled) return;
|
|
220615
220791
|
settled = true;
|
|
220616
220792
|
clearTimeout(hardKillTimer);
|
|
220617
220793
|
signal?.removeEventListener("abort", onAbort);
|
|
220618
220794
|
const isNotFound = err.code === "ENOENT";
|
|
220619
|
-
reject2(
|
|
220795
|
+
reject2(
|
|
220796
|
+
new Error(
|
|
220797
|
+
isNotFound ? `hermes: binary not found at "${settings.binaryPath}". Install hermes or set binaryPath/HERMES_BIN.` : `hermes: spawn error \u2014 ${err.message}`
|
|
220798
|
+
)
|
|
220799
|
+
);
|
|
220620
220800
|
});
|
|
220621
220801
|
child.on("close", (code) => {
|
|
220622
|
-
if (settled)
|
|
220623
|
-
return;
|
|
220802
|
+
if (settled) return;
|
|
220624
220803
|
settled = true;
|
|
220625
220804
|
clearTimeout(hardKillTimer);
|
|
220626
220805
|
signal?.removeEventListener("abort", onAbort);
|
|
@@ -220640,7 +220819,7 @@ ${combined}`));
|
|
|
220640
220819
|
}
|
|
220641
220820
|
var resolvedBinaryCache, ANSI_RE, SESSION_ID_RE, CHROME_LINE_RES, PROFILE_RULE_RE, EM_DASH;
|
|
220642
220821
|
var init_cli_spawn = __esm({
|
|
220643
|
-
"../../plugins/fusion-plugin-hermes-runtime/
|
|
220822
|
+
"../../plugins/fusion-plugin-hermes-runtime/src/cli-spawn.ts"() {
|
|
220644
220823
|
"use strict";
|
|
220645
220824
|
resolvedBinaryCache = /* @__PURE__ */ new Map();
|
|
220646
220825
|
ANSI_RE = /\x1b\[[0-9;]*[A-Za-z]/g;
|
|
@@ -220662,15 +220841,24 @@ var init_cli_spawn = __esm({
|
|
|
220662
220841
|
}
|
|
220663
220842
|
});
|
|
220664
220843
|
|
|
220665
|
-
// ../../plugins/fusion-plugin-hermes-runtime/
|
|
220666
|
-
import {
|
|
220844
|
+
// ../../plugins/fusion-plugin-hermes-runtime/src/fusion-skill-install.ts
|
|
220845
|
+
import {
|
|
220846
|
+
cpSync,
|
|
220847
|
+
existsSync as existsSync51,
|
|
220848
|
+
lstatSync as lstatSync3,
|
|
220849
|
+
mkdirSync as mkdirSync14,
|
|
220850
|
+
readFileSync as readFileSync21,
|
|
220851
|
+
readlinkSync,
|
|
220852
|
+
rmSync as rmSync8,
|
|
220853
|
+
symlinkSync,
|
|
220854
|
+
unlinkSync as unlinkSync3
|
|
220855
|
+
} from "node:fs";
|
|
220667
220856
|
import { homedir as homedir9 } from "node:os";
|
|
220668
220857
|
import { basename as basename17, dirname as dirname27, join as join61, resolve as resolve31 } from "node:path";
|
|
220669
220858
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
220670
220859
|
function resolveHermesHome(profile) {
|
|
220671
220860
|
const base = process.env.HERMES_HOME ?? join61(homedir9(), ".hermes");
|
|
220672
|
-
if (!profile || profile === "default")
|
|
220673
|
-
return base;
|
|
220861
|
+
if (!profile || profile === "default") return base;
|
|
220674
220862
|
return join61(base, "profiles", profile);
|
|
220675
220863
|
}
|
|
220676
220864
|
function getFusionSkillSourceCandidates(moduleUrl = import.meta.url) {
|
|
@@ -220686,8 +220874,7 @@ function getFusionSkillSourceCandidates(moduleUrl = import.meta.url) {
|
|
|
220686
220874
|
function resolveBundledFusionSkillSource() {
|
|
220687
220875
|
const candidates = getFusionSkillSourceCandidates();
|
|
220688
220876
|
for (const candidate of candidates) {
|
|
220689
|
-
if (existsSync51(join61(candidate, "SKILL.md")))
|
|
220690
|
-
return candidate;
|
|
220877
|
+
if (existsSync51(join61(candidate, "SKILL.md"))) return candidate;
|
|
220691
220878
|
}
|
|
220692
220879
|
return null;
|
|
220693
220880
|
}
|
|
@@ -220783,8 +220970,7 @@ function isBrokenSymlink(path10) {
|
|
|
220783
220970
|
}
|
|
220784
220971
|
function looksLikePriorFusionInstall(path10) {
|
|
220785
220972
|
const skillMd = join61(path10, "SKILL.md");
|
|
220786
|
-
if (!existsSync51(skillMd))
|
|
220787
|
-
return false;
|
|
220973
|
+
if (!existsSync51(skillMd)) return false;
|
|
220788
220974
|
try {
|
|
220789
220975
|
const body = readFileSync21(skillMd, "utf-8");
|
|
220790
220976
|
return /\bfusion\b/i.test(body) && /\bskill\b/i.test(body);
|
|
@@ -220793,21 +220979,19 @@ function looksLikePriorFusionInstall(path10) {
|
|
|
220793
220979
|
}
|
|
220794
220980
|
}
|
|
220795
220981
|
function looksLikeFusionSkillTarget(path10) {
|
|
220796
|
-
if (!path10)
|
|
220797
|
-
|
|
220798
|
-
if (basename17(path10).toLowerCase() === FUSION_SKILL_NAME)
|
|
220799
|
-
return true;
|
|
220982
|
+
if (!path10) return false;
|
|
220983
|
+
if (basename17(path10).toLowerCase() === FUSION_SKILL_NAME) return true;
|
|
220800
220984
|
return existsSync51(join61(path10, "SKILL.md"));
|
|
220801
220985
|
}
|
|
220802
220986
|
var FUSION_SKILL_NAME;
|
|
220803
220987
|
var init_fusion_skill_install = __esm({
|
|
220804
|
-
"../../plugins/fusion-plugin-hermes-runtime/
|
|
220988
|
+
"../../plugins/fusion-plugin-hermes-runtime/src/fusion-skill-install.ts"() {
|
|
220805
220989
|
"use strict";
|
|
220806
220990
|
FUSION_SKILL_NAME = "fusion";
|
|
220807
220991
|
}
|
|
220808
220992
|
});
|
|
220809
220993
|
|
|
220810
|
-
// ../../plugins/fusion-plugin-hermes-runtime/
|
|
220994
|
+
// ../../plugins/fusion-plugin-hermes-runtime/src/runtime-adapter.ts
|
|
220811
220995
|
function buildRuntimeContextSection(options) {
|
|
220812
220996
|
const skillNames = Array.isArray(options.skills) ? options.skills.filter((value) => typeof value === "string" && value.trim().length > 0) : [];
|
|
220813
220997
|
const skillSelection = options.skillSelection;
|
|
@@ -220825,7 +221009,7 @@ function buildRuntimeContextSection(options) {
|
|
|
220825
221009
|
}
|
|
220826
221010
|
var HermesRuntimeAdapter;
|
|
220827
221011
|
var init_runtime_adapter = __esm({
|
|
220828
|
-
"../../plugins/fusion-plugin-hermes-runtime/
|
|
221012
|
+
"../../plugins/fusion-plugin-hermes-runtime/src/runtime-adapter.ts"() {
|
|
220829
221013
|
"use strict";
|
|
220830
221014
|
init_cli_spawn();
|
|
220831
221015
|
HermesRuntimeAdapter = class {
|
|
@@ -220833,7 +221017,9 @@ var init_runtime_adapter = __esm({
|
|
|
220833
221017
|
name = "Hermes Runtime";
|
|
220834
221018
|
settings;
|
|
220835
221019
|
constructor(settings) {
|
|
220836
|
-
this.settings = resolveCliSettings(
|
|
221020
|
+
this.settings = resolveCliSettings(
|
|
221021
|
+
settings
|
|
221022
|
+
);
|
|
220837
221023
|
}
|
|
220838
221024
|
async createSession(options) {
|
|
220839
221025
|
const session = {
|
|
@@ -220877,19 +221063,16 @@ ${prompt}`;
|
|
|
220877
221063
|
describeFromSettings() {
|
|
220878
221064
|
const provider = this.settings.provider;
|
|
220879
221065
|
const model = this.settings.model;
|
|
220880
|
-
if (provider && model)
|
|
220881
|
-
|
|
220882
|
-
if (
|
|
220883
|
-
return `hermes/${model}`;
|
|
220884
|
-
if (provider)
|
|
220885
|
-
return `hermes/${provider}`;
|
|
221066
|
+
if (provider && model) return `hermes/${provider}/${model}`;
|
|
221067
|
+
if (model) return `hermes/${model}`;
|
|
221068
|
+
if (provider) return `hermes/${provider}`;
|
|
220886
221069
|
return "hermes";
|
|
220887
221070
|
}
|
|
220888
221071
|
};
|
|
220889
221072
|
}
|
|
220890
221073
|
});
|
|
220891
221074
|
|
|
220892
|
-
// ../../plugins/fusion-plugin-hermes-runtime/
|
|
221075
|
+
// ../../plugins/fusion-plugin-hermes-runtime/src/probe.ts
|
|
220893
221076
|
import { spawn as spawn11 } from "node:child_process";
|
|
220894
221077
|
async function probeHermesBinary(opts) {
|
|
220895
221078
|
const startedAt = Date.now();
|
|
@@ -220905,8 +221088,7 @@ async function probeHermesBinary(opts) {
|
|
|
220905
221088
|
stdio: ["ignore", "pipe", "pipe"]
|
|
220906
221089
|
});
|
|
220907
221090
|
const timer = setTimeout(() => {
|
|
220908
|
-
if (settled)
|
|
220909
|
-
return;
|
|
221091
|
+
if (settled) return;
|
|
220910
221092
|
settled = true;
|
|
220911
221093
|
try {
|
|
220912
221094
|
child.kill("SIGKILL");
|
|
@@ -220927,8 +221109,7 @@ async function probeHermesBinary(opts) {
|
|
|
220927
221109
|
stderr += chunk.toString("utf-8");
|
|
220928
221110
|
});
|
|
220929
221111
|
child.on("error", (err) => {
|
|
220930
|
-
if (settled)
|
|
220931
|
-
return;
|
|
221112
|
+
if (settled) return;
|
|
220932
221113
|
settled = true;
|
|
220933
221114
|
clearTimeout(timer);
|
|
220934
221115
|
const isNotFound = err.code === "ENOENT";
|
|
@@ -220939,8 +221120,7 @@ async function probeHermesBinary(opts) {
|
|
|
220939
221120
|
});
|
|
220940
221121
|
});
|
|
220941
221122
|
child.on("close", (code) => {
|
|
220942
|
-
if (settled)
|
|
220943
|
-
return;
|
|
221123
|
+
if (settled) return;
|
|
220944
221124
|
settled = true;
|
|
220945
221125
|
clearTimeout(timer);
|
|
220946
221126
|
if (code === 0) {
|
|
@@ -220980,16 +221160,16 @@ async function tryResolveBinaryPath(binary) {
|
|
|
220980
221160
|
}
|
|
220981
221161
|
var DEFAULT_PROBE_TIMEOUT_MS;
|
|
220982
221162
|
var init_probe = __esm({
|
|
220983
|
-
"../../plugins/fusion-plugin-hermes-runtime/
|
|
221163
|
+
"../../plugins/fusion-plugin-hermes-runtime/src/probe.ts"() {
|
|
220984
221164
|
"use strict";
|
|
220985
221165
|
DEFAULT_PROBE_TIMEOUT_MS = 2e3;
|
|
220986
221166
|
}
|
|
220987
221167
|
});
|
|
220988
221168
|
|
|
220989
|
-
// ../../plugins/fusion-plugin-hermes-runtime/
|
|
221169
|
+
// ../../plugins/fusion-plugin-hermes-runtime/src/index.ts
|
|
220990
221170
|
var HERMES_RUNTIME_ID, HERMES_RUNTIME_VERSION, hermesRuntimeMetadata, hermesRuntimeFactory, plugin;
|
|
220991
|
-
var
|
|
220992
|
-
"../../plugins/fusion-plugin-hermes-runtime/
|
|
221171
|
+
var init_src6 = __esm({
|
|
221172
|
+
"../../plugins/fusion-plugin-hermes-runtime/src/index.ts"() {
|
|
220993
221173
|
"use strict";
|
|
220994
221174
|
init_src5();
|
|
220995
221175
|
init_cli_spawn();
|
|
@@ -221026,11 +221206,17 @@ var init_dist = __esm({
|
|
|
221026
221206
|
const settings = resolveCliSettings(ctx.settings);
|
|
221027
221207
|
const skillInstall = installFusionSkillIntoHermesHome({ profile: settings.profile });
|
|
221028
221208
|
if (skillInstall.outcome === "warning") {
|
|
221029
|
-
ctx.logger.warn(
|
|
221209
|
+
ctx.logger.warn(
|
|
221210
|
+
`Hermes Runtime Plugin: Fusion skill auto-install warning: ${skillInstall.reason ?? "unknown"}`
|
|
221211
|
+
);
|
|
221030
221212
|
} else if (skillInstall.outcome === "skipped") {
|
|
221031
|
-
ctx.logger.warn(
|
|
221213
|
+
ctx.logger.warn(
|
|
221214
|
+
`Hermes Runtime Plugin: Fusion skill auto-install skipped: ${skillInstall.reason ?? "unknown"}`
|
|
221215
|
+
);
|
|
221032
221216
|
}
|
|
221033
|
-
ctx.logger.info(
|
|
221217
|
+
ctx.logger.info(
|
|
221218
|
+
`Hermes Runtime Plugin loaded \u2014 binary=${settings.binaryPath} model=${settings.model ?? "(default)"} fusionSkill=${skillInstall.outcome}`
|
|
221219
|
+
);
|
|
221034
221220
|
ctx.emitEvent("hermes-runtime:loaded", {
|
|
221035
221221
|
runtimeId: HERMES_RUNTIME_ID,
|
|
221036
221222
|
version: HERMES_RUNTIME_VERSION
|
|
@@ -221047,7 +221233,7 @@ var init_dist = __esm({
|
|
|
221047
221233
|
}
|
|
221048
221234
|
});
|
|
221049
221235
|
|
|
221050
|
-
// ../../plugins/fusion-plugin-openclaw-runtime/
|
|
221236
|
+
// ../../plugins/fusion-plugin-openclaw-runtime/src/pi-module.ts
|
|
221051
221237
|
import { spawn as spawn12 } from "node:child_process";
|
|
221052
221238
|
import { randomUUID as randomUUID27 } from "node:crypto";
|
|
221053
221239
|
import { readFile as readFile27 } from "node:fs/promises";
|
|
@@ -221055,20 +221241,16 @@ function asString(v2) {
|
|
|
221055
221241
|
return typeof v2 === "string" && v2.trim() !== "" ? v2.trim() : void 0;
|
|
221056
221242
|
}
|
|
221057
221243
|
function asNumber(v2) {
|
|
221058
|
-
if (typeof v2 === "number" && Number.isFinite(v2))
|
|
221059
|
-
return v2;
|
|
221244
|
+
if (typeof v2 === "number" && Number.isFinite(v2)) return v2;
|
|
221060
221245
|
const s3 = asString(v2);
|
|
221061
|
-
if (s3 === void 0)
|
|
221062
|
-
return void 0;
|
|
221246
|
+
if (s3 === void 0) return void 0;
|
|
221063
221247
|
const n = Number(s3);
|
|
221064
221248
|
return Number.isFinite(n) ? n : void 0;
|
|
221065
221249
|
}
|
|
221066
221250
|
function asBool(v2) {
|
|
221067
|
-
if (typeof v2 === "boolean")
|
|
221068
|
-
return v2;
|
|
221251
|
+
if (typeof v2 === "boolean") return v2;
|
|
221069
221252
|
const s3 = asString(v2);
|
|
221070
|
-
if (s3 === void 0)
|
|
221071
|
-
return void 0;
|
|
221253
|
+
if (s3 === void 0) return void 0;
|
|
221072
221254
|
return s3 === "1" || s3.toLowerCase() === "true";
|
|
221073
221255
|
}
|
|
221074
221256
|
function stripAnsi(text) {
|
|
@@ -221091,8 +221273,7 @@ function buildOpenClawArgs(config2, session, message) {
|
|
|
221091
221273
|
args.push("--profile", session.mcpProfile);
|
|
221092
221274
|
}
|
|
221093
221275
|
args.push("agent");
|
|
221094
|
-
if (!config2.useGateway)
|
|
221095
|
-
args.push("--local");
|
|
221276
|
+
if (!config2.useGateway) args.push("--local");
|
|
221096
221277
|
args.push("--json");
|
|
221097
221278
|
args.push("--session-id", session.sessionId);
|
|
221098
221279
|
args.push("--message", message);
|
|
@@ -221106,8 +221287,7 @@ function buildOpenClawArgs(config2, session, message) {
|
|
|
221106
221287
|
}
|
|
221107
221288
|
function extractStderrError(stderr, stdout) {
|
|
221108
221289
|
const tryExtract = (raw) => {
|
|
221109
|
-
if (!raw)
|
|
221110
|
-
return void 0;
|
|
221290
|
+
if (!raw) return void 0;
|
|
221111
221291
|
const lines = stripAnsi(raw).split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
221112
221292
|
return lines.length > 0 ? lines[lines.length - 1] : void 0;
|
|
221113
221293
|
};
|
|
@@ -221156,18 +221336,20 @@ async function promptCli(session, message, config2, callbacks, signal) {
|
|
|
221156
221336
|
stdio: ["ignore", "pipe", "pipe"]
|
|
221157
221337
|
});
|
|
221158
221338
|
const hardKill = setTimeout(() => {
|
|
221159
|
-
if (settled)
|
|
221160
|
-
return;
|
|
221339
|
+
if (settled) return;
|
|
221161
221340
|
settled = true;
|
|
221162
221341
|
try {
|
|
221163
221342
|
child.kill("SIGKILL");
|
|
221164
221343
|
} catch {
|
|
221165
221344
|
}
|
|
221166
|
-
reject2(
|
|
221345
|
+
reject2(
|
|
221346
|
+
new Error(
|
|
221347
|
+
`openclaw: process timed out after ${config2.cliTimeoutMs}ms`
|
|
221348
|
+
)
|
|
221349
|
+
);
|
|
221167
221350
|
}, config2.cliTimeoutMs);
|
|
221168
221351
|
const onAbort = () => {
|
|
221169
|
-
if (settled)
|
|
221170
|
-
return;
|
|
221352
|
+
if (settled) return;
|
|
221171
221353
|
try {
|
|
221172
221354
|
child.kill("SIGTERM");
|
|
221173
221355
|
} catch {
|
|
@@ -221189,17 +221371,19 @@ async function promptCli(session, message, config2, callbacks, signal) {
|
|
|
221189
221371
|
stderr += chunk.toString("utf-8");
|
|
221190
221372
|
});
|
|
221191
221373
|
child.on("error", (err) => {
|
|
221192
|
-
if (settled)
|
|
221193
|
-
return;
|
|
221374
|
+
if (settled) return;
|
|
221194
221375
|
settled = true;
|
|
221195
221376
|
clearTimeout(hardKill);
|
|
221196
221377
|
signal?.removeEventListener("abort", onAbort);
|
|
221197
221378
|
const isNotFound = err.code === "ENOENT";
|
|
221198
|
-
reject2(
|
|
221379
|
+
reject2(
|
|
221380
|
+
new Error(
|
|
221381
|
+
isNotFound ? `openclaw: binary not found at "${config2.binaryPath}". Install OpenClaw (npm i -g openclaw) or set binaryPath/OPENCLAW_BIN.` : `openclaw: spawn error \u2014 ${err.message}`
|
|
221382
|
+
)
|
|
221383
|
+
);
|
|
221199
221384
|
});
|
|
221200
221385
|
child.on("close", (code) => {
|
|
221201
|
-
if (settled)
|
|
221202
|
-
return;
|
|
221386
|
+
if (settled) return;
|
|
221203
221387
|
settled = true;
|
|
221204
221388
|
clearTimeout(hardKill);
|
|
221205
221389
|
signal?.removeEventListener("abort", onAbort);
|
|
@@ -221220,29 +221404,30 @@ async function promptCli(session, message, config2, callbacks, signal) {
|
|
|
221220
221404
|
const reasoningText = payloads.filter((p2) => p2.isReasoning).map((p2) => p2.text ?? "").filter((t) => t.length > 0).join("\n");
|
|
221221
221405
|
const errorText = payloads.filter((p2) => p2.isError).map((p2) => p2.text ?? "").filter((t) => t.length > 0);
|
|
221222
221406
|
const finalText = visibleText || parsed.meta?.finalAssistantVisibleText || "";
|
|
221223
|
-
if (finalText)
|
|
221224
|
-
|
|
221225
|
-
if (reasoningText)
|
|
221226
|
-
cb.onThinking?.(reasoningText);
|
|
221407
|
+
if (finalText) cb.onText?.(finalText);
|
|
221408
|
+
if (reasoningText) cb.onThinking?.(reasoningText);
|
|
221227
221409
|
session.messages.push({ role: "user", content: message });
|
|
221228
221410
|
if (finalText) {
|
|
221229
221411
|
session.messages.push({ role: "assistant", content: finalText });
|
|
221230
221412
|
}
|
|
221231
221413
|
const agentMeta = parsed.meta?.agentMeta;
|
|
221232
|
-
if (agentMeta?.usage)
|
|
221233
|
-
session.lastUsage = agentMeta.usage;
|
|
221414
|
+
if (agentMeta?.usage) session.lastUsage = agentMeta.usage;
|
|
221234
221415
|
if (agentMeta?.provider && agentMeta.model) {
|
|
221235
221416
|
session.lastModelDescription = `openclaw/${session.agentId}/${agentMeta.provider}/${agentMeta.model}`;
|
|
221236
221417
|
}
|
|
221237
221418
|
const metaError = parsed.meta?.error;
|
|
221238
221419
|
const isError = !!metaError;
|
|
221239
|
-
cb.onToolEnd?.(
|
|
221240
|
-
|
|
221241
|
-
|
|
221242
|
-
|
|
221243
|
-
|
|
221244
|
-
|
|
221245
|
-
|
|
221420
|
+
cb.onToolEnd?.(
|
|
221421
|
+
"openclaw.agent",
|
|
221422
|
+
isError,
|
|
221423
|
+
{
|
|
221424
|
+
usage: agentMeta?.usage,
|
|
221425
|
+
provider: agentMeta?.provider,
|
|
221426
|
+
model: agentMeta?.model,
|
|
221427
|
+
...metaError ? { error: metaError } : {},
|
|
221428
|
+
...errorText.length > 0 ? { toolErrors: errorText } : {}
|
|
221429
|
+
}
|
|
221430
|
+
);
|
|
221246
221431
|
resolve75();
|
|
221247
221432
|
});
|
|
221248
221433
|
});
|
|
@@ -221252,7 +221437,7 @@ function describeCliModel(session) {
|
|
|
221252
221437
|
}
|
|
221253
221438
|
var DEFAULT_BINARY, DEFAULT_AGENT_ID, DEFAULT_THINKING, DEFAULT_TIMEOUT_SEC, DEFAULT_CLI_TIMEOUT_MS, ANSI_RE2;
|
|
221254
221439
|
var init_pi_module = __esm({
|
|
221255
|
-
"../../plugins/fusion-plugin-openclaw-runtime/
|
|
221440
|
+
"../../plugins/fusion-plugin-openclaw-runtime/src/pi-module.ts"() {
|
|
221256
221441
|
"use strict";
|
|
221257
221442
|
DEFAULT_BINARY = "openclaw";
|
|
221258
221443
|
DEFAULT_AGENT_ID = "main";
|
|
@@ -221263,15 +221448,14 @@ var init_pi_module = __esm({
|
|
|
221263
221448
|
}
|
|
221264
221449
|
});
|
|
221265
221450
|
|
|
221266
|
-
// ../../plugins/fusion-plugin-openclaw-runtime/
|
|
221451
|
+
// ../../plugins/fusion-plugin-openclaw-runtime/src/mcp-config.ts
|
|
221267
221452
|
import { writeFileSync as writeFileSync10 } from "node:fs";
|
|
221268
221453
|
import { tmpdir as tmpdir10 } from "node:os";
|
|
221269
221454
|
import { join as join62 } from "node:path";
|
|
221270
221455
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
221271
221456
|
import { dirname as dirname28 } from "node:path";
|
|
221272
221457
|
function toolsToMcpToolDefs(tools) {
|
|
221273
|
-
if (!Array.isArray(tools))
|
|
221274
|
-
return [];
|
|
221458
|
+
if (!Array.isArray(tools)) return [];
|
|
221275
221459
|
return tools.filter((tool) => tool && typeof tool.name === "string" && !BUILT_IN_TOOL_NAMES.has(tool.name)).map((tool) => ({
|
|
221276
221460
|
name: tool.name,
|
|
221277
221461
|
description: typeof tool.description === "string" ? tool.description : "",
|
|
@@ -221299,17 +221483,17 @@ function writeOpenClawMcpBridgeFiles(toolDefs, cacheKey) {
|
|
|
221299
221483
|
}
|
|
221300
221484
|
var BUILT_IN_TOOL_NAMES;
|
|
221301
221485
|
var init_mcp_config2 = __esm({
|
|
221302
|
-
"../../plugins/fusion-plugin-openclaw-runtime/
|
|
221486
|
+
"../../plugins/fusion-plugin-openclaw-runtime/src/mcp-config.ts"() {
|
|
221303
221487
|
"use strict";
|
|
221304
221488
|
BUILT_IN_TOOL_NAMES = /* @__PURE__ */ new Set(["read", "write", "edit", "bash", "grep", "find"]);
|
|
221305
221489
|
}
|
|
221306
221490
|
});
|
|
221307
221491
|
|
|
221308
|
-
// ../../plugins/fusion-plugin-openclaw-runtime/
|
|
221492
|
+
// ../../plugins/fusion-plugin-openclaw-runtime/src/runtime-adapter.ts
|
|
221309
221493
|
import { randomUUID as randomUUID28 } from "node:crypto";
|
|
221310
221494
|
var OpenClawRuntimeAdapter;
|
|
221311
221495
|
var init_runtime_adapter2 = __esm({
|
|
221312
|
-
"../../plugins/fusion-plugin-openclaw-runtime/
|
|
221496
|
+
"../../plugins/fusion-plugin-openclaw-runtime/src/runtime-adapter.ts"() {
|
|
221313
221497
|
"use strict";
|
|
221314
221498
|
init_pi_module();
|
|
221315
221499
|
init_mcp_config2();
|
|
@@ -221366,7 +221550,7 @@ var init_runtime_adapter2 = __esm({
|
|
|
221366
221550
|
}
|
|
221367
221551
|
});
|
|
221368
221552
|
|
|
221369
|
-
// ../../plugins/fusion-plugin-openclaw-runtime/
|
|
221553
|
+
// ../../plugins/fusion-plugin-openclaw-runtime/src/probe.ts
|
|
221370
221554
|
import { spawn as spawn13 } from "node:child_process";
|
|
221371
221555
|
async function probeOpenClawBinary(opts = {}) {
|
|
221372
221556
|
const startedAt = Date.now();
|
|
@@ -221382,8 +221566,7 @@ async function probeOpenClawBinary(opts = {}) {
|
|
|
221382
221566
|
stdio: ["ignore", "pipe", "pipe"]
|
|
221383
221567
|
});
|
|
221384
221568
|
const timer = setTimeout(() => {
|
|
221385
|
-
if (settled)
|
|
221386
|
-
return;
|
|
221569
|
+
if (settled) return;
|
|
221387
221570
|
settled = true;
|
|
221388
221571
|
try {
|
|
221389
221572
|
child.kill("SIGKILL");
|
|
@@ -221404,8 +221587,7 @@ async function probeOpenClawBinary(opts = {}) {
|
|
|
221404
221587
|
stderr += chunk.toString("utf-8");
|
|
221405
221588
|
});
|
|
221406
221589
|
child.on("error", (err) => {
|
|
221407
|
-
if (settled)
|
|
221408
|
-
return;
|
|
221590
|
+
if (settled) return;
|
|
221409
221591
|
settled = true;
|
|
221410
221592
|
clearTimeout(timer);
|
|
221411
221593
|
const isNotFound = err.code === "ENOENT";
|
|
@@ -221416,8 +221598,7 @@ async function probeOpenClawBinary(opts = {}) {
|
|
|
221416
221598
|
});
|
|
221417
221599
|
});
|
|
221418
221600
|
child.on("close", (code) => {
|
|
221419
|
-
if (settled)
|
|
221420
|
-
return;
|
|
221601
|
+
if (settled) return;
|
|
221421
221602
|
settled = true;
|
|
221422
221603
|
clearTimeout(timer);
|
|
221423
221604
|
if (code === 0) {
|
|
@@ -221457,16 +221638,16 @@ async function tryResolveBinaryPath2(binary) {
|
|
|
221457
221638
|
}
|
|
221458
221639
|
var DEFAULT_PROBE_TIMEOUT_MS2;
|
|
221459
221640
|
var init_probe2 = __esm({
|
|
221460
|
-
"../../plugins/fusion-plugin-openclaw-runtime/
|
|
221641
|
+
"../../plugins/fusion-plugin-openclaw-runtime/src/probe.ts"() {
|
|
221461
221642
|
"use strict";
|
|
221462
221643
|
DEFAULT_PROBE_TIMEOUT_MS2 = 2e3;
|
|
221463
221644
|
}
|
|
221464
221645
|
});
|
|
221465
221646
|
|
|
221466
|
-
// ../../plugins/fusion-plugin-openclaw-runtime/
|
|
221647
|
+
// ../../plugins/fusion-plugin-openclaw-runtime/src/index.ts
|
|
221467
221648
|
var OPENCLAW_RUNTIME_ID, OPENCLAW_RUNTIME_VERSION, openclawRuntimeMetadata, openclawRuntimeFactory, plugin2;
|
|
221468
|
-
var
|
|
221469
|
-
"../../plugins/fusion-plugin-openclaw-runtime/
|
|
221649
|
+
var init_src7 = __esm({
|
|
221650
|
+
"../../plugins/fusion-plugin-openclaw-runtime/src/index.ts"() {
|
|
221470
221651
|
"use strict";
|
|
221471
221652
|
init_src5();
|
|
221472
221653
|
init_runtime_adapter2();
|
|
@@ -221502,7 +221683,9 @@ var init_dist2 = __esm({
|
|
|
221502
221683
|
onLoad: async (ctx) => {
|
|
221503
221684
|
const config2 = resolveCliConfig(ctx.settings);
|
|
221504
221685
|
const probe = await probeOpenClawBinary({ binaryPath: config2.binaryPath });
|
|
221505
|
-
ctx.logger.info(
|
|
221686
|
+
ctx.logger.info(
|
|
221687
|
+
probe.available ? `OpenClaw Runtime Plugin loaded \u2014 binary=${config2.binaryPath}${probe.version ? ` (${probe.version})` : ""}` : `OpenClaw Runtime Plugin loaded but binary not detected: ${probe.reason ?? "unknown"}`
|
|
221688
|
+
);
|
|
221506
221689
|
ctx.emitEvent("openclaw-runtime:loaded", {
|
|
221507
221690
|
runtimeId: OPENCLAW_RUNTIME_ID,
|
|
221508
221691
|
version: OPENCLAW_RUNTIME_VERSION,
|
|
@@ -238011,7 +238194,7 @@ var init_task_planner_chat_context = __esm({
|
|
|
238011
238194
|
DEFAULT_STEP_LIMIT = 20;
|
|
238012
238195
|
DEFAULT_DEPENDENCY_LIMIT = 20;
|
|
238013
238196
|
TASK_PLANNER_CHAT_CONTEXT_PROMPT_GUIDANCE = `## Task Planner Chat Context
|
|
238014
|
-
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.`;
|
|
238015
238198
|
}
|
|
238016
238199
|
});
|
|
238017
238200
|
|
|
@@ -238464,6 +238647,55 @@ function createTaskPlannerMetricsTool(taskStore, taskId, getPricingOverrides) {
|
|
|
238464
238647
|
}
|
|
238465
238648
|
};
|
|
238466
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
|
+
}
|
|
238467
238699
|
function createTaskPlannerSteeringTool(taskStore, taskId) {
|
|
238468
238700
|
return {
|
|
238469
238701
|
name: "fn_task_planner_add_steering",
|
|
@@ -239652,6 +239884,7 @@ ${CHAT_AGENT_MESSAGE_ROUTING_GUIDANCE}`;
|
|
|
239652
239884
|
|
|
239653
239885
|
${CHAT_ASK_QUESTION_GUIDANCE}`;
|
|
239654
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 = "";
|
|
239655
239888
|
if (taskPlannerChatTaskId) {
|
|
239656
239889
|
let taskContext = `Task ID: ${taskPlannerChatTaskId}
|
|
239657
239890
|
|
|
@@ -239660,6 +239893,7 @@ Context availability notes:
|
|
|
239660
239893
|
if (this.taskStore) {
|
|
239661
239894
|
try {
|
|
239662
239895
|
const context = await buildTaskPlannerChatContext(this.taskStore, taskPlannerChatTaskId);
|
|
239896
|
+
taskPlannerTaskColumn = context.snapshot.column ?? "";
|
|
239663
239897
|
taskContext = context.promptContext;
|
|
239664
239898
|
} catch (taskLoadError) {
|
|
239665
239899
|
const message = taskLoadError instanceof Error ? taskLoadError.message : String(taskLoadError);
|
|
@@ -239675,12 +239909,14 @@ Context availability notes:
|
|
|
239675
239909
|
${TASK_PLANNER_CHAT_CONTEXT_PROMPT_GUIDANCE}
|
|
239676
239910
|
|
|
239677
239911
|
Decision rules:
|
|
239678
|
-
- 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.
|
|
239679
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.
|
|
239680
|
-
-
|
|
239681
|
-
-
|
|
239682
|
-
-
|
|
239683
|
-
-
|
|
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.
|
|
239684
239920
|
|
|
239685
239921
|
${taskContext}`;
|
|
239686
239922
|
}
|
|
@@ -239746,7 +239982,8 @@ ${mentionContext}`;
|
|
|
239746
239982
|
const artifactTools = this.taskStore ? createChatArtifactTools(this.taskStore, this.messageStore) : [];
|
|
239747
239983
|
const taskPlannerSteeringTools = this.taskStore && taskPlannerChatTaskId ? [createTaskPlannerSteeringTool(this.taskStore, taskPlannerChatTaskId)] : [];
|
|
239748
239984
|
const taskPlannerMetricsTools = this.taskStore && taskPlannerChatTaskId ? [createTaskPlannerMetricsTool(this.taskStore, taskPlannerChatTaskId, () => this.getModelPricingOverrides())] : [];
|
|
239749
|
-
const
|
|
239985
|
+
const taskPlannerRefinementTools = this.taskStore && taskPlannerChatTaskId && taskPlannerTaskColumn === "done" ? [createTaskPlannerRefinementTool(this.taskStore, taskPlannerChatTaskId)] : [];
|
|
239986
|
+
const customTools = [createAskQuestionTool(), ...taskPlannerSteeringTools, ...taskPlannerMetricsTools, ...taskPlannerRefinementTools, ...messagingTools, ...workflowTools, ...documentTools, ...artifactTools];
|
|
239750
239987
|
const sessionOptions = {
|
|
239751
239988
|
cwd: this.rootDir,
|
|
239752
239989
|
systemPrompt,
|
|
@@ -240265,8 +240502,8 @@ function registerChatRoutes(ctx, deps) {
|
|
|
240265
240502
|
res.json({ session: session2 });
|
|
240266
240503
|
return;
|
|
240267
240504
|
}
|
|
240268
|
-
if (task.column === "
|
|
240269
|
-
throw badRequest(`Task ${task.id} is
|
|
240505
|
+
if (task.column === "archived") {
|
|
240506
|
+
throw badRequest(`Task ${task.id} is archived; planner chat cannot be started for archived tasks`);
|
|
240270
240507
|
}
|
|
240271
240508
|
const session = chatStore.createSession({
|
|
240272
240509
|
agentId,
|
|
@@ -292848,7 +293085,7 @@ var init_runtime_adapter3 = __esm({
|
|
|
292848
293085
|
|
|
292849
293086
|
// ../../plugins/fusion-plugin-cursor-runtime/src/index.ts
|
|
292850
293087
|
var plugin3;
|
|
292851
|
-
var
|
|
293088
|
+
var init_src8 = __esm({
|
|
292852
293089
|
"../../plugins/fusion-plugin-cursor-runtime/src/index.ts"() {
|
|
292853
293090
|
"use strict";
|
|
292854
293091
|
init_src5();
|
|
@@ -292914,7 +293151,7 @@ var init_src6 = __esm({
|
|
|
292914
293151
|
}
|
|
292915
293152
|
});
|
|
292916
293153
|
|
|
292917
|
-
// ../../plugins/fusion-plugin-paperclip-runtime/
|
|
293154
|
+
// ../../plugins/fusion-plugin-paperclip-runtime/src/paperclip-client.ts
|
|
292918
293155
|
function normalizeApiUrl(url2) {
|
|
292919
293156
|
return url2.replace(/\/+$/, "");
|
|
292920
293157
|
}
|
|
@@ -292942,19 +293179,18 @@ async function parseJsonBody(response) {
|
|
|
292942
293179
|
try {
|
|
292943
293180
|
return { value: JSON.parse(raw), raw };
|
|
292944
293181
|
} catch {
|
|
292945
|
-
throw new Error(
|
|
293182
|
+
throw new Error(
|
|
293183
|
+
`Paperclip API ${response.status} ${response.statusText}: invalid JSON response body`
|
|
293184
|
+
);
|
|
292946
293185
|
}
|
|
292947
293186
|
}
|
|
292948
293187
|
function toErrorMessage2(status, statusText, body, raw) {
|
|
292949
293188
|
if (body && typeof body === "object") {
|
|
292950
293189
|
const b2 = body;
|
|
292951
|
-
if (typeof b2.error === "string")
|
|
292952
|
-
|
|
292953
|
-
if (typeof b2.message === "string")
|
|
292954
|
-
return b2.message;
|
|
293190
|
+
if (typeof b2.error === "string") return b2.error;
|
|
293191
|
+
if (typeof b2.message === "string") return b2.message;
|
|
292955
293192
|
}
|
|
292956
|
-
if (raw.trim() !== "")
|
|
292957
|
-
return raw.slice(0, 200).trim();
|
|
293193
|
+
if (raw.trim() !== "") return raw.slice(0, 200).trim();
|
|
292958
293194
|
return `${status} ${statusText}`.trim();
|
|
292959
293195
|
}
|
|
292960
293196
|
async function request2(apiUrl, path10, options) {
|
|
@@ -292977,8 +293213,7 @@ async function request2(apiUrl, path10, options) {
|
|
|
292977
293213
|
if (!response.ok) {
|
|
292978
293214
|
const msg = toErrorMessage2(response.status, response.statusText, value, raw);
|
|
292979
293215
|
const full = `Paperclip API ${response.status} (${method} ${path10}): ${msg}`;
|
|
292980
|
-
if (response.status === 409)
|
|
292981
|
-
throw new ConflictError(full);
|
|
293216
|
+
if (response.status === 409) throw new ConflictError(full);
|
|
292982
293217
|
throw new Error(full);
|
|
292983
293218
|
}
|
|
292984
293219
|
return value;
|
|
@@ -292988,7 +293223,9 @@ function getSettingString(settings, key) {
|
|
|
292988
293223
|
return typeof v2 === "string" && v2.trim() !== "" ? v2.trim() : void 0;
|
|
292989
293224
|
}
|
|
292990
293225
|
function resolvePaperclipConfig(settings) {
|
|
292991
|
-
const apiUrl = normalizeApiUrl(
|
|
293226
|
+
const apiUrl = normalizeApiUrl(
|
|
293227
|
+
getSettingString(settings, "apiUrl") ?? process.env.PAPERCLIP_API_URL?.trim() ?? "http://localhost:3100"
|
|
293228
|
+
);
|
|
292992
293229
|
const apiKey = getSettingString(settings, "apiKey") ?? (process.env.PAPERCLIP_API_KEY?.trim() || void 0);
|
|
292993
293230
|
const agentId = getSettingString(settings, "agentId") ?? process.env.PAPERCLIP_AGENT_ID?.trim() ?? void 0;
|
|
292994
293231
|
const companyId = getSettingString(settings, "companyId") ?? process.env.PAPERCLIP_COMPANY_ID?.trim() ?? void 0;
|
|
@@ -293000,9 +293237,18 @@ function resolvePaperclipConfig(settings) {
|
|
|
293000
293237
|
const parentIssueId = getSettingString(settings, "parentIssueId") ?? process.env.PAPERCLIP_PARENT_ISSUE_ID?.trim() ?? void 0;
|
|
293001
293238
|
const projectId = getSettingString(settings, "projectId") ?? process.env.PAPERCLIP_PROJECT_ID?.trim() ?? void 0;
|
|
293002
293239
|
const goalId = getSettingString(settings, "goalId") ?? process.env.PAPERCLIP_GOAL_ID?.trim() ?? void 0;
|
|
293003
|
-
const runTimeoutMs = parseInt(
|
|
293004
|
-
|
|
293005
|
-
|
|
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
|
+
);
|
|
293006
293252
|
return {
|
|
293007
293253
|
apiUrl,
|
|
293008
293254
|
apiKey,
|
|
@@ -293095,25 +293341,20 @@ async function getRunEvents(apiUrl, apiKey, runId, afterSeq, limit = 100) {
|
|
|
293095
293341
|
apiKey,
|
|
293096
293342
|
query
|
|
293097
293343
|
});
|
|
293098
|
-
if (Array.isArray(result))
|
|
293099
|
-
return result;
|
|
293344
|
+
if (Array.isArray(result)) return result;
|
|
293100
293345
|
const r = result;
|
|
293101
|
-
if (Array.isArray(r.events))
|
|
293102
|
-
return r.events;
|
|
293346
|
+
if (Array.isArray(r.events)) return r.events;
|
|
293103
293347
|
return [];
|
|
293104
293348
|
}
|
|
293105
293349
|
async function listCompanies(apiUrl, apiKey) {
|
|
293106
293350
|
const raw = await request2(apiUrl, "/companies", { apiKey });
|
|
293107
|
-
if (!Array.isArray(raw))
|
|
293108
|
-
return [];
|
|
293351
|
+
if (!Array.isArray(raw)) return [];
|
|
293109
293352
|
const out = [];
|
|
293110
293353
|
for (const entry of raw) {
|
|
293111
|
-
if (!entry || typeof entry !== "object")
|
|
293112
|
-
continue;
|
|
293354
|
+
if (!entry || typeof entry !== "object") continue;
|
|
293113
293355
|
const r = entry;
|
|
293114
293356
|
const id = typeof r.id === "string" ? r.id : void 0;
|
|
293115
|
-
if (!id)
|
|
293116
|
-
continue;
|
|
293357
|
+
if (!id) continue;
|
|
293117
293358
|
const name = typeof r.name === "string" ? r.name : id;
|
|
293118
293359
|
const urlKey = typeof r.urlKey === "string" ? r.urlKey : typeof r.slug === "string" ? r.slug : void 0;
|
|
293119
293360
|
out.push({ id, name, urlKey });
|
|
@@ -293122,16 +293363,13 @@ async function listCompanies(apiUrl, apiKey) {
|
|
|
293122
293363
|
}
|
|
293123
293364
|
async function listCompanyAgents(apiUrl, apiKey, companyId) {
|
|
293124
293365
|
const raw = await request2(apiUrl, `/companies/${companyId}/agents`, { apiKey });
|
|
293125
|
-
if (!Array.isArray(raw))
|
|
293126
|
-
return [];
|
|
293366
|
+
if (!Array.isArray(raw)) return [];
|
|
293127
293367
|
const out = [];
|
|
293128
293368
|
for (const entry of raw) {
|
|
293129
|
-
if (!entry || typeof entry !== "object")
|
|
293130
|
-
continue;
|
|
293369
|
+
if (!entry || typeof entry !== "object") continue;
|
|
293131
293370
|
const r = entry;
|
|
293132
293371
|
const id = typeof r.id === "string" ? r.id : void 0;
|
|
293133
|
-
if (!id)
|
|
293134
|
-
continue;
|
|
293372
|
+
if (!id) continue;
|
|
293135
293373
|
const name = typeof r.name === "string" ? r.name : id;
|
|
293136
293374
|
const role = typeof r.role === "string" ? r.role : void 0;
|
|
293137
293375
|
const cId = typeof r.companyId === "string" ? r.companyId : companyId;
|
|
@@ -293241,7 +293479,11 @@ async function mintAgentApiKeyViaCli(opts) {
|
|
|
293241
293479
|
} catch (err) {
|
|
293242
293480
|
const code = err.code;
|
|
293243
293481
|
if (code === "ENOENT") {
|
|
293244
|
-
reject2(
|
|
293482
|
+
reject2(
|
|
293483
|
+
new Error(
|
|
293484
|
+
`paperclipai binary not found at ${bin}; install via \`npm i -g paperclipai\``
|
|
293485
|
+
)
|
|
293486
|
+
);
|
|
293245
293487
|
} else {
|
|
293246
293488
|
reject2(err instanceof Error ? err : new Error(String(err)));
|
|
293247
293489
|
}
|
|
@@ -293262,22 +293504,24 @@ async function mintAgentApiKeyViaCli(opts) {
|
|
|
293262
293504
|
const lines = chunk.toString("utf-8").split("\n");
|
|
293263
293505
|
for (const line of lines) {
|
|
293264
293506
|
const stripped = stripAnsi2(line).trim();
|
|
293265
|
-
if (stripped)
|
|
293266
|
-
stderrLines.push(stripped);
|
|
293507
|
+
if (stripped) stderrLines.push(stripped);
|
|
293267
293508
|
}
|
|
293268
293509
|
});
|
|
293269
293510
|
child.on("error", (err) => {
|
|
293270
293511
|
clearTimeout(timer);
|
|
293271
293512
|
if (err.code === "ENOENT") {
|
|
293272
|
-
reject2(
|
|
293513
|
+
reject2(
|
|
293514
|
+
new Error(
|
|
293515
|
+
`paperclipai binary not found at ${bin}; install via \`npm i -g paperclipai\``
|
|
293516
|
+
)
|
|
293517
|
+
);
|
|
293273
293518
|
} else {
|
|
293274
293519
|
reject2(err);
|
|
293275
293520
|
}
|
|
293276
293521
|
});
|
|
293277
293522
|
child.on("close", (code) => {
|
|
293278
293523
|
clearTimeout(timer);
|
|
293279
|
-
if (killed)
|
|
293280
|
-
return;
|
|
293524
|
+
if (killed) return;
|
|
293281
293525
|
const rawStdout = Buffer.concat(stdoutChunks).toString("utf-8");
|
|
293282
293526
|
const cleanedStdout = stripAnsi2(rawStdout).trim();
|
|
293283
293527
|
if (code !== 0) {
|
|
@@ -293289,20 +293533,30 @@ async function mintAgentApiKeyViaCli(opts) {
|
|
|
293289
293533
|
}
|
|
293290
293534
|
if (!cleanedStdout) {
|
|
293291
293535
|
const hint = "run `paperclipai onboard` to authenticate the CLI";
|
|
293292
|
-
reject2(
|
|
293536
|
+
reject2(
|
|
293537
|
+
new Error(`paperclipai agent local-cli produced no output \u2014 ${hint}`)
|
|
293538
|
+
);
|
|
293293
293539
|
return;
|
|
293294
293540
|
}
|
|
293295
293541
|
let parsed;
|
|
293296
293542
|
try {
|
|
293297
293543
|
parsed = JSON.parse(cleanedStdout);
|
|
293298
293544
|
} catch {
|
|
293299
|
-
reject2(
|
|
293545
|
+
reject2(
|
|
293546
|
+
new Error(
|
|
293547
|
+
`paperclipai agent local-cli returned non-JSON output: ${cleanedStdout.slice(0, 200)}`
|
|
293548
|
+
)
|
|
293549
|
+
);
|
|
293300
293550
|
return;
|
|
293301
293551
|
}
|
|
293302
293552
|
const r = parsed;
|
|
293303
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);
|
|
293304
293554
|
if (!apiKey) {
|
|
293305
|
-
reject2(
|
|
293555
|
+
reject2(
|
|
293556
|
+
new Error(
|
|
293557
|
+
`paperclipai agent local-cli JSON missing apiKey/api_key/token field: ${cleanedStdout.slice(0, 200)}`
|
|
293558
|
+
)
|
|
293559
|
+
);
|
|
293306
293560
|
return;
|
|
293307
293561
|
}
|
|
293308
293562
|
const apiBase = (typeof r.apiBase === "string" ? r.apiBase : void 0) ?? (typeof r.api_base === "string" ? r.api_base : void 0);
|
|
@@ -293315,7 +293569,9 @@ async function mintAgentApiKeyViaCli(opts) {
|
|
|
293315
293569
|
function remapSpawnError(err, bin) {
|
|
293316
293570
|
const code = err?.code;
|
|
293317
293571
|
if (code === "ENOENT") {
|
|
293318
|
-
return new Error(
|
|
293572
|
+
return new Error(
|
|
293573
|
+
`paperclipai binary not found at ${bin}; install via \`npm i -g paperclipai\``
|
|
293574
|
+
);
|
|
293319
293575
|
}
|
|
293320
293576
|
return err instanceof Error ? err : new Error(String(err));
|
|
293321
293577
|
}
|
|
@@ -293351,8 +293607,7 @@ async function spawnPaperclipCliJson(args, opts) {
|
|
|
293351
293607
|
const lines = chunk.toString("utf-8").split("\n");
|
|
293352
293608
|
for (const line of lines) {
|
|
293353
293609
|
const stripped = stripAnsi2(line).trim();
|
|
293354
|
-
if (stripped)
|
|
293355
|
-
stderrLines.push(stripped);
|
|
293610
|
+
if (stripped) stderrLines.push(stripped);
|
|
293356
293611
|
}
|
|
293357
293612
|
});
|
|
293358
293613
|
child.on("error", (err) => {
|
|
@@ -293361,12 +293616,17 @@ async function spawnPaperclipCliJson(args, opts) {
|
|
|
293361
293616
|
});
|
|
293362
293617
|
child.on("close", (code) => {
|
|
293363
293618
|
clearTimeout(timer);
|
|
293364
|
-
if (killed)
|
|
293365
|
-
|
|
293366
|
-
|
|
293619
|
+
if (killed) return;
|
|
293620
|
+
const cleaned = stripAnsi2(
|
|
293621
|
+
Buffer.concat(stdoutChunks).toString("utf-8")
|
|
293622
|
+
).trim();
|
|
293367
293623
|
if (code !== 0) {
|
|
293368
293624
|
const lastErr = stderrLines.filter(Boolean).pop() ?? "";
|
|
293369
|
-
reject2(
|
|
293625
|
+
reject2(
|
|
293626
|
+
new Error(
|
|
293627
|
+
lastErr ? `${label} exited ${code}: ${lastErr}` : `${label} exited ${code}`
|
|
293628
|
+
)
|
|
293629
|
+
);
|
|
293370
293630
|
return;
|
|
293371
293631
|
}
|
|
293372
293632
|
if (!cleaned) {
|
|
@@ -293376,23 +293636,22 @@ async function spawnPaperclipCliJson(args, opts) {
|
|
|
293376
293636
|
try {
|
|
293377
293637
|
resolve75(JSON.parse(cleaned));
|
|
293378
293638
|
} catch {
|
|
293379
|
-
reject2(
|
|
293639
|
+
reject2(
|
|
293640
|
+
new Error(`${label} returned non-JSON output: ${cleaned.slice(0, 200)}`)
|
|
293641
|
+
);
|
|
293380
293642
|
}
|
|
293381
293643
|
});
|
|
293382
293644
|
});
|
|
293383
293645
|
}
|
|
293384
293646
|
async function listCompaniesViaCli(opts) {
|
|
293385
293647
|
const raw = await spawnPaperclipCliJson(["company", "list"], opts);
|
|
293386
|
-
if (!Array.isArray(raw))
|
|
293387
|
-
return [];
|
|
293648
|
+
if (!Array.isArray(raw)) return [];
|
|
293388
293649
|
const out = [];
|
|
293389
293650
|
for (const entry of raw) {
|
|
293390
|
-
if (!entry || typeof entry !== "object")
|
|
293391
|
-
continue;
|
|
293651
|
+
if (!entry || typeof entry !== "object") continue;
|
|
293392
293652
|
const r = entry;
|
|
293393
293653
|
const id = typeof r.id === "string" ? r.id : void 0;
|
|
293394
|
-
if (!id)
|
|
293395
|
-
continue;
|
|
293654
|
+
if (!id) continue;
|
|
293396
293655
|
const name = typeof r.name === "string" ? r.name : id;
|
|
293397
293656
|
const urlKey = typeof r.urlKey === "string" ? r.urlKey : typeof r.slug === "string" ? r.slug : void 0;
|
|
293398
293657
|
out.push({ id, name, urlKey });
|
|
@@ -293400,17 +293659,17 @@ async function listCompaniesViaCli(opts) {
|
|
|
293400
293659
|
return out;
|
|
293401
293660
|
}
|
|
293402
293661
|
async function listCompanyAgentsViaCli(opts) {
|
|
293403
|
-
const raw = await spawnPaperclipCliJson(
|
|
293404
|
-
|
|
293405
|
-
|
|
293662
|
+
const raw = await spawnPaperclipCliJson(
|
|
293663
|
+
["agent", "list", "--company-id", opts.companyId],
|
|
293664
|
+
opts
|
|
293665
|
+
);
|
|
293666
|
+
if (!Array.isArray(raw)) return [];
|
|
293406
293667
|
const out = [];
|
|
293407
293668
|
for (const entry of raw) {
|
|
293408
|
-
if (!entry || typeof entry !== "object")
|
|
293409
|
-
continue;
|
|
293669
|
+
if (!entry || typeof entry !== "object") continue;
|
|
293410
293670
|
const r = entry;
|
|
293411
293671
|
const id = typeof r.id === "string" ? r.id : void 0;
|
|
293412
|
-
if (!id)
|
|
293413
|
-
continue;
|
|
293672
|
+
if (!id) continue;
|
|
293414
293673
|
const name = typeof r.name === "string" ? r.name : id;
|
|
293415
293674
|
const role = typeof r.role === "string" ? r.role : void 0;
|
|
293416
293675
|
const cId = typeof r.companyId === "string" ? r.companyId : opts.companyId;
|
|
@@ -293422,40 +293681,49 @@ async function listCompanyAgentsViaCli(opts) {
|
|
|
293422
293681
|
async function createIssueViaCli(opts) {
|
|
293423
293682
|
const args = ["issue", "create", "--company-id", opts.companyId];
|
|
293424
293683
|
args.push("--title", opts.body.title);
|
|
293425
|
-
if (opts.body.description)
|
|
293426
|
-
|
|
293427
|
-
if (opts.body.status)
|
|
293428
|
-
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);
|
|
293429
293686
|
if (opts.body.assigneeAgentId)
|
|
293430
293687
|
args.push("--assignee-agent-id", opts.body.assigneeAgentId);
|
|
293431
|
-
if (opts.body.parentId)
|
|
293432
|
-
|
|
293433
|
-
if (opts.body.
|
|
293434
|
-
args.push("--project-id", opts.body.projectId);
|
|
293435
|
-
if (opts.body.goalId)
|
|
293436
|
-
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);
|
|
293437
293691
|
const raw = await spawnPaperclipCliJson(args, opts);
|
|
293438
293692
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
293439
|
-
throw new Error(
|
|
293693
|
+
throw new Error(
|
|
293694
|
+
`paperclipai issue create returned unexpected payload: ${JSON.stringify(raw).slice(0, 200)}`
|
|
293695
|
+
);
|
|
293440
293696
|
}
|
|
293441
293697
|
return raw;
|
|
293442
293698
|
}
|
|
293443
293699
|
async function getIssueViaCli(opts) {
|
|
293444
|
-
const raw = await spawnPaperclipCliJson(
|
|
293700
|
+
const raw = await spawnPaperclipCliJson(
|
|
293701
|
+
["issue", "get", opts.issueId],
|
|
293702
|
+
opts
|
|
293703
|
+
);
|
|
293445
293704
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
293446
|
-
throw new Error(
|
|
293705
|
+
throw new Error(
|
|
293706
|
+
`paperclipai issue get returned unexpected payload: ${JSON.stringify(raw).slice(0, 200)}`
|
|
293707
|
+
);
|
|
293447
293708
|
}
|
|
293448
293709
|
return raw;
|
|
293449
293710
|
}
|
|
293450
293711
|
async function agentsMeViaCli(opts) {
|
|
293451
|
-
const raw = await spawnPaperclipCliJson(
|
|
293712
|
+
const raw = await spawnPaperclipCliJson(
|
|
293713
|
+
["agent", "get", opts.agentId],
|
|
293714
|
+
opts
|
|
293715
|
+
);
|
|
293452
293716
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
293453
|
-
throw new Error(
|
|
293717
|
+
throw new Error(
|
|
293718
|
+
`paperclipai agent get returned unexpected payload: ${JSON.stringify(raw).slice(0, 200)}`
|
|
293719
|
+
);
|
|
293454
293720
|
}
|
|
293455
293721
|
const id = typeof raw.id === "string" ? raw.id : void 0;
|
|
293456
293722
|
const cId = typeof raw.companyId === "string" ? raw.companyId : void 0;
|
|
293457
293723
|
if (!id || !cId) {
|
|
293458
|
-
throw new Error(
|
|
293724
|
+
throw new Error(
|
|
293725
|
+
"paperclipai agent get returned a response missing `id` or `companyId`"
|
|
293726
|
+
);
|
|
293459
293727
|
}
|
|
293460
293728
|
return {
|
|
293461
293729
|
agentId: id,
|
|
@@ -293470,8 +293738,7 @@ async function probePaperclipViaCli(opts) {
|
|
|
293470
293738
|
let apiUrl = "(via paperclipai CLI)";
|
|
293471
293739
|
try {
|
|
293472
293740
|
const disc = await discoverPaperclipCliConfig({ configPath: opts.cliConfigPath });
|
|
293473
|
-
if (disc.ok)
|
|
293474
|
-
apiUrl = disc.apiUrl;
|
|
293741
|
+
if (disc.ok) apiUrl = disc.apiUrl;
|
|
293475
293742
|
} catch {
|
|
293476
293743
|
}
|
|
293477
293744
|
try {
|
|
@@ -293488,7 +293755,7 @@ async function probePaperclipViaCli(opts) {
|
|
|
293488
293755
|
}
|
|
293489
293756
|
var ConflictError;
|
|
293490
293757
|
var init_paperclip_client = __esm({
|
|
293491
|
-
"../../plugins/fusion-plugin-paperclip-runtime/
|
|
293758
|
+
"../../plugins/fusion-plugin-paperclip-runtime/src/paperclip-client.ts"() {
|
|
293492
293759
|
"use strict";
|
|
293493
293760
|
ConflictError = class extends Error {
|
|
293494
293761
|
status = 409;
|
|
@@ -293500,7 +293767,7 @@ var init_paperclip_client = __esm({
|
|
|
293500
293767
|
}
|
|
293501
293768
|
});
|
|
293502
293769
|
|
|
293503
|
-
// ../../plugins/fusion-plugin-paperclip-runtime/
|
|
293770
|
+
// ../../plugins/fusion-plugin-paperclip-runtime/src/runtime-adapter.ts
|
|
293504
293771
|
import { randomUUID as randomUUID36 } from "node:crypto";
|
|
293505
293772
|
function sleep6(ms2) {
|
|
293506
293773
|
return new Promise((resolve75) => setTimeout(resolve75, ms2));
|
|
@@ -293529,22 +293796,20 @@ function pickIssueId(issue2) {
|
|
|
293529
293796
|
return issueId;
|
|
293530
293797
|
}
|
|
293531
293798
|
function normalizeMode3(mode) {
|
|
293532
|
-
if (mode && VALID_MODES2.has(mode))
|
|
293533
|
-
return mode;
|
|
293799
|
+
if (mode && VALID_MODES2.has(mode)) return mode;
|
|
293534
293800
|
return "rolling-issue";
|
|
293535
293801
|
}
|
|
293536
293802
|
function pickLatestVisibleComment(comments) {
|
|
293537
293803
|
for (let i = comments.length - 1; i >= 0; i--) {
|
|
293538
293804
|
const c = comments[i];
|
|
293539
293805
|
const body = asString3(c.body)?.trim();
|
|
293540
|
-
if (body)
|
|
293541
|
-
return body;
|
|
293806
|
+
if (body) return body;
|
|
293542
293807
|
}
|
|
293543
293808
|
return void 0;
|
|
293544
293809
|
}
|
|
293545
293810
|
var TERMINAL_RUN_STATUSES2, VALID_MODES2, PaperclipRuntimeAdapter;
|
|
293546
293811
|
var init_runtime_adapter4 = __esm({
|
|
293547
|
-
"../../plugins/fusion-plugin-paperclip-runtime/
|
|
293812
|
+
"../../plugins/fusion-plugin-paperclip-runtime/src/runtime-adapter.ts"() {
|
|
293548
293813
|
"use strict";
|
|
293549
293814
|
init_paperclip_client();
|
|
293550
293815
|
TERMINAL_RUN_STATUSES2 = /* @__PURE__ */ new Set([
|
|
@@ -293564,7 +293829,9 @@ var init_runtime_adapter4 = __esm({
|
|
|
293564
293829
|
config;
|
|
293565
293830
|
logger;
|
|
293566
293831
|
constructor(config2, logger3) {
|
|
293567
|
-
const resolved = resolvePaperclipConfig(
|
|
293832
|
+
const resolved = resolvePaperclipConfig(
|
|
293833
|
+
config2
|
|
293834
|
+
);
|
|
293568
293835
|
this.config = {
|
|
293569
293836
|
...resolved,
|
|
293570
293837
|
mode: normalizeMode3(resolved.mode),
|
|
@@ -293580,13 +293847,17 @@ var init_runtime_adapter4 = __esm({
|
|
|
293580
293847
|
configPath: this.config.cliConfigPath
|
|
293581
293848
|
});
|
|
293582
293849
|
if (!discovery.ok) {
|
|
293583
|
-
throw new Error(
|
|
293850
|
+
throw new Error(
|
|
293851
|
+
`Paperclip CLI mode failed: ${discovery.reason} (Switch to API mode in settings if paperclipai isn't installed.)`
|
|
293852
|
+
);
|
|
293584
293853
|
}
|
|
293585
293854
|
effectiveApiUrl = discovery.apiUrl;
|
|
293586
293855
|
if (!effectiveApiKey) {
|
|
293587
293856
|
effectiveApiKey = discovery.apiKey;
|
|
293588
293857
|
}
|
|
293589
|
-
this.logger.info(
|
|
293858
|
+
this.logger.info(
|
|
293859
|
+
`Paperclip CLI mode resolved apiUrl=${effectiveApiUrl} (deploymentMode=${discovery.deploymentMode ?? "unknown"})`
|
|
293860
|
+
);
|
|
293590
293861
|
}
|
|
293591
293862
|
let agentId = this.config.agentId;
|
|
293592
293863
|
let companyId = this.config.companyId;
|
|
@@ -293594,7 +293865,9 @@ var init_runtime_adapter4 = __esm({
|
|
|
293594
293865
|
try {
|
|
293595
293866
|
if (this.config.transport === "cli") {
|
|
293596
293867
|
if (!agentId) {
|
|
293597
|
-
throw new Error(
|
|
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
|
+
);
|
|
293598
293871
|
}
|
|
293599
293872
|
const me2 = await agentsMeViaCli({
|
|
293600
293873
|
agentId,
|
|
@@ -293609,11 +293882,15 @@ var init_runtime_adapter4 = __esm({
|
|
|
293609
293882
|
}
|
|
293610
293883
|
} catch (error2) {
|
|
293611
293884
|
const reason = error2 instanceof Error ? error2.message : String(error2);
|
|
293612
|
-
throw new Error(
|
|
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
|
+
);
|
|
293613
293888
|
}
|
|
293614
293889
|
}
|
|
293615
293890
|
if (!agentId || !companyId) {
|
|
293616
|
-
throw new Error(
|
|
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
|
+
);
|
|
293617
293894
|
}
|
|
293618
293895
|
const session = {
|
|
293619
293896
|
apiUrl: effectiveApiUrl,
|
|
@@ -293710,18 +293987,15 @@ var init_runtime_adapter4 = __esm({
|
|
|
293710
293987
|
if (!finalText) {
|
|
293711
293988
|
const comments = await getIssueComments(session.apiUrl, session.apiKey, issueId);
|
|
293712
293989
|
const latest = pickLatestVisibleComment(comments);
|
|
293713
|
-
if (latest)
|
|
293714
|
-
finalText = latest;
|
|
293990
|
+
if (latest) finalText = latest;
|
|
293715
293991
|
}
|
|
293716
293992
|
} catch (error2) {
|
|
293717
293993
|
const reason = error2 instanceof Error ? error2.message : String(error2);
|
|
293718
293994
|
this.logger.warn(`Paperclip post-run fetch failed: ${reason}`);
|
|
293719
293995
|
}
|
|
293720
293996
|
}
|
|
293721
|
-
if (finalText)
|
|
293722
|
-
|
|
293723
|
-
if (stream.thinking)
|
|
293724
|
-
session.onThinking?.(stream.thinking);
|
|
293997
|
+
if (finalText) session.onText?.(finalText);
|
|
293998
|
+
if (stream.thinking) session.onThinking?.(stream.thinking);
|
|
293725
293999
|
const isError = stream.runStatus === "failed" || stream.runStatus === "timed_out";
|
|
293726
294000
|
session.onToolEnd?.("paperclip.run", isError || stream.timedOutLocally, {
|
|
293727
294001
|
runId,
|
|
@@ -293769,24 +294043,27 @@ var init_runtime_adapter4 = __esm({
|
|
|
293769
294043
|
while (true) {
|
|
293770
294044
|
let events = [];
|
|
293771
294045
|
try {
|
|
293772
|
-
events = await getRunEvents(
|
|
294046
|
+
events = await getRunEvents(
|
|
294047
|
+
session.apiUrl,
|
|
294048
|
+
session.apiKey,
|
|
294049
|
+
runId,
|
|
294050
|
+
afterSeq,
|
|
294051
|
+
200
|
|
294052
|
+
);
|
|
293773
294053
|
} catch (error2) {
|
|
293774
294054
|
const reason = error2 instanceof Error ? error2.message : String(error2);
|
|
293775
294055
|
this.logger.warn(`Paperclip getRunEvents failed: ${reason}`);
|
|
293776
294056
|
}
|
|
293777
294057
|
for (const ev of events) {
|
|
293778
|
-
if (typeof ev.seq === "number" && ev.seq > afterSeq)
|
|
293779
|
-
afterSeq = ev.seq;
|
|
294058
|
+
if (typeof ev.seq === "number" && ev.seq > afterSeq) afterSeq = ev.seq;
|
|
293780
294059
|
const type = ev.type ?? "";
|
|
293781
294060
|
const payload = ev.payload ?? {};
|
|
293782
294061
|
if (type === "heartbeat.run.status") {
|
|
293783
294062
|
const next = asString3(payload.status);
|
|
293784
|
-
if (next)
|
|
293785
|
-
runStatus = next;
|
|
294063
|
+
if (next) runStatus = next;
|
|
293786
294064
|
} else if (type === "heartbeat.run.log") {
|
|
293787
294065
|
const chunk = asString3(payload.chunk) ?? "";
|
|
293788
|
-
if (!chunk)
|
|
293789
|
-
continue;
|
|
294066
|
+
if (!chunk) continue;
|
|
293790
294067
|
if (payload.stream === "stdout") {
|
|
293791
294068
|
textBuf += chunk;
|
|
293792
294069
|
session.onText?.(chunk);
|
|
@@ -293798,11 +294075,12 @@ var init_runtime_adapter4 = __esm({
|
|
|
293798
294075
|
}
|
|
293799
294076
|
}
|
|
293800
294077
|
}
|
|
293801
|
-
if (TERMINAL_RUN_STATUSES2.has(runStatus))
|
|
293802
|
-
break;
|
|
294078
|
+
if (TERMINAL_RUN_STATUSES2.has(runStatus)) break;
|
|
293803
294079
|
if (Date.now() - startedAt > session.runTimeoutMs) {
|
|
293804
294080
|
timedOutLocally = true;
|
|
293805
|
-
this.logger.warn(
|
|
294081
|
+
this.logger.warn(
|
|
294082
|
+
`Paperclip run ${runId} exceeded local runTimeoutMs=${session.runTimeoutMs}; abandoning poll. Run continues server-side.`
|
|
294083
|
+
);
|
|
293806
294084
|
break;
|
|
293807
294085
|
}
|
|
293808
294086
|
await sleep6(interval);
|
|
@@ -293814,17 +294092,20 @@ var init_runtime_adapter4 = __esm({
|
|
|
293814
294092
|
}
|
|
293815
294093
|
});
|
|
293816
294094
|
|
|
293817
|
-
// ../../plugins/fusion-plugin-paperclip-runtime/
|
|
294095
|
+
// ../../plugins/fusion-plugin-paperclip-runtime/src/index.ts
|
|
293818
294096
|
function getSettingsConfig(settings) {
|
|
293819
294097
|
return resolvePaperclipConfig(settings ?? {});
|
|
293820
294098
|
}
|
|
293821
294099
|
async function paperclipRuntimeFactory(ctx) {
|
|
293822
294100
|
const config2 = getSettingsConfig(ctx.settings);
|
|
293823
|
-
return new PaperclipRuntimeAdapter(
|
|
294101
|
+
return new PaperclipRuntimeAdapter(
|
|
294102
|
+
config2,
|
|
294103
|
+
ctx.logger
|
|
294104
|
+
);
|
|
293824
294105
|
}
|
|
293825
294106
|
var paperclipRuntime, plugin4;
|
|
293826
|
-
var
|
|
293827
|
-
"../../plugins/fusion-plugin-paperclip-runtime/
|
|
294107
|
+
var init_src9 = __esm({
|
|
294108
|
+
"../../plugins/fusion-plugin-paperclip-runtime/src/index.ts"() {
|
|
293828
294109
|
"use strict";
|
|
293829
294110
|
init_src5();
|
|
293830
294111
|
init_paperclip_client();
|
|
@@ -293869,7 +294150,9 @@ var init_dist3 = __esm({
|
|
|
293869
294150
|
});
|
|
293870
294151
|
if (status.available) {
|
|
293871
294152
|
const ident = status.identity;
|
|
293872
|
-
ctx.logger.info(
|
|
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
|
+
);
|
|
293873
294156
|
} else {
|
|
293874
294157
|
ctx.logger.warn(`Paperclip probe failed: ${status.reason ?? "unknown"}`);
|
|
293875
294158
|
}
|
|
@@ -293956,10 +294239,10 @@ async function mintPaperclipKeyViaCli(opts) {
|
|
|
293956
294239
|
var init_runtime_provider_probes = __esm({
|
|
293957
294240
|
"../dashboard/src/runtime-provider-probes.ts"() {
|
|
293958
294241
|
"use strict";
|
|
293959
|
-
init_dist();
|
|
293960
|
-
init_dist2();
|
|
293961
294242
|
init_src6();
|
|
293962
|
-
|
|
294243
|
+
init_src7();
|
|
294244
|
+
init_src8();
|
|
294245
|
+
init_src9();
|
|
293963
294246
|
}
|
|
293964
294247
|
});
|
|
293965
294248
|
|
|
@@ -302102,7 +302385,7 @@ var init_server = __esm({
|
|
|
302102
302385
|
|
|
302103
302386
|
// ../../plugins/fusion-plugin-roadmap/src/index.ts
|
|
302104
302387
|
var plugin5;
|
|
302105
|
-
var
|
|
302388
|
+
var init_src10 = __esm({
|
|
302106
302389
|
"../../plugins/fusion-plugin-roadmap/src/index.ts"() {
|
|
302107
302390
|
"use strict";
|
|
302108
302391
|
init_src5();
|
|
@@ -302213,7 +302496,7 @@ var init_roadmap_routes3 = __esm({
|
|
|
302213
302496
|
"../dashboard/src/roadmap-routes.ts"() {
|
|
302214
302497
|
"use strict";
|
|
302215
302498
|
init_src();
|
|
302216
|
-
|
|
302499
|
+
init_src10();
|
|
302217
302500
|
init_project_store_resolver();
|
|
302218
302501
|
}
|
|
302219
302502
|
});
|
|
@@ -308032,8 +308315,8 @@ var init_routes = __esm({
|
|
|
308032
308315
|
init_api_error();
|
|
308033
308316
|
init_plugin_routes();
|
|
308034
308317
|
init_register_settings_sync_helpers();
|
|
308035
|
-
|
|
308036
|
-
|
|
308318
|
+
init_src6();
|
|
308319
|
+
init_src7();
|
|
308037
308320
|
init_ai_session_diagnostics();
|
|
308038
308321
|
init_context();
|
|
308039
308322
|
init_register_task_workflow_routes();
|
|
@@ -312374,7 +312657,7 @@ var init_plugins = __esm({
|
|
|
312374
312657
|
});
|
|
312375
312658
|
|
|
312376
312659
|
// ../dashboard/src/index.ts
|
|
312377
|
-
var
|
|
312660
|
+
var init_src11 = __esm({
|
|
312378
312661
|
"../dashboard/src/index.ts"() {
|
|
312379
312662
|
"use strict";
|
|
312380
312663
|
init_server2();
|
|
@@ -314837,7 +315120,7 @@ var FUSION_LOGO_LINES, FUSION_LOGO_LARGE_LINES, FUSION_TAGLINE, FUSION_URL, FUSI
|
|
|
314837
315120
|
var init_logo = __esm({
|
|
314838
315121
|
"src/commands/dashboard-tui/logo.ts"() {
|
|
314839
315122
|
"use strict";
|
|
314840
|
-
|
|
315123
|
+
init_src11();
|
|
314841
315124
|
FUSION_LOGO_LINES = [
|
|
314842
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",
|
|
314843
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",
|
|
@@ -321546,7 +321829,7 @@ var init_cli_catalogs = __esm({
|
|
|
321546
321829
|
});
|
|
321547
321830
|
|
|
321548
321831
|
// ../i18n/src/index.ts
|
|
321549
|
-
var
|
|
321832
|
+
var init_src12 = __esm({
|
|
321550
321833
|
"../i18n/src/index.ts"() {
|
|
321551
321834
|
"use strict";
|
|
321552
321835
|
init_config();
|
|
@@ -321600,7 +321883,7 @@ var init_i18n = __esm({
|
|
|
321600
321883
|
"src/i18n/index.ts"() {
|
|
321601
321884
|
"use strict";
|
|
321602
321885
|
init_src();
|
|
321603
|
-
|
|
321886
|
+
init_src12();
|
|
321604
321887
|
initialized = false;
|
|
321605
321888
|
}
|
|
321606
321889
|
});
|
|
@@ -321885,7 +322168,7 @@ var DETACH_CHORD_BYTE, DETACH_CHORD_LABEL, ALT_SCREEN_ENTER, ALT_SCREEN_LEAVE, D
|
|
|
321885
322168
|
var init_terminal_attach = __esm({
|
|
321886
322169
|
"src/commands/dashboard-tui/terminal-attach.ts"() {
|
|
321887
322170
|
"use strict";
|
|
321888
|
-
|
|
322171
|
+
init_src11();
|
|
321889
322172
|
DETACH_CHORD_BYTE = 29;
|
|
321890
322173
|
DETACH_CHORD_LABEL = "Ctrl-]";
|
|
321891
322174
|
ALT_SCREEN_ENTER = "\x1B[?1049h";
|
|
@@ -325062,7 +325345,7 @@ var init_dashboard = __esm({
|
|
|
325062
325345
|
"src/commands/dashboard.ts"() {
|
|
325063
325346
|
"use strict";
|
|
325064
325347
|
init_src();
|
|
325065
|
-
|
|
325348
|
+
init_src11();
|
|
325066
325349
|
init_src4();
|
|
325067
325350
|
init_task_lifecycle();
|
|
325068
325351
|
init_port_prompt();
|
|
@@ -326339,7 +326622,7 @@ var init_serve = __esm({
|
|
|
326339
326622
|
"src/commands/serve.ts"() {
|
|
326340
326623
|
"use strict";
|
|
326341
326624
|
init_src();
|
|
326342
|
-
|
|
326625
|
+
init_src11();
|
|
326343
326626
|
init_src4();
|
|
326344
326627
|
init_task_lifecycle();
|
|
326345
326628
|
init_port_prompt();
|
|
@@ -327040,7 +327323,7 @@ var init_daemon = __esm({
|
|
|
327040
327323
|
"src/commands/daemon.ts"() {
|
|
327041
327324
|
"use strict";
|
|
327042
327325
|
init_src();
|
|
327043
|
-
|
|
327326
|
+
init_src11();
|
|
327044
327327
|
init_src4();
|
|
327045
327328
|
init_task_lifecycle();
|
|
327046
327329
|
init_port_prompt();
|
|
@@ -327241,7 +327524,7 @@ var init_desktop = __esm({
|
|
|
327241
327524
|
"src/commands/desktop.ts"() {
|
|
327242
327525
|
"use strict";
|
|
327243
327526
|
init_src();
|
|
327244
|
-
|
|
327527
|
+
init_src11();
|
|
327245
327528
|
init_src4();
|
|
327246
327529
|
init_ensure_project_registered();
|
|
327247
327530
|
require4 = createRequire10(import.meta.url);
|
|
@@ -327562,7 +327845,7 @@ var init_pr = __esm({
|
|
|
327562
327845
|
init_src();
|
|
327563
327846
|
init_gh_cli();
|
|
327564
327847
|
init_src4();
|
|
327565
|
-
|
|
327848
|
+
init_src11();
|
|
327566
327849
|
init_project_context();
|
|
327567
327850
|
}
|
|
327568
327851
|
});
|
|
@@ -329083,7 +329366,7 @@ var init_task = __esm({
|
|
|
329083
329366
|
init_src();
|
|
329084
329367
|
init_src4();
|
|
329085
329368
|
init_planning();
|
|
329086
|
-
|
|
329369
|
+
init_src11();
|
|
329087
329370
|
init_gh_cli();
|
|
329088
329371
|
init_project_context();
|
|
329089
329372
|
init_node();
|
|
@@ -330431,7 +330714,7 @@ var init_branch_group = __esm({
|
|
|
330431
330714
|
"use strict";
|
|
330432
330715
|
init_src();
|
|
330433
330716
|
init_src4();
|
|
330434
|
-
|
|
330717
|
+
init_src11();
|
|
330435
330718
|
init_project_context();
|
|
330436
330719
|
init_task_lifecycle();
|
|
330437
330720
|
}
|