@elevasis/core 0.35.1 → 0.37.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 (32) hide show
  1. package/dist/auth/index.d.ts +124 -2
  2. package/dist/auth/index.js +14 -1
  3. package/dist/index.d.ts +334 -3
  4. package/dist/index.js +21 -5
  5. package/dist/knowledge/index.d.ts +81 -0
  6. package/dist/organization-model/index.d.ts +334 -3
  7. package/dist/organization-model/index.js +21 -5
  8. package/dist/test-utils/index.d.ts +97 -0
  9. package/dist/test-utils/index.js +19 -4
  10. package/package.json +1 -1
  11. package/src/_gen/__tests__/__snapshots__/contracts.md.snap +67 -0
  12. package/src/auth/multi-tenancy/invitations/api-schemas.ts +24 -9
  13. package/src/auth/multi-tenancy/invitations/index.ts +11 -9
  14. package/src/auth/multi-tenancy/organizations/__tests__/api-schemas.test.ts +39 -3
  15. package/src/auth/multi-tenancy/organizations/api-schemas.ts +36 -8
  16. package/src/auth/multi-tenancy/organizations/index.ts +13 -11
  17. package/src/business/acquisition/build-templates.test.ts +34 -0
  18. package/src/business/acquisition/build-templates.ts +8 -1
  19. package/src/organization-model/__tests__/domains/navigation-topbar.test.ts +282 -0
  20. package/src/organization-model/__tests__/migration-helpers.test.ts +11 -11
  21. package/src/organization-model/defaults.ts +2 -1
  22. package/src/organization-model/domains/navigation.ts +176 -139
  23. package/src/organization-model/icons.ts +1 -0
  24. package/src/organization-model/migration-helpers.ts +8 -1
  25. package/src/organization-model/published.ts +6 -6
  26. package/src/organization-model/types.ts +5 -1
  27. package/src/platform/constants/versions.ts +1 -1
  28. package/src/platform/registry/__tests__/resource-registry.test.ts +2053 -2054
  29. package/src/reference/_generated/contracts.md +67 -0
  30. package/src/scaffold-registry/index.ts +4 -4
  31. package/src/supabase/database.types.ts +15 -0
  32. package/src/test-utils/rls/RLSTestContext.ts +3 -3
@@ -429,6 +429,7 @@ declare const SystemUiSchema: z.ZodObject<{
429
429
  edit: "edit";
430
430
  view: "view";
431
431
  launch: "launch";
432
+ "message-plus": "message-plus";
432
433
  escalate: "escalate";
433
434
  promote: "promote";
434
435
  submit: "submit";
@@ -756,6 +757,7 @@ declare const SurfaceDefinitionSchema: z.ZodObject<{
756
757
  edit: "edit";
757
758
  view: "view";
758
759
  launch: "launch";
760
+ "message-plus": "message-plus";
759
761
  escalate: "escalate";
760
762
  promote: "promote";
761
763
  submit: "submit";
@@ -818,11 +820,254 @@ declare const SidebarNavigationSchema: z.ZodDefault<z.ZodObject<{
818
820
  primary: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
819
821
  bottom: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
820
822
  }, z.core.$strip>>;
823
+ /**
824
+ * A leaf node in `navigation.topbar`. Has no `path`, `surfaceType`, or nesting —
825
+ * topbar actions trigger behavior (open a modal, open docs, etc.) rather than navigate to a route.
826
+ * Behavior is bound by a UI registry (`TopbarActionModule`) that matches on `id`.
827
+ */
828
+ declare const TopbarActionNodeSchema: z.ZodObject<{
829
+ id: z.ZodString;
830
+ label: z.ZodString;
831
+ tooltip: z.ZodOptional<z.ZodString>;
832
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
833
+ message: "message";
834
+ error: "error";
835
+ agent: "agent";
836
+ workflow: "workflow";
837
+ "google-sheets": "google-sheets";
838
+ dashboard: "dashboard";
839
+ calendar: "calendar";
840
+ sales: "sales";
841
+ crm: "crm";
842
+ "lead-gen": "lead-gen";
843
+ projects: "projects";
844
+ clients: "clients";
845
+ operations: "operations";
846
+ monitoring: "monitoring";
847
+ knowledge: "knowledge";
848
+ settings: "settings";
849
+ admin: "admin";
850
+ archive: "archive";
851
+ business: "business";
852
+ finance: "finance";
853
+ platform: "platform";
854
+ seo: "seo";
855
+ playbook: "playbook";
856
+ strategy: "strategy";
857
+ reference: "reference";
858
+ integration: "integration";
859
+ database: "database";
860
+ user: "user";
861
+ team: "team";
862
+ gmail: "gmail";
863
+ attio: "attio";
864
+ overview: "overview";
865
+ "command-view": "command-view";
866
+ "command-queue": "command-queue";
867
+ pipeline: "pipeline";
868
+ lists: "lists";
869
+ resources: "resources";
870
+ approve: "approve";
871
+ reject: "reject";
872
+ retry: "retry";
873
+ edit: "edit";
874
+ view: "view";
875
+ launch: "launch";
876
+ "message-plus": "message-plus";
877
+ escalate: "escalate";
878
+ promote: "promote";
879
+ submit: "submit";
880
+ email: "email";
881
+ success: "success";
882
+ warning: "warning";
883
+ info: "info";
884
+ pending: "pending";
885
+ bolt: "bolt";
886
+ building: "building";
887
+ briefcase: "briefcase";
888
+ apps: "apps";
889
+ graph: "graph";
890
+ shield: "shield";
891
+ users: "users";
892
+ "chart-bar": "chart-bar";
893
+ search: "search";
894
+ }>, z.ZodString]>>;
895
+ order: z.ZodOptional<z.ZodNumber>;
896
+ enabled: z.ZodDefault<z.ZodBoolean>;
897
+ devOnly: z.ZodOptional<z.ZodBoolean>;
898
+ requiresAdmin: z.ZodOptional<z.ZodBoolean>;
899
+ targets: z.ZodOptional<z.ZodDefault<z.ZodObject<{
900
+ systems: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
901
+ entities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
902
+ resources: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
903
+ actions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
904
+ }, z.core.$strip>>>;
905
+ }, z.core.$strip>;
906
+ /**
907
+ * A flat map of topbar action nodes, keyed by action id.
908
+ * Defaults to an empty record (no topbar actions declared).
909
+ */
910
+ declare const TopbarSectionSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
911
+ id: z.ZodString;
912
+ label: z.ZodString;
913
+ tooltip: z.ZodOptional<z.ZodString>;
914
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
915
+ message: "message";
916
+ error: "error";
917
+ agent: "agent";
918
+ workflow: "workflow";
919
+ "google-sheets": "google-sheets";
920
+ dashboard: "dashboard";
921
+ calendar: "calendar";
922
+ sales: "sales";
923
+ crm: "crm";
924
+ "lead-gen": "lead-gen";
925
+ projects: "projects";
926
+ clients: "clients";
927
+ operations: "operations";
928
+ monitoring: "monitoring";
929
+ knowledge: "knowledge";
930
+ settings: "settings";
931
+ admin: "admin";
932
+ archive: "archive";
933
+ business: "business";
934
+ finance: "finance";
935
+ platform: "platform";
936
+ seo: "seo";
937
+ playbook: "playbook";
938
+ strategy: "strategy";
939
+ reference: "reference";
940
+ integration: "integration";
941
+ database: "database";
942
+ user: "user";
943
+ team: "team";
944
+ gmail: "gmail";
945
+ attio: "attio";
946
+ overview: "overview";
947
+ "command-view": "command-view";
948
+ "command-queue": "command-queue";
949
+ pipeline: "pipeline";
950
+ lists: "lists";
951
+ resources: "resources";
952
+ approve: "approve";
953
+ reject: "reject";
954
+ retry: "retry";
955
+ edit: "edit";
956
+ view: "view";
957
+ launch: "launch";
958
+ "message-plus": "message-plus";
959
+ escalate: "escalate";
960
+ promote: "promote";
961
+ submit: "submit";
962
+ email: "email";
963
+ success: "success";
964
+ warning: "warning";
965
+ info: "info";
966
+ pending: "pending";
967
+ bolt: "bolt";
968
+ building: "building";
969
+ briefcase: "briefcase";
970
+ apps: "apps";
971
+ graph: "graph";
972
+ shield: "shield";
973
+ users: "users";
974
+ "chart-bar": "chart-bar";
975
+ search: "search";
976
+ }>, z.ZodString]>>;
977
+ order: z.ZodOptional<z.ZodNumber>;
978
+ enabled: z.ZodDefault<z.ZodBoolean>;
979
+ devOnly: z.ZodOptional<z.ZodBoolean>;
980
+ requiresAdmin: z.ZodOptional<z.ZodBoolean>;
981
+ targets: z.ZodOptional<z.ZodDefault<z.ZodObject<{
982
+ systems: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
983
+ entities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
984
+ resources: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
985
+ actions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
986
+ }, z.core.$strip>>>;
987
+ }, z.core.$strip>>>;
821
988
  declare const OrganizationModelNavigationSchema: z.ZodDefault<z.ZodObject<{
822
989
  sidebar: z.ZodDefault<z.ZodObject<{
823
990
  primary: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
824
991
  bottom: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
825
992
  }, z.core.$strip>>;
993
+ topbar: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
994
+ id: z.ZodString;
995
+ label: z.ZodString;
996
+ tooltip: z.ZodOptional<z.ZodString>;
997
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
998
+ message: "message";
999
+ error: "error";
1000
+ agent: "agent";
1001
+ workflow: "workflow";
1002
+ "google-sheets": "google-sheets";
1003
+ dashboard: "dashboard";
1004
+ calendar: "calendar";
1005
+ sales: "sales";
1006
+ crm: "crm";
1007
+ "lead-gen": "lead-gen";
1008
+ projects: "projects";
1009
+ clients: "clients";
1010
+ operations: "operations";
1011
+ monitoring: "monitoring";
1012
+ knowledge: "knowledge";
1013
+ settings: "settings";
1014
+ admin: "admin";
1015
+ archive: "archive";
1016
+ business: "business";
1017
+ finance: "finance";
1018
+ platform: "platform";
1019
+ seo: "seo";
1020
+ playbook: "playbook";
1021
+ strategy: "strategy";
1022
+ reference: "reference";
1023
+ integration: "integration";
1024
+ database: "database";
1025
+ user: "user";
1026
+ team: "team";
1027
+ gmail: "gmail";
1028
+ attio: "attio";
1029
+ overview: "overview";
1030
+ "command-view": "command-view";
1031
+ "command-queue": "command-queue";
1032
+ pipeline: "pipeline";
1033
+ lists: "lists";
1034
+ resources: "resources";
1035
+ approve: "approve";
1036
+ reject: "reject";
1037
+ retry: "retry";
1038
+ edit: "edit";
1039
+ view: "view";
1040
+ launch: "launch";
1041
+ "message-plus": "message-plus";
1042
+ escalate: "escalate";
1043
+ promote: "promote";
1044
+ submit: "submit";
1045
+ email: "email";
1046
+ success: "success";
1047
+ warning: "warning";
1048
+ info: "info";
1049
+ pending: "pending";
1050
+ bolt: "bolt";
1051
+ building: "building";
1052
+ briefcase: "briefcase";
1053
+ apps: "apps";
1054
+ graph: "graph";
1055
+ shield: "shield";
1056
+ users: "users";
1057
+ "chart-bar": "chart-bar";
1058
+ search: "search";
1059
+ }>, z.ZodString]>>;
1060
+ order: z.ZodOptional<z.ZodNumber>;
1061
+ enabled: z.ZodDefault<z.ZodBoolean>;
1062
+ devOnly: z.ZodOptional<z.ZodBoolean>;
1063
+ requiresAdmin: z.ZodOptional<z.ZodBoolean>;
1064
+ targets: z.ZodOptional<z.ZodDefault<z.ZodObject<{
1065
+ systems: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
1066
+ entities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
1067
+ resources: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
1068
+ actions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
1069
+ }, z.core.$strip>>>;
1070
+ }, z.core.$strip>>>;
826
1071
  }, z.core.$strip>>;
827
1072
  declare const DEFAULT_ORGANIZATION_MODEL_NAVIGATION: z.infer<typeof OrganizationModelNavigationSchema>;
828
1073
  declare function getSortedSidebarEntries<TNode extends SidebarNode>(nodes: Record<string, TNode>): Array<[string, TNode]>;
@@ -877,6 +1122,7 @@ declare const IconNameSchema: z.ZodUnion<readonly [z.ZodEnum<{
877
1122
  edit: "edit";
878
1123
  view: "view";
879
1124
  launch: "launch";
1125
+ "message-plus": "message-plus";
880
1126
  escalate: "escalate";
881
1127
  promote: "promote";
882
1128
  submit: "submit";
@@ -1302,6 +1548,7 @@ declare const OrgKnowledgeNodeSchema: z.ZodObject<{
1302
1548
  edit: "edit";
1303
1549
  view: "view";
1304
1550
  launch: "launch";
1551
+ "message-plus": "message-plus";
1305
1552
  escalate: "escalate";
1306
1553
  promote: "promote";
1307
1554
  submit: "submit";
@@ -1411,6 +1658,7 @@ declare const KnowledgeDomainSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.Zod
1411
1658
  edit: "edit";
1412
1659
  view: "view";
1413
1660
  launch: "launch";
1661
+ "message-plus": "message-plus";
1414
1662
  escalate: "escalate";
1415
1663
  promote: "promote";
1416
1664
  submit: "submit";
@@ -3247,7 +3495,7 @@ declare function definePolicy(entry: z.input<typeof PolicySchema>): z.infer<type
3247
3495
  /** Validate and return an id-keyed map of policy entries. */
3248
3496
  declare function definePolicies(entries: readonly z.input<typeof PolicySchema>[]): Record<string, z.infer<typeof PolicySchema>>;
3249
3497
 
3250
- declare const ORGANIZATION_MODEL_ICON_TOKENS: readonly ["dashboard", "calendar", "sales", "crm", "lead-gen", "projects", "clients", "operations", "monitoring", "knowledge", "settings", "admin", "archive", "business", "finance", "platform", "seo", "playbook", "strategy", "reference", "agent", "workflow", "integration", "database", "user", "team", "gmail", "google-sheets", "attio", "overview", "command-view", "command-queue", "pipeline", "lists", "resources", "approve", "reject", "retry", "edit", "view", "launch", "message", "escalate", "promote", "submit", "email", "success", "error", "warning", "info", "pending", "bolt", "building", "briefcase", "apps", "graph", "shield", "users", "chart-bar", "search"];
3498
+ declare const ORGANIZATION_MODEL_ICON_TOKENS: readonly ["dashboard", "calendar", "sales", "crm", "lead-gen", "projects", "clients", "operations", "monitoring", "knowledge", "settings", "admin", "archive", "business", "finance", "platform", "seo", "playbook", "strategy", "reference", "agent", "workflow", "integration", "database", "user", "team", "gmail", "google-sheets", "attio", "overview", "command-view", "command-queue", "pipeline", "lists", "resources", "approve", "reject", "retry", "edit", "view", "launch", "message", "message-plus", "escalate", "promote", "submit", "email", "success", "error", "warning", "info", "pending", "bolt", "building", "briefcase", "apps", "graph", "shield", "users", "chart-bar", "search"];
3251
3499
  declare const OrganizationModelBuiltinIconTokenSchema: z.ZodEnum<{
3252
3500
  message: "message";
3253
3501
  error: "error";
@@ -3292,6 +3540,7 @@ declare const OrganizationModelBuiltinIconTokenSchema: z.ZodEnum<{
3292
3540
  edit: "edit";
3293
3541
  view: "view";
3294
3542
  launch: "launch";
3543
+ "message-plus": "message-plus";
3295
3544
  escalate: "escalate";
3296
3545
  promote: "promote";
3297
3546
  submit: "submit";
@@ -3354,6 +3603,7 @@ declare const OrganizationModelIconTokenSchema: z.ZodUnion<readonly [z.ZodEnum<{
3354
3603
  edit: "edit";
3355
3604
  view: "view";
3356
3605
  launch: "launch";
3606
+ "message-plus": "message-plus";
3357
3607
  escalate: "escalate";
3358
3608
  promote: "promote";
3359
3609
  submit: "submit";
@@ -3393,6 +3643,8 @@ type OrganizationModelSidebarSurfaceNode = Extract<OrganizationModelSidebarNode,
3393
3643
  type OrganizationModelSidebarGroupNode = Extract<OrganizationModelSidebarNode, {
3394
3644
  type: 'group';
3395
3645
  }>;
3646
+ type OrganizationModelTopbarActionNode = z.infer<typeof TopbarActionNodeSchema>;
3647
+ type OrganizationModelTopbarSection = z.infer<typeof TopbarSectionSchema>;
3396
3648
  type OrganizationModelTechStackEntry = z.infer<typeof TechStackEntrySchema>;
3397
3649
  type OrganizationModelStatuses = z.infer<typeof StatusesDomainSchema>;
3398
3650
  type OrganizationModelStatusEntry = z.infer<typeof StatusEntrySchema>;
@@ -4139,6 +4391,84 @@ declare const OrganizationModelSchema: z.ZodObject<{
4139
4391
  primary: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
4140
4392
  bottom: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
4141
4393
  }, z.core.$strip>>;
4394
+ topbar: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4395
+ id: z.ZodString;
4396
+ label: z.ZodString;
4397
+ tooltip: z.ZodOptional<z.ZodString>;
4398
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
4399
+ message: "message";
4400
+ error: "error";
4401
+ agent: "agent";
4402
+ workflow: "workflow";
4403
+ "google-sheets": "google-sheets";
4404
+ dashboard: "dashboard";
4405
+ calendar: "calendar";
4406
+ sales: "sales";
4407
+ crm: "crm";
4408
+ "lead-gen": "lead-gen";
4409
+ projects: "projects";
4410
+ clients: "clients";
4411
+ operations: "operations";
4412
+ monitoring: "monitoring";
4413
+ knowledge: "knowledge";
4414
+ settings: "settings";
4415
+ admin: "admin";
4416
+ archive: "archive";
4417
+ business: "business";
4418
+ finance: "finance";
4419
+ platform: "platform";
4420
+ seo: "seo";
4421
+ playbook: "playbook";
4422
+ strategy: "strategy";
4423
+ reference: "reference";
4424
+ integration: "integration";
4425
+ database: "database";
4426
+ user: "user";
4427
+ team: "team";
4428
+ gmail: "gmail";
4429
+ attio: "attio";
4430
+ overview: "overview";
4431
+ "command-view": "command-view";
4432
+ "command-queue": "command-queue";
4433
+ pipeline: "pipeline";
4434
+ lists: "lists";
4435
+ resources: "resources";
4436
+ approve: "approve";
4437
+ reject: "reject";
4438
+ retry: "retry";
4439
+ edit: "edit";
4440
+ view: "view";
4441
+ launch: "launch";
4442
+ "message-plus": "message-plus";
4443
+ escalate: "escalate";
4444
+ promote: "promote";
4445
+ submit: "submit";
4446
+ email: "email";
4447
+ success: "success";
4448
+ warning: "warning";
4449
+ info: "info";
4450
+ pending: "pending";
4451
+ bolt: "bolt";
4452
+ building: "building";
4453
+ briefcase: "briefcase";
4454
+ apps: "apps";
4455
+ graph: "graph";
4456
+ shield: "shield";
4457
+ users: "users";
4458
+ "chart-bar": "chart-bar";
4459
+ search: "search";
4460
+ }>, z.ZodString]>>;
4461
+ order: z.ZodOptional<z.ZodNumber>;
4462
+ enabled: z.ZodDefault<z.ZodBoolean>;
4463
+ devOnly: z.ZodOptional<z.ZodBoolean>;
4464
+ requiresAdmin: z.ZodOptional<z.ZodBoolean>;
4465
+ targets: z.ZodOptional<z.ZodDefault<z.ZodObject<{
4466
+ systems: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4467
+ entities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4468
+ resources: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4469
+ actions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4470
+ }, z.core.$strip>>>;
4471
+ }, z.core.$strip>>>;
4142
4472
  }, z.core.$strip>>;
4143
4473
  identity: z.ZodDefault<z.ZodObject<{
4144
4474
  mission: z.ZodDefault<z.ZodString>;
@@ -4807,6 +5137,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
4807
5137
  edit: "edit";
4808
5138
  view: "view";
4809
5139
  launch: "launch";
5140
+ "message-plus": "message-plus";
4810
5141
  escalate: "escalate";
4811
5142
  promote: "promote";
4812
5143
  submit: "submit";
@@ -4865,5 +5196,5 @@ declare const OrganizationModelSchema: z.ZodObject<{
4865
5196
  }, z.core.$strip>>>>;
4866
5197
  }, z.core.$strip>;
4867
5198
 
4868
- export { ActionIdSchema, ActionInvocationKindSchema, ActionInvocationSchema, ActionRefSchema, ActionSchema, ActionScopeSchema, ActionsDomainSchema, AgentKindSchema, AgentResourceEntrySchema, AgentRoleHolderSchema, ApiEndpointInvocationSchema, CodeReferenceRoleSchema, CodeReferenceSchema, ContractRefSchema, CustomerSegmentSchema, CustomersDomainSchema, DEFAULT_ONTOLOGY_SCOPE, DEFAULT_ORGANIZATION_MODEL, DEFAULT_ORGANIZATION_MODEL_ACTIONS, DEFAULT_ORGANIZATION_MODEL_CUSTOMERS, DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA, DEFAULT_ORGANIZATION_MODEL_GOALS, DEFAULT_ORGANIZATION_MODEL_NAVIGATION, DEFAULT_ORGANIZATION_MODEL_OFFERINGS, DEFAULT_ORGANIZATION_MODEL_POLICIES, DEFAULT_ORGANIZATION_MODEL_RESOURCES, DEFAULT_ORGANIZATION_MODEL_ROLES, DEFAULT_ORGANIZATION_MODEL_STATUSES, DEFAULT_ORGANIZATION_MODEL_SYSTEMS, DEFAULT_ORGANIZATION_MODEL_TOPOLOGY, EntitiesDomainSchema, EntityIdSchema, EntityLinkKindSchema, EntityLinkSchema, EntitySchema, EventDescriptorSchema, EventEmissionDescriptorSchema, EventIdSchema, FirmographicsSchema, GoalsDomainSchema, HumanRoleHolderSchema, IconNameSchema, IntegrationResourceEntrySchema, KNOWLEDGE_FEATURE_ID, KNOWLEDGE_SYSTEM_ID, KeyResultSchema, KnowledgeDomainSchema, KnowledgeLinkSchema, KnowledgeTargetKindSchema, KnowledgeTargetRefSchema, LinkSchema, MONITORING_FEATURE_ID, MONITORING_SYSTEM_ID, McpToolInvocationSchema, NavigationGroupSchema, NodeIdPathSchema, NodeIdStringSchema, OPERATIONS_COMMAND_VIEW_SURFACE_ID, OPERATIONS_FEATURE_ID, OPERATIONS_SYSTEM_ID, ORGANIZATION_MODEL_ICON_TOKENS, ObjectiveSchema, OfferingsDomainSchema, OmTopologyDomainSchema, OmTopologyMetadataSchema, OmTopologyNodeKindSchema, OmTopologyNodeRefSchema, OmTopologyRelationshipKindSchema, OmTopologyRelationshipSchema, OmTopologySystemInterfaceGrantMetadataSchema, OmTopologySystemInterfaceGrantSchema, OntologyActionTypeSchema, OntologyCatalogTypeSchema, OntologyEventTypeSchema, OntologyGroupSchema, OntologyIdSchema, OntologyInterfaceTypeSchema, OntologyKindSchema, OntologyLinkTypeSchema, OntologyObjectTypeSchema, OntologyScopeSchema, OntologySharedPropertySchema, OntologySurfaceTypeSchema, OntologyValueTypeSchema, OrgKnowledgeKindSchema, OrgKnowledgeNodeSchema, OrganizationModelBuiltinIconTokenSchema, OrganizationModelDomainKeySchema, OrganizationModelDomainMetadataByDomainSchema, OrganizationModelDomainMetadataSchema, OrganizationModelIconTokenSchema, OrganizationModelNavigationSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, PROJECTS_SYSTEM_ID, PROJECTS_VIEW_ACTION_ID, PROSPECTING_FEATURE_ID, PROSPECTING_LISTS_SURFACE_ID, PROSPECTING_SYSTEM_ID, PoliciesDomainSchema, PolicyApplicabilitySchema, PolicyEffectSchema, PolicyIdSchema, PolicyPredicateSchema, PolicySchema, PolicyTriggerSchema, PricingModelSchema, ProductSchema, ResourceEntrySchema, ResourceGovernanceStatusSchema, ResourceIdSchema, ResourceKindSchema, ResourceOntologyBindingSchema, ResourcesDomainSchema, RoleHolderSchema, RoleHoldersSchema, RoleIdSchema, RoleSchema, RolesDomainSchema, SALES_FEATURE_ID, SALES_PIPELINE_SURFACE_ID, SALES_SYSTEM_ID, SEO_FEATURE_ID, SEO_SYSTEM_ID, SETTINGS_FEATURE_ID, SETTINGS_ROLES_SURFACE_ID, SETTINGS_SYSTEM_ID, ScriptExecutionInvocationSchema, ScriptResourceEntrySchema, ScriptResourceLanguageSchema, ScriptResourceSourceSchema, SidebarNavigationSchema, SidebarNodeSchema, SidebarSectionSchema, SidebarSurfaceTargetsSchema, SlashCommandInvocationSchema, StatusEntrySchema, StatusSemanticClassSchema, StatusesDomainSchema, SurfaceDefinitionSchema, SurfaceTypeSchema, SystemApiInterfaceSchema, SystemEntrySchema, SystemIdSchema, SystemInterfaceKeySchema, SystemInterfaceLifecycleSchema, SystemInterfaceReadinessProfileSchema, SystemInterfaceRefSchema, SystemKindSchema, SystemLifecycleSchema, SystemPathSchema, SystemStatusSchema, SystemUiSchema, SystemsDomainSchema, TeamRoleHolderSchema, TechStackEntrySchema, UiPositionSchema, WorkflowResourceEntrySchema, compileOrganizationOntology, compileTopologyNodeRef, createFoundationOrganizationModel, defineAction, defineActions, defineCustomer, defineCustomers, defineDomainRecord, defineEntities, defineEntity, defineGoal, defineGoals, defineKnowledgeNode, defineKnowledgeNodes, defineOffering, defineOfferings, defineOrganizationModel, definePolicies, definePolicy, defineResource, defineResourceOntology, defineResources, defineRole, defineRoles, defineStatus, defineStatuses, defineSystem, defineSystems, defineTopology, defineTopologyRelationship, findOrganizationActionById, formatOntologyId, getOntologyDiagnostics, getSortedSidebarEntries, isOntologyGraphNodeId, isOntologyTopologyRef, listAllSystems, listResolvedOntologyRecords, ontologyGraphNodeId, ontologyIdFromGraphNodeId, parseContractRef, parseOntologyId, parseTopologyNodeRef, projectOrganizationSurfaces, resolveOrganizationModel, resolveOrganizationModelWithResources, scaffoldOrganizationModel, topologyRef, topologyRelationship, validateOrganizationSurfaceProjection };
4869
- export type { BaseOmScaffoldSpec, DeepPartial, Entity, EntityId, EntityLink, EventDescriptor, EventEmissionDescriptor, EventId, FoundationBranding, FoundationNavigationSurface, FoundationOrganizationModel, FoundationSurfaceIcon, FoundationSurfaceType, KnowledgeLink, KnowledgeNodeScaffoldSpec, KnowledgeTargetKind, KnowledgeTargetRef, LeadGenStageCatalogEntry, NodeIdPath, NodeIdString, OmScaffoldEdit, OmScaffoldIntent, OmScaffoldPlan, OmScaffoldSpec, OmScaffoldWrite, OntologyActionType, OntologyCatalogType, OntologyCompilation, OntologyDiagnostic, OntologyEventType, OntologyGroup, OntologyId, OntologyInterfaceType, OntologyKind, OntologyLinkType, OntologyObjectType, OntologyRecordOrigin, OntologyRecordScaffoldSpec, OntologyScope, OntologySharedProperty, OntologySurfaceType, OntologyValueType, OrgKnowledgeKind, OrgKnowledgeNode, OrgKnowledgeNodeInput, OrganizationModel, OrganizationModelAction, OrganizationModelActionId, OrganizationModelActionInvocation, OrganizationModelActionInvocationKind, OrganizationModelActionRef, OrganizationModelActionScope, OrganizationModelActions, OrganizationModelAgentKind, OrganizationModelAgentResourceEntry, OrganizationModelAgentRoleHolder, OrganizationModelBranding, OrganizationModelBuiltinIconToken, OrganizationModelCodeReference, OrganizationModelCodeReferenceRole, OrganizationModelContractRef, OrganizationModelCustomerFirmographics, OrganizationModelCustomerSegment, OrganizationModelCustomers, OrganizationModelDomainKey, OrganizationModelDomainMetadata, OrganizationModelDomainMetadataByDomain, OrganizationModelEntities, OrganizationModelEntity, OrganizationModelGoals, OrganizationModelHumanRoleHolder, OrganizationModelIconToken, OrganizationModelIntegrationResourceEntry, OrganizationModelKeyResult, OrganizationModelKnowledge, OrganizationModelNavigation, OrganizationModelObjective, OrganizationModelOfferings, OrganizationModelPolicies, OrganizationModelPolicy, OrganizationModelPolicyApplicability, OrganizationModelPolicyEffect, OrganizationModelPolicyId, OrganizationModelPolicyPredicate, OrganizationModelPolicyTrigger, OrganizationModelPricingModel, OrganizationModelProduct, OrganizationModelResourceEntry, OrganizationModelResourceGovernanceStatus, OrganizationModelResourceId, OrganizationModelResourceKind, OrganizationModelResourceOntologyBinding, OrganizationModelResourceOntologyBindingContract, OrganizationModelResources, OrganizationModelRole, OrganizationModelRoleHolder, OrganizationModelRoleId, OrganizationModelRoles, OrganizationModelScriptResourceEntry, OrganizationModelScriptResourceLanguage, OrganizationModelScriptResourceSource, OrganizationModelSidebar, OrganizationModelSidebarGroupNode, OrganizationModelSidebarNode, OrganizationModelSidebarSection, OrganizationModelSidebarSurfaceNode, OrganizationModelSidebarSurfaceTargets, OrganizationModelStatusEntry, OrganizationModelStatusSemanticClass, OrganizationModelStatuses, OrganizationModelSystemApiInterface, OrganizationModelSystemEntry, OrganizationModelSystemId, OrganizationModelSystemInterfaceKey, OrganizationModelSystemInterfaceLifecycle, OrganizationModelSystemInterfaceReadinessProfile, OrganizationModelSystemInterfaceRef, OrganizationModelSystemKind, OrganizationModelSystemLifecycle, OrganizationModelSystemStatus, OrganizationModelSystems, OrganizationModelTeamRoleHolder, OrganizationModelTechStackEntry, OrganizationModelTopology, OrganizationModelTopologyMetadata, OrganizationModelTopologyNodeKind, OrganizationModelTopologyNodeRef, OrganizationModelTopologyRelationship, OrganizationModelTopologyRelationshipKind, OrganizationModelTopologySystemInterfaceGrant, OrganizationModelTopologySystemInterfaceGrantMetadata, OrganizationModelWorkflowResourceEntry, OrganizationSurfaceProjection, OrganizationSurfaceProjectionIssue, OrganizationSurfaceProjectionIssueCode, ParsedContractRef, ParsedOntologyId, ResolvedOntologyIndex, ResolvedOntologyRecord, ResolvedOntologyRecordEntry, ResolvedOrganizationModel, ResolvedSystemEntry, ResourceScaffoldSpec, SystemEntryWithTree, SystemScaffoldSpec };
5199
+ export { ActionIdSchema, ActionInvocationKindSchema, ActionInvocationSchema, ActionRefSchema, ActionSchema, ActionScopeSchema, ActionsDomainSchema, AgentKindSchema, AgentResourceEntrySchema, AgentRoleHolderSchema, ApiEndpointInvocationSchema, CodeReferenceRoleSchema, CodeReferenceSchema, ContractRefSchema, CustomerSegmentSchema, CustomersDomainSchema, DEFAULT_ONTOLOGY_SCOPE, DEFAULT_ORGANIZATION_MODEL, DEFAULT_ORGANIZATION_MODEL_ACTIONS, DEFAULT_ORGANIZATION_MODEL_CUSTOMERS, DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA, DEFAULT_ORGANIZATION_MODEL_GOALS, DEFAULT_ORGANIZATION_MODEL_NAVIGATION, DEFAULT_ORGANIZATION_MODEL_OFFERINGS, DEFAULT_ORGANIZATION_MODEL_POLICIES, DEFAULT_ORGANIZATION_MODEL_RESOURCES, DEFAULT_ORGANIZATION_MODEL_ROLES, DEFAULT_ORGANIZATION_MODEL_STATUSES, DEFAULT_ORGANIZATION_MODEL_SYSTEMS, DEFAULT_ORGANIZATION_MODEL_TOPOLOGY, EntitiesDomainSchema, EntityIdSchema, EntityLinkKindSchema, EntityLinkSchema, EntitySchema, EventDescriptorSchema, EventEmissionDescriptorSchema, EventIdSchema, FirmographicsSchema, GoalsDomainSchema, HumanRoleHolderSchema, IconNameSchema, IntegrationResourceEntrySchema, KNOWLEDGE_FEATURE_ID, KNOWLEDGE_SYSTEM_ID, KeyResultSchema, KnowledgeDomainSchema, KnowledgeLinkSchema, KnowledgeTargetKindSchema, KnowledgeTargetRefSchema, LinkSchema, MONITORING_FEATURE_ID, MONITORING_SYSTEM_ID, McpToolInvocationSchema, NavigationGroupSchema, NodeIdPathSchema, NodeIdStringSchema, OPERATIONS_COMMAND_VIEW_SURFACE_ID, OPERATIONS_FEATURE_ID, OPERATIONS_SYSTEM_ID, ORGANIZATION_MODEL_ICON_TOKENS, ObjectiveSchema, OfferingsDomainSchema, OmTopologyDomainSchema, OmTopologyMetadataSchema, OmTopologyNodeKindSchema, OmTopologyNodeRefSchema, OmTopologyRelationshipKindSchema, OmTopologyRelationshipSchema, OmTopologySystemInterfaceGrantMetadataSchema, OmTopologySystemInterfaceGrantSchema, OntologyActionTypeSchema, OntologyCatalogTypeSchema, OntologyEventTypeSchema, OntologyGroupSchema, OntologyIdSchema, OntologyInterfaceTypeSchema, OntologyKindSchema, OntologyLinkTypeSchema, OntologyObjectTypeSchema, OntologyScopeSchema, OntologySharedPropertySchema, OntologySurfaceTypeSchema, OntologyValueTypeSchema, OrgKnowledgeKindSchema, OrgKnowledgeNodeSchema, OrganizationModelBuiltinIconTokenSchema, OrganizationModelDomainKeySchema, OrganizationModelDomainMetadataByDomainSchema, OrganizationModelDomainMetadataSchema, OrganizationModelIconTokenSchema, OrganizationModelNavigationSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, PROJECTS_SYSTEM_ID, PROJECTS_VIEW_ACTION_ID, PROSPECTING_FEATURE_ID, PROSPECTING_LISTS_SURFACE_ID, PROSPECTING_SYSTEM_ID, PoliciesDomainSchema, PolicyApplicabilitySchema, PolicyEffectSchema, PolicyIdSchema, PolicyPredicateSchema, PolicySchema, PolicyTriggerSchema, PricingModelSchema, ProductSchema, ResourceEntrySchema, ResourceGovernanceStatusSchema, ResourceIdSchema, ResourceKindSchema, ResourceOntologyBindingSchema, ResourcesDomainSchema, RoleHolderSchema, RoleHoldersSchema, RoleIdSchema, RoleSchema, RolesDomainSchema, SALES_FEATURE_ID, SALES_PIPELINE_SURFACE_ID, SALES_SYSTEM_ID, SEO_FEATURE_ID, SEO_SYSTEM_ID, SETTINGS_FEATURE_ID, SETTINGS_ROLES_SURFACE_ID, SETTINGS_SYSTEM_ID, ScriptExecutionInvocationSchema, ScriptResourceEntrySchema, ScriptResourceLanguageSchema, ScriptResourceSourceSchema, SidebarNavigationSchema, SidebarNodeSchema, SidebarSectionSchema, SidebarSurfaceTargetsSchema, SlashCommandInvocationSchema, StatusEntrySchema, StatusSemanticClassSchema, StatusesDomainSchema, SurfaceDefinitionSchema, SurfaceTypeSchema, SystemApiInterfaceSchema, SystemEntrySchema, SystemIdSchema, SystemInterfaceKeySchema, SystemInterfaceLifecycleSchema, SystemInterfaceReadinessProfileSchema, SystemInterfaceRefSchema, SystemKindSchema, SystemLifecycleSchema, SystemPathSchema, SystemStatusSchema, SystemUiSchema, SystemsDomainSchema, TeamRoleHolderSchema, TechStackEntrySchema, TopbarActionNodeSchema, TopbarSectionSchema, UiPositionSchema, WorkflowResourceEntrySchema, compileOrganizationOntology, compileTopologyNodeRef, createFoundationOrganizationModel, defineAction, defineActions, defineCustomer, defineCustomers, defineDomainRecord, defineEntities, defineEntity, defineGoal, defineGoals, defineKnowledgeNode, defineKnowledgeNodes, defineOffering, defineOfferings, defineOrganizationModel, definePolicies, definePolicy, defineResource, defineResourceOntology, defineResources, defineRole, defineRoles, defineStatus, defineStatuses, defineSystem, defineSystems, defineTopology, defineTopologyRelationship, findOrganizationActionById, formatOntologyId, getOntologyDiagnostics, getSortedSidebarEntries, isOntologyGraphNodeId, isOntologyTopologyRef, listAllSystems, listResolvedOntologyRecords, ontologyGraphNodeId, ontologyIdFromGraphNodeId, parseContractRef, parseOntologyId, parseTopologyNodeRef, projectOrganizationSurfaces, resolveOrganizationModel, resolveOrganizationModelWithResources, scaffoldOrganizationModel, topologyRef, topologyRelationship, validateOrganizationSurfaceProjection };
5200
+ export type { BaseOmScaffoldSpec, DeepPartial, Entity, EntityId, EntityLink, EventDescriptor, EventEmissionDescriptor, EventId, FoundationBranding, FoundationNavigationSurface, FoundationOrganizationModel, FoundationSurfaceIcon, FoundationSurfaceType, KnowledgeLink, KnowledgeNodeScaffoldSpec, KnowledgeTargetKind, KnowledgeTargetRef, LeadGenStageCatalogEntry, NodeIdPath, NodeIdString, OmScaffoldEdit, OmScaffoldIntent, OmScaffoldPlan, OmScaffoldSpec, OmScaffoldWrite, OntologyActionType, OntologyCatalogType, OntologyCompilation, OntologyDiagnostic, OntologyEventType, OntologyGroup, OntologyId, OntologyInterfaceType, OntologyKind, OntologyLinkType, OntologyObjectType, OntologyRecordOrigin, OntologyRecordScaffoldSpec, OntologyScope, OntologySharedProperty, OntologySurfaceType, OntologyValueType, OrgKnowledgeKind, OrgKnowledgeNode, OrgKnowledgeNodeInput, OrganizationModel, OrganizationModelAction, OrganizationModelActionId, OrganizationModelActionInvocation, OrganizationModelActionInvocationKind, OrganizationModelActionRef, OrganizationModelActionScope, OrganizationModelActions, OrganizationModelAgentKind, OrganizationModelAgentResourceEntry, OrganizationModelAgentRoleHolder, OrganizationModelBranding, OrganizationModelBuiltinIconToken, OrganizationModelCodeReference, OrganizationModelCodeReferenceRole, OrganizationModelContractRef, OrganizationModelCustomerFirmographics, OrganizationModelCustomerSegment, OrganizationModelCustomers, OrganizationModelDomainKey, OrganizationModelDomainMetadata, OrganizationModelDomainMetadataByDomain, OrganizationModelEntities, OrganizationModelEntity, OrganizationModelGoals, OrganizationModelHumanRoleHolder, OrganizationModelIconToken, OrganizationModelIntegrationResourceEntry, OrganizationModelKeyResult, OrganizationModelKnowledge, OrganizationModelNavigation, OrganizationModelObjective, OrganizationModelOfferings, OrganizationModelPolicies, OrganizationModelPolicy, OrganizationModelPolicyApplicability, OrganizationModelPolicyEffect, OrganizationModelPolicyId, OrganizationModelPolicyPredicate, OrganizationModelPolicyTrigger, OrganizationModelPricingModel, OrganizationModelProduct, OrganizationModelResourceEntry, OrganizationModelResourceGovernanceStatus, OrganizationModelResourceId, OrganizationModelResourceKind, OrganizationModelResourceOntologyBinding, OrganizationModelResourceOntologyBindingContract, OrganizationModelResources, OrganizationModelRole, OrganizationModelRoleHolder, OrganizationModelRoleId, OrganizationModelRoles, OrganizationModelScriptResourceEntry, OrganizationModelScriptResourceLanguage, OrganizationModelScriptResourceSource, OrganizationModelSidebar, OrganizationModelSidebarGroupNode, OrganizationModelSidebarNode, OrganizationModelSidebarSection, OrganizationModelSidebarSurfaceNode, OrganizationModelSidebarSurfaceTargets, OrganizationModelStatusEntry, OrganizationModelStatusSemanticClass, OrganizationModelStatuses, OrganizationModelSystemApiInterface, OrganizationModelSystemEntry, OrganizationModelSystemId, OrganizationModelSystemInterfaceKey, OrganizationModelSystemInterfaceLifecycle, OrganizationModelSystemInterfaceReadinessProfile, OrganizationModelSystemInterfaceRef, OrganizationModelSystemKind, OrganizationModelSystemLifecycle, OrganizationModelSystemStatus, OrganizationModelSystems, OrganizationModelTeamRoleHolder, OrganizationModelTechStackEntry, OrganizationModelTopbarActionNode, OrganizationModelTopbarSection, OrganizationModelTopology, OrganizationModelTopologyMetadata, OrganizationModelTopologyNodeKind, OrganizationModelTopologyNodeRef, OrganizationModelTopologyRelationship, OrganizationModelTopologyRelationshipKind, OrganizationModelTopologySystemInterfaceGrant, OrganizationModelTopologySystemInterfaceGrantMetadata, OrganizationModelWorkflowResourceEntry, OrganizationSurfaceProjection, OrganizationSurfaceProjectionIssue, OrganizationSurfaceProjectionIssueCode, ParsedContractRef, ParsedOntologyId, ResolvedOntologyIndex, ResolvedOntologyRecord, ResolvedOntologyRecordEntry, ResolvedOrganizationModel, ResolvedSystemEntry, ResourceScaffoldSpec, SystemEntryWithTree, SystemScaffoldSpec };
@@ -416,6 +416,7 @@ var ORGANIZATION_MODEL_ICON_TOKENS = [
416
416
  "view",
417
417
  "launch",
418
418
  "message",
419
+ "message-plus",
419
420
  "escalate",
420
421
  "promote",
421
422
  "submit",
@@ -600,14 +601,28 @@ var SidebarNavigationSchema = z.object({
600
601
  primary: SidebarSectionSchema,
601
602
  bottom: SidebarSectionSchema
602
603
  }).default({ primary: {}, bottom: {} });
604
+ var TopbarActionNodeSchema = z.object({
605
+ id: ModelIdSchema,
606
+ label: LabelSchema,
607
+ tooltip: DescriptionSchema.optional(),
608
+ icon: IconNameSchema.optional(),
609
+ order: z.number().int().optional(),
610
+ enabled: z.boolean().default(true),
611
+ devOnly: z.boolean().optional(),
612
+ requiresAdmin: z.boolean().optional(),
613
+ targets: SidebarSurfaceTargetsSchema.optional()
614
+ });
615
+ var TopbarSectionSchema = z.record(z.string(), TopbarActionNodeSchema).default({});
603
616
  var OrganizationModelNavigationSchema = z.object({
604
- sidebar: SidebarNavigationSchema
605
- }).default({ sidebar: { primary: {}, bottom: {} } });
617
+ sidebar: SidebarNavigationSchema,
618
+ topbar: TopbarSectionSchema
619
+ }).default({ sidebar: { primary: {}, bottom: {} }, topbar: {} });
606
620
  var DEFAULT_ORGANIZATION_MODEL_NAVIGATION = {
607
621
  sidebar: {
608
622
  primary: {},
609
623
  bottom: {}
610
- }
624
+ },
625
+ topbar: {}
611
626
  };
612
627
  function getSortedSidebarEntries(nodes) {
613
628
  return Object.entries(nodes).sort(([leftId, left], [rightId, right]) => {
@@ -2556,7 +2571,8 @@ var DEFAULT_ORGANIZATION_MODEL_NAVIGATION2 = {
2556
2571
  sidebar: {
2557
2572
  primary: {},
2558
2573
  bottom: {}
2559
- }
2574
+ },
2575
+ topbar: {}
2560
2576
  };
2561
2577
  var DEFAULT_ORGANIZATION_MODEL = {
2562
2578
  version: 1,
@@ -3459,4 +3475,4 @@ function scaffoldOrganizationModel(model, spec) {
3459
3475
  return scaffoldKnowledgeNode(model, spec);
3460
3476
  }
3461
3477
 
3462
- export { ActionIdSchema, ActionInvocationKindSchema, ActionInvocationSchema, ActionRefSchema, ActionSchema, ActionScopeSchema, ActionsDomainSchema, AgentKindSchema, AgentResourceEntrySchema, AgentRoleHolderSchema, ApiEndpointInvocationSchema, CodeReferenceRoleSchema, CodeReferenceSchema, ContractRefSchema, CustomerSegmentSchema, CustomersDomainSchema, DEFAULT_ONTOLOGY_SCOPE, DEFAULT_ORGANIZATION_MODEL, DEFAULT_ORGANIZATION_MODEL_ACTIONS, DEFAULT_ORGANIZATION_MODEL_CUSTOMERS, DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA, DEFAULT_ORGANIZATION_MODEL_GOALS, DEFAULT_ORGANIZATION_MODEL_NAVIGATION, DEFAULT_ORGANIZATION_MODEL_OFFERINGS, DEFAULT_ORGANIZATION_MODEL_POLICIES, DEFAULT_ORGANIZATION_MODEL_RESOURCES, DEFAULT_ORGANIZATION_MODEL_ROLES, DEFAULT_ORGANIZATION_MODEL_STATUSES, DEFAULT_ORGANIZATION_MODEL_SYSTEMS, DEFAULT_ORGANIZATION_MODEL_TOPOLOGY, EntitiesDomainSchema, EntityIdSchema, EntityLinkKindSchema, EntityLinkSchema, EntitySchema, EventDescriptorSchema, EventEmissionDescriptorSchema, EventIdSchema, FirmographicsSchema, GoalsDomainSchema, HumanRoleHolderSchema, IconNameSchema, IntegrationResourceEntrySchema, KNOWLEDGE_FEATURE_ID, KNOWLEDGE_SYSTEM_ID, KeyResultSchema, KnowledgeDomainSchema, KnowledgeLinkSchema, KnowledgeTargetKindSchema, KnowledgeTargetRefSchema, LinkSchema, MONITORING_FEATURE_ID, MONITORING_SYSTEM_ID, McpToolInvocationSchema, NavigationGroupSchema, NodeIdPathSchema, NodeIdStringSchema, OPERATIONS_COMMAND_VIEW_SURFACE_ID, OPERATIONS_FEATURE_ID, OPERATIONS_SYSTEM_ID, ORGANIZATION_MODEL_ICON_TOKENS, ObjectiveSchema, OfferingsDomainSchema, OmTopologyDomainSchema, OmTopologyMetadataSchema, OmTopologyNodeKindSchema, OmTopologyNodeRefSchema, OmTopologyRelationshipKindSchema, OmTopologyRelationshipSchema, OmTopologySystemInterfaceGrantMetadataSchema, OmTopologySystemInterfaceGrantSchema, OntologyActionTypeSchema, OntologyCatalogTypeSchema, OntologyEventTypeSchema, OntologyGroupSchema, OntologyIdSchema, OntologyInterfaceTypeSchema, OntologyKindSchema, OntologyLinkTypeSchema, OntologyObjectTypeSchema, OntologyScopeSchema, OntologySharedPropertySchema, OntologySurfaceTypeSchema, OntologyValueTypeSchema, OrgKnowledgeKindSchema, OrgKnowledgeNodeSchema, OrganizationModelBuiltinIconTokenSchema, OrganizationModelDomainKeySchema, OrganizationModelDomainMetadataByDomainSchema, OrganizationModelDomainMetadataSchema, OrganizationModelIconTokenSchema, OrganizationModelNavigationSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, PROJECTS_SYSTEM_ID, PROJECTS_VIEW_ACTION_ID, PROSPECTING_FEATURE_ID, PROSPECTING_LISTS_SURFACE_ID, PROSPECTING_SYSTEM_ID, PoliciesDomainSchema, PolicyApplicabilitySchema, PolicyEffectSchema, PolicyIdSchema, PolicyPredicateSchema, PolicySchema, PolicyTriggerSchema, PricingModelSchema, ProductSchema, ResourceEntrySchema, ResourceGovernanceStatusSchema, ResourceIdSchema, ResourceKindSchema, ResourceOntologyBindingSchema, ResourcesDomainSchema, RoleHolderSchema, RoleHoldersSchema, RoleIdSchema, RoleSchema, RolesDomainSchema, SALES_FEATURE_ID, SALES_PIPELINE_SURFACE_ID, SALES_SYSTEM_ID, SEO_FEATURE_ID, SEO_SYSTEM_ID, SETTINGS_FEATURE_ID, SETTINGS_ROLES_SURFACE_ID, SETTINGS_SYSTEM_ID, ScriptExecutionInvocationSchema, ScriptResourceEntrySchema, ScriptResourceLanguageSchema, ScriptResourceSourceSchema, SidebarNavigationSchema, SidebarNodeSchema, SidebarSectionSchema, SidebarSurfaceTargetsSchema, SlashCommandInvocationSchema, StatusEntrySchema, StatusSemanticClassSchema, StatusesDomainSchema, SurfaceDefinitionSchema, SurfaceTypeSchema, SystemApiInterfaceSchema, SystemEntrySchema, SystemIdSchema, SystemInterfaceKeySchema, SystemInterfaceLifecycleSchema, SystemInterfaceReadinessProfileSchema, SystemInterfaceRefSchema, SystemKindSchema, SystemLifecycleSchema, SystemPathSchema, SystemStatusSchema, SystemUiSchema, SystemsDomainSchema, TeamRoleHolderSchema, TechStackEntrySchema, UiPositionSchema, WorkflowResourceEntrySchema, compileOrganizationOntology, compileTopologyNodeRef, createFoundationOrganizationModel, defineAction, defineActions, defineCustomer, defineCustomers, defineDomainRecord, defineEntities, defineEntity, defineGoal, defineGoals, defineKnowledgeNode, defineKnowledgeNodes, defineOffering, defineOfferings, defineOrganizationModel, definePolicies, definePolicy, defineResource, defineResourceOntology, defineResources, defineRole, defineRoles, defineStatus, defineStatuses, defineSystem, defineSystems, defineTopology, defineTopologyRelationship, findOrganizationActionById, formatOntologyId, getOntologyDiagnostics, getSortedSidebarEntries, isOntologyGraphNodeId, isOntologyTopologyRef, listAllSystems, listResolvedOntologyRecords, ontologyGraphNodeId, ontologyIdFromGraphNodeId, parseContractRef, parseOntologyId, parseTopologyNodeRef, projectOrganizationSurfaces, resolveOrganizationModel, resolveOrganizationModelWithResources, scaffoldOrganizationModel, topologyRef, topologyRelationship, validateOrganizationSurfaceProjection };
3478
+ export { ActionIdSchema, ActionInvocationKindSchema, ActionInvocationSchema, ActionRefSchema, ActionSchema, ActionScopeSchema, ActionsDomainSchema, AgentKindSchema, AgentResourceEntrySchema, AgentRoleHolderSchema, ApiEndpointInvocationSchema, CodeReferenceRoleSchema, CodeReferenceSchema, ContractRefSchema, CustomerSegmentSchema, CustomersDomainSchema, DEFAULT_ONTOLOGY_SCOPE, DEFAULT_ORGANIZATION_MODEL, DEFAULT_ORGANIZATION_MODEL_ACTIONS, DEFAULT_ORGANIZATION_MODEL_CUSTOMERS, DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA, DEFAULT_ORGANIZATION_MODEL_GOALS, DEFAULT_ORGANIZATION_MODEL_NAVIGATION, DEFAULT_ORGANIZATION_MODEL_OFFERINGS, DEFAULT_ORGANIZATION_MODEL_POLICIES, DEFAULT_ORGANIZATION_MODEL_RESOURCES, DEFAULT_ORGANIZATION_MODEL_ROLES, DEFAULT_ORGANIZATION_MODEL_STATUSES, DEFAULT_ORGANIZATION_MODEL_SYSTEMS, DEFAULT_ORGANIZATION_MODEL_TOPOLOGY, EntitiesDomainSchema, EntityIdSchema, EntityLinkKindSchema, EntityLinkSchema, EntitySchema, EventDescriptorSchema, EventEmissionDescriptorSchema, EventIdSchema, FirmographicsSchema, GoalsDomainSchema, HumanRoleHolderSchema, IconNameSchema, IntegrationResourceEntrySchema, KNOWLEDGE_FEATURE_ID, KNOWLEDGE_SYSTEM_ID, KeyResultSchema, KnowledgeDomainSchema, KnowledgeLinkSchema, KnowledgeTargetKindSchema, KnowledgeTargetRefSchema, LinkSchema, MONITORING_FEATURE_ID, MONITORING_SYSTEM_ID, McpToolInvocationSchema, NavigationGroupSchema, NodeIdPathSchema, NodeIdStringSchema, OPERATIONS_COMMAND_VIEW_SURFACE_ID, OPERATIONS_FEATURE_ID, OPERATIONS_SYSTEM_ID, ORGANIZATION_MODEL_ICON_TOKENS, ObjectiveSchema, OfferingsDomainSchema, OmTopologyDomainSchema, OmTopologyMetadataSchema, OmTopologyNodeKindSchema, OmTopologyNodeRefSchema, OmTopologyRelationshipKindSchema, OmTopologyRelationshipSchema, OmTopologySystemInterfaceGrantMetadataSchema, OmTopologySystemInterfaceGrantSchema, OntologyActionTypeSchema, OntologyCatalogTypeSchema, OntologyEventTypeSchema, OntologyGroupSchema, OntologyIdSchema, OntologyInterfaceTypeSchema, OntologyKindSchema, OntologyLinkTypeSchema, OntologyObjectTypeSchema, OntologyScopeSchema, OntologySharedPropertySchema, OntologySurfaceTypeSchema, OntologyValueTypeSchema, OrgKnowledgeKindSchema, OrgKnowledgeNodeSchema, OrganizationModelBuiltinIconTokenSchema, OrganizationModelDomainKeySchema, OrganizationModelDomainMetadataByDomainSchema, OrganizationModelDomainMetadataSchema, OrganizationModelIconTokenSchema, OrganizationModelNavigationSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, PROJECTS_SYSTEM_ID, PROJECTS_VIEW_ACTION_ID, PROSPECTING_FEATURE_ID, PROSPECTING_LISTS_SURFACE_ID, PROSPECTING_SYSTEM_ID, PoliciesDomainSchema, PolicyApplicabilitySchema, PolicyEffectSchema, PolicyIdSchema, PolicyPredicateSchema, PolicySchema, PolicyTriggerSchema, PricingModelSchema, ProductSchema, ResourceEntrySchema, ResourceGovernanceStatusSchema, ResourceIdSchema, ResourceKindSchema, ResourceOntologyBindingSchema, ResourcesDomainSchema, RoleHolderSchema, RoleHoldersSchema, RoleIdSchema, RoleSchema, RolesDomainSchema, SALES_FEATURE_ID, SALES_PIPELINE_SURFACE_ID, SALES_SYSTEM_ID, SEO_FEATURE_ID, SEO_SYSTEM_ID, SETTINGS_FEATURE_ID, SETTINGS_ROLES_SURFACE_ID, SETTINGS_SYSTEM_ID, ScriptExecutionInvocationSchema, ScriptResourceEntrySchema, ScriptResourceLanguageSchema, ScriptResourceSourceSchema, SidebarNavigationSchema, SidebarNodeSchema, SidebarSectionSchema, SidebarSurfaceTargetsSchema, SlashCommandInvocationSchema, StatusEntrySchema, StatusSemanticClassSchema, StatusesDomainSchema, SurfaceDefinitionSchema, SurfaceTypeSchema, SystemApiInterfaceSchema, SystemEntrySchema, SystemIdSchema, SystemInterfaceKeySchema, SystemInterfaceLifecycleSchema, SystemInterfaceReadinessProfileSchema, SystemInterfaceRefSchema, SystemKindSchema, SystemLifecycleSchema, SystemPathSchema, SystemStatusSchema, SystemUiSchema, SystemsDomainSchema, TeamRoleHolderSchema, TechStackEntrySchema, TopbarActionNodeSchema, TopbarSectionSchema, UiPositionSchema, WorkflowResourceEntrySchema, compileOrganizationOntology, compileTopologyNodeRef, createFoundationOrganizationModel, defineAction, defineActions, defineCustomer, defineCustomers, defineDomainRecord, defineEntities, defineEntity, defineGoal, defineGoals, defineKnowledgeNode, defineKnowledgeNodes, defineOffering, defineOfferings, defineOrganizationModel, definePolicies, definePolicy, defineResource, defineResourceOntology, defineResources, defineRole, defineRoles, defineStatus, defineStatuses, defineSystem, defineSystems, defineTopology, defineTopologyRelationship, findOrganizationActionById, formatOntologyId, getOntologyDiagnostics, getSortedSidebarEntries, isOntologyGraphNodeId, isOntologyTopologyRef, listAllSystems, listResolvedOntologyRecords, ontologyGraphNodeId, ontologyIdFromGraphNodeId, parseContractRef, parseOntologyId, parseTopologyNodeRef, projectOrganizationSurfaces, resolveOrganizationModel, resolveOrganizationModelWithResources, scaffoldOrganizationModel, topologyRef, topologyRelationship, validateOrganizationSurfaceProjection };
@@ -3126,6 +3126,17 @@ type Database = {
3126
3126
  Args: never;
3127
3127
  Returns: undefined;
3128
3128
  };
3129
+ repair_membership_role_assignments: {
3130
+ Args: never;
3131
+ Returns: {
3132
+ membership_id: string;
3133
+ organization_id: string;
3134
+ repaired: boolean;
3135
+ role_id: string;
3136
+ role_slug: string;
3137
+ user_id: string;
3138
+ }[];
3139
+ };
3129
3140
  sync_all_memberships_with_role: {
3130
3141
  Args: {
3131
3142
  p_role_id: string;
@@ -3138,6 +3149,13 @@ type Database = {
3138
3149
  };
3139
3150
  Returns: undefined;
3140
3151
  };
3152
+ update_membership_role_assignment: {
3153
+ Args: {
3154
+ p_role_slug: string;
3155
+ p_workos_membership_id: string;
3156
+ };
3157
+ Returns: string;
3158
+ };
3141
3159
  upsert_user_profile: {
3142
3160
  Args: never;
3143
3161
  Returns: {
@@ -4028,6 +4046,84 @@ declare const OrganizationModelSchema: z.ZodObject<{
4028
4046
  primary: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
4029
4047
  bottom: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
4030
4048
  }, z.core.$strip>>;
4049
+ topbar: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4050
+ id: z.ZodString;
4051
+ label: z.ZodString;
4052
+ tooltip: z.ZodOptional<z.ZodString>;
4053
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
4054
+ message: "message";
4055
+ error: "error";
4056
+ agent: "agent";
4057
+ workflow: "workflow";
4058
+ "google-sheets": "google-sheets";
4059
+ dashboard: "dashboard";
4060
+ calendar: "calendar";
4061
+ sales: "sales";
4062
+ crm: "crm";
4063
+ "lead-gen": "lead-gen";
4064
+ projects: "projects";
4065
+ clients: "clients";
4066
+ operations: "operations";
4067
+ monitoring: "monitoring";
4068
+ knowledge: "knowledge";
4069
+ settings: "settings";
4070
+ admin: "admin";
4071
+ archive: "archive";
4072
+ business: "business";
4073
+ finance: "finance";
4074
+ platform: "platform";
4075
+ seo: "seo";
4076
+ playbook: "playbook";
4077
+ strategy: "strategy";
4078
+ reference: "reference";
4079
+ integration: "integration";
4080
+ database: "database";
4081
+ user: "user";
4082
+ team: "team";
4083
+ gmail: "gmail";
4084
+ attio: "attio";
4085
+ overview: "overview";
4086
+ "command-view": "command-view";
4087
+ "command-queue": "command-queue";
4088
+ pipeline: "pipeline";
4089
+ lists: "lists";
4090
+ resources: "resources";
4091
+ approve: "approve";
4092
+ reject: "reject";
4093
+ retry: "retry";
4094
+ edit: "edit";
4095
+ view: "view";
4096
+ launch: "launch";
4097
+ "message-plus": "message-plus";
4098
+ escalate: "escalate";
4099
+ promote: "promote";
4100
+ submit: "submit";
4101
+ email: "email";
4102
+ success: "success";
4103
+ warning: "warning";
4104
+ info: "info";
4105
+ pending: "pending";
4106
+ bolt: "bolt";
4107
+ building: "building";
4108
+ briefcase: "briefcase";
4109
+ apps: "apps";
4110
+ graph: "graph";
4111
+ shield: "shield";
4112
+ users: "users";
4113
+ "chart-bar": "chart-bar";
4114
+ search: "search";
4115
+ }>, z.ZodString]>>;
4116
+ order: z.ZodOptional<z.ZodNumber>;
4117
+ enabled: z.ZodDefault<z.ZodBoolean>;
4118
+ devOnly: z.ZodOptional<z.ZodBoolean>;
4119
+ requiresAdmin: z.ZodOptional<z.ZodBoolean>;
4120
+ targets: z.ZodOptional<z.ZodDefault<z.ZodObject<{
4121
+ systems: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4122
+ entities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4123
+ resources: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4124
+ actions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4125
+ }, z.core.$strip>>>;
4126
+ }, z.core.$strip>>>;
4031
4127
  }, z.core.$strip>>;
4032
4128
  identity: z.ZodDefault<z.ZodObject<{
4033
4129
  mission: z.ZodDefault<z.ZodString>;
@@ -4696,6 +4792,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
4696
4792
  edit: "edit";
4697
4793
  view: "view";
4698
4794
  launch: "launch";
4795
+ "message-plus": "message-plus";
4699
4796
  escalate: "escalate";
4700
4797
  promote: "promote";
4701
4798
  submit: "submit";