@axiom-lattice/gateway 6.0.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/README.md +0 -1
  2. package/dist/a2a-standard-DP53K7RC.mjs +3416 -0
  3. package/dist/a2a-standard-DP53K7RC.mjs.map +1 -0
  4. package/dist/{chunk-YKTXW6F6.mjs → chunk-2SR4F3ZD.mjs} +65 -1
  5. package/dist/chunk-2SR4F3ZD.mjs.map +1 -0
  6. package/dist/{chunk-QUT2DS4R.mjs → chunk-J6B2VFJ7.mjs} +17 -4
  7. package/dist/chunk-J6B2VFJ7.mjs.map +1 -0
  8. package/dist/embed/embed-page-AgentDetailSideApp-KNVDO3FZ.js +1 -0
  9. package/dist/embed/embed-page-AgentGovernanceWorkbench-QSKWVADP.js +1 -0
  10. package/dist/embed/embed-page-MessageGraph-VGXX4OWU.js +6 -0
  11. package/dist/embed/embed-page-ReactChart-PIISVBLU.js +1 -0
  12. package/dist/embed/{embed-page-ReactInfographic-5P36JLSX.js → embed-page-ReactInfographic-677NVKOU.js} +1 -1
  13. package/dist/embed/embed-page-SkillFlow-JLI5MEZE.js +1 -0
  14. package/dist/embed/{embed-page-TasksSideApp-DA4LUTMD.js → embed-page-TasksSideApp-D7FFG2OC.js} +1 -1
  15. package/dist/embed/embed-page-ThreadMaintenancePanel-FSQVVIIG.js +1 -0
  16. package/dist/embed/{embed-page-TopologyRuntimeView-NFBHAICN.js → embed-page-TopologyRuntimeView-IS6HEO4F.js} +1 -1
  17. package/dist/embed/{embed-page-WorkflowAutomationView-43YGTXGF.js → embed-page-WorkflowAutomationView-IDVSQTJB.js} +1 -1
  18. package/dist/embed/embed-page-all-JEPF6WHD.js +1 -0
  19. package/dist/embed/{embed-page-architectureDiagram-VXUJARFQ-THUN2PFL.js → embed-page-architectureDiagram-VXUJARFQ-TYJ3NO2K.js} +1 -1
  20. package/dist/embed/embed-page-aspnet-GIV4ESY6.js +1 -0
  21. package/dist/embed/{embed-page-blockDiagram-VD42YOAC-K7OX6LIO.js → embed-page-blockDiagram-VD42YOAC-L4J3TZWR.js} +1 -1
  22. package/dist/embed/{embed-page-c4Diagram-YG6GDRKO-DJDAF5AO.js → embed-page-c4Diagram-YG6GDRKO-CP2IXU3Z.js} +1 -1
  23. package/dist/embed/{embed-page-chunk-FD2PRLMW.js → embed-page-chunk-2VJ7T35I.js} +1 -1
  24. package/dist/embed/embed-page-chunk-37LGEEJU.js +21 -0
  25. package/dist/embed/embed-page-chunk-436REIWY.js +1 -0
  26. package/dist/embed/embed-page-chunk-4W34QOXT.js +517 -0
  27. package/dist/embed/{embed-page-chunk-JUZPOR5Y.js → embed-page-chunk-5WWOKLDB.js} +1 -1
  28. package/dist/embed/{embed-page-chunk-HYPA2PHA.js → embed-page-chunk-6IIMW7OG.js} +1 -1
  29. package/dist/embed/{embed-page-chunk-XKGF5D6L.js → embed-page-chunk-7CJDHJEH.js} +1 -1
  30. package/dist/embed/{embed-page-chunk-J5AHS4PO.js → embed-page-chunk-7GLQRV3J.js} +1 -1
  31. package/dist/embed/{embed-page-chunk-SQ4GANYE.js → embed-page-chunk-AEDAOTEO.js} +1 -1
  32. package/dist/embed/embed-page-chunk-BANVRQT7.js +322 -0
  33. package/dist/embed/{embed-page-chunk-C4ZV4IXK.js → embed-page-chunk-BOEX26H7.js} +2 -2
  34. package/dist/embed/{embed-page-chunk-A2AHDN6K.js → embed-page-chunk-DQJVWZOB.js} +1 -1
  35. package/dist/embed/embed-page-chunk-EYYKNTX7.js +8 -0
  36. package/dist/embed/{embed-page-chunk-DTRFJLVZ.js → embed-page-chunk-F5QVZLK5.js} +1 -1
  37. package/dist/embed/{embed-page-chunk-GKHIPXZ2.js → embed-page-chunk-FEMHLB6I.js} +1 -1
  38. package/dist/embed/{embed-page-chunk-UHH575CK.js → embed-page-chunk-JFMBLJXY.js} +1 -1
  39. package/dist/embed/{embed-page-chunk-G2RO6IBN.js → embed-page-chunk-KXVXKWED.js} +1 -1
  40. package/dist/embed/embed-page-chunk-N66H4DNH.js +6657 -0
  41. package/dist/embed/{embed-page-chunk-WTOAQDQN.js → embed-page-chunk-NFMLKSPM.js} +1 -1
  42. package/dist/embed/{embed-page-chunk-PLNJRORR.js → embed-page-chunk-NVFNRWRN.js} +1 -1
  43. package/dist/embed/{embed-page-chunk-V2GBFWLG.js → embed-page-chunk-S2KVN3RB.js} +1 -1
  44. package/dist/embed/{embed-page-chunk-QULNM5O2.js → embed-page-chunk-SRMYHWL3.js} +1 -1
  45. package/dist/embed/{embed-page-chunk-D5GP7FHH.js → embed-page-chunk-TVVAPR7I.js} +1 -1
  46. package/dist/embed/{embed-page-chunk-WFUFTRWA.js → embed-page-chunk-WK77HIEN.js} +1 -1
  47. package/dist/embed/{embed-page-chunk-XSKNS3LY.js → embed-page-chunk-WWXRO4ZL.js} +1 -1
  48. package/dist/embed/{embed-page-chunk-BVSC3MSO.js → embed-page-chunk-XFV3N2LD.js} +1 -1
  49. package/dist/embed/{embed-page-chunk-VY6MAPHR.js → embed-page-chunk-XSKDYUNQ.js} +1 -1
  50. package/dist/embed/{embed-page-chunk-V7R2Y72J.js → embed-page-chunk-YJUCDIYK.js} +1 -1
  51. package/dist/embed/embed-page-chunk-ZQQFWEWO.js +1 -0
  52. package/dist/embed/embed-page-classDiagram-2ON5EDUG-MHNSVPAN.js +1 -0
  53. package/dist/embed/embed-page-classDiagram-v2-WZHVMYZB-QCMEVMYH.js +1 -0
  54. package/dist/embed/{embed-page-code-highlighter-IPU5ZNPJ.js → embed-page-code-highlighter-66CSPTFK.js} +1 -1
  55. package/dist/embed/embed-page-cshtml-RYMZMLKB.js +1 -0
  56. package/dist/embed/{embed-page-dagre-6UL2VRFP-UQFZMKYW.js → embed-page-dagre-6UL2VRFP-LTZ2DVVO.js} +1 -1
  57. package/dist/embed/{embed-page-diagram-PSM6KHXK-4IKXWNA4.js → embed-page-diagram-PSM6KHXK-JHYXSMCB.js} +1 -1
  58. package/dist/embed/{embed-page-diagram-QEK2KX5R-245T32UF.js → embed-page-diagram-QEK2KX5R-2YGDFFTU.js} +1 -1
  59. package/dist/embed/{embed-page-diagram-S2PKOQOG-BOA5MJA5.js → embed-page-diagram-S2PKOQOG-6EW6MDJW.js} +1 -1
  60. package/dist/embed/{embed-page-en-WB2EPS63.js → embed-page-en-2SWQHPAC.js} +1 -1
  61. package/dist/embed/embed-page-en-3Z4N5KXB.js +1 -0
  62. package/dist/embed/embed-page-en-7IHJFS63.js +1 -0
  63. package/dist/embed/embed-page-en-7NF4GCC2.js +1 -0
  64. package/dist/embed/embed-page-en-BLF5THT6.js +1 -0
  65. package/dist/embed/embed-page-en-ETUCVCSC.js +1 -0
  66. package/dist/embed/{embed-page-en-UWBIHR6I.js → embed-page-en-H4P63IAK.js} +1 -1
  67. package/dist/embed/embed-page-en-WUFULCUS.js +1 -0
  68. package/dist/embed/{embed-page-en-S4MXFPIU.js → embed-page-en-X6B6RVNL.js} +1 -1
  69. package/dist/embed/embed-page-en-XUMHP5CL.js +1 -0
  70. package/dist/embed/{embed-page-erDiagram-Q2GNP2WA-S4J4SQPR.js → embed-page-erDiagram-Q2GNP2WA-KSUS6MHW.js} +1 -1
  71. package/dist/embed/{embed-page-flowDiagram-NV44I4VS-ZFIJXKMW.js → embed-page-flowDiagram-NV44I4VS-AYXRDKAJ.js} +1 -1
  72. package/dist/embed/{embed-page-ganttDiagram-JELNMOA3-7MSIEWL4.js → embed-page-ganttDiagram-JELNMOA3-AV7N2N3T.js} +1 -1
  73. package/dist/embed/{embed-page-gitGraphDiagram-NY62KEGX-F6KE6PZK.js → embed-page-gitGraphDiagram-NY62KEGX-IBVOXVO5.js} +1 -1
  74. package/dist/embed/embed-page-infoDiagram-WHAUD3N6-ZULKOSOZ.js +2 -0
  75. package/dist/embed/{embed-page-journeyDiagram-XKPGCS4Q-6VTW6GQ3.js → embed-page-journeyDiagram-XKPGCS4Q-3GILI7Y4.js} +1 -1
  76. package/dist/embed/{embed-page-kanban-definition-3W4ZIXB7-7IZYCLQZ.js → embed-page-kanban-definition-3W4ZIXB7-UGO3J7IH.js} +1 -1
  77. package/dist/embed/{embed-page-mermaid-R7ZBUE3D.js → embed-page-mermaid-KEBBKHQH.js} +2 -2
  78. package/dist/embed/{embed-page-mindmap-definition-VGOIOE7T-GKTOT34A.js → embed-page-mindmap-definition-VGOIOE7T-VXXZJS3Z.js} +1 -1
  79. package/dist/embed/{embed-page-pieDiagram-ADFJNKIX-VDPALO42.js → embed-page-pieDiagram-ADFJNKIX-ZFAWYA2N.js} +1 -1
  80. package/dist/embed/{embed-page-requirementDiagram-UZGBJVZJ-LTZH6RTD.js → embed-page-requirementDiagram-UZGBJVZJ-2QBINXR7.js} +1 -1
  81. package/dist/embed/{embed-page-sequenceDiagram-WL72ISMW-LV6Q4SHW.js → embed-page-sequenceDiagram-WL72ISMW-3MGTESG4.js} +1 -1
  82. package/dist/embed/{embed-page-stateDiagram-FKZM4ZOC-U4NHQDNP.js → embed-page-stateDiagram-FKZM4ZOC-W6VPIMB5.js} +1 -1
  83. package/dist/embed/embed-page-stateDiagram-v2-4FDKWEC3-QYJ47QBY.js +1 -0
  84. package/dist/embed/{embed-page-tsx-PNW7N5T4.js → embed-page-tsx-LGDDERM2.js} +1 -1
  85. package/dist/embed/{embed-page-xychartDiagram-PRI3JC2R-VZSIXBFK.js → embed-page-xychartDiagram-PRI3JC2R-7XKT4R7V.js} +1 -1
  86. package/dist/embed/embed-page-zh-D3IC6BGA.js +1 -0
  87. package/dist/embed/{embed-page-zh-SSMSF5LE.js → embed-page-zh-EQ5X2M32.js} +1 -1
  88. package/dist/embed/embed-page-zh-G75LDQU4.js +1 -0
  89. package/dist/embed/embed-page-zh-GXE63PQ7.js +1 -0
  90. package/dist/embed/{embed-page-zh-ACZNJ4X4.js → embed-page-zh-IB3422D4.js} +1 -1
  91. package/dist/embed/embed-page-zh-KJXKOUIY.js +1 -0
  92. package/dist/embed/{embed-page-zh-NKHP3CFU.js → embed-page-zh-N2STRBUG.js} +1 -1
  93. package/dist/embed/{embed-page-zh-XEYNKCTC.js → embed-page-zh-PRMID3YQ.js} +1 -1
  94. package/dist/embed/embed-page-zh-RMGMUSDH.js +1 -0
  95. package/dist/embed/embed-page-zh-RMSS6PXD.js +1 -0
  96. package/dist/embed/embed-page.js +1 -1
  97. package/dist/index.d.mts +1513 -252
  98. package/dist/index.d.ts +1513 -252
  99. package/dist/index.js +17568 -5813
  100. package/dist/index.js.map +1 -1
  101. package/dist/index.mjs +31824 -22070
  102. package/dist/index.mjs.map +1 -1
  103. package/dist/{open-MDC4VCR7.mjs → open-NTH7AGD3.mjs} +41 -78
  104. package/dist/open-NTH7AGD3.mjs.map +1 -0
  105. package/dist/{open-exposure-OX5NKWDG.mjs → open-exposure-AGNG4MC3.mjs} +13 -3
  106. package/dist/{open-exposure-OX5NKWDG.mjs.map → open-exposure-AGNG4MC3.mjs.map} +1 -1
  107. package/dist/{open-files-FS5AN6Q6.mjs → open-files-V3R2BFTV.mjs} +4 -4
  108. package/package.json +9 -8
  109. package/dist/a2a-standard-3OZFXDCW.mjs +0 -1413
  110. package/dist/a2a-standard-3OZFXDCW.mjs.map +0 -1
  111. package/dist/chunk-K32XEQLH.mjs +0 -28
  112. package/dist/chunk-K32XEQLH.mjs.map +0 -1
  113. package/dist/chunk-QUT2DS4R.mjs.map +0 -1
  114. package/dist/chunk-YKTXW6F6.mjs.map +0 -1
  115. package/dist/embed/embed-page-AgentDetailSideApp-JYVZKSUU.js +0 -1
  116. package/dist/embed/embed-page-AgentGovernanceWorkbench-SD2EHW2B.js +0 -1
  117. package/dist/embed/embed-page-MessageGraph-GLQXKAVC.js +0 -6
  118. package/dist/embed/embed-page-ReactChart-74MHCE2K.js +0 -1
  119. package/dist/embed/embed-page-SkillFlow-NDAK3GAD.js +0 -1
  120. package/dist/embed/embed-page-TeamWorkspace-DUB3L6V6.js +0 -748
  121. package/dist/embed/embed-page-TeamWorkspace-YQFWXDLI.css +0 -1
  122. package/dist/embed/embed-page-all-NEJVJ4G7.js +0 -1
  123. package/dist/embed/embed-page-aspnet-SRK67AH2.js +0 -1
  124. package/dist/embed/embed-page-chunk-2PFKLMTR.js +0 -21
  125. package/dist/embed/embed-page-chunk-DWIBLGBW.js +0 -2
  126. package/dist/embed/embed-page-chunk-ESQ5V77Q.js +0 -1
  127. package/dist/embed/embed-page-chunk-MHGVD4EV.js +0 -525
  128. package/dist/embed/embed-page-chunk-P477ZTUO.js +0 -7009
  129. package/dist/embed/embed-page-classDiagram-2ON5EDUG-VYHHMIKZ.js +0 -1
  130. package/dist/embed/embed-page-classDiagram-v2-WZHVMYZB-5AISLXUF.js +0 -1
  131. package/dist/embed/embed-page-cshtml-ZY7LJSTH.js +0 -1
  132. package/dist/embed/embed-page-en-2WLCQIB6.js +0 -1
  133. package/dist/embed/embed-page-en-7WXWAWGG.js +0 -1
  134. package/dist/embed/embed-page-en-ICVL5QAC.js +0 -1
  135. package/dist/embed/embed-page-en-OLZHSUC3.js +0 -1
  136. package/dist/embed/embed-page-infoDiagram-WHAUD3N6-FQMKXERB.js +0 -2
  137. package/dist/embed/embed-page-stateDiagram-v2-4FDKWEC3-G3EWQCOW.js +0 -1
  138. package/dist/embed/embed-page-zh-EYLHUD5G.js +0 -1
  139. package/dist/embed/embed-page-zh-FPYCTKQK.js +0 -1
  140. package/dist/embed/embed-page-zh-OPUVZZSQ.js +0 -1
  141. package/dist/mcpTransportRegistry-VXUVJKBC.mjs +0 -14
  142. package/dist/mcpTransportRegistry-VXUVJKBC.mjs.map +0 -1
  143. package/dist/open-MDC4VCR7.mjs.map +0 -1
  144. /package/dist/embed/{embed-page-chunk-34FVRFPW.js → embed-page-chunk-UH47IEAR.js} +0 -0
  145. /package/dist/{open-files-FS5AN6Q6.mjs.map → open-files-V3R2BFTV.mjs.map} +0 -0
@@ -1,3 +1,3 @@
1
- import{a as $e,b as Ge}from"./embed-page-chunk-BVSC3MSO.js";import{b as Ue,c as be}from"./embed-page-chunk-GKHIPXZ2.js";import"./embed-page-chunk-WTOAQDQN.js";import{f as Ye}from"./embed-page-chunk-V2GBFWLG.js";import"./embed-page-chunk-S4XZPBRM.js";import{B as pe,Fa as He,G as je,I as ge,K as fe,O as Ee,S as _e,W as Fe,da as Be,e as Oe,h as de,ha as q,i as Pe,ia as ue,ja as Ne,na as me,oa as Z,ob as Ke,pa as qe,sa as ee,y as ce}from"./embed-page-chunk-P477ZTUO.js";import{D as te,r as P}from"./embed-page-chunk-2PFKLMTR.js";import{a as E}from"./embed-page-chunk-QV7QAJ4N.js";import"./embed-page-chunk-VW3NF5NT.js";import"./embed-page-chunk-QULNM5O2.js";import{Aa as Ae,Fc as Le,La as Q,W as $,Z as G,aa as U,ec as Me,ga as Ie,oc as De,ra as X,sb as Te,ta as J,va as ae,xc as le,ya as V}from"./embed-page-chunk-MHGVD4EV.js";import{a as se}from"./embed-page-chunk-R5QL57JJ.js";import"./embed-page-chunk-QOWM3LMZ.js";import"./embed-page-chunk-EUOOO2LS.js";import"./embed-page-chunk-5JDQ456X.js";import{f as A}from"./embed-page-chunk-QBTAJ2YI.js";var i=A(se());var oe=A(se());var j=A(E());function gt(r){let n=r.split(/[\n\r.。;;!!??]+/).filter(Boolean)[0]?.trim()||"";return n=n.replace(/[,,]+$/,"").trim(),n.length>50&&(n=n.slice(0,50)),n||(n=r.slice(0,50).trim()),n}function ft(r){let t=5381;for(let n=0;n<r.length;n++)t=(t<<5)+t+r.charCodeAt(n)>>>0;return t.toString(36).slice(0,6)}var we=({open:r,onCancel:t,onCreated:n,type:f="processing"})=>{let{post:D}=te(),l=P(),{trainingProjects:u,loading:w}=ee(),[g,m]=(0,oe.useState)(null),[y]=X.useForm(),b=u.find(h=>h.id===g)??u[0]??null;(0,oe.useEffect)(()=>{r&&(y.resetFields(),m(null))},[r,y]);let S=async()=>{if(f==="workflow"&&!b)return;let k=((await y.validateFields()).purpose||"").trim(),z=gt(k),I=`wf-${ft(k+Date.now())}`,p=f==="workflow"?{key:I,name:z,description:k,type:"workflow",prompt:"Complete the assigned task accurately and concisely.",metadata:{trainingProjectId:b?.id},workflowYaml:`name: ${I}
1
+ import{a as $e,b as Ge}from"./embed-page-chunk-XFV3N2LD.js";import{b as Ue,c as be}from"./embed-page-chunk-FEMHLB6I.js";import"./embed-page-chunk-NFMLKSPM.js";import{f as Ye}from"./embed-page-chunk-S2KVN3RB.js";import"./embed-page-chunk-S4XZPBRM.js";import{S as Ke,j as He}from"./embed-page-chunk-N66H4DNH.js";import{Ba as q,Ea as ue,Ga as Ne,H as ce,M as pe,Na as me,Oa as Z,Pa as qe,V as je,X as ge,Xa as ee,Z as fe,ca as Ee,fa as _e,k as Oe,ka as Fe,n as de,s as Pe,wa as Be}from"./embed-page-chunk-BANVRQT7.js";import{a as te}from"./embed-page-chunk-436REIWY.js";import{s as P}from"./embed-page-chunk-37LGEEJU.js";import{a as E}from"./embed-page-chunk-QV7QAJ4N.js";import"./embed-page-chunk-VW3NF5NT.js";import"./embed-page-chunk-SRMYHWL3.js";import{Bc as Le,Ia as Q,W as $,Z as G,aa as U,bc as Me,ga as Ie,kc as De,pb as Te,ra as X,ta as J,tc as le,ua as ae,xa as V,za as Ae}from"./embed-page-chunk-4W34QOXT.js";import{a as se}from"./embed-page-chunk-R5QL57JJ.js";import"./embed-page-chunk-QOWM3LMZ.js";import"./embed-page-chunk-EUOOO2LS.js";import"./embed-page-chunk-5JDQ456X.js";import{f as A}from"./embed-page-chunk-QBTAJ2YI.js";var i=A(se());var oe=A(se());var j=A(E());function gt(r){let n=r.split(/[\n\r.。;;!!??]+/).filter(Boolean)[0]?.trim()||"";return n=n.replace(/[,,]+$/,"").trim(),n.length>50&&(n=n.slice(0,50)),n||(n=r.slice(0,50).trim()),n}function ft(r){let t=5381;for(let n=0;n<r.length;n++)t=(t<<5)+t+r.charCodeAt(n)>>>0;return t.toString(36).slice(0,6)}var we=({open:r,onCancel:t,onCreated:n,type:f="processing"})=>{let{post:D}=te(),l=P(),{trainingProjects:u,loading:w}=ee(),[g,m]=(0,oe.useState)(null),[y]=X.useForm(),b=u.find(h=>h.id===g)??u[0]??null;(0,oe.useEffect)(()=>{r&&(y.resetFields(),m(null))},[r,y]);let S=async()=>{if(f==="workflow"&&!b)return;let k=((await y.validateFields()).purpose||"").trim(),z=gt(k),I=`wf-${ft(k+Date.now())}`,p=f==="workflow"?{key:I,name:z,description:k,type:"workflow",prompt:"Complete the assigned task accurately and concisely.",metadata:{trainingProjectId:b?.id},workflowYaml:`name: ${I}
2
2
  steps: []
3
3
  `}:{key:I,name:z,description:k,type:"processing",prompt:`You are the orchestrator for workflow "${z}". Purpose: ${k}. Follow the topology to delegate tasks to sub-agents.`,tools:[],skills:[],subAgents:[],middleware:[{id:"topology",type:"topology",name:l("chatConfig.workflow.middleware.topologyName"),description:l("chatConfig.workflow.middleware.topologyDescription"),enabled:!0,config:{edges:[]}}]};await D("/api/assistants",{id:I,name:z,description:k,graphDefinition:p}),y.resetFields(),n(I,k,f==="workflow"?b?.id:void 0)};return(0,j.jsx)(V,{title:l(f==="workflow"?"chatConfig.workflow.create.title":"chatConfig.workflow.create.titleProcessing"),open:r,onCancel:t,onOk:S,okText:l("common.create"),okButtonProps:{disabled:f==="workflow"&&(w||!b)},destroyOnClose:!0,children:(0,j.jsxs)(X,{form:y,layout:"vertical",initialValues:{purpose:""},children:[(0,j.jsx)(X.Item,{name:"purpose",label:l("chatConfig.workflow.field.purpose"),rules:[{required:!0,message:l("chatConfig.workflow.validation.purposeRequired")}],children:(0,j.jsx)(J.TextArea,{placeholder:l("chatConfig.workflow.field.purposePlaceholder"),rows:4})}),f==="workflow"&&(0,j.jsx)($e,{project:b,projects:u,value:b?.id??null,onChange:m,loading:w})]})})};var Ve=A(se());var e=A(E()),{Text:ye}=Q;function ut(r){if(!r||typeof r!="object")return null;let t=r;return{modelKey:t.modelKey||t.model||void 0,tools:Array.isArray(t.tools)?t.tools:[],middleware:Array.isArray(t.middleware)?t.middleware.filter(n=>n&&typeof n=="object"&&n.type):[],subAgents:Array.isArray(t.subAgents)?t.subAgents:[],skillCategories:Array.isArray(t.skillCategories)?t.skillCategories:[],runConfig:t.runConfig&&typeof t.runConfig=="object"?t.runConfig:void 0}}var mt={filesystem:(0,e.jsx)(je,{size:12}),code_eval:(0,e.jsx)(Ne,{size:12}),browser:(0,e.jsx)(fe,{size:12}),sql:(0,e.jsx)(pe,{size:12}),skill:(0,e.jsx)(ue,{size:12}),http:(0,e.jsx)(_e,{size:12}),scheduler:(0,e.jsx)(ce,{size:12}),metrics:(0,e.jsx)(Oe,{size:12}),topology:(0,e.jsx)(ge,{size:12}),ask_user_to_clarify:(0,e.jsx)(Fe,{size:12}),widget:(0,e.jsx)(de,{size:12}),date:(0,e.jsx)(Pe,{size:12}),task:(0,e.jsx)(ge,{size:12}),custom:(0,e.jsx)(Be,{size:12}),claw:(0,e.jsx)(q,{size:12}),collection:(0,e.jsx)(Ee,{size:12})},bt={filesystem:{bg:"rgba(34,197,94,0.08)",text:"#16a34a",border:"rgba(34,197,94,0.2)"},code_eval:{bg:"rgba(99,102,241,0.08)",text:"#4f46e5",border:"rgba(99,102,241,0.2)"},browser:{bg:"rgba(59,130,246,0.08)",text:"#2563eb",border:"rgba(59,130,246,0.2)"},sql:{bg:"rgba(249,115,22,0.08)",text:"#ea580c",border:"rgba(249,115,22,0.2)"},skill:{bg:"rgba(168,85,247,0.08)",text:"#9333ea",border:"rgba(168,85,247,0.2)"},http:{bg:"rgba(20,184,166,0.08)",text:"#0d9488",border:"rgba(20,184,166,0.2)"},scheduler:{bg:"rgba(245,158,11,0.08)",text:"#d97706",border:"rgba(245,158,11,0.2)"},metrics:{bg:"rgba(236,72,153,0.08)",text:"#db2777",border:"rgba(236,72,153,0.2)"},topology:{bg:"rgba(99,102,241,0.08)",text:"#4f46e5",border:"rgba(99,102,241,0.2)"},ask_user_to_clarify:{bg:"rgba(245,158,11,0.08)",text:"#d97706",border:"rgba(245,158,11,0.2)"},widget:{bg:"rgba(20,184,166,0.08)",text:"#0d9488",border:"rgba(20,184,166,0.2)"},date:{bg:"rgba(139,92,246,0.08)",text:"#7c3aed",border:"rgba(139,92,246,0.2)"},task:{bg:"rgba(99,102,241,0.08)",text:"#4f46e5",border:"rgba(99,102,241,0.2)"},custom:{bg:"rgba(107,114,128,0.08)",text:"#4b5563",border:"rgba(107,114,128,0.2)"},claw:{bg:"rgba(107,114,128,0.08)",text:"#4b5563",border:"rgba(107,114,128,0.2)"},collection:{bg:"rgba(6,182,212,0.08)",text:"#0891b2",border:"rgba(6,182,212,0.2)"}},wt={bg:"rgba(107,114,128,0.08)",text:"#4b5563",border:"rgba(107,114,128,0.2)"};function yt(r){let t=r.split(/[_-]+/).filter(Boolean);return t.length===1?t[0].slice(0,2).toUpperCase():t.map(n=>n[0]).join("").toUpperCase().slice(0,2)}var Xe=[{bg:"rgba(99,102,241,0.1)",text:"#6366f1"},{bg:"rgba(34,197,94,0.1)",text:"#22c55e"},{bg:"rgba(245,158,11,0.1)",text:"#f59e0b"},{bg:"rgba(59,130,246,0.1)",text:"#3b82f6"},{bg:"rgba(239,68,68,0.1)",text:"#ef4444"},{bg:"rgba(168,85,247,0.1)",text:"#a855f7"},{bg:"rgba(20,184,166,0.1)",text:"#14b8a6"},{bg:"rgba(236,72,153,0.1)",text:"#ec4899"}];function Je(r){return Xe[r%Xe.length]}var H=({icon:r,label:t,count:n,children:f})=>(0,e.jsxs)("div",{style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6},children:[(0,e.jsx)("span",{style:{color:"#6366f1",display:"flex",alignItems:"center"},children:r}),(0,e.jsx)(ye,{strong:!0,style:{fontSize:11,color:"#52525b",textTransform:"uppercase",letterSpacing:"0.3px"},children:t}),(0,e.jsx)("span",{style:{fontSize:9,fontWeight:600,color:"#a1a1aa",background:"rgba(0,0,0,0.04)",borderRadius:8,padding:"1px 6px",lineHeight:"16px"},children:n})]}),f]}),Qe=({graphDef:r})=>{let t=P(),n=(0,Ve.useMemo)(()=>ut(r),[r]);if(!n)return null;let f=n.middleware.filter(l=>l.enabled!==!1),D=!1;return n.tools.length===0&&f.length===0&&n.subAgents.length===0?null:(0,e.jsx)("div",{style:{pointerEvents:"auto"},children:(0,e.jsxs)("div",{style:{background:"rgba(255,255,255,0.5)",borderRadius:8,width:250,transition:"all 0.25s ease",overflow:"hidden"},children:[(0,e.jsx)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",background:"rgba(99,102,241,0.02)",borderBottom:"1px solid rgba(0,0,0,0.03)"},children:(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,e.jsx)("div",{style:{width:24,height:24,borderRadius:6,background:"rgba(99,102,241,0.05)",display:"flex",alignItems:"center",justifyContent:"center",color:"#6366f1"},children:(0,e.jsx)(q,{size:13})}),(0,e.jsx)(ye,{strong:!0,style:{fontSize:12,color:"#1a1a1a"},children:t("chat.environment.title")})]})}),(0,e.jsxs)("div",{style:{padding:"10px 12px 12px",maxHeight:"calc(60vh - 48px)",overflowY:"auto"},children:[n.tools.length>0&&(0,e.jsx)(H,{icon:(0,e.jsx)(qe,{size:12}),label:t("chat.environment.tools"),count:n.tools.length,children:(0,e.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:n.tools.map((l,u)=>{let w=Je(u);return(0,e.jsx)(U,{title:l,placement:"top",children:(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:6,fontSize:10,fontWeight:500,color:w.text,background:w.bg,cursor:"default",whiteSpace:"nowrap",lineHeight:"16px"},children:[(0,e.jsx)("span",{style:{fontWeight:700,fontSize:9,opacity:.7},children:yt(l)}),(0,e.jsx)("span",{children:l})]})},l)})})}),f.length>0&&(0,e.jsx)(H,{icon:(0,e.jsx)(de,{size:12}),label:t("chat.environment.capabilities"),count:f.length,children:(0,e.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:f.map(l=>{let u=bt[l.type]||wt,w=mt[l.type]||(0,e.jsx)(q,{size:12});return(0,e.jsx)(U,{title:l.name||l.type,placement:"top",children:(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:6,fontSize:10,fontWeight:500,color:u.text,background:u.bg,border:`1px solid ${u.border}`,cursor:"default",whiteSpace:"nowrap",lineHeight:"16px"},children:[w,(0,e.jsx)("span",{children:l.name||l.type})]})},l.type)})})}),n.subAgents.length>0&&(0,e.jsx)(H,{icon:(0,e.jsx)(me,{size:12}),label:t("chat.environment.subAgents"),count:n.subAgents.length,children:(0,e.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:n.subAgents.map((l,u)=>{let w=Je(u+3);return(0,e.jsx)(U,{title:l,placement:"top",children:(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:6,fontSize:10,fontWeight:500,color:w.text,background:w.bg,cursor:"default",whiteSpace:"nowrap",lineHeight:"16px"},children:[(0,e.jsx)(me,{size:10}),(0,e.jsx)("span",{children:l})]})},l)})})}),(n.modelKey||n.runConfig)&&(0,e.jsx)(H,{icon:(0,e.jsx)(ce,{size:12}),label:t("chat.environment.runtime"),count:n.modelKey?1:0,children:(0,e.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[n.modelKey&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:6,fontSize:10,fontWeight:500,color:"#4f46e5",background:"rgba(99,102,241,0.08)",border:"1px solid rgba(99,102,241,0.2)",cursor:"default",whiteSpace:"nowrap",lineHeight:"16px"},children:[(0,e.jsx)(q,{size:10}),(0,e.jsx)("span",{children:t("chat.environment.model",{model:n.modelKey})})]}),!!n.runConfig?.databaseKey&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:6,fontSize:10,fontWeight:500,color:"#ea580c",background:"rgba(249,115,22,0.08)",border:"1px solid rgba(249,115,22,0.2)",cursor:"default",whiteSpace:"nowrap",lineHeight:"16px"},children:[(0,e.jsx)(pe,{size:10}),(0,e.jsx)("span",{children:t("chat.environment.db",{db:String(n.runConfig?.databaseKey)})})]}),n.skillCategories&&n.skillCategories.length>0&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:6,fontSize:10,fontWeight:500,color:"#9333ea",background:"rgba(168,85,247,0.08)",border:"1px solid rgba(168,85,247,0.2)",cursor:"default",whiteSpace:"nowrap",lineHeight:"16px"},children:[(0,e.jsx)(ue,{size:10}),(0,e.jsx)("span",{children:t("chat.environment.skills",{skills:n.skillCategories.join(", ")})})]})]})}),D&&(0,e.jsx)(H,{icon:(0,e.jsx)(fe,{size:12}),label:t("chat.environment.channels"),count:0,children:(0,e.jsx)(ye,{type:"secondary",style:{fontSize:10,fontStyle:"italic"},children:t("chat.environment.noChannels")})})]})]})})};var o=A(E()),{Text:Y}=Q,ht=300;function Ze(r){if(typeof r=="string")try{let t=JSON.parse(r);return t&&typeof t=="object"&&!Array.isArray(t)?t:null}catch{return null}return r&&typeof r=="object"&&!Array.isArray(r)?r:null}function kt(r){let t=null;if(typeof r=="string")try{t=JSON.parse(r)}catch{return null}else r&&typeof r=="object"&&(t=r);if(!t)return null;if(t.type!=="workflow")return console.warn("[extractDSL] type is not 'workflow':",t.type),null;if(typeof t.workflowYaml!="string")return console.warn("[extractDSL] workflowYaml not found or not a string, keys:",Object.keys(t)),null;try{return be(t.workflowYaml)}catch(n){return console.error("[extractDSL] expandWorkflow failed:",n.message,n),null}}function xt({workflows:r,selectedId:t,onSelect:n,onCreate:f,onDelete:D,dsl:l,agentNameMap:u,onSpecClick:w,environmentConfig:g}){let m=P(),y=r.find(p=>p.id===t),[b,S]=(0,i.useState)(!0),[h,k]=(0,i.useState)(""),z=(0,i.useMemo)(()=>{let p=h.trim().toLowerCase();return p?r.filter(x=>x.name.toLowerCase().includes(p)||x.description.toLowerCase().includes(p)):r},[r,h]);(0,i.useEffect)(()=>{t?S(!1):(S(!0),k(""))},[t]);let I=p=>{n(p),S(!1)};return(0,o.jsx)("div",{style:{display:"flex",height:"100%",width:"100%"},children:(0,o.jsxs)("div",{style:{flex:1,position:"relative"},children:[y?(0,o.jsxs)(o.Fragment,{children:[l?(0,o.jsx)(Ue,{dsl:l,agentNameMap:u}):(0,o.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:(0,o.jsx)(ae,{tip:m("chatWorkspace.workflowAutomation.loadingDsl")})}),!b&&(0,o.jsx)("div",{style:{position:"absolute",top:12,left:12,zIndex:10},children:(0,o.jsx)($,{type:"default",icon:(0,o.jsx)(De,{}),onClick:()=>S(!0),style:{width:32,height:32,borderRadius:10,boxShadow:"0 2px 12px rgba(0,0,0,0.08)",border:"1px solid #f0f0f0",background:"rgba(255,255,255,0.95)",color:"#6366f1",display:"flex",alignItems:"center",justifyContent:"center"}})}),(0,o.jsxs)("div",{style:{position:"absolute",top:12,left:b?12:56,zIndex:10,display:"flex",alignItems:"center",gap:6,height:32,padding:"0 14px",background:"rgba(255,255,255,0.95)",borderRadius:10,boxShadow:"0 2px 12px rgba(0,0,0,0.08)",border:"1px solid #f0f0f0"},children:[(0,o.jsx)(Z,{size:16,color:"#6366f1"}),(0,o.jsx)(Y,{strong:!0,style:{fontSize:13},children:y.name}),(0,o.jsx)(Me,{style:{color:"#6366f1",cursor:"pointer",fontSize:15},onClick:w})]}),(0,o.jsx)("div",{style:{position:"absolute",top:12,right:12,zIndex:10,display:"flex",alignItems:"center",height:32,padding:"0 14px",background:"rgba(255,255,255,0.95)",borderRadius:10,boxShadow:"0 2px 12px rgba(0,0,0,0.08)",border:"1px solid #f0f0f0"},children:(0,o.jsx)(Ae,{title:m("chatWorkspace.workflowAutomation.deleteTitle"),description:m("chatWorkspace.workflowAutomation.deleteBody"),onConfirm:()=>D(y.id),okText:m("common.delete"),cancelText:m("common.cancel"),okButtonProps:{danger:!0},children:(0,o.jsx)(Te,{style:{color:"#ff4d4f",cursor:"pointer",fontSize:15}})})}),!b&&(0,o.jsx)("div",{style:{position:"absolute",top:52,left:b?12:56,zIndex:20},children:(0,o.jsx)(Qe,{graphDef:g},y.id)})]}):(0,o.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:(0,o.jsx)(G,{description:m("chatWorkspace.workflowAutomation.selectWorkflow")})}),b&&(0,o.jsxs)(o.Fragment,{children:[t&&(0,o.jsx)("div",{onClick:()=>S(!1),style:{position:"absolute",inset:0,zIndex:25,background:"transparent"}}),(0,o.jsxs)(Ie,{size:"small",title:(0,o.jsx)(Y,{strong:!0,style:{fontSize:15,color:"#1a1a1a"},children:m("chatWorkspace.workflowAutomation.title")}),extra:(0,o.jsx)($,{type:"text",size:"small",icon:(0,o.jsx)(le,{}),onClick:f,style:{color:"#6366f1"}}),styles:{body:{padding:"12px 16px 16px"},header:{padding:"14px 16px 10px",borderBottom:"1px solid rgba(0,0,0,0.04)"}},style:{position:"absolute",left:16,top:t?56:48,bottom:16,width:300,zIndex:30,borderRadius:16,boxShadow:"0 4px 24px rgba(0,0,0,0.12)",border:"1px solid #f0f0f0",overflow:"auto",background:"rgba(255, 255, 255, 0.92)"},children:[(0,o.jsx)("div",{style:{marginBottom:12},children:(0,o.jsx)(J,{prefix:(0,o.jsx)(Le,{style:{color:"#bbb"}}),placeholder:m("chatWorkspace.workflowAutomation.filterPlaceholder"),value:h,onChange:p=>k(p.target.value),allowClear:!0,size:"small",style:{borderRadius:10,border:"1px solid rgba(0,0,0,0.06)"}})}),z.length===0?(0,o.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"32px 16px",color:"#bbb"},children:[(0,o.jsx)(Z,{size:28,style:{marginBottom:10,opacity:.4}}),(0,o.jsx)(Y,{type:"secondary",style:{fontSize:13},children:h.trim()?m("chatWorkspace.workflowAutomation.noMatch"):m("chatWorkspace.workflowAutomation.emptyTitle")})]}):z.map(p=>{let x=t===p.id;return(0,o.jsxs)("div",{onClick:()=>I(p.id),style:{display:"flex",alignItems:"center",gap:12,padding:"13px 15px",borderRadius:12,cursor:"pointer",transition:"all 0.2s ease",background:x?"rgba(99, 102, 241, 0.07)":"rgba(255, 255, 255, 0.5)",border:x?"1px solid rgba(99, 102, 241, 0.25)":"1px solid transparent",marginBottom:6},onMouseEnter:R=>{x||(R.currentTarget.style.background="rgba(255, 255, 255, 0.92)",R.currentTarget.style.boxShadow="0 2px 8px rgba(0,0,0,0.05)",R.currentTarget.style.transform="translateY(-1px)",R.currentTarget.style.borderColor="rgba(0,0,0,0.06)")},onMouseLeave:R=>{x||(R.currentTarget.style.background="rgba(255, 255, 255, 0.5)",R.currentTarget.style.boxShadow="none",R.currentTarget.style.transform="translateY(0)",R.currentTarget.style.borderColor="transparent")},children:[(0,o.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:38,height:38,borderRadius:10,background:x?"rgba(99, 102, 241, 0.12)":"rgba(0, 0, 0, 0.04)",flexShrink:0,transition:"background 0.2s ease"},children:(0,o.jsx)(Z,{size:18,color:x?"#6366f1":"#888"})}),(0,o.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,o.jsx)(Y,{strong:!0,ellipsis:{tooltip:p.name},style:{fontSize:14,color:x?"#6366f1":"#1a1a1a",transition:"color 0.2s ease"},children:p.name}),p.description&&(0,o.jsx)("div",{style:{fontSize:12,color:"#999",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:3,lineHeight:"18px"},children:p.description})]})]},p.id)})]})]})]})})}var vt=()=>{let r=P(),{get:t,del:n}=te(),{workspaceId:f,trainingProjects:D,loading:l}=ee(),[u,w]=(0,i.useState)([]),[g,m]=(0,i.useState)(null),[y,b]=(0,i.useState)(null),[S,h]=(0,i.useState)(null),[k,z]=(0,i.useState)([]),[I,p]=(0,i.useState)(new Map),x=(0,i.useCallback)(async()=>{try{let s=await t("/api/assistants");if(s.success&&s.data?.records){let c=[],a=new Map;for(let d of s.data.records){if(d.id&&d.name){let v=typeof d.graphDefinition=="object"&&d.graphDefinition!==null?d.graphDefinition:void 0;a.set(d.id,{name:d.name,type:v?.type??"unknown"})}if(d.graphDefinition)if(typeof d.graphDefinition=="string")try{c.push(JSON.parse(d.graphDefinition))}catch{}else typeof d.graphDefinition=="object"&&c.push(d.graphDefinition)}z(c),p(a)}}catch{}},[t]),[R,he]=(0,i.useState)(!0),[ne,et]=(0,i.useState)(420),_=(0,i.useRef)(null),[tt,ot]=(0,i.useState)(!0),[ke,xe]=(0,i.useState)(null),[nt,ve]=(0,i.useState)(!1),[Ce,F]=(0,i.useState)(!1),[rt,Se]=(0,i.useState)(null),it=(0,i.useMemo)(()=>["create_workflow","update_workflow","validate_workflow","create_agent","update_agent","delete_agent"],[]),T=(0,i.useCallback)(async()=>{let s=await t("/api/assistants");if(s.success&&s.data?.records){let c=s.data.records.filter(a=>(Ze(a.graphDefinition)??void 0)?.type==="workflow").map(a=>{let d=Ze(a.graphDefinition)??void 0,v=typeof d?.workflowYaml=="string"?d.workflowYaml:"",B=d?.metadata,N=0;try{N=be(v).nodes.filter(W=>W.type!=="terminal").length}catch{}return{id:a.id,name:a.name,description:a.description||"",type:"workflow",stepCount:N,trainingProjectId:typeof B?.trainingProjectId=="string"?B.trainingProjectId:void 0}});w(c)}xe(null)},[t]),K=(0,i.useCallback)(async s=>{try{let c=await t(`/api/assistants/${s}`);if(c.success&&c.data){let a=c.data.graphDefinition,d=kt(a);if(b(d),!a)h(null);else if(typeof a=="string")try{h(JSON.parse(a))}catch{h(null)}else h(typeof a=="object"?a:null)}}catch{b(null),h(null)}},[t]);(0,i.useEffect)(()=>{let s=!1;return(async()=>{try{await T(),await x()}catch(a){s||xe(a instanceof Error?a.message:r("chatWorkspace.workflowAutomation.loadFailed"))}finally{s||ot(!1)}})(),()=>{s=!0}},[T]),(0,i.useEffect)(()=>{g?K(g):b(null)},[g,K]);let st=(0,i.useCallback)(s=>{s.preventDefault(),_.current={startX:s.clientX,startWidth:ne}},[ne]);(0,i.useEffect)(()=>{let s=a=>{if(!_.current)return;let d=_.current.startX-a.clientX,v=Math.min(900,Math.max(400,_.current.startWidth+d));et(v)},c=()=>{_.current=null};return window.addEventListener("mousemove",s),window.addEventListener("mouseup",c),()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",c)}},[]);let L=(0,i.useRef)(null),Re=(0,i.useRef)({fetchWorkflows:T,fetchDSL:K});Re.current={fetchWorkflows:T,fetchDSL:K};let We=(0,i.useRef)(g);We.current=g;let at=(0,i.useCallback)(()=>{L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{L.current=null;let{fetchWorkflows:s,fetchDSL:c}=Re.current;s().catch(d=>{console.warn("Failed to refresh workflows:",d)});let a=We.current;a&&c(a).catch(d=>{console.warn("Failed to refresh workflow DSL:",d)})},ht)},[]);(0,i.useEffect)(()=>()=>{L.current&&(clearTimeout(L.current),L.current=null)},[]);let lt=(0,i.useCallback)(s=>{m(s)},[]),ze=(0,i.useCallback)((s,c,a)=>{F(!1),T().then(()=>{m(s),a&&w(d=>d.map(v=>v.id===s?{...v,trainingProjectId:a}:v)),c&&Se({requestId:s,content:c})})},[T]),dt=(0,i.useCallback)(async s=>{await n(`/api/assistants/${s}`),g===s&&m(null),await T()},[n,T,g]),O=(0,i.useMemo)(()=>u.find(s=>s.id===g)||null,[u,g]),re=O?.trainingProjectId??D[0]?.id??null,ct=(0,i.useMemo)(()=>g&&O?{id:g,name:O.name,type:"workflow"}:null,[g,O]),pt=(0,i.useMemo)(()=>{let s=y?.nodes.filter(C=>C.type!=="terminal"&&C.ref).map(C=>C.ref).filter((C,W,M)=>M.indexOf(C)===W)??[];if(s.length===0)return S;let c=k.filter(C=>{let W=C.key;return W&&s.includes(W)});if(c.length===0)return S;let a={...S??{}},d=new Set(a.tools??[]),v=[...a.middleware??[]],B=new Set(a.subAgents??[]),N=new Set(v.map(C=>C.type).filter(Boolean));for(let C of c){let W=C;for(let M of W.tools??[])d.add(M);for(let M of W.middleware??[]){let ie=M.type;ie&&!N.has(ie)&&(v.push(M),N.add(ie))}for(let M of W.subAgents??[])B.add(M)}return a.tools=Array.from(d),a.middleware=v,a.subAgents=Array.from(B),a},[y,S,k]);return tt?(0,o.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:(0,o.jsx)(ae,{size:"large",tip:r("chatWorkspace.workflowAutomation.loading")})}):ke?(0,o.jsx)(G,{description:ke}):u.length===0?(0,o.jsxs)("div",{style:{width:"100%",height:"100%"},children:[(0,o.jsx)(we,{open:Ce,onCancel:()=>F(!1),onCreated:ze,type:"workflow"}),(0,o.jsx)(G,{description:r("chatWorkspace.workflowAutomation.noDefinitions"),children:(0,o.jsx)($,{type:"primary",icon:(0,o.jsx)(le,{}),onClick:()=>F(!0),children:r("chatWorkspace.workflowAutomation.createWorkflow")})})]}):(0,o.jsxs)("div",{style:{width:"100%",height:"100%"},children:[(0,o.jsx)(we,{open:Ce,onCancel:()=>F(!1),onCreated:ze,type:"workflow"}),(0,o.jsx)(V,{title:O?.name,open:nt,onCancel:()=>ve(!1),footer:null,width:"85vw",centered:!0,styles:{body:{maxHeight:"calc(85vh - 120px)",overflow:"auto",padding:"12px 24px 24px"}},children:O?.description?(0,o.jsx)(He,{content:O.description}):(0,o.jsx)(Y,{type:"secondary",children:r("chatWorkspace.workflowAutomation.noDescription")})}),(0,o.jsx)(Ye,{children:(0,o.jsxs)("div",{style:{height:"100%",width:"100%",position:"relative",overflow:"hidden"},children:[(0,o.jsx)(xt,{workflows:u,selectedId:g,onSelect:lt,onCreate:()=>F(!0),onDelete:dt,dsl:y,agentNameMap:I,onSpecClick:()=>ve(!0),environmentConfig:pt}),!R&&g&&(0,o.jsx)("div",{style:{position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",zIndex:20},children:(0,o.jsx)("div",{onClick:()=>he(!0),style:{writingMode:"vertical-rl",textOrientation:"mixed",padding:"16px 8px",background:"#6366f1",color:"#fff",borderRadius:"8px 0 0 8px",cursor:"pointer",fontSize:12,fontWeight:500,userSelect:"none"},children:r("chatWorkspace.workflowAutomation.copilot")})}),R&&g&&re&&!l&&(0,o.jsxs)("div",{style:{position:"absolute",right:16,top:48,bottom:12,zIndex:15,width:ne,borderRadius:16,overflow:"hidden",boxShadow:"0 4px 24px rgba(0,0,0,0.12)"},children:[(0,o.jsx)("div",{onMouseDown:st,style:{position:"absolute",left:0,top:0,bottom:0,width:6,cursor:"ew-resize",zIndex:2,background:"transparent"}}),(0,o.jsx)(Ke,{defaultWorkspaceId:f??void 0,defaultProjectId:re??void 0,children:(0,o.jsx)(Ge,{workflowContext:ct,onClose:()=>he(!1),onToolCompleted:s=>{it.includes(s)&&at()},initialMessageRequest:rt,onInitialMessageSubmitted:s=>Se(c=>c?.requestId===s?null:c)})},`${f??"default"}:${re??"default"}`)]})]})})]})},Qt=vt;export{vt as WorkflowAutomationView,Qt as default};
@@ -0,0 +1 @@
1
+ import"./embed-page-chunk-ZQQFWEWO.js";import"./embed-page-chunk-KGP2RGEC.js";import"./embed-page-chunk-AQ7P7MPQ.js";import"./embed-page-chunk-3IP6ESHH.js";import"./embed-page-chunk-FYBEULVS.js";import"./embed-page-chunk-LDFGGZC6.js";import"./embed-page-chunk-ZZCMWB6F.js";import{a}from"./embed-page-chunk-W4PSILFT.js";import"./embed-page-chunk-DIE6AVGX.js";import"./embed-page-chunk-6E33CLHM.js";import"./embed-page-chunk-5DAOHO64.js";import"./embed-page-chunk-UZW2LQZV.js";import"./embed-page-chunk-4SGVKO3D.js";import"./embed-page-chunk-ESAZNCCX.js";import"./embed-page-chunk-5IG7MZQF.js";import"./embed-page-chunk-R2K4OIQO.js";import"./embed-page-chunk-NMZP7U6I.js";import"./embed-page-chunk-ORPDSJ5S.js";import"./embed-page-chunk-DHGHAGLL.js";import"./embed-page-chunk-UR5VOXA3.js";import"./embed-page-chunk-LL4XKLOG.js";import"./embed-page-chunk-UBWHZLJN.js";import"./embed-page-chunk-EAUQPBSN.js";import"./embed-page-chunk-GU7JLLYO.js";import"./embed-page-chunk-TPQGFG2C.js";import"./embed-page-chunk-HWNFA7PS.js";import"./embed-page-chunk-N252QSMT.js";import"./embed-page-chunk-AEDAOTEO.js";import"./embed-page-chunk-H7XTOBKB.js";import"./embed-page-chunk-IHNNPY3P.js";import"./embed-page-chunk-PEFXE5Y4.js";import"./embed-page-chunk-HQCMCYUS.js";import"./embed-page-chunk-BBSIPZIJ.js";import"./embed-page-chunk-Q3AOMIJ7.js";import"./embed-page-chunk-JUZFORQA.js";import"./embed-page-chunk-43APLD2U.js";import"./embed-page-chunk-7IYYKQJE.js";import"./embed-page-chunk-4PR66FMJ.js";import"./embed-page-chunk-ER4O2WLO.js";import"./embed-page-chunk-Z26BSJ5Y.js";import"./embed-page-chunk-LLFEIUVK.js";import"./embed-page-chunk-FTXNVWT5.js";import"./embed-page-chunk-TMUCZ7XO.js";import"./embed-page-chunk-BYGKM25Z.js";import"./embed-page-chunk-ZR7ZLGLV.js";import"./embed-page-chunk-M4ACA43K.js";import"./embed-page-chunk-5OTSEOBG.js";import"./embed-page-chunk-5HA2MCVW.js";import"./embed-page-chunk-FSDLV5QO.js";import"./embed-page-chunk-YBPVSBMU.js";import"./embed-page-chunk-GPISFLXW.js";import"./embed-page-chunk-KZWWYO7Z.js";import"./embed-page-chunk-3DDNDQND.js";import"./embed-page-chunk-UIZLGSJE.js";import"./embed-page-chunk-HNWETJWB.js";import"./embed-page-chunk-IPMWXKCK.js";import"./embed-page-chunk-NNNI4647.js";import"./embed-page-chunk-2YRVPZIU.js";import"./embed-page-chunk-BRF3QA4U.js";import"./embed-page-chunk-Y2JWLZJF.js";import"./embed-page-chunk-NLMEH7HI.js";import"./embed-page-chunk-APIN6IE2.js";import"./embed-page-chunk-PO2WVZC2.js";import"./embed-page-chunk-CGMYXHWK.js";import"./embed-page-chunk-INGZ5SYE.js";import"./embed-page-chunk-UGCW7PZD.js";import"./embed-page-chunk-WQOZWRIS.js";import"./embed-page-chunk-BIXWOREM.js";import"./embed-page-chunk-CYZTUSN2.js";import"./embed-page-chunk-BO56ESC4.js";import"./embed-page-chunk-K7I5Z2RN.js";import"./embed-page-chunk-PXADN2PY.js";import"./embed-page-chunk-YNIEMXW5.js";import"./embed-page-chunk-734LUAPQ.js";import"./embed-page-chunk-YPK6G5D7.js";import"./embed-page-chunk-3QOIYWK3.js";import"./embed-page-chunk-7TY2R7O2.js";import"./embed-page-chunk-WCKHIRD5.js";import"./embed-page-chunk-66JWK64A.js";import"./embed-page-chunk-EGTJFOFF.js";import"./embed-page-chunk-J4VBM2JB.js";import"./embed-page-chunk-CIVBRTV6.js";import"./embed-page-chunk-5LZHM64O.js";import"./embed-page-chunk-AB3Q2HOO.js";import"./embed-page-chunk-AEGLPY52.js";import"./embed-page-chunk-JADTV5YD.js";import"./embed-page-chunk-SAML73QO.js";import"./embed-page-chunk-FBXKGHOH.js";import"./embed-page-chunk-XWAJRAFC.js";import"./embed-page-chunk-II6ODJLE.js";import"./embed-page-chunk-Z2GE34ES.js";import"./embed-page-chunk-SMZUIXFD.js";import"./embed-page-chunk-4APB7U5B.js";import"./embed-page-chunk-N7NXBLSR.js";import"./embed-page-chunk-TENLHB44.js";import"./embed-page-chunk-AAU4RSSU.js";import"./embed-page-chunk-CZXPKAAI.js";import"./embed-page-chunk-RNOETEGH.js";import"./embed-page-chunk-KQNRWZKR.js";import"./embed-page-chunk-33GTW5LX.js";import"./embed-page-chunk-EY64QEHF.js";import"./embed-page-chunk-NIFSD4XH.js";import"./embed-page-chunk-OAUK7LXS.js";import"./embed-page-chunk-QNIB3Q7U.js";import"./embed-page-chunk-GKA7H24K.js";import"./embed-page-chunk-CUEEKFI2.js";import"./embed-page-chunk-DYPHXOEP.js";import"./embed-page-chunk-Q6ZPKMOZ.js";import"./embed-page-chunk-TPGW6RUI.js";import"./embed-page-chunk-3J7LPOGR.js";import"./embed-page-chunk-DXVMFTPC.js";import"./embed-page-chunk-O6DJHMEC.js";import"./embed-page-chunk-ANZXYPYQ.js";import"./embed-page-chunk-WUYZIBLV.js";import"./embed-page-chunk-OZUIA6GJ.js";import"./embed-page-chunk-XNZ46IEF.js";import"./embed-page-chunk-4XVBSVFM.js";import"./embed-page-chunk-BDR2AV4C.js";import"./embed-page-chunk-6633JIZI.js";import"./embed-page-chunk-DYBQVRXS.js";import"./embed-page-chunk-AO6KUNOD.js";import"./embed-page-chunk-XUZKZF3V.js";import"./embed-page-chunk-PJJPSDVD.js";import"./embed-page-chunk-ICJOJGQ6.js";import"./embed-page-chunk-TLWGSINF.js";import"./embed-page-chunk-R5I2GTYT.js";import"./embed-page-chunk-447KJWVF.js";import"./embed-page-chunk-IIIA5HUO.js";import"./embed-page-chunk-DZRJEWQO.js";import"./embed-page-chunk-2GGHQJ6Z.js";import"./embed-page-chunk-IIYOOZDE.js";import"./embed-page-chunk-XYCU2ZON.js";import"./embed-page-chunk-4LC4UT4R.js";import"./embed-page-chunk-HK4QMNL5.js";import"./embed-page-chunk-VEYJHY36.js";import"./embed-page-chunk-KM5NL7BL.js";import"./embed-page-chunk-L3RQ76LD.js";import"./embed-page-chunk-TYA3PYZB.js";import"./embed-page-chunk-53QS4RRO.js";import"./embed-page-chunk-6VRE3UPC.js";import"./embed-page-chunk-A3QFY3IA.js";import"./embed-page-chunk-YHEFVON2.js";import"./embed-page-chunk-75BP54HX.js";import"./embed-page-chunk-IYK5VAB3.js";import"./embed-page-chunk-ARRA262W.js";import"./embed-page-chunk-QVHTN5HT.js";import"./embed-page-chunk-KUTM5AGJ.js";import"./embed-page-chunk-GFOWXZE5.js";import"./embed-page-chunk-WYJNNBFP.js";import"./embed-page-chunk-7CW4T6JX.js";import"./embed-page-chunk-LMLHHN2B.js";import"./embed-page-chunk-T6QXBMXO.js";import"./embed-page-chunk-CT5EIC3O.js";import"./embed-page-chunk-B537QK4H.js";import"./embed-page-chunk-AQLFD3FB.js";import"./embed-page-chunk-Q2YEQQJF.js";import"./embed-page-chunk-J7KNZGPV.js";import"./embed-page-chunk-6DD7CBYV.js";import"./embed-page-chunk-VP2J7NES.js";import"./embed-page-chunk-7I5CUKLE.js";import"./embed-page-chunk-WNEY2A2R.js";import"./embed-page-chunk-TFSDCDJS.js";import"./embed-page-chunk-R54S6SKK.js";import"./embed-page-chunk-YEHTVTMO.js";import"./embed-page-chunk-RPK5SOLP.js";import"./embed-page-chunk-MEC3JUW7.js";import"./embed-page-chunk-UJODN4PG.js";import"./embed-page-chunk-M7F46E23.js";import"./embed-page-chunk-LPXAKW7Q.js";import"./embed-page-chunk-DEHJLLKN.js";import"./embed-page-chunk-6AF3OC6E.js";import"./embed-page-chunk-OJ7436DP.js";import"./embed-page-chunk-QQUV5KZD.js";import"./embed-page-chunk-VNK6MED4.js";import"./embed-page-chunk-342GWWY6.js";import"./embed-page-chunk-4O7YNJLI.js";import"./embed-page-chunk-NHOBB2JQ.js";import"./embed-page-chunk-ARM7QQNJ.js";import"./embed-page-chunk-6XNKALVC.js";import"./embed-page-chunk-GSWEZJ66.js";import"./embed-page-chunk-CTC4RKCL.js";import"./embed-page-chunk-M5HO3OG6.js";import"./embed-page-chunk-5HNRARTT.js";import"./embed-page-chunk-OEC4EWNI.js";import"./embed-page-chunk-G5KW2SOV.js";import"./embed-page-chunk-UCGT4CTV.js";import"./embed-page-chunk-QANF3D34.js";import"./embed-page-chunk-RN7JLKLZ.js";import"./embed-page-chunk-TWU6UJLL.js";import"./embed-page-chunk-FJ3EESJB.js";import"./embed-page-chunk-NG7LKEPN.js";import"./embed-page-chunk-NMUKLFBY.js";import"./embed-page-chunk-UZNSI2X3.js";import"./embed-page-chunk-XPDEOKHX.js";import"./embed-page-chunk-SL4X4KPS.js";import"./embed-page-chunk-2REOJOLY.js";import"./embed-page-chunk-ETY7U4DI.js";import"./embed-page-chunk-ACIRZYZQ.js";import"./embed-page-chunk-TIGSOALR.js";import"./embed-page-chunk-NNZA747K.js";import"./embed-page-chunk-34RH2U7Z.js";import"./embed-page-chunk-LW3LUJEG.js";import"./embed-page-chunk-LH2NUQ2C.js";import"./embed-page-chunk-DQ4UEELI.js";import"./embed-page-chunk-CADGB443.js";import"./embed-page-chunk-NBNJGF7O.js";import"./embed-page-chunk-7BEP247X.js";import"./embed-page-chunk-ZNWEXQQ4.js";import"./embed-page-chunk-I5KTSZJX.js";import"./embed-page-chunk-JOJ4VSO5.js";import"./embed-page-chunk-HVN56UNP.js";import"./embed-page-chunk-FMMAQPSK.js";import"./embed-page-chunk-IK2TPQVX.js";import"./embed-page-chunk-XZYJX7MY.js";import"./embed-page-chunk-TUFYJMMA.js";import"./embed-page-chunk-LRB5IXLV.js";import"./embed-page-chunk-6DYN2PCR.js";import"./embed-page-chunk-BXUFKFRH.js";import"./embed-page-chunk-E4OFRMJJ.js";import"./embed-page-chunk-A5CPK26D.js";import"./embed-page-chunk-LJJJJZT7.js";import"./embed-page-chunk-XO5WZF3D.js";import"./embed-page-chunk-LJBLK3MD.js";import"./embed-page-chunk-XRRCORI5.js";import"./embed-page-chunk-VULBATQG.js";import"./embed-page-chunk-X55NDWBH.js";import"./embed-page-chunk-WDS66MAN.js";import"./embed-page-chunk-IPI53MN3.js";import"./embed-page-chunk-5YNTYDFR.js";import"./embed-page-chunk-QHV7PE5D.js";import"./embed-page-chunk-TSZIWR3X.js";import"./embed-page-chunk-GAF3UVZE.js";import"./embed-page-chunk-7AKQRM6L.js";import"./embed-page-chunk-7GLQRV3J.js";import"./embed-page-chunk-XZ6CLWS2.js";import"./embed-page-chunk-JNXBKMN6.js";import"./embed-page-chunk-ARHDAWDT.js";import"./embed-page-chunk-3WBHNFJP.js";import"./embed-page-chunk-77SKWVKH.js";import"./embed-page-chunk-72JNWX43.js";import"./embed-page-chunk-VUOXEXHU.js";import"./embed-page-chunk-H3HFE6RK.js";import"./embed-page-chunk-SMMEMIZS.js";import"./embed-page-chunk-YFWCKZW7.js";import"./embed-page-chunk-CN3CMET4.js";import"./embed-page-chunk-ESCA5JCS.js";import"./embed-page-chunk-WAANDEAQ.js";import"./embed-page-chunk-ETP6AXEM.js";import"./embed-page-chunk-ISY7S7N6.js";import"./embed-page-chunk-SYAPUMNM.js";import"./embed-page-chunk-4BRWUEYH.js";import"./embed-page-chunk-7Q3EEWYO.js";import"./embed-page-chunk-PLAF2Q2L.js";import"./embed-page-chunk-U32PAI3Y.js";import"./embed-page-chunk-JYEMOI5G.js";import"./embed-page-chunk-ABIN3BPL.js";import"./embed-page-chunk-LOLMAI3V.js";import"./embed-page-chunk-6NWENUQ7.js";import"./embed-page-chunk-Y4KTS6EE.js";import"./embed-page-chunk-6OKUWTCF.js";import"./embed-page-chunk-JYQTTU7F.js";import"./embed-page-chunk-LWERP7BS.js";import"./embed-page-chunk-EBXTVXZF.js";import"./embed-page-chunk-IGBRMGDS.js";import"./embed-page-chunk-2XLPEIWW.js";import"./embed-page-chunk-H7HZ35QN.js";import"./embed-page-chunk-HQUXJKTG.js";import"./embed-page-chunk-4OTU4CRR.js";import"./embed-page-chunk-IFEQPNI2.js";import"./embed-page-chunk-FEOK4OPE.js";import"./embed-page-chunk-3C32LJTO.js";import"./embed-page-chunk-6G24DMH3.js";import"./embed-page-chunk-FM5K6PQS.js";import"./embed-page-chunk-XAJFFWM3.js";import"./embed-page-chunk-R672RZXS.js";import"./embed-page-chunk-EY7WOIDX.js";import"./embed-page-chunk-G5HXFDFC.js";import"./embed-page-chunk-2VJ7T35I.js";import"./embed-page-chunk-E7ECPW5G.js";import"./embed-page-chunk-INUQ73SI.js";import"./embed-page-chunk-PVL27S2O.js";import"./embed-page-chunk-3KBA5YLX.js";import"./embed-page-chunk-OPME5GF2.js";import"./embed-page-chunk-SWGBMELE.js";import"./embed-page-chunk-JEW2Y2ED.js";import"./embed-page-chunk-3D3RUB6Q.js";import"./embed-page-chunk-HVTV25TI.js";import"./embed-page-chunk-FVK265KY.js";import"./embed-page-chunk-CDFDSWNI.js";import"./embed-page-chunk-ZT2EZUXI.js";import"./embed-page-chunk-CUHPLIQJ.js";import"./embed-page-chunk-ORPUVSKY.js";import"./embed-page-chunk-2DKYYWQC.js";import"./embed-page-chunk-HJJHFV6J.js";import"./embed-page-chunk-BTZ6QKA5.js";import"./embed-page-chunk-PKNTJERD.js";import"./embed-page-chunk-4C2ZTZLC.js";import"./embed-page-chunk-7ASML425.js";import"./embed-page-chunk-QRPDJVB7.js";import"./embed-page-chunk-QBTAJ2YI.js";export{a as refractor};