@hotmeshio/long-tail 0.1.7 → 0.1.9
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 +3 -1
- package/build/api/auth.d.ts +11 -0
- package/build/api/auth.js +11 -0
- package/build/api/bot-accounts.d.ts +87 -0
- package/build/api/bot-accounts.js +87 -0
- package/build/api/controlplane.d.ts +48 -0
- package/build/api/controlplane.js +48 -0
- package/build/api/dba.d.ts +27 -0
- package/build/api/dba.js +27 -0
- package/build/api/escalations.d.ts +201 -0
- package/build/api/escalations.js +276 -5
- package/build/api/exports.d.ts +58 -0
- package/build/api/exports.js +58 -0
- package/build/api/insight.d.ts +57 -0
- package/build/api/insight.js +57 -0
- package/build/api/maintenance.d.ts +15 -0
- package/build/api/maintenance.js +15 -0
- package/build/api/mcp-runs.d.ts +27 -0
- package/build/api/mcp-runs.js +27 -0
- package/build/api/mcp.d.ts +108 -0
- package/build/api/mcp.js +108 -0
- package/build/api/namespaces.d.ts +13 -0
- package/build/api/namespaces.js +13 -0
- package/build/api/roles.d.ts +63 -0
- package/build/api/roles.js +63 -5
- package/build/api/settings.d.ts +8 -0
- package/build/api/settings.js +8 -0
- package/build/api/tasks.d.ts +68 -1
- package/build/api/tasks.js +92 -0
- package/build/api/users.d.ts +71 -0
- package/build/api/users.js +71 -5
- package/build/api/workflow-sets.d.ts +51 -0
- package/build/api/workflow-sets.js +51 -0
- package/build/api/workflows.d.ts +110 -0
- package/build/api/workflows.js +117 -1
- package/build/api/yaml-workflows.d.ts +195 -0
- package/build/api/yaml-workflows.js +195 -0
- package/build/examples/seed.js +18 -0
- package/build/examples/types/envelopes.d.ts +35 -0
- package/build/examples/types/index.d.ts +1 -1
- package/build/examples/workers.js +10 -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/examples/workflows/basic-signal/activities.d.ts +17 -0
- package/build/examples/workflows/basic-signal/activities.js +18 -0
- package/build/examples/workflows/basic-signal/index.d.ts +17 -0
- package/build/examples/workflows/basic-signal/index.js +116 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +4 -1
- package/build/lib/db/schemas/002_seed.sql +9 -1
- package/build/modules/ltconfig.d.ts +8 -1
- package/build/modules/ltconfig.js +12 -2
- package/build/routes/escalations/list.js +22 -0
- package/build/routes/tasks.js +23 -0
- package/build/routes/workflows/invocation.js +16 -10
- package/build/sdk/index.d.ts +26 -0
- package/build/sdk/index.js +2 -0
- package/build/services/interceptor/index.js +9 -3
- package/build/services/orchestrator/condition.d.ts +34 -0
- package/build/services/orchestrator/condition.js +92 -0
- package/build/services/workflow-invocation.d.ts +16 -3
- package/build/services/workflow-invocation.js +15 -7
- package/build/start/index.d.ts +24 -0
- package/build/start/index.js +24 -0
- package/build/start/workers.d.ts +6 -8
- package/build/start/workers.js +25 -2
- package/build/system/mcp-servers/admin/workflows.js +5 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/envelope.d.ts +7 -0
- package/build/types/sdk.d.ts +2 -0
- package/build/types/startup.d.ts +29 -2
- package/dashboard/dist/assets/{AdminDashboard-DRjkRSjJ.js → AdminDashboard-DUrSBQOl.js} +2 -2
- package/dashboard/dist/assets/{AdminDashboard-DRjkRSjJ.js.map → AdminDashboard-DUrSBQOl.js.map} +1 -1
- package/dashboard/dist/assets/{AvailableEscalationsPage-CnivX4Tz.js → AvailableEscalationsPage-Dbd1qUK_.js} +2 -2
- package/dashboard/dist/assets/{AvailableEscalationsPage-CnivX4Tz.js.map → AvailableEscalationsPage-Dbd1qUK_.js.map} +1 -1
- package/dashboard/dist/assets/{BotPicker-DwwaBhTH.js → BotPicker-Cg5iNEkm.js} +2 -2
- package/dashboard/dist/assets/{BotPicker-DwwaBhTH.js.map → BotPicker-Cg5iNEkm.js.map} +1 -1
- package/dashboard/dist/assets/{CollapsibleSection-DQpaVA0M.js → CollapsibleSection-Kd9UIyeU.js} +2 -2
- package/dashboard/dist/assets/{CollapsibleSection-DQpaVA0M.js.map → CollapsibleSection-Kd9UIyeU.js.map} +1 -1
- package/dashboard/dist/assets/{ConfirmDeleteModal-B7JoDNvt.js → ConfirmDeleteModal-DZMgmlof.js} +2 -2
- package/dashboard/dist/assets/{ConfirmDeleteModal-B7JoDNvt.js.map → ConfirmDeleteModal-DZMgmlof.js.map} +1 -1
- package/dashboard/dist/assets/{CopyableId-AqoZayBG.js → CopyableId-cPFTRm8q.js} +2 -2
- package/dashboard/dist/assets/{CopyableId-AqoZayBG.js.map → CopyableId-cPFTRm8q.js.map} +1 -1
- package/dashboard/dist/assets/{CredentialsPage-qGw1kQzi.js → CredentialsPage-DJablIbs.js} +2 -2
- package/dashboard/dist/assets/{CredentialsPage-qGw1kQzi.js.map → CredentialsPage-DJablIbs.js.map} +1 -1
- package/dashboard/dist/assets/{CustomDurationPicker-D1HUQcd0.js → CustomDurationPicker-NgIP6YDW.js} +2 -2
- package/dashboard/dist/assets/{CustomDurationPicker-D1HUQcd0.js.map → CustomDurationPicker-NgIP6YDW.js.map} +1 -1
- package/dashboard/dist/assets/{DataTable-DKvSKoVG.js → DataTable-CTRhTAfT.js} +2 -2
- package/dashboard/dist/assets/{DataTable-DKvSKoVG.js.map → DataTable-CTRhTAfT.js.map} +1 -1
- package/dashboard/dist/assets/{ElapsedCell-B0yrReGQ.js → ElapsedCell-HcSJ_MMs.js} +2 -2
- package/dashboard/dist/assets/{ElapsedCell-B0yrReGQ.js.map → ElapsedCell-HcSJ_MMs.js.map} +1 -1
- package/dashboard/dist/assets/{EmptyState-X0fIzYID.js → EmptyState-joNbd4gg.js} +2 -2
- package/dashboard/dist/assets/{EmptyState-X0fIzYID.js.map → EmptyState-joNbd4gg.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationsOverview-BQAT9W7r.js → EscalationsOverview-DpXDnQux.js} +2 -2
- package/dashboard/dist/assets/{EscalationsOverview-BQAT9W7r.js.map → EscalationsOverview-DpXDnQux.js.map} +1 -1
- package/dashboard/dist/assets/{EventTable-CX1KNLhZ.js → EventTable-CYem3v8n.js} +2 -2
- package/dashboard/dist/assets/{EventTable-CX1KNLhZ.js.map → EventTable-CYem3v8n.js.map} +1 -1
- package/dashboard/dist/assets/{FilterBar-DMTvuQy-.js → FilterBar-BiO8SOzc.js} +2 -2
- package/dashboard/dist/assets/{FilterBar-DMTvuQy-.js.map → FilterBar-BiO8SOzc.js.map} +1 -1
- package/dashboard/dist/assets/{ListToolbar-DTOSxoEy.js → ListToolbar-6yRDh2e9.js} +2 -2
- package/dashboard/dist/assets/{ListToolbar-DTOSxoEy.js.map → ListToolbar-6yRDh2e9.js.map} +1 -1
- package/dashboard/dist/assets/{McpOverview-BaKTIWrG.js → McpOverview-CUgSxkQe.js} +2 -2
- package/dashboard/dist/assets/{McpOverview-BaKTIWrG.js.map → McpOverview-CUgSxkQe.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryDetailPage-CC08T5k8.js → McpQueryDetailPage-BWbinTM_.js} +2 -2
- package/dashboard/dist/assets/{McpQueryDetailPage-CC08T5k8.js.map → McpQueryDetailPage-BWbinTM_.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryPage-CVfF9dYg.js → McpQueryPage-lV6kfDG5.js} +2 -2
- package/dashboard/dist/assets/{McpQueryPage-CVfF9dYg.js.map → McpQueryPage-lV6kfDG5.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunDetailPage-CKs1RWeV.js → McpRunDetailPage-D6gaxH3_.js} +2 -2
- package/dashboard/dist/assets/{McpRunDetailPage-CKs1RWeV.js.map → McpRunDetailPage-D6gaxH3_.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunsPage-CcPD_tY1.js → McpRunsPage-DKvTklh9.js} +2 -2
- package/dashboard/dist/assets/{McpRunsPage-CcPD_tY1.js.map → McpRunsPage-DKvTklh9.js.map} +1 -1
- package/dashboard/dist/assets/{Modal-_2AbWxJT.js → Modal-BuTvD0pz.js} +2 -2
- package/dashboard/dist/assets/{Modal-_2AbWxJT.js.map → Modal-BuTvD0pz.js.map} +1 -1
- package/dashboard/dist/assets/{OperatorDashboard-BGiRaRDr.js → OperatorDashboard-C9SSV96T.js} +2 -2
- package/dashboard/dist/assets/{OperatorDashboard-BGiRaRDr.js.map → OperatorDashboard-C9SSV96T.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeader-DVr5Qyzm.js → PageHeader-BcTVF9ul.js} +2 -2
- package/dashboard/dist/assets/{PageHeader-DVr5Qyzm.js.map → PageHeader-BcTVF9ul.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeaderWithStats-D0KRASML.js → PageHeaderWithStats-BI7JG5x6.js} +2 -2
- package/dashboard/dist/assets/{PageHeaderWithStats-D0KRASML.js.map → PageHeaderWithStats-BI7JG5x6.js.map} +1 -1
- package/dashboard/dist/assets/{PriorityBadge-Bx2559OU.js → PriorityBadge-DqVaOU65.js} +2 -2
- package/dashboard/dist/assets/{PriorityBadge-Bx2559OU.js.map → PriorityBadge-DqVaOU65.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessDetailPage-69I--sry.js → ProcessDetailPage-hFMhf9qa.js} +2 -2
- package/dashboard/dist/assets/{ProcessDetailPage-69I--sry.js.map → ProcessDetailPage-hFMhf9qa.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessesListPage-BDpUbua2.js → ProcessesListPage-ByVoBCQ3.js} +2 -2
- package/dashboard/dist/assets/{ProcessesListPage-BDpUbua2.js.map → ProcessesListPage-ByVoBCQ3.js.map} +1 -1
- package/dashboard/dist/assets/{RolePill-CcAqEaSt.js → RolePill-D9ZIkYiu.js} +2 -2
- package/dashboard/dist/assets/{RolePill-CcAqEaSt.js.map → RolePill-D9ZIkYiu.js.map} +1 -1
- package/dashboard/dist/assets/{RolesPage-Cl23Hjet.js → RolesPage-SMedMuqa.js} +2 -2
- package/dashboard/dist/assets/{RolesPage-Cl23Hjet.js.map → RolesPage-SMedMuqa.js.map} +1 -1
- package/dashboard/dist/assets/{RowActions-B4mqIt3Z.js → RowActions-yDhwwDbU.js} +2 -2
- package/dashboard/dist/assets/{RowActions-B4mqIt3Z.js.map → RowActions-yDhwwDbU.js.map} +1 -1
- package/dashboard/dist/assets/{StatCard-Cz_2OjAZ.js → StatCard-BrBnQFxh.js} +2 -2
- package/dashboard/dist/assets/{StatCard-Cz_2OjAZ.js.map → StatCard-BrBnQFxh.js.map} +1 -1
- package/dashboard/dist/assets/{StatusBadge-Wi2FJZsn.js → StatusBadge-xgb-lZku.js} +2 -2
- package/dashboard/dist/assets/{StatusBadge-Wi2FJZsn.js.map → StatusBadge-xgb-lZku.js.map} +1 -1
- package/dashboard/dist/assets/{StepIndicator-PW5NRDMb.js → StepIndicator-B9ps2SvM.js} +2 -2
- package/dashboard/dist/assets/{StepIndicator-PW5NRDMb.js.map → StepIndicator-B9ps2SvM.js.map} +1 -1
- package/dashboard/dist/assets/{StickyPagination-Bl2Uzz65.js → StickyPagination-DTIjBKN3.js} +2 -2
- package/dashboard/dist/assets/{StickyPagination-Bl2Uzz65.js.map → StickyPagination-DTIjBKN3.js.map} +1 -1
- package/dashboard/dist/assets/{SwimlaneTimeline-CUPqMd0z.js → SwimlaneTimeline-RK4Yu66z.js} +2 -2
- package/dashboard/dist/assets/{SwimlaneTimeline-CUPqMd0z.js.map → SwimlaneTimeline-RK4Yu66z.js.map} +1 -1
- package/dashboard/dist/assets/{TagInput-BLtf86Ly.js → TagInput-CdNUuqk4.js} +2 -2
- package/dashboard/dist/assets/{TagInput-BLtf86Ly.js.map → TagInput-CdNUuqk4.js.map} +1 -1
- package/dashboard/dist/assets/{TaskDetailPage-BXJFX74D.js → TaskDetailPage-C-nzaNea.js} +2 -2
- package/dashboard/dist/assets/{TaskDetailPage-BXJFX74D.js.map → TaskDetailPage-C-nzaNea.js.map} +1 -1
- package/dashboard/dist/assets/{TaskQueuePill-CWYj3xKe.js → TaskQueuePill-Lvr2-NzS.js} +2 -2
- package/dashboard/dist/assets/{TaskQueuePill-CWYj3xKe.js.map → TaskQueuePill-Lvr2-NzS.js.map} +1 -1
- package/dashboard/dist/assets/{TasksListPage-C3cX94Mw.js → TasksListPage-DSUmD84y.js} +2 -2
- package/dashboard/dist/assets/{TasksListPage-C3cX94Mw.js.map → TasksListPage-DSUmD84y.js.map} +1 -1
- package/dashboard/dist/assets/{TimeAgo-B_5yDDHV.js → TimeAgo-BZdLdrIh.js} +2 -2
- package/dashboard/dist/assets/{TimeAgo-B_5yDDHV.js.map → TimeAgo-BZdLdrIh.js.map} +1 -1
- package/dashboard/dist/assets/{TimestampCell-DRX724uU.js → TimestampCell-QX_0i5FK.js} +2 -2
- package/dashboard/dist/assets/{TimestampCell-DRX724uU.js.map → TimestampCell-QX_0i5FK.js.map} +1 -1
- package/dashboard/dist/assets/{UserName-Ca8FA469.js → UserName-DyZMXcBm.js} +2 -2
- package/dashboard/dist/assets/{UserName-Ca8FA469.js.map → UserName-DyZMXcBm.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowExecutionPage-BBYWEV2P.js → WorkflowExecutionPage-DjVxfZaF.js} +2 -2
- package/dashboard/dist/assets/{WorkflowExecutionPage-BBYWEV2P.js.map → WorkflowExecutionPage-DjVxfZaF.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowPill-CZqGslD6.js +2 -0
- package/dashboard/dist/assets/WorkflowPill-CZqGslD6.js.map +1 -0
- package/dashboard/dist/assets/WorkflowsDashboard-DZjuiFZ0.js +2 -0
- package/dashboard/dist/assets/WorkflowsDashboard-DZjuiFZ0.js.map +1 -0
- package/dashboard/dist/assets/{WorkflowsOverview-03IRrDLg.js → WorkflowsOverview-CLnLRpOu.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsOverview-03IRrDLg.js.map → WorkflowsOverview-CLnLRpOu.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowsPage-DC2cLxVi.js → YamlWorkflowsPage-VjdhnLmO.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowsPage-DC2cLxVi.js.map → YamlWorkflowsPage-VjdhnLmO.js.map} +1 -1
- package/dashboard/dist/assets/{bots-DZEXcgiJ.js → bots-DIM6lBoY.js} +2 -2
- package/dashboard/dist/assets/{bots-DZEXcgiJ.js.map → bots-DIM6lBoY.js.map} +1 -1
- package/dashboard/dist/assets/{escalation-Cw48lNaF.js → escalation-JOTuOqjq.js} +2 -2
- package/dashboard/dist/assets/{escalation-Cw48lNaF.js.map → escalation-JOTuOqjq.js.map} +1 -1
- package/dashboard/dist/assets/{escalation-columns-NINpo3qf.js → escalation-columns-Cyg58nkg.js} +2 -2
- package/dashboard/dist/assets/{escalation-columns-NINpo3qf.js.map → escalation-columns-Cyg58nkg.js.map} +1 -1
- package/dashboard/dist/assets/{helpers-fk_qr729.js → helpers-B1BDxBZd.js} +2 -2
- package/dashboard/dist/assets/{helpers-fk_qr729.js.map → helpers-B1BDxBZd.js.map} +1 -1
- package/dashboard/dist/assets/{helpers-Cuu3xKfr.js → helpers-BCix9c_m.js} +2 -2
- package/dashboard/dist/assets/{helpers-Cuu3xKfr.js.map → helpers-BCix9c_m.js.map} +1 -1
- package/dashboard/dist/assets/{index-Dj-z-x8M.js → index-BUK3qR-1.js} +2 -2
- package/dashboard/dist/assets/{index-Dj-z-x8M.js.map → index-BUK3qR-1.js.map} +1 -1
- package/dashboard/dist/assets/{index-BwN3KP_L.js → index-BYZX9tOb.js} +8 -8
- package/dashboard/dist/assets/index-BYZX9tOb.js.map +1 -0
- package/dashboard/dist/assets/{index-BIG3KooI.js → index-BcR6PfpY.js} +2 -2
- package/dashboard/dist/assets/{index-BIG3KooI.js.map → index-BcR6PfpY.js.map} +1 -1
- package/dashboard/dist/assets/index-BizfauqT.js +6 -0
- package/dashboard/dist/assets/index-BizfauqT.js.map +1 -0
- package/dashboard/dist/assets/{index-aRvL-dXp.js → index-Cf60K3x9.js} +2 -2
- package/dashboard/dist/assets/{index-aRvL-dXp.js.map → index-Cf60K3x9.js.map} +1 -1
- package/dashboard/dist/assets/{index-b03HlbnH.js → index-Cg5nfiYX.js} +2 -2
- package/dashboard/dist/assets/{index-b03HlbnH.js.map → index-Cg5nfiYX.js.map} +1 -1
- package/dashboard/dist/assets/index-D1wVX50Z.js +15 -0
- package/dashboard/dist/assets/index-D1wVX50Z.js.map +1 -0
- package/dashboard/dist/assets/{index-DwRytW9O.js → index-DDYFpi4l.js} +4 -4
- package/dashboard/dist/assets/index-DDYFpi4l.js.map +1 -0
- package/dashboard/dist/assets/{index-B98ipWxE.js → index-Di12t56M.js} +2 -2
- package/dashboard/dist/assets/{index-B98ipWxE.js.map → index-Di12t56M.js.map} +1 -1
- package/dashboard/dist/assets/{index-CORHB0WC.js → index-Ds0JoXS2.js} +2 -2
- package/dashboard/dist/assets/{index-CORHB0WC.js.map → index-Ds0JoXS2.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-BZoFryNc.js → mcp-B_xbczAt.js} +2 -2
- package/dashboard/dist/assets/{mcp-BZoFryNc.js.map → mcp-B_xbczAt.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-wiw1kwm8.js → mcp-query-B8-P_QoG.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-wiw1kwm8.js.map → mcp-query-B8-P_QoG.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-runs-BaEKnf5v.js → mcp-runs-CWeZinoF.js} +2 -2
- package/dashboard/dist/assets/{mcp-runs-BaEKnf5v.js.map → mcp-runs-CWeZinoF.js.map} +1 -1
- package/dashboard/dist/assets/{namespaces-BwnZI4_A.js → namespaces-C3WtdO_9.js} +2 -2
- package/dashboard/dist/assets/{namespaces-BwnZI4_A.js.map → namespaces-C3WtdO_9.js.map} +1 -1
- package/dashboard/dist/assets/{roles-Bgn1K8zU.js → roles-BDAsPpZG.js} +2 -2
- package/dashboard/dist/assets/{roles-Bgn1K8zU.js.map → roles-BDAsPpZG.js.map} +1 -1
- package/dashboard/dist/assets/{settings-CizYiutL.js → settings-Ife_UwAp.js} +2 -2
- package/dashboard/dist/assets/{settings-CizYiutL.js.map → settings-Ife_UwAp.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-Bmte_hc4.js → tasks-BquNDHDI.js} +2 -2
- package/dashboard/dist/assets/{tasks-Bmte_hc4.js.map → tasks-BquNDHDI.js.map} +1 -1
- package/dashboard/dist/assets/{useEventHooks-CUCxpiI2.js → useEventHooks-anv_B2Yy.js} +2 -2
- package/dashboard/dist/assets/{useEventHooks-CUCxpiI2.js.map → useEventHooks-anv_B2Yy.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-Cum02Ej9.js → useYamlActivityEvents-DN-PTgVx.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-Cum02Ej9.js.map → useYamlActivityEvents-DN-PTgVx.js.map} +1 -1
- package/dashboard/dist/assets/{users-NSDgTt-z.js → users-CFcxB4v6.js} +2 -2
- package/dashboard/dist/assets/{users-NSDgTt-z.js.map → users-CFcxB4v6.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-D1DdudfH.js → vendor-icons-T4r2DSPD.js} +2 -2
- package/dashboard/dist/assets/{vendor-icons-D1DdudfH.js.map → vendor-icons-T4r2DSPD.js.map} +1 -1
- package/dashboard/dist/assets/{workflows-k0XRdGXx.js → workflows-CeRci9z3.js} +2 -2
- package/dashboard/dist/assets/{workflows-k0XRdGXx.js.map → workflows-CeRci9z3.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-DAre8I78.js → yaml-workflows-DLwd2BOX.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-DAre8I78.js.map → yaml-workflows-DLwd2BOX.js.map} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/docs/api/{escalations.md → http/escalations.md} +99 -0
- package/docs/api/{tasks.md → http/tasks.md} +47 -0
- 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 +511 -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 +159 -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/package.json +1 -1
- package/dashboard/dist/assets/WorkflowPill-BXifAuLi.js +0 -2
- package/dashboard/dist/assets/WorkflowPill-BXifAuLi.js.map +0 -1
- package/dashboard/dist/assets/WorkflowsDashboard-Drl3juz9.js +0 -2
- package/dashboard/dist/assets/WorkflowsDashboard-Drl3juz9.js.map +0 -1
- package/dashboard/dist/assets/index-BwN3KP_L.js.map +0 -1
- package/dashboard/dist/assets/index-Bxe8h1x4.js +0 -17
- package/dashboard/dist/assets/index-Bxe8h1x4.js.map +0 -1
- package/dashboard/dist/assets/index-CNI7k7oB.js +0 -6
- package/dashboard/dist/assets/index-CNI7k7oB.js.map +0 -1
- package/dashboard/dist/assets/index-DwRytW9O.js.map +0 -1
- package/docs/epic-integration.md +0 -224
- package/docs/workflow-builder.md +0 -371
- /package/docs/api/{dba.md → http/dba.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/{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
|
@@ -66,6 +66,21 @@ function isNotFoundError(err) {
|
|
|
66
66
|
// ---------------------------------------------------------------------------
|
|
67
67
|
// CRUD
|
|
68
68
|
// ---------------------------------------------------------------------------
|
|
69
|
+
/**
|
|
70
|
+
* List YAML workflows with optional filtering and pagination.
|
|
71
|
+
*
|
|
72
|
+
* Delegates to the DB layer. Returns 404 when a filter references an invalid UUID.
|
|
73
|
+
*
|
|
74
|
+
* @param input.status — lifecycle filter (draft, deployed, active, archived)
|
|
75
|
+
* @param input.graph_topic — filter by the HotMesh subscription topic
|
|
76
|
+
* @param input.app_id — filter by namespace (MCP server name)
|
|
77
|
+
* @param input.search — free-text search across workflow name/description
|
|
78
|
+
* @param input.source_workflow_id — filter by the execution trace this workflow was compiled from
|
|
79
|
+
* @param input.set_id — filter by compositional set membership
|
|
80
|
+
* @param input.limit — max rows to return
|
|
81
|
+
* @param input.offset — pagination offset
|
|
82
|
+
* @returns `{ status: 200, data: YamlWorkflow[] }` matching workflows
|
|
83
|
+
*/
|
|
69
84
|
async function listYamlWorkflows(input) {
|
|
70
85
|
try {
|
|
71
86
|
const result = await yamlDb.listYamlWorkflows({
|
|
@@ -87,6 +102,25 @@ async function listYamlWorkflows(input) {
|
|
|
87
102
|
return { status: 500, error: err.message };
|
|
88
103
|
}
|
|
89
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Compile an execution trace into a new YAML workflow (draft).
|
|
107
|
+
*
|
|
108
|
+
* Validates that the source execution did not exhaust its tool rounds, checks for
|
|
109
|
+
* topic collisions in the target namespace, then delegates to the LLM-based YAML
|
|
110
|
+
* generator. The resulting YAML, schemas, and activity manifest are persisted as a
|
|
111
|
+
* new draft record. Auto-derived tags are merged with any user-supplied tags.
|
|
112
|
+
*
|
|
113
|
+
* @param input.workflow_id — ID of the source execution trace to compile from
|
|
114
|
+
* @param input.task_queue — HotMesh task queue the source execution ran on
|
|
115
|
+
* @param input.workflow_name — type name of the source workflow
|
|
116
|
+
* @param input.name — tool name for the new workflow (no dashes; used to derive the topic)
|
|
117
|
+
* @param input.description — human-readable description passed to the generator
|
|
118
|
+
* @param input.app_id — target namespace (defaults to "longtail")
|
|
119
|
+
* @param input.subscribes — explicit subscription topic override (otherwise derived from name)
|
|
120
|
+
* @param input.tags — additional tags to merge with auto-derived tags
|
|
121
|
+
* @param input.compilation_feedback — natural-language feedback to steer the LLM compilation
|
|
122
|
+
* @returns `{ status: 201, data: YamlWorkflow }` the newly created draft record
|
|
123
|
+
*/
|
|
90
124
|
async function createYamlWorkflow(input) {
|
|
91
125
|
try {
|
|
92
126
|
const { workflow_id, task_queue, workflow_name, name, description, app_id, subscribes, tags: userTags, compilation_feedback } = input;
|
|
@@ -163,6 +197,23 @@ async function createYamlWorkflow(input) {
|
|
|
163
197
|
return { status: 500, error: err.message };
|
|
164
198
|
}
|
|
165
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* Create a YAML workflow directly from user-supplied YAML content (no compilation).
|
|
202
|
+
*
|
|
203
|
+
* Sanitizes the name, app_id, and graph_topic to lowercase alphanumeric characters.
|
|
204
|
+
* Rewrites the `subscribes`, `id`, and `topic` fields inside the YAML to match the
|
|
205
|
+
* sanitized values. Checks for topic collisions before persisting.
|
|
206
|
+
*
|
|
207
|
+
* @param input.name — tool name (sanitized to lowercase alphanumeric, periods, dashes, underscores)
|
|
208
|
+
* @param input.description — human-readable description; also stored as original_prompt
|
|
209
|
+
* @param input.yaml_content — raw HotMesh YAML definition
|
|
210
|
+
* @param input.input_schema — JSON Schema describing the workflow's input (defaults to empty object)
|
|
211
|
+
* @param input.activity_manifest — list of activity declarations (defaults to empty array)
|
|
212
|
+
* @param input.tags — classification tags (defaults to empty array)
|
|
213
|
+
* @param input.app_id — target namespace / MCP server name (defaults to "longtail", sanitized to lowercase alphanumeric)
|
|
214
|
+
* @param input.graph_topic — subscription topic override (defaults to sanitized name; overridden by `subscribes` in YAML if present)
|
|
215
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the persisted workflow record
|
|
216
|
+
*/
|
|
166
217
|
async function createYamlWorkflowDirect(input) {
|
|
167
218
|
try {
|
|
168
219
|
const { name, description, yaml_content, input_schema, activity_manifest, tags, app_id, graph_topic } = input;
|
|
@@ -219,6 +270,11 @@ async function createYamlWorkflowDirect(input) {
|
|
|
219
270
|
return { status: 500, error: err.message };
|
|
220
271
|
}
|
|
221
272
|
}
|
|
273
|
+
/**
|
|
274
|
+
* Retrieve all distinct app_id namespaces that have at least one YAML workflow.
|
|
275
|
+
*
|
|
276
|
+
* @returns `{ status: 200, data: { app_ids: string[] } }` sorted list of namespace identifiers
|
|
277
|
+
*/
|
|
222
278
|
async function getAppIds() {
|
|
223
279
|
try {
|
|
224
280
|
const appIds = await yamlDb.getDistinctAppIds();
|
|
@@ -228,6 +284,12 @@ async function getAppIds() {
|
|
|
228
284
|
return { status: 500, error: err.message };
|
|
229
285
|
}
|
|
230
286
|
}
|
|
287
|
+
/**
|
|
288
|
+
* Fetch a single YAML workflow by its primary key.
|
|
289
|
+
*
|
|
290
|
+
* @param input.id — UUID of the workflow record
|
|
291
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the full workflow record, or 404 if not found
|
|
292
|
+
*/
|
|
231
293
|
async function getYamlWorkflow(input) {
|
|
232
294
|
try {
|
|
233
295
|
const wf = await yamlDb.getYamlWorkflow(input.id);
|
|
@@ -243,6 +305,15 @@ async function getYamlWorkflow(input) {
|
|
|
243
305
|
return { status: 500, error: err.message };
|
|
244
306
|
}
|
|
245
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* Partially update a YAML workflow record.
|
|
310
|
+
*
|
|
311
|
+
* Accepts arbitrary fields beyond `id` and forwards them to the DB update layer.
|
|
312
|
+
*
|
|
313
|
+
* @param input.id — UUID of the workflow to update
|
|
314
|
+
* @param input.[key] — any mutable workflow fields (name, description, yaml_content, tags, etc.)
|
|
315
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the updated record, or 404 if not found
|
|
316
|
+
*/
|
|
246
317
|
async function updateYamlWorkflow(input) {
|
|
247
318
|
try {
|
|
248
319
|
const { id, ...fields } = input;
|
|
@@ -259,6 +330,19 @@ async function updateYamlWorkflow(input) {
|
|
|
259
330
|
return { status: 500, error: err.message };
|
|
260
331
|
}
|
|
261
332
|
}
|
|
333
|
+
/**
|
|
334
|
+
* Re-compile an existing YAML workflow from its original execution trace.
|
|
335
|
+
*
|
|
336
|
+
* Looks up the source workflow reference, re-runs the LLM-based YAML generator, and
|
|
337
|
+
* overwrites the YAML content, schemas, manifest, and tags in place. When
|
|
338
|
+
* compilation_feedback is provided, the current YAML is passed as priorFailedYaml so
|
|
339
|
+
* the generator can incorporate the feedback. Archived workflows cannot be regenerated.
|
|
340
|
+
*
|
|
341
|
+
* @param input.id — UUID of the workflow to regenerate
|
|
342
|
+
* @param input.task_queue — override the task queue (otherwise resolved from the source task record)
|
|
343
|
+
* @param input.compilation_feedback — natural-language feedback to steer the re-compilation
|
|
344
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the updated record with new YAML content
|
|
345
|
+
*/
|
|
262
346
|
async function regenerateYamlWorkflow(input) {
|
|
263
347
|
try {
|
|
264
348
|
const wf = await yamlDb.getYamlWorkflow(input.id);
|
|
@@ -307,6 +391,15 @@ async function regenerateYamlWorkflow(input) {
|
|
|
307
391
|
return { status: 500, error: err.message };
|
|
308
392
|
}
|
|
309
393
|
}
|
|
394
|
+
/**
|
|
395
|
+
* Permanently delete a YAML workflow record.
|
|
396
|
+
*
|
|
397
|
+
* Only draft or archived workflows can be deleted. Active or deployed workflows must
|
|
398
|
+
* be archived first.
|
|
399
|
+
*
|
|
400
|
+
* @param input.id — UUID of the workflow to delete
|
|
401
|
+
* @returns `{ status: 200, data: { deleted: true } }` on success, or 400 if the workflow is active/deployed
|
|
402
|
+
*/
|
|
310
403
|
async function deleteYamlWorkflow(input) {
|
|
311
404
|
try {
|
|
312
405
|
const wf = await yamlDb.getYamlWorkflow(input.id);
|
|
@@ -329,6 +422,16 @@ async function deleteYamlWorkflow(input) {
|
|
|
329
422
|
// ---------------------------------------------------------------------------
|
|
330
423
|
// Deployment
|
|
331
424
|
// ---------------------------------------------------------------------------
|
|
425
|
+
/**
|
|
426
|
+
* Deploy a YAML workflow and all sibling workflows sharing its app_id namespace.
|
|
427
|
+
*
|
|
428
|
+
* Merges and deploys the full app_id YAML, registers HotMesh workers for every
|
|
429
|
+
* non-archived sibling, transitions draft/deployed siblings to active, and marks
|
|
430
|
+
* the app_id content as deployed. Uses the app_version declared in the workflow record.
|
|
431
|
+
*
|
|
432
|
+
* @param input.id — UUID of the workflow to deploy
|
|
433
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the refreshed workflow record after deployment
|
|
434
|
+
*/
|
|
332
435
|
async function deployYamlWorkflow(input) {
|
|
333
436
|
try {
|
|
334
437
|
const wf = await yamlDb.getYamlWorkflow(input.id);
|
|
@@ -363,6 +466,16 @@ async function deployYamlWorkflow(input) {
|
|
|
363
466
|
};
|
|
364
467
|
}
|
|
365
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
* Activate a previously deployed YAML workflow and its app_id siblings.
|
|
471
|
+
*
|
|
472
|
+
* Calls the deployer to activate the app_id at its current version, then registers
|
|
473
|
+
* HotMesh workers for all sibling workflows. Siblings in "deployed" status are
|
|
474
|
+
* transitioned to "active". The workflow must already be in deployed or active status.
|
|
475
|
+
*
|
|
476
|
+
* @param input.id — UUID of the workflow to activate
|
|
477
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the refreshed workflow record after activation
|
|
478
|
+
*/
|
|
366
479
|
async function activateYamlWorkflow(input) {
|
|
367
480
|
try {
|
|
368
481
|
const wf = await yamlDb.getYamlWorkflow(input.id);
|
|
@@ -391,6 +504,21 @@ async function activateYamlWorkflow(input) {
|
|
|
391
504
|
return { status: 500, error: err.message };
|
|
392
505
|
}
|
|
393
506
|
}
|
|
507
|
+
/**
|
|
508
|
+
* Invoke an active YAML workflow, executing its DAG pipeline.
|
|
509
|
+
*
|
|
510
|
+
* The workflow must be in "active" status. Delegates to the invoke service which
|
|
511
|
+
* starts the HotMesh execution. Supports both synchronous (wait for result) and
|
|
512
|
+
* asynchronous (fire-and-forget) invocation modes.
|
|
513
|
+
*
|
|
514
|
+
* @param input.id — UUID of the workflow to invoke
|
|
515
|
+
* @param input.data — input payload passed to the workflow's entry point
|
|
516
|
+
* @param input.sync — when true, block until the workflow completes and return its output
|
|
517
|
+
* @param input.timeout — max milliseconds to wait when sync is true
|
|
518
|
+
* @param input.execute_as — override identity for the execution context
|
|
519
|
+
* @param auth — authenticated user context; userId is forwarded to the invoke service
|
|
520
|
+
* @returns `{ status: 200, data: ... }` workflow execution result (sync) or job metadata (async)
|
|
521
|
+
*/
|
|
394
522
|
async function invokeYamlWorkflow(input, auth) {
|
|
395
523
|
try {
|
|
396
524
|
const wf = await yamlDb.getYamlWorkflow(input.id);
|
|
@@ -416,6 +544,16 @@ async function invokeYamlWorkflow(input, auth) {
|
|
|
416
544
|
return { status: 500, error: err.message };
|
|
417
545
|
}
|
|
418
546
|
}
|
|
547
|
+
/**
|
|
548
|
+
* Archive a YAML workflow, removing it from active service.
|
|
549
|
+
*
|
|
550
|
+
* If the workflow is currently active, its HotMesh engine is stopped before
|
|
551
|
+
* transitioning the status to "archived". Archived workflows cannot be invoked
|
|
552
|
+
* or regenerated but can still be viewed or deleted.
|
|
553
|
+
*
|
|
554
|
+
* @param input.id — UUID of the workflow to archive
|
|
555
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the updated record with status "archived"
|
|
556
|
+
*/
|
|
419
557
|
async function archiveYamlWorkflow(input) {
|
|
420
558
|
try {
|
|
421
559
|
const wf = await yamlDb.getYamlWorkflow(input.id);
|
|
@@ -438,6 +576,16 @@ async function archiveYamlWorkflow(input) {
|
|
|
438
576
|
// ---------------------------------------------------------------------------
|
|
439
577
|
// Versions
|
|
440
578
|
// ---------------------------------------------------------------------------
|
|
579
|
+
/**
|
|
580
|
+
* Retrieve the version history for a YAML workflow.
|
|
581
|
+
*
|
|
582
|
+
* Returns a paginated list of version snapshots ordered by version number.
|
|
583
|
+
*
|
|
584
|
+
* @param input.id — UUID of the workflow
|
|
585
|
+
* @param input.limit — max versions to return (defaults to 20)
|
|
586
|
+
* @param input.offset — pagination offset (defaults to 0)
|
|
587
|
+
* @returns `{ status: 200, data: VersionSnapshot[] }` paginated version history
|
|
588
|
+
*/
|
|
441
589
|
async function getVersionHistory(input) {
|
|
442
590
|
try {
|
|
443
591
|
const limit = input.limit ?? 20;
|
|
@@ -452,6 +600,15 @@ async function getVersionHistory(input) {
|
|
|
452
600
|
return { status: 500, error: err.message };
|
|
453
601
|
}
|
|
454
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* Retrieve a specific version snapshot of a YAML workflow.
|
|
605
|
+
*
|
|
606
|
+
* Validates that the version number is a positive integer before querying.
|
|
607
|
+
*
|
|
608
|
+
* @param input.id — UUID of the workflow
|
|
609
|
+
* @param input.version — 1-based version number to retrieve
|
|
610
|
+
* @returns `{ status: 200, data: VersionSnapshot }` the snapshot at the requested version, or 404
|
|
611
|
+
*/
|
|
455
612
|
async function getVersionSnapshot(input) {
|
|
456
613
|
try {
|
|
457
614
|
const version = input.version;
|
|
@@ -471,6 +628,16 @@ async function getVersionSnapshot(input) {
|
|
|
471
628
|
return { status: 500, error: err.message };
|
|
472
629
|
}
|
|
473
630
|
}
|
|
631
|
+
/**
|
|
632
|
+
* Retrieve the raw YAML content for a workflow, optionally at a specific version.
|
|
633
|
+
*
|
|
634
|
+
* When a version is provided, fetches from the version snapshot table. Otherwise
|
|
635
|
+
* returns the current yaml_content from the live workflow record.
|
|
636
|
+
*
|
|
637
|
+
* @param input.id — UUID of the workflow
|
|
638
|
+
* @param input.version — optional version number; when omitted, returns the current content
|
|
639
|
+
* @returns `{ status: 200, data: string }` the raw YAML string
|
|
640
|
+
*/
|
|
474
641
|
async function getYamlContent(input) {
|
|
475
642
|
try {
|
|
476
643
|
if (input.version) {
|
|
@@ -496,6 +663,18 @@ async function getYamlContent(input) {
|
|
|
496
663
|
// ---------------------------------------------------------------------------
|
|
497
664
|
// Cron
|
|
498
665
|
// ---------------------------------------------------------------------------
|
|
666
|
+
/**
|
|
667
|
+
* Set or update the cron schedule for a YAML workflow.
|
|
668
|
+
*
|
|
669
|
+
* Persists the schedule in the DB and restarts the in-process cron timer via the
|
|
670
|
+
* cron registry so the change takes effect immediately.
|
|
671
|
+
*
|
|
672
|
+
* @param input.id — UUID of the workflow to schedule
|
|
673
|
+
* @param input.cron_schedule — cron expression (e.g. "0 * * * *")
|
|
674
|
+
* @param input.cron_envelope — optional payload passed to each scheduled invocation
|
|
675
|
+
* @param input.execute_as — optional identity override for scheduled executions
|
|
676
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the updated workflow record with cron fields set
|
|
677
|
+
*/
|
|
499
678
|
async function setCronSchedule(input) {
|
|
500
679
|
try {
|
|
501
680
|
const wf = await yamlDb.getYamlWorkflow(input.id);
|
|
@@ -518,6 +697,14 @@ async function setCronSchedule(input) {
|
|
|
518
697
|
return { status: 500, error: err.message };
|
|
519
698
|
}
|
|
520
699
|
}
|
|
700
|
+
/**
|
|
701
|
+
* Remove the cron schedule from a YAML workflow.
|
|
702
|
+
*
|
|
703
|
+
* Stops the in-process cron timer first, then clears the schedule fields in the DB.
|
|
704
|
+
*
|
|
705
|
+
* @param input.id — UUID of the workflow to unschedule
|
|
706
|
+
* @returns `{ status: 200, data: YamlWorkflow }` the updated workflow record with cron fields cleared
|
|
707
|
+
*/
|
|
521
708
|
async function clearCronSchedule(input) {
|
|
522
709
|
try {
|
|
523
710
|
const wf = await yamlDb.getYamlWorkflow(input.id);
|
|
@@ -535,6 +722,14 @@ async function clearCronSchedule(input) {
|
|
|
535
722
|
return { status: 500, error: err.message };
|
|
536
723
|
}
|
|
537
724
|
}
|
|
725
|
+
/**
|
|
726
|
+
* List all YAML workflows that have a cron schedule, with their live timer status.
|
|
727
|
+
*
|
|
728
|
+
* Fetches all cron-scheduled workflows from the DB and cross-references with the
|
|
729
|
+
* in-process cron registry to determine which timers are actually running.
|
|
730
|
+
*
|
|
731
|
+
* @returns `{ status: 200, data: { schedules: Array<{ id, name, graph_topic, app_id, cron_schedule, execute_as, active }> } }`
|
|
732
|
+
*/
|
|
538
733
|
async function getCronStatus() {
|
|
539
734
|
try {
|
|
540
735
|
const workflows = await yamlDb.getCronScheduledWorkflows();
|
package/build/examples/seed.js
CHANGED
|
@@ -137,6 +137,24 @@ const SEED_ENVELOPES = [
|
|
|
137
137
|
},
|
|
138
138
|
},
|
|
139
139
|
},
|
|
140
|
+
// -- Process 6: Basic Signal
|
|
141
|
+
{
|
|
142
|
+
label: 'Process 6 — Basic Signal',
|
|
143
|
+
workflowName: 'basicSignal',
|
|
144
|
+
taskQueue: 'long-tail-examples',
|
|
145
|
+
envelope: {
|
|
146
|
+
data: {
|
|
147
|
+
message: 'Seed deployment needs approval before proceeding.',
|
|
148
|
+
role: 'reviewer',
|
|
149
|
+
},
|
|
150
|
+
metadata: {
|
|
151
|
+
certified: false,
|
|
152
|
+
source: 'seed',
|
|
153
|
+
process: 'basic-signal',
|
|
154
|
+
description: 'Lightweight signal-based escalation — workflow stays running, no interceptor. Claim the escalation, fill the form, and resolve to resume the workflow.',
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
140
158
|
];
|
|
141
159
|
// Escalation chains: reviewer -> admin -> engineer (and cross-links)
|
|
142
160
|
const SEED_CHAINS = [
|
|
@@ -24,11 +24,46 @@ export interface BasicEchoEnvelopeData {
|
|
|
24
24
|
/** Duration to sleep before echoing (seconds). */
|
|
25
25
|
sleepSeconds?: number;
|
|
26
26
|
}
|
|
27
|
+
/** Basic signal — lightweight escalation via conditionLT. */
|
|
28
|
+
export interface BasicSignalEnvelopeData {
|
|
29
|
+
/** Message shown to the reviewer in the escalation description. */
|
|
30
|
+
message?: string;
|
|
31
|
+
/** Role to assign the escalation to. */
|
|
32
|
+
role?: string;
|
|
33
|
+
}
|
|
34
|
+
/** Assembly line — durable orchestrator with sequential human task queues. */
|
|
35
|
+
export interface AssemblyLineEnvelopeData {
|
|
36
|
+
/** Product name for the assembly run. */
|
|
37
|
+
productName: string;
|
|
38
|
+
/** Ordered stations the product passes through. */
|
|
39
|
+
stations: Array<{
|
|
40
|
+
stationName: string;
|
|
41
|
+
role: string;
|
|
42
|
+
instructions: string;
|
|
43
|
+
}>;
|
|
44
|
+
}
|
|
45
|
+
/** Step iterator — generic loop over data-driven steps with human escalations. */
|
|
46
|
+
export interface StepIteratorEnvelopeData {
|
|
47
|
+
/** Display name for this run. */
|
|
48
|
+
name: string;
|
|
49
|
+
/** Dynamic list of steps — each spawns a child workflow with an escalation. */
|
|
50
|
+
steps: Array<{
|
|
51
|
+
stationName: string;
|
|
52
|
+
role: string;
|
|
53
|
+
instructions: string;
|
|
54
|
+
}>;
|
|
55
|
+
}
|
|
56
|
+
/** Reverter — step loop with revert support (same shape as stepIterator). */
|
|
57
|
+
export type ReverterEnvelopeData = StepIteratorEnvelopeData;
|
|
27
58
|
/** Map of invocable workflow type → its typed envelope data shape. */
|
|
28
59
|
export type WorkflowEnvelopeMap = {
|
|
29
60
|
reviewContent: ReviewContentEnvelopeData;
|
|
30
61
|
kitchenSink: KitchenSinkEnvelopeData;
|
|
31
62
|
basicEcho: BasicEchoEnvelopeData;
|
|
63
|
+
basicSignal: BasicSignalEnvelopeData;
|
|
64
|
+
assemblyLine: AssemblyLineEnvelopeData;
|
|
65
|
+
stepIterator: StepIteratorEnvelopeData;
|
|
66
|
+
reverter: ReverterEnvelopeData;
|
|
32
67
|
};
|
|
33
68
|
/** All invocable workflow type names. */
|
|
34
69
|
export type InvocableWorkflowType = keyof WorkflowEnvelopeMap;
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* Resolver types define the payload shape for resolving escalations.
|
|
6
6
|
* Per-workflow types are re-exported for convenience.
|
|
7
7
|
*/
|
|
8
|
-
export type { ReviewContentEnvelopeData, KitchenSinkEnvelopeData, BasicEchoEnvelopeData, WorkflowEnvelopeMap, InvocableWorkflowType, } from './envelopes';
|
|
8
|
+
export type { ReviewContentEnvelopeData, KitchenSinkEnvelopeData, BasicEchoEnvelopeData, BasicSignalEnvelopeData, AssemblyLineEnvelopeData, StepIteratorEnvelopeData, ReverterEnvelopeData, WorkflowEnvelopeMap, InvocableWorkflowType, } from './envelopes';
|
|
9
9
|
export type { ResolverLTBlock, BaseResolverPayload, ReviewContentResolverPayload, } from './resolvers';
|
|
10
10
|
export type { ReviewContentInput, ReviewAnalysis, ReviewContentReturnData, ReviewContentReturn, ReviewContentEscalationData, ReviewContentEscalation, } from '../workflows/review-content/types';
|
|
@@ -37,6 +37,11 @@ exports.exampleWorkers = void 0;
|
|
|
37
37
|
const reviewContentWorkflow = __importStar(require("./workflows/review-content"));
|
|
38
38
|
const kitchenSinkWorkflow = __importStar(require("./workflows/kitchen-sink"));
|
|
39
39
|
const basicEchoWorkflow = __importStar(require("./workflows/basic-echo"));
|
|
40
|
+
const assemblyLineWorkflow = __importStar(require("./workflows/assembly-line"));
|
|
41
|
+
const workstationWorkflow = __importStar(require("./workflows/assembly-line/worker"));
|
|
42
|
+
const stepIteratorWorkflow = __importStar(require("./workflows/assembly-line/iterator"));
|
|
43
|
+
const reverterWorkflow = __importStar(require("./workflows/assembly-line/reverter"));
|
|
44
|
+
const basicSignalWorkflow = __importStar(require("./workflows/basic-signal"));
|
|
40
45
|
/**
|
|
41
46
|
* Example workers that ship with Long Tail.
|
|
42
47
|
* Pass these to `start({ workers: [...exampleWorkers] })` or enable
|
|
@@ -46,4 +51,9 @@ exports.exampleWorkers = [
|
|
|
46
51
|
{ taskQueue: 'long-tail-examples', workflow: reviewContentWorkflow.reviewContent },
|
|
47
52
|
{ taskQueue: 'long-tail-examples', workflow: kitchenSinkWorkflow.kitchenSink },
|
|
48
53
|
{ taskQueue: 'long-tail-examples', workflow: basicEchoWorkflow.basicEcho },
|
|
54
|
+
{ taskQueue: 'long-tail-examples', workflow: assemblyLineWorkflow.assemblyLine },
|
|
55
|
+
{ taskQueue: 'long-tail-examples', workflow: workstationWorkflow.workstation },
|
|
56
|
+
{ taskQueue: 'long-tail-examples', workflow: stepIteratorWorkflow.stepIterator },
|
|
57
|
+
{ taskQueue: 'long-tail-examples', workflow: reverterWorkflow.reverter },
|
|
58
|
+
{ taskQueue: 'long-tail-examples', workflow: basicSignalWorkflow.basicSignal },
|
|
49
59
|
];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assembly Line Activities
|
|
3
|
+
*
|
|
4
|
+
* Side-effect functions that run outside the deterministic workflow
|
|
5
|
+
* sandbox. Each is wrapped via proxyActivities so results are
|
|
6
|
+
* checkpointed and replayed on restart.
|
|
7
|
+
*
|
|
8
|
+
* Two responsibilities:
|
|
9
|
+
* 1. Create an escalation with signal routing so the resolve API
|
|
10
|
+
* can wake the paused child workflow.
|
|
11
|
+
* 2. Signal the parent orchestrator when the child completes.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createStationEscalation(input: {
|
|
14
|
+
role: string;
|
|
15
|
+
stationName: string;
|
|
16
|
+
instructions: string;
|
|
17
|
+
workflowId: string;
|
|
18
|
+
workflowType: string;
|
|
19
|
+
taskQueue: string;
|
|
20
|
+
signalId: string;
|
|
21
|
+
}): Promise<string>;
|
|
22
|
+
export declare function signalParent(input: {
|
|
23
|
+
parentTaskQueue: string;
|
|
24
|
+
parentWorkflowType: string;
|
|
25
|
+
parentWorkflowId: string;
|
|
26
|
+
signalId: string;
|
|
27
|
+
data: any;
|
|
28
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Assembly Line Activities
|
|
4
|
+
*
|
|
5
|
+
* Side-effect functions that run outside the deterministic workflow
|
|
6
|
+
* sandbox. Each is wrapped via proxyActivities so results are
|
|
7
|
+
* checkpointed and replayed on restart.
|
|
8
|
+
*
|
|
9
|
+
* Two responsibilities:
|
|
10
|
+
* 1. Create an escalation with signal routing so the resolve API
|
|
11
|
+
* can wake the paused child workflow.
|
|
12
|
+
* 2. Signal the parent orchestrator when the child completes.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.createStationEscalation = createStationEscalation;
|
|
16
|
+
exports.signalParent = signalParent;
|
|
17
|
+
const hotmesh_1 = require("@hotmeshio/hotmesh");
|
|
18
|
+
const db_1 = require("../../../lib/db");
|
|
19
|
+
const escalation_1 = require("../../../services/escalation");
|
|
20
|
+
// ── Create station escalation ──────────────────────────────────────
|
|
21
|
+
async function createStationEscalation(input) {
|
|
22
|
+
const escalation = await (0, escalation_1.createEscalation)({
|
|
23
|
+
type: 'assemblyLine',
|
|
24
|
+
subtype: input.stationName,
|
|
25
|
+
description: input.instructions,
|
|
26
|
+
priority: 2,
|
|
27
|
+
role: input.role,
|
|
28
|
+
envelope: JSON.stringify({ station: input.stationName }),
|
|
29
|
+
workflow_id: input.workflowId,
|
|
30
|
+
task_queue: input.taskQueue,
|
|
31
|
+
workflow_type: input.workflowType,
|
|
32
|
+
});
|
|
33
|
+
await (0, escalation_1.enrichEscalationRouting)(escalation.id, {
|
|
34
|
+
signal_routing: {
|
|
35
|
+
engine: 'durable',
|
|
36
|
+
taskQueue: input.taskQueue,
|
|
37
|
+
workflowType: input.workflowType,
|
|
38
|
+
workflowId: input.workflowId,
|
|
39
|
+
signalId: input.signalId,
|
|
40
|
+
},
|
|
41
|
+
}, {
|
|
42
|
+
workflowType: input.workflowType,
|
|
43
|
+
workflowId: input.workflowId,
|
|
44
|
+
taskQueue: input.taskQueue,
|
|
45
|
+
});
|
|
46
|
+
return escalation.id;
|
|
47
|
+
}
|
|
48
|
+
// ── Signal parent orchestrator ─────────────────────────────────────
|
|
49
|
+
async function signalParent(input) {
|
|
50
|
+
const client = new hotmesh_1.Durable.Client({ connection: (0, db_1.getConnection)() });
|
|
51
|
+
const handle = await client.workflow.getHandle(input.parentTaskQueue, input.parentWorkflowType, input.parentWorkflowId);
|
|
52
|
+
await handle.signal(input.signalId, input.data);
|
|
53
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assembly Line — durable orchestrator with human task queues.
|
|
3
|
+
*
|
|
4
|
+
* Demonstrates the core composition pattern without the LT interceptor:
|
|
5
|
+
* startChild → spawn a child workflow (fire-and-forget)
|
|
6
|
+
* condition → pause until the child signals back
|
|
7
|
+
* signal → child wakes the parent when done
|
|
8
|
+
*
|
|
9
|
+
* A product moves through sequential workstations. Each station
|
|
10
|
+
* creates an escalation for a human operator, pauses, then signals
|
|
11
|
+
* the parent when the human resolves it.
|
|
12
|
+
*
|
|
13
|
+
* No registration, no certification, no interceptor — just Durable
|
|
14
|
+
* primitives and the escalation table.
|
|
15
|
+
*/
|
|
16
|
+
import type { LTEnvelope } from '../../../types';
|
|
17
|
+
export declare function assemblyLine(envelope: LTEnvelope): Promise<any>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Assembly Line — durable orchestrator with human task queues.
|
|
4
|
+
*
|
|
5
|
+
* Demonstrates the core composition pattern without the LT interceptor:
|
|
6
|
+
* startChild → spawn a child workflow (fire-and-forget)
|
|
7
|
+
* condition → pause until the child signals back
|
|
8
|
+
* signal → child wakes the parent when done
|
|
9
|
+
*
|
|
10
|
+
* A product moves through sequential workstations. Each station
|
|
11
|
+
* creates an escalation for a human operator, pauses, then signals
|
|
12
|
+
* the parent when the human resolves it.
|
|
13
|
+
*
|
|
14
|
+
* No registration, no certification, no interceptor — just Durable
|
|
15
|
+
* primitives and the escalation table.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.assemblyLine = assemblyLine;
|
|
19
|
+
const hotmesh_1 = require("@hotmeshio/hotmesh");
|
|
20
|
+
const defaults_1 = require("../../../modules/defaults");
|
|
21
|
+
async function assemblyLine(envelope) {
|
|
22
|
+
const { productName, stations } = envelope.data;
|
|
23
|
+
const ctx = hotmesh_1.Durable.workflow.workflowInfo();
|
|
24
|
+
const results = [];
|
|
25
|
+
for (const [i, station] of stations.entries()) {
|
|
26
|
+
const signalId = `station-${i}-${ctx.workflowId}`;
|
|
27
|
+
const childWorkflowId = `workstation-${ctx.workflowId}-${i}`;
|
|
28
|
+
// Spawn child — fire-and-forget; only the start is awaited
|
|
29
|
+
await hotmesh_1.Durable.workflow.startChild({
|
|
30
|
+
workflowName: 'workstation',
|
|
31
|
+
args: [
|
|
32
|
+
{
|
|
33
|
+
data: {
|
|
34
|
+
...station,
|
|
35
|
+
parentSignalId: signalId,
|
|
36
|
+
parentTaskQueue: 'long-tail-examples',
|
|
37
|
+
parentWorkflowType: 'assemblyLine',
|
|
38
|
+
parentWorkflowId: ctx.workflowId,
|
|
39
|
+
},
|
|
40
|
+
metadata: { source: 'assembly-line', station: station.stationName },
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
taskQueue: 'long-tail-examples',
|
|
44
|
+
workflowId: childWorkflowId,
|
|
45
|
+
expire: defaults_1.JOB_EXPIRE_SECS,
|
|
46
|
+
entity: 'workstation',
|
|
47
|
+
});
|
|
48
|
+
// Pause until the child signals back with its result
|
|
49
|
+
const result = await hotmesh_1.Durable.workflow.condition(signalId);
|
|
50
|
+
results.push(result);
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
type: 'return',
|
|
54
|
+
data: {
|
|
55
|
+
productName,
|
|
56
|
+
stations: results,
|
|
57
|
+
completedAt: new Date().toISOString(),
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step Iterator — generic durable loop over dynamic steps.
|
|
3
|
+
*
|
|
4
|
+
* Proves that the number and shape of steps can be entirely
|
|
5
|
+
* data-driven. The orchestrator knows nothing about grinder,
|
|
6
|
+
* gluer, or any specific station — it just walks the list,
|
|
7
|
+
* spawns a child for each, and waits for the signal.
|
|
8
|
+
*
|
|
9
|
+
* Reuses the same `workstation` child workflow as the assembly line.
|
|
10
|
+
*/
|
|
11
|
+
import type { LTEnvelope } from '../../../types';
|
|
12
|
+
export declare function stepIterator(envelope: LTEnvelope): Promise<any>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Step Iterator — generic durable loop over dynamic steps.
|
|
4
|
+
*
|
|
5
|
+
* Proves that the number and shape of steps can be entirely
|
|
6
|
+
* data-driven. The orchestrator knows nothing about grinder,
|
|
7
|
+
* gluer, or any specific station — it just walks the list,
|
|
8
|
+
* spawns a child for each, and waits for the signal.
|
|
9
|
+
*
|
|
10
|
+
* Reuses the same `workstation` child workflow as the assembly line.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.stepIterator = stepIterator;
|
|
14
|
+
const hotmesh_1 = require("@hotmeshio/hotmesh");
|
|
15
|
+
const defaults_1 = require("../../../modules/defaults");
|
|
16
|
+
async function stepIterator(envelope) {
|
|
17
|
+
const { name, steps } = envelope.data;
|
|
18
|
+
const ctx = hotmesh_1.Durable.workflow.workflowInfo();
|
|
19
|
+
const results = [];
|
|
20
|
+
for (const [i, step] of steps.entries()) {
|
|
21
|
+
const signalId = `step-${i}-${ctx.workflowId}`;
|
|
22
|
+
const childWorkflowId = `workstation-${ctx.workflowId}-${i}`;
|
|
23
|
+
await hotmesh_1.Durable.workflow.startChild({
|
|
24
|
+
workflowName: 'workstation',
|
|
25
|
+
args: [
|
|
26
|
+
{
|
|
27
|
+
data: {
|
|
28
|
+
...step,
|
|
29
|
+
parentSignalId: signalId,
|
|
30
|
+
parentTaskQueue: 'long-tail-examples',
|
|
31
|
+
parentWorkflowType: 'stepIterator',
|
|
32
|
+
parentWorkflowId: ctx.workflowId,
|
|
33
|
+
},
|
|
34
|
+
metadata: { source: 'step-iterator', step: i },
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
taskQueue: 'long-tail-examples',
|
|
38
|
+
workflowId: childWorkflowId,
|
|
39
|
+
expire: defaults_1.JOB_EXPIRE_SECS,
|
|
40
|
+
entity: 'workstation',
|
|
41
|
+
});
|
|
42
|
+
const result = await hotmesh_1.Durable.workflow.condition(signalId);
|
|
43
|
+
results.push(result);
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
type: 'return',
|
|
47
|
+
data: {
|
|
48
|
+
name,
|
|
49
|
+
totalSteps: steps.length,
|
|
50
|
+
steps: results,
|
|
51
|
+
completedAt: new Date().toISOString(),
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reverter — durable step loop with revert support.
|
|
3
|
+
*
|
|
4
|
+
* Like stepIterator, but each human resolution can send the
|
|
5
|
+
* pipeline backwards. The resolver payload controls flow:
|
|
6
|
+
*
|
|
7
|
+
* { approved: true } → advance to next step
|
|
8
|
+
* { approved: false, revertSteps: 1 } → go back 1 step
|
|
9
|
+
* { approved: false, revertSteps: 2 } → go back 2 steps
|
|
10
|
+
*
|
|
11
|
+
* The orchestrator tracks a monotonic attempt counter so every
|
|
12
|
+
* child spawn gets a unique workflow ID and signal key — even
|
|
13
|
+
* when revisiting a step after a revert.
|
|
14
|
+
*
|
|
15
|
+
* The full history (approvals + reverts) is recorded in the result.
|
|
16
|
+
*/
|
|
17
|
+
import type { LTEnvelope } from '../../../types';
|
|
18
|
+
export declare function reverter(envelope: LTEnvelope): Promise<any>;
|