@elevasis/ui 1.20.0 → 1.20.1

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 (561) hide show
  1. package/dist/auth/index.d.ts +174 -14
  2. package/dist/{chunk-ACD2QA6E.js → chunk-3DIU726S.js} +2 -2
  3. package/dist/{chunk-GH7ZO4VD.js → chunk-C7AD6N23.js} +1 -1
  4. package/dist/{chunk-Z2BXCFAG.js → chunk-COTI2QPO.js} +1 -1
  5. package/dist/{chunk-U4CHEPIL.js → chunk-JIABC3AE.js} +1 -1
  6. package/dist/{chunk-BX565EOK.js → chunk-OFAXUZPZ.js} +298 -808
  7. package/dist/{chunk-JHMJKDVU.js → chunk-R3R367QY.js} +1 -1
  8. package/dist/{chunk-I6EVLOP3.js → chunk-VLTVZXP6.js} +2 -2
  9. package/dist/components/index.d.ts +5708 -22
  10. package/dist/components/index.js +6 -6
  11. package/dist/features/auth/index.d.ts +2557 -9
  12. package/dist/features/dashboard/index.d.ts +244 -9
  13. package/dist/features/dashboard/index.js +5 -5
  14. package/dist/features/monitoring/index.d.ts +121 -15
  15. package/dist/features/monitoring/index.js +4 -4
  16. package/dist/features/operations/index.d.ts +1771 -29
  17. package/dist/features/operations/index.js +6 -6
  18. package/dist/features/settings/index.d.ts +2589 -23
  19. package/dist/features/settings/index.js +5 -5
  20. package/dist/hooks/index.d.ts +6611 -22
  21. package/dist/hooks/index.js +4 -4
  22. package/dist/hooks/published.d.ts +6055 -21
  23. package/dist/hooks/published.js +4 -4
  24. package/dist/index.d.ts +8523 -15
  25. package/dist/index.js +5 -5
  26. package/dist/initialization/index.d.ts +2526 -23
  27. package/dist/layout/index.js +2 -2
  28. package/dist/organization/index.d.ts +274 -23
  29. package/dist/profile/index.d.ts +2477 -15
  30. package/dist/provider/index.d.ts +334 -11
  31. package/dist/provider/index.js +4 -4
  32. package/dist/provider/published.d.ts +309 -11
  33. package/dist/theme/index.d.ts +148 -10
  34. package/dist/theme/index.js +3 -3
  35. package/dist/theme/presets/__tests__/getPreset.test.js +92 -0
  36. package/dist/theme/presets/cyber-volt.js +70 -0
  37. package/dist/theme/presets/regal.js +69 -0
  38. package/dist/theme/presets/rose-gold.js +76 -0
  39. package/dist/types/index.d.ts +1 -1
  40. package/package.json +3 -3
  41. package/dist/auth/guards/AdminGuard.d.ts +0 -32
  42. package/dist/auth/guards/AdminGuard.d.ts.map +0 -1
  43. package/dist/auth/guards/ProtectedRoute.d.ts +0 -60
  44. package/dist/auth/guards/ProtectedRoute.d.ts.map +0 -1
  45. package/dist/auth/guards/__tests__/AdminGuard.test.d.ts +0 -12
  46. package/dist/auth/guards/__tests__/AdminGuard.test.d.ts.map +0 -1
  47. package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts +0 -14
  48. package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts.map +0 -1
  49. package/dist/auth/index.d.ts.map +0 -1
  50. package/dist/components/charts/ActivityTrendChart.d.ts +0 -13
  51. package/dist/components/charts/ActivityTrendChart.d.ts.map +0 -1
  52. package/dist/components/charts/CombinedTrendChart.d.ts +0 -22
  53. package/dist/components/charts/CombinedTrendChart.d.ts.map +0 -1
  54. package/dist/components/charts/CostTrendChart.d.ts +0 -13
  55. package/dist/components/charts/CostTrendChart.d.ts.map +0 -1
  56. package/dist/components/charts/HeroStatsRow.d.ts +0 -15
  57. package/dist/components/charts/HeroStatsRow.d.ts.map +0 -1
  58. package/dist/components/charts/index.d.ts +0 -9
  59. package/dist/components/charts/index.d.ts.map +0 -1
  60. package/dist/components/command-queue/TaskCard.d.ts +0 -18
  61. package/dist/components/command-queue/TaskCard.d.ts.map +0 -1
  62. package/dist/components/command-queue/index.d.ts +0 -5
  63. package/dist/components/command-queue/index.d.ts.map +0 -1
  64. package/dist/components/display/PageNotFound.d.ts +0 -2
  65. package/dist/components/display/PageNotFound.d.ts.map +0 -1
  66. package/dist/components/display/index.d.ts +0 -26
  67. package/dist/components/display/index.d.ts.map +0 -1
  68. package/dist/components/execution/ExecutionStats.d.ts +0 -16
  69. package/dist/components/execution/ExecutionStats.d.ts.map +0 -1
  70. package/dist/components/execution/index.d.ts +0 -18
  71. package/dist/components/execution/index.d.ts.map +0 -1
  72. package/dist/components/index.d.ts.map +0 -1
  73. package/dist/components/layout/backgrounds/AuroraBackground.d.ts +0 -16
  74. package/dist/components/layout/backgrounds/AuroraBackground.d.ts.map +0 -1
  75. package/dist/components/layout/backgrounds/AuroraBackground.js +0 -169
  76. package/dist/components/layout/backgrounds/EmberBackground.d.ts +0 -16
  77. package/dist/components/layout/backgrounds/EmberBackground.d.ts.map +0 -1
  78. package/dist/components/layout/backgrounds/EmberBackground.js +0 -169
  79. package/dist/components/layout/backgrounds/RoseGoldBackground.d.ts +0 -16
  80. package/dist/components/layout/backgrounds/RoseGoldBackground.d.ts.map +0 -1
  81. package/dist/components/layout/backgrounds/RoseGoldBackground.js +0 -169
  82. package/dist/components/monitoring/ErrorBreakdownTable.d.ts +0 -12
  83. package/dist/components/monitoring/ErrorBreakdownTable.d.ts.map +0 -1
  84. package/dist/components/monitoring/ResourceHealthPanel.d.ts +0 -8
  85. package/dist/components/monitoring/ResourceHealthPanel.d.ts.map +0 -1
  86. package/dist/components/monitoring/index.d.ts +0 -16
  87. package/dist/components/monitoring/index.d.ts.map +0 -1
  88. package/dist/components/notifications/NotificationBell.d.ts +0 -9
  89. package/dist/components/notifications/NotificationBell.d.ts.map +0 -1
  90. package/dist/components/notifications/NotificationItem.d.ts +0 -9
  91. package/dist/components/notifications/NotificationItem.d.ts.map +0 -1
  92. package/dist/components/notifications/NotificationList.d.ts +0 -10
  93. package/dist/components/notifications/NotificationList.d.ts.map +0 -1
  94. package/dist/components/notifications/NotificationPanel.d.ts +0 -10
  95. package/dist/components/notifications/NotificationPanel.d.ts.map +0 -1
  96. package/dist/components/notifications/index.d.ts +0 -5
  97. package/dist/components/notifications/index.d.ts.map +0 -1
  98. package/dist/components/operations/calibration/CreateProjectModal.d.ts +0 -9
  99. package/dist/components/operations/calibration/CreateProjectModal.d.ts.map +0 -1
  100. package/dist/components/operations/calibration/ProjectCard.d.ts +0 -9
  101. package/dist/components/operations/calibration/ProjectCard.d.ts.map +0 -1
  102. package/dist/components/operations/command-queue/index.d.ts +0 -3
  103. package/dist/components/operations/command-queue/index.d.ts.map +0 -1
  104. package/dist/components/operations/command-queue/sidebar/CommandQueueSidebar.d.ts +0 -17
  105. package/dist/components/operations/command-queue/sidebar/CommandQueueSidebar.d.ts.map +0 -1
  106. package/dist/components/operations/command-queue/sidebar/CommandQueueSidebarMiddle.d.ts +0 -17
  107. package/dist/components/operations/command-queue/sidebar/CommandQueueSidebarMiddle.d.ts.map +0 -1
  108. package/dist/components/operations/command-queue/sidebar/index.d.ts +0 -5
  109. package/dist/components/operations/command-queue/sidebar/index.d.ts.map +0 -1
  110. package/dist/components/operations/command-view/CommandViewGraph.d.ts +0 -22
  111. package/dist/components/operations/command-view/CommandViewGraph.d.ts.map +0 -1
  112. package/dist/components/operations/command-view/index.d.ts +0 -4
  113. package/dist/components/operations/command-view/index.d.ts.map +0 -1
  114. package/dist/components/operations/executions/AgentExecutionLogs.d.ts +0 -13
  115. package/dist/components/operations/executions/AgentExecutionLogs.d.ts.map +0 -1
  116. package/dist/components/operations/executions/WorkflowExecutionLogs.d.ts +0 -13
  117. package/dist/components/operations/executions/WorkflowExecutionLogs.d.ts.map +0 -1
  118. package/dist/components/operations/executions/index.d.ts +0 -4
  119. package/dist/components/operations/executions/index.d.ts.map +0 -1
  120. package/dist/components/operations/index.d.ts +0 -8
  121. package/dist/components/operations/index.d.ts.map +0 -1
  122. package/dist/components/operations/knowledge-base/DocTreeNav.d.ts +0 -14
  123. package/dist/components/operations/knowledge-base/DocTreeNav.d.ts.map +0 -1
  124. package/dist/components/operations/knowledge-base/KnowledgeBasePage.d.ts +0 -16
  125. package/dist/components/operations/knowledge-base/KnowledgeBasePage.d.ts.map +0 -1
  126. package/dist/components/operations/knowledge-base/index.d.ts +0 -3
  127. package/dist/components/operations/knowledge-base/index.d.ts.map +0 -1
  128. package/dist/components/operations/shared/BaseExecutionLogs/BaseExecutionLogs.d.ts +0 -16
  129. package/dist/components/operations/shared/BaseExecutionLogs/BaseExecutionLogs.d.ts.map +0 -1
  130. package/dist/components/operations/shared/BaseExecutionLogs/BaseExecutionLogsHeader.d.ts +0 -12
  131. package/dist/components/operations/shared/BaseExecutionLogs/BaseExecutionLogsHeader.d.ts.map +0 -1
  132. package/dist/components/operations/shared/BaseExecutionLogs/ExecutionErrorSection.d.ts +0 -12
  133. package/dist/components/operations/shared/BaseExecutionLogs/ExecutionErrorSection.d.ts.map +0 -1
  134. package/dist/components/operations/shared/BaseExecutionLogs/index.d.ts +0 -7
  135. package/dist/components/operations/shared/BaseExecutionLogs/index.d.ts.map +0 -1
  136. package/dist/components/operations/shared/index.d.ts +0 -5
  137. package/dist/components/operations/shared/index.d.ts.map +0 -1
  138. package/dist/components/operations/shared/layouts/ResourceHeader.d.ts +0 -11
  139. package/dist/components/operations/shared/layouts/ResourceHeader.d.ts.map +0 -1
  140. package/dist/components/operations/shared/layouts/ResourceNotFoundState.d.ts +0 -8
  141. package/dist/components/operations/shared/layouts/ResourceNotFoundState.d.ts.map +0 -1
  142. package/dist/components/operations/shared/layouts/index.d.ts +0 -4
  143. package/dist/components/operations/shared/layouts/index.d.ts.map +0 -1
  144. package/dist/components/operations/task-scheduler/CreateScheduleModal.d.ts +0 -7
  145. package/dist/components/operations/task-scheduler/CreateScheduleModal.d.ts.map +0 -1
  146. package/dist/components/operations/task-scheduler/TaskScheduler.d.ts +0 -2
  147. package/dist/components/operations/task-scheduler/TaskScheduler.d.ts.map +0 -1
  148. package/dist/components/operations/task-scheduler/index.d.ts +0 -11
  149. package/dist/components/operations/task-scheduler/index.d.ts.map +0 -1
  150. package/dist/components/sdk-barrel.d.ts +0 -26
  151. package/dist/components/sdk-barrel.d.ts.map +0 -1
  152. package/dist/components/settings/api-keys/ApiKeyDisplayModal.d.ts +0 -9
  153. package/dist/components/settings/api-keys/ApiKeyDisplayModal.d.ts.map +0 -1
  154. package/dist/components/settings/api-keys/ApiKeyList.d.ts +0 -8
  155. package/dist/components/settings/api-keys/ApiKeyList.d.ts.map +0 -1
  156. package/dist/components/settings/api-keys/ApiKeySettings.d.ts +0 -2
  157. package/dist/components/settings/api-keys/ApiKeySettings.d.ts.map +0 -1
  158. package/dist/components/settings/api-keys/CreateApiKeyModal.d.ts +0 -9
  159. package/dist/components/settings/api-keys/CreateApiKeyModal.d.ts.map +0 -1
  160. package/dist/components/settings/api-keys/EditApiKeyModal.d.ts +0 -8
  161. package/dist/components/settings/api-keys/EditApiKeyModal.d.ts.map +0 -1
  162. package/dist/components/settings/api-keys/index.d.ts +0 -6
  163. package/dist/components/settings/api-keys/index.d.ts.map +0 -1
  164. package/dist/components/settings/credentials/CreateCredentialModal.d.ts +0 -9
  165. package/dist/components/settings/credentials/CreateCredentialModal.d.ts.map +0 -1
  166. package/dist/components/settings/credentials/CredentialList.d.ts +0 -10
  167. package/dist/components/settings/credentials/CredentialList.d.ts.map +0 -1
  168. package/dist/components/settings/credentials/CredentialSettings.d.ts +0 -7
  169. package/dist/components/settings/credentials/CredentialSettings.d.ts.map +0 -1
  170. package/dist/components/settings/credentials/index.d.ts +0 -5
  171. package/dist/components/settings/credentials/index.d.ts.map +0 -1
  172. package/dist/components/settings/deployments/DeploymentList.d.ts +0 -8
  173. package/dist/components/settings/deployments/DeploymentList.d.ts.map +0 -1
  174. package/dist/components/settings/deployments/DeploymentSettings.d.ts +0 -2
  175. package/dist/components/settings/deployments/DeploymentSettings.d.ts.map +0 -1
  176. package/dist/components/settings/deployments/index.d.ts +0 -5
  177. package/dist/components/settings/deployments/index.d.ts.map +0 -1
  178. package/dist/components/settings/index.d.ts +0 -6
  179. package/dist/components/settings/index.d.ts.map +0 -1
  180. package/dist/components/table/SortableHeader.d.ts +0 -12
  181. package/dist/components/table/SortableHeader.d.ts.map +0 -1
  182. package/dist/components/table/index.d.ts +0 -4
  183. package/dist/components/table/index.d.ts.map +0 -1
  184. package/dist/features/auth/AdminGuard.d.ts +0 -38
  185. package/dist/features/auth/AdminGuard.d.ts.map +0 -1
  186. package/dist/features/auth/FeatureGuard.d.ts +0 -45
  187. package/dist/features/auth/FeatureGuard.d.ts.map +0 -1
  188. package/dist/features/auth/ProtectedRoute.d.ts +0 -43
  189. package/dist/features/auth/ProtectedRoute.d.ts.map +0 -1
  190. package/dist/features/auth/index.d.ts.map +0 -1
  191. package/dist/features/auth/useUserProfile.d.ts +0 -10
  192. package/dist/features/auth/useUserProfile.d.ts.map +0 -1
  193. package/dist/features/dashboard/Dashboard.d.ts +0 -57
  194. package/dist/features/dashboard/Dashboard.d.ts.map +0 -1
  195. package/dist/features/dashboard/RecentExecutionsByResource.d.ts +0 -11
  196. package/dist/features/dashboard/RecentExecutionsByResource.d.ts.map +0 -1
  197. package/dist/features/dashboard/ResourceOverview.d.ts +0 -21
  198. package/dist/features/dashboard/ResourceOverview.d.ts.map +0 -1
  199. package/dist/features/dashboard/UnresolvedErrorsTeaser.d.ts +0 -7
  200. package/dist/features/dashboard/UnresolvedErrorsTeaser.d.ts.map +0 -1
  201. package/dist/features/dashboard/index.d.ts.map +0 -1
  202. package/dist/features/monitoring/ActivityFeed.d.ts +0 -37
  203. package/dist/features/monitoring/ActivityFeed.d.ts.map +0 -1
  204. package/dist/features/monitoring/ActivityLog.d.ts +0 -8
  205. package/dist/features/monitoring/ActivityLog.d.ts.map +0 -1
  206. package/dist/features/monitoring/CostAnalytics.d.ts +0 -13
  207. package/dist/features/monitoring/CostAnalytics.d.ts.map +0 -1
  208. package/dist/features/monitoring/ErrorDetailsModal.d.ts +0 -13
  209. package/dist/features/monitoring/ErrorDetailsModal.d.ts.map +0 -1
  210. package/dist/features/monitoring/ExecutionHealth.d.ts +0 -9
  211. package/dist/features/monitoring/ExecutionHealth.d.ts.map +0 -1
  212. package/dist/features/monitoring/ExecutionLogsPage.d.ts +0 -20
  213. package/dist/features/monitoring/ExecutionLogsPage.d.ts.map +0 -1
  214. package/dist/features/monitoring/NotificationCenter.d.ts +0 -5
  215. package/dist/features/monitoring/NotificationCenter.d.ts.map +0 -1
  216. package/dist/features/monitoring/index.d.ts.map +0 -1
  217. package/dist/features/operations/CalibrationPage.d.ts +0 -9
  218. package/dist/features/operations/CalibrationPage.d.ts.map +0 -1
  219. package/dist/features/operations/CalibrationProjectDetailPage.d.ts +0 -43
  220. package/dist/features/operations/CalibrationProjectDetailPage.d.ts.map +0 -1
  221. package/dist/features/operations/CalibrationProjectsPage.d.ts +0 -10
  222. package/dist/features/operations/CalibrationProjectsPage.d.ts.map +0 -1
  223. package/dist/features/operations/CalibrationRunDetailPage.d.ts +0 -35
  224. package/dist/features/operations/CalibrationRunDetailPage.d.ts.map +0 -1
  225. package/dist/features/operations/CommandQueueDetailPage.d.ts +0 -16
  226. package/dist/features/operations/CommandQueueDetailPage.d.ts.map +0 -1
  227. package/dist/features/operations/CommandQueuePage.d.ts +0 -13
  228. package/dist/features/operations/CommandQueuePage.d.ts.map +0 -1
  229. package/dist/features/operations/CommandViewPage.d.ts +0 -6
  230. package/dist/features/operations/CommandViewPage.d.ts.map +0 -1
  231. package/dist/features/operations/CommandViewSidebarContent.d.ts +0 -19
  232. package/dist/features/operations/CommandViewSidebarContent.d.ts.map +0 -1
  233. package/dist/features/operations/ResourceDetailPage.d.ts +0 -25
  234. package/dist/features/operations/ResourceDetailPage.d.ts.map +0 -1
  235. package/dist/features/operations/ResourcesPage.d.ts +0 -15
  236. package/dist/features/operations/ResourcesPage.d.ts.map +0 -1
  237. package/dist/features/operations/ResourcesSidebar.d.ts +0 -9
  238. package/dist/features/operations/ResourcesSidebar.d.ts.map +0 -1
  239. package/dist/features/operations/calibration-components/ComparisonTable.d.ts +0 -9
  240. package/dist/features/operations/calibration-components/ComparisonTable.d.ts.map +0 -1
  241. package/dist/features/operations/executions/AgentExecutionPanel.d.ts +0 -12
  242. package/dist/features/operations/executions/AgentExecutionPanel.d.ts.map +0 -1
  243. package/dist/features/operations/executions/ExecutionPanel.d.ts +0 -13
  244. package/dist/features/operations/executions/ExecutionPanel.d.ts.map +0 -1
  245. package/dist/features/operations/executions/WorkflowExecutionPanel.d.ts +0 -12
  246. package/dist/features/operations/executions/WorkflowExecutionPanel.d.ts.map +0 -1
  247. package/dist/features/operations/executions/index.d.ts +0 -7
  248. package/dist/features/operations/executions/index.d.ts.map +0 -1
  249. package/dist/features/operations/index.d.ts.map +0 -1
  250. package/dist/features/operations/layouts/components/ResourceHeader.d.ts +0 -11
  251. package/dist/features/operations/layouts/components/ResourceHeader.d.ts.map +0 -1
  252. package/dist/features/operations/layouts/components/ResourceNotFoundState.d.ts +0 -8
  253. package/dist/features/operations/layouts/components/ResourceNotFoundState.d.ts.map +0 -1
  254. package/dist/features/operations/layouts/components/index.d.ts +0 -4
  255. package/dist/features/operations/layouts/components/index.d.ts.map +0 -1
  256. package/dist/features/settings/AccountSettings.d.ts +0 -20
  257. package/dist/features/settings/AccountSettings.d.ts.map +0 -1
  258. package/dist/features/settings/AppearanceSettings.d.ts +0 -23
  259. package/dist/features/settings/AppearanceSettings.d.ts.map +0 -1
  260. package/dist/features/settings/CreateWebhookEndpointModal.d.ts +0 -8
  261. package/dist/features/settings/CreateWebhookEndpointModal.d.ts.map +0 -1
  262. package/dist/features/settings/EditCredentialModal.d.ts +0 -9
  263. package/dist/features/settings/EditCredentialModal.d.ts.map +0 -1
  264. package/dist/features/settings/EditWebhookEndpointModal.d.ts +0 -8
  265. package/dist/features/settings/EditWebhookEndpointModal.d.ts.map +0 -1
  266. package/dist/features/settings/MemberConfigModal.d.ts +0 -14
  267. package/dist/features/settings/MemberConfigModal.d.ts.map +0 -1
  268. package/dist/features/settings/OAuthIntegrationsCard.d.ts +0 -6
  269. package/dist/features/settings/OAuthIntegrationsCard.d.ts.map +0 -1
  270. package/dist/features/settings/OrgMembersList.d.ts +0 -5
  271. package/dist/features/settings/OrgMembersList.d.ts.map +0 -1
  272. package/dist/features/settings/OrganizationSettings.d.ts +0 -30
  273. package/dist/features/settings/OrganizationSettings.d.ts.map +0 -1
  274. package/dist/features/settings/WebhookEndpointList.d.ts +0 -9
  275. package/dist/features/settings/WebhookEndpointList.d.ts.map +0 -1
  276. package/dist/features/settings/WebhookEndpointSettings.d.ts +0 -6
  277. package/dist/features/settings/WebhookEndpointSettings.d.ts.map +0 -1
  278. package/dist/features/settings/index.d.ts.map +0 -1
  279. package/dist/hooks/command-queue/index.d.ts +0 -7
  280. package/dist/hooks/command-queue/index.d.ts.map +0 -1
  281. package/dist/hooks/command-queue/useCommandQueue.d.ts +0 -33
  282. package/dist/hooks/command-queue/useCommandQueue.d.ts.map +0 -1
  283. package/dist/hooks/command-queue/useCommandQueueTotals.d.ts +0 -17
  284. package/dist/hooks/command-queue/useCommandQueueTotals.d.ts.map +0 -1
  285. package/dist/hooks/command-queue/useDeleteTask.d.ts +0 -5
  286. package/dist/hooks/command-queue/useDeleteTask.d.ts.map +0 -1
  287. package/dist/hooks/command-queue/usePatchTask.d.ts +0 -6
  288. package/dist/hooks/command-queue/usePatchTask.d.ts.map +0 -1
  289. package/dist/hooks/command-queue/useSubmitAction.d.ts +0 -29
  290. package/dist/hooks/command-queue/useSubmitAction.d.ts.map +0 -1
  291. package/dist/hooks/executions/index.d.ts +0 -17
  292. package/dist/hooks/executions/index.d.ts.map +0 -1
  293. package/dist/hooks/executions/useArchivedLogs.d.ts +0 -14
  294. package/dist/hooks/executions/useArchivedLogs.d.ts.map +0 -1
  295. package/dist/hooks/executions/useBulkDeleteExecutions.d.ts +0 -15
  296. package/dist/hooks/executions/useBulkDeleteExecutions.d.ts.map +0 -1
  297. package/dist/hooks/executions/useCancelExecution.d.ts +0 -20
  298. package/dist/hooks/executions/useCancelExecution.d.ts.map +0 -1
  299. package/dist/hooks/executions/useDeleteExecution.d.ts +0 -13
  300. package/dist/hooks/executions/useDeleteExecution.d.ts.map +0 -1
  301. package/dist/hooks/executions/useExecuteAsync.d.ts +0 -21
  302. package/dist/hooks/executions/useExecuteAsync.d.ts.map +0 -1
  303. package/dist/hooks/executions/useExecution.d.ts +0 -10
  304. package/dist/hooks/executions/useExecution.d.ts.map +0 -1
  305. package/dist/hooks/executions/useExecutions.d.ts +0 -16
  306. package/dist/hooks/executions/useExecutions.d.ts.map +0 -1
  307. package/dist/hooks/executions/useResourceDefinition.d.ts +0 -9
  308. package/dist/hooks/executions/useResourceDefinition.d.ts.map +0 -1
  309. package/dist/hooks/executions/useResources.d.ts +0 -15
  310. package/dist/hooks/executions/useResources.d.ts.map +0 -1
  311. package/dist/hooks/executions/useRetryExecution.d.ts +0 -16
  312. package/dist/hooks/executions/useRetryExecution.d.ts.map +0 -1
  313. package/dist/hooks/feature-access/createUseFeatureAccess.d.ts +0 -41
  314. package/dist/hooks/feature-access/createUseFeatureAccess.d.ts.map +0 -1
  315. package/dist/hooks/feature-access/index.d.ts +0 -2
  316. package/dist/hooks/feature-access/index.d.ts.map +0 -1
  317. package/dist/hooks/index.d.ts.map +0 -1
  318. package/dist/hooks/monitoring/index.d.ts +0 -11
  319. package/dist/hooks/monitoring/index.d.ts.map +0 -1
  320. package/dist/hooks/monitoring/useActivities.d.ts +0 -52
  321. package/dist/hooks/monitoring/useActivities.d.ts.map +0 -1
  322. package/dist/hooks/monitoring/useCostSummary.d.ts +0 -7
  323. package/dist/hooks/monitoring/useCostSummary.d.ts.map +0 -1
  324. package/dist/hooks/monitoring/useExecutionHealth.d.ts +0 -10
  325. package/dist/hooks/monitoring/useExecutionHealth.d.ts.map +0 -1
  326. package/dist/hooks/monitoring/useExecutionLogs.d.ts +0 -56
  327. package/dist/hooks/monitoring/useExecutionLogs.d.ts.map +0 -1
  328. package/dist/hooks/monitoring/useNotificationCount.d.ts +0 -26
  329. package/dist/hooks/monitoring/useNotificationCount.d.ts.map +0 -1
  330. package/dist/hooks/monitoring/useNotifications.d.ts +0 -11
  331. package/dist/hooks/monitoring/useNotifications.d.ts.map +0 -1
  332. package/dist/hooks/notifications/index.d.ts +0 -8
  333. package/dist/hooks/notifications/index.d.ts.map +0 -1
  334. package/dist/hooks/notifications/useMarkAllAsRead.d.ts +0 -2
  335. package/dist/hooks/notifications/useMarkAllAsRead.d.ts.map +0 -1
  336. package/dist/hooks/notifications/useMarkAsRead.d.ts +0 -2
  337. package/dist/hooks/notifications/useMarkAsRead.d.ts.map +0 -1
  338. package/dist/hooks/notifications/useTestNotification.d.ts +0 -16
  339. package/dist/hooks/notifications/useTestNotification.d.ts.map +0 -1
  340. package/dist/hooks/observability/index.d.ts +0 -25
  341. package/dist/hooks/observability/index.d.ts.map +0 -1
  342. package/dist/hooks/observability/useBatchedResourcesHealth.d.ts +0 -15
  343. package/dist/hooks/observability/useBatchedResourcesHealth.d.ts.map +0 -1
  344. package/dist/hooks/observability/useBusinessImpact.d.ts +0 -9
  345. package/dist/hooks/observability/useBusinessImpact.d.ts.map +0 -1
  346. package/dist/hooks/observability/useCostBreakdown.d.ts +0 -10
  347. package/dist/hooks/observability/useCostBreakdown.d.ts.map +0 -1
  348. package/dist/hooks/observability/useCostByModel.d.ts +0 -3
  349. package/dist/hooks/observability/useCostByModel.d.ts.map +0 -1
  350. package/dist/hooks/observability/useCostTrends.d.ts +0 -3
  351. package/dist/hooks/observability/useCostTrends.d.ts.map +0 -1
  352. package/dist/hooks/observability/useDashboardMetrics.d.ts +0 -3
  353. package/dist/hooks/observability/useDashboardMetrics.d.ts.map +0 -1
  354. package/dist/hooks/observability/useErrorAnalysis.d.ts +0 -7
  355. package/dist/hooks/observability/useErrorAnalysis.d.ts.map +0 -1
  356. package/dist/hooks/observability/useErrorDetails.d.ts +0 -20
  357. package/dist/hooks/observability/useErrorDetails.d.ts.map +0 -1
  358. package/dist/hooks/observability/useErrorDistribution.d.ts +0 -12
  359. package/dist/hooks/observability/useErrorDistribution.d.ts.map +0 -1
  360. package/dist/hooks/observability/useErrorTrends.d.ts +0 -12
  361. package/dist/hooks/observability/useErrorTrends.d.ts.map +0 -1
  362. package/dist/hooks/observability/useRecentExecutionsByResource.d.ts +0 -18
  363. package/dist/hooks/observability/useRecentExecutionsByResource.d.ts.map +0 -1
  364. package/dist/hooks/observability/useResolveError.d.ts +0 -17
  365. package/dist/hooks/observability/useResolveError.d.ts.map +0 -1
  366. package/dist/hooks/observability/useResourcesHealth.d.ts +0 -13
  367. package/dist/hooks/observability/useResourcesHealth.d.ts.map +0 -1
  368. package/dist/hooks/observability/useTopFailingResources.d.ts +0 -13
  369. package/dist/hooks/observability/useTopFailingResources.d.ts.map +0 -1
  370. package/dist/hooks/observability/useUnresolvedErrors.d.ts +0 -15
  371. package/dist/hooks/observability/useUnresolvedErrors.d.ts.map +0 -1
  372. package/dist/hooks/operations/calibration/useCalibrationProjects.d.ts +0 -24
  373. package/dist/hooks/operations/calibration/useCalibrationProjects.d.ts.map +0 -1
  374. package/dist/hooks/operations/calibration/useCalibrationRunFull.d.ts +0 -3
  375. package/dist/hooks/operations/calibration/useCalibrationRunFull.d.ts.map +0 -1
  376. package/dist/hooks/operations/calibration/useCalibrationRuns.d.ts +0 -35
  377. package/dist/hooks/operations/calibration/useCalibrationRuns.d.ts.map +0 -1
  378. package/dist/hooks/operations/command-view/index.d.ts +0 -8
  379. package/dist/hooks/operations/command-view/index.d.ts.map +0 -1
  380. package/dist/hooks/operations/command-view/useCheckpointTasks.d.ts +0 -24
  381. package/dist/hooks/operations/command-view/useCheckpointTasks.d.ts.map +0 -1
  382. package/dist/hooks/operations/command-view/useCommandViewData.d.ts +0 -11
  383. package/dist/hooks/operations/command-view/useCommandViewData.d.ts.map +0 -1
  384. package/dist/hooks/operations/command-view/useCommandViewStats.d.ts +0 -12
  385. package/dist/hooks/operations/command-view/useCommandViewStats.d.ts.map +0 -1
  386. package/dist/hooks/operations/command-view/useResourceErrors.d.ts +0 -22
  387. package/dist/hooks/operations/command-view/useResourceErrors.d.ts.map +0 -1
  388. package/dist/hooks/operations/command-view/useResourceExecutions.d.ts +0 -22
  389. package/dist/hooks/operations/command-view/useResourceExecutions.d.ts.map +0 -1
  390. package/dist/hooks/operations/index.d.ts +0 -4
  391. package/dist/hooks/operations/index.d.ts.map +0 -1
  392. package/dist/hooks/operations/knowledge-base/index.d.ts +0 -3
  393. package/dist/hooks/operations/knowledge-base/index.d.ts.map +0 -1
  394. package/dist/hooks/operations/knowledge-base/useDeploymentDocs.d.ts +0 -27
  395. package/dist/hooks/operations/knowledge-base/useDeploymentDocs.d.ts.map +0 -1
  396. package/dist/hooks/operations/settings/index.d.ts +0 -4
  397. package/dist/hooks/operations/settings/index.d.ts.map +0 -1
  398. package/dist/hooks/operations/settings/useOAuthFlow.d.ts +0 -17
  399. package/dist/hooks/operations/settings/useOAuthFlow.d.ts.map +0 -1
  400. package/dist/hooks/operations/settings/useUpdateThemePreference.d.ts +0 -17
  401. package/dist/hooks/operations/settings/useUpdateThemePreference.d.ts.map +0 -1
  402. package/dist/hooks/operations/shared/index.d.ts +0 -6
  403. package/dist/hooks/operations/shared/index.d.ts.map +0 -1
  404. package/dist/hooks/operations/shared/queryKeys.d.ts +0 -23
  405. package/dist/hooks/operations/shared/queryKeys.d.ts.map +0 -1
  406. package/dist/hooks/operations/shared/useExecutionLogSSE.d.ts +0 -11
  407. package/dist/hooks/operations/shared/useExecutionLogSSE.d.ts.map +0 -1
  408. package/dist/hooks/operations/shared/useExecutionPanelState.d.ts +0 -46
  409. package/dist/hooks/operations/shared/useExecutionPanelState.d.ts.map +0 -1
  410. package/dist/hooks/published.d.ts.map +0 -1
  411. package/dist/hooks/scheduling/index.d.ts +0 -7
  412. package/dist/hooks/scheduling/index.d.ts.map +0 -1
  413. package/dist/hooks/scheduling/useScheduledTasks.d.ts +0 -19
  414. package/dist/hooks/scheduling/useScheduledTasks.d.ts.map +0 -1
  415. package/dist/hooks/scheduling/useSchedules.d.ts +0 -185
  416. package/dist/hooks/scheduling/useSchedules.d.ts.map +0 -1
  417. package/dist/hooks/sessions/index.d.ts +0 -8
  418. package/dist/hooks/sessions/index.d.ts.map +0 -1
  419. package/dist/hooks/sessions/useSessionExecutions.d.ts +0 -13
  420. package/dist/hooks/sessions/useSessionExecutions.d.ts.map +0 -1
  421. package/dist/hooks/sessions/useSessionMessages.d.ts +0 -7
  422. package/dist/hooks/sessions/useSessionMessages.d.ts.map +0 -1
  423. package/dist/hooks/sessions/useSessions.d.ts +0 -26
  424. package/dist/hooks/sessions/useSessions.d.ts.map +0 -1
  425. package/dist/hooks/settings/api-keys/index.d.ts +0 -7
  426. package/dist/hooks/settings/api-keys/index.d.ts.map +0 -1
  427. package/dist/hooks/settings/api-keys/useCreateApiKey.d.ts +0 -3
  428. package/dist/hooks/settings/api-keys/useCreateApiKey.d.ts.map +0 -1
  429. package/dist/hooks/settings/api-keys/useDeleteApiKey.d.ts +0 -2
  430. package/dist/hooks/settings/api-keys/useDeleteApiKey.d.ts.map +0 -1
  431. package/dist/hooks/settings/api-keys/useListApiKeys.d.ts +0 -2
  432. package/dist/hooks/settings/api-keys/useListApiKeys.d.ts.map +0 -1
  433. package/dist/hooks/settings/api-keys/useUpdateApiKey.d.ts +0 -5
  434. package/dist/hooks/settings/api-keys/useUpdateApiKey.d.ts.map +0 -1
  435. package/dist/hooks/settings/credentials/index.d.ts +0 -7
  436. package/dist/hooks/settings/credentials/index.d.ts.map +0 -1
  437. package/dist/hooks/settings/credentials/useCreateCredential.d.ts +0 -3
  438. package/dist/hooks/settings/credentials/useCreateCredential.d.ts.map +0 -1
  439. package/dist/hooks/settings/credentials/useCredentials.d.ts +0 -8
  440. package/dist/hooks/settings/credentials/useCredentials.d.ts.map +0 -1
  441. package/dist/hooks/settings/credentials/useDeleteCredential.d.ts +0 -2
  442. package/dist/hooks/settings/credentials/useDeleteCredential.d.ts.map +0 -1
  443. package/dist/hooks/settings/credentials/useUpdateCredential.d.ts +0 -10
  444. package/dist/hooks/settings/credentials/useUpdateCredential.d.ts.map +0 -1
  445. package/dist/hooks/settings/deployments/index.d.ts +0 -5
  446. package/dist/hooks/settings/deployments/index.d.ts.map +0 -1
  447. package/dist/hooks/settings/deployments/useDeploymentActions.d.ts +0 -4
  448. package/dist/hooks/settings/deployments/useDeploymentActions.d.ts.map +0 -1
  449. package/dist/hooks/settings/deployments/useListDeployments.d.ts +0 -2
  450. package/dist/hooks/settings/deployments/useListDeployments.d.ts.map +0 -1
  451. package/dist/hooks/settings/index.d.ts +0 -6
  452. package/dist/hooks/settings/index.d.ts.map +0 -1
  453. package/dist/hooks/settings/organization/index.d.ts +0 -6
  454. package/dist/hooks/settings/organization/index.d.ts.map +0 -1
  455. package/dist/hooks/settings/organization/useDeactivateMembership.d.ts +0 -11
  456. package/dist/hooks/settings/organization/useDeactivateMembership.d.ts.map +0 -1
  457. package/dist/hooks/settings/organization/useReactivateMembership.d.ts +0 -11
  458. package/dist/hooks/settings/organization/useReactivateMembership.d.ts.map +0 -1
  459. package/dist/hooks/settings/organization/useUpdateMemberConfig.d.ts +0 -8
  460. package/dist/hooks/settings/organization/useUpdateMemberConfig.d.ts.map +0 -1
  461. package/dist/hooks/settings/organization/useUserMemberships.d.ts +0 -3
  462. package/dist/hooks/settings/organization/useUserMemberships.d.ts.map +0 -1
  463. package/dist/hooks/settings/webhooks/index.d.ts +0 -7
  464. package/dist/hooks/settings/webhooks/index.d.ts.map +0 -1
  465. package/dist/hooks/settings/webhooks/useCreateWebhookEndpoint.d.ts +0 -18
  466. package/dist/hooks/settings/webhooks/useCreateWebhookEndpoint.d.ts.map +0 -1
  467. package/dist/hooks/settings/webhooks/useDeleteWebhookEndpoint.d.ts +0 -2
  468. package/dist/hooks/settings/webhooks/useDeleteWebhookEndpoint.d.ts.map +0 -1
  469. package/dist/hooks/settings/webhooks/useListWebhookEndpoints.d.ts +0 -14
  470. package/dist/hooks/settings/webhooks/useListWebhookEndpoints.d.ts.map +0 -1
  471. package/dist/hooks/settings/webhooks/useUpdateWebhookEndpoint.d.ts +0 -18
  472. package/dist/hooks/settings/webhooks/useUpdateWebhookEndpoint.d.ts.map +0 -1
  473. package/dist/hooks/settings/webhooks/webhookEndpointService.d.ts +0 -27
  474. package/dist/hooks/settings/webhooks/webhookEndpointService.d.ts.map +0 -1
  475. package/dist/hooks/useOrganizationMembers.d.ts +0 -18
  476. package/dist/hooks/useOrganizationMembers.d.ts.map +0 -1
  477. package/dist/index.d.ts.map +0 -1
  478. package/dist/initialization/InitializationProvider.d.ts +0 -48
  479. package/dist/initialization/InitializationProvider.d.ts.map +0 -1
  480. package/dist/initialization/hooks/useAppInitialization.d.ts +0 -32
  481. package/dist/initialization/hooks/useAppInitialization.d.ts.map +0 -1
  482. package/dist/initialization/index.d.ts.map +0 -1
  483. package/dist/organization/context/OrganizationProvider.d.ts +0 -24
  484. package/dist/organization/context/OrganizationProvider.d.ts.map +0 -1
  485. package/dist/organization/hooks/useOrgInitialization.d.ts +0 -56
  486. package/dist/organization/hooks/useOrgInitialization.d.ts.map +0 -1
  487. package/dist/organization/index.d.ts.map +0 -1
  488. package/dist/profile/context/ProfileProvider.d.ts +0 -31
  489. package/dist/profile/context/ProfileProvider.d.ts.map +0 -1
  490. package/dist/profile/hooks/useUserProfile.d.ts +0 -38
  491. package/dist/profile/hooks/useUserProfile.d.ts.map +0 -1
  492. package/dist/profile/index.d.ts.map +0 -1
  493. package/dist/provider/CoreAuthKitInner.d.ts +0 -12
  494. package/dist/provider/CoreAuthKitInner.d.ts.map +0 -1
  495. package/dist/provider/ElevasisCoreProvider.d.ts +0 -25
  496. package/dist/provider/ElevasisCoreProvider.d.ts.map +0 -1
  497. package/dist/provider/ElevasisServiceContext.d.ts +0 -31
  498. package/dist/provider/ElevasisServiceContext.d.ts.map +0 -1
  499. package/dist/provider/ElevasisUIProvider.d.ts +0 -28
  500. package/dist/provider/ElevasisUIProvider.d.ts.map +0 -1
  501. package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts +0 -2
  502. package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts.map +0 -1
  503. package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts +0 -2
  504. package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts.map +0 -1
  505. package/dist/provider/index.d.ts.map +0 -1
  506. package/dist/provider/published.d.ts.map +0 -1
  507. package/dist/provider/types.d.ts +0 -151
  508. package/dist/provider/types.d.ts.map +0 -1
  509. package/dist/sdk-barrel.d.ts +0 -20
  510. package/dist/sdk-barrel.d.ts.map +0 -1
  511. package/dist/theme/PresetsContext.d.ts +0 -4
  512. package/dist/theme/PresetsContext.d.ts.map +0 -1
  513. package/dist/theme/cssVariables.d.ts +0 -12
  514. package/dist/theme/cssVariables.d.ts.map +0 -1
  515. package/dist/theme/index.d.ts.map +0 -1
  516. package/dist/theme/presets/abyss.d.ts +0 -3
  517. package/dist/theme/presets/abyss.d.ts.map +0 -1
  518. package/dist/theme/presets/aurora.d.ts +0 -12
  519. package/dist/theme/presets/aurora.d.ts.map +0 -1
  520. package/dist/theme/presets/canopy.d.ts +0 -12
  521. package/dist/theme/presets/canopy.d.ts.map +0 -1
  522. package/dist/theme/presets/canyon.d.ts +0 -11
  523. package/dist/theme/presets/canyon.d.ts.map +0 -1
  524. package/dist/theme/presets/cortex.d.ts +0 -3
  525. package/dist/theme/presets/cortex.d.ts.map +0 -1
  526. package/dist/theme/presets/cyber-punk.d.ts +0 -11
  527. package/dist/theme/presets/cyber-punk.d.ts.map +0 -1
  528. package/dist/theme/presets/cyber-strike.d.ts +0 -13
  529. package/dist/theme/presets/cyber-strike.d.ts.map +0 -1
  530. package/dist/theme/presets/cyber-void.d.ts +0 -12
  531. package/dist/theme/presets/cyber-void.d.ts.map +0 -1
  532. package/dist/theme/presets/default.d.ts +0 -4
  533. package/dist/theme/presets/default.d.ts.map +0 -1
  534. package/dist/theme/presets/ember.d.ts +0 -12
  535. package/dist/theme/presets/ember.d.ts.map +0 -1
  536. package/dist/theme/presets/helios.d.ts +0 -3
  537. package/dist/theme/presets/helios.d.ts.map +0 -1
  538. package/dist/theme/presets/honey.d.ts +0 -12
  539. package/dist/theme/presets/honey.d.ts.map +0 -1
  540. package/dist/theme/presets/index.d.ts +0 -8
  541. package/dist/theme/presets/index.d.ts.map +0 -1
  542. package/dist/theme/presets/midnight.d.ts +0 -12
  543. package/dist/theme/presets/midnight.d.ts.map +0 -1
  544. package/dist/theme/presets/nirvana.d.ts +0 -16
  545. package/dist/theme/presets/nirvana.d.ts.map +0 -1
  546. package/dist/theme/presets/obsidian.d.ts +0 -3
  547. package/dist/theme/presets/obsidian.d.ts.map +0 -1
  548. package/dist/theme/presets/slate.d.ts +0 -3
  549. package/dist/theme/presets/slate.d.ts.map +0 -1
  550. package/dist/theme/presets/synapse.d.ts +0 -10
  551. package/dist/theme/presets/synapse.d.ts.map +0 -1
  552. package/dist/theme/presets/tactical.d.ts +0 -8
  553. package/dist/theme/presets/tactical.d.ts.map +0 -1
  554. package/dist/theme/presets/types.d.ts +0 -43
  555. package/dist/theme/presets/types.d.ts.map +0 -1
  556. package/dist/theme/presets/verdant.d.ts +0 -3
  557. package/dist/theme/presets/verdant.d.ts.map +0 -1
  558. package/dist/theme/presets/wave.d.ts +0 -14
  559. package/dist/theme/presets/wave.d.ts.map +0 -1
  560. package/dist/theme/useAvailablePresets.d.ts +0 -16
  561. package/dist/theme/useAvailablePresets.d.ts.map +0 -1
@@ -1,29 +1,1771 @@
1
- export { ResourcesPage } from './ResourcesPage';
2
- export type { ResourcesPageProps } from './ResourcesPage';
3
- export { ResourcesSidebar } from './ResourcesSidebar';
4
- export type { ResourcesSidebarProps } from './ResourcesSidebar';
5
- export { ResourceDetailPage } from './ResourceDetailPage';
6
- export type { ResourceDetailPageProps, ResourceDetailPageRenderExecutionPanelArgs } from './ResourceDetailPage';
7
- export { CommandQueuePage } from './CommandQueuePage';
8
- export type { CommandQueuePageProps } from './CommandQueuePage';
9
- export { CommandQueueDetailPage } from './CommandQueueDetailPage';
10
- export type { CommandQueueDetailPageProps, CommandQueueDetailPageRichTextArgs } from './CommandQueueDetailPage';
11
- export { CommandViewPage } from './CommandViewPage';
12
- export type { CommandViewPageProps } from './CommandViewPage';
13
- export { CalibrationPage } from './CalibrationPage';
14
- export type { CalibrationPageProps } from './CalibrationPage';
15
- export { CalibrationProjectDetailPage } from './CalibrationProjectDetailPage';
16
- export type { CalibrationProjectDetailPageProps, CalibrationProjectDetailPageRenderRunCardArgs, CalibrationProjectDetailPageRenderCreateModalArgs } from './CalibrationProjectDetailPage';
17
- export { CalibrationProjectsPage } from './CalibrationProjectsPage';
18
- export type { CalibrationProjectsPageProps } from './CalibrationProjectsPage';
19
- export { CommandViewSidebarContent } from './CommandViewSidebarContent';
20
- export type { CommandViewSidebarContentProps } from './CommandViewSidebarContent';
21
- export { CalibrationRunDetailPage } from './CalibrationRunDetailPage';
22
- export type { CalibrationRunDetailPageProps } from './CalibrationRunDetailPage';
23
- export { ExecutionPanel } from './executions/index.js';
24
- export type { ExecutionPanelProps } from './executions/index.js';
25
- export { WorkflowExecutionPanel } from './executions/index.js';
26
- export type { WorkflowExecutionPanelProps } from './executions/index.js';
27
- export { AgentExecutionPanel } from './executions/index.js';
28
- export type { AgentExecutionPanelProps } from './executions/index.js';
29
- //# sourceMappingURL=index.d.ts.map
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { z } from 'zod';
3
+ import { ReactNode } from 'react';
4
+
5
+ /**
6
+ * Workflow-specific logging types and utilities
7
+ */
8
+
9
+ interface WorkflowExecutionContext {
10
+ type: 'workflow';
11
+ contextType: 'workflow-execution';
12
+ executionId: string;
13
+ workflowId: string;
14
+ workflowName?: string;
15
+ organizationId: string;
16
+ executionPath?: string[];
17
+ }
18
+ interface WorkflowFailureContext {
19
+ type: 'workflow';
20
+ contextType: 'workflow-failure';
21
+ executionId: string;
22
+ workflowId: string;
23
+ error: string;
24
+ }
25
+ interface StepStartedContext {
26
+ type: 'workflow';
27
+ contextType: 'step-started';
28
+ stepId: string;
29
+ stepStatus: 'started';
30
+ input: unknown;
31
+ startTime: number;
32
+ }
33
+ interface StepCompletedContext {
34
+ type: 'workflow';
35
+ contextType: 'step-completed';
36
+ stepId: string;
37
+ stepStatus: 'completed';
38
+ output: unknown;
39
+ duration: number;
40
+ isTerminal: boolean;
41
+ startTime: number;
42
+ endTime: number;
43
+ }
44
+ interface StepFailedContext {
45
+ type: 'workflow';
46
+ contextType: 'step-failed';
47
+ stepId: string;
48
+ stepStatus: 'failed';
49
+ error: string;
50
+ duration: number;
51
+ startTime: number;
52
+ endTime: number;
53
+ }
54
+ interface ConditionalRouteContext {
55
+ type: 'workflow';
56
+ contextType: 'conditional-route';
57
+ stepId: string;
58
+ target: string;
59
+ error?: string;
60
+ }
61
+ interface ExecutionPathContext {
62
+ type: 'workflow';
63
+ contextType: 'execution-path';
64
+ executionPath: string[];
65
+ }
66
+ type WorkflowLogContext = WorkflowExecutionContext | WorkflowFailureContext | StepStartedContext | StepCompletedContext | StepFailedContext | ConditionalRouteContext | ExecutionPathContext;
67
+
68
+ /**
69
+ * Agent-specific logging types
70
+ * Simplified 2-event model: lifecycle, iteration
71
+ *
72
+ * Design Philosophy:
73
+ * - LIFECYCLE EVENTS: Structural checkpoints (initialization, iteration, completion)
74
+ * - ITERATION EVENTS: Execution activities (reasoning, actions during iterations)
75
+ */
76
+
77
+ /**
78
+ * Agent lifecycle stages
79
+ * Universal checkpoints that apply to all agent executions
80
+ */
81
+ type AgentLifecycle = 'initialization' | 'iteration' | 'completion';
82
+ /**
83
+ * Iteration event types
84
+ * Activities that occur during agent iterations
85
+ */
86
+ type IterationEventType = 'reasoning' | 'action' | 'tool-call';
87
+ /**
88
+ * Base fields shared by all lifecycle events
89
+ */
90
+ interface AgentLifecycleEventBase {
91
+ type: 'agent';
92
+ agentId: string;
93
+ lifecycle: AgentLifecycle;
94
+ sessionId?: string;
95
+ }
96
+ /**
97
+ * Lifecycle started event - emitted when a phase begins
98
+ * REQUIRED: startTime (phase has started, no end yet)
99
+ */
100
+ interface AgentLifecycleStartedEvent extends AgentLifecycleEventBase {
101
+ stage: 'started';
102
+ startTime: number;
103
+ iteration?: number;
104
+ }
105
+ /**
106
+ * Lifecycle completed event - emitted when a phase succeeds
107
+ * REQUIRED: startTime, endTime, duration (phase has finished successfully)
108
+ */
109
+ interface AgentLifecycleCompletedEvent extends AgentLifecycleEventBase {
110
+ stage: 'completed';
111
+ startTime: number;
112
+ endTime: number;
113
+ duration: number;
114
+ iteration?: number;
115
+ attempts?: number;
116
+ memorySize?: {
117
+ sessionMemoryKeys: number;
118
+ historyEntries: number;
119
+ };
120
+ }
121
+ /**
122
+ * Lifecycle failed event - emitted when a phase fails
123
+ * REQUIRED: startTime, endTime, duration, error (phase has finished with error)
124
+ */
125
+ interface AgentLifecycleFailedEvent extends AgentLifecycleEventBase {
126
+ stage: 'failed';
127
+ startTime: number;
128
+ endTime: number;
129
+ duration: number;
130
+ error: string;
131
+ iteration?: number;
132
+ }
133
+ /**
134
+ * Union type for all lifecycle events
135
+ * Discriminated by 'stage' field for type narrowing
136
+ */
137
+ type AgentLifecycleEvent = AgentLifecycleStartedEvent | AgentLifecycleCompletedEvent | AgentLifecycleFailedEvent;
138
+ /**
139
+ * Placeholder data for MVP
140
+ * Will be typed per actionType in future
141
+ */
142
+ interface ActionPlaceholderData {
143
+ message: string;
144
+ }
145
+ /**
146
+ * Iteration event - captures activities during agent iterations
147
+ * Consolidates reasoning (LLM thought process) and actions (tool use, memory ops, etc.)
148
+ */
149
+ interface AgentIterationEvent {
150
+ type: 'agent';
151
+ agentId: string;
152
+ lifecycle: 'iteration';
153
+ eventType: IterationEventType;
154
+ iteration: number;
155
+ sessionId?: string;
156
+ startTime: number;
157
+ endTime: number;
158
+ duration: number;
159
+ output?: string;
160
+ actionType?: string;
161
+ data?: ActionPlaceholderData;
162
+ }
163
+ /**
164
+ * Tool call event - captures individual tool executions during iterations
165
+ * Provides granular timing for each tool invocation
166
+ */
167
+ interface AgentToolCallEvent {
168
+ type: 'agent';
169
+ agentId: string;
170
+ lifecycle: 'iteration';
171
+ eventType: 'tool-call';
172
+ iteration: number;
173
+ sessionId?: string;
174
+ toolName: string;
175
+ startTime: number;
176
+ endTime: number;
177
+ duration: number;
178
+ success: boolean;
179
+ error?: string;
180
+ input?: Record<string, unknown>;
181
+ output?: unknown;
182
+ }
183
+ /**
184
+ * Union type for all agent log contexts
185
+ * 3 event types total (lifecycle, iteration, tool-call)
186
+ */
187
+ type AgentLogContext = AgentLifecycleEvent | AgentIterationEvent | AgentToolCallEvent;
188
+ /**
189
+ * Data for lifecycle 'started' events
190
+ */
191
+ interface AgentLifecycleStartedData {
192
+ startTime: number;
193
+ iteration?: number;
194
+ }
195
+ /**
196
+ * Data for lifecycle 'completed' events
197
+ */
198
+ interface AgentLifecycleCompletedData {
199
+ startTime: number;
200
+ endTime: number;
201
+ duration: number;
202
+ iteration?: number;
203
+ attempts?: number;
204
+ memorySize?: {
205
+ sessionMemoryKeys: number;
206
+ historyEntries: number;
207
+ };
208
+ }
209
+ /**
210
+ * Data for lifecycle 'failed' events
211
+ */
212
+ interface AgentLifecycleFailedData {
213
+ startTime: number;
214
+ endTime: number;
215
+ duration: number;
216
+ error: string;
217
+ iteration?: number;
218
+ }
219
+ /**
220
+ * Scoped logger for agent execution
221
+ * Captures logger and agentId to eliminate repetitive parameter passing
222
+ *
223
+ * Type-safe lifecycle logging with stage-specific required fields
224
+ */
225
+ interface AgentScopedLogger {
226
+ lifecycle(lifecycle: AgentLifecycle, stage: 'started', data: AgentLifecycleStartedData): void;
227
+ lifecycle(lifecycle: AgentLifecycle, stage: 'completed', data: AgentLifecycleCompletedData): void;
228
+ lifecycle(lifecycle: AgentLifecycle, stage: 'failed', data: AgentLifecycleFailedData): void;
229
+ reasoning(output: string, iteration: number, startTime: number, endTime: number, duration: number): void;
230
+ action(actionType: string, message: string, iteration: number, startTime: number, endTime: number, duration: number): void;
231
+ toolCall(toolName: string, iteration: number, startTime: number, endTime: number, duration: number, success: boolean, error?: string, input?: unknown, output?: unknown): void;
232
+ }
233
+
234
+ type LogContext = WorkflowLogContext | AgentLogContext;
235
+ interface IExecutionLogger {
236
+ debug(message: string, context?: LogContext): void;
237
+ info(message: string, context?: LogContext): void;
238
+ warn(message: string, context?: LogContext): void;
239
+ error(message: string, context?: LogContext): void;
240
+ }
241
+
242
+ /**
243
+ * Shared form field types for dynamic form generation
244
+ * Used by: Command Queue, Execution Runner UI, future form-based features
245
+ */
246
+ /**
247
+ * Supported form field types for action payloads
248
+ * Maps to Mantine form components
249
+ */
250
+ type FormFieldType = 'text' | 'textarea' | 'number' | 'select' | 'checkbox' | 'radio' | 'richtext';
251
+ /**
252
+ * Form field definition
253
+ */
254
+ interface FormField {
255
+ /** Field key in payload object */
256
+ name: string;
257
+ /** Field label for UI */
258
+ label: string;
259
+ /** Field type (determines UI component) */
260
+ type: FormFieldType;
261
+ /** Default value */
262
+ defaultValue?: unknown;
263
+ /** Required field */
264
+ required?: boolean;
265
+ /** Placeholder text */
266
+ placeholder?: string;
267
+ /** Help text */
268
+ description?: string;
269
+ /** Options for select/radio */
270
+ options?: Array<{
271
+ label: string;
272
+ value: string | number;
273
+ }>;
274
+ /** Min/max for number */
275
+ min?: number;
276
+ max?: number;
277
+ /** Path to context value for pre-filling (dot notation, e.g., 'proposal.summary') */
278
+ defaultValueFromContext?: string;
279
+ }
280
+ /**
281
+ * Form schema for action payload collection
282
+ */
283
+ interface FormSchema {
284
+ /** Form title */
285
+ title?: string;
286
+ /** Form description */
287
+ description?: string;
288
+ /** Form fields */
289
+ fields: FormField[];
290
+ }
291
+
292
+ /**
293
+ * Serialized Registry Types
294
+ *
295
+ * Pre-computed JSON-safe types for API responses and Command View.
296
+ * Serialization happens once at API startup, enabling instant response times.
297
+ */
298
+
299
+ /**
300
+ * Serialized form field for API responses
301
+ */
302
+ interface SerializedFormField {
303
+ name: string;
304
+ label: string;
305
+ type: FormFieldType;
306
+ defaultValue?: unknown;
307
+ required?: boolean;
308
+ placeholder?: string;
309
+ description?: string;
310
+ options?: Array<{
311
+ label: string;
312
+ value: string | number;
313
+ }>;
314
+ min?: number;
315
+ max?: number;
316
+ }
317
+ /**
318
+ * Serialized form schema for API responses
319
+ */
320
+ interface SerializedFormSchema {
321
+ title?: string;
322
+ description?: string;
323
+ fields: SerializedFormField[];
324
+ layout?: 'vertical' | 'horizontal' | 'grid';
325
+ }
326
+ /**
327
+ * Serialized execution form schema for API responses
328
+ */
329
+ interface SerializedExecutionFormSchema extends SerializedFormSchema {
330
+ fieldMappings?: Record<string, string>;
331
+ submitButton?: {
332
+ label?: string;
333
+ loadingLabel?: string;
334
+ confirmMessage?: string;
335
+ };
336
+ }
337
+ /**
338
+ * Serialized schedule config for API responses
339
+ */
340
+ interface SerializedScheduleConfig {
341
+ enabled: boolean;
342
+ defaultSchedule?: string;
343
+ allowedPatterns?: string[];
344
+ }
345
+ /**
346
+ * Serialized webhook config for API responses
347
+ */
348
+ interface SerializedWebhookConfig {
349
+ enabled: boolean;
350
+ payloadSchema?: unknown;
351
+ }
352
+ /**
353
+ * Serialized execution interface for API responses
354
+ */
355
+ interface SerializedExecutionInterface {
356
+ form: SerializedExecutionFormSchema;
357
+ schedule?: SerializedScheduleConfig;
358
+ webhook?: SerializedWebhookConfig;
359
+ }
360
+ /**
361
+ * Serialized agent definition (JSON-safe)
362
+ * Result of serializeDefinition(AgentDefinition)
363
+ */
364
+ interface SerializedAgentDefinition {
365
+ config: {
366
+ resourceId: string;
367
+ name: string;
368
+ description: string;
369
+ version: string;
370
+ type: 'agent';
371
+ status: 'dev' | 'prod';
372
+ /** Whether this resource is archived and should be excluded from registration and deployment */
373
+ archived?: boolean;
374
+ systemPrompt: string;
375
+ constraints?: {
376
+ maxIterations?: number;
377
+ timeout?: number;
378
+ maxSessionMemoryKeys?: number;
379
+ maxMemoryTokens?: number;
380
+ };
381
+ sessionCapable?: boolean;
382
+ memoryPreferences?: string;
383
+ };
384
+ modelConfig: {
385
+ provider: string;
386
+ model: string;
387
+ apiKey: string;
388
+ temperature: number;
389
+ maxOutputTokens: number;
390
+ topP?: number;
391
+ modelOptions?: Record<string, unknown>;
392
+ };
393
+ contract: {
394
+ inputSchema: object;
395
+ outputSchema?: object;
396
+ };
397
+ tools: Array<{
398
+ name: string;
399
+ description: string;
400
+ inputSchema?: object;
401
+ outputSchema?: object;
402
+ }>;
403
+ knowledgeMap?: {
404
+ nodeCount: number;
405
+ nodes: Array<{
406
+ id: string;
407
+ description: string;
408
+ loaded: boolean;
409
+ hasPrompt: boolean;
410
+ }>;
411
+ };
412
+ metricsConfig?: object;
413
+ interface?: SerializedExecutionInterface;
414
+ }
415
+ /**
416
+ * Serialized workflow definition (JSON-safe)
417
+ * Result of serializeDefinition(WorkflowDefinition)
418
+ */
419
+ interface SerializedWorkflowDefinition {
420
+ config: {
421
+ resourceId: string;
422
+ name: string;
423
+ description: string;
424
+ version: string;
425
+ type: 'workflow';
426
+ status: 'dev' | 'prod';
427
+ /** Whether this resource is archived and should be excluded from registration and deployment */
428
+ archived?: boolean;
429
+ };
430
+ entryPoint: string;
431
+ steps: Array<{
432
+ id: string;
433
+ name: string;
434
+ description: string;
435
+ inputSchema?: object;
436
+ outputSchema?: object;
437
+ next: {
438
+ type: 'linear' | 'conditional';
439
+ target?: string;
440
+ routes?: Array<{
441
+ target: string;
442
+ }>;
443
+ default?: string;
444
+ } | null;
445
+ }>;
446
+ contract: {
447
+ inputSchema: object;
448
+ outputSchema?: object;
449
+ };
450
+ metricsConfig?: object;
451
+ interface?: SerializedExecutionInterface;
452
+ }
453
+
454
+ /**
455
+ * Model Configuration
456
+ * Centralized model information, configuration, options, constraints, and validation
457
+ * Single source of truth for all model-related definitions
458
+ * Update manually when pricing changes or new models are added
459
+ */
460
+
461
+ /**
462
+ * Supported Open AI models (direct SDK access)
463
+ */
464
+ type OpenAIModel = 'gpt-5' | 'gpt-5.4-mini' | 'gpt-5.4-nano';
465
+ /**
466
+ * Supported OpenRouter models (explicit union for type safety)
467
+ */
468
+ type OpenRouterModel = 'openrouter/z-ai/glm-5';
469
+ /**
470
+ * Supported Google models (direct SDK access)
471
+ */
472
+ type GoogleModel = 'gemini-3-flash-preview' | 'gemini-3.1-flash-lite-preview';
473
+ /**
474
+ * Supported Anthropic models (direct SDK access via @anthropic-ai/sdk)
475
+ */
476
+ type AnthropicModel = 'claude-sonnet-4-5';
477
+ /** Supported LLM models */
478
+ type LLMModel = OpenAIModel | OpenRouterModel | GoogleModel | AnthropicModel | 'mock';
479
+ /**
480
+ * GPT-5 model options schema
481
+ */
482
+ declare const GPT5OptionsSchema: z.ZodObject<{
483
+ reasoning_effort: z.ZodOptional<z.ZodEnum<{
484
+ minimal: "minimal";
485
+ low: "low";
486
+ medium: "medium";
487
+ high: "high";
488
+ }>>;
489
+ verbosity: z.ZodOptional<z.ZodEnum<{
490
+ low: "low";
491
+ medium: "medium";
492
+ high: "high";
493
+ }>>;
494
+ }, z.core.$strip>;
495
+ /**
496
+ * OpenRouter model options schema
497
+ * OpenRouter-specific options for routing and transforms
498
+ */
499
+ declare const OpenRouterOptionsSchema: z.ZodObject<{
500
+ transforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
501
+ route: z.ZodOptional<z.ZodEnum<{
502
+ fallback: "fallback";
503
+ }>>;
504
+ }, z.core.$strip>;
505
+ /**
506
+ * Google model options schema
507
+ * Gemini 3 specific options for thinking depth control
508
+ */
509
+ declare const GoogleOptionsSchema: z.ZodObject<{
510
+ thinkingLevel: z.ZodOptional<z.ZodEnum<{
511
+ minimal: "minimal";
512
+ low: "low";
513
+ medium: "medium";
514
+ high: "high";
515
+ }>>;
516
+ }, z.core.$strip>;
517
+ /**
518
+ * Anthropic model options schema
519
+ * Currently empty - future options: budget_tokens for extended thinking
520
+ */
521
+ declare const AnthropicOptionsSchema: z.ZodObject<{}, z.core.$strip>;
522
+ /**
523
+ * Infer TypeScript types from schemas
524
+ */
525
+ type GPT5Options = z.infer<typeof GPT5OptionsSchema>;
526
+ type MockOptions = Record<string, never>;
527
+ type OpenRouterOptions = z.infer<typeof OpenRouterOptionsSchema>;
528
+ type GoogleOptions = z.infer<typeof GoogleOptionsSchema>;
529
+ type AnthropicOptions = z.infer<typeof AnthropicOptionsSchema>;
530
+ type ModelSpecificOptions = GPT5Options | MockOptions | OpenRouterOptions | GoogleOptions | AnthropicOptions;
531
+ /**
532
+ * Model configuration for LLM execution
533
+ * Belongs in resource definition (AgentDefinition, WorkflowDefinition, etc.)
534
+ */
535
+ interface ModelConfig {
536
+ model: LLMModel;
537
+ provider: 'openai' | 'anthropic' | 'openrouter' | 'google' | 'mock';
538
+ apiKey: string;
539
+ temperature?: number;
540
+ /** Maximum output tokens per LLM call. NOT the model's context window — see ModelInfo.maxTokens for that. */
541
+ maxOutputTokens?: number;
542
+ topP?: number;
543
+ /**
544
+ * Model-specific options (flat structure)
545
+ * Options are model-specific, not vendor-specific
546
+ * Available options defined in MODEL_INFO per model
547
+ * Validated at build time via validateModelOptions()
548
+ */
549
+ modelOptions?: ModelSpecificOptions;
550
+ }
551
+
552
+ /**
553
+ * Execution interface configuration
554
+ * Defines how a resource is executed via the UI (forms, scheduling, webhooks)
555
+ * Applies to both agents and workflows
556
+ */
557
+ interface ExecutionInterface {
558
+ /** Form configuration for execution inputs */
559
+ form: ExecutionFormSchema;
560
+ /** Optional: Schedule configuration */
561
+ schedule?: ScheduleConfig;
562
+ /** Optional: Webhook trigger configuration */
563
+ webhook?: WebhookConfig;
564
+ }
565
+ /**
566
+ * Execution form schema
567
+ * Extends FormSchema with execution-specific fields
568
+ */
569
+ interface ExecutionFormSchema extends FormSchema {
570
+ /**
571
+ * Field mappings to resource input schema
572
+ * Maps form field names to contract input paths
573
+ * If omitted, field names must match contract input keys exactly
574
+ */
575
+ fieldMappings?: Record<string, string>;
576
+ /**
577
+ * Submit button configuration
578
+ * Default: { label: 'Run', loadingLabel: 'Running...' }
579
+ */
580
+ submitButton?: {
581
+ label?: string;
582
+ loadingLabel?: string;
583
+ confirmMessage?: string;
584
+ };
585
+ }
586
+ /**
587
+ * Schedule configuration for automated execution
588
+ */
589
+ interface ScheduleConfig {
590
+ /** Whether scheduling is enabled for this resource */
591
+ enabled: boolean;
592
+ /** Default schedule (cron expression) */
593
+ defaultSchedule?: string;
594
+ /** Allowed schedule patterns (if restricted) */
595
+ allowedPatterns?: string[];
596
+ }
597
+ /**
598
+ * Webhook configuration for external triggers
599
+ */
600
+ interface WebhookConfig {
601
+ /** Whether webhook trigger is enabled */
602
+ enabled: boolean;
603
+ /** Expected payload schema (for documentation) */
604
+ payloadSchema?: unknown;
605
+ }
606
+
607
+ interface WorkflowConfig extends ResourceDefinition {
608
+ type: 'workflow';
609
+ }
610
+ interface WorkflowStepDefinition {
611
+ id: string;
612
+ name: string;
613
+ description: string;
614
+ }
615
+ type StepHandler = (input: unknown, context: ExecutionContext) => Promise<unknown>;
616
+ interface LinearNext {
617
+ type: 'linear';
618
+ target: string;
619
+ }
620
+ interface ConditionalNext {
621
+ type: 'conditional';
622
+ routes: Array<{
623
+ condition: (data: unknown) => boolean;
624
+ target: string;
625
+ }>;
626
+ default: string;
627
+ }
628
+ type NextConfig = LinearNext | ConditionalNext | null;
629
+ interface WorkflowStep extends WorkflowStepDefinition {
630
+ handler: StepHandler;
631
+ inputSchema: z.ZodSchema;
632
+ outputSchema: z.ZodSchema;
633
+ next: NextConfig;
634
+ }
635
+ interface WorkflowDefinition {
636
+ config: WorkflowConfig;
637
+ contract: Contract;
638
+ steps: Record<string, WorkflowStep>;
639
+ entryPoint: string;
640
+ /**
641
+ * Metrics configuration for ROI calculations
642
+ * Optional: Only needed if tracking automation savings
643
+ */
644
+ metricsConfig?: ResourceMetricsConfig;
645
+ /**
646
+ * Execution interface configuration (optional)
647
+ * If provided, workflow appears in Execution Runner UI
648
+ */
649
+ interface?: ExecutionInterface;
650
+ }
651
+
652
+ /**
653
+ * Generic LLM Types
654
+ * Universal interfaces for LLM interaction across all resource types
655
+ */
656
+ /**
657
+ * Standard chat message format
658
+ * Compatible with OpenAI, Anthropic, and other providers
659
+ */
660
+ interface LLMMessage {
661
+ role: 'system' | 'user' | 'assistant';
662
+ content: string;
663
+ }
664
+ /**
665
+ * Generic LLM generation request
666
+ * Usable by agents, workflows, tools, etc.
667
+ */
668
+ interface LLMGenerateRequest {
669
+ messages: LLMMessage[];
670
+ responseSchema: unknown;
671
+ /** Maximum output tokens per LLM call. NOT the model's context window — see ModelInfo.maxTokens for that. */
672
+ maxOutputTokens?: number;
673
+ temperature?: number;
674
+ topP?: number;
675
+ signal?: AbortSignal;
676
+ }
677
+ /**
678
+ * Generic LLM generation response
679
+ * Usage field is internal-only (stripped by UniversalLLMAdapter wrapper)
680
+ */
681
+ interface LLMGenerateResponse<T = unknown> {
682
+ output: T;
683
+ usage?: {
684
+ inputTokens: number;
685
+ outputTokens: number;
686
+ totalTokens: number;
687
+ };
688
+ cost?: number;
689
+ }
690
+ /**
691
+ * LLM Adapter interface
692
+ * Generic primitive for all resource types (agents, workflows, tools)
693
+ *
694
+ * Design principles:
695
+ * - Single method: generate() - the core LLM primitive
696
+ * - Generic return type for type safety
697
+ * - Universal format (not agent-specific)
698
+ * - Standard message-based input (OpenAI-compatible)
699
+ */
700
+ interface LLMAdapter {
701
+ /**
702
+ * Generate structured output from prompt using LLM
703
+ *
704
+ * @param request - Generation request with messages and response schema
705
+ * @returns Generated output (typed) with optional usage metadata
706
+ */
707
+ generate<T = unknown>(request: LLMGenerateRequest): Promise<LLMGenerateResponse<T>>;
708
+ }
709
+
710
+ /**
711
+ * Memory type definitions
712
+ * Types for agent memory management with semantic entry types
713
+ */
714
+ /**
715
+ * Semantic memory entry types
716
+ * Use-case agnostic types that describe the purpose of each entry
717
+ * Memory types mirror action types for clarity and filtering
718
+ */
719
+ type MemoryEntryType = 'context' | 'input' | 'reasoning' | 'tool-result' | 'delegation-result' | 'error';
720
+ /**
721
+ * Memory entry - represents a single entry in agent memory
722
+ * Stored in agent memory, translated by adapters to vendor-specific formats
723
+ */
724
+ interface MemoryEntry {
725
+ type: MemoryEntryType;
726
+ content: string;
727
+ timestamp: number;
728
+ turnNumber: number | null;
729
+ iterationNumber: number | null;
730
+ }
731
+ /**
732
+ * Agent memory - Self-orchestrated memory with session + working storage
733
+ * Agent has full control over what persists, framework handles auto-compaction
734
+ */
735
+ interface AgentMemory {
736
+ /**
737
+ * Session memory - Persists for session/conversation duration
738
+ * Never auto-trimmed by framework
739
+ * Agent-managed key-value store for critical information
740
+ * Agent provides strings, framework wraps in MemoryEntry
741
+ */
742
+ sessionMemory: Record<string, MemoryEntry>;
743
+ /**
744
+ * Working memory - Execution history
745
+ * Automatically compacted by framework when needed
746
+ * Agent doesn't control compaction
747
+ */
748
+ history: MemoryEntry[];
749
+ }
750
+ /**
751
+ * Memory status for agent awareness
752
+ */
753
+ interface MemoryStatus {
754
+ sessionMemoryKeys: number;
755
+ sessionMemoryLimit: number;
756
+ currentKeys: string[];
757
+ historyPercent: number;
758
+ historyTokens: number;
759
+ tokenBudget: number;
760
+ }
761
+ /**
762
+ * Memory constraints (optional limits)
763
+ */
764
+ interface MemoryConstraints {
765
+ maxSessionMemoryKeys?: number;
766
+ maxMemoryTokens?: number;
767
+ }
768
+
769
+ /**
770
+ * Memory Manager
771
+ * Encapsulates all memory operations with ultra-simple agent API
772
+ * Agent provides strings, framework handles wrapping and auto-compaction
773
+ */
774
+
775
+ /**
776
+ * Memory Manager - Agent memory orchestration
777
+ * Provides ultra-simple API for agents (strings only)
778
+ * Handles automatic compaction and token management
779
+ */
780
+ declare class MemoryManager {
781
+ private memory;
782
+ private constraints;
783
+ private logger?;
784
+ private cachedSnapshot?;
785
+ constructor(memory: AgentMemory, constraints?: MemoryConstraints, logger?: AgentScopedLogger | undefined);
786
+ /**
787
+ * Set session memory entry (agent provides string, framework wraps it)
788
+ * @param key - Session memory key
789
+ * @param content - String content from agent
790
+ */
791
+ set(key: string, content: string): void;
792
+ /**
793
+ * Get session memory entry content
794
+ * @param key - Session memory key
795
+ * @returns String content if exists, undefined otherwise
796
+ */
797
+ get(key: string): string | undefined;
798
+ /**
799
+ * Delete session memory entry
800
+ * @param key - Key to delete
801
+ * @returns True if key existed and was deleted
802
+ */
803
+ delete(key: string): boolean;
804
+ /**
805
+ * Add entry to history (called by framework after tool results, reasoning, etc.)
806
+ * Automatically sets timestamp to current time
807
+ * @param entry - Memory entry to add (without timestamp - auto-generated)
808
+ */
809
+ addToHistory(entry: Omit<MemoryEntry, 'timestamp'>): void;
810
+ /**
811
+ * Auto-compact history if approaching token budget
812
+ * Uses preserve-anchors strategy: keep first + recent entries
813
+ */
814
+ autoCompact(): void;
815
+ /**
816
+ * Enforce hard limits (called before LLM request)
817
+ * Emergency fallback if agent exceeds limits
818
+ */
819
+ enforceHardLimits(): void;
820
+ /**
821
+ * Get history length (for logging and introspection)
822
+ * @returns Number of entries in history
823
+ */
824
+ getHistoryLength(): number;
825
+ /**
826
+ * Get memory status for agent awareness
827
+ * @returns Memory status with token usage and key counts
828
+ */
829
+ getStatus(): MemoryStatus;
830
+ /**
831
+ * Create memory snapshot for persistence
832
+ * Caches snapshot internally for later retrieval
833
+ * @returns Deep copy of current memory state
834
+ */
835
+ toSnapshot(): AgentMemory;
836
+ /**
837
+ * Get cached memory snapshot
838
+ * Returns snapshot created by toSnapshot()
839
+ * @returns Cached snapshot (undefined if toSnapshot() not called yet)
840
+ */
841
+ getSnapshot(): AgentMemory | undefined;
842
+ /**
843
+ * Build context string for LLM
844
+ * Serializes sessionmemory + history memory with clear sections
845
+ * Shows current iteration entries FIRST (reverse chronological) for LLM attention
846
+ * @param currentIteration - Current iteration number (0 = pre-iteration)
847
+ * @param currentTurn - Current turn number (optional, for session context filtering)
848
+ * @returns Formatted memory context for LLM prompt
849
+ */
850
+ toContext(currentIteration: number, currentTurn?: number): string;
851
+ }
852
+
853
+ /**
854
+ * Knowledge Map Types
855
+ *
856
+ * Enables agents to navigate organizational knowledge through a lightweight
857
+ * graph that lazy-loads capabilities on-demand.
858
+ *
859
+ * @module agent/knowledge-map
860
+ */
861
+
862
+ /**
863
+ * Lightweight knowledge map (passed as agent property)
864
+ *
865
+ * Contains metadata about available knowledge nodes without loading
866
+ * the full content upfront. Total size: ~300-500 tokens.
867
+ *
868
+ * Multi-tenancy is enforced via:
869
+ * - File-scoped maps (organizations/{org-name}/knowledge/)
870
+ * - ExecutionContext.organizationId passed to node.load()
871
+ */
872
+ interface KnowledgeMap {
873
+ /** Available knowledge nodes indexed by ID */
874
+ nodes: Record<string, KnowledgeNode>;
875
+ }
876
+ /**
877
+ * Single knowledge source
878
+ *
879
+ * Represents a domain knowledge area (CRM, brand guidelines, Excel tools)
880
+ * that can be lazy-loaded to provide instructions and tools to agents.
881
+ */
882
+ interface KnowledgeNode {
883
+ /** Unique identifier for this node (e.g., "crm", "brand-guidelines") */
884
+ id: string;
885
+ /**
886
+ * Description of when to use this knowledge
887
+ * Used for semantic matching against user intent
888
+ */
889
+ description: string;
890
+ /**
891
+ * Load knowledge content on-demand
892
+ *
893
+ * @param context - Execution context with organizationId for multi-tenancy
894
+ * @returns Promise resolving to knowledge content (prompt + optional tools)
895
+ */
896
+ load(context: ExecutionContext): Promise<KnowledgeContent>;
897
+ /**
898
+ * Loaded state flag
899
+ * Set to true after load() is called
900
+ */
901
+ loaded?: boolean;
902
+ /**
903
+ * Cached prompt (for system prompt serialization)
904
+ * Only the prompt is cached - tools go to toolRegistry, children flattened to nodes
905
+ */
906
+ prompt?: string;
907
+ }
908
+ /**
909
+ * Content returned by knowledge node
910
+ *
911
+ * Separates instructions (prompt) from capabilities (tools).
912
+ * Tools are optional - some nodes only provide context.
913
+ *
914
+ * Supports recursive navigation - nodes can contain child nodes
915
+ * that are discovered when the parent node is loaded.
916
+ */
917
+ interface KnowledgeContent {
918
+ /** Instructions and context (markdown format) */
919
+ prompt: string;
920
+ /** Tool implementations (optional) */
921
+ tools?: Tool[];
922
+ /**
923
+ * Child knowledge nodes (optional, recursive)
924
+ *
925
+ * Enables hierarchical navigation: base → specialized → deep expertise.
926
+ * Child nodes are flattened into the main knowledge map when parent loads,
927
+ * making them available for subsequent navigate-knowledge actions.
928
+ *
929
+ * Example: CRM base node returns crm-customers and crm-deals as children
930
+ */
931
+ nodes?: Record<string, KnowledgeNode>;
932
+ }
933
+
934
+ /**
935
+ * Agent-specific type definitions
936
+ * Types for autonomous agents with tools, memory, and constraints
937
+ */
938
+
939
+ /**
940
+ * Factory function for creating LLM adapters.
941
+ * Injected into the Agent class to decouple the engine from server-only provider SDKs.
942
+ * - API process: provides createLLMAdapter (real SDKs + process.env API keys)
943
+ * - SDK worker: provides PostMessageLLMAdapter (proxies via platform.call)
944
+ *
945
+ * Uses `any` for optional params so both the real createLLMAdapter (with typed
946
+ * AIUsageCollector/AICallContext) and the worker proxy (which ignores them) satisfy the type.
947
+ */
948
+ type LLMAdapterFactory = (config: ModelConfig, ...args: any[]) => LLMAdapter;
949
+ interface AgentConfig extends ResourceDefinition {
950
+ type: 'agent';
951
+ systemPrompt: string;
952
+ constraints?: AgentConstraints;
953
+ /**
954
+ * Session capability declaration (opt-in)
955
+ * If true, agent is designed for multi-turn session interactions
956
+ * Controls whether agent can use message action and appears in Sessions UI
957
+ *
958
+ * Use for:
959
+ * - Conversational agents with multi-turn interactions
960
+ * - Agents requiring persistent context across turns
961
+ * - Agents that need human-in-the-loop communication
962
+ */
963
+ sessionCapable?: boolean;
964
+ /**
965
+ * Security level for system prompt hardening (auto-derived if omitted)
966
+ *
967
+ * - 'standard': Lightweight defense (3 rules) - default for non-session agents
968
+ * - 'hardened': Comprehensive defense (6 rules) - default for session-capable agents
969
+ * - 'none': No security prompt - for pure internal agents with no external input
970
+ *
971
+ * If omitted, derived from sessionCapable:
972
+ * sessionCapable: true -> 'hardened'
973
+ * sessionCapable: false -> 'standard'
974
+ */
975
+ securityLevel?: 'standard' | 'hardened' | 'none';
976
+ /**
977
+ * Memory management preferences (opt-in)
978
+ * If provided, agent can use memoryOps to manage session memory
979
+ * If omitted, agent has no memory management capabilities
980
+ *
981
+ * Agent-specific guidance on what to preserve, when to persist, and what to clean up.
982
+ * This guidance is injected into the system prompt when memory management is enabled.
983
+ *
984
+ * Use for:
985
+ * - Conversational agents needing cross-turn context
986
+ * - Agents managing complex user preferences
987
+ * - Agents tracking decisions over multiple iterations
988
+ */
989
+ memoryPreferences?: string;
990
+ }
991
+ interface AgentConstraints {
992
+ maxIterations?: number;
993
+ timeout?: number;
994
+ maxSessionMemoryKeys?: number;
995
+ maxMemoryTokens?: number;
996
+ }
997
+ interface AgentDefinition {
998
+ config: AgentConfig;
999
+ contract: Contract;
1000
+ tools: Tool[];
1001
+ /**
1002
+ * Model configuration for LLM execution
1003
+ * Specifies provider, API key, and model-specific options
1004
+ */
1005
+ modelConfig: ModelConfig;
1006
+ /**
1007
+ * Optional knowledge map for lazy-loading capabilities
1008
+ * Enables agents to navigate organizational knowledge on-demand
1009
+ */
1010
+ knowledgeMap?: KnowledgeMap;
1011
+ /**
1012
+ * Preload memory before execution starts
1013
+ * Handles BOTH context loading AND session restoration
1014
+ *
1015
+ * @param context - Execution context (includes sessionId if session turn)
1016
+ * @returns Initial AgentMemory state (sessionMemory entries + optionally history)
1017
+ */
1018
+ preloadMemory?: (context: ExecutionContext) => Promise<AgentMemory> | AgentMemory;
1019
+ /**
1020
+ * Metrics configuration for ROI calculations
1021
+ * Optional: Only needed if tracking automation savings
1022
+ */
1023
+ metricsConfig?: ResourceMetricsConfig;
1024
+ /**
1025
+ * Execution interface configuration (optional)
1026
+ * If provided, agent appears in Execution Runner UI
1027
+ */
1028
+ interface?: ExecutionInterface;
1029
+ }
1030
+ /**
1031
+ * Agent execution context
1032
+ * Groups all state needed for agent execution phases
1033
+ */
1034
+ interface IterationContext {
1035
+ config: AgentConfig;
1036
+ contract: Contract;
1037
+ toolRegistry: Map<string, Tool>;
1038
+ memoryManager: MemoryManager;
1039
+ executionContext: ExecutionContext;
1040
+ iteration: number;
1041
+ logger: AgentScopedLogger;
1042
+ modelConfig: ModelConfig;
1043
+ adapterFactory: LLMAdapterFactory;
1044
+ knowledgeMap?: KnowledgeMap;
1045
+ }
1046
+
1047
+ /**
1048
+ * MetricsCollector
1049
+ * Tracks execution timing and ROI metrics
1050
+ */
1051
+ declare class MetricsCollector {
1052
+ private timings;
1053
+ private durationMs?;
1054
+ /**
1055
+ * Start a timer with a label
1056
+ */
1057
+ startTimer(label: string): void;
1058
+ /**
1059
+ * End a timer and calculate duration
1060
+ * If label is 'execution', stores duration for metrics summary
1061
+ */
1062
+ endTimer(label: string): number | null;
1063
+ /**
1064
+ * Build execution metrics summary with optional ROI calculation
1065
+ */
1066
+ buildExecutionMetrics(metricsConfig?: ResourceMetricsConfig): ExecutionMetricsSummary;
1067
+ }
1068
+
1069
+ interface BaseAICall {
1070
+ callSequence: number;
1071
+ callType: 'agent-reasoning' | 'agent-completion' | 'workflow-step' | 'tool' | 'other';
1072
+ model: LLMModel;
1073
+ inputTokens: number;
1074
+ outputTokens: number;
1075
+ costUsd: number;
1076
+ latencyMs: number;
1077
+ context?: AICallContext;
1078
+ }
1079
+ type AICallContext = AgentReasoningContext | AgentCompletionContext | WorkflowStepContext | ToolCallContext | OtherCallContext;
1080
+ interface AgentReasoningContext {
1081
+ type: 'agent-reasoning';
1082
+ iteration: number;
1083
+ actionsPlanned?: string[];
1084
+ sessionId?: string;
1085
+ turnNumber?: number;
1086
+ }
1087
+ interface AgentCompletionContext {
1088
+ type: 'agent-completion';
1089
+ attempt: 1 | 2;
1090
+ validationFailed?: boolean;
1091
+ sessionId?: string;
1092
+ turnNumber?: number;
1093
+ }
1094
+ interface WorkflowStepContext {
1095
+ type: 'workflow-step';
1096
+ stepId: string;
1097
+ stepName?: string;
1098
+ stepSequence?: number;
1099
+ }
1100
+ interface ToolCallContext {
1101
+ type: 'tool';
1102
+ toolName: string;
1103
+ parentIteration?: number;
1104
+ parentStepId?: string;
1105
+ }
1106
+ interface OtherCallContext {
1107
+ type: 'other';
1108
+ description?: string;
1109
+ metadata?: Record<string, unknown>;
1110
+ }
1111
+ type AICallRecord = BaseAICall;
1112
+ /**
1113
+ * Raw LLM usage data returned by adapters
1114
+ * Used as input to AIUsageCollector.record()
1115
+ */
1116
+ interface LLMUsageData {
1117
+ model: LLMModel;
1118
+ inputTokens: number;
1119
+ outputTokens: number;
1120
+ latencyMs: number;
1121
+ /** Actual cost from provider in USD (when available, e.g., OpenRouter) */
1122
+ cost?: number;
1123
+ }
1124
+ interface AIUsageSummary {
1125
+ model: LLMModel;
1126
+ totalInputTokens: number;
1127
+ totalOutputTokens: number;
1128
+ totalTokens: number;
1129
+ totalCostUsd: number;
1130
+ callCount: number;
1131
+ calls: AICallRecord[];
1132
+ }
1133
+ interface ExecutionMetricsSummary {
1134
+ durationMs?: number;
1135
+ automationSavingsUsd?: number;
1136
+ }
1137
+ interface ResourceMetricsConfig {
1138
+ estimatedManualMinutes: number;
1139
+ hourlyLaborRateUsd: number;
1140
+ confidenceLevel?: 'low' | 'medium' | 'high';
1141
+ notes?: string;
1142
+ }
1143
+ /**
1144
+ * Time range selector for dashboard metrics
1145
+ */
1146
+ type TimeRange = '1h' | '24h' | '7d' | '30d';
1147
+
1148
+ /**
1149
+ * AIUsageCollector
1150
+ * Centralized token tracking that aggregates usage across all LLM calls in an execution
1151
+ */
1152
+ declare class AIUsageCollector {
1153
+ private model;
1154
+ private calls;
1155
+ private callSequence;
1156
+ /**
1157
+ * Record a single AI call with usage metrics
1158
+ *
1159
+ * @param usage - Token usage and latency data from LLM adapter
1160
+ * @param callType - Type discriminator (agent-reasoning, tool, etc.)
1161
+ * @param context - Optional typed context specific to callType
1162
+ */
1163
+ record(usage: LLMUsageData, callType?: BaseAICall['callType'], context?: AICallContext): void;
1164
+ /**
1165
+ * Get aggregated summary of all AI calls
1166
+ */
1167
+ getSummary(): AIUsageSummary;
1168
+ /**
1169
+ * Check if any usage has been recorded
1170
+ */
1171
+ hasUsage(): boolean;
1172
+ }
1173
+
1174
+ /**
1175
+ * Base Execution Engine type definitions
1176
+ * Core types shared across all Execution Engine resources
1177
+ */
1178
+
1179
+ /**
1180
+ * Immutable execution metadata
1181
+ * Represents complete execution identity (who, what, when, where)
1182
+ * Shared across ExecutionContext and ExecutionLoggerContext to eliminate field duplication
1183
+ */
1184
+ interface ExecutionMetadata {
1185
+ executionId: string;
1186
+ organizationId: string;
1187
+ organizationName: string;
1188
+ resourceId: string;
1189
+ userId?: string;
1190
+ sessionId?: string;
1191
+ sessionTurnNumber?: number;
1192
+ }
1193
+ /**
1194
+ * Unified message event type - covers all message types in sessions
1195
+ * Replaces separate SessionTurnMessages and AgentActivityEvent mechanisms
1196
+ */
1197
+ /**
1198
+ * Structured action metadata attached to assistant messages.
1199
+ * Frontend reads this instead of parsing text prefixes.
1200
+ */
1201
+ type AssistantAction = {
1202
+ kind: 'navigate';
1203
+ path: string;
1204
+ reason: string;
1205
+ } | {
1206
+ kind: 'update_filters';
1207
+ timeRange: string | null;
1208
+ statusFilter: string | null;
1209
+ searchQuery: string | null;
1210
+ };
1211
+ type MessageEvent = {
1212
+ type: 'user_message';
1213
+ text: string;
1214
+ } | {
1215
+ type: 'assistant_message';
1216
+ text: string;
1217
+ _action?: AssistantAction;
1218
+ } | {
1219
+ type: 'agent:started';
1220
+ } | {
1221
+ type: 'agent:completed';
1222
+ } | {
1223
+ type: 'agent:error';
1224
+ error: string;
1225
+ } | {
1226
+ type: 'agent:reasoning';
1227
+ iteration: number;
1228
+ reasoning: string;
1229
+ } | {
1230
+ type: 'agent:tool_call';
1231
+ toolName: string;
1232
+ args: Record<string, unknown>;
1233
+ } | {
1234
+ type: 'agent:tool_result';
1235
+ toolName: string;
1236
+ success: boolean;
1237
+ result?: unknown;
1238
+ error?: string;
1239
+ };
1240
+ /**
1241
+ * Execution context for all resources
1242
+ * Unified callback replaces SessionTurnMessages (removed)
1243
+ */
1244
+ interface ExecutionContext extends ExecutionMetadata {
1245
+ logger: IExecutionLogger;
1246
+ signal?: AbortSignal;
1247
+ onMessageEvent?: (event: MessageEvent) => Promise<void>;
1248
+ /** Called per iteration to write heartbeat + check stall status. Non-fatal if it throws. */
1249
+ onHeartbeat?: () => Promise<void>;
1250
+ aiUsageCollector?: AIUsageCollector;
1251
+ metricsCollector?: MetricsCollector;
1252
+ parentExecutionId?: string;
1253
+ executionDepth: number;
1254
+ credentialName?: string;
1255
+ store: Map<string, unknown>;
1256
+ }
1257
+ interface Contract {
1258
+ inputSchema: z.ZodSchema;
1259
+ outputSchema?: z.ZodSchema;
1260
+ }
1261
+ /**
1262
+ * NOTE: AIResource interface has been removed and replaced with ResourceDefinition
1263
+ * from registry/types.ts. All resources (executable and non-executable) now extend
1264
+ * the unified ResourceDefinition base interface.
1265
+ *
1266
+ * AgentConfig and WorkflowConfig now extend ResourceDefinition directly.
1267
+ * See packages/core/src/registry/types.ts for the base interface definition.
1268
+ */
1269
+ type AIResourceDefinition = SerializedWorkflowDefinition | SerializedAgentDefinition;
1270
+
1271
+ /**
1272
+ * Tool definitions
1273
+ *
1274
+ * Tool interface used by agents and workflows.
1275
+ * Provides a universal interface for AI systems to interact with tools.
1276
+ */
1277
+
1278
+ /**
1279
+ * Options for tool execution
1280
+ * Provides named parameters for better API clarity and extensibility
1281
+ */
1282
+ interface ToolExecutionOptions {
1283
+ /** Tool input (validated against inputSchema before execution) */
1284
+ input: unknown;
1285
+ /** Execution context with multi-tenant isolation and observability (optional for simple tools, required for platform/integration tools) */
1286
+ executionContext?: ExecutionContext;
1287
+ /** Full iteration context for advanced tools (provides access to memoryManager, toolRegistry, logger, etc.) */
1288
+ iterationContext?: IterationContext;
1289
+ /** Abort signal for timeout/cancellation -- forward to fetch() calls for clean cancellation */
1290
+ signal?: AbortSignal;
1291
+ }
1292
+ /**
1293
+ * Tool interface for AI systems
1294
+ *
1295
+ * Used by:
1296
+ * - Agents: For agentic tool use (reasoning loop selects and executes tools)
1297
+ * - Workflows: For workflow step tool invocation (future)
1298
+ * - Platform tools: createApprovalTool(), createSchedulerTool()
1299
+ * - Integration tools: External API calls (Gmail, Slack, etc.)
1300
+ */
1301
+ interface Tool {
1302
+ name: string;
1303
+ description: string;
1304
+ inputSchema: z.ZodSchema;
1305
+ outputSchema: z.ZodSchema;
1306
+ execute: (options: ToolExecutionOptions) => Promise<unknown>;
1307
+ timeout?: number;
1308
+ }
1309
+
1310
+ /**
1311
+ * Resource Registry type definitions
1312
+ */
1313
+
1314
+ /**
1315
+ * Environment/deployment status for resources
1316
+ */
1317
+ type ResourceStatus = 'dev' | 'prod';
1318
+ /**
1319
+ * All resource types in the platform
1320
+ * Used as the discriminator field in ResourceDefinition
1321
+ */
1322
+ type ResourceType = 'agent' | 'workflow' | 'trigger' | 'integration' | 'external' | 'human';
1323
+ /**
1324
+ * Base interface for ALL platform resources
1325
+ * Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
1326
+ */
1327
+ interface ResourceDefinition {
1328
+ /** Unique resource identifier */
1329
+ resourceId: string;
1330
+ /** Display name */
1331
+ name: string;
1332
+ /** Purpose and functionality description */
1333
+ description: string;
1334
+ /** Version for change tracking and evolution */
1335
+ version: string;
1336
+ /** Resource type discriminator */
1337
+ type: ResourceType;
1338
+ /** Environment/deployment status */
1339
+ status: ResourceStatus;
1340
+ /** Domain tags for filtering and organization */
1341
+ domains?: ResourceDomain[];
1342
+ /** Whether the agent supports multi-turn sessions (agents only) */
1343
+ sessionCapable?: boolean;
1344
+ /** Whether the resource is local (monorepo) or remote (externally deployed) */
1345
+ origin?: 'local' | 'remote';
1346
+ /** Whether this resource is archived and should be excluded from registration and deployment */
1347
+ archived?: boolean;
1348
+ }
1349
+
1350
+ /**
1351
+ * Standard Domain Definitions
1352
+ * Centralized domain constants and definitions for all organization resources.
1353
+ */
1354
+
1355
+ declare const DOMAINS: {
1356
+ readonly INBOUND_PIPELINE: "inbound-pipeline";
1357
+ readonly LEAD_GEN_PIPELINE: "lead-gen-pipeline";
1358
+ readonly SUPPORT: "support";
1359
+ readonly CLIENT_SUPPORT: "client-support";
1360
+ readonly DELIVERY: "delivery";
1361
+ readonly OPERATIONS: "operations";
1362
+ readonly FINANCE: "finance";
1363
+ readonly EXECUTIVE: "executive";
1364
+ readonly INSTANTLY: "instantly";
1365
+ readonly TESTING: "testing";
1366
+ readonly INTERNAL: "internal";
1367
+ readonly INTEGRATION: "integration";
1368
+ readonly UTILITY: "utility";
1369
+ readonly DIAGNOSTIC: "diagnostic";
1370
+ };
1371
+ /**
1372
+ * ResourceDomain - Strongly typed domain identifier
1373
+ * Use this type for all domain references to ensure compile-time validation.
1374
+ */
1375
+ type ResourceDomain = (typeof DOMAINS)[keyof typeof DOMAINS];
1376
+
1377
+ /**
1378
+ * Calibration Lab Type Definitions
1379
+ * Core types for AI model configuration optimization with cost/performance comparison
1380
+ */
1381
+
1382
+ /**
1383
+ * Configuration variant for testing
1384
+ * Defines what to override in the base agent/workflow definition
1385
+ */
1386
+ interface ConfigVariant {
1387
+ variantName: string;
1388
+ definitionOverrides?: AgentCalibrationOverrides | WorkflowCalibrationOverrides;
1389
+ }
1390
+ /**
1391
+ * Agent definition overrides for calibration
1392
+ * Excludes identity/metadata fields that should not be modified
1393
+ */
1394
+ type AgentCalibrationOverrides = Omit<Partial<AgentDefinition>, 'config' | 'contract' | 'tools' | 'metricsConfig' | 'interface'>;
1395
+ /**
1396
+ * Workflow definition overrides for calibration
1397
+ * Excludes identity/metadata fields that should not be modified
1398
+ */
1399
+ type WorkflowCalibrationOverrides = Omit<Partial<WorkflowDefinition>, 'config' | 'contract' | 'steps' | 'entryPoint' | 'metricsConfig' | 'interface'>;
1400
+ /**
1401
+ * Grading rubric for LLM-as-judge evaluation
1402
+ * Defines criteria and passing threshold
1403
+ */
1404
+ interface GradingRubric {
1405
+ passingThreshold: number;
1406
+ criteria: GradingCriterion[];
1407
+ }
1408
+ /**
1409
+ * Individual grading criterion
1410
+ * Weight should be 0-1, and all weights should sum to 1
1411
+ */
1412
+ interface GradingCriterion {
1413
+ name: string;
1414
+ weight: number;
1415
+ description: string;
1416
+ scoringGuide: string;
1417
+ }
1418
+ /**
1419
+ * Grading result for a single execution or session
1420
+ * Contains overall score and per-criterion breakdown
1421
+ */
1422
+ interface GradeResult {
1423
+ score: number;
1424
+ passed: boolean;
1425
+ details: Record<string, {
1426
+ score: number;
1427
+ justification: string;
1428
+ }>;
1429
+ }
1430
+ /**
1431
+ * Single-turn calibration result
1432
+ * One result per (variant × input) combination
1433
+ */
1434
+ interface SingleCalibrationResult {
1435
+ executionId: string;
1436
+ variantName: string;
1437
+ inputIndex: number;
1438
+ appliedOverrides?: AgentCalibrationOverrides | WorkflowCalibrationOverrides;
1439
+ status: 'pending' | 'running' | 'completed' | 'failed';
1440
+ errorMessage?: string;
1441
+ grade?: GradeResult;
1442
+ gradeError?: string;
1443
+ }
1444
+ /**
1445
+ * Multi-turn session calibration result
1446
+ * Leverages existing sessions infrastructure
1447
+ */
1448
+ interface SessionCalibrationResult {
1449
+ sessionId: string;
1450
+ variantName: string;
1451
+ appliedOverrides?: AgentCalibrationOverrides | WorkflowCalibrationOverrides;
1452
+ status: 'pending' | 'running' | 'completed' | 'failed';
1453
+ errorMessage?: string;
1454
+ turnCount: number;
1455
+ grade?: GradeResult;
1456
+ gradeError?: string;
1457
+ }
1458
+ /**
1459
+ * Calibration run - individual test execution within a project
1460
+ * Contains configuration, results, and grading information
1461
+ */
1462
+ interface CalibrationRun {
1463
+ id: string;
1464
+ organizationId: string;
1465
+ projectId: string;
1466
+ name: string;
1467
+ description?: string | null;
1468
+ executionMode: 'single' | 'session';
1469
+ testInputs: unknown[];
1470
+ configVariants: ConfigVariant[];
1471
+ gradingRubric?: GradingRubric | null;
1472
+ graderModel?: string | null;
1473
+ results: (SingleCalibrationResult | SessionCalibrationResult)[];
1474
+ status: 'pending' | 'running' | 'completed' | 'partial' | 'failed';
1475
+ createdAt: Date;
1476
+ completedAt?: Date | null;
1477
+ }
1478
+
1479
+ interface ResourcesPageProps {
1480
+ /** Initial filter type from the URL search param (caller-managed) */
1481
+ initialFilter?: ResourceType;
1482
+ /** Called when the user changes the tab filter — caller should update its URL */
1483
+ onTypeChange: (type: ResourceType | undefined) => void;
1484
+ /** Current time range value — caller passes from its own store */
1485
+ timeRange: TimeRange;
1486
+ /** Called when the user clicks a resource row — caller handles navigation */
1487
+ onResourceClick: (resource: ResourceDefinition) => void;
1488
+ /** Items per page (defaults to 20) */
1489
+ pageSize?: number;
1490
+ }
1491
+ declare function ResourcesPage({ initialFilter, onTypeChange, timeRange, onResourceClick, pageSize }: ResourcesPageProps): react_jsx_runtime.JSX.Element;
1492
+
1493
+ interface ResourcesSidebarProps {
1494
+ timeRange: TimeRange;
1495
+ }
1496
+ /**
1497
+ * Resources sidebar - shows execution health donut, domain filters and search
1498
+ */
1499
+ declare function ResourcesSidebar({ timeRange }: ResourcesSidebarProps): react_jsx_runtime.JSX.Element;
1500
+
1501
+ interface ResourceDetailPageRenderExecutionPanelArgs {
1502
+ resourceId: string;
1503
+ resourceType: ResourceType;
1504
+ resourceName: string;
1505
+ resourceDefinition: AIResourceDefinition;
1506
+ onConnectionStatus: (connected: boolean, count: number) => void;
1507
+ }
1508
+ interface ResourceDetailPageProps {
1509
+ /** Resource type (workflow, agent, etc.) */
1510
+ type: ResourceType;
1511
+ /** Resource identifier */
1512
+ resourceId: string;
1513
+ /** Current time range value — caller passes from its own store */
1514
+ timeRange: TimeRange;
1515
+ /**
1516
+ * Render-prop slot for the consumer's ExecutionPanel. The shared layout owns connection
1517
+ * state and passes it to the slot via `onConnectionStatus`. The resolved
1518
+ * `resourceDefinition` is threaded through so the execution panel does not refetch.
1519
+ */
1520
+ renderExecutionPanel: (args: ResourceDetailPageRenderExecutionPanelArgs) => ReactNode;
1521
+ }
1522
+ declare function ResourceDetailPage({ type, resourceId, timeRange, renderExecutionPanel }: ResourceDetailPageProps): react_jsx_runtime.JSX.Element;
1523
+
1524
+ interface EventSourceMessage {
1525
+ id: string;
1526
+ event: string;
1527
+ data: string;
1528
+ retry?: number;
1529
+ }
1530
+
1531
+ interface FetchEventSourceWithTokenRefreshOptions {
1532
+ url: string;
1533
+ getToken: () => Promise<string | undefined>;
1534
+ headers?: Record<string, string>;
1535
+ signal: AbortSignal;
1536
+ /** Delay in ms before reconnecting after token refresh. Defaults to 2000. */
1537
+ tokenRefreshDelayMs?: number;
1538
+ onopen?: (response: Response) => void | Promise<void>;
1539
+ onmessage?: (event: EventSourceMessage) => void;
1540
+ onerror?: (error: unknown) => void;
1541
+ onclose?: () => void;
1542
+ }
1543
+
1544
+ interface SSEConnectionManagerOptions {
1545
+ /** Grace period in ms before closing idle connections. Defaults to 5000. */
1546
+ closeGracePeriodMs?: number;
1547
+ }
1548
+ /**
1549
+ * SSE Connection Manager
1550
+ *
1551
+ * Ensures only ONE SSE connection exists per endpoint, preventing duplicate
1552
+ * connections when components re-render or remount.
1553
+ *
1554
+ * Benefits:
1555
+ * - Prevents resource waste from duplicate connections
1556
+ * - Eliminates race conditions from overlapping connections
1557
+ * - Automatically manages connection lifecycle
1558
+ * - Shares single connection across multiple subscribers
1559
+ */
1560
+ declare class SSEConnectionManager {
1561
+ private connections;
1562
+ private closeGracePeriodMs;
1563
+ constructor(options?: SSEConnectionManagerOptions);
1564
+ /**
1565
+ * Subscribe to an SSE endpoint
1566
+ *
1567
+ * If a connection already exists for this endpoint, reuses it.
1568
+ * Otherwise, creates a new connection.
1569
+ *
1570
+ * @param key - Unique identifier for the connection (e.g., 'notifications', 'resource-executive-agent')
1571
+ * @param subscriberId - Unique identifier for this subscriber (usually component instance)
1572
+ * @param options - SSE connection options
1573
+ * @returns Unsubscribe function to call when component unmounts
1574
+ */
1575
+ subscribe(key: string, subscriberId: string, options: Omit<FetchEventSourceWithTokenRefreshOptions, 'signal'>): () => void;
1576
+ /**
1577
+ * Unsubscribe from an SSE endpoint
1578
+ *
1579
+ * If this is the last subscriber, closes the connection after grace period.
1580
+ */
1581
+ private unsubscribe;
1582
+ /**
1583
+ * Force close a connection and all its subscribers
1584
+ */
1585
+ closeConnection(key: string): void;
1586
+ /**
1587
+ * Get current connection status
1588
+ */
1589
+ getConnectionInfo(): Map<string, {
1590
+ url: string;
1591
+ subscribers: number;
1592
+ }>;
1593
+ }
1594
+
1595
+ type TaskFilterStatus = 'all' | 'pending' | 'completed' | 'expired';
1596
+
1597
+ interface CommandQueuePageProps {
1598
+ timeRange: TimeRange;
1599
+ pageSize?: number;
1600
+ onNavigateToTask: (taskId: string) => void;
1601
+ /** Filter props forwarded from the sidebar */
1602
+ selectedCheckpoint?: string;
1603
+ status?: TaskFilterStatus;
1604
+ priorityRange?: [number, number];
1605
+ }
1606
+ declare function CommandQueuePage({ timeRange, pageSize, onNavigateToTask, selectedCheckpoint, status, priorityRange }: CommandQueuePageProps): react_jsx_runtime.JSX.Element;
1607
+
1608
+ interface CommandQueueDetailPageRichTextArgs {
1609
+ content: string;
1610
+ onChange: (content: string) => void;
1611
+ placeholder?: string;
1612
+ }
1613
+ interface CommandQueueDetailPageProps {
1614
+ taskId: string;
1615
+ orgName: string;
1616
+ renderRichText?: (args: CommandQueueDetailPageRichTextArgs) => ReactNode;
1617
+ onNavigateToTask: (taskId: string) => void;
1618
+ onNavigateBack: () => void;
1619
+ onViewExecution: (type: string, resourceId: string, executionId: string) => void;
1620
+ }
1621
+ declare function CommandQueueDetailPage({ taskId, orgName, renderRichText, onNavigateBack, onViewExecution }: CommandQueueDetailPageProps): react_jsx_runtime.JSX.Element;
1622
+
1623
+ interface CommandViewPageProps {
1624
+ timeRange: TimeRange;
1625
+ }
1626
+ declare function CommandViewPage({ timeRange }: CommandViewPageProps): react_jsx_runtime.JSX.Element;
1627
+
1628
+ interface CalibrationPageProps {
1629
+ /** The resource this calibration tab is embedded within */
1630
+ resourceId: string;
1631
+ resourceType: 'agent' | 'workflow';
1632
+ /** Called when the user clicks a project card. Caller handles navigation. */
1633
+ onProjectNavigate: (projectId: string) => void;
1634
+ }
1635
+ declare function CalibrationPage({ resourceId, resourceType, onProjectNavigate }: CalibrationPageProps): react_jsx_runtime.JSX.Element;
1636
+
1637
+ interface CalibrationProjectDetailPageRenderRunCardArgs {
1638
+ run: CalibrationRun;
1639
+ projectId: string;
1640
+ }
1641
+ interface CalibrationProjectDetailPageRenderCreateModalArgs {
1642
+ opened: boolean;
1643
+ onClose: () => void;
1644
+ projectId: string;
1645
+ }
1646
+ interface CalibrationProjectDetailPageProps {
1647
+ /** ID of the calibration project to display */
1648
+ projectId: string;
1649
+ /** Root path for the calibration section, e.g. '/operations/calibration' */
1650
+ calibrationRootPath: string;
1651
+ /**
1652
+ * Called when the organization changes while viewing this page.
1653
+ * The CC wrapper navigates back to the calibration root on org switch.
1654
+ */
1655
+ onOrgChange?: () => void;
1656
+ /**
1657
+ * Render-prop slot for a single run card.
1658
+ * Required because CalibrationRunCard has CC-local hook dependencies
1659
+ * (useDeleteRun, useExecuteRun) that cannot be co-extracted yet.
1660
+ */
1661
+ renderRunCard: (args: CalibrationProjectDetailPageRenderRunCardArgs) => ReactNode;
1662
+ /**
1663
+ * Render-prop slot for the create run modal.
1664
+ * Required because CreateRunModal has CC-local hook dependencies
1665
+ * (useCreateRun) that cannot be co-extracted yet.
1666
+ */
1667
+ renderCreateModal: (args: CalibrationProjectDetailPageRenderCreateModalArgs) => ReactNode;
1668
+ /**
1669
+ * Runs array to display. Kept in CC because useCalibrationRuns is deferred
1670
+ * to batch 3 extraction. Pass `undefined` while loading.
1671
+ */
1672
+ runs: CalibrationRun[] | undefined;
1673
+ /** Whether the runs data is still loading */
1674
+ runsLoading: boolean;
1675
+ }
1676
+ declare function CalibrationProjectDetailPage({ projectId, calibrationRootPath, renderRunCard, renderCreateModal, runs, runsLoading }: CalibrationProjectDetailPageProps): react_jsx_runtime.JSX.Element | null;
1677
+
1678
+ interface CalibrationProjectsPageProps {
1679
+ /** Called when the user clicks a project card. Caller handles navigation. */
1680
+ onNavigateToProject: (projectId: string) => void;
1681
+ }
1682
+ /**
1683
+ * Main Calibration Lab landing page
1684
+ * Shows all calibration projects across the organization
1685
+ */
1686
+ declare function CalibrationProjectsPage({ onNavigateToProject }: CalibrationProjectsPageProps): react_jsx_runtime.JSX.Element;
1687
+
1688
+ interface CommandViewSidebarContentProps {
1689
+ /** Current time range value — caller passes from its own store (e.g. useAppStore) */
1690
+ timeRange: TimeRange;
1691
+ }
1692
+ /**
1693
+ * Contextual sidebar for the Command View page.
1694
+ * Shown in the shared Operations subshell sidebar when on /operations/command-view.
1695
+ *
1696
+ * Contains:
1697
+ * - Execution health donut chart (filtered by domain + status)
1698
+ * - Environment filter (All/Prod/Dev)
1699
+ * - Show integrations toggle
1700
+ * - Domain filters (collapsible)
1701
+ * - Settings (fit view on filter)
1702
+ * - Selected node details + executions/tasks (lazy loaded)
1703
+ */
1704
+ declare function CommandViewSidebarContent({ timeRange }: CommandViewSidebarContentProps): react_jsx_runtime.JSX.Element;
1705
+
1706
+ interface CalibrationRunDetailPageProps {
1707
+ /** ID of the calibration run to display */
1708
+ runId: string;
1709
+ /** Root path for the calibration section, e.g. '/operations/calibration' */
1710
+ calibrationRootPath: string;
1711
+ /**
1712
+ * Called when the user clicks the back-to-project button.
1713
+ * Receives the project ID to navigate to.
1714
+ */
1715
+ onNavigateToProject: (projectId: string) => void;
1716
+ /**
1717
+ * Called when the organization changes while viewing this page.
1718
+ * The CC wrapper should navigate back to the calibration root on org switch.
1719
+ */
1720
+ onOrgChange?: () => void;
1721
+ /**
1722
+ * Render-prop slot for the session comparison panel.
1723
+ * Required because SessionComparison has CC-local hook dependencies
1724
+ * (useSessionMessages, ChatInterface from @/shared/components/chat).
1725
+ */
1726
+ renderSessionComparison?: (args: {
1727
+ run: CalibrationRun;
1728
+ }) => ReactNode;
1729
+ /**
1730
+ * Render-prop slot for the live progress panel shown during execution.
1731
+ * Required because CalibrationProgress uses CC-local useCalibrationSSE.
1732
+ */
1733
+ renderProgressPanel?: (args: {
1734
+ runId: string;
1735
+ }) => ReactNode;
1736
+ }
1737
+ declare function CalibrationRunDetailPage({ runId, onNavigateToProject, renderSessionComparison, renderProgressPanel }: CalibrationRunDetailPageProps): react_jsx_runtime.JSX.Element | null;
1738
+
1739
+ interface ExecutionPanelProps {
1740
+ resourceId: string;
1741
+ resourceType: ResourceType;
1742
+ resourceName?: string;
1743
+ resourceDefinition: AIResourceDefinition;
1744
+ sseManager: SSEConnectionManager;
1745
+ apiUrl: string;
1746
+ onConnectionStatus?: (connected: boolean, runningCount: number) => void;
1747
+ }
1748
+ declare function ExecutionPanel({ resourceId, resourceType, resourceName, resourceDefinition, sseManager, apiUrl, onConnectionStatus }: ExecutionPanelProps): react_jsx_runtime.JSX.Element;
1749
+
1750
+ interface WorkflowExecutionPanelProps {
1751
+ resourceId: string;
1752
+ resourceName?: string;
1753
+ resourceDefinition: SerializedWorkflowDefinition;
1754
+ sseManager: SSEConnectionManager;
1755
+ apiUrl: string;
1756
+ onConnectionStatus?: (connected: boolean, runningCount: number) => void;
1757
+ }
1758
+ declare function WorkflowExecutionPanel({ resourceId, resourceDefinition, sseManager, apiUrl, onConnectionStatus }: WorkflowExecutionPanelProps): react_jsx_runtime.JSX.Element;
1759
+
1760
+ interface AgentExecutionPanelProps {
1761
+ resourceId: string;
1762
+ resourceName?: string;
1763
+ resourceDefinition: SerializedAgentDefinition;
1764
+ sseManager: SSEConnectionManager;
1765
+ apiUrl: string;
1766
+ onConnectionStatus?: (connected: boolean, runningCount: number) => void;
1767
+ }
1768
+ declare function AgentExecutionPanel({ resourceId, resourceDefinition, sseManager, apiUrl, onConnectionStatus }: AgentExecutionPanelProps): react_jsx_runtime.JSX.Element;
1769
+
1770
+ export { AgentExecutionPanel, CalibrationPage, CalibrationProjectDetailPage, CalibrationProjectsPage, CalibrationRunDetailPage, CommandQueueDetailPage, CommandQueuePage, CommandViewPage, CommandViewSidebarContent, ExecutionPanel, ResourceDetailPage, ResourcesPage, ResourcesSidebar, WorkflowExecutionPanel };
1771
+ export type { AgentExecutionPanelProps, CalibrationPageProps, CalibrationProjectDetailPageProps, CalibrationProjectDetailPageRenderCreateModalArgs, CalibrationProjectDetailPageRenderRunCardArgs, CalibrationProjectsPageProps, CalibrationRunDetailPageProps, CommandQueueDetailPageProps, CommandQueueDetailPageRichTextArgs, CommandQueuePageProps, CommandViewPageProps, CommandViewSidebarContentProps, ExecutionPanelProps, ResourceDetailPageProps, ResourceDetailPageRenderExecutionPanelArgs, ResourcesPageProps, ResourcesSidebarProps, WorkflowExecutionPanelProps };