@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.
Files changed (278) 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 +276 -5
  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 +68 -1
  29. package/build/api/tasks.js +92 -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 +117 -1
  36. package/build/api/yaml-workflows.d.ts +195 -0
  37. package/build/api/yaml-workflows.js +195 -0
  38. package/build/examples/seed.js +18 -0
  39. package/build/examples/types/envelopes.d.ts +35 -0
  40. package/build/examples/types/index.d.ts +1 -1
  41. package/build/examples/workers.js +10 -0
  42. package/build/examples/workflows/assembly-line/activities.d.ts +28 -0
  43. package/build/examples/workflows/assembly-line/activities.js +53 -0
  44. package/build/examples/workflows/assembly-line/index.d.ts +17 -0
  45. package/build/examples/workflows/assembly-line/index.js +60 -0
  46. package/build/examples/workflows/assembly-line/iterator.d.ts +12 -0
  47. package/build/examples/workflows/assembly-line/iterator.js +54 -0
  48. package/build/examples/workflows/assembly-line/reverter.d.ts +18 -0
  49. package/build/examples/workflows/assembly-line/reverter.js +89 -0
  50. package/build/examples/workflows/assembly-line/types.d.ts +25 -0
  51. package/build/examples/workflows/assembly-line/types.js +8 -0
  52. package/build/examples/workflows/assembly-line/worker.d.ts +13 -0
  53. package/build/examples/workflows/assembly-line/worker.js +81 -0
  54. package/build/examples/workflows/basic-signal/activities.d.ts +17 -0
  55. package/build/examples/workflows/basic-signal/activities.js +18 -0
  56. package/build/examples/workflows/basic-signal/index.d.ts +17 -0
  57. package/build/examples/workflows/basic-signal/index.js +116 -0
  58. package/build/index.d.ts +1 -0
  59. package/build/index.js +4 -1
  60. package/build/lib/db/schemas/002_seed.sql +9 -1
  61. package/build/modules/ltconfig.d.ts +8 -1
  62. package/build/modules/ltconfig.js +12 -2
  63. package/build/routes/escalations/list.js +22 -0
  64. package/build/routes/tasks.js +23 -0
  65. package/build/routes/workflows/invocation.js +16 -10
  66. package/build/sdk/index.d.ts +26 -0
  67. package/build/sdk/index.js +2 -0
  68. package/build/services/interceptor/index.js +9 -3
  69. package/build/services/orchestrator/condition.d.ts +34 -0
  70. package/build/services/orchestrator/condition.js +92 -0
  71. package/build/services/workflow-invocation.d.ts +16 -3
  72. package/build/services/workflow-invocation.js +15 -7
  73. package/build/start/index.d.ts +24 -0
  74. package/build/start/index.js +24 -0
  75. package/build/start/workers.d.ts +6 -8
  76. package/build/start/workers.js +25 -2
  77. package/build/system/mcp-servers/admin/workflows.js +5 -0
  78. package/build/tsconfig.tsbuildinfo +1 -1
  79. package/build/types/envelope.d.ts +7 -0
  80. package/build/types/sdk.d.ts +2 -0
  81. package/build/types/startup.d.ts +29 -2
  82. package/dashboard/dist/assets/{AdminDashboard-DRjkRSjJ.js → AdminDashboard-DUrSBQOl.js} +2 -2
  83. package/dashboard/dist/assets/{AdminDashboard-DRjkRSjJ.js.map → AdminDashboard-DUrSBQOl.js.map} +1 -1
  84. package/dashboard/dist/assets/{AvailableEscalationsPage-CnivX4Tz.js → AvailableEscalationsPage-Dbd1qUK_.js} +2 -2
  85. package/dashboard/dist/assets/{AvailableEscalationsPage-CnivX4Tz.js.map → AvailableEscalationsPage-Dbd1qUK_.js.map} +1 -1
  86. package/dashboard/dist/assets/{BotPicker-DwwaBhTH.js → BotPicker-Cg5iNEkm.js} +2 -2
  87. package/dashboard/dist/assets/{BotPicker-DwwaBhTH.js.map → BotPicker-Cg5iNEkm.js.map} +1 -1
  88. package/dashboard/dist/assets/{CollapsibleSection-DQpaVA0M.js → CollapsibleSection-Kd9UIyeU.js} +2 -2
  89. package/dashboard/dist/assets/{CollapsibleSection-DQpaVA0M.js.map → CollapsibleSection-Kd9UIyeU.js.map} +1 -1
  90. package/dashboard/dist/assets/{ConfirmDeleteModal-B7JoDNvt.js → ConfirmDeleteModal-DZMgmlof.js} +2 -2
  91. package/dashboard/dist/assets/{ConfirmDeleteModal-B7JoDNvt.js.map → ConfirmDeleteModal-DZMgmlof.js.map} +1 -1
  92. package/dashboard/dist/assets/{CopyableId-AqoZayBG.js → CopyableId-cPFTRm8q.js} +2 -2
  93. package/dashboard/dist/assets/{CopyableId-AqoZayBG.js.map → CopyableId-cPFTRm8q.js.map} +1 -1
  94. package/dashboard/dist/assets/{CredentialsPage-qGw1kQzi.js → CredentialsPage-DJablIbs.js} +2 -2
  95. package/dashboard/dist/assets/{CredentialsPage-qGw1kQzi.js.map → CredentialsPage-DJablIbs.js.map} +1 -1
  96. package/dashboard/dist/assets/{CustomDurationPicker-D1HUQcd0.js → CustomDurationPicker-NgIP6YDW.js} +2 -2
  97. package/dashboard/dist/assets/{CustomDurationPicker-D1HUQcd0.js.map → CustomDurationPicker-NgIP6YDW.js.map} +1 -1
  98. package/dashboard/dist/assets/{DataTable-DKvSKoVG.js → DataTable-CTRhTAfT.js} +2 -2
  99. package/dashboard/dist/assets/{DataTable-DKvSKoVG.js.map → DataTable-CTRhTAfT.js.map} +1 -1
  100. package/dashboard/dist/assets/{ElapsedCell-B0yrReGQ.js → ElapsedCell-HcSJ_MMs.js} +2 -2
  101. package/dashboard/dist/assets/{ElapsedCell-B0yrReGQ.js.map → ElapsedCell-HcSJ_MMs.js.map} +1 -1
  102. package/dashboard/dist/assets/{EmptyState-X0fIzYID.js → EmptyState-joNbd4gg.js} +2 -2
  103. package/dashboard/dist/assets/{EmptyState-X0fIzYID.js.map → EmptyState-joNbd4gg.js.map} +1 -1
  104. package/dashboard/dist/assets/{EscalationsOverview-BQAT9W7r.js → EscalationsOverview-DpXDnQux.js} +2 -2
  105. package/dashboard/dist/assets/{EscalationsOverview-BQAT9W7r.js.map → EscalationsOverview-DpXDnQux.js.map} +1 -1
  106. package/dashboard/dist/assets/{EventTable-CX1KNLhZ.js → EventTable-CYem3v8n.js} +2 -2
  107. package/dashboard/dist/assets/{EventTable-CX1KNLhZ.js.map → EventTable-CYem3v8n.js.map} +1 -1
  108. package/dashboard/dist/assets/{FilterBar-DMTvuQy-.js → FilterBar-BiO8SOzc.js} +2 -2
  109. package/dashboard/dist/assets/{FilterBar-DMTvuQy-.js.map → FilterBar-BiO8SOzc.js.map} +1 -1
  110. package/dashboard/dist/assets/{ListToolbar-DTOSxoEy.js → ListToolbar-6yRDh2e9.js} +2 -2
  111. package/dashboard/dist/assets/{ListToolbar-DTOSxoEy.js.map → ListToolbar-6yRDh2e9.js.map} +1 -1
  112. package/dashboard/dist/assets/{McpOverview-BaKTIWrG.js → McpOverview-CUgSxkQe.js} +2 -2
  113. package/dashboard/dist/assets/{McpOverview-BaKTIWrG.js.map → McpOverview-CUgSxkQe.js.map} +1 -1
  114. package/dashboard/dist/assets/{McpQueryDetailPage-CC08T5k8.js → McpQueryDetailPage-BWbinTM_.js} +2 -2
  115. package/dashboard/dist/assets/{McpQueryDetailPage-CC08T5k8.js.map → McpQueryDetailPage-BWbinTM_.js.map} +1 -1
  116. package/dashboard/dist/assets/{McpQueryPage-CVfF9dYg.js → McpQueryPage-lV6kfDG5.js} +2 -2
  117. package/dashboard/dist/assets/{McpQueryPage-CVfF9dYg.js.map → McpQueryPage-lV6kfDG5.js.map} +1 -1
  118. package/dashboard/dist/assets/{McpRunDetailPage-CKs1RWeV.js → McpRunDetailPage-D6gaxH3_.js} +2 -2
  119. package/dashboard/dist/assets/{McpRunDetailPage-CKs1RWeV.js.map → McpRunDetailPage-D6gaxH3_.js.map} +1 -1
  120. package/dashboard/dist/assets/{McpRunsPage-CcPD_tY1.js → McpRunsPage-DKvTklh9.js} +2 -2
  121. package/dashboard/dist/assets/{McpRunsPage-CcPD_tY1.js.map → McpRunsPage-DKvTklh9.js.map} +1 -1
  122. package/dashboard/dist/assets/{Modal-_2AbWxJT.js → Modal-BuTvD0pz.js} +2 -2
  123. package/dashboard/dist/assets/{Modal-_2AbWxJT.js.map → Modal-BuTvD0pz.js.map} +1 -1
  124. package/dashboard/dist/assets/{OperatorDashboard-BGiRaRDr.js → OperatorDashboard-C9SSV96T.js} +2 -2
  125. package/dashboard/dist/assets/{OperatorDashboard-BGiRaRDr.js.map → OperatorDashboard-C9SSV96T.js.map} +1 -1
  126. package/dashboard/dist/assets/{PageHeader-DVr5Qyzm.js → PageHeader-BcTVF9ul.js} +2 -2
  127. package/dashboard/dist/assets/{PageHeader-DVr5Qyzm.js.map → PageHeader-BcTVF9ul.js.map} +1 -1
  128. package/dashboard/dist/assets/{PageHeaderWithStats-D0KRASML.js → PageHeaderWithStats-BI7JG5x6.js} +2 -2
  129. package/dashboard/dist/assets/{PageHeaderWithStats-D0KRASML.js.map → PageHeaderWithStats-BI7JG5x6.js.map} +1 -1
  130. package/dashboard/dist/assets/{PriorityBadge-Bx2559OU.js → PriorityBadge-DqVaOU65.js} +2 -2
  131. package/dashboard/dist/assets/{PriorityBadge-Bx2559OU.js.map → PriorityBadge-DqVaOU65.js.map} +1 -1
  132. package/dashboard/dist/assets/{ProcessDetailPage-69I--sry.js → ProcessDetailPage-hFMhf9qa.js} +2 -2
  133. package/dashboard/dist/assets/{ProcessDetailPage-69I--sry.js.map → ProcessDetailPage-hFMhf9qa.js.map} +1 -1
  134. package/dashboard/dist/assets/{ProcessesListPage-BDpUbua2.js → ProcessesListPage-ByVoBCQ3.js} +2 -2
  135. package/dashboard/dist/assets/{ProcessesListPage-BDpUbua2.js.map → ProcessesListPage-ByVoBCQ3.js.map} +1 -1
  136. package/dashboard/dist/assets/{RolePill-CcAqEaSt.js → RolePill-D9ZIkYiu.js} +2 -2
  137. package/dashboard/dist/assets/{RolePill-CcAqEaSt.js.map → RolePill-D9ZIkYiu.js.map} +1 -1
  138. package/dashboard/dist/assets/{RolesPage-Cl23Hjet.js → RolesPage-SMedMuqa.js} +2 -2
  139. package/dashboard/dist/assets/{RolesPage-Cl23Hjet.js.map → RolesPage-SMedMuqa.js.map} +1 -1
  140. package/dashboard/dist/assets/{RowActions-B4mqIt3Z.js → RowActions-yDhwwDbU.js} +2 -2
  141. package/dashboard/dist/assets/{RowActions-B4mqIt3Z.js.map → RowActions-yDhwwDbU.js.map} +1 -1
  142. package/dashboard/dist/assets/{StatCard-Cz_2OjAZ.js → StatCard-BrBnQFxh.js} +2 -2
  143. package/dashboard/dist/assets/{StatCard-Cz_2OjAZ.js.map → StatCard-BrBnQFxh.js.map} +1 -1
  144. package/dashboard/dist/assets/{StatusBadge-Wi2FJZsn.js → StatusBadge-xgb-lZku.js} +2 -2
  145. package/dashboard/dist/assets/{StatusBadge-Wi2FJZsn.js.map → StatusBadge-xgb-lZku.js.map} +1 -1
  146. package/dashboard/dist/assets/{StepIndicator-PW5NRDMb.js → StepIndicator-B9ps2SvM.js} +2 -2
  147. package/dashboard/dist/assets/{StepIndicator-PW5NRDMb.js.map → StepIndicator-B9ps2SvM.js.map} +1 -1
  148. package/dashboard/dist/assets/{StickyPagination-Bl2Uzz65.js → StickyPagination-DTIjBKN3.js} +2 -2
  149. package/dashboard/dist/assets/{StickyPagination-Bl2Uzz65.js.map → StickyPagination-DTIjBKN3.js.map} +1 -1
  150. package/dashboard/dist/assets/{SwimlaneTimeline-CUPqMd0z.js → SwimlaneTimeline-RK4Yu66z.js} +2 -2
  151. package/dashboard/dist/assets/{SwimlaneTimeline-CUPqMd0z.js.map → SwimlaneTimeline-RK4Yu66z.js.map} +1 -1
  152. package/dashboard/dist/assets/{TagInput-BLtf86Ly.js → TagInput-CdNUuqk4.js} +2 -2
  153. package/dashboard/dist/assets/{TagInput-BLtf86Ly.js.map → TagInput-CdNUuqk4.js.map} +1 -1
  154. package/dashboard/dist/assets/{TaskDetailPage-BXJFX74D.js → TaskDetailPage-C-nzaNea.js} +2 -2
  155. package/dashboard/dist/assets/{TaskDetailPage-BXJFX74D.js.map → TaskDetailPage-C-nzaNea.js.map} +1 -1
  156. package/dashboard/dist/assets/{TaskQueuePill-CWYj3xKe.js → TaskQueuePill-Lvr2-NzS.js} +2 -2
  157. package/dashboard/dist/assets/{TaskQueuePill-CWYj3xKe.js.map → TaskQueuePill-Lvr2-NzS.js.map} +1 -1
  158. package/dashboard/dist/assets/{TasksListPage-C3cX94Mw.js → TasksListPage-DSUmD84y.js} +2 -2
  159. package/dashboard/dist/assets/{TasksListPage-C3cX94Mw.js.map → TasksListPage-DSUmD84y.js.map} +1 -1
  160. package/dashboard/dist/assets/{TimeAgo-B_5yDDHV.js → TimeAgo-BZdLdrIh.js} +2 -2
  161. package/dashboard/dist/assets/{TimeAgo-B_5yDDHV.js.map → TimeAgo-BZdLdrIh.js.map} +1 -1
  162. package/dashboard/dist/assets/{TimestampCell-DRX724uU.js → TimestampCell-QX_0i5FK.js} +2 -2
  163. package/dashboard/dist/assets/{TimestampCell-DRX724uU.js.map → TimestampCell-QX_0i5FK.js.map} +1 -1
  164. package/dashboard/dist/assets/{UserName-Ca8FA469.js → UserName-DyZMXcBm.js} +2 -2
  165. package/dashboard/dist/assets/{UserName-Ca8FA469.js.map → UserName-DyZMXcBm.js.map} +1 -1
  166. package/dashboard/dist/assets/{WorkflowExecutionPage-BBYWEV2P.js → WorkflowExecutionPage-DjVxfZaF.js} +2 -2
  167. package/dashboard/dist/assets/{WorkflowExecutionPage-BBYWEV2P.js.map → WorkflowExecutionPage-DjVxfZaF.js.map} +1 -1
  168. package/dashboard/dist/assets/WorkflowPill-CZqGslD6.js +2 -0
  169. package/dashboard/dist/assets/WorkflowPill-CZqGslD6.js.map +1 -0
  170. package/dashboard/dist/assets/WorkflowsDashboard-DZjuiFZ0.js +2 -0
  171. package/dashboard/dist/assets/WorkflowsDashboard-DZjuiFZ0.js.map +1 -0
  172. package/dashboard/dist/assets/{WorkflowsOverview-03IRrDLg.js → WorkflowsOverview-CLnLRpOu.js} +2 -2
  173. package/dashboard/dist/assets/{WorkflowsOverview-03IRrDLg.js.map → WorkflowsOverview-CLnLRpOu.js.map} +1 -1
  174. package/dashboard/dist/assets/{YamlWorkflowsPage-DC2cLxVi.js → YamlWorkflowsPage-VjdhnLmO.js} +2 -2
  175. package/dashboard/dist/assets/{YamlWorkflowsPage-DC2cLxVi.js.map → YamlWorkflowsPage-VjdhnLmO.js.map} +1 -1
  176. package/dashboard/dist/assets/{bots-DZEXcgiJ.js → bots-DIM6lBoY.js} +2 -2
  177. package/dashboard/dist/assets/{bots-DZEXcgiJ.js.map → bots-DIM6lBoY.js.map} +1 -1
  178. package/dashboard/dist/assets/{escalation-Cw48lNaF.js → escalation-JOTuOqjq.js} +2 -2
  179. package/dashboard/dist/assets/{escalation-Cw48lNaF.js.map → escalation-JOTuOqjq.js.map} +1 -1
  180. package/dashboard/dist/assets/{escalation-columns-NINpo3qf.js → escalation-columns-Cyg58nkg.js} +2 -2
  181. package/dashboard/dist/assets/{escalation-columns-NINpo3qf.js.map → escalation-columns-Cyg58nkg.js.map} +1 -1
  182. package/dashboard/dist/assets/{helpers-fk_qr729.js → helpers-B1BDxBZd.js} +2 -2
  183. package/dashboard/dist/assets/{helpers-fk_qr729.js.map → helpers-B1BDxBZd.js.map} +1 -1
  184. package/dashboard/dist/assets/{helpers-Cuu3xKfr.js → helpers-BCix9c_m.js} +2 -2
  185. package/dashboard/dist/assets/{helpers-Cuu3xKfr.js.map → helpers-BCix9c_m.js.map} +1 -1
  186. package/dashboard/dist/assets/{index-Dj-z-x8M.js → index-BUK3qR-1.js} +2 -2
  187. package/dashboard/dist/assets/{index-Dj-z-x8M.js.map → index-BUK3qR-1.js.map} +1 -1
  188. package/dashboard/dist/assets/{index-BwN3KP_L.js → index-BYZX9tOb.js} +8 -8
  189. package/dashboard/dist/assets/index-BYZX9tOb.js.map +1 -0
  190. package/dashboard/dist/assets/{index-BIG3KooI.js → index-BcR6PfpY.js} +2 -2
  191. package/dashboard/dist/assets/{index-BIG3KooI.js.map → index-BcR6PfpY.js.map} +1 -1
  192. package/dashboard/dist/assets/index-BizfauqT.js +6 -0
  193. package/dashboard/dist/assets/index-BizfauqT.js.map +1 -0
  194. package/dashboard/dist/assets/{index-aRvL-dXp.js → index-Cf60K3x9.js} +2 -2
  195. package/dashboard/dist/assets/{index-aRvL-dXp.js.map → index-Cf60K3x9.js.map} +1 -1
  196. package/dashboard/dist/assets/{index-b03HlbnH.js → index-Cg5nfiYX.js} +2 -2
  197. package/dashboard/dist/assets/{index-b03HlbnH.js.map → index-Cg5nfiYX.js.map} +1 -1
  198. package/dashboard/dist/assets/index-D1wVX50Z.js +15 -0
  199. package/dashboard/dist/assets/index-D1wVX50Z.js.map +1 -0
  200. package/dashboard/dist/assets/{index-DwRytW9O.js → index-DDYFpi4l.js} +4 -4
  201. package/dashboard/dist/assets/index-DDYFpi4l.js.map +1 -0
  202. package/dashboard/dist/assets/{index-B98ipWxE.js → index-Di12t56M.js} +2 -2
  203. package/dashboard/dist/assets/{index-B98ipWxE.js.map → index-Di12t56M.js.map} +1 -1
  204. package/dashboard/dist/assets/{index-CORHB0WC.js → index-Ds0JoXS2.js} +2 -2
  205. package/dashboard/dist/assets/{index-CORHB0WC.js.map → index-Ds0JoXS2.js.map} +1 -1
  206. package/dashboard/dist/assets/{mcp-BZoFryNc.js → mcp-B_xbczAt.js} +2 -2
  207. package/dashboard/dist/assets/{mcp-BZoFryNc.js.map → mcp-B_xbczAt.js.map} +1 -1
  208. package/dashboard/dist/assets/{mcp-query-wiw1kwm8.js → mcp-query-B8-P_QoG.js} +2 -2
  209. package/dashboard/dist/assets/{mcp-query-wiw1kwm8.js.map → mcp-query-B8-P_QoG.js.map} +1 -1
  210. package/dashboard/dist/assets/{mcp-runs-BaEKnf5v.js → mcp-runs-CWeZinoF.js} +2 -2
  211. package/dashboard/dist/assets/{mcp-runs-BaEKnf5v.js.map → mcp-runs-CWeZinoF.js.map} +1 -1
  212. package/dashboard/dist/assets/{namespaces-BwnZI4_A.js → namespaces-C3WtdO_9.js} +2 -2
  213. package/dashboard/dist/assets/{namespaces-BwnZI4_A.js.map → namespaces-C3WtdO_9.js.map} +1 -1
  214. package/dashboard/dist/assets/{roles-Bgn1K8zU.js → roles-BDAsPpZG.js} +2 -2
  215. package/dashboard/dist/assets/{roles-Bgn1K8zU.js.map → roles-BDAsPpZG.js.map} +1 -1
  216. package/dashboard/dist/assets/{settings-CizYiutL.js → settings-Ife_UwAp.js} +2 -2
  217. package/dashboard/dist/assets/{settings-CizYiutL.js.map → settings-Ife_UwAp.js.map} +1 -1
  218. package/dashboard/dist/assets/{tasks-Bmte_hc4.js → tasks-BquNDHDI.js} +2 -2
  219. package/dashboard/dist/assets/{tasks-Bmte_hc4.js.map → tasks-BquNDHDI.js.map} +1 -1
  220. package/dashboard/dist/assets/{useEventHooks-CUCxpiI2.js → useEventHooks-anv_B2Yy.js} +2 -2
  221. package/dashboard/dist/assets/{useEventHooks-CUCxpiI2.js.map → useEventHooks-anv_B2Yy.js.map} +1 -1
  222. package/dashboard/dist/assets/{useYamlActivityEvents-Cum02Ej9.js → useYamlActivityEvents-DN-PTgVx.js} +2 -2
  223. package/dashboard/dist/assets/{useYamlActivityEvents-Cum02Ej9.js.map → useYamlActivityEvents-DN-PTgVx.js.map} +1 -1
  224. package/dashboard/dist/assets/{users-NSDgTt-z.js → users-CFcxB4v6.js} +2 -2
  225. package/dashboard/dist/assets/{users-NSDgTt-z.js.map → users-CFcxB4v6.js.map} +1 -1
  226. package/dashboard/dist/assets/{vendor-icons-D1DdudfH.js → vendor-icons-T4r2DSPD.js} +2 -2
  227. package/dashboard/dist/assets/{vendor-icons-D1DdudfH.js.map → vendor-icons-T4r2DSPD.js.map} +1 -1
  228. package/dashboard/dist/assets/{workflows-k0XRdGXx.js → workflows-CeRci9z3.js} +2 -2
  229. package/dashboard/dist/assets/{workflows-k0XRdGXx.js.map → workflows-CeRci9z3.js.map} +1 -1
  230. package/dashboard/dist/assets/{yaml-workflows-DAre8I78.js → yaml-workflows-DLwd2BOX.js} +2 -2
  231. package/dashboard/dist/assets/{yaml-workflows-DAre8I78.js.map → yaml-workflows-DLwd2BOX.js.map} +1 -1
  232. package/dashboard/dist/index.html +2 -2
  233. package/docs/api/{escalations.md → http/escalations.md} +99 -0
  234. package/docs/api/{tasks.md → http/tasks.md} +47 -0
  235. package/docs/api/sdk/auth.md +27 -0
  236. package/docs/api/sdk/bot-accounts.md +243 -0
  237. package/docs/api/sdk/controlplane.md +103 -0
  238. package/docs/api/sdk/dba.md +52 -0
  239. package/docs/api/sdk/escalations.md +511 -0
  240. package/docs/api/sdk/events.md +68 -0
  241. package/docs/api/sdk/exports.md +124 -0
  242. package/docs/api/sdk/insight.md +112 -0
  243. package/docs/api/sdk/maintenance.md +54 -0
  244. package/docs/api/sdk/mcp-runs.md +71 -0
  245. package/docs/api/sdk/mcp.md +250 -0
  246. package/docs/api/sdk/namespaces.md +43 -0
  247. package/docs/api/sdk/roles.md +183 -0
  248. package/docs/api/sdk/settings.md +24 -0
  249. package/docs/api/sdk/tasks.md +159 -0
  250. package/docs/api/sdk/users.md +196 -0
  251. package/docs/api/sdk/workflow-sets.md +135 -0
  252. package/docs/api/sdk/workflows.md +271 -0
  253. package/docs/api/sdk/yaml-workflows.md +408 -0
  254. package/package.json +1 -1
  255. package/dashboard/dist/assets/WorkflowPill-BXifAuLi.js +0 -2
  256. package/dashboard/dist/assets/WorkflowPill-BXifAuLi.js.map +0 -1
  257. package/dashboard/dist/assets/WorkflowsDashboard-Drl3juz9.js +0 -2
  258. package/dashboard/dist/assets/WorkflowsDashboard-Drl3juz9.js.map +0 -1
  259. package/dashboard/dist/assets/index-BwN3KP_L.js.map +0 -1
  260. package/dashboard/dist/assets/index-Bxe8h1x4.js +0 -17
  261. package/dashboard/dist/assets/index-Bxe8h1x4.js.map +0 -1
  262. package/dashboard/dist/assets/index-CNI7k7oB.js +0 -6
  263. package/dashboard/dist/assets/index-CNI7k7oB.js.map +0 -1
  264. package/dashboard/dist/assets/index-DwRytW9O.js.map +0 -1
  265. package/docs/epic-integration.md +0 -224
  266. package/docs/workflow-builder.md +0 -371
  267. /package/docs/api/{dba.md → http/dba.md} +0 -0
  268. /package/docs/api/{exports.md → http/exports.md} +0 -0
  269. /package/docs/api/{maintenance.md → http/maintenance.md} +0 -0
  270. /package/docs/api/{mcp-runs.md → http/mcp-runs.md} +0 -0
  271. /package/docs/api/{mcp-servers.md → http/mcp-servers.md} +0 -0
  272. /package/docs/api/{namespaces.md → http/namespaces.md} +0 -0
  273. /package/docs/api/{roles.md → http/roles.md} +0 -0
  274. /package/docs/api/{service-accounts.md → http/service-accounts.md} +0 -0
  275. /package/docs/api/{settings.md → http/settings.md} +0 -0
  276. /package/docs/api/{users.md → http/users.md} +0 -0
  277. /package/docs/api/{workflows.md → http/workflows.md} +0 -0
  278. /package/docs/api/{yaml-workflows.md → http/yaml-workflows.md} +0 -0
@@ -0,0 +1,511 @@
1
+ # lt.escalations
2
+
3
+ Manage human-in-the-loop escalations -- list, claim, resolve, and bulk-operate on workflow escalations.
4
+
5
+ ## create
6
+
7
+ Create an escalation. The caller must hold the target role or be a superadmin.
8
+
9
+ ```typescript
10
+ const result = await lt.escalations.create({
11
+ type: 'approval',
12
+ role: 'reviewer',
13
+ description: 'Review deployment to production',
14
+ metadata: {
15
+ form_schema: {
16
+ properties: {
17
+ approved: { type: 'boolean', default: false, description: 'Approve?' },
18
+ environment: { type: 'string', enum: ['staging', 'production'] },
19
+ api_key: { type: 'string', format: 'password', description: 'Deploy key' },
20
+ },
21
+ },
22
+ },
23
+ });
24
+ ```
25
+
26
+ **Parameters:**
27
+
28
+ | Field | Type | Required | Description |
29
+ |-------|------|----------|-------------|
30
+ | `type` | `string` | Yes | Escalation category |
31
+ | `role` | `string` | Yes | Target role for the reviewer queue |
32
+ | `subtype` | `string` | No | Subcategory (defaults to `type`) |
33
+ | `description` | `string` | No | Human-readable reason |
34
+ | `priority` | `number` | No | 1 (highest) to 4 (lowest), default: 2 |
35
+ | `envelope` | `string` | No | JSON-serialized workflow envelope |
36
+ | `metadata` | `object` | No | Arbitrary metadata; include `form_schema` for typed resolver forms |
37
+ | `escalation_payload` | `string` | No | JSON context data shown to the reviewer |
38
+
39
+ **Returns:** `LTApiResult<Escalation>` with status 201.
40
+
41
+ **Auth:** Required (RBAC enforced)
42
+
43
+ ---
44
+
45
+ ## list
46
+
47
+ List escalations with optional filters, scoped to the authenticated user's roles.
48
+
49
+ ```typescript
50
+ const result = await lt.escalations.list({
51
+ status: 'pending',
52
+ role: 'reviewer',
53
+ limit: 25,
54
+ });
55
+ ```
56
+
57
+ **Parameters:**
58
+
59
+ | Field | Type | Required | Description |
60
+ |-------|------|----------|-------------|
61
+ | `status` | `string` | No | Filter by `pending`, `resolved`, or `cancelled` |
62
+ | `role` | `string` | No | Filter by assigned role |
63
+ | `type` | `string` | No | Filter by workflow type |
64
+ | `subtype` | `string` | No | Filter by subtype |
65
+ | `assigned_to` | `string` | No | Filter by assigned user ID |
66
+ | `priority` | `number` | No | Filter by priority (1--4) |
67
+ | `limit` | `number` | No | Max results (default: 50) |
68
+ | `offset` | `number` | No | Pagination offset |
69
+ | `sort_by` | `string` | No | Column to sort by (e.g. `created_at`, `priority`) |
70
+ | `order` | `string` | No | `asc` or `desc` |
71
+
72
+ **Returns:** `LTApiResult<{ escalations, total }>`
73
+
74
+ **Auth:** Required
75
+
76
+ ---
77
+
78
+ ## listAvailable
79
+
80
+ List escalations available for claim (pending and not actively claimed).
81
+
82
+ ```typescript
83
+ const result = await lt.escalations.listAvailable({
84
+ role: 'reviewer',
85
+ limit: 10,
86
+ });
87
+ ```
88
+
89
+ **Parameters:**
90
+
91
+ | Field | Type | Required | Description |
92
+ |-------|------|----------|-------------|
93
+ | `role` | `string` | No | Filter by role |
94
+ | `type` | `string` | No | Filter by workflow type |
95
+ | `subtype` | `string` | No | Filter by subtype |
96
+ | `priority` | `number` | No | Filter by priority (1--4) |
97
+ | `limit` | `number` | No | Max results (default: 50) |
98
+ | `offset` | `number` | No | Pagination offset |
99
+ | `sort_by` | `string` | No | Column to sort by |
100
+ | `order` | `string` | No | `asc` or `desc` |
101
+
102
+ **Returns:** `LTApiResult<{ escalations, total }>`
103
+
104
+ **Auth:** Required
105
+
106
+ ---
107
+
108
+ ## listTypes
109
+
110
+ List all distinct escalation type values.
111
+
112
+ ```typescript
113
+ const result = await lt.escalations.listTypes();
114
+ ```
115
+
116
+ **Parameters:** None (pass `{}` or `undefined`).
117
+
118
+ **Returns:** `LTApiResult<{ types: string[] }>`
119
+
120
+ **Auth:** Not required
121
+
122
+ ---
123
+
124
+ ## getStats
125
+
126
+ Get aggregate escalation statistics scoped to the user's roles.
127
+
128
+ ```typescript
129
+ const result = await lt.escalations.getStats({ period: '24h' });
130
+ ```
131
+
132
+ **Parameters:**
133
+
134
+ | Field | Type | Required | Description |
135
+ |-------|------|----------|-------------|
136
+ | `period` | `string` | No | Time window (`1h`, `24h`, `7d`, `30d`) |
137
+
138
+ **Returns:** `LTApiResult<{ pending, claimed, created, resolved, by_role, by_type }>`
139
+
140
+ **Auth:** Required
141
+
142
+ ---
143
+
144
+ ## get
145
+
146
+ Get a single escalation by ID.
147
+
148
+ ```typescript
149
+ const result = await lt.escalations.get({ id: 'esc_123' });
150
+ ```
151
+
152
+ **Parameters:**
153
+
154
+ | Field | Type | Required | Description |
155
+ |-------|------|----------|-------------|
156
+ | `id` | `string` | Yes | Escalation UUID |
157
+
158
+ **Returns:** `LTApiResult<Escalation>` -- returns 403 if user lacks the role, 404 if not found.
159
+
160
+ **Auth:** Required
161
+
162
+ ---
163
+
164
+ ## getByWorkflowId
165
+
166
+ List all escalations for a given workflow ID.
167
+
168
+ ```typescript
169
+ const result = await lt.escalations.getByWorkflowId({ workflowId: 'wf_abc' });
170
+ ```
171
+
172
+ **Parameters:**
173
+
174
+ | Field | Type | Required | Description |
175
+ |-------|------|----------|-------------|
176
+ | `workflowId` | `string` | Yes | HotMesh workflow ID |
177
+
178
+ **Returns:** `LTApiResult<{ escalations }>`
179
+
180
+ **Auth:** Not required
181
+
182
+ ---
183
+
184
+ ## escalate
185
+
186
+ Route a pending escalation to a different role.
187
+
188
+ ```typescript
189
+ const result = await lt.escalations.escalate({
190
+ id: 'esc_123',
191
+ targetRole: 'senior-reviewer',
192
+ });
193
+ ```
194
+
195
+ **Parameters:**
196
+
197
+ | Field | Type | Required | Description |
198
+ |-------|------|----------|-------------|
199
+ | `id` | `string` | Yes | Escalation UUID |
200
+ | `targetRole` | `string` | Yes | Destination role |
201
+
202
+ **Returns:** `LTApiResult<Escalation>` -- returns 403 if not authorized, 404 if not found, 409 if not pending.
203
+
204
+ **Auth:** Required
205
+
206
+ ---
207
+
208
+ ## claim
209
+
210
+ Claim a pending escalation for the authenticated user.
211
+
212
+ ```typescript
213
+ const result = await lt.escalations.claim({
214
+ id: 'esc_123',
215
+ durationMinutes: 60,
216
+ });
217
+ ```
218
+
219
+ **Parameters:**
220
+
221
+ | Field | Type | Required | Description |
222
+ |-------|------|----------|-------------|
223
+ | `id` | `string` | Yes | Escalation UUID |
224
+ | `durationMinutes` | `number` | No | Claim duration (default: 30) |
225
+
226
+ **Returns:** `LTApiResult<{ escalation, isExtension }>` -- returns 403 if user lacks the role, 404 if not found, 409 if not available.
227
+
228
+ **Auth:** Required
229
+
230
+ ---
231
+
232
+ ## release
233
+
234
+ Release a claimed escalation back to the pool.
235
+
236
+ ```typescript
237
+ const result = await lt.escalations.release({ id: 'esc_123' });
238
+ ```
239
+
240
+ **Parameters:**
241
+
242
+ | Field | Type | Required | Description |
243
+ |-------|------|----------|-------------|
244
+ | `id` | `string` | Yes | Escalation UUID |
245
+
246
+ **Returns:** `LTApiResult<{ escalation }>` -- returns 409 if not claimed by the caller.
247
+
248
+ **Auth:** Required
249
+
250
+ ---
251
+
252
+ ## resolve
253
+
254
+ Resolve a pending escalation with a human-provided payload.
255
+
256
+ Supports two resolution paths: signal-routed (sends payload to a paused workflow) and re-run (restarts the workflow with resolver data injected). Password fields are replaced with ephemeral tokens.
257
+
258
+ ```typescript
259
+ const result = await lt.escalations.resolve({
260
+ id: 'esc_123',
261
+ resolverPayload: { approved: true, comment: 'Looks good' },
262
+ });
263
+ ```
264
+
265
+ **Parameters:**
266
+
267
+ | Field | Type | Required | Description |
268
+ |-------|------|----------|-------------|
269
+ | `id` | `string` | Yes | Escalation UUID |
270
+ | `resolverPayload` | `Record<string, any>` | Yes | Human decision data |
271
+
272
+ **Returns:** `LTApiResult<{ signaled, escalationId, workflowId }>` (signal path) or `LTApiResult<{ started, escalationId, workflowId }>` (re-run path) -- returns 404 if not found, 409 if not pending.
273
+
274
+ **Auth:** Required
275
+
276
+ ---
277
+
278
+ ## conditionLT (workflow helper)
279
+
280
+ Wait for a signal and automatically resolve the associated escalation. This is the counterpart to `executeLT` — where `executeLT` wraps `startChild` + `condition`, `conditionLT` wraps `condition` + escalation resolution.
281
+
282
+ ```typescript
283
+ import { conditionLT } from '@hotmeshio/long-tail';
284
+
285
+ export async function myWorkflow(envelope: LTEnvelope) {
286
+ const signalId = `approval-${Durable.workflow.workflowId}`;
287
+
288
+ // Create escalation with signal_id in metadata
289
+ await activities.ltCreateEscalation({
290
+ type: 'approval',
291
+ role: 'reviewer',
292
+ workflow_id: Durable.workflow.workflowId,
293
+ workflow_type: 'myWorkflow',
294
+ task_queue: 'my-queue',
295
+ metadata: {
296
+ signal_id: signalId,
297
+ form_schema: {
298
+ properties: {
299
+ approved: { type: 'boolean', default: false },
300
+ notes: { type: 'string', default: '' },
301
+ },
302
+ },
303
+ },
304
+ envelope: JSON.stringify(envelope),
305
+ });
306
+
307
+ // Pause — dashboard signals on resolve
308
+ const decision = await conditionLT<{ approved: boolean; notes: string }>(signalId);
309
+ // decision is clean: { approved: true, notes: "..." }
310
+ // $escalation_id was stripped and the escalation was resolved via durable activity
311
+ }
312
+ ```
313
+
314
+ **How it works:**
315
+
316
+ 1. The workflow creates an escalation with `metadata.signal_id` pointing to its own signal key
317
+ 2. The workflow calls `conditionLT(signalId)` and pauses
318
+ 3. A reviewer claims and resolves the escalation in the dashboard
319
+ 4. The resolve API injects `$escalation_id` into the payload and signals the workflow
320
+ 5. `conditionLT` receives the signal, strips `$escalation_id`, calls `ltResolveEscalation` as a durable activity, and returns the clean payload
321
+
322
+ The escalation resolution happens inside the workflow as a durable activity — crash-safe and transactional within the workflow's execution context.
323
+
324
+ If you use raw `Durable.workflow.condition()` instead, the `$escalation_id` field will be present in the payload and you are responsible for resolving the escalation yourself.
325
+
326
+ ---
327
+
328
+ ## Resolver form schemas
329
+
330
+ When a reviewer claims an escalation in the dashboard, a typed form is rendered instead of a raw JSON editor — if a schema is available. There are two ways to provide one:
331
+
332
+ **Option 1 — Workflow config (static):** Set `resolver_schema` in the workflow registry wizard (Step 3, Certification). Every escalation from that workflow inherits the schema.
333
+
334
+ **Option 2 — Escalation metadata (dynamic):** Pass `form_schema` inside `metadata` when creating an escalation. This overrides any workflow-level schema.
335
+
336
+ ### Schema shape
337
+
338
+ ```typescript
339
+ {
340
+ properties: {
341
+ fieldName: {
342
+ type: 'string', // inferred from default value at runtime
343
+ default: 'initial', // pre-fills the form field
344
+ description: 'Helper', // text below the label
345
+ enum: ['a', 'b'], // renders a dropdown select
346
+ format: 'password', // masks input; stored as 15-min ephemeral token
347
+ },
348
+ },
349
+ }
350
+ ```
351
+
352
+ ### Field rendering by type
353
+
354
+ | Default value | Renders as |
355
+ |--------------|------------|
356
+ | `boolean` | Checkbox |
357
+ | `number` | Number input |
358
+ | `string` (short) | Text input |
359
+ | `string` (>80 chars) | Textarea |
360
+ | `string` + `enum` | Dropdown |
361
+ | `string` + `format: "password"` | Password input (ephemeral token on resolve) |
362
+ | `object` | Nested section with recursive fields |
363
+ | `array` | Read-only tag list |
364
+
365
+ ### Hidden fields
366
+
367
+ Keys prefixed with `_` are stored in the payload but hidden from the form. `_form_schema` is reserved for round-trip schema access.
368
+
369
+ ### Priority
370
+
371
+ `metadata.form_schema` takes precedence over `resolver_schema` from the workflow config.
372
+
373
+ ---
374
+
375
+ ## releaseExpired
376
+
377
+ Release all escalation claims past their `assigned_until` deadline.
378
+
379
+ ```typescript
380
+ const result = await lt.escalations.releaseExpired();
381
+ ```
382
+
383
+ **Parameters:** None (pass `{}` or `undefined`).
384
+
385
+ **Returns:** `LTApiResult<{ released: number }>`
386
+
387
+ **Auth:** Not required
388
+
389
+ ---
390
+
391
+ ## updatePriority
392
+
393
+ Update priority for one or more escalations.
394
+
395
+ ```typescript
396
+ const result = await lt.escalations.updatePriority({
397
+ ids: ['esc_1', 'esc_2'],
398
+ priority: 1,
399
+ });
400
+ ```
401
+
402
+ **Parameters:**
403
+
404
+ | Field | Type | Required | Description |
405
+ |-------|------|----------|-------------|
406
+ | `ids` | `string[]` | Yes | Array of escalation UUIDs |
407
+ | `priority` | `number` | Yes | New priority (1=critical, 2=high, 3=medium, 4=low) |
408
+
409
+ **Returns:** `LTApiResult<{ updated: number }>`
410
+
411
+ **Auth:** Required
412
+
413
+ ---
414
+
415
+ ## bulkClaim
416
+
417
+ Claim multiple escalations at once for the authenticated user.
418
+
419
+ ```typescript
420
+ const result = await lt.escalations.bulkClaim({
421
+ ids: ['esc_1', 'esc_2'],
422
+ durationMinutes: 60,
423
+ });
424
+ ```
425
+
426
+ **Parameters:**
427
+
428
+ | Field | Type | Required | Description |
429
+ |-------|------|----------|-------------|
430
+ | `ids` | `string[]` | Yes | Array of escalation UUIDs |
431
+ | `durationMinutes` | `number` | No | Claim duration (default: 30) |
432
+
433
+ **Returns:** `LTApiResult<{ claimed, skipped }>`
434
+
435
+ **Auth:** Required
436
+
437
+ ---
438
+
439
+ ## bulkAssign
440
+
441
+ Assign multiple escalations to a specific user.
442
+
443
+ ```typescript
444
+ const result = await lt.escalations.bulkAssign({
445
+ ids: ['esc_1', 'esc_2'],
446
+ targetUserId: 'user_456',
447
+ durationMinutes: 60,
448
+ });
449
+ ```
450
+
451
+ **Parameters:**
452
+
453
+ | Field | Type | Required | Description |
454
+ |-------|------|----------|-------------|
455
+ | `ids` | `string[]` | Yes | Array of escalation UUIDs |
456
+ | `targetUserId` | `string` | Yes | User to assign to |
457
+ | `durationMinutes` | `number` | No | Assignment duration (default: 30) |
458
+
459
+ **Returns:** `LTApiResult<{ assigned, skipped }>`
460
+
461
+ **Auth:** Required
462
+
463
+ ---
464
+
465
+ ## bulkEscalate
466
+
467
+ Route multiple escalations to a different role.
468
+
469
+ ```typescript
470
+ const result = await lt.escalations.bulkEscalate({
471
+ ids: ['esc_1', 'esc_2'],
472
+ targetRole: 'senior-reviewer',
473
+ });
474
+ ```
475
+
476
+ **Parameters:**
477
+
478
+ | Field | Type | Required | Description |
479
+ |-------|------|----------|-------------|
480
+ | `ids` | `string[]` | Yes | Array of escalation UUIDs |
481
+ | `targetRole` | `string` | Yes | Destination role |
482
+
483
+ **Returns:** `LTApiResult<{ updated: number }>`
484
+
485
+ **Auth:** Required
486
+
487
+ ---
488
+
489
+ ## bulkTriage
490
+
491
+ Trigger AI triage for multiple escalations.
492
+
493
+ Resolves each escalation and starts a triage workflow that uses MCP tools to analyze and potentially auto-resolve the issue.
494
+
495
+ ```typescript
496
+ const result = await lt.escalations.bulkTriage({
497
+ ids: ['esc_1', 'esc_2'],
498
+ hint: 'Check if the content violates policy section 3.2',
499
+ });
500
+ ```
501
+
502
+ **Parameters:**
503
+
504
+ | Field | Type | Required | Description |
505
+ |-------|------|----------|-------------|
506
+ | `ids` | `string[]` | Yes | Array of escalation UUIDs |
507
+ | `hint` | `string` | No | Natural-language guidance for the triage AI |
508
+
509
+ **Returns:** `LTApiResult<{ triaged, workflows }>`
510
+
511
+ **Auth:** Required
@@ -0,0 +1,68 @@
1
+ # lt.events
2
+
3
+ Subscribe to real-time Long Tail events via in-process callbacks.
4
+
5
+ ## on
6
+
7
+ Subscribe to events by type pattern. Returns an unsubscribe function.
8
+
9
+ ```typescript
10
+ // Exact event type
11
+ const unsub = lt.events.on('escalation.claimed', (event) => {
12
+ console.log('claimed:', event.escalationId);
13
+ });
14
+
15
+ // Category wildcard — all task events
16
+ const unsub2 = lt.events.on('task.*', (event) => {
17
+ console.log('task event:', event.type);
18
+ });
19
+
20
+ // Global wildcard — every event
21
+ const unsub3 = lt.events.on('*', (event) => {
22
+ console.log(event.type, event.workflowId);
23
+ });
24
+
25
+ // Unsubscribe when done
26
+ unsub();
27
+ ```
28
+
29
+ **Parameters:**
30
+
31
+ | Field | Type | Required | Description |
32
+ |-------|------|----------|-------------|
33
+ | `pattern` | `LTEventType \| '*' \| string` | Yes | Event type to match |
34
+ | `callback` | `(event: LTEvent) => void` | Yes | Handler invoked for each matching event |
35
+
36
+ **Pattern matching:**
37
+
38
+ | Pattern | Matches |
39
+ |---------|---------|
40
+ | `'task.created'` | Exact match on `task.created` only |
41
+ | `'task.*'` | All events starting with `task.` (e.g. `task.created`, `task.completed`, `task.failed`) |
42
+ | `'*'` | Every event |
43
+
44
+ **Returns:** `() => void` -- call the returned function to unsubscribe.
45
+
46
+ **Auth:** Not required
47
+
48
+ ---
49
+
50
+ ### LTEventType values
51
+
52
+ `task.created`, `task.started`, `task.completed`, `task.escalated`, `task.failed`, `escalation.created`, `escalation.resolved`, `escalation.claimed`, `escalation.released`, `workflow.started`, `workflow.completed`, `workflow.failed`, `activity.started`, `activity.completed`, `activity.failed`, `milestone`
53
+
54
+ ### LTEvent fields
55
+
56
+ | Field | Type | Description |
57
+ |-------|------|-------------|
58
+ | `type` | `LTEventType \| string` | Event classification |
59
+ | `source` | `string` | Origin: `'interceptor'`, `'orchestrator'`, or `'activity'` |
60
+ | `workflowId` | `string` | The workflow instance that produced this event |
61
+ | `workflowName` | `string` | The workflow function name |
62
+ | `taskQueue` | `string` | The task queue the workflow ran on |
63
+ | `taskId` | `string?` | The task ID (present when orchestrated) |
64
+ | `escalationId` | `string?` | The escalation ID (present for escalation events) |
65
+ | `originId` | `string?` | Root process lineage |
66
+ | `status` | `string?` | Task or workflow status after this event |
67
+ | `data` | `Record<string, unknown>?` | Event-specific payload |
68
+ | `timestamp` | `string` | ISO 8601 timestamp |
@@ -0,0 +1,124 @@
1
+ # lt.exports
2
+
3
+ Export workflow state, execution trees, and job metadata.
4
+
5
+ ## listJobs
6
+
7
+ List export jobs with optional filtering, sorting, and pagination.
8
+
9
+ ```typescript
10
+ const result = await lt.exports.listJobs({ limit: 25, offset: 0, status: 'completed' });
11
+ ```
12
+
13
+ **Parameters:**
14
+
15
+ | Field | Type | Required | Description |
16
+ |-------|------|----------|-------------|
17
+ | `limit` | `number` | No | Maximum number of jobs to return |
18
+ | `offset` | `number` | No | Number of jobs to skip for pagination |
19
+ | `entity` | `string` | No | Filter by entity/workflow type |
20
+ | `search` | `string` | No | Free-text search across job fields |
21
+ | `status` | `string` | No | Filter by job status |
22
+ | `sort_by` | `string` | No | Field name to sort results by |
23
+ | `order` | `string` | No | Sort direction (`asc` or `desc`) |
24
+ | `registered` | `string` | No | Filter by registration status |
25
+
26
+ **Returns:** `LTApiResult<{ jobs, total, ... }>`
27
+
28
+ **Auth:** Not required
29
+
30
+ ---
31
+
32
+ ## exportState
33
+
34
+ Export the stored state (hash data) of a workflow. Fields can be filtered via allow/block lists.
35
+
36
+ ```typescript
37
+ const result = await lt.exports.exportState({
38
+ workflowId: 'wf_abc123',
39
+ allow: ['data', 'status'],
40
+ values: true,
41
+ });
42
+ ```
43
+
44
+ **Parameters:**
45
+
46
+ | Field | Type | Required | Description |
47
+ |-------|------|----------|-------------|
48
+ | `workflowId` | `string` | Yes | The workflow's unique identifier |
49
+ | `allow` | `LTExportField[]` | No | Whitelist of field names to include |
50
+ | `block` | `LTExportField[]` | No | Blacklist of field names to exclude |
51
+ | `values` | `boolean` | No | When true, include field values (not just names) |
52
+
53
+ `LTExportField` is one of: `'data'`, `'state'`, `'status'`, `'timeline'`, `'transitions'`
54
+
55
+ **Returns:** `LTApiResult<ExportedState>` -- returns 404 if the workflow is not found or data has expired.
56
+
57
+ **Auth:** Not required
58
+
59
+ ---
60
+
61
+ ## exportExecution
62
+
63
+ Export the full execution tree of a workflow, including activity inputs and results.
64
+
65
+ ```typescript
66
+ const result = await lt.exports.exportExecution({
67
+ workflowId: 'wf_abc123',
68
+ excludeSystem: true,
69
+ });
70
+ ```
71
+
72
+ **Parameters:**
73
+
74
+ | Field | Type | Required | Description |
75
+ |-------|------|----------|-------------|
76
+ | `workflowId` | `string` | Yes | The workflow's unique identifier |
77
+ | `excludeSystem` | `boolean` | No | Omit system-generated activities from the export |
78
+ | `omitResults` | `boolean` | No | Exclude activity result payloads |
79
+ | `mode` | `ExportMode` | No | Export mode controlling output format (e.g., tree, flat) |
80
+ | `maxDepth` | `number` | No | Maximum depth to traverse in the execution tree |
81
+
82
+ **Returns:** `LTApiResult<ExecutionExport>` -- returns 404 if the workflow is not found or data has expired.
83
+
84
+ **Auth:** Not required
85
+
86
+ ---
87
+
88
+ ## getStatus
89
+
90
+ Get the current status of a workflow (e.g., running, completed, failed).
91
+
92
+ ```typescript
93
+ const result = await lt.exports.getStatus({ workflowId: 'wf_abc123' });
94
+ ```
95
+
96
+ **Parameters:**
97
+
98
+ | Field | Type | Required | Description |
99
+ |-------|------|----------|-------------|
100
+ | `workflowId` | `string` | Yes | The workflow's unique identifier |
101
+
102
+ **Returns:** `LTApiResult<WorkflowStatus>` -- returns 404 if the workflow is not found or data has expired.
103
+
104
+ **Auth:** Not required
105
+
106
+ ---
107
+
108
+ ## getState
109
+
110
+ Get the current state data of a workflow.
111
+
112
+ ```typescript
113
+ const result = await lt.exports.getState({ workflowId: 'wf_abc123' });
114
+ ```
115
+
116
+ **Parameters:**
117
+
118
+ | Field | Type | Required | Description |
119
+ |-------|------|----------|-------------|
120
+ | `workflowId` | `string` | Yes | The workflow's unique identifier |
121
+
122
+ **Returns:** `LTApiResult<WorkflowState>` -- returns 404 if the workflow is not found or data has expired.
123
+
124
+ **Auth:** Not required