@elevasis/ui 2.20.0 → 2.21.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 (66) hide show
  1. package/dist/api/index.js +2 -2
  2. package/dist/app/index.js +4 -4
  3. package/dist/charts/index.js +3 -3
  4. package/dist/{chunk-FMFX4K6E.js → chunk-7GG6OSD7.js} +34 -9
  5. package/dist/{chunk-GTYUP7MB.js → chunk-ATEHYDL3.js} +5 -21
  6. package/dist/{chunk-AL23U6C3.js → chunk-BIWHHWCJ.js} +1 -2
  7. package/dist/{chunk-JR5WNTLA.js → chunk-BJWIKEQG.js} +6 -11
  8. package/dist/{chunk-GP3AFJYG.js → chunk-CZK67OHH.js} +6 -11
  9. package/dist/{chunk-TO7QXDBX.js → chunk-DMYELNGA.js} +2 -2
  10. package/dist/{chunk-2CFOFSSG.js → chunk-EDX6WIN3.js} +6 -11
  11. package/dist/{chunk-PJVG3ISO.js → chunk-EGKNRM6P.js} +6 -8
  12. package/dist/{chunk-ZE2KQSHL.js → chunk-I5WRKH25.js} +4 -4
  13. package/dist/chunk-KVW56ERD.js +24 -0
  14. package/dist/{chunk-YP6T426C.js → chunk-LQU62KHD.js} +144 -432
  15. package/dist/{chunk-OUYH2SBS.js → chunk-LVUCBY7X.js} +2 -2
  16. package/dist/chunk-S7RL77QS.js +48 -0
  17. package/dist/{chunk-OD7GWIZS.js → chunk-SGXXJE52.js} +1 -121
  18. package/dist/{chunk-R7OJCNL3.js → chunk-T6INEVX6.js} +1 -1
  19. package/dist/{chunk-CTTY6FUT.js → chunk-TSSKOQBX.js} +2 -2
  20. package/dist/{chunk-Q4QJOSVS.js → chunk-ULZ2B3NC.js} +1 -1
  21. package/dist/chunk-VQESMHQV.js +336 -0
  22. package/dist/{chunk-MZFJWCPH.js → chunk-XLZZOFGM.js} +5 -19
  23. package/dist/{chunk-BHR7IV72.js → chunk-XUYBOO32.js} +1 -1
  24. package/dist/{chunk-M7W7CGPL.js → chunk-Z6FAH4XV.js} +1 -1
  25. package/dist/components/index.d.ts +46 -87
  26. package/dist/components/index.js +27 -26
  27. package/dist/components/navigation/index.d.ts +1 -13
  28. package/dist/components/navigation/index.js +11 -1
  29. package/dist/execution/index.d.ts +27 -0
  30. package/dist/features/crm/index.d.ts +12 -35
  31. package/dist/features/crm/index.js +11 -10
  32. package/dist/features/dashboard/index.d.ts +25 -27
  33. package/dist/features/dashboard/index.js +12 -11
  34. package/dist/features/delivery/index.d.ts +12 -35
  35. package/dist/features/delivery/index.js +11 -10
  36. package/dist/features/lead-gen/index.d.ts +14 -37
  37. package/dist/features/lead-gen/index.js +11 -10
  38. package/dist/features/monitoring/index.d.ts +12 -35
  39. package/dist/features/monitoring/index.js +13 -12
  40. package/dist/features/monitoring/requests/index.d.ts +13 -36
  41. package/dist/features/monitoring/requests/index.js +11 -10
  42. package/dist/features/operations/index.d.ts +44 -65
  43. package/dist/features/operations/index.js +14 -13
  44. package/dist/features/seo/index.d.ts +12 -35
  45. package/dist/features/seo/index.js +1 -1
  46. package/dist/features/settings/index.d.ts +12 -35
  47. package/dist/features/settings/index.js +11 -10
  48. package/dist/hooks/delivery/index.js +2 -2
  49. package/dist/hooks/index.d.ts +46 -66
  50. package/dist/hooks/index.js +10 -9
  51. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +92 -121
  52. package/dist/hooks/published.d.ts +46 -66
  53. package/dist/hooks/published.js +10 -9
  54. package/dist/index.d.ts +365 -452
  55. package/dist/index.js +10 -9
  56. package/dist/provider/index.d.ts +62 -125
  57. package/dist/provider/index.js +8 -7
  58. package/dist/provider/published.d.ts +62 -125
  59. package/dist/provider/published.js +6 -5
  60. package/dist/test-utils/index.js +2 -2
  61. package/dist/types/index.d.ts +108 -135
  62. package/dist/utils/index.d.ts +26 -59
  63. package/dist/utils/index.js +1 -1
  64. package/package.json +4 -4
  65. package/dist/chunk-LR5CRY5A.js +0 -514
  66. package/dist/chunk-MG3NF7QL.js +0 -63
@@ -1,26 +1,26 @@
1
1
  import { ChatHeader, ChatSidebar } from './chunk-ROSMICXG.js';
2
2
  import { SubshellSidebarLoader, SubshellLoader } from './chunk-3JCMO7SD.js';
3
- import { BaseNode, useGraphTheme, BaseEdge, FormFieldRenderer, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-PJVG3ISO.js';
4
- import { ResourceHealthPanel } from './chunk-ZE2KQSHL.js';
5
- import { useCyberColors, CyberDonut } from './chunk-CTTY6FUT.js';
3
+ import { BaseNode, useGraphTheme, BaseEdge, FormFieldRenderer, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-EGKNRM6P.js';
4
+ import { ResourceHealthPanel } from './chunk-I5WRKH25.js';
5
+ import { useCyberColors, CyberDonut } from './chunk-TSSKOQBX.js';
6
6
  import { AppShellLoader } from './chunk-M25JL54Z.js';
7
7
  import { PageContainer } from './chunk-BZZCNLT6.js';
8
8
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
9
9
  import { CustomModal, ConfirmationModal } from './chunk-GBMNCNHX.js';
10
10
  import { getResourceStatusColor, useTimelineData, useAgentIterationData, getStatusIcon } from './chunk-E4WQGJNS.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, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, useBulkDeleteExecutions } from './chunk-FMFX4K6E.js';
12
- import { showApiErrorNotification, showSuccessNotification } from './chunk-M7W7CGPL.js';
11
+ import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, collectResourceFilterFacets, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, useBulkDeleteExecutions } from './chunk-7GG6OSD7.js';
12
+ import { showApiErrorNotification, showSuccessNotification } from './chunk-Z6FAH4XV.js';
13
13
  import { useGraphHighlighting, calculateGraphHeight, Graph_module_css_default, GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
14
14
  import { useMergedExecution } from './chunk-3ZMAGTWF.js';
15
- import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-LR5CRY5A.js';
15
+ import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-VQESMHQV.js';
16
16
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
17
- import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-BHR7IV72.js';
17
+ import { JsonViewer, CardHeader, PageTitleCaption, CollapsibleSection, TabCountBadge, ResourceCard, ContextViewer, EmptyState, APIErrorAlert } from './chunk-XUYBOO32.js';
18
18
  import { StyledMarkdown } from './chunk-3KMDHCAR.js';
19
19
  import { NavigationButton } from './chunk-NYBEU5TE.js';
20
20
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
21
21
  import { useAppearance } from './chunk-QJ2KCHKX.js';
22
22
  import { topbarHeight } from './chunk-DT3QYZVU.js';
23
- import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, DOMAIN_MAP, getNodeId, PAGE_SIZE_DEFAULT, debounce } from './chunk-OD7GWIZS.js';
23
+ import { getErrorInfo, formatErrorMessage, getResourceIcon, formatRelativeTime, getNodeId, PAGE_SIZE_DEFAULT, debounce } from './chunk-SGXXJE52.js';
24
24
  import { ResourceStatusColors, toWorkflowLogMessages } from './chunk-KRWALB24.js';
25
25
  import { useInitialization } from './chunk-DK2HVHCY.js';
26
26
  import { useOrganization } from './chunk-DD3CCMCZ.js';
@@ -72,7 +72,7 @@ var TechStackEntrySchema = z.object({
72
72
  */
73
73
  isSystemOfRecord: z.boolean().default(false)
74
74
  });
75
- var ResourceMappingSchema = DisplayMetadataSchema.extend({
75
+ DisplayMetadataSchema.extend({
76
76
  id: ModelIdSchema,
77
77
  resourceId: z.string().trim().min(1).max(255),
78
78
  resourceType: z.enum(["workflow", "agent", "trigger", "integration", "external", "human_checkpoint"]),
@@ -127,17 +127,20 @@ var OrganizationModelProjectsSchema = z.object({
127
127
  milestoneStatuses: z.array(ProjectsDomainStateSchema).min(1),
128
128
  taskStatuses: z.array(ProjectsDomainStateSchema).min(1)
129
129
  });
130
+ var NodeIdPathSchema = z.string().trim().min(1).max(100).regex(/^([a-z0-9-]+)(\.[a-z0-9-]+)*$/, "Node IDs must be lowercase dotted paths");
131
+ z.string().trim().min(1).max(200).regex(/^[a-z]+:([a-z0-9-]+)(\.[a-z0-9-]+)*$/, "Node references must use kind:dotted-path");
132
+ var UiPositionSchema = z.enum(["sidebar-primary", "sidebar-bottom"]);
130
133
  var FeatureSchema = z.object({
131
- id: ModelIdSchema,
134
+ id: NodeIdPathSchema,
132
135
  label: LabelSchema,
133
136
  description: DescriptionSchema.optional(),
134
137
  enabled: z.boolean().default(true),
135
- color: ColorTokenSchema.optional(),
138
+ path: PathSchema.optional(),
136
139
  icon: IconNameSchema.optional(),
137
- entityIds: ReferenceIdsSchema,
138
- surfaceIds: ReferenceIdsSchema,
139
- resourceIds: ReferenceIdsSchema,
140
- capabilityIds: ReferenceIdsSchema
140
+ color: ColorTokenSchema.optional(),
141
+ uiPosition: UiPositionSchema.optional(),
142
+ requiresAdmin: z.boolean().optional(),
143
+ devOnly: z.boolean().optional()
141
144
  });
142
145
  var ProspectingLifecycleStageSchema = DisplayMetadataSchema.extend({
143
146
  id: ModelIdSchema,
@@ -456,7 +459,7 @@ var OrganizationModelSchemaBase = z.object({
456
459
  version: z.literal(1).default(1),
457
460
  features: z.array(FeatureSchema).default([]),
458
461
  branding: OrganizationModelBrandingSchema,
459
- navigation: OrganizationModelNavigationSchema,
462
+ navigation: OrganizationModelNavigationSchema.default({ surfaces: [], groups: [] }),
460
463
  sales: OrganizationModelSalesSchema,
461
464
  prospecting: OrganizationModelProspectingSchema,
462
465
  projects: OrganizationModelProjectsSchema,
@@ -466,8 +469,7 @@ var OrganizationModelSchemaBase = z.object({
466
469
  roles: RolesDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_ROLES),
467
470
  goals: GoalsDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_GOALS),
468
471
  statuses: StatusesDomainSchema.default({ entries: [] }),
469
- operations: OperationsDomainSchema.default({ entries: [] }),
470
- resourceMappings: z.array(ResourceMappingSchema).default([])
472
+ operations: OperationsDomainSchema.default({ entries: [] })
471
473
  });
472
474
  function addIssue(ctx, path, message) {
473
475
  ctx.addIssue({
@@ -487,123 +489,39 @@ function collectIds(items, ctx, collectionPath, label) {
487
489
  });
488
490
  return itemsById;
489
491
  }
492
+ var LEGACY_FEATURE_ALIASES = /* @__PURE__ */ new Map([
493
+ ["crm", "sales.crm"],
494
+ ["lead-gen", "sales.lead-gen"],
495
+ ["submitted-requests", "monitoring.submitted-requests"]
496
+ ]);
497
+ function hasFeature(featuresById, featureId) {
498
+ return featuresById.has(featureId) || featuresById.has(LEGACY_FEATURE_ALIASES.get(featureId) ?? "");
499
+ }
490
500
  var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ctx) => {
491
501
  const featuresById = collectIds(model.features, ctx, ["features"], "Feature");
492
- const surfacesById = collectIds(model.navigation.surfaces, ctx, ["navigation", "surfaces"], "Surface");
493
- collectIds(model.navigation.groups, ctx, ["navigation", "groups"], "Navigation group");
494
- collectIds(model.resourceMappings, ctx, ["resourceMappings"], "Resource mapping");
495
- const resourceMappingsByResourceId = /* @__PURE__ */ new Map();
496
- model.resourceMappings.forEach((resourceMapping, index) => {
497
- if (resourceMappingsByResourceId.has(resourceMapping.resourceId)) {
498
- addIssue(
499
- ctx,
500
- ["resourceMappings", index, "resourceId"],
501
- `Resource mapping resourceId "${resourceMapping.resourceId}" must be unique`
502
- );
503
- return;
504
- }
505
- resourceMappingsByResourceId.set(resourceMapping.resourceId, resourceMapping);
506
- });
507
- if (model.navigation.defaultSurfaceId && !surfacesById.has(model.navigation.defaultSurfaceId)) {
508
- addIssue(
509
- ctx,
510
- ["navigation", "defaultSurfaceId"],
511
- `Default surface "${model.navigation.defaultSurfaceId}" must reference a declared navigation surface`
512
- );
513
- }
514
- model.navigation.groups.forEach((group, groupIndex) => {
515
- group.surfaceIds.forEach((surfaceId, surfaceIndex) => {
516
- if (!surfacesById.has(surfaceId)) {
517
- addIssue(
518
- ctx,
519
- ["navigation", "groups", groupIndex, "surfaceIds", surfaceIndex],
520
- `Navigation group "${group.id}" references unknown surface "${surfaceId}"`
521
- );
522
- }
523
- });
524
- });
525
502
  model.features.forEach((feature, featureIndex) => {
526
- feature.surfaceIds.forEach((surfaceId, surfaceIndex) => {
527
- const surface = surfacesById.get(surfaceId);
528
- if (!surface) {
529
- addIssue(
530
- ctx,
531
- ["features", featureIndex, "surfaceIds", surfaceIndex],
532
- `Feature "${feature.id}" references unknown surface "${surfaceId}"`
533
- );
534
- return;
535
- }
536
- if (!surface.featureIds.includes(feature.id)) {
537
- addIssue(
538
- ctx,
539
- ["features", featureIndex, "surfaceIds", surfaceIndex],
540
- `Feature "${feature.id}" references surface "${surfaceId}" but that surface does not include feature "${feature.id}"`
541
- );
542
- }
543
- });
544
- feature.resourceIds.forEach((resourceId, resourceIndex) => {
545
- const resourceMapping = resourceMappingsByResourceId.get(resourceId);
546
- if (!resourceMapping) {
547
- addIssue(
548
- ctx,
549
- ["features", featureIndex, "resourceIds", resourceIndex],
550
- `Feature "${feature.id}" references unknown resource "${resourceId}"`
551
- );
552
- return;
503
+ const segments = feature.id.split(".");
504
+ if (segments.length > 1) {
505
+ const parentId = segments.slice(0, -1).join(".");
506
+ if (!featuresById.has(parentId)) {
507
+ addIssue(ctx, ["features", featureIndex, "id"], `Feature "${feature.id}" references unknown parent "${parentId}"`);
553
508
  }
554
- if (!resourceMapping.featureIds.includes(feature.id)) {
555
- addIssue(
556
- ctx,
557
- ["features", featureIndex, "resourceIds", resourceIndex],
558
- `Feature "${feature.id}" references resource "${resourceId}" but that resource mapping does not include feature "${feature.id}"`
559
- );
560
- }
561
- });
562
- });
563
- model.navigation.surfaces.forEach((surface, surfaceIndex) => {
564
- if (surface.parentId && !surfacesById.has(surface.parentId)) {
565
- addIssue(
566
- ctx,
567
- ["navigation", "surfaces", surfaceIndex, "parentId"],
568
- `Surface "${surface.id}" references unknown parent surface "${surface.parentId}"`
569
- );
570
509
  }
571
- surface.featureIds.forEach((featureId, featureIndex) => {
572
- const feature = featuresById.get(featureId);
573
- if (!feature) {
574
- addIssue(
575
- ctx,
576
- ["navigation", "surfaces", surfaceIndex, "featureIds", featureIndex],
577
- `Surface "${surface.id}" references unknown feature "${featureId}"`
578
- );
579
- return;
580
- }
581
- if (!feature.surfaceIds.includes(surface.id)) {
582
- addIssue(
583
- ctx,
584
- ["navigation", "surfaces", surfaceIndex, "featureIds", featureIndex],
585
- `Surface "${surface.id}" references feature "${featureId}" but that feature does not include surface "${surface.id}"`
586
- );
587
- }
588
- });
589
- surface.resourceIds.forEach((resourceId, resourceIndex) => {
590
- const resourceMapping = resourceMappingsByResourceId.get(resourceId);
591
- if (!resourceMapping) {
592
- addIssue(
593
- ctx,
594
- ["navigation", "surfaces", surfaceIndex, "resourceIds", resourceIndex],
595
- `Surface "${surface.id}" references unknown resource "${resourceId}"`
596
- );
597
- return;
598
- }
599
- if (!resourceMapping.surfaceIds.includes(surface.id)) {
510
+ const hasChildren = model.features.some(
511
+ (candidate) => candidate.id.startsWith(`${feature.id}.`) && candidate.id !== feature.id
512
+ );
513
+ if (hasChildren && feature.enabled) {
514
+ const hasEnabledDescendant = model.features.some(
515
+ (candidate) => candidate.id.startsWith(`${feature.id}.`) && candidate.enabled
516
+ );
517
+ if (!hasEnabledDescendant) {
600
518
  addIssue(
601
519
  ctx,
602
- ["navigation", "surfaces", surfaceIndex, "resourceIds", resourceIndex],
603
- `Surface "${surface.id}" references resource "${resourceId}" but that surface does not include resource "${surface.id}"`
520
+ ["features", featureIndex, "enabled"],
521
+ `Feature "${feature.id}" is enabled but has no enabled descendants`
604
522
  );
605
523
  }
606
- });
524
+ }
607
525
  });
608
526
  const segmentsById = new Map(model.customers.segments.map((seg) => [seg.id, seg]));
609
527
  model.offerings.products.forEach((product, productIndex) => {
@@ -616,7 +534,7 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
616
534
  );
617
535
  }
618
536
  });
619
- if (product.deliveryFeatureId !== void 0 && !featuresById.has(product.deliveryFeatureId)) {
537
+ if (product.deliveryFeatureId !== void 0 && !hasFeature(featuresById, product.deliveryFeatureId)) {
620
538
  addIssue(
621
539
  ctx,
622
540
  ["offerings", "products", productIndex, "deliveryFeatureId"],
@@ -643,44 +561,6 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
643
561
  );
644
562
  }
645
563
  });
646
- model.resourceMappings.forEach((resourceMapping, resourceIndex) => {
647
- resourceMapping.featureIds.forEach((featureId, featureIndex) => {
648
- const feature = featuresById.get(featureId);
649
- if (!feature) {
650
- addIssue(
651
- ctx,
652
- ["resourceMappings", resourceIndex, "featureIds", featureIndex],
653
- `Resource mapping "${resourceMapping.id}" references unknown feature "${featureId}"`
654
- );
655
- return;
656
- }
657
- if (!feature.resourceIds.includes(resourceMapping.resourceId)) {
658
- addIssue(
659
- ctx,
660
- ["resourceMappings", resourceIndex, "featureIds", featureIndex],
661
- `Resource mapping "${resourceMapping.id}" references feature "${featureId}" but that feature does not include resource "${resourceMapping.resourceId}"`
662
- );
663
- }
664
- });
665
- resourceMapping.surfaceIds.forEach((surfaceId, surfaceIndex) => {
666
- const surface = surfacesById.get(surfaceId);
667
- if (!surface) {
668
- addIssue(
669
- ctx,
670
- ["resourceMappings", resourceIndex, "surfaceIds", surfaceIndex],
671
- `Resource mapping "${resourceMapping.id}" references unknown surface "${surfaceId}"`
672
- );
673
- return;
674
- }
675
- if (!surface.resourceIds.includes(resourceMapping.resourceId)) {
676
- addIssue(
677
- ctx,
678
- ["resourceMappings", resourceIndex, "surfaceIds", surfaceIndex],
679
- `Resource mapping "${resourceMapping.id}" references surface "${surfaceId}" but that surface does not include resource "${resourceMapping.resourceId}"`
680
- );
681
- }
682
- });
683
- });
684
564
  });
685
565
  var OrganizationGraphNodeKindSchema = z.enum([
686
566
  "organization",
@@ -690,7 +570,14 @@ var OrganizationGraphNodeKindSchema = z.enum([
690
570
  "capability",
691
571
  "resource"
692
572
  ]);
693
- var OrganizationGraphEdgeKindSchema = z.enum(["contains", "references", "exposes", "maps_to"]);
573
+ var OrganizationGraphEdgeKindSchema = z.enum([
574
+ "contains",
575
+ "references",
576
+ "exposes",
577
+ "maps_to",
578
+ "operates-on",
579
+ "uses"
580
+ ]);
694
581
  var OrganizationGraphNodeSchema = z.object({
695
582
  id: z.string().trim().min(1).max(200),
696
583
  kind: OrganizationGraphNodeKindSchema,
@@ -698,8 +585,7 @@ var OrganizationGraphNodeSchema = z.object({
698
585
  sourceId: z.string().trim().min(1).max(255).optional(),
699
586
  description: DescriptionSchema.optional(),
700
587
  enabled: z.boolean().optional(),
701
- featureId: ModelIdSchema.optional(),
702
- surfaceType: SurfaceTypeSchema.optional(),
588
+ featureId: z.string().trim().min(1).max(100).optional(),
703
589
  resourceType: z.enum(["workflow", "agent", "trigger", "integration", "external", "human_checkpoint"]).optional()
704
590
  });
705
591
  var OrganizationGraphEdgeSchema = z.object({
@@ -782,6 +668,16 @@ function collectCommandViewResources(commandViewData) {
782
668
  ...commandViewData.humanCheckpoints
783
669
  ];
784
670
  }
671
+ function pushResourceLinks(edges, edgeIds, resourceNodeId, links) {
672
+ for (const link of links ?? []) {
673
+ pushUniqueEdge(edges, edgeIds, {
674
+ id: edgeId(link.kind, resourceNodeId, link.nodeId),
675
+ kind: link.kind,
676
+ sourceId: resourceNodeId,
677
+ targetId: link.nodeId
678
+ });
679
+ }
680
+ }
785
681
  function buildOrganizationGraph(input) {
786
682
  const parsed = BuildOrganizationGraphInputSchema.parse(input);
787
683
  const organizationModel = parsed.organizationModel;
@@ -797,27 +693,6 @@ function buildOrganizationGraph(input) {
797
693
  label: "Organization Model"
798
694
  };
799
695
  pushUniqueNode(nodes, nodeIds, organizationNode);
800
- const featureMap = /* @__PURE__ */ new Map();
801
- for (const feature of organizationModel.features) {
802
- featureMap.set(feature.id, feature);
803
- }
804
- const surfaceMap = /* @__PURE__ */ new Map();
805
- for (const surface of organizationModel.navigation.surfaces) {
806
- surfaceMap.set(surface.id, surface);
807
- }
808
- const entityIds = /* @__PURE__ */ new Set();
809
- const capabilityIds = /* @__PURE__ */ new Set();
810
- const resourceMappings = [...organizationModel.resourceMappings].sort(
811
- (a, b) => a.resourceId.localeCompare(b.resourceId)
812
- );
813
- for (const resourceMapping of resourceMappings) {
814
- for (const entityId of resourceMapping.entityIds) {
815
- entityIds.add(entityId);
816
- }
817
- for (const capabilityId of resourceMapping.capabilityIds) {
818
- capabilityIds.add(capabilityId);
819
- }
820
- }
821
696
  for (const feature of [...organizationModel.features].sort((a, b) => a.id.localeCompare(b.id))) {
822
697
  const id = nodeId("feature", feature.id);
823
698
  pushUniqueNode(nodes, nodeIds, {
@@ -835,157 +710,15 @@ function buildOrganizationGraph(input) {
835
710
  sourceId: organizationNode.id,
836
711
  targetId: id
837
712
  });
838
- for (const entityId of feature.entityIds) {
839
- entityIds.add(entityId);
840
- }
841
- for (const capabilityId of feature.capabilityIds) {
842
- capabilityIds.add(capabilityId);
843
- }
844
- for (const surfaceId of feature.surfaceIds) {
845
- const surface = surfaceMap.get(surfaceId);
846
- if (surface) {
847
- pushUniqueEdge(edges, edgeIds, {
848
- id: edgeId("references", id, nodeId("surface", surface.id)),
849
- kind: "references",
850
- sourceId: id,
851
- targetId: nodeId("surface", surface.id)
852
- });
853
- }
854
- }
855
- }
856
- for (const surface of [...organizationModel.navigation.surfaces].sort((a, b) => a.id.localeCompare(b.id))) {
857
- const id = nodeId("surface", surface.id);
858
- pushUniqueNode(nodes, nodeIds, {
859
- id,
860
- kind: "surface",
861
- label: surface.label,
862
- sourceId: surface.id,
863
- description: surface.description,
864
- surfaceType: surface.surfaceType
865
- });
866
- pushUniqueEdge(edges, edgeIds, {
867
- id: edgeId("contains", organizationNode.id, id),
868
- kind: "contains",
869
- sourceId: organizationNode.id,
870
- targetId: id
871
- });
872
- if (surface.featureId) {
713
+ const parentId = feature.id.includes(".") ? feature.id.slice(0, feature.id.lastIndexOf(".")) : void 0;
714
+ if (parentId) {
873
715
  pushUniqueEdge(edges, edgeIds, {
874
- id: edgeId("exposes", nodeId("feature", surface.featureId), id),
875
- kind: "exposes",
876
- sourceId: nodeId("feature", surface.featureId),
716
+ id: edgeId("contains", nodeId("feature", parentId), id),
717
+ kind: "contains",
718
+ sourceId: nodeId("feature", parentId),
877
719
  targetId: id
878
720
  });
879
721
  }
880
- for (const featureId of surface.featureIds) {
881
- if (featureMap.has(featureId)) {
882
- pushUniqueEdge(edges, edgeIds, {
883
- id: edgeId("references", id, nodeId("feature", featureId)),
884
- kind: "references",
885
- sourceId: id,
886
- targetId: nodeId("feature", featureId)
887
- });
888
- }
889
- }
890
- for (const entityId of surface.entityIds) {
891
- entityIds.add(entityId);
892
- pushUniqueEdge(edges, edgeIds, {
893
- id: edgeId("references", id, nodeId("entity", entityId)),
894
- kind: "references",
895
- sourceId: id,
896
- targetId: nodeId("entity", entityId)
897
- });
898
- }
899
- for (const capabilityId of surface.capabilityIds) {
900
- capabilityIds.add(capabilityId);
901
- pushUniqueEdge(edges, edgeIds, {
902
- id: edgeId("references", id, nodeId("capability", capabilityId)),
903
- kind: "references",
904
- sourceId: id,
905
- targetId: nodeId("capability", capabilityId)
906
- });
907
- }
908
- }
909
- for (const entityId of [...entityIds].sort()) {
910
- pushUniqueNode(nodes, nodeIds, {
911
- id: nodeId("entity", entityId),
912
- kind: "entity",
913
- label: entityId,
914
- sourceId: entityId
915
- });
916
- pushUniqueEdge(edges, edgeIds, {
917
- id: edgeId("contains", organizationNode.id, nodeId("entity", entityId)),
918
- kind: "contains",
919
- sourceId: organizationNode.id,
920
- targetId: nodeId("entity", entityId)
921
- });
922
- }
923
- for (const capabilityId of [...capabilityIds].sort()) {
924
- pushUniqueNode(nodes, nodeIds, {
925
- id: nodeId("capability", capabilityId),
926
- kind: "capability",
927
- label: capabilityId,
928
- sourceId: capabilityId
929
- });
930
- pushUniqueEdge(edges, edgeIds, {
931
- id: edgeId("contains", organizationNode.id, nodeId("capability", capabilityId)),
932
- kind: "contains",
933
- sourceId: organizationNode.id,
934
- targetId: nodeId("capability", capabilityId)
935
- });
936
- }
937
- for (const resourceMapping of resourceMappings) {
938
- const id = nodeId("resource", resourceMapping.resourceId);
939
- upsertResourceNode(nodes, nodeIds, resourceNodesById, {
940
- id,
941
- kind: "resource",
942
- label: resourceMapping.label,
943
- sourceId: resourceMapping.resourceId,
944
- description: resourceMapping.description,
945
- resourceType: resourceMapping.resourceType
946
- });
947
- pushUniqueEdge(edges, edgeIds, {
948
- id: edgeId("contains", organizationNode.id, id),
949
- kind: "contains",
950
- sourceId: organizationNode.id,
951
- targetId: id
952
- });
953
- for (const featureId of resourceMapping.featureIds) {
954
- if (featureMap.has(featureId)) {
955
- pushUniqueEdge(edges, edgeIds, {
956
- id: edgeId("maps_to", id, nodeId("feature", featureId)),
957
- kind: "maps_to",
958
- sourceId: id,
959
- targetId: nodeId("feature", featureId)
960
- });
961
- }
962
- }
963
- for (const entityId of resourceMapping.entityIds) {
964
- pushUniqueEdge(edges, edgeIds, {
965
- id: edgeId("maps_to", id, nodeId("entity", entityId)),
966
- kind: "maps_to",
967
- sourceId: id,
968
- targetId: nodeId("entity", entityId)
969
- });
970
- }
971
- for (const surfaceId of resourceMapping.surfaceIds) {
972
- if (surfaceMap.has(surfaceId)) {
973
- pushUniqueEdge(edges, edgeIds, {
974
- id: edgeId("maps_to", id, nodeId("surface", surfaceId)),
975
- kind: "maps_to",
976
- sourceId: id,
977
- targetId: nodeId("surface", surfaceId)
978
- });
979
- }
980
- }
981
- for (const capabilityId of resourceMapping.capabilityIds) {
982
- pushUniqueEdge(edges, edgeIds, {
983
- id: edgeId("maps_to", id, nodeId("capability", capabilityId)),
984
- kind: "maps_to",
985
- sourceId: id,
986
- targetId: nodeId("capability", capabilityId)
987
- });
988
- }
989
722
  }
990
723
  if (commandViewData) {
991
724
  const commandViewResources = collectCommandViewResources(commandViewData).sort(
@@ -1001,22 +734,13 @@ function buildOrganizationGraph(input) {
1001
734
  description: resource.description,
1002
735
  resourceType: normalizeCommandViewResourceType(resource.type)
1003
736
  });
1004
- for (const featureId of resource.domains ?? []) {
1005
- if (featureMap.has(featureId)) {
1006
- pushUniqueEdge(edges, edgeIds, {
1007
- id: edgeId("references", resourceNode.id, nodeId("feature", featureId), "feature"),
1008
- kind: "references",
1009
- sourceId: resourceNode.id,
1010
- targetId: nodeId("feature", featureId)
1011
- });
1012
- }
1013
- }
1014
737
  pushUniqueEdge(edges, edgeIds, {
1015
738
  id: edgeId("contains", organizationNode.id, resourceNode.id),
1016
739
  kind: "contains",
1017
740
  sourceId: organizationNode.id,
1018
741
  targetId: resourceNode.id
1019
742
  });
743
+ pushResourceLinks(edges, edgeIds, resourceNode.id, resource.links);
1020
744
  }
1021
745
  for (const relationship of [...commandViewData.edges].sort((a, b) => a.id.localeCompare(b.id))) {
1022
746
  const sourceNode = ensureResourceNode(nodes, nodeIds, resourceNodesById, relationship.source);
@@ -3459,18 +3183,10 @@ function ResourcesSidebar({ timeRange }) {
3459
3183
  const theme = useMantineTheme();
3460
3184
  const colors = useCyberColors();
3461
3185
  const { data: executionData } = useRecentExecutionsByResource({ timeRange });
3462
- const activeDomains = useMemo(() => {
3186
+ const activeFacets = useMemo(() => {
3463
3187
  if (!resources) return [];
3464
3188
  const allResources = [...resources.workflows || [], ...resources.agents || []];
3465
- const domainSet = /* @__PURE__ */ new Set();
3466
- allResources.forEach((r) => r.domains?.forEach((d) => domainSet.add(d)));
3467
- const bottomDomains = /* @__PURE__ */ new Set(["utility", "diagnostic"]);
3468
- return Array.from(domainSet).sort((a, b) => {
3469
- const aBottom = bottomDomains.has(a) ? 1 : 0;
3470
- const bBottom = bottomDomains.has(b) ? 1 : 0;
3471
- if (aBottom !== bBottom) return aBottom - bBottom;
3472
- return a.localeCompare(b);
3473
- });
3189
+ return collectResourceFilterFacets(allResources);
3474
3190
  }, [resources]);
3475
3191
  const domainFilteredResources = useMemo(() => {
3476
3192
  if (!resources) return [];
@@ -3633,7 +3349,7 @@ function ResourcesSidebar({ timeRange }) {
3633
3349
  style: { flexShrink: 0 }
3634
3350
  }
3635
3351
  ),
3636
- activeDomains.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
3352
+ activeFacets.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
3637
3353
  /* @__PURE__ */ jsx(UnstyledButton, { onClick: () => setDomainsOpen((o) => !o), style: { width: "100%", flexShrink: 0 }, mt: 4, children: /* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
3638
3354
  /* @__PURE__ */ jsx(
3639
3355
  Text,
@@ -3645,7 +3361,7 @@ function ResourcesSidebar({ timeRange }) {
3645
3361
  color: "var(--color-text-subtle)",
3646
3362
  fontFamily: "var(--elevasis-font-family-subtitle)"
3647
3363
  },
3648
- children: "Domains"
3364
+ children: "Resource Facets"
3649
3365
  }
3650
3366
  ),
3651
3367
  /* @__PURE__ */ jsx(
@@ -3668,16 +3384,14 @@ function ResourcesSidebar({ timeRange }) {
3668
3384
  gridTemplateRows: domainsOpen ? "1fr" : "0fr",
3669
3385
  transition: "grid-template-rows 200ms cubic-bezier(0.4, 0, 0.2, 1)"
3670
3386
  },
3671
- children: /* @__PURE__ */ jsx("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx(Stack, { gap: 2, mt: "xs", style: { flexShrink: 0 }, children: activeDomains.map((domainId) => {
3672
- const domain = DOMAIN_MAP[domainId];
3673
- if (!domain) return null;
3674
- const filterState = domainFilters[domainId] || "neutral";
3387
+ children: /* @__PURE__ */ jsx("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx(Stack, { gap: 2, mt: "xs", style: { flexShrink: 0 }, children: activeFacets.map((facet) => {
3388
+ const filterState = domainFilters[facet.id] || "neutral";
3675
3389
  const StateIcon = FILTER_STATE_ICONS[filterState];
3676
3390
  return /* @__PURE__ */ jsx(
3677
3391
  UnstyledButton,
3678
3392
  {
3679
3393
  title: FILTER_STATE_LABELS[filterState],
3680
- onClick: () => cycleDomainFilter(domainId),
3394
+ onClick: () => cycleDomainFilter(facet.id),
3681
3395
  py: 5,
3682
3396
  px: 6,
3683
3397
  style: {
@@ -3703,12 +3417,12 @@ function ResourcesSidebar({ timeRange }) {
3703
3417
  truncate: true,
3704
3418
  fw: filterState !== "neutral" ? 500 : 400,
3705
3419
  c: filterState !== "neutral" ? void 0 : "dimmed",
3706
- children: domain.name
3420
+ children: facet.label
3707
3421
  }
3708
3422
  )
3709
3423
  ] })
3710
3424
  },
3711
- domainId
3425
+ facet.id
3712
3426
  );
3713
3427
  }) }) })
3714
3428
  }
@@ -4590,13 +4304,17 @@ var EDGE_KIND_LABELS = {
4590
4304
  contains: "Containment",
4591
4305
  references: "Reference",
4592
4306
  exposes: "Exposure",
4593
- maps_to: "Mapping"
4307
+ maps_to: "Mapping",
4308
+ "operates-on": "Operates on",
4309
+ uses: "Uses"
4594
4310
  };
4595
4311
  var EDGE_KIND_MEANINGS = {
4596
4312
  contains: "A hierarchy or ownership link inside the shared graph.",
4597
4313
  references: "A semantic association or dependency between two graph nodes.",
4598
4314
  exposes: "A feature enables a surface to be visible or reachable.",
4599
- maps_to: "A concrete resource is aligned to a domain, entity, capability, or surface."
4315
+ maps_to: "A concrete resource is aligned to a domain, entity, capability, or surface.",
4316
+ "operates-on": "A concrete resource operates on an Organization Model node.",
4317
+ uses: "A concrete resource depends on another graph node or integration."
4600
4318
  };
4601
4319
  var RELATIONSHIP_MEANINGS = {
4602
4320
  triggers: "Executable handoff: the source resource starts the target resource.",
@@ -4619,9 +4337,6 @@ function getNodeMeaning(node) {
4619
4337
  if (node.kind === "feature") {
4620
4338
  return node.enabled === false ? `${baseMeaning} This feature is currently disabled in the organization model.` : `${baseMeaning} This feature is currently enabled in the organization model.`;
4621
4339
  }
4622
- if (node.kind === "surface" && node.surfaceType) {
4623
- return `${baseMeaning} Surface type: ${titleCase(node.surfaceType)}.`;
4624
- }
4625
4340
  if (node.kind === "resource" && node.resourceType) {
4626
4341
  return `${baseMeaning} Resource type: ${titleCase(node.resourceType)}.`;
4627
4342
  }
@@ -4710,9 +4425,6 @@ function buildNodeState(graph, node, nodesById) {
4710
4425
  if (node.featureId) {
4711
4426
  metadata.push({ label: "Feature ID", value: node.featureId });
4712
4427
  }
4713
- if (node.surfaceType) {
4714
- metadata.push({ label: "Surface Type", value: titleCase(node.surfaceType) });
4715
- }
4716
4428
  if (node.resourceType) {
4717
4429
  metadata.push({ label: "Resource Type", value: titleCase(node.resourceType) });
4718
4430
  }
@@ -5350,20 +5062,20 @@ function getNodeStatus(node, commandViewData) {
5350
5062
  }
5351
5063
  return "status" in node && typeof node.status === "string" ? node.status : void 0;
5352
5064
  }
5353
- function getExplicitNodeDomains(node, commandViewData) {
5065
+ function getExplicitNodeFacets(node, commandViewData) {
5354
5066
  const commandViewNode = getCommandViewNodeForGraphNode(node, commandViewData);
5355
- if (commandViewNode?.domains?.length) {
5356
- return commandViewNode.domains;
5357
- }
5358
- if (!("domains" in node) || !Array.isArray(node.domains)) {
5359
- return [];
5067
+ if (commandViewNode) {
5068
+ return [
5069
+ ...commandViewNode.category ? [`category:${commandViewNode.category}`] : [],
5070
+ ...commandViewNode.links?.map((link) => link.nodeId) ?? []
5071
+ ];
5360
5072
  }
5361
- return node.domains.filter((domain) => typeof domain === "string");
5073
+ return [];
5362
5074
  }
5363
- function getNodeDomains(graph, node, commandViewData) {
5364
- const explicitDomains = getExplicitNodeDomains(node, commandViewData);
5365
- if (explicitDomains.length > 0) {
5366
- return explicitDomains;
5075
+ function getNodeFacets(graph, node, commandViewData) {
5076
+ const explicitFacets = getExplicitNodeFacets(node, commandViewData);
5077
+ if (explicitFacets.length > 0) {
5078
+ return explicitFacets;
5367
5079
  }
5368
5080
  if (node.kind === "feature") {
5369
5081
  return node.sourceId ? [node.sourceId] : [];
@@ -5371,24 +5083,24 @@ function getNodeDomains(graph, node, commandViewData) {
5371
5083
  if (node.kind !== "resource") {
5372
5084
  return [];
5373
5085
  }
5374
- const domainIds = /* @__PURE__ */ new Set();
5086
+ const facetIds = /* @__PURE__ */ new Set();
5375
5087
  for (const edge of graph.edges) {
5376
5088
  if (edge.sourceId !== node.id) {
5377
5089
  continue;
5378
5090
  }
5379
5091
  const targetNode = graph.nodes.find((candidate) => candidate.id === edge.targetId);
5380
5092
  if (targetNode?.kind === "feature" && targetNode.sourceId) {
5381
- domainIds.add(targetNode.sourceId);
5093
+ facetIds.add(targetNode.id);
5382
5094
  }
5383
5095
  }
5384
- return [...domainIds];
5096
+ return [...facetIds];
5385
5097
  }
5386
5098
  function matchesOrganizationGraphNodeSearch(node, search) {
5387
5099
  const query = normalizeOrganizationGraphSearch(search);
5388
5100
  if (!query) return true;
5389
5101
  const nodeStatus = getNodeStatus(node);
5390
- const nodeDomains = getExplicitNodeDomains(node);
5391
- 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(nodeStatus, query) || nodeDomains.some((domain) => includesQuery(domain, query)) || includesQuery(node.kind, query);
5102
+ const nodeFacets = getExplicitNodeFacets(node);
5103
+ return includesQuery(node.id, query) || includesQuery(node.label, query) || includesQuery(node.description, query) || includesQuery(node.sourceId, query) || includesQuery(node.featureId, query) || includesQuery(node.resourceType, query) || includesQuery(nodeStatus, query) || nodeFacets.some((facet) => includesQuery(facet, query)) || includesQuery(node.kind, query);
5392
5104
  }
5393
5105
  function matchesOrganizationGraphEdgeSearch(edge, graph, search) {
5394
5106
  const query = normalizeOrganizationGraphSearch(search);
@@ -5410,11 +5122,11 @@ function matchesDomainFilters(graph, node, domainFilters, commandViewData) {
5410
5122
  }
5411
5123
  const includedDomains = Object.entries(domainFilters).filter(([, filterState]) => filterState === "include").map(([domainId]) => domainId);
5412
5124
  const excludedDomains = Object.entries(domainFilters).filter(([, filterState]) => filterState === "exclude").map(([domainId]) => domainId);
5413
- const nodeDomains = getNodeDomains(graph, node, commandViewData);
5414
- if (excludedDomains.length > 0 && nodeDomains.some((domainId) => excludedDomains.includes(domainId))) {
5125
+ const nodeFacets = getNodeFacets(graph, node, commandViewData);
5126
+ if (excludedDomains.length > 0 && nodeFacets.some((domainId) => excludedDomains.includes(domainId))) {
5415
5127
  return false;
5416
5128
  }
5417
- if (includedDomains.length > 0 && !nodeDomains.some((domainId) => includedDomains.includes(domainId))) {
5129
+ if (includedDomains.length > 0 && !nodeFacets.some((domainId) => includedDomains.includes(domainId))) {
5418
5130
  return false;
5419
5131
  }
5420
5132
  return true;
@@ -5806,8 +5518,11 @@ function buildResourceSelectionSummary(node, stats) {
5806
5518
  { label: "Version", value: node.version },
5807
5519
  { label: "Origin", value: node.origin ? node.origin : "local" }
5808
5520
  ];
5809
- if (node.domains?.length) {
5810
- metadata.push({ label: "Domains", value: node.domains.join(", ") });
5521
+ if (node.category) {
5522
+ metadata.push({ label: "Category", value: node.category });
5523
+ }
5524
+ if (node.links?.length) {
5525
+ metadata.push({ label: "Links", value: node.links.map((link) => `${link.kind} ${link.nodeId}`).join(", ") });
5811
5526
  }
5812
5527
  if (node.type === "agent") {
5813
5528
  metadata.push({ label: "Model", value: `${node.modelProvider}/${node.modelId}` });
@@ -5847,8 +5562,11 @@ function buildHumanSelectionSummary(node, stats) {
5847
5562
  { label: "Version", value: node.version },
5848
5563
  { label: "Origin", value: node.origin ? node.origin : "local" }
5849
5564
  ];
5850
- if (node.domains?.length) {
5851
- metadata.push({ label: "Domains", value: node.domains.join(", ") });
5565
+ if (node.category) {
5566
+ metadata.push({ label: "Category", value: node.category });
5567
+ }
5568
+ if (node.links?.length) {
5569
+ metadata.push({ label: "Links", value: node.links.map((link) => `${link.kind} ${link.nodeId}`).join(", ") });
5852
5570
  }
5853
5571
  return {
5854
5572
  title: "Approval Queue Summary",
@@ -7645,12 +7363,12 @@ function OrganizationGraphPage({ lens = "default", timeRange = "30d" }) {
7645
7363
  lens
7646
7364
  ] }),
7647
7365
  /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
7648
- "Surface ID: ",
7649
- organizationGraph.surfaceId ?? "unresolved"
7366
+ "Feature ID: ",
7367
+ organizationGraph.featureId ?? "unresolved"
7650
7368
  ] }),
7651
7369
  /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
7652
- "Surface Path: ",
7653
- organizationGraph.surfacePath ?? "unresolved"
7370
+ "Feature Path: ",
7371
+ organizationGraph.featurePath ?? "unresolved"
7654
7372
  ] }),
7655
7373
  /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
7656
7374
  "Active Mode: ",
@@ -7806,9 +7524,12 @@ function CommandViewSidebarContent({ timeRange }) {
7806
7524
  ...cleanData.externalResources ?? [],
7807
7525
  ...cleanData.humanCheckpoints ?? []
7808
7526
  ].filter((resource) => {
7809
- const domains = resource.domains || [];
7810
- if (excludes.length > 0 && domains.some((d) => excludes.includes(d))) return false;
7811
- if (includes.length > 0 && !domains.some((d) => includes.includes(d))) return false;
7527
+ const facets = [
7528
+ ...resource.category ? [`category:${resource.category}`] : [],
7529
+ ...resource.links?.map((link) => link.nodeId) ?? []
7530
+ ];
7531
+ if (excludes.length > 0 && facets.some((d) => excludes.includes(d))) return false;
7532
+ if (includes.length > 0 && !facets.some((d) => includes.includes(d))) return false;
7812
7533
  if (statusFilter !== "all" && resource.status !== statusFilter) return false;
7813
7534
  if (filters.resourceTypes.length > 0) {
7814
7535
  const normalizedResourceType = resource.type === "human" ? "human_checkpoint" : resource.type;
@@ -7829,7 +7550,17 @@ function CommandViewSidebarContent({ timeRange }) {
7829
7550
  }
7830
7551
  return { donutSuccessCount: success, donutFailedCount: failed };
7831
7552
  }, [cleanData, domainFilters, filters.resourceTypes, showIntegrations, statsData, statusFilter]);
7832
- const domainDefinitions = cleanData?.domainDefinitions ?? [];
7553
+ const resourceFacets = useMemo(() => {
7554
+ if (!cleanData) return [];
7555
+ return collectResourceFilterFacets([
7556
+ ...cleanData.agents,
7557
+ ...cleanData.workflows,
7558
+ ...cleanData.triggers,
7559
+ ...cleanData.integrations,
7560
+ ...cleanData.externalResources ?? [],
7561
+ ...cleanData.humanCheckpoints ?? []
7562
+ ]);
7563
+ }, [cleanData]);
7833
7564
  const selectedNode = useMemo(() => {
7834
7565
  if (!selectedNodeId || !dataWithStats) return null;
7835
7566
  const allNodes = [
@@ -7952,22 +7683,16 @@ function CommandViewSidebarContent({ timeRange }) {
7952
7683
  size: "sm"
7953
7684
  }
7954
7685
  ),
7955
- domainDefinitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
7956
- /* @__PURE__ */ jsx(Text, { size: "sm", mb: 8, children: "Domain" }),
7957
- /* @__PURE__ */ jsx(Stack, { gap: 2, children: [...domainDefinitions].sort((a, b) => {
7958
- const bottom = /* @__PURE__ */ new Set(["utility", "diagnostic"]);
7959
- const aB = bottom.has(a.id) ? 1 : 0;
7960
- const bB = bottom.has(b.id) ? 1 : 0;
7961
- if (aB !== bB) return aB - bB;
7962
- return a.name.localeCompare(b.name);
7963
- }).map((domain) => {
7964
- const filterState = domainFilters[domain.id] || "neutral";
7686
+ resourceFacets.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
7687
+ /* @__PURE__ */ jsx(Text, { size: "sm", mb: 8, children: "Resource Facet" }),
7688
+ /* @__PURE__ */ jsx(Stack, { gap: 2, children: resourceFacets.map((facet) => {
7689
+ const filterState = domainFilters[facet.id] || "neutral";
7965
7690
  const StateIcon = FILTER_STATE_ICONS2[filterState];
7966
7691
  return /* @__PURE__ */ jsx(
7967
7692
  UnstyledButton,
7968
7693
  {
7969
7694
  title: FILTER_STATE_LABELS2[filterState],
7970
- onClick: () => cycleDomainFilter(domain.id),
7695
+ onClick: () => cycleDomainFilter(facet.id),
7971
7696
  py: 5,
7972
7697
  px: 6,
7973
7698
  style: {
@@ -7993,12 +7718,12 @@ function CommandViewSidebarContent({ timeRange }) {
7993
7718
  truncate: true,
7994
7719
  fw: filterState !== "neutral" ? 500 : 400,
7995
7720
  c: filterState !== "neutral" ? void 0 : "dimmed",
7996
- children: domain.name
7721
+ children: facet.label
7997
7722
  }
7998
7723
  )
7999
7724
  ] })
8000
7725
  },
8001
- domain.id
7726
+ facet.id
8002
7727
  );
8003
7728
  }) })
8004
7729
  ] })
@@ -9395,23 +9120,10 @@ var operationsManifest = {
9395
9120
  key: "operations",
9396
9121
  featureId: "operations",
9397
9122
  capabilityIds: ["operations.organization-graph", "operations.command-view"],
9123
+ icon: IconCode,
9398
9124
  sidebar: OperationsSidebar,
9399
- subshellRoutes: ["/operations"],
9400
9125
  organizationGraph: {
9401
- surfaceId: "operations.organization-graph"
9402
- },
9403
- navEntry: {
9404
- label: "Operations",
9405
- icon: IconCode,
9406
- dataOnboardingTourId: "sidebar-operations",
9407
- links: [
9408
- { label: "Overview", link: "/operations" },
9409
- { label: "Resources", link: "/operations/resources" },
9410
- { label: "Command View", link: "/operations/command-view" },
9411
- { label: "Command Queue", link: "/operations/command-queue" },
9412
- { label: "Sessions", link: "/operations/sessions" },
9413
- { label: "Task Scheduler", link: "/operations/task-scheduler" }
9414
- ]
9126
+ featureId: "operations.graph"
9415
9127
  }
9416
9128
  };
9417
9129