@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
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Reverter — durable step loop with revert support.
|
|
4
|
+
*
|
|
5
|
+
* Like stepIterator, but each human resolution can send the
|
|
6
|
+
* pipeline backwards. The resolver payload controls flow:
|
|
7
|
+
*
|
|
8
|
+
* { approved: true } → advance to next step
|
|
9
|
+
* { approved: false, revertSteps: 1 } → go back 1 step
|
|
10
|
+
* { approved: false, revertSteps: 2 } → go back 2 steps
|
|
11
|
+
*
|
|
12
|
+
* The orchestrator tracks a monotonic attempt counter so every
|
|
13
|
+
* child spawn gets a unique workflow ID and signal key — even
|
|
14
|
+
* when revisiting a step after a revert.
|
|
15
|
+
*
|
|
16
|
+
* The full history (approvals + reverts) is recorded in the result.
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.reverter = reverter;
|
|
20
|
+
const hotmesh_1 = require("@hotmeshio/hotmesh");
|
|
21
|
+
const defaults_1 = require("../../../modules/defaults");
|
|
22
|
+
async function reverter(envelope) {
|
|
23
|
+
const { name, steps } = envelope.data;
|
|
24
|
+
const ctx = hotmesh_1.Durable.workflow.workflowInfo();
|
|
25
|
+
const history = [];
|
|
26
|
+
const finalResults = [];
|
|
27
|
+
let stepIndex = 0;
|
|
28
|
+
let attempt = 0;
|
|
29
|
+
while (stepIndex < steps.length) {
|
|
30
|
+
const step = steps[stepIndex];
|
|
31
|
+
const signalId = `step-${stepIndex}-a${attempt}-${ctx.workflowId}`;
|
|
32
|
+
const childWorkflowId = `workstation-${ctx.workflowId}-${stepIndex}-a${attempt}`;
|
|
33
|
+
await hotmesh_1.Durable.workflow.startChild({
|
|
34
|
+
workflowName: 'workstation',
|
|
35
|
+
args: [
|
|
36
|
+
{
|
|
37
|
+
data: {
|
|
38
|
+
...step,
|
|
39
|
+
parentSignalId: signalId,
|
|
40
|
+
parentTaskQueue: 'long-tail-examples',
|
|
41
|
+
parentWorkflowType: 'reverter',
|
|
42
|
+
parentWorkflowId: ctx.workflowId,
|
|
43
|
+
},
|
|
44
|
+
metadata: {
|
|
45
|
+
source: 'reverter',
|
|
46
|
+
step: stepIndex,
|
|
47
|
+
attempt,
|
|
48
|
+
totalSteps: steps.length,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
taskQueue: 'long-tail-examples',
|
|
53
|
+
workflowId: childWorkflowId,
|
|
54
|
+
expire: defaults_1.JOB_EXPIRE_SECS,
|
|
55
|
+
entity: 'workstation',
|
|
56
|
+
});
|
|
57
|
+
const result = await hotmesh_1.Durable.workflow.condition(signalId);
|
|
58
|
+
const approved = result.resolution?.approved !== false;
|
|
59
|
+
const revertSteps = Number(result.resolution?.revertSteps) || 0;
|
|
60
|
+
history.push({
|
|
61
|
+
type: approved ? 'advance' : 'revert',
|
|
62
|
+
stepIndex,
|
|
63
|
+
stationName: step.stationName,
|
|
64
|
+
attempt,
|
|
65
|
+
resolution: result.resolution,
|
|
66
|
+
completedAt: result.completedAt,
|
|
67
|
+
});
|
|
68
|
+
attempt++;
|
|
69
|
+
if (approved) {
|
|
70
|
+
finalResults[stepIndex] = result;
|
|
71
|
+
stepIndex++;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
// Clamp revert target to 0
|
|
75
|
+
stepIndex = Math.max(0, stepIndex - revertSteps);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
type: 'return',
|
|
80
|
+
data: {
|
|
81
|
+
name,
|
|
82
|
+
totalSteps: steps.length,
|
|
83
|
+
totalAttempts: attempt,
|
|
84
|
+
steps: finalResults,
|
|
85
|
+
history,
|
|
86
|
+
completedAt: new Date().toISOString(),
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assembly Line types.
|
|
3
|
+
*
|
|
4
|
+
* Defines the station config passed in the envelope and the
|
|
5
|
+
* result shape each station returns when a human resolves it.
|
|
6
|
+
*/
|
|
7
|
+
export interface AssemblyLineStation {
|
|
8
|
+
stationName: string;
|
|
9
|
+
role: string;
|
|
10
|
+
instructions: string;
|
|
11
|
+
}
|
|
12
|
+
export interface StationEnvelopeData {
|
|
13
|
+
stationName: string;
|
|
14
|
+
role: string;
|
|
15
|
+
instructions: string;
|
|
16
|
+
parentSignalId: string;
|
|
17
|
+
parentTaskQueue: string;
|
|
18
|
+
parentWorkflowType: string;
|
|
19
|
+
parentWorkflowId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface StationResult {
|
|
22
|
+
stationName: string;
|
|
23
|
+
resolution: Record<string, any>;
|
|
24
|
+
completedAt: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workstation — child workflow for the assembly line.
|
|
3
|
+
*
|
|
4
|
+
* Each workstation:
|
|
5
|
+
* 1. Creates an escalation assigned to its role (grinder, gluer, etc.)
|
|
6
|
+
* 2. Pauses (condition) until a human claims and resolves the escalation
|
|
7
|
+
* 3. Signals the parent orchestrator with the result
|
|
8
|
+
*
|
|
9
|
+
* No interceptor, no registration — just raw Durable primitives
|
|
10
|
+
* and a direct escalation record with signal routing metadata.
|
|
11
|
+
*/
|
|
12
|
+
import type { LTEnvelope } from '../../../types';
|
|
13
|
+
export declare function workstation(envelope: LTEnvelope): Promise<any>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Workstation — child workflow for the assembly line.
|
|
4
|
+
*
|
|
5
|
+
* Each workstation:
|
|
6
|
+
* 1. Creates an escalation assigned to its role (grinder, gluer, etc.)
|
|
7
|
+
* 2. Pauses (condition) until a human claims and resolves the escalation
|
|
8
|
+
* 3. Signals the parent orchestrator with the result
|
|
9
|
+
*
|
|
10
|
+
* No interceptor, no registration — just raw Durable primitives
|
|
11
|
+
* and a direct escalation record with signal routing metadata.
|
|
12
|
+
*/
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.workstation = workstation;
|
|
48
|
+
const hotmesh_1 = require("@hotmeshio/hotmesh");
|
|
49
|
+
const activities = __importStar(require("./activities"));
|
|
50
|
+
const { createStationEscalation, signalParent } = hotmesh_1.Durable.workflow.proxyActivities({ activities });
|
|
51
|
+
async function workstation(envelope) {
|
|
52
|
+
const { stationName, role, instructions, parentSignalId, parentTaskQueue, parentWorkflowType, parentWorkflowId, } = envelope.data;
|
|
53
|
+
const ctx = hotmesh_1.Durable.workflow.workflowInfo();
|
|
54
|
+
const localSignalId = `station-done-${ctx.workflowId}`;
|
|
55
|
+
// 1. Create escalation — human sees this in their queue
|
|
56
|
+
await createStationEscalation({
|
|
57
|
+
role,
|
|
58
|
+
stationName,
|
|
59
|
+
instructions,
|
|
60
|
+
workflowId: ctx.workflowId,
|
|
61
|
+
workflowType: 'workstation',
|
|
62
|
+
taskQueue: 'long-tail-examples',
|
|
63
|
+
signalId: localSignalId,
|
|
64
|
+
});
|
|
65
|
+
// 2. Pause until the human resolves the escalation
|
|
66
|
+
const resolution = await hotmesh_1.Durable.workflow.condition(localSignalId);
|
|
67
|
+
// 3. Build result and signal the parent orchestrator
|
|
68
|
+
const result = {
|
|
69
|
+
stationName,
|
|
70
|
+
resolution,
|
|
71
|
+
completedAt: new Date().toISOString(),
|
|
72
|
+
};
|
|
73
|
+
await signalParent({
|
|
74
|
+
parentTaskQueue,
|
|
75
|
+
parentWorkflowType,
|
|
76
|
+
parentWorkflowId,
|
|
77
|
+
signalId: parentSignalId,
|
|
78
|
+
data: result,
|
|
79
|
+
});
|
|
80
|
+
return { type: 'return', data: result };
|
|
81
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Basic Signal Activities
|
|
3
|
+
*
|
|
4
|
+
* Simple activity for post-resolution processing. The escalation
|
|
5
|
+
* creation and resolution are handled via interceptor activities
|
|
6
|
+
* (ltCreateEscalation / ltResolveEscalation) proxied from the workflow.
|
|
7
|
+
*/
|
|
8
|
+
export declare function processApproval(input: {
|
|
9
|
+
approved: boolean;
|
|
10
|
+
notes: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}): Promise<{
|
|
13
|
+
message: string;
|
|
14
|
+
approved: boolean;
|
|
15
|
+
notes: string;
|
|
16
|
+
processedAt: string;
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Basic Signal Activities
|
|
4
|
+
*
|
|
5
|
+
* Simple activity for post-resolution processing. The escalation
|
|
6
|
+
* creation and resolution are handled via interceptor activities
|
|
7
|
+
* (ltCreateEscalation / ltResolveEscalation) proxied from the workflow.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.processApproval = processApproval;
|
|
11
|
+
async function processApproval(input) {
|
|
12
|
+
return {
|
|
13
|
+
message: input.message,
|
|
14
|
+
approved: input.approved,
|
|
15
|
+
notes: input.notes,
|
|
16
|
+
processedAt: new Date().toISOString(),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Basic Signal Workflow
|
|
3
|
+
*
|
|
4
|
+
* Lightweight signal-based escalation — the workflow stays running
|
|
5
|
+
* while waiting for human input. No interceptor, no certification.
|
|
6
|
+
*
|
|
7
|
+
* 1. Creates an escalation with `signal_id` in metadata
|
|
8
|
+
* 2. Pauses via `conditionLT(signalId)` — workflow stays alive
|
|
9
|
+
* 3. Dashboard resolver signals in with the form payload
|
|
10
|
+
* 4. `conditionLT` resolves the escalation via durable activity
|
|
11
|
+
* 5. Workflow continues with the clean resolver payload
|
|
12
|
+
*
|
|
13
|
+
* This demonstrates the lightweight alternative to the certified
|
|
14
|
+
* interceptor pattern — same escalation UX, simpler wiring.
|
|
15
|
+
*/
|
|
16
|
+
import type { LTEnvelope } from '../../../types';
|
|
17
|
+
export declare function basicSignal(envelope: LTEnvelope): Promise<any>;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Basic Signal Workflow
|
|
4
|
+
*
|
|
5
|
+
* Lightweight signal-based escalation — the workflow stays running
|
|
6
|
+
* while waiting for human input. No interceptor, no certification.
|
|
7
|
+
*
|
|
8
|
+
* 1. Creates an escalation with `signal_id` in metadata
|
|
9
|
+
* 2. Pauses via `conditionLT(signalId)` — workflow stays alive
|
|
10
|
+
* 3. Dashboard resolver signals in with the form payload
|
|
11
|
+
* 4. `conditionLT` resolves the escalation via durable activity
|
|
12
|
+
* 5. Workflow continues with the clean resolver payload
|
|
13
|
+
*
|
|
14
|
+
* This demonstrates the lightweight alternative to the certified
|
|
15
|
+
* interceptor pattern — same escalation UX, simpler wiring.
|
|
16
|
+
*/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
+
var ownKeys = function(o) {
|
|
35
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
+
var ar = [];
|
|
37
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
+
return ar;
|
|
39
|
+
};
|
|
40
|
+
return ownKeys(o);
|
|
41
|
+
};
|
|
42
|
+
return function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.basicSignal = basicSignal;
|
|
52
|
+
const hotmesh_1 = require("@hotmeshio/hotmesh");
|
|
53
|
+
const condition_1 = require("../../../services/orchestrator/condition");
|
|
54
|
+
const interceptorActivities = __importStar(require("../../../services/interceptor/activities"));
|
|
55
|
+
const activities = __importStar(require("./activities"));
|
|
56
|
+
const LT_ACTIVITY_QUEUE = 'lt-interceptor';
|
|
57
|
+
async function basicSignal(envelope) {
|
|
58
|
+
const { message = 'Please review and approve.', role = 'reviewer' } = envelope.data;
|
|
59
|
+
const { ltCreateEscalation } = hotmesh_1.Durable.workflow.proxyActivities({
|
|
60
|
+
activities: interceptorActivities,
|
|
61
|
+
taskQueue: LT_ACTIVITY_QUEUE,
|
|
62
|
+
retry: { maximumAttempts: 3 },
|
|
63
|
+
});
|
|
64
|
+
const { processApproval } = hotmesh_1.Durable.workflow.proxyActivities({
|
|
65
|
+
activities,
|
|
66
|
+
});
|
|
67
|
+
const ctx = hotmesh_1.Durable.workflow.workflowInfo();
|
|
68
|
+
const signalId = `approval-${ctx.workflowId}`;
|
|
69
|
+
// Create escalation with signal_id — dashboard knows to signal, not re-run.
|
|
70
|
+
//
|
|
71
|
+
// The resolver_schema registered in the workflow config provides the
|
|
72
|
+
// default form. To override per-instance, pass metadata.form_schema:
|
|
73
|
+
//
|
|
74
|
+
// metadata: {
|
|
75
|
+
// signal_id: signalId,
|
|
76
|
+
// form_schema: {
|
|
77
|
+
// properties: {
|
|
78
|
+
// approved: { type: 'boolean', default: false, description: 'Approve?' },
|
|
79
|
+
// notes: { type: 'string', default: '', description: 'Reviewer notes' },
|
|
80
|
+
// environment: { type: 'string', enum: ['staging', 'production'] },
|
|
81
|
+
// api_key: { type: 'string', format: 'password', description: 'Deploy key (ephemeral)' },
|
|
82
|
+
// confidence: { type: 'number', default: 0, description: 'Confidence 0-1' },
|
|
83
|
+
// },
|
|
84
|
+
// },
|
|
85
|
+
// },
|
|
86
|
+
//
|
|
87
|
+
// When form_schema is present it overrides the workflow config's
|
|
88
|
+
// resolver_schema for this specific escalation instance.
|
|
89
|
+
await ltCreateEscalation({
|
|
90
|
+
type: 'signal-approval',
|
|
91
|
+
subtype: 'basic-signal',
|
|
92
|
+
description: message,
|
|
93
|
+
role,
|
|
94
|
+
envelope: JSON.stringify(envelope),
|
|
95
|
+
workflowId: ctx.workflowId,
|
|
96
|
+
workflowType: 'basicSignal',
|
|
97
|
+
taskQueue: ctx.taskQueue,
|
|
98
|
+
metadata: {
|
|
99
|
+
signal_id: signalId,
|
|
100
|
+
// No form_schema here — the workflow config's resolver_schema is used.
|
|
101
|
+
// Pass form_schema to override per-instance (see comment above).
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
// Pause — conditionLT handles $escalation_id stripping and resolution
|
|
105
|
+
const decision = await (0, condition_1.conditionLT)(signalId);
|
|
106
|
+
// Continue with the clean resolver payload
|
|
107
|
+
const result = await processApproval({
|
|
108
|
+
approved: decision.approved,
|
|
109
|
+
notes: decision.notes || '',
|
|
110
|
+
message,
|
|
111
|
+
});
|
|
112
|
+
return {
|
|
113
|
+
type: 'return',
|
|
114
|
+
data: result,
|
|
115
|
+
};
|
|
116
|
+
}
|
package/build/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { start } from './start';
|
|
|
2
2
|
export { registerLT, createLTInterceptor } from './services/interceptor';
|
|
3
3
|
export { createLTActivityInterceptor } from './services/interceptor/activity-interceptor';
|
|
4
4
|
export { executeLT } from './services/orchestrator';
|
|
5
|
+
export { conditionLT } from './services/orchestrator/condition';
|
|
5
6
|
export type { ExecuteLTOptions } from './services/orchestrator/types';
|
|
6
7
|
export { JwtAuthAdapter, createAuthMiddleware, requireAuth, requireAdmin, signToken } from './modules/auth';
|
|
7
8
|
export * from './types';
|
package/build/index.js
CHANGED
|
@@ -36,7 +36,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.createClient = exports.CallbackEventAdapter = exports.seedSystemMcpServers = exports.builtinMcpServerFactories = exports.getSystemWorkers = exports.registerMcpTool = exports.getToolContext = exports.getActivityIdentity = exports.seedExamples = exports.exampleWorkers = exports.McpEscalationStrategy = exports.DefaultEscalationStrategy = exports.escalationStrategyRegistry = exports.McpVisionServer = exports.McpTranslationServer = exports.McpServer = exports.McpClient = exports.McpService = exports.BuiltInMcpAdapter = exports.mcpRegistry = exports.defaultMaintenanceConfig = exports.maintenanceRegistry = exports.PinoLoggerAdapter = exports.loggerRegistry = exports.HoneycombTelemetryAdapter = exports.telemetryRegistry = exports.publishWorkflowEvent = exports.publishEscalationEvent = exports.publishTaskEvent = exports.publishMilestoneEvent = exports.SocketIOEventAdapter = exports.InMemoryEventAdapter = exports.NatsEventAdapter = exports.eventRegistry = exports.ltConfig = exports.UserService = exports.ConfigService = exports.EscalationService = exports.TaskService = exports.signToken = exports.requireAdmin = exports.requireAuth = exports.createAuthMiddleware = exports.JwtAuthAdapter = exports.conditionLT = exports.executeLT = exports.createLTActivityInterceptor = exports.createLTInterceptor = exports.registerLT = exports.start = void 0;
|
|
40
|
+
exports.api = void 0;
|
|
40
41
|
const config_1 = require("./modules/config");
|
|
41
42
|
const logger_1 = require("./lib/logger");
|
|
42
43
|
const start_1 = require("./start");
|
|
@@ -50,6 +51,8 @@ var activity_interceptor_1 = require("./services/interceptor/activity-intercepto
|
|
|
50
51
|
Object.defineProperty(exports, "createLTActivityInterceptor", { enumerable: true, get: function () { return activity_interceptor_1.createLTActivityInterceptor; } });
|
|
51
52
|
var orchestrator_1 = require("./services/orchestrator");
|
|
52
53
|
Object.defineProperty(exports, "executeLT", { enumerable: true, get: function () { return orchestrator_1.executeLT; } });
|
|
54
|
+
var condition_1 = require("./services/orchestrator/condition");
|
|
55
|
+
Object.defineProperty(exports, "conditionLT", { enumerable: true, get: function () { return condition_1.conditionLT; } });
|
|
53
56
|
var auth_1 = require("./modules/auth");
|
|
54
57
|
Object.defineProperty(exports, "JwtAuthAdapter", { enumerable: true, get: function () { return auth_1.JwtAuthAdapter; } });
|
|
55
58
|
Object.defineProperty(exports, "createAuthMiddleware", { enumerable: true, get: function () { return auth_1.createAuthMiddleware; } });
|
|
@@ -55,7 +55,14 @@ VALUES
|
|
|
55
55
|
'Kitchen sink — demonstrates sleep, signals, parallel activities, escalation, and every durable primitive',
|
|
56
56
|
'{}',
|
|
57
57
|
'{"data": {"name": "World", "mode": "full"}, "metadata": {"source": "dashboard"}}'::jsonb,
|
|
58
|
-
NULL)
|
|
58
|
+
NULL),
|
|
59
|
+
|
|
60
|
+
-- Basic signal (configured, NOT certified — no escalation roles)
|
|
61
|
+
('basicSignal', 'long-tail-examples', 'reviewer', true,
|
|
62
|
+
'Signal-based escalation — workflow stays running while waiting for human input via conditionLT',
|
|
63
|
+
'{}',
|
|
64
|
+
'{"data": {"message": "Deployment approval needed for v2.1.0", "role": "reviewer"}, "metadata": {"certified": false, "source": "dashboard"}}'::jsonb,
|
|
65
|
+
'{"properties": {"approved": {"type": "boolean", "default": false, "description": "Approve this deployment?"}, "notes": {"type": "string", "default": "", "description": "Reviewer notes — visible to the workflow author"}}}'::jsonb)
|
|
59
66
|
ON CONFLICT (workflow_type) DO NOTHING;
|
|
60
67
|
|
|
61
68
|
-- ─── Assign roles to all workflows ──────────────────────────────────────────
|
|
@@ -63,5 +70,6 @@ ON CONFLICT (workflow_type) DO NOTHING;
|
|
|
63
70
|
INSERT INTO lt_config_roles (workflow_type, role)
|
|
64
71
|
SELECT workflow_type, unnest(ARRAY['reviewer', 'engineer', 'admin'])
|
|
65
72
|
FROM lt_config_workflows
|
|
73
|
+
WHERE workflow_type != 'basicSignal'
|
|
66
74
|
ON CONFLICT (workflow_type, role) DO NOTHING;
|
|
67
75
|
|
|
@@ -14,7 +14,14 @@ declare class LTConfigCache {
|
|
|
14
14
|
getProviderData(name: string, originId: string): Promise<LTProviderData>;
|
|
15
15
|
/** Force cache reload on next access. Call after config mutations. */
|
|
16
16
|
invalidate(): void;
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Get the resolved config for a workflow, but only if certified.
|
|
19
|
+
*
|
|
20
|
+
* The interceptor uses this to decide whether to wrap the workflow
|
|
21
|
+
* with task tracking, escalation handling, and re-run detection.
|
|
22
|
+
* Configured-but-not-certified workflows (no roles, no consumes)
|
|
23
|
+
* return null so the interceptor skips them.
|
|
24
|
+
*/
|
|
18
25
|
getResolvedConfig(name: string): Promise<LTResolvedConfig | null>;
|
|
19
26
|
}
|
|
20
27
|
export declare const ltConfig: LTConfigCache;
|
|
@@ -101,10 +101,20 @@ class LTConfigCache {
|
|
|
101
101
|
this.loadedAt = 0;
|
|
102
102
|
this.loadPromise = null;
|
|
103
103
|
}
|
|
104
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Get the resolved config for a workflow, but only if certified.
|
|
106
|
+
*
|
|
107
|
+
* The interceptor uses this to decide whether to wrap the workflow
|
|
108
|
+
* with task tracking, escalation handling, and re-run detection.
|
|
109
|
+
* Configured-but-not-certified workflows (no roles, no consumes)
|
|
110
|
+
* return null so the interceptor skips them.
|
|
111
|
+
*/
|
|
105
112
|
async getResolvedConfig(name) {
|
|
106
113
|
const config = await this.get(name);
|
|
107
|
-
|
|
114
|
+
if (!config)
|
|
115
|
+
return null;
|
|
116
|
+
const isCertified = (config.roles?.length ?? 0) > 0 || (config.consumes?.length ?? 0) > 0;
|
|
117
|
+
return isCertified ? config : null;
|
|
108
118
|
}
|
|
109
119
|
}
|
|
110
120
|
exports.ltConfig = new LTConfigCache();
|
|
@@ -36,6 +36,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.registerListRoutes = registerListRoutes;
|
|
37
37
|
const api = __importStar(require("../../api/escalations"));
|
|
38
38
|
function registerListRoutes(router) {
|
|
39
|
+
/**
|
|
40
|
+
* POST /api/escalations
|
|
41
|
+
* Create a standalone escalation (not tied to a workflow).
|
|
42
|
+
*
|
|
43
|
+
* RBAC: caller must hold the target role or be superadmin.
|
|
44
|
+
*
|
|
45
|
+
* Body: { type, role, subtype?, description?, priority?, envelope?,
|
|
46
|
+
* metadata?, escalation_payload? }
|
|
47
|
+
*/
|
|
48
|
+
router.post('/', async (req, res) => {
|
|
49
|
+
const result = await api.createEscalation({
|
|
50
|
+
type: req.body?.type,
|
|
51
|
+
subtype: req.body?.subtype,
|
|
52
|
+
role: req.body?.role,
|
|
53
|
+
description: req.body?.description,
|
|
54
|
+
priority: req.body?.priority,
|
|
55
|
+
envelope: req.body?.envelope,
|
|
56
|
+
metadata: req.body?.metadata,
|
|
57
|
+
escalation_payload: req.body?.escalation_payload,
|
|
58
|
+
}, req.auth);
|
|
59
|
+
res.status(result.status).json(result.data ?? { error: result.error });
|
|
60
|
+
});
|
|
39
61
|
/**
|
|
40
62
|
* GET /api/escalations
|
|
41
63
|
* List escalations with optional filters.
|
package/build/routes/tasks.js
CHANGED
|
@@ -36,6 +36,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
const express_1 = require("express");
|
|
37
37
|
const api = __importStar(require("../api/tasks"));
|
|
38
38
|
const router = (0, express_1.Router)();
|
|
39
|
+
/**
|
|
40
|
+
* POST /api/tasks
|
|
41
|
+
* Create a new task record.
|
|
42
|
+
* Body: { workflow_id, workflow_type, lt_type, signal_id, parent_workflow_id, envelope, ... }
|
|
43
|
+
*/
|
|
44
|
+
router.post('/', async (req, res) => {
|
|
45
|
+
const result = await api.createTask({
|
|
46
|
+
workflow_id: req.body?.workflow_id,
|
|
47
|
+
workflow_type: req.body?.workflow_type,
|
|
48
|
+
lt_type: req.body?.lt_type,
|
|
49
|
+
task_queue: req.body?.task_queue,
|
|
50
|
+
signal_id: req.body?.signal_id,
|
|
51
|
+
parent_workflow_id: req.body?.parent_workflow_id,
|
|
52
|
+
origin_id: req.body?.origin_id,
|
|
53
|
+
parent_id: req.body?.parent_id,
|
|
54
|
+
envelope: req.body?.envelope,
|
|
55
|
+
metadata: req.body?.metadata,
|
|
56
|
+
priority: req.body?.priority,
|
|
57
|
+
trace_id: req.body?.trace_id,
|
|
58
|
+
span_id: req.body?.span_id,
|
|
59
|
+
}, { userId: req.auth?.userId ?? '', role: req.auth?.role, scopes: req.auth?.scopes });
|
|
60
|
+
res.status(result.status).json(result.data ?? { error: result.error });
|
|
61
|
+
});
|
|
39
62
|
/**
|
|
40
63
|
* GET /api/tasks
|
|
41
64
|
* List tasks with optional filters.
|
|
@@ -39,22 +39,28 @@ const router = (0, express_1.Router)();
|
|
|
39
39
|
// ── Workflow invocation ─────────────────────────────────────────────────────
|
|
40
40
|
/**
|
|
41
41
|
* POST /api/workflows/:type/invoke
|
|
42
|
-
*
|
|
42
|
+
* Proxy for `Durable.Client.workflow.start()` with IAM resolution.
|
|
43
43
|
*
|
|
44
|
-
* The workflow must have `invocable: true` in its config
|
|
45
|
-
* includes `invocation_roles`, the authenticated
|
|
46
|
-
* one of those roles.
|
|
47
|
-
* user can invoke.
|
|
44
|
+
* The workflow must have `invocable: true` in its config (or an active
|
|
45
|
+
* worker). If the config includes `invocation_roles`, the authenticated
|
|
46
|
+
* user must hold at least one of those roles.
|
|
48
47
|
*
|
|
49
|
-
* Body
|
|
48
|
+
* Body fields `data`, `metadata`, and `execute_as` are extracted for
|
|
49
|
+
* envelope/IAM handling. Everything else in `options` passes through
|
|
50
|
+
* to the Durable client unchanged (workflowId, expire, entity,
|
|
51
|
+
* namespace, search, signalIn, pending, etc.).
|
|
52
|
+
*
|
|
53
|
+
* @see https://docs.hotmesh.io/types/types_durable.WorkflowOptions.html
|
|
50
54
|
*/
|
|
51
55
|
router.post('/:type/invoke', async (req, res) => {
|
|
56
|
+
const { data, metadata, execute_as, ...options } = req.body ?? {};
|
|
52
57
|
const result = await api.invokeWorkflow({
|
|
53
58
|
type: req.params.type,
|
|
54
|
-
data
|
|
55
|
-
metadata
|
|
56
|
-
execute_as
|
|
57
|
-
|
|
59
|
+
data,
|
|
60
|
+
metadata,
|
|
61
|
+
execute_as,
|
|
62
|
+
options: Object.keys(options).length > 0 ? options : undefined,
|
|
63
|
+
}, { userId: req.auth?.userId ?? '', role: req.auth?.role, scopes: req.auth?.scopes });
|
|
58
64
|
res.status(result.status).json(result.data ?? { error: result.error });
|
|
59
65
|
});
|
|
60
66
|
// ── Workflow observation ────────────────────────────────────────────────────
|
package/build/sdk/index.d.ts
CHANGED
|
@@ -47,6 +47,21 @@ export interface LTClientOptions {
|
|
|
47
47
|
*/
|
|
48
48
|
export declare function createClient(options?: LTClientOptions): {
|
|
49
49
|
tasks: {
|
|
50
|
+
create: (input: {
|
|
51
|
+
workflow_id: string;
|
|
52
|
+
workflow_type: string;
|
|
53
|
+
lt_type: string;
|
|
54
|
+
task_queue?: string;
|
|
55
|
+
signal_id: string;
|
|
56
|
+
parent_workflow_id: string;
|
|
57
|
+
origin_id?: string;
|
|
58
|
+
parent_id?: string;
|
|
59
|
+
envelope?: string;
|
|
60
|
+
metadata?: Record<string, any>;
|
|
61
|
+
priority?: number;
|
|
62
|
+
trace_id?: string;
|
|
63
|
+
span_id?: string;
|
|
64
|
+
}, auth?: LTApiAuth) => Promise<LTApiResult<any>>;
|
|
50
65
|
list: typeof tasksApi.listTasks;
|
|
51
66
|
get: typeof tasksApi.getTask;
|
|
52
67
|
listProcesses: typeof tasksApi.listProcesses;
|
|
@@ -54,6 +69,16 @@ export declare function createClient(options?: LTClientOptions): {
|
|
|
54
69
|
getProcessStats: typeof tasksApi.getProcessStats;
|
|
55
70
|
};
|
|
56
71
|
escalations: {
|
|
72
|
+
create: (input: {
|
|
73
|
+
type: string;
|
|
74
|
+
subtype?: string;
|
|
75
|
+
role: string;
|
|
76
|
+
description?: string;
|
|
77
|
+
priority?: number;
|
|
78
|
+
envelope?: string;
|
|
79
|
+
metadata?: Record<string, any>;
|
|
80
|
+
escalation_payload?: string;
|
|
81
|
+
}, auth?: LTApiAuth) => Promise<LTApiResult<any>>;
|
|
57
82
|
list: (input: {
|
|
58
83
|
status?: string;
|
|
59
84
|
role?: string;
|
|
@@ -128,6 +153,7 @@ export declare function createClient(options?: LTClientOptions): {
|
|
|
128
153
|
data?: Record<string, any>;
|
|
129
154
|
metadata?: Record<string, any>;
|
|
130
155
|
execute_as?: string;
|
|
156
|
+
options?: Record<string, any>;
|
|
131
157
|
}, auth?: LTApiAuth) => Promise<LTApiResult<any>>;
|
|
132
158
|
getStatus: typeof workflowsApi.getWorkflowStatus;
|
|
133
159
|
getResult: typeof workflowsApi.getWorkflowResult;
|
package/build/sdk/index.js
CHANGED
|
@@ -100,6 +100,7 @@ function createClient(options = {}) {
|
|
|
100
100
|
return {
|
|
101
101
|
// ── Tasks ──────────────────────────────────────────────────────────────
|
|
102
102
|
tasks: {
|
|
103
|
+
create: bindAuth(tasksApi.createTask, auth),
|
|
103
104
|
list: tasksApi.listTasks,
|
|
104
105
|
get: tasksApi.getTask,
|
|
105
106
|
listProcesses: tasksApi.listProcesses,
|
|
@@ -108,6 +109,7 @@ function createClient(options = {}) {
|
|
|
108
109
|
},
|
|
109
110
|
// ── Escalations ────────────────────────────────────────────────────────
|
|
110
111
|
escalations: {
|
|
112
|
+
create: bindAuth(escalationsApi.createEscalation, auth),
|
|
111
113
|
list: bindAuth(escalationsApi.listEscalations, auth),
|
|
112
114
|
listAvailable: bindAuth(escalationsApi.listAvailableEscalations, auth),
|
|
113
115
|
listTypes: escalationsApi.listDistinctTypes,
|