@hotmeshio/long-tail 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/README.md +3 -1
  2. package/build/api/auth.d.ts +11 -0
  3. package/build/api/auth.js +11 -0
  4. package/build/api/bot-accounts.d.ts +87 -0
  5. package/build/api/bot-accounts.js +87 -0
  6. package/build/api/controlplane.d.ts +48 -0
  7. package/build/api/controlplane.js +48 -0
  8. package/build/api/dba.d.ts +27 -0
  9. package/build/api/dba.js +27 -0
  10. package/build/api/escalations.d.ts +201 -0
  11. package/build/api/escalations.js +236 -0
  12. package/build/api/exports.d.ts +58 -0
  13. package/build/api/exports.js +58 -0
  14. package/build/api/insight.d.ts +57 -0
  15. package/build/api/insight.js +57 -0
  16. package/build/api/maintenance.d.ts +15 -0
  17. package/build/api/maintenance.js +15 -0
  18. package/build/api/mcp-runs.d.ts +27 -0
  19. package/build/api/mcp-runs.js +27 -0
  20. package/build/api/mcp.d.ts +108 -0
  21. package/build/api/mcp.js +108 -0
  22. package/build/api/namespaces.d.ts +13 -0
  23. package/build/api/namespaces.js +13 -0
  24. package/build/api/roles.d.ts +63 -0
  25. package/build/api/roles.js +63 -5
  26. package/build/api/settings.d.ts +8 -0
  27. package/build/api/settings.js +8 -0
  28. package/build/api/tasks.d.ts +43 -0
  29. package/build/api/tasks.js +43 -0
  30. package/build/api/users.d.ts +71 -0
  31. package/build/api/users.js +71 -5
  32. package/build/api/workflow-sets.d.ts +51 -0
  33. package/build/api/workflow-sets.js +51 -0
  34. package/build/api/workflows.d.ts +110 -0
  35. package/build/api/workflows.js +109 -0
  36. package/build/api/yaml-workflows.d.ts +195 -0
  37. package/build/api/yaml-workflows.js +195 -0
  38. package/build/examples/types/envelopes.d.ts +27 -0
  39. package/build/examples/types/index.d.ts +1 -1
  40. package/build/examples/workers.js +8 -0
  41. package/build/examples/workflows/assembly-line/activities.d.ts +28 -0
  42. package/build/examples/workflows/assembly-line/activities.js +53 -0
  43. package/build/examples/workflows/assembly-line/index.d.ts +17 -0
  44. package/build/examples/workflows/assembly-line/index.js +60 -0
  45. package/build/examples/workflows/assembly-line/iterator.d.ts +12 -0
  46. package/build/examples/workflows/assembly-line/iterator.js +54 -0
  47. package/build/examples/workflows/assembly-line/reverter.d.ts +18 -0
  48. package/build/examples/workflows/assembly-line/reverter.js +89 -0
  49. package/build/examples/workflows/assembly-line/types.d.ts +25 -0
  50. package/build/examples/workflows/assembly-line/types.js +8 -0
  51. package/build/examples/workflows/assembly-line/worker.d.ts +13 -0
  52. package/build/examples/workflows/assembly-line/worker.js +81 -0
  53. package/build/routes/escalations/list.js +22 -0
  54. package/build/routes/workflows/invocation.js +15 -9
  55. package/build/sdk/index.d.ts +11 -0
  56. package/build/sdk/index.js +1 -0
  57. package/build/services/workflow-invocation.d.ts +15 -2
  58. package/build/services/workflow-invocation.js +11 -6
  59. package/build/tsconfig.tsbuildinfo +1 -1
  60. package/dashboard/dist/assets/{AdminDashboard-DRjkRSjJ.js → AdminDashboard-B15jSEV2.js} +2 -2
  61. package/dashboard/dist/assets/{AdminDashboard-DRjkRSjJ.js.map → AdminDashboard-B15jSEV2.js.map} +1 -1
  62. package/dashboard/dist/assets/{AvailableEscalationsPage-CnivX4Tz.js → AvailableEscalationsPage-0V2yvKak.js} +2 -2
  63. package/dashboard/dist/assets/{AvailableEscalationsPage-CnivX4Tz.js.map → AvailableEscalationsPage-0V2yvKak.js.map} +1 -1
  64. package/dashboard/dist/assets/{BotPicker-DwwaBhTH.js → BotPicker-B4UxHcek.js} +2 -2
  65. package/dashboard/dist/assets/{BotPicker-DwwaBhTH.js.map → BotPicker-B4UxHcek.js.map} +1 -1
  66. package/dashboard/dist/assets/{CollapsibleSection-DQpaVA0M.js → CollapsibleSection-BBexNWVd.js} +2 -2
  67. package/dashboard/dist/assets/{CollapsibleSection-DQpaVA0M.js.map → CollapsibleSection-BBexNWVd.js.map} +1 -1
  68. package/dashboard/dist/assets/{ConfirmDeleteModal-B7JoDNvt.js → ConfirmDeleteModal-DlPDJSq_.js} +2 -2
  69. package/dashboard/dist/assets/{ConfirmDeleteModal-B7JoDNvt.js.map → ConfirmDeleteModal-DlPDJSq_.js.map} +1 -1
  70. package/dashboard/dist/assets/{CopyableId-AqoZayBG.js → CopyableId-BxHW1ahb.js} +2 -2
  71. package/dashboard/dist/assets/{CopyableId-AqoZayBG.js.map → CopyableId-BxHW1ahb.js.map} +1 -1
  72. package/dashboard/dist/assets/{CredentialsPage-qGw1kQzi.js → CredentialsPage-Bp_Y1Szk.js} +2 -2
  73. package/dashboard/dist/assets/{CredentialsPage-qGw1kQzi.js.map → CredentialsPage-Bp_Y1Szk.js.map} +1 -1
  74. package/dashboard/dist/assets/{CustomDurationPicker-D1HUQcd0.js → CustomDurationPicker-ByBFqXSO.js} +2 -2
  75. package/dashboard/dist/assets/{CustomDurationPicker-D1HUQcd0.js.map → CustomDurationPicker-ByBFqXSO.js.map} +1 -1
  76. package/dashboard/dist/assets/{DataTable-DKvSKoVG.js → DataTable-DyIXg-tQ.js} +2 -2
  77. package/dashboard/dist/assets/{DataTable-DKvSKoVG.js.map → DataTable-DyIXg-tQ.js.map} +1 -1
  78. package/dashboard/dist/assets/{ElapsedCell-B0yrReGQ.js → ElapsedCell-BgnA0qpS.js} +2 -2
  79. package/dashboard/dist/assets/{ElapsedCell-B0yrReGQ.js.map → ElapsedCell-BgnA0qpS.js.map} +1 -1
  80. package/dashboard/dist/assets/{EmptyState-X0fIzYID.js → EmptyState-DlMImvgm.js} +2 -2
  81. package/dashboard/dist/assets/{EmptyState-X0fIzYID.js.map → EmptyState-DlMImvgm.js.map} +1 -1
  82. package/dashboard/dist/assets/{EscalationsOverview-BQAT9W7r.js → EscalationsOverview-D90kdfw1.js} +2 -2
  83. package/dashboard/dist/assets/{EscalationsOverview-BQAT9W7r.js.map → EscalationsOverview-D90kdfw1.js.map} +1 -1
  84. package/dashboard/dist/assets/{EventTable-CX1KNLhZ.js → EventTable-BNxtlgNz.js} +2 -2
  85. package/dashboard/dist/assets/{EventTable-CX1KNLhZ.js.map → EventTable-BNxtlgNz.js.map} +1 -1
  86. package/dashboard/dist/assets/{FilterBar-DMTvuQy-.js → FilterBar-BTiaAhCx.js} +2 -2
  87. package/dashboard/dist/assets/{FilterBar-DMTvuQy-.js.map → FilterBar-BTiaAhCx.js.map} +1 -1
  88. package/dashboard/dist/assets/{ListToolbar-DTOSxoEy.js → ListToolbar-BUcagSCn.js} +2 -2
  89. package/dashboard/dist/assets/{ListToolbar-DTOSxoEy.js.map → ListToolbar-BUcagSCn.js.map} +1 -1
  90. package/dashboard/dist/assets/{McpOverview-BaKTIWrG.js → McpOverview-B-tCvz8C.js} +2 -2
  91. package/dashboard/dist/assets/{McpOverview-BaKTIWrG.js.map → McpOverview-B-tCvz8C.js.map} +1 -1
  92. package/dashboard/dist/assets/{McpQueryDetailPage-CC08T5k8.js → McpQueryDetailPage-DPlF1wYb.js} +2 -2
  93. package/dashboard/dist/assets/{McpQueryDetailPage-CC08T5k8.js.map → McpQueryDetailPage-DPlF1wYb.js.map} +1 -1
  94. package/dashboard/dist/assets/{McpQueryPage-CVfF9dYg.js → McpQueryPage-Bz7AdcfR.js} +2 -2
  95. package/dashboard/dist/assets/{McpQueryPage-CVfF9dYg.js.map → McpQueryPage-Bz7AdcfR.js.map} +1 -1
  96. package/dashboard/dist/assets/{McpRunDetailPage-CKs1RWeV.js → McpRunDetailPage-Di_qpL2V.js} +2 -2
  97. package/dashboard/dist/assets/{McpRunDetailPage-CKs1RWeV.js.map → McpRunDetailPage-Di_qpL2V.js.map} +1 -1
  98. package/dashboard/dist/assets/{McpRunsPage-CcPD_tY1.js → McpRunsPage-BBgybBEa.js} +2 -2
  99. package/dashboard/dist/assets/{McpRunsPage-CcPD_tY1.js.map → McpRunsPage-BBgybBEa.js.map} +1 -1
  100. package/dashboard/dist/assets/{Modal-_2AbWxJT.js → Modal-CaJ0gTEa.js} +2 -2
  101. package/dashboard/dist/assets/{Modal-_2AbWxJT.js.map → Modal-CaJ0gTEa.js.map} +1 -1
  102. package/dashboard/dist/assets/{OperatorDashboard-BGiRaRDr.js → OperatorDashboard-DDfMmrmR.js} +2 -2
  103. package/dashboard/dist/assets/{OperatorDashboard-BGiRaRDr.js.map → OperatorDashboard-DDfMmrmR.js.map} +1 -1
  104. package/dashboard/dist/assets/{PageHeader-DVr5Qyzm.js → PageHeader-C5D-G5rp.js} +2 -2
  105. package/dashboard/dist/assets/{PageHeader-DVr5Qyzm.js.map → PageHeader-C5D-G5rp.js.map} +1 -1
  106. package/dashboard/dist/assets/{PageHeaderWithStats-D0KRASML.js → PageHeaderWithStats-DCa2eZh2.js} +2 -2
  107. package/dashboard/dist/assets/{PageHeaderWithStats-D0KRASML.js.map → PageHeaderWithStats-DCa2eZh2.js.map} +1 -1
  108. package/dashboard/dist/assets/{PriorityBadge-Bx2559OU.js → PriorityBadge-DTHq6OUZ.js} +2 -2
  109. package/dashboard/dist/assets/{PriorityBadge-Bx2559OU.js.map → PriorityBadge-DTHq6OUZ.js.map} +1 -1
  110. package/dashboard/dist/assets/{ProcessDetailPage-69I--sry.js → ProcessDetailPage-fC4dhrd0.js} +2 -2
  111. package/dashboard/dist/assets/{ProcessDetailPage-69I--sry.js.map → ProcessDetailPage-fC4dhrd0.js.map} +1 -1
  112. package/dashboard/dist/assets/{ProcessesListPage-BDpUbua2.js → ProcessesListPage-CL2MY8uD.js} +2 -2
  113. package/dashboard/dist/assets/{ProcessesListPage-BDpUbua2.js.map → ProcessesListPage-CL2MY8uD.js.map} +1 -1
  114. package/dashboard/dist/assets/{RolePill-CcAqEaSt.js → RolePill-kgKPANly.js} +2 -2
  115. package/dashboard/dist/assets/{RolePill-CcAqEaSt.js.map → RolePill-kgKPANly.js.map} +1 -1
  116. package/dashboard/dist/assets/{RolesPage-Cl23Hjet.js → RolesPage-Be2lXTHD.js} +2 -2
  117. package/dashboard/dist/assets/{RolesPage-Cl23Hjet.js.map → RolesPage-Be2lXTHD.js.map} +1 -1
  118. package/dashboard/dist/assets/{RowActions-B4mqIt3Z.js → RowActions-DIzJCwqR.js} +2 -2
  119. package/dashboard/dist/assets/{RowActions-B4mqIt3Z.js.map → RowActions-DIzJCwqR.js.map} +1 -1
  120. package/dashboard/dist/assets/{StatCard-Cz_2OjAZ.js → StatCard-CRi2Jy6t.js} +2 -2
  121. package/dashboard/dist/assets/{StatCard-Cz_2OjAZ.js.map → StatCard-CRi2Jy6t.js.map} +1 -1
  122. package/dashboard/dist/assets/{StatusBadge-Wi2FJZsn.js → StatusBadge-BETI_8Mr.js} +2 -2
  123. package/dashboard/dist/assets/{StatusBadge-Wi2FJZsn.js.map → StatusBadge-BETI_8Mr.js.map} +1 -1
  124. package/dashboard/dist/assets/{StepIndicator-PW5NRDMb.js → StepIndicator-DjpMqCjz.js} +2 -2
  125. package/dashboard/dist/assets/{StepIndicator-PW5NRDMb.js.map → StepIndicator-DjpMqCjz.js.map} +1 -1
  126. package/dashboard/dist/assets/{StickyPagination-Bl2Uzz65.js → StickyPagination-BZbExQ9t.js} +2 -2
  127. package/dashboard/dist/assets/{StickyPagination-Bl2Uzz65.js.map → StickyPagination-BZbExQ9t.js.map} +1 -1
  128. package/dashboard/dist/assets/{SwimlaneTimeline-CUPqMd0z.js → SwimlaneTimeline-DZthQyhR.js} +2 -2
  129. package/dashboard/dist/assets/{SwimlaneTimeline-CUPqMd0z.js.map → SwimlaneTimeline-DZthQyhR.js.map} +1 -1
  130. package/dashboard/dist/assets/{TagInput-BLtf86Ly.js → TagInput-CukbOfYn.js} +2 -2
  131. package/dashboard/dist/assets/{TagInput-BLtf86Ly.js.map → TagInput-CukbOfYn.js.map} +1 -1
  132. package/dashboard/dist/assets/{TaskDetailPage-BXJFX74D.js → TaskDetailPage-CIZHIKo9.js} +2 -2
  133. package/dashboard/dist/assets/{TaskDetailPage-BXJFX74D.js.map → TaskDetailPage-CIZHIKo9.js.map} +1 -1
  134. package/dashboard/dist/assets/{TaskQueuePill-CWYj3xKe.js → TaskQueuePill-Q7DGoysj.js} +2 -2
  135. package/dashboard/dist/assets/{TaskQueuePill-CWYj3xKe.js.map → TaskQueuePill-Q7DGoysj.js.map} +1 -1
  136. package/dashboard/dist/assets/{TasksListPage-C3cX94Mw.js → TasksListPage-CsC9wjb0.js} +2 -2
  137. package/dashboard/dist/assets/{TasksListPage-C3cX94Mw.js.map → TasksListPage-CsC9wjb0.js.map} +1 -1
  138. package/dashboard/dist/assets/{TimeAgo-B_5yDDHV.js → TimeAgo-BcOOnJeH.js} +2 -2
  139. package/dashboard/dist/assets/{TimeAgo-B_5yDDHV.js.map → TimeAgo-BcOOnJeH.js.map} +1 -1
  140. package/dashboard/dist/assets/{TimestampCell-DRX724uU.js → TimestampCell-CEMapYDQ.js} +2 -2
  141. package/dashboard/dist/assets/{TimestampCell-DRX724uU.js.map → TimestampCell-CEMapYDQ.js.map} +1 -1
  142. package/dashboard/dist/assets/{UserName-Ca8FA469.js → UserName-BHoN7iRL.js} +2 -2
  143. package/dashboard/dist/assets/{UserName-Ca8FA469.js.map → UserName-BHoN7iRL.js.map} +1 -1
  144. package/dashboard/dist/assets/{WorkflowExecutionPage-BBYWEV2P.js → WorkflowExecutionPage-DawKl1LT.js} +2 -2
  145. package/dashboard/dist/assets/{WorkflowExecutionPage-BBYWEV2P.js.map → WorkflowExecutionPage-DawKl1LT.js.map} +1 -1
  146. package/dashboard/dist/assets/{WorkflowPill-BXifAuLi.js → WorkflowPill-CP84Vqeg.js} +2 -2
  147. package/dashboard/dist/assets/{WorkflowPill-BXifAuLi.js.map → WorkflowPill-CP84Vqeg.js.map} +1 -1
  148. package/dashboard/dist/assets/{WorkflowsDashboard-Drl3juz9.js → WorkflowsDashboard-QrvVFxtQ.js} +2 -2
  149. package/dashboard/dist/assets/{WorkflowsDashboard-Drl3juz9.js.map → WorkflowsDashboard-QrvVFxtQ.js.map} +1 -1
  150. package/dashboard/dist/assets/{WorkflowsOverview-03IRrDLg.js → WorkflowsOverview-DuhAi_OY.js} +2 -2
  151. package/dashboard/dist/assets/{WorkflowsOverview-03IRrDLg.js.map → WorkflowsOverview-DuhAi_OY.js.map} +1 -1
  152. package/dashboard/dist/assets/{YamlWorkflowsPage-DC2cLxVi.js → YamlWorkflowsPage-Dc9xw82a.js} +2 -2
  153. package/dashboard/dist/assets/{YamlWorkflowsPage-DC2cLxVi.js.map → YamlWorkflowsPage-Dc9xw82a.js.map} +1 -1
  154. package/dashboard/dist/assets/{bots-DZEXcgiJ.js → bots-Dny-rmmI.js} +2 -2
  155. package/dashboard/dist/assets/{bots-DZEXcgiJ.js.map → bots-Dny-rmmI.js.map} +1 -1
  156. package/dashboard/dist/assets/{escalation-Cw48lNaF.js → escalation-CV0sKNH5.js} +2 -2
  157. package/dashboard/dist/assets/{escalation-Cw48lNaF.js.map → escalation-CV0sKNH5.js.map} +1 -1
  158. package/dashboard/dist/assets/{escalation-columns-NINpo3qf.js → escalation-columns-30CKyoWI.js} +2 -2
  159. package/dashboard/dist/assets/{escalation-columns-NINpo3qf.js.map → escalation-columns-30CKyoWI.js.map} +1 -1
  160. package/dashboard/dist/assets/{helpers-fk_qr729.js → helpers-C1-30CzH.js} +2 -2
  161. package/dashboard/dist/assets/{helpers-fk_qr729.js.map → helpers-C1-30CzH.js.map} +1 -1
  162. package/dashboard/dist/assets/{helpers-Cuu3xKfr.js → helpers-C1jaRD-d.js} +2 -2
  163. package/dashboard/dist/assets/{helpers-Cuu3xKfr.js.map → helpers-C1jaRD-d.js.map} +1 -1
  164. package/dashboard/dist/assets/{index-CNI7k7oB.js → index-BUVQ6wmy.js} +2 -2
  165. package/dashboard/dist/assets/{index-CNI7k7oB.js.map → index-BUVQ6wmy.js.map} +1 -1
  166. package/dashboard/dist/assets/{index-aRvL-dXp.js → index-CxVB7F4X.js} +2 -2
  167. package/dashboard/dist/assets/{index-aRvL-dXp.js.map → index-CxVB7F4X.js.map} +1 -1
  168. package/dashboard/dist/assets/{index-BIG3KooI.js → index-D-oCWCAS.js} +2 -2
  169. package/dashboard/dist/assets/{index-BIG3KooI.js.map → index-D-oCWCAS.js.map} +1 -1
  170. package/dashboard/dist/assets/{index-b03HlbnH.js → index-D0wPM3Ck.js} +2 -2
  171. package/dashboard/dist/assets/{index-b03HlbnH.js.map → index-D0wPM3Ck.js.map} +1 -1
  172. package/dashboard/dist/assets/{index-DwRytW9O.js → index-DHgnkykj.js} +2 -2
  173. package/dashboard/dist/assets/{index-DwRytW9O.js.map → index-DHgnkykj.js.map} +1 -1
  174. package/dashboard/dist/assets/{index-Dj-z-x8M.js → index-D_aJBEAG.js} +2 -2
  175. package/dashboard/dist/assets/{index-Dj-z-x8M.js.map → index-D_aJBEAG.js.map} +1 -1
  176. package/dashboard/dist/assets/{index-CORHB0WC.js → index-Dd_U4mLm.js} +2 -2
  177. package/dashboard/dist/assets/{index-CORHB0WC.js.map → index-Dd_U4mLm.js.map} +1 -1
  178. package/dashboard/dist/assets/{index-BwN3KP_L.js → index-DnmZbNxk.js} +7 -7
  179. package/dashboard/dist/assets/index-DnmZbNxk.js.map +1 -0
  180. package/dashboard/dist/assets/{index-B98ipWxE.js → index-_RBvi7s6.js} +2 -2
  181. package/dashboard/dist/assets/{index-B98ipWxE.js.map → index-_RBvi7s6.js.map} +1 -1
  182. package/dashboard/dist/assets/{index-Bxe8h1x4.js → index-n7td8zgX.js} +2 -2
  183. package/dashboard/dist/assets/{index-Bxe8h1x4.js.map → index-n7td8zgX.js.map} +1 -1
  184. package/dashboard/dist/assets/{mcp-BZoFryNc.js → mcp-CRFr4L9W.js} +2 -2
  185. package/dashboard/dist/assets/{mcp-BZoFryNc.js.map → mcp-CRFr4L9W.js.map} +1 -1
  186. package/dashboard/dist/assets/{mcp-query-wiw1kwm8.js → mcp-query-DHY2mZBQ.js} +2 -2
  187. package/dashboard/dist/assets/{mcp-query-wiw1kwm8.js.map → mcp-query-DHY2mZBQ.js.map} +1 -1
  188. package/dashboard/dist/assets/{mcp-runs-BaEKnf5v.js → mcp-runs-BqPHqwAO.js} +2 -2
  189. package/dashboard/dist/assets/{mcp-runs-BaEKnf5v.js.map → mcp-runs-BqPHqwAO.js.map} +1 -1
  190. package/dashboard/dist/assets/{namespaces-BwnZI4_A.js → namespaces-TG1aIpo_.js} +2 -2
  191. package/dashboard/dist/assets/{namespaces-BwnZI4_A.js.map → namespaces-TG1aIpo_.js.map} +1 -1
  192. package/dashboard/dist/assets/{roles-Bgn1K8zU.js → roles-DhhLTvXg.js} +2 -2
  193. package/dashboard/dist/assets/{roles-Bgn1K8zU.js.map → roles-DhhLTvXg.js.map} +1 -1
  194. package/dashboard/dist/assets/{settings-CizYiutL.js → settings-D9MBzEeB.js} +2 -2
  195. package/dashboard/dist/assets/{settings-CizYiutL.js.map → settings-D9MBzEeB.js.map} +1 -1
  196. package/dashboard/dist/assets/{tasks-Bmte_hc4.js → tasks-BxmcZoev.js} +2 -2
  197. package/dashboard/dist/assets/{tasks-Bmte_hc4.js.map → tasks-BxmcZoev.js.map} +1 -1
  198. package/dashboard/dist/assets/{useEventHooks-CUCxpiI2.js → useEventHooks-BylecvvI.js} +2 -2
  199. package/dashboard/dist/assets/{useEventHooks-CUCxpiI2.js.map → useEventHooks-BylecvvI.js.map} +1 -1
  200. package/dashboard/dist/assets/{useYamlActivityEvents-Cum02Ej9.js → useYamlActivityEvents-ocmj11e_.js} +2 -2
  201. package/dashboard/dist/assets/{useYamlActivityEvents-Cum02Ej9.js.map → useYamlActivityEvents-ocmj11e_.js.map} +1 -1
  202. package/dashboard/dist/assets/{users-NSDgTt-z.js → users-Ce5r-JAv.js} +2 -2
  203. package/dashboard/dist/assets/{users-NSDgTt-z.js.map → users-Ce5r-JAv.js.map} +1 -1
  204. package/dashboard/dist/assets/{workflows-k0XRdGXx.js → workflows-ykIeVbRJ.js} +2 -2
  205. package/dashboard/dist/assets/{workflows-k0XRdGXx.js.map → workflows-ykIeVbRJ.js.map} +1 -1
  206. package/dashboard/dist/assets/{yaml-workflows-DAre8I78.js → yaml-workflows-WypmKYht.js} +2 -2
  207. package/dashboard/dist/assets/{yaml-workflows-DAre8I78.js.map → yaml-workflows-WypmKYht.js.map} +1 -1
  208. package/dashboard/dist/index.html +1 -1
  209. package/docs/api/sdk/auth.md +27 -0
  210. package/docs/api/sdk/bot-accounts.md +243 -0
  211. package/docs/api/sdk/controlplane.md +103 -0
  212. package/docs/api/sdk/dba.md +52 -0
  213. package/docs/api/sdk/escalations.md +374 -0
  214. package/docs/api/sdk/events.md +68 -0
  215. package/docs/api/sdk/exports.md +124 -0
  216. package/docs/api/sdk/insight.md +112 -0
  217. package/docs/api/sdk/maintenance.md +54 -0
  218. package/docs/api/sdk/mcp-runs.md +71 -0
  219. package/docs/api/sdk/mcp.md +250 -0
  220. package/docs/api/sdk/namespaces.md +43 -0
  221. package/docs/api/sdk/roles.md +183 -0
  222. package/docs/api/sdk/settings.md +24 -0
  223. package/docs/api/sdk/tasks.md +120 -0
  224. package/docs/api/sdk/users.md +196 -0
  225. package/docs/api/sdk/workflow-sets.md +135 -0
  226. package/docs/api/sdk/workflows.md +271 -0
  227. package/docs/api/sdk/yaml-workflows.md +408 -0
  228. package/package.json +1 -1
  229. package/dashboard/dist/assets/index-BwN3KP_L.js.map +0 -1
  230. package/docs/epic-integration.md +0 -224
  231. package/docs/workflow-builder.md +0 -371
  232. /package/docs/api/{dba.md → http/dba.md} +0 -0
  233. /package/docs/api/{escalations.md → http/escalations.md} +0 -0
  234. /package/docs/api/{exports.md → http/exports.md} +0 -0
  235. /package/docs/api/{maintenance.md → http/maintenance.md} +0 -0
  236. /package/docs/api/{mcp-runs.md → http/mcp-runs.md} +0 -0
  237. /package/docs/api/{mcp-servers.md → http/mcp-servers.md} +0 -0
  238. /package/docs/api/{namespaces.md → http/namespaces.md} +0 -0
  239. /package/docs/api/{roles.md → http/roles.md} +0 -0
  240. /package/docs/api/{service-accounts.md → http/service-accounts.md} +0 -0
  241. /package/docs/api/{settings.md → http/settings.md} +0 -0
  242. /package/docs/api/{tasks.md → http/tasks.md} +0 -0
  243. /package/docs/api/{users.md → http/users.md} +0 -0
  244. /package/docs/api/{workflows.md → http/workflows.md} +0 -0
  245. /package/docs/api/{yaml-workflows.md → http/yaml-workflows.md} +0 -0
@@ -1,4 +1,51 @@
1
1
  import type { LTApiResult, LTApiAuth } from '../types/sdk';
2
+ /**
3
+ * Create a standalone escalation (not tied to a workflow).
4
+ *
5
+ * Useful for manual work items, support tickets, or approval requests
6
+ * that originate outside the durable workflow engine. The caller must
7
+ * hold the target role or be a superadmin.
8
+ *
9
+ * @param input.type — escalation category (e.g. `"support"`, `"approval"`)
10
+ * @param input.subtype — subcategory for finer routing
11
+ * @param input.role — role responsible for resolving this escalation
12
+ * @param input.description — human-readable summary
13
+ * @param input.priority — 1 (critical) through 4 (low), default 2
14
+ * @param input.envelope — serialized context for the resolver
15
+ * @param input.metadata — arbitrary key-value data (e.g. signal_routing)
16
+ * @param input.escalation_payload — serialized payload for the resolver UI
17
+ * @param auth — authenticated user context (must hold target role or be superadmin)
18
+ * @returns `{ status: 201, data: <escalation record> }`
19
+ */
20
+ export declare function createEscalation(input: {
21
+ type: string;
22
+ subtype?: string;
23
+ role: string;
24
+ description?: string;
25
+ priority?: number;
26
+ envelope?: string;
27
+ metadata?: Record<string, any>;
28
+ escalation_payload?: string;
29
+ }, auth: LTApiAuth): Promise<LTApiResult>;
30
+ /**
31
+ * List escalations with optional filters.
32
+ *
33
+ * Results are scoped to the authenticated user's roles unless the user
34
+ * is a superadmin (who sees all roles).
35
+ *
36
+ * @param input.status — filter by `pending`, `resolved`, or `cancelled`
37
+ * @param input.role — filter by assigned role
38
+ * @param input.type — filter by workflow type
39
+ * @param input.subtype — filter by subtype
40
+ * @param input.assigned_to — filter by assigned user ID
41
+ * @param input.priority — filter by priority (1–4)
42
+ * @param input.limit — max results (default: 50)
43
+ * @param input.offset — pagination offset
44
+ * @param input.sort_by — column to sort by (e.g. `created_at`, `priority`)
45
+ * @param input.order — `asc` or `desc`
46
+ * @param auth — authenticated user context (required for role scoping)
47
+ * @returns `{ status: 200, data: { escalations, total } }`
48
+ */
2
49
  export declare function listEscalations(input: {
3
50
  status?: string;
4
51
  role?: string;
@@ -11,6 +58,23 @@ export declare function listEscalations(input: {
11
58
  sort_by?: string;
12
59
  order?: string;
13
60
  }, auth: LTApiAuth): Promise<LTApiResult>;
61
+ /**
62
+ * List escalations available for claim (pending and not actively claimed).
63
+ *
64
+ * Similar to `listEscalations` but excludes escalations with active claims.
65
+ * Scoped to the authenticated user's roles.
66
+ *
67
+ * @param input.role — filter by role
68
+ * @param input.type — filter by workflow type
69
+ * @param input.subtype — filter by subtype
70
+ * @param input.priority — filter by priority (1–4)
71
+ * @param input.limit — max results (default: 50)
72
+ * @param input.offset — pagination offset
73
+ * @param input.sort_by — column to sort by
74
+ * @param input.order — `asc` or `desc`
75
+ * @param auth — authenticated user context
76
+ * @returns `{ status: 200, data: { escalations, total } }`
77
+ */
14
78
  export declare function listAvailableEscalations(input: {
15
79
  role?: string;
16
80
  type?: string;
@@ -21,49 +85,186 @@ export declare function listAvailableEscalations(input: {
21
85
  sort_by?: string;
22
86
  order?: string;
23
87
  }, auth: LTApiAuth): Promise<LTApiResult>;
88
+ /**
89
+ * List all distinct escalation type values.
90
+ *
91
+ * @returns `{ status: 200, data: { types: string[] } }`
92
+ */
24
93
  export declare function listDistinctTypes(): Promise<LTApiResult>;
94
+ /**
95
+ * Get aggregate escalation statistics scoped to the user's roles.
96
+ *
97
+ * @param input.period — time window (`1h`, `24h`, `7d`, `30d`)
98
+ * @param auth — authenticated user context
99
+ * @returns `{ status: 200, data: { pending, claimed, created, resolved, by_role, by_type } }`
100
+ */
25
101
  export declare function getEscalationStats(input: {
26
102
  period?: string;
27
103
  }, auth: LTApiAuth): Promise<LTApiResult>;
104
+ /**
105
+ * Get a single escalation by ID.
106
+ *
107
+ * Non-superadmin users must hold the escalation's assigned role.
108
+ *
109
+ * @param input.id — escalation UUID
110
+ * @param auth — authenticated user context
111
+ * @returns `{ status: 200, data: <escalation record> }` or 403/404
112
+ */
28
113
  export declare function getEscalation(input: {
29
114
  id: string;
30
115
  }, auth: LTApiAuth): Promise<LTApiResult>;
116
+ /**
117
+ * List all escalations for a given workflow ID.
118
+ *
119
+ * @param input.workflowId — HotMesh workflow ID
120
+ * @returns `{ status: 200, data: { escalations } }`
121
+ */
31
122
  export declare function getEscalationsByWorkflowId(input: {
32
123
  workflowId: string;
33
124
  }): Promise<LTApiResult>;
125
+ /**
126
+ * Route a pending escalation to a different role.
127
+ *
128
+ * The user must be authorized to escalate from the current role to the
129
+ * target role (checked via escalation chain configuration).
130
+ *
131
+ * @param input.id — escalation UUID
132
+ * @param input.targetRole — destination role
133
+ * @param auth — authenticated user context
134
+ * @returns `{ status: 200, data: <updated escalation> }` or 403/404/409
135
+ */
34
136
  export declare function escalateToRole(input: {
35
137
  id: string;
36
138
  targetRole: string;
37
139
  }, auth: LTApiAuth): Promise<LTApiResult>;
140
+ /**
141
+ * Claim a pending escalation for the authenticated user.
142
+ *
143
+ * Sets `assigned_to` and `assigned_until` on the escalation (soft lock).
144
+ * Non-superadmin users must hold the escalation's role. Publishes a
145
+ * `escalation.claimed` event.
146
+ *
147
+ * @param input.id — escalation UUID
148
+ * @param input.durationMinutes — claim duration (default: 30)
149
+ * @param auth — authenticated user context
150
+ * @returns `{ status: 200, data: { escalation, isExtension } }` or 403/404/409
151
+ */
38
152
  export declare function claimEscalation(input: {
39
153
  id: string;
40
154
  durationMinutes?: number;
41
155
  }, auth: LTApiAuth): Promise<LTApiResult>;
156
+ /**
157
+ * Release a claimed escalation back to the pool.
158
+ *
159
+ * Only the user who holds the claim can release it. Publishes a
160
+ * `escalation.released` event.
161
+ *
162
+ * @param input.id — escalation UUID
163
+ * @param auth — authenticated user context
164
+ * @returns `{ status: 200, data: { escalation } }` or 409
165
+ */
42
166
  export declare function releaseEscalation(input: {
43
167
  id: string;
44
168
  }, auth: LTApiAuth): Promise<LTApiResult>;
169
+ /**
170
+ * Release all escalation claims past their `assigned_until` deadline.
171
+ *
172
+ * Typically called on a maintenance schedule. Returns the count of
173
+ * released claims.
174
+ *
175
+ * @returns `{ status: 200, data: { released: number } }`
176
+ */
45
177
  export declare function releaseExpiredClaims(): Promise<LTApiResult>;
178
+ /**
179
+ * Update priority for one or more escalations.
180
+ *
181
+ * @param input.ids — array of escalation UUIDs
182
+ * @param input.priority — new priority (1=critical, 2=high, 3=medium, 4=low)
183
+ * @param auth — authenticated user context (admin or role-holder required)
184
+ * @returns `{ status: 200, data: { updated: number } }`
185
+ */
46
186
  export declare function updatePriority(input: {
47
187
  ids: string[];
48
188
  priority: number;
49
189
  }, auth: LTApiAuth): Promise<LTApiResult>;
190
+ /**
191
+ * Claim multiple escalations at once for the authenticated user.
192
+ *
193
+ * @param input.ids — array of escalation UUIDs
194
+ * @param input.durationMinutes — claim duration (default: 30)
195
+ * @param auth — authenticated user context
196
+ * @returns `{ status: 200, data: { claimed, skipped } }`
197
+ */
50
198
  export declare function bulkClaim(input: {
51
199
  ids: string[];
52
200
  durationMinutes?: number;
53
201
  }, auth: LTApiAuth): Promise<LTApiResult>;
202
+ /**
203
+ * Assign multiple escalations to a specific user.
204
+ *
205
+ * Non-superadmin callers must verify the target user holds each
206
+ * escalation's role. Publishes claim events for assigned items.
207
+ *
208
+ * @param input.ids — array of escalation UUIDs
209
+ * @param input.targetUserId — user to assign to
210
+ * @param input.durationMinutes — assignment duration (default: 30)
211
+ * @param auth — authenticated user context
212
+ * @returns `{ status: 200, data: { assigned, skipped } }`
213
+ */
54
214
  export declare function bulkAssign(input: {
55
215
  ids: string[];
56
216
  targetUserId: string;
57
217
  durationMinutes?: number;
58
218
  }, auth: LTApiAuth): Promise<LTApiResult>;
219
+ /**
220
+ * Route multiple escalations to a different role.
221
+ *
222
+ * @param input.ids — array of escalation UUIDs
223
+ * @param input.targetRole — destination role
224
+ * @param auth — authenticated user context
225
+ * @returns `{ status: 200, data: { updated: number } }`
226
+ */
59
227
  export declare function bulkEscalate(input: {
60
228
  ids: string[];
61
229
  targetRole: string;
62
230
  }, auth: LTApiAuth): Promise<LTApiResult>;
231
+ /**
232
+ * Trigger AI triage for multiple escalations.
233
+ *
234
+ * Resolves each escalation and starts a triage workflow that uses MCP
235
+ * tools to analyze and potentially auto-resolve the issue.
236
+ *
237
+ * @param input.ids — array of escalation UUIDs
238
+ * @param input.hint — optional natural-language guidance for the triage AI
239
+ * @param auth — authenticated user context
240
+ * @returns `{ status: 200, data: { triaged, workflows } }`
241
+ */
63
242
  export declare function bulkTriage(input: {
64
243
  ids: string[];
65
244
  hint?: string;
66
245
  }, auth: LTApiAuth): Promise<LTApiResult>;
246
+ /**
247
+ * Resolve a pending escalation with a human-provided payload.
248
+ *
249
+ * Handles two resolution paths:
250
+ * 1. **Signal-routed** — if the escalation has `signal_routing` metadata,
251
+ * the resolver payload is sent directly to the paused workflow via
252
+ * `handle.signal()`. Supports both Durable and YAML engines.
253
+ * 2. **Re-run** — the original workflow is re-started with the resolver
254
+ * payload injected into `envelope.resolver`. The interceptor detects
255
+ * the re-run and skips to the resolution branch.
256
+ *
257
+ * Password fields in the resolver payload are replaced with ephemeral
258
+ * tokens (15-minute TTL) so plaintext never enters the signal store.
259
+ *
260
+ * Supports optional escalation strategy execution after resolution.
261
+ *
262
+ * @param input.id — escalation UUID
263
+ * @param input.resolverPayload — human decision data
264
+ * @param auth — authenticated user context
265
+ * @returns `{ status: 200, data: { signaled, escalationId, workflowId } }` (signal path)
266
+ * or `{ status: 200, data: { workflowId, resumed, escalationId } }` (re-run path)
267
+ */
67
268
  export declare function resolveEscalation(input: {
68
269
  id: string;
69
270
  resolverPayload: Record<string, any>;
@@ -33,6 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.createEscalation = createEscalation;
36
37
  exports.listEscalations = listEscalations;
37
38
  exports.listAvailableEscalations = listAvailableEscalations;
38
39
  exports.listDistinctTypes = listDistinctTypes;
@@ -97,7 +98,88 @@ function publishBulkClaimEvents(ids, assignedTo) {
97
98
  });
98
99
  }
99
100
  }
101
+ // ── Create ────────────────────────────────────────────────────────────────
102
+ /**
103
+ * Create a standalone escalation (not tied to a workflow).
104
+ *
105
+ * Useful for manual work items, support tickets, or approval requests
106
+ * that originate outside the durable workflow engine. The caller must
107
+ * hold the target role or be a superadmin.
108
+ *
109
+ * @param input.type — escalation category (e.g. `"support"`, `"approval"`)
110
+ * @param input.subtype — subcategory for finer routing
111
+ * @param input.role — role responsible for resolving this escalation
112
+ * @param input.description — human-readable summary
113
+ * @param input.priority — 1 (critical) through 4 (low), default 2
114
+ * @param input.envelope — serialized context for the resolver
115
+ * @param input.metadata — arbitrary key-value data (e.g. signal_routing)
116
+ * @param input.escalation_payload — serialized payload for the resolver UI
117
+ * @param auth — authenticated user context (must hold target role or be superadmin)
118
+ * @returns `{ status: 201, data: <escalation record> }`
119
+ */
120
+ async function createEscalation(input, auth) {
121
+ try {
122
+ const { type, role } = input;
123
+ if (!type || typeof type !== 'string') {
124
+ return { status: 400, error: 'type is required' };
125
+ }
126
+ if (!role || typeof role !== 'string') {
127
+ return { status: 400, error: 'role is required' };
128
+ }
129
+ // RBAC: caller must hold the target role or be superadmin
130
+ const isSuperAdminUser = await userService.isSuperAdmin(auth.userId);
131
+ if (!isSuperAdminUser) {
132
+ const userHasRole = await userService.hasRole(auth.userId, role);
133
+ if (!userHasRole) {
134
+ return { status: 403, error: `You must hold the "${role}" role or be a superadmin to create escalations for it` };
135
+ }
136
+ }
137
+ const escalation = await escalationService.createEscalation({
138
+ type,
139
+ subtype: input.subtype ?? type,
140
+ description: input.description,
141
+ priority: input.priority,
142
+ role,
143
+ envelope: input.envelope ?? '{}',
144
+ metadata: input.metadata,
145
+ escalation_payload: input.escalation_payload,
146
+ });
147
+ (0, publish_1.publishEscalationEvent)({
148
+ type: 'escalation.created',
149
+ source: 'api',
150
+ workflowId: '',
151
+ workflowName: '',
152
+ taskQueue: '',
153
+ escalationId: escalation.id,
154
+ status: 'pending',
155
+ data: { type: input.type, role },
156
+ });
157
+ return { status: 201, data: escalation };
158
+ }
159
+ catch (err) {
160
+ return { status: 500, error: err.message };
161
+ }
162
+ }
100
163
  // ── List routes ────────────────────────────────────────────────────────────
164
+ /**
165
+ * List escalations with optional filters.
166
+ *
167
+ * Results are scoped to the authenticated user's roles unless the user
168
+ * is a superadmin (who sees all roles).
169
+ *
170
+ * @param input.status — filter by `pending`, `resolved`, or `cancelled`
171
+ * @param input.role — filter by assigned role
172
+ * @param input.type — filter by workflow type
173
+ * @param input.subtype — filter by subtype
174
+ * @param input.assigned_to — filter by assigned user ID
175
+ * @param input.priority — filter by priority (1–4)
176
+ * @param input.limit — max results (default: 50)
177
+ * @param input.offset — pagination offset
178
+ * @param input.sort_by — column to sort by (e.g. `created_at`, `priority`)
179
+ * @param input.order — `asc` or `desc`
180
+ * @param auth — authenticated user context (required for role scoping)
181
+ * @returns `{ status: 200, data: { escalations, total } }`
182
+ */
101
183
  async function listEscalations(input, auth) {
102
184
  try {
103
185
  const visibleRoles = await getVisibleRoles(auth.userId);
@@ -123,6 +205,23 @@ async function listEscalations(input, auth) {
123
205
  return { status: 500, error: err.message };
124
206
  }
125
207
  }
208
+ /**
209
+ * List escalations available for claim (pending and not actively claimed).
210
+ *
211
+ * Similar to `listEscalations` but excludes escalations with active claims.
212
+ * Scoped to the authenticated user's roles.
213
+ *
214
+ * @param input.role — filter by role
215
+ * @param input.type — filter by workflow type
216
+ * @param input.subtype — filter by subtype
217
+ * @param input.priority — filter by priority (1–4)
218
+ * @param input.limit — max results (default: 50)
219
+ * @param input.offset — pagination offset
220
+ * @param input.sort_by — column to sort by
221
+ * @param input.order — `asc` or `desc`
222
+ * @param auth — authenticated user context
223
+ * @returns `{ status: 200, data: { escalations, total } }`
224
+ */
126
225
  async function listAvailableEscalations(input, auth) {
127
226
  try {
128
227
  const visibleRoles = await getVisibleRoles(auth.userId);
@@ -146,6 +245,11 @@ async function listAvailableEscalations(input, auth) {
146
245
  return { status: 500, error: err.message };
147
246
  }
148
247
  }
248
+ /**
249
+ * List all distinct escalation type values.
250
+ *
251
+ * @returns `{ status: 200, data: { types: string[] } }`
252
+ */
149
253
  async function listDistinctTypes() {
150
254
  try {
151
255
  const types = await escalationService.listDistinctTypes();
@@ -155,6 +259,13 @@ async function listDistinctTypes() {
155
259
  return { status: 500, error: err.message };
156
260
  }
157
261
  }
262
+ /**
263
+ * Get aggregate escalation statistics scoped to the user's roles.
264
+ *
265
+ * @param input.period — time window (`1h`, `24h`, `7d`, `30d`)
266
+ * @param auth — authenticated user context
267
+ * @returns `{ status: 200, data: { pending, claimed, created, resolved, by_role, by_type } }`
268
+ */
158
269
  async function getEscalationStats(input, auth) {
159
270
  try {
160
271
  const visibleRoles = await getVisibleRoles(auth.userId);
@@ -179,6 +290,15 @@ async function getEscalationStats(input, auth) {
179
290
  }
180
291
  }
181
292
  // ── Single-escalation routes ───────────────────────────────────────────────
293
+ /**
294
+ * Get a single escalation by ID.
295
+ *
296
+ * Non-superadmin users must hold the escalation's assigned role.
297
+ *
298
+ * @param input.id — escalation UUID
299
+ * @param auth — authenticated user context
300
+ * @returns `{ status: 200, data: <escalation record> }` or 403/404
301
+ */
182
302
  async function getEscalation(input, auth) {
183
303
  try {
184
304
  const escalation = await escalationService.getEscalation(input.id);
@@ -198,6 +318,12 @@ async function getEscalation(input, auth) {
198
318
  return { status: 500, error: err.message };
199
319
  }
200
320
  }
321
+ /**
322
+ * List all escalations for a given workflow ID.
323
+ *
324
+ * @param input.workflowId — HotMesh workflow ID
325
+ * @returns `{ status: 200, data: { escalations } }`
326
+ */
201
327
  async function getEscalationsByWorkflowId(input) {
202
328
  try {
203
329
  const escalations = await escalationService.getEscalationsByWorkflowId(input.workflowId);
@@ -207,6 +333,17 @@ async function getEscalationsByWorkflowId(input) {
207
333
  return { status: 500, error: err.message };
208
334
  }
209
335
  }
336
+ /**
337
+ * Route a pending escalation to a different role.
338
+ *
339
+ * The user must be authorized to escalate from the current role to the
340
+ * target role (checked via escalation chain configuration).
341
+ *
342
+ * @param input.id — escalation UUID
343
+ * @param input.targetRole — destination role
344
+ * @param auth — authenticated user context
345
+ * @returns `{ status: 200, data: <updated escalation> }` or 403/404/409
346
+ */
210
347
  async function escalateToRole(input, auth) {
211
348
  try {
212
349
  const { id, targetRole } = input;
@@ -234,6 +371,18 @@ async function escalateToRole(input, auth) {
234
371
  return { status: 500, error: err.message };
235
372
  }
236
373
  }
374
+ /**
375
+ * Claim a pending escalation for the authenticated user.
376
+ *
377
+ * Sets `assigned_to` and `assigned_until` on the escalation (soft lock).
378
+ * Non-superadmin users must hold the escalation's role. Publishes a
379
+ * `escalation.claimed` event.
380
+ *
381
+ * @param input.id — escalation UUID
382
+ * @param input.durationMinutes — claim duration (default: 30)
383
+ * @param auth — authenticated user context
384
+ * @returns `{ status: 200, data: { escalation, isExtension } }` or 403/404/409
385
+ */
237
386
  async function claimEscalation(input, auth) {
238
387
  try {
239
388
  const { id, durationMinutes } = input;
@@ -271,6 +420,16 @@ async function claimEscalation(input, auth) {
271
420
  return { status: 500, error: err.message };
272
421
  }
273
422
  }
423
+ /**
424
+ * Release a claimed escalation back to the pool.
425
+ *
426
+ * Only the user who holds the claim can release it. Publishes a
427
+ * `escalation.released` event.
428
+ *
429
+ * @param input.id — escalation UUID
430
+ * @param auth — authenticated user context
431
+ * @returns `{ status: 200, data: { escalation } }` or 409
432
+ */
274
433
  async function releaseEscalation(input, auth) {
275
434
  try {
276
435
  const result = await escalationService.releaseEscalation(input.id, auth.userId);
@@ -294,6 +453,14 @@ async function releaseEscalation(input, auth) {
294
453
  }
295
454
  }
296
455
  // ── Bulk routes ────────────────────────────────────────────────────────────
456
+ /**
457
+ * Release all escalation claims past their `assigned_until` deadline.
458
+ *
459
+ * Typically called on a maintenance schedule. Returns the count of
460
+ * released claims.
461
+ *
462
+ * @returns `{ status: 200, data: { released: number } }`
463
+ */
297
464
  async function releaseExpiredClaims() {
298
465
  try {
299
466
  const released = await escalationService.releaseExpiredClaims();
@@ -303,6 +470,14 @@ async function releaseExpiredClaims() {
303
470
  return { status: 500, error: err.message };
304
471
  }
305
472
  }
473
+ /**
474
+ * Update priority for one or more escalations.
475
+ *
476
+ * @param input.ids — array of escalation UUIDs
477
+ * @param input.priority — new priority (1=critical, 2=high, 3=medium, 4=low)
478
+ * @param auth — authenticated user context (admin or role-holder required)
479
+ * @returns `{ status: 200, data: { updated: number } }`
480
+ */
306
481
  async function updatePriority(input, auth) {
307
482
  try {
308
483
  const { ids, priority } = input;
@@ -322,6 +497,14 @@ async function updatePriority(input, auth) {
322
497
  return { status: 500, error: err.message };
323
498
  }
324
499
  }
500
+ /**
501
+ * Claim multiple escalations at once for the authenticated user.
502
+ *
503
+ * @param input.ids — array of escalation UUIDs
504
+ * @param input.durationMinutes — claim duration (default: 30)
505
+ * @param auth — authenticated user context
506
+ * @returns `{ status: 200, data: { claimed, skipped } }`
507
+ */
325
508
  async function bulkClaim(input, auth) {
326
509
  try {
327
510
  const { ids, durationMinutes } = input;
@@ -340,6 +523,18 @@ async function bulkClaim(input, auth) {
340
523
  return { status: 500, error: err.message };
341
524
  }
342
525
  }
526
+ /**
527
+ * Assign multiple escalations to a specific user.
528
+ *
529
+ * Non-superadmin callers must verify the target user holds each
530
+ * escalation's role. Publishes claim events for assigned items.
531
+ *
532
+ * @param input.ids — array of escalation UUIDs
533
+ * @param input.targetUserId — user to assign to
534
+ * @param input.durationMinutes — assignment duration (default: 30)
535
+ * @param auth — authenticated user context
536
+ * @returns `{ status: 200, data: { assigned, skipped } }`
537
+ */
343
538
  async function bulkAssign(input, auth) {
344
539
  try {
345
540
  const { ids, targetUserId, durationMinutes } = input;
@@ -372,6 +567,14 @@ async function bulkAssign(input, auth) {
372
567
  return { status: 500, error: err.message };
373
568
  }
374
569
  }
570
+ /**
571
+ * Route multiple escalations to a different role.
572
+ *
573
+ * @param input.ids — array of escalation UUIDs
574
+ * @param input.targetRole — destination role
575
+ * @param auth — authenticated user context
576
+ * @returns `{ status: 200, data: { updated: number } }`
577
+ */
375
578
  async function bulkEscalate(input, auth) {
376
579
  try {
377
580
  const { ids, targetRole } = input;
@@ -391,6 +594,17 @@ async function bulkEscalate(input, auth) {
391
594
  return { status: 500, error: err.message };
392
595
  }
393
596
  }
597
+ /**
598
+ * Trigger AI triage for multiple escalations.
599
+ *
600
+ * Resolves each escalation and starts a triage workflow that uses MCP
601
+ * tools to analyze and potentially auto-resolve the issue.
602
+ *
603
+ * @param input.ids — array of escalation UUIDs
604
+ * @param input.hint — optional natural-language guidance for the triage AI
605
+ * @param auth — authenticated user context
606
+ * @returns `{ status: 200, data: { triaged, workflows } }`
607
+ */
394
608
  async function bulkTriage(input, auth) {
395
609
  try {
396
610
  const { ids, hint } = input;
@@ -414,6 +628,28 @@ async function bulkTriage(input, auth) {
414
628
  }
415
629
  }
416
630
  // ── Resolve route ──────────────────────────────────────────────────────────
631
+ /**
632
+ * Resolve a pending escalation with a human-provided payload.
633
+ *
634
+ * Handles two resolution paths:
635
+ * 1. **Signal-routed** — if the escalation has `signal_routing` metadata,
636
+ * the resolver payload is sent directly to the paused workflow via
637
+ * `handle.signal()`. Supports both Durable and YAML engines.
638
+ * 2. **Re-run** — the original workflow is re-started with the resolver
639
+ * payload injected into `envelope.resolver`. The interceptor detects
640
+ * the re-run and skips to the resolution branch.
641
+ *
642
+ * Password fields in the resolver payload are replaced with ephemeral
643
+ * tokens (15-minute TTL) so plaintext never enters the signal store.
644
+ *
645
+ * Supports optional escalation strategy execution after resolution.
646
+ *
647
+ * @param input.id — escalation UUID
648
+ * @param input.resolverPayload — human decision data
649
+ * @param auth — authenticated user context
650
+ * @returns `{ status: 200, data: { signaled, escalationId, workflowId } }` (signal path)
651
+ * or `{ status: 200, data: { workflowId, resumed, escalationId } }` (re-run path)
652
+ */
417
653
  async function resolveEscalation(input, auth) {
418
654
  try {
419
655
  const { id, resolverPayload } = input;
@@ -1,6 +1,19 @@
1
1
  import type { LTApiResult } from '../types/sdk';
2
2
  import type { LTExportField } from '../types';
3
3
  import type { ExportMode } from '@hotmeshio/hotmesh/build/types/exporter';
4
+ /**
5
+ * List export jobs with optional filtering, sorting, and pagination.
6
+ *
7
+ * @param input.limit — maximum number of jobs to return
8
+ * @param input.offset — number of jobs to skip for pagination
9
+ * @param input.entity — filter by entity/workflow type
10
+ * @param input.search — free-text search across job fields
11
+ * @param input.status — filter by job status
12
+ * @param input.sort_by — field name to sort results by
13
+ * @param input.order — sort direction (asc or desc)
14
+ * @param input.registered — filter by registration status
15
+ * @returns `{ status: 200, data: { jobs, total, ... } }` on success
16
+ */
4
17
  export declare function listJobs(input: {
5
18
  limit?: number;
6
19
  offset?: number;
@@ -11,12 +24,39 @@ export declare function listJobs(input: {
11
24
  order?: string;
12
25
  registered?: string;
13
26
  }): Promise<LTApiResult>;
27
+ /**
28
+ * Export the stored state (hash data) of a workflow.
29
+ *
30
+ * Resolves the workflow handle from its ID, then exports its state fields.
31
+ * Fields can be filtered via allow/block lists. Returns 404 if the workflow
32
+ * cannot be found or its data has expired.
33
+ *
34
+ * @param input.workflowId — the workflow's unique identifier
35
+ * @param input.allow — whitelist of field names to include in the export
36
+ * @param input.block — blacklist of field names to exclude from the export
37
+ * @param input.values — when true, include field values (not just field names)
38
+ * @returns `{ status: 200, data: ExportedState }` on success
39
+ */
14
40
  export declare function exportWorkflowState(input: {
15
41
  workflowId: string;
16
42
  allow?: LTExportField[];
17
43
  block?: LTExportField[];
18
44
  values?: boolean;
19
45
  }): Promise<LTApiResult>;
46
+ /**
47
+ * Export the full execution tree of a workflow.
48
+ *
49
+ * Resolves the workflow handle, then exports its execution graph including
50
+ * activity inputs and results. Returns 404 if the workflow cannot be found
51
+ * or its data has expired.
52
+ *
53
+ * @param input.workflowId — the workflow's unique identifier
54
+ * @param input.excludeSystem — when true, omit system-generated activities from the export
55
+ * @param input.omitResults — when true, exclude activity result payloads
56
+ * @param input.mode — export mode controlling output format (e.g., tree, flat)
57
+ * @param input.maxDepth — maximum depth to traverse in the execution tree
58
+ * @returns `{ status: 200, data: ExecutionExport }` on success
59
+ */
20
60
  export declare function exportWorkflowExecution(input: {
21
61
  workflowId: string;
22
62
  excludeSystem?: boolean;
@@ -24,9 +64,27 @@ export declare function exportWorkflowExecution(input: {
24
64
  mode?: ExportMode;
25
65
  maxDepth?: number;
26
66
  }): Promise<LTApiResult>;
67
+ /**
68
+ * Get the current status of a workflow (e.g., running, completed, failed).
69
+ *
70
+ * Resolves the workflow handle, then queries its status. Returns 404 if the
71
+ * workflow cannot be found or its data has expired.
72
+ *
73
+ * @param input.workflowId — the workflow's unique identifier
74
+ * @returns `{ status: 200, data: WorkflowStatus }` on success
75
+ */
27
76
  export declare function getWorkflowStatus(input: {
28
77
  workflowId: string;
29
78
  }): Promise<LTApiResult>;
79
+ /**
80
+ * Get the current state data of a workflow.
81
+ *
82
+ * Resolves the workflow handle, then retrieves its full state. Returns 404
83
+ * if the workflow cannot be found or its data has expired.
84
+ *
85
+ * @param input.workflowId — the workflow's unique identifier
86
+ * @returns `{ status: 200, data: WorkflowState }` on success
87
+ */
30
88
  export declare function getWorkflowState(input: {
31
89
  workflowId: string;
32
90
  }): Promise<LTApiResult>;