@elevasis/ui 1.3.0 → 1.3.2

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 (279) hide show
  1. package/dist/CoreAuthKitInner-3J4RVQO6.js +43 -0
  2. package/dist/api/index.d.ts +7 -31
  3. package/dist/api/index.js +3 -2
  4. package/dist/auth/context.d.ts +23 -5
  5. package/dist/auth/guards/AdminGuard.d.ts +32 -0
  6. package/dist/auth/guards/AdminGuard.d.ts.map +1 -0
  7. package/dist/auth/guards/ProtectedRoute.d.ts +60 -0
  8. package/dist/auth/guards/ProtectedRoute.d.ts.map +1 -0
  9. package/dist/auth/guards/__tests__/AdminGuard.test.d.ts +12 -0
  10. package/dist/auth/guards/__tests__/AdminGuard.test.d.ts.map +1 -0
  11. package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts +14 -0
  12. package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts.map +1 -0
  13. package/dist/auth/index.d.ts +14 -171
  14. package/dist/auth/index.d.ts.map +1 -0
  15. package/dist/auth/index.js +5 -6
  16. package/dist/{chunk-FDCVFCOQ.js → chunk-2JBWPFHF.js} +23 -20
  17. package/dist/{chunk-BZTA7IIL.js → chunk-6IX5JZEH.js} +358 -4
  18. package/dist/chunk-FWZJH3TL.js +13 -0
  19. package/dist/chunk-GIFAF5ZS.js +313 -0
  20. package/dist/chunk-JGJSZ3UE.js +47 -0
  21. package/dist/chunk-JQLT6HBI.js +850 -0
  22. package/dist/{chunk-4KAG5U7A.js → chunk-L2CM2CUA.js} +0 -2
  23. package/dist/chunk-LFYO3MDC.js +58 -0
  24. package/dist/{chunk-OLD3NQLI.js → chunk-LTQAAIGE.js} +13 -17
  25. package/dist/{chunk-QQOLC46E.js → chunk-NEK6JKPW.js} +1 -1
  26. package/dist/{chunk-SITSZUFW.js → chunk-PVVQTENF.js} +1 -1
  27. package/dist/{chunk-FLJXZ7YC.js → chunk-SFF5MJEI.js} +2 -4
  28. package/dist/{chunk-EZMRFWZQ.js → chunk-U34YGJQB.js} +2 -94
  29. package/dist/{chunk-BWCC6ZJC.js → chunk-XLV6LYN2.js} +15 -60
  30. package/dist/components/index.d.ts +1 -1353
  31. package/dist/components/index.js +1 -20
  32. package/dist/components/navigation/index.d.ts +2 -32
  33. package/dist/components/navigation/index.js +1 -29
  34. package/dist/execution/index.d.ts +63 -231
  35. package/dist/execution/index.js +1 -4
  36. package/dist/graph/index.css +0 -1
  37. package/dist/graph/index.d.ts +4 -203
  38. package/dist/graph/index.js +1 -1
  39. package/dist/hooks/command-queue/index.d.ts +7 -0
  40. package/dist/hooks/command-queue/index.d.ts.map +1 -0
  41. package/dist/hooks/command-queue/useCommandQueue.d.ts +33 -0
  42. package/dist/hooks/command-queue/useCommandQueue.d.ts.map +1 -0
  43. package/dist/hooks/command-queue/useCommandQueueTotals.d.ts +17 -0
  44. package/dist/hooks/command-queue/useCommandQueueTotals.d.ts.map +1 -0
  45. package/dist/hooks/command-queue/useDeleteTask.d.ts +5 -0
  46. package/dist/hooks/command-queue/useDeleteTask.d.ts.map +1 -0
  47. package/dist/hooks/command-queue/usePatchTask.d.ts +6 -0
  48. package/dist/hooks/command-queue/usePatchTask.d.ts.map +1 -0
  49. package/dist/hooks/command-queue/useSubmitAction.d.ts +29 -0
  50. package/dist/hooks/command-queue/useSubmitAction.d.ts.map +1 -0
  51. package/dist/hooks/executions/index.d.ts +16 -0
  52. package/dist/hooks/executions/index.d.ts.map +1 -0
  53. package/dist/hooks/executions/useBulkDeleteExecutions.d.ts +15 -0
  54. package/dist/hooks/executions/useBulkDeleteExecutions.d.ts.map +1 -0
  55. package/dist/hooks/executions/useCancelExecution.d.ts +20 -0
  56. package/dist/hooks/executions/useCancelExecution.d.ts.map +1 -0
  57. package/dist/hooks/executions/useDeleteExecution.d.ts +13 -0
  58. package/dist/hooks/executions/useDeleteExecution.d.ts.map +1 -0
  59. package/dist/hooks/executions/useExecuteAsync.d.ts +21 -0
  60. package/dist/hooks/executions/useExecuteAsync.d.ts.map +1 -0
  61. package/dist/hooks/executions/useExecution.d.ts +10 -0
  62. package/dist/hooks/executions/useExecution.d.ts.map +1 -0
  63. package/dist/hooks/executions/useExecutions.d.ts +16 -0
  64. package/dist/hooks/executions/useExecutions.d.ts.map +1 -0
  65. package/dist/hooks/executions/useResourceDefinition.d.ts +9 -0
  66. package/dist/hooks/executions/useResourceDefinition.d.ts.map +1 -0
  67. package/dist/hooks/executions/useResources.d.ts +15 -0
  68. package/dist/hooks/executions/useResources.d.ts.map +1 -0
  69. package/dist/hooks/executions/useRetryExecution.d.ts +16 -0
  70. package/dist/hooks/executions/useRetryExecution.d.ts.map +1 -0
  71. package/dist/hooks/feature-access/createUseFeatureAccess.d.ts +44 -0
  72. package/dist/hooks/feature-access/createUseFeatureAccess.d.ts.map +1 -0
  73. package/dist/hooks/feature-access/index.d.ts +2 -0
  74. package/dist/hooks/feature-access/index.d.ts.map +1 -0
  75. package/dist/hooks/index.d.ts +11 -1927
  76. package/dist/hooks/index.d.ts.map +1 -0
  77. package/dist/hooks/index.js +5 -4
  78. package/dist/hooks/monitoring/index.d.ts +9 -0
  79. package/dist/hooks/monitoring/index.d.ts.map +1 -0
  80. package/dist/hooks/monitoring/useActivities.d.ts +52 -0
  81. package/dist/hooks/monitoring/useActivities.d.ts.map +1 -0
  82. package/dist/hooks/monitoring/useCostSummary.d.ts +7 -0
  83. package/dist/hooks/monitoring/useCostSummary.d.ts.map +1 -0
  84. package/dist/hooks/monitoring/useExecutionHealth.d.ts +10 -0
  85. package/dist/hooks/monitoring/useExecutionHealth.d.ts.map +1 -0
  86. package/dist/hooks/monitoring/useExecutionLogs.d.ts +56 -0
  87. package/dist/hooks/monitoring/useExecutionLogs.d.ts.map +1 -0
  88. package/dist/hooks/monitoring/useNotifications.d.ts +11 -0
  89. package/dist/hooks/monitoring/useNotifications.d.ts.map +1 -0
  90. package/dist/hooks/notifications/index.d.ts +8 -0
  91. package/dist/hooks/notifications/index.d.ts.map +1 -0
  92. package/dist/hooks/notifications/useMarkAllAsRead.d.ts +2 -0
  93. package/dist/hooks/notifications/useMarkAllAsRead.d.ts.map +1 -0
  94. package/dist/hooks/notifications/useMarkAsRead.d.ts +2 -0
  95. package/dist/hooks/notifications/useMarkAsRead.d.ts.map +1 -0
  96. package/dist/hooks/notifications/useNotificationCount.d.ts +8 -0
  97. package/dist/hooks/notifications/useNotificationCount.d.ts.map +1 -0
  98. package/dist/hooks/observability/index.d.ts +19 -0
  99. package/dist/hooks/observability/index.d.ts.map +1 -0
  100. package/dist/hooks/observability/useBusinessImpact.d.ts +9 -0
  101. package/dist/hooks/observability/useBusinessImpact.d.ts.map +1 -0
  102. package/dist/hooks/observability/useCostBreakdown.d.ts +10 -0
  103. package/dist/hooks/observability/useCostBreakdown.d.ts.map +1 -0
  104. package/dist/hooks/observability/useCostByModel.d.ts +3 -0
  105. package/dist/hooks/observability/useCostByModel.d.ts.map +1 -0
  106. package/dist/hooks/observability/useCostTrends.d.ts +3 -0
  107. package/dist/hooks/observability/useCostTrends.d.ts.map +1 -0
  108. package/dist/hooks/observability/useDashboardMetrics.d.ts +3 -0
  109. package/dist/hooks/observability/useDashboardMetrics.d.ts.map +1 -0
  110. package/dist/hooks/observability/useErrorAnalysis.d.ts +7 -0
  111. package/dist/hooks/observability/useErrorAnalysis.d.ts.map +1 -0
  112. package/dist/hooks/observability/useErrorDetails.d.ts +20 -0
  113. package/dist/hooks/observability/useErrorDetails.d.ts.map +1 -0
  114. package/dist/hooks/observability/useErrorDistribution.d.ts +12 -0
  115. package/dist/hooks/observability/useErrorDistribution.d.ts.map +1 -0
  116. package/dist/hooks/observability/useErrorTrends.d.ts +12 -0
  117. package/dist/hooks/observability/useErrorTrends.d.ts.map +1 -0
  118. package/dist/hooks/observability/useResolveError.d.ts +17 -0
  119. package/dist/hooks/observability/useResolveError.d.ts.map +1 -0
  120. package/dist/hooks/observability/useTopFailingResources.d.ts +13 -0
  121. package/dist/hooks/observability/useTopFailingResources.d.ts.map +1 -0
  122. package/dist/hooks/published.d.ts +19 -1652
  123. package/dist/hooks/published.d.ts.map +1 -0
  124. package/dist/hooks/published.js +369 -3
  125. package/dist/hooks/scheduling/index.d.ts +5 -0
  126. package/dist/hooks/scheduling/index.d.ts.map +1 -0
  127. package/dist/hooks/scheduling/useSchedules.d.ts +185 -0
  128. package/dist/hooks/scheduling/useSchedules.d.ts.map +1 -0
  129. package/dist/hooks/sessions/index.d.ts +8 -0
  130. package/dist/hooks/sessions/index.d.ts.map +1 -0
  131. package/dist/hooks/sessions/useSessionExecutions.d.ts +13 -0
  132. package/dist/hooks/sessions/useSessionExecutions.d.ts.map +1 -0
  133. package/dist/hooks/sessions/useSessionMessages.d.ts +7 -0
  134. package/dist/hooks/sessions/useSessionMessages.d.ts.map +1 -0
  135. package/dist/hooks/sessions/useSessions.d.ts +26 -0
  136. package/dist/hooks/sessions/useSessions.d.ts.map +1 -0
  137. package/dist/index.css +0 -118
  138. package/dist/index.d.ts +15 -7624
  139. package/dist/index.d.ts.map +1 -0
  140. package/dist/index.js +1125 -30
  141. package/dist/initialization/InitializationProvider.d.ts +48 -0
  142. package/dist/initialization/InitializationProvider.d.ts.map +1 -0
  143. package/dist/initialization/hooks/useAppInitialization.d.ts +32 -0
  144. package/dist/initialization/hooks/useAppInitialization.d.ts.map +1 -0
  145. package/dist/initialization/index.d.ts +22 -2361
  146. package/dist/initialization/index.d.ts.map +1 -0
  147. package/dist/initialization/index.js +4 -4
  148. package/dist/organization/context/OrganizationProvider.d.ts +20 -0
  149. package/dist/organization/context/OrganizationProvider.d.ts.map +1 -0
  150. package/dist/organization/hooks/useOrgInitialization.d.ts +56 -0
  151. package/dist/organization/hooks/useOrgInitialization.d.ts.map +1 -0
  152. package/dist/organization/index.d.ts +21 -283
  153. package/dist/organization/index.d.ts.map +1 -0
  154. package/dist/organization/index.js +4 -4
  155. package/dist/profile/context/ProfileProvider.d.ts +27 -0
  156. package/dist/profile/context/ProfileProvider.d.ts.map +1 -0
  157. package/dist/profile/hooks/useUserProfile.d.ts +31 -0
  158. package/dist/profile/hooks/useUserProfile.d.ts.map +1 -0
  159. package/dist/profile/index.d.ts +14 -2290
  160. package/dist/profile/index.d.ts.map +1 -0
  161. package/dist/profile/index.js +1 -1
  162. package/dist/provider/CoreAuthKitInner.d.ts +12 -0
  163. package/dist/provider/CoreAuthKitInner.d.ts.map +1 -0
  164. package/dist/provider/ElevasisCoreProvider.d.ts +39 -0
  165. package/dist/provider/ElevasisCoreProvider.d.ts.map +1 -0
  166. package/dist/provider/ElevasisServiceContext.d.ts +31 -0
  167. package/dist/provider/ElevasisServiceContext.d.ts.map +1 -0
  168. package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts +2 -0
  169. package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts.map +1 -0
  170. package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts +2 -0
  171. package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts.map +1 -0
  172. package/dist/provider/index.d.ts +7 -384
  173. package/dist/provider/index.d.ts.map +1 -0
  174. package/dist/provider/index.js +8 -9
  175. package/dist/provider/published.d.ts +9 -275
  176. package/dist/provider/published.d.ts.map +1 -0
  177. package/dist/provider/published.js +7 -8
  178. package/dist/provider/types.d.ts +190 -0
  179. package/dist/provider/types.d.ts.map +1 -0
  180. package/dist/sdk-barrel.d.ts +20 -0
  181. package/dist/sdk-barrel.d.ts.map +1 -0
  182. package/dist/supabase/index.d.ts +0 -255
  183. package/dist/supabase/index.js +2 -47
  184. package/dist/theme/cssVariables.d.ts +12 -0
  185. package/dist/theme/cssVariables.d.ts.map +1 -0
  186. package/dist/theme/index.d.ts +4 -0
  187. package/dist/theme/index.d.ts.map +1 -0
  188. package/dist/theme/presets/__tests__/getPreset.test.d.ts +2 -0
  189. package/dist/theme/presets/__tests__/getPreset.test.d.ts.map +1 -0
  190. package/dist/theme/presets/abyss.d.ts +3 -0
  191. package/dist/theme/presets/abyss.d.ts.map +1 -0
  192. package/dist/theme/presets/abyss.js +54 -0
  193. package/dist/theme/presets/aurora.d.ts +8 -0
  194. package/dist/theme/presets/aurora.d.ts.map +1 -0
  195. package/dist/theme/presets/aurora.js +59 -0
  196. package/dist/theme/presets/canopy.d.ts +3 -0
  197. package/dist/theme/presets/canopy.d.ts.map +1 -0
  198. package/dist/theme/presets/canopy.js +58 -0
  199. package/dist/theme/presets/cyber-flux.d.ts +8 -0
  200. package/dist/theme/presets/cyber-flux.d.ts.map +1 -0
  201. package/dist/theme/presets/cyber-strike.d.ts +9 -0
  202. package/dist/theme/presets/cyber-strike.d.ts.map +1 -0
  203. package/dist/theme/presets/cyber-void.d.ts +8 -0
  204. package/dist/theme/presets/cyber-void.d.ts.map +1 -0
  205. package/dist/theme/presets/cyber-volt.d.ts +8 -0
  206. package/dist/theme/presets/cyber-volt.d.ts.map +1 -0
  207. package/dist/theme/presets/default.d.ts +4 -0
  208. package/dist/theme/presets/default.d.ts.map +1 -0
  209. package/dist/theme/presets/ember.d.ts +8 -0
  210. package/dist/theme/presets/ember.d.ts.map +1 -0
  211. package/dist/theme/presets/ember.js +63 -0
  212. package/dist/theme/presets/honey.d.ts +3 -0
  213. package/dist/theme/presets/honey.d.ts.map +1 -0
  214. package/dist/theme/presets/honey.js +62 -0
  215. package/dist/theme/presets/index.d.ts +6 -0
  216. package/dist/theme/presets/index.d.ts.map +1 -0
  217. package/dist/theme/presets/midnight.d.ts +8 -0
  218. package/dist/theme/presets/midnight.d.ts.map +1 -0
  219. package/dist/theme/presets/midnight.js +68 -0
  220. package/dist/theme/presets/obsidian.d.ts +3 -0
  221. package/dist/theme/presets/obsidian.d.ts.map +1 -0
  222. package/dist/theme/presets/obsidian.js +56 -0
  223. package/dist/theme/presets/regal.d.ts +8 -0
  224. package/dist/theme/presets/regal.d.ts.map +1 -0
  225. package/dist/theme/presets/rose-gold.d.ts +8 -0
  226. package/dist/theme/presets/rose-gold.d.ts.map +1 -0
  227. package/dist/theme/presets/slate.d.ts +3 -0
  228. package/dist/theme/presets/slate.d.ts.map +1 -0
  229. package/dist/theme/presets/slate.js +56 -0
  230. package/dist/theme/presets/tactical.d.ts +8 -0
  231. package/dist/theme/presets/tactical.d.ts.map +1 -0
  232. package/dist/theme/presets/types.d.ts +26 -0
  233. package/dist/theme/presets/types.d.ts.map +1 -0
  234. package/dist/theme/presets/types.js +1 -0
  235. package/dist/utils/index.d.ts +1 -22
  236. package/dist/utils/index.js +1 -1
  237. package/package.json +67 -51
  238. package/dist/CoreAuthKitInner-KM72EYJS.js +0 -19
  239. package/dist/api/hooks/useApiClient.d.ts +0 -54
  240. package/dist/api/hooks/useApiClient.d.ts.map +0 -1
  241. package/dist/api/hooks/useApiClient.js +0 -185
  242. package/dist/chunk-3KMDHCAR.js +0 -52
  243. package/dist/chunk-6BJOYF6E.js +0 -8
  244. package/dist/chunk-BLO4SISK.js +0 -113
  245. package/dist/chunk-HUWJXLLF.js +0 -681
  246. package/dist/chunk-JVAZHVNV.js +0 -110
  247. package/dist/chunk-JYSYHVLU.js +0 -379
  248. package/dist/chunk-NE36BUGQ.js +0 -146
  249. package/dist/chunk-NIAVTSMB.js +0 -21
  250. package/dist/chunk-O3PY6B6E.js +0 -749
  251. package/dist/chunk-OXVOHOP3.js +0 -661
  252. package/dist/chunk-PCBXNHKY.js +0 -1460
  253. package/dist/chunk-PSLKGOBZ.js +0 -58
  254. package/dist/chunk-QSVZP2NU.js +0 -214
  255. package/dist/chunk-RJCA5672.js +0 -1664
  256. package/dist/chunk-TMFCNFLW.js +0 -107
  257. package/dist/chunk-TN3PU2WK.js +0 -748
  258. package/dist/chunk-W7ZBF5AA.js +0 -1
  259. package/dist/chunk-YZ6GTZXL.js +0 -48
  260. package/dist/components/command-queue/index.css +0 -53
  261. package/dist/components/command-queue/index.d.ts +0 -204
  262. package/dist/components/command-queue/index.js +0 -12
  263. package/dist/components/forms/index.d.ts +0 -56
  264. package/dist/components/forms/index.js +0 -2
  265. package/dist/components/index.css +0 -443
  266. package/dist/components/monitoring/index.d.ts +0 -66
  267. package/dist/components/monitoring/index.js +0 -2
  268. package/dist/components/notifications/index.d.ts +0 -52
  269. package/dist/components/notifications/index.js +0 -5
  270. package/dist/components/resource-definition/index.css +0 -388
  271. package/dist/components/resource-definition/index.d.ts +0 -301
  272. package/dist/components/resource-definition/index.js +0 -3
  273. package/dist/display/index.css +0 -53
  274. package/dist/display/index.d.ts +0 -606
  275. package/dist/display/index.js +0 -7
  276. package/dist/execution/index.css +0 -388
  277. package/dist/provider/index.css +0 -61
  278. /package/dist/{chunk-Q47SPRY7.js → chunk-BUZONXAW.js} +0 -0
  279. /package/dist/{chunk-NXHL23JW.js → chunk-XXDDMASA.js} +0 -0
@@ -1,661 +0,0 @@
1
- import { BaseNode, useGraphTheme, BaseEdge, useGraphHighlighting, calculateGraphHeight, Graph_default, GRAPH_CONSTANTS, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-HUWJXLLF.js';
2
- import { StyledMarkdown } from './chunk-3KMDHCAR.js';
3
- import { Stack, Group, Text, Badge, ActionIcon, Collapse, Card, ThemeIcon, SimpleGrid, Divider, Paper, Title, Space, Box } from '@mantine/core';
4
- import { IconBrain, IconFileText, IconChevronRight, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconPlayerPlay, IconNetwork, IconSitemap } from '@tabler/icons-react';
5
- import { memo, useState, useMemo } from 'react';
6
- import JSONPretty from 'react-json-pretty';
7
- import 'react-json-pretty/themes/monikai.css';
8
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
- import { ReactFlowProvider, ReactFlow } from '@xyflow/react';
10
- import dagre from '@dagrejs/dagre';
11
- import '@xyflow/react/dist/style.css';
12
-
13
- function CollapsibleJsonSection({ title, data, defaultExpanded = false }) {
14
- const [isExpanded, setIsExpanded] = useState(defaultExpanded);
15
- const [isHovered, setIsHovered] = useState(false);
16
- return /* @__PURE__ */ jsxs(
17
- "div",
18
- {
19
- style: {
20
- borderRadius: "var(--mantine-radius-default)",
21
- backgroundColor: isHovered ? "var(--color-surface-hover, rgba(0,0,0,0.02))" : "transparent",
22
- transition: "background-color var(--duration-fast) var(--easing)"
23
- },
24
- children: [
25
- /* @__PURE__ */ jsxs(
26
- Group,
27
- {
28
- gap: 4,
29
- onClick: () => setIsExpanded(!isExpanded),
30
- onMouseEnter: () => setIsHovered(true),
31
- onMouseLeave: () => setIsHovered(false),
32
- style: {
33
- cursor: "pointer",
34
- padding: "0.375rem 0.5rem",
35
- userSelect: "none"
36
- },
37
- wrap: "nowrap",
38
- children: [
39
- /* @__PURE__ */ jsx(
40
- ActionIcon,
41
- {
42
- variant: "transparent",
43
- size: "xs",
44
- style: {
45
- transition: "transform var(--duration-fast) var(--easing)",
46
- transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)"
47
- },
48
- children: /* @__PURE__ */ jsx(IconChevronRight, { size: 14 })
49
- }
50
- ),
51
- title
52
- ]
53
- }
54
- ),
55
- /* @__PURE__ */ jsx(Collapse, { in: isExpanded, children: /* @__PURE__ */ jsx(
56
- "div",
57
- {
58
- style: {
59
- fontSize: "0.75rem",
60
- fontFamily: "var(--mantine-font-family-monospace)",
61
- padding: "0.5rem",
62
- overflow: "auto",
63
- background: "var(--color-background)"
64
- },
65
- children: /* @__PURE__ */ jsx(
66
- JSONPretty,
67
- {
68
- data,
69
- theme: {
70
- main: "line-height:1.3;color:var(--color-text);background:transparent;overflow:auto;",
71
- error: "line-height:1.3;color:var(--color-error);background:transparent;overflow:auto;",
72
- key: "color:var(--color-text-dimmed);",
73
- string: "color:var(--color-success);",
74
- value: "color:var(--color-warning);",
75
- boolean: "color:var(--color-text-dimmed);"
76
- }
77
- }
78
- )
79
- }
80
- ) })
81
- ]
82
- }
83
- );
84
- }
85
- function ContractDisplay({ contract, defaultExpanded = false }) {
86
- return /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
87
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Contract" }),
88
- /* @__PURE__ */ jsx(
89
- CollapsibleJsonSection,
90
- {
91
- title: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Input Schema" }),
92
- data: contract.inputSchema,
93
- defaultExpanded
94
- }
95
- ),
96
- contract.outputSchema != null && /* @__PURE__ */ jsx(
97
- CollapsibleJsonSection,
98
- {
99
- title: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Output Schema" }),
100
- data: contract.outputSchema,
101
- defaultExpanded
102
- }
103
- )
104
- ] });
105
- }
106
- function ConfigCard({ icon, title, badge, items, color = "blue" }) {
107
- const visibleItems = items.filter((item) => item.value !== void 0 && item.value !== null);
108
- if (visibleItems.length === 0) return null;
109
- return /* @__PURE__ */ jsx(Card, { padding: "sm", withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
110
- /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
111
- /* @__PURE__ */ jsx(ThemeIcon, { size: "sm", variant: "light", color, radius: "sm", children: icon }),
112
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { flex: 1, fontFamily: "var(--elevasis-font-family-subtitle)" }, children: title }),
113
- badge && /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color, children: badge })
114
- ] }),
115
- /* @__PURE__ */ jsx(Stack, { gap: 4, children: visibleItems.map((item, index) => /* @__PURE__ */ jsxs(Group, { gap: 6, wrap: "nowrap", children: [
116
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { minWidth: "fit-content" }, children: item.label }),
117
- typeof item.value === "string" || typeof item.value === "number" ? /* @__PURE__ */ jsx(Text, { size: "xs", ff: item.mono ? "monospace" : void 0, truncate: true, style: { flex: 1 }, children: item.value }) : item.value
118
- ] }, index)) })
119
- ] }) });
120
- }
121
- function ToolsListDisplay({ tools, compact = false, maxVisible = 0 }) {
122
- if (tools.length === 0) {
123
- return /* @__PURE__ */ jsxs("div", { children: [
124
- !compact && /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, mb: "xs", style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Tools" }),
125
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "No tools configured" })
126
- ] });
127
- }
128
- const normalizedTools = tools.map((tool) => typeof tool === "string" ? { name: tool } : tool);
129
- const visibleTools = maxVisible > 0 ? normalizedTools.slice(0, maxVisible) : normalizedTools;
130
- const hiddenCount = maxVisible > 0 ? Math.max(0, normalizedTools.length - maxVisible) : 0;
131
- return /* @__PURE__ */ jsxs("div", { children: [
132
- !compact && /* @__PURE__ */ jsxs(Group, { gap: "xs", mb: "xs", children: [
133
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Tools" }),
134
- /* @__PURE__ */ jsx(Badge, { variant: "light", size: "xs", children: tools.length })
135
- ] }),
136
- /* @__PURE__ */ jsx(SimpleGrid, { cols: 2, spacing: "xs", children: visibleTools.map((tool, index) => /* @__PURE__ */ jsxs(Card, { withBorder: true, p: "sm", children: [
137
- /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", mb: tool.description ? "xs" : 0, children: [
138
- /* @__PURE__ */ jsx(IconTool, { size: 16, style: { color: "var(--color-text-subtle)", flexShrink: 0 } }),
139
- /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", fw: 500, children: tool.name })
140
- ] }),
141
- tool.description && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", lineClamp: 2, children: tool.description })
142
- ] }, `${tool.name}-${index}`)) }),
143
- hiddenCount > 0 && /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", fs: "italic", mt: "xs", children: [
144
- "+",
145
- hiddenCount,
146
- " more tools"
147
- ] })
148
- ] });
149
- }
150
- var NODE_WIDTH = 200;
151
- var NODE_HEIGHT = 100;
152
- var RANK_SEP = 80;
153
- var NODE_SEP = 30;
154
- function useNewKnowledgeMapLayout(knowledgeMap, agentName) {
155
- return useMemo(() => {
156
- if (!knowledgeMap || knowledgeMap.nodes.length === 0) {
157
- return { nodes: [], edges: [] };
158
- }
159
- const agentNodeId = "__agent__";
160
- const edges = knowledgeMap.nodes.map((node) => ({
161
- id: `edge-${agentNodeId}-${node.id}`,
162
- source: agentNodeId,
163
- target: node.id,
164
- type: "knowledgeMap",
165
- data: {}
166
- }));
167
- const dagreGraph = new dagre.graphlib.Graph();
168
- dagreGraph.setDefaultEdgeLabel(() => ({}));
169
- dagreGraph.setGraph({
170
- rankdir: "TB",
171
- ranksep: RANK_SEP,
172
- nodesep: NODE_SEP,
173
- marginx: 40,
174
- marginy: 40
175
- });
176
- dagreGraph.setNode(agentNodeId, { width: NODE_WIDTH, height: NODE_HEIGHT });
177
- knowledgeMap.nodes.forEach((node) => {
178
- dagreGraph.setNode(node.id, { width: NODE_WIDTH, height: NODE_HEIGHT });
179
- });
180
- edges.forEach((edge) => {
181
- dagreGraph.setEdge(edge.source, edge.target);
182
- });
183
- dagre.layout(dagreGraph);
184
- const agentDagreNode = dagreGraph.node(agentNodeId);
185
- const agentNode = {
186
- id: agentNodeId,
187
- type: "knowledgeMap",
188
- position: {
189
- x: agentDagreNode.x - NODE_WIDTH / 2,
190
- y: agentDagreNode.y - NODE_HEIGHT / 2
191
- },
192
- data: {
193
- id: agentNodeId,
194
- name: agentName,
195
- description: "Agent with lazy-loading knowledge",
196
- loaded: true,
197
- hasPrompt: false,
198
- isAgentNode: true
199
- }
200
- };
201
- const knowledgeNodes = knowledgeMap.nodes.map((node) => {
202
- const dagreNode = dagreGraph.node(node.id);
203
- return {
204
- id: node.id,
205
- type: "knowledgeMap",
206
- position: {
207
- x: dagreNode.x - NODE_WIDTH / 2,
208
- y: dagreNode.y - NODE_HEIGHT / 2
209
- },
210
- data: {
211
- id: node.id,
212
- name: node.id,
213
- description: node.description,
214
- loaded: node.loaded,
215
- hasPrompt: node.hasPrompt,
216
- isAgentNode: false
217
- }
218
- };
219
- });
220
- return { nodes: [agentNode, ...knowledgeNodes], edges };
221
- }, [knowledgeMap, agentName]);
222
- }
223
- var NewKnowledgeMapNode = memo(function NewKnowledgeMapNode2({ data, selected }) {
224
- const nodeColor = data.isAgentNode ? "violet" : data.loaded ? "teal" : "blue";
225
- return /* @__PURE__ */ jsx(BaseNode, { color: nodeColor, selected, width: 200, handleDirection: "vertical", children: /* @__PURE__ */ jsxs(Stack, { gap: 6, children: [
226
- /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
227
- data.isAgentNode ? /* @__PURE__ */ jsx(IconBrain, { size: 16, style: { flexShrink: 0 } }) : data.loaded ? /* @__PURE__ */ jsx(IconBrain, { size: 16, style: { flexShrink: 0 } }) : /* @__PURE__ */ jsx(IconBrain, { size: 16, style: { flexShrink: 0, opacity: 0.4 } }),
228
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, truncate: true, style: { flex: 1, fontFamily: "var(--mantine-font-family-headings)" }, children: data.name })
229
- ] }),
230
- data.description && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", lineClamp: 2, children: data.description }),
231
- /* @__PURE__ */ jsx(Group, { gap: 4, children: data.isAgentNode ? /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", children: "Root" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
232
- /* @__PURE__ */ jsx(
233
- Badge,
234
- {
235
- size: "xs",
236
- variant: "light",
237
- color: data.loaded ? "teal" : "gray",
238
- leftSection: /* @__PURE__ */ jsx(IconBrain, { size: 10 }),
239
- children: data.loaded ? "Loaded" : "Available"
240
- }
241
- ),
242
- data.hasPrompt && /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ jsx(IconFileText, { size: 10 }), children: "Prompt" })
243
- ] }) })
244
- ] }) });
245
- });
246
- var NewKnowledgeMapEdge = memo(function NewKnowledgeMapEdge2({
247
- id,
248
- sourceX,
249
- sourceY,
250
- targetX,
251
- targetY,
252
- sourcePosition,
253
- targetPosition,
254
- selected,
255
- data
256
- }) {
257
- const colors = useGraphTheme();
258
- return /* @__PURE__ */ jsx(
259
- BaseEdge,
260
- {
261
- id,
262
- sourceX,
263
- sourceY,
264
- targetX,
265
- targetY,
266
- sourcePosition,
267
- targetPosition,
268
- color: colors.primary,
269
- glowColor: colors.primaryGlow,
270
- animated: false,
271
- selected,
272
- dimmed: data?.dimmed
273
- }
274
- );
275
- });
276
- var nodeTypes = {
277
- knowledgeMap: NewKnowledgeMapNode
278
- };
279
- var edgeTypes = {
280
- knowledgeMap: NewKnowledgeMapEdge
281
- };
282
- function NewKnowledgeMapGraphInner({ knowledgeMap, agentName, compact, fitViewTrigger }) {
283
- const { nodes: layoutNodes, edges: layoutEdges } = useNewKnowledgeMapLayout(knowledgeMap, agentName);
284
- const { nodes, edges, handleNodeMouseEnter, handleNodeMouseLeave } = useGraphHighlighting(layoutNodes, layoutEdges);
285
- if (!knowledgeMap || knowledgeMap.nodes.length === 0) {
286
- return /* @__PURE__ */ jsxs("div", { children: [
287
- !compact && /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, mb: "xs", style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Knowledge Map" }),
288
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "No knowledge nodes configured" })
289
- ] });
290
- }
291
- const containerHeight = calculateGraphHeight({
292
- itemCount: knowledgeMap.nodeCount,
293
- minHeight: 250,
294
- maxHeight: 450,
295
- heightPerItem: 60
296
- });
297
- return /* @__PURE__ */ jsxs("div", { children: [
298
- !compact && /* @__PURE__ */ jsxs(Group, { gap: "xs", mb: "xs", children: [
299
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Knowledge Map" }),
300
- /* @__PURE__ */ jsxs(Badge, { variant: "light", size: "xs", children: [
301
- knowledgeMap.nodeCount,
302
- " ",
303
- knowledgeMap.nodeCount === 1 ? "node" : "nodes"
304
- ] })
305
- ] }),
306
- /* @__PURE__ */ jsx(
307
- Box,
308
- {
309
- className: Graph_default.graphContainer,
310
- style: {
311
- width: "100%",
312
- height: containerHeight,
313
- border: "1px solid var(--color-border)",
314
- borderRadius: "var(--mantine-radius-md)",
315
- overflow: "hidden"
316
- },
317
- children: /* @__PURE__ */ jsxs(
318
- ReactFlow,
319
- {
320
- nodes,
321
- edges,
322
- nodeTypes,
323
- edgeTypes,
324
- onNodeMouseEnter: handleNodeMouseEnter,
325
- onNodeMouseLeave: handleNodeMouseLeave,
326
- fitView: true,
327
- fitViewOptions: { padding: 0.15 },
328
- proOptions: { hideAttribution: true },
329
- minZoom: GRAPH_CONSTANTS.MIN_ZOOM,
330
- maxZoom: GRAPH_CONSTANTS.MAX_ZOOM,
331
- nodesDraggable: false,
332
- nodesConnectable: false,
333
- elementsSelectable: true,
334
- selectNodesOnDrag: false,
335
- panOnDrag: true,
336
- zoomOnScroll: true,
337
- zoomOnPinch: true,
338
- panOnScroll: false,
339
- children: [
340
- /* @__PURE__ */ jsx(GraphBackground, {}),
341
- /* @__PURE__ */ jsx(GraphFitViewButton, { padding: 0.15, variant: "mantine", duration: 300 }),
342
- /* @__PURE__ */ jsx(GraphFitViewHandler, { trigger: fitViewTrigger })
343
- ]
344
- }
345
- )
346
- }
347
- )
348
- ] });
349
- }
350
- function NewKnowledgeMapGraph(props) {
351
- return /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(NewKnowledgeMapGraphInner, { ...props }) });
352
- }
353
- function DefinitionSectionHeader({ expanded, onToggle, icon, title, count }) {
354
- return /* @__PURE__ */ jsxs(Group, { gap: 4, onClick: onToggle, style: { cursor: "pointer", userSelect: "none" }, wrap: "nowrap", children: [
355
- /* @__PURE__ */ jsx(
356
- ActionIcon,
357
- {
358
- variant: "transparent",
359
- size: "xs",
360
- style: {
361
- transition: "transform var(--duration-fast) var(--easing)",
362
- transform: expanded ? "rotate(90deg)" : "rotate(0deg)"
363
- },
364
- children: /* @__PURE__ */ jsx(IconChevronRight, { size: 14 })
365
- }
366
- ),
367
- icon,
368
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: title }),
369
- count && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
370
- "(",
371
- count,
372
- ")"
373
- ] })
374
- ] });
375
- }
376
- function AgentDefinitionDisplay({ agent, defaultExpanded = false }) {
377
- const [systemPromptExpanded, setSystemPromptExpanded] = useState(defaultExpanded);
378
- const [configExpanded, setConfigExpanded] = useState(defaultExpanded);
379
- const [knowledgeMapExpanded, setKnowledgeMapExpanded] = useState(defaultExpanded);
380
- const [knowledgeMapFitTrigger, setKnowledgeMapFitTrigger] = useState(0);
381
- const [toolsExpanded, setToolsExpanded] = useState(defaultExpanded);
382
- const [memoryPrefsExpanded, setMemoryPrefsExpanded] = useState(defaultExpanded);
383
- const hasConstraints = agent.config.constraints && Object.keys(agent.config.constraints).length > 0;
384
- const hasMemoryPreferences = !!agent.config.memoryPreferences;
385
- return /* @__PURE__ */ jsxs(Stack, { children: [
386
- /* @__PURE__ */ jsxs("div", { children: [
387
- /* @__PURE__ */ jsx(
388
- DefinitionSectionHeader,
389
- {
390
- expanded: configExpanded,
391
- onToggle: () => setConfigExpanded(!configExpanded),
392
- icon: /* @__PURE__ */ jsx(IconSettings, { size: 16, color: "var(--color-text-subtle)" }),
393
- title: "Configuration"
394
- }
395
- ),
396
- /* @__PURE__ */ jsxs(Collapse, { in: configExpanded, children: [
397
- /* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, spacing: "sm", mt: "xs", pl: "xl", children: [
398
- /* @__PURE__ */ jsx(
399
- ConfigCard,
400
- {
401
- icon: /* @__PURE__ */ jsx(IconCpu, { size: 14 }),
402
- title: "Model",
403
- badge: agent.modelConfig.provider,
404
- items: [
405
- {
406
- label: "Model",
407
- value: /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", children: agent.modelConfig.model })
408
- },
409
- { label: "Temperature", value: agent.modelConfig.temperature, mono: true },
410
- { label: "Max Tokens", value: agent.modelConfig.maxOutputTokens?.toLocaleString(), mono: true },
411
- { label: "Top P", value: agent.modelConfig.topP, mono: true },
412
- {
413
- label: "Reasoning",
414
- value: agent.modelConfig.modelOptions && "reasoning_effort" in agent.modelConfig.modelOptions ? String(agent.modelConfig.modelOptions.reasoning_effort) : void 0,
415
- mono: true
416
- },
417
- {
418
- label: "Verbosity",
419
- value: agent.modelConfig.modelOptions && "verbosity" in agent.modelConfig.modelOptions ? String(agent.modelConfig.modelOptions.verbosity) : void 0,
420
- mono: true
421
- }
422
- ]
423
- }
424
- ),
425
- hasConstraints && /* @__PURE__ */ jsx(
426
- ConfigCard,
427
- {
428
- icon: /* @__PURE__ */ jsx(IconClockHour4, { size: 14 }),
429
- title: "Constraints",
430
- color: "orange",
431
- items: [
432
- { label: "Max Iterations", value: agent.config.constraints?.maxIterations, mono: true },
433
- {
434
- label: "Timeout",
435
- value: agent.config.constraints?.timeout ? `${(agent.config.constraints.timeout / 1e3).toFixed(0)}s` : void 0,
436
- mono: true
437
- },
438
- { label: "Max Memory Keys", value: agent.config.constraints?.maxSessionMemoryKeys, mono: true },
439
- {
440
- label: "Max Memory Tokens",
441
- value: agent.config.constraints?.maxMemoryTokens?.toLocaleString(),
442
- mono: true
443
- }
444
- ]
445
- }
446
- ),
447
- /* @__PURE__ */ jsx(
448
- ConfigCard,
449
- {
450
- icon: /* @__PURE__ */ jsx(IconVersions, { size: 14 }),
451
- title: "Version",
452
- color: "grape",
453
- items: [
454
- {
455
- label: "Version",
456
- value: /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", children: agent.config.version })
457
- }
458
- ]
459
- }
460
- ),
461
- /* @__PURE__ */ jsx(
462
- ConfigCard,
463
- {
464
- icon: /* @__PURE__ */ jsx(IconPlayerPlay, { size: 14 }),
465
- title: "Execution Interface",
466
- color: "teal",
467
- items: [
468
- {
469
- label: "Has Interface",
470
- value: agent.interface ? /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "green", children: "Yes" }) : /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "gray", children: "No" })
471
- }
472
- ]
473
- }
474
- )
475
- ] }),
476
- /* @__PURE__ */ jsx("div", { style: { paddingLeft: "var(--mantine-spacing-xl)", marginTop: "var(--mantine-spacing-sm)" }, children: /* @__PURE__ */ jsx(ContractDisplay, { contract: agent.contract, defaultExpanded }) })
477
- ] })
478
- ] }),
479
- /* @__PURE__ */ jsx(Divider, {}),
480
- /* @__PURE__ */ jsxs("div", { children: [
481
- /* @__PURE__ */ jsx(
482
- DefinitionSectionHeader,
483
- {
484
- expanded: systemPromptExpanded,
485
- onToggle: () => setSystemPromptExpanded(!systemPromptExpanded),
486
- icon: /* @__PURE__ */ jsx(IconBrain, { size: 16, color: "var(--color-text-subtle)" }),
487
- title: "System Prompt"
488
- }
489
- ),
490
- /* @__PURE__ */ jsx(Collapse, { in: systemPromptExpanded, children: /* @__PURE__ */ jsx(Paper, { p: "sm", mt: "xs", children: /* @__PURE__ */ jsx(StyledMarkdown, { children: agent.config.systemPrompt }) }) })
491
- ] }),
492
- agent.knowledgeMap && agent.knowledgeMap.nodeCount > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
493
- /* @__PURE__ */ jsx(Divider, {}),
494
- /* @__PURE__ */ jsxs("div", { children: [
495
- /* @__PURE__ */ jsx(
496
- DefinitionSectionHeader,
497
- {
498
- expanded: knowledgeMapExpanded,
499
- onToggle: () => {
500
- const willExpand = !knowledgeMapExpanded;
501
- setKnowledgeMapExpanded(willExpand);
502
- if (willExpand) {
503
- setKnowledgeMapFitTrigger((prev) => prev + 1);
504
- }
505
- },
506
- icon: /* @__PURE__ */ jsx(IconNetwork, { size: 16, color: "var(--color-text-subtle)" }),
507
- title: "Knowledge Map",
508
- count: `${agent.knowledgeMap.nodeCount} ${agent.knowledgeMap.nodeCount === 1 ? "node" : "nodes"}`
509
- }
510
- ),
511
- /* @__PURE__ */ jsx(Collapse, { in: knowledgeMapExpanded, children: /* @__PURE__ */ jsx("div", { style: { marginTop: "var(--mantine-spacing-xs)" }, children: /* @__PURE__ */ jsx(
512
- NewKnowledgeMapGraph,
513
- {
514
- knowledgeMap: agent.knowledgeMap,
515
- agentName: agent.config.name,
516
- compact: true,
517
- fitViewTrigger: knowledgeMapFitTrigger
518
- }
519
- ) }) })
520
- ] })
521
- ] }),
522
- /* @__PURE__ */ jsx(Divider, {}),
523
- /* @__PURE__ */ jsxs("div", { children: [
524
- /* @__PURE__ */ jsx(
525
- DefinitionSectionHeader,
526
- {
527
- expanded: toolsExpanded,
528
- onToggle: () => setToolsExpanded(!toolsExpanded),
529
- icon: /* @__PURE__ */ jsx(IconTool, { size: 16, color: "var(--color-text-subtle)" }),
530
- title: "Tools",
531
- count: String(agent.tools.length)
532
- }
533
- ),
534
- /* @__PURE__ */ jsx(Collapse, { in: toolsExpanded, children: /* @__PURE__ */ jsx("div", { style: { marginTop: "var(--mantine-spacing-xs)" }, children: /* @__PURE__ */ jsx(ToolsListDisplay, { tools: agent.tools, compact: true }) }) })
535
- ] }),
536
- hasMemoryPreferences && /* @__PURE__ */ jsxs(Fragment, { children: [
537
- /* @__PURE__ */ jsx(Divider, {}),
538
- /* @__PURE__ */ jsxs("div", { children: [
539
- /* @__PURE__ */ jsx(
540
- DefinitionSectionHeader,
541
- {
542
- expanded: memoryPrefsExpanded,
543
- onToggle: () => setMemoryPrefsExpanded(!memoryPrefsExpanded),
544
- title: "Memory Preferences"
545
- }
546
- ),
547
- /* @__PURE__ */ jsx(Collapse, { in: memoryPrefsExpanded, children: /* @__PURE__ */ jsx(
548
- Paper,
549
- {
550
- p: "sm",
551
- mt: "xs",
552
- style: {
553
- backgroundColor: "var(--color-background)",
554
- border: "1px solid var(--color-border)"
555
- },
556
- children: /* @__PURE__ */ jsx(Text, { size: "sm", style: { whiteSpace: "pre-wrap" }, children: agent.config.memoryPreferences })
557
- }
558
- ) })
559
- ] })
560
- ] })
561
- ] });
562
- }
563
- function WorkflowDefinitionDisplay({ workflow, defaultExpanded = false }) {
564
- const [configExpanded, setConfigExpanded] = useState(defaultExpanded);
565
- return /* @__PURE__ */ jsx(Stack, { children: /* @__PURE__ */ jsxs("div", { children: [
566
- /* @__PURE__ */ jsxs(
567
- Group,
568
- {
569
- gap: 4,
570
- onClick: () => setConfigExpanded(!configExpanded),
571
- style: { cursor: "pointer", userSelect: "none" },
572
- wrap: "nowrap",
573
- children: [
574
- /* @__PURE__ */ jsx(
575
- ActionIcon,
576
- {
577
- variant: "transparent",
578
- size: "xs",
579
- style: {
580
- transition: "transform var(--duration-fast) var(--easing)",
581
- transform: configExpanded ? "rotate(90deg)" : "rotate(0deg)"
582
- },
583
- children: /* @__PURE__ */ jsx(IconChevronRight, { size: 14 })
584
- }
585
- ),
586
- /* @__PURE__ */ jsx(IconSettings, { size: 16, color: "var(--color-text-subtle)" }),
587
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: "Configuration" })
588
- ]
589
- }
590
- ),
591
- /* @__PURE__ */ jsxs(Collapse, { in: configExpanded, children: [
592
- /* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, spacing: "sm", mt: "xs", pl: "xl", children: [
593
- /* @__PURE__ */ jsx(
594
- ConfigCard,
595
- {
596
- icon: /* @__PURE__ */ jsx(IconVersions, { size: 14 }),
597
- title: "Version",
598
- color: "grape",
599
- items: [
600
- {
601
- label: "Version",
602
- value: /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", children: workflow.config.version })
603
- }
604
- ]
605
- }
606
- ),
607
- /* @__PURE__ */ jsx(
608
- ConfigCard,
609
- {
610
- icon: /* @__PURE__ */ jsx(IconPlayerPlay, { size: 14 }),
611
- title: "Execution Interface",
612
- color: "teal",
613
- items: [
614
- {
615
- label: "Has Interface",
616
- value: workflow.interface ? /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "green", children: "Yes" }) : /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: "gray", children: "No" })
617
- }
618
- ]
619
- }
620
- )
621
- ] }),
622
- /* @__PURE__ */ jsx("div", { style: { paddingLeft: "var(--mantine-spacing-xl)", marginTop: "var(--mantine-spacing-sm)" }, children: /* @__PURE__ */ jsx(ContractDisplay, { contract: workflow.contract, defaultExpanded }) })
623
- ] })
624
- ] }) });
625
- }
626
- function isAgentDefinition(structure) {
627
- return structure.config.type === "agent" && "modelConfig" in structure;
628
- }
629
- function isWorkflowDefinition(structure) {
630
- return structure.config.type === "workflow" && "steps" in structure;
631
- }
632
- function ResourceDefinitionSection({
633
- resourceDefinition,
634
- defaultExpanded = false
635
- }) {
636
- const isAgent = isAgentDefinition(resourceDefinition);
637
- const isWorkflow = isWorkflowDefinition(resourceDefinition);
638
- if (isAgent) {
639
- return /* @__PURE__ */ jsx(Paper, { withBorder: true, p: "sm", children: /* @__PURE__ */ jsxs(Stack, { children: [
640
- /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
641
- /* @__PURE__ */ jsx(IconBrain, { size: 20 }),
642
- /* @__PURE__ */ jsx(Title, { order: 3, children: "Agent Definition" })
643
- ] }),
644
- /* @__PURE__ */ jsx(Space, { h: 0 }),
645
- /* @__PURE__ */ jsx(AgentDefinitionDisplay, { agent: resourceDefinition, defaultExpanded })
646
- ] }) });
647
- }
648
- if (isWorkflow) {
649
- return /* @__PURE__ */ jsx(Paper, { withBorder: true, p: "sm", children: /* @__PURE__ */ jsxs(Stack, { children: [
650
- /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
651
- /* @__PURE__ */ jsx(IconSitemap, { size: 20 }),
652
- /* @__PURE__ */ jsx(Title, { order: 3, children: "Workflow Definition" })
653
- ] }),
654
- /* @__PURE__ */ jsx(Space, { h: 0 }),
655
- /* @__PURE__ */ jsx(WorkflowDefinitionDisplay, { workflow: resourceDefinition, defaultExpanded })
656
- ] }) });
657
- }
658
- return /* @__PURE__ */ jsx(Paper, { withBorder: true, p: "sm", children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "Unknown resource type" }) });
659
- }
660
-
661
- export { AgentDefinitionDisplay, CollapsibleJsonSection, ConfigCard, ContractDisplay, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, ResourceDefinitionSection, ToolsListDisplay, WorkflowDefinitionDisplay, useNewKnowledgeMapLayout };