@elevasis/ui 2.9.1 → 2.10.0

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 (74) hide show
  1. package/dist/app/index.css +137 -0
  2. package/dist/app/index.d.ts +223 -0
  3. package/dist/app/index.js +95 -0
  4. package/dist/charts/index.js +3 -2
  5. package/dist/{chunk-NYMKWGKN.js → chunk-4BF74JVD.js} +110 -7
  6. package/dist/{chunk-YCHZ4U5V.js → chunk-5VBR74ZS.js} +5 -13
  7. package/dist/chunk-ADSSLKKP.js +10 -0
  8. package/dist/{chunk-C2OFFC7J.js → chunk-AL23U6C3.js} +3 -2
  9. package/dist/{chunk-27COZ5AH.js → chunk-CEWTOKE7.js} +3 -50
  10. package/dist/{chunk-AQQYVAFK.js → chunk-CLXMNMIS.js} +8 -7
  11. package/dist/{chunk-4PHPENKX.js → chunk-E3IFHX6A.js} +27 -377
  12. package/dist/{chunk-4JPW5U5I.js → chunk-E4W7LB37.js} +53 -54
  13. package/dist/{chunk-CYXZHBP4.js → chunk-F4TPY6YL.js} +14 -3
  14. package/dist/chunk-G2TDX3W6.js +5 -0
  15. package/dist/chunk-IIMU5YAJ.js +53 -0
  16. package/dist/{chunk-W4VYXIN7.js → chunk-L4XXM55J.js} +3 -142
  17. package/dist/{chunk-KGEYEUR5.js → chunk-MOHVG62K.js} +7 -6
  18. package/dist/{chunk-F5QSLYUB.js → chunk-N47Z6LD4.js} +317 -1060
  19. package/dist/{chunk-47YILFON.js → chunk-OS5GFW2O.js} +156 -141
  20. package/dist/chunk-P5VHGY5P.js +13 -0
  21. package/dist/chunk-R7WLWGPO.js +126 -0
  22. package/dist/{chunk-Y3D3WFJG.js → chunk-SQQGLGHW.js} +2 -11
  23. package/dist/{chunk-KFICYU6S.js → chunk-STZJ7SY5.js} +1 -1
  24. package/dist/chunk-SZHARWKU.js +15 -0
  25. package/dist/{chunk-7PDDPNQS.js → chunk-TSX4I3NW.js} +3 -3
  26. package/dist/{chunk-CTWYIRKW.js → chunk-U23TW6NP.js} +24 -34
  27. package/dist/{chunk-OPT74SGF.js → chunk-USVBMGMP.js} +26 -172
  28. package/dist/chunk-V7XHGJQZ.js +145 -0
  29. package/dist/{chunk-UE5QQDCR.js → chunk-WHQXDETX.js} +5 -5
  30. package/dist/{chunk-ZZ35VSNF.js → chunk-YQLE5HR5.js} +4 -4
  31. package/dist/{chunk-VNUOQQNY.js → chunk-Z3OWD3A4.js} +2 -2
  32. package/dist/components/index.d.ts +6 -253
  33. package/dist/components/index.js +31 -25
  34. package/dist/features/auth/index.d.ts +0 -107
  35. package/dist/features/auth/index.js +0 -1
  36. package/dist/features/crm/index.d.ts +3 -136
  37. package/dist/features/crm/index.js +14 -9
  38. package/dist/features/dashboard/index.js +13 -9
  39. package/dist/features/delivery/index.d.ts +3 -137
  40. package/dist/features/delivery/index.js +15 -9
  41. package/dist/features/lead-gen/index.d.ts +3 -29
  42. package/dist/features/lead-gen/index.js +20 -14
  43. package/dist/features/monitoring/index.d.ts +3 -30
  44. package/dist/features/monitoring/index.js +14 -10
  45. package/dist/features/operations/index.d.ts +18 -1323
  46. package/dist/features/operations/index.js +18 -13
  47. package/dist/features/seo/index.d.ts +3 -30
  48. package/dist/features/seo/index.js +3 -2
  49. package/dist/features/settings/index.d.ts +6 -146
  50. package/dist/features/settings/index.js +13 -9
  51. package/dist/hooks/index.d.ts +10 -1403
  52. package/dist/hooks/index.js +11 -7
  53. package/dist/hooks/published.d.ts +10 -1403
  54. package/dist/hooks/published.js +11 -7
  55. package/dist/index.d.ts +96 -1510
  56. package/dist/index.js +12 -8
  57. package/dist/initialization/index.d.ts +3 -117
  58. package/dist/layout/index.d.ts +12 -2
  59. package/dist/layout/index.js +5 -4
  60. package/dist/organization/index.d.ts +3 -10
  61. package/dist/organization/index.js +2 -1
  62. package/dist/profile/index.d.ts +0 -107
  63. package/dist/provider/index.d.ts +44 -65
  64. package/dist/provider/index.js +10 -6
  65. package/dist/provider/published.d.ts +44 -65
  66. package/dist/provider/published.js +6 -3
  67. package/dist/supabase/index.d.ts +0 -209
  68. package/dist/theme/index.d.ts +1 -1
  69. package/dist/theme/index.js +3 -3
  70. package/dist/typeform/index.js +10 -10
  71. package/dist/types/index.d.ts +68 -1738
  72. package/package.json +20 -4
  73. package/src/app/README.md +24 -0
  74. package/dist/chunk-IDACMRGQ.js +0 -115
@@ -1,18 +1,18 @@
1
1
  import { ChatHeader, ChatSidebar } from './chunk-ROSMICXG.js';
2
- import { SubshellLoader, CollapsibleSidebarGroup } from './chunk-IDACMRGQ.js';
3
- import { ResourceHealthPanel } from './chunk-7PDDPNQS.js';
2
+ import { SubshellLoader } from './chunk-ADSSLKKP.js';
3
+ import { ResourceHealthPanel } from './chunk-TSX4I3NW.js';
4
4
  import { PageContainer } from './chunk-BZZCNLT6.js';
5
- import { SubshellSidebarSection, SubshellNavItem } from './chunk-27COZ5AH.js';
5
+ import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
6
6
  import { CustomModal, ConfirmationModal } from './chunk-GBMNCNHX.js';
7
- import { BaseNode, useGraphTheme, BaseEdge, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-CTWYIRKW.js';
8
- import { useCyberColors, CyberDonut } from './chunk-KFICYU6S.js';
7
+ import { BaseNode, useGraphTheme, BaseEdge, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-U23TW6NP.js';
8
+ import { useCyberColors, CyberDonut } from './chunk-STZJ7SY5.js';
9
9
  import { AppShellLoader } from './chunk-YEX4MQSY.js';
10
10
  import { getResourceStatusColor, useMergedExecution, useTimelineData, useAgentIterationData, getStatusIcon } from './chunk-XA34RETF.js';
11
- import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useResourceExecutions, useCheckpointTasks, useCalibrationProjects, useCalibrationProject, useAllCalibrationProjects, useCommandViewStore, useCommandViewDomainFilters, useCalibrationSSE, useCalibrationRunFull, useExecuteRun, useGradeRun, useCalibrationRuns, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, calibrationKeys, useDeleteProject, useCreateProject, useBulkDeleteExecutions } from './chunk-4PHPENKX.js';
11
+ import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useResourceExecutions, useCheckpointTasks, useCommandViewStore, useCommandViewDomainFilters, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, useBulkDeleteExecutions } from './chunk-E3IFHX6A.js';
12
12
  import { useGraphHighlighting, calculateGraphHeight, Graph_module_css_default, GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
13
- import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-OPT74SGF.js';
14
- import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer, SubshellContentContainer } from './chunk-RX4UWZZR.js';
15
- import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-Y3D3WFJG.js';
13
+ import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-USVBMGMP.js';
14
+ import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
15
+ import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-SQQGLGHW.js';
16
16
  import { StyledMarkdown } from './chunk-3KMDHCAR.js';
17
17
  import { NavigationButton } from './chunk-NYBEU5TE.js';
18
18
  import { ResourceStatusColors, toWorkflowLogMessages } from './chunk-ELJIFLCB.js';
@@ -23,8 +23,8 @@ import { useInitialization } from './chunk-TUXTSEAF.js';
23
23
  import { useOrganization } from './chunk-DD3CCMCZ.js';
24
24
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
25
25
  import { z } from 'zod';
26
- import { Stack, Group, Text, Badge, TextInput, Textarea, Radio, Checkbox, Select, NumberInput, Title, Alert, Button, ActionIcon, Collapse, Card, ThemeIcon, SimpleGrid, Divider, Paper, Space, CopyButton, Center, Tooltip, Code, Menu, useMantineTheme, UnstyledButton, RangeSlider, Loader, Box, Progress, Tabs, Pagination, Modal, LoadingOverlay, SegmentedControl, Switch, Timeline, ScrollArea, MultiSelect, Table } from '@mantine/core';
27
- import { IconBrain, IconFileText, IconMail, IconSend, IconClock, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconCode, IconAlertCircle, IconChevronRight, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconPlayerPlay, IconNetwork, IconSitemap, IconCopy, IconPlayerStop, IconReload, IconTrash, IconTerminal2, IconBug, IconChevronDown, IconMessage, IconArrowLeft, IconRobot, IconGitBranch, IconDotsVertical, IconFilter, IconCircleCheck, IconCategory, IconDatabase, IconApps, IconRoute, IconAdjustmentsHorizontal, IconSearch, IconCircleX, IconCircleDashed, IconExternalLink, IconTopologyStar3, IconPlus, IconAdjustments, IconChartBar, IconReportAnalytics, IconCoin, IconBriefcase, IconFlask, IconInfoCircle, IconLayoutSidebarRightExpand, IconNote, IconArchive, IconDownload, IconTimeline, IconArrowsMaximize, IconShare2, IconHistory } from '@tabler/icons-react';
26
+ import { Stack, Group, Text, Badge, TextInput, Textarea, Radio, Checkbox, Select, NumberInput, Title, Alert, Button, ActionIcon, Collapse, Card, ThemeIcon, SimpleGrid, Divider, Paper, Space, CopyButton, Center, Tooltip, Code, Menu, useMantineTheme, UnstyledButton, RangeSlider, Loader, Box, Progress, Tabs, Pagination, Modal, LoadingOverlay, SegmentedControl, Switch, ScrollArea, MultiSelect } from '@mantine/core';
27
+ import { IconBrain, IconFileText, IconMail, IconSend, IconClock, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconCode, IconAlertCircle, IconChevronRight, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconPlayerPlay, IconNetwork, IconSitemap, IconCopy, IconPlayerStop, IconReload, IconTrash, IconTerminal2, IconBug, IconChevronDown, IconMessage, IconArrowLeft, IconRobot, IconGitBranch, IconDotsVertical, IconFilter, IconCircleCheck, IconCategory, IconDatabase, IconApps, IconRoute, IconAdjustmentsHorizontal, IconSearch, IconCircleX, IconCircleDashed, IconExternalLink, IconTopologyStar3, IconInfoCircle, IconPlus, IconLayoutSidebarRightExpand, IconNote, IconArchive, IconDownload, IconTimeline, IconArrowsMaximize, IconShare2, IconHistory } from '@tabler/icons-react';
28
28
  import { useForm } from '@mantine/form';
29
29
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
30
30
  import { memo, useState, useMemo, useRef, useCallback, useEffect, useDeferredValue } from 'react';
@@ -33,11 +33,30 @@ import dagre from '@dagrejs/dagre';
33
33
  import '@xyflow/react/dist/style.css';
34
34
  import { useClipboard } from '@mantine/hooks';
35
35
  import { notifications } from '@mantine/notifications';
36
- import { useNavigate, Link } from '@tanstack/react-router';
36
+ import { useNavigate } from '@tanstack/react-router';
37
37
  import cytoscape from 'cytoscape';
38
38
  import { formatDistanceToNow } from 'date-fns';
39
- import { useQueryClient } from '@tanstack/react-query';
40
39
 
40
+ // ../core/src/platform/utils/debounce.ts
41
+ function debounce(fn, wait) {
42
+ let timeoutId = null;
43
+ const debounced = (...args) => {
44
+ if (timeoutId !== null) {
45
+ clearTimeout(timeoutId);
46
+ }
47
+ timeoutId = setTimeout(() => {
48
+ fn(...args);
49
+ timeoutId = null;
50
+ }, wait);
51
+ };
52
+ debounced.cancel = () => {
53
+ if (timeoutId !== null) {
54
+ clearTimeout(timeoutId);
55
+ timeoutId = null;
56
+ }
57
+ };
58
+ return debounced;
59
+ }
41
60
  var ModelIdSchema = z.string().trim().min(1).max(100).regex(/^[a-z0-9]+(?:[-._][a-z0-9]+)*$/, "IDs must be lowercase and use -, _, or . separators");
42
61
  var LabelSchema = z.string().trim().min(1).max(120);
43
62
  var DescriptionSchema = z.string().trim().min(1).max(2e3);
@@ -51,18 +70,11 @@ var DisplayMetadataSchema = z.object({
51
70
  color: ColorTokenSchema.optional(),
52
71
  icon: IconNameSchema.optional()
53
72
  });
54
- var SemanticDomainSchema = DisplayMetadataSchema.extend({
55
- id: ModelIdSchema,
56
- entityIds: ReferenceIdsSchema,
57
- surfaceIds: ReferenceIdsSchema,
58
- resourceIds: ReferenceIdsSchema,
59
- capabilityIds: ReferenceIdsSchema
60
- });
61
73
  var ResourceMappingSchema = DisplayMetadataSchema.extend({
62
74
  id: ModelIdSchema,
63
75
  resourceId: z.string().trim().min(1).max(255),
64
76
  resourceType: z.enum(["workflow", "agent", "trigger", "integration", "external", "human_checkpoint"]),
65
- domainIds: ReferenceIdsSchema,
77
+ featureIds: ReferenceIdsSchema,
66
78
  entityIds: ReferenceIdsSchema,
67
79
  surfaceIds: ReferenceIdsSchema,
68
80
  capabilityIds: ReferenceIdsSchema
@@ -111,42 +123,17 @@ var OrganizationModelDeliverySchema = z.object({
111
123
  milestoneStatuses: z.array(DeliveryStateSchema).min(1),
112
124
  taskStatuses: z.array(DeliveryStateSchema).min(1)
113
125
  });
114
- var FeatureKeySchema = z.enum([
115
- "acquisition",
116
- "delivery",
117
- "operations",
118
- "monitoring",
119
- "settings",
120
- "seo",
121
- "calibration"
122
- ]);
123
- var OrganizationModelFeaturesSchema = z.object({
124
- enabled: z.object({
125
- acquisition: z.boolean().default(true),
126
- delivery: z.boolean().default(true),
127
- operations: z.boolean().default(true),
128
- monitoring: z.boolean().default(true),
129
- settings: z.boolean().default(true),
130
- seo: z.boolean().default(false),
131
- calibration: z.boolean().default(false)
132
- }).default({
133
- acquisition: true,
134
- delivery: true,
135
- operations: true,
136
- monitoring: true,
137
- settings: true,
138
- seo: false,
139
- calibration: false
140
- }),
141
- labels: z.object({
142
- acquisition: z.string().trim().min(1).max(80).optional(),
143
- delivery: z.string().trim().min(1).max(80).optional(),
144
- operations: z.string().trim().min(1).max(80).optional(),
145
- monitoring: z.string().trim().min(1).max(80).optional(),
146
- settings: z.string().trim().min(1).max(80).optional(),
147
- seo: z.string().trim().min(1).max(80).optional(),
148
- calibration: z.string().trim().min(1).max(80).optional()
149
- }).default({})
126
+ var FeatureSchema = z.object({
127
+ id: ModelIdSchema,
128
+ label: LabelSchema,
129
+ description: DescriptionSchema.optional(),
130
+ enabled: z.boolean().default(true),
131
+ color: ColorTokenSchema.optional(),
132
+ icon: IconNameSchema.optional(),
133
+ entityIds: ReferenceIdsSchema,
134
+ surfaceIds: ReferenceIdsSchema,
135
+ resourceIds: ReferenceIdsSchema,
136
+ capabilityIds: ReferenceIdsSchema
150
137
  });
151
138
  var LeadGenLifecycleStageSchema = DisplayMetadataSchema.extend({
152
139
  id: ModelIdSchema,
@@ -168,8 +155,8 @@ var SurfaceDefinitionSchema = z.object({
168
155
  surfaceType: SurfaceTypeSchema,
169
156
  description: DescriptionSchema.optional(),
170
157
  icon: IconNameSchema.optional(),
171
- featureKey: FeatureKeySchema.optional(),
172
- domainIds: ReferenceIdsSchema,
158
+ featureId: ModelIdSchema.optional(),
159
+ featureIds: ReferenceIdsSchema,
173
160
  entityIds: ReferenceIdsSchema,
174
161
  resourceIds: ReferenceIdsSchema,
175
162
  capabilityIds: ReferenceIdsSchema,
@@ -190,9 +177,8 @@ var OrganizationModelNavigationSchema = z.object({
190
177
  // ../core/src/organization-model/schema.ts
191
178
  var OrganizationModelSchemaBase = z.object({
192
179
  version: z.literal(1).default(1),
193
- domains: z.array(SemanticDomainSchema).default([]),
180
+ features: z.array(FeatureSchema).default([]),
194
181
  branding: OrganizationModelBrandingSchema,
195
- features: OrganizationModelFeaturesSchema,
196
182
  navigation: OrganizationModelNavigationSchema,
197
183
  crm: OrganizationModelCrmSchema,
198
184
  leadGen: OrganizationModelLeadGenSchema,
@@ -218,7 +204,7 @@ function collectIds(items, ctx, collectionPath, label) {
218
204
  return itemsById;
219
205
  }
220
206
  var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ctx) => {
221
- const domainsById = collectIds(model.domains, ctx, ["domains"], "Domain");
207
+ const featuresById = collectIds(model.features, ctx, ["features"], "Feature");
222
208
  const surfacesById = collectIds(model.navigation.surfaces, ctx, ["navigation", "surfaces"], "Surface");
223
209
  collectIds(model.navigation.groups, ctx, ["navigation", "groups"], "Navigation group");
224
210
  collectIds(model.resourceMappings, ctx, ["resourceMappings"], "Resource mapping");
@@ -252,40 +238,40 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
252
238
  }
253
239
  });
254
240
  });
255
- model.domains.forEach((domain, domainIndex) => {
256
- domain.surfaceIds.forEach((surfaceId, surfaceIndex) => {
241
+ model.features.forEach((feature, featureIndex) => {
242
+ feature.surfaceIds.forEach((surfaceId, surfaceIndex) => {
257
243
  const surface = surfacesById.get(surfaceId);
258
244
  if (!surface) {
259
245
  addIssue(
260
246
  ctx,
261
- ["domains", domainIndex, "surfaceIds", surfaceIndex],
262
- `Domain "${domain.id}" references unknown surface "${surfaceId}"`
247
+ ["features", featureIndex, "surfaceIds", surfaceIndex],
248
+ `Feature "${feature.id}" references unknown surface "${surfaceId}"`
263
249
  );
264
250
  return;
265
251
  }
266
- if (!surface.domainIds.includes(domain.id)) {
252
+ if (!surface.featureIds.includes(feature.id)) {
267
253
  addIssue(
268
254
  ctx,
269
- ["domains", domainIndex, "surfaceIds", surfaceIndex],
270
- `Domain "${domain.id}" references surface "${surfaceId}" but that surface does not include domain "${domain.id}"`
255
+ ["features", featureIndex, "surfaceIds", surfaceIndex],
256
+ `Feature "${feature.id}" references surface "${surfaceId}" but that surface does not include feature "${feature.id}"`
271
257
  );
272
258
  }
273
259
  });
274
- domain.resourceIds.forEach((resourceId, resourceIndex) => {
260
+ feature.resourceIds.forEach((resourceId, resourceIndex) => {
275
261
  const resourceMapping = resourceMappingsByResourceId.get(resourceId);
276
262
  if (!resourceMapping) {
277
263
  addIssue(
278
264
  ctx,
279
- ["domains", domainIndex, "resourceIds", resourceIndex],
280
- `Domain "${domain.id}" references unknown resource "${resourceId}"`
265
+ ["features", featureIndex, "resourceIds", resourceIndex],
266
+ `Feature "${feature.id}" references unknown resource "${resourceId}"`
281
267
  );
282
268
  return;
283
269
  }
284
- if (!resourceMapping.domainIds.includes(domain.id)) {
270
+ if (!resourceMapping.featureIds.includes(feature.id)) {
285
271
  addIssue(
286
272
  ctx,
287
- ["domains", domainIndex, "resourceIds", resourceIndex],
288
- `Domain "${domain.id}" references resource "${resourceId}" but that resource mapping does not include domain "${domain.id}"`
273
+ ["features", featureIndex, "resourceIds", resourceIndex],
274
+ `Feature "${feature.id}" references resource "${resourceId}" but that resource mapping does not include feature "${feature.id}"`
289
275
  );
290
276
  }
291
277
  });
@@ -298,21 +284,21 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
298
284
  `Surface "${surface.id}" references unknown parent surface "${surface.parentId}"`
299
285
  );
300
286
  }
301
- surface.domainIds.forEach((domainId, domainIndex) => {
302
- const domain = domainsById.get(domainId);
303
- if (!domain) {
287
+ surface.featureIds.forEach((featureId, featureIndex) => {
288
+ const feature = featuresById.get(featureId);
289
+ if (!feature) {
304
290
  addIssue(
305
291
  ctx,
306
- ["navigation", "surfaces", surfaceIndex, "domainIds", domainIndex],
307
- `Surface "${surface.id}" references unknown domain "${domainId}"`
292
+ ["navigation", "surfaces", surfaceIndex, "featureIds", featureIndex],
293
+ `Surface "${surface.id}" references unknown feature "${featureId}"`
308
294
  );
309
295
  return;
310
296
  }
311
- if (!domain.surfaceIds.includes(surface.id)) {
297
+ if (!feature.surfaceIds.includes(surface.id)) {
312
298
  addIssue(
313
299
  ctx,
314
- ["navigation", "surfaces", surfaceIndex, "domainIds", domainIndex],
315
- `Surface "${surface.id}" references domain "${domainId}" but that domain does not include surface "${surface.id}"`
300
+ ["navigation", "surfaces", surfaceIndex, "featureIds", featureIndex],
301
+ `Surface "${surface.id}" references feature "${featureId}" but that feature does not include surface "${surface.id}"`
316
302
  );
317
303
  }
318
304
  });
@@ -336,21 +322,21 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
336
322
  });
337
323
  });
338
324
  model.resourceMappings.forEach((resourceMapping, resourceIndex) => {
339
- resourceMapping.domainIds.forEach((domainId, domainIndex) => {
340
- const domain = domainsById.get(domainId);
341
- if (!domain) {
325
+ resourceMapping.featureIds.forEach((featureId, featureIndex) => {
326
+ const feature = featuresById.get(featureId);
327
+ if (!feature) {
342
328
  addIssue(
343
329
  ctx,
344
- ["resourceMappings", resourceIndex, "domainIds", domainIndex],
345
- `Resource mapping "${resourceMapping.id}" references unknown domain "${domainId}"`
330
+ ["resourceMappings", resourceIndex, "featureIds", featureIndex],
331
+ `Resource mapping "${resourceMapping.id}" references unknown feature "${featureId}"`
346
332
  );
347
333
  return;
348
334
  }
349
- if (!domain.resourceIds.includes(resourceMapping.resourceId)) {
335
+ if (!feature.resourceIds.includes(resourceMapping.resourceId)) {
350
336
  addIssue(
351
337
  ctx,
352
- ["resourceMappings", resourceIndex, "domainIds", domainIndex],
353
- `Resource mapping "${resourceMapping.id}" references domain "${domainId}" but that domain does not include resource "${resourceMapping.resourceId}"`
338
+ ["resourceMappings", resourceIndex, "featureIds", featureIndex],
339
+ `Resource mapping "${resourceMapping.id}" references feature "${featureId}" but that feature does not include resource "${resourceMapping.resourceId}"`
354
340
  );
355
341
  }
356
342
  });
@@ -377,7 +363,6 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
377
363
  var OrganizationGraphNodeKindSchema = z.enum([
378
364
  "organization",
379
365
  "feature",
380
- "domain",
381
366
  "surface",
382
367
  "entity",
383
368
  "capability",
@@ -391,7 +376,7 @@ var OrganizationGraphNodeSchema = z.object({
391
376
  sourceId: z.string().trim().min(1).max(255).optional(),
392
377
  description: DescriptionSchema.optional(),
393
378
  enabled: z.boolean().optional(),
394
- featureKey: FeatureKeySchema.optional(),
379
+ featureId: ModelIdSchema.optional(),
395
380
  surfaceType: SurfaceTypeSchema.optional(),
396
381
  resourceType: z.enum(["workflow", "agent", "trigger", "integration", "external", "human_checkpoint"]).optional()
397
382
  });
@@ -462,9 +447,6 @@ function ensureResourceNode(nodes, seen, resourceNodesById, resourceId) {
462
447
  sourceId: resourceId
463
448
  });
464
449
  }
465
- function titleCase(value) {
466
- return value.replace(/[-_.]+/g, " ").replace(/\s+/g, " ").trim().split(" ").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
467
- }
468
450
  function normalizeCommandViewResourceType(resourceType) {
469
451
  return resourceType === "human" ? "human_checkpoint" : resourceType;
470
452
  }
@@ -493,34 +475,9 @@ function buildOrganizationGraph(input) {
493
475
  label: "Organization Model"
494
476
  };
495
477
  pushUniqueNode(nodes, nodeIds, organizationNode);
496
- const featureEntries = Object.entries(organizationModel.features.enabled).map(([featureKey, enabled]) => {
497
- const key = featureKey;
498
- return {
499
- key: featureKey,
500
- enabled,
501
- label: organizationModel.features.labels[key] ?? titleCase(featureKey)
502
- };
503
- }).sort((a, b) => a.key.localeCompare(b.key));
504
- for (const feature of featureEntries) {
505
- const id = nodeId("feature", feature.key);
506
- pushUniqueNode(nodes, nodeIds, {
507
- id,
508
- kind: "feature",
509
- label: feature.label,
510
- sourceId: feature.key,
511
- enabled: feature.enabled,
512
- featureKey: feature.key
513
- });
514
- pushUniqueEdge(edges, edgeIds, {
515
- id: edgeId("contains", organizationNode.id, id),
516
- kind: "contains",
517
- sourceId: organizationNode.id,
518
- targetId: id
519
- });
520
- }
521
- const domainMap = /* @__PURE__ */ new Map();
522
- for (const domain of organizationModel.domains) {
523
- domainMap.set(domain.id, domain);
478
+ const featureMap = /* @__PURE__ */ new Map();
479
+ for (const feature of organizationModel.features) {
480
+ featureMap.set(feature.id, feature);
524
481
  }
525
482
  const surfaceMap = /* @__PURE__ */ new Map();
526
483
  for (const surface of organizationModel.navigation.surfaces) {
@@ -528,7 +485,9 @@ function buildOrganizationGraph(input) {
528
485
  }
529
486
  const entityIds = /* @__PURE__ */ new Set();
530
487
  const capabilityIds = /* @__PURE__ */ new Set();
531
- const resourceMappings = [...organizationModel.resourceMappings].sort((a, b) => a.resourceId.localeCompare(b.resourceId));
488
+ const resourceMappings = [...organizationModel.resourceMappings].sort(
489
+ (a, b) => a.resourceId.localeCompare(b.resourceId)
490
+ );
532
491
  for (const resourceMapping of resourceMappings) {
533
492
  for (const entityId of resourceMapping.entityIds) {
534
493
  entityIds.add(entityId);
@@ -537,14 +496,16 @@ function buildOrganizationGraph(input) {
537
496
  capabilityIds.add(capabilityId);
538
497
  }
539
498
  }
540
- for (const domain of [...organizationModel.domains].sort((a, b) => a.id.localeCompare(b.id))) {
541
- const id = nodeId("domain", domain.id);
499
+ for (const feature of [...organizationModel.features].sort((a, b) => a.id.localeCompare(b.id))) {
500
+ const id = nodeId("feature", feature.id);
542
501
  pushUniqueNode(nodes, nodeIds, {
543
502
  id,
544
- kind: "domain",
545
- label: domain.label,
546
- sourceId: domain.id,
547
- description: domain.description
503
+ kind: "feature",
504
+ label: feature.label,
505
+ sourceId: feature.id,
506
+ description: feature.description,
507
+ enabled: feature.enabled,
508
+ featureId: feature.id
548
509
  });
549
510
  pushUniqueEdge(edges, edgeIds, {
550
511
  id: edgeId("contains", organizationNode.id, id),
@@ -552,13 +513,13 @@ function buildOrganizationGraph(input) {
552
513
  sourceId: organizationNode.id,
553
514
  targetId: id
554
515
  });
555
- for (const entityId of domain.entityIds) {
516
+ for (const entityId of feature.entityIds) {
556
517
  entityIds.add(entityId);
557
518
  }
558
- for (const capabilityId of domain.capabilityIds) {
519
+ for (const capabilityId of feature.capabilityIds) {
559
520
  capabilityIds.add(capabilityId);
560
521
  }
561
- for (const surfaceId of domain.surfaceIds) {
522
+ for (const surfaceId of feature.surfaceIds) {
562
523
  const surface = surfaceMap.get(surfaceId);
563
524
  if (surface) {
564
525
  pushUniqueEdge(edges, edgeIds, {
@@ -586,21 +547,21 @@ function buildOrganizationGraph(input) {
586
547
  sourceId: organizationNode.id,
587
548
  targetId: id
588
549
  });
589
- if (surface.featureKey) {
550
+ if (surface.featureId) {
590
551
  pushUniqueEdge(edges, edgeIds, {
591
- id: edgeId("exposes", nodeId("feature", surface.featureKey), id),
552
+ id: edgeId("exposes", nodeId("feature", surface.featureId), id),
592
553
  kind: "exposes",
593
- sourceId: nodeId("feature", surface.featureKey),
554
+ sourceId: nodeId("feature", surface.featureId),
594
555
  targetId: id
595
556
  });
596
557
  }
597
- for (const domainId of surface.domainIds) {
598
- if (domainMap.has(domainId)) {
558
+ for (const featureId of surface.featureIds) {
559
+ if (featureMap.has(featureId)) {
599
560
  pushUniqueEdge(edges, edgeIds, {
600
- id: edgeId("references", id, nodeId("domain", domainId)),
561
+ id: edgeId("references", id, nodeId("feature", featureId)),
601
562
  kind: "references",
602
563
  sourceId: id,
603
- targetId: nodeId("domain", domainId)
564
+ targetId: nodeId("feature", featureId)
604
565
  });
605
566
  }
606
567
  }
@@ -667,13 +628,13 @@ function buildOrganizationGraph(input) {
667
628
  sourceId: organizationNode.id,
668
629
  targetId: id
669
630
  });
670
- for (const domainId of resourceMapping.domainIds) {
671
- if (domainMap.has(domainId)) {
631
+ for (const featureId of resourceMapping.featureIds) {
632
+ if (featureMap.has(featureId)) {
672
633
  pushUniqueEdge(edges, edgeIds, {
673
- id: edgeId("maps_to", id, nodeId("domain", domainId)),
634
+ id: edgeId("maps_to", id, nodeId("feature", featureId)),
674
635
  kind: "maps_to",
675
636
  sourceId: id,
676
- targetId: nodeId("domain", domainId)
637
+ targetId: nodeId("feature", featureId)
677
638
  });
678
639
  }
679
640
  }
@@ -718,13 +679,13 @@ function buildOrganizationGraph(input) {
718
679
  description: resource.description,
719
680
  resourceType: normalizeCommandViewResourceType(resource.type)
720
681
  });
721
- for (const domainId of resource.domains ?? []) {
722
- if (domainMap.has(domainId)) {
682
+ for (const featureId of resource.domains ?? []) {
683
+ if (featureMap.has(featureId)) {
723
684
  pushUniqueEdge(edges, edgeIds, {
724
- id: edgeId("references", resourceNode.id, nodeId("domain", domainId), "domain"),
685
+ id: edgeId("references", resourceNode.id, nodeId("feature", featureId), "feature"),
725
686
  kind: "references",
726
687
  sourceId: resourceNode.id,
727
- targetId: nodeId("domain", domainId)
688
+ targetId: nodeId("feature", featureId)
728
689
  });
729
690
  }
730
691
  }
@@ -4291,8 +4252,7 @@ function CommandQueueDetailPage({
4291
4252
  // src/features/operations/organization-graph/organizationGraphDetail.ts
4292
4253
  var NODE_KIND_LABELS = {
4293
4254
  organization: "Organization root",
4294
- feature: "Feature gate",
4295
- domain: "Domain boundary",
4255
+ feature: "Feature",
4296
4256
  surface: "Surface",
4297
4257
  entity: "Entity",
4298
4258
  capability: "Capability",
@@ -4300,11 +4260,10 @@ var NODE_KIND_LABELS = {
4300
4260
  };
4301
4261
  var NODE_KIND_MEANINGS = {
4302
4262
  organization: "The root of the shared organization model and the parent for every derived node.",
4303
- feature: "A feature gate that enables or disables downstream surfaces and model surfaces.",
4304
- domain: "A bounded business domain that groups related surfaces, capabilities, and entities.",
4305
- surface: "A user-facing or operational surface that exposes domain behavior in the model.",
4263
+ feature: "A feature that enables or disables downstream surfaces and model surfaces.",
4264
+ surface: "A user-facing or operational surface that exposes feature behavior in the model.",
4306
4265
  entity: "A shared business concept that can be referenced by surfaces, resources, or capabilities.",
4307
- capability: "A reusable capability that can be attached to a domain or surface.",
4266
+ capability: "A reusable capability that can be attached to a feature or surface.",
4308
4267
  resource: "A concrete command-view or mapped resource that bridges execution topology into the model."
4309
4268
  };
4310
4269
  var EDGE_KIND_LABELS = {
@@ -4324,7 +4283,7 @@ var RELATIONSHIP_MEANINGS = {
4324
4283
  uses: "Operational dependency: the source resource relies on the target integration.",
4325
4284
  approval: "Human gate: the source resource pauses for approval at the target checkpoint."
4326
4285
  };
4327
- function titleCase2(value) {
4286
+ function titleCase(value) {
4328
4287
  return value.replace(/[-_.]+/g, " ").replace(/\s+/g, " ").trim().split(" ").filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
4329
4288
  }
4330
4289
  function getGraphIndex(graph) {
@@ -4341,10 +4300,10 @@ function getNodeMeaning(node) {
4341
4300
  return node.enabled === false ? `${baseMeaning} This feature is currently disabled in the organization model.` : `${baseMeaning} This feature is currently enabled in the organization model.`;
4342
4301
  }
4343
4302
  if (node.kind === "surface" && node.surfaceType) {
4344
- return `${baseMeaning} Surface type: ${titleCase2(node.surfaceType)}.`;
4303
+ return `${baseMeaning} Surface type: ${titleCase(node.surfaceType)}.`;
4345
4304
  }
4346
4305
  if (node.kind === "resource" && node.resourceType) {
4347
- return `${baseMeaning} Resource type: ${titleCase2(node.resourceType)}.`;
4306
+ return `${baseMeaning} Resource type: ${titleCase(node.resourceType)}.`;
4348
4307
  }
4349
4308
  if (node.description) {
4350
4309
  return `${baseMeaning} ${node.description}`;
@@ -4396,7 +4355,11 @@ function buildNodeState(graph, node, nodesById) {
4396
4355
  incidentEdges.map((edge) => edge.sourceId === node.id ? nodesById.get(edge.targetId) : nodesById.get(edge.sourceId)).filter((value) => Boolean(value))
4397
4356
  );
4398
4357
  const relatedNodes = adjacentNodes.slice().sort((left, right) => left.label.localeCompare(right.label)).map((adjacentNode) => {
4399
- const contexts = incidentEdges.filter((edge) => edge.sourceId === node.id ? edge.targetId === adjacentNode.id : edge.sourceId === adjacentNode.id).map((edge) => `${edge.sourceId === node.id ? "outgoing" : "incoming"} via ${edge.label ?? getEdgeKindLabel(edge.kind).toLowerCase()}`);
4358
+ const contexts = incidentEdges.filter(
4359
+ (edge) => edge.sourceId === node.id ? edge.targetId === adjacentNode.id : edge.sourceId === adjacentNode.id
4360
+ ).map(
4361
+ (edge) => `${edge.sourceId === node.id ? "outgoing" : "incoming"} via ${edge.label ?? getEdgeKindLabel(edge.kind).toLowerCase()}`
4362
+ );
4400
4363
  return {
4401
4364
  id: adjacentNode.id,
4402
4365
  label: adjacentNode.label,
@@ -4424,14 +4387,14 @@ function buildNodeState(graph, node, nodesById) {
4424
4387
  if (node.enabled !== void 0) {
4425
4388
  metadata.push({ label: "Enabled", value: node.enabled ? "Yes" : "No" });
4426
4389
  }
4427
- if (node.featureKey) {
4428
- metadata.push({ label: "Feature Key", value: node.featureKey });
4390
+ if (node.featureId) {
4391
+ metadata.push({ label: "Feature ID", value: node.featureId });
4429
4392
  }
4430
4393
  if (node.surfaceType) {
4431
- metadata.push({ label: "Surface Type", value: titleCase2(node.surfaceType) });
4394
+ metadata.push({ label: "Surface Type", value: titleCase(node.surfaceType) });
4432
4395
  }
4433
4396
  if (node.resourceType) {
4434
- metadata.push({ label: "Resource Type", value: titleCase2(node.resourceType) });
4397
+ metadata.push({ label: "Resource Type", value: titleCase(node.resourceType) });
4435
4398
  }
4436
4399
  const meaningfulEdges = incidentEdges.filter((edge) => edge.kind !== "contains" || edge.relationshipType);
4437
4400
  return {
@@ -4441,10 +4404,18 @@ function buildNodeState(graph, node, nodesById) {
4441
4404
  operationalMeaning: getNodeMeaning(node),
4442
4405
  description: node.description,
4443
4406
  metrics: [
4444
- { label: "Connected edges", value: String(incidentEdges.length), hint: "All direct relationships attached to this node" },
4407
+ {
4408
+ label: "Connected edges",
4409
+ value: String(incidentEdges.length),
4410
+ hint: "All direct relationships attached to this node"
4411
+ },
4445
4412
  { label: "Incoming", value: String(incomingEdges.length), hint: "Edges that point into this node" },
4446
4413
  { label: "Outgoing", value: String(outgoingEdges.length), hint: "Edges that start at this node" },
4447
- { label: "Meaningful links", value: String(meaningfulEdges.length), hint: "Edges with semantic or operational meaning" }
4414
+ {
4415
+ label: "Meaningful links",
4416
+ value: String(meaningfulEdges.length),
4417
+ hint: "Edges with semantic or operational meaning"
4418
+ }
4448
4419
  ],
4449
4420
  metadata,
4450
4421
  adjacentKindCounts: countByKind(adjacentNodes),
@@ -4525,19 +4496,35 @@ function buildEdgeState(graph, edge, nodesById) {
4525
4496
  metadata.push({ label: "Label", value: edge.label });
4526
4497
  }
4527
4498
  if (edge.relationshipType) {
4528
- metadata.push({ label: "Relationship", value: titleCase2(edge.relationshipType) });
4499
+ metadata.push({ label: "Relationship", value: titleCase(edge.relationshipType) });
4529
4500
  }
4530
4501
  return {
4531
4502
  state: "edge",
4532
4503
  title: edge.label ?? `${sourceNode?.label ?? edge.sourceId} \u2192 ${targetNode?.label ?? edge.targetId}`,
4533
- semanticCategory: edge.relationshipType ? titleCase2(edge.relationshipType) : getEdgeKindLabel(edge.kind),
4504
+ semanticCategory: edge.relationshipType ? titleCase(edge.relationshipType) : getEdgeKindLabel(edge.kind),
4534
4505
  operationalMeaning: getEdgeMeaning(edge, sourceNode, targetNode),
4535
4506
  description: edge.label,
4536
4507
  metrics: [
4537
- { label: "Source degree", value: String(sourceIncidentEdges.length), hint: "Relationships attached to the source node" },
4538
- { label: "Target degree", value: String(targetIncidentEdges.length), hint: "Relationships attached to the target node" },
4539
- { label: "Nearby nodes", value: String(adjacentNodes.length), hint: "Unique nodes in the source and target neighborhoods" },
4540
- { label: "Shared peers", value: String(sharedNeighborCount), hint: "Neighbors that appear in both node neighborhoods" }
4508
+ {
4509
+ label: "Source degree",
4510
+ value: String(sourceIncidentEdges.length),
4511
+ hint: "Relationships attached to the source node"
4512
+ },
4513
+ {
4514
+ label: "Target degree",
4515
+ value: String(targetIncidentEdges.length),
4516
+ hint: "Relationships attached to the target node"
4517
+ },
4518
+ {
4519
+ label: "Nearby nodes",
4520
+ value: String(adjacentNodes.length),
4521
+ hint: "Unique nodes in the source and target neighborhoods"
4522
+ },
4523
+ {
4524
+ label: "Shared peers",
4525
+ value: String(sharedNeighborCount),
4526
+ hint: "Neighbors that appear in both node neighborhoods"
4527
+ }
4541
4528
  ],
4542
4529
  metadata,
4543
4530
  adjacentKindCounts: countByKind(adjacentNodes),
@@ -4658,7 +4645,7 @@ function getNodeKindLabel2(kind) {
4658
4645
  return kind;
4659
4646
  }
4660
4647
  }
4661
- function titleCase3(value) {
4648
+ function titleCase2(value) {
4662
4649
  return value.charAt(0).toUpperCase() + value.slice(1);
4663
4650
  }
4664
4651
  function MetricCard({ metric }) {
@@ -4776,7 +4763,7 @@ function OrganizationGraphDetailPanel({
4776
4763
  /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
4777
4764
  /* @__PURE__ */ jsx(Badge, { variant: "light", color: "violet", children: state.semanticCategory }),
4778
4765
  state.state === "node" ? /* @__PURE__ */ jsx(Badge, { variant: "light", color: state.node.enabled === false ? "gray" : "green", children: state.node.enabled === false ? "Disabled" : "Enabled" }) : null,
4779
- state.state === "edge" && state.edge.relationshipType ? /* @__PURE__ */ jsx(Badge, { variant: "light", color: "orange", children: titleCase3(state.edge.relationshipType) }) : null
4766
+ state.state === "edge" && state.edge.relationshipType ? /* @__PURE__ */ jsx(Badge, { variant: "light", color: "orange", children: titleCase2(state.edge.relationshipType) }) : null
4780
4767
  ] }),
4781
4768
  /* @__PURE__ */ jsx(Text, { fw: 800, size: "lg", children: state.title }),
4782
4769
  /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: state.operationalMeaning })
@@ -4913,7 +4900,6 @@ function OrganizationGraphDetailPanel({
4913
4900
  var ORGANIZATION_GRAPH_NODE_KIND_ORDER = [
4914
4901
  "organization",
4915
4902
  "feature",
4916
- "domain",
4917
4903
  "surface",
4918
4904
  "entity",
4919
4905
  "capability",
@@ -4922,7 +4908,6 @@ var ORGANIZATION_GRAPH_NODE_KIND_ORDER = [
4922
4908
  var ORGANIZATION_GRAPH_NODE_KIND_LABELS = {
4923
4909
  organization: "Organization",
4924
4910
  feature: "Feature",
4925
- domain: "Domain",
4926
4911
  surface: "Surface",
4927
4912
  entity: "Entity",
4928
4913
  capability: "Capability",
@@ -4992,7 +4977,7 @@ function getOrganizationGraphNodeKindOptions(kinds = ORGANIZATION_GRAPH_NODE_KIN
4992
4977
  function matchesOrganizationGraphNodeSearch(node, search) {
4993
4978
  const query = normalizeOrganizationGraphSearch(search);
4994
4979
  if (!query) return true;
4995
- return includesQuery(node.id, query) || includesQuery(node.label, query) || includesQuery(node.description, query) || includesQuery(node.sourceId, query) || includesQuery(node.featureKey, query) || includesQuery(node.surfaceType, query) || includesQuery(node.resourceType, query) || includesQuery(node.kind, query);
4980
+ return includesQuery(node.id, query) || includesQuery(node.label, query) || includesQuery(node.description, query) || includesQuery(node.sourceId, query) || includesQuery(node.featureId, query) || includesQuery(node.surfaceType, query) || includesQuery(node.resourceType, query) || includesQuery(node.kind, query);
4996
4981
  }
4997
4982
  function matchesOrganizationGraphEdgeSearch(edge, graph, search) {
4998
4983
  const query = normalizeOrganizationGraphSearch(search);
@@ -5360,7 +5345,7 @@ function mergeStatsWithTopology(topology, stats) {
5360
5345
  }
5361
5346
 
5362
5347
  // src/features/operations/organization-graph/commandViewDrillDown.ts
5363
- function titleCase4(value) {
5348
+ function titleCase3(value) {
5364
5349
  return value.replace(/[-_.]+/g, " ").replace(/\s+/g, " ").trim().split(" ").filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
5365
5350
  }
5366
5351
  function getResourceHref(resourceType, resourceId) {
@@ -5418,7 +5403,7 @@ function getExecutionDescription(execution) {
5418
5403
  if (execution.status === "completed") {
5419
5404
  return "Completed successfully";
5420
5405
  }
5421
- return titleCase4(execution.status);
5406
+ return titleCase3(execution.status);
5422
5407
  }
5423
5408
  function getTaskDescription(task) {
5424
5409
  if (task.description) {
@@ -5443,8 +5428,8 @@ function buildCommandViewDrillDownSections({
5443
5428
  if ((node.resourceType === "agent" || node.resourceType === "workflow") && executions) {
5444
5429
  sections.push({
5445
5430
  title: "Recent executions",
5446
- description: `Latest runs for this ${titleCase4(node.resourceType)} in the ${timeRange} window.`,
5447
- emptyMessage: `No executions were recorded for this ${titleCase4(node.resourceType).toLowerCase()} in the current window.`,
5431
+ description: `Latest runs for this ${titleCase3(node.resourceType)} in the ${timeRange} window.`,
5432
+ emptyMessage: `No executions were recorded for this ${titleCase3(node.resourceType).toLowerCase()} in the current window.`,
5448
5433
  primaryAction: resourceHref ? {
5449
5434
  label: "Open resource",
5450
5435
  href: resourceHref
@@ -5487,16 +5472,14 @@ function buildCommandViewDrillDownSections({
5487
5472
  var NODE_KIND_ORDER = {
5488
5473
  organization: 0,
5489
5474
  feature: 1,
5490
- domain: 2,
5491
- surface: 3,
5492
- capability: 4,
5493
- entity: 5,
5494
- resource: 6
5475
+ surface: 2,
5476
+ capability: 3,
5477
+ entity: 4,
5478
+ resource: 5
5495
5479
  };
5496
5480
  var NODE_KIND_LABEL = {
5497
5481
  organization: "Organization",
5498
5482
  feature: "Feature",
5499
- domain: "Domain",
5500
5483
  surface: "Surface",
5501
5484
  capability: "Capability",
5502
5485
  entity: "Entity",
@@ -5940,7 +5923,6 @@ function getNodeThemeByKind(tokens) {
5940
5923
  const accentByKind = {
5941
5924
  organization: mixColors(tokens.primary, tokens.text, 0.35),
5942
5925
  feature: tokens.primary,
5943
- domain: mixColors(tokens.primary, tokens.textDimmed, 0.5),
5944
5926
  surface: mixColors(tokens.primary, tokens.success, 0.48),
5945
5927
  entity: mixColors(tokens.primary, tokens.error, 0.4),
5946
5928
  capability: mixColors(tokens.primary, tokens.success, 0.72),
@@ -5987,9 +5969,7 @@ function getNodeSize(kind) {
5987
5969
  return { width: 220, height: 92 };
5988
5970
  }
5989
5971
  function getNodeScore(node, graph) {
5990
- const relationshipCount = graph.edges.filter(
5991
- (edge) => edge.sourceId === node.id || edge.targetId === node.id
5992
- ).length;
5972
+ const relationshipCount = graph.edges.filter((edge) => edge.sourceId === node.id || edge.targetId === node.id).length;
5993
5973
  return Math.max(1, relationshipCount);
5994
5974
  }
5995
5975
  function toCytoscapeElements(graph, tokens) {
@@ -6201,7 +6181,9 @@ function syncGraphClasses(cy, selectedElement, traceResult) {
6201
6181
  cy.elements().removeClass(
6202
6182
  "is-faded is-context is-selected is-connected is-trace-node is-trace-edge is-trace-endpoint"
6203
6183
  );
6204
- const hasTrace = Boolean(traceResult && (traceResult.highlightNodeIds.length > 0 || traceResult.highlightEdgeIds.length > 0));
6184
+ const hasTrace = Boolean(
6185
+ traceResult && (traceResult.highlightNodeIds.length > 0 || traceResult.highlightEdgeIds.length > 0)
6186
+ );
6205
6187
  if (!selectedElement && !hasTrace) {
6206
6188
  return;
6207
6189
  }
@@ -6589,15 +6571,7 @@ function OrganizationGraphPage({ lens = "default", timeRange = "24h" }) {
6589
6571
  children: "Clear trace"
6590
6572
  }
6591
6573
  ),
6592
- /* @__PURE__ */ jsx(
6593
- Button,
6594
- {
6595
- size: "xs",
6596
- variant: "subtle",
6597
- onClick: resetFilters,
6598
- children: "Reset filters"
6599
- }
6600
- )
6574
+ /* @__PURE__ */ jsx(Button, { size: "xs", variant: "subtle", onClick: resetFilters, children: "Reset filters" })
6601
6575
  ] })
6602
6576
  ] }) }),
6603
6577
  /* @__PURE__ */ jsxs(
@@ -6611,44 +6585,99 @@ function OrganizationGraphPage({ lens = "default", timeRange = "24h" }) {
6611
6585
  children: [
6612
6586
  /* @__PURE__ */ jsx(Tabs.Panel, { value: "controls", pt: 0, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
6613
6587
  /* @__PURE__ */ jsxs(SimpleGrid, { cols: { base: 1, lg: 3 }, spacing: "md", children: [
6614
- /* @__PURE__ */ jsx(Paper, { withBorder: true, p: "md", radius: "lg", style: { background: "var(--color-surface)", boxShadow: "var(--card-shadow)" }, children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
6615
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 700, children: "Filters" }),
6616
- /* @__PURE__ */ jsx(
6617
- OrganizationGraphFilterToolbar,
6588
+ /* @__PURE__ */ jsx(
6589
+ Paper,
6590
+ {
6591
+ withBorder: true,
6592
+ p: "md",
6593
+ radius: "lg",
6594
+ style: { background: "var(--color-surface)", boxShadow: "var(--card-shadow)" },
6595
+ children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
6596
+ /* @__PURE__ */ jsx(Text, { size: "sm", fw: 700, children: "Filters" }),
6597
+ /* @__PURE__ */ jsx(
6598
+ OrganizationGraphFilterToolbar,
6599
+ {
6600
+ value: filters,
6601
+ onChange: updateFilters,
6602
+ disabled: !baseGraph
6603
+ }
6604
+ )
6605
+ ] })
6606
+ }
6607
+ ),
6608
+ /* @__PURE__ */ jsxs(SimpleGrid, { cols: { base: 1, sm: 2 }, spacing: "md", style: { gridColumn: "span 2" }, children: [
6609
+ /* @__PURE__ */ jsxs(
6610
+ Card,
6618
6611
  {
6619
- value: filters,
6620
- onChange: updateFilters,
6621
- disabled: !baseGraph
6612
+ withBorder: true,
6613
+ radius: "lg",
6614
+ style: { background: "var(--color-surface)", boxShadow: "var(--card-shadow)" },
6615
+ children: [
6616
+ /* @__PURE__ */ jsx(Text, { size: "xs", tt: "uppercase", fw: 700, c: "dimmed", children: lens === "command-view" ? "Tracked runs" : "Visible nodes" }),
6617
+ /* @__PURE__ */ jsx(Text, { size: "xl", fw: 700, children: lens === "command-view" ? operationalOverview?.totalRuns ?? 0 : graph?.nodes.length ?? 0 }),
6618
+ /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: lens === "command-view" ? `${timeRange} execution window` : `of ${baseGraph?.nodes.length ?? 0} total` })
6619
+ ]
6620
+ }
6621
+ ),
6622
+ /* @__PURE__ */ jsxs(
6623
+ Card,
6624
+ {
6625
+ withBorder: true,
6626
+ radius: "lg",
6627
+ style: { background: "var(--color-surface)", boxShadow: "var(--card-shadow)" },
6628
+ children: [
6629
+ /* @__PURE__ */ jsx(Text, { size: "xs", tt: "uppercase", fw: 700, c: "dimmed", children: lens === "command-view" ? "Success rate" : "Visible edges" }),
6630
+ /* @__PURE__ */ jsx(Text, { size: "xl", fw: 700, children: lens === "command-view" ? `${Math.round(operationalOverview?.successRate ?? 0)}%` : graph?.edges.length ?? 0 }),
6631
+ /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: lens === "command-view" ? `${operationalOverview?.successCount ?? 0} successful runs` : `of ${baseGraph?.edges.length ?? 0} total` })
6632
+ ]
6633
+ }
6634
+ ),
6635
+ /* @__PURE__ */ jsxs(
6636
+ Card,
6637
+ {
6638
+ withBorder: true,
6639
+ radius: "lg",
6640
+ style: { background: "var(--color-surface)", boxShadow: "var(--card-shadow)" },
6641
+ children: [
6642
+ /* @__PURE__ */ jsx(Text, { size: "xs", tt: "uppercase", fw: 700, c: "dimmed", children: lens === "command-view" ? "Failing resources" : "Visible features" }),
6643
+ /* @__PURE__ */ jsx(Text, { size: "xl", fw: 700, children: lens === "command-view" ? operationalOverview?.topFailingResources.length ?? 0 : getGraphCountByKind(graph, "feature") }),
6644
+ /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: lens === "command-view" ? operationalOverview?.topFailingResources.length ? operationalOverview.topFailingResources.map((resource) => `${resource.label} (${resource.failureCount})`).join(", ") : "No failing resources in the current window" : `of ${getGraphCountByKind(baseGraph, "feature")} total` })
6645
+ ]
6646
+ }
6647
+ ),
6648
+ /* @__PURE__ */ jsxs(
6649
+ Card,
6650
+ {
6651
+ withBorder: true,
6652
+ radius: "lg",
6653
+ style: { background: "var(--color-surface)", boxShadow: "var(--card-shadow)" },
6654
+ children: [
6655
+ /* @__PURE__ */ jsx(Text, { size: "xs", tt: "uppercase", fw: 700, c: "dimmed", children: lens === "command-view" ? "Pending approvals" : "Visible resources" }),
6656
+ /* @__PURE__ */ jsx(Text, { size: "xl", fw: 700, children: lens === "command-view" ? operationalOverview?.pendingApprovals ?? 0 : getGraphCountByKind(graph, "resource") }),
6657
+ /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: lens === "command-view" ? `${operationalOverview?.activeHumanCheckpoints ?? 0} active checkpoint queues` : `of ${getGraphCountByKind(baseGraph, "resource")} total` })
6658
+ ]
6622
6659
  }
6623
6660
  )
6624
- ] }) }),
6625
- /* @__PURE__ */ jsxs(SimpleGrid, { cols: { base: 1, sm: 2 }, spacing: "md", style: { gridColumn: "span 2" }, children: [
6626
- /* @__PURE__ */ jsxs(Card, { withBorder: true, radius: "lg", style: { background: "var(--color-surface)", boxShadow: "var(--card-shadow)" }, children: [
6627
- /* @__PURE__ */ jsx(Text, { size: "xs", tt: "uppercase", fw: 700, c: "dimmed", children: lens === "command-view" ? "Tracked runs" : "Visible nodes" }),
6628
- /* @__PURE__ */ jsx(Text, { size: "xl", fw: 700, children: lens === "command-view" ? operationalOverview?.totalRuns ?? 0 : graph?.nodes.length ?? 0 }),
6629
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: lens === "command-view" ? `${timeRange} execution window` : `of ${baseGraph?.nodes.length ?? 0} total` })
6630
- ] }),
6631
- /* @__PURE__ */ jsxs(Card, { withBorder: true, radius: "lg", style: { background: "var(--color-surface)", boxShadow: "var(--card-shadow)" }, children: [
6632
- /* @__PURE__ */ jsx(Text, { size: "xs", tt: "uppercase", fw: 700, c: "dimmed", children: lens === "command-view" ? "Success rate" : "Visible edges" }),
6633
- /* @__PURE__ */ jsx(Text, { size: "xl", fw: 700, children: lens === "command-view" ? `${Math.round(operationalOverview?.successRate ?? 0)}%` : graph?.edges.length ?? 0 }),
6634
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: lens === "command-view" ? `${operationalOverview?.successCount ?? 0} successful runs` : `of ${baseGraph?.edges.length ?? 0} total` })
6635
- ] }),
6636
- /* @__PURE__ */ jsxs(Card, { withBorder: true, radius: "lg", style: { background: "var(--color-surface)", boxShadow: "var(--card-shadow)" }, children: [
6637
- /* @__PURE__ */ jsx(Text, { size: "xs", tt: "uppercase", fw: 700, c: "dimmed", children: lens === "command-view" ? "Failing resources" : "Visible domains" }),
6638
- /* @__PURE__ */ jsx(Text, { size: "xl", fw: 700, children: lens === "command-view" ? operationalOverview?.topFailingResources.length ?? 0 : getGraphCountByKind(graph, "domain") }),
6639
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: lens === "command-view" ? operationalOverview?.topFailingResources.length ? operationalOverview.topFailingResources.map((resource) => `${resource.label} (${resource.failureCount})`).join(", ") : "No failing resources in the current window" : `of ${getGraphCountByKind(baseGraph, "domain")} total` })
6640
- ] }),
6641
- /* @__PURE__ */ jsxs(Card, { withBorder: true, radius: "lg", style: { background: "var(--color-surface)", boxShadow: "var(--card-shadow)" }, children: [
6642
- /* @__PURE__ */ jsx(Text, { size: "xs", tt: "uppercase", fw: 700, c: "dimmed", children: lens === "command-view" ? "Pending approvals" : "Visible resources" }),
6643
- /* @__PURE__ */ jsx(Text, { size: "xl", fw: 700, children: lens === "command-view" ? operationalOverview?.pendingApprovals ?? 0 : getGraphCountByKind(graph, "resource") }),
6644
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: lens === "command-view" ? `${operationalOverview?.activeHumanCheckpoints ?? 0} active checkpoint queues` : `of ${getGraphCountByKind(baseGraph, "resource")} total` })
6645
- ] })
6646
6661
  ] })
6647
6662
  ] }),
6648
6663
  /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
6649
6664
  /* @__PURE__ */ jsx(Badge, { variant: "light", children: lens === "command-view" ? "Operations lens" : "Shared graph" }),
6650
- /* @__PURE__ */ jsx(Badge, { variant: "light", color: organizationGraph.available ? "var(--color-success)" : "var(--color-text-subtle)", children: organizationGraph.available ? "Provider graph surface ready" : "Provider graph surface missing" }),
6651
- /* @__PURE__ */ jsx(Badge, { variant: "light", color: commandViewData ? "var(--color-primary)" : "var(--color-text-subtle)", children: commandViewData ? "Topology bridged" : isLoading ? "Topology loading" : "Semantic only" }),
6665
+ /* @__PURE__ */ jsx(
6666
+ Badge,
6667
+ {
6668
+ variant: "light",
6669
+ color: organizationGraph.available ? "var(--color-success)" : "var(--color-text-subtle)",
6670
+ children: organizationGraph.available ? "Provider graph surface ready" : "Provider graph surface missing"
6671
+ }
6672
+ ),
6673
+ /* @__PURE__ */ jsx(
6674
+ Badge,
6675
+ {
6676
+ variant: "light",
6677
+ color: commandViewData ? "var(--color-primary)" : "var(--color-text-subtle)",
6678
+ children: commandViewData ? "Topology bridged" : isLoading ? "Topology loading" : "Semantic only"
6679
+ }
6680
+ ),
6652
6681
  error ? /* @__PURE__ */ jsx(Badge, { variant: "light", color: "var(--color-error)", children: "Topology unavailable" }) : null
6653
6682
  ] }),
6654
6683
  /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
@@ -6701,9 +6730,11 @@ function OrganizationGraphPage({ lens = "default", timeRange = "24h" }) {
6701
6730
  operationalOverview ? /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
6702
6731
  "Operational Snapshot: ",
6703
6732
  operationalOverview.trackedResources,
6704
- " resources, ",
6733
+ " resources,",
6734
+ " ",
6705
6735
  operationalOverview.pendingApprovals,
6706
- " pending approvals, generated ",
6736
+ " pending approvals, generated",
6737
+ " ",
6707
6738
  formatGeneratedTimestamp(operationalOverview.generatedAt)
6708
6739
  ] }) : null,
6709
6740
  /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Graph Build: semantic derivation plus bridged Command View topology" }),
@@ -6733,180 +6764,6 @@ function OrganizationGraphPage({ lens = "default", timeRange = "24h" }) {
6733
6764
  function CommandViewPage({ timeRange }) {
6734
6765
  return /* @__PURE__ */ jsx(OrganizationGraphPage, { lens: "command-view", timeRange });
6735
6766
  }
6736
- function ProjectCard({ project, onNavigate }) {
6737
- const deleteProject = useDeleteProject();
6738
- const handleClick = () => {
6739
- onNavigate(project.id);
6740
- };
6741
- const handleDelete = async (e) => {
6742
- e.stopPropagation();
6743
- if (window.confirm("Delete this project and all its runs?")) {
6744
- await deleteProject.mutateAsync(project.id);
6745
- }
6746
- };
6747
- return /* @__PURE__ */ jsx(Card, { shadow: "sm", withBorder: true, style: { cursor: "pointer" }, onClick: handleClick, children: /* @__PURE__ */ jsxs(Stack, { children: [
6748
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "flex-start", children: [
6749
- /* @__PURE__ */ jsxs(Group, { gap: "xs", align: "center", children: [
6750
- /* @__PURE__ */ jsx(IconFlask, { size: 20, color: "var(--color-primary)" }),
6751
- /* @__PURE__ */ jsx(Text, { fw: 600, lineClamp: 1, style: { fontFamily: "var(--elevasis-font-family-subtitle)" }, children: project.name })
6752
- ] }),
6753
- /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
6754
- /* @__PURE__ */ jsx(Badge, { variant: "light", size: "sm", children: project.resourceType }),
6755
- /* @__PURE__ */ jsxs(Menu, { shadow: "md", width: 150, position: "bottom-end", children: [
6756
- /* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "sm", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx(IconDotsVertical, { size: 16 }) }) }),
6757
- /* @__PURE__ */ jsx(Menu.Dropdown, { children: /* @__PURE__ */ jsx(Menu.Item, { leftSection: /* @__PURE__ */ jsx(IconTrash, { size: 14 }), color: "red", onClick: handleDelete, children: "Delete" }) })
6758
- ] })
6759
- ] })
6760
- ] }),
6761
- project.description && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", lineClamp: 1, children: project.description }),
6762
- /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
6763
- "Created ",
6764
- new Date(project.createdAt).toLocaleDateString()
6765
- ] })
6766
- ] }) });
6767
- }
6768
- function CreateProjectModal({ opened, onClose, resourceId, resourceType }) {
6769
- const createProject = useCreateProject();
6770
- const form = useForm({
6771
- initialValues: {
6772
- name: "",
6773
- description: ""
6774
- },
6775
- validate: {
6776
- name: (value) => value.trim().length === 0 ? "Name is required" : null
6777
- }
6778
- });
6779
- const handleSubmit = async (values) => {
6780
- await createProject.mutateAsync({
6781
- resourceId,
6782
- resourceType,
6783
- name: values.name.trim(),
6784
- description: values.description.trim() || void 0
6785
- });
6786
- form.reset();
6787
- onClose();
6788
- };
6789
- return /* @__PURE__ */ jsx(Modal, { opened, onClose, title: "Create Calibration Project", children: /* @__PURE__ */ jsx("form", { onSubmit: form.onSubmit(handleSubmit), children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
6790
- /* @__PURE__ */ jsx(
6791
- TextInput,
6792
- {
6793
- label: "Project Name",
6794
- placeholder: "e.g., Q1 2025 Model Selection",
6795
- required: true,
6796
- ...form.getInputProps("name")
6797
- }
6798
- ),
6799
- /* @__PURE__ */ jsx(
6800
- Textarea,
6801
- {
6802
- label: "Description",
6803
- placeholder: "Optional: Describe the goal of this calibration project",
6804
- minRows: 2,
6805
- ...form.getInputProps("description")
6806
- }
6807
- ),
6808
- /* @__PURE__ */ jsxs(Group, { justify: "flex-end", children: [
6809
- /* @__PURE__ */ jsx(Button, { variant: "subtle", onClick: onClose, children: "Cancel" }),
6810
- /* @__PURE__ */ jsx(Button, { type: "submit", loading: createProject.isPending, children: "Create Project" })
6811
- ] })
6812
- ] }) }) });
6813
- }
6814
- function CalibrationPage({ resourceId, resourceType, onProjectNavigate }) {
6815
- const [createModalOpen, setCreateModalOpen] = useState(false);
6816
- const { data: projects, isLoading, error } = useCalibrationProjects(resourceId, resourceType);
6817
- if (isLoading) {
6818
- return /* @__PURE__ */ jsx(Center, { p: "xl", children: /* @__PURE__ */ jsx(Loader, {}) });
6819
- }
6820
- if (error) {
6821
- return /* @__PURE__ */ jsx(Alert, { icon: /* @__PURE__ */ jsx(IconAlertCircle, { size: 16 }), title: "Error", color: "red", children: "Failed to load calibration projects. Please try again." });
6822
- }
6823
- return /* @__PURE__ */ jsx(PageContainer, { children: /* @__PURE__ */ jsxs(Stack, { children: [
6824
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "center", children: [
6825
- /* @__PURE__ */ jsxs("div", { children: [
6826
- /* @__PURE__ */ jsx(Title, { order: 3, children: "Calibration Lab" }),
6827
- /* @__PURE__ */ jsx(Text, { c: "dimmed", size: "sm", children: "Compare AI configurations and optimize performance" })
6828
- ] }),
6829
- /* @__PURE__ */ jsx(Button, { leftSection: /* @__PURE__ */ jsx(IconPlus, { size: 16 }), onClick: () => setCreateModalOpen(true), children: "New Project" })
6830
- ] }),
6831
- projects && projects.length === 0 ? /* @__PURE__ */ jsx(
6832
- EmptyState,
6833
- {
6834
- icon: IconAdjustments,
6835
- title: "No projects yet",
6836
- description: "Create your first calibration project to start comparing AI configurations."
6837
- }
6838
- ) : /* @__PURE__ */ jsx(Stack, { children: projects?.map((project) => /* @__PURE__ */ jsx(ProjectCard, { project, onNavigate: onProjectNavigate }, project.id)) }),
6839
- /* @__PURE__ */ jsx(
6840
- CreateProjectModal,
6841
- {
6842
- opened: createModalOpen,
6843
- onClose: () => setCreateModalOpen(false),
6844
- resourceId,
6845
- resourceType
6846
- }
6847
- )
6848
- ] }) });
6849
- }
6850
- function CalibrationProjectDetailPage({
6851
- projectId,
6852
- calibrationRootPath,
6853
- renderRunCard,
6854
- renderCreateModal,
6855
- runs,
6856
- runsLoading
6857
- }) {
6858
- const [createModalOpen, setCreateModalOpen] = useState(false);
6859
- const { organizationReady } = useInitialization();
6860
- const { data: project, isLoading: projectLoading, error: projectError } = useCalibrationProject(projectId);
6861
- const projectNotFound = !projectLoading && (projectError || !project);
6862
- const isLoading = projectLoading || runsLoading;
6863
- if (!organizationReady || isLoading) return /* @__PURE__ */ jsx(SubshellLoader, {});
6864
- if (!project || projectNotFound) {
6865
- return null;
6866
- }
6867
- const runCount = runs?.length ?? 0;
6868
- const caption = `${project.resourceType} \xB7 ${runCount} run${runCount !== 1 ? "s" : ""}`;
6869
- return /* @__PURE__ */ jsxs(Stack, { children: [
6870
- /* @__PURE__ */ jsx(
6871
- PageTitleCaption,
6872
- {
6873
- title: project.name,
6874
- caption,
6875
- rightSection: /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
6876
- /* @__PURE__ */ jsx(
6877
- Button,
6878
- {
6879
- variant: "light",
6880
- size: "sm",
6881
- leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }),
6882
- component: Link,
6883
- to: calibrationRootPath,
6884
- children: "Calibration"
6885
- }
6886
- ),
6887
- /* @__PURE__ */ jsx(Button, { leftSection: /* @__PURE__ */ jsx(IconPlus, { size: 16 }), onClick: () => setCreateModalOpen(true), children: "New Run" })
6888
- ] })
6889
- }
6890
- ),
6891
- runs && runs.length === 0 ? /* @__PURE__ */ jsx(Alert, { color: "gray", title: "No runs yet", children: "Create your first calibration run to start testing configurations." }) : /* @__PURE__ */ jsx(Stack, { gap: "md", children: runs?.map((run) => renderRunCard({ run, projectId })) }),
6892
- renderCreateModal({
6893
- opened: createModalOpen,
6894
- onClose: () => setCreateModalOpen(false),
6895
- projectId
6896
- })
6897
- ] });
6898
- }
6899
- function CalibrationProjectsPage({ onNavigateToProject }) {
6900
- const { organizationReady } = useInitialization();
6901
- const { data: projects, isLoading } = useAllCalibrationProjects();
6902
- if (!organizationReady || isLoading) return /* @__PURE__ */ jsx(SubshellLoader, {});
6903
- const projectCount = projects?.length ?? 0;
6904
- const caption = `${projectCount} Project${projectCount !== 1 ? "s" : ""}`;
6905
- return /* @__PURE__ */ jsxs(Stack, { children: [
6906
- /* @__PURE__ */ jsx(PageTitleCaption, { title: "Calibration Lab", caption }),
6907
- projects && projects.length > 0 && /* @__PURE__ */ jsx(SimpleGrid, { cols: { base: 1, md: 2 }, children: projects.map((project) => /* @__PURE__ */ jsx(ProjectCard, { project, onNavigate: onNavigateToProject }, project.id)) })
6908
- ] });
6909
- }
6910
6767
  var FILTER_STATE_ICONS2 = {
6911
6768
  neutral: IconCircleDashed,
6912
6769
  include: IconCircleCheck,
@@ -7259,581 +7116,6 @@ function CommandViewSidebarContent({ timeRange }) {
7259
7116
  }
7260
7117
  );
7261
7118
  }
7262
- function ComparisonTable({ run, logs, metrics }) {
7263
- if (run.results.length === 0) {
7264
- return /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsx(Text, { c: "dimmed", ta: "center", children: "No results yet. Execute the calibration run to see comparisons." }) });
7265
- }
7266
- return /* @__PURE__ */ jsx(Stack, { children: run.results.map((result, index) => /* @__PURE__ */ jsx(ResultCard, { result, run, logs, metrics }, index)) });
7267
- }
7268
- function ResultCard({ result, run, logs, metrics }) {
7269
- const [expanded, setExpanded] = useState(false);
7270
- const isSingleResult = "executionId" in result;
7271
- const executionId = isSingleResult ? result.executionId : result.sessionId;
7272
- const inputIndex = isSingleResult ? result.inputIndex : 0;
7273
- const log = logs[executionId];
7274
- const metric = metrics[executionId];
7275
- const statusColors = {
7276
- pending: "gray",
7277
- running: "blue",
7278
- completed: "green",
7279
- failed: "red"
7280
- };
7281
- return /* @__PURE__ */ jsxs(
7282
- Paper,
7283
- {
7284
- withBorder: true,
7285
- style: {
7286
- cursor: "pointer",
7287
- transition: "background-color var(--duration-fast) var(--easing)"
7288
- },
7289
- children: [
7290
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", wrap: "nowrap", onClick: () => setExpanded(!expanded), children: [
7291
- /* @__PURE__ */ jsxs(Group, { gap: "md", wrap: "nowrap", children: [
7292
- /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "sm", children: expanded ? /* @__PURE__ */ jsx(IconChevronDown, { size: 16 }) : /* @__PURE__ */ jsx(IconChevronRight, { size: 16 }) }),
7293
- /* @__PURE__ */ jsxs(Box, { children: [
7294
- /* @__PURE__ */ jsx(Text, { fw: 600, size: "sm", style: { fontFamily: "var(--mantine-font-family-headings)" }, children: result.variantName }),
7295
- run.executionMode === "single" && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
7296
- "Input #",
7297
- inputIndex + 1
7298
- ] })
7299
- ] })
7300
- ] }),
7301
- /* @__PURE__ */ jsxs(Group, { gap: "md", wrap: "nowrap", children: [
7302
- metric?.totalDuration && metric.totalDuration > 0 && /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
7303
- /* @__PURE__ */ jsx(IconClock, { size: 14, style: { opacity: 0.5 } }),
7304
- /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
7305
- (metric.totalDuration / 1e3).toFixed(2),
7306
- "s"
7307
- ] })
7308
- ] }),
7309
- metric?.totalCost && metric.totalCost > 0 && /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
7310
- /* @__PURE__ */ jsx(IconCoin, { size: 14, style: { opacity: 0.5 } }),
7311
- /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
7312
- "$",
7313
- metric.totalCost.toFixed(4)
7314
- ] })
7315
- ] }),
7316
- run.gradingRubric && result.grade && /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
7317
- result.grade.passed ? /* @__PURE__ */ jsx(IconCheck, { size: 14, color: "var(--color-success)" }) : /* @__PURE__ */ jsx(IconX, { size: 14, color: "var(--color-error)" }),
7318
- /* @__PURE__ */ jsxs(Text, { size: "sm", fw: 500, children: [
7319
- (result.grade.score * 100).toFixed(0),
7320
- "%"
7321
- ] })
7322
- ] }),
7323
- /* @__PURE__ */ jsx(Badge, { color: statusColors[result.status], size: "sm", children: result.status })
7324
- ] })
7325
- ] }),
7326
- /* @__PURE__ */ jsx(Collapse, { in: expanded, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", mt: "md", pt: "md", style: { borderTop: "1px solid var(--color-border)" }, children: [
7327
- run.testInputs[inputIndex] !== void 0 && /* @__PURE__ */ jsxs(Box, { children: [
7328
- /* @__PURE__ */ jsx(Text, { size: "xs", fw: 500, c: "dimmed", mb: "xs", children: "INPUT" }),
7329
- /* @__PURE__ */ jsx(Paper, { style: { background: "var(--color-background)" }, children: /* @__PURE__ */ jsx(JsonViewer, { data: run.testInputs[inputIndex], maxHeight: "200px" }) })
7330
- ] }),
7331
- /* @__PURE__ */ jsxs(Box, { children: [
7332
- /* @__PURE__ */ jsx(Text, { size: "xs", fw: 500, c: "dimmed", mb: "xs", children: "OUTPUT" }),
7333
- /* @__PURE__ */ jsx(Paper, { style: { background: "var(--color-background)" }, children: log?.output ? /* @__PURE__ */ jsx(JsonViewer, { data: log.output, maxHeight: "300px" }) : result.errorMessage ? /* @__PURE__ */ jsx(Text, { c: "red", size: "sm", children: result.errorMessage }) : /* @__PURE__ */ jsx(Text, { c: "dimmed", size: "sm", children: "No output available" }) })
7334
- ] }),
7335
- log?.error && /* @__PURE__ */ jsxs(Box, { children: [
7336
- /* @__PURE__ */ jsx(Text, { size: "xs", fw: 500, c: "red", mb: "xs", children: "ERROR" }),
7337
- /* @__PURE__ */ jsxs(Paper, { style: { background: "var(--color-background)" }, children: [
7338
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "red", children: log.error.message }),
7339
- log.error.category && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", mt: "xs", children: [
7340
- "Category: ",
7341
- log.error.category
7342
- ] })
7343
- ] })
7344
- ] }),
7345
- result.grade && /* @__PURE__ */ jsxs(Box, { children: [
7346
- /* @__PURE__ */ jsx(Text, { size: "xs", fw: 500, c: "dimmed", mb: "xs", children: "GRADE DETAILS" }),
7347
- /* @__PURE__ */ jsx(Paper, { style: { background: "var(--color-background)" }, children: /* @__PURE__ */ jsx(Stack, { gap: "xs", children: Object.entries(result.grade.details).map(([criterion, detail]) => {
7348
- const d = detail;
7349
- return /* @__PURE__ */ jsxs(Group, { justify: "space-between", wrap: "nowrap", children: [
7350
- /* @__PURE__ */ jsx(Text, { size: "sm", children: criterion }),
7351
- /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
7352
- /* @__PURE__ */ jsxs(Badge, { size: "sm", color: d.score >= 0.7 ? "green" : d.score >= 0.4 ? "yellow" : "red", children: [
7353
- (d.score * 100).toFixed(0),
7354
- "%"
7355
- ] }),
7356
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { maxWidth: 300 }, lineClamp: 1, children: d.justification })
7357
- ] })
7358
- ] }, criterion);
7359
- }) }) })
7360
- ] }),
7361
- result.gradeError && /* @__PURE__ */ jsxs(Box, { children: [
7362
- /* @__PURE__ */ jsx(Text, { size: "xs", fw: 500, c: "red", mb: "xs", children: "GRADING ERROR" }),
7363
- /* @__PURE__ */ jsx(Paper, { style: { background: "var(--color-background)" }, children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "red", children: result.gradeError }) })
7364
- ] })
7365
- ] }) })
7366
- ]
7367
- }
7368
- );
7369
- }
7370
- function GradingPanel({ run, rubric }) {
7371
- const variantSummaries = run.configVariants.map((variant) => {
7372
- const variantResults = run.results.filter((r) => r.variantName === variant.variantName);
7373
- const gradedResults = variantResults.filter((r) => r.grade);
7374
- const avgScore = gradedResults.length > 0 ? gradedResults.reduce((sum, r) => sum + (r.grade?.score ?? 0), 0) / gradedResults.length : null;
7375
- const passRate = gradedResults.length > 0 ? gradedResults.filter((r) => r.grade?.passed).length / gradedResults.length : null;
7376
- return {
7377
- variantName: variant.variantName,
7378
- avgScore,
7379
- passRate,
7380
- total: variantResults.length,
7381
- graded: gradedResults.length
7382
- };
7383
- });
7384
- return /* @__PURE__ */ jsxs(Stack, { gap: "lg", children: [
7385
- /* @__PURE__ */ jsxs(Paper, { withBorder: true, children: [
7386
- /* @__PURE__ */ jsx(Title, { order: 4, mb: "md", children: "Grading Rubric" }),
7387
- /* @__PURE__ */ jsxs(Text, { size: "sm", mb: "md", children: [
7388
- "Passing threshold: ",
7389
- (rubric.passingThreshold * 100).toFixed(0),
7390
- "%"
7391
- ] }),
7392
- /* @__PURE__ */ jsxs(Table, { children: [
7393
- /* @__PURE__ */ jsx(Table.Thead, { children: /* @__PURE__ */ jsxs(Table.Tr, { children: [
7394
- /* @__PURE__ */ jsx(Table.Th, { children: "Criterion" }),
7395
- /* @__PURE__ */ jsx(Table.Th, { children: "Weight" }),
7396
- /* @__PURE__ */ jsx(Table.Th, { children: "Description" })
7397
- ] }) }),
7398
- /* @__PURE__ */ jsx(Table.Tbody, { children: rubric.criteria.map((criterion, i) => /* @__PURE__ */ jsxs(Table.Tr, { children: [
7399
- /* @__PURE__ */ jsx(Table.Td, { fw: 500, children: criterion.name }),
7400
- /* @__PURE__ */ jsxs(Table.Td, { children: [
7401
- (criterion.weight * 100).toFixed(0),
7402
- "%"
7403
- ] }),
7404
- /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: criterion.description }) })
7405
- ] }, i)) })
7406
- ] })
7407
- ] }),
7408
- /* @__PURE__ */ jsxs(Paper, { withBorder: true, children: [
7409
- /* @__PURE__ */ jsx(Title, { order: 4, mb: "md", children: "Results by Variant" }),
7410
- /* @__PURE__ */ jsx(Stack, { gap: "md", children: variantSummaries.map((summary, i) => /* @__PURE__ */ jsxs(Paper, { withBorder: true, children: [
7411
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", mb: "xs", children: [
7412
- /* @__PURE__ */ jsx(Text, { fw: 500, children: summary.variantName }),
7413
- summary.avgScore !== null && /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
7414
- /* @__PURE__ */ jsx(
7415
- ThemeIcon,
7416
- {
7417
- size: "sm",
7418
- color: summary.avgScore >= rubric.passingThreshold ? "green" : "red",
7419
- variant: "light",
7420
- children: summary.avgScore >= rubric.passingThreshold ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconX, { size: 14 })
7421
- }
7422
- ),
7423
- /* @__PURE__ */ jsxs(Text, { fw: 500, children: [
7424
- (summary.avgScore * 100).toFixed(0),
7425
- "%"
7426
- ] })
7427
- ] })
7428
- ] }),
7429
- summary.avgScore !== null ? /* @__PURE__ */ jsxs(Fragment, { children: [
7430
- /* @__PURE__ */ jsx(
7431
- Progress,
7432
- {
7433
- value: summary.avgScore * 100,
7434
- color: summary.avgScore >= rubric.passingThreshold ? "green" : "red",
7435
- size: "sm",
7436
- mb: "xs"
7437
- }
7438
- ),
7439
- /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
7440
- "Pass rate: ",
7441
- summary.passRate !== null ? `${(summary.passRate * 100).toFixed(0)}%` : "-",
7442
- " \xB7",
7443
- " ",
7444
- summary.graded,
7445
- "/",
7446
- summary.total,
7447
- " graded"
7448
- ] })
7449
- ] }) : /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Not graded yet" })
7450
- ] }, i)) })
7451
- ] })
7452
- ] });
7453
- }
7454
- function CalibrationProgress({ runId, manager, apiUrl }) {
7455
- const { connected, events, summary, isComplete, error } = useCalibrationSSE({
7456
- runId,
7457
- manager,
7458
- apiUrl,
7459
- enabled: true
7460
- });
7461
- const executionStarted = events.filter((e) => e.type === "execution-started" || e.type === "session-started").length;
7462
- const executionCompleted = events.filter(
7463
- (e) => e.type === "execution-completed" || e.type === "session-completed"
7464
- ).length;
7465
- const executionFailed = events.filter((e) => e.type === "execution-failed").length;
7466
- const gradingCompleted = events.filter((e) => e.type === "grading-completed").length;
7467
- const progressPercent = summary ? (summary.completed + summary.failed) / summary.total * 100 : executionStarted > 0 ? executionCompleted / executionStarted * 100 : 0;
7468
- return /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
7469
- /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
7470
- connected ? /* @__PURE__ */ jsx(Badge, { color: "green", leftSection: /* @__PURE__ */ jsx(Loader, { size: 10 }), children: "Live" }) : /* @__PURE__ */ jsx(Badge, { color: "gray", children: "Connecting..." }),
7471
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: isComplete ? "Calibration complete" : "Calibration in progress..." })
7472
- ] }),
7473
- /* @__PURE__ */ jsxs("div", { children: [
7474
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", mb: "xs", children: [
7475
- /* @__PURE__ */ jsx(Text, { size: "sm", children: "Progress" }),
7476
- /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
7477
- executionCompleted,
7478
- "/",
7479
- executionStarted || "?",
7480
- " executions"
7481
- ] })
7482
- ] }),
7483
- /* @__PURE__ */ jsx(
7484
- Progress,
7485
- {
7486
- value: progressPercent,
7487
- color: error ? "red" : isComplete ? "green" : void 0,
7488
- animated: !isComplete
7489
- }
7490
- )
7491
- ] }),
7492
- /* @__PURE__ */ jsxs(Group, { gap: "xl", children: [
7493
- /* @__PURE__ */ jsxs("div", { children: [
7494
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Completed" }),
7495
- /* @__PURE__ */ jsx(Text, { size: "lg", fw: 500, c: "green", children: executionCompleted })
7496
- ] }),
7497
- /* @__PURE__ */ jsxs("div", { children: [
7498
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Failed" }),
7499
- /* @__PURE__ */ jsx(Text, { size: "lg", fw: 500, c: "red", children: executionFailed })
7500
- ] }),
7501
- /* @__PURE__ */ jsxs("div", { children: [
7502
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "Graded" }),
7503
- /* @__PURE__ */ jsx(Text, { size: "lg", fw: 500, children: gradingCompleted })
7504
- ] })
7505
- ] }),
7506
- /* @__PURE__ */ jsxs("div", { children: [
7507
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, mb: "xs", children: "Recent Activity" }),
7508
- /* @__PURE__ */ jsx(Timeline, { active: events.length, bulletSize: 20, lineWidth: 2, children: events.slice(-5).map((event, index) => /* @__PURE__ */ jsx(Timeline.Item, { bullet: getEventBullet(event), title: getEventTitle(event), children: /* @__PURE__ */ jsx(Text, { c: "dimmed", size: "xs", children: getEventDescription(event) }) }, index)) })
7509
- ] }),
7510
- error && /* @__PURE__ */ jsxs(Text, { c: "red", size: "sm", children: [
7511
- "Error: ",
7512
- error
7513
- ] })
7514
- ] }) });
7515
- }
7516
- function getEventBullet(event) {
7517
- const iconSize = 12;
7518
- switch (event.type) {
7519
- case "execution-started":
7520
- case "session-started":
7521
- case "turn-started":
7522
- return /* @__PURE__ */ jsx(ThemeIcon, { size: 20, radius: "xl", children: /* @__PURE__ */ jsx(IconPlayerPlay, { size: iconSize }) });
7523
- case "execution-completed":
7524
- case "session-completed":
7525
- case "turn-completed":
7526
- return /* @__PURE__ */ jsx(ThemeIcon, { size: 20, color: "green", radius: "xl", children: /* @__PURE__ */ jsx(IconCheck, { size: iconSize }) });
7527
- case "execution-failed":
7528
- return /* @__PURE__ */ jsx(ThemeIcon, { size: 20, color: "red", radius: "xl", children: /* @__PURE__ */ jsx(IconX, { size: iconSize }) });
7529
- case "grading-started":
7530
- case "grading-completed":
7531
- return /* @__PURE__ */ jsx(ThemeIcon, { size: 20, color: "violet", radius: "xl", children: /* @__PURE__ */ jsx(IconChartBar, { size: iconSize }) });
7532
- case "grading-failed":
7533
- return /* @__PURE__ */ jsx(ThemeIcon, { size: 20, color: "red", radius: "xl", children: /* @__PURE__ */ jsx(IconX, { size: iconSize }) });
7534
- default:
7535
- return /* @__PURE__ */ jsx(ThemeIcon, { size: 20, color: "gray", radius: "xl", children: /* @__PURE__ */ jsx(IconClock, { size: iconSize }) });
7536
- }
7537
- }
7538
- function getEventTitle(event) {
7539
- switch (event.type) {
7540
- case "connected":
7541
- return "Connected";
7542
- case "execution-started":
7543
- return `Started: ${event.variantName}`;
7544
- case "execution-completed":
7545
- return `Completed: ${event.variantName}`;
7546
- case "execution-failed":
7547
- return `Failed: ${event.variantName}`;
7548
- case "session-started":
7549
- return `Session started: ${event.variantName}`;
7550
- case "session-completed":
7551
- return `Session completed: ${event.variantName}`;
7552
- case "turn-started":
7553
- return `Turn ${event.turnNumber}: ${event.variantName}`;
7554
- case "turn-completed":
7555
- return `Turn ${event.turnNumber} done: ${event.variantName}`;
7556
- case "grading-started":
7557
- return `Grading: ${event.variantName}`;
7558
- case "grading-completed":
7559
- return `Graded: ${event.variantName} (${(event.score * 100).toFixed(0)}%)`;
7560
- case "grading-failed":
7561
- return `Grading failed: ${event.variantName}`;
7562
- case "calibration-completed":
7563
- return "Calibration complete";
7564
- case "calibration-failed":
7565
- return "Calibration failed";
7566
- default:
7567
- return "Unknown event";
7568
- }
7569
- }
7570
- function getEventDescription(event) {
7571
- switch (event.type) {
7572
- case "execution-started":
7573
- return `Input #${(event.inputIndex ?? 0) + 1}`;
7574
- case "execution-completed":
7575
- return `Input #${(event.inputIndex ?? 0) + 1}`;
7576
- case "execution-failed":
7577
- return event.error;
7578
- case "session-completed":
7579
- return `${event.turnCount} turns`;
7580
- case "grading-failed":
7581
- return event.error;
7582
- case "calibration-completed":
7583
- return `${event.summary.completed}/${event.summary.total} succeeded`;
7584
- case "calibration-failed":
7585
- return event.error;
7586
- default:
7587
- return "";
7588
- }
7589
- }
7590
- var STATUS_COLORS2 = {
7591
- pending: "gray",
7592
- running: "blue",
7593
- completed: "green",
7594
- partial: "yellow",
7595
- failed: "red"
7596
- };
7597
- function CalibrationRunDetailPage({
7598
- runId,
7599
- onNavigateToProject,
7600
- renderSessionComparison,
7601
- manager,
7602
- apiUrl
7603
- }) {
7604
- const { organizationReady } = useInitialization();
7605
- const { data: fullData, isLoading, error, refetch } = useCalibrationRunFull(runId);
7606
- const executeRun = useExecuteRun();
7607
- const gradeRun = useGradeRun();
7608
- const [inputsExpanded, setInputsExpanded] = useState(false);
7609
- if (!organizationReady || isLoading) return /* @__PURE__ */ jsx(SubshellLoader, {});
7610
- if (!fullData || error) {
7611
- return null;
7612
- }
7613
- const { run, logs, metrics } = fullData;
7614
- const handleExecute = async () => {
7615
- await executeRun.mutateAsync(runId);
7616
- refetch();
7617
- };
7618
- const handleGrade = async () => {
7619
- await gradeRun.mutateAsync({
7620
- runId,
7621
- rubric: run.gradingRubric ?? void 0,
7622
- graderModel: run.graderModel ?? void 0
7623
- });
7624
- refetch();
7625
- };
7626
- const completedCount = run.results.filter((r) => r.status === "completed").length;
7627
- const failedCount = run.results.filter((r) => r.status === "failed").length;
7628
- const totalDuration = Object.values(metrics).reduce((sum, m) => {
7629
- const metric = m;
7630
- return sum + (metric.totalDuration || 0);
7631
- }, 0);
7632
- const totalCost = Object.values(metrics).reduce((sum, m) => {
7633
- const metric = m;
7634
- return sum + (metric.totalCost || 0);
7635
- }, 0);
7636
- const caption = `${run.configVariants.length} variants \xB7 ${run.testInputs.length} inputs`;
7637
- return /* @__PURE__ */ jsxs(Stack, { children: [
7638
- /* @__PURE__ */ jsx(
7639
- PageTitleCaption,
7640
- {
7641
- title: run.name,
7642
- caption,
7643
- rightSection: /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
7644
- /* @__PURE__ */ jsx(
7645
- Button,
7646
- {
7647
- variant: "light",
7648
- size: "sm",
7649
- leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }),
7650
- onClick: () => onNavigateToProject(run.projectId),
7651
- children: "Project"
7652
- }
7653
- ),
7654
- /* @__PURE__ */ jsx(Badge, { color: STATUS_COLORS2[run.status], children: run.status }),
7655
- /* @__PURE__ */ jsx(Badge, { variant: "outline", children: run.executionMode }),
7656
- run.status === "pending" && /* @__PURE__ */ jsx(Button, { leftSection: /* @__PURE__ */ jsx(IconPlayerPlay, { size: 16 }), onClick: handleExecute, loading: executeRun.isPending, children: "Execute" }),
7657
- run.status === "completed" && run.gradingRubric && /* @__PURE__ */ jsx(
7658
- Button,
7659
- {
7660
- leftSection: /* @__PURE__ */ jsx(IconReportAnalytics, { size: 16 }),
7661
- variant: "outline",
7662
- onClick: handleGrade,
7663
- loading: gradeRun.isPending,
7664
- children: "Re-Grade"
7665
- }
7666
- )
7667
- ] })
7668
- }
7669
- ),
7670
- /* @__PURE__ */ jsxs(Paper, { withBorder: true, children: [
7671
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", wrap: "wrap", gap: "sm", children: [
7672
- run.results.length > 0 && /* @__PURE__ */ jsxs(Group, { gap: "md", children: [
7673
- /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
7674
- /* @__PURE__ */ jsx(IconCheck, { size: 14, color: "var(--color-success)" }),
7675
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, c: "green", children: completedCount }),
7676
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "completed" })
7677
- ] }),
7678
- failedCount > 0 && /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
7679
- /* @__PURE__ */ jsx(IconX, { size: 14, color: "var(--color-error)" }),
7680
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 500, c: "red", children: failedCount }),
7681
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "failed" })
7682
- ] }),
7683
- totalDuration > 0 && /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
7684
- /* @__PURE__ */ jsx(IconClock, { size: 14, style: { opacity: 0.5 } }),
7685
- /* @__PURE__ */ jsxs(Text, { size: "sm", fw: 500, children: [
7686
- (totalDuration / 1e3).toFixed(1),
7687
- "s"
7688
- ] })
7689
- ] }),
7690
- totalCost > 0 && /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
7691
- /* @__PURE__ */ jsx(IconCoin, { size: 14, style: { opacity: 0.5 } }),
7692
- /* @__PURE__ */ jsxs(Text, { size: "sm", fw: 500, children: [
7693
- "$",
7694
- totalCost.toFixed(4)
7695
- ] })
7696
- ] })
7697
- ] }),
7698
- /* @__PURE__ */ jsxs(Group, { gap: "md", children: [
7699
- run.createdAt && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
7700
- "Created: ",
7701
- new Date(run.createdAt).toLocaleString()
7702
- ] }),
7703
- run.completedAt && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", children: [
7704
- "Completed: ",
7705
- new Date(run.completedAt).toLocaleString()
7706
- ] })
7707
- ] })
7708
- ] }),
7709
- run.description && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", mt: "xs", children: run.description }),
7710
- /* @__PURE__ */ jsxs(Box, { mt: "sm", pt: "sm", style: { borderTop: "1px solid var(--color-border)" }, children: [
7711
- /* @__PURE__ */ jsxs(Group, { gap: "xs", style: { cursor: "pointer" }, onClick: () => setInputsExpanded(!inputsExpanded), children: [
7712
- /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "sm", children: inputsExpanded ? /* @__PURE__ */ jsx(IconChevronDown, { size: 16 }) : /* @__PURE__ */ jsx(IconChevronRight, { size: 16 }) }),
7713
- /* @__PURE__ */ jsxs(Text, { fw: 500, size: "sm", children: [
7714
- "Test Inputs (",
7715
- run.testInputs.length,
7716
- ")"
7717
- ] })
7718
- ] }),
7719
- /* @__PURE__ */ jsx(Collapse, { in: inputsExpanded, children: /* @__PURE__ */ jsx(Stack, { mt: "sm", children: run.testInputs.map((input, index) => /* @__PURE__ */ jsxs(Box, { children: [
7720
- /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", mb: "xs", children: [
7721
- "Input #",
7722
- index + 1
7723
- ] }),
7724
- /* @__PURE__ */ jsx(Paper, { style: { background: "var(--color-background)" }, children: /* @__PURE__ */ jsx(JsonViewer, { data: input, maxHeight: "150px" }) })
7725
- ] }, index)) }) })
7726
- ] })
7727
- ] }),
7728
- run.status === "running" && /* @__PURE__ */ jsx(CalibrationProgress, { runId, manager, apiUrl }),
7729
- /* @__PURE__ */ jsxs(Tabs, { defaultValue: "comparison", children: [
7730
- /* @__PURE__ */ jsxs(Tabs.List, { children: [
7731
- /* @__PURE__ */ jsx(Tabs.Tab, { value: "comparison", children: "Results" }),
7732
- run.gradingRubric && /* @__PURE__ */ jsx(Tabs.Tab, { value: "grading", children: "Grading" })
7733
- ] }),
7734
- /* @__PURE__ */ jsx(Tabs.Panel, { value: "comparison", pt: "sm", children: run.executionMode === "session" ? renderSessionComparison?.({ run }) : /* @__PURE__ */ jsx(ComparisonTable, { run, logs, metrics }) }),
7735
- run.gradingRubric && /* @__PURE__ */ jsx(Tabs.Panel, { value: "grading", pt: "sm", children: /* @__PURE__ */ jsx(GradingPanel, { run, rubric: run.gradingRubric }) })
7736
- ] })
7737
- ] });
7738
- }
7739
- function CalibrationSidebar({
7740
- currentProjectId,
7741
- currentRunId,
7742
- currentPath,
7743
- onProjectClick,
7744
- onRunClick
7745
- }) {
7746
- const theme = useMantineTheme();
7747
- const queryClient = useQueryClient();
7748
- const { organizationReady } = useInitialization();
7749
- const { data: projects, isLoading: isProjectsLoading } = useAllCalibrationProjects();
7750
- const [expandedProjects, setExpandedProjects] = useState(() => {
7751
- if (currentProjectId) {
7752
- return { [currentProjectId]: true };
7753
- }
7754
- return {};
7755
- });
7756
- const toggleProject = (projectId) => {
7757
- setExpandedProjects((prev) => ({
7758
- ...prev,
7759
- [projectId]: !prev[projectId]
7760
- }));
7761
- };
7762
- const handleRefresh = () => {
7763
- queryClient.invalidateQueries({ queryKey: [...calibrationKeys.all, "projects"] });
7764
- };
7765
- const hasData = projects && projects.length > 0;
7766
- const isInitialLoading = !organizationReady || isProjectsLoading && !hasData;
7767
- return /* @__PURE__ */ jsxs(
7768
- Box,
7769
- {
7770
- style: {
7771
- flex: 1,
7772
- minHeight: 0,
7773
- padding: theme.spacing.sm,
7774
- display: "flex",
7775
- flexDirection: "column",
7776
- overflow: "hidden"
7777
- },
7778
- children: [
7779
- /* @__PURE__ */ jsx(
7780
- SubshellSidebarSection,
7781
- {
7782
- icon: IconBriefcase,
7783
- label: "Projects",
7784
- rightSection: /* @__PURE__ */ jsx(UnstyledButton, { title: "Refresh projects", onClick: handleRefresh, children: /* @__PURE__ */ jsx(IconRefresh, { size: 14, style: { opacity: 0.6 } }) })
7785
- }
7786
- ),
7787
- /* @__PURE__ */ jsx(ScrollArea, { style: { flex: 1, minHeight: 0 }, scrollbarSize: 8, children: isInitialLoading ? /* @__PURE__ */ jsx(Center, { p: "xl", children: /* @__PURE__ */ jsx(Loader, { size: "sm" }) }) : projects && projects.length > 0 ? /* @__PURE__ */ jsx(Stack, { gap: "xs", p: "sm", children: projects.map((project) => /* @__PURE__ */ jsx(
7788
- ProjectGroup,
7789
- {
7790
- project,
7791
- isExpanded: expandedProjects[project.id] || false,
7792
- currentPath,
7793
- currentRunId,
7794
- onToggle: () => toggleProject(project.id),
7795
- onProjectClick,
7796
- onRunClick
7797
- },
7798
- project.id
7799
- )) }) : /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { padding: theme.spacing.sm }, children: "No projects yet" }) })
7800
- ]
7801
- }
7802
- );
7803
- }
7804
- function ProjectGroup({
7805
- project,
7806
- isExpanded,
7807
- currentPath,
7808
- currentRunId,
7809
- onToggle,
7810
- onProjectClick,
7811
- onRunClick
7812
- }) {
7813
- const { data: runs, isLoading: isRunsLoading } = useCalibrationRuns(isExpanded ? project.id : "");
7814
- const isProjectActive = currentPath.includes(`/project/${project.id}`);
7815
- const hasActiveRun = runs?.some((run) => run.id === currentRunId) || false;
7816
- const isActive = isProjectActive || hasActiveRun;
7817
- return /* @__PURE__ */ jsx(
7818
- CollapsibleSidebarGroup,
7819
- {
7820
- icon: IconFlask,
7821
- label: project.name,
7822
- isExpanded,
7823
- onToggle,
7824
- isActive,
7825
- onLabelClick: () => onProjectClick(project.id),
7826
- isEmpty: !runs || runs.length === 0,
7827
- emptyMessage: "No runs yet",
7828
- isLoading: isRunsLoading,
7829
- loadingComponent: /* @__PURE__ */ jsx(Center, { p: "xs", children: /* @__PURE__ */ jsx(Loader, { size: "xs" }) }),
7830
- children: runs?.map((run) => /* @__PURE__ */ jsx(RunItem, { run, isActive: currentRunId === run.id, onRunClick }, run.id))
7831
- }
7832
- );
7833
- }
7834
- function RunItem({ run, isActive, onRunClick }) {
7835
- return /* @__PURE__ */ jsx(SubshellNavItem, { icon: IconPlayerPlay, label: run.name, isActive, onClick: () => onRunClick(run.id) });
7836
- }
7837
7119
  function WorkflowExecutionPanel({
7838
7120
  resourceId,
7839
7121
  resourceDefinition,
@@ -8884,7 +8166,6 @@ function AgentListItem({ agent, isSelected, onAgentClick }) {
8884
8166
  var OperationsSidebarTop = () => {
8885
8167
  const { currentPath, navigate } = useRouterContext();
8886
8168
  const theme = useMantineTheme();
8887
- const isCalibrationSection = currentPath.startsWith("/operations/calibration");
8888
8169
  const isResourcesSection = currentPath.startsWith("/operations/resources");
8889
8170
  const isSessionsSection = currentPath.startsWith("/operations/sessions");
8890
8171
  const isCommandViewSection = currentPath.startsWith("/operations/command-view");
@@ -8913,35 +8194,11 @@ var OperationsSidebarTop = () => {
8913
8194
  }
8914
8195
  );
8915
8196
  }
8916
- if (isCalibrationSection) {
8917
- const isActive = currentPath === "/operations/calibration";
8918
- return /* @__PURE__ */ jsx(
8919
- Box,
8920
- {
8921
- style: {
8922
- padding: theme.spacing.sm,
8923
- borderBottom: "1px solid var(--color-border)"
8924
- },
8925
- children: /* @__PURE__ */ jsx(
8926
- NavigationButton,
8927
- {
8928
- icon: IconAdjustments,
8929
- label: "Calibration Projects",
8930
- isActive,
8931
- hasActiveBackground: isActive,
8932
- onClick: () => navigate("/operations/calibration")
8933
- }
8934
- )
8935
- }
8936
- );
8937
- }
8938
8197
  return null;
8939
8198
  };
8940
8199
 
8941
8200
  // src/features/operations/sidebar/pathUtils.ts
8942
8201
  var RESOURCE_DETAIL_PATTERN = /^\/operations\/resources\/(workflow|agent)\/([^/]+)$/;
8943
- var CALIBRATION_PROJECT_PATTERN = /^\/operations\/calibration\/project\/([^/]+)$/;
8944
- var CALIBRATION_RUN_PATTERN = /^\/operations\/calibration\/run\/([^/]+)$/;
8945
8202
  var SESSION_DETAIL_PATTERN = /^\/operations\/sessions\/([^/]+)$/;
8946
8203
  function getActiveResource(pathname) {
8947
8204
  const match = pathname.match(RESOURCE_DETAIL_PATTERN);
@@ -8954,17 +8211,6 @@ function getActiveResource(pathname) {
8954
8211
  function isResourceDetailPage(pathname) {
8955
8212
  return RESOURCE_DETAIL_PATTERN.test(pathname);
8956
8213
  }
8957
- function getCalibrationParams(pathname) {
8958
- const projectMatch = pathname.match(CALIBRATION_PROJECT_PATTERN);
8959
- if (projectMatch) {
8960
- return { projectId: projectMatch[1], runId: void 0 };
8961
- }
8962
- const runMatch = pathname.match(CALIBRATION_RUN_PATTERN);
8963
- if (runMatch) {
8964
- return { projectId: void 0, runId: runMatch[1] };
8965
- }
8966
- return { projectId: void 0, runId: void 0 };
8967
- }
8968
8214
  function getSessionId(pathname) {
8969
8215
  const match = pathname.match(SESSION_DETAIL_PATTERN);
8970
8216
  return match?.[1];
@@ -9091,22 +8337,55 @@ var ExecutionLogsSidebar = () => {
9091
8337
  )
9092
8338
  ] });
9093
8339
  };
8340
+ function parseCommandQueueSearch(search) {
8341
+ const params = new URLSearchParams(search ?? "");
8342
+ return {
8343
+ checkpoint: params.get("checkpoint") || void 0,
8344
+ status: params.get("status") || "pending",
8345
+ priorityMin: Number(params.get("priorityMin")) || 1,
8346
+ priorityMax: Number(params.get("priorityMax")) || 10
8347
+ };
8348
+ }
8349
+ function buildCommandQueueUrl(updates) {
8350
+ const params = new URLSearchParams();
8351
+ for (const [key, value] of Object.entries(updates)) {
8352
+ if (value !== void 0) params.set(key, String(value));
8353
+ }
8354
+ const qs = params.toString();
8355
+ return `/operations/command-queue${qs ? `?${qs}` : ""}`;
8356
+ }
8357
+ function CommandQueueSidebarConnected() {
8358
+ const { currentPath, currentSearch, navigate } = useRouterContext();
8359
+ const { checkpoint, status, priorityMin, priorityMax } = parseCommandQueueSearch(currentSearch);
8360
+ const priorityRange = [priorityMin, priorityMax];
8361
+ const isDetailView = /\/operations\/command-queue\/.+/.test(currentPath);
8362
+ const handleSelectCheckpoint = (newCheckpoint) => {
8363
+ navigate(buildCommandQueueUrl({ checkpoint: newCheckpoint, status, priorityMin, priorityMax }));
8364
+ };
8365
+ const handleStatusChange = (newStatus) => {
8366
+ navigate(buildCommandQueueUrl({ checkpoint, status: newStatus, priorityMin, priorityMax }));
8367
+ };
8368
+ const handlePriorityRangeChange = useMemo(
8369
+ () => debounce((range) => {
8370
+ navigate(buildCommandQueueUrl({ checkpoint, status, priorityMin: range[0], priorityMax: range[1] }));
8371
+ }, 500),
8372
+ [navigate, checkpoint, status]
8373
+ );
8374
+ return /* @__PURE__ */ jsx("div", { style: { cursor: isDetailView ? "not-allowed" : void 0, height: "100%" }, children: /* @__PURE__ */ jsx("div", { style: { pointerEvents: isDetailView ? "none" : void 0, height: "100%" }, children: /* @__PURE__ */ jsx(
8375
+ CommandQueueSidebar,
8376
+ {
8377
+ selectedCheckpoint: checkpoint,
8378
+ onSelectCheckpoint: handleSelectCheckpoint,
8379
+ status,
8380
+ onStatusChange: handleStatusChange,
8381
+ priorityRange,
8382
+ onPriorityRangeChange: handlePriorityRangeChange
8383
+ }
8384
+ ) }) });
8385
+ }
9094
8386
  var OperationsSidebarMiddle = () => {
9095
8387
  const { currentPath, currentSearch, navigate } = useRouterContext();
9096
8388
  const { timeRange = "24h" } = useElevasisFeatures();
9097
- if (currentPath.startsWith("/operations/calibration")) {
9098
- const { projectId, runId } = getCalibrationParams(currentPath);
9099
- return /* @__PURE__ */ jsx(
9100
- CalibrationSidebar,
9101
- {
9102
- currentProjectId: projectId,
9103
- currentRunId: runId,
9104
- currentPath,
9105
- onProjectClick: (nextProjectId) => navigate(`/operations/calibration/project/${nextProjectId}`),
9106
- onRunClick: (nextRunId) => navigate(`/operations/calibration/run/${nextRunId}`)
9107
- }
9108
- );
9109
- }
9110
8389
  if (currentPath.startsWith("/operations/sessions")) {
9111
8390
  return /* @__PURE__ */ jsx(
9112
8391
  SessionsSidebar,
@@ -9119,6 +8398,9 @@ var OperationsSidebarMiddle = () => {
9119
8398
  }
9120
8399
  );
9121
8400
  }
8401
+ if (currentPath.startsWith("/operations/command-queue")) {
8402
+ return /* @__PURE__ */ jsx(CommandQueueSidebarConnected, {});
8403
+ }
9122
8404
  if (currentPath.startsWith("/operations/command-view")) {
9123
8405
  return /* @__PURE__ */ jsx(CommandViewSidebarContent, { timeRange });
9124
8406
  }
@@ -9133,36 +8415,12 @@ var OperationsSidebar = () => {
9133
8415
  /* @__PURE__ */ jsx(OperationsSidebarMiddle, {})
9134
8416
  ] });
9135
8417
  };
9136
- function CommandQueueShell({
9137
- selectedCheckpoint,
9138
- onSelectCheckpoint,
9139
- status,
9140
- onStatusChange,
9141
- priorityRange,
9142
- onPriorityRangeChange,
9143
- children
9144
- }) {
9145
- const { currentPath } = useRouterContext();
9146
- const isDetailView = /\/operations\/command-queue\/.+/.test(currentPath);
9147
- return /* @__PURE__ */ jsxs(SubshellContainer, { children: [
9148
- /* @__PURE__ */ jsx(SubshellSidebar, { width: 250, children: /* @__PURE__ */ jsx("div", { style: { cursor: isDetailView ? "not-allowed" : void 0, height: "100%" }, children: /* @__PURE__ */ jsx("div", { style: { pointerEvents: isDetailView ? "none" : void 0, height: "100%" }, children: /* @__PURE__ */ jsx(
9149
- CommandQueueSidebar,
9150
- {
9151
- selectedCheckpoint,
9152
- onSelectCheckpoint,
9153
- status,
9154
- onStatusChange,
9155
- priorityRange,
9156
- onPriorityRangeChange
9157
- }
9158
- ) }) }) }),
9159
- /* @__PURE__ */ jsx(SubshellRightSideContainer, { children: /* @__PURE__ */ jsx(SubshellContentContainer, { children }) })
9160
- ] });
8418
+ function CommandQueueShell({ children }) {
8419
+ return /* @__PURE__ */ jsx(SubshellContentContainer, { children });
9161
8420
  }
9162
8421
  var operationsManifest = {
9163
8422
  key: "operations",
9164
- accessFeatureKey: "operations",
9165
- domainIds: ["operations"],
8423
+ featureId: "operations",
9166
8424
  capabilityIds: ["operations.organization-graph", "operations.command-view"],
9167
8425
  sidebar: OperationsSidebar,
9168
8426
  subshellRoutes: ["/operations"],
@@ -9178,11 +8436,10 @@ var operationsManifest = {
9178
8436
  { label: "Resources", link: "/operations/resources" },
9179
8437
  { label: "Command View", link: "/operations/command-view" },
9180
8438
  { label: "Command Queue", link: "/operations/command-queue" },
9181
- { label: "Calibration", link: "/operations/calibration" },
9182
8439
  { label: "Sessions", link: "/operations/sessions" },
9183
8440
  { label: "Task Scheduler", link: "/operations/task-scheduler" }
9184
8441
  ]
9185
8442
  }
9186
8443
  };
9187
8444
 
9188
- export { ActionModal, AgentDefinitionDisplay, AgentExecutionLogs, AgentExecutionPanel, AgentSessionGroup, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, CalibrationPage, CalibrationProgress, CalibrationProjectDetailPage, CalibrationProjectsPage, CalibrationRunDetailPage, CalibrationSidebar, CheckpointGroup, CollapsibleJsonSection, CommandQueueDetailPage, CommandQueuePage, CommandQueueShell, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, CommandViewPage, CommandViewSidebarContent, ConfigCard, ContentSections, ContextUsageBadge, ContractDisplay, ExecuteWorkflowModal, ExecutionErrorSection, ExecutionPanel, FormFieldRenderer, LogEntry, LogGroup, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationGraphPage, ResourceDefinitionSection, ResourceDetailPage, ResourceErrorState, ResourceExecuteDialog, ResourceExecuteForm, ResourceFilter, ResourceHeader, ResourceNotFoundState, ResourcesPage, ResourcesSidebar, SessionChatArea, SessionChatInterface, SessionChatPage, SessionDetailsSidebar, SessionExecutionLogs, SessionHeader, SessionListItem, SessionMemory, SessionsPage, SessionsSidebar, ToolsListDisplay, WorkflowDefinitionDisplay, WorkflowExecutionLogs, WorkflowExecutionPanel, getExecutionStatusConfig, getIcon, getLogLevelConfig, iconMap, operationsManifest, useNewKnowledgeMapLayout };
8445
+ export { ActionModal, AgentDefinitionDisplay, AgentExecutionLogs, AgentExecutionPanel, AgentSessionGroup, BaseExecutionLogs, BaseExecutionLogsHeader, BaseExecutionLogsStates, CheckpointGroup, CollapsibleJsonSection, CommandQueueDetailPage, CommandQueuePage, CommandQueueShell, CommandQueueSidebar, CommandQueueSidebarMiddle, CommandQueueSidebarTop, CommandQueueTaskRow, CommandViewPage, CommandViewSidebarContent, ConfigCard, ContentSections, ContextUsageBadge, ContractDisplay, ExecuteWorkflowModal, ExecutionErrorSection, ExecutionPanel, FormFieldRenderer, LogEntry, LogGroup, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationGraphPage, ResourceDefinitionSection, ResourceDetailPage, ResourceErrorState, ResourceExecuteDialog, ResourceExecuteForm, ResourceFilter, ResourceHeader, ResourceNotFoundState, ResourcesPage, ResourcesSidebar, SessionChatArea, SessionChatInterface, SessionChatPage, SessionDetailsSidebar, SessionExecutionLogs, SessionHeader, SessionListItem, SessionMemory, SessionsPage, SessionsSidebar, ToolsListDisplay, WorkflowDefinitionDisplay, WorkflowExecutionLogs, WorkflowExecutionPanel, getExecutionStatusConfig, getIcon, getLogLevelConfig, iconMap, operationsManifest, useNewKnowledgeMapLayout };