@elevasis/sdk 1.20.2 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cli.cjs +3386 -1529
  2. package/dist/index.d.ts +412 -149
  3. package/dist/index.js +955 -721
  4. package/dist/node/index.d.ts +0 -3
  5. package/dist/node/index.js +21 -48
  6. package/dist/test-utils/index.d.ts +395 -128
  7. package/dist/test-utils/index.js +599 -368
  8. package/dist/worker/index.js +536 -323
  9. package/package.json +2 -2
  10. package/reference/_navigation.md +9 -7
  11. package/reference/_reference-manifest.json +1 -1
  12. package/reference/claude-config/rules/agent-start-here.md +4 -0
  13. package/reference/claude-config/rules/frontend.md +2 -2
  14. package/reference/claude-config/rules/organization-model.md +44 -2
  15. package/reference/claude-config/rules/organization-os.md +12 -12
  16. package/reference/claude-config/rules/ui.md +14 -14
  17. package/reference/claude-config/rules/vibe.md +37 -33
  18. package/reference/claude-config/skills/explore/SKILL.md +6 -6
  19. package/reference/claude-config/skills/knowledge/SKILL.md +73 -29
  20. package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +1 -1
  21. package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +25 -24
  22. package/reference/claude-config/skills/knowledge/operations/features.md +56 -93
  23. package/reference/claude-config/skills/knowledge/operations/labels.md +19 -14
  24. package/reference/claude-config/skills/knowledge/operations/offerings.md +6 -6
  25. package/reference/claude-config/skills/save/SKILL.md +2 -2
  26. package/reference/claude-config/skills/setup/SKILL.md +1 -1
  27. package/reference/claude-config/skills/tutorial/technical.md +23 -26
  28. package/reference/claude-config/skills/tutorial/vibe-coder.md +9 -9
  29. package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -0
  30. package/reference/cli.mdx +140 -0
  31. package/reference/deployment/provided-features.mdx +29 -15
  32. package/reference/examples/organization-model.ts +1 -1
  33. package/reference/packages/core/src/knowledge/README.md +8 -7
  34. package/reference/packages/core/src/organization-model/README.md +66 -26
  35. package/reference/packages/ui/src/provider/README.md +5 -5
  36. package/reference/scaffold/core/organization-graph.mdx +16 -15
  37. package/reference/scaffold/core/organization-model.mdx +89 -41
  38. package/reference/scaffold/index.mdx +9 -9
  39. package/reference/scaffold/operations/propagation-pipeline.md +3 -3
  40. package/reference/scaffold/operations/scaffold-maintenance.md +11 -11
  41. package/reference/scaffold/recipes/add-a-feature.md +26 -24
  42. package/reference/scaffold/recipes/add-a-resource.md +10 -14
  43. package/reference/scaffold/recipes/customize-crm-actions.md +439 -439
  44. package/reference/scaffold/recipes/customize-knowledge-browser.md +384 -0
  45. package/reference/scaffold/recipes/customize-organization-model.md +72 -44
  46. package/reference/scaffold/recipes/extend-crm.md +40 -39
  47. package/reference/scaffold/recipes/extend-lead-gen.md +15 -16
  48. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +34 -30
  49. package/reference/scaffold/recipes/index.md +13 -12
  50. package/reference/scaffold/recipes/query-the-knowledge-graph.md +200 -0
  51. package/reference/scaffold/reference/contracts.md +362 -99
  52. package/reference/scaffold/reference/feature-registry.md +9 -20
  53. package/reference/scaffold/reference/glossary.md +18 -18
  54. package/reference/scaffold/ui/composition-extensibility.mdx +23 -23
  55. package/reference/scaffold/ui/customization.md +11 -11
  56. package/reference/scaffold/ui/feature-flags-and-gating.md +8 -8
  57. package/reference/scaffold/ui/feature-shell.mdx +19 -19
  58. package/reference/scaffold/ui/recipes.md +29 -28
@@ -336,125 +336,312 @@ interface ModelConfig {
336
336
  }
337
337
 
338
338
  declare const ResourceGovernanceStatusSchema: z.ZodEnum<{
339
- active: "active";
340
339
  deprecated: "deprecated";
340
+ active: "active";
341
341
  archived: "archived";
342
342
  }>;
343
343
  declare const WorkflowResourceEntrySchema: z.ZodObject<{
344
344
  id: z.ZodString;
345
- systemId: z.ZodString;
345
+ order: z.ZodDefault<z.ZodNumber>;
346
+ systemPath: z.ZodString;
346
347
  ownerRoleId: z.ZodOptional<z.ZodString>;
347
348
  status: z.ZodEnum<{
348
- active: "active";
349
349
  deprecated: "deprecated";
350
+ active: "active";
350
351
  archived: "archived";
351
352
  }>;
352
353
  kind: z.ZodLiteral<"workflow">;
353
- capabilityKey: z.ZodOptional<z.ZodString>;
354
+ actionKey: z.ZodOptional<z.ZodString>;
355
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
356
+ eventKey: z.ZodString;
357
+ label: z.ZodString;
358
+ payloadSchema: z.ZodOptional<z.ZodString>;
359
+ lifecycle: z.ZodOptional<z.ZodEnum<{
360
+ deprecated: "deprecated";
361
+ draft: "draft";
362
+ beta: "beta";
363
+ active: "active";
364
+ archived: "archived";
365
+ }>>;
366
+ }, z.core.$strip>>>;
354
367
  }, z.core.$strip>;
355
368
  declare const AgentResourceEntrySchema: z.ZodObject<{
356
369
  id: z.ZodString;
357
- systemId: z.ZodString;
370
+ order: z.ZodDefault<z.ZodNumber>;
371
+ systemPath: z.ZodString;
358
372
  ownerRoleId: z.ZodOptional<z.ZodString>;
359
373
  status: z.ZodEnum<{
360
- active: "active";
361
374
  deprecated: "deprecated";
375
+ active: "active";
362
376
  archived: "archived";
363
377
  }>;
364
378
  kind: z.ZodLiteral<"agent">;
365
379
  agentKind: z.ZodEnum<{
380
+ platform: "platform";
366
381
  orchestrator: "orchestrator";
367
382
  specialist: "specialist";
368
383
  utility: "utility";
369
- system: "system";
370
384
  }>;
371
385
  actsAsRoleId: z.ZodOptional<z.ZodString>;
372
386
  sessionCapable: z.ZodBoolean;
387
+ invocations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
388
+ kind: z.ZodLiteral<"slash-command">;
389
+ command: z.ZodString;
390
+ toolFactory: z.ZodOptional<z.ZodString>;
391
+ }, z.core.$strip>, z.ZodObject<{
392
+ kind: z.ZodLiteral<"mcp-tool">;
393
+ server: z.ZodString;
394
+ name: z.ZodString;
395
+ }, z.core.$strip>, z.ZodObject<{
396
+ kind: z.ZodLiteral<"api-endpoint">;
397
+ method: z.ZodEnum<{
398
+ GET: "GET";
399
+ POST: "POST";
400
+ PATCH: "PATCH";
401
+ DELETE: "DELETE";
402
+ }>;
403
+ path: z.ZodString;
404
+ requestSchema: z.ZodOptional<z.ZodString>;
405
+ responseSchema: z.ZodOptional<z.ZodString>;
406
+ }, z.core.$strip>, z.ZodObject<{
407
+ kind: z.ZodLiteral<"script-execution">;
408
+ resourceId: z.ZodString;
409
+ }, z.core.$strip>], "kind">>>;
410
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
411
+ eventKey: z.ZodString;
412
+ label: z.ZodString;
413
+ payloadSchema: z.ZodOptional<z.ZodString>;
414
+ lifecycle: z.ZodOptional<z.ZodEnum<{
415
+ deprecated: "deprecated";
416
+ draft: "draft";
417
+ beta: "beta";
418
+ active: "active";
419
+ archived: "archived";
420
+ }>>;
421
+ }, z.core.$strip>>>;
373
422
  }, z.core.$strip>;
374
423
  declare const ResourceEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
375
424
  id: z.ZodString;
376
- systemId: z.ZodString;
425
+ order: z.ZodDefault<z.ZodNumber>;
426
+ systemPath: z.ZodString;
377
427
  ownerRoleId: z.ZodOptional<z.ZodString>;
378
428
  status: z.ZodEnum<{
379
- active: "active";
380
429
  deprecated: "deprecated";
430
+ active: "active";
381
431
  archived: "archived";
382
432
  }>;
383
433
  kind: z.ZodLiteral<"workflow">;
384
- capabilityKey: z.ZodOptional<z.ZodString>;
434
+ actionKey: z.ZodOptional<z.ZodString>;
435
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
436
+ eventKey: z.ZodString;
437
+ label: z.ZodString;
438
+ payloadSchema: z.ZodOptional<z.ZodString>;
439
+ lifecycle: z.ZodOptional<z.ZodEnum<{
440
+ deprecated: "deprecated";
441
+ draft: "draft";
442
+ beta: "beta";
443
+ active: "active";
444
+ archived: "archived";
445
+ }>>;
446
+ }, z.core.$strip>>>;
385
447
  }, z.core.$strip>, z.ZodObject<{
386
448
  id: z.ZodString;
387
- systemId: z.ZodString;
449
+ order: z.ZodDefault<z.ZodNumber>;
450
+ systemPath: z.ZodString;
388
451
  ownerRoleId: z.ZodOptional<z.ZodString>;
389
452
  status: z.ZodEnum<{
390
- active: "active";
391
453
  deprecated: "deprecated";
454
+ active: "active";
392
455
  archived: "archived";
393
456
  }>;
394
457
  kind: z.ZodLiteral<"agent">;
395
458
  agentKind: z.ZodEnum<{
459
+ platform: "platform";
396
460
  orchestrator: "orchestrator";
397
461
  specialist: "specialist";
398
462
  utility: "utility";
399
- system: "system";
400
463
  }>;
401
464
  actsAsRoleId: z.ZodOptional<z.ZodString>;
402
465
  sessionCapable: z.ZodBoolean;
466
+ invocations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
467
+ kind: z.ZodLiteral<"slash-command">;
468
+ command: z.ZodString;
469
+ toolFactory: z.ZodOptional<z.ZodString>;
470
+ }, z.core.$strip>, z.ZodObject<{
471
+ kind: z.ZodLiteral<"mcp-tool">;
472
+ server: z.ZodString;
473
+ name: z.ZodString;
474
+ }, z.core.$strip>, z.ZodObject<{
475
+ kind: z.ZodLiteral<"api-endpoint">;
476
+ method: z.ZodEnum<{
477
+ GET: "GET";
478
+ POST: "POST";
479
+ PATCH: "PATCH";
480
+ DELETE: "DELETE";
481
+ }>;
482
+ path: z.ZodString;
483
+ requestSchema: z.ZodOptional<z.ZodString>;
484
+ responseSchema: z.ZodOptional<z.ZodString>;
485
+ }, z.core.$strip>, z.ZodObject<{
486
+ kind: z.ZodLiteral<"script-execution">;
487
+ resourceId: z.ZodString;
488
+ }, z.core.$strip>], "kind">>>;
489
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
490
+ eventKey: z.ZodString;
491
+ label: z.ZodString;
492
+ payloadSchema: z.ZodOptional<z.ZodString>;
493
+ lifecycle: z.ZodOptional<z.ZodEnum<{
494
+ deprecated: "deprecated";
495
+ draft: "draft";
496
+ beta: "beta";
497
+ active: "active";
498
+ archived: "archived";
499
+ }>>;
500
+ }, z.core.$strip>>>;
403
501
  }, z.core.$strip>, z.ZodObject<{
404
502
  id: z.ZodString;
405
- systemId: z.ZodString;
503
+ order: z.ZodDefault<z.ZodNumber>;
504
+ systemPath: z.ZodString;
406
505
  ownerRoleId: z.ZodOptional<z.ZodString>;
407
506
  status: z.ZodEnum<{
408
- active: "active";
409
507
  deprecated: "deprecated";
508
+ active: "active";
410
509
  archived: "archived";
411
510
  }>;
412
511
  kind: z.ZodLiteral<"integration">;
413
512
  provider: z.ZodString;
513
+ }, z.core.$strip>, z.ZodObject<{
514
+ id: z.ZodString;
515
+ order: z.ZodDefault<z.ZodNumber>;
516
+ systemPath: z.ZodString;
517
+ ownerRoleId: z.ZodOptional<z.ZodString>;
518
+ status: z.ZodEnum<{
519
+ deprecated: "deprecated";
520
+ active: "active";
521
+ archived: "archived";
522
+ }>;
523
+ kind: z.ZodLiteral<"script">;
524
+ language: z.ZodEnum<{
525
+ shell: "shell";
526
+ sql: "sql";
527
+ typescript: "typescript";
528
+ python: "python";
529
+ }>;
530
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
531
+ file: z.ZodString;
532
+ }, z.core.$strip>]>;
414
533
  }, z.core.$strip>], "kind">;
415
- declare const ResourcesDomainSchema: z.ZodObject<{
416
- entries: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
417
- id: z.ZodString;
418
- systemId: z.ZodString;
419
- ownerRoleId: z.ZodOptional<z.ZodString>;
420
- status: z.ZodEnum<{
421
- active: "active";
534
+ declare const ResourcesDomainSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
535
+ id: z.ZodString;
536
+ order: z.ZodDefault<z.ZodNumber>;
537
+ systemPath: z.ZodString;
538
+ ownerRoleId: z.ZodOptional<z.ZodString>;
539
+ status: z.ZodEnum<{
540
+ deprecated: "deprecated";
541
+ active: "active";
542
+ archived: "archived";
543
+ }>;
544
+ kind: z.ZodLiteral<"workflow">;
545
+ actionKey: z.ZodOptional<z.ZodString>;
546
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
547
+ eventKey: z.ZodString;
548
+ label: z.ZodString;
549
+ payloadSchema: z.ZodOptional<z.ZodString>;
550
+ lifecycle: z.ZodOptional<z.ZodEnum<{
422
551
  deprecated: "deprecated";
423
- archived: "archived";
424
- }>;
425
- kind: z.ZodLiteral<"workflow">;
426
- capabilityKey: z.ZodOptional<z.ZodString>;
427
- }, z.core.$strip>, z.ZodObject<{
428
- id: z.ZodString;
429
- systemId: z.ZodString;
430
- ownerRoleId: z.ZodOptional<z.ZodString>;
431
- status: z.ZodEnum<{
552
+ draft: "draft";
553
+ beta: "beta";
432
554
  active: "active";
433
- deprecated: "deprecated";
434
555
  archived: "archived";
556
+ }>>;
557
+ }, z.core.$strip>>>;
558
+ }, z.core.$strip>, z.ZodObject<{
559
+ id: z.ZodString;
560
+ order: z.ZodDefault<z.ZodNumber>;
561
+ systemPath: z.ZodString;
562
+ ownerRoleId: z.ZodOptional<z.ZodString>;
563
+ status: z.ZodEnum<{
564
+ deprecated: "deprecated";
565
+ active: "active";
566
+ archived: "archived";
567
+ }>;
568
+ kind: z.ZodLiteral<"agent">;
569
+ agentKind: z.ZodEnum<{
570
+ platform: "platform";
571
+ orchestrator: "orchestrator";
572
+ specialist: "specialist";
573
+ utility: "utility";
574
+ }>;
575
+ actsAsRoleId: z.ZodOptional<z.ZodString>;
576
+ sessionCapable: z.ZodBoolean;
577
+ invocations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
578
+ kind: z.ZodLiteral<"slash-command">;
579
+ command: z.ZodString;
580
+ toolFactory: z.ZodOptional<z.ZodString>;
581
+ }, z.core.$strip>, z.ZodObject<{
582
+ kind: z.ZodLiteral<"mcp-tool">;
583
+ server: z.ZodString;
584
+ name: z.ZodString;
585
+ }, z.core.$strip>, z.ZodObject<{
586
+ kind: z.ZodLiteral<"api-endpoint">;
587
+ method: z.ZodEnum<{
588
+ GET: "GET";
589
+ POST: "POST";
590
+ PATCH: "PATCH";
591
+ DELETE: "DELETE";
435
592
  }>;
436
- kind: z.ZodLiteral<"agent">;
437
- agentKind: z.ZodEnum<{
438
- orchestrator: "orchestrator";
439
- specialist: "specialist";
440
- utility: "utility";
441
- system: "system";
442
- }>;
443
- actsAsRoleId: z.ZodOptional<z.ZodString>;
444
- sessionCapable: z.ZodBoolean;
593
+ path: z.ZodString;
594
+ requestSchema: z.ZodOptional<z.ZodString>;
595
+ responseSchema: z.ZodOptional<z.ZodString>;
445
596
  }, z.core.$strip>, z.ZodObject<{
446
- id: z.ZodString;
447
- systemId: z.ZodString;
448
- ownerRoleId: z.ZodOptional<z.ZodString>;
449
- status: z.ZodEnum<{
450
- active: "active";
597
+ kind: z.ZodLiteral<"script-execution">;
598
+ resourceId: z.ZodString;
599
+ }, z.core.$strip>], "kind">>>;
600
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
601
+ eventKey: z.ZodString;
602
+ label: z.ZodString;
603
+ payloadSchema: z.ZodOptional<z.ZodString>;
604
+ lifecycle: z.ZodOptional<z.ZodEnum<{
451
605
  deprecated: "deprecated";
606
+ draft: "draft";
607
+ beta: "beta";
608
+ active: "active";
452
609
  archived: "archived";
453
- }>;
454
- kind: z.ZodLiteral<"integration">;
455
- provider: z.ZodString;
456
- }, z.core.$strip>], "kind">>>;
457
- }, z.core.$strip>;
610
+ }>>;
611
+ }, z.core.$strip>>>;
612
+ }, z.core.$strip>, z.ZodObject<{
613
+ id: z.ZodString;
614
+ order: z.ZodDefault<z.ZodNumber>;
615
+ systemPath: z.ZodString;
616
+ ownerRoleId: z.ZodOptional<z.ZodString>;
617
+ status: z.ZodEnum<{
618
+ deprecated: "deprecated";
619
+ active: "active";
620
+ archived: "archived";
621
+ }>;
622
+ kind: z.ZodLiteral<"integration">;
623
+ provider: z.ZodString;
624
+ }, z.core.$strip>, z.ZodObject<{
625
+ id: z.ZodString;
626
+ order: z.ZodDefault<z.ZodNumber>;
627
+ systemPath: z.ZodString;
628
+ ownerRoleId: z.ZodOptional<z.ZodString>;
629
+ status: z.ZodEnum<{
630
+ deprecated: "deprecated";
631
+ active: "active";
632
+ archived: "archived";
633
+ }>;
634
+ kind: z.ZodLiteral<"script">;
635
+ language: z.ZodEnum<{
636
+ shell: "shell";
637
+ sql: "sql";
638
+ typescript: "typescript";
639
+ python: "python";
640
+ }>;
641
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
642
+ file: z.ZodString;
643
+ }, z.core.$strip>]>;
644
+ }, z.core.$strip>], "kind">>>;
458
645
  type ResourceGovernanceStatus = z.infer<typeof ResourceGovernanceStatusSchema>;
459
646
  type WorkflowResourceEntry = z.infer<typeof WorkflowResourceEntrySchema>;
460
647
  type AgentResourceEntry = z.infer<typeof AgentResourceEntrySchema>;
@@ -569,8 +756,8 @@ interface WorkflowConfig extends ResourceDefinition {
569
756
  type: 'workflow';
570
757
  /** OM descriptor backing canonical identity and governance metadata. */
571
758
  resource?: WorkflowResourceEntry;
572
- /** Lead-gen capability key for registry derivation (e.g. 'lead-gen.company.apollo-import') */
573
- capabilityKey?: string;
759
+ /** Lead-gen action key for registry derivation (e.g. 'lead-gen.company.apollo-import') */
760
+ actionKey?: string;
574
761
  }
575
762
  interface WorkflowStepDefinition {
576
763
  id: string;
@@ -921,7 +1108,7 @@ interface KnowledgeContent {
921
1108
  * AIUsageCollector/AICallContext) and the worker proxy (which ignores them) satisfy the type.
922
1109
  */
923
1110
  type LLMAdapterFactory = (config: ModelConfig, ...args: any[]) => LLMAdapter;
924
- type AgentKind = 'orchestrator' | 'specialist' | 'utility' | 'system';
1111
+ type AgentKind = 'orchestrator' | 'specialist' | 'utility' | 'platform';
925
1112
  interface AgentConfig extends ResourceDefinition {
926
1113
  type: 'agent';
927
1114
  /** OM descriptor backing canonical identity and governance metadata. */
@@ -3788,6 +3975,66 @@ type Database = {
3788
3975
  }
3789
3976
  ];
3790
3977
  };
3978
+ user_notes: {
3979
+ Row: {
3980
+ content: string;
3981
+ created_at: string;
3982
+ created_by: string;
3983
+ id: string;
3984
+ metadata: Json;
3985
+ organization_id: string | null;
3986
+ pinned: boolean;
3987
+ priority: string;
3988
+ source: string | null;
3989
+ title: string | null;
3990
+ updated_at: string;
3991
+ user_id: string;
3992
+ };
3993
+ Insert: {
3994
+ content: string;
3995
+ created_at?: string;
3996
+ created_by?: string;
3997
+ id?: string;
3998
+ metadata?: Json;
3999
+ organization_id?: string | null;
4000
+ pinned?: boolean;
4001
+ priority?: string;
4002
+ source?: string | null;
4003
+ title?: string | null;
4004
+ updated_at?: string;
4005
+ user_id: string;
4006
+ };
4007
+ Update: {
4008
+ content?: string;
4009
+ created_at?: string;
4010
+ created_by?: string;
4011
+ id?: string;
4012
+ metadata?: Json;
4013
+ organization_id?: string | null;
4014
+ pinned?: boolean;
4015
+ priority?: string;
4016
+ source?: string | null;
4017
+ title?: string | null;
4018
+ updated_at?: string;
4019
+ user_id?: string;
4020
+ };
4021
+ Relationships: [
4022
+ {
4023
+ foreignKeyName: "user_notes_organization_id_fkey";
4024
+ columns: ["organization_id"];
4025
+ isOneToOne: false;
4026
+ referencedRelation: "organizations";
4027
+ referencedColumns: ["id"];
4028
+ },
4029
+ {
4030
+ foreignKeyName: "user_notes_user_id_fkey";
4031
+ columns: ["user_id"];
4032
+ isOneToOne: false;
4033
+ referencedRelation: "users";
4034
+ referencedColumns: ["id"];
4035
+ }
4036
+ ];
4037
+ };
3791
4038
  users: {
3792
4039
  Row: {
3793
4040
  config: Json;
@@ -4052,10 +4299,10 @@ declare const RecordColumnConfigSchema: z.ZodObject<{
4052
4299
  width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
4053
4300
  renderType: z.ZodOptional<z.ZodEnum<{
4054
4301
  text: "text";
4055
- badge: "badge";
4056
- datetime: "datetime";
4057
4302
  count: "count";
4058
4303
  json: "json";
4304
+ badge: "badge";
4305
+ datetime: "datetime";
4059
4306
  }>>;
4060
4307
  badgeColor: z.ZodOptional<z.ZodString>;
4061
4308
  }, z.core.$strip>;
@@ -4106,7 +4353,7 @@ interface LeadGenStageCatalogEntry {
4106
4353
  * Canonical lead-gen processing stage catalog.
4107
4354
  * Keys are the stage names written by workflow steps into processing_state jsonb.
4108
4355
  *
4109
- * Ordered roughly by pipeline progression (prospecting outreach qualification).
4356
+ * Ordered roughly by pipeline progression (prospecting -> outreach -> qualification).
4110
4357
  */
4111
4358
  declare const LEAD_GEN_STAGE_CATALOG: Record<string, LeadGenStageCatalogEntry>;
4112
4359
 
@@ -4150,10 +4397,10 @@ declare const DealSchemas: {
4150
4397
  }, z.core.$strict>;
4151
4398
  ListDealTasksDueQuery: z.ZodObject<{
4152
4399
  window: z.ZodOptional<z.ZodEnum<{
4153
- upcoming: "upcoming";
4154
4400
  overdue: "overdue";
4155
4401
  today: "today";
4156
4402
  today_and_overdue: "today_and_overdue";
4403
+ upcoming: "upcoming";
4157
4404
  }>>;
4158
4405
  assigneeUserId: z.ZodOptional<z.ZodString>;
4159
4406
  }, z.core.$strict>;
@@ -4164,8 +4411,8 @@ declare const DealSchemas: {
4164
4411
  title: z.ZodString;
4165
4412
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4166
4413
  kind: z.ZodOptional<z.ZodEnum<{
4167
- email: "email";
4168
4414
  other: "other";
4415
+ email: "email";
4169
4416
  call: "call";
4170
4417
  meeting: "meeting";
4171
4418
  }>>;
@@ -4505,8 +4752,8 @@ declare const DealSchemas: {
4505
4752
  title: z.ZodString;
4506
4753
  description: z.ZodNullable<z.ZodString>;
4507
4754
  kind: z.ZodEnum<{
4508
- email: "email";
4509
4755
  other: "other";
4756
+ email: "email";
4510
4757
  call: "call";
4511
4758
  meeting: "meeting";
4512
4759
  }>;
@@ -4525,8 +4772,8 @@ declare const DealSchemas: {
4525
4772
  title: z.ZodString;
4526
4773
  description: z.ZodNullable<z.ZodString>;
4527
4774
  kind: z.ZodEnum<{
4528
- email: "email";
4529
4775
  other: "other";
4776
+ email: "email";
4530
4777
  call: "call";
4531
4778
  meeting: "meeting";
4532
4779
  }>;
@@ -4673,7 +4920,7 @@ interface BuildPlanSnapshotStep {
4673
4920
  recordSourceStageKey?: string;
4674
4921
  dependsOn?: string[];
4675
4922
  dependencyMode: BuildPlanSnapshotDependencyMode;
4676
- capabilityKey: string;
4923
+ actionKey: string;
4677
4924
  defaultBatchSize: number;
4678
4925
  maxBatchSize: number;
4679
4926
  recordColumns?: Partial<Record<BuildPlanSnapshotPrimaryEntity, RecordColumnConfig[]>>;
@@ -7129,11 +7376,11 @@ declare const ProjectSchemas: {
7129
7376
  }>;
7130
7377
  status: z.ZodOptional<z.ZodEnum<{
7131
7378
  active: "active";
7379
+ completed: "completed";
7380
+ paused: "paused";
7132
7381
  on_track: "on_track";
7133
7382
  at_risk: "at_risk";
7134
7383
  blocked: "blocked";
7135
- paused: "paused";
7136
- completed: "completed";
7137
7384
  }>>;
7138
7385
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7139
7386
  deal_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -7154,11 +7401,11 @@ declare const ProjectSchemas: {
7154
7401
  }>>;
7155
7402
  status: z.ZodOptional<z.ZodEnum<{
7156
7403
  active: "active";
7404
+ completed: "completed";
7405
+ paused: "paused";
7157
7406
  on_track: "on_track";
7158
7407
  at_risk: "at_risk";
7159
7408
  blocked: "blocked";
7160
- paused: "paused";
7161
- completed: "completed";
7162
7409
  }>>;
7163
7410
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7164
7411
  deal_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -7179,11 +7426,11 @@ declare const ProjectSchemas: {
7179
7426
  }>>;
7180
7427
  status: z.ZodOptional<z.ZodEnum<{
7181
7428
  active: "active";
7429
+ completed: "completed";
7430
+ paused: "paused";
7182
7431
  on_track: "on_track";
7183
7432
  at_risk: "at_risk";
7184
7433
  blocked: "blocked";
7185
- paused: "paused";
7186
- completed: "completed";
7187
7434
  }>>;
7188
7435
  search: z.ZodOptional<z.ZodString>;
7189
7436
  client_id: z.ZodOptional<z.ZodString>;
@@ -7208,11 +7455,11 @@ declare const ProjectSchemas: {
7208
7455
  CreateMilestoneRequest: z.ZodObject<{
7209
7456
  name: z.ZodString;
7210
7457
  status: z.ZodOptional<z.ZodEnum<{
7211
- blocked: "blocked";
7212
7458
  completed: "completed";
7459
+ overdue: "overdue";
7213
7460
  upcoming: "upcoming";
7461
+ blocked: "blocked";
7214
7462
  in_progress: "in_progress";
7215
- overdue: "overdue";
7216
7463
  }>>;
7217
7464
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7218
7465
  due_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -7222,11 +7469,11 @@ declare const ProjectSchemas: {
7222
7469
  UpdateMilestoneRequest: z.ZodObject<{
7223
7470
  name: z.ZodOptional<z.ZodString>;
7224
7471
  status: z.ZodOptional<z.ZodEnum<{
7225
- blocked: "blocked";
7226
7472
  completed: "completed";
7473
+ overdue: "overdue";
7227
7474
  upcoming: "upcoming";
7475
+ blocked: "blocked";
7228
7476
  in_progress: "in_progress";
7229
- overdue: "overdue";
7230
7477
  }>>;
7231
7478
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7232
7479
  due_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -7250,25 +7497,25 @@ declare const ProjectSchemas: {
7250
7497
  name: z.ZodString;
7251
7498
  type: z.ZodOptional<z.ZodEnum<{
7252
7499
  code: "code";
7253
- feature: "feature";
7254
7500
  other: "other";
7255
7501
  research: "research";
7256
7502
  documentation: "documentation";
7257
7503
  report: "report";
7258
7504
  design: "design";
7259
7505
  refactor: "refactor";
7506
+ feature: "feature";
7260
7507
  bug: "bug";
7261
7508
  }>>;
7262
7509
  status: z.ZodOptional<z.ZodEnum<{
7263
- blocked: "blocked";
7264
7510
  completed: "completed";
7511
+ cancelled: "cancelled";
7512
+ blocked: "blocked";
7265
7513
  in_progress: "in_progress";
7266
7514
  planned: "planned";
7267
7515
  submitted: "submitted";
7268
7516
  approved: "approved";
7269
- revision_requested: "revision_requested";
7270
7517
  rejected: "rejected";
7271
- cancelled: "cancelled";
7518
+ revision_requested: "revision_requested";
7272
7519
  }>>;
7273
7520
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7274
7521
  milestone_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -7286,25 +7533,25 @@ declare const ProjectSchemas: {
7286
7533
  name: z.ZodOptional<z.ZodString>;
7287
7534
  type: z.ZodOptional<z.ZodEnum<{
7288
7535
  code: "code";
7289
- feature: "feature";
7290
7536
  other: "other";
7291
7537
  research: "research";
7292
7538
  documentation: "documentation";
7293
7539
  report: "report";
7294
7540
  design: "design";
7295
7541
  refactor: "refactor";
7542
+ feature: "feature";
7296
7543
  bug: "bug";
7297
7544
  }>>;
7298
7545
  status: z.ZodOptional<z.ZodEnum<{
7299
- blocked: "blocked";
7300
7546
  completed: "completed";
7547
+ cancelled: "cancelled";
7548
+ blocked: "blocked";
7301
7549
  in_progress: "in_progress";
7302
7550
  planned: "planned";
7303
7551
  submitted: "submitted";
7304
7552
  approved: "approved";
7305
- revision_requested: "revision_requested";
7306
7553
  rejected: "rejected";
7307
- cancelled: "cancelled";
7554
+ revision_requested: "revision_requested";
7308
7555
  }>>;
7309
7556
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7310
7557
  milestone_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -7323,15 +7570,15 @@ declare const ProjectSchemas: {
7323
7570
  MergeResumeContextRequest: z.ZodRecord<z.ZodString, z.ZodUnknown>;
7324
7571
  GetTasksQuery: z.ZodObject<{
7325
7572
  status: z.ZodOptional<z.ZodEnum<{
7326
- blocked: "blocked";
7327
7573
  completed: "completed";
7574
+ cancelled: "cancelled";
7575
+ blocked: "blocked";
7328
7576
  in_progress: "in_progress";
7329
7577
  planned: "planned";
7330
7578
  submitted: "submitted";
7331
7579
  approved: "approved";
7332
- revision_requested: "revision_requested";
7333
7580
  rejected: "rejected";
7334
- cancelled: "cancelled";
7581
+ revision_requested: "revision_requested";
7335
7582
  }>>;
7336
7583
  milestone_id: z.ZodOptional<z.ZodString>;
7337
7584
  parent_task_id: z.ZodOptional<z.ZodString>;
@@ -8664,47 +8911,62 @@ interface Tool {
8664
8911
  */
8665
8912
  type IntegrationType = 'gmail' | 'google-sheets' | 'slack' | 'github' | 'linear' | 'attio' | 'airtable' | 'salesforce' | 'hubspot' | 'stripe' | 'twilio' | 'sendgrid' | 'mailgun' | 'zapier' | 'webhook' | 'apify' | 'instantly' | 'resend' | 'signature-api' | 'dropbox' | 'anymailfinder' | 'tomba' | 'millionverifier';
8666
8913
 
8667
- declare const SystemEntrySchema: z.ZodObject<{
8668
- id: z.ZodString;
8669
- title: z.ZodString;
8670
- description: z.ZodString;
8671
- kind: z.ZodEnum<{
8672
- platform: "platform";
8673
- product: "product";
8674
- operational: "operational";
8675
- diagnostic: "diagnostic";
8676
- }>;
8677
- responsibleRoleId: z.ZodOptional<z.ZodString>;
8678
- governedByKnowledge: z.ZodDefault<z.ZodArray<z.ZodString>>;
8679
- drivesGoals: z.ZodDefault<z.ZodArray<z.ZodString>>;
8680
- status: z.ZodEnum<{
8681
- active: "active";
8682
- deprecated: "deprecated";
8683
- archived: "archived";
8684
- }>;
8685
- }, z.core.$strip>;
8686
- declare const SystemsDomainSchema: z.ZodObject<{
8687
- systems: z.ZodDefault<z.ZodArray<z.ZodObject<{
8688
- id: z.ZodString;
8689
- title: z.ZodString;
8690
- description: z.ZodString;
8691
- kind: z.ZodEnum<{
8692
- platform: "platform";
8693
- product: "product";
8694
- operational: "operational";
8695
- diagnostic: "diagnostic";
8696
- }>;
8697
- responsibleRoleId: z.ZodOptional<z.ZodString>;
8698
- governedByKnowledge: z.ZodDefault<z.ZodArray<z.ZodString>>;
8699
- drivesGoals: z.ZodDefault<z.ZodArray<z.ZodString>>;
8700
- status: z.ZodEnum<{
8701
- active: "active";
8702
- deprecated: "deprecated";
8703
- archived: "archived";
8704
- }>;
8705
- }, z.core.$strip>>>;
8914
+ /**
8915
+ * Placeholder discriminated union for ContentNode (Wave 1A).
8916
+ * Wave 2A wires concrete (kind, type) pairs via the registry.
8917
+ *
8918
+ * Per D2: unregistered (kind, type) pairs are allowed and pass through validation.
8919
+ * Per L14: every node carries BOTH `kind` and `type`.
8920
+ */
8921
+ declare const ContentNodeSchema: z.ZodObject<{
8922
+ label: z.ZodString;
8923
+ description: z.ZodOptional<z.ZodString>;
8924
+ order: z.ZodOptional<z.ZodNumber>;
8925
+ parentContentId: z.ZodOptional<z.ZodString>;
8926
+ kind: z.ZodString;
8927
+ type: z.ZodString;
8928
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8706
8929
  }, z.core.$strip>;
8707
- type SystemEntry = z.infer<typeof SystemEntrySchema>;
8930
+ type ContentNode = z.infer<typeof ContentNodeSchema>;
8931
+
8932
+ /** Explicit interface needed to annotate the recursive SystemEntrySchema. */
8933
+ interface SystemEntry {
8934
+ id: string;
8935
+ label?: string;
8936
+ title?: string;
8937
+ description?: string;
8938
+ kind?: 'product' | 'operational' | 'platform' | 'diagnostic';
8939
+ parentSystemId?: string;
8940
+ ui?: {
8941
+ path: string;
8942
+ surfaces: string[];
8943
+ icon?: string;
8944
+ order?: number;
8945
+ };
8946
+ lifecycle?: 'draft' | 'beta' | 'active' | 'deprecated' | 'archived';
8947
+ responsibleRoleId?: string;
8948
+ governedByKnowledge?: string[];
8949
+ actions?: {
8950
+ actionId: string;
8951
+ intent: 'exposes' | 'consumes';
8952
+ invocation?: unknown;
8953
+ }[];
8954
+ policies?: string[];
8955
+ drivesGoals?: string[];
8956
+ /** @deprecated Use lifecycle. Accepted for one publish cycle. */
8957
+ status?: 'active' | 'deprecated' | 'archived';
8958
+ path?: string;
8959
+ icon?: string;
8960
+ color?: string;
8961
+ uiPosition?: 'sidebar-primary' | 'sidebar-bottom';
8962
+ enabled?: boolean;
8963
+ devOnly?: boolean;
8964
+ requiresAdmin?: boolean;
8965
+ order: number;
8966
+ content?: Record<string, ContentNode>;
8967
+ subsystems?: Record<string, SystemEntry>;
8968
+ }
8969
+ declare const SystemsDomainSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SystemEntry, unknown, z.core.$ZodTypeInternals<SystemEntry, unknown>>>>;
8708
8970
 
8709
8971
  /**
8710
8972
  * Resource Registry type definitions
@@ -8719,7 +8981,7 @@ type ResourceStatus = 'dev' | 'prod';
8719
8981
  * Used as the discriminator field in ResourceDefinition
8720
8982
  */
8721
8983
  type ResourceType = 'agent' | 'workflow' | 'trigger' | 'integration' | 'external' | 'human';
8722
- type ResourceSystemSummary = Pick<SystemEntry, 'id' | 'title' | 'description' | 'kind' | 'status'>;
8984
+ type ResourceSystemSummary = Pick<SystemEntry, 'id' | 'title' | 'description' | 'kind' | 'lifecycle'>;
8723
8985
  /**
8724
8986
  * Base interface for ALL platform resources
8725
8987
  * Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
@@ -8745,8 +9007,8 @@ interface ResourceDefinition {
8745
9007
  sessionCapable?: boolean;
8746
9008
  /** Whether the resource is local (monorepo) or remote (externally deployed) */
8747
9009
  origin?: 'local' | 'remote';
8748
- /** OM System membership, when backed by a Resource descriptor */
8749
- systemId?: string;
9010
+ /** OM System membership — dot-separated system path (e.g. "sys.lead-gen"), when backed by a Resource descriptor */
9011
+ systemPath?: string;
8750
9012
  /** Display metadata for the owning OM System */
8751
9013
  system?: ResourceSystemSummary;
8752
9014
  /** Governance lifecycle status from the OM Resource descriptor */
@@ -9011,13 +9273,18 @@ type OrganizationModelResources = z.infer<typeof ResourcesDomainSchema>;
9011
9273
  declare const LinkSchema: z.ZodObject<{
9012
9274
  nodeId: z.ZodString;
9013
9275
  kind: z.ZodEnum<{
9276
+ links: "links";
9277
+ affects: "affects";
9278
+ emits: "emits";
9014
9279
  contains: "contains";
9015
9280
  references: "references";
9016
- exposes: "exposes";
9017
9281
  maps_to: "maps_to";
9018
- "operates-on": "operates-on";
9019
9282
  uses: "uses";
9020
9283
  governs: "governs";
9284
+ originates_from: "originates_from";
9285
+ triggers: "triggers";
9286
+ applies_to: "applies_to";
9287
+ effects: "effects";
9021
9288
  }>;
9022
9289
  }, z.core.$strip>;
9023
9290
  type Link = z.infer<typeof LinkSchema>;