@elevasis/ui 2.68.0 → 2.70.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 (85) hide show
  1. package/dist/api/index.js +3 -3
  2. package/dist/app/index.d.ts +577 -367
  3. package/dist/app/index.js +10 -19
  4. package/dist/auth/index.d.ts +5 -0
  5. package/dist/auth/index.js +5 -5
  6. package/dist/charts/index.js +5 -5
  7. package/dist/{chunk-JC5W55J3.js → chunk-26BTE3Z4.js} +1 -1
  8. package/dist/{chunk-ZNKZMK2E.js → chunk-5C62IRKS.js} +5 -5
  9. package/dist/{chunk-ZGCWTWBD.js → chunk-6TT3FQEZ.js} +16218 -15769
  10. package/dist/{chunk-QYI5BZKM.js → chunk-AGX2CY2O.js} +1 -1
  11. package/dist/{chunk-UFTM5SZZ.js → chunk-AKANHRQ5.js} +9 -3
  12. package/dist/{chunk-NDHMZT2G.js → chunk-C75XWBYZ.js} +1 -1
  13. package/dist/{chunk-2MTP3H3A.js → chunk-CCZJ4OWY.js} +1 -1
  14. package/dist/{chunk-75NOC536.js → chunk-DUEGHF7A.js} +4 -4
  15. package/dist/{chunk-SIVUCZXQ.js → chunk-GJQF3S2Q.js} +1 -1
  16. package/dist/{chunk-ZWS3TCQR.js → chunk-GZADST64.js} +21 -108
  17. package/dist/{chunk-TYKAKJGW.js → chunk-JA2XDMAE.js} +1 -1
  18. package/dist/{chunk-76IVMVI3.js → chunk-LWYLZUUV.js} +3 -3
  19. package/dist/{chunk-WPIASV3H.js → chunk-LY3IKYTZ.js} +2 -2
  20. package/dist/{chunk-HJVPVS57.js → chunk-MFCV4JMQ.js} +5 -5
  21. package/dist/{chunk-L3HFJFYF.js → chunk-NM4A63KJ.js} +30 -48
  22. package/dist/{chunk-OOACTYRA.js → chunk-QDMIFD6F.js} +1 -1
  23. package/dist/{chunk-GBXTRSAU.js → chunk-SMH6SQQE.js} +1 -1
  24. package/dist/{chunk-TGPJNKDU.js → chunk-TJMZUL6E.js} +4 -4
  25. package/dist/{chunk-5NRJ2BLQ.js → chunk-VDX6DL7Z.js} +1 -1
  26. package/dist/{chunk-FK3K2VK2.js → chunk-XKUEO4HG.js} +10 -7
  27. package/dist/components/index.d.ts +1614 -256
  28. package/dist/components/index.js +25 -25
  29. package/dist/components/navigation/index.js +6 -6
  30. package/dist/features/auth/index.d.ts +457 -163
  31. package/dist/features/auth/index.js +7 -7
  32. package/dist/features/clients/index.d.ts +39 -1
  33. package/dist/features/clients/index.js +6 -5
  34. package/dist/features/content/index.css +659 -0
  35. package/dist/features/content/index.d.ts +1978 -0
  36. package/dist/features/content/index.js +2312 -0
  37. package/dist/features/crm/index.d.ts +584 -369
  38. package/dist/features/crm/index.js +7 -7
  39. package/dist/features/dashboard/index.d.ts +0 -6
  40. package/dist/features/dashboard/index.js +7 -7
  41. package/dist/features/delivery/index.css +149 -149
  42. package/dist/features/delivery/index.d.ts +457 -163
  43. package/dist/features/delivery/index.js +6 -6
  44. package/dist/features/knowledge/index.js +5 -5
  45. package/dist/features/lead-gen/index.d.ts +20 -91
  46. package/dist/features/lead-gen/index.js +7 -7
  47. package/dist/features/monitoring/index.css +149 -149
  48. package/dist/features/monitoring/index.js +8 -8
  49. package/dist/features/monitoring/requests/index.js +7 -12
  50. package/dist/features/operations/index.d.ts +0 -84
  51. package/dist/features/operations/index.js +10 -10
  52. package/dist/features/settings/index.d.ts +457 -163
  53. package/dist/features/settings/index.js +7 -7
  54. package/dist/hooks/access/index.d.ts +5 -0
  55. package/dist/hooks/access/index.js +5 -5
  56. package/dist/hooks/delivery/index.d.ts +457 -163
  57. package/dist/hooks/delivery/index.js +2 -2
  58. package/dist/hooks/index.css +149 -149
  59. package/dist/hooks/index.d.ts +2128 -233
  60. package/dist/hooks/index.js +5 -5
  61. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +0 -6
  62. package/dist/hooks/published.css +149 -149
  63. package/dist/hooks/published.d.ts +2128 -233
  64. package/dist/hooks/published.js +5 -5
  65. package/dist/initialization/index.d.ts +464 -164
  66. package/dist/knowledge/index.d.ts +4 -88
  67. package/dist/knowledge/index.js +3211 -3201
  68. package/dist/{knowledge-search-index-6EZNBNSR.js → knowledge-search-index-LP2WVSQX.js} +689 -695
  69. package/dist/layout/index.js +8 -8
  70. package/dist/organization/index.d.ts +7 -1
  71. package/dist/profile/index.d.ts +457 -163
  72. package/dist/provider/index.d.ts +577 -368
  73. package/dist/provider/index.js +5 -5
  74. package/dist/provider/published.d.ts +577 -368
  75. package/dist/provider/published.js +5 -5
  76. package/dist/supabase/index.d.ts +906 -339
  77. package/dist/test-utils/index.d.ts +10 -2
  78. package/dist/test-utils/index.js +39 -10
  79. package/dist/types/index.d.ts +464 -170
  80. package/dist/utils/index.d.ts +0 -6
  81. package/dist/utils/index.js +1 -1
  82. package/dist/vite/index.js +2 -2
  83. package/dist/vite-plugin-knowledge/index.js +1 -1
  84. package/package.json +9 -5
  85. package/src/features/README.md +28 -28
@@ -78,6 +78,7 @@ declare const PERMISSIONS: {
78
78
  readonly ACQUISITION_MANAGE: "acquisition.manage";
79
79
  readonly PROJECTS_MANAGE: "projects.manage";
80
80
  readonly CLIENTS_MANAGE: "clients.manage";
81
+ readonly CONTENT_MANAGE: "content.manage";
81
82
  };
82
83
  type PermissionKey = (typeof PERMISSIONS)[keyof typeof PERMISSIONS];
83
84
  /**
@@ -166,9 +167,15 @@ interface ListMembershipsResponse {
166
167
  * - `linked` — an `org_memberships` row that carries a `workos_membership_id`
167
168
  * - `pre_provisioned` — an `org_memberships` row with no `workos_membership_id`;
168
169
  * the invitee was provisioned but has not completed signup
170
+ * - `accepted_unlinked` — an `org_memberships` row with no `workos_membership_id`
171
+ * for which WorkOS nonetheless holds a live membership, matched by user and
172
+ * organization. The person has real access; only our record of the link is
173
+ * missing. Distinct from `pre_provisioned` because the column both states read
174
+ * as NULL is precisely the one that cannot tell them apart -- see
175
+ * `recoverUnlinkedWorkOSMembership` in the API's membership service.
169
176
  * - `workos_only` — a WorkOS membership with no `org_memberships` row (a sync gap)
170
177
  */
171
- type MembershipProvisioningState = 'linked' | 'pre_provisioned' | 'workos_only';
178
+ type MembershipProvisioningState = 'linked' | 'pre_provisioned' | 'accepted_unlinked' | 'workos_only';
172
179
  /**
173
180
  * Extended membership with user and organization details for UI
174
181
  *
@@ -229,53 +236,6 @@ type Json = string | number | boolean | null | {
229
236
  type Database = {
230
237
  public: {
231
238
  Tables: {
232
- acq_artifacts: {
233
- Row: {
234
- content: Json;
235
- created_at: string;
236
- created_by: string | null;
237
- id: string;
238
- kind: string;
239
- organization_id: string;
240
- owner_id: string;
241
- owner_kind: string;
242
- source_execution_id: string | null;
243
- version: number;
244
- };
245
- Insert: {
246
- content: Json;
247
- created_at?: string;
248
- created_by?: string | null;
249
- id?: string;
250
- kind: string;
251
- organization_id: string;
252
- owner_id: string;
253
- owner_kind: string;
254
- source_execution_id?: string | null;
255
- version?: number;
256
- };
257
- Update: {
258
- content?: Json;
259
- created_at?: string;
260
- created_by?: string | null;
261
- id?: string;
262
- kind?: string;
263
- organization_id?: string;
264
- owner_id?: string;
265
- owner_kind?: string;
266
- source_execution_id?: string | null;
267
- version?: number;
268
- };
269
- Relationships: [
270
- {
271
- foreignKeyName: "acq_artifacts_organization_id_fkey";
272
- columns: ["organization_id"];
273
- isOneToOne: false;
274
- referencedRelation: "organizations";
275
- referencedColumns: ["id"];
276
- }
277
- ];
278
- };
279
239
  acq_companies: {
280
240
  Row: {
281
241
  batch_id: string | null;
@@ -487,122 +447,6 @@ type Database = {
487
447
  }
488
448
  ];
489
449
  };
490
- acq_content: {
491
- Row: {
492
- body: string | null;
493
- created_at: string;
494
- id: string;
495
- organization_id: string;
496
- pillar: string;
497
- status: string;
498
- title: string;
499
- updated_at: string;
500
- };
501
- Insert: {
502
- body?: string | null;
503
- created_at?: string;
504
- id?: string;
505
- organization_id: string;
506
- pillar: string;
507
- status?: string;
508
- title: string;
509
- updated_at?: string;
510
- };
511
- Update: {
512
- body?: string | null;
513
- created_at?: string;
514
- id?: string;
515
- organization_id?: string;
516
- pillar?: string;
517
- status?: string;
518
- title?: string;
519
- updated_at?: string;
520
- };
521
- Relationships: [
522
- {
523
- foreignKeyName: "acq_content_organization_id_fkey";
524
- columns: ["organization_id"];
525
- isOneToOne: false;
526
- referencedRelation: "organizations";
527
- referencedColumns: ["id"];
528
- }
529
- ];
530
- };
531
- acq_content_distributions: {
532
- Row: {
533
- adapted_body: string | null;
534
- checklist: Json | null;
535
- content_id: string;
536
- created_at: string;
537
- format: string;
538
- id: string;
539
- media_urls: Json;
540
- metrics: Json;
541
- metrics_updated_at: string | null;
542
- organization_id: string;
543
- platform: string;
544
- platform_content: Json | null;
545
- platform_post_id: string | null;
546
- platform_url: string | null;
547
- published_at: string | null;
548
- status: string;
549
- updated_at: string;
550
- };
551
- Insert: {
552
- adapted_body?: string | null;
553
- checklist?: Json | null;
554
- content_id: string;
555
- created_at?: string;
556
- format: string;
557
- id?: string;
558
- media_urls?: Json;
559
- metrics?: Json;
560
- metrics_updated_at?: string | null;
561
- organization_id: string;
562
- platform: string;
563
- platform_content?: Json | null;
564
- platform_post_id?: string | null;
565
- platform_url?: string | null;
566
- published_at?: string | null;
567
- status?: string;
568
- updated_at?: string;
569
- };
570
- Update: {
571
- adapted_body?: string | null;
572
- checklist?: Json | null;
573
- content_id?: string;
574
- created_at?: string;
575
- format?: string;
576
- id?: string;
577
- media_urls?: Json;
578
- metrics?: Json;
579
- metrics_updated_at?: string | null;
580
- organization_id?: string;
581
- platform?: string;
582
- platform_content?: Json | null;
583
- platform_post_id?: string | null;
584
- platform_url?: string | null;
585
- published_at?: string | null;
586
- status?: string;
587
- updated_at?: string;
588
- };
589
- Relationships: [
590
- {
591
- foreignKeyName: "acq_content_distributions_content_id_fkey";
592
- columns: ["content_id"];
593
- isOneToOne: false;
594
- referencedRelation: "acq_content";
595
- referencedColumns: ["id"];
596
- },
597
- {
598
- foreignKeyName: "acq_content_distributions_organization_id_fkey";
599
- columns: ["organization_id"];
600
- isOneToOne: false;
601
- referencedRelation: "organizations";
602
- referencedColumns: ["id"];
603
- }
604
- ];
605
- };
606
450
  acq_deal_notes: {
607
451
  Row: {
608
452
  author_user_id: string | null;
@@ -632,6 +476,13 @@ type Database = {
632
476
  updated_at?: string;
633
477
  };
634
478
  Relationships: [
479
+ {
480
+ foreignKeyName: "acq_deal_notes_author_user_id_fkey";
481
+ columns: ["author_user_id"];
482
+ isOneToOne: false;
483
+ referencedRelation: "users";
484
+ referencedColumns: ["id"];
485
+ },
635
486
  {
636
487
  foreignKeyName: "acq_deal_notes_deal_id_fkey";
637
488
  columns: ["deal_id"];
@@ -695,6 +546,27 @@ type Database = {
695
546
  updated_at?: string;
696
547
  };
697
548
  Relationships: [
549
+ {
550
+ foreignKeyName: "acq_deal_tasks_assignee_user_id_fkey";
551
+ columns: ["assignee_user_id"];
552
+ isOneToOne: false;
553
+ referencedRelation: "users";
554
+ referencedColumns: ["id"];
555
+ },
556
+ {
557
+ foreignKeyName: "acq_deal_tasks_completed_by_user_id_fkey";
558
+ columns: ["completed_by_user_id"];
559
+ isOneToOne: false;
560
+ referencedRelation: "users";
561
+ referencedColumns: ["id"];
562
+ },
563
+ {
564
+ foreignKeyName: "acq_deal_tasks_created_by_user_id_fkey";
565
+ columns: ["created_by_user_id"];
566
+ isOneToOne: false;
567
+ referencedRelation: "users";
568
+ referencedColumns: ["id"];
569
+ },
698
570
  {
699
571
  foreignKeyName: "acq_deal_tasks_deal_id_fkey";
700
572
  columns: ["deal_id"];
@@ -851,6 +723,13 @@ type Database = {
851
723
  referencedRelation: "acq_contacts";
852
724
  referencedColumns: ["id"];
853
725
  },
726
+ {
727
+ foreignKeyName: "acq_deals_discovery_submitted_by_fkey";
728
+ columns: ["discovery_submitted_by"];
729
+ isOneToOne: false;
730
+ referencedRelation: "users";
731
+ referencedColumns: ["id"];
732
+ },
854
733
  {
855
734
  foreignKeyName: "acq_deals_organization_id_fkey";
856
735
  columns: ["organization_id"];
@@ -858,6 +737,13 @@ type Database = {
858
737
  referencedRelation: "organizations";
859
738
  referencedColumns: ["id"];
860
739
  },
740
+ {
741
+ foreignKeyName: "acq_deals_proposal_reviewed_by_fkey";
742
+ columns: ["proposal_reviewed_by"];
743
+ isOneToOne: false;
744
+ referencedRelation: "users";
745
+ referencedColumns: ["id"];
746
+ },
861
747
  {
862
748
  foreignKeyName: "acq_deals_source_list_id_fkey";
863
749
  columns: ["source_list_id"];
@@ -911,6 +797,13 @@ type Database = {
911
797
  state_key?: string;
912
798
  };
913
799
  Relationships: [
800
+ {
801
+ foreignKeyName: "acq_list_companies_added_by_fkey";
802
+ columns: ["added_by"];
803
+ isOneToOne: false;
804
+ referencedRelation: "users";
805
+ referencedColumns: ["id"];
806
+ },
914
807
  {
915
808
  foreignKeyName: "acq_list_companies_company_id_fkey";
916
809
  columns: ["company_id"];
@@ -1017,6 +910,13 @@ type Database = {
1017
910
  state_key?: string;
1018
911
  };
1019
912
  Relationships: [
913
+ {
914
+ foreignKeyName: "acq_list_members_added_by_fkey";
915
+ columns: ["added_by"];
916
+ isOneToOne: false;
917
+ referencedRelation: "users";
918
+ referencedColumns: ["id"];
919
+ },
1020
920
  {
1021
921
  foreignKeyName: "acq_list_members_contact_id_fkey";
1022
922
  columns: ["contact_id"];
@@ -1417,6 +1317,13 @@ type Database = {
1417
1317
  title?: string;
1418
1318
  };
1419
1319
  Relationships: [
1320
+ {
1321
+ foreignKeyName: "activities_actor_id_fkey";
1322
+ columns: ["actor_id"];
1323
+ isOneToOne: false;
1324
+ referencedRelation: "users";
1325
+ referencedColumns: ["id"];
1326
+ },
1420
1327
  {
1421
1328
  foreignKeyName: "activities_organization_id_fkey";
1422
1329
  columns: ["organization_id"];
@@ -1529,6 +1436,62 @@ type Database = {
1529
1436
  }
1530
1437
  ];
1531
1438
  };
1439
+ artifacts: {
1440
+ Row: {
1441
+ content: Json;
1442
+ created_at: string;
1443
+ created_by: string | null;
1444
+ id: string;
1445
+ is_active: boolean;
1446
+ kind: string;
1447
+ organization_id: string;
1448
+ owner_id: string | null;
1449
+ owner_kind: string;
1450
+ pipeline_id: string | null;
1451
+ source_execution_id: string | null;
1452
+ updated_at: string;
1453
+ version: number;
1454
+ };
1455
+ Insert: {
1456
+ content: Json;
1457
+ created_at?: string;
1458
+ created_by?: string | null;
1459
+ id?: string;
1460
+ is_active?: boolean;
1461
+ kind: string;
1462
+ organization_id: string;
1463
+ owner_id?: string | null;
1464
+ owner_kind: string;
1465
+ pipeline_id?: string | null;
1466
+ source_execution_id?: string | null;
1467
+ updated_at?: string;
1468
+ version?: number;
1469
+ };
1470
+ Update: {
1471
+ content?: Json;
1472
+ created_at?: string;
1473
+ created_by?: string | null;
1474
+ id?: string;
1475
+ is_active?: boolean;
1476
+ kind?: string;
1477
+ organization_id?: string;
1478
+ owner_id?: string | null;
1479
+ owner_kind?: string;
1480
+ pipeline_id?: string | null;
1481
+ source_execution_id?: string | null;
1482
+ updated_at?: string;
1483
+ version?: number;
1484
+ };
1485
+ Relationships: [
1486
+ {
1487
+ foreignKeyName: "artifacts_organization_id_fkey";
1488
+ columns: ["organization_id"];
1489
+ isOneToOne: false;
1490
+ referencedRelation: "organizations";
1491
+ referencedColumns: ["id"];
1492
+ }
1493
+ ];
1494
+ };
1532
1495
  clients: {
1533
1496
  Row: {
1534
1497
  converted_at: string | null;
@@ -1700,6 +1663,311 @@ type Database = {
1700
1663
  }
1701
1664
  ];
1702
1665
  };
1666
+ content_distributions: {
1667
+ Row: {
1668
+ adapted_body: string | null;
1669
+ checklist: Json | null;
1670
+ content_item_id: string;
1671
+ created_at: string;
1672
+ format: string;
1673
+ id: string;
1674
+ media_urls: Json;
1675
+ metrics: Json;
1676
+ metrics_updated_at: string | null;
1677
+ organization_id: string;
1678
+ platform: string;
1679
+ platform_content: Json | null;
1680
+ platform_post_id: string | null;
1681
+ platform_url: string | null;
1682
+ processing_state: Json;
1683
+ publish_method: string | null;
1684
+ published_at: string | null;
1685
+ status: string;
1686
+ updated_at: string;
1687
+ };
1688
+ Insert: {
1689
+ adapted_body?: string | null;
1690
+ checklist?: Json | null;
1691
+ content_item_id: string;
1692
+ created_at?: string;
1693
+ format: string;
1694
+ id?: string;
1695
+ media_urls?: Json;
1696
+ metrics?: Json;
1697
+ metrics_updated_at?: string | null;
1698
+ organization_id: string;
1699
+ platform: string;
1700
+ platform_content?: Json | null;
1701
+ platform_post_id?: string | null;
1702
+ platform_url?: string | null;
1703
+ processing_state?: Json;
1704
+ publish_method?: string | null;
1705
+ published_at?: string | null;
1706
+ status?: string;
1707
+ updated_at?: string;
1708
+ };
1709
+ Update: {
1710
+ adapted_body?: string | null;
1711
+ checklist?: Json | null;
1712
+ content_item_id?: string;
1713
+ created_at?: string;
1714
+ format?: string;
1715
+ id?: string;
1716
+ media_urls?: Json;
1717
+ metrics?: Json;
1718
+ metrics_updated_at?: string | null;
1719
+ organization_id?: string;
1720
+ platform?: string;
1721
+ platform_content?: Json | null;
1722
+ platform_post_id?: string | null;
1723
+ platform_url?: string | null;
1724
+ processing_state?: Json;
1725
+ publish_method?: string | null;
1726
+ published_at?: string | null;
1727
+ status?: string;
1728
+ updated_at?: string;
1729
+ };
1730
+ Relationships: [
1731
+ {
1732
+ foreignKeyName: "content_distributions_content_item_id_fkey";
1733
+ columns: ["content_item_id"];
1734
+ isOneToOne: false;
1735
+ referencedRelation: "content_items";
1736
+ referencedColumns: ["id"];
1737
+ },
1738
+ {
1739
+ foreignKeyName: "content_distributions_organization_id_fkey";
1740
+ columns: ["organization_id"];
1741
+ isOneToOne: false;
1742
+ referencedRelation: "organizations";
1743
+ referencedColumns: ["id"];
1744
+ }
1745
+ ];
1746
+ };
1747
+ content_item_attempts: {
1748
+ Row: {
1749
+ attempt_number: number;
1750
+ content_item_id: string;
1751
+ created_at: string;
1752
+ created_by: string | null;
1753
+ id: string;
1754
+ organization_id: string;
1755
+ payload: Json;
1756
+ source_execution_id: string | null;
1757
+ step_key: string | null;
1758
+ };
1759
+ Insert: {
1760
+ attempt_number: number;
1761
+ content_item_id: string;
1762
+ created_at?: string;
1763
+ created_by?: string | null;
1764
+ id?: string;
1765
+ organization_id: string;
1766
+ payload?: Json;
1767
+ source_execution_id?: string | null;
1768
+ step_key?: string | null;
1769
+ };
1770
+ Update: {
1771
+ attempt_number?: number;
1772
+ content_item_id?: string;
1773
+ created_at?: string;
1774
+ created_by?: string | null;
1775
+ id?: string;
1776
+ organization_id?: string;
1777
+ payload?: Json;
1778
+ source_execution_id?: string | null;
1779
+ step_key?: string | null;
1780
+ };
1781
+ Relationships: [
1782
+ {
1783
+ foreignKeyName: "content_item_attempts_content_item_id_fkey";
1784
+ columns: ["content_item_id"];
1785
+ isOneToOne: false;
1786
+ referencedRelation: "content_items";
1787
+ referencedColumns: ["id"];
1788
+ },
1789
+ {
1790
+ foreignKeyName: "content_item_attempts_created_by_fkey";
1791
+ columns: ["created_by"];
1792
+ isOneToOne: false;
1793
+ referencedRelation: "users";
1794
+ referencedColumns: ["id"];
1795
+ },
1796
+ {
1797
+ foreignKeyName: "content_item_attempts_organization_id_fkey";
1798
+ columns: ["organization_id"];
1799
+ isOneToOne: false;
1800
+ referencedRelation: "organizations";
1801
+ referencedColumns: ["id"];
1802
+ },
1803
+ {
1804
+ foreignKeyName: "content_item_attempts_source_execution_id_fkey";
1805
+ columns: ["source_execution_id"];
1806
+ isOneToOne: false;
1807
+ referencedRelation: "execution_logs";
1808
+ referencedColumns: ["execution_id"];
1809
+ }
1810
+ ];
1811
+ };
1812
+ content_items: {
1813
+ Row: {
1814
+ body: string | null;
1815
+ client_id: string | null;
1816
+ created_at: string;
1817
+ created_by: string | null;
1818
+ id: string;
1819
+ organization_id: string;
1820
+ payload: Json;
1821
+ pillar: string | null;
1822
+ pipeline_id: string | null;
1823
+ processing_state: Json;
1824
+ reject_reason: string | null;
1825
+ reviewed_at: string | null;
1826
+ reviewed_by: string | null;
1827
+ reviewer_feedback: string | null;
1828
+ source_asset_id: string | null;
1829
+ status: string;
1830
+ title: string;
1831
+ updated_at: string;
1832
+ updated_by: string | null;
1833
+ };
1834
+ Insert: {
1835
+ body?: string | null;
1836
+ client_id?: string | null;
1837
+ created_at?: string;
1838
+ created_by?: string | null;
1839
+ id?: string;
1840
+ organization_id: string;
1841
+ payload?: Json;
1842
+ pillar?: string | null;
1843
+ pipeline_id?: string | null;
1844
+ processing_state?: Json;
1845
+ reject_reason?: string | null;
1846
+ reviewed_at?: string | null;
1847
+ reviewed_by?: string | null;
1848
+ reviewer_feedback?: string | null;
1849
+ source_asset_id?: string | null;
1850
+ status?: string;
1851
+ title: string;
1852
+ updated_at?: string;
1853
+ updated_by?: string | null;
1854
+ };
1855
+ Update: {
1856
+ body?: string | null;
1857
+ client_id?: string | null;
1858
+ created_at?: string;
1859
+ created_by?: string | null;
1860
+ id?: string;
1861
+ organization_id?: string;
1862
+ payload?: Json;
1863
+ pillar?: string | null;
1864
+ pipeline_id?: string | null;
1865
+ processing_state?: Json;
1866
+ reject_reason?: string | null;
1867
+ reviewed_at?: string | null;
1868
+ reviewed_by?: string | null;
1869
+ reviewer_feedback?: string | null;
1870
+ source_asset_id?: string | null;
1871
+ status?: string;
1872
+ title?: string;
1873
+ updated_at?: string;
1874
+ updated_by?: string | null;
1875
+ };
1876
+ Relationships: [
1877
+ {
1878
+ foreignKeyName: "content_items_client_id_fkey";
1879
+ columns: ["client_id"];
1880
+ isOneToOne: false;
1881
+ referencedRelation: "clients";
1882
+ referencedColumns: ["id"];
1883
+ },
1884
+ {
1885
+ foreignKeyName: "content_items_created_by_fkey";
1886
+ columns: ["created_by"];
1887
+ isOneToOne: false;
1888
+ referencedRelation: "users";
1889
+ referencedColumns: ["id"];
1890
+ },
1891
+ {
1892
+ foreignKeyName: "content_items_organization_id_fkey";
1893
+ columns: ["organization_id"];
1894
+ isOneToOne: false;
1895
+ referencedRelation: "organizations";
1896
+ referencedColumns: ["id"];
1897
+ },
1898
+ {
1899
+ foreignKeyName: "content_items_reviewed_by_fkey";
1900
+ columns: ["reviewed_by"];
1901
+ isOneToOne: false;
1902
+ referencedRelation: "users";
1903
+ referencedColumns: ["id"];
1904
+ },
1905
+ {
1906
+ foreignKeyName: "content_items_source_asset_id_fkey";
1907
+ columns: ["source_asset_id"];
1908
+ isOneToOne: false;
1909
+ referencedRelation: "content_source_assets";
1910
+ referencedColumns: ["id"];
1911
+ },
1912
+ {
1913
+ foreignKeyName: "content_items_updated_by_fkey";
1914
+ columns: ["updated_by"];
1915
+ isOneToOne: false;
1916
+ referencedRelation: "users";
1917
+ referencedColumns: ["id"];
1918
+ }
1919
+ ];
1920
+ };
1921
+ content_source_assets: {
1922
+ Row: {
1923
+ created_at: string;
1924
+ duration_seconds: number | null;
1925
+ external_url: string | null;
1926
+ id: string;
1927
+ kind: string;
1928
+ metadata: Json;
1929
+ organization_id: string;
1930
+ processing_state: Json;
1931
+ storage_path: string | null;
1932
+ title: string;
1933
+ updated_at: string;
1934
+ };
1935
+ Insert: {
1936
+ created_at?: string;
1937
+ duration_seconds?: number | null;
1938
+ external_url?: string | null;
1939
+ id?: string;
1940
+ kind: string;
1941
+ metadata?: Json;
1942
+ organization_id: string;
1943
+ processing_state?: Json;
1944
+ storage_path?: string | null;
1945
+ title: string;
1946
+ updated_at?: string;
1947
+ };
1948
+ Update: {
1949
+ created_at?: string;
1950
+ duration_seconds?: number | null;
1951
+ external_url?: string | null;
1952
+ id?: string;
1953
+ kind?: string;
1954
+ metadata?: Json;
1955
+ organization_id?: string;
1956
+ processing_state?: Json;
1957
+ storage_path?: string | null;
1958
+ title?: string;
1959
+ updated_at?: string;
1960
+ };
1961
+ Relationships: [
1962
+ {
1963
+ foreignKeyName: "content_source_assets_organization_id_fkey";
1964
+ columns: ["organization_id"];
1965
+ isOneToOne: false;
1966
+ referencedRelation: "organizations";
1967
+ referencedColumns: ["id"];
1968
+ }
1969
+ ];
1970
+ };
1703
1971
  credentials: {
1704
1972
  Row: {
1705
1973
  created_at: string;
@@ -3314,7 +3582,34 @@ type Database = {
3314
3582
  p_role_id: string;
3315
3583
  p_target_membership_id: string;
3316
3584
  };
3317
- Returns: boolean;
3585
+ Returns: boolean;
3586
+ };
3587
+ create_artifact_version: {
3588
+ Args: {
3589
+ p_content: Json;
3590
+ p_created_by?: string;
3591
+ p_kind: string;
3592
+ p_organization_id: string;
3593
+ p_owner_id?: string;
3594
+ p_owner_kind: string;
3595
+ p_pipeline_id?: string;
3596
+ p_source_execution_id?: string;
3597
+ };
3598
+ Returns: {
3599
+ content: Json;
3600
+ created_at: string;
3601
+ created_by: string | null;
3602
+ id: string;
3603
+ is_active: boolean;
3604
+ kind: string;
3605
+ organization_id: string;
3606
+ owner_id: string | null;
3607
+ owner_kind: string;
3608
+ pipeline_id: string | null;
3609
+ source_execution_id: string | null;
3610
+ updated_at: string;
3611
+ version: number;
3612
+ };
3318
3613
  };
3319
3614
  current_user_is_platform_admin: {
3320
3615
  Args: Record<PropertyKey, never>;
@@ -3422,6 +3717,12 @@ type Database = {
3422
3717
  Args: Record<PropertyKey, never>;
3423
3718
  Returns: Json;
3424
3719
  };
3720
+ purge_stale_test_data: {
3721
+ Args: {
3722
+ p_max_age?: unknown;
3723
+ };
3724
+ Returns: Json;
3725
+ };
3425
3726
  recompute_all_memberships: {
3426
3727
  Args: Record<PropertyKey, never>;
3427
3728
  Returns: undefined;
@@ -3617,7 +3918,6 @@ interface SystemEntry {
3617
3918
  path: string;
3618
3919
  surfaces: string[];
3619
3920
  icon?: string;
3620
- order?: number;
3621
3921
  };
3622
3922
  lifecycle?: 'draft' | 'beta' | 'active' | 'deprecated' | 'archived';
3623
3923
  responsibleRoleId?: string;
@@ -3627,17 +3927,12 @@ interface SystemEntry {
3627
3927
  intent: 'exposes' | 'consumes';
3628
3928
  invocation?: unknown;
3629
3929
  }[];
3630
- policies?: string[];
3631
3930
  drivesGoals?: string[];
3632
3931
  apiInterface?: z.infer<typeof SystemApiInterfaceSchema>;
3633
- /** @deprecated Use lifecycle. Accepted for one publish cycle. */
3634
- status?: 'active' | 'deprecated' | 'archived';
3635
3932
  path?: string;
3636
3933
  icon?: string;
3637
3934
  uiPosition?: 'sidebar-primary' | 'sidebar-bottom';
3638
3935
  enabled?: boolean;
3639
- devOnly?: boolean;
3640
- requiresAdmin?: boolean;
3641
3936
  order: number;
3642
3937
  config?: Record<string, JsonValue>;
3643
3938
  ontology?: OntologyScope;
@@ -3645,6 +3940,41 @@ interface SystemEntry {
3645
3940
  subsystems?: Record<string, SystemEntry>;
3646
3941
  }
3647
3942
 
3943
+ declare const SurfaceTypeSchema: z.ZodEnum<{
3944
+ dashboard: "dashboard";
3945
+ settings: "settings";
3946
+ graph: "graph";
3947
+ page: "page";
3948
+ detail: "detail";
3949
+ list: "list";
3950
+ }>;
3951
+ interface SidebarSurfaceNode {
3952
+ type: 'surface';
3953
+ label: string;
3954
+ path: string;
3955
+ surfaceType: z.infer<typeof SurfaceTypeSchema>;
3956
+ description?: string;
3957
+ icon?: string;
3958
+ order?: number;
3959
+ targets?: {
3960
+ systems?: string[];
3961
+ entities?: string[];
3962
+ resources?: string[];
3963
+ actions?: string[];
3964
+ };
3965
+ devOnly?: boolean;
3966
+ requiresAdmin?: boolean;
3967
+ }
3968
+ interface SidebarGroupNode {
3969
+ type: 'group';
3970
+ label: string;
3971
+ description?: string;
3972
+ icon?: string;
3973
+ order?: number;
3974
+ children: Record<string, SidebarNode>;
3975
+ }
3976
+ type SidebarNode = SidebarSurfaceNode | SidebarGroupNode;
3977
+
3648
3978
  declare const ResourceGovernanceStatusSchema: z.ZodEnum<{
3649
3979
  active: "active";
3650
3980
  deprecated: "deprecated";
@@ -4497,6 +4827,7 @@ declare const AcqArtifactOwnerKindSchema: z.ZodEnum<{
4497
4827
  company: "company";
4498
4828
  contact: "contact";
4499
4829
  list: "list";
4830
+ organization: "organization";
4500
4831
  deal: "deal";
4501
4832
  list_member: "list_member";
4502
4833
  }>;
@@ -5000,6 +5331,230 @@ interface SessionTokenUsage {
5000
5331
  contextWindowSize: number;
5001
5332
  }
5002
5333
 
5334
+ /** D18: `pipeline_id` is an OM ontology id (free text), not a UUID. */
5335
+ declare const ContentPipelineIdSchema: z.ZodString;
5336
+ /** `content:catalog/status` entries. Free text, model-owned. */
5337
+ declare const ContentItemStatusSchema: z.ZodString;
5338
+ /** `content:catalog/pillar` entries. */
5339
+ declare const ContentPillarSchema: z.ZodString;
5340
+ declare const ListContentItemsQuerySchema: z.ZodObject<{
5341
+ status: z.ZodOptional<z.ZodString>;
5342
+ pillar: z.ZodOptional<z.ZodString>;
5343
+ pipelineId: z.ZodOptional<z.ZodString>;
5344
+ clientId: z.ZodOptional<z.ZodString>;
5345
+ reviewedBy: z.ZodOptional<z.ZodString>;
5346
+ search: z.ZodOptional<z.ZodString>;
5347
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
5348
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
5349
+ }, z.core.$strict>;
5350
+ declare const ContentItemResponseSchema: z.ZodObject<{
5351
+ id: z.ZodString;
5352
+ organizationId: z.ZodString;
5353
+ title: z.ZodString;
5354
+ body: z.ZodNullable<z.ZodString>;
5355
+ payload: z.ZodUnknown;
5356
+ status: z.ZodString;
5357
+ pillar: z.ZodNullable<z.ZodString>;
5358
+ pipelineId: z.ZodNullable<z.ZodString>;
5359
+ clientId: z.ZodNullable<z.ZodString>;
5360
+ sourceAssetId: z.ZodNullable<z.ZodString>;
5361
+ processingState: z.ZodRecord<z.ZodString, z.ZodObject<{
5362
+ status: z.ZodEnum<{
5363
+ error: "error";
5364
+ success: "success";
5365
+ no_result: "no_result";
5366
+ skipped: "skipped";
5367
+ }>;
5368
+ data: z.ZodOptional<z.ZodUnknown>;
5369
+ }, z.core.$loose>>;
5370
+ reviewedAt: z.ZodNullable<z.ZodString>;
5371
+ reviewedBy: z.ZodNullable<z.ZodString>;
5372
+ reviewerFeedback: z.ZodNullable<z.ZodString>;
5373
+ rejectReason: z.ZodNullable<z.ZodString>;
5374
+ createdBy: z.ZodNullable<z.ZodString>;
5375
+ updatedBy: z.ZodNullable<z.ZodString>;
5376
+ createdAt: z.ZodString;
5377
+ updatedAt: z.ZodString;
5378
+ }, z.core.$strip>;
5379
+ declare const ContentItemListResponseSchema: z.ZodObject<{
5380
+ data: z.ZodArray<z.ZodObject<{
5381
+ id: z.ZodString;
5382
+ organizationId: z.ZodString;
5383
+ title: z.ZodString;
5384
+ body: z.ZodNullable<z.ZodString>;
5385
+ payload: z.ZodUnknown;
5386
+ status: z.ZodString;
5387
+ pillar: z.ZodNullable<z.ZodString>;
5388
+ pipelineId: z.ZodNullable<z.ZodString>;
5389
+ clientId: z.ZodNullable<z.ZodString>;
5390
+ sourceAssetId: z.ZodNullable<z.ZodString>;
5391
+ processingState: z.ZodRecord<z.ZodString, z.ZodObject<{
5392
+ status: z.ZodEnum<{
5393
+ error: "error";
5394
+ success: "success";
5395
+ no_result: "no_result";
5396
+ skipped: "skipped";
5397
+ }>;
5398
+ data: z.ZodOptional<z.ZodUnknown>;
5399
+ }, z.core.$loose>>;
5400
+ reviewedAt: z.ZodNullable<z.ZodString>;
5401
+ reviewedBy: z.ZodNullable<z.ZodString>;
5402
+ reviewerFeedback: z.ZodNullable<z.ZodString>;
5403
+ rejectReason: z.ZodNullable<z.ZodString>;
5404
+ createdBy: z.ZodNullable<z.ZodString>;
5405
+ updatedBy: z.ZodNullable<z.ZodString>;
5406
+ createdAt: z.ZodString;
5407
+ updatedAt: z.ZodString;
5408
+ }, z.core.$strip>>;
5409
+ total: z.ZodNumber;
5410
+ limit: z.ZodNumber;
5411
+ offset: z.ZodNumber;
5412
+ }, z.core.$strip>;
5413
+ declare const UpdateContentItemRequestSchema: z.ZodObject<{
5414
+ title: z.ZodOptional<z.ZodString>;
5415
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5416
+ status: z.ZodOptional<z.ZodString>;
5417
+ pillar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5418
+ pipelineId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5419
+ clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5420
+ sourceAssetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5421
+ }, z.core.$strict>;
5422
+ declare const ContentItemReviewDecisionSchema: z.ZodEnum<{
5423
+ rejected: "rejected";
5424
+ approved: "approved";
5425
+ }>;
5426
+ declare const ReviewContentItemRequestSchema: z.ZodObject<{
5427
+ decision: z.ZodEnum<{
5428
+ rejected: "rejected";
5429
+ approved: "approved";
5430
+ }>;
5431
+ reviewerFeedback: z.ZodOptional<z.ZodString>;
5432
+ rejectReason: z.ZodOptional<z.ZodString>;
5433
+ }, z.core.$strict>;
5434
+ declare const ContentItemAttemptResponseSchema: z.ZodObject<{
5435
+ id: z.ZodString;
5436
+ organizationId: z.ZodString;
5437
+ contentItemId: z.ZodString;
5438
+ attemptNumber: z.ZodNumber;
5439
+ stepKey: z.ZodNullable<z.ZodString>;
5440
+ payload: z.ZodUnknown;
5441
+ sourceExecutionId: z.ZodNullable<z.ZodString>;
5442
+ createdBy: z.ZodNullable<z.ZodString>;
5443
+ createdAt: z.ZodString;
5444
+ }, z.core.$strip>;
5445
+ declare const ContentItemAttemptListResponseSchema: z.ZodObject<{
5446
+ data: z.ZodArray<z.ZodObject<{
5447
+ id: z.ZodString;
5448
+ organizationId: z.ZodString;
5449
+ contentItemId: z.ZodString;
5450
+ attemptNumber: z.ZodNumber;
5451
+ stepKey: z.ZodNullable<z.ZodString>;
5452
+ payload: z.ZodUnknown;
5453
+ sourceExecutionId: z.ZodNullable<z.ZodString>;
5454
+ createdBy: z.ZodNullable<z.ZodString>;
5455
+ createdAt: z.ZodString;
5456
+ }, z.core.$strip>>;
5457
+ }, z.core.$strip>;
5458
+ declare const ListContentDistributionsQuerySchema: z.ZodObject<{
5459
+ contentItemId: z.ZodOptional<z.ZodString>;
5460
+ platform: z.ZodOptional<z.ZodString>;
5461
+ status: z.ZodOptional<z.ZodString>;
5462
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
5463
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
5464
+ }, z.core.$strict>;
5465
+ declare const ContentDistributionResponseSchema: z.ZodObject<{
5466
+ id: z.ZodString;
5467
+ organizationId: z.ZodString;
5468
+ contentItemId: z.ZodString;
5469
+ platform: z.ZodString;
5470
+ format: z.ZodString;
5471
+ status: z.ZodString;
5472
+ adaptedBody: z.ZodNullable<z.ZodString>;
5473
+ platformContent: z.ZodNullable<z.ZodUnknown>;
5474
+ checklist: z.ZodNullable<z.ZodUnknown>;
5475
+ mediaUrls: z.ZodArray<z.ZodUnknown>;
5476
+ processingState: z.ZodRecord<z.ZodString, z.ZodObject<{
5477
+ status: z.ZodEnum<{
5478
+ error: "error";
5479
+ success: "success";
5480
+ no_result: "no_result";
5481
+ skipped: "skipped";
5482
+ }>;
5483
+ data: z.ZodOptional<z.ZodUnknown>;
5484
+ }, z.core.$loose>>;
5485
+ publishMethod: z.ZodNullable<z.ZodString>;
5486
+ publishedAt: z.ZodNullable<z.ZodString>;
5487
+ platformPostId: z.ZodNullable<z.ZodString>;
5488
+ platformUrl: z.ZodNullable<z.ZodString>;
5489
+ metrics: z.ZodUnknown;
5490
+ metricsUpdatedAt: z.ZodNullable<z.ZodString>;
5491
+ createdAt: z.ZodString;
5492
+ updatedAt: z.ZodString;
5493
+ }, z.core.$strip>;
5494
+ declare const ContentDistributionListResponseSchema: z.ZodObject<{
5495
+ data: z.ZodArray<z.ZodObject<{
5496
+ id: z.ZodString;
5497
+ organizationId: z.ZodString;
5498
+ contentItemId: z.ZodString;
5499
+ platform: z.ZodString;
5500
+ format: z.ZodString;
5501
+ status: z.ZodString;
5502
+ adaptedBody: z.ZodNullable<z.ZodString>;
5503
+ platformContent: z.ZodNullable<z.ZodUnknown>;
5504
+ checklist: z.ZodNullable<z.ZodUnknown>;
5505
+ mediaUrls: z.ZodArray<z.ZodUnknown>;
5506
+ processingState: z.ZodRecord<z.ZodString, z.ZodObject<{
5507
+ status: z.ZodEnum<{
5508
+ error: "error";
5509
+ success: "success";
5510
+ no_result: "no_result";
5511
+ skipped: "skipped";
5512
+ }>;
5513
+ data: z.ZodOptional<z.ZodUnknown>;
5514
+ }, z.core.$loose>>;
5515
+ publishMethod: z.ZodNullable<z.ZodString>;
5516
+ publishedAt: z.ZodNullable<z.ZodString>;
5517
+ platformPostId: z.ZodNullable<z.ZodString>;
5518
+ platformUrl: z.ZodNullable<z.ZodString>;
5519
+ metrics: z.ZodUnknown;
5520
+ metricsUpdatedAt: z.ZodNullable<z.ZodString>;
5521
+ createdAt: z.ZodString;
5522
+ updatedAt: z.ZodString;
5523
+ }, z.core.$strip>>;
5524
+ }, z.core.$strip>;
5525
+ /**
5526
+ * `publishMethod` is where D7's manual-publish state becomes visible: a row
5527
+ * with `publishedAt` set and no `platformPostId`.
5528
+ */
5529
+ declare const UpdateContentDistributionRequestSchema: z.ZodObject<{
5530
+ status: z.ZodOptional<z.ZodString>;
5531
+ adaptedBody: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5532
+ platformContent: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
5533
+ checklist: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
5534
+ mediaUrls: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
5535
+ publishMethod: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5536
+ publishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5537
+ platformPostId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5538
+ platformUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5539
+ metrics: z.ZodOptional<z.ZodUnknown>;
5540
+ metricsUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5541
+ }, z.core.$strict>;
5542
+ type ContentPipelineId = z.infer<typeof ContentPipelineIdSchema>;
5543
+ type ContentItemStatus = z.infer<typeof ContentItemStatusSchema>;
5544
+ type ContentPillar = z.infer<typeof ContentPillarSchema>;
5545
+ type ListContentItemsQuery = z.infer<typeof ListContentItemsQuerySchema>;
5546
+ type ContentItemResponse = z.infer<typeof ContentItemResponseSchema>;
5547
+ type ContentItemListResponse = z.infer<typeof ContentItemListResponseSchema>;
5548
+ type UpdateContentItemRequest = z.infer<typeof UpdateContentItemRequestSchema>;
5549
+ type ContentItemReviewDecision = z.infer<typeof ContentItemReviewDecisionSchema>;
5550
+ type ReviewContentItemRequest = z.infer<typeof ReviewContentItemRequestSchema>;
5551
+ type ContentItemAttemptResponse = z.infer<typeof ContentItemAttemptResponseSchema>;
5552
+ type ContentItemAttemptListResponse = z.infer<typeof ContentItemAttemptListResponseSchema>;
5553
+ type ListContentDistributionsQuery = z.infer<typeof ListContentDistributionsQuerySchema>;
5554
+ type ContentDistributionResponse = z.infer<typeof ContentDistributionResponseSchema>;
5555
+ type ContentDistributionListResponse = z.infer<typeof ContentDistributionListResponseSchema>;
5556
+ type UpdateContentDistributionRequest = z.infer<typeof UpdateContentDistributionRequestSchema>;
5557
+
5003
5558
  /**
5004
5559
  * Time range selector for dashboard metrics
5005
5560
  */
@@ -5702,61 +6257,1047 @@ interface HumanCheckpointDefinition extends ResourceDefinition {
5702
6257
  * external resources, and human checkpoints with their relationships.
5703
6258
  */
5704
6259
 
5705
- /**
5706
- * Extended agent metadata for Command View
5707
- * Includes model and capability information for graph display
5708
- */
5709
- interface CommandViewAgent extends ResourceDefinition {
5710
- type: 'agent';
5711
- modelProvider: string;
5712
- modelId: string;
5713
- toolCount: number;
5714
- hasMemory: boolean;
5715
- sessionCapable: boolean;
5716
- }
5717
- /**
5718
- * Extended workflow metadata for Command View
5719
- * Includes step information for graph display
5720
- */
5721
- interface CommandViewWorkflow extends ResourceDefinition {
5722
- type: 'workflow';
5723
- stepCount: number;
5724
- entryPoint: string;
5725
- }
5726
- /**
5727
- * Relationship types between resources
5728
- *
5729
- * - triggers: Resource initiates/starts another resource (orange)
5730
- * - uses: Resource uses an integration (teal)
5731
- * - approval: Resource requires human approval (yellow)
5732
- */
5733
- type RelationshipType = 'triggers' | 'uses' | 'approval';
5734
- /**
5735
- * Command View edge (relationship between resources)
5736
- */
5737
- interface CommandViewEdge {
5738
- id: string;
5739
- source: string;
5740
- target: string;
5741
- relationship: RelationshipType;
5742
- label?: string;
5743
- }
5744
- /**
5745
- * Command View data structure
5746
- * Complete graph data for visualization
5747
- *
5748
- * Backend serializes this once at startup and serves it via /command-view endpoint.
5749
- * Frontend consumes this directly for graph rendering.
5750
- */
5751
- interface CommandViewData {
5752
- workflows: CommandViewWorkflow[];
5753
- agents: CommandViewAgent[];
5754
- triggers: TriggerDefinition[];
5755
- integrations: IntegrationDefinition[];
5756
- externalResources: ExternalResourceDefinition[];
5757
- humanCheckpoints: HumanCheckpointDefinition[];
5758
- edges: CommandViewEdge[];
5759
- }
6260
+ /**
6261
+ * Extended agent metadata for Command View
6262
+ * Includes model and capability information for graph display
6263
+ */
6264
+ interface CommandViewAgent extends ResourceDefinition {
6265
+ type: 'agent';
6266
+ modelProvider: string;
6267
+ modelId: string;
6268
+ toolCount: number;
6269
+ hasMemory: boolean;
6270
+ sessionCapable: boolean;
6271
+ }
6272
+ /**
6273
+ * Extended workflow metadata for Command View
6274
+ * Includes step information for graph display
6275
+ */
6276
+ interface CommandViewWorkflow extends ResourceDefinition {
6277
+ type: 'workflow';
6278
+ stepCount: number;
6279
+ entryPoint: string;
6280
+ }
6281
+ /**
6282
+ * Relationship types between resources
6283
+ *
6284
+ * - triggers: Resource initiates/starts another resource (orange)
6285
+ * - uses: Resource uses an integration (teal)
6286
+ * - approval: Resource requires human approval (yellow)
6287
+ */
6288
+ type RelationshipType = 'triggers' | 'uses' | 'approval';
6289
+ /**
6290
+ * Command View edge (relationship between resources)
6291
+ */
6292
+ interface CommandViewEdge {
6293
+ id: string;
6294
+ source: string;
6295
+ target: string;
6296
+ relationship: RelationshipType;
6297
+ label?: string;
6298
+ }
6299
+ /**
6300
+ * Command View data structure
6301
+ * Complete graph data for visualization
6302
+ *
6303
+ * Backend serializes this once at startup and serves it via /command-view endpoint.
6304
+ * Frontend consumes this directly for graph rendering.
6305
+ */
6306
+ interface CommandViewData {
6307
+ workflows: CommandViewWorkflow[];
6308
+ agents: CommandViewAgent[];
6309
+ triggers: TriggerDefinition[];
6310
+ integrations: IntegrationDefinition[];
6311
+ externalResources: ExternalResourceDefinition[];
6312
+ humanCheckpoints: HumanCheckpointDefinition[];
6313
+ edges: CommandViewEdge[];
6314
+ }
6315
+
6316
+ declare const OrganizationModelSchema: z.ZodObject<{
6317
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6318
+ snapshotHash: z.ZodOptional<z.ZodString>;
6319
+ domainMetadata: z.ZodPipe<z.ZodDefault<z.ZodObject<{
6320
+ branding: z.ZodOptional<z.ZodObject<{
6321
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6322
+ lastModified: z.ZodString;
6323
+ }, z.core.$strip>>;
6324
+ identity: z.ZodOptional<z.ZodObject<{
6325
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6326
+ lastModified: z.ZodString;
6327
+ }, z.core.$strip>>;
6328
+ clients: z.ZodOptional<z.ZodObject<{
6329
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6330
+ lastModified: z.ZodString;
6331
+ }, z.core.$strip>>;
6332
+ customers: z.ZodOptional<z.ZodObject<{
6333
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6334
+ lastModified: z.ZodString;
6335
+ }, z.core.$strip>>;
6336
+ offerings: z.ZodOptional<z.ZodObject<{
6337
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6338
+ lastModified: z.ZodString;
6339
+ }, z.core.$strip>>;
6340
+ roles: z.ZodOptional<z.ZodObject<{
6341
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6342
+ lastModified: z.ZodString;
6343
+ }, z.core.$strip>>;
6344
+ goals: z.ZodOptional<z.ZodObject<{
6345
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6346
+ lastModified: z.ZodString;
6347
+ }, z.core.$strip>>;
6348
+ systems: z.ZodOptional<z.ZodObject<{
6349
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6350
+ lastModified: z.ZodString;
6351
+ }, z.core.$strip>>;
6352
+ ontology: z.ZodOptional<z.ZodObject<{
6353
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6354
+ lastModified: z.ZodString;
6355
+ }, z.core.$strip>>;
6356
+ resources: z.ZodOptional<z.ZodObject<{
6357
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6358
+ lastModified: z.ZodString;
6359
+ }, z.core.$strip>>;
6360
+ topology: z.ZodOptional<z.ZodObject<{
6361
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6362
+ lastModified: z.ZodString;
6363
+ }, z.core.$strip>>;
6364
+ actions: z.ZodOptional<z.ZodObject<{
6365
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6366
+ lastModified: z.ZodString;
6367
+ }, z.core.$strip>>;
6368
+ entities: z.ZodOptional<z.ZodObject<{
6369
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6370
+ lastModified: z.ZodString;
6371
+ }, z.core.$strip>>;
6372
+ knowledge: z.ZodOptional<z.ZodObject<{
6373
+ version: z.ZodDefault<z.ZodLiteral<1>>;
6374
+ lastModified: z.ZodString;
6375
+ }, z.core.$strip>>;
6376
+ }, z.core.$strip>>, z.ZodTransform<{
6377
+ branding: {
6378
+ version: 1;
6379
+ lastModified: string;
6380
+ };
6381
+ identity: {
6382
+ version: 1;
6383
+ lastModified: string;
6384
+ };
6385
+ clients: {
6386
+ version: 1;
6387
+ lastModified: string;
6388
+ };
6389
+ customers: {
6390
+ version: 1;
6391
+ lastModified: string;
6392
+ };
6393
+ offerings: {
6394
+ version: 1;
6395
+ lastModified: string;
6396
+ };
6397
+ roles: {
6398
+ version: 1;
6399
+ lastModified: string;
6400
+ };
6401
+ goals: {
6402
+ version: 1;
6403
+ lastModified: string;
6404
+ };
6405
+ systems: {
6406
+ version: 1;
6407
+ lastModified: string;
6408
+ };
6409
+ ontology: {
6410
+ version: 1;
6411
+ lastModified: string;
6412
+ };
6413
+ resources: {
6414
+ version: 1;
6415
+ lastModified: string;
6416
+ };
6417
+ topology: {
6418
+ version: 1;
6419
+ lastModified: string;
6420
+ };
6421
+ actions: {
6422
+ version: 1;
6423
+ lastModified: string;
6424
+ };
6425
+ entities: {
6426
+ version: 1;
6427
+ lastModified: string;
6428
+ };
6429
+ knowledge: {
6430
+ version: 1;
6431
+ lastModified: string;
6432
+ };
6433
+ }, {
6434
+ branding?: {
6435
+ version: 1;
6436
+ lastModified: string;
6437
+ } | undefined;
6438
+ identity?: {
6439
+ version: 1;
6440
+ lastModified: string;
6441
+ } | undefined;
6442
+ clients?: {
6443
+ version: 1;
6444
+ lastModified: string;
6445
+ } | undefined;
6446
+ customers?: {
6447
+ version: 1;
6448
+ lastModified: string;
6449
+ } | undefined;
6450
+ offerings?: {
6451
+ version: 1;
6452
+ lastModified: string;
6453
+ } | undefined;
6454
+ roles?: {
6455
+ version: 1;
6456
+ lastModified: string;
6457
+ } | undefined;
6458
+ goals?: {
6459
+ version: 1;
6460
+ lastModified: string;
6461
+ } | undefined;
6462
+ systems?: {
6463
+ version: 1;
6464
+ lastModified: string;
6465
+ } | undefined;
6466
+ ontology?: {
6467
+ version: 1;
6468
+ lastModified: string;
6469
+ } | undefined;
6470
+ resources?: {
6471
+ version: 1;
6472
+ lastModified: string;
6473
+ } | undefined;
6474
+ topology?: {
6475
+ version: 1;
6476
+ lastModified: string;
6477
+ } | undefined;
6478
+ actions?: {
6479
+ version: 1;
6480
+ lastModified: string;
6481
+ } | undefined;
6482
+ entities?: {
6483
+ version: 1;
6484
+ lastModified: string;
6485
+ } | undefined;
6486
+ knowledge?: {
6487
+ version: 1;
6488
+ lastModified: string;
6489
+ } | undefined;
6490
+ }>>;
6491
+ branding: z.ZodDefault<z.ZodObject<{
6492
+ organizationName: z.ZodString;
6493
+ productName: z.ZodString;
6494
+ shortName: z.ZodString;
6495
+ description: z.ZodOptional<z.ZodString>;
6496
+ logos: z.ZodDefault<z.ZodObject<{
6497
+ light: z.ZodOptional<z.ZodString>;
6498
+ dark: z.ZodOptional<z.ZodString>;
6499
+ }, z.core.$strip>>;
6500
+ voice: z.ZodOptional<z.ZodString>;
6501
+ tagline: z.ZodOptional<z.ZodString>;
6502
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
6503
+ themePresetId: z.ZodOptional<z.ZodString>;
6504
+ }, z.core.$loose>>;
6505
+ navigation: z.ZodDefault<z.ZodObject<{
6506
+ sidebar: z.ZodDefault<z.ZodObject<{
6507
+ primary: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
6508
+ bottom: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
6509
+ }, z.core.$strip>>;
6510
+ topbar: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6511
+ id: z.ZodString;
6512
+ label: z.ZodString;
6513
+ tooltip: z.ZodOptional<z.ZodString>;
6514
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
6515
+ message: "message";
6516
+ error: "error";
6517
+ agent: "agent";
6518
+ workflow: "workflow";
6519
+ "google-sheets": "google-sheets";
6520
+ dashboard: "dashboard";
6521
+ calendar: "calendar";
6522
+ sales: "sales";
6523
+ crm: "crm";
6524
+ "lead-gen": "lead-gen";
6525
+ projects: "projects";
6526
+ clients: "clients";
6527
+ operations: "operations";
6528
+ monitoring: "monitoring";
6529
+ knowledge: "knowledge";
6530
+ settings: "settings";
6531
+ admin: "admin";
6532
+ archive: "archive";
6533
+ business: "business";
6534
+ finance: "finance";
6535
+ platform: "platform";
6536
+ seo: "seo";
6537
+ playbook: "playbook";
6538
+ strategy: "strategy";
6539
+ reference: "reference";
6540
+ integration: "integration";
6541
+ database: "database";
6542
+ user: "user";
6543
+ team: "team";
6544
+ gmail: "gmail";
6545
+ attio: "attio";
6546
+ overview: "overview";
6547
+ "command-view": "command-view";
6548
+ "command-queue": "command-queue";
6549
+ pipeline: "pipeline";
6550
+ lists: "lists";
6551
+ resources: "resources";
6552
+ approve: "approve";
6553
+ reject: "reject";
6554
+ retry: "retry";
6555
+ edit: "edit";
6556
+ view: "view";
6557
+ launch: "launch";
6558
+ "message-plus": "message-plus";
6559
+ escalate: "escalate";
6560
+ promote: "promote";
6561
+ submit: "submit";
6562
+ email: "email";
6563
+ success: "success";
6564
+ warning: "warning";
6565
+ info: "info";
6566
+ pending: "pending";
6567
+ bolt: "bolt";
6568
+ building: "building";
6569
+ briefcase: "briefcase";
6570
+ apps: "apps";
6571
+ graph: "graph";
6572
+ shield: "shield";
6573
+ users: "users";
6574
+ "chart-bar": "chart-bar";
6575
+ search: "search";
6576
+ }>, z.ZodString]>>;
6577
+ order: z.ZodOptional<z.ZodNumber>;
6578
+ enabled: z.ZodDefault<z.ZodBoolean>;
6579
+ devOnly: z.ZodOptional<z.ZodBoolean>;
6580
+ requiresAdmin: z.ZodOptional<z.ZodBoolean>;
6581
+ targets: z.ZodOptional<z.ZodDefault<z.ZodObject<{
6582
+ systems: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
6583
+ entities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
6584
+ resources: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
6585
+ actions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
6586
+ }, z.core.$strip>>>;
6587
+ }, z.core.$strip>>>;
6588
+ }, z.core.$strip>>;
6589
+ identity: z.ZodDefault<z.ZodObject<{
6590
+ mission: z.ZodDefault<z.ZodString>;
6591
+ vision: z.ZodDefault<z.ZodString>;
6592
+ legalName: z.ZodDefault<z.ZodString>;
6593
+ entityType: z.ZodDefault<z.ZodString>;
6594
+ jurisdiction: z.ZodDefault<z.ZodString>;
6595
+ industryCategory: z.ZodDefault<z.ZodString>;
6596
+ geographicFocus: z.ZodDefault<z.ZodString>;
6597
+ timeZone: z.ZodDefault<z.ZodString>;
6598
+ businessHours: z.ZodDefault<z.ZodObject<{
6599
+ monday: z.ZodOptional<z.ZodObject<{
6600
+ open: z.ZodString;
6601
+ close: z.ZodString;
6602
+ }, z.core.$strip>>;
6603
+ tuesday: z.ZodOptional<z.ZodObject<{
6604
+ open: z.ZodString;
6605
+ close: z.ZodString;
6606
+ }, z.core.$strip>>;
6607
+ wednesday: z.ZodOptional<z.ZodObject<{
6608
+ open: z.ZodString;
6609
+ close: z.ZodString;
6610
+ }, z.core.$strip>>;
6611
+ thursday: z.ZodOptional<z.ZodObject<{
6612
+ open: z.ZodString;
6613
+ close: z.ZodString;
6614
+ }, z.core.$strip>>;
6615
+ friday: z.ZodOptional<z.ZodObject<{
6616
+ open: z.ZodString;
6617
+ close: z.ZodString;
6618
+ }, z.core.$strip>>;
6619
+ saturday: z.ZodOptional<z.ZodObject<{
6620
+ open: z.ZodString;
6621
+ close: z.ZodString;
6622
+ }, z.core.$strip>>;
6623
+ sunday: z.ZodOptional<z.ZodObject<{
6624
+ open: z.ZodString;
6625
+ close: z.ZodString;
6626
+ }, z.core.$strip>>;
6627
+ }, z.core.$strip>>;
6628
+ clientBrief: z.ZodDefault<z.ZodString>;
6629
+ organizationName: z.ZodOptional<z.ZodString>;
6630
+ productName: z.ZodOptional<z.ZodString>;
6631
+ shortName: z.ZodOptional<z.ZodString>;
6632
+ description: z.ZodOptional<z.ZodString>;
6633
+ }, z.core.$loose>>;
6634
+ clients: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6635
+ id: z.ZodString;
6636
+ slug: z.ZodString;
6637
+ name: z.ZodString;
6638
+ status: z.ZodDefault<z.ZodEnum<{
6639
+ active: "active";
6640
+ onboarding: "onboarding";
6641
+ paused: "paused";
6642
+ completed: "completed";
6643
+ churned: "churned";
6644
+ }>>;
6645
+ source: z.ZodOptional<z.ZodString>;
6646
+ identity: z.ZodDefault<z.ZodObject<{
6647
+ organizationName: z.ZodOptional<z.ZodString>;
6648
+ shortName: z.ZodOptional<z.ZodString>;
6649
+ clientBrief: z.ZodDefault<z.ZodString>;
6650
+ geographicFocus: z.ZodDefault<z.ZodArray<z.ZodString>>;
6651
+ timeZone: z.ZodDefault<z.ZodString>;
6652
+ }, z.core.$loose>>;
6653
+ branding: z.ZodDefault<z.ZodObject<{
6654
+ voice: z.ZodOptional<z.ZodString>;
6655
+ tagline: z.ZodOptional<z.ZodString>;
6656
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
6657
+ }, z.core.$loose>>;
6658
+ workspace: z.ZodDefault<z.ZodObject<{
6659
+ kind: z.ZodOptional<z.ZodEnum<{
6660
+ "external-project": "external-project";
6661
+ "internal-project": "internal-project";
6662
+ none: "none";
6663
+ }>>;
6664
+ owner: z.ZodOptional<z.ZodEnum<{
6665
+ platform: "platform";
6666
+ client: "client";
6667
+ developer: "developer";
6668
+ }>>;
6669
+ projectId: z.ZodOptional<z.ZodString>;
6670
+ workspacePath: z.ZodOptional<z.ZodString>;
6671
+ }, z.core.$loose>>;
6672
+ links: z.ZodDefault<z.ZodObject<{
6673
+ projectIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
6674
+ primaryCompanyId: z.ZodOptional<z.ZodString>;
6675
+ primaryContactId: z.ZodOptional<z.ZodString>;
6676
+ sourceDealId: z.ZodOptional<z.ZodString>;
6677
+ }, z.core.$strip>>;
6678
+ prompts: z.ZodDefault<z.ZodObject<{
6679
+ defaultContext: z.ZodDefault<z.ZodString>;
6680
+ }, z.core.$loose>>;
6681
+ config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
6682
+ customValues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
6683
+ }, z.core.$strict>>>>;
6684
+ customers: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6685
+ id: z.ZodString;
6686
+ order: z.ZodNumber;
6687
+ name: z.ZodDefault<z.ZodString>;
6688
+ description: z.ZodDefault<z.ZodString>;
6689
+ jobsToBeDone: z.ZodDefault<z.ZodString>;
6690
+ pains: z.ZodDefault<z.ZodArray<z.ZodString>>;
6691
+ gains: z.ZodDefault<z.ZodArray<z.ZodString>>;
6692
+ firmographics: z.ZodDefault<z.ZodObject<{
6693
+ industry: z.ZodOptional<z.ZodString>;
6694
+ companySize: z.ZodOptional<z.ZodString>;
6695
+ region: z.ZodOptional<z.ZodString>;
6696
+ }, z.core.$strip>>;
6697
+ valueProp: z.ZodDefault<z.ZodString>;
6698
+ }, z.core.$strip>>>>;
6699
+ offerings: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6700
+ id: z.ZodString;
6701
+ order: z.ZodNumber;
6702
+ name: z.ZodDefault<z.ZodString>;
6703
+ description: z.ZodDefault<z.ZodString>;
6704
+ pricingModel: z.ZodDefault<z.ZodEnum<{
6705
+ custom: "custom";
6706
+ "one-time": "one-time";
6707
+ subscription: "subscription";
6708
+ "usage-based": "usage-based";
6709
+ }>>;
6710
+ price: z.ZodDefault<z.ZodNumber>;
6711
+ currency: z.ZodDefault<z.ZodString>;
6712
+ targetSegmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
6713
+ deliveryFeatureId: z.ZodOptional<z.ZodString>;
6714
+ }, z.core.$strip>>>>;
6715
+ roles: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6716
+ id: z.ZodString;
6717
+ order: z.ZodNumber;
6718
+ title: z.ZodString;
6719
+ responsibilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
6720
+ reportsToId: z.ZodOptional<z.ZodString>;
6721
+ heldBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
6722
+ kind: z.ZodLiteral<"human">;
6723
+ userId: z.ZodString;
6724
+ }, z.core.$strip>, z.ZodObject<{
6725
+ kind: z.ZodLiteral<"agent">;
6726
+ agentId: z.ZodString;
6727
+ }, z.core.$strip>, z.ZodObject<{
6728
+ kind: z.ZodLiteral<"team">;
6729
+ memberIds: z.ZodArray<z.ZodString>;
6730
+ }, z.core.$strip>], "kind">, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
6731
+ kind: z.ZodLiteral<"human">;
6732
+ userId: z.ZodString;
6733
+ }, z.core.$strip>, z.ZodObject<{
6734
+ kind: z.ZodLiteral<"agent">;
6735
+ agentId: z.ZodString;
6736
+ }, z.core.$strip>, z.ZodObject<{
6737
+ kind: z.ZodLiteral<"team">;
6738
+ memberIds: z.ZodArray<z.ZodString>;
6739
+ }, z.core.$strip>], "kind">>]>>;
6740
+ responsibleFor: z.ZodOptional<z.ZodArray<z.ZodString>>;
6741
+ }, z.core.$strip>>>>;
6742
+ goals: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6743
+ id: z.ZodString;
6744
+ order: z.ZodNumber;
6745
+ description: z.ZodString;
6746
+ periodStart: z.ZodString;
6747
+ periodEnd: z.ZodString;
6748
+ keyResults: z.ZodDefault<z.ZodArray<z.ZodObject<{
6749
+ id: z.ZodString;
6750
+ description: z.ZodString;
6751
+ targetMetric: z.ZodString;
6752
+ currentValue: z.ZodDefault<z.ZodNumber>;
6753
+ targetValue: z.ZodOptional<z.ZodNumber>;
6754
+ }, z.core.$strip>>>;
6755
+ }, z.core.$strip>>>>;
6756
+ systems: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SystemEntry, unknown, z.core.$ZodTypeInternals<SystemEntry, unknown>>>>>;
6757
+ ontology: z.ZodDefault<z.ZodDefault<z.ZodObject<{
6758
+ objectTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6759
+ id: z.ZodString;
6760
+ label: z.ZodOptional<z.ZodString>;
6761
+ description: z.ZodOptional<z.ZodString>;
6762
+ ownerSystemId: z.ZodOptional<z.ZodString>;
6763
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
6764
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6765
+ storage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6766
+ }, z.core.$loose>>>>;
6767
+ linkTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6768
+ id: z.ZodString;
6769
+ label: z.ZodOptional<z.ZodString>;
6770
+ description: z.ZodOptional<z.ZodString>;
6771
+ ownerSystemId: z.ZodOptional<z.ZodString>;
6772
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
6773
+ from: z.ZodString;
6774
+ to: z.ZodString;
6775
+ cardinality: z.ZodOptional<z.ZodString>;
6776
+ via: z.ZodOptional<z.ZodString>;
6777
+ }, z.core.$loose>>>>;
6778
+ actionTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6779
+ id: z.ZodString;
6780
+ label: z.ZodOptional<z.ZodString>;
6781
+ description: z.ZodOptional<z.ZodString>;
6782
+ ownerSystemId: z.ZodOptional<z.ZodString>;
6783
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
6784
+ actsOn: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
6785
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6786
+ effects: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
6787
+ }, z.core.$loose>>>>;
6788
+ catalogTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6789
+ id: z.ZodString;
6790
+ label: z.ZodOptional<z.ZodString>;
6791
+ description: z.ZodOptional<z.ZodString>;
6792
+ ownerSystemId: z.ZodOptional<z.ZodString>;
6793
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
6794
+ kind: z.ZodOptional<z.ZodString>;
6795
+ appliesTo: z.ZodOptional<z.ZodString>;
6796
+ entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6797
+ }, z.core.$loose>>>>;
6798
+ eventTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6799
+ id: z.ZodString;
6800
+ label: z.ZodOptional<z.ZodString>;
6801
+ description: z.ZodOptional<z.ZodString>;
6802
+ ownerSystemId: z.ZodOptional<z.ZodString>;
6803
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
6804
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6805
+ }, z.core.$loose>>>>;
6806
+ interfaceTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6807
+ id: z.ZodString;
6808
+ label: z.ZodOptional<z.ZodString>;
6809
+ description: z.ZodOptional<z.ZodString>;
6810
+ ownerSystemId: z.ZodOptional<z.ZodString>;
6811
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
6812
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6813
+ }, z.core.$loose>>>>;
6814
+ valueTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6815
+ id: z.ZodString;
6816
+ label: z.ZodOptional<z.ZodString>;
6817
+ description: z.ZodOptional<z.ZodString>;
6818
+ ownerSystemId: z.ZodOptional<z.ZodString>;
6819
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
6820
+ primitive: z.ZodOptional<z.ZodString>;
6821
+ }, z.core.$loose>>>>;
6822
+ sharedProperties: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6823
+ id: z.ZodString;
6824
+ label: z.ZodOptional<z.ZodString>;
6825
+ description: z.ZodOptional<z.ZodString>;
6826
+ ownerSystemId: z.ZodOptional<z.ZodString>;
6827
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
6828
+ valueType: z.ZodOptional<z.ZodString>;
6829
+ searchable: z.ZodOptional<z.ZodBoolean>;
6830
+ pii: z.ZodOptional<z.ZodBoolean>;
6831
+ }, z.core.$loose>>>>;
6832
+ groups: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6833
+ id: z.ZodString;
6834
+ label: z.ZodOptional<z.ZodString>;
6835
+ description: z.ZodOptional<z.ZodString>;
6836
+ ownerSystemId: z.ZodOptional<z.ZodString>;
6837
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
6838
+ members: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
6839
+ }, z.core.$loose>>>>;
6840
+ endpoints: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
6841
+ id: z.ZodString;
6842
+ label: z.ZodOptional<z.ZodString>;
6843
+ description: z.ZodOptional<z.ZodString>;
6844
+ ownerSystemId: z.ZodOptional<z.ZodString>;
6845
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
6846
+ route: z.ZodOptional<z.ZodString>;
6847
+ }, z.core.$loose>>>>;
6848
+ }, z.core.$strip>>>;
6849
+ resources: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
6850
+ id: z.ZodString;
6851
+ order: z.ZodDefault<z.ZodNumber>;
6852
+ systemPath: z.ZodString;
6853
+ title: z.ZodOptional<z.ZodString>;
6854
+ description: z.ZodOptional<z.ZodString>;
6855
+ ownerRoleId: z.ZodOptional<z.ZodString>;
6856
+ status: z.ZodEnum<{
6857
+ active: "active";
6858
+ deprecated: "deprecated";
6859
+ archived: "archived";
6860
+ }>;
6861
+ ontology: z.ZodOptional<z.ZodObject<{
6862
+ actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
6863
+ primaryAction: z.ZodOptional<z.ZodString>;
6864
+ reads: z.ZodOptional<z.ZodArray<z.ZodString>>;
6865
+ writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
6866
+ usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
6867
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
6868
+ contract: z.ZodOptional<z.ZodObject<{
6869
+ input: z.ZodOptional<z.ZodString>;
6870
+ output: z.ZodOptional<z.ZodString>;
6871
+ }, z.core.$strip>>;
6872
+ }, z.core.$strip>>;
6873
+ codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
6874
+ path: z.ZodString;
6875
+ role: z.ZodEnum<{
6876
+ entrypoint: "entrypoint";
6877
+ handler: "handler";
6878
+ schema: "schema";
6879
+ test: "test";
6880
+ docs: "docs";
6881
+ config: "config";
6882
+ }>;
6883
+ symbol: z.ZodOptional<z.ZodString>;
6884
+ description: z.ZodOptional<z.ZodString>;
6885
+ }, z.core.$strip>>>;
6886
+ kind: z.ZodLiteral<"workflow">;
6887
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
6888
+ eventKey: z.ZodString;
6889
+ label: z.ZodString;
6890
+ payloadSchema: z.ZodOptional<z.ZodString>;
6891
+ lifecycle: z.ZodOptional<z.ZodEnum<{
6892
+ active: "active";
6893
+ deprecated: "deprecated";
6894
+ draft: "draft";
6895
+ beta: "beta";
6896
+ archived: "archived";
6897
+ }>>;
6898
+ }, z.core.$strip>>>;
6899
+ }, z.core.$strip>, z.ZodObject<{
6900
+ id: z.ZodString;
6901
+ order: z.ZodDefault<z.ZodNumber>;
6902
+ systemPath: z.ZodString;
6903
+ title: z.ZodOptional<z.ZodString>;
6904
+ description: z.ZodOptional<z.ZodString>;
6905
+ ownerRoleId: z.ZodOptional<z.ZodString>;
6906
+ status: z.ZodEnum<{
6907
+ active: "active";
6908
+ deprecated: "deprecated";
6909
+ archived: "archived";
6910
+ }>;
6911
+ ontology: z.ZodOptional<z.ZodObject<{
6912
+ actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
6913
+ primaryAction: z.ZodOptional<z.ZodString>;
6914
+ reads: z.ZodOptional<z.ZodArray<z.ZodString>>;
6915
+ writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
6916
+ usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
6917
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
6918
+ contract: z.ZodOptional<z.ZodObject<{
6919
+ input: z.ZodOptional<z.ZodString>;
6920
+ output: z.ZodOptional<z.ZodString>;
6921
+ }, z.core.$strip>>;
6922
+ }, z.core.$strip>>;
6923
+ codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
6924
+ path: z.ZodString;
6925
+ role: z.ZodEnum<{
6926
+ entrypoint: "entrypoint";
6927
+ handler: "handler";
6928
+ schema: "schema";
6929
+ test: "test";
6930
+ docs: "docs";
6931
+ config: "config";
6932
+ }>;
6933
+ symbol: z.ZodOptional<z.ZodString>;
6934
+ description: z.ZodOptional<z.ZodString>;
6935
+ }, z.core.$strip>>>;
6936
+ kind: z.ZodLiteral<"agent">;
6937
+ agentKind: z.ZodEnum<{
6938
+ platform: "platform";
6939
+ orchestrator: "orchestrator";
6940
+ specialist: "specialist";
6941
+ utility: "utility";
6942
+ }>;
6943
+ actsAsRoleId: z.ZodOptional<z.ZodString>;
6944
+ sessionCapable: z.ZodBoolean;
6945
+ invocations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
6946
+ kind: z.ZodLiteral<"slash-command">;
6947
+ command: z.ZodString;
6948
+ toolFactory: z.ZodOptional<z.ZodString>;
6949
+ }, z.core.$strip>, z.ZodObject<{
6950
+ kind: z.ZodLiteral<"mcp-tool">;
6951
+ server: z.ZodString;
6952
+ name: z.ZodString;
6953
+ }, z.core.$strip>, z.ZodObject<{
6954
+ kind: z.ZodLiteral<"api-endpoint">;
6955
+ method: z.ZodEnum<{
6956
+ GET: "GET";
6957
+ POST: "POST";
6958
+ PATCH: "PATCH";
6959
+ DELETE: "DELETE";
6960
+ }>;
6961
+ path: z.ZodString;
6962
+ requestSchema: z.ZodOptional<z.ZodString>;
6963
+ responseSchema: z.ZodOptional<z.ZodString>;
6964
+ }, z.core.$strip>, z.ZodObject<{
6965
+ kind: z.ZodLiteral<"script-execution">;
6966
+ resourceId: z.ZodString;
6967
+ }, z.core.$strip>], "kind">>>;
6968
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
6969
+ eventKey: z.ZodString;
6970
+ label: z.ZodString;
6971
+ payloadSchema: z.ZodOptional<z.ZodString>;
6972
+ lifecycle: z.ZodOptional<z.ZodEnum<{
6973
+ active: "active";
6974
+ deprecated: "deprecated";
6975
+ draft: "draft";
6976
+ beta: "beta";
6977
+ archived: "archived";
6978
+ }>>;
6979
+ }, z.core.$strip>>>;
6980
+ }, z.core.$strip>, z.ZodObject<{
6981
+ id: z.ZodString;
6982
+ order: z.ZodDefault<z.ZodNumber>;
6983
+ systemPath: z.ZodString;
6984
+ title: z.ZodOptional<z.ZodString>;
6985
+ description: z.ZodOptional<z.ZodString>;
6986
+ ownerRoleId: z.ZodOptional<z.ZodString>;
6987
+ status: z.ZodEnum<{
6988
+ active: "active";
6989
+ deprecated: "deprecated";
6990
+ archived: "archived";
6991
+ }>;
6992
+ ontology: z.ZodOptional<z.ZodObject<{
6993
+ actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
6994
+ primaryAction: z.ZodOptional<z.ZodString>;
6995
+ reads: z.ZodOptional<z.ZodArray<z.ZodString>>;
6996
+ writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
6997
+ usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
6998
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
6999
+ contract: z.ZodOptional<z.ZodObject<{
7000
+ input: z.ZodOptional<z.ZodString>;
7001
+ output: z.ZodOptional<z.ZodString>;
7002
+ }, z.core.$strip>>;
7003
+ }, z.core.$strip>>;
7004
+ codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
7005
+ path: z.ZodString;
7006
+ role: z.ZodEnum<{
7007
+ entrypoint: "entrypoint";
7008
+ handler: "handler";
7009
+ schema: "schema";
7010
+ test: "test";
7011
+ docs: "docs";
7012
+ config: "config";
7013
+ }>;
7014
+ symbol: z.ZodOptional<z.ZodString>;
7015
+ description: z.ZodOptional<z.ZodString>;
7016
+ }, z.core.$strip>>>;
7017
+ kind: z.ZodLiteral<"integration">;
7018
+ provider: z.ZodString;
7019
+ }, z.core.$strip>, z.ZodObject<{
7020
+ id: z.ZodString;
7021
+ order: z.ZodDefault<z.ZodNumber>;
7022
+ systemPath: z.ZodString;
7023
+ title: z.ZodOptional<z.ZodString>;
7024
+ description: z.ZodOptional<z.ZodString>;
7025
+ ownerRoleId: z.ZodOptional<z.ZodString>;
7026
+ status: z.ZodEnum<{
7027
+ active: "active";
7028
+ deprecated: "deprecated";
7029
+ archived: "archived";
7030
+ }>;
7031
+ ontology: z.ZodOptional<z.ZodObject<{
7032
+ actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
7033
+ primaryAction: z.ZodOptional<z.ZodString>;
7034
+ reads: z.ZodOptional<z.ZodArray<z.ZodString>>;
7035
+ writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
7036
+ usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
7037
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
7038
+ contract: z.ZodOptional<z.ZodObject<{
7039
+ input: z.ZodOptional<z.ZodString>;
7040
+ output: z.ZodOptional<z.ZodString>;
7041
+ }, z.core.$strip>>;
7042
+ }, z.core.$strip>>;
7043
+ codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
7044
+ path: z.ZodString;
7045
+ role: z.ZodEnum<{
7046
+ entrypoint: "entrypoint";
7047
+ handler: "handler";
7048
+ schema: "schema";
7049
+ test: "test";
7050
+ docs: "docs";
7051
+ config: "config";
7052
+ }>;
7053
+ symbol: z.ZodOptional<z.ZodString>;
7054
+ description: z.ZodOptional<z.ZodString>;
7055
+ }, z.core.$strip>>>;
7056
+ kind: z.ZodLiteral<"script">;
7057
+ language: z.ZodEnum<{
7058
+ shell: "shell";
7059
+ sql: "sql";
7060
+ typescript: "typescript";
7061
+ python: "python";
7062
+ }>;
7063
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
7064
+ file: z.ZodString;
7065
+ }, z.core.$strip>]>;
7066
+ }, z.core.$strip>], "kind">>>>;
7067
+ topology: z.ZodDefault<z.ZodDefault<z.ZodObject<{
7068
+ version: z.ZodDefault<z.ZodLiteral<1>>;
7069
+ relationships: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
7070
+ from: z.ZodDiscriminatedUnion<[z.ZodObject<{
7071
+ kind: z.ZodLiteral<"system">;
7072
+ id: z.ZodString;
7073
+ }, z.core.$strip>, z.ZodObject<{
7074
+ kind: z.ZodLiteral<"resource">;
7075
+ id: z.ZodString;
7076
+ }, z.core.$strip>, z.ZodObject<{
7077
+ kind: z.ZodLiteral<"ontology">;
7078
+ id: z.ZodString;
7079
+ }, z.core.$strip>, z.ZodObject<{
7080
+ kind: z.ZodLiteral<"role">;
7081
+ id: z.ZodString;
7082
+ }, z.core.$strip>, z.ZodObject<{
7083
+ kind: z.ZodLiteral<"trigger">;
7084
+ id: z.ZodString;
7085
+ }, z.core.$strip>, z.ZodObject<{
7086
+ kind: z.ZodLiteral<"humanCheckpoint">;
7087
+ id: z.ZodString;
7088
+ }, z.core.$strip>, z.ZodObject<{
7089
+ kind: z.ZodLiteral<"externalResource">;
7090
+ id: z.ZodString;
7091
+ }, z.core.$strip>], "kind">;
7092
+ kind: z.ZodEnum<{
7093
+ triggers: "triggers";
7094
+ uses: "uses";
7095
+ approval: "approval";
7096
+ }>;
7097
+ to: z.ZodDiscriminatedUnion<[z.ZodObject<{
7098
+ kind: z.ZodLiteral<"system">;
7099
+ id: z.ZodString;
7100
+ }, z.core.$strip>, z.ZodObject<{
7101
+ kind: z.ZodLiteral<"resource">;
7102
+ id: z.ZodString;
7103
+ }, z.core.$strip>, z.ZodObject<{
7104
+ kind: z.ZodLiteral<"ontology">;
7105
+ id: z.ZodString;
7106
+ }, z.core.$strip>, z.ZodObject<{
7107
+ kind: z.ZodLiteral<"role">;
7108
+ id: z.ZodString;
7109
+ }, z.core.$strip>, z.ZodObject<{
7110
+ kind: z.ZodLiteral<"trigger">;
7111
+ id: z.ZodString;
7112
+ }, z.core.$strip>, z.ZodObject<{
7113
+ kind: z.ZodLiteral<"humanCheckpoint">;
7114
+ id: z.ZodString;
7115
+ }, z.core.$strip>, z.ZodObject<{
7116
+ kind: z.ZodLiteral<"externalResource">;
7117
+ id: z.ZodString;
7118
+ }, z.core.$strip>], "kind">;
7119
+ systemPath: z.ZodOptional<z.ZodString>;
7120
+ required: z.ZodOptional<z.ZodBoolean>;
7121
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
7122
+ }, z.core.$strip>>>;
7123
+ }, z.core.$strip>>>;
7124
+ actions: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
7125
+ id: z.ZodString;
7126
+ order: z.ZodNumber;
7127
+ label: z.ZodString;
7128
+ description: z.ZodOptional<z.ZodString>;
7129
+ scope: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"global">, z.ZodObject<{
7130
+ domain: z.ZodString;
7131
+ }, z.core.$strip>]>>;
7132
+ resourceId: z.ZodOptional<z.ZodString>;
7133
+ affects: z.ZodOptional<z.ZodArray<z.ZodString>>;
7134
+ invocations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
7135
+ kind: z.ZodLiteral<"slash-command">;
7136
+ command: z.ZodString;
7137
+ toolFactory: z.ZodOptional<z.ZodString>;
7138
+ }, z.core.$strip>, z.ZodObject<{
7139
+ kind: z.ZodLiteral<"mcp-tool">;
7140
+ server: z.ZodString;
7141
+ name: z.ZodString;
7142
+ }, z.core.$strip>, z.ZodObject<{
7143
+ kind: z.ZodLiteral<"api-endpoint">;
7144
+ method: z.ZodEnum<{
7145
+ GET: "GET";
7146
+ POST: "POST";
7147
+ PATCH: "PATCH";
7148
+ DELETE: "DELETE";
7149
+ }>;
7150
+ path: z.ZodString;
7151
+ requestSchema: z.ZodOptional<z.ZodString>;
7152
+ responseSchema: z.ZodOptional<z.ZodString>;
7153
+ }, z.core.$strip>, z.ZodObject<{
7154
+ kind: z.ZodLiteral<"script-execution">;
7155
+ resourceId: z.ZodString;
7156
+ }, z.core.$strip>], "kind">>>;
7157
+ knowledge: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
7158
+ lifecycle: z.ZodDefault<z.ZodEnum<{
7159
+ active: "active";
7160
+ deprecated: "deprecated";
7161
+ draft: "draft";
7162
+ beta: "beta";
7163
+ archived: "archived";
7164
+ }>>;
7165
+ }, z.core.$strip>>>>;
7166
+ entities: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
7167
+ id: z.ZodString;
7168
+ order: z.ZodNumber;
7169
+ label: z.ZodString;
7170
+ description: z.ZodOptional<z.ZodString>;
7171
+ ownedBySystemId: z.ZodString;
7172
+ table: z.ZodOptional<z.ZodString>;
7173
+ rowSchema: z.ZodOptional<z.ZodString>;
7174
+ stateCatalogId: z.ZodOptional<z.ZodString>;
7175
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
7176
+ toEntity: z.ZodString;
7177
+ kind: z.ZodEnum<{
7178
+ "belongs-to": "belongs-to";
7179
+ "has-many": "has-many";
7180
+ "has-one": "has-one";
7181
+ "many-to-many": "many-to-many";
7182
+ }>;
7183
+ via: z.ZodOptional<z.ZodString>;
7184
+ label: z.ZodOptional<z.ZodString>;
7185
+ }, z.core.$strip>>>;
7186
+ }, z.core.$strip>>>>;
7187
+ knowledge: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
7188
+ id: z.ZodString;
7189
+ kind: z.ZodEnum<{
7190
+ playbook: "playbook";
7191
+ strategy: "strategy";
7192
+ reference: "reference";
7193
+ }>;
7194
+ title: z.ZodString;
7195
+ summary: z.ZodString;
7196
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
7197
+ message: "message";
7198
+ error: "error";
7199
+ agent: "agent";
7200
+ workflow: "workflow";
7201
+ "google-sheets": "google-sheets";
7202
+ dashboard: "dashboard";
7203
+ calendar: "calendar";
7204
+ sales: "sales";
7205
+ crm: "crm";
7206
+ "lead-gen": "lead-gen";
7207
+ projects: "projects";
7208
+ clients: "clients";
7209
+ operations: "operations";
7210
+ monitoring: "monitoring";
7211
+ knowledge: "knowledge";
7212
+ settings: "settings";
7213
+ admin: "admin";
7214
+ archive: "archive";
7215
+ business: "business";
7216
+ finance: "finance";
7217
+ platform: "platform";
7218
+ seo: "seo";
7219
+ playbook: "playbook";
7220
+ strategy: "strategy";
7221
+ reference: "reference";
7222
+ integration: "integration";
7223
+ database: "database";
7224
+ user: "user";
7225
+ team: "team";
7226
+ gmail: "gmail";
7227
+ attio: "attio";
7228
+ overview: "overview";
7229
+ "command-view": "command-view";
7230
+ "command-queue": "command-queue";
7231
+ pipeline: "pipeline";
7232
+ lists: "lists";
7233
+ resources: "resources";
7234
+ approve: "approve";
7235
+ reject: "reject";
7236
+ retry: "retry";
7237
+ edit: "edit";
7238
+ view: "view";
7239
+ launch: "launch";
7240
+ "message-plus": "message-plus";
7241
+ escalate: "escalate";
7242
+ promote: "promote";
7243
+ submit: "submit";
7244
+ email: "email";
7245
+ success: "success";
7246
+ warning: "warning";
7247
+ info: "info";
7248
+ pending: "pending";
7249
+ bolt: "bolt";
7250
+ building: "building";
7251
+ briefcase: "briefcase";
7252
+ apps: "apps";
7253
+ graph: "graph";
7254
+ shield: "shield";
7255
+ users: "users";
7256
+ "chart-bar": "chart-bar";
7257
+ search: "search";
7258
+ }>, z.ZodString]>>;
7259
+ externalUrl: z.ZodOptional<z.ZodString>;
7260
+ sourceFilePath: z.ZodOptional<z.ZodString>;
7261
+ body: z.ZodString;
7262
+ links: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
7263
+ target: z.ZodObject<{
7264
+ kind: z.ZodEnum<{
7265
+ knowledge: "knowledge";
7266
+ system: "system";
7267
+ resource: "resource";
7268
+ action: "action";
7269
+ ontology: "ontology";
7270
+ role: "role";
7271
+ client: "client";
7272
+ stage: "stage";
7273
+ goal: "goal";
7274
+ "customer-segment": "customer-segment";
7275
+ offering: "offering";
7276
+ }>;
7277
+ id: z.ZodString;
7278
+ }, z.core.$strip>;
7279
+ }, z.core.$strip>, z.ZodObject<{
7280
+ nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
7281
+ }, z.core.$strip>]>, z.ZodTransform<{
7282
+ target: {
7283
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
7284
+ id: string;
7285
+ };
7286
+ nodeId: string;
7287
+ }, {
7288
+ nodeId: string;
7289
+ } | {
7290
+ target: {
7291
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
7292
+ id: string;
7293
+ };
7294
+ }>>>>;
7295
+ ownerIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
7296
+ updatedAt: z.ZodString;
7297
+ }, z.core.$strip>>>>;
7298
+ }, z.core.$strip>;
7299
+
7300
+ type OrganizationModel = z.infer<typeof OrganizationModelSchema>;
5760
7301
 
5761
7302
  declare const AccessKeyInputSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
5762
7303
  systemPath: z.ZodString;
@@ -5816,6 +7357,11 @@ declare const AccessKeys: {
5816
7357
  readonly systemPath: "permission.clients";
5817
7358
  readonly action: "manage";
5818
7359
  };
7360
+ /** @reserved Reserved for the content pipeline's session-authenticated API layer (write guard), not yet built. */
7361
+ readonly contentManage: {
7362
+ readonly systemPath: "permission.content";
7363
+ readonly action: "manage";
7364
+ };
5819
7365
  readonly operationsOverview: {
5820
7366
  readonly systemPath: "diagnostic.operations.overview";
5821
7367
  readonly action: "view";
@@ -7845,6 +9391,314 @@ declare function useUpdateClient(): _tanstack_react_query.UseMutationResult<{
7845
9391
 
7846
9392
  declare function useDeleteClient(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
7847
9393
 
9394
+ type ContentItemsListFilters = Partial<Pick<ListContentItemsQuery, 'status' | 'pillar' | 'pipelineId' | 'clientId' | 'reviewedBy' | 'search' | 'limit' | 'offset'>>;
9395
+ type ContentDistributionsListFilters = Partial<Pick<ListContentDistributionsQuery, 'contentItemId' | 'platform' | 'status' | 'limit' | 'offset'>>;
9396
+ declare const contentKeys: {
9397
+ all: readonly ["content"];
9398
+ items: () => readonly ["content", "items"];
9399
+ itemsList: (organizationId: WorkOsOrgId | null | undefined, filters: ContentItemsListFilters) => readonly ["content", "items", "list", WorkOsOrgId | null | undefined, Partial<Pick<{
9400
+ limit: number;
9401
+ offset: number;
9402
+ status?: string | undefined;
9403
+ pillar?: string | undefined;
9404
+ pipelineId?: string | undefined;
9405
+ clientId?: string | undefined;
9406
+ reviewedBy?: string | undefined;
9407
+ search?: string | undefined;
9408
+ }, "limit" | "offset" | "search" | "status" | "pillar" | "clientId" | "pipelineId" | "reviewedBy">>];
9409
+ itemDetail: (organizationId: WorkOsOrgId | null | undefined, itemId: string | undefined) => readonly ["content", "items", "detail", WorkOsOrgId | null | undefined, string | undefined];
9410
+ itemAttempts: (organizationId: WorkOsOrgId | null | undefined, itemId: string | undefined) => readonly ["content", "items", "attempts", WorkOsOrgId | null | undefined, string | undefined];
9411
+ distributions: () => readonly ["content", "distributions"];
9412
+ distributionsList: (organizationId: WorkOsOrgId | null | undefined, filters: ContentDistributionsListFilters) => readonly ["content", "distributions", "list", WorkOsOrgId | null | undefined, Partial<Pick<{
9413
+ limit: number;
9414
+ offset: number;
9415
+ contentItemId?: string | undefined;
9416
+ platform?: string | undefined;
9417
+ status?: string | undefined;
9418
+ }, "limit" | "offset" | "platform" | "status" | "contentItemId">>];
9419
+ distributionDetail: (organizationId: WorkOsOrgId | null | undefined, distributionId: string | undefined) => readonly ["content", "distributions", "detail", WorkOsOrgId | null | undefined, string | undefined];
9420
+ };
9421
+
9422
+ declare function useContentItems(filters?: ContentItemsListFilters): _tanstack_react_query.UseQueryResult<{
9423
+ data: {
9424
+ id: string;
9425
+ organizationId: string;
9426
+ title: string;
9427
+ body: string | null;
9428
+ payload: unknown;
9429
+ status: string;
9430
+ pillar: string | null;
9431
+ pipelineId: string | null;
9432
+ clientId: string | null;
9433
+ sourceAssetId: string | null;
9434
+ processingState: Record<string, {
9435
+ [x: string]: unknown;
9436
+ status: "error" | "success" | "no_result" | "skipped";
9437
+ data?: unknown;
9438
+ }>;
9439
+ reviewedAt: string | null;
9440
+ reviewedBy: string | null;
9441
+ reviewerFeedback: string | null;
9442
+ rejectReason: string | null;
9443
+ createdBy: string | null;
9444
+ updatedBy: string | null;
9445
+ createdAt: string;
9446
+ updatedAt: string;
9447
+ }[];
9448
+ total: number;
9449
+ limit: number;
9450
+ offset: number;
9451
+ }, Error>;
9452
+
9453
+ declare function useContentItem(itemId: string | undefined): _tanstack_react_query.UseQueryResult<{
9454
+ id: string;
9455
+ organizationId: string;
9456
+ title: string;
9457
+ body: string | null;
9458
+ payload: unknown;
9459
+ status: string;
9460
+ pillar: string | null;
9461
+ pipelineId: string | null;
9462
+ clientId: string | null;
9463
+ sourceAssetId: string | null;
9464
+ processingState: Record<string, {
9465
+ [x: string]: unknown;
9466
+ status: "error" | "success" | "no_result" | "skipped";
9467
+ data?: unknown;
9468
+ }>;
9469
+ reviewedAt: string | null;
9470
+ reviewedBy: string | null;
9471
+ reviewerFeedback: string | null;
9472
+ rejectReason: string | null;
9473
+ createdBy: string | null;
9474
+ updatedBy: string | null;
9475
+ createdAt: string;
9476
+ updatedAt: string;
9477
+ }, Error>;
9478
+
9479
+ /**
9480
+ * Lists a content item's attempt lineage: order (`attemptNumber`), `stepKey`, `payload`,
9481
+ * `createdAt`, and `sourceExecutionId`. `stepKey` is written by the producer as of
9482
+ * 2026-08-12 and is NULL on older rows -- render the absence as unknown rather than
9483
+ * fabricating a step from payload keys. `attemptNumber` still counts per item, not per
9484
+ * step, so it does not identify a step on its own.
9485
+ */
9486
+ declare function useContentItemAttempts(itemId: string | undefined): _tanstack_react_query.UseQueryResult<{
9487
+ data: {
9488
+ id: string;
9489
+ organizationId: string;
9490
+ contentItemId: string;
9491
+ attemptNumber: number;
9492
+ stepKey: string | null;
9493
+ payload: unknown;
9494
+ sourceExecutionId: string | null;
9495
+ createdBy: string | null;
9496
+ createdAt: string;
9497
+ }[];
9498
+ }, Error>;
9499
+
9500
+ /**
9501
+ * Lists content distributions, most commonly filtered to one item's rows. Response
9502
+ * carries `publishMethod`, `platformPostId`, `metrics`, and `metricsUpdatedAt` -- the
9503
+ * columns that exist since Wave L's live run and had never been rendered anywhere
9504
+ * before this wave.
9505
+ */
9506
+ declare function useContentDistributions(filters?: ContentDistributionsListFilters): _tanstack_react_query.UseQueryResult<{
9507
+ data: {
9508
+ id: string;
9509
+ organizationId: string;
9510
+ contentItemId: string;
9511
+ platform: string;
9512
+ format: string;
9513
+ status: string;
9514
+ adaptedBody: string | null;
9515
+ platformContent: unknown;
9516
+ checklist: unknown;
9517
+ mediaUrls: unknown[];
9518
+ processingState: Record<string, {
9519
+ [x: string]: unknown;
9520
+ status: "error" | "success" | "no_result" | "skipped";
9521
+ data?: unknown;
9522
+ }>;
9523
+ publishMethod: string | null;
9524
+ publishedAt: string | null;
9525
+ platformPostId: string | null;
9526
+ platformUrl: string | null;
9527
+ metrics: unknown;
9528
+ metricsUpdatedAt: string | null;
9529
+ createdAt: string;
9530
+ updatedAt: string;
9531
+ }[];
9532
+ }, Error>;
9533
+
9534
+ /**
9535
+ * Reads one distribution by id, for a detail page reached by distribution id. The list
9536
+ * hook filters by `contentItemId`, which such a page cannot supply -- it knows only its
9537
+ * own id.
9538
+ */
9539
+ declare function useContentDistribution(distributionId: string | undefined): _tanstack_react_query.UseQueryResult<{
9540
+ id: string;
9541
+ organizationId: string;
9542
+ contentItemId: string;
9543
+ platform: string;
9544
+ format: string;
9545
+ status: string;
9546
+ adaptedBody: string | null;
9547
+ platformContent: unknown;
9548
+ checklist: unknown;
9549
+ mediaUrls: unknown[];
9550
+ processingState: Record<string, {
9551
+ [x: string]: unknown;
9552
+ status: "error" | "success" | "no_result" | "skipped";
9553
+ data?: unknown;
9554
+ }>;
9555
+ publishMethod: string | null;
9556
+ publishedAt: string | null;
9557
+ platformPostId: string | null;
9558
+ platformUrl: string | null;
9559
+ metrics: unknown;
9560
+ metricsUpdatedAt: string | null;
9561
+ createdAt: string;
9562
+ updatedAt: string;
9563
+ }, Error>;
9564
+
9565
+ interface UpdateContentItemParams {
9566
+ itemId: string;
9567
+ updates: UpdateContentItemRequest;
9568
+ }
9569
+ /** PATCH `/content/items/:itemId` -- title, body, status, pillar, pipelineId, clientId, sourceAssetId. */
9570
+ declare function useUpdateContentItem(): _tanstack_react_query.UseMutationResult<{
9571
+ id: string;
9572
+ organizationId: string;
9573
+ title: string;
9574
+ body: string | null;
9575
+ payload: unknown;
9576
+ status: string;
9577
+ pillar: string | null;
9578
+ pipelineId: string | null;
9579
+ clientId: string | null;
9580
+ sourceAssetId: string | null;
9581
+ processingState: Record<string, {
9582
+ [x: string]: unknown;
9583
+ status: "error" | "success" | "no_result" | "skipped";
9584
+ data?: unknown;
9585
+ }>;
9586
+ reviewedAt: string | null;
9587
+ reviewedBy: string | null;
9588
+ reviewerFeedback: string | null;
9589
+ rejectReason: string | null;
9590
+ createdBy: string | null;
9591
+ updatedBy: string | null;
9592
+ createdAt: string;
9593
+ updatedAt: string;
9594
+ }, Error, UpdateContentItemParams, unknown>;
9595
+
9596
+ interface UpdateContentDistributionParams {
9597
+ distributionId: string;
9598
+ updates: UpdateContentDistributionRequest;
9599
+ }
9600
+ /**
9601
+ * PATCH `/content/distributions/:distributionId`.
9602
+ *
9603
+ * This one mutation replaces the four Supabase-direct hooks the Command Center's
9604
+ * distribution detail page used -- checklist toggle, platform-content edit, media
9605
+ * delete, and the general update -- because each was a partial write of `checklist`,
9606
+ * `platformContent`, or `mediaUrls`, all of which this route already accepts.
9607
+ */
9608
+ declare function useUpdateContentDistribution(): _tanstack_react_query.UseMutationResult<{
9609
+ id: string;
9610
+ organizationId: string;
9611
+ contentItemId: string;
9612
+ platform: string;
9613
+ format: string;
9614
+ status: string;
9615
+ adaptedBody: string | null;
9616
+ platformContent: unknown;
9617
+ checklist: unknown;
9618
+ mediaUrls: unknown[];
9619
+ processingState: Record<string, {
9620
+ [x: string]: unknown;
9621
+ status: "error" | "success" | "no_result" | "skipped";
9622
+ data?: unknown;
9623
+ }>;
9624
+ publishMethod: string | null;
9625
+ publishedAt: string | null;
9626
+ platformPostId: string | null;
9627
+ platformUrl: string | null;
9628
+ metrics: unknown;
9629
+ metricsUpdatedAt: string | null;
9630
+ createdAt: string;
9631
+ updatedAt: string;
9632
+ }, Error, UpdateContentDistributionParams, unknown>;
9633
+
9634
+ interface ReviewContentItemParams {
9635
+ itemId: string;
9636
+ review: ReviewContentItemRequest;
9637
+ }
9638
+ /**
9639
+ * POST `/content/items/:itemId/review` -- approve or reject. Writes `reviewedAt`,
9640
+ * `reviewedBy`, `reviewerFeedback`, `rejectReason` server-side.
9641
+ */
9642
+ declare function useReviewContentItem(): _tanstack_react_query.UseMutationResult<{
9643
+ id: string;
9644
+ organizationId: string;
9645
+ title: string;
9646
+ body: string | null;
9647
+ payload: unknown;
9648
+ status: string;
9649
+ pillar: string | null;
9650
+ pipelineId: string | null;
9651
+ clientId: string | null;
9652
+ sourceAssetId: string | null;
9653
+ processingState: Record<string, {
9654
+ [x: string]: unknown;
9655
+ status: "error" | "success" | "no_result" | "skipped";
9656
+ data?: unknown;
9657
+ }>;
9658
+ reviewedAt: string | null;
9659
+ reviewedBy: string | null;
9660
+ reviewerFeedback: string | null;
9661
+ rejectReason: string | null;
9662
+ createdBy: string | null;
9663
+ updatedBy: string | null;
9664
+ createdAt: string;
9665
+ updatedAt: string;
9666
+ }, Error, ReviewContentItemParams, unknown>;
9667
+
9668
+ interface ContentPipelineSummary {
9669
+ /** Item count per declared status key. */
9670
+ countsByStatus: Record<string, number>;
9671
+ /** Sum of `countsByStatus`. */
9672
+ totalItems: number;
9673
+ /** ISO timestamp of the most recent execution across every resolved step resource, or `null`. */
9674
+ lastRunAt: string | null;
9675
+ isLoading: boolean;
9676
+ }
9677
+ /**
9678
+ * Sums one `total` reading per declared status into a `{status: count}` map.
9679
+ * Extracted as a pure function so the aggregation is testable without a QueryClient.
9680
+ */
9681
+ declare function sumStatusCounts(statusKeys: string[], totals: (number | undefined)[]): {
9682
+ countsByStatus: Record<string, number>;
9683
+ totalItems: number;
9684
+ };
9685
+ /** Picks the most recent `startTime` across every resource's most-recent-execution reading, as an ISO string. */
9686
+ declare function pickLatestRunAt(latestExecutions: (APIExecutionSummary | undefined)[]): string | null;
9687
+ /**
9688
+ * Aggregates one content pipeline's item counts by status and its most recent run --
9689
+ * used by the Pipelines list (one row per pipeline) and the Pipeline workspace's
9690
+ * Overview tab.
9691
+ *
9692
+ * `useContentItems`'s response is `{ data, total, limit, offset }`. Counts read `total`
9693
+ * per status (`limit: 1`) rather than counting a page of `data` (default limit 50),
9694
+ * which would silently under-report once a pipeline has more items than one page in a
9695
+ * status (binding constraint h). Runs are read per resolved step Resource via the
9696
+ * generic executions shape (`useExecutions`'s queryKey/queryFn) rather than any
9697
+ * list-scoped panel -- `WorkflowRunsPanel` and `LiveTail` are both hard-bound to a
9698
+ * lead-gen list id and cannot serve this (binding constraint b).
9699
+ */
9700
+ declare function useContentPipelineSummary(pipelineId: string | undefined, statusKeys: string[], stepResourceIds: string[]): ContentPipelineSummary;
9701
+
7848
9702
  /**
7849
9703
  * Query key factories for Operations TanStack Query hooks.
7850
9704
  *
@@ -9511,7 +11365,7 @@ declare function useDeleteContacts(): _tanstack_react_query.UseMutationResult<vo
9511
11365
 
9512
11366
  declare const leadGenArtifactKeys: {
9513
11367
  all: readonly ["lead-gen-artifacts"];
9514
- list: (organizationId: WorkOsOrgId | null, ownerKind: AcqArtifactOwnerKind, ownerId: string) => readonly ["lead-gen-artifacts", WorkOsOrgId | null, "company" | "contact" | "list" | "deal" | "list_member", string];
11368
+ list: (organizationId: WorkOsOrgId | null, ownerKind: AcqArtifactOwnerKind, ownerId: string | null | undefined) => readonly ["lead-gen-artifacts", WorkOsOrgId | null, "company" | "contact" | "list" | "organization" | "deal" | "list_member", string | null | undefined];
9515
11369
  };
9516
11370
  interface UseArtifactsParams {
9517
11371
  ownerKind: AcqArtifactOwnerKind;
@@ -9522,12 +11376,15 @@ declare function useArtifacts({ ownerKind, ownerId }: UseArtifactsParams): _tans
9522
11376
  id: string;
9523
11377
  organizationId: string;
9524
11378
  ownerKind: string;
9525
- ownerId: string;
11379
+ ownerId: string | null;
9526
11380
  kind: string;
11381
+ pipelineId: string | null;
9527
11382
  content: Record<string, unknown>;
9528
11383
  sourceExecutionId: string | null;
9529
11384
  createdBy: string | null;
9530
11385
  createdAt: string;
11386
+ updatedAt: string;
11387
+ isActive: boolean;
9531
11388
  version: number;
9532
11389
  }[];
9533
11390
  }, Error>;
@@ -9535,19 +11392,23 @@ declare function useCreateArtifact(): _tanstack_react_query.UseMutationResult<{
9535
11392
  id: string;
9536
11393
  organizationId: string;
9537
11394
  ownerKind: string;
9538
- ownerId: string;
11395
+ ownerId: string | null;
9539
11396
  kind: string;
11397
+ pipelineId: string | null;
9540
11398
  content: Record<string, unknown>;
9541
11399
  sourceExecutionId: string | null;
9542
11400
  createdBy: string | null;
9543
11401
  createdAt: string;
11402
+ updatedAt: string;
11403
+ isActive: boolean;
9544
11404
  version: number;
9545
11405
  }, Error, {
9546
- ownerKind: "company" | "contact" | "list" | "deal" | "list_member";
9547
- ownerId: string;
11406
+ ownerKind: "company" | "contact" | "list" | "organization" | "deal" | "list_member";
9548
11407
  kind: string;
9549
11408
  content: Record<string, unknown>;
11409
+ ownerId?: string | null | undefined;
9550
11410
  sourceExecutionId?: string | undefined;
11411
+ pipelineId?: string | null | undefined;
9551
11412
  }, unknown>;
9552
11413
 
9553
11414
  declare const leadGenListMemberKeys: {
@@ -9847,6 +11708,14 @@ declare class OrganizationMembershipService {
9847
11708
  * Reactivate a membership
9848
11709
  */
9849
11710
  reactivateMembership(membershipId: string): Promise<MembershipWithDetails>;
11711
+ /**
11712
+ * Write the WorkOS membership link the acceptance path failed to record --
11713
+ * the repair for a membership reported as `accepted_unlinked`.
11714
+ *
11715
+ * Idempotent on the server: an already-linked row returns unchanged. A row in
11716
+ * any other state is refused with a 409 rather than guessed at.
11717
+ */
11718
+ repairMembershipLink(membershipId: string): Promise<MembershipWithDetails>;
9850
11719
  }
9851
11720
 
9852
11721
  declare function useUserMemberships(userId: string, params?: Omit<ListMembershipsParams, 'userId'>): _tanstack_react_query.UseQueryResult<MembershipWithDetails[], Error>;
@@ -10273,6 +12142,32 @@ declare function useExecutionLogsFilters(_timeRange: TimeRange): {
10273
12142
  */
10274
12143
  declare function useOrganizationMembers(organizationId: SupabaseOrgId, params?: Omit<ListMembershipsParams, 'organizationId'>): _tanstack_react_query.UseQueryResult<MembershipWithDetails[], Error>;
10275
12144
 
12145
+ type OrganizationModelDriftState = {
12146
+ /** True only when both hashes are known AND differ. Unknowns are never drift. */
12147
+ hasDrifted: boolean;
12148
+ /** Hash of the model this bundle was built against. */
12149
+ buildTimeHash: string | null;
12150
+ /** Hash of the organization's active deployment. */
12151
+ deployedHash: string | null;
12152
+ activeDeploymentId: string | null;
12153
+ isLoading: boolean;
12154
+ };
12155
+ /**
12156
+ * Detect that the UI is rendering an organization model older than the one the
12157
+ * platform has deployed.
12158
+ *
12159
+ * Every UI in the fleet — Command Center and every tenant — compiles its
12160
+ * organization model into its bundle. The API resolves the deployed snapshot
12161
+ * per request, so a deploy of one without the other leaves the sidebar,
12162
+ * knowledge pages, and systems pages silently rendering the older shape. There
12163
+ * is no guard against that anywhere else; this is it.
12164
+ *
12165
+ * Deliberately conservative: an unavailable hash on either side reports "no
12166
+ * drift" rather than a warning nobody can act on. A false banner on every page
12167
+ * of the shell would be worse than the drift it was warning about.
12168
+ */
12169
+ declare function useOrganizationModelDrift(organizationModel: OrganizationModel): OrganizationModelDriftState;
12170
+
10276
12171
  /**
10277
12172
  * Subscribe to the org-scoped delivery SSE stream.
10278
12173
  *
@@ -10658,5 +12553,5 @@ declare function useCreateNote(): _tanstack_react_query.UseMutationResult<{
10658
12553
  type?: string;
10659
12554
  }, "organization_id">, unknown>;
10660
12555
 
10661
- export { AccessKeys, ApiKeyService, CredentialService, DeploymentService, OperationsService, OrganizationMembershipService, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, WebhookEndpointService, acquisitionListKeys, clientsKeys, collectResourceFilterFacets, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, getResourceFilterFacetIds, isSessionCapable, labelResourceFilterFacet, leadGenArtifactKeys, leadGenListCompanyKeys, leadGenListMemberKeys, mergeSessionMessages, milestoneKeys, noteKeys, observabilityKeys, operationsKeys, projectActivityKeys, projectKeys, requestsKeys, scheduleKeys, sessionsKeys, sortData, taskKeys, useAccess, useActivateDeployment, useActivities, useActivitiesRealtime, useActivityFilters, useActivityTrend, useAddCompaniesToList, useAddContactsToList, useArchiveSession, useArchivedLogs, useArtifacts, useAssignRole, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useClient, useClientStatus, useClients, useCommandQueue, useCommandQueueTask, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompanyFacets, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateArtifact, useCreateClient, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateProject as useCreateDeliveryProject, useCreateList, useCreateMilestone, useCreateNote, useCreateOrgRole, useCreateSchedule, useCreateSession, useCreateTask, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDealsLookup, useDealsSummary, useDeleteApiKey, useDeleteClient, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteProject as useDeleteDeliveryProject, useDeleteTask as useDeleteDeliveryTask, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteMilestone, useDeleteOrgRole, useDeleteRequest, useDeleteSchedule, useDeleteSession, useDeleteTask$1 as useDeleteTask, useDeleteWebhookEndpoint, useDeriveActions, useEffectivePermissions, useEndSession, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useErrorTrends, useExecuteAction, useExecuteAsync, useExecuteResource, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutionSSE, useExecutions, useGetExecutionHistory, useGetSchedule, useInFlightExecutions, useList, useListApiKeys, useListDeployments, useListExecutions, useListMember, useListMembers, useListProgress, useListRecords, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useMergedExecution, useMilestones, useNotificationCount as useNotificationCountSSE, useNotifications, useOrgRoles, useOrganizationMembers, usePaginationState, usePatchTask, usePauseSchedule, usePermissionCatalog, useProject, useProjectActivities, useProjectMilestones, useProjectNotes, useProjectRealtime, useProjectTasks, useProjects, useReactivateMembership, useRecentExecutionsByResource, useRemoveCompaniesFromList, useRequest, useRequestsList, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useRevokeRole, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStatusFilter, useSubmitAction, useSubmitRequest, useSuccessNotification, useSystemHealth, useTableSelection, useTableSort, useTasks, useTestNotification, useTimeRangeDates, useTopFailingResources, useTransitionItem, useTransitionListCompany, useTransitionListMember, useTransitionState, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateClient, useUpdateCompany, useUpdateContact, useUpdateCredential, useUpdateProject as useUpdateDeliveryProject, useUpdateList, useUpdateListConfig, useUpdateListStatus, useUpdateMilestone, useUpdateOrgRole, useUpdateRequestStatus, useUpdateSchedule, useUpdateTask, useUpdateWebhookEndpoint, useUserMemberships, useVerifyCredential, useVisibleResources, useWarningNotification, useWorkflowExecution };
10662
- export type { AccessKeyInput, AcqCompanyWithCount, AcqContactWithCompany, AcqDealNote, AcqDealTask, AcqDealTaskKind, ActivityFilters, ActivityTrendResponse, AddCompaniesToListResult, AddContactsToListResult, AssignRoleInput, BulkDeleteExecutionsParams, BulkDeleteExecutionsResult, BusinessImpactMetrics, CancelExecutionParams, CancelExecutionResult, ChatMessage, ClientDetailResponse, ClientResponse, ClientStatus, ClientStatusResponse, ClientsListFilters, CreateApiKeyRequest, CreateApiKeyResponse, CreateClientRequest, CreateCredentialRequest, CreateCredentialResponse, CreateOrgRoleInput, CreateScheduleInput, CreateSessionResponse, CredentialListItem, DealDetail, DealLookupFilters, DealLookupItem, DealSummaryStageItem, DealsSummaryResponse, DeleteExecutionParams, Deployment, ErrorDistributionItem, ErrorDistributionParams, ErrorFilters, ErrorTrendsParams, ExecuteActionInput, ExecuteAsyncParams, ExecuteAsyncResult, ExecutionErrorDetails, ExecutionHistoryItem, ExecutionHistoryResponse, ExecutionLogsFilters, ExecutionLogsPageResponse, FailingResource, GetMessagesResponse, ListActivitiesResponse, ListApiKeysResponse, ListCredentialsResponse, ListExecutionsFilters, ListRecordsFilters, ListSchedulesFilters, ListSchedulesResponse, ListWebhookEndpointsResponse, MessageEvent, MessageType, OrgRole, RemoveCompaniesFromListResult, RequestRow, RequestSeverity, RequestType, RequestsListFilters, ResourceFilterFacet, ResourcesResponse, RetryExecutionParams, RevokeRoleInput, SessionDTO, SessionExecution, SessionExecutionsResponse, SessionListItem, SessionTokenUsage, SortDirection, SortState, StaleDealSummaryItem, StatefulItem, StatusFilter, SubmitActionRequest, SubmitActionResponse, SubmitRequestInput, SystemHealthExecutionSummary, SystemHealthResponse, TaskSchedule, TopFailingResourcesParams, TransitionItemInput, TransitionListCompanyInput, TransitionListMemberInput, TransitionStateInput, UpdateClientRequest, UpdateListStatusInput, UpdateOrgRoleInput, UpdateScheduleInput, UseAccessResult, UseActivitiesParams, UseActivityTrendParams, UseArtifactsParams, UseBatchedResourcesHealthParams, UseExecuteResourceOptions, UseExecutionHealthParams, UseExecutionLogsParams, UseExecutionPanelStateOptions, UseExecutionPanelStateReturn, UseExecutionSSEOptions, UseExecutionSSEResult, UseInFlightExecutionsOptions, UseListProgressOptions, UseNotificationCountArgs, UseResourcesHealthParams, UseSSEConnectionOptions, UseScheduledTasksOptions, UseSystemHealthParams, UseWorkflowExecutionOptions, UseWorkflowExecutionResult, VerifyCredentialResponse, WebSocketState, WorkflowExecutionTriggerParams };
12556
+ export { AccessKeys, ApiKeyService, CredentialService, DeploymentService, OperationsService, OrganizationMembershipService, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, WebhookEndpointService, acquisitionListKeys, clientsKeys, collectResourceFilterFacets, companyKeys, contactKeys, contentKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, getResourceFilterFacetIds, isSessionCapable, labelResourceFilterFacet, leadGenArtifactKeys, leadGenListCompanyKeys, leadGenListMemberKeys, mergeSessionMessages, milestoneKeys, noteKeys, observabilityKeys, operationsKeys, pickLatestRunAt, projectActivityKeys, projectKeys, requestsKeys, scheduleKeys, sessionsKeys, sortData, sumStatusCounts, taskKeys, useAccess, useActivateDeployment, useActivities, useActivitiesRealtime, useActivityFilters, useActivityTrend, useAddCompaniesToList, useAddContactsToList, useArchiveSession, useArchivedLogs, useArtifacts, useAssignRole, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useClient, useClientStatus, useClients, useCommandQueue, useCommandQueueTask, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompanyFacets, useCompleteDealTask, useContact, useContacts, useContentDistribution, useContentDistributions, useContentItem, useContentItemAttempts, useContentItems, useContentPipelineSummary, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateArtifact, useCreateClient, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateProject as useCreateDeliveryProject, useCreateList, useCreateMilestone, useCreateNote, useCreateOrgRole, useCreateSchedule, useCreateSession, useCreateTask, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDealsLookup, useDealsSummary, useDeleteApiKey, useDeleteClient, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteProject as useDeleteDeliveryProject, useDeleteTask as useDeleteDeliveryTask, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteMilestone, useDeleteOrgRole, useDeleteRequest, useDeleteSchedule, useDeleteSession, useDeleteTask$1 as useDeleteTask, useDeleteWebhookEndpoint, useDeriveActions, useEffectivePermissions, useEndSession, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useErrorTrends, useExecuteAction, useExecuteAsync, useExecuteResource, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutionSSE, useExecutions, useGetExecutionHistory, useGetSchedule, useInFlightExecutions, useList, useListApiKeys, useListDeployments, useListExecutions, useListMember, useListMembers, useListProgress, useListRecords, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useMergedExecution, useMilestones, useNotificationCount as useNotificationCountSSE, useNotifications, useOrgRoles, useOrganizationMembers, useOrganizationModelDrift, usePaginationState, usePatchTask, usePauseSchedule, usePermissionCatalog, useProject, useProjectActivities, useProjectMilestones, useProjectNotes, useProjectRealtime, useProjectTasks, useProjects, useReactivateMembership, useRecentExecutionsByResource, useRemoveCompaniesFromList, useRequest, useRequestsList, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useReviewContentItem, useRevokeRole, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStatusFilter, useSubmitAction, useSubmitRequest, useSuccessNotification, useSystemHealth, useTableSelection, useTableSort, useTasks, useTestNotification, useTimeRangeDates, useTopFailingResources, useTransitionItem, useTransitionListCompany, useTransitionListMember, useTransitionState, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateClient, useUpdateCompany, useUpdateContact, useUpdateContentDistribution, useUpdateContentItem, useUpdateCredential, useUpdateProject as useUpdateDeliveryProject, useUpdateList, useUpdateListConfig, useUpdateListStatus, useUpdateMilestone, useUpdateOrgRole, useUpdateRequestStatus, useUpdateSchedule, useUpdateTask, useUpdateWebhookEndpoint, useUserMemberships, useVerifyCredential, useVisibleResources, useWarningNotification, useWorkflowExecution };
12557
+ export type { AccessKeyInput, AcqCompanyWithCount, AcqContactWithCompany, AcqDealNote, AcqDealTask, AcqDealTaskKind, ActivityFilters, ActivityTrendResponse, AddCompaniesToListResult, AddContactsToListResult, AssignRoleInput, BulkDeleteExecutionsParams, BulkDeleteExecutionsResult, BusinessImpactMetrics, CancelExecutionParams, CancelExecutionResult, ChatMessage, ClientDetailResponse, ClientResponse, ClientStatus, ClientStatusResponse, ClientsListFilters, ContentDistributionListResponse, ContentDistributionResponse, ContentDistributionsListFilters, ContentItemAttemptListResponse, ContentItemAttemptResponse, ContentItemListResponse, ContentItemResponse, ContentItemReviewDecision, ContentItemStatus, ContentItemsListFilters, ContentPillar, ContentPipelineId, ContentPipelineSummary, CreateApiKeyRequest, CreateApiKeyResponse, CreateClientRequest, CreateCredentialRequest, CreateCredentialResponse, CreateOrgRoleInput, CreateScheduleInput, CreateSessionResponse, CredentialListItem, DealDetail, DealLookupFilters, DealLookupItem, DealSummaryStageItem, DealsSummaryResponse, DeleteExecutionParams, Deployment, ErrorDistributionItem, ErrorDistributionParams, ErrorFilters, ErrorTrendsParams, ExecuteActionInput, ExecuteAsyncParams, ExecuteAsyncResult, ExecutionErrorDetails, ExecutionHistoryItem, ExecutionHistoryResponse, ExecutionLogsFilters, ExecutionLogsPageResponse, FailingResource, GetMessagesResponse, ListActivitiesResponse, ListApiKeysResponse, ListCredentialsResponse, ListExecutionsFilters, ListRecordsFilters, ListSchedulesFilters, ListSchedulesResponse, ListWebhookEndpointsResponse, MessageEvent, MessageType, OrgRole, OrganizationModelDriftState, RemoveCompaniesFromListResult, RequestRow, RequestSeverity, RequestType, RequestsListFilters, ResourceFilterFacet, ResourcesResponse, RetryExecutionParams, ReviewContentItemRequest, RevokeRoleInput, SessionDTO, SessionExecution, SessionExecutionsResponse, SessionListItem, SessionTokenUsage, SortDirection, SortState, StaleDealSummaryItem, StatefulItem, StatusFilter, SubmitActionRequest, SubmitActionResponse, SubmitRequestInput, SystemHealthExecutionSummary, SystemHealthResponse, TaskSchedule, TopFailingResourcesParams, TransitionItemInput, TransitionListCompanyInput, TransitionListMemberInput, TransitionStateInput, UpdateClientRequest, UpdateContentItemRequest, UpdateListStatusInput, UpdateOrgRoleInput, UpdateScheduleInput, UseAccessResult, UseActivitiesParams, UseActivityTrendParams, UseArtifactsParams, UseBatchedResourcesHealthParams, UseExecuteResourceOptions, UseExecutionHealthParams, UseExecutionLogsParams, UseExecutionPanelStateOptions, UseExecutionPanelStateReturn, UseExecutionSSEOptions, UseExecutionSSEResult, UseInFlightExecutionsOptions, UseListProgressOptions, UseNotificationCountArgs, UseResourcesHealthParams, UseSSEConnectionOptions, UseScheduledTasksOptions, UseSystemHealthParams, UseWorkflowExecutionOptions, UseWorkflowExecutionResult, VerifyCredentialResponse, WebSocketState, WorkflowExecutionTriggerParams };