@hotmeshio/long-tail 0.4.24 → 0.5.1

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 (229) hide show
  1. package/README.md +41 -1
  2. package/build/api/yaml-workflows/crud.d.ts +1 -0
  3. package/build/api/yaml-workflows/crud.js +2 -2
  4. package/build/lib/db/schemas/011_escalation_index_audit.sql +50 -0
  5. package/build/routes/mcp-endpoint.js +3 -5
  6. package/build/services/escalation/sql.d.ts +2 -2
  7. package/build/services/escalation/sql.js +2 -2
  8. package/build/services/topics/system-topics.js +27 -27
  9. package/build/services/yaml-workflow/invoke.js +77 -6
  10. package/build/start/graph-workflows.d.ts +14 -0
  11. package/build/start/graph-workflows.js +126 -0
  12. package/build/start/workers.js +14 -0
  13. package/build/system/mcp-servers/admin/schemas.d.ts +2 -2
  14. package/build/tsconfig.tsbuildinfo +1 -1
  15. package/build/types/startup.d.ts +28 -0
  16. package/dashboard/dist/assets/{AdminDashboard-CgJC8ZZF.js → AdminDashboard-CMzR4d-w.js} +2 -2
  17. package/dashboard/dist/assets/{AdminDashboard-CgJC8ZZF.js.map → AdminDashboard-CMzR4d-w.js.map} +1 -1
  18. package/dashboard/dist/assets/{AgentConfigPage-Bjl2Lsvo.js → AgentConfigPage-DHCpN4xk.js} +6 -6
  19. package/dashboard/dist/assets/{AgentConfigPage-Bjl2Lsvo.js.map → AgentConfigPage-DHCpN4xk.js.map} +1 -1
  20. package/dashboard/dist/assets/{AgentDetailPage-D5dHrfaM.js → AgentDetailPage-CSrejvSl.js} +3 -3
  21. package/dashboard/dist/assets/{AgentDetailPage-D5dHrfaM.js.map → AgentDetailPage-CSrejvSl.js.map} +1 -1
  22. package/dashboard/dist/assets/{AgentsPage-Mom3N1Av.js → AgentsPage-ntuzWHCD.js} +2 -2
  23. package/dashboard/dist/assets/{AgentsPage-Mom3N1Av.js.map → AgentsPage-ntuzWHCD.js.map} +1 -1
  24. package/dashboard/dist/assets/{AvailableEscalationsPage-B2ZAb41C.js → AvailableEscalationsPage-Ci24fdxC.js} +2 -2
  25. package/dashboard/dist/assets/{AvailableEscalationsPage-B2ZAb41C.js.map → AvailableEscalationsPage-Ci24fdxC.js.map} +1 -1
  26. package/dashboard/dist/assets/{BotPicker-dCvnjynP.js → BotPicker-lj42d48P.js} +2 -2
  27. package/dashboard/dist/assets/{BotPicker-dCvnjynP.js.map → BotPicker-lj42d48P.js.map} +1 -1
  28. package/dashboard/dist/assets/CapabilitiesPage-Bea9yLmU.js +2 -0
  29. package/dashboard/dist/assets/CapabilitiesPage-Bea9yLmU.js.map +1 -0
  30. package/dashboard/dist/assets/{CollapsibleSection-bW0UZN9b.js → CollapsibleSection-BeBsI1M4.js} +2 -2
  31. package/dashboard/dist/assets/{CollapsibleSection-bW0UZN9b.js.map → CollapsibleSection-BeBsI1M4.js.map} +1 -1
  32. package/dashboard/dist/assets/{CredentialsPage-DVOK3aaR.js → CredentialsPage-BDzFa3HV.js} +2 -2
  33. package/dashboard/dist/assets/{CredentialsPage-DVOK3aaR.js.map → CredentialsPage-BDzFa3HV.js.map} +1 -1
  34. package/dashboard/dist/assets/{CronLabel-Cv5em7OP.js → CronLabel-DeNm1I4r.js} +2 -2
  35. package/dashboard/dist/assets/{CronLabel-Cv5em7OP.js.map → CronLabel-DeNm1I4r.js.map} +1 -1
  36. package/dashboard/dist/assets/{CustomDurationPicker-Dy4NBqhZ.js → CustomDurationPicker-C2OH9YcV.js} +2 -2
  37. package/dashboard/dist/assets/{CustomDurationPicker-Dy4NBqhZ.js.map → CustomDurationPicker-C2OH9YcV.js.map} +1 -1
  38. package/dashboard/dist/assets/{DropZone-CptiQ0wc.js → DropZone-Dwpgbueb.js} +2 -2
  39. package/dashboard/dist/assets/{DropZone-CptiQ0wc.js.map → DropZone-Dwpgbueb.js.map} +1 -1
  40. package/dashboard/dist/assets/{ElapsedCell-TQqWaVRq.js → ElapsedCell-WdzqA0dR.js} +2 -2
  41. package/dashboard/dist/assets/{ElapsedCell-TQqWaVRq.js.map → ElapsedCell-WdzqA0dR.js.map} +1 -1
  42. package/dashboard/dist/assets/{EscalationsOverview-Cv5UvuHI.js → EscalationsOverview-BIEeflEV.js} +2 -2
  43. package/dashboard/dist/assets/{EscalationsOverview-Cv5UvuHI.js.map → EscalationsOverview-BIEeflEV.js.map} +1 -1
  44. package/dashboard/dist/assets/{EventTable-Doky6fCO.js → EventTable-NIhWP__B.js} +2 -2
  45. package/dashboard/dist/assets/{EventTable-Doky6fCO.js.map → EventTable-NIhWP__B.js.map} +1 -1
  46. package/dashboard/dist/assets/GraphInvokePage-DtAW8ilc.js +2 -0
  47. package/dashboard/dist/assets/GraphInvokePage-DtAW8ilc.js.map +1 -0
  48. package/dashboard/dist/assets/HomePage-HsO-M8ub.js +2 -0
  49. package/dashboard/dist/assets/{HomePage-CzvVyTq4.js.map → HomePage-HsO-M8ub.js.map} +1 -1
  50. package/dashboard/dist/assets/{ListToolbar-Cfec9gz_.js → ListToolbar-DqaRlXrF.js} +2 -2
  51. package/dashboard/dist/assets/{ListToolbar-Cfec9gz_.js.map → ListToolbar-DqaRlXrF.js.map} +1 -1
  52. package/dashboard/dist/assets/{McpOverview-BN4GsBGI.js → McpOverview-B4GsHxij.js} +2 -2
  53. package/dashboard/dist/assets/{McpOverview-BN4GsBGI.js.map → McpOverview-B4GsHxij.js.map} +1 -1
  54. package/dashboard/dist/assets/McpQueryDetailPage-DZKpzWST.js +5 -0
  55. package/dashboard/dist/assets/McpQueryDetailPage-DZKpzWST.js.map +1 -0
  56. package/dashboard/dist/assets/{McpQueryPage-BK5L2PqJ.js → McpQueryPage-B-8WR3GV.js} +2 -2
  57. package/dashboard/dist/assets/{McpQueryPage-BK5L2PqJ.js.map → McpQueryPage-B-8WR3GV.js.map} +1 -1
  58. package/dashboard/dist/assets/McpRunDetailPage-Dt7Ai3qB.js +2 -0
  59. package/dashboard/dist/assets/McpRunDetailPage-Dt7Ai3qB.js.map +1 -0
  60. package/dashboard/dist/assets/{McpRunsPage-QsXid9Xe.js → McpRunsPage-Bdke-HoQ.js} +2 -2
  61. package/dashboard/dist/assets/{McpRunsPage-QsXid9Xe.js.map → McpRunsPage-Bdke-HoQ.js.map} +1 -1
  62. package/dashboard/dist/assets/NamespacePill-DnJl4Lre.js +2 -0
  63. package/dashboard/dist/assets/NamespacePill-DnJl4Lre.js.map +1 -0
  64. package/dashboard/dist/assets/{OperatorDashboard-CZQSINho.js → OperatorDashboard-VZ97mufd.js} +2 -2
  65. package/dashboard/dist/assets/{OperatorDashboard-CZQSINho.js.map → OperatorDashboard-VZ97mufd.js.map} +1 -1
  66. package/dashboard/dist/assets/{PageHeader-BuJpMxyu.js → PageHeader-Bnt2iQQa.js} +2 -2
  67. package/dashboard/dist/assets/{PageHeader-BuJpMxyu.js.map → PageHeader-Bnt2iQQa.js.map} +1 -1
  68. package/dashboard/dist/assets/{PageHeaderWithStats-yD_PTbOl.js → PageHeaderWithStats-BuKc9MKt.js} +2 -2
  69. package/dashboard/dist/assets/{PageHeaderWithStats-yD_PTbOl.js.map → PageHeaderWithStats-BuKc9MKt.js.map} +1 -1
  70. package/dashboard/dist/assets/{ProcessDetailPage-DUCOOvOK.js → ProcessDetailPage-BLfLfmWX.js} +2 -2
  71. package/dashboard/dist/assets/{ProcessDetailPage-DUCOOvOK.js.map → ProcessDetailPage-BLfLfmWX.js.map} +1 -1
  72. package/dashboard/dist/assets/{ProcessesListPage-CXvSLTIM.js → ProcessesListPage-DG54t-Nd.js} +2 -2
  73. package/dashboard/dist/assets/{ProcessesListPage-CXvSLTIM.js.map → ProcessesListPage-DG54t-Nd.js.map} +1 -1
  74. package/dashboard/dist/assets/{RolePill-SasQKc_B.js → RolePill-DQTT1s9v.js} +2 -2
  75. package/dashboard/dist/assets/{RolePill-SasQKc_B.js.map → RolePill-DQTT1s9v.js.map} +1 -1
  76. package/dashboard/dist/assets/{RolesPage-DlQR0Iz_.js → RolesPage-Bdlv3DdW.js} +2 -2
  77. package/dashboard/dist/assets/{RolesPage-DlQR0Iz_.js.map → RolesPage-Bdlv3DdW.js.map} +1 -1
  78. package/dashboard/dist/assets/{RunAsSelector-DP-jxsv6.js → RunAsSelector-BFxxMvL3.js} +2 -2
  79. package/dashboard/dist/assets/{RunAsSelector-DP-jxsv6.js.map → RunAsSelector-BFxxMvL3.js.map} +1 -1
  80. package/dashboard/dist/assets/{SwimlaneTimeline-BmASA0nN.js → SwimlaneTimeline-BZmad7WQ.js} +2 -2
  81. package/dashboard/dist/assets/{SwimlaneTimeline-BmASA0nN.js.map → SwimlaneTimeline-BZmad7WQ.js.map} +1 -1
  82. package/dashboard/dist/assets/{TagInput-DvF3j8MA.js → TagInput-B00uqhjX.js} +2 -2
  83. package/dashboard/dist/assets/{TagInput-DvF3j8MA.js.map → TagInput-B00uqhjX.js.map} +1 -1
  84. package/dashboard/dist/assets/{TaskDetailPage-CRowpkeZ.js → TaskDetailPage-CLl2mgBC.js} +2 -2
  85. package/dashboard/dist/assets/{TaskDetailPage-CRowpkeZ.js.map → TaskDetailPage-CLl2mgBC.js.map} +1 -1
  86. package/dashboard/dist/assets/{TaskQueuePill-BCQrS2oK.js → TaskQueuePill-CUsofm0X.js} +2 -2
  87. package/dashboard/dist/assets/{TaskQueuePill-BCQrS2oK.js.map → TaskQueuePill-CUsofm0X.js.map} +1 -1
  88. package/dashboard/dist/assets/{TasksListPage-uJ6z37J-.js → TasksListPage-DoHXxZF-.js} +2 -2
  89. package/dashboard/dist/assets/{TasksListPage-uJ6z37J-.js.map → TasksListPage-DoHXxZF-.js.map} +1 -1
  90. package/dashboard/dist/assets/{TimeAgo-BxwngK1D.js → TimeAgo-DZF9w8Rl.js} +2 -2
  91. package/dashboard/dist/assets/{TimeAgo-BxwngK1D.js.map → TimeAgo-DZF9w8Rl.js.map} +1 -1
  92. package/dashboard/dist/assets/{TimestampCell-CDmichOM.js → TimestampCell-DPpoTdrw.js} +2 -2
  93. package/dashboard/dist/assets/{TimestampCell-CDmichOM.js.map → TimestampCell-DPpoTdrw.js.map} +1 -1
  94. package/dashboard/dist/assets/ToolPill-DjvedZSn.js +2 -0
  95. package/dashboard/dist/assets/ToolPill-DjvedZSn.js.map +1 -0
  96. package/dashboard/dist/assets/ToolTestPanel-DtAgJQfr.js +2 -0
  97. package/dashboard/dist/assets/ToolTestPanel-DtAgJQfr.js.map +1 -0
  98. package/dashboard/dist/assets/TopicDetailPage-W9RKkNNp.js +9 -0
  99. package/dashboard/dist/assets/TopicDetailPage-W9RKkNNp.js.map +1 -0
  100. package/dashboard/dist/assets/{TopicsPage-letISGGD.js → TopicsPage-Bc-4ne6V.js} +2 -2
  101. package/dashboard/dist/assets/{TopicsPage-letISGGD.js.map → TopicsPage-Bc-4ne6V.js.map} +1 -1
  102. package/dashboard/dist/assets/{UserName-W6_Iz2Qb.js → UserName-O2Q4-E6E.js} +2 -2
  103. package/dashboard/dist/assets/{UserName-W6_Iz2Qb.js.map → UserName-O2Q4-E6E.js.map} +1 -1
  104. package/dashboard/dist/assets/{WorkflowExecutionPage-Cfx-xlRT.js → WorkflowExecutionPage-DEDsBmn1.js} +2 -2
  105. package/dashboard/dist/assets/{WorkflowExecutionPage-Cfx-xlRT.js.map → WorkflowExecutionPage-DEDsBmn1.js.map} +1 -1
  106. package/dashboard/dist/assets/{WorkflowPill-Z-zHRKOK.js → WorkflowPill-F1oKUzmc.js} +2 -2
  107. package/dashboard/dist/assets/{WorkflowPill-Z-zHRKOK.js.map → WorkflowPill-F1oKUzmc.js.map} +1 -1
  108. package/dashboard/dist/assets/{WorkflowsDashboard-DC4XHMWt.js → WorkflowsDashboard-Bcf17vCt.js} +2 -2
  109. package/dashboard/dist/assets/{WorkflowsDashboard-DC4XHMWt.js.map → WorkflowsDashboard-Bcf17vCt.js.map} +1 -1
  110. package/dashboard/dist/assets/{WorkflowsOverview-GefO_yn0.js → WorkflowsOverview-Cwo2rqGT.js} +2 -2
  111. package/dashboard/dist/assets/{WorkflowsOverview-GefO_yn0.js.map → WorkflowsOverview-Cwo2rqGT.js.map} +1 -1
  112. package/dashboard/dist/assets/YamlWorkflowDetailPage-Bv8ZFwO-.js +33 -0
  113. package/dashboard/dist/assets/YamlWorkflowDetailPage-Bv8ZFwO-.js.map +1 -0
  114. package/dashboard/dist/assets/YamlWorkflowsPage-DOiEQDOq.js +2 -0
  115. package/dashboard/dist/assets/YamlWorkflowsPage-DOiEQDOq.js.map +1 -0
  116. package/dashboard/dist/assets/{agents-BI5OeN84.js → agents-D09G0HCv.js} +2 -2
  117. package/dashboard/dist/assets/{agents-BI5OeN84.js.map → agents-D09G0HCv.js.map} +1 -1
  118. package/dashboard/dist/assets/{bots-1UzUCsrR.js → bots-D0LhyZZM.js} +2 -2
  119. package/dashboard/dist/assets/{bots-1UzUCsrR.js.map → bots-D0LhyZZM.js.map} +1 -1
  120. package/dashboard/dist/assets/{capabilities-BUbl-ojp.js → capabilities-DON4-NXs.js} +2 -2
  121. package/dashboard/dist/assets/{capabilities-BUbl-ojp.js.map → capabilities-DON4-NXs.js.map} +1 -1
  122. package/dashboard/dist/assets/{controlplane-DTFrH_vN.js → controlplane-Bihd1kXf.js} +2 -2
  123. package/dashboard/dist/assets/{controlplane-DTFrH_vN.js.map → controlplane-Bihd1kXf.js.map} +1 -1
  124. package/dashboard/dist/assets/{escalation-BQhCt4W0.js → escalation-CP2XbdXK.js} +2 -2
  125. package/dashboard/dist/assets/{escalation-BQhCt4W0.js.map → escalation-CP2XbdXK.js.map} +1 -1
  126. package/dashboard/dist/assets/{escalation-columns-J20k5CcY.js → escalation-columns-9aw8Y4qq.js} +2 -2
  127. package/dashboard/dist/assets/{escalation-columns-J20k5CcY.js.map → escalation-columns-9aw8Y4qq.js.map} +1 -1
  128. package/dashboard/dist/assets/helpers-DzO-OGPe.js +2 -0
  129. package/dashboard/dist/assets/helpers-DzO-OGPe.js.map +1 -0
  130. package/dashboard/dist/assets/{index-CVGgSoda.js → index-B-BK3vtk.js} +2 -2
  131. package/dashboard/dist/assets/{index-CVGgSoda.js.map → index-B-BK3vtk.js.map} +1 -1
  132. package/dashboard/dist/assets/{index-CWEOhAiK.js → index-B7lEd0cY.js} +25 -25
  133. package/dashboard/dist/assets/index-B7lEd0cY.js.map +1 -0
  134. package/dashboard/dist/assets/index-BBBGETMs.js +6 -0
  135. package/dashboard/dist/assets/index-BBBGETMs.js.map +1 -0
  136. package/dashboard/dist/assets/index-BFyzZGtv.css +1 -0
  137. package/dashboard/dist/assets/{index-vgxjge70.js → index-BInTEEIX.js} +2 -2
  138. package/dashboard/dist/assets/{index-vgxjge70.js.map → index-BInTEEIX.js.map} +1 -1
  139. package/dashboard/dist/assets/index-BTp73vYK.js +2 -0
  140. package/dashboard/dist/assets/index-BTp73vYK.js.map +1 -0
  141. package/dashboard/dist/assets/index-CCup2uaP.js +2 -0
  142. package/dashboard/dist/assets/{index-C9ClHiiW.js.map → index-CCup2uaP.js.map} +1 -1
  143. package/dashboard/dist/assets/index-CMRW_PE-.js +9 -0
  144. package/dashboard/dist/assets/index-CMRW_PE-.js.map +1 -0
  145. package/dashboard/dist/assets/index-Cb7aSzox.js +2 -0
  146. package/dashboard/dist/assets/{index-si70YcIP.js.map → index-Cb7aSzox.js.map} +1 -1
  147. package/dashboard/dist/assets/index-Cjb8ulHm.js +2 -0
  148. package/dashboard/dist/assets/{index-WQQJ_cp7.js.map → index-Cjb8ulHm.js.map} +1 -1
  149. package/dashboard/dist/assets/index-DgLZ8Ix5.js +2 -0
  150. package/dashboard/dist/assets/{index-DasoTRjT.js.map → index-DgLZ8Ix5.js.map} +1 -1
  151. package/dashboard/dist/assets/index-H5Yb8CY2.js +2 -0
  152. package/dashboard/dist/assets/index-H5Yb8CY2.js.map +1 -0
  153. package/dashboard/dist/assets/{index-CLUYzdwz.js → index-_JsRJPds.js} +2 -2
  154. package/dashboard/dist/assets/{index-CLUYzdwz.js.map → index-_JsRJPds.js.map} +1 -1
  155. package/dashboard/dist/assets/{index-C-mbURj-.js → index-rbuNUyAh.js} +2 -2
  156. package/dashboard/dist/assets/{index-C-mbURj-.js.map → index-rbuNUyAh.js.map} +1 -1
  157. package/dashboard/dist/assets/{knowledge-D9Tuh-o-.js → knowledge-Bl_KaoKJ.js} +2 -2
  158. package/dashboard/dist/assets/{knowledge-D9Tuh-o-.js.map → knowledge-Bl_KaoKJ.js.map} +1 -1
  159. package/dashboard/dist/assets/{mcp-BO8QnWyk.js → mcp-DXbFGoA8.js} +2 -2
  160. package/dashboard/dist/assets/{mcp-BO8QnWyk.js.map → mcp-DXbFGoA8.js.map} +1 -1
  161. package/dashboard/dist/assets/{mcp-query-WLtQtr51.js → mcp-query-Bg69DF2x.js} +2 -2
  162. package/dashboard/dist/assets/{mcp-query-WLtQtr51.js.map → mcp-query-Bg69DF2x.js.map} +1 -1
  163. package/dashboard/dist/assets/{pipelines-BAVf9xud.js → pipelines-DK9LTg9F.js} +2 -2
  164. package/dashboard/dist/assets/{pipelines-BAVf9xud.js.map → pipelines-DK9LTg9F.js.map} +1 -1
  165. package/dashboard/dist/assets/{roles-mGO2-2hA.js → roles-BrsBN4hO.js} +2 -2
  166. package/dashboard/dist/assets/{roles-mGO2-2hA.js.map → roles-BrsBN4hO.js.map} +1 -1
  167. package/dashboard/dist/assets/{tasks-JVRVCx0f.js → tasks-CwjvPECN.js} +2 -2
  168. package/dashboard/dist/assets/{tasks-JVRVCx0f.js.map → tasks-CwjvPECN.js.map} +1 -1
  169. package/dashboard/dist/assets/{topics-BLVnahd7.js → topics-BrwkmaFR.js} +2 -2
  170. package/dashboard/dist/assets/{topics-BLVnahd7.js.map → topics-BrwkmaFR.js.map} +1 -1
  171. package/dashboard/dist/assets/{useEventHooks-BwjAi0Qq.js → useEventHooks-Cd1GM1NG.js} +2 -2
  172. package/dashboard/dist/assets/{useEventHooks-BwjAi0Qq.js.map → useEventHooks-Cd1GM1NG.js.map} +1 -1
  173. package/dashboard/dist/assets/{useNamespace-DkHmXddZ.js → useNamespace-D9lghZ25.js} +2 -2
  174. package/dashboard/dist/assets/{useNamespace-DkHmXddZ.js.map → useNamespace-D9lghZ25.js.map} +1 -1
  175. package/dashboard/dist/assets/useYamlActivityEvents-vOhAwmKO.js +2 -0
  176. package/dashboard/dist/assets/useYamlActivityEvents-vOhAwmKO.js.map +1 -0
  177. package/dashboard/dist/assets/{users-BvizpAkV.js → users-ChQ7soaq.js} +2 -2
  178. package/dashboard/dist/assets/{users-BvizpAkV.js.map → users-ChQ7soaq.js.map} +1 -1
  179. package/dashboard/dist/assets/{vendor-icons-Doy0g69_.js → vendor-icons-Dj2F0Jrb.js} +38 -38
  180. package/dashboard/dist/assets/vendor-icons-Dj2F0Jrb.js.map +1 -0
  181. package/dashboard/dist/assets/workflows-BLKji1_1.js +2 -0
  182. package/dashboard/dist/assets/{workflows-CyEYa01a.js.map → workflows-BLKji1_1.js.map} +1 -1
  183. package/dashboard/dist/assets/yaml-workflows-BUhMfdaw.js +2 -0
  184. package/dashboard/dist/assets/{yaml-workflows-i3GzrEme.js.map → yaml-workflows-BUhMfdaw.js.map} +1 -1
  185. package/dashboard/dist/index.html +3 -3
  186. package/docs/story.md +13 -9
  187. package/package.json +2 -2
  188. package/dashboard/dist/assets/CapabilitiesPage-CK2fJ9Sy.js +0 -2
  189. package/dashboard/dist/assets/CapabilitiesPage-CK2fJ9Sy.js.map +0 -1
  190. package/dashboard/dist/assets/HomePage-CzvVyTq4.js +0 -2
  191. package/dashboard/dist/assets/McpQueryDetailPage-lCW668WQ.js +0 -5
  192. package/dashboard/dist/assets/McpQueryDetailPage-lCW668WQ.js.map +0 -1
  193. package/dashboard/dist/assets/McpRunDetailPage-CQOeYqxa.js +0 -2
  194. package/dashboard/dist/assets/McpRunDetailPage-CQOeYqxa.js.map +0 -1
  195. package/dashboard/dist/assets/ServerName-CHspudaC.js +0 -2
  196. package/dashboard/dist/assets/ServerName-CHspudaC.js.map +0 -1
  197. package/dashboard/dist/assets/StepIndicator-CuUIGxKk.js +0 -2
  198. package/dashboard/dist/assets/StepIndicator-CuUIGxKk.js.map +0 -1
  199. package/dashboard/dist/assets/ToolPill-1aTqYtzp.js +0 -2
  200. package/dashboard/dist/assets/ToolPill-1aTqYtzp.js.map +0 -1
  201. package/dashboard/dist/assets/ToolTestPanel-xjTn8sU8.js +0 -2
  202. package/dashboard/dist/assets/ToolTestPanel-xjTn8sU8.js.map +0 -1
  203. package/dashboard/dist/assets/TopicDetailPage-Dm0hDlS8.js +0 -9
  204. package/dashboard/dist/assets/TopicDetailPage-Dm0hDlS8.js.map +0 -1
  205. package/dashboard/dist/assets/YamlWorkflowsPage-CMsrFooO.js +0 -2
  206. package/dashboard/dist/assets/YamlWorkflowsPage-CMsrFooO.js.map +0 -1
  207. package/dashboard/dist/assets/helpers-ge6Eu90Y.js +0 -2
  208. package/dashboard/dist/assets/helpers-ge6Eu90Y.js.map +0 -1
  209. package/dashboard/dist/assets/index-C--SEsU7.css +0 -1
  210. package/dashboard/dist/assets/index-C45DvtAZ.js +0 -15
  211. package/dashboard/dist/assets/index-C45DvtAZ.js.map +0 -1
  212. package/dashboard/dist/assets/index-C9ClHiiW.js +0 -2
  213. package/dashboard/dist/assets/index-CWEOhAiK.js.map +0 -1
  214. package/dashboard/dist/assets/index-CWlP6vHG.js +0 -6
  215. package/dashboard/dist/assets/index-CWlP6vHG.js.map +0 -1
  216. package/dashboard/dist/assets/index-DasoTRjT.js +0 -2
  217. package/dashboard/dist/assets/index-FhasoOjO.js +0 -2
  218. package/dashboard/dist/assets/index-FhasoOjO.js.map +0 -1
  219. package/dashboard/dist/assets/index-WQQJ_cp7.js +0 -2
  220. package/dashboard/dist/assets/index-hAZiac0C.js +0 -2
  221. package/dashboard/dist/assets/index-hAZiac0C.js.map +0 -1
  222. package/dashboard/dist/assets/index-si70YcIP.js +0 -2
  223. package/dashboard/dist/assets/useExpandedRows-CkcEntB-.js +0 -2
  224. package/dashboard/dist/assets/useExpandedRows-CkcEntB-.js.map +0 -1
  225. package/dashboard/dist/assets/useYamlActivityEvents-CsaR5dWj.js +0 -2
  226. package/dashboard/dist/assets/useYamlActivityEvents-CsaR5dWj.js.map +0 -1
  227. package/dashboard/dist/assets/vendor-icons-Doy0g69_.js.map +0 -1
  228. package/dashboard/dist/assets/workflows-CyEYa01a.js +0 -2
  229. package/dashboard/dist/assets/yaml-workflows-i3GzrEme.js +0 -2
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.seedGraphWorkflows = seedGraphWorkflows;
37
+ const logger_1 = require("../lib/logger");
38
+ const utils_1 = require("../modules/utils");
39
+ function extractYamlVersion(yaml) {
40
+ const m = yaml.match(/^\s*version:\s*['"]?(\S+?)['"]?\s*$/m);
41
+ return m?.[1] ?? '0';
42
+ }
43
+ /**
44
+ * Register declarative graph (YAML/DAG) workflows at startup — the graph-form
45
+ * peer of durable `workers`. Each flow is created insert-if-absent, then
46
+ * deployed + activated through the same path the dashboard uses.
47
+ *
48
+ * On a re-boot where the flow already exists:
49
+ * - description and output_schema are synced if stale
50
+ * - when the YAML version bumps, yaml_content is updated and the flow is redeployed
51
+ *
52
+ * Per-flow failures are logged and skipped so a single malformed flow can never
53
+ * block boot.
54
+ */
55
+ async function seedGraphWorkflows(configs) {
56
+ const { createYamlWorkflowDirect, listYamlWorkflows, updateYamlWorkflow } = await Promise.resolve().then(() => __importStar(require('../api/yaml-workflows/crud')));
57
+ const { deployYamlWorkflow } = await Promise.resolve().then(() => __importStar(require('../api/yaml-workflows/deploy')));
58
+ for (const gf of configs) {
59
+ const namespace = (0, utils_1.sanitizeServerName)(gf.namespace ?? 'graph');
60
+ const graphTopic = (0, utils_1.sanitizeToolName)(gf.name);
61
+ try {
62
+ const created = await createYamlWorkflowDirect({
63
+ name: gf.name,
64
+ description: gf.description,
65
+ yaml_content: gf.yaml,
66
+ input_schema: gf.inputSchema,
67
+ output_schema: gf.outputSchema,
68
+ app_id: namespace,
69
+ tags: gf.tags,
70
+ });
71
+ if (created.status === 409) {
72
+ // Flow already exists — sync stale fields and redeploy if YAML version bumped.
73
+ const listing = await listYamlWorkflows({ app_id: namespace, graph_topic: graphTopic, limit: 1 });
74
+ const match = listing.data?.workflows?.[0];
75
+ if (match) {
76
+ const updates = {};
77
+ if (gf.description && match.description !== gf.description)
78
+ updates.description = gf.description;
79
+ if (gf.outputSchema)
80
+ updates.output_schema = gf.outputSchema;
81
+ if (gf.inputSchema)
82
+ updates.input_schema = gf.inputSchema;
83
+ const storedVersion = extractYamlVersion(match.yaml_content ?? '');
84
+ const newVersion = extractYamlVersion(gf.yaml);
85
+ const yamlChanged = newVersion !== storedVersion;
86
+ if (yamlChanged) {
87
+ updates.yaml_content = gf.yaml;
88
+ }
89
+ if (Object.keys(updates).length > 0) {
90
+ await updateYamlWorkflow({ id: match.id, ...updates });
91
+ logger_1.loggerRegistry.info(`[long-tail] graph flow updated: ${gf.name}`);
92
+ }
93
+ if (yamlChanged) {
94
+ const deployed = await deployYamlWorkflow({ id: match.id });
95
+ if (deployed.status !== 200) {
96
+ logger_1.loggerRegistry.warn(`[long-tail] graph flow redeploy failed for ${gf.name}: ${deployed.error ?? 'unknown error'}`);
97
+ }
98
+ else {
99
+ logger_1.loggerRegistry.info(`[long-tail] graph flow redeployed: ${gf.name} (v${newVersion})`);
100
+ }
101
+ }
102
+ else {
103
+ logger_1.loggerRegistry.info(`[long-tail] graph flow already registered: ${gf.name}`);
104
+ }
105
+ }
106
+ else {
107
+ logger_1.loggerRegistry.info(`[long-tail] graph flow already registered: ${gf.name}`);
108
+ }
109
+ continue;
110
+ }
111
+ if (created.status !== 200 || !created.data?.id) {
112
+ logger_1.loggerRegistry.warn(`[long-tail] graph flow create failed for ${gf.name}: ${created.error ?? 'unknown error'}`);
113
+ continue;
114
+ }
115
+ const deployed = await deployYamlWorkflow({ id: created.data.id });
116
+ if (deployed.status !== 200) {
117
+ logger_1.loggerRegistry.warn(`[long-tail] graph flow deploy failed for ${gf.name}: ${deployed.error ?? 'unknown error'}`);
118
+ continue;
119
+ }
120
+ logger_1.loggerRegistry.info(`[long-tail] graph flow registered + deployed: ${gf.name} (namespace: ${namespace})`);
121
+ }
122
+ catch (err) {
123
+ logger_1.loggerRegistry.warn(`[long-tail] graph flow seed error for ${gf.name}: ${err.message}`);
124
+ }
125
+ }
126
+ }
@@ -238,6 +238,20 @@ async function startWorkers(startConfig, workers, builtinMcpServerFactories) {
238
238
  }
239
239
  // 3. Clean stale builtin servers no longer in factory list
240
240
  await cleanStaleBuiltinServers(Object.keys(allFactories));
241
+ // Seed static graph (YAML/DAG) workflows — the graph-form peer of `workers`.
242
+ // Hand-authored flows from config, plus the hello-world example when enabled.
243
+ // Runs before worker registration so newly-deployed flows are picked up.
244
+ if (!isReadonly) {
245
+ const graphFlows = [...(startConfig.graphWorkflows ?? [])];
246
+ if (startConfig.examples) {
247
+ const { EXAMPLE_GRAPH_WORKFLOWS } = await Promise.resolve().then(() => __importStar(require('../examples')));
248
+ graphFlows.push(...EXAMPLE_GRAPH_WORKFLOWS);
249
+ }
250
+ if (graphFlows.length) {
251
+ const { seedGraphWorkflows } = await Promise.resolve().then(() => __importStar(require('./graph-workflows')));
252
+ await seedGraphWorkflows(graphFlows);
253
+ }
254
+ }
241
255
  // Register workers for active YAML (deterministic) workflows
242
256
  await yamlWorkflowWorkers.registerAllActiveWorkers();
243
257
  }
@@ -695,12 +695,12 @@ export declare const listStreamMessagesSchema: z.ZodObject<{
695
695
  namespace: string;
696
696
  status?: string | undefined;
697
697
  workflow_name?: string | undefined;
698
+ jid?: string | undefined;
698
699
  topic?: string | undefined;
699
700
  sort_by?: string | undefined;
700
701
  order?: "asc" | "desc" | undefined;
701
702
  stream_name?: string | undefined;
702
703
  msg_type?: string | undefined;
703
- jid?: string | undefined;
704
704
  aid?: string | undefined;
705
705
  }, {
706
706
  source: string;
@@ -708,13 +708,13 @@ export declare const listStreamMessagesSchema: z.ZodObject<{
708
708
  limit?: number | undefined;
709
709
  offset?: number | undefined;
710
710
  workflow_name?: string | undefined;
711
+ jid?: string | undefined;
711
712
  topic?: string | undefined;
712
713
  namespace?: string | undefined;
713
714
  sort_by?: string | undefined;
714
715
  order?: "asc" | "desc" | undefined;
715
716
  stream_name?: string | undefined;
716
717
  msg_type?: string | undefined;
717
- jid?: string | undefined;
718
718
  aid?: string | undefined;
719
719
  }>;
720
720
  export declare const listPipelineEntitiesSchema: z.ZodObject<{
@@ -1 +1 @@
1
- {"root":["../index.ts","../vitest.config.ts","../vitest.integration.config.ts","../adapters/express.ts","../api/agent-subscriptions.ts","../api/agents.ts","../api/auth-sso.ts","../api/auth.ts","../api/bot-accounts.ts","../api/capabilities.ts","../api/controlplane.ts","../api/dba.ts","../api/exports.ts","../api/files.ts","../api/index.ts","../api/insight.ts","../api/knowledge.ts","../api/maintenance.ts","../api/namespaces.ts","../api/overview.ts","../api/pipelines.ts","../api/roles.ts","../api/settings.ts","../api/tasks.ts","../api/topics.ts","../api/users.ts","../api/workflow-sets.ts","../api/escalations/bulk.ts","../api/escalations/claim.ts","../api/escalations/create.ts","../api/escalations/helpers.ts","../api/escalations/index.ts","../api/escalations/list.ts","../api/escalations/metadata.ts","../api/escalations/resolve.ts","../api/escalations/single.ts","../api/mcp/index.ts","../api/mcp/servers.ts","../api/mcp/tools.ts","../api/workflows/config.ts","../api/workflows/discovery.ts","../api/workflows/index.ts","../api/workflows/invocation.ts","../api/yaml-workflows/cron.ts","../api/yaml-workflows/crud.ts","../api/yaml-workflows/deploy.ts","../api/yaml-workflows/helpers.ts","../api/yaml-workflows/index.ts","../api/yaml-workflows/versions.ts","../bin/ltc.ts","../lib/cli/auth.ts","../lib/cli/client.ts","../lib/cli/compile.ts","../lib/cli/format.ts","../lib/cli/init.ts","../lib/cli/output.ts","../lib/cli/scanner.ts","../lib/cli/types.ts","../lib/cli/commands/escalations.ts","../lib/cli/commands/knowledge.ts","../lib/cli/commands/mcp.ts","../lib/cli/commands/pipelines.ts","../lib/cli/commands/status.ts","../lib/cli/commands/streams.ts","../lib/cli/commands/users.ts","../lib/cli/commands/workflows.ts","../lib/db/index.ts","../lib/db/migrate.ts","../lib/events/callback.ts","../lib/events/index.ts","../lib/events/matching.ts","../lib/events/memory.ts","../lib/events/nats-ws-proxy.ts","../lib/events/nats.ts","../lib/events/publish.ts","../lib/events/socketio.ts","../lib/logger/index.ts","../lib/logger/pino.ts","../lib/storage/index.ts","../lib/storage/local.ts","../lib/storage/mime.ts","../lib/storage/s3.ts","../lib/storage/types.ts","../lib/telemetry/honeycomb.ts","../lib/telemetry/index.ts","../modules/auth.ts","../modules/config.ts","../modules/defaults.ts","../modules/ltconfig.ts","../modules/maintenance.ts","../modules/sso.ts","../modules/utils.ts","../routes/agents.ts","../routes/auth-sso.ts","../routes/auth.ts","../routes/bot-accounts.ts","../routes/capabilities.ts","../routes/controlplane.ts","../routes/dba.ts","../routes/delegation.ts","../routes/docs.ts","../routes/exports.ts","../routes/file-browser.ts","../routes/files.ts","../routes/index.ts","../routes/insight.ts","../routes/knowledge.ts","../routes/maintenance.ts","../routes/mcp-endpoint.ts","../routes/mcp.ts","../routes/namespaces.ts","../routes/nats-credentials.ts","../routes/oauth.ts","../routes/overview.ts","../routes/pipelines.ts","../routes/roles.ts","../routes/settings.ts","../routes/tasks.ts","../routes/topics.ts","../routes/users.ts","../routes/workflow-sets.ts","../routes/escalations/bulk.ts","../routes/escalations/index.ts","../routes/escalations/list.ts","../routes/escalations/metadata.ts","../routes/escalations/resolve.ts","../routes/escalations/single.ts","../routes/workflows/config.ts","../routes/workflows/discovery.ts","../routes/workflows/index.ts","../routes/workflows/invocation.ts","../routes/yaml-workflows/cron.ts","../routes/yaml-workflows/crud.ts","../routes/yaml-workflows/deployment.ts","../routes/yaml-workflows/index.ts","../routes/yaml-workflows/versions.ts","../scripts/process-helpers.ts","../scripts/process.ts","../scripts/token.ts","../sdk/index.ts","../services/dba.ts","../services/hotmesh-utils.ts","../services/workflow-invocation.ts","../services/agent/index.ts","../services/agent/input-mapper.ts","../services/agent/sql.ts","../services/agent/subscription-sql.ts","../services/agent/subscriptions.ts","../services/agent/trigger-registry.ts","../services/auth/bot-api-key.ts","../services/auth/delegation.ts","../services/auth/index.ts","../services/auth/service-token.ts","../services/auth/sql.ts","../services/config/cache.ts","../services/config/index.ts","../services/config/provider.ts","../services/config/read.ts","../services/config/sql.ts","../services/config/write.ts","../services/controlplane/index.ts","../services/controlplane/quorum-bridge.ts","../services/controlplane/sql.ts","../services/controlplane/stream-messages-sql.ts","../services/controlplane/types.ts","../services/cron/index.ts","../services/escalation/bulk.ts","../services/escalation/crud.ts","../services/escalation/index.ts","../services/escalation/queries.ts","../services/escalation/sql.ts","../services/escalation/types.ts","../services/escalation-strategy/default.ts","../services/escalation-strategy/index.ts","../services/escalation-strategy/mcp.ts","../services/export/client.ts","../services/export/index.ts","../services/export/post-process.ts","../services/export/types.ts","../services/iam/activity.ts","../services/iam/bots.ts","../services/iam/context.ts","../services/iam/credentials.ts","../services/iam/envelope.ts","../services/iam/ephemeral.ts","../services/iam/index.ts","../services/iam/principal.ts","../services/iam/resolve.ts","../services/iam/sql.ts","../services/insight/index.ts","../services/insight/prompts.ts","../services/interceptor/activity-interceptor.ts","../services/interceptor/completion.ts","../services/interceptor/context.ts","../services/interceptor/escalation.ts","../services/interceptor/index.ts","../services/interceptor/lifecycle.ts","../services/interceptor/state.ts","../services/interceptor/types.ts","../services/interceptor/activities/config.ts","../services/interceptor/activities/escalation.ts","../services/interceptor/activities/index.ts","../services/interceptor/activities/task.ts","../services/interceptor/activities/workflow.ts","../services/llm/detect.ts","../services/llm/index.ts","../services/llm/translate.ts","../services/llm/types.ts","../services/llm/providers/anthropic.ts","../services/llm/providers/openai.ts","../services/maintenance/index.ts","../services/mcp/adapter.ts","../services/mcp/db.ts","../services/mcp/exposure.ts","../services/mcp/external-server.ts","../services/mcp/index.ts","../services/mcp/register-tool.ts","../services/mcp/seed-service-account.ts","../services/mcp/server-lifecycle.ts","../services/mcp/server-tools.ts","../services/mcp/server.ts","../services/mcp/sql.ts","../services/mcp/types.ts","../services/mcp/workflow-compiler-server.ts","../services/mcp/workflow-server.ts","../services/mcp/client/connection-dispatch.ts","../services/mcp/client/connection-lifecycle.ts","../services/mcp/client/connection-test.ts","../services/mcp/client/connection.ts","../services/mcp/client/index.ts","../services/mcp/client/tools.ts","../services/mcp/db-server/index.ts","../services/mcp/db-server/schemas.ts","../services/mcp/db-server/tools.ts","../services/mcp/playwright-server/index.ts","../services/mcp/playwright-server/lifecycle.ts","../services/mcp/playwright-server/schemas.ts","../services/mcp/playwright-server/tools.ts","../services/namespace/index.ts","../services/namespace/sql.ts","../services/namespace/types.ts","../services/oauth/crypto.ts","../services/oauth/db.ts","../services/oauth/index.ts","../services/oauth/sql.ts","../services/oauth/state.ts","../services/oauth/providers/anthropic.ts","../services/oauth/providers/github.ts","../services/oauth/providers/google.ts","../services/oauth/providers/index.ts","../services/oauth/providers/microsoft.ts","../services/oauth/providers/mock.ts","../services/oauth/providers/registry.ts","../services/oauth/providers/types.ts","../services/orchestrator/condition.ts","../services/orchestrator/index.ts","../services/orchestrator/types.ts","../services/overview/index.ts","../services/overview/sql.ts","../services/pipelines/enrichment.ts","../services/pipelines/events.ts","../services/pipelines/execution-builder.ts","../services/pipelines/index.ts","../services/pipelines/queries.ts","../services/pipelines/sql.ts","../services/pipelines/types.ts","../services/role/index.ts","../services/role/sql.ts","../services/role/types.ts","../services/task/crud.ts","../services/task/index.ts","../services/task/process.ts","../services/task/resolve.ts","../services/task/sql.ts","../services/task/types.ts","../services/topics/index.ts","../services/topics/sql.ts","../services/topics/system-topics.ts","../services/user/auth.ts","../services/user/crud.ts","../services/user/index.ts","../services/user/rbac.ts","../services/user/roles.ts","../services/user/seed-admin.ts","../services/user/sql.ts","../services/user/sso-provision.ts","../services/user/types.ts","../services/workers/registry.ts","../services/workflow-sets/db.ts","../services/workflow-sets/index.ts","../services/workflow-sets/sql.ts","../services/yaml-workflow/builder-regenerate.ts","../services/yaml-workflow/db-utils.ts","../services/yaml-workflow/db-versions.ts","../services/yaml-workflow/db.ts","../services/yaml-workflow/deployer-helpers.ts","../services/yaml-workflow/deployer.ts","../services/yaml-workflow/generator.ts","../services/yaml-workflow/index.ts","../services/yaml-workflow/input-analyzer-helpers.ts","../services/yaml-workflow/input-analyzer.ts","../services/yaml-workflow/invoke.ts","../services/yaml-workflow/sql.ts","../services/yaml-workflow/types.ts","../services/yaml-workflow/durable-compiler/index.ts","../services/yaml-workflow/durable-compiler/parser.ts","../services/yaml-workflow/durable-compiler/prompts.ts","../services/yaml-workflow/durable-compiler/types.ts","../services/yaml-workflow/pattern-detector/array-source.ts","../services/yaml-workflow/pattern-detector/collapse.ts","../services/yaml-workflow/pattern-detector/index.ts","../services/yaml-workflow/pattern-detector/run-detection.ts","../services/yaml-workflow/pattern-detector/types.ts","../services/yaml-workflow/pipeline/analyze.ts","../services/yaml-workflow/pipeline/extract-helpers.ts","../services/yaml-workflow/pipeline/extract.ts","../services/yaml-workflow/pipeline/index.ts","../services/yaml-workflow/pipeline/prompt-templates.ts","../services/yaml-workflow/pipeline/prompts.ts","../services/yaml-workflow/pipeline/validate.ts","../services/yaml-workflow/pipeline/build/dag-assembly.ts","../services/yaml-workflow/pipeline/build/dag.ts","../services/yaml-workflow/pipeline/build/index.ts","../services/yaml-workflow/pipeline/build/iteration.ts","../services/yaml-workflow/pipeline/build/metadata.ts","../services/yaml-workflow/pipeline/build/transform.ts","../services/yaml-workflow/pipeline/build/utils.ts","../services/yaml-workflow/pipeline/build/wiring.ts","../services/yaml-workflow/pipeline/compile/index.ts","../services/yaml-workflow/pipeline/compile/llm-call.ts","../services/yaml-workflow/pipeline/compile/parse-plan.ts","../services/yaml-workflow/pipeline/compile/summarize.ts","../services/yaml-workflow/workers/callbacks.ts","../services/yaml-workflow/workers/events.ts","../services/yaml-workflow/workers/index.ts","../services/yaml-workflow/workers/register.ts","../services/yaml-workflow/workers/scope.ts","../start/adapters.ts","../start/config.ts","../start/index.ts","../start/server.ts","../start/socket-auth.ts","../start/workers.ts","../system/index.ts","../system/activities/claude-code.ts","../system/activities/file-storage.ts","../system/activities/http.ts","../system/activities/knowledge.ts","../system/activities/oauth.ts","../system/activities/schema-exchange.ts","../system/activities/sql.ts","../system/activities/triage/cache.ts","../system/activities/triage/context.ts","../system/activities/triage/discovery.ts","../system/activities/triage/index.ts","../system/activities/triage/llm.ts","../system/activities/triage/tools.ts","../system/mcp-servers/claude-code.ts","../system/mcp-servers/docs.ts","../system/mcp-servers/events.ts","../system/mcp-servers/file-storage.ts","../system/mcp-servers/http-fetch.ts","../system/mcp-servers/human-queue-schemas.ts","../system/mcp-servers/human-queue.ts","../system/mcp-servers/knowledge.ts","../system/mcp-servers/oauth.ts","../system/mcp-servers/schema-exchange.ts","../system/mcp-servers/translation.ts","../system/mcp-servers/vision-prompts.ts","../system/mcp-servers/vision.ts","../system/mcp-servers/workflow-compiler.ts","../system/mcp-servers/workflow.ts","../system/mcp-servers/admin/agent-subscriptions.ts","../system/mcp-servers/admin/agents.ts","../system/mcp-servers/admin/bot-accounts.ts","../system/mcp-servers/admin/controlplane.ts","../system/mcp-servers/admin/escalations.ts","../system/mcp-servers/admin/exports.ts","../system/mcp-servers/admin/index.ts","../system/mcp-servers/admin/maintenance.ts","../system/mcp-servers/admin/mcp-servers.ts","../system/mcp-servers/admin/overview.ts","../system/mcp-servers/admin/pipelines.ts","../system/mcp-servers/admin/schemas.ts","../system/mcp-servers/admin/settings.ts","../system/mcp-servers/admin/tasks.ts","../system/mcp-servers/admin/topics.ts","../system/mcp-servers/admin/users.ts","../system/mcp-servers/admin/workflow-config.ts","../system/mcp-servers/admin/workflows.ts","../system/mcp-servers/admin/yaml-workflows.ts","../system/mcp-servers/db-query/index.ts","../system/mcp-servers/db-query/schemas.ts","../system/mcp-servers/db-query/tools.ts","../system/seed/index.ts","../system/seed/tool-manifests-admin.ts","../system/seed/tool-manifests-data.ts","../system/seed/tool-manifests-escalation.ts","../system/seed/tool-manifests-events.ts","../system/seed/tool-manifests-knowledge.ts","../system/seed/tool-manifests-workflows.ts","../system/workflows/tool-result-guard.ts","../system/workflows/capability-invoke/activities.ts","../system/workflows/capability-invoke/index.ts","../system/workflows/mcp-deterministic/activities.ts","../system/workflows/mcp-deterministic/index.ts","../system/workflows/mcp-query/index.ts","../system/workflows/mcp-query/prompts.ts","../system/workflows/mcp-query/strategy-advisors.ts","../system/workflows/mcp-query/types.ts","../system/workflows/mcp-query/activities/caches.ts","../system/workflows/mcp-query/activities/discovery.ts","../system/workflows/mcp-query/activities/index.ts","../system/workflows/mcp-query/activities/llm.ts","../system/workflows/mcp-query/activities/tool-executor.ts","../system/workflows/mcp-query/activities/tool-loader.ts","../system/workflows/mcp-query-router/activities.ts","../system/workflows/mcp-query-router/index.ts","../system/workflows/mcp-query-router/prompts.ts","../system/workflows/mcp-triage/activities-proxy.ts","../system/workflows/mcp-triage/index.ts","../system/workflows/mcp-triage/prompts.ts","../system/workflows/mcp-triage/response-builders.ts","../system/workflows/mcp-triage/response.ts","../system/workflows/mcp-triage/types.ts","../system/workflows/mcp-triage-deterministic/activities.ts","../system/workflows/mcp-triage-deterministic/index.ts","../system/workflows/mcp-triage-router/activities.ts","../system/workflows/mcp-triage-router/index.ts","../system/workflows/mcp-workflow-builder/index.ts","../system/workflows/mcp-workflow-builder/prompts.ts","../system/workflows/mcp-workflow-builder/activities/caches.ts","../system/workflows/mcp-workflow-builder/activities/index.ts","../system/workflows/mcp-workflow-builder/activities/llm.ts","../system/workflows/mcp-workflow-builder/activities/tool-loader.ts","../system/workflows/mcp-workflow-planner/index.ts","../system/workflows/mcp-workflow-planner/prompts.ts","../system/workflows/mcp-workflow-planner/activities/analyze.ts","../system/workflows/mcp-workflow-planner/activities/index.ts","../system/workflows/mcp-workflow-planner/activities/persist.ts","../system/workflows/mcp-workflow-planner/activities/plan.ts","../system/workflows/shared/discovery.ts","../system/workflows/shared/index.ts","../system/workflows/shared/llm-caller.ts","../system/workflows/shared/prompts.ts","../system/workflows/shared/strategy-advisors.ts","../system/workflows/shared/tool-executor.ts","../system/workflows/shared/tool-loader.ts","../system/workflows/shared/types.ts","../types/agent.ts","../types/auth.ts","../types/config.ts","../types/delegation.ts","../types/discovery.ts","../types/envelope.ts","../types/escalation-strategy.ts","../types/escalation.ts","../types/events.ts","../types/export.ts","../types/express.d.ts","../types/index.ts","../types/logger.ts","../types/maintenance.ts","../types/mcp.ts","../types/oauth.ts","../types/sdk.ts","../types/startup.ts","../types/task.ts","../types/telemetry.ts","../types/tool-context.ts","../types/user.ts","../types/workflow-set.ts","../types/workflow.ts","../types/yaml-workflow.ts","../workers/index.ts"],"version":"5.9.3"}
1
+ {"root":["../index.ts","../vitest.config.ts","../vitest.integration.config.ts","../adapters/express.ts","../api/agent-subscriptions.ts","../api/agents.ts","../api/auth-sso.ts","../api/auth.ts","../api/bot-accounts.ts","../api/capabilities.ts","../api/controlplane.ts","../api/dba.ts","../api/exports.ts","../api/files.ts","../api/index.ts","../api/insight.ts","../api/knowledge.ts","../api/maintenance.ts","../api/namespaces.ts","../api/overview.ts","../api/pipelines.ts","../api/roles.ts","../api/settings.ts","../api/tasks.ts","../api/topics.ts","../api/users.ts","../api/workflow-sets.ts","../api/escalations/bulk.ts","../api/escalations/claim.ts","../api/escalations/create.ts","../api/escalations/helpers.ts","../api/escalations/index.ts","../api/escalations/list.ts","../api/escalations/metadata.ts","../api/escalations/resolve.ts","../api/escalations/single.ts","../api/mcp/index.ts","../api/mcp/servers.ts","../api/mcp/tools.ts","../api/workflows/config.ts","../api/workflows/discovery.ts","../api/workflows/index.ts","../api/workflows/invocation.ts","../api/yaml-workflows/cron.ts","../api/yaml-workflows/crud.ts","../api/yaml-workflows/deploy.ts","../api/yaml-workflows/helpers.ts","../api/yaml-workflows/index.ts","../api/yaml-workflows/versions.ts","../bin/ltc.ts","../lib/cli/auth.ts","../lib/cli/client.ts","../lib/cli/compile.ts","../lib/cli/format.ts","../lib/cli/init.ts","../lib/cli/output.ts","../lib/cli/scanner.ts","../lib/cli/types.ts","../lib/cli/commands/escalations.ts","../lib/cli/commands/knowledge.ts","../lib/cli/commands/mcp.ts","../lib/cli/commands/pipelines.ts","../lib/cli/commands/status.ts","../lib/cli/commands/streams.ts","../lib/cli/commands/users.ts","../lib/cli/commands/workflows.ts","../lib/db/index.ts","../lib/db/migrate.ts","../lib/events/callback.ts","../lib/events/index.ts","../lib/events/matching.ts","../lib/events/memory.ts","../lib/events/nats-ws-proxy.ts","../lib/events/nats.ts","../lib/events/publish.ts","../lib/events/socketio.ts","../lib/logger/index.ts","../lib/logger/pino.ts","../lib/storage/index.ts","../lib/storage/local.ts","../lib/storage/mime.ts","../lib/storage/s3.ts","../lib/storage/types.ts","../lib/telemetry/honeycomb.ts","../lib/telemetry/index.ts","../modules/auth.ts","../modules/config.ts","../modules/defaults.ts","../modules/ltconfig.ts","../modules/maintenance.ts","../modules/sso.ts","../modules/utils.ts","../routes/agents.ts","../routes/auth-sso.ts","../routes/auth.ts","../routes/bot-accounts.ts","../routes/capabilities.ts","../routes/controlplane.ts","../routes/dba.ts","../routes/delegation.ts","../routes/docs.ts","../routes/exports.ts","../routes/file-browser.ts","../routes/files.ts","../routes/index.ts","../routes/insight.ts","../routes/knowledge.ts","../routes/maintenance.ts","../routes/mcp-endpoint.ts","../routes/mcp.ts","../routes/namespaces.ts","../routes/nats-credentials.ts","../routes/oauth.ts","../routes/overview.ts","../routes/pipelines.ts","../routes/roles.ts","../routes/settings.ts","../routes/tasks.ts","../routes/topics.ts","../routes/users.ts","../routes/workflow-sets.ts","../routes/escalations/bulk.ts","../routes/escalations/index.ts","../routes/escalations/list.ts","../routes/escalations/metadata.ts","../routes/escalations/resolve.ts","../routes/escalations/single.ts","../routes/workflows/config.ts","../routes/workflows/discovery.ts","../routes/workflows/index.ts","../routes/workflows/invocation.ts","../routes/yaml-workflows/cron.ts","../routes/yaml-workflows/crud.ts","../routes/yaml-workflows/deployment.ts","../routes/yaml-workflows/index.ts","../routes/yaml-workflows/versions.ts","../scripts/process-helpers.ts","../scripts/process.ts","../scripts/token.ts","../sdk/index.ts","../services/dba.ts","../services/hotmesh-utils.ts","../services/workflow-invocation.ts","../services/agent/index.ts","../services/agent/input-mapper.ts","../services/agent/sql.ts","../services/agent/subscription-sql.ts","../services/agent/subscriptions.ts","../services/agent/trigger-registry.ts","../services/auth/bot-api-key.ts","../services/auth/delegation.ts","../services/auth/index.ts","../services/auth/service-token.ts","../services/auth/sql.ts","../services/config/cache.ts","../services/config/index.ts","../services/config/provider.ts","../services/config/read.ts","../services/config/sql.ts","../services/config/write.ts","../services/controlplane/index.ts","../services/controlplane/quorum-bridge.ts","../services/controlplane/sql.ts","../services/controlplane/stream-messages-sql.ts","../services/controlplane/types.ts","../services/cron/index.ts","../services/escalation/bulk.ts","../services/escalation/crud.ts","../services/escalation/index.ts","../services/escalation/queries.ts","../services/escalation/sql.ts","../services/escalation/types.ts","../services/escalation-strategy/default.ts","../services/escalation-strategy/index.ts","../services/escalation-strategy/mcp.ts","../services/export/client.ts","../services/export/index.ts","../services/export/post-process.ts","../services/export/types.ts","../services/iam/activity.ts","../services/iam/bots.ts","../services/iam/context.ts","../services/iam/credentials.ts","../services/iam/envelope.ts","../services/iam/ephemeral.ts","../services/iam/index.ts","../services/iam/principal.ts","../services/iam/resolve.ts","../services/iam/sql.ts","../services/insight/index.ts","../services/insight/prompts.ts","../services/interceptor/activity-interceptor.ts","../services/interceptor/completion.ts","../services/interceptor/context.ts","../services/interceptor/escalation.ts","../services/interceptor/index.ts","../services/interceptor/lifecycle.ts","../services/interceptor/state.ts","../services/interceptor/types.ts","../services/interceptor/activities/config.ts","../services/interceptor/activities/escalation.ts","../services/interceptor/activities/index.ts","../services/interceptor/activities/task.ts","../services/interceptor/activities/workflow.ts","../services/llm/detect.ts","../services/llm/index.ts","../services/llm/translate.ts","../services/llm/types.ts","../services/llm/providers/anthropic.ts","../services/llm/providers/openai.ts","../services/maintenance/index.ts","../services/mcp/adapter.ts","../services/mcp/db.ts","../services/mcp/exposure.ts","../services/mcp/external-server.ts","../services/mcp/index.ts","../services/mcp/register-tool.ts","../services/mcp/seed-service-account.ts","../services/mcp/server-lifecycle.ts","../services/mcp/server-tools.ts","../services/mcp/server.ts","../services/mcp/sql.ts","../services/mcp/types.ts","../services/mcp/workflow-compiler-server.ts","../services/mcp/workflow-server.ts","../services/mcp/client/connection-dispatch.ts","../services/mcp/client/connection-lifecycle.ts","../services/mcp/client/connection-test.ts","../services/mcp/client/connection.ts","../services/mcp/client/index.ts","../services/mcp/client/tools.ts","../services/mcp/db-server/index.ts","../services/mcp/db-server/schemas.ts","../services/mcp/db-server/tools.ts","../services/mcp/playwright-server/index.ts","../services/mcp/playwright-server/lifecycle.ts","../services/mcp/playwright-server/schemas.ts","../services/mcp/playwright-server/tools.ts","../services/namespace/index.ts","../services/namespace/sql.ts","../services/namespace/types.ts","../services/oauth/crypto.ts","../services/oauth/db.ts","../services/oauth/index.ts","../services/oauth/sql.ts","../services/oauth/state.ts","../services/oauth/providers/anthropic.ts","../services/oauth/providers/github.ts","../services/oauth/providers/google.ts","../services/oauth/providers/index.ts","../services/oauth/providers/microsoft.ts","../services/oauth/providers/mock.ts","../services/oauth/providers/registry.ts","../services/oauth/providers/types.ts","../services/orchestrator/condition.ts","../services/orchestrator/index.ts","../services/orchestrator/types.ts","../services/overview/index.ts","../services/overview/sql.ts","../services/pipelines/enrichment.ts","../services/pipelines/events.ts","../services/pipelines/execution-builder.ts","../services/pipelines/index.ts","../services/pipelines/queries.ts","../services/pipelines/sql.ts","../services/pipelines/types.ts","../services/role/index.ts","../services/role/sql.ts","../services/role/types.ts","../services/task/crud.ts","../services/task/index.ts","../services/task/process.ts","../services/task/resolve.ts","../services/task/sql.ts","../services/task/types.ts","../services/topics/index.ts","../services/topics/sql.ts","../services/topics/system-topics.ts","../services/user/auth.ts","../services/user/crud.ts","../services/user/index.ts","../services/user/rbac.ts","../services/user/roles.ts","../services/user/seed-admin.ts","../services/user/sql.ts","../services/user/sso-provision.ts","../services/user/types.ts","../services/workers/registry.ts","../services/workflow-sets/db.ts","../services/workflow-sets/index.ts","../services/workflow-sets/sql.ts","../services/yaml-workflow/builder-regenerate.ts","../services/yaml-workflow/db-utils.ts","../services/yaml-workflow/db-versions.ts","../services/yaml-workflow/db.ts","../services/yaml-workflow/deployer-helpers.ts","../services/yaml-workflow/deployer.ts","../services/yaml-workflow/generator.ts","../services/yaml-workflow/index.ts","../services/yaml-workflow/input-analyzer-helpers.ts","../services/yaml-workflow/input-analyzer.ts","../services/yaml-workflow/invoke.ts","../services/yaml-workflow/sql.ts","../services/yaml-workflow/types.ts","../services/yaml-workflow/durable-compiler/index.ts","../services/yaml-workflow/durable-compiler/parser.ts","../services/yaml-workflow/durable-compiler/prompts.ts","../services/yaml-workflow/durable-compiler/types.ts","../services/yaml-workflow/pattern-detector/array-source.ts","../services/yaml-workflow/pattern-detector/collapse.ts","../services/yaml-workflow/pattern-detector/index.ts","../services/yaml-workflow/pattern-detector/run-detection.ts","../services/yaml-workflow/pattern-detector/types.ts","../services/yaml-workflow/pipeline/analyze.ts","../services/yaml-workflow/pipeline/extract-helpers.ts","../services/yaml-workflow/pipeline/extract.ts","../services/yaml-workflow/pipeline/index.ts","../services/yaml-workflow/pipeline/prompt-templates.ts","../services/yaml-workflow/pipeline/prompts.ts","../services/yaml-workflow/pipeline/validate.ts","../services/yaml-workflow/pipeline/build/dag-assembly.ts","../services/yaml-workflow/pipeline/build/dag.ts","../services/yaml-workflow/pipeline/build/index.ts","../services/yaml-workflow/pipeline/build/iteration.ts","../services/yaml-workflow/pipeline/build/metadata.ts","../services/yaml-workflow/pipeline/build/transform.ts","../services/yaml-workflow/pipeline/build/utils.ts","../services/yaml-workflow/pipeline/build/wiring.ts","../services/yaml-workflow/pipeline/compile/index.ts","../services/yaml-workflow/pipeline/compile/llm-call.ts","../services/yaml-workflow/pipeline/compile/parse-plan.ts","../services/yaml-workflow/pipeline/compile/summarize.ts","../services/yaml-workflow/workers/callbacks.ts","../services/yaml-workflow/workers/events.ts","../services/yaml-workflow/workers/index.ts","../services/yaml-workflow/workers/register.ts","../services/yaml-workflow/workers/scope.ts","../start/adapters.ts","../start/config.ts","../start/graph-workflows.ts","../start/index.ts","../start/server.ts","../start/socket-auth.ts","../start/workers.ts","../system/index.ts","../system/activities/claude-code.ts","../system/activities/file-storage.ts","../system/activities/http.ts","../system/activities/knowledge.ts","../system/activities/oauth.ts","../system/activities/schema-exchange.ts","../system/activities/sql.ts","../system/activities/triage/cache.ts","../system/activities/triage/context.ts","../system/activities/triage/discovery.ts","../system/activities/triage/index.ts","../system/activities/triage/llm.ts","../system/activities/triage/tools.ts","../system/mcp-servers/claude-code.ts","../system/mcp-servers/docs.ts","../system/mcp-servers/events.ts","../system/mcp-servers/file-storage.ts","../system/mcp-servers/http-fetch.ts","../system/mcp-servers/human-queue-schemas.ts","../system/mcp-servers/human-queue.ts","../system/mcp-servers/knowledge.ts","../system/mcp-servers/oauth.ts","../system/mcp-servers/schema-exchange.ts","../system/mcp-servers/translation.ts","../system/mcp-servers/vision-prompts.ts","../system/mcp-servers/vision.ts","../system/mcp-servers/workflow-compiler.ts","../system/mcp-servers/workflow.ts","../system/mcp-servers/admin/agent-subscriptions.ts","../system/mcp-servers/admin/agents.ts","../system/mcp-servers/admin/bot-accounts.ts","../system/mcp-servers/admin/controlplane.ts","../system/mcp-servers/admin/escalations.ts","../system/mcp-servers/admin/exports.ts","../system/mcp-servers/admin/index.ts","../system/mcp-servers/admin/maintenance.ts","../system/mcp-servers/admin/mcp-servers.ts","../system/mcp-servers/admin/overview.ts","../system/mcp-servers/admin/pipelines.ts","../system/mcp-servers/admin/schemas.ts","../system/mcp-servers/admin/settings.ts","../system/mcp-servers/admin/tasks.ts","../system/mcp-servers/admin/topics.ts","../system/mcp-servers/admin/users.ts","../system/mcp-servers/admin/workflow-config.ts","../system/mcp-servers/admin/workflows.ts","../system/mcp-servers/admin/yaml-workflows.ts","../system/mcp-servers/db-query/index.ts","../system/mcp-servers/db-query/schemas.ts","../system/mcp-servers/db-query/tools.ts","../system/seed/index.ts","../system/seed/tool-manifests-admin.ts","../system/seed/tool-manifests-data.ts","../system/seed/tool-manifests-escalation.ts","../system/seed/tool-manifests-events.ts","../system/seed/tool-manifests-knowledge.ts","../system/seed/tool-manifests-workflows.ts","../system/workflows/tool-result-guard.ts","../system/workflows/capability-invoke/activities.ts","../system/workflows/capability-invoke/index.ts","../system/workflows/mcp-deterministic/activities.ts","../system/workflows/mcp-deterministic/index.ts","../system/workflows/mcp-query/index.ts","../system/workflows/mcp-query/prompts.ts","../system/workflows/mcp-query/strategy-advisors.ts","../system/workflows/mcp-query/types.ts","../system/workflows/mcp-query/activities/caches.ts","../system/workflows/mcp-query/activities/discovery.ts","../system/workflows/mcp-query/activities/index.ts","../system/workflows/mcp-query/activities/llm.ts","../system/workflows/mcp-query/activities/tool-executor.ts","../system/workflows/mcp-query/activities/tool-loader.ts","../system/workflows/mcp-query-router/activities.ts","../system/workflows/mcp-query-router/index.ts","../system/workflows/mcp-query-router/prompts.ts","../system/workflows/mcp-triage/activities-proxy.ts","../system/workflows/mcp-triage/index.ts","../system/workflows/mcp-triage/prompts.ts","../system/workflows/mcp-triage/response-builders.ts","../system/workflows/mcp-triage/response.ts","../system/workflows/mcp-triage/types.ts","../system/workflows/mcp-triage-deterministic/activities.ts","../system/workflows/mcp-triage-deterministic/index.ts","../system/workflows/mcp-triage-router/activities.ts","../system/workflows/mcp-triage-router/index.ts","../system/workflows/mcp-workflow-builder/index.ts","../system/workflows/mcp-workflow-builder/prompts.ts","../system/workflows/mcp-workflow-builder/activities/caches.ts","../system/workflows/mcp-workflow-builder/activities/index.ts","../system/workflows/mcp-workflow-builder/activities/llm.ts","../system/workflows/mcp-workflow-builder/activities/tool-loader.ts","../system/workflows/mcp-workflow-planner/index.ts","../system/workflows/mcp-workflow-planner/prompts.ts","../system/workflows/mcp-workflow-planner/activities/analyze.ts","../system/workflows/mcp-workflow-planner/activities/index.ts","../system/workflows/mcp-workflow-planner/activities/persist.ts","../system/workflows/mcp-workflow-planner/activities/plan.ts","../system/workflows/shared/discovery.ts","../system/workflows/shared/index.ts","../system/workflows/shared/llm-caller.ts","../system/workflows/shared/prompts.ts","../system/workflows/shared/strategy-advisors.ts","../system/workflows/shared/tool-executor.ts","../system/workflows/shared/tool-loader.ts","../system/workflows/shared/types.ts","../types/agent.ts","../types/auth.ts","../types/config.ts","../types/delegation.ts","../types/discovery.ts","../types/envelope.ts","../types/escalation-strategy.ts","../types/escalation.ts","../types/events.ts","../types/export.ts","../types/express.d.ts","../types/index.ts","../types/logger.ts","../types/maintenance.ts","../types/mcp.ts","../types/oauth.ts","../types/sdk.ts","../types/startup.ts","../types/task.ts","../types/telemetry.ts","../types/tool-context.ts","../types/user.ts","../types/workflow-set.ts","../types/workflow.ts","../types/yaml-workflow.ts","../workers/index.ts"],"version":"5.9.3"}
@@ -121,6 +121,28 @@ export interface LTTopicConfig {
121
121
  */
122
122
  reset?: boolean;
123
123
  }
124
+ /**
125
+ * Declarative graph (YAML/DAG) workflow registered at startup — the graph-form
126
+ * peer of a `workers` entry (which registers a procedural workflow). Hand-author
127
+ * the HotMesh YAML; no MCP server or LLM Designer is required. Each flow is
128
+ * created insert-if-absent, then deployed and activated, and appears under
129
+ * Orchestrate › Graph in the dashboard.
130
+ */
131
+ export interface LTGraphWorkflowConfig {
132
+ /** Tool name (snake_case). Unique within the namespace. */
133
+ name: string;
134
+ description?: string;
135
+ /** Raw HotMesh YAML — an `app:` block with one or more `graphs:`. */
136
+ yaml: string;
137
+ /** Namespace / app_id (lowercase alphanumeric). Default: 'graph'. */
138
+ namespace?: string;
139
+ /** JSON Schema for the graph's input — pre-fills the dashboard run form. */
140
+ inputSchema?: Record<string, any>;
141
+ /** JSON Schema for the graph's output — shown on the detail page. */
142
+ outputSchema?: Record<string, any>;
143
+ /** Classification tags for discovery. */
144
+ tags?: string[];
145
+ }
124
146
  export interface LTStartConfig {
125
147
  /** PostgreSQL connection. Provide individual fields or a connectionString. */
126
148
  database: {
@@ -283,6 +305,12 @@ export interface LTStartConfig {
283
305
  topics?: LTTopicConfig[];
284
306
  /** Declarative agent configurations. Seeded on first boot (insert-if-absent). */
285
307
  agents?: LTAgentConfig[];
308
+ /**
309
+ * Declarative graph (YAML/DAG) workflows — the graph-form peer of `workers`.
310
+ * Each is created (insert-if-absent), deployed, and activated at startup with
311
+ * no MCP/LLM Designer involved. Hand-author the HotMesh YAML and it runs.
312
+ */
313
+ graphWorkflows?: LTGraphWorkflowConfig[];
286
314
  /** MCP (Model Context Protocol) integration. */
287
315
  mcp?: {
288
316
  /** Built-in MCP server (human queue) configuration. */
@@ -1,2 +1,2 @@
1
- import{j as o}from"./vendor-query-B2UbickB.js";import{c as n}from"./tasks-JVRVCx0f.js";import{r as m}from"./index-CWEOhAiK.js";import{f as c}from"./useEventHooks-BwjAi0Qq.js";import{u}from"./mcp-BO8QnWyk.js";import{P as d}from"./PageHeaderWithStats-yD_PTbOl.js";import"./vendor-react-CXumBFUA.js";import"./vendor-icons-Doy0g69_.js";function j(){var a;c();const{data:s}=n({limit:1}),{data:e}=m({status:"pending",limit:1}),{data:t}=u(),r=((a=t==null?void 0:t.servers)==null?void 0:a.filter(i=>i.status==="connected").length)??0,l=t?`${r}/${t.total}`:"—";return o.jsx("div",{children:o.jsx(d,{title:"Admin",stats:[{label:"Tasks",value:(s==null?void 0:s.total)??"—"},{label:"Pending Escalations",value:(e==null?void 0:e.total)??"—",dotClass:"bg-status-pending"},{label:"MCP Servers",value:l},{label:"System",value:"Healthy",dotClass:"bg-status-success"}]})})}export{j as AdminDashboard};
2
- //# sourceMappingURL=AdminDashboard-CgJC8ZZF.js.map
1
+ import{j as o}from"./vendor-query-B2UbickB.js";import{c as n}from"./tasks-CwjvPECN.js";import{r as m}from"./index-B7lEd0cY.js";import{f as c}from"./useEventHooks-Cd1GM1NG.js";import{u}from"./mcp-DXbFGoA8.js";import{P as d}from"./PageHeaderWithStats-BuKc9MKt.js";import"./vendor-react-CXumBFUA.js";import"./vendor-icons-Dj2F0Jrb.js";function j(){var a;c();const{data:s}=n({limit:1}),{data:e}=m({status:"pending",limit:1}),{data:t}=u(),r=((a=t==null?void 0:t.servers)==null?void 0:a.filter(i=>i.status==="connected").length)??0,l=t?`${r}/${t.total}`:"—";return o.jsx("div",{children:o.jsx(d,{title:"Admin",stats:[{label:"Tasks",value:(s==null?void 0:s.total)??"—"},{label:"Pending Escalations",value:(e==null?void 0:e.total)??"—",dotClass:"bg-status-pending"},{label:"MCP Servers",value:l},{label:"System",value:"Healthy",dotClass:"bg-status-success"}]})})}export{j as AdminDashboard};
2
+ //# sourceMappingURL=AdminDashboard-CMzR4d-w.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdminDashboard-CgJC8ZZF.js","sources":["../../src/pages/admin/AdminDashboard.tsx"],"sourcesContent":["import { useTasks } from '../../api/tasks';\nimport { useEscalations } from '../../api/escalations';\nimport { useEscalationListEvents } from '../../hooks/useEventHooks';\nimport { useMcpServers } from '../../api/mcp';\nimport { PageHeaderWithStats } from '../../components/common/layout/PageHeaderWithStats';\n\nexport function AdminDashboard() {\n useEscalationListEvents();\n const { data: taskData } = useTasks({ limit: 1 });\n const { data: pendingEsc } = useEscalations({ status: 'pending', limit: 1 });\n const { data: mcpData } = useMcpServers();\n\n const connectedServers =\n mcpData?.servers?.filter((s) => s.status === 'connected').length ?? 0;\n const mcpLabel = mcpData ? `${connectedServers}/${mcpData.total}` : '—';\n\n return (\n <div>\n <PageHeaderWithStats\n title=\"Admin\"\n stats={[\n { label: 'Tasks', value: taskData?.total ?? '—' },\n { label: 'Pending Escalations', value: pendingEsc?.total ?? '—', dotClass: 'bg-status-pending' },\n { label: 'MCP Servers', value: mcpLabel },\n { label: 'System', value: 'Healthy', dotClass: 'bg-status-success' },\n ]}\n />\n </div>\n );\n}\n"],"names":["AdminDashboard","useEscalationListEvents","taskData","useTasks","pendingEsc","useEscalations","mcpData","useMcpServers","connectedServers","_a","s","mcpLabel","jsx","PageHeaderWithStats"],"mappings":"4UAMO,SAASA,GAAiB,OAC/BC,EAAA,EACA,KAAM,CAAE,KAAMC,CAAA,EAAaC,EAAS,CAAE,MAAO,EAAG,EAC1C,CAAE,KAAMC,CAAA,EAAeC,EAAe,CAAE,OAAQ,UAAW,MAAO,EAAG,EACrE,CAAE,KAAMC,CAAA,EAAYC,EAAA,EAEpBC,IACJC,EAAAH,GAAA,YAAAA,EAAS,UAAT,YAAAG,EAAkB,OAAQC,GAAMA,EAAE,SAAW,aAAa,SAAU,EAChEC,EAAWL,EAAU,GAAGE,CAAgB,IAAIF,EAAQ,KAAK,GAAK,IAEpE,aACG,MAAA,CACC,SAAAM,EAAAA,IAACC,EAAA,CACC,MAAM,QACN,MAAO,CACL,CAAE,MAAO,QAAS,OAAOX,GAAA,YAAAA,EAAU,QAAS,GAAA,EAC5C,CAAE,MAAO,sBAAuB,OAAOE,GAAA,YAAAA,EAAY,QAAS,IAAK,SAAU,mBAAA,EAC3E,CAAE,MAAO,cAAe,MAAOO,CAAA,EAC/B,CAAE,MAAO,SAAU,MAAO,UAAW,SAAU,mBAAA,CAAoB,CACrE,CAAA,EAEJ,CAEJ"}
1
+ {"version":3,"file":"AdminDashboard-CMzR4d-w.js","sources":["../../src/pages/admin/AdminDashboard.tsx"],"sourcesContent":["import { useTasks } from '../../api/tasks';\nimport { useEscalations } from '../../api/escalations';\nimport { useEscalationListEvents } from '../../hooks/useEventHooks';\nimport { useMcpServers } from '../../api/mcp';\nimport { PageHeaderWithStats } from '../../components/common/layout/PageHeaderWithStats';\n\nexport function AdminDashboard() {\n useEscalationListEvents();\n const { data: taskData } = useTasks({ limit: 1 });\n const { data: pendingEsc } = useEscalations({ status: 'pending', limit: 1 });\n const { data: mcpData } = useMcpServers();\n\n const connectedServers =\n mcpData?.servers?.filter((s) => s.status === 'connected').length ?? 0;\n const mcpLabel = mcpData ? `${connectedServers}/${mcpData.total}` : '—';\n\n return (\n <div>\n <PageHeaderWithStats\n title=\"Admin\"\n stats={[\n { label: 'Tasks', value: taskData?.total ?? '—' },\n { label: 'Pending Escalations', value: pendingEsc?.total ?? '—', dotClass: 'bg-status-pending' },\n { label: 'MCP Servers', value: mcpLabel },\n { label: 'System', value: 'Healthy', dotClass: 'bg-status-success' },\n ]}\n />\n </div>\n );\n}\n"],"names":["AdminDashboard","useEscalationListEvents","taskData","useTasks","pendingEsc","useEscalations","mcpData","useMcpServers","connectedServers","_a","s","mcpLabel","jsx","PageHeaderWithStats"],"mappings":"4UAMO,SAASA,GAAiB,OAC/BC,EAAA,EACA,KAAM,CAAE,KAAMC,CAAA,EAAaC,EAAS,CAAE,MAAO,EAAG,EAC1C,CAAE,KAAMC,CAAA,EAAeC,EAAe,CAAE,OAAQ,UAAW,MAAO,EAAG,EACrE,CAAE,KAAMC,CAAA,EAAYC,EAAA,EAEpBC,IACJC,EAAAH,GAAA,YAAAA,EAAS,UAAT,YAAAG,EAAkB,OAAQC,GAAMA,EAAE,SAAW,aAAa,SAAU,EAChEC,EAAWL,EAAU,GAAGE,CAAgB,IAAIF,EAAQ,KAAK,GAAK,IAEpE,aACG,MAAA,CACC,SAAAM,EAAAA,IAACC,EAAA,CACC,MAAM,QACN,MAAO,CACL,CAAE,MAAO,QAAS,OAAOX,GAAA,YAAAA,EAAU,QAAS,GAAA,EAC5C,CAAE,MAAO,sBAAuB,OAAOE,GAAA,YAAAA,EAAY,QAAS,IAAK,SAAU,mBAAA,EAC3E,CAAE,MAAO,cAAe,MAAOO,CAAA,EAC/B,CAAE,MAAO,SAAU,MAAO,UAAW,SAAU,mBAAA,CAAoB,CACrE,CAAA,EAEJ,CAEJ"}
@@ -1,16 +1,16 @@
1
- import{j as e,a as v}from"./vendor-query-B2UbickB.js";import{a as re,d as le,b as oe}from"./agents-BI5OeN84.js";import{E as ce,C as de,u as pe,a as xe,b as ue,c as me}from"./CronLabel-Cv5em7OP.js";import{c as he,u as fe}from"./index-CWEOhAiK.js";import{P as ve}from"./PageHeader-BuJpMxyu.js";import{B as O,e as U,i as be,R as Y,n as L,t as Z,aa as G,a as V,aL as ee,$ as ye}from"./vendor-icons-Doy0g69_.js";import{e as ge}from"./knowledge-D9Tuh-o-.js";import{R as te}from"./RunAsSelector-DP-jxsv6.js";import{u as je}from"./workflows-CyEYa01a.js";import{u as we}from"./yaml-workflows-i3GzrEme.js";import{u as se}from"./capabilities-BUbl-ojp.js";import{u as Ne}from"./topics-BLVnahd7.js";import{W as Q}from"./WorkflowPill-Z-zHRKOK.js";import{e as _e,c as ke,f as Ce}from"./vendor-react-CXumBFUA.js";import"./BotPicker-dCvnjynP.js";import"./bots-1UzUCsrR.js";const X={name:"",description:"",goals:"",rules:"",user_id:"",knowledge_domain:"",subscriptions:[],schedules:[]},Se={topic:"",filter:"",reaction_type:"durable",workflow_type:"",pipeline_id:"",mcp_prompt:"",server_id:"",tool_name:"",input_mapping:"{}",execute_as:"",enabled:!0},qe={cron:"0 * * * *",reaction_type:"durable",workflow_type:"",pipeline_id:"",server_id:"",tool_name:"",envelope:"{}",execute_as:""};function Re(s,a){var o,x,u;const r=(x=(o=s.behaviors)==null?void 0:o.schedules)!=null&&x.length?s.behaviors.schedules.map(n=>({cron:n.cron||"",reaction_type:n.reaction_type||"durable",workflow_type:n.workflow_type||"",pipeline_id:n.pipeline_id||"",server_id:n.server_id||"",tool_name:n.tool_name||"",envelope:n.envelope?JSON.stringify(n.envelope,null,2):"{}",execute_as:n.execute_as||""})):(u=s.behaviors)!=null&&u.cron?[{cron:s.behaviors.cron,reaction_type:"durable",workflow_type:s.workflow_type??"",pipeline_id:"",server_id:"",tool_name:"",envelope:"{}",execute_as:""}]:[];return{name:s.id,description:s.description??"",goals:s.goals??"",rules:s.rules??"",user_id:s.user_id??"",knowledge_domain:s.knowledge_domain??"",subscriptions:a.map(n=>({id:n.id,topic:n.topic,filter:n.filter?JSON.stringify(n.filter,null,2):"",reaction_type:n.reaction_type,workflow_type:n.workflow_type??"",pipeline_id:n.pipeline_id??"",mcp_prompt:n.mcp_prompt??"",server_id:n.server_id??"",tool_name:n.tool_name??"",input_mapping:JSON.stringify(n.input_mapping??{},null,2),execute_as:n.execute_as??"",enabled:n.enabled})),schedules:r}}function Ae(s){var r;const a={};return s.schedules.length>0&&(a.schedules=s.schedules.map(o=>({cron:o.cron,reaction_type:o.reaction_type||"durable",workflow_type:o.reaction_type==="pipeline"?void 0:o.workflow_type,pipeline_id:o.reaction_type==="pipeline"?o.pipeline_id:void 0,envelope:B(o.envelope)??{},execute_as:o.execute_as||void 0})),a.cron=s.schedules[0].cron),{id:s.name,description:s.description||void 0,goals:s.goals||void 0,rules:s.rules||void 0,user_id:s.user_id||void 0,knowledge_domain:s.knowledge_domain||void 0,behaviors:a,workflow_type:((r=s.schedules[0])==null?void 0:r.workflow_type)||void 0,pipeline_id:void 0}}function Oe(s){return s.subscriptions.map(a=>({id:a.id,topic:a.topic,filter:a.filter?B(a.filter):void 0,reaction_type:a.reaction_type,workflow_type:a.workflow_type||void 0,pipeline_id:a.pipeline_id||void 0,mcp_prompt:a.mcp_prompt||void 0,server_id:a.server_id||void 0,tool_name:a.tool_name||void 0,input_mapping:B(a.input_mapping)??{},execute_as:a.execute_as||void 0,enabled:a.enabled}))}function B(s){if(s.trim())try{return JSON.parse(s)}catch{return}}function $e(s,a,r,o){let x;try{x=JSON.parse(s)}catch{x={}}const u=o.includes(a),n=r===""||r===void 0||r===null||Array.isArray(r)&&r.length===0||r==="[]";if(!u&&n){const{[a]:p,...c}=x;return JSON.stringify(c,null,2)}let h=r;if(typeof r=="string")try{const p=JSON.parse(r);Array.isArray(p)&&(h=p)}catch{}return JSON.stringify({...x,[a]:h},null,2)}const S="section-header mt-[3em] first:mt-0",E="label",_="hint",R="input",M="input-json w-full";function Ee({form:s,set:a}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Give your automation a name and describe what it does. The name appears everywhere — in events, logs, and the dashboard."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:identity"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Identity",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{children:[e.jsx("label",{className:E,children:"Name *"}),e.jsx("input",{type:"text",value:s.name,onChange:r=>a("name",r.target.value),placeholder:"health-monitor",className:R}),e.jsx("p",{className:_,children:"Lowercase, kebab-case. This appears everywhere."})]}),e.jsxs("div",{children:[e.jsx("label",{className:E,children:"Description"}),e.jsx("input",{type:"text",value:s.description,onChange:r=>a("description",r.target.value),placeholder:"Watches for workflow failures and captures diagnostics",className:R}),e.jsx("p",{className:_,children:"One sentence that explains what this automation does."})]})]})}function Pe({form:s,set:a}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Goals define what drives the automation. Rules define what constrains it."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:motivation"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Motivation",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:E,children:"Goals"}),e.jsx("textarea",{value:s.goals,onChange:r=>a("goals",r.target.value),placeholder:"Detect failures early, capture diagnostics, alert before cascading",rows:4,className:`${R} resize-none`}),e.jsx("p",{className:_,children:"Primary motivation. What the automation is trying to achieve."})]}),e.jsxs("div",{children:[e.jsx("label",{className:E,children:"Rules"}),e.jsx("textarea",{value:s.rules,onChange:r=>a("rules",r.target.value),placeholder:"Never auto-restart failed workflows. Always escalate to humans.",rows:4,className:`${R} resize-none`}),e.jsx("p",{className:_,children:"Guardrails. What it must never do, even when goals suggest it should."})]})]})]})}function Ie({form:s,set:a}){const{data:r}=ge(),o=(r==null?void 0:r.domains)??[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Assign a knowledge domain — the automation's memory. It stores context here over time."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:knowledge"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Knowledge",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{children:[e.jsx("label",{className:E,children:"Knowledge Domain"}),e.jsx("input",{type:"text",value:s.knowledge_domain,onChange:x=>a("knowledge_domain",x.target.value),placeholder:"e.g., system-health, content-review, vendor-data",className:R,list:"domain-suggestions"}),e.jsx("datalist",{id:"domain-suggestions",children:o.map(x=>e.jsx("option",{value:x.domain},x.domain))}),e.jsx("p",{className:_,children:"Choose an existing domain to share memory, or type a new name to create one."})]}),o.length>0&&e.jsxs("div",{children:[e.jsx("label",{className:E,children:"Existing Domains"}),e.jsx("div",{className:"space-y-0.5 mt-2",children:o.map(x=>e.jsxs("button",{type:"button",onClick:()=>a("knowledge_domain",x.domain),className:`w-full flex items-center gap-3 px-3 py-2 rounded-md text-left transition-colors ${s.knowledge_domain===x.domain?"border-l-2 border-l-accent bg-accent/5":"hover:bg-surface-hover border-l-2 border-l-transparent"}`,children:[e.jsx(U,{className:"w-3.5 h-3.5 text-text-quaternary shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-sm text-text-primary flex-1",children:x.domain}),e.jsxs("span",{className:"text-[10px] text-text-quaternary",children:[x.count," entries"]}),e.jsx("span",{className:"text-[9px] text-text-quaternary",children:e.jsx(he,{date:x.latest})})]},x.domain))})]})]})}function We({serverId:s,toolName:a,onChange:r}){const{data:o}=se(),x=v.useMemo(()=>{var t;return((t=o==null?void 0:o.categories)==null?void 0:t.flatMap(i=>i.tools))??[]},[o]),[u,n]=v.useState(!1),[h,p]=v.useState(""),c=v.useRef(null),f=v.useRef(null);v.useEffect(()=>{if(!u)return;function t(i){f.current&&!f.current.contains(i.target)&&n(!1)}return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[u]);const l=a?`${a}`:"",d=u?h:l,y=v.useMemo(()=>{const t=(u?h:"").toLowerCase();return t?x.filter(i=>i.name.toLowerCase().includes(t)||i.serverName.toLowerCase().includes(t)||(i.description??"").toLowerCase().includes(t)):x},[x,h,u]),m=a?x.find(t=>t.serverId===s&&t.name===a):void 0;return e.jsxs("div",{ref:f,className:"relative",children:[e.jsx("input",{ref:c,type:"text",value:d,onFocus:()=>{n(!0),p(l)},onChange:t=>{const i=t.target.value;p(i),i||r("",""),u||n(!0)},placeholder:"Search capabilities...",className:"input font-mono text-sm w-full"}),!u&&(m==null?void 0:m.description)&&e.jsx("p",{className:"text-[10px] text-text-tertiary mt-1 italic",children:m.description}),u&&y.length>0&&e.jsx("div",{className:"absolute z-50 left-0 right-0 mt-1 max-h-64 overflow-y-auto rounded-md border border-surface-border bg-surface shadow-lg",children:y.map(t=>e.jsxs("button",{type:"button",onClick:()=>{r(t.serverId,t.name),p(t.name),n(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors flex items-center gap-3 ${s===t.serverId&&a===t.name?"bg-accent/5":""}`,children:[e.jsx("span",{className:"text-[11px] font-mono text-text-primary shrink-0",children:t.name}),e.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[9px] font-medium shrink-0 bg-accent/10 text-accent",children:[e.jsx(be,{className:"w-2 h-2",strokeWidth:1.5}),t.serverName]}),t.description&&e.jsx("span",{className:"text-[10px] text-text-quaternary truncate",children:t.description})]},`${t.serverId}:${t.name}`))}),u&&y.length===0&&h&&e.jsx("div",{className:"absolute z-50 left-0 right-0 mt-1 rounded-md border border-surface-border bg-surface shadow-lg px-3 py-4 text-center",children:e.jsxs("p",{className:"text-[11px] text-text-quaternary",children:['No capabilities match "',h,'"']})})]})}const Te={durable:"Workflow",pipeline:"Pipeline",capability:"Capability",mcp_query:"MCP Query"},Le=["durable","pipeline","capability","mcp_query"];function ae({reactionType:s,onReactionTypeChange:a,workflowType:r,onWorkflowTypeChange:o,pipelineId:x,onPipelineIdChange:u,serverId:n,toolName:h,onCapabilityChange:p,mcpPrompt:c,onMcpPromptChange:f,availableTypes:l=[...Le]}){const{data:d}=je(),y=(d??[]).filter(i=>i.invocable).map(i=>i.workflow_type),{data:m}=we({status:"active"}),t=((m==null?void 0:m.workflows)??[]).map(i=>({id:i.id,name:i.graph_topic||i.id}));return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex gap-1",children:l.map(i=>{const b=s===i;return e.jsx("button",{type:"button",onClick:()=>a(i),className:`px-3 py-1.5 text-[11px] font-medium rounded-md transition-colors ${b?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:Te[i]},i)})}),s==="durable"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Workflow *"}),e.jsxs("select",{value:r,onChange:i=>o(i.target.value),className:"input",children:[e.jsx("option",{value:"",children:"Select workflow..."}),y.map(i=>e.jsx("option",{value:i,children:i},i))]})]}),s==="pipeline"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Pipeline *"}),e.jsxs("select",{value:x,onChange:i=>u(i.target.value),className:"input",children:[e.jsx("option",{value:"",children:"Select pipeline..."}),t.map(i=>e.jsx("option",{value:i.id,children:i.name},i.id))]})]}),s==="capability"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Capability *"}),e.jsx(We,{serverId:n,toolName:h,onChange:p})]}),s==="mcp_query"&&f&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Prompt *"}),e.jsx("textarea",{value:c??"",onChange:i=>f(i.target.value),placeholder:"Analyze the error and suggest remediation...",rows:3,className:"input resize-none"})]})]})}const Me={task:"bg-blue-400/15 text-blue-400",workflow:"bg-accent/15 text-accent",escalation:"bg-amber-400/15 text-amber-400",activity:"bg-cyan-400/15 text-cyan-400",knowledge:"bg-violet-400/15 text-violet-400",file:"bg-orange-400/15 text-orange-400",agent:"bg-emerald-400/15 text-emerald-400",app:"bg-rose-400/15 text-rose-400",milestone:"bg-violet-400/15 text-violet-400"};function Je({form:s,set:a}){const{data:r}=Ne({limit:200}),{data:o}=se(),x=(r==null?void 0:r.topics)??[],u=v.useMemo(()=>{var t;return((t=o==null?void 0:o.categories)==null?void 0:t.flatMap(i=>i.tools))??[]},[o]),[n,h]=v.useState(0),p=(t,i,b)=>{const g=[...s.subscriptions];g[t]={...g[t],[i]:b},a("subscriptions",g)},c=()=>{a("subscriptions",[...s.subscriptions,{...Se}]),h(s.subscriptions.length)},f=t=>{a("subscriptions",s.subscriptions.filter((i,b)=>b!==t)),n>=s.subscriptions.length-1&&h(Math.max(0,s.subscriptions.length-2))},l=s.subscriptions,d=l[n],y=t=>t.topic?t.reaction_type==="durable"?!!t.workflow_type:t.reaction_type==="pipeline"?!!t.pipeline_id:t.reaction_type==="mcp_query"?!!t.mcp_prompt:t.reaction_type==="capability"?!!t.server_id&&!!t.tool_name:!1:!1,m=d?x.find(t=>t.topic===d.topic):void 0;return l.length===0?e.jsxs("div",{className:"max-w-xl",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-8",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the automation runs the configured workflow with the event payload."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:subscriptions"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Subscriptions",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(Y,{className:"w-8 h-8 text-text-quaternary/40 mb-3",strokeWidth:1}),e.jsx("p",{className:"text-sm text-text-tertiary mb-2",children:"No event subscriptions yet"}),e.jsx("p",{className:"text-[11px] text-text-quaternary max-w-sm mb-6",children:"Each subscription listens for a topic pattern and runs a workflow when it matches."}),e.jsxs("button",{onClick:c,className:"flex items-center gap-2 text-xs text-accent hover:text-accent-hover transition-colors",children:[e.jsx(L,{className:"w-3.5 h-3.5"})," Add first subscription"]})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-6",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the automation runs the configured workflow with the event payload."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:subscriptions"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Subscriptions",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex gap-8",children:[e.jsxs("div",{className:"w-52 shrink-0 space-y-0.5",children:[l.map((t,i)=>e.jsxs("div",{className:`group/sub flex items-center rounded-md transition-colors ${n===i?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsxs("button",{onClick:()=>h(i),className:"flex-1 text-left px-3 py-2 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${y(t)?"bg-emerald-400":"bg-zinc-500"}`}),e.jsx("span",{className:"text-[11px] font-mono truncate",children:t.topic||"new subscription"})]}),e.jsxs("span",{className:"text-[9px] text-text-quaternary ml-3",children:["→ ",t.workflow_type||t.tool_name||t.reaction_type]})]}),e.jsx("button",{onClick:b=>{b.stopPropagation(),confirm(`Remove subscription "${t.topic||"new"}"?
1
+ import{j as e,a as v}from"./vendor-query-B2UbickB.js";import{a as re,d as le,b as oe}from"./agents-D09G0HCv.js";import{E as ce,C as de,u as pe,a as xe,b as ue,c as me}from"./CronLabel-DeNm1I4r.js";import{c as he,u as fe}from"./index-B7lEd0cY.js";import{P as ve}from"./PageHeader-Bnt2iQQa.js";import{B as O,d as U,h as be,R as Y,m as L,q as Z,a7 as G,a as V,aL as ee,V as ye}from"./vendor-icons-Dj2F0Jrb.js";import{e as ge}from"./knowledge-Bl_KaoKJ.js";import{R as te}from"./RunAsSelector-BFxxMvL3.js";import{u as je}from"./workflows-BLKji1_1.js";import{u as we}from"./yaml-workflows-BUhMfdaw.js";import{u as se}from"./capabilities-DON4-NXs.js";import{u as Ne}from"./topics-BrwkmaFR.js";import{W as Q}from"./WorkflowPill-F1oKUzmc.js";import{e as _e,c as ke,f as Ce}from"./vendor-react-CXumBFUA.js";import"./BotPicker-lj42d48P.js";import"./bots-D0LhyZZM.js";const X={name:"",description:"",goals:"",rules:"",user_id:"",knowledge_domain:"",subscriptions:[],schedules:[]},Se={topic:"",filter:"",reaction_type:"durable",workflow_type:"",pipeline_id:"",mcp_prompt:"",server_id:"",tool_name:"",input_mapping:"{}",execute_as:"",enabled:!0},qe={cron:"0 * * * *",reaction_type:"durable",workflow_type:"",pipeline_id:"",server_id:"",tool_name:"",envelope:"{}",execute_as:""};function Re(s,a){var o,x,u;const r=(x=(o=s.behaviors)==null?void 0:o.schedules)!=null&&x.length?s.behaviors.schedules.map(n=>({cron:n.cron||"",reaction_type:n.reaction_type||"durable",workflow_type:n.workflow_type||"",pipeline_id:n.pipeline_id||"",server_id:n.server_id||"",tool_name:n.tool_name||"",envelope:n.envelope?JSON.stringify(n.envelope,null,2):"{}",execute_as:n.execute_as||""})):(u=s.behaviors)!=null&&u.cron?[{cron:s.behaviors.cron,reaction_type:"durable",workflow_type:s.workflow_type??"",pipeline_id:"",server_id:"",tool_name:"",envelope:"{}",execute_as:""}]:[];return{name:s.id,description:s.description??"",goals:s.goals??"",rules:s.rules??"",user_id:s.user_id??"",knowledge_domain:s.knowledge_domain??"",subscriptions:a.map(n=>({id:n.id,topic:n.topic,filter:n.filter?JSON.stringify(n.filter,null,2):"",reaction_type:n.reaction_type,workflow_type:n.workflow_type??"",pipeline_id:n.pipeline_id??"",mcp_prompt:n.mcp_prompt??"",server_id:n.server_id??"",tool_name:n.tool_name??"",input_mapping:JSON.stringify(n.input_mapping??{},null,2),execute_as:n.execute_as??"",enabled:n.enabled})),schedules:r}}function Ae(s){var r;const a={};return s.schedules.length>0&&(a.schedules=s.schedules.map(o=>({cron:o.cron,reaction_type:o.reaction_type||"durable",workflow_type:o.reaction_type==="pipeline"?void 0:o.workflow_type,pipeline_id:o.reaction_type==="pipeline"?o.pipeline_id:void 0,envelope:B(o.envelope)??{},execute_as:o.execute_as||void 0})),a.cron=s.schedules[0].cron),{id:s.name,description:s.description||void 0,goals:s.goals||void 0,rules:s.rules||void 0,user_id:s.user_id||void 0,knowledge_domain:s.knowledge_domain||void 0,behaviors:a,workflow_type:((r=s.schedules[0])==null?void 0:r.workflow_type)||void 0,pipeline_id:void 0}}function Oe(s){return s.subscriptions.map(a=>({id:a.id,topic:a.topic,filter:a.filter?B(a.filter):void 0,reaction_type:a.reaction_type,workflow_type:a.workflow_type||void 0,pipeline_id:a.pipeline_id||void 0,mcp_prompt:a.mcp_prompt||void 0,server_id:a.server_id||void 0,tool_name:a.tool_name||void 0,input_mapping:B(a.input_mapping)??{},execute_as:a.execute_as||void 0,enabled:a.enabled}))}function B(s){if(s.trim())try{return JSON.parse(s)}catch{return}}function Ee(s,a,r,o){let x;try{x=JSON.parse(s)}catch{x={}}const u=o.includes(a),n=r===""||r===void 0||r===null||Array.isArray(r)&&r.length===0||r==="[]";if(!u&&n){const{[a]:p,...c}=x;return JSON.stringify(c,null,2)}let h=r;if(typeof r=="string")try{const p=JSON.parse(r);Array.isArray(p)&&(h=p)}catch{}return JSON.stringify({...x,[a]:h},null,2)}const S="section-header mt-[3em] first:mt-0",$="label",_="hint",R="input",M="input-json w-full";function $e({form:s,set:a}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Give your automation a name and describe what it does. The name appears everywhere — in events, logs, and the dashboard."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:identity"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Identity",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{children:[e.jsx("label",{className:$,children:"Name *"}),e.jsx("input",{type:"text",value:s.name,onChange:r=>a("name",r.target.value),placeholder:"health-monitor",className:R}),e.jsx("p",{className:_,children:"Lowercase, kebab-case. This appears everywhere."})]}),e.jsxs("div",{children:[e.jsx("label",{className:$,children:"Description"}),e.jsx("input",{type:"text",value:s.description,onChange:r=>a("description",r.target.value),placeholder:"Watches for workflow failures and captures diagnostics",className:R}),e.jsx("p",{className:_,children:"One sentence that explains what this automation does."})]})]})}function Pe({form:s,set:a}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Goals define what drives the automation. Rules define what constrains it."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:motivation"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Motivation",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:$,children:"Goals"}),e.jsx("textarea",{value:s.goals,onChange:r=>a("goals",r.target.value),placeholder:"Detect failures early, capture diagnostics, alert before cascading",rows:4,className:`${R} resize-none`}),e.jsx("p",{className:_,children:"Primary motivation. What the automation is trying to achieve."})]}),e.jsxs("div",{children:[e.jsx("label",{className:$,children:"Rules"}),e.jsx("textarea",{value:s.rules,onChange:r=>a("rules",r.target.value),placeholder:"Never auto-restart failed workflows. Always escalate to humans.",rows:4,className:`${R} resize-none`}),e.jsx("p",{className:_,children:"Guardrails. What it must never do, even when goals suggest it should."})]})]})]})}function Ie({form:s,set:a}){const{data:r}=ge(),o=(r==null?void 0:r.domains)??[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Assign a knowledge domain — the automation's memory. It stores context here over time."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:knowledge"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Knowledge",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{children:[e.jsx("label",{className:$,children:"Knowledge Domain"}),e.jsx("input",{type:"text",value:s.knowledge_domain,onChange:x=>a("knowledge_domain",x.target.value),placeholder:"e.g., system-health, content-review, vendor-data",className:R,list:"domain-suggestions"}),e.jsx("datalist",{id:"domain-suggestions",children:o.map(x=>e.jsx("option",{value:x.domain},x.domain))}),e.jsx("p",{className:_,children:"Choose an existing domain to share memory, or type a new name to create one."})]}),o.length>0&&e.jsxs("div",{children:[e.jsx("label",{className:$,children:"Existing Domains"}),e.jsx("div",{className:"space-y-0.5 mt-2",children:o.map(x=>e.jsxs("button",{type:"button",onClick:()=>a("knowledge_domain",x.domain),className:`w-full flex items-center gap-3 px-3 py-2 rounded-md text-left transition-colors ${s.knowledge_domain===x.domain?"border-l-2 border-l-accent bg-accent/5":"hover:bg-surface-hover border-l-2 border-l-transparent"}`,children:[e.jsx(U,{className:"w-3.5 h-3.5 text-text-quaternary shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-sm text-text-primary flex-1",children:x.domain}),e.jsxs("span",{className:"text-[10px] text-text-quaternary",children:[x.count," entries"]}),e.jsx("span",{className:"text-[9px] text-text-quaternary",children:e.jsx(he,{date:x.latest})})]},x.domain))})]})]})}function We({serverId:s,toolName:a,onChange:r}){const{data:o}=se(),x=v.useMemo(()=>{var t;return((t=o==null?void 0:o.categories)==null?void 0:t.flatMap(i=>i.tools))??[]},[o]),[u,n]=v.useState(!1),[h,p]=v.useState(""),c=v.useRef(null),f=v.useRef(null);v.useEffect(()=>{if(!u)return;function t(i){f.current&&!f.current.contains(i.target)&&n(!1)}return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[u]);const l=a?`${a}`:"",d=u?h:l,y=v.useMemo(()=>{const t=(u?h:"").toLowerCase();return t?x.filter(i=>i.name.toLowerCase().includes(t)||i.serverName.toLowerCase().includes(t)||(i.description??"").toLowerCase().includes(t)):x},[x,h,u]),m=a?x.find(t=>t.serverId===s&&t.name===a):void 0;return e.jsxs("div",{ref:f,className:"relative",children:[e.jsx("input",{ref:c,type:"text",value:d,onFocus:()=>{n(!0),p(l)},onChange:t=>{const i=t.target.value;p(i),i||r("",""),u||n(!0)},placeholder:"Search capabilities...",className:"input font-mono text-sm w-full"}),!u&&(m==null?void 0:m.description)&&e.jsx("p",{className:"text-[10px] text-text-tertiary mt-1 italic",children:m.description}),u&&y.length>0&&e.jsx("div",{className:"absolute z-50 left-0 right-0 mt-1 max-h-64 overflow-y-auto rounded-md border border-surface-border bg-surface shadow-lg",children:y.map(t=>e.jsxs("button",{type:"button",onClick:()=>{r(t.serverId,t.name),p(t.name),n(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors flex items-center gap-3 ${s===t.serverId&&a===t.name?"bg-accent/5":""}`,children:[e.jsx("span",{className:"text-[11px] font-mono text-text-primary shrink-0",children:t.name}),e.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[9px] font-medium shrink-0 bg-accent/10 text-accent",children:[e.jsx(be,{className:"w-2 h-2",strokeWidth:1.5}),t.serverName]}),t.description&&e.jsx("span",{className:"text-[10px] text-text-quaternary truncate",children:t.description})]},`${t.serverId}:${t.name}`))}),u&&y.length===0&&h&&e.jsx("div",{className:"absolute z-50 left-0 right-0 mt-1 rounded-md border border-surface-border bg-surface shadow-lg px-3 py-4 text-center",children:e.jsxs("p",{className:"text-[11px] text-text-quaternary",children:['No capabilities match "',h,'"']})})]})}const Te={durable:"Workflow",pipeline:"Pipeline",capability:"Capability",mcp_query:"MCP Query"},Le=["durable","pipeline","capability","mcp_query"];function ae({reactionType:s,onReactionTypeChange:a,workflowType:r,onWorkflowTypeChange:o,pipelineId:x,onPipelineIdChange:u,serverId:n,toolName:h,onCapabilityChange:p,mcpPrompt:c,onMcpPromptChange:f,availableTypes:l=[...Le]}){const{data:d}=je(),y=(d??[]).filter(i=>i.invocable).map(i=>i.workflow_type),{data:m}=we({status:"active"}),t=((m==null?void 0:m.workflows)??[]).map(i=>({id:i.id,name:i.graph_topic||i.id}));return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex gap-1",children:l.map(i=>{const b=s===i;return e.jsx("button",{type:"button",onClick:()=>a(i),className:`px-3 py-1.5 text-[11px] font-medium rounded-md transition-colors ${b?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:Te[i]},i)})}),s==="durable"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Workflow *"}),e.jsxs("select",{value:r,onChange:i=>o(i.target.value),className:"input",children:[e.jsx("option",{value:"",children:"Select workflow..."}),y.map(i=>e.jsx("option",{value:i,children:i},i))]})]}),s==="pipeline"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Pipeline *"}),e.jsxs("select",{value:x,onChange:i=>u(i.target.value),className:"input",children:[e.jsx("option",{value:"",children:"Select pipeline..."}),t.map(i=>e.jsx("option",{value:i.id,children:i.name},i.id))]})]}),s==="capability"&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Capability *"}),e.jsx(We,{serverId:n,toolName:h,onChange:p})]}),s==="mcp_query"&&f&&e.jsxs("div",{children:[e.jsx("label",{className:"label",children:"Prompt *"}),e.jsx("textarea",{value:c??"",onChange:i=>f(i.target.value),placeholder:"Analyze the error and suggest remediation...",rows:3,className:"input resize-none"})]})]})}const Me={task:"bg-blue-400/15 text-blue-400",workflow:"bg-accent/15 text-accent",escalation:"bg-amber-400/15 text-amber-400",activity:"bg-cyan-400/15 text-cyan-400",knowledge:"bg-violet-400/15 text-violet-400",file:"bg-orange-400/15 text-orange-400",agent:"bg-emerald-400/15 text-emerald-400",app:"bg-rose-400/15 text-rose-400",milestone:"bg-violet-400/15 text-violet-400"};function Je({form:s,set:a}){const{data:r}=Ne({limit:200}),{data:o}=se(),x=(r==null?void 0:r.topics)??[],u=v.useMemo(()=>{var t;return((t=o==null?void 0:o.categories)==null?void 0:t.flatMap(i=>i.tools))??[]},[o]),[n,h]=v.useState(0),p=(t,i,b)=>{const g=[...s.subscriptions];g[t]={...g[t],[i]:b},a("subscriptions",g)},c=()=>{a("subscriptions",[...s.subscriptions,{...Se}]),h(s.subscriptions.length)},f=t=>{a("subscriptions",s.subscriptions.filter((i,b)=>b!==t)),n>=s.subscriptions.length-1&&h(Math.max(0,s.subscriptions.length-2))},l=s.subscriptions,d=l[n],y=t=>t.topic?t.reaction_type==="durable"?!!t.workflow_type:t.reaction_type==="pipeline"?!!t.pipeline_id:t.reaction_type==="mcp_query"?!!t.mcp_prompt:t.reaction_type==="capability"?!!t.server_id&&!!t.tool_name:!1:!1,m=d?x.find(t=>t.topic===d.topic):void 0;return l.length===0?e.jsxs("div",{className:"max-w-xl",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-8",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the automation runs the configured workflow with the event payload."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:subscriptions"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Subscriptions",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(Y,{className:"w-8 h-8 text-text-quaternary/40 mb-3",strokeWidth:1}),e.jsx("p",{className:"text-sm text-text-tertiary mb-2",children:"No event subscriptions yet"}),e.jsx("p",{className:"text-[11px] text-text-quaternary max-w-sm mb-6",children:"Each subscription listens for a topic pattern and runs a workflow when it matches."}),e.jsxs("button",{onClick:c,className:"flex items-center gap-2 text-xs text-accent hover:text-accent-hover transition-colors",children:[e.jsx(L,{className:"w-3.5 h-3.5"})," Add first subscription"]})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-6",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the automation runs the configured workflow with the event payload."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:subscriptions"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Subscriptions",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex gap-8",children:[e.jsxs("div",{className:"w-52 shrink-0 space-y-0.5",children:[l.map((t,i)=>e.jsxs("div",{className:`group/sub flex items-center rounded-md transition-colors ${n===i?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsxs("button",{onClick:()=>h(i),className:"flex-1 text-left px-3 py-2 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${y(t)?"bg-emerald-400":"bg-zinc-500"}`}),e.jsx("span",{className:"text-[11px] font-mono truncate",children:t.topic||"new subscription"})]}),e.jsxs("span",{className:"text-[9px] text-text-quaternary ml-3",children:["→ ",t.workflow_type||t.tool_name||t.reaction_type]})]}),e.jsx("button",{onClick:b=>{b.stopPropagation(),confirm(`Remove subscription "${t.topic||"new"}"?
2
2
 
3
- This takes effect when you save.`)&&f(i)},className:"opacity-0 group-hover/sub:opacity-100 px-2 text-text-quaternary hover:text-red-400 transition-all",title:"Remove",children:e.jsx(Z,{className:"w-3 h-3"})})]},i)),e.jsxs("button",{onClick:c,className:"w-full flex items-center gap-1.5 px-3 py-2 text-[11px] text-accent hover:text-accent-hover transition-colors",children:[e.jsx(L,{className:"w-3 h-3"})," Add"]})]}),d&&e.jsxs("div",{className:"flex-1 min-w-0 space-y-12",children:[e.jsxs("div",{children:[e.jsx("label",{className:S,children:"When this event fires"}),e.jsx(ze,{value:d.topic,onChange:t=>p(n,"topic",t),topics:x}),(m==null?void 0:m.payload_schema)&&e.jsxs("div",{className:"mt-3 p-3 rounded-md bg-surface-sunken border border-surface-border",children:[e.jsx("p",{className:"text-[10px] text-text-quaternary mb-1 uppercase tracking-wider font-medium",children:"Payload Schema"}),e.jsx("pre",{className:"text-[11px] font-mono text-text-secondary whitespace-pre-wrap overflow-x-auto max-h-40",children:JSON.stringify(m.payload_schema.properties??m.payload_schema,null,2)}),m.description&&e.jsx("p",{className:"text-[10px] text-text-tertiary mt-2 italic",children:m.description})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"Run this reaction"}),e.jsx(ae,{reactionType:d.reaction_type,onReactionTypeChange:t=>p(n,"reaction_type",t),workflowType:d.workflow_type,onWorkflowTypeChange:t=>p(n,"workflow_type",t),pipelineId:d.pipeline_id,onPipelineIdChange:t=>p(n,"pipeline_id",t),serverId:d.server_id,toolName:d.tool_name,onCapabilityChange:(t,i)=>{var A;const b=[...s.subscriptions],g={...b[n],server_id:t,tool_name:i},k=u.find(w=>w.serverId===t&&w.name===i),$=(A=k==null?void 0:k.inputSchema)==null?void 0:A.properties;if($&&i){const w={};for(const P of Object.keys($))P.startsWith("_")||(w[P]=`{event.data.${P}}`);g.input_mapping=JSON.stringify(w,null,2)}b[n]=g,a("subscriptions",b)},mcpPrompt:d.mcp_prompt,onMcpPromptChange:t=>p(n,"mcp_prompt",t)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:S,children:"As identity"}),e.jsx(te,{selected:d.execute_as,onChange:t=>p(n,"execute_as",t)}),e.jsx("p",{className:_,children:"Identity used when invoking the workflow."})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"But only if"}),e.jsx("input",{type:"text",value:d.filter,onChange:t=>p(n,"filter",t.target.value),placeholder:'{"extension": "png"}',className:`${R} font-mono text-xs`}),e.jsx("p",{className:_,children:"JSON filter against event.data. Click an operator to insert:"}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1.5",children:[{label:"equals",value:'{"key": "val"}'},{label:"not equal",value:'{"key": {"$ne": "val"}}'},{label:"in list",value:'{"key": {"$in": ["a", "b"]}}'},{label:"exists",value:'{"key": {"$exists": true}}'}].map(t=>e.jsx("button",{type:"button",onClick:()=>p(n,"filter",t.value),className:"px-2 py-0.5 text-[10px] font-mono rounded bg-accent/8 text-accent hover:bg-accent/15 transition-colors",children:t.label},t.label))})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"With this data"}),d.reaction_type==="capability"&&d.tool_name?e.jsx(Fe,{tool:u.find(t=>t.serverId===d.server_id&&t.name===d.tool_name),value:d.input_mapping,onChange:t=>p(n,"input_mapping",t),eventSchema:m==null?void 0:m.payload_schema}):e.jsxs(e.Fragment,{children:[e.jsx("textarea",{value:d.input_mapping,onChange:t=>p(n,"input_mapping",t.target.value),rows:10,className:M,placeholder:`{
3
+ This takes effect when you save.`)&&f(i)},className:"opacity-0 group-hover/sub:opacity-100 px-2 text-text-quaternary hover:text-red-400 transition-all",title:"Remove",children:e.jsx(Z,{className:"w-3 h-3"})})]},i)),e.jsxs("button",{onClick:c,className:"w-full flex items-center gap-1.5 px-3 py-2 text-[11px] text-accent hover:text-accent-hover transition-colors",children:[e.jsx(L,{className:"w-3 h-3"})," Add"]})]}),d&&e.jsxs("div",{className:"flex-1 min-w-0 space-y-12",children:[e.jsxs("div",{children:[e.jsx("label",{className:S,children:"When this event fires"}),e.jsx(ze,{value:d.topic,onChange:t=>p(n,"topic",t),topics:x}),(m==null?void 0:m.payload_schema)&&e.jsxs("div",{className:"mt-3 p-3 rounded-md bg-surface-sunken border border-surface-border",children:[e.jsx("p",{className:"text-[10px] text-text-quaternary mb-1 uppercase tracking-wider font-medium",children:"Payload Schema"}),e.jsx("pre",{className:"text-[11px] font-mono text-text-secondary whitespace-pre-wrap overflow-x-auto max-h-40",children:JSON.stringify(m.payload_schema.properties??m.payload_schema,null,2)}),m.description&&e.jsx("p",{className:"text-[10px] text-text-tertiary mt-2 italic",children:m.description})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"Run this reaction"}),e.jsx(ae,{reactionType:d.reaction_type,onReactionTypeChange:t=>p(n,"reaction_type",t),workflowType:d.workflow_type,onWorkflowTypeChange:t=>p(n,"workflow_type",t),pipelineId:d.pipeline_id,onPipelineIdChange:t=>p(n,"pipeline_id",t),serverId:d.server_id,toolName:d.tool_name,onCapabilityChange:(t,i)=>{var A;const b=[...s.subscriptions],g={...b[n],server_id:t,tool_name:i},k=u.find(w=>w.serverId===t&&w.name===i),E=(A=k==null?void 0:k.inputSchema)==null?void 0:A.properties;if(E&&i){const w={};for(const P of Object.keys(E))P.startsWith("_")||(w[P]=`{event.data.${P}}`);g.input_mapping=JSON.stringify(w,null,2)}b[n]=g,a("subscriptions",b)},mcpPrompt:d.mcp_prompt,onMcpPromptChange:t=>p(n,"mcp_prompt",t)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:S,children:"As identity"}),e.jsx(te,{selected:d.execute_as,onChange:t=>p(n,"execute_as",t)}),e.jsx("p",{className:_,children:"Identity used when invoking the workflow."})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"But only if"}),e.jsx("input",{type:"text",value:d.filter,onChange:t=>p(n,"filter",t.target.value),placeholder:'{"extension": "png"}',className:`${R} font-mono text-xs`}),e.jsx("p",{className:_,children:"JSON filter against event.data. Click an operator to insert:"}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1.5",children:[{label:"equals",value:'{"key": "val"}'},{label:"not equal",value:'{"key": {"$ne": "val"}}'},{label:"in list",value:'{"key": {"$in": ["a", "b"]}}'},{label:"exists",value:'{"key": {"$exists": true}}'}].map(t=>e.jsx("button",{type:"button",onClick:()=>p(n,"filter",t.value),className:"px-2 py-0.5 text-[10px] font-mono rounded bg-accent/8 text-accent hover:bg-accent/15 transition-colors",children:t.label},t.label))})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"With this data"}),d.reaction_type==="capability"&&d.tool_name?e.jsx(Fe,{tool:u.find(t=>t.serverId===d.server_id&&t.name===d.tool_name),value:d.input_mapping,onChange:t=>p(n,"input_mapping",t),eventSchema:m==null?void 0:m.payload_schema}):e.jsxs(e.Fragment,{children:[e.jsx("textarea",{value:d.input_mapping,onChange:t=>p(n,"input_mapping",t.target.value),rows:10,className:M,placeholder:`{
4
4
  "data": {
5
5
  "orderId": "{event.data.orderId}",
6
6
  "error": "{event.data.error}"
7
7
  }
8
- }`}),e.jsxs("p",{className:_,children:["Maps event fields to workflow input. ","{event.data.fieldName}"," resolves at runtime."]})]})]})]})]})]})}function Fe({tool:s,value:a,onChange:r,eventSchema:o}){var y,m;const[x,u]=v.useState(!1),n=((y=s==null?void 0:s.inputSchema)==null?void 0:y.properties)??{},h=((m=s==null?void 0:s.inputSchema)==null?void 0:m.required)??[],p=Object.entries(n).filter(([t])=>!t.startsWith("_")),c=v.useMemo(()=>[...p].sort(([t],[i])=>{const b=h.indexOf(t),g=h.indexOf(i);return b!==-1&&g!==-1?b-g:b!==-1?-1:g!==-1?1:t.localeCompare(i)}),[p,h]),f=v.useMemo(()=>{const t=[{value:"{event.type}",label:"event type"},{value:"{event.source}",label:"event source"},{value:"{event.timestamp}",label:"ISO timestamp"},{value:"{event.workflowId}",label:"workflow ID"},{value:"{event.workflowName}",label:"workflow name"}],i=o==null?void 0:o.properties;if(i)for(const[b,g]of Object.entries(i))t.push({value:`{event.data.${b}}`,label:g.description||b});return t},[o]),l=v.useMemo(()=>{try{return JSON.parse(a)}catch{return{}}},[a]),d=(t,i)=>{r($e(a,t,i,h))};return c.length===0||x?e.jsxs("div",{children:[c.length>0&&e.jsx("div",{className:"flex justify-end mb-1",children:e.jsx("button",{type:"button",onClick:()=>u(!1),className:"text-[10px] text-accent hover:text-accent-hover transition-colors",children:"Form view"})}),e.jsx("textarea",{value:a,onChange:t=>r(t.target.value),rows:8,className:M,placeholder:`{
8
+ }`}),e.jsxs("p",{className:_,children:["Maps event fields to workflow input. ","{event.data.fieldName}"," resolves at runtime."]})]})]})]})]})]})}function Fe({tool:s,value:a,onChange:r,eventSchema:o}){var y,m;const[x,u]=v.useState(!1),n=((y=s==null?void 0:s.inputSchema)==null?void 0:y.properties)??{},h=((m=s==null?void 0:s.inputSchema)==null?void 0:m.required)??[],p=Object.entries(n).filter(([t])=>!t.startsWith("_")),c=v.useMemo(()=>[...p].sort(([t],[i])=>{const b=h.indexOf(t),g=h.indexOf(i);return b!==-1&&g!==-1?b-g:b!==-1?-1:g!==-1?1:t.localeCompare(i)}),[p,h]),f=v.useMemo(()=>{const t=[{value:"{event.type}",label:"event type"},{value:"{event.source}",label:"event source"},{value:"{event.timestamp}",label:"ISO timestamp"},{value:"{event.workflowId}",label:"workflow ID"},{value:"{event.workflowName}",label:"workflow name"}],i=o==null?void 0:o.properties;if(i)for(const[b,g]of Object.entries(i))t.push({value:`{event.data.${b}}`,label:g.description||b});return t},[o]),l=v.useMemo(()=>{try{return JSON.parse(a)}catch{return{}}},[a]),d=(t,i)=>{r(Ee(a,t,i,h))};return c.length===0||x?e.jsxs("div",{children:[c.length>0&&e.jsx("div",{className:"flex justify-end mb-1",children:e.jsx("button",{type:"button",onClick:()=>u(!1),className:"text-[10px] text-accent hover:text-accent-hover transition-colors",children:"Form view"})}),e.jsx("textarea",{value:a,onChange:t=>r(t.target.value),rows:8,className:M,placeholder:`{
9
9
  "domain": "{event.data.name}",
10
10
  "key": "{event.data.path}"
11
- }`}),e.jsxs("p",{className:_,children:["Maps event fields to capability inputs. ","{event.data.fieldName}"," resolves at runtime."]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("p",{className:"text-[11px] text-text-tertiary",children:"Map each input to an event field or enter a static value."}),e.jsx("button",{type:"button",onClick:()=>u(!0),className:"text-[10px] text-text-tertiary hover:text-accent transition-colors",children:"Raw JSON"})]}),e.jsx("div",{className:"space-y-4",children:c.map(([t,i])=>{const b=h.includes(t),g=i.description,k=i.type,$=typeof l[t]=="string"?l[t]:typeof l[t]=="object"?JSON.stringify(l[t]):l[t]!=null?String(l[t]):"";return e.jsxs("div",{className:"bg-surface-sunken/30 rounded-md px-4 py-3",children:[e.jsxs("div",{className:"flex items-baseline gap-2 mb-0.5",children:[e.jsxs("label",{className:"text-[11px] font-semibold uppercase tracking-wider text-text-secondary",children:[t.replace(/[_-]/g," "),b&&e.jsx("span",{className:"text-status-error ml-0.5",children:"*"})]}),k&&e.jsx("span",{className:"text-[9px] text-text-quaternary",children:k})]}),g&&e.jsx("p",{className:"text-[10px] text-text-quaternary mb-2",children:g}),e.jsx(De,{value:$,onChange:A=>d(t,A),suggestions:f,fieldType:k,placeholder:`{event.data.${t}}`})]},t)})})]})}function De({value:s,onChange:a,suggestions:r,fieldType:o,placeholder:x}){const[u,n]=v.useState(!1),[h,p]=v.useState(""),c=v.useRef(null);v.useEffect(()=>{if(!u)return;function l(d){c.current&&!c.current.contains(d.target)&&n(!1)}return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[u]);const f=r.filter(l=>l.value.toLowerCase().includes(h.toLowerCase())||l.label.toLowerCase().includes(h.toLowerCase()));if(o==="object")return e.jsx("textarea",{value:s,onChange:l=>{try{a(JSON.parse(l.target.value))}catch{a(l.target.value)}},rows:3,className:`${M} text-xs`,placeholder:'{ "source": "{event.source}" }'});if(o==="array"){const l=(()=>{try{const d=JSON.parse(s);if(Array.isArray(d))return d.map(String)}catch{}return s?s.split(",").map(d=>d.trim()).filter(Boolean):[]})();return e.jsxs("div",{children:[e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2 min-h-[28px]",children:l.map((d,y)=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-[11px] font-mono bg-accent/10 text-accent rounded-full",children:[d,e.jsx("button",{type:"button",onClick:()=>{const m=l.filter((t,i)=>i!==y);a(JSON.stringify(m))},className:"text-accent/50 hover:text-accent ml-0.5",children:"×"})]},y))}),e.jsx("input",{type:"text",className:"input font-mono text-xs w-full",placeholder:"Type a value and press Enter",onKeyDown:d=>{if(d.key==="Enter"||d.key===","){d.preventDefault();const y=d.target.value.trim();y&&(a(JSON.stringify([...l,y])),d.target.value="")}}})]})}return e.jsxs("div",{ref:c,className:"relative",children:[e.jsx("input",{type:"text",value:s,onFocus:()=>{n(!0),p("")},onChange:l=>{a(l.target.value),p(l.target.value),u||n(!0)},className:"input font-mono text-xs w-full",placeholder:x}),u&&f.length>0&&e.jsx("div",{className:"absolute z-50 left-0 right-0 mt-1 max-h-48 overflow-y-auto rounded-md border border-surface-border bg-surface shadow-lg",children:f.map(l=>e.jsxs("button",{type:"button",onClick:()=>{a(l.value),n(!1)},className:`w-full text-left px-3 py-1.5 hover:bg-surface-hover transition-colors flex items-center gap-3 ${s===l.value?"bg-accent/5":""}`,children:[e.jsx("span",{className:"text-[11px] font-mono text-accent shrink-0",children:l.value}),e.jsx("span",{className:"text-[10px] text-text-quaternary truncate",children:l.label})]},l.value))})]})}function ze({value:s,onChange:a,topics:r}){const[o,x]=v.useState(!1),[u,n]=v.useState(""),h=v.useRef(null),p=v.useRef(null);v.useEffect(()=>{function l(d){p.current&&!p.current.contains(d.target)&&x(!1)}return o&&document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[o]);const c=o?u:s,f=r.filter(l=>l.topic.toLowerCase().includes((o?u:"").toLowerCase())||(l.description??"").toLowerCase().includes((o?u:"").toLowerCase()));return e.jsxs("div",{ref:p,className:"relative",children:[e.jsx("input",{ref:h,type:"text",value:c,onFocus:()=>{x(!0),n(s)},onChange:l=>{const d=l.target.value;n(d),a(d),o||x(!0)},placeholder:"workflow.failed or app.>",className:`${R} font-mono`}),o&&f.length>0&&e.jsx("div",{className:"absolute z-50 left-0 right-0 mt-1 max-h-64 overflow-y-auto rounded-md border border-surface-border bg-surface shadow-lg",children:f.map(l=>{const d=Me[l.category]??"bg-zinc-400/15 text-zinc-400";return e.jsxs("button",{type:"button",onClick:()=>{a(l.topic),n(l.topic),x(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors flex items-center gap-3 ${s===l.topic?"bg-accent/5":""}`,children:[e.jsx("span",{className:"text-[11px] font-mono text-text-primary shrink-0",children:l.topic}),e.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium shrink-0 ${d}`,children:l.category}),l.description&&e.jsx("span",{className:"text-[10px] text-text-quaternary truncate",children:l.description})]},l.topic)})})]})}const Be=["*/5 * * * *","*/15 * * * *","0 * * * *","0 */4 * * *","0 7 * * *","0 9 * * 1-5"];function z(s){return{"* * * * *":"Every minute","*/5 * * * *":"Every 5 min","*/15 * * * *":"Every 15 min","0 * * * *":"Hourly","0 */4 * * *":"Every 4 hours","0 7 * * *":"Daily 7 AM UTC","0 9 * * 1-5":"Weekdays 9 AM UTC","0 0 * * 1":"Weekly Monday"}[s]||s}function Ue({form:s,set:a}){const[r,o]=v.useState(0),x=(c,f,l)=>{const d=[...s.schedules];d[c]={...d[c],[f]:l},a("schedules",d)},u=()=>{a("schedules",[...s.schedules,{...qe}]),o(s.schedules.length)},n=c=>{a("schedules",s.schedules.filter((f,l)=>l!==c)),r>=s.schedules.length-1&&o(Math.max(0,s.schedules.length-2))},h=s.schedules,p=h[r];return h.length===0?e.jsxs("div",{children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 mb-8 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. Each schedule runs a workflow on a cron timer."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:schedule"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Schedule",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(G,{className:"w-8 h-8 text-text-quaternary/40 mb-3",strokeWidth:1}),e.jsx("p",{className:"text-sm text-text-tertiary mb-2",children:"No schedules"}),e.jsx("p",{className:"text-[11px] text-text-quaternary max-w-sm mb-6",children:"Add a schedule to run a workflow on a recurring cron timer."}),e.jsxs("button",{onClick:u,className:"flex items-center gap-2 text-xs text-accent hover:text-accent-hover transition-colors",children:[e.jsx(L,{className:"w-3.5 h-3.5"})," Add schedule"]})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 mb-6 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Each schedule runs a workflow on a timer. An automation can have multiple schedules targeting different workflows."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:schedule"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Schedule",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex gap-8",children:[e.jsxs("div",{className:"w-48 shrink-0 space-y-0.5",children:[h.map((c,f)=>e.jsxs("div",{className:`group/sched flex items-center rounded-md transition-colors ${r===f?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsxs("button",{onClick:()=>o(f),className:"flex-1 text-left px-3 py-2 min-w-0",children:[e.jsx("span",{className:"text-[11px] font-mono block",children:c.cron||"new schedule"}),e.jsxs("span",{className:"text-[9px] text-text-quaternary",children:[(c.reaction_type==="pipeline"?c.pipeline_id:c.workflow_type)||"no target"," · ",z(c.cron)]})]}),e.jsx("button",{onClick:l=>{l.stopPropagation(),confirm(`Remove schedule "${c.cron||"new"}"?
11
+ }`}),e.jsxs("p",{className:_,children:["Maps event fields to capability inputs. ","{event.data.fieldName}"," resolves at runtime."]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("p",{className:"text-[11px] text-text-tertiary",children:"Map each input to an event field or enter a static value."}),e.jsx("button",{type:"button",onClick:()=>u(!0),className:"text-[10px] text-text-tertiary hover:text-accent transition-colors",children:"Raw JSON"})]}),e.jsx("div",{className:"space-y-4",children:c.map(([t,i])=>{const b=h.includes(t),g=i.description,k=i.type,E=typeof l[t]=="string"?l[t]:typeof l[t]=="object"?JSON.stringify(l[t]):l[t]!=null?String(l[t]):"";return e.jsxs("div",{className:"bg-surface-sunken/30 rounded-md px-4 py-3",children:[e.jsxs("div",{className:"flex items-baseline gap-2 mb-0.5",children:[e.jsxs("label",{className:"text-[11px] font-semibold uppercase tracking-wider text-text-secondary",children:[t.replace(/[_-]/g," "),b&&e.jsx("span",{className:"text-status-error ml-0.5",children:"*"})]}),k&&e.jsx("span",{className:"text-[9px] text-text-quaternary",children:k})]}),g&&e.jsx("p",{className:"text-[10px] text-text-quaternary mb-2",children:g}),e.jsx(De,{value:E,onChange:A=>d(t,A),suggestions:f,fieldType:k,placeholder:`{event.data.${t}}`})]},t)})})]})}function De({value:s,onChange:a,suggestions:r,fieldType:o,placeholder:x}){const[u,n]=v.useState(!1),[h,p]=v.useState(""),c=v.useRef(null);v.useEffect(()=>{if(!u)return;function l(d){c.current&&!c.current.contains(d.target)&&n(!1)}return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[u]);const f=r.filter(l=>l.value.toLowerCase().includes(h.toLowerCase())||l.label.toLowerCase().includes(h.toLowerCase()));if(o==="object")return e.jsx("textarea",{value:s,onChange:l=>{try{a(JSON.parse(l.target.value))}catch{a(l.target.value)}},rows:3,className:`${M} text-xs`,placeholder:'{ "source": "{event.source}" }'});if(o==="array"){const l=(()=>{try{const d=JSON.parse(s);if(Array.isArray(d))return d.map(String)}catch{}return s?s.split(",").map(d=>d.trim()).filter(Boolean):[]})();return e.jsxs("div",{children:[e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2 min-h-[28px]",children:l.map((d,y)=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-[11px] font-mono bg-accent/10 text-accent rounded-full",children:[d,e.jsx("button",{type:"button",onClick:()=>{const m=l.filter((t,i)=>i!==y);a(JSON.stringify(m))},className:"text-accent/50 hover:text-accent ml-0.5",children:"×"})]},y))}),e.jsx("input",{type:"text",className:"input font-mono text-xs w-full",placeholder:"Type a value and press Enter",onKeyDown:d=>{if(d.key==="Enter"||d.key===","){d.preventDefault();const y=d.target.value.trim();y&&(a(JSON.stringify([...l,y])),d.target.value="")}}})]})}return e.jsxs("div",{ref:c,className:"relative",children:[e.jsx("input",{type:"text",value:s,onFocus:()=>{n(!0),p("")},onChange:l=>{a(l.target.value),p(l.target.value),u||n(!0)},className:"input font-mono text-xs w-full",placeholder:x}),u&&f.length>0&&e.jsx("div",{className:"absolute z-50 left-0 right-0 mt-1 max-h-48 overflow-y-auto rounded-md border border-surface-border bg-surface shadow-lg",children:f.map(l=>e.jsxs("button",{type:"button",onClick:()=>{a(l.value),n(!1)},className:`w-full text-left px-3 py-1.5 hover:bg-surface-hover transition-colors flex items-center gap-3 ${s===l.value?"bg-accent/5":""}`,children:[e.jsx("span",{className:"text-[11px] font-mono text-accent shrink-0",children:l.value}),e.jsx("span",{className:"text-[10px] text-text-quaternary truncate",children:l.label})]},l.value))})]})}function ze({value:s,onChange:a,topics:r}){const[o,x]=v.useState(!1),[u,n]=v.useState(""),h=v.useRef(null),p=v.useRef(null);v.useEffect(()=>{function l(d){p.current&&!p.current.contains(d.target)&&x(!1)}return o&&document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[o]);const c=o?u:s,f=r.filter(l=>l.topic.toLowerCase().includes((o?u:"").toLowerCase())||(l.description??"").toLowerCase().includes((o?u:"").toLowerCase()));return e.jsxs("div",{ref:p,className:"relative",children:[e.jsx("input",{ref:h,type:"text",value:c,onFocus:()=>{x(!0),n(s)},onChange:l=>{const d=l.target.value;n(d),a(d),o||x(!0)},placeholder:"workflow.failed or app.>",className:`${R} font-mono`}),o&&f.length>0&&e.jsx("div",{className:"absolute z-50 left-0 right-0 mt-1 max-h-64 overflow-y-auto rounded-md border border-surface-border bg-surface shadow-lg",children:f.map(l=>{const d=Me[l.category]??"bg-zinc-400/15 text-zinc-400";return e.jsxs("button",{type:"button",onClick:()=>{a(l.topic),n(l.topic),x(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors flex items-center gap-3 ${s===l.topic?"bg-accent/5":""}`,children:[e.jsx("span",{className:"text-[11px] font-mono text-text-primary shrink-0",children:l.topic}),e.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium shrink-0 ${d}`,children:l.category}),l.description&&e.jsx("span",{className:"text-[10px] text-text-quaternary truncate",children:l.description})]},l.topic)})})]})}const Be=["*/5 * * * *","*/15 * * * *","0 * * * *","0 */4 * * *","0 7 * * *","0 9 * * 1-5"];function z(s){return{"* * * * *":"Every minute","*/5 * * * *":"Every 5 min","*/15 * * * *":"Every 15 min","0 * * * *":"Hourly","0 */4 * * *":"Every 4 hours","0 7 * * *":"Daily 7 AM UTC","0 9 * * 1-5":"Weekdays 9 AM UTC","0 0 * * 1":"Weekly Monday"}[s]||s}function Ue({form:s,set:a}){const[r,o]=v.useState(0),x=(c,f,l)=>{const d=[...s.schedules];d[c]={...d[c],[f]:l},a("schedules",d)},u=()=>{a("schedules",[...s.schedules,{...qe}]),o(s.schedules.length)},n=c=>{a("schedules",s.schedules.filter((f,l)=>l!==c)),r>=s.schedules.length-1&&o(Math.max(0,s.schedules.length-2))},h=s.schedules,p=h[r];return h.length===0?e.jsxs("div",{children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 mb-8 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. Each schedule runs a workflow on a cron timer."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:schedule"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Schedule",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(G,{className:"w-8 h-8 text-text-quaternary/40 mb-3",strokeWidth:1}),e.jsx("p",{className:"text-sm text-text-tertiary mb-2",children:"No schedules"}),e.jsx("p",{className:"text-[11px] text-text-quaternary max-w-sm mb-6",children:"Add a schedule to run a workflow on a recurring cron timer."}),e.jsxs("button",{onClick:u,className:"flex items-center gap-2 text-xs text-accent hover:text-accent-hover transition-colors",children:[e.jsx(L,{className:"w-3.5 h-3.5"})," Add schedule"]})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 mb-6 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Each schedule runs a workflow on a timer. An automation can have multiple schedules targeting different workflows."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:schedule"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Schedule",children:e.jsx(O,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex gap-8",children:[e.jsxs("div",{className:"w-48 shrink-0 space-y-0.5",children:[h.map((c,f)=>e.jsxs("div",{className:`group/sched flex items-center rounded-md transition-colors ${r===f?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsxs("button",{onClick:()=>o(f),className:"flex-1 text-left px-3 py-2 min-w-0",children:[e.jsx("span",{className:"text-[11px] font-mono block",children:c.cron||"new schedule"}),e.jsxs("span",{className:"text-[9px] text-text-quaternary",children:[(c.reaction_type==="pipeline"?c.pipeline_id:c.workflow_type)||"no target"," · ",z(c.cron)]})]}),e.jsx("button",{onClick:l=>{l.stopPropagation(),confirm(`Remove schedule "${c.cron||"new"}"?
12
12
 
13
13
  This takes effect when you save.`)&&n(f)},className:"opacity-0 group-hover/sched:opacity-100 px-2 text-text-quaternary hover:text-red-400 transition-all",title:"Remove",children:e.jsx(Z,{className:"w-3 h-3"})})]},f)),e.jsxs("button",{onClick:u,className:"w-full flex items-center gap-1.5 px-3 py-2 text-[11px] text-accent hover:text-accent-hover transition-colors",children:[e.jsx(L,{className:"w-3 h-3"})," Add"]})]}),p&&e.jsxs("div",{className:"flex-1 min-w-0 space-y-12",children:[e.jsxs("div",{children:[e.jsx("label",{className:S,children:"Run every"}),e.jsx("input",{type:"text",value:p.cron,onChange:c=>x(r,"cron",c.target.value),placeholder:"0 * * * *",className:`${R} font-mono`}),p.cron&&e.jsx("p",{className:"text-[11px] text-accent/80 mt-1",children:z(p.cron)}),e.jsx("div",{className:"flex gap-3 mt-2 overflow-x-auto",children:Be.map(c=>e.jsx("button",{type:"button",onClick:()=>x(r,"cron",c),className:`text-[10px] font-mono whitespace-nowrap transition-colors ${p.cron===c?"text-accent font-medium":"text-accent/50 hover:text-accent"}`,children:z(c)},c))})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"Run this reaction"}),e.jsx(ae,{reactionType:p.reaction_type,onReactionTypeChange:c=>x(r,"reaction_type",c),workflowType:p.workflow_type,onWorkflowTypeChange:c=>x(r,"workflow_type",c),pipelineId:p.pipeline_id,onPipelineIdChange:c=>x(r,"pipeline_id",c),serverId:p.server_id,toolName:p.tool_name,onCapabilityChange:(c,f)=>{x(r,"server_id",c),x(r,"tool_name",f)},availableTypes:["durable","pipeline","capability"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"As identity"}),e.jsx(te,{selected:p.execute_as,onChange:c=>x(r,"execute_as",c)}),e.jsx("p",{className:_,children:"Identity used when invoking."})]}),e.jsxs("div",{children:[e.jsx("label",{className:S,children:"With this data"}),e.jsx("textarea",{value:p.envelope,onChange:c=>x(r,"envelope",c.target.value),rows:10,className:M,placeholder:`{
14
14
  "data": { "source": "cron" }
15
- }`}),e.jsx("p",{className:_,children:"Static payload passed to the workflow on each invocation."})]})]})]})]})}function W({icon:s,color:a,title:r,children:o}){return e.jsxs("div",{className:"mb-10",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 pb-1.5 border-b border-surface-border/40",children:[e.jsx(s,{className:`w-3.5 h-3.5 ${a}`,strokeWidth:1.5}),e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-widest text-accent/80",children:r})]}),e.jsx("div",{className:"pl-5.5",children:o})]})}function T({label:s,children:a}){return e.jsxs("div",{className:"flex gap-3 py-0.5",children:[e.jsx("span",{className:"text-[10px] text-text-quaternary w-20 shrink-0",children:s}),e.jsx("span",{className:"text-xs text-text-primary",children:a})]})}function Ye({form:s}){return e.jsxs("div",{children:[e.jsxs(W,{icon:V,color:"text-accent",title:"Identity",children:[e.jsx(T,{label:"Name",children:s.name||"—"}),s.description&&e.jsx(T,{label:"Description",children:s.description})]}),(s.goals||s.rules)&&e.jsxs(W,{icon:ee,color:"text-rose-400",title:"Motivation",children:[s.goals&&e.jsx(T,{label:"Goals",children:s.goals}),s.rules&&e.jsx(T,{label:"Rules",children:s.rules})]}),e.jsx(W,{icon:U,color:"text-emerald-400",title:"Knowledge",children:e.jsx(T,{label:"Domain",children:s.knowledge_domain||"None"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-10",children:[e.jsx(W,{icon:Y,color:"text-cyan-400",title:`Subscriptions (${s.subscriptions.length})`,children:s.subscriptions.length===0?e.jsx("span",{className:"text-[11px] text-text-quaternary",children:"None configured"}):e.jsx("div",{className:"divide-y divide-surface-border/30",children:s.subscriptions.map((a,r)=>e.jsxs("div",{className:"flex items-center py-1.5",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(ce,{topic:a.topic||"unset"})}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{className:"text-text-quaternary text-[10px]",children:"→"}),a.workflow_type?e.jsx(Q,{type:a.workflow_type}):e.jsx("span",{className:"text-[11px] text-text-quaternary",children:a.reaction_type})]})]},r))})}),e.jsx(W,{icon:G,color:"text-amber-400",title:`Schedules (${s.schedules.length})`,children:s.schedules.length===0?e.jsx("span",{className:"text-[11px] text-text-quaternary",children:"None configured"}):e.jsx("div",{className:"divide-y divide-surface-border/30",children:s.schedules.map((a,r)=>e.jsxs("div",{className:"flex items-center py-1.5",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(de,{cron:a.cron})}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{className:"text-text-quaternary text-[10px]",children:"→"}),a.workflow_type?e.jsx(Q,{type:a.workflow_type}):e.jsx("span",{className:"text-[11px] text-text-quaternary",children:"no workflow"})]})]},r))})})]}),e.jsx("div",{className:"border-l-2 border-emerald-400/30 pl-3 py-2 mt-6",children:e.jsx("p",{className:"text-[11px] text-text-tertiary leading-relaxed",children:"After saving, subscriptions and schedules activate immediately. You can pause the automation anytime."})})]})}const Ge=[{id:1,label:"Identity",icon:V},{id:2,label:"Motivation",icon:ee},{id:3,label:"Knowledge",icon:U},{id:4,label:"Subscriptions",icon:Y},{id:5,label:"Schedules",icon:G},{id:6,label:"Review",icon:ye}];function dt(){var H;const{id:s}=_e(),a=!s,r=ke(),{data:o}=fe(),u=!!((H=o==null?void 0:o.ai)!=null&&H.enabled)?"Agent":"Automation",{data:n,isLoading:h}=re(a?null:s),{data:p}=pe(a?null:s),c=le(),f=oe(),l=xe(),d=ue(),y=me(),[m,t]=v.useState(X),[i,b]=v.useState(!1),[g,k]=v.useState(""),[$,A]=Ce(),w=parseInt($.get("step")||"1",10),P=v.useCallback(j=>{A(N=>{const q=new URLSearchParams(N);return q.set("step",String(j)),q},{replace:!0})},[A]);v.useEffect(()=>{if(!i){if(a){t(X),b(!0);return}n&&p&&(t(Re(n,p.subscriptions??[])),b(!0))}},[n,p,a,i]);const I=(j,N)=>t(q=>({...q,[j]:N})),ne=async()=>{k("");try{const j=Ae(m);let N=s;a?N=(await c.mutateAsync(j)).id:await f.mutateAsync({id:s,...j});const q=Oe(m),ie=(p==null?void 0:p.subscriptions)??[],J=new Set(ie.map(C=>C.id));for(const C of q)if(C.id&&J.has(C.id)){const{id:F,...D}=C;await d.mutateAsync({agentId:N,subId:F,...D}),J.delete(F)}else{const{id:F,...D}=C;await l.mutateAsync({agentId:N,...D})}for(const C of J)await y.mutateAsync({agentId:N,subId:C});r(`/agents/${N}`)}catch(j){k(j.message)}};if(!a&&h)return e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-surface-sunken rounded w-48"}),e.jsx("div",{className:"h-60 bg-surface-sunken rounded"})]});const K=c.isPending||f.isPending;return e.jsxs("div",{children:[e.jsx(ve,{title:a?`New ${u}`:`${u}: ${(n==null?void 0:n.id)??""}`,docsHash:"#docs:agents.md"}),e.jsxs("div",{className:"flex gap-10",children:[e.jsxs("nav",{className:"w-44 shrink-0 sticky top-0 self-start pt-2",children:[e.jsx("div",{className:"space-y-0.5",children:Ge.map(j=>{const N=j.icon,q=w===j.id;return e.jsxs("button",{onClick:()=>P(j.id),className:`w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-left transition-colors ${q?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsx(N,{className:"w-3.5 h-3.5 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-xs font-medium",children:j.label})]},j.id)})}),e.jsxs("div",{className:"mt-8 pt-4 border-t border-surface-border space-y-2",children:[e.jsx("button",{onClick:ne,disabled:!m.name.trim()||K,className:"w-full btn-primary text-xs disabled:opacity-50",children:K?"Saving...":a?`Create ${u}`:"Save"}),e.jsx("button",{onClick:()=>r(a?"/agents":`/agents/${s}`),className:"w-full btn-ghost text-xs",children:"Cancel"})]}),g&&e.jsx("p",{className:"text-xs text-status-error mt-3",children:g})]}),e.jsxs("div",{className:"flex-1 min-w-0 pt-2",children:[w===1&&e.jsx(Ee,{form:m,set:I}),w===2&&e.jsx(Pe,{form:m,set:I}),w===3&&e.jsx(Ie,{form:m,set:I}),w===4&&e.jsx(Je,{form:m,set:I}),w===5&&e.jsx(Ue,{form:m,set:I}),w===6&&e.jsx(Ye,{form:m})]})]})]})}export{dt as AgentConfigPage};
16
- //# sourceMappingURL=AgentConfigPage-Bjl2Lsvo.js.map
15
+ }`}),e.jsx("p",{className:_,children:"Static payload passed to the workflow on each invocation."})]})]})]})]})}function W({icon:s,color:a,title:r,children:o}){return e.jsxs("div",{className:"mb-10",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 pb-1.5 border-b border-surface-border/40",children:[e.jsx(s,{className:`w-3.5 h-3.5 ${a}`,strokeWidth:1.5}),e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-widest text-accent/80",children:r})]}),e.jsx("div",{className:"pl-5.5",children:o})]})}function T({label:s,children:a}){return e.jsxs("div",{className:"flex gap-3 py-0.5",children:[e.jsx("span",{className:"text-[10px] text-text-quaternary w-20 shrink-0",children:s}),e.jsx("span",{className:"text-xs text-text-primary",children:a})]})}function Ye({form:s}){return e.jsxs("div",{children:[e.jsxs(W,{icon:V,color:"text-accent",title:"Identity",children:[e.jsx(T,{label:"Name",children:s.name||"—"}),s.description&&e.jsx(T,{label:"Description",children:s.description})]}),(s.goals||s.rules)&&e.jsxs(W,{icon:ee,color:"text-rose-400",title:"Motivation",children:[s.goals&&e.jsx(T,{label:"Goals",children:s.goals}),s.rules&&e.jsx(T,{label:"Rules",children:s.rules})]}),e.jsx(W,{icon:U,color:"text-emerald-400",title:"Knowledge",children:e.jsx(T,{label:"Domain",children:s.knowledge_domain||"None"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-10",children:[e.jsx(W,{icon:Y,color:"text-cyan-400",title:`Subscriptions (${s.subscriptions.length})`,children:s.subscriptions.length===0?e.jsx("span",{className:"text-[11px] text-text-quaternary",children:"None configured"}):e.jsx("div",{className:"divide-y divide-surface-border/30",children:s.subscriptions.map((a,r)=>e.jsxs("div",{className:"flex items-center py-1.5",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(ce,{topic:a.topic||"unset"})}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{className:"text-text-quaternary text-[10px]",children:"→"}),a.workflow_type?e.jsx(Q,{type:a.workflow_type}):e.jsx("span",{className:"text-[11px] text-text-quaternary",children:a.reaction_type})]})]},r))})}),e.jsx(W,{icon:G,color:"text-amber-400",title:`Schedules (${s.schedules.length})`,children:s.schedules.length===0?e.jsx("span",{className:"text-[11px] text-text-quaternary",children:"None configured"}):e.jsx("div",{className:"divide-y divide-surface-border/30",children:s.schedules.map((a,r)=>e.jsxs("div",{className:"flex items-center py-1.5",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(de,{cron:a.cron})}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{className:"text-text-quaternary text-[10px]",children:"→"}),a.workflow_type?e.jsx(Q,{type:a.workflow_type}):e.jsx("span",{className:"text-[11px] text-text-quaternary",children:"no workflow"})]})]},r))})})]}),e.jsx("div",{className:"border-l-2 border-emerald-400/30 pl-3 py-2 mt-6",children:e.jsx("p",{className:"text-[11px] text-text-tertiary leading-relaxed",children:"After saving, subscriptions and schedules activate immediately. You can pause the automation anytime."})})]})}const Ge=[{id:1,label:"Identity",icon:V},{id:2,label:"Motivation",icon:ee},{id:3,label:"Knowledge",icon:U},{id:4,label:"Subscriptions",icon:Y},{id:5,label:"Schedules",icon:G},{id:6,label:"Review",icon:ye}];function dt(){var H;const{id:s}=_e(),a=!s,r=ke(),{data:o}=fe(),u=!!((H=o==null?void 0:o.ai)!=null&&H.enabled)?"Agent":"Automation",{data:n,isLoading:h}=re(a?null:s),{data:p}=pe(a?null:s),c=le(),f=oe(),l=xe(),d=ue(),y=me(),[m,t]=v.useState(X),[i,b]=v.useState(!1),[g,k]=v.useState(""),[E,A]=Ce(),w=parseInt(E.get("step")||"1",10),P=v.useCallback(j=>{A(N=>{const q=new URLSearchParams(N);return q.set("step",String(j)),q},{replace:!0})},[A]);v.useEffect(()=>{if(!i){if(a){t(X),b(!0);return}n&&p&&(t(Re(n,p.subscriptions??[])),b(!0))}},[n,p,a,i]);const I=(j,N)=>t(q=>({...q,[j]:N})),ne=async()=>{k("");try{const j=Ae(m);let N=s;a?N=(await c.mutateAsync(j)).id:await f.mutateAsync({id:s,...j});const q=Oe(m),ie=(p==null?void 0:p.subscriptions)??[],J=new Set(ie.map(C=>C.id));for(const C of q)if(C.id&&J.has(C.id)){const{id:F,...D}=C;await d.mutateAsync({agentId:N,subId:F,...D}),J.delete(F)}else{const{id:F,...D}=C;await l.mutateAsync({agentId:N,...D})}for(const C of J)await y.mutateAsync({agentId:N,subId:C});r(`/agents/${N}`)}catch(j){k(j.message)}};if(!a&&h)return e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-surface-sunken rounded w-48"}),e.jsx("div",{className:"h-60 bg-surface-sunken rounded"})]});const K=c.isPending||f.isPending;return e.jsxs("div",{children:[e.jsx(ve,{title:a?`New ${u}`:`${u}: ${(n==null?void 0:n.id)??""}`,docsHash:"#docs:agents.md"}),e.jsxs("div",{className:"flex gap-10",children:[e.jsxs("nav",{className:"w-44 shrink-0 sticky top-0 self-start pt-2",children:[e.jsx("div",{className:"space-y-0.5",children:Ge.map(j=>{const N=j.icon,q=w===j.id;return e.jsxs("button",{onClick:()=>P(j.id),className:`w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-left transition-colors ${q?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsx(N,{className:"w-3.5 h-3.5 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-xs font-medium",children:j.label})]},j.id)})}),e.jsxs("div",{className:"mt-8 pt-4 border-t border-surface-border space-y-2",children:[e.jsx("button",{onClick:ne,disabled:!m.name.trim()||K,className:"w-full btn-primary text-xs disabled:opacity-50",children:K?"Saving...":a?`Create ${u}`:"Save"}),e.jsx("button",{onClick:()=>r(a?"/agents":`/agents/${s}`),className:"w-full btn-ghost text-xs",children:"Cancel"})]}),g&&e.jsx("p",{className:"text-xs text-status-error mt-3",children:g})]}),e.jsxs("div",{className:"flex-1 min-w-0 pt-2",children:[w===1&&e.jsx($e,{form:m,set:I}),w===2&&e.jsx(Pe,{form:m,set:I}),w===3&&e.jsx(Ie,{form:m,set:I}),w===4&&e.jsx(Je,{form:m,set:I}),w===5&&e.jsx(Ue,{form:m,set:I}),w===6&&e.jsx(Ye,{form:m})]})]})]})}export{dt as AgentConfigPage};
16
+ //# sourceMappingURL=AgentConfigPage-DHCpN4xk.js.map