@hotmeshio/long-tail 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/README.md +47 -5
  2. package/build/api/auth.d.ts +16 -0
  3. package/build/api/auth.js +53 -0
  4. package/build/api/bot-accounts.d.ts +137 -0
  5. package/build/api/bot-accounts.js +302 -0
  6. package/build/api/controlplane.d.ts +68 -0
  7. package/build/api/controlplane.js +158 -0
  8. package/build/api/dba.d.ts +42 -0
  9. package/build/api/dba.js +95 -0
  10. package/build/api/escalations.d.ts +271 -0
  11. package/build/api/escalations.js +892 -0
  12. package/build/api/exports.d.ts +90 -0
  13. package/build/api/exports.js +204 -0
  14. package/build/api/index.d.ts +18 -0
  15. package/build/api/index.js +54 -0
  16. package/build/api/insight.d.ts +86 -0
  17. package/build/api/insight.js +147 -0
  18. package/build/api/maintenance.d.ts +22 -0
  19. package/build/api/maintenance.js +43 -0
  20. package/build/api/mcp-runs.d.ts +43 -0
  21. package/build/api/mcp-runs.js +89 -0
  22. package/build/api/mcp.d.ts +160 -0
  23. package/build/api/mcp.js +320 -0
  24. package/build/api/namespaces.d.ts +20 -0
  25. package/build/{routes/escalations/helpers.js → api/namespaces.js} +35 -10
  26. package/build/api/roles.d.ts +88 -0
  27. package/build/api/roles.js +217 -0
  28. package/build/api/settings.d.ts +10 -0
  29. package/build/api/settings.js +43 -0
  30. package/build/api/tasks.d.ts +70 -0
  31. package/build/api/tasks.js +139 -0
  32. package/build/api/users.d.ts +115 -0
  33. package/build/api/users.js +228 -0
  34. package/build/api/workflow-sets.d.ts +77 -0
  35. package/build/api/workflow-sets.js +170 -0
  36. package/build/api/workflows.d.ts +158 -0
  37. package/build/api/workflows.js +407 -0
  38. package/build/api/yaml-workflows.d.ts +282 -0
  39. package/build/api/yaml-workflows.js +751 -0
  40. package/build/examples/types/envelopes.d.ts +27 -0
  41. package/build/examples/types/index.d.ts +1 -1
  42. package/build/examples/workers.js +8 -0
  43. package/build/examples/workflows/assembly-line/activities.d.ts +28 -0
  44. package/build/examples/workflows/assembly-line/activities.js +53 -0
  45. package/build/examples/workflows/assembly-line/index.d.ts +17 -0
  46. package/build/examples/workflows/assembly-line/index.js +60 -0
  47. package/build/examples/workflows/assembly-line/iterator.d.ts +12 -0
  48. package/build/examples/workflows/assembly-line/iterator.js +54 -0
  49. package/build/examples/workflows/assembly-line/reverter.d.ts +18 -0
  50. package/build/examples/workflows/assembly-line/reverter.js +89 -0
  51. package/build/examples/workflows/assembly-line/types.d.ts +25 -0
  52. package/build/examples/workflows/assembly-line/types.js +8 -0
  53. package/build/examples/workflows/assembly-line/worker.d.ts +13 -0
  54. package/build/examples/workflows/assembly-line/worker.js +81 -0
  55. package/build/index.d.ts +4 -0
  56. package/build/index.js +6 -1
  57. package/build/lib/db/schemas/004_workflow_sets.sql +29 -0
  58. package/build/lib/db/schemas/005_unique_graph_topic.sql +7 -0
  59. package/build/lib/db/schemas/011_system_workflow_configs.sql +7 -0
  60. package/build/lib/events/callback.d.ts +41 -0
  61. package/build/lib/events/callback.js +98 -0
  62. package/build/modules/config.js +1 -1
  63. package/build/routes/auth.js +37 -36
  64. package/build/routes/bot-accounts.js +34 -164
  65. package/build/routes/controlplane.js +20 -60
  66. package/build/routes/dba.js +18 -28
  67. package/build/routes/escalations/bulk.js +17 -192
  68. package/build/routes/escalations/list.js +51 -75
  69. package/build/routes/escalations/resolve.js +3 -193
  70. package/build/routes/escalations/single.js +13 -122
  71. package/build/routes/exports.js +44 -95
  72. package/build/routes/index.js +2 -0
  73. package/build/routes/insight.js +46 -88
  74. package/build/routes/maintenance.js +41 -17
  75. package/build/routes/mcp-runs.js +52 -60
  76. package/build/routes/mcp.js +49 -177
  77. package/build/routes/namespaces.js +9 -20
  78. package/build/routes/roles.js +23 -97
  79. package/build/routes/settings.js +37 -25
  80. package/build/routes/tasks.js +28 -64
  81. package/build/routes/users.js +24 -113
  82. package/build/routes/workflow-sets.d.ts +2 -0
  83. package/build/routes/workflow-sets.js +98 -0
  84. package/build/routes/workflows/config.js +23 -57
  85. package/build/routes/workflows/discovery.js +11 -85
  86. package/build/routes/workflows/invocation.js +28 -90
  87. package/build/routes/yaml-workflows/cron.js +12 -61
  88. package/build/routes/yaml-workflows/crud.js +30 -223
  89. package/build/routes/yaml-workflows/deployment.js +15 -115
  90. package/build/routes/yaml-workflows/versions.js +20 -58
  91. package/build/sdk/index.d.ts +338 -0
  92. package/build/sdk/index.js +299 -0
  93. package/build/services/controlplane/index.d.ts +1 -2
  94. package/build/services/controlplane/index.js +3 -3
  95. package/build/services/controlplane/sql.d.ts +2 -2
  96. package/build/services/controlplane/sql.js +4 -5
  97. package/build/services/controlplane/types.d.ts +1 -0
  98. package/build/services/export/index.js +6 -1
  99. package/build/services/hotmesh-utils.js +2 -4
  100. package/build/services/insight/index.d.ts +7 -0
  101. package/build/services/insight/index.js +30 -0
  102. package/build/services/mcp/client/tools.js +13 -1
  103. package/build/services/mcp-runs/sql.js +1 -1
  104. package/build/services/workflow-invocation.d.ts +15 -2
  105. package/build/services/workflow-invocation.js +11 -6
  106. package/build/services/workflow-sets/db.d.ts +16 -0
  107. package/build/services/workflow-sets/db.js +78 -0
  108. package/build/services/workflow-sets/index.d.ts +1 -0
  109. package/build/services/workflow-sets/index.js +11 -0
  110. package/build/services/workflow-sets/sql.d.ts +6 -0
  111. package/build/services/workflow-sets/sql.js +24 -0
  112. package/build/services/yaml-workflow/db-utils.d.ts +1 -0
  113. package/build/services/yaml-workflow/db-utils.js +4 -0
  114. package/build/services/yaml-workflow/db.d.ts +5 -0
  115. package/build/services/yaml-workflow/db.js +17 -0
  116. package/build/services/yaml-workflow/pipeline/build/wiring.js +14 -1
  117. package/build/services/yaml-workflow/pipeline/prompts.d.ts +1 -1
  118. package/build/services/yaml-workflow/pipeline/prompts.js +1 -1
  119. package/build/services/yaml-workflow/sql.d.ts +2 -1
  120. package/build/services/yaml-workflow/sql.js +8 -3
  121. package/build/services/yaml-workflow/types.d.ts +3 -0
  122. package/build/services/yaml-workflow/workers/callbacks.js +7 -1
  123. package/build/services/yaml-workflow/workers/register.js +7 -0
  124. package/build/start/adapters.js +4 -0
  125. package/build/system/index.js +6 -0
  126. package/build/system/mcp-servers/knowledge.js +1 -1
  127. package/build/system/seed/server-definitions.js +2 -1
  128. package/build/system/workflows/mcp-workflow-builder/activities/index.d.ts +1 -1
  129. package/build/system/workflows/mcp-workflow-builder/activities/index.js +2 -1
  130. package/build/system/workflows/mcp-workflow-builder/activities/tool-loader.d.ts +6 -0
  131. package/build/system/workflows/mcp-workflow-builder/activities/tool-loader.js +26 -0
  132. package/build/system/workflows/mcp-workflow-builder/index.js +26 -2
  133. package/build/system/workflows/mcp-workflow-builder/prompts.js +104 -35
  134. package/build/system/workflows/mcp-workflow-planner/activities/analyze.d.ts +11 -0
  135. package/build/system/workflows/mcp-workflow-planner/activities/analyze.js +36 -0
  136. package/build/system/workflows/mcp-workflow-planner/activities/index.d.ts +3 -0
  137. package/build/system/workflows/mcp-workflow-planner/activities/index.js +12 -0
  138. package/build/system/workflows/mcp-workflow-planner/activities/persist.d.ts +19 -0
  139. package/build/system/workflows/mcp-workflow-planner/activities/persist.js +55 -0
  140. package/build/system/workflows/mcp-workflow-planner/activities/plan.d.ts +10 -0
  141. package/build/system/workflows/mcp-workflow-planner/activities/plan.js +43 -0
  142. package/build/system/workflows/mcp-workflow-planner/index.d.ts +7 -0
  143. package/build/system/workflows/mcp-workflow-planner/index.js +152 -0
  144. package/build/system/workflows/mcp-workflow-planner/prompts.d.ts +7 -0
  145. package/build/system/workflows/mcp-workflow-planner/prompts.js +77 -0
  146. package/build/tsconfig.tsbuildinfo +1 -1
  147. package/build/types/index.d.ts +1 -0
  148. package/build/types/sdk.d.ts +27 -0
  149. package/build/types/sdk.js +2 -0
  150. package/build/types/workflow-set.d.ts +44 -0
  151. package/build/types/workflow-set.js +5 -0
  152. package/dashboard/dist/assets/{AdminDashboard-BXkKGkb5.js → AdminDashboard-B15jSEV2.js} +2 -2
  153. package/dashboard/dist/assets/{AdminDashboard-BXkKGkb5.js.map → AdminDashboard-B15jSEV2.js.map} +1 -1
  154. package/dashboard/dist/assets/{AvailableEscalationsPage-DcH592mc.js → AvailableEscalationsPage-0V2yvKak.js} +2 -2
  155. package/dashboard/dist/assets/{AvailableEscalationsPage-DcH592mc.js.map → AvailableEscalationsPage-0V2yvKak.js.map} +1 -1
  156. package/dashboard/dist/assets/BotPicker-B4UxHcek.js +2 -0
  157. package/dashboard/dist/assets/{BotPicker-A6LtzyuO.js.map → BotPicker-B4UxHcek.js.map} +1 -1
  158. package/dashboard/dist/assets/{CollapsibleSection-C7nL2_mv.js → CollapsibleSection-BBexNWVd.js} +2 -2
  159. package/dashboard/dist/assets/{CollapsibleSection-C7nL2_mv.js.map → CollapsibleSection-BBexNWVd.js.map} +1 -1
  160. package/dashboard/dist/assets/{ConfirmDeleteModal-CWFwJrSl.js → ConfirmDeleteModal-DlPDJSq_.js} +2 -2
  161. package/dashboard/dist/assets/{ConfirmDeleteModal-CWFwJrSl.js.map → ConfirmDeleteModal-DlPDJSq_.js.map} +1 -1
  162. package/dashboard/dist/assets/{CopyableId-DbZ5c3jh.js → CopyableId-BxHW1ahb.js} +2 -2
  163. package/dashboard/dist/assets/{CopyableId-DbZ5c3jh.js.map → CopyableId-BxHW1ahb.js.map} +1 -1
  164. package/dashboard/dist/assets/{CredentialsPage-ClWkmLPu.js → CredentialsPage-Bp_Y1Szk.js} +2 -2
  165. package/dashboard/dist/assets/{CredentialsPage-ClWkmLPu.js.map → CredentialsPage-Bp_Y1Szk.js.map} +1 -1
  166. package/dashboard/dist/assets/{CustomDurationPicker-CtH2hReF.js → CustomDurationPicker-ByBFqXSO.js} +2 -2
  167. package/dashboard/dist/assets/{CustomDurationPicker-CtH2hReF.js.map → CustomDurationPicker-ByBFqXSO.js.map} +1 -1
  168. package/dashboard/dist/assets/{DataTable-CM5ZcpPi.js → DataTable-DyIXg-tQ.js} +2 -2
  169. package/dashboard/dist/assets/{DataTable-CM5ZcpPi.js.map → DataTable-DyIXg-tQ.js.map} +1 -1
  170. package/dashboard/dist/assets/{ElapsedCell-CwqavyeC.js → ElapsedCell-BgnA0qpS.js} +2 -2
  171. package/dashboard/dist/assets/{ElapsedCell-CwqavyeC.js.map → ElapsedCell-BgnA0qpS.js.map} +1 -1
  172. package/dashboard/dist/assets/{EmptyState-BBn78pmm.js → EmptyState-DlMImvgm.js} +2 -2
  173. package/dashboard/dist/assets/{EmptyState-BBn78pmm.js.map → EmptyState-DlMImvgm.js.map} +1 -1
  174. package/dashboard/dist/assets/{EscalationsOverview-BcJ2E3X7.js → EscalationsOverview-D90kdfw1.js} +2 -2
  175. package/dashboard/dist/assets/{EscalationsOverview-BcJ2E3X7.js.map → EscalationsOverview-D90kdfw1.js.map} +1 -1
  176. package/dashboard/dist/assets/{EventTable-C1en_KZ0.js → EventTable-BNxtlgNz.js} +2 -2
  177. package/dashboard/dist/assets/{EventTable-C1en_KZ0.js.map → EventTable-BNxtlgNz.js.map} +1 -1
  178. package/dashboard/dist/assets/{FilterBar-CZTlrLQT.js → FilterBar-BTiaAhCx.js} +2 -2
  179. package/dashboard/dist/assets/{FilterBar-CZTlrLQT.js.map → FilterBar-BTiaAhCx.js.map} +1 -1
  180. package/dashboard/dist/assets/{ListToolbar-Cdbsapig.js → ListToolbar-BUcagSCn.js} +2 -2
  181. package/dashboard/dist/assets/{ListToolbar-Cdbsapig.js.map → ListToolbar-BUcagSCn.js.map} +1 -1
  182. package/dashboard/dist/assets/{McpOverview-CSpEJxKa.js → McpOverview-B-tCvz8C.js} +2 -2
  183. package/dashboard/dist/assets/{McpOverview-CSpEJxKa.js.map → McpOverview-B-tCvz8C.js.map} +1 -1
  184. package/dashboard/dist/assets/McpQueryDetailPage-DPlF1wYb.js +5 -0
  185. package/dashboard/dist/assets/McpQueryDetailPage-DPlF1wYb.js.map +1 -0
  186. package/dashboard/dist/assets/McpQueryPage-Bz7AdcfR.js +2 -0
  187. package/dashboard/dist/assets/McpQueryPage-Bz7AdcfR.js.map +1 -0
  188. package/dashboard/dist/assets/{McpRunDetailPage-9xdxgG4d.js → McpRunDetailPage-Di_qpL2V.js} +2 -2
  189. package/dashboard/dist/assets/{McpRunDetailPage-9xdxgG4d.js.map → McpRunDetailPage-Di_qpL2V.js.map} +1 -1
  190. package/dashboard/dist/assets/{McpRunsPage-wWLqHsd4.js → McpRunsPage-BBgybBEa.js} +2 -2
  191. package/dashboard/dist/assets/{McpRunsPage-wWLqHsd4.js.map → McpRunsPage-BBgybBEa.js.map} +1 -1
  192. package/dashboard/dist/assets/{Modal-kB_P7ZOr.js → Modal-CaJ0gTEa.js} +2 -2
  193. package/dashboard/dist/assets/{Modal-kB_P7ZOr.js.map → Modal-CaJ0gTEa.js.map} +1 -1
  194. package/dashboard/dist/assets/OperatorDashboard-DDfMmrmR.js +2 -0
  195. package/dashboard/dist/assets/{OperatorDashboard-jc0vrgDI.js.map → OperatorDashboard-DDfMmrmR.js.map} +1 -1
  196. package/dashboard/dist/assets/{PageHeader-NkOeBR05.js → PageHeader-C5D-G5rp.js} +2 -2
  197. package/dashboard/dist/assets/{PageHeader-NkOeBR05.js.map → PageHeader-C5D-G5rp.js.map} +1 -1
  198. package/dashboard/dist/assets/{PageHeaderWithStats-ywNhrmFK.js → PageHeaderWithStats-DCa2eZh2.js} +2 -2
  199. package/dashboard/dist/assets/{PageHeaderWithStats-ywNhrmFK.js.map → PageHeaderWithStats-DCa2eZh2.js.map} +1 -1
  200. package/dashboard/dist/assets/{PriorityBadge-B2MQbSxy.js → PriorityBadge-DTHq6OUZ.js} +2 -2
  201. package/dashboard/dist/assets/{PriorityBadge-B2MQbSxy.js.map → PriorityBadge-DTHq6OUZ.js.map} +1 -1
  202. package/dashboard/dist/assets/{ProcessDetailPage-B7z7IdqE.js → ProcessDetailPage-fC4dhrd0.js} +2 -2
  203. package/dashboard/dist/assets/{ProcessDetailPage-B7z7IdqE.js.map → ProcessDetailPage-fC4dhrd0.js.map} +1 -1
  204. package/dashboard/dist/assets/{ProcessesListPage-C-uHadO6.js → ProcessesListPage-CL2MY8uD.js} +2 -2
  205. package/dashboard/dist/assets/{ProcessesListPage-C-uHadO6.js.map → ProcessesListPage-CL2MY8uD.js.map} +1 -1
  206. package/dashboard/dist/assets/{RolePill-C1dgC-fK.js → RolePill-kgKPANly.js} +2 -2
  207. package/dashboard/dist/assets/{RolePill-C1dgC-fK.js.map → RolePill-kgKPANly.js.map} +1 -1
  208. package/dashboard/dist/assets/{RolesPage-BSxrD1vm.js → RolesPage-Be2lXTHD.js} +2 -2
  209. package/dashboard/dist/assets/{RolesPage-BSxrD1vm.js.map → RolesPage-Be2lXTHD.js.map} +1 -1
  210. package/dashboard/dist/assets/{RowActions-lYaHGI-v.js → RowActions-DIzJCwqR.js} +2 -2
  211. package/dashboard/dist/assets/{RowActions-lYaHGI-v.js.map → RowActions-DIzJCwqR.js.map} +1 -1
  212. package/dashboard/dist/assets/{StatCard-v2TiITVr.js → StatCard-CRi2Jy6t.js} +2 -2
  213. package/dashboard/dist/assets/{StatCard-v2TiITVr.js.map → StatCard-CRi2Jy6t.js.map} +1 -1
  214. package/dashboard/dist/assets/{StatusBadge-DWlxevgG.js → StatusBadge-BETI_8Mr.js} +2 -2
  215. package/dashboard/dist/assets/{StatusBadge-DWlxevgG.js.map → StatusBadge-BETI_8Mr.js.map} +1 -1
  216. package/dashboard/dist/assets/{StepIndicator-CRM4ft28.js → StepIndicator-DjpMqCjz.js} +2 -2
  217. package/dashboard/dist/assets/{StepIndicator-CRM4ft28.js.map → StepIndicator-DjpMqCjz.js.map} +1 -1
  218. package/dashboard/dist/assets/{StickyPagination-CF0EToEU.js → StickyPagination-BZbExQ9t.js} +2 -2
  219. package/dashboard/dist/assets/{StickyPagination-CF0EToEU.js.map → StickyPagination-BZbExQ9t.js.map} +1 -1
  220. package/dashboard/dist/assets/{SwimlaneTimeline-CNlj7fgg.js → SwimlaneTimeline-DZthQyhR.js} +2 -2
  221. package/dashboard/dist/assets/{SwimlaneTimeline-CNlj7fgg.js.map → SwimlaneTimeline-DZthQyhR.js.map} +1 -1
  222. package/dashboard/dist/assets/{TagInput-CH8qMGhC.js → TagInput-CukbOfYn.js} +2 -2
  223. package/dashboard/dist/assets/{TagInput-CH8qMGhC.js.map → TagInput-CukbOfYn.js.map} +1 -1
  224. package/dashboard/dist/assets/{TaskDetailPage-CdWo-6mu.js → TaskDetailPage-CIZHIKo9.js} +2 -2
  225. package/dashboard/dist/assets/{TaskDetailPage-CdWo-6mu.js.map → TaskDetailPage-CIZHIKo9.js.map} +1 -1
  226. package/dashboard/dist/assets/{TaskQueuePill-BPj4ogVG.js → TaskQueuePill-Q7DGoysj.js} +2 -2
  227. package/dashboard/dist/assets/{TaskQueuePill-BPj4ogVG.js.map → TaskQueuePill-Q7DGoysj.js.map} +1 -1
  228. package/dashboard/dist/assets/{TasksListPage-CtRkMpKU.js → TasksListPage-CsC9wjb0.js} +2 -2
  229. package/dashboard/dist/assets/{TasksListPage-CtRkMpKU.js.map → TasksListPage-CsC9wjb0.js.map} +1 -1
  230. package/dashboard/dist/assets/{TimeAgo-Di1a3X5P.js → TimeAgo-BcOOnJeH.js} +2 -2
  231. package/dashboard/dist/assets/{TimeAgo-Di1a3X5P.js.map → TimeAgo-BcOOnJeH.js.map} +1 -1
  232. package/dashboard/dist/assets/{TimestampCell-CqrXql-S.js → TimestampCell-CEMapYDQ.js} +2 -2
  233. package/dashboard/dist/assets/{TimestampCell-CqrXql-S.js.map → TimestampCell-CEMapYDQ.js.map} +1 -1
  234. package/dashboard/dist/assets/{UserName-BUFYCnRa.js → UserName-BHoN7iRL.js} +2 -2
  235. package/dashboard/dist/assets/{UserName-BUFYCnRa.js.map → UserName-BHoN7iRL.js.map} +1 -1
  236. package/dashboard/dist/assets/{WorkflowExecutionPage-25iusMml.js → WorkflowExecutionPage-DawKl1LT.js} +2 -2
  237. package/dashboard/dist/assets/{WorkflowExecutionPage-25iusMml.js.map → WorkflowExecutionPage-DawKl1LT.js.map} +1 -1
  238. package/dashboard/dist/assets/WorkflowPill-CP84Vqeg.js +2 -0
  239. package/dashboard/dist/assets/{WorkflowPill-DPKOcbf4.js.map → WorkflowPill-CP84Vqeg.js.map} +1 -1
  240. package/dashboard/dist/assets/{WorkflowsDashboard-BgxslssH.js → WorkflowsDashboard-QrvVFxtQ.js} +2 -2
  241. package/dashboard/dist/assets/{WorkflowsDashboard-BgxslssH.js.map → WorkflowsDashboard-QrvVFxtQ.js.map} +1 -1
  242. package/dashboard/dist/assets/{WorkflowsOverview-Doe5L-Re.js → WorkflowsOverview-DuhAi_OY.js} +2 -2
  243. package/dashboard/dist/assets/{WorkflowsOverview-Doe5L-Re.js.map → WorkflowsOverview-DuhAi_OY.js.map} +1 -1
  244. package/dashboard/dist/assets/YamlWorkflowsPage-Dc9xw82a.js +2 -0
  245. package/dashboard/dist/assets/YamlWorkflowsPage-Dc9xw82a.js.map +1 -0
  246. package/dashboard/dist/assets/{bots-Bi2_O1Ts.js → bots-Dny-rmmI.js} +2 -2
  247. package/dashboard/dist/assets/{bots-Bi2_O1Ts.js.map → bots-Dny-rmmI.js.map} +1 -1
  248. package/dashboard/dist/assets/{escalation-Ck1KlLkT.js → escalation-CV0sKNH5.js} +2 -2
  249. package/dashboard/dist/assets/{escalation-Ck1KlLkT.js.map → escalation-CV0sKNH5.js.map} +1 -1
  250. package/dashboard/dist/assets/{escalation-columns-ohDsj2eJ.js → escalation-columns-30CKyoWI.js} +2 -2
  251. package/dashboard/dist/assets/{escalation-columns-ohDsj2eJ.js.map → escalation-columns-30CKyoWI.js.map} +1 -1
  252. package/dashboard/dist/assets/{helpers-BoD2SgUY.js → helpers-C1-30CzH.js} +2 -2
  253. package/dashboard/dist/assets/{helpers-BoD2SgUY.js.map → helpers-C1-30CzH.js.map} +1 -1
  254. package/dashboard/dist/assets/helpers-C1jaRD-d.js +2 -0
  255. package/dashboard/dist/assets/helpers-C1jaRD-d.js.map +1 -0
  256. package/dashboard/dist/assets/{index-FuohTtaM.js → index-BUVQ6wmy.js} +3 -3
  257. package/dashboard/dist/assets/{index-FuohTtaM.js.map → index-BUVQ6wmy.js.map} +1 -1
  258. package/dashboard/dist/assets/index-CxVB7F4X.js +2 -0
  259. package/dashboard/dist/assets/{index-Dk2Q51o0.js.map → index-CxVB7F4X.js.map} +1 -1
  260. package/dashboard/dist/assets/{index-BEtLIsML.js → index-D-oCWCAS.js} +2 -2
  261. package/dashboard/dist/assets/{index-BEtLIsML.js.map → index-D-oCWCAS.js.map} +1 -1
  262. package/dashboard/dist/assets/index-D0wPM3Ck.js +2 -0
  263. package/dashboard/dist/assets/{index-BpT-6WgJ.js.map → index-D0wPM3Ck.js.map} +1 -1
  264. package/dashboard/dist/assets/{index-Bn2xHDr8.js → index-DHgnkykj.js} +3 -3
  265. package/dashboard/dist/assets/{index-Bn2xHDr8.js.map → index-DHgnkykj.js.map} +1 -1
  266. package/dashboard/dist/assets/{index-D3NyVADW.js → index-D_aJBEAG.js} +2 -2
  267. package/dashboard/dist/assets/index-D_aJBEAG.js.map +1 -0
  268. package/dashboard/dist/assets/{index-PyCTS05D.css → index-DcIKW-cZ.css} +1 -1
  269. package/dashboard/dist/assets/{index-CZrJ09p-.js → index-Dd_U4mLm.js} +2 -2
  270. package/dashboard/dist/assets/{index-CZrJ09p-.js.map → index-Dd_U4mLm.js.map} +1 -1
  271. package/dashboard/dist/assets/{index-DYyLF-Qb.js → index-DnmZbNxk.js} +8 -8
  272. package/dashboard/dist/assets/index-DnmZbNxk.js.map +1 -0
  273. package/dashboard/dist/assets/index-_RBvi7s6.js +2 -0
  274. package/dashboard/dist/assets/{index-D7zYZOnH.js.map → index-_RBvi7s6.js.map} +1 -1
  275. package/dashboard/dist/assets/index-n7td8zgX.js +17 -0
  276. package/dashboard/dist/assets/{index-DOkHXmyf.js.map → index-n7td8zgX.js.map} +1 -1
  277. package/dashboard/dist/assets/{mcp-CJtYjA7A.js → mcp-CRFr4L9W.js} +2 -2
  278. package/dashboard/dist/assets/{mcp-CJtYjA7A.js.map → mcp-CRFr4L9W.js.map} +1 -1
  279. package/dashboard/dist/assets/mcp-query-DHY2mZBQ.js +2 -0
  280. package/dashboard/dist/assets/mcp-query-DHY2mZBQ.js.map +1 -0
  281. package/dashboard/dist/assets/{mcp-runs-DUWm9Z4V.js → mcp-runs-BqPHqwAO.js} +2 -2
  282. package/dashboard/dist/assets/{mcp-runs-DUWm9Z4V.js.map → mcp-runs-BqPHqwAO.js.map} +1 -1
  283. package/dashboard/dist/assets/{namespaces-BM5P2qmL.js → namespaces-TG1aIpo_.js} +2 -2
  284. package/dashboard/dist/assets/{namespaces-BM5P2qmL.js.map → namespaces-TG1aIpo_.js.map} +1 -1
  285. package/dashboard/dist/assets/{roles-lv0shpjJ.js → roles-DhhLTvXg.js} +2 -2
  286. package/dashboard/dist/assets/{roles-lv0shpjJ.js.map → roles-DhhLTvXg.js.map} +1 -1
  287. package/dashboard/dist/assets/{settings-Wlq92mRo.js → settings-D9MBzEeB.js} +2 -2
  288. package/dashboard/dist/assets/{settings-Wlq92mRo.js.map → settings-D9MBzEeB.js.map} +1 -1
  289. package/dashboard/dist/assets/{tasks-BFGm4PuE.js → tasks-BxmcZoev.js} +2 -2
  290. package/dashboard/dist/assets/{tasks-BFGm4PuE.js.map → tasks-BxmcZoev.js.map} +1 -1
  291. package/dashboard/dist/assets/{useEventHooks-DIE6ue4x.js → useEventHooks-BylecvvI.js} +2 -2
  292. package/dashboard/dist/assets/{useEventHooks-DIE6ue4x.js.map → useEventHooks-BylecvvI.js.map} +1 -1
  293. package/dashboard/dist/assets/{useYamlActivityEvents-DCwSO73t.js → useYamlActivityEvents-ocmj11e_.js} +2 -2
  294. package/dashboard/dist/assets/{useYamlActivityEvents-DCwSO73t.js.map → useYamlActivityEvents-ocmj11e_.js.map} +1 -1
  295. package/dashboard/dist/assets/{users-tA5-K0wA.js → users-Ce5r-JAv.js} +2 -2
  296. package/dashboard/dist/assets/{users-tA5-K0wA.js.map → users-Ce5r-JAv.js.map} +1 -1
  297. package/dashboard/dist/assets/{vendor-icons-BiIug1SK.js → vendor-icons-D1DdudfH.js} +93 -73
  298. package/dashboard/dist/assets/vendor-icons-D1DdudfH.js.map +1 -0
  299. package/dashboard/dist/assets/{workflows-CfLc15Wr.js → workflows-ykIeVbRJ.js} +2 -2
  300. package/dashboard/dist/assets/{workflows-CfLc15Wr.js.map → workflows-ykIeVbRJ.js.map} +1 -1
  301. package/dashboard/dist/assets/yaml-workflows-WypmKYht.js +2 -0
  302. package/dashboard/dist/assets/yaml-workflows-WypmKYht.js.map +1 -0
  303. package/dashboard/dist/index.html +3 -3
  304. package/docs/api/sdk/auth.md +27 -0
  305. package/docs/api/sdk/bot-accounts.md +243 -0
  306. package/docs/api/sdk/controlplane.md +103 -0
  307. package/docs/api/sdk/dba.md +52 -0
  308. package/docs/api/sdk/escalations.md +374 -0
  309. package/docs/api/sdk/events.md +68 -0
  310. package/docs/api/sdk/exports.md +124 -0
  311. package/docs/api/sdk/insight.md +112 -0
  312. package/docs/api/sdk/maintenance.md +54 -0
  313. package/docs/api/sdk/mcp-runs.md +71 -0
  314. package/docs/api/sdk/mcp.md +250 -0
  315. package/docs/api/sdk/namespaces.md +43 -0
  316. package/docs/api/sdk/roles.md +183 -0
  317. package/docs/api/sdk/settings.md +24 -0
  318. package/docs/api/sdk/tasks.md +120 -0
  319. package/docs/api/sdk/users.md +196 -0
  320. package/docs/api/sdk/workflow-sets.md +135 -0
  321. package/docs/api/sdk/workflows.md +271 -0
  322. package/docs/api/sdk/yaml-workflows.md +408 -0
  323. package/docs/events.md +28 -0
  324. package/docs/sdk.md +177 -0
  325. package/docs/story.md +157 -0
  326. package/package.json +3 -2
  327. package/build/routes/escalations/helpers.d.ts +0 -5
  328. package/build/routes/resolve.d.ts +0 -9
  329. package/build/routes/resolve.js +0 -19
  330. package/build/routes/yaml-workflows/helpers.d.ts +0 -2
  331. package/build/routes/yaml-workflows/helpers.js +0 -8
  332. package/dashboard/dist/assets/BotPicker-A6LtzyuO.js +0 -2
  333. package/dashboard/dist/assets/McpQueryDetailPage-DhqEI180.js +0 -5
  334. package/dashboard/dist/assets/McpQueryDetailPage-DhqEI180.js.map +0 -1
  335. package/dashboard/dist/assets/McpQueryPage-CIiVMlqo.js +0 -2
  336. package/dashboard/dist/assets/McpQueryPage-CIiVMlqo.js.map +0 -1
  337. package/dashboard/dist/assets/OperatorDashboard-jc0vrgDI.js +0 -2
  338. package/dashboard/dist/assets/RunAsSelector-CJDnyp93.js +0 -2
  339. package/dashboard/dist/assets/RunAsSelector-CJDnyp93.js.map +0 -1
  340. package/dashboard/dist/assets/WorkflowPill-DPKOcbf4.js +0 -2
  341. package/dashboard/dist/assets/YamlWorkflowsPage-BliAckJ6.js +0 -2
  342. package/dashboard/dist/assets/YamlWorkflowsPage-BliAckJ6.js.map +0 -1
  343. package/dashboard/dist/assets/index-BpT-6WgJ.js +0 -2
  344. package/dashboard/dist/assets/index-D3NyVADW.js.map +0 -1
  345. package/dashboard/dist/assets/index-D7zYZOnH.js +0 -2
  346. package/dashboard/dist/assets/index-DOkHXmyf.js +0 -17
  347. package/dashboard/dist/assets/index-DYyLF-Qb.js.map +0 -1
  348. package/dashboard/dist/assets/index-Dk2Q51o0.js +0 -2
  349. package/dashboard/dist/assets/mcp-query-jQJQrs_7.js +0 -2
  350. package/dashboard/dist/assets/mcp-query-jQJQrs_7.js.map +0 -1
  351. package/dashboard/dist/assets/vendor-icons-BiIug1SK.js.map +0 -1
  352. package/dashboard/dist/assets/yaml-workflows-D7JXNqbM.js +0 -2
  353. package/dashboard/dist/assets/yaml-workflows-D7JXNqbM.js.map +0 -1
  354. package/docs/img/01-login.png +0 -0
  355. package/docs/img/02-dashboard-home.png +0 -0
  356. package/docs/img/03-processes-list.png +0 -0
  357. package/docs/img/04-escalations-list.png +0 -0
  358. package/docs/img/05-mcp-servers.png +0 -0
  359. package/docs/img/06-mcp-pipelines.png +0 -0
  360. package/docs/img/07-workflows-list.png +0 -0
  361. package/docs/img/compilation/01-query-submit.png +0 -0
  362. package/docs/img/compilation/02-mcp-servers.png +0 -0
  363. package/docs/img/compilation/03-query-completed.png +0 -0
  364. package/docs/img/compilation/04-wizard-original.png +0 -0
  365. package/docs/img/compilation/05-wizard-timeline.png +0 -0
  366. package/docs/img/compilation/06-wizard-profile.png +0 -0
  367. package/docs/img/compilation/07-wizard-deploy.png +0 -0
  368. package/docs/img/compilation/08-wizard-test-modal.png +0 -0
  369. package/docs/img/compilation/09-wizard-test-compare.png +0 -0
  370. package/docs/img/compilation/10-wizard-verify.png +0 -0
  371. /package/docs/api/{dba.md → http/dba.md} +0 -0
  372. /package/docs/api/{escalations.md → http/escalations.md} +0 -0
  373. /package/docs/api/{exports.md → http/exports.md} +0 -0
  374. /package/docs/api/{maintenance.md → http/maintenance.md} +0 -0
  375. /package/docs/api/{mcp-runs.md → http/mcp-runs.md} +0 -0
  376. /package/docs/api/{mcp-servers.md → http/mcp-servers.md} +0 -0
  377. /package/docs/api/{namespaces.md → http/namespaces.md} +0 -0
  378. /package/docs/api/{roles.md → http/roles.md} +0 -0
  379. /package/docs/api/{service-accounts.md → http/service-accounts.md} +0 -0
  380. /package/docs/api/{settings.md → http/settings.md} +0 -0
  381. /package/docs/api/{tasks.md → http/tasks.md} +0 -0
  382. /package/docs/api/{users.md → http/users.md} +0 -0
  383. /package/docs/api/{workflows.md → http/workflows.md} +0 -0
  384. /package/docs/api/{yaml-workflows.md → http/yaml-workflows.md} +0 -0
@@ -0,0 +1,88 @@
1
+ import type { LTApiResult } from '../types/sdk';
2
+ /**
3
+ * List all distinct role names in the system.
4
+ *
5
+ * @returns `{ status: 200, data: { roles: string[] } }` on success
6
+ */
7
+ export declare function listRoles(): Promise<LTApiResult>;
8
+ /**
9
+ * List all roles with their full details (member counts, escalation chains, etc.).
10
+ *
11
+ * @returns `{ status: 200, data: { roles: RoleDetail[] } }` on success
12
+ */
13
+ export declare function listRolesWithDetails(): Promise<LTApiResult>;
14
+ /**
15
+ * Create a new role. Requires admin privileges.
16
+ *
17
+ * The role name is trimmed, lowercased, and validated against the pattern
18
+ * `^[a-z][a-z0-9_-]*$` (must start with a letter, then lowercase alphanumerics,
19
+ * hyphens, or underscores).
20
+ *
21
+ * @param input.role — the role name to create
22
+ * @returns `{ status: 201, data: { role: string } }` on success
23
+ */
24
+ export declare function createRole(input: {
25
+ role: string;
26
+ }): Promise<LTApiResult>;
27
+ /**
28
+ * Retrieve all escalation chains across all roles.
29
+ *
30
+ * @returns `{ status: 200, data: { chains: EscalationChain[] } }` on success
31
+ */
32
+ export declare function getEscalationChains(): Promise<LTApiResult>;
33
+ /**
34
+ * Add an escalation chain link from one role to another. Requires admin privileges.
35
+ *
36
+ * @param input.source_role — the role that escalates from
37
+ * @param input.target_role — the role that receives the escalation
38
+ * @returns `{ status: 201, data: { source_role, target_role } }` on success
39
+ */
40
+ export declare function addEscalationChain(input: {
41
+ source_role: string;
42
+ target_role: string;
43
+ }): Promise<LTApiResult>;
44
+ /**
45
+ * Remove an escalation chain link between two roles. Requires admin privileges.
46
+ *
47
+ * @param input.source_role — the role that escalates from
48
+ * @param input.target_role — the role that receives the escalation
49
+ * @returns `{ status: 200, data: { removed: true } }` on success, or `{ status: 404 }` if not found
50
+ */
51
+ export declare function removeEscalationChain(input: {
52
+ source_role: string;
53
+ target_role: string;
54
+ }): Promise<LTApiResult>;
55
+ /**
56
+ * Get all escalation target roles for a given source role.
57
+ *
58
+ * @param input.role — the source role to look up escalation targets for
59
+ * @returns `{ status: 200, data: { targets: string[] } }` on success
60
+ */
61
+ export declare function getEscalationTargets(input: {
62
+ role: string;
63
+ }): Promise<LTApiResult>;
64
+ /**
65
+ * Replace all escalation targets for a role with a new set. Requires admin privileges.
66
+ *
67
+ * Removes all existing escalation links from the source role and creates new
68
+ * ones for each target in the provided array.
69
+ *
70
+ * @param input.role — the source role whose targets are being replaced
71
+ * @param input.targets — array of target role names to set as the new escalation targets
72
+ * @returns `{ status: 200, data: { role, targets } }` on success
73
+ */
74
+ export declare function replaceEscalationTargets(input: {
75
+ role: string;
76
+ targets: string[];
77
+ }): Promise<LTApiResult>;
78
+ /**
79
+ * Delete a role from the system. Requires admin privileges.
80
+ *
81
+ * Returns 409 if the role cannot be deleted (e.g., still assigned to users).
82
+ *
83
+ * @param input.role — the role name to delete
84
+ * @returns `{ status: 200, data: { deleted: true } }` on success, or `{ status: 409 }` if deletion blocked
85
+ */
86
+ export declare function deleteRole(input: {
87
+ role: string;
88
+ }): Promise<LTApiResult>;
@@ -0,0 +1,217 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.listRoles = listRoles;
37
+ exports.listRolesWithDetails = listRolesWithDetails;
38
+ exports.createRole = createRole;
39
+ exports.getEscalationChains = getEscalationChains;
40
+ exports.addEscalationChain = addEscalationChain;
41
+ exports.removeEscalationChain = removeEscalationChain;
42
+ exports.getEscalationTargets = getEscalationTargets;
43
+ exports.replaceEscalationTargets = replaceEscalationTargets;
44
+ exports.deleteRole = deleteRole;
45
+ const roleService = __importStar(require("../services/role"));
46
+ /**
47
+ * List all distinct role names in the system.
48
+ *
49
+ * @returns `{ status: 200, data: { roles: string[] } }` on success
50
+ */
51
+ async function listRoles() {
52
+ try {
53
+ const roles = await roleService.listDistinctRoles();
54
+ return { status: 200, data: { roles } };
55
+ }
56
+ catch (err) {
57
+ return { status: 500, error: err.message };
58
+ }
59
+ }
60
+ /**
61
+ * List all roles with their full details (member counts, escalation chains, etc.).
62
+ *
63
+ * @returns `{ status: 200, data: { roles: RoleDetail[] } }` on success
64
+ */
65
+ async function listRolesWithDetails() {
66
+ try {
67
+ const roles = await roleService.listRolesWithDetails();
68
+ return { status: 200, data: { roles } };
69
+ }
70
+ catch (err) {
71
+ return { status: 500, error: err.message };
72
+ }
73
+ }
74
+ /**
75
+ * Create a new role. Requires admin privileges.
76
+ *
77
+ * The role name is trimmed, lowercased, and validated against the pattern
78
+ * `^[a-z][a-z0-9_-]*$` (must start with a letter, then lowercase alphanumerics,
79
+ * hyphens, or underscores).
80
+ *
81
+ * @param input.role — the role name to create
82
+ * @returns `{ status: 201, data: { role: string } }` on success
83
+ */
84
+ async function createRole(input) {
85
+ try {
86
+ if (!input.role || typeof input.role !== 'string' || !input.role.trim()) {
87
+ return { status: 400, error: 'role is required' };
88
+ }
89
+ const trimmed = input.role.trim().toLowerCase();
90
+ if (!/^[a-z][a-z0-9_-]*$/.test(trimmed)) {
91
+ return {
92
+ status: 400,
93
+ error: 'Role must start with a letter and contain only lowercase letters, numbers, hyphens, and underscores',
94
+ };
95
+ }
96
+ await roleService.createRole(trimmed);
97
+ return { status: 201, data: { role: trimmed } };
98
+ }
99
+ catch (err) {
100
+ return { status: 500, error: err.message };
101
+ }
102
+ }
103
+ /**
104
+ * Retrieve all escalation chains across all roles.
105
+ *
106
+ * @returns `{ status: 200, data: { chains: EscalationChain[] } }` on success
107
+ */
108
+ async function getEscalationChains() {
109
+ try {
110
+ const chains = await roleService.getAllEscalationChains();
111
+ return { status: 200, data: { chains } };
112
+ }
113
+ catch (err) {
114
+ return { status: 500, error: err.message };
115
+ }
116
+ }
117
+ /**
118
+ * Add an escalation chain link from one role to another. Requires admin privileges.
119
+ *
120
+ * @param input.source_role — the role that escalates from
121
+ * @param input.target_role — the role that receives the escalation
122
+ * @returns `{ status: 201, data: { source_role, target_role } }` on success
123
+ */
124
+ async function addEscalationChain(input) {
125
+ try {
126
+ if (!input.source_role || !input.target_role) {
127
+ return { status: 400, error: 'source_role and target_role are required' };
128
+ }
129
+ await roleService.addEscalationChain(input.source_role, input.target_role);
130
+ return {
131
+ status: 201,
132
+ data: { source_role: input.source_role, target_role: input.target_role },
133
+ };
134
+ }
135
+ catch (err) {
136
+ return { status: 500, error: err.message };
137
+ }
138
+ }
139
+ /**
140
+ * Remove an escalation chain link between two roles. Requires admin privileges.
141
+ *
142
+ * @param input.source_role — the role that escalates from
143
+ * @param input.target_role — the role that receives the escalation
144
+ * @returns `{ status: 200, data: { removed: true } }` on success, or `{ status: 404 }` if not found
145
+ */
146
+ async function removeEscalationChain(input) {
147
+ try {
148
+ if (!input.source_role || !input.target_role) {
149
+ return { status: 400, error: 'source_role and target_role are required' };
150
+ }
151
+ const removed = await roleService.removeEscalationChain(input.source_role, input.target_role);
152
+ if (!removed) {
153
+ return { status: 404, error: 'Chain entry not found' };
154
+ }
155
+ return { status: 200, data: { removed: true } };
156
+ }
157
+ catch (err) {
158
+ return { status: 500, error: err.message };
159
+ }
160
+ }
161
+ /**
162
+ * Get all escalation target roles for a given source role.
163
+ *
164
+ * @param input.role — the source role to look up escalation targets for
165
+ * @returns `{ status: 200, data: { targets: string[] } }` on success
166
+ */
167
+ async function getEscalationTargets(input) {
168
+ try {
169
+ const targets = await roleService.getEscalationTargets(input.role);
170
+ return { status: 200, data: { targets } };
171
+ }
172
+ catch (err) {
173
+ return { status: 500, error: err.message };
174
+ }
175
+ }
176
+ /**
177
+ * Replace all escalation targets for a role with a new set. Requires admin privileges.
178
+ *
179
+ * Removes all existing escalation links from the source role and creates new
180
+ * ones for each target in the provided array.
181
+ *
182
+ * @param input.role — the source role whose targets are being replaced
183
+ * @param input.targets — array of target role names to set as the new escalation targets
184
+ * @returns `{ status: 200, data: { role, targets } }` on success
185
+ */
186
+ async function replaceEscalationTargets(input) {
187
+ try {
188
+ if (!Array.isArray(input.targets)) {
189
+ return { status: 400, error: 'targets must be an array of strings' };
190
+ }
191
+ await roleService.replaceEscalationTargets(input.role, input.targets);
192
+ return { status: 200, data: { role: input.role, targets: input.targets } };
193
+ }
194
+ catch (err) {
195
+ return { status: 500, error: err.message };
196
+ }
197
+ }
198
+ /**
199
+ * Delete a role from the system. Requires admin privileges.
200
+ *
201
+ * Returns 409 if the role cannot be deleted (e.g., still assigned to users).
202
+ *
203
+ * @param input.role — the role name to delete
204
+ * @returns `{ status: 200, data: { deleted: true } }` on success, or `{ status: 409 }` if deletion blocked
205
+ */
206
+ async function deleteRole(input) {
207
+ try {
208
+ const result = await roleService.deleteRole(input.role);
209
+ if (!result.deleted) {
210
+ return { status: 409, error: result.error || 'Cannot delete role' };
211
+ }
212
+ return { status: 200, data: { deleted: true } };
213
+ }
214
+ catch (err) {
215
+ return { status: 500, error: err.message };
216
+ }
217
+ }
@@ -0,0 +1,10 @@
1
+ import type { LTApiResult } from '../types/sdk';
2
+ /**
3
+ * Return platform settings for the current deployment.
4
+ *
5
+ * Includes telemetry configuration (trace URL), escalation claim duration
6
+ * options, and event transport details (socket.io, NATS, or none).
7
+ *
8
+ * @returns `{ status: 200, data: { telemetry, escalation, events } }`
9
+ */
10
+ export declare function getSettings(): Promise<LTApiResult>;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSettings = getSettings;
4
+ const telemetry_1 = require("../lib/telemetry");
5
+ const events_1 = require("../lib/events");
6
+ const nats_1 = require("../lib/events/nats");
7
+ const socketio_1 = require("../lib/events/socketio");
8
+ const defaults_1 = require("../modules/defaults");
9
+ /**
10
+ * Return platform settings for the current deployment.
11
+ *
12
+ * Includes telemetry configuration (trace URL), escalation claim duration
13
+ * options, and event transport details (socket.io, NATS, or none).
14
+ *
15
+ * @returns `{ status: 200, data: { telemetry, escalation, events } }`
16
+ */
17
+ async function getSettings() {
18
+ try {
19
+ const hasSocketIO = !!events_1.eventRegistry.getAdapter(socketio_1.SocketIOEventAdapter);
20
+ const hasNats = !!events_1.eventRegistry.getAdapter(nats_1.NatsEventAdapter);
21
+ const transport = hasSocketIO ? 'socketio' : hasNats ? 'nats' : 'none';
22
+ return {
23
+ status: 200,
24
+ data: {
25
+ telemetry: {
26
+ traceUrl: telemetry_1.telemetryRegistry.traceUrl ?? null,
27
+ },
28
+ escalation: {
29
+ claimDurations: defaults_1.CLAIM_DURATION_OPTIONS,
30
+ },
31
+ events: {
32
+ transport,
33
+ natsWsUrl: hasNats
34
+ ? (process.env.VITE_NATS_WS_URL || process.env.NATS_WS_URL || null)
35
+ : null,
36
+ },
37
+ },
38
+ };
39
+ }
40
+ catch (err) {
41
+ return { status: 500, error: err.message };
42
+ }
43
+ }
@@ -0,0 +1,70 @@
1
+ import type { LTApiResult } from '../types/sdk';
2
+ /**
3
+ * List tasks with optional filters.
4
+ *
5
+ * Tasks represent workflow executions tracked by the LT interceptor.
6
+ *
7
+ * @param input.status — filter by `pending` or `completed`
8
+ * @param input.lt_type — filter by interceptor classification
9
+ * @param input.workflow_type — filter by workflow function name
10
+ * @param input.workflow_id — filter by HotMesh workflow ID
11
+ * @param input.parent_workflow_id — filter by parent orchestrator ID
12
+ * @param input.origin_id — filter by root process origin ID
13
+ * @param input.limit — max results (default: 50)
14
+ * @param input.offset — pagination offset (default: 0)
15
+ * @returns `{ status: 200, data: { tasks, total } }`
16
+ */
17
+ export declare function listTasks(input: {
18
+ status?: string;
19
+ lt_type?: string;
20
+ workflow_type?: string;
21
+ workflow_id?: string;
22
+ parent_workflow_id?: string;
23
+ origin_id?: string;
24
+ limit?: number;
25
+ offset?: number;
26
+ }): Promise<LTApiResult>;
27
+ /**
28
+ * Return aggregate process statistics.
29
+ *
30
+ * @param input.period — time window (`1h`, `24h`, `7d`, `30d`)
31
+ * @returns `{ status: 200, data: <process stats> }`
32
+ */
33
+ export declare function getProcessStats(input: {
34
+ period?: string;
35
+ }): Promise<LTApiResult>;
36
+ /**
37
+ * List processes (grouped by origin_id) with optional filters.
38
+ *
39
+ * @param input.limit — max results (default: 50)
40
+ * @param input.offset — pagination offset
41
+ * @param input.workflow_type — filter by workflow type
42
+ * @param input.status — filter by status
43
+ * @param input.search — full-text search across process fields
44
+ * @returns `{ status: 200, data: { processes, total } }`
45
+ */
46
+ export declare function listProcesses(input: {
47
+ limit?: number;
48
+ offset?: number;
49
+ workflow_type?: string;
50
+ status?: string;
51
+ search?: string;
52
+ }): Promise<LTApiResult>;
53
+ /**
54
+ * Get a single process with all its tasks and escalations.
55
+ *
56
+ * @param input.originId — root process origin ID
57
+ * @returns `{ status: 200, data: { origin_id, tasks, escalations } }`
58
+ */
59
+ export declare function getProcess(input: {
60
+ originId: string;
61
+ }): Promise<LTApiResult>;
62
+ /**
63
+ * Get a single task by ID.
64
+ *
65
+ * @param input.id — task UUID
66
+ * @returns `{ status: 200, data: <task record> }` or 404
67
+ */
68
+ export declare function getTask(input: {
69
+ id: string;
70
+ }): Promise<LTApiResult>;
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.listTasks = listTasks;
37
+ exports.getProcessStats = getProcessStats;
38
+ exports.listProcesses = listProcesses;
39
+ exports.getProcess = getProcess;
40
+ exports.getTask = getTask;
41
+ const taskService = __importStar(require("../services/task"));
42
+ const escalationService = __importStar(require("../services/escalation"));
43
+ /**
44
+ * List tasks with optional filters.
45
+ *
46
+ * Tasks represent workflow executions tracked by the LT interceptor.
47
+ *
48
+ * @param input.status — filter by `pending` or `completed`
49
+ * @param input.lt_type — filter by interceptor classification
50
+ * @param input.workflow_type — filter by workflow function name
51
+ * @param input.workflow_id — filter by HotMesh workflow ID
52
+ * @param input.parent_workflow_id — filter by parent orchestrator ID
53
+ * @param input.origin_id — filter by root process origin ID
54
+ * @param input.limit — max results (default: 50)
55
+ * @param input.offset — pagination offset (default: 0)
56
+ * @returns `{ status: 200, data: { tasks, total } }`
57
+ */
58
+ async function listTasks(input) {
59
+ try {
60
+ const result = await taskService.listTasks(input);
61
+ return { status: 200, data: result };
62
+ }
63
+ catch (err) {
64
+ return { status: 500, error: err.message };
65
+ }
66
+ }
67
+ /**
68
+ * Return aggregate process statistics.
69
+ *
70
+ * @param input.period — time window (`1h`, `24h`, `7d`, `30d`)
71
+ * @returns `{ status: 200, data: <process stats> }`
72
+ */
73
+ async function getProcessStats(input) {
74
+ try {
75
+ const stats = await taskService.getProcessStats(input.period);
76
+ return { status: 200, data: stats };
77
+ }
78
+ catch (err) {
79
+ return { status: 500, error: err.message };
80
+ }
81
+ }
82
+ /**
83
+ * List processes (grouped by origin_id) with optional filters.
84
+ *
85
+ * @param input.limit — max results (default: 50)
86
+ * @param input.offset — pagination offset
87
+ * @param input.workflow_type — filter by workflow type
88
+ * @param input.status — filter by status
89
+ * @param input.search — full-text search across process fields
90
+ * @returns `{ status: 200, data: { processes, total } }`
91
+ */
92
+ async function listProcesses(input) {
93
+ try {
94
+ const result = await taskService.listProcesses(input);
95
+ return { status: 200, data: result };
96
+ }
97
+ catch (err) {
98
+ return { status: 500, error: err.message };
99
+ }
100
+ }
101
+ /**
102
+ * Get a single process with all its tasks and escalations.
103
+ *
104
+ * @param input.originId — root process origin ID
105
+ * @returns `{ status: 200, data: { origin_id, tasks, escalations } }`
106
+ */
107
+ async function getProcess(input) {
108
+ try {
109
+ const [tasks, escalations] = await Promise.all([
110
+ taskService.getProcessTasks(input.originId),
111
+ escalationService.getEscalationsByOriginId(input.originId),
112
+ ]);
113
+ return {
114
+ status: 200,
115
+ data: { origin_id: input.originId, tasks, escalations },
116
+ };
117
+ }
118
+ catch (err) {
119
+ return { status: 500, error: err.message };
120
+ }
121
+ }
122
+ /**
123
+ * Get a single task by ID.
124
+ *
125
+ * @param input.id — task UUID
126
+ * @returns `{ status: 200, data: <task record> }` or 404
127
+ */
128
+ async function getTask(input) {
129
+ try {
130
+ const task = await taskService.getTask(input.id);
131
+ if (!task) {
132
+ return { status: 404, error: 'Task not found' };
133
+ }
134
+ return { status: 200, data: task };
135
+ }
136
+ catch (err) {
137
+ return { status: 500, error: err.message };
138
+ }
139
+ }
@@ -0,0 +1,115 @@
1
+ import type { LTApiResult } from '../types/sdk';
2
+ import type { LTRoleType } from '../types';
3
+ /**
4
+ * List users with optional filters for role, role type, status, and pagination.
5
+ *
6
+ * @param input.role — filter by role name
7
+ * @param input.roleType — filter by role type (superadmin, admin, member)
8
+ * @param input.status — filter by user status
9
+ * @param input.limit — maximum number of users to return
10
+ * @param input.offset — number of users to skip for pagination
11
+ * @returns `{ status: 200, data: User[] }` on success
12
+ */
13
+ export declare function listUsers(input: {
14
+ role?: string;
15
+ roleType?: LTRoleType;
16
+ status?: string;
17
+ limit?: number;
18
+ offset?: number;
19
+ }): Promise<LTApiResult>;
20
+ /**
21
+ * Retrieve a single user by ID.
22
+ *
23
+ * @param input.id — the user's unique identifier
24
+ * @returns `{ status: 200, data: User }` on success, or `{ status: 404 }` if not found
25
+ */
26
+ export declare function getUser(input: {
27
+ id: string;
28
+ }): Promise<LTApiResult>;
29
+ /**
30
+ * Create a new user. Requires admin privileges.
31
+ *
32
+ * Validates that external_id is present and that any provided roles have valid
33
+ * names and types. Returns 409 if a user with the same external_id already exists.
34
+ *
35
+ * @param input.external_id — external system identifier (required)
36
+ * @param input.email — user's email address
37
+ * @param input.display_name — user's display name
38
+ * @param input.roles — initial role assignments, each with a role name and type (superadmin, admin, member)
39
+ * @param input.metadata — arbitrary key-value metadata to attach to the user
40
+ * @returns `{ status: 201, data: User }` on success, or `{ status: 409 }` on duplicate external_id
41
+ */
42
+ export declare function createUser(input: {
43
+ external_id?: string;
44
+ email?: string;
45
+ display_name?: string;
46
+ roles?: {
47
+ role: string;
48
+ type: string;
49
+ }[];
50
+ metadata?: Record<string, any>;
51
+ }): Promise<LTApiResult>;
52
+ /**
53
+ * Update an existing user's profile fields. Requires admin privileges.
54
+ *
55
+ * Only the provided fields are updated; omitted fields remain unchanged.
56
+ *
57
+ * @param input.id — the user's unique identifier (required)
58
+ * @param input.email — new email address
59
+ * @param input.display_name — new display name
60
+ * @param input.status — new user status
61
+ * @param input.metadata — replacement metadata object
62
+ * @returns `{ status: 200, data: User }` on success, or `{ status: 404 }` if not found
63
+ */
64
+ export declare function updateUser(input: {
65
+ id: string;
66
+ email?: string;
67
+ display_name?: string;
68
+ status?: string;
69
+ metadata?: Record<string, any>;
70
+ }): Promise<LTApiResult>;
71
+ /**
72
+ * Delete a user by ID. Requires admin privileges.
73
+ *
74
+ * @param input.id — the user's unique identifier
75
+ * @returns `{ status: 200, data: { deleted: true } }` on success, or `{ status: 404 }` if not found
76
+ */
77
+ export declare function deleteUser(input: {
78
+ id: string;
79
+ }): Promise<LTApiResult>;
80
+ /**
81
+ * Retrieve all roles assigned to a user.
82
+ *
83
+ * @param input.id — the user's unique identifier
84
+ * @returns `{ status: 200, data: { roles: Role[] } }` on success
85
+ */
86
+ export declare function getUserRoles(input: {
87
+ id: string;
88
+ }): Promise<LTApiResult>;
89
+ /**
90
+ * Assign a role to a user. Requires admin privileges.
91
+ *
92
+ * Validates that both role and type are provided and that the type is one of
93
+ * superadmin, admin, or member.
94
+ *
95
+ * @param input.id — the user's unique identifier
96
+ * @param input.role — the role name to assign
97
+ * @param input.type — the role type (superadmin, admin, or member)
98
+ * @returns `{ status: 201, data: UserRole }` on success
99
+ */
100
+ export declare function addUserRole(input: {
101
+ id: string;
102
+ role: string;
103
+ type: string;
104
+ }): Promise<LTApiResult>;
105
+ /**
106
+ * Remove a role from a user. Requires admin privileges.
107
+ *
108
+ * @param input.id — the user's unique identifier
109
+ * @param input.role — the role name to remove
110
+ * @returns `{ status: 200, data: { removed: true } }` on success, or `{ status: 404 }` if role not found
111
+ */
112
+ export declare function removeUserRole(input: {
113
+ id: string;
114
+ role: string;
115
+ }): Promise<LTApiResult>;