@hotmeshio/long-tail 0.4.3 → 0.4.4
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/build/api/settings.js +4 -0
- package/build/lib/db/index.d.ts +1 -7
- package/build/lib/db/schemas/008_capability_reaction.sql +12 -0
- package/build/lib/db/schemas/009_file_topic_category.sql +10 -0
- package/build/lib/events/index.d.ts +9 -0
- package/build/lib/events/index.js +15 -0
- package/build/lib/events/nats.d.ts +15 -1
- package/build/lib/events/nats.js +44 -2
- package/build/lib/events/publish.d.ts +10 -0
- package/build/lib/events/publish.js +28 -0
- package/build/modules/config.d.ts +1 -7
- package/build/services/agent/subscription-sql.d.ts +3 -3
- package/build/services/agent/subscription-sql.js +7 -5
- package/build/services/agent/subscriptions.d.ts +3 -1
- package/build/services/agent/subscriptions.js +6 -0
- package/build/services/agent/trigger-registry.js +18 -0
- package/build/services/topics/system-topics.js +29 -0
- package/build/services/yaml-workflow/deployer.d.ts +1 -1
- package/build/services/yaml-workflow/deployer.js +2 -2
- package/build/services/yaml-workflow/invoke.d.ts +2 -0
- package/build/services/yaml-workflow/invoke.js +5 -1
- package/build/start/adapters.js +11 -9
- package/build/start/config.js +4 -0
- package/build/start/workers.js +12 -3
- package/build/system/index.js +16 -0
- package/build/system/mcp-servers/file-storage.js +18 -0
- package/build/system/workflows/capability-invoke/activities.d.ts +12 -0
- package/build/system/workflows/capability-invoke/activities.js +14 -0
- package/build/system/workflows/capability-invoke/index.d.ts +14 -0
- package/build/system/workflows/capability-invoke/index.js +74 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/events.d.ts +13 -1
- package/build/types/startup.d.ts +7 -0
- package/dashboard/dist/assets/{AdminDashboard-Dr5wTIZT.js → AdminDashboard-DISq0Tz8.js} +2 -2
- package/dashboard/dist/assets/{AdminDashboard-Dr5wTIZT.js.map → AdminDashboard-DISq0Tz8.js.map} +1 -1
- package/dashboard/dist/assets/AgentConfigPage-DqaJpB3K.js +16 -0
- package/dashboard/dist/assets/AgentConfigPage-DqaJpB3K.js.map +1 -0
- package/dashboard/dist/assets/AgentDetailPage-BPzPk2GC.js +4 -0
- package/dashboard/dist/assets/AgentDetailPage-BPzPk2GC.js.map +1 -0
- package/dashboard/dist/assets/AgentsPage-CLcxJWjC.js +2 -0
- package/dashboard/dist/assets/AgentsPage-CLcxJWjC.js.map +1 -0
- package/dashboard/dist/assets/AvailableEscalationsPage-hOcjAAIj.js +2 -0
- package/dashboard/dist/assets/{AvailableEscalationsPage-UzjXcO3W.js.map → AvailableEscalationsPage-hOcjAAIj.js.map} +1 -1
- package/dashboard/dist/assets/{BotPicker-CM-_u73k.js → BotPicker-DuAZgHbJ.js} +2 -2
- package/dashboard/dist/assets/{BotPicker-CM-_u73k.js.map → BotPicker-DuAZgHbJ.js.map} +1 -1
- package/dashboard/dist/assets/CapabilitiesPage-PRel6TXd.js +2 -0
- package/dashboard/dist/assets/CapabilitiesPage-PRel6TXd.js.map +1 -0
- package/dashboard/dist/assets/{CollapsibleSection-CnPKa7df.js → CollapsibleSection-DnoUFQVf.js} +2 -2
- package/dashboard/dist/assets/{CollapsibleSection-CnPKa7df.js.map → CollapsibleSection-DnoUFQVf.js.map} +1 -1
- package/dashboard/dist/assets/CopyableId-D0SQ39nR.js +2 -0
- package/dashboard/dist/assets/CopyableId-D0SQ39nR.js.map +1 -0
- package/dashboard/dist/assets/{CredentialsPage-CImIzra4.js → CredentialsPage-CqedUU7b.js} +2 -2
- package/dashboard/dist/assets/{CredentialsPage-CImIzra4.js.map → CredentialsPage-CqedUU7b.js.map} +1 -1
- package/dashboard/dist/assets/{CronLabel-5HPAmciI.js → CronLabel-CPEjE-mH.js} +2 -2
- package/dashboard/dist/assets/CronLabel-CPEjE-mH.js.map +1 -0
- package/dashboard/dist/assets/CustomDurationPicker-BIQWzbv0.js +2 -0
- package/dashboard/dist/assets/{CustomDurationPicker-5JzEgS7I.js.map → CustomDurationPicker-BIQWzbv0.js.map} +1 -1
- package/dashboard/dist/assets/{DropZone-BEW3jBzf.js → DropZone-e5EOL5gC.js} +2 -2
- package/dashboard/dist/assets/{DropZone-BEW3jBzf.js.map → DropZone-e5EOL5gC.js.map} +1 -1
- package/dashboard/dist/assets/ElapsedCell-CzVjr74Y.js +2 -0
- package/dashboard/dist/assets/{ElapsedCell-B79BF5Mj.js.map → ElapsedCell-CzVjr74Y.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationsOverview-QvWvbpx3.js → EscalationsOverview-Bcrb44xJ.js} +2 -2
- package/dashboard/dist/assets/{EscalationsOverview-QvWvbpx3.js.map → EscalationsOverview-Bcrb44xJ.js.map} +1 -1
- package/dashboard/dist/assets/{EventTable-DAclQwfr.js → EventTable-CGfJU7e1.js} +2 -2
- package/dashboard/dist/assets/{EventTable-DAclQwfr.js.map → EventTable-CGfJU7e1.js.map} +1 -1
- package/dashboard/dist/assets/{EventTopicPill-By-6sXDp.js → EventTopicPill-xJJnxvlP.js} +2 -2
- package/dashboard/dist/assets/{EventTopicPill-By-6sXDp.js.map → EventTopicPill-xJJnxvlP.js.map} +1 -1
- package/dashboard/dist/assets/{HomePage-DVOi7rR1.js → HomePage-BIzUcGW9.js} +2 -2
- package/dashboard/dist/assets/{HomePage-DVOi7rR1.js.map → HomePage-BIzUcGW9.js.map} +1 -1
- package/dashboard/dist/assets/{ListToolbar-Bntl2hex.js → ListToolbar-DNAGFe14.js} +2 -2
- package/dashboard/dist/assets/{ListToolbar-Bntl2hex.js.map → ListToolbar-DNAGFe14.js.map} +1 -1
- package/dashboard/dist/assets/{McpOverview-B-xSYPJj.js → McpOverview-BpYk21es.js} +2 -2
- package/dashboard/dist/assets/{McpOverview-B-xSYPJj.js.map → McpOverview-BpYk21es.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryDetailPage-Cq71BzjB.js → McpQueryDetailPage-DlrZiSuL.js} +2 -2
- package/dashboard/dist/assets/{McpQueryDetailPage-Cq71BzjB.js.map → McpQueryDetailPage-DlrZiSuL.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryPage-Dfz87aZF.js → McpQueryPage-COfPssO7.js} +2 -2
- package/dashboard/dist/assets/{McpQueryPage-Dfz87aZF.js.map → McpQueryPage-COfPssO7.js.map} +1 -1
- package/dashboard/dist/assets/McpRunDetailPage-Cra0nQSw.js +2 -0
- package/dashboard/dist/assets/McpRunDetailPage-Cra0nQSw.js.map +1 -0
- package/dashboard/dist/assets/{McpRunsPage-MUYvUYqz.js → McpRunsPage-BlgcGN3k.js} +2 -2
- package/dashboard/dist/assets/{McpRunsPage-MUYvUYqz.js.map → McpRunsPage-BlgcGN3k.js.map} +1 -1
- package/dashboard/dist/assets/{OperatorDashboard-Rih1SZrn.js → OperatorDashboard-BbO6cWzb.js} +2 -2
- package/dashboard/dist/assets/{OperatorDashboard-Rih1SZrn.js.map → OperatorDashboard-BbO6cWzb.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeader-Bo0SpcCK.js → PageHeader-B_gV_jKk.js} +2 -2
- package/dashboard/dist/assets/{PageHeader-Bo0SpcCK.js.map → PageHeader-B_gV_jKk.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeaderWithStats-7K5BdhOj.js → PageHeaderWithStats-D0I0nrnx.js} +2 -2
- package/dashboard/dist/assets/{PageHeaderWithStats-7K5BdhOj.js.map → PageHeaderWithStats-D0I0nrnx.js.map} +1 -1
- package/dashboard/dist/assets/ProcessDetailPage-s_iV8ICg.js +2 -0
- package/dashboard/dist/assets/{ProcessDetailPage-BMkWCjqD.js.map → ProcessDetailPage-s_iV8ICg.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessesListPage-vZjUSc7S.js → ProcessesListPage-MnLMnxAa.js} +2 -2
- package/dashboard/dist/assets/{ProcessesListPage-vZjUSc7S.js.map → ProcessesListPage-MnLMnxAa.js.map} +1 -1
- package/dashboard/dist/assets/{RolePill-BDzPFQUv.js → RolePill-BOBytzrP.js} +2 -2
- package/dashboard/dist/assets/{RolePill-BDzPFQUv.js.map → RolePill-BOBytzrP.js.map} +1 -1
- package/dashboard/dist/assets/{RolesPage-kjeAsj3_.js → RolesPage-BH7KASM7.js} +2 -2
- package/dashboard/dist/assets/{RolesPage-kjeAsj3_.js.map → RolesPage-BH7KASM7.js.map} +1 -1
- package/dashboard/dist/assets/{RunAsSelector-DC4SLtTq.js → RunAsSelector-_QbJKhlo.js} +2 -2
- package/dashboard/dist/assets/{RunAsSelector-DC4SLtTq.js.map → RunAsSelector-_QbJKhlo.js.map} +1 -1
- package/dashboard/dist/assets/{ServerName-CEOFF7UG.js → ServerName-uqa4eBqm.js} +2 -2
- package/dashboard/dist/assets/{ServerName-CEOFF7UG.js.map → ServerName-uqa4eBqm.js.map} +1 -1
- package/dashboard/dist/assets/SwimlaneTimeline-og79Llvs.js +2 -0
- package/dashboard/dist/assets/SwimlaneTimeline-og79Llvs.js.map +1 -0
- package/dashboard/dist/assets/{TagInput-VBY0xIwb.js → TagInput-D3f11sbM.js} +2 -2
- package/dashboard/dist/assets/{TagInput-VBY0xIwb.js.map → TagInput-D3f11sbM.js.map} +1 -1
- package/dashboard/dist/assets/{TaskDetailPage-C0AlG_2t.js → TaskDetailPage-DPV4ySd9.js} +2 -2
- package/dashboard/dist/assets/{TaskDetailPage-C0AlG_2t.js.map → TaskDetailPage-DPV4ySd9.js.map} +1 -1
- package/dashboard/dist/assets/{TaskQueuePill-DZykFijh.js → TaskQueuePill-Bc45J7X1.js} +2 -2
- package/dashboard/dist/assets/{TaskQueuePill-DZykFijh.js.map → TaskQueuePill-Bc45J7X1.js.map} +1 -1
- package/dashboard/dist/assets/{TasksListPage-69ZWCaCP.js → TasksListPage-BYj3OqUi.js} +2 -2
- package/dashboard/dist/assets/{TasksListPage-69ZWCaCP.js.map → TasksListPage-BYj3OqUi.js.map} +1 -1
- package/dashboard/dist/assets/TimeAgo-W7TdJpV-.js +2 -0
- package/dashboard/dist/assets/{TimeAgo-CttiZG0k.js.map → TimeAgo-W7TdJpV-.js.map} +1 -1
- package/dashboard/dist/assets/{TimestampCell-CYFbEhqc.js → TimestampCell-Bi2nc9Q_.js} +2 -2
- package/dashboard/dist/assets/{TimestampCell-CYFbEhqc.js.map → TimestampCell-Bi2nc9Q_.js.map} +1 -1
- package/dashboard/dist/assets/{ToolPill-RP2Tvlrx.js → ToolPill-CuoXcmhv.js} +2 -2
- package/dashboard/dist/assets/{ToolPill-RP2Tvlrx.js.map → ToolPill-CuoXcmhv.js.map} +1 -1
- package/dashboard/dist/assets/ToolTestPanel-Dl3C53zb.js +2 -0
- package/dashboard/dist/assets/ToolTestPanel-Dl3C53zb.js.map +1 -0
- package/dashboard/dist/assets/{TopicDetailPage-Aq4-6GLl.js → TopicDetailPage-CjaZn4WP.js} +2 -2
- package/dashboard/dist/assets/{TopicDetailPage-Aq4-6GLl.js.map → TopicDetailPage-CjaZn4WP.js.map} +1 -1
- package/dashboard/dist/assets/{TopicsPage-BYFKjRY_.js → TopicsPage-BfsJEC1p.js} +2 -2
- package/dashboard/dist/assets/{TopicsPage-BYFKjRY_.js.map → TopicsPage-BfsJEC1p.js.map} +1 -1
- package/dashboard/dist/assets/{UserName-C4_T5-rI.js → UserName-b4baWHM_.js} +2 -2
- package/dashboard/dist/assets/{UserName-C4_T5-rI.js.map → UserName-b4baWHM_.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowExecutionPage-BGmJnXnk.js +2 -0
- package/dashboard/dist/assets/WorkflowExecutionPage-BGmJnXnk.js.map +1 -0
- package/dashboard/dist/assets/WorkflowPill-Bg2-0Hkg.js +2 -0
- package/dashboard/dist/assets/WorkflowPill-Bg2-0Hkg.js.map +1 -0
- package/dashboard/dist/assets/{WorkflowsDashboard-_LMWc-OC.js → WorkflowsDashboard-BzH7jMRu.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsDashboard-_LMWc-OC.js.map → WorkflowsDashboard-BzH7jMRu.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsOverview-DFrfw554.js → WorkflowsOverview-BcUgBvjD.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsOverview-DFrfw554.js.map → WorkflowsOverview-BcUgBvjD.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowsPage-CZzGwfol.js → YamlWorkflowsPage-OhpCQJ0l.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowsPage-CZzGwfol.js.map → YamlWorkflowsPage-OhpCQJ0l.js.map} +1 -1
- package/dashboard/dist/assets/{agents-CsKILVSU.js → agents-Ce3HmPz4.js} +2 -2
- package/dashboard/dist/assets/{agents-CsKILVSU.js.map → agents-Ce3HmPz4.js.map} +1 -1
- package/dashboard/dist/assets/{bots-BzEs6Q9L.js → bots-B0BomNnf.js} +2 -2
- package/dashboard/dist/assets/{bots-BzEs6Q9L.js.map → bots-B0BomNnf.js.map} +1 -1
- package/dashboard/dist/assets/capabilities-t-w5N9K9.js +2 -0
- package/dashboard/dist/assets/capabilities-t-w5N9K9.js.map +1 -0
- package/dashboard/dist/assets/{controlplane-COYEIIAz.js → controlplane-BrtAZnJM.js} +2 -2
- package/dashboard/dist/assets/{controlplane-COYEIIAz.js.map → controlplane-BrtAZnJM.js.map} +1 -1
- package/dashboard/dist/assets/{escalation-BZjS2202.js → escalation-DilnDxw2.js} +2 -2
- package/dashboard/dist/assets/{escalation-BZjS2202.js.map → escalation-DilnDxw2.js.map} +1 -1
- package/dashboard/dist/assets/{escalation-columns-DtRVmPSB.js → escalation-columns-C0slywOY.js} +2 -2
- package/dashboard/dist/assets/{escalation-columns-DtRVmPSB.js.map → escalation-columns-C0slywOY.js.map} +1 -1
- package/dashboard/dist/assets/{helpers-BngVEys5.js → helpers-BMvPqQr8.js} +2 -2
- package/dashboard/dist/assets/{helpers-BngVEys5.js.map → helpers-BMvPqQr8.js.map} +1 -1
- package/dashboard/dist/assets/{index-DxMNiFPS.js → index-30-pN97P.js} +2 -2
- package/dashboard/dist/assets/{index-DxMNiFPS.js.map → index-30-pN97P.js.map} +1 -1
- package/dashboard/dist/assets/index-BPxglOYm.css +1 -0
- package/dashboard/dist/assets/{index-R61-yG56.js → index-Bl9wzQ8Q.js} +2 -2
- package/dashboard/dist/assets/{index-R61-yG56.js.map → index-Bl9wzQ8Q.js.map} +1 -1
- package/dashboard/dist/assets/{index-ABsZZf_U.js → index-BxOuF0hm.js} +2 -2
- package/dashboard/dist/assets/{index-ABsZZf_U.js.map → index-BxOuF0hm.js.map} +1 -1
- package/dashboard/dist/assets/{index-BCsShN2l.js → index-Ck2QdJXT.js} +2 -2
- package/dashboard/dist/assets/{index-BCsShN2l.js.map → index-Ck2QdJXT.js.map} +1 -1
- package/dashboard/dist/assets/{index-xgl431mG.js → index-DNmlrCAp.js} +2 -2
- package/dashboard/dist/assets/{index-xgl431mG.js.map → index-DNmlrCAp.js.map} +1 -1
- package/dashboard/dist/assets/index-DPW_i3fH.js +6 -0
- package/dashboard/dist/assets/index-DPW_i3fH.js.map +1 -0
- package/dashboard/dist/assets/{index-DcpCR9c_.js → index-DZX-E_3q.js} +24 -24
- package/dashboard/dist/assets/index-DZX-E_3q.js.map +1 -0
- package/dashboard/dist/assets/{index-DykjJxzr.js → index-D_wqdvG_.js} +2 -2
- package/dashboard/dist/assets/{index-DykjJxzr.js.map → index-D_wqdvG_.js.map} +1 -1
- package/dashboard/dist/assets/{index-Bq5MSkCL.js → index-DnsVYMMg.js} +2 -2
- package/dashboard/dist/assets/{index-Bq5MSkCL.js.map → index-DnsVYMMg.js.map} +1 -1
- package/dashboard/dist/assets/{index-BwivT39P.js → index-H5TlloTk.js} +2 -2
- package/dashboard/dist/assets/{index-BwivT39P.js.map → index-H5TlloTk.js.map} +1 -1
- package/dashboard/dist/assets/{index-ByxH4qQ-.js → index-f-0Duls3.js} +2 -2
- package/dashboard/dist/assets/{index-ByxH4qQ-.js.map → index-f-0Duls3.js.map} +1 -1
- package/dashboard/dist/assets/{index-COgyD_H2.js → index-pIMl0mYp.js} +2 -2
- package/dashboard/dist/assets/{index-COgyD_H2.js.map → index-pIMl0mYp.js.map} +1 -1
- package/dashboard/dist/assets/{index-Byp8BDPs.js → index-qNuxC8kX.js} +2 -2
- package/dashboard/dist/assets/{index-Byp8BDPs.js.map → index-qNuxC8kX.js.map} +1 -1
- package/dashboard/dist/assets/{knowledge-DhCbDgy4.js → knowledge-D01NdF5h.js} +2 -2
- package/dashboard/dist/assets/{knowledge-DhCbDgy4.js.map → knowledge-D01NdF5h.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-xh7T0I-f.js → mcp-CjXjDZI0.js} +2 -2
- package/dashboard/dist/assets/{mcp-xh7T0I-f.js.map → mcp-CjXjDZI0.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-il3CfU3U.js → mcp-query-LlKQcWLJ.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-il3CfU3U.js.map → mcp-query-LlKQcWLJ.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-runs-4fyRpegc.js → mcp-runs-C0C54hU6.js} +2 -2
- package/dashboard/dist/assets/{mcp-runs-4fyRpegc.js.map → mcp-runs-C0C54hU6.js.map} +1 -1
- package/dashboard/dist/assets/{namespaces-BBTvHnRF.js → namespaces-6qWDXXJV.js} +2 -2
- package/dashboard/dist/assets/{namespaces-BBTvHnRF.js.map → namespaces-6qWDXXJV.js.map} +1 -1
- package/dashboard/dist/assets/{roles-D7bx5FAM.js → roles-Dtj0uabn.js} +2 -2
- package/dashboard/dist/assets/{roles-D7bx5FAM.js.map → roles-Dtj0uabn.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-BgxRbhVM.js → tasks-BevFBjZq.js} +2 -2
- package/dashboard/dist/assets/{tasks-BgxRbhVM.js.map → tasks-BevFBjZq.js.map} +1 -1
- package/dashboard/dist/assets/{topics-CTtCboHe.js → topics-BMG5tx2g.js} +2 -2
- package/dashboard/dist/assets/{topics-CTtCboHe.js.map → topics-BMG5tx2g.js.map} +1 -1
- package/dashboard/dist/assets/useEventHooks-CPyvFlVR.js +2 -0
- package/dashboard/dist/assets/useEventHooks-CPyvFlVR.js.map +1 -0
- package/dashboard/dist/assets/{useYamlActivityEvents-CSMX9He5.js → useYamlActivityEvents-Bll8NPNQ.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-CSMX9He5.js.map → useYamlActivityEvents-Bll8NPNQ.js.map} +1 -1
- package/dashboard/dist/assets/{users-CyF-5WLI.js → users-XZ349b0r.js} +2 -2
- package/dashboard/dist/assets/{users-CyF-5WLI.js.map → users-XZ349b0r.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-BNtvBbnj.js → vendor-icons-B_Yla7iD.js} +2 -2
- package/dashboard/dist/assets/{vendor-icons-BNtvBbnj.js.map → vendor-icons-B_Yla7iD.js.map} +1 -1
- package/dashboard/dist/assets/{workflows-Bf4_w24H.js → workflows-Do-Eiv8f.js} +2 -2
- package/dashboard/dist/assets/{workflows-Bf4_w24H.js.map → workflows-Do-Eiv8f.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-Cp1N0NMK.js → yaml-workflows-DolGRQ5f.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-Cp1N0NMK.js.map → yaml-workflows-DolGRQ5f.js.map} +1 -1
- package/dashboard/dist/index.html +3 -3
- package/docs/agents.md +9 -9
- package/docs/api/http/agents.md +12 -10
- package/docs/api/http/settings.md +4 -0
- package/docs/api/sdk/agents.md +4 -2
- package/docs/api/sdk/settings.md +2 -1
- package/docs/dashboard.md +1 -1
- package/package.json +2 -2
- package/dashboard/dist/assets/AgentConfigPage-D52KyJY-.js +0 -13
- package/dashboard/dist/assets/AgentConfigPage-D52KyJY-.js.map +0 -1
- package/dashboard/dist/assets/AgentDetailPage-Cbo_qrYF.js +0 -4
- package/dashboard/dist/assets/AgentDetailPage-Cbo_qrYF.js.map +0 -1
- package/dashboard/dist/assets/AgentsPage-CvuF8--H.js +0 -2
- package/dashboard/dist/assets/AgentsPage-CvuF8--H.js.map +0 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-UzjXcO3W.js +0 -2
- package/dashboard/dist/assets/CapabilitiesPage-D1QEHMKw.js +0 -2
- package/dashboard/dist/assets/CapabilitiesPage-D1QEHMKw.js.map +0 -1
- package/dashboard/dist/assets/CopyableId-DmLF-RqZ.js +0 -2
- package/dashboard/dist/assets/CopyableId-DmLF-RqZ.js.map +0 -1
- package/dashboard/dist/assets/CronLabel-5HPAmciI.js.map +0 -1
- package/dashboard/dist/assets/CustomDurationPicker-5JzEgS7I.js +0 -2
- package/dashboard/dist/assets/ElapsedCell-B79BF5Mj.js +0 -2
- package/dashboard/dist/assets/McpRunDetailPage-CXXRgMmJ.js +0 -2
- package/dashboard/dist/assets/McpRunDetailPage-CXXRgMmJ.js.map +0 -1
- package/dashboard/dist/assets/ProcessDetailPage-BMkWCjqD.js +0 -2
- package/dashboard/dist/assets/SwimlaneTimeline-MUUXgT3o.js +0 -2
- package/dashboard/dist/assets/SwimlaneTimeline-MUUXgT3o.js.map +0 -1
- package/dashboard/dist/assets/TimeAgo-CttiZG0k.js +0 -2
- package/dashboard/dist/assets/ToolTestPanel-CY_PLZSe.js +0 -2
- package/dashboard/dist/assets/ToolTestPanel-CY_PLZSe.js.map +0 -1
- package/dashboard/dist/assets/WorkflowExecutionPage-DUSTBasv.js +0 -2
- package/dashboard/dist/assets/WorkflowExecutionPage-DUSTBasv.js.map +0 -1
- package/dashboard/dist/assets/WorkflowPill-pPuGH8v9.js +0 -2
- package/dashboard/dist/assets/WorkflowPill-pPuGH8v9.js.map +0 -1
- package/dashboard/dist/assets/index-DXEYynKO.css +0 -1
- package/dashboard/dist/assets/index-DcpCR9c_.js.map +0 -1
- package/dashboard/dist/assets/index-DuPY59Yu.js +0 -5
- package/dashboard/dist/assets/index-DuPY59Yu.js.map +0 -1
- package/dashboard/dist/assets/settings-nt6qyR1S.js +0 -2
- package/dashboard/dist/assets/settings-nt6qyR1S.js.map +0 -1
- package/dashboard/dist/assets/useEventHooks-CkJOmbF-.js +0 -2
- package/dashboard/dist/assets/useEventHooks-CkJOmbF-.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as n,b as s,c as u}from"./vendor-query-B2UbickB.js";import{b as r}from"./index-
|
|
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-DZX-E_3q.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-Do-Eiv8f.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows-
|
|
1
|
+
{"version":3,"file":"workflows-Do-Eiv8f.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,EAA8B,CACnC,SAAU,CAAC,YAAY,EACvB,QAAS,UACK,MAAMC,EAA6C,wBAAwB,GAC5E,SACb,CACD,CACH,CAEO,SAASI,EAAqBC,EAAoB,CACvD,OAAON,EAA4B,CACjC,SAAU,CAAC,oBAAqBM,CAAU,EAC1C,QAAS,IACPL,EAAS,oBAAoBK,CAAU,YAAY,EACrD,QAAS,CAAC,CAACA,CAAA,CACZ,CACH,CAUO,SAASC,EAAQC,EAUrB,CAC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AAU,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-B2UbickB.js";import{b as r}from"./index-
|
|
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-DZX-E_3q.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-DolGRQ5f.js.map
|
package/dashboard/dist/assets/{yaml-workflows-Cp1N0NMK.js.map → yaml-workflows-DolGRQ5f.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml-workflows-Cp1N0NMK.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,EAC9B,QAAS,IAAMH,EAAS,mBAAmBG,CAAE,EAAE,EAC/C,QAAS,CAAC,CAACA,CAAA,CACZ,CACH,CAEO,SAASC,GAAwB,CACtC,MAAMC,EAAcC,EAAA,EACpB,OAAOC,EAAY,CACjB,WAAaC,GAWXR,EAA+B,kBAAmB,CAChD,OAAQ,OACR,KAAM,KAAK,UAAUQ,CAAK,CAAA,CAC3B,EACH,UAAW,IAA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AAA,EACpB,OAAOC,EAAY,CACjB,WAAY,CAAC,CAAE,GAAAJ,EAAI,cAAAqB,EAAe,cAAAC,EAAe,WAAAX,KAM/Cd,EAA+B,mBAAmBG,CAAE,QAAS,CAC3D,OAAQ,MACR,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"}
|
|
1
|
+
{"version":3,"file":"yaml-workflows-DolGRQ5f.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,EACn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J,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,11 +8,11 @@
|
|
|
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-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-DZX-E_3q.js"></script>
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/assets/vendor-query-B2UbickB.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-CX88sFS5.js">
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-icons-
|
|
15
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-icons-B_Yla7iD.js">
|
|
15
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BPxglOYm.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
18
18
|
<div id="root"></div>
|
package/docs/agents.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Agent Automations
|
|
2
2
|
|
|
3
|
-
## What is an agent?
|
|
3
|
+
## What is an agent automation?
|
|
4
4
|
|
|
5
|
-
An agent is an autonomous persona that reacts to events and takes action on your behalf. When an event happens, it runs a workflow with the right context — automatically, reliably, at scale.
|
|
5
|
+
An agent automation is an autonomous persona that reacts to events and takes action on your behalf. When an event happens, it runs a workflow with the right context — automatically, reliably, at scale.
|
|
6
6
|
|
|
7
|
-
Every
|
|
7
|
+
Every automation has:
|
|
8
8
|
|
|
9
9
|
- **Identity** — a name, a purpose, and optionally a service account it runs as
|
|
10
10
|
- **Motivation** — goals that drive it and rules that constrain it
|
|
@@ -180,15 +180,15 @@ When an agent is paused:
|
|
|
180
180
|
|
|
181
181
|
## Examples
|
|
182
182
|
|
|
183
|
-
### Content triage
|
|
183
|
+
### Content triage automation
|
|
184
184
|
Monitors content review escalations. Subscribes to `escalation.created` filtered by `reviewContent`. Auto-resolves low-confidence items. Runs every 15 minutes to catch stragglers. Knowledge domain: `content-review`.
|
|
185
185
|
|
|
186
|
-
### Health monitor
|
|
186
|
+
### Health monitor automation
|
|
187
187
|
Subscribes to `workflow.failed`, `activity.failed`, `app.*.*.error`, and `task.failed`. Captures diagnostics into `system-health` knowledge. Runs hourly for proactive checks. Rules: never auto-restart — capture and escalate.
|
|
188
188
|
|
|
189
|
-
### Event coordinator
|
|
189
|
+
### Event coordinator automation
|
|
190
190
|
Subscribes to `app.>` (all application events), `workflow.completed`, `knowledge.stored`, and `escalation.resolved`. Routes events to appropriate workflows. Purely event-driven — no schedule.
|
|
191
191
|
|
|
192
|
-
## What makes
|
|
192
|
+
## What makes agent automations different from workflows?
|
|
193
193
|
|
|
194
|
-
A workflow is a sequence of steps. An agent is a persona that *uses* workflows. The
|
|
194
|
+
A workflow is a sequence of steps. An agent automation is a persona that *uses* workflows. The automation decides *when* to run, *what* to run, and *why*. It has goals, rules, memory, and reactive wiring. The workflow is the tool. The automation is the motivation.
|
package/docs/api/http/agents.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Agent Automations API
|
|
2
2
|
|
|
3
|
-
CRUD operations for
|
|
3
|
+
CRUD operations for agent automations — autonomous personas that react to events and run workflows on schedules. Each automation has an identity, motivation (goals/rules), event subscriptions, cron schedules, and a knowledge domain.
|
|
4
4
|
|
|
5
5
|
All endpoints require authentication.
|
|
6
6
|
|
|
7
|
-
## List
|
|
7
|
+
## List agent automations
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
GET /api/agents?status=active&knowledge_domain=system-health&limit=25&offset=0
|
|
@@ -40,7 +40,7 @@ Returns agents with subscription counts and topic lists (via JOIN).
|
|
|
40
40
|
}
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
## Get agent
|
|
43
|
+
## Get agent automation
|
|
44
44
|
|
|
45
45
|
```
|
|
46
46
|
GET /api/agents/:id
|
|
@@ -58,7 +58,7 @@ Returns an agent with aggregated stats (knowledge entry count, escalation count)
|
|
|
58
58
|
}
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
## Create agent
|
|
61
|
+
## Create agent automation
|
|
62
62
|
|
|
63
63
|
```
|
|
64
64
|
POST /api/agents
|
|
@@ -95,7 +95,7 @@ POST /api/agents
|
|
|
95
95
|
|
|
96
96
|
**Response 201:** The created agent.
|
|
97
97
|
|
|
98
|
-
## Update agent
|
|
98
|
+
## Update agent automation
|
|
99
99
|
|
|
100
100
|
```
|
|
101
101
|
PUT /api/agents/:id
|
|
@@ -105,7 +105,7 @@ Partial update — only include fields to change. Changing `status` or `behavior
|
|
|
105
105
|
|
|
106
106
|
**Response 200:** The updated agent.
|
|
107
107
|
|
|
108
|
-
## Delete agent
|
|
108
|
+
## Delete agent automation
|
|
109
109
|
|
|
110
110
|
```
|
|
111
111
|
DELETE /api/agents/:id
|
|
@@ -117,9 +117,9 @@ Permanently removes the agent. Event subscriptions are cascade-deleted. Cron sch
|
|
|
117
117
|
|
|
118
118
|
---
|
|
119
119
|
|
|
120
|
-
##
|
|
120
|
+
## Automation Subscriptions
|
|
121
121
|
|
|
122
|
-
Subscriptions wire events to workflows. When an event matches the topic pattern, the
|
|
122
|
+
Subscriptions wire events to workflows. When an event matches the topic pattern, the automation invokes the configured workflow.
|
|
123
123
|
|
|
124
124
|
### List subscriptions
|
|
125
125
|
|
|
@@ -169,10 +169,12 @@ POST /api/agents/:agentId/subscriptions
|
|
|
169
169
|
| Field | Type | Required | Description |
|
|
170
170
|
|-------|------|----------|-------------|
|
|
171
171
|
| `topic` | `string` | Yes | Event topic pattern. Supports `*` (one token) and `>` (rest of subject). |
|
|
172
|
-
| `reaction_type` | `string` | Yes | `durable`, `pipeline`, or `
|
|
172
|
+
| `reaction_type` | `string` | Yes | `durable`, `pipeline`, `mcp_query`, or `capability` |
|
|
173
173
|
| `workflow_type` | `string` | For durable | Registered workflow name |
|
|
174
174
|
| `pipeline_id` | `string` | For pipeline | YAML workflow UUID |
|
|
175
175
|
| `mcp_prompt` | `string` | For mcp_query | Dynamic query prompt |
|
|
176
|
+
| `server_id` | `string` | For capability | MCP server UUID |
|
|
177
|
+
| `tool_name` | `string` | For capability | MCP tool name |
|
|
176
178
|
| `input_mapping` | `object` | No | Maps event fields to workflow envelope. Templates: `{event.data.field}` |
|
|
177
179
|
| `filter` | `object` | No | Shallow key-value match against `event.data` |
|
|
178
180
|
| `execute_as` | `string` | No | Identity override for this subscription |
|
|
@@ -22,6 +22,9 @@ GET /api/settings
|
|
|
22
22
|
"transport": "socketio",
|
|
23
23
|
"natsWsUrl": null,
|
|
24
24
|
"natsToken": null
|
|
25
|
+
},
|
|
26
|
+
"ai": {
|
|
27
|
+
"enabled": true
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
```
|
|
@@ -33,3 +36,4 @@ GET /api/settings
|
|
|
33
36
|
| `events.transport` | `'socketio' \| 'nats' \| 'none'` | Dashboard event transport. Defaults to `socketio`. Reports `nats` only when `EVENT_TRANSPORT=nats` is set and a NATS adapter is registered. |
|
|
34
37
|
| `events.natsWsUrl` | `string \| null` | NATS WebSocket URL for browser connections. Only present when a NATS adapter is registered. Read from `VITE_NATS_WS_URL` or `NATS_WS_URL`. |
|
|
35
38
|
| `events.natsToken` | `string \| null` | NATS auth token for browser connections. Only present when a NATS adapter is registered. Read from `NATS_TOKEN`. |
|
|
39
|
+
| `ai.enabled` | `boolean` | Whether an LLM API key is configured. When `false`, the dashboard hides AI-specific features (pipelines designer, AI assistant, triage). |
|
package/docs/api/sdk/agents.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# lt.agents
|
|
2
2
|
|
|
3
|
-
Agent operations — create, configure, and manage autonomous event-driven
|
|
3
|
+
Agent automation operations — create, configure, and manage autonomous event-driven automations.
|
|
4
4
|
|
|
5
5
|
## list
|
|
6
6
|
|
|
@@ -103,10 +103,12 @@ const result = await lt.agents.createSubscription({
|
|
|
103
103
|
|-----------|------|----------|-------------|
|
|
104
104
|
| `agentId` | `string` | Yes | Agent ID |
|
|
105
105
|
| `topic` | `string` | Yes | Event topic pattern (`*` = one token, `>` = rest) |
|
|
106
|
-
| `reaction_type` | `string` | Yes | `durable`, `pipeline`, or `
|
|
106
|
+
| `reaction_type` | `string` | Yes | `durable`, `pipeline`, `mcp_query`, or `capability` |
|
|
107
107
|
| `workflow_type` | `string` | For durable | Workflow name |
|
|
108
108
|
| `pipeline_id` | `string` | For pipeline | YAML workflow UUID |
|
|
109
109
|
| `mcp_prompt` | `string` | For mcp_query | Query prompt |
|
|
110
|
+
| `server_id` | `string` | For capability | MCP server UUID |
|
|
111
|
+
| `tool_name` | `string` | For capability | MCP tool name |
|
|
110
112
|
| `input_mapping` | `object` | No | Event-to-envelope field mapping |
|
|
111
113
|
| `filter` | `object` | No | Shallow match against `event.data` |
|
|
112
114
|
| `execute_as` | `string` | No | Identity override |
|
package/docs/api/sdk/settings.md
CHANGED
|
@@ -12,7 +12,7 @@ const result = await lt.settings.get();
|
|
|
12
12
|
|
|
13
13
|
**Parameters:** None
|
|
14
14
|
|
|
15
|
-
**Returns:** `LTApiResult<{ telemetry, escalation, events }>`
|
|
15
|
+
**Returns:** `LTApiResult<{ telemetry, escalation, events, ai }>`
|
|
16
16
|
|
|
17
17
|
| Field | Type | Description |
|
|
18
18
|
|-------|------|-------------|
|
|
@@ -21,5 +21,6 @@ const result = await lt.settings.get();
|
|
|
21
21
|
| `events.transport` | `'socketio' \| 'nats' \| 'none'` | Dashboard event transport (default: `socketio`; `nats` when `EVENT_TRANSPORT=nats`) |
|
|
22
22
|
| `events.natsWsUrl` | `string \| null` | NATS WebSocket URL (present when NATS adapter registered) |
|
|
23
23
|
| `events.natsToken` | `string \| null` | NATS auth token (present when NATS adapter registered) |
|
|
24
|
+
| `ai.enabled` | `boolean` | Whether an LLM API key is configured |
|
|
24
25
|
|
|
25
26
|
**Auth:** Not required
|
package/docs/dashboard.md
CHANGED
|
@@ -29,7 +29,7 @@ The sidebar organizes pages into five groups.
|
|
|
29
29
|
|------|-------|---------|
|
|
30
30
|
| **Recent Activity** | `/` | Live event stream and business process overview. |
|
|
31
31
|
| **Capabilities** | `/capabilities` | Browse MCP servers grouped by capability category. |
|
|
32
|
-
| **
|
|
32
|
+
| **Agent Automations** | `/agents` | Autonomous event-driven automations. Configure subscriptions, schedules, and knowledge domains. |
|
|
33
33
|
| **Topics** | `/topics` | Topic catalog — browse all known event topics with descriptions, schemas, and subscriber counts. |
|
|
34
34
|
|
|
35
35
|
### Storage
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotmeshio/long-tail",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
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.19.
|
|
73
|
+
"@hotmeshio/hotmesh": "^0.19.3",
|
|
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,13 +0,0 @@
|
|
|
1
|
-
import{j as e,a as g}from"./vendor-query-B2UbickB.js";import{a as te,d as se,b as ae}from"./agents-CsKILVSU.js";import{C as ne,u as ie,a as le,b as ce,c as re}from"./CronLabel-5HPAmciI.js";import{P as oe}from"./PageHeader-Bo0SpcCK.js";import{B as P,d as L,R as z,Y as $,n as B,a4 as U,a as G,aF as K,K as de}from"./vendor-icons-BNtvBbnj.js";import{e as xe}from"./knowledge-DhCbDgy4.js";import{c as pe}from"./index-DcpCR9c_.js";import{R as H}from"./RunAsSelector-DC4SLtTq.js";import{u as Q}from"./workflows-Bf4_w24H.js";import{u as he}from"./topics-CTtCboHe.js";import{u as me}from"./yaml-workflows-Cp1N0NMK.js";import{E as ue}from"./EventTopicPill-By-6sXDp.js";import{W as F}from"./WorkflowPill-pPuGH8v9.js";import{e as ve,c as je,f as ge}from"./vendor-react-CX88sFS5.js";import"./BotPicker-CM-_u73k.js";import"./bots-BzEs6Q9L.js";const J={name:"",description:"",goals:"",rules:"",user_id:"",knowledge_domain:"",subscriptions:[],schedules:[]},fe={topic:"",filter:"",reaction_type:"durable",workflow_type:"",pipeline_id:"",mcp_prompt:"",input_mapping:"{}",execute_as:"",enabled:!0},ye={cron:"0 * * * *",reaction_type:"durable",workflow_type:"",pipeline_id:"",envelope:"{}",execute_as:""};function be(t,s){var l,d,h;const o=(d=(l=t.behaviors)==null?void 0:l.schedules)!=null&&d.length?t.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||""})):(h=t.behaviors)!=null&&h.cron?[{cron:t.behaviors.cron,reaction_type:"durable",workflow_type:t.workflow_type??"",pipeline_id:"",envelope:"{}",execute_as:""}]:[];return{name:t.id,description:t.description??"",goals:t.goals??"",rules:t.rules??"",user_id:t.user_id??"",knowledge_domain:t.knowledge_domain??"",subscriptions:s.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:o}}function we(t){var o;const s={};return t.schedules.length>0&&(s.schedules=t.schedules.map(l=>({cron:l.cron,reaction_type:l.reaction_type||"durable",workflow_type:l.reaction_type==="pipeline"?void 0:l.workflow_type,pipeline_id:l.reaction_type==="pipeline"?l.pipeline_id:void 0,envelope:M(l.envelope)??{},execute_as:l.execute_as||void 0})),s.cron=t.schedules[0].cron),{id:t.name,description:t.description||void 0,goals:t.goals||void 0,rules:t.rules||void 0,user_id:t.user_id||void 0,knowledge_domain:t.knowledge_domain||void 0,behaviors:s,workflow_type:((o=t.schedules[0])==null?void 0:o.workflow_type)||void 0,pipeline_id:void 0}}function Ne(t){return t.subscriptions.map(s=>({id:s.id,topic:s.topic,filter:s.filter?M(s.filter):void 0,reaction_type:s.reaction_type,workflow_type:s.workflow_type||void 0,pipeline_id:s.pipeline_id||void 0,mcp_prompt:s.mcp_prompt||void 0,input_mapping:M(s.input_mapping)??{},execute_as:s.execute_as||void 0,enabled:s.enabled}))}function M(t){if(t.trim())try{return JSON.parse(t)}catch{return}}const k="section-header mt-[3em] first:mt-0",b="label",f="hint",v="input",V="input-json w-full";function ke({form:t,set:s}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Give your agent a name and describe what it does. The name appears everywhere — in events, logs, and the dashboard."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:identity"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Identity",children:e.jsx(P,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{children:[e.jsx("label",{className:b,children:"Name *"}),e.jsx("input",{type:"text",value:t.name,onChange:o=>s("name",o.target.value),placeholder:"health-monitor",className:v}),e.jsx("p",{className:f,children:"Lowercase, kebab-case. This appears everywhere."})]}),e.jsxs("div",{children:[e.jsx("label",{className:b,children:"Description"}),e.jsx("input",{type:"text",value:t.description,onChange:o=>s("description",o.target.value),placeholder:"Watches for workflow failures and captures diagnostics",className:v}),e.jsx("p",{className:f,children:"One sentence that explains what this agent does."})]})]})}function _e({form:t,set:s}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Goals define what drives the agent. Rules define what constrains it. Together they give automation judgment."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:motivation"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Motivation",children:e.jsx(P,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:b,children:"Goals"}),e.jsx("textarea",{value:t.goals,onChange:o=>s("goals",o.target.value),placeholder:"Detect failures early, capture diagnostics, alert before cascading",rows:4,className:`${v} resize-none`}),e.jsx("p",{className:f,children:"Primary motivation. What the agent is trying to achieve."})]}),e.jsxs("div",{children:[e.jsx("label",{className:b,children:"Rules"}),e.jsx("textarea",{value:t.rules,onChange:o=>s("rules",o.target.value),placeholder:"Never auto-restart failed workflows. Always escalate to humans.",rows:4,className:`${v} resize-none`}),e.jsx("p",{className:f,children:"Guardrails. What it must never do, even when goals suggest it should."})]})]})]})}function Ce({form:t,set:s}){const{data:o}=xe(),l=(o==null?void 0:o.domains)??[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Assign a knowledge domain — the agent's memory. It stores context here over time."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:knowledge"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Knowledge",children:e.jsx(P,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{children:[e.jsx("label",{className:b,children:"Knowledge Domain"}),e.jsx("input",{type:"text",value:t.knowledge_domain,onChange:d=>s("knowledge_domain",d.target.value),placeholder:"e.g., system-health, content-review, vendor-data",className:v,list:"domain-suggestions"}),e.jsx("datalist",{id:"domain-suggestions",children:l.map(d=>e.jsx("option",{value:d.domain},d.domain))}),e.jsx("p",{className:f,children:"Choose an existing domain to share memory, or type a new name to create one."})]}),l.length>0&&e.jsxs("div",{children:[e.jsx("label",{className:b,children:"Existing Domains"}),e.jsx("div",{className:"space-y-0.5 mt-2",children:l.map(d=>e.jsxs("button",{type:"button",onClick:()=>s("knowledge_domain",d.domain),className:`w-full flex items-center gap-3 px-3 py-2 rounded-md text-left transition-colors ${t.knowledge_domain===d.domain?"border-l-2 border-l-accent bg-accent/5":"hover:bg-surface-hover border-l-2 border-l-transparent"}`,children:[e.jsx(L,{className:"w-3.5 h-3.5 text-text-quaternary shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-sm text-text-primary flex-1",children:d.domain}),e.jsxs("span",{className:"text-[10px] text-text-quaternary",children:[d.count," entries"]}),e.jsx("span",{className:"text-[9px] text-text-quaternary",children:e.jsx(pe,{date:d.latest})})]},d.domain))})]})]})}const Se={task:"bg-blue-400/15 text-blue-400",workflow:"bg-accent/15 text-accent",escalation:"bg-amber-400/15 text-amber-400",activity:"bg-cyan-400/15 text-cyan-400",knowledge:"bg-violet-400/15 text-violet-400",agent:"bg-emerald-400/15 text-emerald-400",app:"bg-rose-400/15 text-rose-400",milestone:"bg-violet-400/15 text-violet-400"};function Ae({form:t,set:s}){const{data:o}=Q(),{data:l}=he({limit:200}),d=(l==null?void 0:l.topics)??[],h=(o??[]).filter(a=>a.invocable).map(a=>a.workflow_type),[i,j]=g.useState(0),x=(a,m,S)=>{const W=[...t.subscriptions];W[a]={...W[a],[m]:S},s("subscriptions",W)},w=()=>{s("subscriptions",[...t.subscriptions,{...fe}]),j(t.subscriptions.length)},_=a=>{s("subscriptions",t.subscriptions.filter((m,S)=>S!==a)),i>=t.subscriptions.length-1&&j(Math.max(0,t.subscriptions.length-2))},r=t.subscriptions,c=r[i],n=a=>!!a.topic&&(a.reaction_type==="durable"?!!a.workflow_type:a.reaction_type==="pipeline"?!!a.pipeline_id:!!a.mcp_prompt),p=c?d.find(a=>a.topic===c.topic):void 0;return r.length===0?e.jsxs("div",{className:"max-w-xl",children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-8",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the agent runs the configured workflow with the event payload."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:subscriptions"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Subscriptions",children:e.jsx(P,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(z,{className:"w-8 h-8 text-text-quaternary/40 mb-3",strokeWidth:1}),e.jsx("p",{className:"text-sm text-text-tertiary mb-2",children:"No event subscriptions yet"}),e.jsx("p",{className:"text-[11px] text-text-quaternary max-w-sm mb-6",children:"Each subscription listens for a topic pattern and runs a workflow when it matches."}),e.jsxs("button",{onClick:w,className:"flex items-center gap-2 text-xs text-accent hover:text-accent-hover transition-colors",children:[e.jsx($,{className:"w-3.5 h-3.5"})," Add first subscription"]})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 flex items-start justify-between mb-6",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. When a matching event is published, the agent runs the configured workflow with the event payload."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:subscriptions"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Subscriptions",children:e.jsx(P,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex gap-8",children:[e.jsxs("div",{className:"w-52 shrink-0 space-y-0.5",children:[r.map((a,m)=>e.jsxs("div",{className:`group/sub flex items-center rounded-md transition-colors ${i===m?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsxs("button",{onClick:()=>j(m),className:"flex-1 text-left px-3 py-2 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${n(a)?"bg-emerald-400":"bg-zinc-500"}`}),e.jsx("span",{className:"text-[11px] font-mono truncate",children:a.topic||"new subscription"})]}),e.jsxs("span",{className:"text-[9px] text-text-quaternary ml-3",children:["→ ",a.workflow_type||a.reaction_type]})]}),e.jsx("button",{onClick:S=>{S.stopPropagation(),confirm(`Remove subscription "${a.topic||"new"}"?
|
|
2
|
-
|
|
3
|
-
This takes effect when you save.`)&&_(m)},className:"opacity-0 group-hover/sub:opacity-100 px-2 text-text-quaternary hover:text-red-400 transition-all",title:"Remove",children:e.jsx(B,{className:"w-3 h-3"})})]},m)),e.jsxs("button",{onClick:w,className:"w-full flex items-center gap-1.5 px-3 py-2 text-[11px] text-accent hover:text-accent-hover transition-colors",children:[e.jsx($,{className:"w-3 h-3"})," Add"]})]}),c&&e.jsxs("div",{className:"flex-1 min-w-0 space-y-12",children:[e.jsxs("div",{children:[e.jsx("label",{className:k,children:"When this event fires"}),e.jsx(Pe,{value:c.topic,onChange:a=>x(i,"topic",a),topics:d}),(p==null?void 0:p.payload_schema)&&e.jsxs("div",{className:"mt-3 p-3 rounded-md bg-surface-sunken border border-surface-border",children:[e.jsx("p",{className:"text-[10px] text-text-quaternary mb-1 uppercase tracking-wider font-medium",children:"Payload Schema"}),e.jsx("pre",{className:"text-[11px] font-mono text-text-secondary whitespace-pre-wrap overflow-x-auto max-h-40",children:JSON.stringify(p.payload_schema.properties??p.payload_schema,null,2)}),p.description&&e.jsx("p",{className:"text-[10px] text-text-tertiary mt-2 italic",children:p.description})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("label",{className:k,children:"Run this workflow"}),e.jsx("div",{className:"flex gap-3",children:["durable","pipeline","mcp_query"].map(a=>e.jsxs("label",{className:"flex items-center gap-1 text-[11px] text-text-secondary cursor-pointer",children:[e.jsx("input",{type:"radio",name:"reaction",checked:c.reaction_type===a,onChange:()=>x(i,"reaction_type",a),className:"accent-accent w-3 h-3"}),a==="durable"?"Workflow":a==="pipeline"?"Pipeline":"MCP Query"]},a))}),c.reaction_type==="durable"&&e.jsxs("div",{children:[e.jsx("label",{className:b,children:"Workflow *"}),e.jsxs("select",{value:c.workflow_type,onChange:a=>x(i,"workflow_type",a.target.value),className:v,children:[e.jsx("option",{value:"",children:"Select..."}),h.map(a=>e.jsx("option",{value:a,children:a},a))]})]}),c.reaction_type==="pipeline"&&e.jsxs("div",{children:[e.jsx("label",{className:b,children:"Pipeline ID *"}),e.jsx("input",{type:"text",value:c.pipeline_id,onChange:a=>x(i,"pipeline_id",a.target.value),placeholder:"UUID",className:`${v} font-mono text-xs`})]}),c.reaction_type==="mcp_query"&&e.jsxs("div",{children:[e.jsx("label",{className:b,children:"Prompt *"}),e.jsx("textarea",{value:c.mcp_prompt,onChange:a=>x(i,"mcp_prompt",a.target.value),placeholder:"Analyze the error...",rows:2,className:`${v} resize-none`})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:k,children:"As identity"}),e.jsx(H,{selected:c.execute_as,onChange:a=>x(i,"execute_as",a)}),e.jsx("p",{className:f,children:"Identity used when invoking the workflow."})]}),e.jsxs("div",{children:[e.jsx("label",{className:k,children:"But only if"}),e.jsx("input",{type:"text",value:c.filter,onChange:a=>x(i,"filter",a.target.value),placeholder:"No filter (all matching events)",className:`${v} font-mono text-xs`}),e.jsxs("p",{className:f,children:["JSON filter against event.data, e.g. ",'{"status": 422}']})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:k,children:"With this data"}),e.jsx("textarea",{value:c.input_mapping,onChange:a=>x(i,"input_mapping",a.target.value),rows:10,className:V,placeholder:`{
|
|
4
|
-
"data": {
|
|
5
|
-
"orderId": "{event.data.orderId}",
|
|
6
|
-
"error": "{event.data.error}"
|
|
7
|
-
}
|
|
8
|
-
}`}),e.jsxs("p",{className:f,children:["Maps event fields to workflow input. ","{event.data.fieldName}"," resolves at runtime."]})]})]})]})]})}function Pe({value:t,onChange:s,topics:o}){const[l,d]=g.useState(!1),[h,i]=g.useState(""),j=g.useRef(null),x=g.useRef(null);g.useEffect(()=>{function r(c){x.current&&!x.current.contains(c.target)&&d(!1)}return l&&document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[l]);const w=l?h:t,_=o.filter(r=>r.topic.toLowerCase().includes((l?h:"").toLowerCase())||(r.description??"").toLowerCase().includes((l?h:"").toLowerCase()));return e.jsxs("div",{ref:x,className:"relative",children:[e.jsx("input",{ref:j,type:"text",value:w,onFocus:()=>{d(!0),i(t)},onChange:r=>{const c=r.target.value;i(c),s(c),l||d(!0)},placeholder:"workflow.failed or app.>",className:`${v} font-mono`}),l&&_.length>0&&e.jsx("div",{className:"absolute z-50 left-0 right-0 mt-1 max-h-64 overflow-y-auto rounded-md border border-surface-border bg-surface shadow-lg",children:_.map(r=>{const c=Se[r.category]??"bg-zinc-400/15 text-zinc-400";return e.jsxs("button",{type:"button",onClick:()=>{s(r.topic),i(r.topic),d(!1)},className:`w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors flex items-center gap-3 ${t===r.topic?"bg-accent/5":""}`,children:[e.jsx("span",{className:"text-[11px] font-mono text-text-primary shrink-0",children:r.topic}),e.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium shrink-0 ${c}`,children:r.category}),r.description&&e.jsx("span",{className:"text-[10px] text-text-quaternary truncate",children:r.description})]},r.topic)})})]})}const We=["*/5 * * * *","*/15 * * * *","0 * * * *","0 */4 * * *","0 7 * * *","0 9 * * 1-5"];function D(t){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"}[t]||t}function qe({form:t,set:s}){const{data:o}=Q(),l=(o??[]).filter(n=>n.invocable).map(n=>n.workflow_type),{data:d}=me({status:"active"}),h=((d==null?void 0:d.workflows)??[]).map(n=>({id:n.id,name:n.graph_topic||n.id})),[i,j]=g.useState(0),x=(n,p,a)=>{const m=[...t.schedules];m[n]={...m[n],[p]:a},s("schedules",m)},w=()=>{s("schedules",[...t.schedules,{...ye}]),j(t.schedules.length)},_=n=>{s("schedules",t.schedules.filter((p,a)=>a!==n)),i>=t.schedules.length-1&&j(Math.max(0,t.schedules.length-2))},r=t.schedules,c=r[i];return r.length===0?e.jsxs("div",{children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 mb-8 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Optional. Each schedule runs a workflow on a cron timer."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:schedule"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Schedule",children:e.jsx(P,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(U,{className:"w-8 h-8 text-text-quaternary/40 mb-3",strokeWidth:1}),e.jsx("p",{className:"text-sm text-text-tertiary mb-2",children:"No schedules"}),e.jsx("p",{className:"text-[11px] text-text-quaternary max-w-sm mb-6",children:"Add a schedule to run a workflow on a recurring cron timer."}),e.jsxs("button",{onClick:w,className:"flex items-center gap-2 text-xs text-accent hover:text-accent-hover transition-colors",children:[e.jsx($,{className:"w-3.5 h-3.5"})," Add schedule"]})]})]}):e.jsxs("div",{children:[e.jsxs("div",{className:"border-l-2 border-accent/30 pl-3 py-1 mb-6 flex items-start justify-between",children:[e.jsx("p",{className:"text-[12px] text-text-secondary italic leading-relaxed",children:"Each schedule runs a workflow on a timer. An agent can have multiple schedules targeting different workflows."}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:agents.md:schedule"},className:"text-text-quaternary hover:text-accent transition-colors shrink-0 ml-3",title:"Docs: Schedule",children:e.jsx(P,{className:"w-3 h-3",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex gap-8",children:[e.jsxs("div",{className:"w-48 shrink-0 space-y-0.5",children:[r.map((n,p)=>e.jsxs("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.jsxs("button",{onClick:()=>j(p),className:"flex-1 text-left px-3 py-2 min-w-0",children:[e.jsx("span",{className:"text-[11px] font-mono block",children:n.cron||"new schedule"}),e.jsxs("span",{className:"text-[9px] text-text-quaternary",children:[(n.reaction_type==="pipeline"?n.pipeline_id:n.workflow_type)||"no target"," · ",D(n.cron)]})]}),e.jsx("button",{onClick:a=>{a.stopPropagation(),confirm(`Remove schedule "${n.cron||"new"}"?
|
|
9
|
-
|
|
10
|
-
This takes effect when you save.`)&&_(p)},className:"opacity-0 group-hover/sched:opacity-100 px-2 text-text-quaternary hover:text-red-400 transition-all",title:"Remove",children:e.jsx(B,{className:"w-3 h-3"})})]},p)),e.jsxs("button",{onClick:w,className:"w-full flex items-center gap-1.5 px-3 py-2 text-[11px] text-accent hover:text-accent-hover transition-colors",children:[e.jsx($,{className:"w-3 h-3"})," Add"]})]}),c&&e.jsxs("div",{className:"flex-1 min-w-0 space-y-12",children:[e.jsxs("div",{children:[e.jsx("label",{className:k,children:"Run every"}),e.jsx("input",{type:"text",value:c.cron,onChange:n=>x(i,"cron",n.target.value),placeholder:"0 * * * *",className:`${v} font-mono`}),c.cron&&e.jsx("p",{className:"text-[11px] text-accent/80 mt-1",children:D(c.cron)}),e.jsx("div",{className:"flex gap-3 mt-2 overflow-x-auto",children:We.map(n=>e.jsx("button",{type:"button",onClick:()=>x(i,"cron",n),className:`text-[10px] font-mono whitespace-nowrap transition-colors ${c.cron===n?"text-accent font-medium":"text-accent/50 hover:text-accent"}`,children:D(n)},n))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("label",{className:k,children:"Run this workflow"}),e.jsx("div",{className:"flex gap-3",children:["durable","pipeline"].map(n=>e.jsxs("label",{className:"flex items-center gap-1 text-[11px] text-text-secondary cursor-pointer",children:[e.jsx("input",{type:"radio",name:`sched-reaction-${i}`,checked:c.reaction_type===n,onChange:()=>x(i,"reaction_type",n),className:"accent-accent w-3 h-3"}),n==="durable"?"Workflow":"Pipeline"]},n))}),c.reaction_type==="pipeline"?e.jsxs("div",{children:[e.jsx("label",{className:b,children:"Pipeline *"}),e.jsxs("select",{value:c.pipeline_id,onChange:n=>x(i,"pipeline_id",n.target.value),className:v,children:[e.jsx("option",{value:"",children:"Select..."}),h.map(n=>e.jsx("option",{value:n.id,children:n.name},n.id))]}),e.jsx("p",{className:f,children:"YAML pipeline invoked on each cron tick."})]}):e.jsxs("div",{children:[e.jsx("label",{className:b,children:"Workflow *"}),e.jsxs("select",{value:c.workflow_type,onChange:n=>x(i,"workflow_type",n.target.value),className:v,children:[e.jsx("option",{value:"",children:"Select..."}),l.map(n=>e.jsx("option",{value:n,children:n},n))]}),e.jsx("p",{className:f,children:"Invoked on each cron tick."})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:k,children:"As identity"}),e.jsx(H,{selected:c.execute_as,onChange:n=>x(i,"execute_as",n)}),e.jsx("p",{className:f,children:"Identity used when invoking."})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:k,children:"With this data"}),e.jsx("textarea",{value:c.envelope,onChange:n=>x(i,"envelope",n.target.value),rows:10,className:V,placeholder:`{
|
|
11
|
-
"data": { "source": "cron" }
|
|
12
|
-
}`}),e.jsx("p",{className:f,children:"Static payload passed to the workflow on each invocation."})]})]})]})]})}function R({icon:t,color:s,title:o,children:l}){return e.jsxs("div",{className:"mb-10",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 pb-1.5 border-b border-surface-border/40",children:[e.jsx(t,{className:`w-3.5 h-3.5 ${s}`,strokeWidth:1.5}),e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-widest text-accent/80",children:o})]}),e.jsx("div",{className:"pl-5.5",children:l})]})}function E({label:t,children:s}){return e.jsxs("div",{className:"flex gap-3 py-0.5",children:[e.jsx("span",{className:"text-[10px] text-text-quaternary w-20 shrink-0",children:t}),e.jsx("span",{className:"text-xs text-text-primary",children:s})]})}function Re({form:t}){return e.jsxs("div",{children:[e.jsxs(R,{icon:G,color:"text-accent",title:"Identity",children:[e.jsx(E,{label:"Name",children:t.name||"—"}),t.description&&e.jsx(E,{label:"Description",children:t.description})]}),(t.goals||t.rules)&&e.jsxs(R,{icon:K,color:"text-rose-400",title:"Motivation",children:[t.goals&&e.jsx(E,{label:"Goals",children:t.goals}),t.rules&&e.jsx(E,{label:"Rules",children:t.rules})]}),e.jsx(R,{icon:L,color:"text-emerald-400",title:"Knowledge",children:e.jsx(E,{label:"Domain",children:t.knowledge_domain||"None"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-10",children:[e.jsx(R,{icon:z,color:"text-cyan-400",title:`Subscriptions (${t.subscriptions.length})`,children:t.subscriptions.length===0?e.jsx("span",{className:"text-[11px] text-text-quaternary",children:"None configured"}):e.jsx("div",{className:"divide-y divide-surface-border/30",children:t.subscriptions.map((s,o)=>e.jsxs("div",{className:"flex items-center py-1.5",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(ue,{topic:s.topic||"unset"})}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{className:"text-text-quaternary text-[10px]",children:"→"}),s.workflow_type?e.jsx(F,{type:s.workflow_type}):e.jsx("span",{className:"text-[11px] text-text-quaternary",children:s.reaction_type})]})]},o))})}),e.jsx(R,{icon:U,color:"text-amber-400",title:`Schedules (${t.schedules.length})`,children:t.schedules.length===0?e.jsx("span",{className:"text-[11px] text-text-quaternary",children:"None configured"}):e.jsx("div",{className:"divide-y divide-surface-border/30",children:t.schedules.map((s,o)=>e.jsxs("div",{className:"flex items-center py-1.5",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(ne,{cron:s.cron})}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{className:"text-text-quaternary text-[10px]",children:"→"}),s.workflow_type?e.jsx(F,{type:s.workflow_type}):e.jsx("span",{className:"text-[11px] text-text-quaternary",children:"no workflow"})]})]},o))})})]}),e.jsx("div",{className:"border-l-2 border-emerald-400/30 pl-3 py-2 mt-6",children:e.jsx("p",{className:"text-[11px] text-text-tertiary leading-relaxed",children:"After saving, subscriptions and schedules activate immediately. You can pause the agent anytime."})})]})}const Ee=[{id:1,label:"Identity",icon:G},{id:2,label:"Motivation",icon:K},{id:3,label:"Knowledge",icon:L},{id:4,label:"Subscriptions",icon:z},{id:5,label:"Schedules",icon:U},{id:6,label:"Review",icon:de}];function Qe(){const{id:t}=ve(),s=!t,o=je(),{data:l,isLoading:d}=te(s?null:t),{data:h}=ie(s?null:t),i=se(),j=ae(),x=le(),w=ce(),_=re(),[r,c]=g.useState(J),[n,p]=g.useState(!1),[a,m]=g.useState(""),[S,W]=ge(),A=parseInt(S.get("step")||"1",10),X=g.useCallback(u=>{W(y=>{const C=new URLSearchParams(y);return C.set("step",String(u)),C},{replace:!0})},[W]);g.useEffect(()=>{if(!n){if(s){c(J),p(!0);return}l&&h&&(c(be(l,h.subscriptions??[])),p(!0))}},[l,h,s,n]);const q=(u,y)=>c(C=>({...C,[u]:y})),Z=async()=>{m("");try{const u=we(r);let y=t;s?y=(await i.mutateAsync(u)).id:await j.mutateAsync({id:t,...u});const C=Ne(r),ee=(h==null?void 0:h.subscriptions)??[],I=new Set(ee.map(N=>N.id));for(const N of C)if(N.id&&I.has(N.id)){const{id:T,...O}=N;await w.mutateAsync({agentId:y,subId:T,...O}),I.delete(T)}else{const{id:T,...O}=N;await x.mutateAsync({agentId:y,...O})}for(const N of I)await _.mutateAsync({agentId:y,subId:N});o(`/agents/${y}`)}catch(u){m(u.message)}};if(!s&&d)return e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-surface-sunken rounded w-48"}),e.jsx("div",{className:"h-60 bg-surface-sunken rounded"})]});const Y=i.isPending||j.isPending;return e.jsxs("div",{children:[e.jsx(oe,{title:s?"New Agent":`Agent: ${(l==null?void 0:l.id)??""}`,docsHash:"#docs:agents.md"}),e.jsxs("div",{className:"flex gap-10",children:[e.jsxs("nav",{className:"w-44 shrink-0 sticky top-0 self-start pt-2",children:[e.jsx("div",{className:"space-y-0.5",children:Ee.map(u=>{const y=u.icon,C=A===u.id;return e.jsxs("button",{onClick:()=>X(u.id),className:`w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-left transition-colors ${C?"bg-accent/10 text-accent":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsx(y,{className:"w-3.5 h-3.5 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-xs font-medium",children:u.label})]},u.id)})}),e.jsxs("div",{className:"mt-8 pt-4 border-t border-surface-border space-y-2",children:[e.jsx("button",{onClick:Z,disabled:!r.name.trim()||Y,className:"w-full btn-primary text-xs disabled:opacity-50",children:Y?"Saving...":s?"Create Agent":"Save"}),e.jsx("button",{onClick:()=>o(s?"/agents":`/agents/${t}`),className:"w-full btn-ghost text-xs",children:"Cancel"})]}),a&&e.jsx("p",{className:"text-xs text-status-error mt-3",children:a})]}),e.jsxs("div",{className:"flex-1 min-w-0 pt-2",children:[A===1&&e.jsx(ke,{form:r,set:q}),A===2&&e.jsx(_e,{form:r,set:q}),A===3&&e.jsx(Ce,{form:r,set:q}),A===4&&e.jsx(Ae,{form:r,set:q}),A===5&&e.jsx(qe,{form:r,set:q}),A===6&&e.jsx(Re,{form:r})]})]})]})}export{Qe as AgentConfigPage};
|
|
13
|
-
//# sourceMappingURL=AgentConfigPage-D52KyJY-.js.map
|