@hotmeshio/long-tail 0.1.6 → 0.1.8
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/README.md +47 -5
- package/build/api/auth.d.ts +16 -0
- package/build/api/auth.js +53 -0
- package/build/api/bot-accounts.d.ts +137 -0
- package/build/api/bot-accounts.js +302 -0
- package/build/api/controlplane.d.ts +68 -0
- package/build/api/controlplane.js +158 -0
- package/build/api/dba.d.ts +42 -0
- package/build/api/dba.js +95 -0
- package/build/api/escalations.d.ts +271 -0
- package/build/api/escalations.js +892 -0
- package/build/api/exports.d.ts +90 -0
- package/build/api/exports.js +204 -0
- package/build/api/index.d.ts +18 -0
- package/build/api/index.js +54 -0
- package/build/api/insight.d.ts +86 -0
- package/build/api/insight.js +147 -0
- package/build/api/maintenance.d.ts +22 -0
- package/build/api/maintenance.js +43 -0
- package/build/api/mcp-runs.d.ts +43 -0
- package/build/api/mcp-runs.js +89 -0
- package/build/api/mcp.d.ts +160 -0
- package/build/api/mcp.js +320 -0
- package/build/api/namespaces.d.ts +20 -0
- package/build/{routes/escalations/helpers.js → api/namespaces.js} +35 -10
- package/build/api/roles.d.ts +88 -0
- package/build/api/roles.js +217 -0
- package/build/api/settings.d.ts +10 -0
- package/build/api/settings.js +43 -0
- package/build/api/tasks.d.ts +70 -0
- package/build/api/tasks.js +139 -0
- package/build/api/users.d.ts +115 -0
- package/build/api/users.js +228 -0
- package/build/api/workflow-sets.d.ts +77 -0
- package/build/api/workflow-sets.js +170 -0
- package/build/api/workflows.d.ts +158 -0
- package/build/api/workflows.js +407 -0
- package/build/api/yaml-workflows.d.ts +282 -0
- package/build/api/yaml-workflows.js +751 -0
- package/build/examples/types/envelopes.d.ts +27 -0
- package/build/examples/types/index.d.ts +1 -1
- package/build/examples/workers.js +8 -0
- package/build/examples/workflows/assembly-line/activities.d.ts +28 -0
- package/build/examples/workflows/assembly-line/activities.js +53 -0
- package/build/examples/workflows/assembly-line/index.d.ts +17 -0
- package/build/examples/workflows/assembly-line/index.js +60 -0
- package/build/examples/workflows/assembly-line/iterator.d.ts +12 -0
- package/build/examples/workflows/assembly-line/iterator.js +54 -0
- package/build/examples/workflows/assembly-line/reverter.d.ts +18 -0
- package/build/examples/workflows/assembly-line/reverter.js +89 -0
- package/build/examples/workflows/assembly-line/types.d.ts +25 -0
- package/build/examples/workflows/assembly-line/types.js +8 -0
- package/build/examples/workflows/assembly-line/worker.d.ts +13 -0
- package/build/examples/workflows/assembly-line/worker.js +81 -0
- package/build/index.d.ts +4 -0
- package/build/index.js +6 -1
- package/build/lib/db/schemas/004_workflow_sets.sql +29 -0
- package/build/lib/db/schemas/005_unique_graph_topic.sql +7 -0
- package/build/lib/db/schemas/011_system_workflow_configs.sql +7 -0
- package/build/lib/events/callback.d.ts +41 -0
- package/build/lib/events/callback.js +98 -0
- package/build/modules/config.js +1 -1
- package/build/routes/auth.js +37 -36
- package/build/routes/bot-accounts.js +34 -164
- package/build/routes/controlplane.js +20 -60
- package/build/routes/dba.js +18 -28
- package/build/routes/escalations/bulk.js +17 -192
- package/build/routes/escalations/list.js +51 -75
- package/build/routes/escalations/resolve.js +3 -193
- package/build/routes/escalations/single.js +13 -122
- package/build/routes/exports.js +44 -95
- package/build/routes/index.js +2 -0
- package/build/routes/insight.js +46 -88
- package/build/routes/maintenance.js +41 -17
- package/build/routes/mcp-runs.js +52 -60
- package/build/routes/mcp.js +49 -177
- package/build/routes/namespaces.js +9 -20
- package/build/routes/roles.js +23 -97
- package/build/routes/settings.js +37 -25
- package/build/routes/tasks.js +28 -64
- package/build/routes/users.js +24 -113
- package/build/routes/workflow-sets.d.ts +2 -0
- package/build/routes/workflow-sets.js +98 -0
- package/build/routes/workflows/config.js +23 -57
- package/build/routes/workflows/discovery.js +11 -85
- package/build/routes/workflows/invocation.js +28 -90
- package/build/routes/yaml-workflows/cron.js +12 -61
- package/build/routes/yaml-workflows/crud.js +30 -223
- package/build/routes/yaml-workflows/deployment.js +15 -115
- package/build/routes/yaml-workflows/versions.js +20 -58
- package/build/sdk/index.d.ts +338 -0
- package/build/sdk/index.js +299 -0
- package/build/services/controlplane/index.d.ts +1 -2
- package/build/services/controlplane/index.js +3 -3
- package/build/services/controlplane/sql.d.ts +2 -2
- package/build/services/controlplane/sql.js +4 -5
- package/build/services/controlplane/types.d.ts +1 -0
- package/build/services/export/index.js +6 -1
- package/build/services/hotmesh-utils.js +2 -4
- package/build/services/insight/index.d.ts +7 -0
- package/build/services/insight/index.js +30 -0
- package/build/services/mcp/client/tools.js +13 -1
- package/build/services/mcp-runs/sql.js +1 -1
- package/build/services/workflow-invocation.d.ts +15 -2
- package/build/services/workflow-invocation.js +11 -6
- package/build/services/workflow-sets/db.d.ts +16 -0
- package/build/services/workflow-sets/db.js +78 -0
- package/build/services/workflow-sets/index.d.ts +1 -0
- package/build/services/workflow-sets/index.js +11 -0
- package/build/services/workflow-sets/sql.d.ts +6 -0
- package/build/services/workflow-sets/sql.js +24 -0
- package/build/services/yaml-workflow/db-utils.d.ts +1 -0
- package/build/services/yaml-workflow/db-utils.js +4 -0
- package/build/services/yaml-workflow/db.d.ts +5 -0
- package/build/services/yaml-workflow/db.js +17 -0
- package/build/services/yaml-workflow/pipeline/build/wiring.js +14 -1
- package/build/services/yaml-workflow/pipeline/prompts.d.ts +1 -1
- package/build/services/yaml-workflow/pipeline/prompts.js +1 -1
- package/build/services/yaml-workflow/sql.d.ts +2 -1
- package/build/services/yaml-workflow/sql.js +8 -3
- package/build/services/yaml-workflow/types.d.ts +3 -0
- package/build/services/yaml-workflow/workers/callbacks.js +7 -1
- package/build/services/yaml-workflow/workers/register.js +7 -0
- package/build/start/adapters.js +4 -0
- package/build/system/index.js +6 -0
- package/build/system/mcp-servers/knowledge.js +1 -1
- package/build/system/seed/server-definitions.js +2 -1
- package/build/system/workflows/mcp-workflow-builder/activities/index.d.ts +1 -1
- package/build/system/workflows/mcp-workflow-builder/activities/index.js +2 -1
- package/build/system/workflows/mcp-workflow-builder/activities/tool-loader.d.ts +6 -0
- package/build/system/workflows/mcp-workflow-builder/activities/tool-loader.js +26 -0
- package/build/system/workflows/mcp-workflow-builder/index.js +26 -2
- package/build/system/workflows/mcp-workflow-builder/prompts.js +104 -35
- package/build/system/workflows/mcp-workflow-planner/activities/analyze.d.ts +11 -0
- package/build/system/workflows/mcp-workflow-planner/activities/analyze.js +36 -0
- package/build/system/workflows/mcp-workflow-planner/activities/index.d.ts +3 -0
- package/build/system/workflows/mcp-workflow-planner/activities/index.js +12 -0
- package/build/system/workflows/mcp-workflow-planner/activities/persist.d.ts +19 -0
- package/build/system/workflows/mcp-workflow-planner/activities/persist.js +55 -0
- package/build/system/workflows/mcp-workflow-planner/activities/plan.d.ts +10 -0
- package/build/system/workflows/mcp-workflow-planner/activities/plan.js +43 -0
- package/build/system/workflows/mcp-workflow-planner/index.d.ts +7 -0
- package/build/system/workflows/mcp-workflow-planner/index.js +152 -0
- package/build/system/workflows/mcp-workflow-planner/prompts.d.ts +7 -0
- package/build/system/workflows/mcp-workflow-planner/prompts.js +77 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/sdk.d.ts +27 -0
- package/build/types/sdk.js +2 -0
- package/build/types/workflow-set.d.ts +44 -0
- package/build/types/workflow-set.js +5 -0
- package/dashboard/dist/assets/{AdminDashboard-BXkKGkb5.js → AdminDashboard-B15jSEV2.js} +2 -2
- package/dashboard/dist/assets/{AdminDashboard-BXkKGkb5.js.map → AdminDashboard-B15jSEV2.js.map} +1 -1
- package/dashboard/dist/assets/{AvailableEscalationsPage-DcH592mc.js → AvailableEscalationsPage-0V2yvKak.js} +2 -2
- package/dashboard/dist/assets/{AvailableEscalationsPage-DcH592mc.js.map → AvailableEscalationsPage-0V2yvKak.js.map} +1 -1
- package/dashboard/dist/assets/BotPicker-B4UxHcek.js +2 -0
- package/dashboard/dist/assets/{BotPicker-A6LtzyuO.js.map → BotPicker-B4UxHcek.js.map} +1 -1
- package/dashboard/dist/assets/{CollapsibleSection-C7nL2_mv.js → CollapsibleSection-BBexNWVd.js} +2 -2
- package/dashboard/dist/assets/{CollapsibleSection-C7nL2_mv.js.map → CollapsibleSection-BBexNWVd.js.map} +1 -1
- package/dashboard/dist/assets/{ConfirmDeleteModal-CWFwJrSl.js → ConfirmDeleteModal-DlPDJSq_.js} +2 -2
- package/dashboard/dist/assets/{ConfirmDeleteModal-CWFwJrSl.js.map → ConfirmDeleteModal-DlPDJSq_.js.map} +1 -1
- package/dashboard/dist/assets/{CopyableId-DbZ5c3jh.js → CopyableId-BxHW1ahb.js} +2 -2
- package/dashboard/dist/assets/{CopyableId-DbZ5c3jh.js.map → CopyableId-BxHW1ahb.js.map} +1 -1
- package/dashboard/dist/assets/{CredentialsPage-ClWkmLPu.js → CredentialsPage-Bp_Y1Szk.js} +2 -2
- package/dashboard/dist/assets/{CredentialsPage-ClWkmLPu.js.map → CredentialsPage-Bp_Y1Szk.js.map} +1 -1
- package/dashboard/dist/assets/{CustomDurationPicker-CtH2hReF.js → CustomDurationPicker-ByBFqXSO.js} +2 -2
- package/dashboard/dist/assets/{CustomDurationPicker-CtH2hReF.js.map → CustomDurationPicker-ByBFqXSO.js.map} +1 -1
- package/dashboard/dist/assets/{DataTable-CM5ZcpPi.js → DataTable-DyIXg-tQ.js} +2 -2
- package/dashboard/dist/assets/{DataTable-CM5ZcpPi.js.map → DataTable-DyIXg-tQ.js.map} +1 -1
- package/dashboard/dist/assets/{ElapsedCell-CwqavyeC.js → ElapsedCell-BgnA0qpS.js} +2 -2
- package/dashboard/dist/assets/{ElapsedCell-CwqavyeC.js.map → ElapsedCell-BgnA0qpS.js.map} +1 -1
- package/dashboard/dist/assets/{EmptyState-BBn78pmm.js → EmptyState-DlMImvgm.js} +2 -2
- package/dashboard/dist/assets/{EmptyState-BBn78pmm.js.map → EmptyState-DlMImvgm.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationsOverview-BcJ2E3X7.js → EscalationsOverview-D90kdfw1.js} +2 -2
- package/dashboard/dist/assets/{EscalationsOverview-BcJ2E3X7.js.map → EscalationsOverview-D90kdfw1.js.map} +1 -1
- package/dashboard/dist/assets/{EventTable-C1en_KZ0.js → EventTable-BNxtlgNz.js} +2 -2
- package/dashboard/dist/assets/{EventTable-C1en_KZ0.js.map → EventTable-BNxtlgNz.js.map} +1 -1
- package/dashboard/dist/assets/{FilterBar-CZTlrLQT.js → FilterBar-BTiaAhCx.js} +2 -2
- package/dashboard/dist/assets/{FilterBar-CZTlrLQT.js.map → FilterBar-BTiaAhCx.js.map} +1 -1
- package/dashboard/dist/assets/{ListToolbar-Cdbsapig.js → ListToolbar-BUcagSCn.js} +2 -2
- package/dashboard/dist/assets/{ListToolbar-Cdbsapig.js.map → ListToolbar-BUcagSCn.js.map} +1 -1
- package/dashboard/dist/assets/{McpOverview-CSpEJxKa.js → McpOverview-B-tCvz8C.js} +2 -2
- package/dashboard/dist/assets/{McpOverview-CSpEJxKa.js.map → McpOverview-B-tCvz8C.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryDetailPage-DPlF1wYb.js +5 -0
- package/dashboard/dist/assets/McpQueryDetailPage-DPlF1wYb.js.map +1 -0
- package/dashboard/dist/assets/McpQueryPage-Bz7AdcfR.js +2 -0
- package/dashboard/dist/assets/McpQueryPage-Bz7AdcfR.js.map +1 -0
- package/dashboard/dist/assets/{McpRunDetailPage-9xdxgG4d.js → McpRunDetailPage-Di_qpL2V.js} +2 -2
- package/dashboard/dist/assets/{McpRunDetailPage-9xdxgG4d.js.map → McpRunDetailPage-Di_qpL2V.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunsPage-wWLqHsd4.js → McpRunsPage-BBgybBEa.js} +2 -2
- package/dashboard/dist/assets/{McpRunsPage-wWLqHsd4.js.map → McpRunsPage-BBgybBEa.js.map} +1 -1
- package/dashboard/dist/assets/{Modal-kB_P7ZOr.js → Modal-CaJ0gTEa.js} +2 -2
- package/dashboard/dist/assets/{Modal-kB_P7ZOr.js.map → Modal-CaJ0gTEa.js.map} +1 -1
- package/dashboard/dist/assets/OperatorDashboard-DDfMmrmR.js +2 -0
- package/dashboard/dist/assets/{OperatorDashboard-jc0vrgDI.js.map → OperatorDashboard-DDfMmrmR.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeader-NkOeBR05.js → PageHeader-C5D-G5rp.js} +2 -2
- package/dashboard/dist/assets/{PageHeader-NkOeBR05.js.map → PageHeader-C5D-G5rp.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeaderWithStats-ywNhrmFK.js → PageHeaderWithStats-DCa2eZh2.js} +2 -2
- package/dashboard/dist/assets/{PageHeaderWithStats-ywNhrmFK.js.map → PageHeaderWithStats-DCa2eZh2.js.map} +1 -1
- package/dashboard/dist/assets/{PriorityBadge-B2MQbSxy.js → PriorityBadge-DTHq6OUZ.js} +2 -2
- package/dashboard/dist/assets/{PriorityBadge-B2MQbSxy.js.map → PriorityBadge-DTHq6OUZ.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessDetailPage-B7z7IdqE.js → ProcessDetailPage-fC4dhrd0.js} +2 -2
- package/dashboard/dist/assets/{ProcessDetailPage-B7z7IdqE.js.map → ProcessDetailPage-fC4dhrd0.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessesListPage-C-uHadO6.js → ProcessesListPage-CL2MY8uD.js} +2 -2
- package/dashboard/dist/assets/{ProcessesListPage-C-uHadO6.js.map → ProcessesListPage-CL2MY8uD.js.map} +1 -1
- package/dashboard/dist/assets/{RolePill-C1dgC-fK.js → RolePill-kgKPANly.js} +2 -2
- package/dashboard/dist/assets/{RolePill-C1dgC-fK.js.map → RolePill-kgKPANly.js.map} +1 -1
- package/dashboard/dist/assets/{RolesPage-BSxrD1vm.js → RolesPage-Be2lXTHD.js} +2 -2
- package/dashboard/dist/assets/{RolesPage-BSxrD1vm.js.map → RolesPage-Be2lXTHD.js.map} +1 -1
- package/dashboard/dist/assets/{RowActions-lYaHGI-v.js → RowActions-DIzJCwqR.js} +2 -2
- package/dashboard/dist/assets/{RowActions-lYaHGI-v.js.map → RowActions-DIzJCwqR.js.map} +1 -1
- package/dashboard/dist/assets/{StatCard-v2TiITVr.js → StatCard-CRi2Jy6t.js} +2 -2
- package/dashboard/dist/assets/{StatCard-v2TiITVr.js.map → StatCard-CRi2Jy6t.js.map} +1 -1
- package/dashboard/dist/assets/{StatusBadge-DWlxevgG.js → StatusBadge-BETI_8Mr.js} +2 -2
- package/dashboard/dist/assets/{StatusBadge-DWlxevgG.js.map → StatusBadge-BETI_8Mr.js.map} +1 -1
- package/dashboard/dist/assets/{StepIndicator-CRM4ft28.js → StepIndicator-DjpMqCjz.js} +2 -2
- package/dashboard/dist/assets/{StepIndicator-CRM4ft28.js.map → StepIndicator-DjpMqCjz.js.map} +1 -1
- package/dashboard/dist/assets/{StickyPagination-CF0EToEU.js → StickyPagination-BZbExQ9t.js} +2 -2
- package/dashboard/dist/assets/{StickyPagination-CF0EToEU.js.map → StickyPagination-BZbExQ9t.js.map} +1 -1
- package/dashboard/dist/assets/{SwimlaneTimeline-CNlj7fgg.js → SwimlaneTimeline-DZthQyhR.js} +2 -2
- package/dashboard/dist/assets/{SwimlaneTimeline-CNlj7fgg.js.map → SwimlaneTimeline-DZthQyhR.js.map} +1 -1
- package/dashboard/dist/assets/{TagInput-CH8qMGhC.js → TagInput-CukbOfYn.js} +2 -2
- package/dashboard/dist/assets/{TagInput-CH8qMGhC.js.map → TagInput-CukbOfYn.js.map} +1 -1
- package/dashboard/dist/assets/{TaskDetailPage-CdWo-6mu.js → TaskDetailPage-CIZHIKo9.js} +2 -2
- package/dashboard/dist/assets/{TaskDetailPage-CdWo-6mu.js.map → TaskDetailPage-CIZHIKo9.js.map} +1 -1
- package/dashboard/dist/assets/{TaskQueuePill-BPj4ogVG.js → TaskQueuePill-Q7DGoysj.js} +2 -2
- package/dashboard/dist/assets/{TaskQueuePill-BPj4ogVG.js.map → TaskQueuePill-Q7DGoysj.js.map} +1 -1
- package/dashboard/dist/assets/{TasksListPage-CtRkMpKU.js → TasksListPage-CsC9wjb0.js} +2 -2
- package/dashboard/dist/assets/{TasksListPage-CtRkMpKU.js.map → TasksListPage-CsC9wjb0.js.map} +1 -1
- package/dashboard/dist/assets/{TimeAgo-Di1a3X5P.js → TimeAgo-BcOOnJeH.js} +2 -2
- package/dashboard/dist/assets/{TimeAgo-Di1a3X5P.js.map → TimeAgo-BcOOnJeH.js.map} +1 -1
- package/dashboard/dist/assets/{TimestampCell-CqrXql-S.js → TimestampCell-CEMapYDQ.js} +2 -2
- package/dashboard/dist/assets/{TimestampCell-CqrXql-S.js.map → TimestampCell-CEMapYDQ.js.map} +1 -1
- package/dashboard/dist/assets/{UserName-BUFYCnRa.js → UserName-BHoN7iRL.js} +2 -2
- package/dashboard/dist/assets/{UserName-BUFYCnRa.js.map → UserName-BHoN7iRL.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowExecutionPage-25iusMml.js → WorkflowExecutionPage-DawKl1LT.js} +2 -2
- package/dashboard/dist/assets/{WorkflowExecutionPage-25iusMml.js.map → WorkflowExecutionPage-DawKl1LT.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowPill-CP84Vqeg.js +2 -0
- package/dashboard/dist/assets/{WorkflowPill-DPKOcbf4.js.map → WorkflowPill-CP84Vqeg.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsDashboard-BgxslssH.js → WorkflowsDashboard-QrvVFxtQ.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsDashboard-BgxslssH.js.map → WorkflowsDashboard-QrvVFxtQ.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsOverview-Doe5L-Re.js → WorkflowsOverview-DuhAi_OY.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsOverview-Doe5L-Re.js.map → WorkflowsOverview-DuhAi_OY.js.map} +1 -1
- package/dashboard/dist/assets/YamlWorkflowsPage-Dc9xw82a.js +2 -0
- package/dashboard/dist/assets/YamlWorkflowsPage-Dc9xw82a.js.map +1 -0
- package/dashboard/dist/assets/{bots-Bi2_O1Ts.js → bots-Dny-rmmI.js} +2 -2
- package/dashboard/dist/assets/{bots-Bi2_O1Ts.js.map → bots-Dny-rmmI.js.map} +1 -1
- package/dashboard/dist/assets/{escalation-Ck1KlLkT.js → escalation-CV0sKNH5.js} +2 -2
- package/dashboard/dist/assets/{escalation-Ck1KlLkT.js.map → escalation-CV0sKNH5.js.map} +1 -1
- package/dashboard/dist/assets/{escalation-columns-ohDsj2eJ.js → escalation-columns-30CKyoWI.js} +2 -2
- package/dashboard/dist/assets/{escalation-columns-ohDsj2eJ.js.map → escalation-columns-30CKyoWI.js.map} +1 -1
- package/dashboard/dist/assets/{helpers-BoD2SgUY.js → helpers-C1-30CzH.js} +2 -2
- package/dashboard/dist/assets/{helpers-BoD2SgUY.js.map → helpers-C1-30CzH.js.map} +1 -1
- package/dashboard/dist/assets/helpers-C1jaRD-d.js +2 -0
- package/dashboard/dist/assets/helpers-C1jaRD-d.js.map +1 -0
- package/dashboard/dist/assets/{index-FuohTtaM.js → index-BUVQ6wmy.js} +3 -3
- package/dashboard/dist/assets/{index-FuohTtaM.js.map → index-BUVQ6wmy.js.map} +1 -1
- package/dashboard/dist/assets/index-CxVB7F4X.js +2 -0
- package/dashboard/dist/assets/{index-Dk2Q51o0.js.map → index-CxVB7F4X.js.map} +1 -1
- package/dashboard/dist/assets/{index-BEtLIsML.js → index-D-oCWCAS.js} +2 -2
- package/dashboard/dist/assets/{index-BEtLIsML.js.map → index-D-oCWCAS.js.map} +1 -1
- package/dashboard/dist/assets/index-D0wPM3Ck.js +2 -0
- package/dashboard/dist/assets/{index-BpT-6WgJ.js.map → index-D0wPM3Ck.js.map} +1 -1
- package/dashboard/dist/assets/{index-Bn2xHDr8.js → index-DHgnkykj.js} +3 -3
- package/dashboard/dist/assets/{index-Bn2xHDr8.js.map → index-DHgnkykj.js.map} +1 -1
- package/dashboard/dist/assets/{index-D3NyVADW.js → index-D_aJBEAG.js} +2 -2
- package/dashboard/dist/assets/index-D_aJBEAG.js.map +1 -0
- package/dashboard/dist/assets/{index-PyCTS05D.css → index-DcIKW-cZ.css} +1 -1
- package/dashboard/dist/assets/{index-CZrJ09p-.js → index-Dd_U4mLm.js} +2 -2
- package/dashboard/dist/assets/{index-CZrJ09p-.js.map → index-Dd_U4mLm.js.map} +1 -1
- package/dashboard/dist/assets/{index-DYyLF-Qb.js → index-DnmZbNxk.js} +8 -8
- package/dashboard/dist/assets/index-DnmZbNxk.js.map +1 -0
- package/dashboard/dist/assets/index-_RBvi7s6.js +2 -0
- package/dashboard/dist/assets/{index-D7zYZOnH.js.map → index-_RBvi7s6.js.map} +1 -1
- package/dashboard/dist/assets/index-n7td8zgX.js +17 -0
- package/dashboard/dist/assets/{index-DOkHXmyf.js.map → index-n7td8zgX.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-CJtYjA7A.js → mcp-CRFr4L9W.js} +2 -2
- package/dashboard/dist/assets/{mcp-CJtYjA7A.js.map → mcp-CRFr4L9W.js.map} +1 -1
- package/dashboard/dist/assets/mcp-query-DHY2mZBQ.js +2 -0
- package/dashboard/dist/assets/mcp-query-DHY2mZBQ.js.map +1 -0
- package/dashboard/dist/assets/{mcp-runs-DUWm9Z4V.js → mcp-runs-BqPHqwAO.js} +2 -2
- package/dashboard/dist/assets/{mcp-runs-DUWm9Z4V.js.map → mcp-runs-BqPHqwAO.js.map} +1 -1
- package/dashboard/dist/assets/{namespaces-BM5P2qmL.js → namespaces-TG1aIpo_.js} +2 -2
- package/dashboard/dist/assets/{namespaces-BM5P2qmL.js.map → namespaces-TG1aIpo_.js.map} +1 -1
- package/dashboard/dist/assets/{roles-lv0shpjJ.js → roles-DhhLTvXg.js} +2 -2
- package/dashboard/dist/assets/{roles-lv0shpjJ.js.map → roles-DhhLTvXg.js.map} +1 -1
- package/dashboard/dist/assets/{settings-Wlq92mRo.js → settings-D9MBzEeB.js} +2 -2
- package/dashboard/dist/assets/{settings-Wlq92mRo.js.map → settings-D9MBzEeB.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-BFGm4PuE.js → tasks-BxmcZoev.js} +2 -2
- package/dashboard/dist/assets/{tasks-BFGm4PuE.js.map → tasks-BxmcZoev.js.map} +1 -1
- package/dashboard/dist/assets/{useEventHooks-DIE6ue4x.js → useEventHooks-BylecvvI.js} +2 -2
- package/dashboard/dist/assets/{useEventHooks-DIE6ue4x.js.map → useEventHooks-BylecvvI.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-DCwSO73t.js → useYamlActivityEvents-ocmj11e_.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-DCwSO73t.js.map → useYamlActivityEvents-ocmj11e_.js.map} +1 -1
- package/dashboard/dist/assets/{users-tA5-K0wA.js → users-Ce5r-JAv.js} +2 -2
- package/dashboard/dist/assets/{users-tA5-K0wA.js.map → users-Ce5r-JAv.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-BiIug1SK.js → vendor-icons-D1DdudfH.js} +93 -73
- package/dashboard/dist/assets/vendor-icons-D1DdudfH.js.map +1 -0
- package/dashboard/dist/assets/{workflows-CfLc15Wr.js → workflows-ykIeVbRJ.js} +2 -2
- package/dashboard/dist/assets/{workflows-CfLc15Wr.js.map → workflows-ykIeVbRJ.js.map} +1 -1
- package/dashboard/dist/assets/yaml-workflows-WypmKYht.js +2 -0
- package/dashboard/dist/assets/yaml-workflows-WypmKYht.js.map +1 -0
- package/dashboard/dist/index.html +3 -3
- package/docs/api/sdk/auth.md +27 -0
- package/docs/api/sdk/bot-accounts.md +243 -0
- package/docs/api/sdk/controlplane.md +103 -0
- package/docs/api/sdk/dba.md +52 -0
- package/docs/api/sdk/escalations.md +374 -0
- package/docs/api/sdk/events.md +68 -0
- package/docs/api/sdk/exports.md +124 -0
- package/docs/api/sdk/insight.md +112 -0
- package/docs/api/sdk/maintenance.md +54 -0
- package/docs/api/sdk/mcp-runs.md +71 -0
- package/docs/api/sdk/mcp.md +250 -0
- package/docs/api/sdk/namespaces.md +43 -0
- package/docs/api/sdk/roles.md +183 -0
- package/docs/api/sdk/settings.md +24 -0
- package/docs/api/sdk/tasks.md +120 -0
- package/docs/api/sdk/users.md +196 -0
- package/docs/api/sdk/workflow-sets.md +135 -0
- package/docs/api/sdk/workflows.md +271 -0
- package/docs/api/sdk/yaml-workflows.md +408 -0
- package/docs/events.md +28 -0
- package/docs/sdk.md +177 -0
- package/docs/story.md +157 -0
- package/package.json +3 -2
- package/build/routes/escalations/helpers.d.ts +0 -5
- package/build/routes/resolve.d.ts +0 -9
- package/build/routes/resolve.js +0 -19
- package/build/routes/yaml-workflows/helpers.d.ts +0 -2
- package/build/routes/yaml-workflows/helpers.js +0 -8
- package/dashboard/dist/assets/BotPicker-A6LtzyuO.js +0 -2
- package/dashboard/dist/assets/McpQueryDetailPage-DhqEI180.js +0 -5
- package/dashboard/dist/assets/McpQueryDetailPage-DhqEI180.js.map +0 -1
- package/dashboard/dist/assets/McpQueryPage-CIiVMlqo.js +0 -2
- package/dashboard/dist/assets/McpQueryPage-CIiVMlqo.js.map +0 -1
- package/dashboard/dist/assets/OperatorDashboard-jc0vrgDI.js +0 -2
- package/dashboard/dist/assets/RunAsSelector-CJDnyp93.js +0 -2
- package/dashboard/dist/assets/RunAsSelector-CJDnyp93.js.map +0 -1
- package/dashboard/dist/assets/WorkflowPill-DPKOcbf4.js +0 -2
- package/dashboard/dist/assets/YamlWorkflowsPage-BliAckJ6.js +0 -2
- package/dashboard/dist/assets/YamlWorkflowsPage-BliAckJ6.js.map +0 -1
- package/dashboard/dist/assets/index-BpT-6WgJ.js +0 -2
- package/dashboard/dist/assets/index-D3NyVADW.js.map +0 -1
- package/dashboard/dist/assets/index-D7zYZOnH.js +0 -2
- package/dashboard/dist/assets/index-DOkHXmyf.js +0 -17
- package/dashboard/dist/assets/index-DYyLF-Qb.js.map +0 -1
- package/dashboard/dist/assets/index-Dk2Q51o0.js +0 -2
- package/dashboard/dist/assets/mcp-query-jQJQrs_7.js +0 -2
- package/dashboard/dist/assets/mcp-query-jQJQrs_7.js.map +0 -1
- package/dashboard/dist/assets/vendor-icons-BiIug1SK.js.map +0 -1
- package/dashboard/dist/assets/yaml-workflows-D7JXNqbM.js +0 -2
- package/dashboard/dist/assets/yaml-workflows-D7JXNqbM.js.map +0 -1
- package/docs/img/01-login.png +0 -0
- package/docs/img/02-dashboard-home.png +0 -0
- package/docs/img/03-processes-list.png +0 -0
- package/docs/img/04-escalations-list.png +0 -0
- package/docs/img/05-mcp-servers.png +0 -0
- package/docs/img/06-mcp-pipelines.png +0 -0
- package/docs/img/07-workflows-list.png +0 -0
- package/docs/img/compilation/01-query-submit.png +0 -0
- package/docs/img/compilation/02-mcp-servers.png +0 -0
- package/docs/img/compilation/03-query-completed.png +0 -0
- package/docs/img/compilation/04-wizard-original.png +0 -0
- package/docs/img/compilation/05-wizard-timeline.png +0 -0
- package/docs/img/compilation/06-wizard-profile.png +0 -0
- package/docs/img/compilation/07-wizard-deploy.png +0 -0
- package/docs/img/compilation/08-wizard-test-modal.png +0 -0
- package/docs/img/compilation/09-wizard-test-compare.png +0 -0
- package/docs/img/compilation/10-wizard-verify.png +0 -0
- /package/docs/api/{dba.md → http/dba.md} +0 -0
- /package/docs/api/{escalations.md → http/escalations.md} +0 -0
- /package/docs/api/{exports.md → http/exports.md} +0 -0
- /package/docs/api/{maintenance.md → http/maintenance.md} +0 -0
- /package/docs/api/{mcp-runs.md → http/mcp-runs.md} +0 -0
- /package/docs/api/{mcp-servers.md → http/mcp-servers.md} +0 -0
- /package/docs/api/{namespaces.md → http/namespaces.md} +0 -0
- /package/docs/api/{roles.md → http/roles.md} +0 -0
- /package/docs/api/{service-accounts.md → http/service-accounts.md} +0 -0
- /package/docs/api/{settings.md → http/settings.md} +0 -0
- /package/docs/api/{tasks.md → http/tasks.md} +0 -0
- /package/docs/api/{users.md → http/users.md} +0 -0
- /package/docs/api/{workflows.md → http/workflows.md} +0 -0
- /package/docs/api/{yaml-workflows.md → http/yaml-workflows.md} +0 -0
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.invokeWorkflow = invokeWorkflow;
|
|
37
|
+
exports.getWorkflowStatus = getWorkflowStatus;
|
|
38
|
+
exports.getWorkflowResult = getWorkflowResult;
|
|
39
|
+
exports.terminateWorkflow = terminateWorkflow;
|
|
40
|
+
exports.exportWorkflow = exportWorkflow;
|
|
41
|
+
exports.listWorkers = listWorkers;
|
|
42
|
+
exports.listDiscoveredWorkflows = listDiscoveredWorkflows;
|
|
43
|
+
exports.getCronStatus = getCronStatus;
|
|
44
|
+
exports.listWorkflowConfigs = listWorkflowConfigs;
|
|
45
|
+
exports.getWorkflowConfig = getWorkflowConfig;
|
|
46
|
+
exports.upsertWorkflowConfig = upsertWorkflowConfig;
|
|
47
|
+
exports.deleteWorkflowConfig = deleteWorkflowConfig;
|
|
48
|
+
const workers_1 = require("../workers");
|
|
49
|
+
const exportService = __importStar(require("../services/export"));
|
|
50
|
+
const configService = __importStar(require("../services/config"));
|
|
51
|
+
const cron_1 = require("../services/cron");
|
|
52
|
+
const db_1 = require("../lib/db");
|
|
53
|
+
const registry_1 = require("../services/workers/registry");
|
|
54
|
+
const sql_1 = require("../services/mcp-runs/sql");
|
|
55
|
+
const task_1 = require("../services/task");
|
|
56
|
+
const workflow_invocation_1 = require("../services/workflow-invocation");
|
|
57
|
+
const ltconfig_1 = require("../modules/ltconfig");
|
|
58
|
+
function isResolveError(err) {
|
|
59
|
+
return err?.message?.includes('Cannot resolve workflow');
|
|
60
|
+
}
|
|
61
|
+
// ── Invocation ──────────────────────────────────────────────────────────────
|
|
62
|
+
/**
|
|
63
|
+
* Start a workflow — proxy for `Durable.Client.workflow.start()`.
|
|
64
|
+
*
|
|
65
|
+
* Resolves the task queue, enforces auth/role constraints, builds the
|
|
66
|
+
* LTEnvelope with IAM context, and delegates to the Durable client.
|
|
67
|
+
* Any WorkflowOptions field (workflowId, expire, entity, namespace,
|
|
68
|
+
* search, signalIn, pending, etc.) can be passed via `options` and
|
|
69
|
+
* flows through to the Durable client unchanged.
|
|
70
|
+
*
|
|
71
|
+
* @see https://docs.hotmesh.io/types/types_durable.WorkflowOptions.html
|
|
72
|
+
*/
|
|
73
|
+
async function invokeWorkflow(input, auth) {
|
|
74
|
+
try {
|
|
75
|
+
await (0, workflow_invocation_1.checkInvocationRoles)(input.type, auth.userId);
|
|
76
|
+
const result = await (0, workflow_invocation_1.invokeWorkflow)({
|
|
77
|
+
workflowType: input.type,
|
|
78
|
+
data: input.data || {},
|
|
79
|
+
metadata: input.metadata,
|
|
80
|
+
executeAs: input.execute_as,
|
|
81
|
+
options: input.options,
|
|
82
|
+
auth: {
|
|
83
|
+
userId: auth.userId,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
return {
|
|
87
|
+
status: 202,
|
|
88
|
+
data: { workflowId: result.workflowId, message: 'Workflow started' },
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
const status = err instanceof workflow_invocation_1.InvocationError ? err.statusCode : 500;
|
|
93
|
+
return { status, error: err.message };
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get the execution status of a workflow.
|
|
98
|
+
*
|
|
99
|
+
* Returns the HotMesh status code (0 = completed, 1 = running).
|
|
100
|
+
* Resolves the workflow handle via task record or worker registry.
|
|
101
|
+
*
|
|
102
|
+
* @param input.workflowId — HotMesh workflow ID
|
|
103
|
+
* @returns `{ status: 200, data: { workflowId, status } }` or 404
|
|
104
|
+
*/
|
|
105
|
+
async function getWorkflowStatus(input) {
|
|
106
|
+
try {
|
|
107
|
+
const resolved = await (0, task_1.resolveWorkflowHandle)(input.workflowId);
|
|
108
|
+
const client = (0, workers_1.createClient)();
|
|
109
|
+
const handle = await client.workflow.getHandle(resolved.taskQueue, resolved.workflowName, input.workflowId);
|
|
110
|
+
const status = await handle.status();
|
|
111
|
+
return {
|
|
112
|
+
status: 200,
|
|
113
|
+
data: { workflowId: input.workflowId, status },
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
catch (err) {
|
|
117
|
+
if (isResolveError(err))
|
|
118
|
+
return { status: 404, error: err.message };
|
|
119
|
+
return { status: 500, error: err.message };
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Get the result of a completed workflow.
|
|
124
|
+
*
|
|
125
|
+
* Returns 202 if the workflow is still running, 200 with the result
|
|
126
|
+
* payload when complete. Never blocks — always returns immediately.
|
|
127
|
+
*
|
|
128
|
+
* @param input.workflowId — HotMesh workflow ID
|
|
129
|
+
* @returns `{ status: 200, data: { workflowId, result } }` or 202 if running
|
|
130
|
+
*/
|
|
131
|
+
async function getWorkflowResult(input) {
|
|
132
|
+
try {
|
|
133
|
+
const resolved = await (0, task_1.resolveWorkflowHandle)(input.workflowId);
|
|
134
|
+
const client = (0, workers_1.createClient)();
|
|
135
|
+
const handle = await client.workflow.getHandle(resolved.taskQueue, resolved.workflowName, input.workflowId);
|
|
136
|
+
const status = await handle.status();
|
|
137
|
+
if (status !== 0) {
|
|
138
|
+
return {
|
|
139
|
+
status: 202,
|
|
140
|
+
data: { workflowId: input.workflowId, status: 'running' },
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
const result = await handle.result();
|
|
144
|
+
return {
|
|
145
|
+
status: 200,
|
|
146
|
+
data: { workflowId: input.workflowId, result },
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
catch (err) {
|
|
150
|
+
if (isResolveError(err))
|
|
151
|
+
return { status: 404, error: err.message };
|
|
152
|
+
return { status: 500, error: err.message };
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Terminate a running workflow.
|
|
157
|
+
*
|
|
158
|
+
* Interrupts the workflow execution immediately via HotMesh.
|
|
159
|
+
*
|
|
160
|
+
* @param input.workflowId — HotMesh workflow ID
|
|
161
|
+
* @returns `{ status: 200, data: { terminated: true, workflowId } }` or 404
|
|
162
|
+
*/
|
|
163
|
+
async function terminateWorkflow(input) {
|
|
164
|
+
try {
|
|
165
|
+
const resolved = await (0, task_1.resolveWorkflowHandle)(input.workflowId);
|
|
166
|
+
const client = (0, workers_1.createClient)();
|
|
167
|
+
const handle = await client.workflow.getHandle(resolved.taskQueue, resolved.workflowName, input.workflowId);
|
|
168
|
+
await handle.terminate();
|
|
169
|
+
return {
|
|
170
|
+
status: 200,
|
|
171
|
+
data: { terminated: true, workflowId: input.workflowId },
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
catch (err) {
|
|
175
|
+
if (isResolveError(err))
|
|
176
|
+
return { status: 404, error: err.message };
|
|
177
|
+
return { status: 500, error: err.message };
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Export the full state of a workflow.
|
|
182
|
+
*
|
|
183
|
+
* Returns the serialized workflow state including all activity
|
|
184
|
+
* results, signals, and metadata.
|
|
185
|
+
*
|
|
186
|
+
* @param input.workflowId — HotMesh workflow ID
|
|
187
|
+
* @returns `{ status: 200, data: <exported state> }` or 404
|
|
188
|
+
*/
|
|
189
|
+
async function exportWorkflow(input) {
|
|
190
|
+
try {
|
|
191
|
+
const resolved = await (0, task_1.resolveWorkflowHandle)(input.workflowId);
|
|
192
|
+
const exported = await exportService.exportWorkflow(input.workflowId, resolved.taskQueue, resolved.workflowName);
|
|
193
|
+
return { status: 200, data: exported };
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
if (isResolveError(err))
|
|
197
|
+
return { status: 404, error: err.message };
|
|
198
|
+
return { status: 500, error: err.message };
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
// ── Discovery ───────────────────────────────────────────────────────────────
|
|
202
|
+
/**
|
|
203
|
+
* List active workflow workers with their registration status.
|
|
204
|
+
*
|
|
205
|
+
* @param input.include_system — include system workflows (default: false)
|
|
206
|
+
* @returns `{ status: 200, data: { workers: [{ name, task_queue, registered, system }] } }`
|
|
207
|
+
*/
|
|
208
|
+
async function listWorkers(input) {
|
|
209
|
+
try {
|
|
210
|
+
const activeWorkers = (0, registry_1.getRegisteredWorkers)();
|
|
211
|
+
const configs = await configService.listWorkflowConfigs();
|
|
212
|
+
const registeredTypes = new Set(configs.map((c) => c.workflow_type));
|
|
213
|
+
const workers = [...activeWorkers.entries()]
|
|
214
|
+
.filter(([name]) => input.include_system || !registry_1.SYSTEM_WORKFLOWS.has(name))
|
|
215
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
216
|
+
.map(([name, { taskQueue }]) => ({
|
|
217
|
+
name,
|
|
218
|
+
task_queue: taskQueue,
|
|
219
|
+
registered: registeredTypes.has(name),
|
|
220
|
+
system: registry_1.SYSTEM_WORKFLOWS.has(name),
|
|
221
|
+
}));
|
|
222
|
+
return { status: 200, data: { workers } };
|
|
223
|
+
}
|
|
224
|
+
catch (err) {
|
|
225
|
+
return { status: 500, error: err.message };
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Discover all known workflow types from workers, history, and config.
|
|
230
|
+
*
|
|
231
|
+
* Merges three sources: active in-memory workers, historical entities
|
|
232
|
+
* from the durable jobs table, and registered workflow configs. Returns
|
|
233
|
+
* a unified list with status flags for each type.
|
|
234
|
+
*
|
|
235
|
+
* @param input.include_system — include system workflows (default: false)
|
|
236
|
+
* @returns `{ status: 200, data: { workflows: [{ workflow_type, task_queue, registered, active, invocable, ... }] } }`
|
|
237
|
+
*/
|
|
238
|
+
async function listDiscoveredWorkflows(input) {
|
|
239
|
+
try {
|
|
240
|
+
// 1. Active workers from in-memory registry
|
|
241
|
+
const activeWorkers = (0, registry_1.getRegisteredWorkers)();
|
|
242
|
+
// 2. Historical entities from durable.jobs
|
|
243
|
+
const pool = (0, db_1.getPool)();
|
|
244
|
+
const { rows: entityRows } = await pool.query(sql_1.DISTINCT_ENTITIES_DURABLE);
|
|
245
|
+
const historicalEntities = new Set(entityRows.map((r) => r.entity));
|
|
246
|
+
// 3. Registered configs
|
|
247
|
+
const configs = await configService.listWorkflowConfigs();
|
|
248
|
+
const configMap = new Map(configs.map((c) => [c.workflow_type, c]));
|
|
249
|
+
// Build unified set of all workflow types
|
|
250
|
+
const allTypes = new Set();
|
|
251
|
+
for (const [name] of activeWorkers)
|
|
252
|
+
allTypes.add(name);
|
|
253
|
+
for (const entity of historicalEntities)
|
|
254
|
+
allTypes.add(entity);
|
|
255
|
+
for (const c of configs)
|
|
256
|
+
allTypes.add(c.workflow_type);
|
|
257
|
+
const workflows = [...allTypes]
|
|
258
|
+
.filter((t) => input.include_system || !registry_1.SYSTEM_WORKFLOWS.has(t))
|
|
259
|
+
.sort()
|
|
260
|
+
.map((workflowType) => {
|
|
261
|
+
const config = configMap.get(workflowType);
|
|
262
|
+
const worker = activeWorkers.get(workflowType);
|
|
263
|
+
return {
|
|
264
|
+
workflow_type: workflowType,
|
|
265
|
+
task_queue: config?.task_queue ?? worker?.taskQueue ?? null,
|
|
266
|
+
registered: !!config,
|
|
267
|
+
active: !!worker,
|
|
268
|
+
invocable: config?.invocable ?? !!worker,
|
|
269
|
+
system: registry_1.SYSTEM_WORKFLOWS.has(workflowType),
|
|
270
|
+
description: config?.description ?? null,
|
|
271
|
+
roles: config?.roles ?? [],
|
|
272
|
+
invocation_roles: config?.invocation_roles ?? [],
|
|
273
|
+
execute_as: config?.execute_as ?? null,
|
|
274
|
+
};
|
|
275
|
+
});
|
|
276
|
+
return { status: 200, data: { workflows } };
|
|
277
|
+
}
|
|
278
|
+
catch (err) {
|
|
279
|
+
return { status: 500, error: err.message };
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* List all cron-scheduled workflows and their active state.
|
|
284
|
+
*
|
|
285
|
+
* @returns `{ status: 200, data: { schedules: [{ workflow_type, cron_schedule, active, ... }] } }`
|
|
286
|
+
*/
|
|
287
|
+
async function getCronStatus() {
|
|
288
|
+
try {
|
|
289
|
+
const configs = await configService.listWorkflowConfigs();
|
|
290
|
+
const cronConfigs = configs.filter((c) => c.cron_schedule);
|
|
291
|
+
const activeTypes = cron_1.cronRegistry.activeWorkflowTypes;
|
|
292
|
+
const schedules = cronConfigs.map((c) => ({
|
|
293
|
+
workflow_type: c.workflow_type,
|
|
294
|
+
cron_schedule: c.cron_schedule,
|
|
295
|
+
description: c.description,
|
|
296
|
+
task_queue: c.task_queue,
|
|
297
|
+
invocable: c.invocable,
|
|
298
|
+
active: activeTypes.includes(c.workflow_type),
|
|
299
|
+
envelope_schema: c.envelope_schema,
|
|
300
|
+
}));
|
|
301
|
+
return { status: 200, data: { schedules } };
|
|
302
|
+
}
|
|
303
|
+
catch (err) {
|
|
304
|
+
return { status: 500, error: err.message };
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
// ── Configuration ───────────────────────────────────────────────────────────
|
|
308
|
+
/**
|
|
309
|
+
* List all registered workflow configurations.
|
|
310
|
+
*
|
|
311
|
+
* @returns `{ status: 200, data: { workflows: LTWorkflowConfig[] } }`
|
|
312
|
+
*/
|
|
313
|
+
async function listWorkflowConfigs() {
|
|
314
|
+
try {
|
|
315
|
+
const configs = await configService.listWorkflowConfigs();
|
|
316
|
+
return { status: 200, data: { workflows: configs } };
|
|
317
|
+
}
|
|
318
|
+
catch (err) {
|
|
319
|
+
return { status: 500, error: err.message };
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Get a single workflow configuration by type.
|
|
324
|
+
*
|
|
325
|
+
* @param input.type — workflow type name (e.g. `"reviewContent"`)
|
|
326
|
+
* @returns `{ status: 200, data: <config> }` or 404
|
|
327
|
+
*/
|
|
328
|
+
async function getWorkflowConfig(input) {
|
|
329
|
+
try {
|
|
330
|
+
const config = await configService.getWorkflowConfig(input.type);
|
|
331
|
+
if (!config) {
|
|
332
|
+
return { status: 404, error: 'Workflow config not found' };
|
|
333
|
+
}
|
|
334
|
+
return { status: 200, data: config };
|
|
335
|
+
}
|
|
336
|
+
catch (err) {
|
|
337
|
+
return { status: 500, error: err.message };
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Create or replace a workflow configuration.
|
|
342
|
+
*
|
|
343
|
+
* Invalidates the config cache and restarts the cron schedule if one
|
|
344
|
+
* is defined. Idempotent — safe to call repeatedly with the same input.
|
|
345
|
+
*
|
|
346
|
+
* @param input.type — workflow type name
|
|
347
|
+
* @param input.invocable — whether the workflow can be started via the API
|
|
348
|
+
* @param input.task_queue — HotMesh task queue
|
|
349
|
+
* @param input.default_role — default escalation role
|
|
350
|
+
* @param input.description — human-readable description
|
|
351
|
+
* @param input.execute_as — service account for proxy invocation
|
|
352
|
+
* @param input.roles — roles that can resolve escalations
|
|
353
|
+
* @param input.invocation_roles — roles that can invoke this workflow
|
|
354
|
+
* @param input.consumes — workflow types whose data this workflow consumes
|
|
355
|
+
* @param input.tool_tags — MCP tool tags for discovery
|
|
356
|
+
* @param input.envelope_schema — JSON Schema for envelope.data validation
|
|
357
|
+
* @param input.resolver_schema — JSON Schema for resolver payload validation
|
|
358
|
+
* @param input.cron_schedule — cron expression for scheduled execution
|
|
359
|
+
* @returns `{ status: 200, data: <saved config> }`
|
|
360
|
+
*/
|
|
361
|
+
async function upsertWorkflowConfig(input) {
|
|
362
|
+
try {
|
|
363
|
+
const config = await configService.upsertWorkflowConfig({
|
|
364
|
+
workflow_type: input.type,
|
|
365
|
+
invocable: input.invocable ?? false,
|
|
366
|
+
task_queue: input.task_queue ?? null,
|
|
367
|
+
default_role: input.default_role ?? 'reviewer',
|
|
368
|
+
description: input.description ?? null,
|
|
369
|
+
execute_as: input.execute_as ?? null,
|
|
370
|
+
roles: input.roles ?? [],
|
|
371
|
+
invocation_roles: input.invocation_roles ?? [],
|
|
372
|
+
consumes: input.consumes ?? [],
|
|
373
|
+
tool_tags: input.tool_tags ?? [],
|
|
374
|
+
envelope_schema: input.envelope_schema ?? null,
|
|
375
|
+
resolver_schema: input.resolver_schema ?? null,
|
|
376
|
+
cron_schedule: input.cron_schedule ?? null,
|
|
377
|
+
});
|
|
378
|
+
ltconfig_1.ltConfig.invalidate();
|
|
379
|
+
await cron_1.cronRegistry.restartCron(config);
|
|
380
|
+
return { status: 200, data: config };
|
|
381
|
+
}
|
|
382
|
+
catch (err) {
|
|
383
|
+
return { status: 500, error: err.message };
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Delete a workflow configuration.
|
|
388
|
+
*
|
|
389
|
+
* Removes the config record and invalidates the cache. Active workers
|
|
390
|
+
* continue running — this only removes the config/interceptor binding.
|
|
391
|
+
*
|
|
392
|
+
* @param input.type — workflow type name
|
|
393
|
+
* @returns `{ status: 200, data: { deleted: true, workflow_type } }` or 404
|
|
394
|
+
*/
|
|
395
|
+
async function deleteWorkflowConfig(input) {
|
|
396
|
+
try {
|
|
397
|
+
const deleted = await configService.deleteWorkflowConfig(input.type);
|
|
398
|
+
if (!deleted) {
|
|
399
|
+
return { status: 404, error: 'Workflow config not found' };
|
|
400
|
+
}
|
|
401
|
+
ltconfig_1.ltConfig.invalidate();
|
|
402
|
+
return { status: 200, data: { deleted: true, workflow_type: input.type } };
|
|
403
|
+
}
|
|
404
|
+
catch (err) {
|
|
405
|
+
return { status: 500, error: err.message };
|
|
406
|
+
}
|
|
407
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import type { LTApiResult, LTApiAuth } from '../types/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* List YAML workflows with optional filtering and pagination.
|
|
4
|
+
*
|
|
5
|
+
* Delegates to the DB layer. Returns 404 when a filter references an invalid UUID.
|
|
6
|
+
*
|
|
7
|
+
* @param input.status — lifecycle filter (draft, deployed, active, archived)
|
|
8
|
+
* @param input.graph_topic — filter by the HotMesh subscription topic
|
|
9
|
+
* @param input.app_id — filter by namespace (MCP server name)
|
|
10
|
+
* @param input.search — free-text search across workflow name/description
|
|
11
|
+
* @param input.source_workflow_id — filter by the execution trace this workflow was compiled from
|
|
12
|
+
* @param input.set_id — filter by compositional set membership
|
|
13
|
+
* @param input.limit — max rows to return
|
|
14
|
+
* @param input.offset — pagination offset
|
|
15
|
+
* @returns `{ status: 200, data: YamlWorkflow[] }` matching workflows
|
|
16
|
+
*/
|
|
17
|
+
export declare function listYamlWorkflows(input: {
|
|
18
|
+
status?: string;
|
|
19
|
+
graph_topic?: string;
|
|
20
|
+
app_id?: string;
|
|
21
|
+
search?: string;
|
|
22
|
+
source_workflow_id?: string;
|
|
23
|
+
set_id?: string;
|
|
24
|
+
limit?: number;
|
|
25
|
+
offset?: number;
|
|
26
|
+
}): Promise<LTApiResult>;
|
|
27
|
+
/**
|
|
28
|
+
* Compile an execution trace into a new YAML workflow (draft).
|
|
29
|
+
*
|
|
30
|
+
* Validates that the source execution did not exhaust its tool rounds, checks for
|
|
31
|
+
* topic collisions in the target namespace, then delegates to the LLM-based YAML
|
|
32
|
+
* generator. The resulting YAML, schemas, and activity manifest are persisted as a
|
|
33
|
+
* new draft record. Auto-derived tags are merged with any user-supplied tags.
|
|
34
|
+
*
|
|
35
|
+
* @param input.workflow_id — ID of the source execution trace to compile from
|
|
36
|
+
* @param input.task_queue — HotMesh task queue the source execution ran on
|
|
37
|
+
* @param input.workflow_name — type name of the source workflow
|
|
38
|
+
* @param input.name — tool name for the new workflow (no dashes; used to derive the topic)
|
|
39
|
+
* @param input.description — human-readable description passed to the generator
|
|
40
|
+
* @param input.app_id — target namespace (defaults to "longtail")
|
|
41
|
+
* @param input.subscribes — explicit subscription topic override (otherwise derived from name)
|
|
42
|
+
* @param input.tags — additional tags to merge with auto-derived tags
|
|
43
|
+
* @param input.compilation_feedback — natural-language feedback to steer the LLM compilation
|
|
44
|
+
* @returns `{ status: 201, data: YamlWorkflow }` the newly created draft record
|
|
45
|
+
*/
|
|
46
|
+
export declare function createYamlWorkflow(input: {
|
|
47
|
+
workflow_id: string;
|
|
48
|
+
task_queue: string;
|
|
49
|
+
workflow_name: string;
|
|
50
|
+
name: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
app_id?: string;
|
|
53
|
+
subscribes?: string;
|
|
54
|
+
tags?: string[];
|
|
55
|
+
compilation_feedback?: string;
|
|
56
|
+
}): Promise<LTApiResult>;
|
|
57
|
+
/**
|
|
58
|
+
* Create a YAML workflow directly from user-supplied YAML content (no compilation).
|
|
59
|
+
*
|
|
60
|
+
* Sanitizes the name, app_id, and graph_topic to lowercase alphanumeric characters.
|
|
61
|
+
* Rewrites the `subscribes`, `id`, and `topic` fields inside the YAML to match the
|
|
62
|
+
* sanitized values. Checks for topic collisions before persisting.
|
|
63
|
+
*
|
|
64
|
+
* @param input.name — tool name (sanitized to lowercase alphanumeric, periods, dashes, underscores)
|
|
65
|
+
* @param input.description — human-readable description; also stored as original_prompt
|
|
66
|
+
* @param input.yaml_content — raw HotMesh YAML definition
|
|
67
|
+
* @param input.input_schema — JSON Schema describing the workflow's input (defaults to empty object)
|
|
68
|
+
* @param input.activity_manifest — list of activity declarations (defaults to empty array)
|
|
69
|
+
* @param input.tags — classification tags (defaults to empty array)
|
|
70
|
+
* @param input.app_id — target namespace / MCP server name (defaults to "longtail", sanitized to lowercase alphanumeric)
|
|
71
|
+
* @param input.graph_topic — subscription topic override (defaults to sanitized name; overridden by `subscribes` in YAML if present)
|
|
72
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the persisted workflow record
|
|
73
|
+
*/
|
|
74
|
+
export declare function createYamlWorkflowDirect(input: {
|
|
75
|
+
name: string;
|
|
76
|
+
description?: string;
|
|
77
|
+
yaml_content: string;
|
|
78
|
+
input_schema?: any;
|
|
79
|
+
activity_manifest?: any[];
|
|
80
|
+
tags?: string[];
|
|
81
|
+
app_id?: string;
|
|
82
|
+
graph_topic?: string;
|
|
83
|
+
}): Promise<LTApiResult>;
|
|
84
|
+
/**
|
|
85
|
+
* Retrieve all distinct app_id namespaces that have at least one YAML workflow.
|
|
86
|
+
*
|
|
87
|
+
* @returns `{ status: 200, data: { app_ids: string[] } }` sorted list of namespace identifiers
|
|
88
|
+
*/
|
|
89
|
+
export declare function getAppIds(): Promise<LTApiResult>;
|
|
90
|
+
/**
|
|
91
|
+
* Fetch a single YAML workflow by its primary key.
|
|
92
|
+
*
|
|
93
|
+
* @param input.id — UUID of the workflow record
|
|
94
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the full workflow record, or 404 if not found
|
|
95
|
+
*/
|
|
96
|
+
export declare function getYamlWorkflow(input: {
|
|
97
|
+
id: string;
|
|
98
|
+
}): Promise<LTApiResult>;
|
|
99
|
+
/**
|
|
100
|
+
* Partially update a YAML workflow record.
|
|
101
|
+
*
|
|
102
|
+
* Accepts arbitrary fields beyond `id` and forwards them to the DB update layer.
|
|
103
|
+
*
|
|
104
|
+
* @param input.id — UUID of the workflow to update
|
|
105
|
+
* @param input.[key] — any mutable workflow fields (name, description, yaml_content, tags, etc.)
|
|
106
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the updated record, or 404 if not found
|
|
107
|
+
*/
|
|
108
|
+
export declare function updateYamlWorkflow(input: {
|
|
109
|
+
id: string;
|
|
110
|
+
[key: string]: any;
|
|
111
|
+
}): Promise<LTApiResult>;
|
|
112
|
+
/**
|
|
113
|
+
* Re-compile an existing YAML workflow from its original execution trace.
|
|
114
|
+
*
|
|
115
|
+
* Looks up the source workflow reference, re-runs the LLM-based YAML generator, and
|
|
116
|
+
* overwrites the YAML content, schemas, manifest, and tags in place. When
|
|
117
|
+
* compilation_feedback is provided, the current YAML is passed as priorFailedYaml so
|
|
118
|
+
* the generator can incorporate the feedback. Archived workflows cannot be regenerated.
|
|
119
|
+
*
|
|
120
|
+
* @param input.id — UUID of the workflow to regenerate
|
|
121
|
+
* @param input.task_queue — override the task queue (otherwise resolved from the source task record)
|
|
122
|
+
* @param input.compilation_feedback — natural-language feedback to steer the re-compilation
|
|
123
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the updated record with new YAML content
|
|
124
|
+
*/
|
|
125
|
+
export declare function regenerateYamlWorkflow(input: {
|
|
126
|
+
id: string;
|
|
127
|
+
task_queue?: string;
|
|
128
|
+
compilation_feedback?: string;
|
|
129
|
+
}): Promise<LTApiResult>;
|
|
130
|
+
/**
|
|
131
|
+
* Permanently delete a YAML workflow record.
|
|
132
|
+
*
|
|
133
|
+
* Only draft or archived workflows can be deleted. Active or deployed workflows must
|
|
134
|
+
* be archived first.
|
|
135
|
+
*
|
|
136
|
+
* @param input.id — UUID of the workflow to delete
|
|
137
|
+
* @returns `{ status: 200, data: { deleted: true } }` on success, or 400 if the workflow is active/deployed
|
|
138
|
+
*/
|
|
139
|
+
export declare function deleteYamlWorkflow(input: {
|
|
140
|
+
id: string;
|
|
141
|
+
}): Promise<LTApiResult>;
|
|
142
|
+
/**
|
|
143
|
+
* Deploy a YAML workflow and all sibling workflows sharing its app_id namespace.
|
|
144
|
+
*
|
|
145
|
+
* Merges and deploys the full app_id YAML, registers HotMesh workers for every
|
|
146
|
+
* non-archived sibling, transitions draft/deployed siblings to active, and marks
|
|
147
|
+
* the app_id content as deployed. Uses the app_version declared in the workflow record.
|
|
148
|
+
*
|
|
149
|
+
* @param input.id — UUID of the workflow to deploy
|
|
150
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the refreshed workflow record after deployment
|
|
151
|
+
*/
|
|
152
|
+
export declare function deployYamlWorkflow(input: {
|
|
153
|
+
id: string;
|
|
154
|
+
}): Promise<LTApiResult>;
|
|
155
|
+
/**
|
|
156
|
+
* Activate a previously deployed YAML workflow and its app_id siblings.
|
|
157
|
+
*
|
|
158
|
+
* Calls the deployer to activate the app_id at its current version, then registers
|
|
159
|
+
* HotMesh workers for all sibling workflows. Siblings in "deployed" status are
|
|
160
|
+
* transitioned to "active". The workflow must already be in deployed or active status.
|
|
161
|
+
*
|
|
162
|
+
* @param input.id — UUID of the workflow to activate
|
|
163
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the refreshed workflow record after activation
|
|
164
|
+
*/
|
|
165
|
+
export declare function activateYamlWorkflow(input: {
|
|
166
|
+
id: string;
|
|
167
|
+
}): Promise<LTApiResult>;
|
|
168
|
+
/**
|
|
169
|
+
* Invoke an active YAML workflow, executing its DAG pipeline.
|
|
170
|
+
*
|
|
171
|
+
* The workflow must be in "active" status. Delegates to the invoke service which
|
|
172
|
+
* starts the HotMesh execution. Supports both synchronous (wait for result) and
|
|
173
|
+
* asynchronous (fire-and-forget) invocation modes.
|
|
174
|
+
*
|
|
175
|
+
* @param input.id — UUID of the workflow to invoke
|
|
176
|
+
* @param input.data — input payload passed to the workflow's entry point
|
|
177
|
+
* @param input.sync — when true, block until the workflow completes and return its output
|
|
178
|
+
* @param input.timeout — max milliseconds to wait when sync is true
|
|
179
|
+
* @param input.execute_as — override identity for the execution context
|
|
180
|
+
* @param auth — authenticated user context; userId is forwarded to the invoke service
|
|
181
|
+
* @returns `{ status: 200, data: ... }` workflow execution result (sync) or job metadata (async)
|
|
182
|
+
*/
|
|
183
|
+
export declare function invokeYamlWorkflow(input: {
|
|
184
|
+
id: string;
|
|
185
|
+
data?: any;
|
|
186
|
+
sync?: boolean;
|
|
187
|
+
timeout?: number;
|
|
188
|
+
execute_as?: string;
|
|
189
|
+
}, auth?: LTApiAuth): Promise<LTApiResult>;
|
|
190
|
+
/**
|
|
191
|
+
* Archive a YAML workflow, removing it from active service.
|
|
192
|
+
*
|
|
193
|
+
* If the workflow is currently active, its HotMesh engine is stopped before
|
|
194
|
+
* transitioning the status to "archived". Archived workflows cannot be invoked
|
|
195
|
+
* or regenerated but can still be viewed or deleted.
|
|
196
|
+
*
|
|
197
|
+
* @param input.id — UUID of the workflow to archive
|
|
198
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the updated record with status "archived"
|
|
199
|
+
*/
|
|
200
|
+
export declare function archiveYamlWorkflow(input: {
|
|
201
|
+
id: string;
|
|
202
|
+
}): Promise<LTApiResult>;
|
|
203
|
+
/**
|
|
204
|
+
* Retrieve the version history for a YAML workflow.
|
|
205
|
+
*
|
|
206
|
+
* Returns a paginated list of version snapshots ordered by version number.
|
|
207
|
+
*
|
|
208
|
+
* @param input.id — UUID of the workflow
|
|
209
|
+
* @param input.limit — max versions to return (defaults to 20)
|
|
210
|
+
* @param input.offset — pagination offset (defaults to 0)
|
|
211
|
+
* @returns `{ status: 200, data: VersionSnapshot[] }` paginated version history
|
|
212
|
+
*/
|
|
213
|
+
export declare function getVersionHistory(input: {
|
|
214
|
+
id: string;
|
|
215
|
+
limit?: number;
|
|
216
|
+
offset?: number;
|
|
217
|
+
}): Promise<LTApiResult>;
|
|
218
|
+
/**
|
|
219
|
+
* Retrieve a specific version snapshot of a YAML workflow.
|
|
220
|
+
*
|
|
221
|
+
* Validates that the version number is a positive integer before querying.
|
|
222
|
+
*
|
|
223
|
+
* @param input.id — UUID of the workflow
|
|
224
|
+
* @param input.version — 1-based version number to retrieve
|
|
225
|
+
* @returns `{ status: 200, data: VersionSnapshot }` the snapshot at the requested version, or 404
|
|
226
|
+
*/
|
|
227
|
+
export declare function getVersionSnapshot(input: {
|
|
228
|
+
id: string;
|
|
229
|
+
version: number;
|
|
230
|
+
}): Promise<LTApiResult>;
|
|
231
|
+
/**
|
|
232
|
+
* Retrieve the raw YAML content for a workflow, optionally at a specific version.
|
|
233
|
+
*
|
|
234
|
+
* When a version is provided, fetches from the version snapshot table. Otherwise
|
|
235
|
+
* returns the current yaml_content from the live workflow record.
|
|
236
|
+
*
|
|
237
|
+
* @param input.id — UUID of the workflow
|
|
238
|
+
* @param input.version — optional version number; when omitted, returns the current content
|
|
239
|
+
* @returns `{ status: 200, data: string }` the raw YAML string
|
|
240
|
+
*/
|
|
241
|
+
export declare function getYamlContent(input: {
|
|
242
|
+
id: string;
|
|
243
|
+
version?: number;
|
|
244
|
+
}): Promise<LTApiResult<string>>;
|
|
245
|
+
/**
|
|
246
|
+
* Set or update the cron schedule for a YAML workflow.
|
|
247
|
+
*
|
|
248
|
+
* Persists the schedule in the DB and restarts the in-process cron timer via the
|
|
249
|
+
* cron registry so the change takes effect immediately.
|
|
250
|
+
*
|
|
251
|
+
* @param input.id — UUID of the workflow to schedule
|
|
252
|
+
* @param input.cron_schedule — cron expression (e.g. "0 * * * *")
|
|
253
|
+
* @param input.cron_envelope — optional payload passed to each scheduled invocation
|
|
254
|
+
* @param input.execute_as — optional identity override for scheduled executions
|
|
255
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the updated workflow record with cron fields set
|
|
256
|
+
*/
|
|
257
|
+
export declare function setCronSchedule(input: {
|
|
258
|
+
id: string;
|
|
259
|
+
cron_schedule: string;
|
|
260
|
+
cron_envelope?: any;
|
|
261
|
+
execute_as?: string;
|
|
262
|
+
}): Promise<LTApiResult>;
|
|
263
|
+
/**
|
|
264
|
+
* Remove the cron schedule from a YAML workflow.
|
|
265
|
+
*
|
|
266
|
+
* Stops the in-process cron timer first, then clears the schedule fields in the DB.
|
|
267
|
+
*
|
|
268
|
+
* @param input.id — UUID of the workflow to unschedule
|
|
269
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the updated workflow record with cron fields cleared
|
|
270
|
+
*/
|
|
271
|
+
export declare function clearCronSchedule(input: {
|
|
272
|
+
id: string;
|
|
273
|
+
}): Promise<LTApiResult>;
|
|
274
|
+
/**
|
|
275
|
+
* List all YAML workflows that have a cron schedule, with their live timer status.
|
|
276
|
+
*
|
|
277
|
+
* Fetches all cron-scheduled workflows from the DB and cross-references with the
|
|
278
|
+
* in-process cron registry to determine which timers are actually running.
|
|
279
|
+
*
|
|
280
|
+
* @returns `{ status: 200, data: { schedules: Array<{ id, name, graph_topic, app_id, cron_schedule, execute_as, active }> } }`
|
|
281
|
+
*/
|
|
282
|
+
export declare function getCronStatus(): Promise<LTApiResult>;
|