@hotmeshio/long-tail 0.2.9 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/AdminDashboard-Bb6zouF5.js +2 -0
- package/dashboard/dist/assets/{AdminDashboard-45Ya2uzl.js.map → AdminDashboard-Bb6zouF5.js.map} +1 -1
- package/dashboard/dist/assets/AgentConfigPage-DqHEK73E.js +13 -0
- package/dashboard/dist/assets/AgentConfigPage-DqHEK73E.js.map +1 -0
- package/dashboard/dist/assets/AgentDetailPage-WwA573u9.js +4 -0
- package/dashboard/dist/assets/AgentDetailPage-WwA573u9.js.map +1 -0
- package/dashboard/dist/assets/AgentsPage-BZkZ_hXN.js +2 -0
- package/dashboard/dist/assets/{AgentsPage--I4d5y9J.js.map → AgentsPage-BZkZ_hXN.js.map} +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-C-Df3ZsZ.js +2 -0
- package/dashboard/dist/assets/AvailableEscalationsPage-C-Df3ZsZ.js.map +1 -0
- package/dashboard/dist/assets/BotPicker-CwfVVWxh.js +2 -0
- package/dashboard/dist/assets/{BotPicker-DgbzCesR.js.map → BotPicker-CwfVVWxh.js.map} +1 -1
- package/dashboard/dist/assets/CapabilitiesPage-DJEQ_5dV.js +2 -0
- package/dashboard/dist/assets/{CapabilitiesPage-B2S8_Gsc.js.map → CapabilitiesPage-DJEQ_5dV.js.map} +1 -1
- package/dashboard/dist/assets/CollapsibleSection-DaFQGU6S.js +2 -0
- package/dashboard/dist/assets/{CollapsibleSection-4Eo3b5ha.js.map → CollapsibleSection-DaFQGU6S.js.map} +1 -1
- package/dashboard/dist/assets/ConfirmDeleteModal-dOxidrSR.js +2 -0
- package/dashboard/dist/assets/{ConfirmDeleteModal-Bac7RmDD.js.map → ConfirmDeleteModal-dOxidrSR.js.map} +1 -1
- package/dashboard/dist/assets/CopyableId-DmLF-RqZ.js +2 -0
- package/dashboard/dist/assets/{CopyableId-BhwdwAJN.js.map → CopyableId-DmLF-RqZ.js.map} +1 -1
- package/dashboard/dist/assets/CredentialsPage-D-tkqdhu.js +2 -0
- package/dashboard/dist/assets/{CredentialsPage-CSEBaYx1.js.map → CredentialsPage-D-tkqdhu.js.map} +1 -1
- package/dashboard/dist/assets/CronLabel-C6iCjsXd.js +2 -0
- package/dashboard/dist/assets/{CronLabel-DV2v2FlP.js.map → CronLabel-C6iCjsXd.js.map} +1 -1
- package/dashboard/dist/assets/CustomDurationPicker--wCtBkmT.js +2 -0
- package/dashboard/dist/assets/{CustomDurationPicker-B_Oxq_nK.js.map → CustomDurationPicker--wCtBkmT.js.map} +1 -1
- package/dashboard/dist/assets/DataTable-D9yuBv0w.js +2 -0
- package/dashboard/dist/assets/{DataTable-etck0Zmp.js.map → DataTable-D9yuBv0w.js.map} +1 -1
- package/dashboard/dist/assets/DropZone-2mGyDo1P.js +2 -0
- package/dashboard/dist/assets/{DropZone-BDpzHWsI.js.map → DropZone-2mGyDo1P.js.map} +1 -1
- package/dashboard/dist/assets/ElapsedCell-DKoH0bqR.js +2 -0
- package/dashboard/dist/assets/{ElapsedCell-D35Z-HSJ.js.map → ElapsedCell-DKoH0bqR.js.map} +1 -1
- package/dashboard/dist/assets/EmptyState-BcsfPq9T.js +2 -0
- package/dashboard/dist/assets/{EmptyState-Bk3_P-b8.js.map → EmptyState-BcsfPq9T.js.map} +1 -1
- package/dashboard/dist/assets/EscalationsOverview-C6A4Q9Ne.js +2 -0
- package/dashboard/dist/assets/{EscalationsOverview-Bt6gGFW4.js.map → EscalationsOverview-C6A4Q9Ne.js.map} +1 -1
- package/dashboard/dist/assets/EventTable-DWxH0vMp.js +2 -0
- package/dashboard/dist/assets/{EventTable-BMk93q8A.js.map → EventTable-DWxH0vMp.js.map} +1 -1
- package/dashboard/dist/assets/EventTopicPill-BUxxvpNg.js +2 -0
- package/dashboard/dist/assets/{EventTopicPill-9LcMnLF0.js.map → EventTopicPill-BUxxvpNg.js.map} +1 -1
- package/dashboard/dist/assets/FilterBar-Ck4K4rzu.js +2 -0
- package/dashboard/dist/assets/{FilterBar-CZGTOMoo.js.map → FilterBar-Ck4K4rzu.js.map} +1 -1
- package/dashboard/dist/assets/HomePage-Tlu1j8fK.js +2 -0
- package/dashboard/dist/assets/{HomePage-Dtk7mgmf.js.map → HomePage-Tlu1j8fK.js.map} +1 -1
- package/dashboard/dist/assets/ListToolbar-DuON-br0.js +2 -0
- package/dashboard/dist/assets/{ListToolbar-CJEzypCM.js.map → ListToolbar-DuON-br0.js.map} +1 -1
- package/dashboard/dist/assets/McpOverview-byott48x.js +2 -0
- package/dashboard/dist/assets/{McpOverview-ChUa4l3t.js.map → McpOverview-byott48x.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryDetailPage-ieZPpcPn.js +5 -0
- package/dashboard/dist/assets/{McpQueryDetailPage-04CTIN0v.js.map → McpQueryDetailPage-ieZPpcPn.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryPage-BOO0ACYO.js +2 -0
- package/dashboard/dist/assets/{McpQueryPage-DFnHFdbr.js.map → McpQueryPage-BOO0ACYO.js.map} +1 -1
- package/dashboard/dist/assets/McpRunDetailPage-Di8s7-u9.js +2 -0
- package/dashboard/dist/assets/{McpRunDetailPage-B95c3bFw.js.map → McpRunDetailPage-Di8s7-u9.js.map} +1 -1
- package/dashboard/dist/assets/McpRunsPage-DdUVqUFi.js +2 -0
- package/dashboard/dist/assets/{McpRunsPage-DS43YmLU.js.map → McpRunsPage-DdUVqUFi.js.map} +1 -1
- package/dashboard/dist/assets/Modal-DEODGeqx.js +2 -0
- package/dashboard/dist/assets/{Modal-EUrK2c_A.js.map → Modal-DEODGeqx.js.map} +1 -1
- package/dashboard/dist/assets/OperatorDashboard-oGmDbNYv.js +2 -0
- package/dashboard/dist/assets/{OperatorDashboard-DBF_AbRH.js.map → OperatorDashboard-oGmDbNYv.js.map} +1 -1
- package/dashboard/dist/assets/PageHeader-DLjHNYHX.js +2 -0
- package/dashboard/dist/assets/{PageHeader-BuUnJ5NY.js.map → PageHeader-DLjHNYHX.js.map} +1 -1
- package/dashboard/dist/assets/PageHeaderWithStats-Oljg3n4j.js +2 -0
- package/dashboard/dist/assets/{PageHeaderWithStats-cQKaJBAM.js.map → PageHeaderWithStats-Oljg3n4j.js.map} +1 -1
- package/dashboard/dist/assets/PriorityBadge-DfQY9St9.js +2 -0
- package/dashboard/dist/assets/{PriorityBadge-Bl0_pgex.js.map → PriorityBadge-DfQY9St9.js.map} +1 -1
- package/dashboard/dist/assets/ProcessDetailPage-Da-miMYZ.js +2 -0
- package/dashboard/dist/assets/{ProcessDetailPage-DgeXrHon.js.map → ProcessDetailPage-Da-miMYZ.js.map} +1 -1
- package/dashboard/dist/assets/ProcessesListPage-CW-2yFw_.js +2 -0
- package/dashboard/dist/assets/{ProcessesListPage-BGiiH4dW.js.map → ProcessesListPage-CW-2yFw_.js.map} +1 -1
- package/dashboard/dist/assets/RolePill-Bp10-WfX.js +2 -0
- package/dashboard/dist/assets/{RolePill-DsYF2JN9.js.map → RolePill-Bp10-WfX.js.map} +1 -1
- package/dashboard/dist/assets/RolesPage-Bg_hEu9H.js +2 -0
- package/dashboard/dist/assets/{RolesPage-CQ7vPamb.js.map → RolesPage-Bg_hEu9H.js.map} +1 -1
- package/dashboard/dist/assets/RowActions-Dg-Fsm5O.js +2 -0
- package/dashboard/dist/assets/{RowActions-DBpvm3Jy.js.map → RowActions-Dg-Fsm5O.js.map} +1 -1
- package/dashboard/dist/assets/RunAsSelector-hYP59xHH.js +2 -0
- package/dashboard/dist/assets/{RunAsSelector-ZLKGTYP_.js.map → RunAsSelector-hYP59xHH.js.map} +1 -1
- package/dashboard/dist/assets/ServerName-C9lUCFYb.js +2 -0
- package/dashboard/dist/assets/{ServerName-B5-E7gZD.js.map → ServerName-C9lUCFYb.js.map} +1 -1
- package/dashboard/dist/assets/StatCard-DlgF0CJC.js +2 -0
- package/dashboard/dist/assets/{StatCard-B7ySTryP.js.map → StatCard-DlgF0CJC.js.map} +1 -1
- package/dashboard/dist/assets/StatusBadge-XQlNFwmH.js +2 -0
- package/dashboard/dist/assets/{StatusBadge-DNXTk01O.js.map → StatusBadge-XQlNFwmH.js.map} +1 -1
- package/dashboard/dist/assets/StepIndicator-CuUIGxKk.js +2 -0
- package/dashboard/dist/assets/{StepIndicator-ftNmaJsu.js.map → StepIndicator-CuUIGxKk.js.map} +1 -1
- package/dashboard/dist/assets/StickyPagination-F9FZsRy9.js +2 -0
- package/dashboard/dist/assets/{StickyPagination-CI5AyVVd.js.map → StickyPagination-F9FZsRy9.js.map} +1 -1
- package/dashboard/dist/assets/SwimlaneTimeline-2JHwAM2f.js +2 -0
- package/dashboard/dist/assets/{SwimlaneTimeline-BA4aFrHf.js.map → SwimlaneTimeline-2JHwAM2f.js.map} +1 -1
- package/dashboard/dist/assets/TagInput-Dkljw_WI.js +2 -0
- package/dashboard/dist/assets/{TagInput-DfbVwc27.js.map → TagInput-Dkljw_WI.js.map} +1 -1
- package/dashboard/dist/assets/TaskDetailPage--9FEVeTB.js +2 -0
- package/dashboard/dist/assets/TaskDetailPage--9FEVeTB.js.map +1 -0
- package/dashboard/dist/assets/TaskQueuePill-DPwm25Cc.js +2 -0
- package/dashboard/dist/assets/{TaskQueuePill-Dtsa8CPO.js.map → TaskQueuePill-DPwm25Cc.js.map} +1 -1
- package/dashboard/dist/assets/TasksListPage-kCH4r-70.js +2 -0
- package/dashboard/dist/assets/{TasksListPage-Cw46VTuA.js.map → TasksListPage-kCH4r-70.js.map} +1 -1
- package/dashboard/dist/assets/TimeAgo-RPbch7Te.js +2 -0
- package/dashboard/dist/assets/{TimeAgo-Cx1kK1id.js.map → TimeAgo-RPbch7Te.js.map} +1 -1
- package/dashboard/dist/assets/TimestampCell-Dgpl-lKv.js +2 -0
- package/dashboard/dist/assets/{TimestampCell-VDp4nVn6.js.map → TimestampCell-Dgpl-lKv.js.map} +1 -1
- package/dashboard/dist/assets/ToolPill-D_DIWFJ5.js +2 -0
- package/dashboard/dist/assets/{ToolPill-BNaTJhu8.js.map → ToolPill-D_DIWFJ5.js.map} +1 -1
- package/dashboard/dist/assets/ToolTestPanel-D1TWdZQi.js +2 -0
- package/dashboard/dist/assets/{ToolTestPanel-BickLBjP.js.map → ToolTestPanel-D1TWdZQi.js.map} +1 -1
- package/dashboard/dist/assets/UserName-BXZGXJsU.js +2 -0
- package/dashboard/dist/assets/{UserName-DCdb6xnk.js.map → UserName-BXZGXJsU.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowExecutionPage-DWlNYb2M.js +2 -0
- package/dashboard/dist/assets/{WorkflowExecutionPage-BZfxY1iB.js.map → WorkflowExecutionPage-DWlNYb2M.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowPill-BbgVTGgI.js +2 -0
- package/dashboard/dist/assets/{WorkflowPill-BzhfqGa-.js.map → WorkflowPill-BbgVTGgI.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowsDashboard-Dgq8RcD6.js +2 -0
- package/dashboard/dist/assets/{WorkflowsDashboard-B7M8kPoH.js.map → WorkflowsDashboard-Dgq8RcD6.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowsOverview-DnInrUPO.js +2 -0
- package/dashboard/dist/assets/{WorkflowsOverview-1V8vQ-mo.js.map → WorkflowsOverview-DnInrUPO.js.map} +1 -1
- package/dashboard/dist/assets/YamlWorkflowsPage-z1Z9J-mc.js +2 -0
- package/dashboard/dist/assets/YamlWorkflowsPage-z1Z9J-mc.js.map +1 -0
- package/dashboard/dist/assets/{agents-SXs4tMLb.js → agents-C9RLPt1z.js} +2 -2
- package/dashboard/dist/assets/{agents-SXs4tMLb.js.map → agents-C9RLPt1z.js.map} +1 -1
- package/dashboard/dist/assets/{bots-Ci5aCzDK.js → bots-zyUDnQhH.js} +2 -2
- package/dashboard/dist/assets/{bots-Ci5aCzDK.js.map → bots-zyUDnQhH.js.map} +1 -1
- package/dashboard/dist/assets/{controlplane-BiPTCZeL.js → controlplane-v-5KV6pl.js} +2 -2
- package/dashboard/dist/assets/{controlplane-BiPTCZeL.js.map → controlplane-v-5KV6pl.js.map} +1 -1
- package/dashboard/dist/assets/escalation-BseAikei.js +2 -0
- package/dashboard/dist/assets/escalation-BseAikei.js.map +1 -0
- package/dashboard/dist/assets/escalation-columns-Cs2CkkEs.js +2 -0
- package/dashboard/dist/assets/escalation-columns-Cs2CkkEs.js.map +1 -0
- package/dashboard/dist/assets/helpers-DVICI_VA.js +2 -0
- package/dashboard/dist/assets/{helpers-CQZkvg6D.js.map → helpers-DVICI_VA.js.map} +1 -1
- package/dashboard/dist/assets/index-BMIU7Im5.js +63 -0
- package/dashboard/dist/assets/index-BMIU7Im5.js.map +1 -0
- package/dashboard/dist/assets/index-BP76o_S8.js +2 -0
- package/dashboard/dist/assets/{index-DV0_tQW3.js.map → index-BP76o_S8.js.map} +1 -1
- package/dashboard/dist/assets/index-BzBZo8Sn.js +2 -0
- package/dashboard/dist/assets/{index-C7FUIcaY.js.map → index-BzBZo8Sn.js.map} +1 -1
- package/dashboard/dist/assets/index-C0TSBQw8.js +2 -0
- package/dashboard/dist/assets/{index-COiEQlp9.js.map → index-C0TSBQw8.js.map} +1 -1
- package/dashboard/dist/assets/index-CPpNn3z2.js +6 -0
- package/dashboard/dist/assets/{index-DOE7HCzb.js.map → index-CPpNn3z2.js.map} +1 -1
- package/dashboard/dist/assets/index-D2tDlpuv.js +2 -0
- package/dashboard/dist/assets/{index-Bp5f2OWJ.js.map → index-D2tDlpuv.js.map} +1 -1
- package/dashboard/dist/assets/index-DDFK1A8T.js +2 -0
- package/dashboard/dist/assets/{index-q4T_i7zT.js.map → index-DDFK1A8T.js.map} +1 -1
- package/dashboard/dist/assets/index-DVFm5329.js +5 -0
- package/dashboard/dist/assets/index-DVFm5329.js.map +1 -0
- package/dashboard/dist/assets/index-DyqdoZPY.js +2 -0
- package/dashboard/dist/assets/{index-CSsOukxa.js.map → index-DyqdoZPY.js.map} +1 -1
- package/dashboard/dist/assets/index-M17tP_HX.js +15 -0
- package/dashboard/dist/assets/{index-DtbAmRkr.js.map → index-M17tP_HX.js.map} +1 -1
- package/dashboard/dist/assets/index-XCEX7Zof.js +2 -0
- package/dashboard/dist/assets/{index-hfravTJF.js.map → index-XCEX7Zof.js.map} +1 -1
- package/dashboard/dist/assets/index-tK8lfgAj.js +2 -0
- package/dashboard/dist/assets/index-tK8lfgAj.js.map +1 -0
- package/dashboard/dist/assets/{knowledge-D8osen1O.js → knowledge-BhK8xuod.js} +2 -2
- package/dashboard/dist/assets/{knowledge-D8osen1O.js.map → knowledge-BhK8xuod.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-CUFhWTyT.js → mcp-CWFliwjc.js} +2 -2
- package/dashboard/dist/assets/{mcp-CUFhWTyT.js.map → mcp-CWFliwjc.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-n1t4sNm7.js → mcp-query-Dm7_m5Fi.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-n1t4sNm7.js.map → mcp-query-Dm7_m5Fi.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-runs-BkRnXbcq.js → mcp-runs-aBDudwEi.js} +2 -2
- package/dashboard/dist/assets/{mcp-runs-BkRnXbcq.js.map → mcp-runs-aBDudwEi.js.map} +1 -1
- package/dashboard/dist/assets/namespaces-C45c4uoO.js +2 -0
- package/dashboard/dist/assets/{namespaces-CacF05ft.js.map → namespaces-C45c4uoO.js.map} +1 -1
- package/dashboard/dist/assets/{roles-CjLCgM_6.js → roles-BMAzzeHR.js} +2 -2
- package/dashboard/dist/assets/{roles-CjLCgM_6.js.map → roles-BMAzzeHR.js.map} +1 -1
- package/dashboard/dist/assets/settings-D0v7RI3o.js +2 -0
- package/dashboard/dist/assets/settings-D0v7RI3o.js.map +1 -0
- package/dashboard/dist/assets/{tasks-BLCzIHol.js → tasks-DwEUQ6my.js} +2 -2
- package/dashboard/dist/assets/{tasks-BLCzIHol.js.map → tasks-DwEUQ6my.js.map} +1 -1
- package/dashboard/dist/assets/{useEventHooks-AwwZnweF.js → useEventHooks-BccPxFR6.js} +2 -2
- package/dashboard/dist/assets/{useEventHooks-AwwZnweF.js.map → useEventHooks-BccPxFR6.js.map} +1 -1
- package/dashboard/dist/assets/{useExpandedRows-Cg9iq6Vy.js → useExpandedRows-CkcEntB-.js} +2 -2
- package/dashboard/dist/assets/{useExpandedRows-Cg9iq6Vy.js.map → useExpandedRows-CkcEntB-.js.map} +1 -1
- package/dashboard/dist/assets/{useFilterParams-CGRYFw_A.js → useFilterParams-DZCAaBC7.js} +2 -2
- package/dashboard/dist/assets/{useFilterParams-CGRYFw_A.js.map → useFilterParams-DZCAaBC7.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-9Zs0PXY6.js → useYamlActivityEvents-BBioXSKA.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-9Zs0PXY6.js.map → useYamlActivityEvents-BBioXSKA.js.map} +1 -1
- package/dashboard/dist/assets/{users-BtLRzvZE.js → users-CCHT00of.js} +2 -2
- package/dashboard/dist/assets/{users-BtLRzvZE.js.map → users-CCHT00of.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-1qQ3NKfa.js → vendor-icons-E6836lXZ.js} +2 -2
- package/dashboard/dist/assets/{vendor-icons-1qQ3NKfa.js.map → vendor-icons-E6836lXZ.js.map} +1 -1
- package/dashboard/dist/assets/vendor-query-B2UbickB.js +18 -0
- package/dashboard/dist/assets/vendor-query-B2UbickB.js.map +1 -0
- package/dashboard/dist/assets/vendor-react-CX88sFS5.js +22 -0
- package/dashboard/dist/assets/vendor-react-CX88sFS5.js.map +1 -0
- package/dashboard/dist/assets/{workflows-B9xdIsfM.js → workflows-DNZf6Pmq.js} +2 -2
- package/dashboard/dist/assets/{workflows-B9xdIsfM.js.map → workflows-DNZf6Pmq.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-xOJxyEsQ.js → yaml-workflows-BKZdGciI.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-xOJxyEsQ.js.map → yaml-workflows-BKZdGciI.js.map} +1 -1
- package/dashboard/dist/index.html +4 -4
- package/package.json +2 -2
- package/dashboard/dist/assets/AdminDashboard-45Ya2uzl.js +0 -2
- package/dashboard/dist/assets/AgentConfigPage-BOASC5vi.js +0 -13
- package/dashboard/dist/assets/AgentConfigPage-BOASC5vi.js.map +0 -1
- package/dashboard/dist/assets/AgentDetailPage-5M7JTcFz.js +0 -4
- package/dashboard/dist/assets/AgentDetailPage-5M7JTcFz.js.map +0 -1
- package/dashboard/dist/assets/AgentsPage--I4d5y9J.js +0 -2
- package/dashboard/dist/assets/AvailableEscalationsPage-CXUkRz18.js +0 -2
- package/dashboard/dist/assets/AvailableEscalationsPage-CXUkRz18.js.map +0 -1
- package/dashboard/dist/assets/BotPicker-DgbzCesR.js +0 -2
- package/dashboard/dist/assets/CapabilitiesPage-B2S8_Gsc.js +0 -2
- package/dashboard/dist/assets/CollapsibleSection-4Eo3b5ha.js +0 -2
- package/dashboard/dist/assets/ConfirmDeleteModal-Bac7RmDD.js +0 -2
- package/dashboard/dist/assets/CopyableId-BhwdwAJN.js +0 -2
- package/dashboard/dist/assets/CredentialsPage-CSEBaYx1.js +0 -2
- package/dashboard/dist/assets/CronLabel-DV2v2FlP.js +0 -2
- package/dashboard/dist/assets/CustomDurationPicker-B_Oxq_nK.js +0 -2
- package/dashboard/dist/assets/DataTable-etck0Zmp.js +0 -2
- package/dashboard/dist/assets/DropZone-BDpzHWsI.js +0 -2
- package/dashboard/dist/assets/ElapsedCell-D35Z-HSJ.js +0 -2
- package/dashboard/dist/assets/EmptyState-Bk3_P-b8.js +0 -2
- package/dashboard/dist/assets/EscalationsOverview-Bt6gGFW4.js +0 -2
- package/dashboard/dist/assets/EventTable-BMk93q8A.js +0 -2
- package/dashboard/dist/assets/EventTopicPill-9LcMnLF0.js +0 -2
- package/dashboard/dist/assets/FilterBar-CZGTOMoo.js +0 -2
- package/dashboard/dist/assets/HomePage-Dtk7mgmf.js +0 -2
- package/dashboard/dist/assets/ListToolbar-CJEzypCM.js +0 -2
- package/dashboard/dist/assets/McpOverview-ChUa4l3t.js +0 -2
- package/dashboard/dist/assets/McpQueryDetailPage-04CTIN0v.js +0 -5
- package/dashboard/dist/assets/McpQueryPage-DFnHFdbr.js +0 -2
- package/dashboard/dist/assets/McpRunDetailPage-B95c3bFw.js +0 -2
- package/dashboard/dist/assets/McpRunsPage-DS43YmLU.js +0 -2
- package/dashboard/dist/assets/Modal-EUrK2c_A.js +0 -2
- package/dashboard/dist/assets/OperatorDashboard-DBF_AbRH.js +0 -2
- package/dashboard/dist/assets/PageHeader-BuUnJ5NY.js +0 -2
- package/dashboard/dist/assets/PageHeaderWithStats-cQKaJBAM.js +0 -2
- package/dashboard/dist/assets/PriorityBadge-Bl0_pgex.js +0 -2
- package/dashboard/dist/assets/ProcessDetailPage-DgeXrHon.js +0 -2
- package/dashboard/dist/assets/ProcessesListPage-BGiiH4dW.js +0 -2
- package/dashboard/dist/assets/RolePill-DsYF2JN9.js +0 -2
- package/dashboard/dist/assets/RolesPage-CQ7vPamb.js +0 -2
- package/dashboard/dist/assets/RowActions-DBpvm3Jy.js +0 -2
- package/dashboard/dist/assets/RunAsSelector-ZLKGTYP_.js +0 -2
- package/dashboard/dist/assets/ServerName-B5-E7gZD.js +0 -2
- package/dashboard/dist/assets/StatCard-B7ySTryP.js +0 -2
- package/dashboard/dist/assets/StatusBadge-DNXTk01O.js +0 -2
- package/dashboard/dist/assets/StepIndicator-ftNmaJsu.js +0 -2
- package/dashboard/dist/assets/StickyPagination-CI5AyVVd.js +0 -2
- package/dashboard/dist/assets/SwimlaneTimeline-BA4aFrHf.js +0 -2
- package/dashboard/dist/assets/TagInput-DfbVwc27.js +0 -2
- package/dashboard/dist/assets/TaskDetailPage-A_kHjYRn.js +0 -2
- package/dashboard/dist/assets/TaskDetailPage-A_kHjYRn.js.map +0 -1
- package/dashboard/dist/assets/TaskQueuePill-Dtsa8CPO.js +0 -2
- package/dashboard/dist/assets/TasksListPage-Cw46VTuA.js +0 -2
- package/dashboard/dist/assets/TimeAgo-Cx1kK1id.js +0 -2
- package/dashboard/dist/assets/TimestampCell-VDp4nVn6.js +0 -2
- package/dashboard/dist/assets/ToolPill-BNaTJhu8.js +0 -2
- package/dashboard/dist/assets/ToolTestPanel-BickLBjP.js +0 -2
- package/dashboard/dist/assets/UserName-DCdb6xnk.js +0 -2
- package/dashboard/dist/assets/WorkflowExecutionPage-BZfxY1iB.js +0 -2
- package/dashboard/dist/assets/WorkflowPill-BzhfqGa-.js +0 -2
- package/dashboard/dist/assets/WorkflowsDashboard-B7M8kPoH.js +0 -2
- package/dashboard/dist/assets/WorkflowsOverview-1V8vQ-mo.js +0 -2
- package/dashboard/dist/assets/YamlWorkflowsPage-BteCRoV5.js +0 -2
- package/dashboard/dist/assets/YamlWorkflowsPage-BteCRoV5.js.map +0 -1
- package/dashboard/dist/assets/escalation-D-zr9D9G.js +0 -2
- package/dashboard/dist/assets/escalation-D-zr9D9G.js.map +0 -1
- package/dashboard/dist/assets/escalation-columns-Bpp7Sdbd.js +0 -2
- package/dashboard/dist/assets/escalation-columns-Bpp7Sdbd.js.map +0 -1
- package/dashboard/dist/assets/helpers-CQZkvg6D.js +0 -2
- package/dashboard/dist/assets/index-Bp5f2OWJ.js +0 -2
- package/dashboard/dist/assets/index-C7FUIcaY.js +0 -2
- package/dashboard/dist/assets/index-COiEQlp9.js +0 -2
- package/dashboard/dist/assets/index-CSsOukxa.js +0 -2
- package/dashboard/dist/assets/index-DOE7HCzb.js +0 -6
- package/dashboard/dist/assets/index-DV0_tQW3.js +0 -2
- package/dashboard/dist/assets/index-Da8R5Fn_.js +0 -281
- package/dashboard/dist/assets/index-Da8R5Fn_.js.map +0 -1
- package/dashboard/dist/assets/index-DtbAmRkr.js +0 -15
- package/dashboard/dist/assets/index-DzL5pT70.js +0 -5
- package/dashboard/dist/assets/index-DzL5pT70.js.map +0 -1
- package/dashboard/dist/assets/index-OTsFiHXP.js +0 -2
- package/dashboard/dist/assets/index-OTsFiHXP.js.map +0 -1
- package/dashboard/dist/assets/index-hfravTJF.js +0 -2
- package/dashboard/dist/assets/index-q4T_i7zT.js +0 -2
- package/dashboard/dist/assets/namespaces-CacF05ft.js +0 -2
- package/dashboard/dist/assets/vendor-query-DLp59M9_.js +0 -35
- package/dashboard/dist/assets/vendor-query-DLp59M9_.js.map +0 -1
- package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js +0 -26
- package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as n,b as s,c as u}from"./vendor-query-
|
|
2
|
-
//# sourceMappingURL=workflows-
|
|
1
|
+
import{u as n,b as s,c as u}from"./vendor-query-B2UbickB.js";import{b as r}from"./index-BMIU7Im5.js";function f(){return n({queryKey:["activeWorkers"],queryFn:async()=>(await r("/workflows/workers")).workers})}function w(){return n({queryKey:["discoveredWorkflows"],queryFn:async()=>(await r("/workflows/discovered")).workflows})}function l(){return n({queryKey:["workflowConfigs"],queryFn:async()=>(await r("/workflows/config")).workflows})}function d(){return n({queryKey:["cronStatus"],queryFn:async()=>(await r("/workflows/cron/status")).schedules})}function k(e){return n({queryKey:["workflowExecution",e],queryFn:()=>r(`/workflow-states/${e}/execution`),enabled:!!e})}function m(e){const o=new URLSearchParams;return e.limit&&o.set("limit",String(e.limit)),e.offset!==void 0&&o.set("offset",String(e.offset)),e.entity&&o.set("entity",e.entity),e.search&&o.set("search",e.search),e.status&&o.set("status",e.status),e.sort_by&&o.set("sort_by",e.sort_by),e.order&&o.set("order",e.order),e.registered&&o.set("registered",e.registered),e.namespace&&o.set("namespace",e.namespace),n({queryKey:["jobs",e],queryFn:()=>r(`/workflow-states/jobs?${o}`)})}function q(){const e=s();return u({mutationFn:o=>r(`/workflows/${o}/terminate`,{method:"POST"}),onSuccess:(o,t)=>{e.invalidateQueries({queryKey:["workflowExecution",t],refetchType:"all"}),e.invalidateQueries({queryKey:["jobs"],refetchType:"all"})}})}function h(){const e=s();return u({mutationFn:({workflow_type:o,...t})=>r(`/workflows/${encodeURIComponent(o)}/config`,{method:"PUT",body:JSON.stringify(t)}),onSuccess:()=>{e.invalidateQueries({queryKey:["workflowConfigs"],refetchType:"all"})}})}function p(){const e=s();return u({mutationFn:o=>r(`/workflows/${encodeURIComponent(o)}/config`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["workflowConfigs"],refetchType:"all"})}})}function g(){const e=s();return u({mutationFn:({config:o,cron_schedule:t,envelope_schema:i})=>r(`/workflows/${encodeURIComponent(o.workflow_type)}/config`,{method:"PUT",body:JSON.stringify({...o,cron_schedule:t,...i!==void 0?{envelope_schema:i}:{}})}),onSuccess:()=>{e.invalidateQueries({queryKey:["workflowConfigs"],refetchType:"all"}),e.invalidateQueries({queryKey:["cronStatus"],refetchType:"all"})}})}function C(){const e=s();return u({mutationFn:({workflowType:o,data:t,metadata:i,execute_as:a})=>r(`/workflows/${o}/invoke`,{method:"POST",body:JSON.stringify({data:t,metadata:i,...a?{execute_as:a}:{}})}),onSuccess:()=>{e.invalidateQueries({queryKey:["tasks"],refetchType:"all"}),e.invalidateQueries({queryKey:["jobs"],refetchType:"all"})}})}export{k as a,m as b,C as c,g as d,w as e,d as f,q as g,f as h,p as i,h as j,l as u};
|
|
2
|
+
//# sourceMappingURL=workflows-DNZf6Pmq.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows-
|
|
1
|
+
{"version":3,"file":"workflows-DNZf6Pmq.js","sources":["../../src/api/workflows.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { ActiveWorker, CronScheduleEntry, DiscoveredWorkflow, LTJob, LTWorkflowConfig, WorkflowExecution } from './types';\n\nexport function useActiveWorkers() {\n return useQuery<ActiveWorker[]>({\n queryKey: ['activeWorkers'],\n queryFn: async () => {\n const res = await apiFetch<{ workers: ActiveWorker[] }>('/workflows/workers');\n return res.workers;\n },\n });\n}\n\nexport function useDiscoveredWorkflows() {\n return useQuery<DiscoveredWorkflow[]>({\n queryKey: ['discoveredWorkflows'],\n queryFn: async () => {\n const res = await apiFetch<{ workflows: DiscoveredWorkflow[] }>('/workflows/discovered');\n return res.workflows;\n },\n });\n}\n\nexport function useWorkflowConfigs() {\n return useQuery<LTWorkflowConfig[]>({\n queryKey: ['workflowConfigs'],\n queryFn: async () => {\n const res = await apiFetch<{ workflows: LTWorkflowConfig[] }>('/workflows/config');\n return res.workflows;\n },\n });\n}\n\nexport function useCronStatus() {\n return useQuery<CronScheduleEntry[]>({\n queryKey: ['cronStatus'],\n queryFn: async () => {\n const res = await apiFetch<{ schedules: CronScheduleEntry[] }>('/workflows/cron/status');\n return res.schedules;\n },\n });\n}\n\nexport function useWorkflowExecution(workflowId: string) {\n return useQuery<WorkflowExecution>({\n queryKey: ['workflowExecution', workflowId],\n queryFn: () =>\n apiFetch(`/workflow-states/${workflowId}/execution`),\n enabled: !!workflowId,\n });\n}\n\nexport function useWorkflowState(workflowId: string) {\n return useQuery<{ workflow_id: string; state: Record<string, unknown> }>({\n queryKey: ['workflowState', workflowId],\n queryFn: () => apiFetch(`/workflow-states/${workflowId}/state`),\n enabled: !!workflowId,\n });\n}\n\nexport function useJobs(filters: {\n limit?: number;\n offset?: number;\n entity?: string;\n search?: string;\n status?: string;\n sort_by?: string;\n order?: string;\n registered?: string;\n namespace?: string;\n}) {\n const params = new URLSearchParams();\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n if (filters.entity) params.set('entity', filters.entity);\n if (filters.search) params.set('search', filters.search);\n if (filters.status) params.set('status', filters.status);\n if (filters.sort_by) params.set('sort_by', filters.sort_by);\n if (filters.order) params.set('order', filters.order);\n if (filters.registered) params.set('registered', filters.registered);\n if (filters.namespace) params.set('namespace', filters.namespace);\n\n return useQuery<{ jobs: LTJob[]; total: number }>({\n queryKey: ['jobs', filters],\n queryFn: () => apiFetch(`/workflow-states/jobs?${params}`),\n });\n}\n\nexport function useTerminateWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (workflowId: string) =>\n apiFetch(`/workflows/${workflowId}/terminate`, { method: 'POST' }),\n onSuccess: (_data, workflowId) => {\n queryClient.invalidateQueries({ queryKey: ['workflowExecution', workflowId], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['jobs'], refetchType: 'all' });\n },\n });\n}\n\nexport function useUpsertWorkflowConfig() {\n const queryClient = useQueryClient();\n return useMutation<\n LTWorkflowConfig,\n Error,\n {\n workflow_type: string;\n description?: string | null;\n\n invocable?: boolean;\n task_queue?: string | null;\n default_role?: string;\n roles?: string[];\n invocation_roles?: string[];\n consumes?: string[];\n envelope_schema?: Record<string, unknown> | null;\n resolver_schema?: Record<string, unknown> | null;\n cron_schedule?: string | null;\n execute_as?: string | null;\n }\n >({\n mutationFn: ({ workflow_type, ...body }) =>\n apiFetch(`/workflows/${encodeURIComponent(workflow_type)}/config`, {\n method: 'PUT',\n body: JSON.stringify(body),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['workflowConfigs'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeleteWorkflowConfig() {\n const queryClient = useQueryClient();\n return useMutation<{ deleted: boolean; workflow_type: string }, Error, string>({\n mutationFn: (workflowType) =>\n apiFetch(`/workflows/${encodeURIComponent(workflowType)}/config`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['workflowConfigs'], refetchType: 'all' });\n },\n });\n}\n\nexport function useSetCronSchedule() {\n const queryClient = useQueryClient();\n return useMutation<\n LTWorkflowConfig,\n Error,\n { config: LTWorkflowConfig; cron_schedule: string | null; envelope_schema?: Record<string, unknown> | null }\n >({\n mutationFn: ({ config, cron_schedule, envelope_schema }) =>\n apiFetch(`/workflows/${encodeURIComponent(config.workflow_type)}/config`, {\n method: 'PUT',\n body: JSON.stringify({\n ...config,\n cron_schedule,\n ...(envelope_schema !== undefined ? { envelope_schema } : {}),\n }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['workflowConfigs'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['cronStatus'], refetchType: 'all' });\n },\n });\n}\n\nexport function useInvokeWorkflow() {\n const queryClient = useQueryClient();\n return useMutation<\n { workflowId: string; message: string },\n Error,\n { workflowType: string; data: Record<string, unknown>; metadata?: Record<string, unknown>; execute_as?: string }\n >({\n mutationFn: ({ workflowType, data, metadata, execute_as }) =>\n apiFetch(`/workflows/${workflowType}/invoke`, {\n method: 'POST',\n body: JSON.stringify({ data, metadata, ...(execute_as ? { execute_as } : {}) }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['tasks'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['jobs'], refetchType: 'all' });\n },\n });\n}\n"],"names":["useActiveWorkers","useQuery","apiFetch","useDiscoveredWorkflows","useWorkflowConfigs","useCronStatus","useWorkflowExecution","workflowId","useJobs","filters","params","useTerminateWorkflow","queryClient","useQueryClient","useMutation","_data","useUpsertWorkflowConfig","workflow_type","body","useDeleteWorkflowConfig","workflowType","useSetCronSchedule","config","cron_schedule","envelope_schema","useInvokeWorkflow","data","metadata","execute_as"],"mappings":"qGAIO,SAASA,GAAmB,CACjC,OAAOC,EAAyB,CAC9B,SAAU,CAAC,eAAe,EAC1B,QAAS,UACK,MAAMC,EAAsC,oBAAoB,GACjE,OACb,CACD,CACH,CAEO,SAASC,GAAyB,CACvC,OAAOF,EAA+B,CACpC,SAAU,CAAC,qBAAqB,EAChC,QAAS,UACK,MAAMC,EAA8C,uBAAuB,GAC5E,SACb,CACD,CACH,CAEO,SAASE,GAAqB,CACnC,OAAOH,EAA6B,CAClC,SAAU,CAAC,iBAAiB,EAC5B,QAAS,UACK,MAAMC,EAA4C,mBAAmB,GACtE,SACb,CACD,CACH,CAEO,SAASG,GAAgB,CAC9B,OAAOJ,EAA8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EAAU,WAAAC,KAC3C1B,EAAS,cAAckB,CAAY,UAAW,CAC5C,OAAQ,OACR,KAAM,KAAK,UAAU,CAAE,KAAAM,EAAM,SAAAC,EAAU,GAAIC,EAAa,CAAE,WAAAA,CAAA,EAAe,GAAK,CAAA,CAC/E,EACH,UAAW,IAAM,CACfhB,EAAY,kBAAkB,CAAE,SAAU,CAAC,OAAO,EAAG,YAAa,MAAO,EACzEA,EAAY,kBAAkB,CAAE,SAAU,CAAC,MAAM,EAAG,YAAa,MAAO,CAC1E,CAAA,CACD,CACH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as l,b as a,c as n}from"./vendor-query-
|
|
2
|
-
//# sourceMappingURL=yaml-workflows-
|
|
1
|
+
import{u as l,b as a,c as n}from"./vendor-query-B2UbickB.js";import{b as r}from"./index-BMIU7Im5.js";function f(e={}){const o=new URLSearchParams;return e.status&&o.set("status",e.status),e.graph_topic&&o.set("graph_topic",e.graph_topic),e.app_id&&o.set("app_id",e.app_id),e.search&&o.set("search",e.search),e.set_id&&o.set("set_id",e.set_id),e.limit&&o.set("limit",String(e.limit)),e.offset!==void 0&&o.set("offset",String(e.offset)),l({queryKey:["yamlWorkflows",e],queryFn:()=>r(`/yaml-workflows?${o}`)})}function m(){return l({queryKey:["yamlWorkflowAppIds"],queryFn:()=>r("/yaml-workflows/app-ids")})}function c(e){return l({queryKey:["yamlWorkflows",e],queryFn:()=>r(`/yaml-workflows/${e}`),enabled:!!e})}function w(){const e=a();return n({mutationFn:o=>r("/yaml-workflows",{method:"POST",body:JSON.stringify(o)}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function k(){const e=a();return n({mutationFn:o=>r(`/yaml-workflows/${o}/deploy`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function d(){const e=a();return n({mutationFn:o=>r(`/yaml-workflows/${o}/activate`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function p(){const e=a();return n({mutationFn:({id:o,data:t,sync:s,execute_as:u})=>r(`/yaml-workflows/${o}/invoke`,{method:"POST",body:JSON.stringify({data:t,sync:s,...u?{execute_as:u}:{}})}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function h(){const e=a();return n({mutationFn:({id:o,task_queue:t,compilation_feedback:s})=>r(`/yaml-workflows/${o}/regenerate`,{method:"POST",body:JSON.stringify({task_queue:t,compilation_feedback:s})}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function q(){const e=a();return n({mutationFn:o=>r(`/yaml-workflows/${o}/archive`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function W(){const e=a();return n({mutationFn:o=>r(`/yaml-workflows/${o}/restore`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"}),e.invalidateQueries({queryKey:["yamlWorkflow"],refetchType:"all"})}})}function S(){const e=a();return n({mutationFn:({id:o,...t})=>r(`/yaml-workflows/${o}`,{method:"PUT",body:JSON.stringify(t)}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function T(){const e=a();return n({mutationFn:o=>r(`/yaml-workflows/${o}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function v(){const e=a();return n({mutationFn:({id:o,cron_schedule:t,cron_envelope:s,execute_as:u})=>r(`/yaml-workflows/${o}/cron`,{method:"PUT",body:JSON.stringify({cron_schedule:t,cron_envelope:s,execute_as:u})}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function F(){const e=a();return n({mutationFn:o=>r(`/yaml-workflows/${o}/cron`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function K(e){return l({queryKey:["yamlWorkflows",e,"versions"],queryFn:()=>r(`/yaml-workflows/${e}/versions`),enabled:!!e})}function C(e,o){return l({queryKey:["yamlWorkflows",e,"versions",o],queryFn:()=>r(`/yaml-workflows/${e}/versions/${o}`),enabled:!!e&&o!==null})}export{m as a,S as b,c,K as d,k as e,d as f,q as g,W as h,T as i,h as j,C as k,p as l,w as m,v as n,F as o,f as u};
|
|
2
|
+
//# sourceMappingURL=yaml-workflows-BKZdGciI.js.map
|
package/dashboard/dist/assets/{yaml-workflows-xOJxyEsQ.js.map → yaml-workflows-BKZdGciI.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml-workflows-xOJxyEsQ.js","sources":["../../src/api/yaml-workflows.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { LTYamlWorkflowRecord, LTYamlWorkflowStatus, LTYamlWorkflowVersion } from './types';\n\ninterface YamlWorkflowListResponse {\n workflows: LTYamlWorkflowRecord[];\n total: number;\n}\n\ninterface YamlWorkflowFilters {\n status?: LTYamlWorkflowStatus;\n graph_topic?: string;\n app_id?: string;\n search?: string;\n set_id?: string;\n limit?: number;\n offset?: number;\n}\n\nexport function useYamlWorkflows(filters: YamlWorkflowFilters = {}) {\n const params = new URLSearchParams();\n if (filters.status) params.set('status', filters.status);\n if (filters.graph_topic) params.set('graph_topic', filters.graph_topic);\n if (filters.app_id) params.set('app_id', filters.app_id);\n if (filters.search) params.set('search', filters.search);\n if (filters.set_id) params.set('set_id', filters.set_id);\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', filters],\n queryFn: () => apiFetch(`/yaml-workflows?${params}`),\n });\n}\n\nexport function useYamlWorkflowAppIds() {\n return useQuery<{ app_ids: string[] }>({\n queryKey: ['yamlWorkflowAppIds'],\n queryFn: () => apiFetch('/yaml-workflows/app-ids'),\n });\n}\n\nexport function useYamlWorkflowByTopic(graphTopic: string | undefined, appId?: string) {\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', 'byTopic', graphTopic, appId],\n queryFn: () => {\n const params = new URLSearchParams({ graph_topic: graphTopic!, limit: '1' });\n if (appId) params.set('app_id', appId);\n return apiFetch(`/yaml-workflows?${params}`);\n },\n enabled: !!graphTopic,\n });\n}\n\nexport function useYamlWorkflow(id: string) {\n return useQuery<LTYamlWorkflowRecord>({\n queryKey: ['yamlWorkflows', id],\n queryFn: () => apiFetch(`/yaml-workflows/${id}`),\n enabled: !!id,\n });\n}\n\nexport function useCreateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (input: {\n workflow_id: string;\n task_queue: string;\n workflow_name: string;\n name: string;\n description?: string;\n app_id?: string;\n subscribes?: string;\n tags?: string[];\n compilation_feedback?: string;\n }) =>\n apiFetch<LTYamlWorkflowRecord>('/yaml-workflows', {\n method: 'POST',\n body: JSON.stringify(input),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeployYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/deploy`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useActivateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/activate`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useInvokeYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, data, sync, execute_as }: { id: string; data: Record<string, unknown>; sync?: boolean; execute_as?: string }) =>\n apiFetch<{ result?: unknown; job_id?: string }>(`/yaml-workflows/${id}/invoke`, {\n method: 'POST',\n body: JSON.stringify({ data, sync, ...(execute_as ? { execute_as } : {}) }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRegenerateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, task_queue, compilation_feedback }: { id: string; task_queue?: string; compilation_feedback?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/regenerate`, {\n method: 'POST',\n body: JSON.stringify({ task_queue, compilation_feedback }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useArchiveYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/archive`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRestoreYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/restore`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflow'], refetchType: 'all' });\n },\n });\n}\n\nexport function useUpdateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, ...updates }: { id: string; yaml_content?: string; name?: string; description?: string; input_schema?: Record<string, unknown>; output_schema?: Record<string, unknown>; tags?: string[]; app_id?: string; graph_topic?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}`, {\n method: 'PUT',\n body: JSON.stringify(updates),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeleteYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<{ deleted: boolean }>(`/yaml-workflows/${id}`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Cron scheduling ─────────────────────────────────────────────\n\nexport function useSetYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, cron_schedule, cron_envelope, execute_as }: {\n id: string;\n cron_schedule: string;\n cron_envelope?: Record<string, unknown> | null;\n execute_as?: string | null;\n }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'PUT',\n body: JSON.stringify({ cron_schedule, cron_envelope, execute_as }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useClearYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Version history ─────────────────────────────────────────────\n\nexport function useYamlWorkflowVersions(id: string) {\n return useQuery<{ versions: LTYamlWorkflowVersion[]; total: number }>({\n queryKey: ['yamlWorkflows', id, 'versions'],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions`),\n enabled: !!id,\n });\n}\n\nexport function useYamlWorkflowVersion(id: string, version: number | null) {\n return useQuery<LTYamlWorkflowVersion>({\n queryKey: ['yamlWorkflows', id, 'versions', version],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions/${version}`),\n enabled: !!id && version !== null,\n });\n}\n"],"names":["useYamlWorkflows","filters","params","useQuery","apiFetch","useYamlWorkflowAppIds","useYamlWorkflow","id","useCreateYamlWorkflow","queryClient","useQueryClient","useMutation","input","useDeployYamlWorkflow","useActivateYamlWorkflow","useInvokeYamlWorkflow","data","sync","execute_as","useRegenerateYamlWorkflow","task_queue","compilation_feedback","useArchiveYamlWorkflow","useRestoreYamlWorkflow","useUpdateYamlWorkflow","updates","useDeleteYamlWorkflow","useSetYamlCron","cron_schedule","cron_envelope","useClearYamlCron","useYamlWorkflowVersions","useYamlWorkflowVersion","version"],"mappings":"qGAmBO,SAASA,EAAiBC,EAA+B,GAAI,CAClE,MAAMC,EAAS,IAAI,gBACnB,OAAID,EAAQ,QAAQC,EAAO,IAAI,SAAUD,EAAQ,MAAM,EACnDA,EAAQ,aAAaC,EAAO,IAAI,cAAeD,EAAQ,WAAW,EAClEA,EAAQ,QAAQC,EAAO,IAAI,SAAUD,EAAQ,MAAM,EACnDA,EAAQ,QAAQC,EAAO,IAAI,SAAUD,EAAQ,MAAM,EACnDA,EAAQ,QAAQC,EAAO,IAAI,SAAUD,EAAQ,MAAM,EACnDA,EAAQ,OAAOC,EAAO,IAAI,QAAS,OAAOD,EAAQ,KAAK,CAAC,EACxDA,EAAQ,SAAW,QAAWC,EAAO,IAAI,SAAU,OAAOD,EAAQ,MAAM,CAAC,EAEtEE,EAAmC,CACxC,SAAU,CAAC,gBAAiBF,CAAO,EACnC,QAAS,IAAMG,EAAS,mBAAmBF,CAAM,EAAE,CAAA,CACpD,CACH,CAEO,SAASG,GAAwB,CACtC,OAAOF,EAAgC,CACrC,SAAU,CAAC,oBAAoB,EAC/B,QAAS,IAAMC,EAAS,yBAAyB,CAAA,CAClD,CACH,CAcO,SAASE,EAAgBC,EAAY,CAC1C,OAAOJ,EAA+B,CACpC,SAAU,CAAC,gBAAiBI,CAAE,EAC9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CAC9B,CACH"}
|
|
1
|
+
{"version":3,"file":"yaml-workflows-BKZdGciI.js","sources":["../../src/api/yaml-workflows.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { LTYamlWorkflowRecord, LTYamlWorkflowStatus, LTYamlWorkflowVersion } from './types';\n\ninterface YamlWorkflowListResponse {\n workflows: LTYamlWorkflowRecord[];\n total: number;\n}\n\ninterface YamlWorkflowFilters {\n status?: LTYamlWorkflowStatus;\n graph_topic?: string;\n app_id?: string;\n search?: string;\n set_id?: string;\n limit?: number;\n offset?: number;\n}\n\nexport function useYamlWorkflows(filters: YamlWorkflowFilters = {}) {\n const params = new URLSearchParams();\n if (filters.status) params.set('status', filters.status);\n if (filters.graph_topic) params.set('graph_topic', filters.graph_topic);\n if (filters.app_id) params.set('app_id', filters.app_id);\n if (filters.search) params.set('search', filters.search);\n if (filters.set_id) params.set('set_id', filters.set_id);\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', filters],\n queryFn: () => apiFetch(`/yaml-workflows?${params}`),\n });\n}\n\nexport function useYamlWorkflowAppIds() {\n return useQuery<{ app_ids: string[] }>({\n queryKey: ['yamlWorkflowAppIds'],\n queryFn: () => apiFetch('/yaml-workflows/app-ids'),\n });\n}\n\nexport function useYamlWorkflowByTopic(graphTopic: string | undefined, appId?: string) {\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', 'byTopic', graphTopic, appId],\n queryFn: () => {\n const params = new URLSearchParams({ graph_topic: graphTopic!, limit: '1' });\n if (appId) params.set('app_id', appId);\n return apiFetch(`/yaml-workflows?${params}`);\n },\n enabled: !!graphTopic,\n });\n}\n\nexport function useYamlWorkflow(id: string) {\n return useQuery<LTYamlWorkflowRecord>({\n queryKey: ['yamlWorkflows', id],\n queryFn: () => apiFetch(`/yaml-workflows/${id}`),\n enabled: !!id,\n });\n}\n\nexport function useCreateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (input: {\n workflow_id: string;\n task_queue: string;\n workflow_name: string;\n name: string;\n description?: string;\n app_id?: string;\n subscribes?: string;\n tags?: string[];\n compilation_feedback?: string;\n }) =>\n apiFetch<LTYamlWorkflowRecord>('/yaml-workflows', {\n method: 'POST',\n body: JSON.stringify(input),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeployYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/deploy`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useActivateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/activate`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useInvokeYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, data, sync, execute_as }: { id: string; data: Record<string, unknown>; sync?: boolean; execute_as?: string }) =>\n apiFetch<{ result?: unknown; job_id?: string }>(`/yaml-workflows/${id}/invoke`, {\n method: 'POST',\n body: JSON.stringify({ data, sync, ...(execute_as ? { execute_as } : {}) }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRegenerateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, task_queue, compilation_feedback }: { id: string; task_queue?: string; compilation_feedback?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/regenerate`, {\n method: 'POST',\n body: JSON.stringify({ task_queue, compilation_feedback }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useArchiveYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/archive`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRestoreYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/restore`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflow'], refetchType: 'all' });\n },\n });\n}\n\nexport function useUpdateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, ...updates }: { id: string; yaml_content?: string; name?: string; description?: string; input_schema?: Record<string, unknown>; output_schema?: Record<string, unknown>; tags?: string[]; app_id?: string; graph_topic?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}`, {\n method: 'PUT',\n body: JSON.stringify(updates),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeleteYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<{ deleted: boolean }>(`/yaml-workflows/${id}`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Cron scheduling ─────────────────────────────────────────────\n\nexport function useSetYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, cron_schedule, cron_envelope, execute_as }: {\n id: string;\n cron_schedule: string;\n cron_envelope?: Record<string, unknown> | null;\n execute_as?: string | null;\n }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'PUT',\n body: JSON.stringify({ cron_schedule, cron_envelope, execute_as }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useClearYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Version history ─────────────────────────────────────────────\n\nexport function useYamlWorkflowVersions(id: string) {\n return useQuery<{ versions: LTYamlWorkflowVersion[]; total: number }>({\n queryKey: ['yamlWorkflows', id, 'versions'],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions`),\n enabled: !!id,\n });\n}\n\nexport function useYamlWorkflowVersion(id: string, version: number | null) {\n return useQuery<LTYamlWorkflowVersion>({\n queryKey: ['yamlWorkflows', id, 'versions', version],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions/${version}`),\n enabled: !!id && version !== null,\n });\n}\n"],"names":["useYamlWorkflows","filters","params","useQuery","apiFetch","useYamlWorkflowAppIds","useYamlWorkflow","id","useCreateYamlWorkflow","queryClient","useQueryClient","useMutation","input","useDeployYamlWorkflow","useActivateYamlWorkflow","useInvokeYamlWorkflow","data","sync","execute_as","useRegenerateYamlWorkflow","task_queue","compilation_feedback","useArchiveYamlWorkflow","useRestoreYamlWorkflow","useUpdateYamlWorkflow","updates","useDeleteYamlWorkflow","useSetYamlCron","cron_schedule","cron_envelope","useClearYamlCron","useYamlWorkflowVersions","useY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,KAAM,KAAK,UAAU,CAAE,cAAAqB,EAAe,cAAAC,EAAe,WAAAX,EAAY,CAAA,CAClE,EACH,UAAW,IAAM,CACfT,EAAY,kBAAkB,CAAE,SAAU,CAAC,eAAe,EAAG,YAAa,MAAO,CACnF,CAAA,CACD,CACH,CAEO,SAASqB,GAAmB,CACjC,MAAMrB,EAAcC,EAAA,EACpB,OAAOC,EAAY,CACjB,WAAaJ,GACXH,EAA+B,mBAAmBG,CAAE,QAAS,CAC3D,OAAQ,QAAA,CACT,EACH,UAAW,IAAM,CACfE,EAAY,kBAAkB,CAAE,SAAU,CAAC,eAAe,EAAG,YAAa,MAAO,CACnF,CAAA,CACD,CACH,CAIO,SAASsB,EAAwBxB,EAAY,CAClD,OAAOJ,EAA+D,CACpE,SAAU,CAAC,gBAAiBI,EAAI,UAAU,EAC1C,QAAS,IAAMH,EAAS,mBAAmBG,CAAE,WAAW,EACxD,QAAS,CAAC,CAACA,CAAA,CACZ,CACH,CAEO,SAASyB,EAAuBzB,EAAY0B,EAAwB,CACzE,OAAO9B,EAAgC,CACrC,SAAU,CAAC,gBAAiBI,EAAI,WAAY0B,CAAO,EACnD,QAAS,IAAM7B,EAAS,mBAAmBG,CAAE,aAAa0B,CAAO,EAAE,EACnE,QAAS,CAAC,CAAC1B,GAAM0B,IAAY,IAAA,CAC9B,CACH"}
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-query-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-react-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-icons-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-BMIU7Im5.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-query-B2UbickB.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-react-CX88sFS5.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-icons-E6836lXZ.js">
|
|
15
15
|
<link rel="stylesheet" crossorigin href="/assets/index-BciXgS35.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotmeshio/long-tail",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Long Tail Workflows — Durable AI workflows with human-in-the-loop escalation. Powered by PostgreSQL.",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@anthropic-ai/sdk": "^0.92.0",
|
|
71
71
|
"@aws-sdk/client-s3": "^3.1017.0",
|
|
72
72
|
"@aws-sdk/s3-request-presigner": "^3.1045.0",
|
|
73
|
-
"@hotmeshio/hotmesh": "^0.
|
|
73
|
+
"@hotmeshio/hotmesh": "^0.17.0",
|
|
74
74
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
75
75
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.215.0",
|
|
76
76
|
"@opentelemetry/resources": "^2.5.1",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s as n,j as o}from"./index-Da8R5Fn_.js";import{c as m}from"./tasks-BLCzIHol.js";import{f as d}from"./useEventHooks-AwwZnweF.js";import{u}from"./mcp-CUFhWTyT.js";import{P as c}from"./PageHeaderWithStats-cQKaJBAM.js";import"./vendor-query-DLp59M9_.js";import"./vendor-react-Co3Y8ikm.js";import"./vendor-icons-1qQ3NKfa.js";function N(){var e;d();const{data:a}=m({limit:1}),{data:t}=n({status:"pending",limit:1}),{data:s}=u(),i=((e=s==null?void 0:s.servers)==null?void 0:e.filter(l=>l.status==="connected").length)??0,r=s?`${i}/${s.total}`:"—";return o.jsxDEV("div",{children:o.jsxDEV(c,{title:"Admin",stats:[{label:"Tasks",value:(a==null?void 0:a.total)??"—"},{label:"Pending Escalations",value:(t==null?void 0:t.total)??"—",dotClass:"bg-status-pending"},{label:"MCP Servers",value:r},{label:"System",value:"Healthy",dotClass:"bg-status-success"}]},void 0,!1,{fileName:"/app/dashboard/src/pages/admin/AdminDashboard.tsx",lineNumber:19,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/admin/AdminDashboard.tsx",lineNumber:18,columnNumber:5},this)}export{N as AdminDashboard};
|
|
2
|
-
//# sourceMappingURL=AdminDashboard-45Ya2uzl.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{j as e,d as te,k as J}from"./index-Da8R5Fn_.js";import{a as y}from"./vendor-query-DLp59M9_.js";import{a as ie,d as le,b as re}from"./agents-SXs4tMLb.js";import{C as ne,u as oe,a as de,b as ce,c as pe}from"./CronLabel-DV2v2FlP.js";import{P as me}from"./PageHeader-BuUnJ5NY.js";import{B as V,d as K,R as $,O as A,m as Y,a1 as T,a as G,aB as H,H as ue}from"./vendor-icons-1qQ3NKfa.js";import{e as he}from"./knowledge-D8osen1O.js";import{R as F}from"./RunAsSelector-ZLKGTYP_.js";import{u as Q}from"./workflows-B9xdIsfM.js";import{u as be}from"./yaml-workflows-xOJxyEsQ.js";import{E as Ne}from"./EventTopicPill-9LcMnLF0.js";import{W as z}from"./WorkflowPill-BzhfqGa-.js";import{e as xe,c as ge,f as fe}from"./vendor-react-Co3Y8ikm.js";import"./BotPicker-DgbzCesR.js";import"./bots-Ci5aCzDK.js";const B={name:"",description:"",goals:"",rules:"",user_id:"",knowledge_domain:"",subscriptions:[],schedules:[]},ve={topic:"",filter:"",reaction_type:"durable",workflow_type:"",pipeline_id:"",mcp_prompt:"",input_mapping:"{}",execute_as:"",enabled:!0},Se={cron:"0 * * * *",reaction_type:"durable",workflow_type:"",pipeline_id:"",envelope:"{}",execute_as:""};function we(s,t){var r,n,d;const l=(n=(r=s.behaviors)==null?void 0:r.schedules)!=null&&n.length?s.behaviors.schedules.map(i=>({cron:i.cron||"",reaction_type:i.reaction_type||"durable",workflow_type:i.workflow_type||"",pipeline_id:i.pipeline_id||"",envelope:i.envelope?JSON.stringify(i.envelope,null,2):"{}",execute_as:i.execute_as||""})):(d=s.behaviors)!=null&&d.cron?[{cron:s.behaviors.cron,reaction_type:"durable",workflow_type:s.workflow_type??"",pipeline_id:"",envelope:"{}",execute_as:""}]:[];return{name:s.name,description:s.description??"",goals:s.goals??"",rules:s.rules??"",user_id:s.user_id??"",knowledge_domain:s.knowledge_domain??"",subscriptions:t.map(i=>({id:i.id,topic:i.topic,filter:i.filter?JSON.stringify(i.filter,null,2):"",reaction_type:i.reaction_type,workflow_type:i.workflow_type??"",pipeline_id:i.pipeline_id??"",mcp_prompt:i.mcp_prompt??"",input_mapping:JSON.stringify(i.input_mapping??{},null,2),execute_as:i.execute_as??"",enabled:i.enabled})),schedules:l}}function Ee(s){var l;const t={};return s.schedules.length>0&&(t.schedules=s.schedules.map(r=>({cron:r.cron,reaction_type:r.reaction_type||"durable",workflow_type:r.reaction_type==="pipeline"?void 0:r.workflow_type,pipeline_id:r.reaction_type==="pipeline"?r.pipeline_id:void 0,envelope:q(r.envelope)??{},execute_as:r.execute_as||void 0})),t.cron=s.schedules[0].cron),{name: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:t,workflow_type:((l=s.schedules[0])==null?void 0:l.workflow_type)||void 0,pipeline_id:void 0}}function De(s){return s.subscriptions.map(t=>({id:t.id,topic:t.topic,filter:t.filter?q(t.filter):void 0,reaction_type:t.reaction_type,workflow_type:t.workflow_type||void 0,pipeline_id:t.pipeline_id||void 0,mcp_prompt:t.mcp_prompt||void 0,input_mapping:q(t.input_mapping)??{},execute_as:t.execute_as||void 0,enabled:t.enabled}))}function q(s){if(s.trim())try{return JSON.parse(s)}catch{return}}const w="section-header mt-[3em] first:mt-0",f="label",x="hint",N="input",X="input-json w-full";function je({form:s,set:t}){return e.jsxDEV("div",{className:"space-y-8",children:[e.jsxDEV("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsxDEV("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Give your agent a name and describe what it does. The name appears everywhere — in events, logs, and the dashboard."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:14,columnNumber:9},this),e.jsxDEV("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.jsxDEV(V,{className:"w-3 h-3",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:17,columnNumber:194},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:17,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:13,columnNumber:7},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:f,children:"Name *"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:21,columnNumber:9},this),e.jsxDEV("input",{type:"text",value:s.name,onChange:l=>t("name",l.target.value),placeholder:"health-monitor",className:N},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:22,columnNumber:9},this),e.jsxDEV("p",{className:x,children:"Lowercase, kebab-case. This appears everywhere."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:23,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:20,columnNumber:7},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:f,children:"Description"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:27,columnNumber:9},this),e.jsxDEV("input",{type:"text",value:s.description,onChange:l=>t("description",l.target.value),placeholder:"Watches for workflow failures and captures diagnostics",className:N},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:28,columnNumber:9},this),e.jsxDEV("p",{className:x,children:"One sentence that explains what this agent does."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:29,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:26,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/IdentityStep.tsx",lineNumber:12,columnNumber:5},this)}function ye({form:s,set:t}){return e.jsxDEV("div",{className:"space-y-8",children:[e.jsxDEV("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsxDEV("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Goals define what drives the agent. Rules define what constrains it. Together they give automation judgment."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:14,columnNumber:9},this),e.jsxDEV("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.jsxDEV(V,{className:"w-3 h-3",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:17,columnNumber:198},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:17,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:13,columnNumber:7},this),e.jsxDEV("div",{className:"grid grid-cols-2 gap-8",children:[e.jsxDEV("div",{children:[e.jsxDEV("label",{className:f,children:"Goals"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:22,columnNumber:11},this),e.jsxDEV("textarea",{value:s.goals,onChange:l=>t("goals",l.target.value),placeholder:"Detect failures early, capture diagnostics, alert before cascading",rows:4,className:`${N} resize-none`},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:23,columnNumber:11},this),e.jsxDEV("p",{className:x,children:"Primary motivation. What the agent is trying to achieve."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:24,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:21,columnNumber:9},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:f,children:"Rules"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:27,columnNumber:11},this),e.jsxDEV("textarea",{value:s.rules,onChange:l=>t("rules",l.target.value),placeholder:"Never auto-restart failed workflows. Always escalate to humans.",rows:4,className:`${N} resize-none`},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:28,columnNumber:11},this),e.jsxDEV("p",{className:x,children:"Guardrails. What it must never do, even when goals suggest it should."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:29,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:26,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:20,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/MotivationStep.tsx",lineNumber:12,columnNumber:5},this)}function Ve({form:s,set:t}){const{data:l}=he(),r=(l==null?void 0:l.domains)??[];return e.jsxDEV("div",{className:"space-y-6",children:[e.jsxDEV("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsxDEV("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Assign a knowledge domain — the agent's memory. It stores context here over time, learning from every interaction."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:19,columnNumber:9},this),e.jsxDEV("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.jsxDEV(V,{className:"w-3 h-3",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:22,columnNumber:196},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:22,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:18,columnNumber:7},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:f,children:"Knowledge Domain"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:26,columnNumber:9},this),e.jsxDEV("input",{type:"text",value:s.knowledge_domain,onChange:n=>t("knowledge_domain",n.target.value),placeholder:"e.g., system-health, content-review, vendor-data",className:N,list:"domain-suggestions"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:27,columnNumber:9},this),e.jsxDEV("datalist",{id:"domain-suggestions",children:r.map(n=>e.jsxDEV("option",{value:n.domain},n.domain,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:36,columnNumber:31},this))},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:35,columnNumber:9},this),e.jsxDEV("p",{className:x,children:"Choose an existing domain to share memory, or type a new name to create one."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:38,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:25,columnNumber:7},this),r.length>0&&e.jsxDEV("div",{children:[e.jsxDEV("label",{className:f,children:"Existing Domains"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:43,columnNumber:11},this),e.jsxDEV("div",{className:"space-y-0.5 mt-2",children:r.map(n=>e.jsxDEV("button",{type:"button",onClick:()=>t("knowledge_domain",n.domain),className:`w-full flex items-center gap-3 px-3 py-2 rounded-md text-left transition-colors ${s.knowledge_domain===n.domain?"border-l-2 border-l-accent bg-accent/5":"hover:bg-surface-hover border-l-2 border-l-transparent"}`,children:[e.jsxDEV(K,{className:"w-3.5 h-3.5 text-text-quaternary shrink-0",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:54,columnNumber:17},this),e.jsxDEV("span",{className:"text-sm text-text-primary flex-1",children:n.domain},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:55,columnNumber:17},this),e.jsxDEV("span",{className:"text-[10px] text-text-quaternary",children:[n.count," entries"]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:56,columnNumber:17},this),e.jsxDEV("span",{className:"text-[9px] text-text-quaternary",children:e.jsxDEV(te,{date:n.latest},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:57,columnNumber:67},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:57,columnNumber:17},this)]},n.domain,!0,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:46,columnNumber:15},this))},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:42,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/KnowledgeStep.tsx",lineNumber:17,columnNumber:5},this)}const ke=["workflow.failed","activity.failed","escalation.created","knowledge.stored","app.>","app.*.*.error"];function _e({form:s,set:t}){const l=J(),{data:r}=Q(),n=(r??[]).filter(a=>a.invocable).map(a=>a.workflow_type),[d,i]=y.useState(0),m=(a,p,h)=>{const v=[...s.subscriptions];v[a]={...v[a],[p]:h},t("subscriptions",v)},b=()=>{t("subscriptions",[...s.subscriptions,{...ve}]),i(s.subscriptions.length)},k=a=>{t("subscriptions",s.subscriptions.filter((p,h)=>h!==a)),d>=s.subscriptions.length-1&&i(Math.max(0,s.subscriptions.length-2))},D=s.subscriptions,c=D[d],o=a=>!!a.topic&&(a.reaction_type==="durable"?!!a.workflow_type:a.reaction_type==="pipeline"?!!a.pipeline_id:!!a.mcp_prompt);return D.length===0?e.jsxDEV("div",{className:"max-w-xl",children:[e.jsxDEV("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-8",children:[e.jsxDEV("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the agent runs the configured workflow with the event payload."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:53,columnNumber:11},this),e.jsxDEV("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.jsxDEV(V,{className:"w-3 h-3",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:56,columnNumber:206},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:56,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:52,columnNumber:9},this),e.jsxDEV("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsxDEV($,{className:"w-8 h-8 text-text-quaternary/40 mb-3",strokeWidth:1},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:59,columnNumber:11},this),e.jsxDEV("p",{className:"text-sm text-text-tertiary mb-2",children:"No event subscriptions yet"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:60,columnNumber:11},this),e.jsxDEV("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."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:61,columnNumber:11},this),e.jsxDEV("button",{onClick:b,className:"flex items-center gap-2 text-xs text-accent hover:text-accent-hover transition-colors",children:[e.jsxDEV(A,{className:"w-3.5 h-3.5"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:65,columnNumber:13},this)," Add first subscription"]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:64,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:58,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:51,columnNumber:7},this):e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-6",children:[e.jsxDEV("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the agent runs the configured workflow with the event payload."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:75,columnNumber:9},this),e.jsxDEV("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.jsxDEV(V,{className:"w-3 h-3",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:78,columnNumber:204},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:74,columnNumber:7},this),e.jsxDEV("div",{className:"flex gap-8",children:[e.jsxDEV("div",{className:"w-52 shrink-0 space-y-0.5",children:[D.map((a,p)=>e.jsxDEV("div",{className:`group/sub flex items-center rounded-md transition-colors ${d===p?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsxDEV("button",{onClick:()=>i(p),className:"flex-1 text-left px-3 py-2 min-w-0",children:[e.jsxDEV("div",{className:"flex items-center gap-1.5",children:[e.jsxDEV("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${o(a)?"bg-emerald-400":"bg-zinc-500"}`},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:90,columnNumber:19},this),e.jsxDEV("span",{className:"text-[11px] font-mono truncate",children:a.topic||"new subscription"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:91,columnNumber:19},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:89,columnNumber:17},this),e.jsxDEV("span",{className:"text-[9px] text-text-quaternary ml-3",children:["→ ",a.workflow_type||a.reaction_type]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:93,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:88,columnNumber:15},this),e.jsxDEV("button",{onClick:h=>{h.stopPropagation(),confirm(`Remove subscription "${a.topic||"new"}"?
|
|
2
|
-
|
|
3
|
-
This takes effect when you save.`)&&k(p)},className:"opacity-0 group-hover/sub:opacity-100 px-2 text-text-quaternary hover:text-red-400 transition-all",title:"Remove",children:e.jsxDEV(Y,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:96,columnNumber:17},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:95,columnNumber:15},this)]},p,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:85,columnNumber:13},this)),e.jsxDEV("button",{onClick:b,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.jsxDEV(A,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:101,columnNumber:13},this)," Add"]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:100,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:83,columnNumber:9},this),c&&e.jsxDEV("div",{className:"flex-1 min-w-0 space-y-12",children:[e.jsxDEV("div",{children:[e.jsxDEV("label",{className:w,children:"When this event fires"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:111,columnNumber:15},this),e.jsxDEV("input",{type:"text",value:c.topic,onChange:a=>m(d,"topic",a.target.value),placeholder:"workflow.failed",className:`${N} font-mono`},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:112,columnNumber:15},this),e.jsxDEV("div",{className:"flex gap-3 mt-2 overflow-x-auto",children:ke.map(a=>e.jsxDEV("button",{type:"button",onClick:()=>m(d,"topic",a),className:`text-[10px] font-mono whitespace-nowrap transition-colors ${c.topic===a?"text-accent font-medium":"text-accent/50 hover:text-accent"}`,children:a},a,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:115,columnNumber:19},this))},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:113,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:110,columnNumber:13},this),e.jsxDEV("div",{className:"grid grid-cols-3 gap-6",children:[e.jsxDEV("div",{className:"space-y-4",children:[e.jsxDEV("label",{className:w,children:"Run this workflow"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:125,columnNumber:17},this),e.jsxDEV("div",{className:"flex gap-3",children:["durable","pipeline",...l?["mcp_query"]:[]].map(a=>e.jsxDEV("label",{className:"flex items-center gap-1 text-[11px] text-text-secondary cursor-pointer",children:[e.jsxDEV("input",{type:"radio",name:"reaction",checked:c.reaction_type===a,onChange:()=>m(d,"reaction_type",a),className:"accent-accent w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:129,columnNumber:23},this),a==="durable"?"Workflow":a==="pipeline"?"Pipeline":"MCP Query"]},a,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:128,columnNumber:21},this))},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:126,columnNumber:17},this),c.reaction_type==="durable"&&e.jsxDEV("div",{children:[e.jsxDEV("label",{className:f,children:"Workflow *"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:136,columnNumber:21},this),e.jsxDEV("select",{value:c.workflow_type,onChange:a=>m(d,"workflow_type",a.target.value),className:N,children:[e.jsxDEV("option",{value:"",children:"Select..."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:138,columnNumber:23},this),n.map(a=>e.jsxDEV("option",{value:a,children:a},a,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:139,columnNumber:63},this))]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:137,columnNumber:21},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:135,columnNumber:19},this),c.reaction_type==="pipeline"&&e.jsxDEV("div",{children:[e.jsxDEV("label",{className:f,children:"Pipeline ID *"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:145,columnNumber:21},this),e.jsxDEV("input",{type:"text",value:c.pipeline_id,onChange:a=>m(d,"pipeline_id",a.target.value),placeholder:"UUID",className:`${N} font-mono text-xs`},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:146,columnNumber:21},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:144,columnNumber:19},this),c.reaction_type==="mcp_query"&&e.jsxDEV("div",{children:[e.jsxDEV("label",{className:f,children:"Prompt *"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:151,columnNumber:21},this),e.jsxDEV("textarea",{value:c.mcp_prompt,onChange:a=>m(d,"mcp_prompt",a.target.value),placeholder:"Analyze the error...",rows:2,className:`${N} resize-none`},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:152,columnNumber:21},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:150,columnNumber:19},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:124,columnNumber:15},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:w,children:"As identity"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:157,columnNumber:17},this),e.jsxDEV(F,{selected:c.execute_as,onChange:a=>m(d,"execute_as",a)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:158,columnNumber:17},this),e.jsxDEV("p",{className:x,children:"Identity used when invoking the workflow."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:159,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:156,columnNumber:15},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:w,children:"But only if"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:162,columnNumber:17},this),e.jsxDEV("input",{type:"text",value:c.filter,onChange:a=>m(d,"filter",a.target.value),placeholder:"No filter (all matching events)",className:`${N} font-mono text-xs`},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:163,columnNumber:17},this),e.jsxDEV("p",{className:x,children:["JSON filter against event.data, e.g. ",'{"status": 422}']},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:164,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:161,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:123,columnNumber:13},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:w,children:"With this data"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:170,columnNumber:15},this),e.jsxDEV("textarea",{value:c.input_mapping,onChange:a=>m(d,"input_mapping",a.target.value),rows:10,className:X,placeholder:`{
|
|
4
|
-
"data": {
|
|
5
|
-
"orderId": "{event.data.orderId}",
|
|
6
|
-
"error": "{event.data.error}"
|
|
7
|
-
}
|
|
8
|
-
}`},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:171,columnNumber:15},this),e.jsxDEV("p",{className:x,children:["Maps event fields to workflow input. ","{event.data.fieldName}"," resolves at runtime."]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:172,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:169,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:107,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:81,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/SubscriptionsStep.tsx",lineNumber:73,columnNumber:5},this)}const Ce=["*/5 * * * *","*/15 * * * *","0 * * * *","0 */4 * * *","0 7 * * *","0 9 * * 1-5"];function M(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 Re({form:s,set:t}){const{data:l}=Q(),r=(l??[]).filter(a=>a.invocable).map(a=>a.workflow_type),{data:n}=be({status:"active"}),d=((n==null?void 0:n.workflows)??[]).map(a=>({id:a.id,name:a.graph_topic||a.id})),[i,m]=y.useState(0),b=(a,p,h)=>{const v=[...s.schedules];v[a]={...v[a],[p]:h},t("schedules",v)},k=()=>{t("schedules",[...s.schedules,{...Se}]),m(s.schedules.length)},D=a=>{t("schedules",s.schedules.filter((p,h)=>h!==a)),i>=s.schedules.length-1&&m(Math.max(0,s.schedules.length-2))},c=s.schedules,o=c[i];return c.length===0?e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"border-l-2 border-accent/30 pl-3 py-1 mb-8 flex items-start justify-between",children:[e.jsxDEV("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. Each schedule runs a workflow on a cron timer."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:67,columnNumber:11},this),e.jsxDEV("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.jsxDEV(V,{className:"w-3 h-3",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:70,columnNumber:196},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:70,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:66,columnNumber:9},this),e.jsxDEV("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsxDEV(T,{className:"w-8 h-8 text-text-quaternary/40 mb-3",strokeWidth:1},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:73,columnNumber:11},this),e.jsxDEV("p",{className:"text-sm text-text-tertiary mb-2",children:"No schedules"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:74,columnNumber:11},this),e.jsxDEV("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."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:75,columnNumber:11},this),e.jsxDEV("button",{onClick:k,className:"flex items-center gap-2 text-xs text-accent hover:text-accent-hover transition-colors",children:[e.jsxDEV(A,{className:"w-3.5 h-3.5"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:79,columnNumber:13},this)," Add schedule"]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:78,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:72,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:65,columnNumber:7},this):e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"border-l-2 border-accent/30 pl-3 py-1 mb-6 flex items-start justify-between",children:[e.jsxDEV("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Each schedule runs a workflow on a timer. An agent can have multiple schedules targeting different workflows."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:89,columnNumber:9},this),e.jsxDEV("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.jsxDEV(V,{className:"w-3 h-3",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:92,columnNumber:194},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:92,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:88,columnNumber:7},this),e.jsxDEV("div",{className:"flex gap-8",children:[e.jsxDEV("div",{className:"w-48 shrink-0 space-y-0.5",children:[c.map((a,p)=>e.jsxDEV("div",{className:`group/sched flex items-center rounded-md transition-colors ${i===p?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsxDEV("button",{onClick:()=>m(p),className:"flex-1 text-left px-3 py-2 min-w-0",children:[e.jsxDEV("span",{className:"text-[11px] font-mono block",children:a.cron||"new schedule"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:103,columnNumber:17},this),e.jsxDEV("span",{className:"text-[9px] text-text-quaternary",children:[(a.reaction_type==="pipeline"?a.pipeline_id:a.workflow_type)||"no target"," · ",M(a.cron)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:104,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:102,columnNumber:15},this),e.jsxDEV("button",{onClick:h=>{h.stopPropagation(),confirm(`Remove schedule "${a.cron||"new"}"?
|
|
9
|
-
|
|
10
|
-
This takes effect when you save.`)&&D(p)},className:"opacity-0 group-hover/sched:opacity-100 px-2 text-text-quaternary hover:text-red-400 transition-all",title:"Remove",children:e.jsxDEV(Y,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:107,columnNumber:17},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:106,columnNumber:15},this)]},p,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:99,columnNumber:13},this)),e.jsxDEV("button",{onClick:k,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.jsxDEV(A,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:112,columnNumber:13},this)," Add"]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:111,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:97,columnNumber:9},this),o&&e.jsxDEV("div",{className:"flex-1 min-w-0 space-y-12",children:[e.jsxDEV("div",{children:[e.jsxDEV("label",{className:w,children:"Run every"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:122,columnNumber:15},this),e.jsxDEV("input",{type:"text",value:o.cron,onChange:a=>b(i,"cron",a.target.value),placeholder:"0 * * * *",className:`${N} font-mono`},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:123,columnNumber:15},this),o.cron&&e.jsxDEV("p",{className:"text-[11px] text-accent/80 mt-1",children:M(o.cron)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:124,columnNumber:30},this),e.jsxDEV("div",{className:"flex gap-3 mt-2 overflow-x-auto",children:Ce.map(a=>e.jsxDEV("button",{type:"button",onClick:()=>b(i,"cron",a),className:`text-[10px] font-mono whitespace-nowrap transition-colors ${o.cron===a?"text-accent font-medium":"text-accent/50 hover:text-accent"}`,children:M(a)},a,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:127,columnNumber:19},this))},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:125,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:121,columnNumber:13},this),e.jsxDEV("div",{className:"grid grid-cols-2 gap-6",children:[e.jsxDEV("div",{className:"space-y-4",children:[e.jsxDEV("label",{className:w,children:"Run this workflow"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:137,columnNumber:17},this),e.jsxDEV("div",{className:"flex gap-3",children:["durable","pipeline"].map(a=>e.jsxDEV("label",{className:"flex items-center gap-1 text-[11px] text-text-secondary cursor-pointer",children:[e.jsxDEV("input",{type:"radio",name:`sched-reaction-${i}`,checked:o.reaction_type===a,onChange:()=>b(i,"reaction_type",a),className:"accent-accent w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:141,columnNumber:23},this),a==="durable"?"Workflow":"Pipeline"]},a,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:140,columnNumber:21},this))},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:138,columnNumber:17},this),o.reaction_type==="pipeline"?e.jsxDEV("div",{children:[e.jsxDEV("label",{className:f,children:"Pipeline *"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:148,columnNumber:21},this),e.jsxDEV("select",{value:o.pipeline_id,onChange:a=>b(i,"pipeline_id",a.target.value),className:N,children:[e.jsxDEV("option",{value:"",children:"Select..."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:150,columnNumber:23},this),d.map(a=>e.jsxDEV("option",{value:a.id,children:a.name},a.id,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:151,columnNumber:75},this))]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:149,columnNumber:21},this),e.jsxDEV("p",{className:x,children:"YAML pipeline invoked on each cron tick."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:153,columnNumber:21},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:147,columnNumber:19},this):e.jsxDEV("div",{children:[e.jsxDEV("label",{className:f,children:"Workflow *"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:157,columnNumber:21},this),e.jsxDEV("select",{value:o.workflow_type,onChange:a=>b(i,"workflow_type",a.target.value),className:N,children:[e.jsxDEV("option",{value:"",children:"Select..."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:159,columnNumber:23},this),r.map(a=>e.jsxDEV("option",{value:a,children:a},a,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:160,columnNumber:63},this))]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:158,columnNumber:21},this),e.jsxDEV("p",{className:x,children:"Invoked on each cron tick."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:162,columnNumber:21},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:156,columnNumber:19},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:136,columnNumber:15},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:w,children:"As identity"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:167,columnNumber:17},this),e.jsxDEV(F,{selected:o.execute_as,onChange:a=>b(i,"execute_as",a)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:168,columnNumber:17},this),e.jsxDEV("p",{className:x,children:"Identity used when invoking."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:169,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:166,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:135,columnNumber:13},this),e.jsxDEV("div",{children:[e.jsxDEV("label",{className:w,children:"With this data"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:175,columnNumber:15},this),e.jsxDEV("textarea",{value:o.envelope,onChange:a=>b(i,"envelope",a.target.value),rows:10,className:X,placeholder:`{
|
|
11
|
-
"data": { "source": "cron" }
|
|
12
|
-
}`},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:176,columnNumber:15},this),e.jsxDEV("p",{className:x,children:"Static payload passed to the workflow on each invocation."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:177,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:174,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:118,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:95,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ScheduleStep.tsx",lineNumber:87,columnNumber:5},this)}function C({icon:s,color:t,title:l,children:r}){return e.jsxDEV("div",{className:"mb-10",children:[e.jsxDEV("div",{className:"flex items-center gap-2 mb-2 pb-1.5 border-b border-surface-border/40",children:[e.jsxDEV(s,{className:`w-3.5 h-3.5 ${t}`,strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:16,columnNumber:9},this),e.jsxDEV("h3",{className:"text-xs font-semibold uppercase tracking-widest text-accent/80",children:l},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:17,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:15,columnNumber:7},this),e.jsxDEV("div",{className:"pl-5.5",children:r},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:19,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:14,columnNumber:5},this)}function R({label:s,children:t}){return e.jsxDEV("div",{className:"flex gap-3 py-0.5",children:[e.jsxDEV("span",{className:"text-[10px] text-text-quaternary w-20 shrink-0",children:s},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:27,columnNumber:7},this),e.jsxDEV("span",{className:"text-xs text-text-primary",children:t},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:28,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:26,columnNumber:5},this)}function Ae({form:s,aiEnabled:t=!1}){return e.jsxDEV("div",{children:[e.jsxDEV(C,{icon:G,color:"text-accent",title:"Identity",children:[e.jsxDEV(R,{label:"Name",children:s.name||"—"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:37,columnNumber:9},this),s.description&&e.jsxDEV(R,{label:"Description",children:s.description},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:38,columnNumber:30},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:36,columnNumber:7},this),t&&(s.goals||s.rules)&&e.jsxDEV(C,{icon:H,color:"text-rose-400",title:"Motivation",children:[s.goals&&e.jsxDEV(R,{label:"Goals",children:s.goals},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:43,columnNumber:26},this),s.rules&&e.jsxDEV(R,{label:"Rules",children:s.rules},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:44,columnNumber:26},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:42,columnNumber:9},this),e.jsxDEV(C,{icon:K,color:"text-emerald-400",title:"Knowledge",children:e.jsxDEV(R,{label:"Domain",children:s.knowledge_domain||"None"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:49,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:48,columnNumber:7},this),e.jsxDEV("div",{className:"grid grid-cols-2 gap-x-10",children:[e.jsxDEV(C,{icon:$,color:"text-cyan-400",title:`Subscriptions (${s.subscriptions.length})`,children:s.subscriptions.length===0?e.jsxDEV("span",{className:"text-[11px] text-text-quaternary",children:"None configured"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:56,columnNumber:13},this):e.jsxDEV("div",{className:"divide-y divide-surface-border/30",children:s.subscriptions.map((l,r)=>e.jsxDEV("div",{className:"flex items-center py-1.5",children:[e.jsxDEV("div",{className:"flex-1 min-w-0",children:e.jsxDEV(Ne,{topic:l.topic||"unset"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:61,columnNumber:51},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:61,columnNumber:19},this),e.jsxDEV("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsxDEV("span",{className:"text-text-quaternary text-[10px]",children:"→"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:62,columnNumber:71},this),l.workflow_type?e.jsxDEV(z,{type:l.workflow_type},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:62,columnNumber:151},this):e.jsxDEV("span",{className:"text-[11px] text-text-quaternary",children:l.reaction_type},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:62,columnNumber:195},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:62,columnNumber:19},this)]},r,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:60,columnNumber:17},this))},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:58,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:54,columnNumber:9},this),e.jsxDEV(C,{icon:T,color:"text-amber-400",title:`Schedules (${s.schedules.length})`,children:s.schedules.length===0?e.jsxDEV("span",{className:"text-[11px] text-text-quaternary",children:"None configured"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:71,columnNumber:13},this):e.jsxDEV("div",{className:"divide-y divide-surface-border/30",children:s.schedules.map((l,r)=>e.jsxDEV("div",{className:"flex items-center py-1.5",children:[e.jsxDEV("div",{className:"flex-1 min-w-0",children:e.jsxDEV(ne,{cron:l.cron},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:76,columnNumber:51},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:76,columnNumber:19},this),e.jsxDEV("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsxDEV("span",{className:"text-text-quaternary text-[10px]",children:"→"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:77,columnNumber:71},this),l.workflow_type?e.jsxDEV(z,{type:l.workflow_type},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:77,columnNumber:149},this):e.jsxDEV("span",{className:"text-[11px] text-text-quaternary",children:"no workflow"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:77,columnNumber:191},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:77,columnNumber:19},this)]},r,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:75,columnNumber:17},this))},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:73,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:69,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:53,columnNumber:7},this),e.jsxDEV("div",{className:"border-l-2 border-emerald-400/30 pl-3 py-2 mt-6",children:e.jsxDEV("p",{className:"text-[11px] text-text-tertiary leading-relaxed",children:"After saving, subscriptions and schedules activate immediately. You can pause the agent anytime."},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:86,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:85,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/ReviewStep.tsx",lineNumber:35,columnNumber:5},this)}const Pe=[{id:1,label:"Identity",icon:G},{id:2,label:"Motivation",icon:H,ai:!0},{id:3,label:"Knowledge",icon:K},{id:4,label:"Subscriptions",icon:$},{id:5,label:"Schedules",icon:T},{id:6,label:"Review",icon:ue}];function He(){const s=J(),{id:t}=xe(),l=!t,r=ge(),{data:n,isLoading:d}=ie(l?null:t),{data:i}=oe(l?null:t),m=le(),b=re(),k=de(),D=ce(),c=pe(),[o,a]=y.useState(B),[p,h]=y.useState(!1),[v,O]=y.useState(""),[Z,L]=fe(),j=parseInt(Z.get("step")||"1",10),ee=y.useCallback(u=>{L(g=>{const E=new URLSearchParams(g);return E.set("step",String(u)),E},{replace:!0})},[L]);y.useEffect(()=>{if(!p){if(l){a(B),h(!0);return}n&&i&&(a(we(n,i.subscriptions??[])),h(!0))}},[n,i,l,p]);const _=(u,g)=>a(E=>({...E,[u]:g})),ae=async()=>{O("");try{const u=Ee(o);let g=t;l?g=(await m.mutateAsync(u)).id:await b.mutateAsync({id:t,...u});const E=De(o),se=(i==null?void 0:i.subscriptions)??[],P=new Set(se.map(S=>S.id));for(const S of E)if(S.id&&P.has(S.id)){const{id:I,...W}=S;await D.mutateAsync({agentId:g,subId:I,...W}),P.delete(I)}else{const{id:I,...W}=S;await k.mutateAsync({agentId:g,...W})}for(const S of P)await c.mutateAsync({agentId:g,subId:S});r(`/agents/${g}`)}catch(u){O(u.message)}};if(!l&&d)return e.jsxDEV("div",{className:"animate-pulse space-y-4",children:[e.jsxDEV("div",{className:"h-8 bg-surface-sunken rounded w-48"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:112,columnNumber:53},this),e.jsxDEV("div",{className:"h-60 bg-surface-sunken rounded"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:112,columnNumber:107},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:112,columnNumber:12},this);const U=m.isPending||b.isPending;return e.jsxDEV("div",{children:[e.jsxDEV(me,{title:l?"New Agent":`Agent: ${(n==null?void 0:n.name)??""}`,docsHash:"#docs:agents.md"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:119,columnNumber:7},this),e.jsxDEV("div",{className:"flex gap-10",children:[e.jsxDEV("nav",{className:"w-44 shrink-0 sticky top-0 self-start pt-2",children:[e.jsxDEV("div",{className:"space-y-0.5",children:Pe.filter(u=>!u.ai||s).map(u=>{const g=u.icon,E=j===u.id;return e.jsxDEV("button",{onClick:()=>ee(u.id),className:`w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-left transition-colors ${E?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsxDEV(g,{className:"w-3.5 h-3.5 shrink-0",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:141,columnNumber:19},this),e.jsxDEV("span",{className:"text-xs font-medium",children:u.label},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:142,columnNumber:19},this)]},u.id,!0,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:132,columnNumber:17},this)})},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:127,columnNumber:11},this),e.jsxDEV("div",{className:"mt-8 pt-4 border-t border-surface-border space-y-2",children:[e.jsxDEV("button",{onClick:ae,disabled:!o.name.trim()||U,className:"w-full btn-primary text-xs disabled:opacity-50",children:U?"Saving...":l?"Create Agent":"Save"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:150,columnNumber:13},this),e.jsxDEV("button",{onClick:()=>r(l?"/agents":`/agents/${t}`),className:"w-full btn-ghost text-xs",children:"Cancel"},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:157,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:149,columnNumber:11},this),v&&e.jsxDEV("p",{className:"text-xs text-status-error mt-3",children:v},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:165,columnNumber:25},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:126,columnNumber:9},this),e.jsxDEV("div",{className:"flex-1 min-w-0 pt-2",children:[j===1&&e.jsxDEV(je,{form:o,set:_},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:170,columnNumber:29},this),j===2&&s&&e.jsxDEV(ye,{form:o,set:_},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:171,columnNumber:42},this),j===3&&e.jsxDEV(Ve,{form:o,set:_},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:172,columnNumber:29},this),j===4&&e.jsxDEV(_e,{form:o,set:_},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:173,columnNumber:29},this),j===5&&e.jsxDEV(Re,{form:o,set:_},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:174,columnNumber:29},this),j===6&&e.jsxDEV(Ae,{form:o,aiEnabled:s},void 0,!1,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:175,columnNumber:29},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:169,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:124,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/agents/detail/AgentConfigPage.tsx",lineNumber:118,columnNumber:5},this)}export{He as AgentConfigPage};
|
|
13
|
-
//# sourceMappingURL=AgentConfigPage-BOASC5vi.js.map
|