@elevasis/sdk 1.10.0 → 1.12.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 (40) hide show
  1. package/dist/cli.cjs +52 -149
  2. package/dist/index.d.ts +468 -198
  3. package/dist/index.js +225 -147
  4. package/dist/test-utils/index.d.ts +272 -99
  5. package/dist/test-utils/index.js +4756 -125
  6. package/dist/types/worker/adapters/llm.d.ts +1 -1
  7. package/dist/worker/index.js +14 -6
  8. package/package.json +2 -2
  9. package/reference/claude-config/rules/agent-start-here.md +14 -14
  10. package/reference/claude-config/skills/configure/SKILL.md +3 -3
  11. package/reference/claude-config/skills/setup/SKILL.md +6 -6
  12. package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -0
  13. package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +101 -0
  14. package/reference/cli.mdx +57 -0
  15. package/reference/deployment/provided-features.mdx +40 -267
  16. package/reference/examples/organization-model.ts +99 -564
  17. package/reference/packages/core/src/organization-model/README.md +102 -97
  18. package/reference/resources/types.mdx +72 -163
  19. package/reference/scaffold/core/organization-graph.mdx +92 -272
  20. package/reference/scaffold/core/organization-model.mdx +155 -320
  21. package/reference/scaffold/index.mdx +3 -0
  22. package/reference/scaffold/operations/propagation-pipeline.md +4 -1
  23. package/reference/scaffold/operations/scaffold-maintenance.md +3 -0
  24. package/reference/scaffold/operations/workflow-recipes.md +13 -10
  25. package/reference/scaffold/recipes/add-a-feature.md +105 -158
  26. package/reference/scaffold/recipes/add-a-resource.md +88 -158
  27. package/reference/scaffold/recipes/customize-organization-model.md +144 -400
  28. package/reference/scaffold/recipes/extend-a-base-entity.md +11 -8
  29. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +117 -158
  30. package/reference/scaffold/recipes/index.md +3 -0
  31. package/reference/scaffold/reference/contracts.md +107 -435
  32. package/reference/scaffold/reference/feature-registry.md +11 -8
  33. package/reference/scaffold/reference/glossary.md +74 -105
  34. package/reference/scaffold/ui/composition-extensibility.mdx +3 -0
  35. package/reference/scaffold/ui/customization.md +3 -0
  36. package/reference/scaffold/ui/feature-flags-and-gating.md +29 -231
  37. package/reference/scaffold/ui/feature-shell.mdx +53 -219
  38. package/reference/scaffold/ui/recipes.md +65 -397
  39. package/reference/claude-config/logs/pre-edit-vibe-gate.log +0 -40
  40. package/reference/claude-config/logs/scaffold-registry-reminder.log +0 -38
@@ -1289,7 +1289,6 @@ type Database = {
1289
1289
  acq_deals: {
1290
1290
  Row: {
1291
1291
  activity_log: Json;
1292
- cached_stage: string | null;
1293
1292
  closed_lost_at: string | null;
1294
1293
  closed_lost_reason: string | null;
1295
1294
  contact_email: string;
@@ -1304,6 +1303,7 @@ type Database = {
1304
1303
  organization_id: string;
1305
1304
  payment_link_sent_at: string | null;
1306
1305
  payment_received_at: string | null;
1306
+ pipeline_key: string;
1307
1307
  proposal_data: Json | null;
1308
1308
  proposal_generated_at: string | null;
1309
1309
  proposal_pdf_url: string | null;
@@ -1311,10 +1311,11 @@ type Database = {
1311
1311
  proposal_reviewed_by: string | null;
1312
1312
  proposal_sent_at: string | null;
1313
1313
  proposal_signed_at: string | null;
1314
- proposal_status: string | null;
1315
1314
  signature_envelope_id: string | null;
1316
1315
  source_list_id: string | null;
1317
1316
  source_type: string | null;
1317
+ stage_key: string | null;
1318
+ state_key: string | null;
1318
1319
  stripe_payment_id: string | null;
1319
1320
  stripe_payment_link: string | null;
1320
1321
  stripe_payment_link_id: string | null;
@@ -1323,7 +1324,6 @@ type Database = {
1323
1324
  };
1324
1325
  Insert: {
1325
1326
  activity_log?: Json;
1326
- cached_stage?: string | null;
1327
1327
  closed_lost_at?: string | null;
1328
1328
  closed_lost_reason?: string | null;
1329
1329
  contact_email: string;
@@ -1338,6 +1338,7 @@ type Database = {
1338
1338
  organization_id: string;
1339
1339
  payment_link_sent_at?: string | null;
1340
1340
  payment_received_at?: string | null;
1341
+ pipeline_key?: string;
1341
1342
  proposal_data?: Json | null;
1342
1343
  proposal_generated_at?: string | null;
1343
1344
  proposal_pdf_url?: string | null;
@@ -1345,10 +1346,11 @@ type Database = {
1345
1346
  proposal_reviewed_by?: string | null;
1346
1347
  proposal_sent_at?: string | null;
1347
1348
  proposal_signed_at?: string | null;
1348
- proposal_status?: string | null;
1349
1349
  signature_envelope_id?: string | null;
1350
1350
  source_list_id?: string | null;
1351
1351
  source_type?: string | null;
1352
+ stage_key?: string | null;
1353
+ state_key?: string | null;
1352
1354
  stripe_payment_id?: string | null;
1353
1355
  stripe_payment_link?: string | null;
1354
1356
  stripe_payment_link_id?: string | null;
@@ -1357,7 +1359,6 @@ type Database = {
1357
1359
  };
1358
1360
  Update: {
1359
1361
  activity_log?: Json;
1360
- cached_stage?: string | null;
1361
1362
  closed_lost_at?: string | null;
1362
1363
  closed_lost_reason?: string | null;
1363
1364
  contact_email?: string;
@@ -1372,6 +1373,7 @@ type Database = {
1372
1373
  organization_id?: string;
1373
1374
  payment_link_sent_at?: string | null;
1374
1375
  payment_received_at?: string | null;
1376
+ pipeline_key?: string;
1375
1377
  proposal_data?: Json | null;
1376
1378
  proposal_generated_at?: string | null;
1377
1379
  proposal_pdf_url?: string | null;
@@ -1379,10 +1381,11 @@ type Database = {
1379
1381
  proposal_reviewed_by?: string | null;
1380
1382
  proposal_sent_at?: string | null;
1381
1383
  proposal_signed_at?: string | null;
1382
- proposal_status?: string | null;
1383
1384
  signature_envelope_id?: string | null;
1384
1385
  source_list_id?: string | null;
1385
1386
  source_type?: string | null;
1387
+ stage_key?: string | null;
1388
+ state_key?: string | null;
1386
1389
  stripe_payment_id?: string | null;
1387
1390
  stripe_payment_link?: string | null;
1388
1391
  stripe_payment_link_id?: string | null;
@@ -2551,6 +2554,7 @@ type Database = {
2551
2554
  Row: {
2552
2555
  config: Json;
2553
2556
  created_at: string | null;
2557
+ effective_permissions: string[];
2554
2558
  id: string;
2555
2559
  membership_status: string | null;
2556
2560
  organization_id: string;
@@ -2562,6 +2566,7 @@ type Database = {
2562
2566
  Insert: {
2563
2567
  config?: Json;
2564
2568
  created_at?: string | null;
2569
+ effective_permissions?: string[];
2565
2570
  id?: string;
2566
2571
  membership_status?: string | null;
2567
2572
  organization_id: string;
@@ -2573,6 +2578,7 @@ type Database = {
2573
2578
  Update: {
2574
2579
  config?: Json;
2575
2580
  created_at?: string | null;
2581
+ effective_permissions?: string[];
2576
2582
  id?: string;
2577
2583
  membership_status?: string | null;
2578
2584
  organization_id?: string;
@@ -2598,6 +2604,147 @@ type Database = {
2598
2604
  }
2599
2605
  ];
2600
2606
  };
2607
+ org_rol_assignments: {
2608
+ Row: {
2609
+ granted_at: string;
2610
+ granted_by: string | null;
2611
+ membership_id: string;
2612
+ role_id: string;
2613
+ };
2614
+ Insert: {
2615
+ granted_at?: string;
2616
+ granted_by?: string | null;
2617
+ membership_id: string;
2618
+ role_id: string;
2619
+ };
2620
+ Update: {
2621
+ granted_at?: string;
2622
+ granted_by?: string | null;
2623
+ membership_id?: string;
2624
+ role_id?: string;
2625
+ };
2626
+ Relationships: [
2627
+ {
2628
+ foreignKeyName: "org_rol_assignments_granted_by_fkey";
2629
+ columns: ["granted_by"];
2630
+ isOneToOne: false;
2631
+ referencedRelation: "users";
2632
+ referencedColumns: ["id"];
2633
+ },
2634
+ {
2635
+ foreignKeyName: "org_rol_assignments_membership_id_fkey";
2636
+ columns: ["membership_id"];
2637
+ isOneToOne: false;
2638
+ referencedRelation: "org_memberships";
2639
+ referencedColumns: ["id"];
2640
+ },
2641
+ {
2642
+ foreignKeyName: "org_rol_assignments_role_id_fkey";
2643
+ columns: ["role_id"];
2644
+ isOneToOne: false;
2645
+ referencedRelation: "org_rol_definitions";
2646
+ referencedColumns: ["id"];
2647
+ }
2648
+ ];
2649
+ };
2650
+ org_rol_definitions: {
2651
+ Row: {
2652
+ created_at: string;
2653
+ description: string | null;
2654
+ id: string;
2655
+ is_system: boolean;
2656
+ name: string;
2657
+ organization_id: string | null;
2658
+ slug: string;
2659
+ updated_at: string;
2660
+ };
2661
+ Insert: {
2662
+ created_at?: string;
2663
+ description?: string | null;
2664
+ id?: string;
2665
+ is_system?: boolean;
2666
+ name: string;
2667
+ organization_id?: string | null;
2668
+ slug: string;
2669
+ updated_at?: string;
2670
+ };
2671
+ Update: {
2672
+ created_at?: string;
2673
+ description?: string | null;
2674
+ id?: string;
2675
+ is_system?: boolean;
2676
+ name?: string;
2677
+ organization_id?: string | null;
2678
+ slug?: string;
2679
+ updated_at?: string;
2680
+ };
2681
+ Relationships: [
2682
+ {
2683
+ foreignKeyName: "org_rol_definitions_organization_id_fkey";
2684
+ columns: ["organization_id"];
2685
+ isOneToOne: false;
2686
+ referencedRelation: "organizations";
2687
+ referencedColumns: ["id"];
2688
+ }
2689
+ ];
2690
+ };
2691
+ org_rol_grants: {
2692
+ Row: {
2693
+ granted_at: string;
2694
+ permission_key: string;
2695
+ role_id: string;
2696
+ };
2697
+ Insert: {
2698
+ granted_at?: string;
2699
+ permission_key: string;
2700
+ role_id: string;
2701
+ };
2702
+ Update: {
2703
+ granted_at?: string;
2704
+ permission_key?: string;
2705
+ role_id?: string;
2706
+ };
2707
+ Relationships: [
2708
+ {
2709
+ foreignKeyName: "org_rol_grants_permission_key_fkey";
2710
+ columns: ["permission_key"];
2711
+ isOneToOne: false;
2712
+ referencedRelation: "org_rol_permissions";
2713
+ referencedColumns: ["key"];
2714
+ },
2715
+ {
2716
+ foreignKeyName: "org_rol_grants_role_id_fkey";
2717
+ columns: ["role_id"];
2718
+ isOneToOne: false;
2719
+ referencedRelation: "org_rol_definitions";
2720
+ referencedColumns: ["id"];
2721
+ }
2722
+ ];
2723
+ };
2724
+ org_rol_permissions: {
2725
+ Row: {
2726
+ created_at: string;
2727
+ description: string;
2728
+ is_org_grantable: boolean;
2729
+ key: string;
2730
+ updated_at: string;
2731
+ };
2732
+ Insert: {
2733
+ created_at?: string;
2734
+ description: string;
2735
+ is_org_grantable?: boolean;
2736
+ key: string;
2737
+ updated_at?: string;
2738
+ };
2739
+ Update: {
2740
+ created_at?: string;
2741
+ description?: string;
2742
+ is_org_grantable?: boolean;
2743
+ key?: string;
2744
+ updated_at?: string;
2745
+ };
2746
+ Relationships: [];
2747
+ };
2601
2748
  organizations: {
2602
2749
  Row: {
2603
2750
  config: Json;
@@ -3355,7 +3502,8 @@ type Database = {
3355
3502
  created_at: string;
3356
3503
  description: string | null;
3357
3504
  id: string;
3358
- key: string;
3505
+ key_hash: string;
3506
+ key_prefix: string | null;
3359
3507
  last_triggered_at: string | null;
3360
3508
  name: string;
3361
3509
  organization_id: string;
@@ -3368,7 +3516,8 @@ type Database = {
3368
3516
  created_at?: string;
3369
3517
  description?: string | null;
3370
3518
  id?: string;
3371
- key: string;
3519
+ key_hash: string;
3520
+ key_prefix?: string | null;
3372
3521
  last_triggered_at?: string | null;
3373
3522
  name: string;
3374
3523
  organization_id: string;
@@ -3381,7 +3530,8 @@ type Database = {
3381
3530
  created_at?: string;
3382
3531
  description?: string | null;
3383
3532
  id?: string;
3384
- key?: string;
3533
+ key_hash?: string;
3534
+ key_prefix?: string | null;
3385
3535
  last_triggered_at?: string | null;
3386
3536
  name?: string;
3387
3537
  organization_id?: string;
@@ -3427,6 +3577,13 @@ type Database = {
3427
3577
  Args: never;
3428
3578
  Returns: string;
3429
3579
  };
3580
+ can_assign_role_in_org: {
3581
+ Args: {
3582
+ p_role_id: string;
3583
+ p_target_membership_id: string;
3584
+ };
3585
+ Returns: boolean;
3586
+ };
3430
3587
  current_user_is_platform_admin: {
3431
3588
  Args: never;
3432
3589
  Returns: boolean;
@@ -3456,6 +3613,10 @@ type Database = {
3456
3613
  user_id: string;
3457
3614
  }[];
3458
3615
  };
3616
+ get_platform_credential_kek: {
3617
+ Args: never;
3618
+ Returns: string;
3619
+ };
3459
3620
  get_storage_org_id: {
3460
3621
  Args: {
3461
3622
  file_path: string;
@@ -3466,9 +3627,10 @@ type Database = {
3466
3627
  Args: never;
3467
3628
  Returns: string;
3468
3629
  };
3469
- is_org_admin: {
3630
+ has_org_permission: {
3470
3631
  Args: {
3471
3632
  org_id: string;
3633
+ perm_key: string;
3472
3634
  };
3473
3635
  Returns: boolean;
3474
3636
  };
@@ -3498,6 +3660,22 @@ type Database = {
3498
3660
  Args: never;
3499
3661
  Returns: Json;
3500
3662
  };
3663
+ recompute_all_memberships: {
3664
+ Args: never;
3665
+ Returns: undefined;
3666
+ };
3667
+ sync_all_memberships_with_role: {
3668
+ Args: {
3669
+ p_role_id: string;
3670
+ };
3671
+ Returns: undefined;
3672
+ };
3673
+ sync_one_membership: {
3674
+ Args: {
3675
+ p_membership_id: string;
3676
+ };
3677
+ Returns: undefined;
3678
+ };
3501
3679
  upsert_user_profile: {
3502
3680
  Args: never;
3503
3681
  Returns: {
@@ -3957,7 +4135,6 @@ interface UpdateProposalDataParams {
3957
4135
  contactEmail: string;
3958
4136
  proposalData: unknown;
3959
4137
  proposalPdfUrl?: string;
3960
- proposalStatus?: string;
3961
4138
  }
3962
4139
  interface MarkProposalSentParams {
3963
4140
  organizationId: string;
@@ -3981,10 +4158,14 @@ interface UpdateFeesParams {
3981
4158
  initialFee?: number;
3982
4159
  monthlyFee?: number;
3983
4160
  }
3984
- interface SyncDealStageParams {
4161
+ interface TransitionItemParams {
3985
4162
  organizationId: string;
3986
4163
  dealId: string;
3987
- stage: string;
4164
+ pipelineKey: string;
4165
+ stageKey: string;
4166
+ stateKey?: string | null;
4167
+ reason?: string;
4168
+ expectedUpdatedAt?: string;
3988
4169
  }
3989
4170
  interface SetContactNurtureParams {
3990
4171
  organizationId: string;
@@ -4003,7 +4184,7 @@ interface ClearDealFieldsParams {
4003
4184
  organizationId: string;
4004
4185
  contactEmail?: string;
4005
4186
  dealId?: string;
4006
- fields: ('proposalPdfUrl' | 'proposalStatus' | 'proposalGeneratedAt' | 'initialFee' | 'monthlyFee' | 'closedLostReason' | 'closedLostAt' | 'discoveryData' | 'discoverySubmittedAt')[];
4187
+ fields: ('proposalPdfUrl' | 'proposalGeneratedAt' | 'initialFee' | 'monthlyFee' | 'closedLostReason' | 'closedLostAt' | 'discoveryData' | 'discoverySubmittedAt')[];
4007
4188
  }
4008
4189
  interface DeleteDealParams {
4009
4190
  organizationId: string;
@@ -4049,10 +4230,11 @@ interface AcqDeal {
4049
4230
  id: string;
4050
4231
  organizationId: string;
4051
4232
  contactEmail: string;
4052
- cachedStage?: string | null;
4233
+ pipelineKey: string;
4234
+ stageKey?: string | null;
4235
+ stateKey?: string | null;
4053
4236
  discoveryData?: Json | null;
4054
4237
  proposalData?: Json | null;
4055
- proposalStatus?: string | null;
4056
4238
  proposalSentAt?: string | null;
4057
4239
  proposalPdfUrl?: string | null;
4058
4240
  signatureEnvelopeId?: string | null;
@@ -4130,7 +4312,7 @@ interface DealStageSummary {
4130
4312
  interface StaleDeal {
4131
4313
  id: string;
4132
4314
  contactEmail: string;
4133
- cachedStage: string;
4315
+ stageKey: string;
4134
4316
  updatedAt: string;
4135
4317
  daysStale: number;
4136
4318
  }
@@ -4339,12 +4521,12 @@ declare const DealSchemas: {
4339
4521
  }, z.core.$strip>;
4340
4522
  ListDealsQuery: z.ZodObject<{
4341
4523
  stage: z.ZodOptional<z.ZodEnum<{
4524
+ nurturing: "nurturing";
4525
+ closed_won: "closed_won";
4526
+ closed_lost: "closed_lost";
4342
4527
  interested: "interested";
4343
4528
  proposal: "proposal";
4344
4529
  closing: "closing";
4345
- closed_won: "closed_won";
4346
- closed_lost: "closed_lost";
4347
- nurturing: "nurturing";
4348
4530
  }>>;
4349
4531
  search: z.ZodOptional<z.ZodString>;
4350
4532
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -4356,10 +4538,10 @@ declare const DealSchemas: {
4356
4538
  }, z.core.$strict>;
4357
4539
  ListDealTasksDueQuery: z.ZodObject<{
4358
4540
  window: z.ZodOptional<z.ZodEnum<{
4541
+ upcoming: "upcoming";
4359
4542
  overdue: "overdue";
4360
4543
  today: "today";
4361
4544
  today_and_overdue: "today_and_overdue";
4362
- upcoming: "upcoming";
4363
4545
  }>>;
4364
4546
  assigneeUserId: z.ZodOptional<z.ZodString>;
4365
4547
  }, z.core.$strict>;
@@ -4378,15 +4560,12 @@ declare const DealSchemas: {
4378
4560
  dueAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4379
4561
  assigneeUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4380
4562
  }, z.core.$strict>;
4381
- SyncDealStageRequest: z.ZodObject<{
4382
- stage: z.ZodEnum<{
4383
- interested: "interested";
4384
- proposal: "proposal";
4385
- closing: "closing";
4386
- closed_won: "closed_won";
4387
- closed_lost: "closed_lost";
4388
- nurturing: "nurturing";
4389
- }>;
4563
+ TransitionItemRequest: z.ZodObject<{
4564
+ pipelineKey: z.ZodString;
4565
+ stageKey: z.ZodString;
4566
+ stateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4567
+ reason: z.ZodOptional<z.ZodString>;
4568
+ expectedUpdatedAt: z.ZodOptional<z.ZodString>;
4390
4569
  }, z.core.$strict>;
4391
4570
  DealListResponse: z.ZodObject<{
4392
4571
  data: z.ZodArray<z.ZodObject<{
@@ -4394,13 +4573,14 @@ declare const DealSchemas: {
4394
4573
  organization_id: z.ZodString;
4395
4574
  contact_id: z.ZodNullable<z.ZodString>;
4396
4575
  contact_email: z.ZodString;
4397
- cached_stage: z.ZodNullable<z.ZodString>;
4576
+ pipeline_key: z.ZodString;
4577
+ stage_key: z.ZodNullable<z.ZodString>;
4578
+ state_key: z.ZodNullable<z.ZodString>;
4398
4579
  activity_log: z.ZodUnknown;
4399
4580
  discovery_data: z.ZodNullable<z.ZodUnknown>;
4400
4581
  discovery_submitted_at: z.ZodNullable<z.ZodString>;
4401
4582
  discovery_submitted_by: z.ZodNullable<z.ZodString>;
4402
4583
  proposal_data: z.ZodNullable<z.ZodUnknown>;
4403
- proposal_status: z.ZodNullable<z.ZodString>;
4404
4584
  proposal_sent_at: z.ZodNullable<z.ZodString>;
4405
4585
  proposal_pdf_url: z.ZodNullable<z.ZodString>;
4406
4586
  signature_envelope_id: z.ZodNullable<z.ZodString>;
@@ -4455,7 +4635,7 @@ declare const DealSchemas: {
4455
4635
  staleDeals: z.ZodArray<z.ZodObject<{
4456
4636
  id: z.ZodString;
4457
4637
  contactEmail: z.ZodString;
4458
- cachedStage: z.ZodString;
4638
+ stageKey: z.ZodString;
4459
4639
  updatedAt: z.ZodString;
4460
4640
  daysStale: z.ZodNumber;
4461
4641
  }, z.core.$strip>>;
@@ -4463,7 +4643,7 @@ declare const DealSchemas: {
4463
4643
  DealLookupResponse: z.ZodArray<z.ZodObject<{
4464
4644
  id: z.ZodString;
4465
4645
  contactEmail: z.ZodString;
4466
- cachedStage: z.ZodNullable<z.ZodString>;
4646
+ stageKey: z.ZodNullable<z.ZodString>;
4467
4647
  updatedAt: z.ZodString;
4468
4648
  contactName: z.ZodNullable<z.ZodString>;
4469
4649
  companyName: z.ZodNullable<z.ZodString>;
@@ -4474,13 +4654,14 @@ declare const DealSchemas: {
4474
4654
  organization_id: z.ZodString;
4475
4655
  contact_id: z.ZodNullable<z.ZodString>;
4476
4656
  contact_email: z.ZodString;
4477
- cached_stage: z.ZodNullable<z.ZodString>;
4657
+ pipeline_key: z.ZodString;
4658
+ stage_key: z.ZodNullable<z.ZodString>;
4659
+ state_key: z.ZodNullable<z.ZodString>;
4478
4660
  activity_log: z.ZodUnknown;
4479
4661
  discovery_data: z.ZodNullable<z.ZodUnknown>;
4480
4662
  discovery_submitted_at: z.ZodNullable<z.ZodString>;
4481
4663
  discovery_submitted_by: z.ZodNullable<z.ZodString>;
4482
4664
  proposal_data: z.ZodNullable<z.ZodUnknown>;
4483
- proposal_status: z.ZodNullable<z.ZodString>;
4484
4665
  proposal_sent_at: z.ZodNullable<z.ZodString>;
4485
4666
  proposal_pdf_url: z.ZodNullable<z.ZodString>;
4486
4667
  signature_envelope_id: z.ZodNullable<z.ZodString>;
@@ -6279,18 +6460,18 @@ declare const ProjectSchemas: {
6279
6460
  CreateProjectRequest: z.ZodObject<{
6280
6461
  name: z.ZodString;
6281
6462
  kind: z.ZodEnum<{
6463
+ internal: "internal";
6282
6464
  other: "other";
6283
6465
  client_engagement: "client_engagement";
6284
- internal: "internal";
6285
6466
  research: "research";
6286
6467
  }>;
6287
6468
  status: z.ZodOptional<z.ZodEnum<{
6288
- completed: "completed";
6289
6469
  active: "active";
6290
- paused: "paused";
6291
6470
  on_track: "on_track";
6292
6471
  at_risk: "at_risk";
6293
6472
  blocked: "blocked";
6473
+ paused: "paused";
6474
+ completed: "completed";
6294
6475
  }>>;
6295
6476
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6296
6477
  deal_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -6303,18 +6484,18 @@ declare const ProjectSchemas: {
6303
6484
  UpdateProjectRequest: z.ZodObject<{
6304
6485
  name: z.ZodOptional<z.ZodString>;
6305
6486
  kind: z.ZodOptional<z.ZodEnum<{
6487
+ internal: "internal";
6306
6488
  other: "other";
6307
6489
  client_engagement: "client_engagement";
6308
- internal: "internal";
6309
6490
  research: "research";
6310
6491
  }>>;
6311
6492
  status: z.ZodOptional<z.ZodEnum<{
6312
- completed: "completed";
6313
6493
  active: "active";
6314
- paused: "paused";
6315
6494
  on_track: "on_track";
6316
6495
  at_risk: "at_risk";
6317
6496
  blocked: "blocked";
6497
+ paused: "paused";
6498
+ completed: "completed";
6318
6499
  }>>;
6319
6500
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6320
6501
  deal_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -6327,18 +6508,18 @@ declare const ProjectSchemas: {
6327
6508
  }, z.core.$strict>;
6328
6509
  GetProjectsQuery: z.ZodObject<{
6329
6510
  kind: z.ZodOptional<z.ZodEnum<{
6511
+ internal: "internal";
6330
6512
  other: "other";
6331
6513
  client_engagement: "client_engagement";
6332
- internal: "internal";
6333
6514
  research: "research";
6334
6515
  }>>;
6335
6516
  status: z.ZodOptional<z.ZodEnum<{
6336
- completed: "completed";
6337
6517
  active: "active";
6338
- paused: "paused";
6339
6518
  on_track: "on_track";
6340
6519
  at_risk: "at_risk";
6341
6520
  blocked: "blocked";
6521
+ paused: "paused";
6522
+ completed: "completed";
6342
6523
  }>>;
6343
6524
  search: z.ZodOptional<z.ZodString>;
6344
6525
  }, z.core.$strict>;
@@ -6348,11 +6529,11 @@ declare const ProjectSchemas: {
6348
6529
  CreateMilestoneRequest: z.ZodObject<{
6349
6530
  name: z.ZodString;
6350
6531
  status: z.ZodOptional<z.ZodEnum<{
6532
+ blocked: "blocked";
6351
6533
  completed: "completed";
6352
- overdue: "overdue";
6353
6534
  upcoming: "upcoming";
6354
- blocked: "blocked";
6355
6535
  in_progress: "in_progress";
6536
+ overdue: "overdue";
6356
6537
  }>>;
6357
6538
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6358
6539
  due_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -6362,11 +6543,11 @@ declare const ProjectSchemas: {
6362
6543
  UpdateMilestoneRequest: z.ZodObject<{
6363
6544
  name: z.ZodOptional<z.ZodString>;
6364
6545
  status: z.ZodOptional<z.ZodEnum<{
6546
+ blocked: "blocked";
6365
6547
  completed: "completed";
6366
- overdue: "overdue";
6367
6548
  upcoming: "upcoming";
6368
- blocked: "blocked";
6369
6549
  in_progress: "in_progress";
6550
+ overdue: "overdue";
6370
6551
  }>>;
6371
6552
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6372
6553
  due_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -6390,25 +6571,25 @@ declare const ProjectSchemas: {
6390
6571
  name: z.ZodString;
6391
6572
  type: z.ZodOptional<z.ZodEnum<{
6392
6573
  code: "code";
6574
+ feature: "feature";
6393
6575
  other: "other";
6394
6576
  research: "research";
6395
6577
  documentation: "documentation";
6396
6578
  report: "report";
6397
6579
  design: "design";
6398
6580
  refactor: "refactor";
6399
- feature: "feature";
6400
6581
  bug: "bug";
6401
6582
  }>>;
6402
6583
  status: z.ZodOptional<z.ZodEnum<{
6403
- completed: "completed";
6404
- cancelled: "cancelled";
6405
6584
  blocked: "blocked";
6585
+ completed: "completed";
6406
6586
  in_progress: "in_progress";
6407
6587
  planned: "planned";
6408
6588
  submitted: "submitted";
6409
6589
  approved: "approved";
6410
- rejected: "rejected";
6411
6590
  revision_requested: "revision_requested";
6591
+ rejected: "rejected";
6592
+ cancelled: "cancelled";
6412
6593
  }>>;
6413
6594
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6414
6595
  milestone_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -6426,25 +6607,25 @@ declare const ProjectSchemas: {
6426
6607
  name: z.ZodOptional<z.ZodString>;
6427
6608
  type: z.ZodOptional<z.ZodEnum<{
6428
6609
  code: "code";
6610
+ feature: "feature";
6429
6611
  other: "other";
6430
6612
  research: "research";
6431
6613
  documentation: "documentation";
6432
6614
  report: "report";
6433
6615
  design: "design";
6434
6616
  refactor: "refactor";
6435
- feature: "feature";
6436
6617
  bug: "bug";
6437
6618
  }>>;
6438
6619
  status: z.ZodOptional<z.ZodEnum<{
6439
- completed: "completed";
6440
- cancelled: "cancelled";
6441
6620
  blocked: "blocked";
6621
+ completed: "completed";
6442
6622
  in_progress: "in_progress";
6443
6623
  planned: "planned";
6444
6624
  submitted: "submitted";
6445
6625
  approved: "approved";
6446
- rejected: "rejected";
6447
6626
  revision_requested: "revision_requested";
6627
+ rejected: "rejected";
6628
+ cancelled: "cancelled";
6448
6629
  }>>;
6449
6630
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6450
6631
  milestone_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -6463,15 +6644,15 @@ declare const ProjectSchemas: {
6463
6644
  MergeResumeContextRequest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
6464
6645
  GetTasksQuery: z.ZodObject<{
6465
6646
  status: z.ZodOptional<z.ZodEnum<{
6466
- completed: "completed";
6467
- cancelled: "cancelled";
6468
6647
  blocked: "blocked";
6648
+ completed: "completed";
6469
6649
  in_progress: "in_progress";
6470
6650
  planned: "planned";
6471
6651
  submitted: "submitted";
6472
6652
  approved: "approved";
6473
- rejected: "rejected";
6474
6653
  revision_requested: "revision_requested";
6654
+ rejected: "rejected";
6655
+ cancelled: "cancelled";
6475
6656
  }>>;
6476
6657
  milestone_id: z.ZodOptional<z.ZodString>;
6477
6658
  parent_task_id: z.ZodOptional<z.ZodString>;
@@ -6769,7 +6950,6 @@ type ProjectsToolMap = {
6769
6950
  type CrmRecentActivityParams = Partial<z.infer<typeof CrmSchemas.GetRecentActivityQuery>>;
6770
6951
  type CrmListDealsParams = Partial<z.infer<typeof DealSchemas.ListDealsQuery>>;
6771
6952
  type CrmGetDealParams = z.infer<typeof DealSchemas.DealIdParams>;
6772
- type CrmUpdateDealStageParams = z.infer<typeof DealSchemas.DealIdParams> & z.infer<typeof DealSchemas.SyncDealStageRequest>;
6773
6953
  type CrmGetDealByEmailParams = {
6774
6954
  email: string;
6775
6955
  };
@@ -6795,10 +6975,6 @@ type CrmToolMap = {
6795
6975
  params: CrmGetDealByEmailParams;
6796
6976
  result: DealDetail | null;
6797
6977
  };
6798
- updateDealStage: {
6799
- params: CrmUpdateDealStageParams;
6800
- result: void;
6801
- };
6802
6978
  createDealNote: {
6803
6979
  params: CrmDealNoteParams;
6804
6980
  result: AcqDealNote;
@@ -7275,8 +7451,8 @@ type LeadToolMap = {
7275
7451
  params: Omit<UpdateFeesParams, 'organizationId'>;
7276
7452
  result: void;
7277
7453
  };
7278
- syncDealStage: {
7279
- params: Omit<SyncDealStageParams, 'organizationId'>;
7454
+ transitionItem: {
7455
+ params: Omit<TransitionItemParams, 'organizationId'>;
7280
7456
  result: void;
7281
7457
  };
7282
7458
  setContactNurture: {
@@ -7794,8 +7970,10 @@ interface ResourceDefinition {
7794
7970
  type: ResourceType;
7795
7971
  /** Environment/deployment status */
7796
7972
  status: ResourceStatus;
7797
- /** Domain tags for filtering and organization */
7798
- domains?: ResourceDomain[];
7973
+ /** Graph links to Organization Model nodes */
7974
+ links?: ResourceLink[];
7975
+ /** Infrastructure category for filtering */
7976
+ category?: ResourceCategory;
7799
7977
  /** Whether the agent supports multi-turn sessions (agents only) */
7800
7978
  sessionCapable?: boolean;
7801
7979
  /** Whether the resource is local (monorepo) or remote (externally deployed) */
@@ -7839,7 +8017,7 @@ type TriggerConfig = WebhookTriggerConfig | ScheduleTriggerConfig | EventTrigger
7839
8017
  * scheduled cron jobs, platform events, or manual user actions.
7840
8018
  *
7841
8019
  * BREAKING CHANGES (2025-11-30):
7842
- * - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
8020
+ * - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
7843
8021
  * - Field renames: `id` -> `resourceId` (inherited), `type` -> `triggerType`
7844
8022
  * - Relationship rename: `invokes` -> `triggers` (unified vocabulary)
7845
8023
  * - New required fields: `version` (inherited), `type: 'trigger'` (inherited)
@@ -7884,7 +8062,7 @@ interface TriggerDefinition extends ResourceDefinition {
7884
8062
  * stored here (queried at runtime from credentials table).
7885
8063
  *
7886
8064
  * BREAKING CHANGES (2025-11-30):
7887
- * - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
8065
+ * - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
7888
8066
  * - Field renames: `id` -> `resourceId` (inherited)
7889
8067
  * - New required field: `status` (inherited) - organizations must add status to all integrations
7890
8068
  * - New required field: `version` (inherited) - organizations must add version to all integrations
@@ -7964,7 +8142,7 @@ type ExternalPlatform = 'n8n' | 'make' | 'zapier' | 'other';
7964
8142
  * no API integration with external platforms, no status syncing.
7965
8143
  *
7966
8144
  * BREAKING CHANGES (2025-11-30):
7967
- * - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
8145
+ * - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
7968
8146
  * - Field renames: `id` -> `resourceId` (inherited)
7969
8147
  * - New required field: `version` (inherited) - organizations must add version to all external resources
7970
8148
  * - New required field: `type: 'external'` (inherited) - resource type discriminator
@@ -8013,7 +8191,7 @@ interface ExternalResourceDefinition extends ResourceDefinition {
8013
8191
  * Tasks with matching command_queue_group are routed to this checkpoint.
8014
8192
  *
8015
8193
  * BREAKING CHANGES (2025-11-30):
8016
- * - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, domains)
8194
+ * - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
8017
8195
  * - Field renames: `id` -> `resourceId` (inherited)
8018
8196
  * - description is now REQUIRED (was optional) - organizations must add description to all human checkpoints
8019
8197
  * - New required field: `version` (inherited) - organizations must add version to all human checkpoints
@@ -8050,32 +8228,27 @@ interface HumanCheckpointDefinition extends ResourceDefinition {
8050
8228
  };
8051
8229
  }
8052
8230
 
8053
- /**
8054
- * Standard Domain Definitions
8055
- * Centralized domain constants and definitions for all organization resources.
8056
- */
8231
+ declare const LinkSchema: z.ZodObject<{
8232
+ nodeId: z.ZodString;
8233
+ kind: z.ZodEnum<{
8234
+ contains: "contains";
8235
+ references: "references";
8236
+ exposes: "exposes";
8237
+ maps_to: "maps_to";
8238
+ "operates-on": "operates-on";
8239
+ uses: "uses";
8240
+ }>;
8241
+ }, z.core.$strip>;
8242
+ type Link = z.infer<typeof LinkSchema>;
8057
8243
 
8058
- declare const DOMAINS: {
8059
- readonly INBOUND_PIPELINE: "inbound-pipeline";
8060
- readonly LEAD_GEN_PIPELINE: "lead-gen-pipeline";
8061
- readonly SUPPORT: "support";
8062
- readonly CLIENT_SUPPORT: "client-support";
8063
- readonly DELIVERY: "delivery";
8064
- readonly OPERATIONS: "operations";
8065
- readonly FINANCE: "finance";
8066
- readonly EXECUTIVE: "executive";
8067
- readonly INSTANTLY: "instantly";
8068
- readonly TESTING: "testing";
8069
- readonly INTERNAL: "internal";
8070
- readonly INTEGRATION: "integration";
8071
- readonly UTILITY: "utility";
8072
- readonly DIAGNOSTIC: "diagnostic";
8073
- };
8074
- /**
8075
- * ResourceDomain - Strongly typed domain identifier
8076
- * Use this type for all domain references to ensure compile-time validation.
8077
- */
8078
- type ResourceDomain = (typeof DOMAINS)[keyof typeof DOMAINS];
8244
+ declare const ResourceCategorySchema: z.ZodEnum<{
8245
+ production: "production";
8246
+ diagnostic: "diagnostic";
8247
+ internal: "internal";
8248
+ testing: "testing";
8249
+ }>;
8250
+ type ResourceCategory = z.infer<typeof ResourceCategorySchema>;
8251
+ type ResourceLink = Link;
8079
8252
 
8080
8253
  /**
8081
8254
  * ResourceRegistry - Resource discovery and lookup
@@ -8119,7 +8292,7 @@ interface DeploymentSpec {
8119
8292
  * Typed wrapper over platform.call() for LLM generation.
8120
8293
  * Singleton export -- no credential needed (platform tool).
8121
8294
  *
8122
- * Types are shared with the server-side LLM engine via @repo/core/execution.
8295
+ * Types are shared with the server-side LLM engine and inlined for SDK consumers.
8123
8296
  */
8124
8297
 
8125
8298
  type LLMProvider = 'openai' | 'anthropic' | 'openrouter' | 'google';