@elevasis/sdk 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/cli.cjs +2325 -124
  2. package/dist/index.d.ts +882 -794
  3. package/dist/index.js +170 -46
  4. package/dist/node/index.d.ts +69 -0
  5. package/dist/node/index.js +273 -0
  6. package/dist/test-utils/index.d.ts +857 -711
  7. package/dist/test-utils/index.js +2 -0
  8. package/dist/types/worker/adapters/lead.d.ts +1 -1
  9. package/dist/types/worker/platform.d.ts +2 -9
  10. package/dist/worker/index.js +1 -0
  11. package/package.json +12 -3
  12. package/reference/_navigation.md +23 -1
  13. package/reference/_reference-manifest.json +98 -0
  14. package/reference/claude-config/rules/agent-start-here.md +13 -0
  15. package/reference/claude-config/rules/organization-model.md +40 -40
  16. package/reference/claude-config/rules/organization-os.md +16 -16
  17. package/reference/claude-config/rules/ui.md +2 -6
  18. package/reference/claude-config/rules/vibe.md +13 -13
  19. package/reference/claude-config/skills/knowledge/SKILL.md +253 -0
  20. package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-a.md +100 -100
  21. package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-b.md +158 -158
  22. package/reference/claude-config/skills/knowledge/operations/customers.md +109 -0
  23. package/reference/claude-config/skills/knowledge/operations/features.md +113 -0
  24. package/reference/claude-config/skills/knowledge/operations/goals.md +118 -0
  25. package/reference/claude-config/skills/knowledge/operations/identity.md +93 -0
  26. package/reference/claude-config/skills/knowledge/operations/labels.md +89 -0
  27. package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -0
  28. package/reference/claude-config/skills/knowledge/operations/roles.md +99 -0
  29. package/reference/claude-config/skills/knowledge/operations/techStack.md +102 -0
  30. package/reference/claude-config/skills/run-ui/SKILL.md +73 -0
  31. package/reference/claude-config/skills/setup/SKILL.md +270 -270
  32. package/reference/claude-config/skills/tutorial/SKILL.md +249 -0
  33. package/reference/claude-config/skills/tutorial/progress-template.md +74 -0
  34. package/reference/claude-config/skills/tutorial/technical.md +1309 -0
  35. package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -0
  36. package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -0
  37. package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -0
  38. package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -0
  39. package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -0
  40. package/reference/deployment/index.mdx +5 -5
  41. package/reference/examples/organization-model.ts +40 -0
  42. package/reference/framework/index.mdx +1 -1
  43. package/reference/framework/tutorial-system.mdx +86 -173
  44. package/reference/packages/core/src/knowledge/README.md +32 -0
  45. package/reference/packages/ui/src/knowledge/README.md +31 -0
  46. package/reference/packages/ui/src/theme/presets/README.md +19 -0
  47. package/reference/scaffold/core/organization-model.mdx +1 -1
  48. package/reference/scaffold/recipes/add-a-feature.md +1 -1
  49. package/reference/scaffold/recipes/customize-crm-actions.md +3 -3
  50. package/reference/scaffold/recipes/customize-organization-model.md +3 -3
  51. package/reference/scaffold/recipes/extend-crm.md +12 -8
  52. package/reference/scaffold/recipes/extend-lead-gen.md +129 -20
  53. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +1 -1
  54. package/reference/scaffold/recipes/index.md +6 -0
  55. package/reference/scaffold/reference/contracts.md +829 -595
  56. package/reference/scaffold/reference/feature-registry.md +2 -1
  57. package/reference/scaffold/ui/composition-extensibility.mdx +17 -0
  58. package/reference/claude-config/skills/configure/SKILL.md +0 -98
  59. package/reference/claude-config/skills/configure/operations/customers.md +0 -150
  60. package/reference/claude-config/skills/configure/operations/features.md +0 -162
  61. package/reference/claude-config/skills/configure/operations/goals.md +0 -147
  62. package/reference/claude-config/skills/configure/operations/identity.md +0 -133
  63. package/reference/claude-config/skills/configure/operations/labels.md +0 -128
  64. package/reference/claude-config/skills/configure/operations/offerings.md +0 -159
  65. package/reference/claude-config/skills/configure/operations/roles.md +0 -153
  66. package/reference/claude-config/skills/configure/operations/techStack.md +0 -139
@@ -180,15 +180,53 @@ export type OrganizationModelObjective = z.infer<typeof ObjectiveSchema>
180
180
  export type OrganizationModelKeyResult = z.infer<typeof KeyResultSchema>
181
181
  ```
182
182
 
183
+ ### `OrganizationModelKnowledge`
184
+
185
+ ```typescript
186
+ export type OrganizationModelKnowledge = z.infer<typeof KnowledgeDomainSchema>
187
+ ```
188
+
189
+ ### `OrgKnowledgeNode`
190
+
191
+ ```typescript
192
+ export type OrgKnowledgeNode = z.infer<typeof OrgKnowledgeNodeSchema>
193
+ ```
194
+
195
+ ### `OrgKnowledgeKind`
196
+
197
+ ```typescript
198
+ export type OrgKnowledgeKind = z.infer<typeof OrgKnowledgeKindSchema>
199
+ ```
200
+
201
+ ### `OrganizationModelIconToken`
202
+
203
+ ```typescript
204
+ export type OrganizationModelIconToken = z.infer<typeof OrganizationModelIconTokenSchema>
205
+ ```
206
+
207
+ ### `OrganizationModelBuiltinIconToken`
208
+
209
+ ```typescript
210
+ export type OrganizationModelBuiltinIconToken = z.infer<typeof OrganizationModelBuiltinIconTokenSchema>
211
+ ```
212
+
183
213
  ### `DeepPartial`
184
214
 
185
215
  ```typescript
186
- export type DeepPartial<T> =
216
+ export type DeepPartial<T> =
187
217
  T extends Array<infer U> ? Array<DeepPartial<U>> : T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T
188
218
  ```
189
219
 
190
220
  ## Feature System
191
221
 
222
+ ### `ElevasisOrganizationModel`
223
+
224
+ ```typescript
225
+ export type ElevasisOrganizationModel = Omit<OrganizationModel, 'knowledge'> & {
226
+ knowledge?: OrganizationModel['knowledge']
227
+ }
228
+ ```
229
+
192
230
  ### `FeatureSidebarComponent`
193
231
 
194
232
  ```typescript
@@ -327,7 +365,7 @@ export interface OrganizationGraphContextValue {
327
365
  ```typescript
328
366
  export interface ElevasisFeaturesProviderProps {
329
367
  features: FeatureModule[]
330
- organizationModel?: OrganizationModel
368
+ organizationModel?: ElevasisOrganizationModel
331
369
  timeRange?: TimeRange
332
370
  operationsApiUrl?: string
333
371
  operationsSSEManager?: SSEConnectionManagerLike
@@ -812,73 +850,73 @@ export interface DeploymentSpec {
812
850
  ### `AcqCompany`
813
851
 
814
852
  ```typescript
815
- /**
816
- * Company record in the acquisition database.
817
- * Contains enriched company data from various sources.
818
- * Transformed from AcqCompanyRow with camelCase properties.
819
- */
820
- export interface AcqCompany {
821
- id: string
822
- organizationId: string
823
- name: string
824
- domain: string | null
825
- linkedinUrl: string | null
826
- website: string | null
827
- numEmployees: number | null
828
- foundedYear: number | null
829
- locationCity: string | null
830
- locationState: string | null
831
- category: string | null
832
- categoryPain: string | null
833
- segment: string | null
834
- pipelineStatus: CompanyPipelineStatus | null
835
- enrichmentData: CompanyEnrichmentData | null
836
- source: string | null
837
- batchId: string | null
838
- status: 'active' | 'invalid'
839
- verticalResearch: string | null
840
- /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
841
- qualificationScore: number | null
842
- /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
843
- qualificationSignals: Record<string, unknown> | null
844
- /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
845
- qualificationRubricKey: string | null
846
- createdAt: Date
847
- updatedAt: Date
853
+ /**
854
+ * Company record in the acquisition database.
855
+ * Contains enriched company data from various sources.
856
+ * Transformed from AcqCompanyRow with camelCase properties.
857
+ */
858
+ export interface AcqCompany {
859
+ id: string
860
+ organizationId: string
861
+ name: string
862
+ domain: string | null
863
+ linkedinUrl: string | null
864
+ website: string | null
865
+ numEmployees: number | null
866
+ foundedYear: number | null
867
+ locationCity: string | null
868
+ locationState: string | null
869
+ category: string | null
870
+ categoryPain: string | null
871
+ segment: string | null
872
+ pipelineStatus: CompanyPipelineStatus | null
873
+ enrichmentData: CompanyEnrichmentData | null
874
+ source: string | null
875
+ batchId: string | null
876
+ status: 'active' | 'invalid'
877
+ verticalResearch: string | null
878
+ /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
879
+ qualificationScore: number | null
880
+ /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
881
+ qualificationSignals: Record<string, unknown> | null
882
+ /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
883
+ qualificationRubricKey: string | null
884
+ createdAt: Date
885
+ updatedAt: Date
848
886
  }
849
887
  ```
850
888
 
851
889
  ### `AcqContact`
852
890
 
853
891
  ```typescript
854
- /**
855
- * Contact record in the acquisition database.
856
- * Contains enriched contact data and personalization content.
857
- * Transformed from AcqContactRow with camelCase properties.
858
- */
859
- export interface AcqContact {
860
- id: string
861
- organizationId: string
862
- companyId: string | null
863
- email: string
864
- emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
865
- firstName: string | null
866
- lastName: string | null
867
- linkedinUrl: string | null
868
- title: string | null
869
- headline: string | null
870
- filterReason: string | null
871
- openingLine: string | null
872
- source: string | null
873
- sourceId: string | null
874
- pipelineStatus: ContactPipelineStatus | null
875
- enrichmentData: ContactEnrichmentData | null
876
- /** Attio Person record ID - set when contact responds and is added to CRM */
877
- attioPersonId: string | null
878
- batchId: string | null
879
- status: 'active' | 'invalid'
880
- createdAt: Date
881
- updatedAt: Date
892
+ /**
893
+ * Contact record in the acquisition database.
894
+ * Contains enriched contact data and personalization content.
895
+ * Transformed from AcqContactRow with camelCase properties.
896
+ */
897
+ export interface AcqContact {
898
+ id: string
899
+ organizationId: string
900
+ companyId: string | null
901
+ email: string
902
+ emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
903
+ firstName: string | null
904
+ lastName: string | null
905
+ linkedinUrl: string | null
906
+ title: string | null
907
+ headline: string | null
908
+ filterReason: string | null
909
+ openingLine: string | null
910
+ source: string | null
911
+ sourceId: string | null
912
+ pipelineStatus: ContactPipelineStatus | null
913
+ enrichmentData: ContactEnrichmentData | null
914
+ /** Attio Person record ID - set when contact responds and is added to CRM */
915
+ attioPersonId: string | null
916
+ batchId: string | null
917
+ status: 'active' | 'invalid'
918
+ createdAt: Date
919
+ updatedAt: Date
882
920
  }
883
921
  ```
884
922
 
@@ -888,12 +926,32 @@ export interface AcqContact {
888
926
  export type DealStage = 'interested' | 'proposal' | 'closing' | 'closed_won' | 'closed_lost' | 'nurturing'
889
927
  ```
890
928
 
929
+ ### `DealPriorityBucketKey`
930
+
931
+ ```typescript
932
+ export type DealPriorityBucketKey = 'needs_response' | 'follow_up_due' | 'waiting' | 'stale' | 'closed_low'
933
+ ```
934
+
935
+ ### `DealPriority`
936
+
937
+ ```typescript
938
+ export interface DealPriority {
939
+ bucketKey: DealPriorityBucketKey
940
+ rank: number
941
+ label: string
942
+ color: string
943
+ reason: string
944
+ latestActivityAt: string | null
945
+ nextActionAt: string | null
946
+ }
947
+ ```
948
+
891
949
  ### `KanbanStageConfig`
892
950
 
893
951
  ```typescript
894
- export interface KanbanStageConfig {
895
- color: string // Mantine color token (e.g. 'blue', 'teal')
896
- label?: string // Optional display label override
952
+ export interface KanbanStageConfig {
953
+ color: string // Mantine color token (e.g. 'blue', 'teal')
954
+ label?: string // Optional display label override
897
955
  }
898
956
  ```
899
957
 
@@ -906,46 +964,49 @@ export type KanbanBoardConfig = Partial<Record<DealStage, KanbanStageConfig>>
906
964
  ### `DealContact`
907
965
 
908
966
  ```typescript
909
- export interface DealContact {
910
- id: string
911
- first_name: string | null
912
- last_name: string | null
913
- email: string
914
- title: string | null
915
- headline: string | null
916
- linkedin_url: string | null
917
- pipeline_status: Record<string, unknown> | null
918
- enrichment_data: Record<string, unknown> | null
919
- company: {
920
- id: string
921
- name: string
922
- domain: string | null
923
- website: string | null
924
- linkedin_url: string | null
925
- segment: string | null
926
- category: string | null
927
- num_employees: number | null
928
- } | null
967
+ export interface DealContact {
968
+ id: string
969
+ first_name: string | null
970
+ last_name: string | null
971
+ email: string
972
+ title: string | null
973
+ headline: string | null
974
+ linkedin_url: string | null
975
+ pipeline_status: Record<string, unknown> | null
976
+ enrichment_data: Record<string, unknown> | null
977
+ company: {
978
+ id: string
979
+ name: string
980
+ domain: string | null
981
+ website: string | null
982
+ linkedin_url: string | null
983
+ segment: string | null
984
+ category: string | null
985
+ num_employees: number | null
986
+ } | null
929
987
  }
930
988
  ```
931
989
 
932
990
  ### `DealFilters`
933
991
 
934
992
  ```typescript
935
- export interface DealFilters {
936
- stage?: DealStage
937
- search?: string
938
- limit?: number
939
- offset?: number
993
+ export interface DealFilters {
994
+ stage?: DealStage
995
+ search?: string
996
+ limit?: number
997
+ offset?: number
940
998
  }
941
999
  ```
942
1000
 
943
1001
  ### `DealListItem`
944
1002
 
945
1003
  ```typescript
946
- /** Deal list item with joined contact and company data */
947
- export interface DealListItem extends AcqDealRow {
948
- contact: DealContact | null
1004
+ /** Deal list item with joined contact and company data */
1005
+ export interface DealListItem extends AcqDealRow {
1006
+ priority: DealPriority
1007
+ ownership: 'us' | 'them' | null
1008
+ nextAction: string | null
1009
+ contact: DealContact | null
949
1010
  }
950
1011
  ```
951
1012
 
@@ -958,31 +1019,91 @@ export type DealDetail = DealListItem
958
1019
  ### `AcqDealTaskKind`
959
1020
 
960
1021
  ```typescript
961
- /** Task kind options for a deal task (human follow-up action type) */
1022
+ /** Task kind options for a deal task (human follow-up action type) */
962
1023
  export type AcqDealTaskKind = 'call' | 'email' | 'meeting' | 'other'
963
1024
  ```
964
1025
 
965
1026
  ### `AcqDealTask`
966
1027
 
967
1028
  ```typescript
968
- /**
969
- * A CRM to-do item attached to a deal representing a human follow-up action.
970
- * Transformed from AcqDealTaskRow with camelCase properties.
971
- */
972
- export interface AcqDealTask {
973
- id: string
974
- organizationId: string
975
- dealId: string
976
- title: string
977
- description: string | null
978
- kind: AcqDealTaskKind
979
- dueAt: string | null
980
- assigneeUserId: string | null
981
- completedAt: string | null
982
- completedByUserId: string | null
983
- createdAt: string
984
- updatedAt: string
985
- createdByUserId: string | null
1029
+ /**
1030
+ * A CRM to-do item attached to a deal representing a human follow-up action.
1031
+ * Transformed from AcqDealTaskRow with camelCase properties.
1032
+ */
1033
+ export interface AcqDealTask {
1034
+ id: string
1035
+ organizationId: string
1036
+ dealId: string
1037
+ title: string
1038
+ description: string | null
1039
+ kind: AcqDealTaskKind
1040
+ dueAt: string | null
1041
+ assigneeUserId: string | null
1042
+ completedAt: string | null
1043
+ completedByUserId: string | null
1044
+ createdAt: string
1045
+ updatedAt: string
1046
+ createdByUserId: string | null
1047
+ }
1048
+ ```
1049
+
1050
+ ### `CrmPriorityBucketKey`
1051
+
1052
+ ```typescript
1053
+ export type CrmPriorityBucketKey = 'needs_response' | 'follow_up_due' | 'waiting' | 'stale' | 'closed_low'
1054
+ ```
1055
+
1056
+ ### `CrmPriorityBucketDefinition`
1057
+
1058
+ ```typescript
1059
+ export interface CrmPriorityBucketDefinition {
1060
+ bucketKey: CrmPriorityBucketKey
1061
+ label: string
1062
+ /** Lower ranks sort first in deal lists and pipeline columns. */
1063
+ rank: number
1064
+ /** UI color token. Consumers may map this to their design system. */
1065
+ color: string
1066
+ }
1067
+ ```
1068
+
1069
+ ### `CrmPriorityRuleConfig`
1070
+
1071
+ ```typescript
1072
+ export interface CrmPriorityRuleConfig {
1073
+ buckets: CrmPriorityBucketDefinition[]
1074
+ closedStageKeys: string[]
1075
+ followUpAfterDaysByStateKey: Record<string, number>
1076
+ staleAfterDays: number
1077
+ }
1078
+ ```
1079
+
1080
+ ### `CRM_PRIORITY_BUCKETS`
1081
+
1082
+ ```typescript
1083
+ export const CRM_PRIORITY_BUCKETS: CrmPriorityBucketDefinition[] = [
1084
+ { bucketKey: 'needs_response', label: 'Needs Response', rank: 10, color: 'red' },
1085
+ { bucketKey: 'follow_up_due', label: 'Follow-up Due', rank: 20, color: 'orange' },
1086
+ { bucketKey: 'waiting', label: 'Waiting', rank: 30, color: 'blue' },
1087
+ { bucketKey: 'stale', label: 'Stale', rank: 40, color: 'gray' },
1088
+ { bucketKey: 'closed_low', label: 'Closed', rank: 50, color: 'dark' }
1089
+ ]
1090
+ ```
1091
+
1092
+ ### `DEFAULT_CRM_PRIORITY_RULE_CONFIG`
1093
+
1094
+ ```typescript
1095
+ export const DEFAULT_CRM_PRIORITY_RULE_CONFIG: CrmPriorityRuleConfig = {
1096
+ buckets: CRM_PRIORITY_BUCKETS,
1097
+ closedStageKeys: ['closed_won', 'closed_lost'],
1098
+ followUpAfterDaysByStateKey: {
1099
+ discovery_link_sent: 3,
1100
+ discovery_nudging: 2,
1101
+ reply_sent: 3,
1102
+ followup_1_sent: 3,
1103
+ followup_2_sent: 5,
1104
+ followup_3_sent: 7
1105
+ },
1106
+ staleAfterDays: 14
986
1107
  }
987
1108
  ```
988
1109
 
@@ -1141,6 +1262,20 @@ export const DealContactSummarySchema = z.object({
1141
1262
  })
1142
1263
  ```
1143
1264
 
1265
+ ### `DealPrioritySchema`
1266
+
1267
+ ```typescript
1268
+ export const DealPrioritySchema = z.object({
1269
+ bucketKey: z.enum(['needs_response', 'follow_up_due', 'waiting', 'stale', 'closed_low']),
1270
+ rank: z.number().int(),
1271
+ label: z.string(),
1272
+ color: z.string(),
1273
+ reason: z.string(),
1274
+ latestActivityAt: z.string().nullable(),
1275
+ nextActionAt: z.string().nullable()
1276
+ })
1277
+ ```
1278
+
1144
1279
  ### `DealListItemSchema`
1145
1280
 
1146
1281
  ```typescript
@@ -1173,6 +1308,9 @@ export const DealListItemSchema = z.object({
1173
1308
  closed_lost_reason: z.string().nullable(),
1174
1309
  created_at: z.string(),
1175
1310
  updated_at: z.string(),
1311
+ priority: DealPrioritySchema,
1312
+ ownership: z.enum(['us', 'them']).nullable(),
1313
+ nextAction: z.string().nullable(),
1176
1314
  // joined relation
1177
1315
  contact: DealContactSummarySchema.nullable()
1178
1316
  })
@@ -1194,9 +1332,11 @@ export const DealListResponseSchema = z.object({
1194
1332
  ```typescript
1195
1333
  /**
1196
1334
  * Deal detail shape — currently the same as a list item (full joined record).
1197
- * useDealDetail returns DealDetail which is typed as DealListItem.
1335
+ * Additive fields keep existing DealListItem callers compatible.
1198
1336
  */
1199
- export const DealDetailResponseSchema = DealListItemSchema
1337
+ export const DealDetailResponseSchema = DealListItemSchema.extend({
1338
+ conversation: DealConversationSchema
1339
+ })
1200
1340
  ```
1201
1341
 
1202
1342
  ### `DealNoteResponseSchema`
@@ -1274,9 +1414,11 @@ export const DealSchemas = {
1274
1414
  ExecuteActionRequest: ExecuteActionRequestSchema,
1275
1415
 
1276
1416
  // Responses
1417
+ DealPriority: DealPrioritySchema,
1277
1418
  DealListResponse: DealListResponseSchema,
1278
1419
  DealSummaryResponse: DealSummaryResponseSchema,
1279
1420
  DealLookupResponse: DealLookupResponseSchema,
1421
+ ConversationMessage: ConversationMessageSchema,
1280
1422
  DealDetailResponse: DealDetailResponseSchema,
1281
1423
  DealNoteResponse: DealNoteResponseSchema,
1282
1424
  DealNoteListResponse: DealNoteListResponseSchema,
@@ -1288,10 +1430,10 @@ export const DealSchemas = {
1288
1430
  ### `Action`
1289
1431
 
1290
1432
  ```typescript
1291
- export interface Action {
1292
- key: string
1293
- label: string
1294
- payloadSchema?: z.ZodTypeAny
1433
+ export interface Action {
1434
+ key: string
1435
+ label: string
1436
+ payloadSchema?: z.ZodTypeAny
1295
1437
  }
1296
1438
  ```
1297
1439
 
@@ -1310,83 +1452,84 @@ export interface ActionDef {
1310
1452
  ### `DEFAULT_CRM_ACTIONS`
1311
1453
 
1312
1454
  ```typescript
1313
- export const DEFAULT_CRM_ACTIONS: ActionDef[] = [
1314
- {
1315
- key: 'move_to_proposal',
1316
- label: 'Move to Proposal',
1317
- isAvailableFor: (deal) => deal.stage_key === 'interested',
1318
- workflowId: 'move_to_proposal-workflow'
1319
- },
1320
- {
1321
- key: 'move_to_closing',
1322
- label: 'Move to Closing',
1323
- isAvailableFor: (deal) => deal.stage_key === 'proposal',
1324
- workflowId: 'move_to_closing-workflow'
1325
- },
1326
- {
1327
- key: 'move_to_closed_won',
1328
- label: 'Close Won',
1329
- isAvailableFor: (deal) => deal.stage_key === 'closing',
1330
- workflowId: 'move_to_closed_won-workflow'
1331
- },
1332
- {
1333
- key: 'move_to_closed_lost',
1334
- label: 'Close Lost',
1335
- isAvailableFor: (deal) =>
1336
- deal.stage_key === 'interested' || deal.stage_key === 'proposal' || deal.stage_key === 'closing',
1337
- workflowId: 'move_to_closed_lost-workflow'
1338
- },
1339
- {
1340
- key: 'move_to_nurturing',
1341
- label: 'Move to Nurturing',
1342
- isAvailableFor: (deal) =>
1343
- deal.stage_key === 'interested' || deal.stage_key === 'proposal' || deal.stage_key === 'closing',
1344
- workflowId: 'move_to_nurturing-workflow'
1345
- },
1346
- {
1455
+ export const DEFAULT_CRM_ACTIONS: ActionDef[] = [
1456
+ {
1457
+ key: 'move_to_proposal',
1458
+ label: 'Move to Proposal',
1459
+ isAvailableFor: (deal) => deal.stage_key === 'interested',
1460
+ workflowId: 'move_to_proposal-workflow'
1461
+ },
1462
+ {
1463
+ key: 'move_to_closing',
1464
+ label: 'Move to Closing',
1465
+ isAvailableFor: (deal) => deal.stage_key === 'proposal',
1466
+ workflowId: 'move_to_closing-workflow'
1467
+ },
1468
+ {
1469
+ key: 'move_to_closed_won',
1470
+ label: 'Close Won',
1471
+ isAvailableFor: (deal) => deal.stage_key === 'closing',
1472
+ workflowId: 'move_to_closed_won-workflow'
1473
+ },
1474
+ {
1475
+ key: 'move_to_closed_lost',
1476
+ label: 'Close Lost',
1477
+ isAvailableFor: (deal) =>
1478
+ deal.stage_key === 'interested' || deal.stage_key === 'proposal' || deal.stage_key === 'closing',
1479
+ workflowId: 'move_to_closed_lost-workflow'
1480
+ },
1481
+ {
1482
+ key: 'move_to_nurturing',
1483
+ label: 'Move to Nurturing',
1484
+ isAvailableFor: (deal) =>
1485
+ deal.stage_key === 'interested' || deal.stage_key === 'proposal' || deal.stage_key === 'closing',
1486
+ workflowId: 'move_to_nurturing-workflow'
1487
+ },
1488
+ {
1347
1489
  key: 'send_reply',
1348
1490
  label: 'Send Reply',
1349
1491
  isAvailableFor: (deal) =>
1350
1492
  deal.stage_key === 'interested' &&
1493
+ isOurReplyAction(deal) &&
1351
1494
  (deal.state_key === CRM_DISCOVERY_REPLIED_STATE.stateKey ||
1352
1495
  deal.state_key === CRM_DISCOVERY_LINK_SENT_STATE.stateKey ||
1353
1496
  deal.state_key === CRM_DISCOVERY_NUDGING_STATE.stateKey),
1354
- workflowId: 'crm-send-reply-workflow',
1355
- payloadSchema: SendReplyActionPayloadSchema
1356
- },
1357
- {
1358
- key: 'send_link',
1359
- label: 'Send Booking Link',
1360
- isAvailableFor: (deal) =>
1361
- deal.stage_key === 'interested' && deal.state_key === CRM_DISCOVERY_REPLIED_STATE.stateKey,
1362
- workflowId: 'crm-send-booking-link-workflow'
1363
- },
1364
- {
1365
- key: 'send_nudge',
1366
- label: 'Send Nudge',
1367
- isAvailableFor: (deal) =>
1368
- deal.stage_key === 'interested' &&
1369
- (deal.state_key === CRM_DISCOVERY_LINK_SENT_STATE.stateKey ||
1370
- deal.state_key === CRM_DISCOVERY_NUDGING_STATE.stateKey),
1371
- workflowId: 'crm-send-nudge-workflow'
1372
- },
1373
- {
1374
- key: 'mark_no_show',
1375
- label: 'Mark No-Show',
1376
- isAvailableFor: (deal) =>
1377
- deal.stage_key === 'interested' && deal.state_key === CRM_DISCOVERY_NUDGING_STATE.stateKey,
1378
- // Mirrors the auto-timeout precedent in operations/sales/crm/pipeline/timeout-actions.ts:
1379
- // both manual-click and timeout move the deal to closed_lost. The action_taken activity
1380
- // event captures operator intent and distinguishes the manual variant from the timed one.
1381
- workflowId: 'mark_no_show-workflow'
1382
- },
1383
- {
1384
- key: 'rebook',
1385
- label: 'Rebook',
1386
- isAvailableFor: (deal) =>
1387
- deal.stage_key === 'interested' && deal.state_key === CRM_DISCOVERY_BOOKING_CANCELLED_STATE.stateKey,
1388
- workflowId: 'crm-rebook-workflow'
1389
- }
1497
+ workflowId: 'crm-send-reply-workflow',
1498
+ payloadSchema: SendReplyActionPayloadSchema
1499
+ },
1500
+ {
1501
+ key: 'send_link',
1502
+ label: 'Send Booking Link',
1503
+ isAvailableFor: (deal) =>
1504
+ deal.stage_key === 'interested' && deal.state_key === CRM_DISCOVERY_REPLIED_STATE.stateKey,
1505
+ workflowId: 'crm-send-booking-link-workflow'
1506
+ },
1507
+ {
1508
+ key: 'send_nudge',
1509
+ label: 'Send Nudge',
1510
+ isAvailableFor: (deal) =>
1511
+ deal.stage_key === 'interested' &&
1512
+ (deal.state_key === CRM_DISCOVERY_LINK_SENT_STATE.stateKey ||
1513
+ deal.state_key === CRM_DISCOVERY_NUDGING_STATE.stateKey),
1514
+ workflowId: 'crm-send-nudge-workflow'
1515
+ },
1516
+ {
1517
+ key: 'mark_no_show',
1518
+ label: 'Mark No-Show',
1519
+ isAvailableFor: (deal) =>
1520
+ deal.stage_key === 'interested' && deal.state_key === CRM_DISCOVERY_NUDGING_STATE.stateKey,
1521
+ // Mirrors the auto-timeout precedent in operations/sales/crm/pipeline/timeout-actions.ts:
1522
+ // both manual-click and timeout move the deal to closed_lost. The action_taken activity
1523
+ // event captures operator intent and distinguishes the manual variant from the timed one.
1524
+ workflowId: 'mark_no_show-workflow'
1525
+ },
1526
+ {
1527
+ key: 'rebook',
1528
+ label: 'Rebook',
1529
+ isAvailableFor: (deal) =>
1530
+ deal.stage_key === 'interested' && deal.state_key === CRM_DISCOVERY_BOOKING_CANCELLED_STATE.stateKey,
1531
+ workflowId: 'crm-rebook-workflow'
1532
+ }
1390
1533
  ]
1391
1534
  ```
1392
1535
 
@@ -1414,263 +1557,263 @@ export type CrmToolMap = {
1414
1557
  ### `WebPost`
1415
1558
 
1416
1559
  ```typescript
1417
- /**
1418
- * Represents a web post from company website scraping.
1419
- * Used for recent blog posts, news, or announcements.
1420
- */
1421
- export interface WebPost {
1422
- /** ISO date string of when the post was published */
1423
- date: string
1424
- /** Title of the web post */
1425
- title: string
1426
- /** Brief summary of the post content */
1427
- summary: string
1428
- /** AI-generated insight about the post's relevance */
1429
- aiInsight?: string
1560
+ /**
1561
+ * Represents a web post from company website scraping.
1562
+ * Used for recent blog posts, news, or announcements.
1563
+ */
1564
+ export interface WebPost {
1565
+ /** ISO date string of when the post was published */
1566
+ date: string
1567
+ /** Title of the web post */
1568
+ title: string
1569
+ /** Brief summary of the post content */
1570
+ summary: string
1571
+ /** AI-generated insight about the post's relevance */
1572
+ aiInsight?: string
1430
1573
  }
1431
1574
  ```
1432
1575
 
1433
1576
  ### `CompanyPipelineStatus`
1434
1577
 
1435
1578
  ```typescript
1436
- /**
1437
- * Tracks pipeline status for a company across all processing stages.
1438
- */
1439
- export interface CompanyPipelineStatus {
1440
- acquired: boolean
1441
- enrichment: {
1442
- [source: string]: {
1443
- status: 'pending' | 'complete' | 'failed' | 'skipped'
1444
- completedAt?: string
1445
- error?: string
1446
- }
1447
- }
1579
+ /**
1580
+ * Tracks pipeline status for a company across all processing stages.
1581
+ */
1582
+ export interface CompanyPipelineStatus {
1583
+ acquired: boolean
1584
+ enrichment: {
1585
+ [source: string]: {
1586
+ status: 'pending' | 'complete' | 'failed' | 'skipped'
1587
+ completedAt?: string
1588
+ error?: string
1589
+ }
1590
+ }
1448
1591
  }
1449
1592
  ```
1450
1593
 
1451
1594
  ### `ContactPipelineStatus`
1452
1595
 
1453
1596
  ```typescript
1454
- /**
1455
- * Tracks pipeline status for a contact across all processing stages.
1456
- */
1457
- export interface ContactPipelineStatus {
1458
- enrichment: {
1459
- [source: string]: {
1460
- status: 'pending' | 'complete' | 'failed' | 'skipped'
1461
- completedAt?: string
1462
- error?: string
1463
- }
1464
- }
1465
- personalization: {
1466
- status: 'pending' | 'complete' | 'failed' | 'skipped'
1467
- completedAt?: string
1468
- }
1469
- outreach: {
1470
- status: 'pending' | 'sent' | 'replied' | 'bounced' | 'opted-out'
1471
- sentAt?: string
1472
- channel?: string
1473
- campaignId?: string
1474
- }
1597
+ /**
1598
+ * Tracks pipeline status for a contact across all processing stages.
1599
+ */
1600
+ export interface ContactPipelineStatus {
1601
+ enrichment: {
1602
+ [source: string]: {
1603
+ status: 'pending' | 'complete' | 'failed' | 'skipped'
1604
+ completedAt?: string
1605
+ error?: string
1606
+ }
1607
+ }
1608
+ personalization: {
1609
+ status: 'pending' | 'complete' | 'failed' | 'skipped'
1610
+ completedAt?: string
1611
+ }
1612
+ outreach: {
1613
+ status: 'pending' | 'sent' | 'replied' | 'bounced' | 'opted-out'
1614
+ sentAt?: string
1615
+ channel?: string
1616
+ campaignId?: string
1617
+ }
1475
1618
  }
1476
1619
  ```
1477
1620
 
1478
1621
  ### `CompanyEnrichmentData`
1479
1622
 
1480
1623
  ```typescript
1481
- /**
1482
- * Enrichment data collected for a company from various sources.
1483
- */
1484
- export interface CompanyEnrichmentData {
1485
- googleMaps?: {
1486
- placeId?: string
1487
- totalScore?: number
1488
- reviewsCount?: number
1489
- address?: string
1490
- phone?: string
1491
- categoryName?: string
1492
- googleMapsUrl?: string
1493
- scrapedAt?: string
1494
- }
1495
- websiteCrawl?: {
1496
- companyDescription?: string
1497
- services?: string[]
1498
- specialties?: string[]
1499
- staff?: Array<{ name: string; title?: string; email?: string }>
1500
- automationGaps?: string[]
1501
- targetAudience?: string
1502
- category?: string
1503
- segment?: string
1504
- recentWin?: string
1505
- emailCount?: number
1506
- pageCount?: number
1507
- totalChars?: number
1508
- crawledAt?: string
1509
- extractedAt?: string
1510
- }
1511
- website?: {
1512
- missionVision?: string
1513
- uniqueAttributes?: string
1514
- coreOfferings?: string
1515
- targetAudience?: string
1516
- companyValues?: string
1517
- businessDescription?: string
1518
- recentPosts?: Array<{ date?: string; title?: string; summary?: string; aiInsight?: string }>
1519
- }
1520
- tomba?: {
1521
- waterfallEmail?: {
1522
- email: string
1523
- name?: string
1524
- title?: string
1525
- department?: string
1526
- } | null
1527
- genericEmail?: string | null
1528
- totalFound?: number
1529
- searchedAt?: string
1530
- }
1624
+ /**
1625
+ * Enrichment data collected for a company from various sources.
1626
+ */
1627
+ export interface CompanyEnrichmentData {
1628
+ googleMaps?: {
1629
+ placeId?: string
1630
+ totalScore?: number
1631
+ reviewsCount?: number
1632
+ address?: string
1633
+ phone?: string
1634
+ categoryName?: string
1635
+ googleMapsUrl?: string
1636
+ scrapedAt?: string
1637
+ }
1638
+ websiteCrawl?: {
1639
+ companyDescription?: string
1640
+ services?: string[]
1641
+ specialties?: string[]
1642
+ staff?: Array<{ name: string; title?: string; email?: string }>
1643
+ automationGaps?: string[]
1644
+ targetAudience?: string
1645
+ category?: string
1646
+ segment?: string
1647
+ recentWin?: string
1648
+ emailCount?: number
1649
+ pageCount?: number
1650
+ totalChars?: number
1651
+ crawledAt?: string
1652
+ extractedAt?: string
1653
+ }
1654
+ website?: {
1655
+ missionVision?: string
1656
+ uniqueAttributes?: string
1657
+ coreOfferings?: string
1658
+ targetAudience?: string
1659
+ companyValues?: string
1660
+ businessDescription?: string
1661
+ recentPosts?: Array<{ date?: string; title?: string; summary?: string; aiInsight?: string }>
1662
+ }
1663
+ tomba?: {
1664
+ waterfallEmail?: {
1665
+ email: string
1666
+ name?: string
1667
+ title?: string
1668
+ department?: string
1669
+ } | null
1670
+ genericEmail?: string | null
1671
+ totalFound?: number
1672
+ searchedAt?: string
1673
+ }
1531
1674
  }
1532
1675
  ```
1533
1676
 
1534
1677
  ### `ContactEnrichmentData`
1535
1678
 
1536
1679
  ```typescript
1537
- /**
1538
- * Enrichment data collected for a contact from various sources.
1539
- */
1540
- export interface ContactEnrichmentData {
1541
- linkedin?: {
1542
- summary?: string
1543
- pastExperience?: string
1544
- education?: string
1545
- activity?: Array<{ date?: string; content?: string }>
1546
- }
1680
+ /**
1681
+ * Enrichment data collected for a contact from various sources.
1682
+ */
1683
+ export interface ContactEnrichmentData {
1684
+ linkedin?: {
1685
+ summary?: string
1686
+ pastExperience?: string
1687
+ education?: string
1688
+ activity?: Array<{ date?: string; content?: string }>
1689
+ }
1547
1690
  }
1548
1691
  ```
1549
1692
 
1550
1693
  ### `AcqList`
1551
1694
 
1552
1695
  ```typescript
1553
- export interface AcqList {
1554
- id: string
1555
- organizationId: string
1556
- name: string
1557
- description: string | null
1558
- batchIds: string[]
1559
- instantlyCampaignId: string | null
1560
- status: ListStatus
1561
- scrapingConfig: ScrapingConfig
1562
- icp: IcpRubric
1563
- pipelineConfig: PipelineConfig
1564
- metadata: Record<string, unknown>
1565
- launchedAt: Date | null
1566
- completedAt: Date | null
1567
- createdAt: Date
1696
+ export interface AcqList {
1697
+ id: string
1698
+ organizationId: string
1699
+ name: string
1700
+ description: string | null
1701
+ batchIds: string[]
1702
+ instantlyCampaignId: string | null
1703
+ status: ListStatus
1704
+ scrapingConfig: ScrapingConfig
1705
+ icp: IcpRubric
1706
+ pipelineConfig: PipelineConfig
1707
+ metadata: AcqListMetadata
1708
+ launchedAt: Date | null
1709
+ completedAt: Date | null
1710
+ createdAt: Date
1568
1711
  }
1569
1712
  ```
1570
1713
 
1571
1714
  ### `AcqCompany`
1572
1715
 
1573
1716
  ```typescript
1574
- /**
1575
- * Company record in the acquisition database.
1576
- * Contains enriched company data from various sources.
1577
- * Transformed from AcqCompanyRow with camelCase properties.
1578
- */
1579
- export interface AcqCompany {
1580
- id: string
1581
- organizationId: string
1582
- name: string
1583
- domain: string | null
1584
- linkedinUrl: string | null
1585
- website: string | null
1586
- numEmployees: number | null
1587
- foundedYear: number | null
1588
- locationCity: string | null
1589
- locationState: string | null
1590
- category: string | null
1591
- categoryPain: string | null
1592
- segment: string | null
1593
- pipelineStatus: CompanyPipelineStatus | null
1594
- enrichmentData: CompanyEnrichmentData | null
1595
- source: string | null
1596
- batchId: string | null
1597
- status: 'active' | 'invalid'
1598
- verticalResearch: string | null
1599
- /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
1600
- qualificationScore: number | null
1601
- /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
1602
- qualificationSignals: Record<string, unknown> | null
1603
- /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
1604
- qualificationRubricKey: string | null
1605
- createdAt: Date
1606
- updatedAt: Date
1717
+ /**
1718
+ * Company record in the acquisition database.
1719
+ * Contains enriched company data from various sources.
1720
+ * Transformed from AcqCompanyRow with camelCase properties.
1721
+ */
1722
+ export interface AcqCompany {
1723
+ id: string
1724
+ organizationId: string
1725
+ name: string
1726
+ domain: string | null
1727
+ linkedinUrl: string | null
1728
+ website: string | null
1729
+ numEmployees: number | null
1730
+ foundedYear: number | null
1731
+ locationCity: string | null
1732
+ locationState: string | null
1733
+ category: string | null
1734
+ categoryPain: string | null
1735
+ segment: string | null
1736
+ pipelineStatus: CompanyPipelineStatus | null
1737
+ enrichmentData: CompanyEnrichmentData | null
1738
+ source: string | null
1739
+ batchId: string | null
1740
+ status: 'active' | 'invalid'
1741
+ verticalResearch: string | null
1742
+ /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
1743
+ qualificationScore: number | null
1744
+ /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
1745
+ qualificationSignals: Record<string, unknown> | null
1746
+ /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
1747
+ qualificationRubricKey: string | null
1748
+ createdAt: Date
1749
+ updatedAt: Date
1607
1750
  }
1608
1751
  ```
1609
1752
 
1610
1753
  ### `AcqContact`
1611
1754
 
1612
1755
  ```typescript
1613
- /**
1614
- * Contact record in the acquisition database.
1615
- * Contains enriched contact data and personalization content.
1616
- * Transformed from AcqContactRow with camelCase properties.
1617
- */
1618
- export interface AcqContact {
1619
- id: string
1620
- organizationId: string
1621
- companyId: string | null
1622
- email: string
1623
- emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
1624
- firstName: string | null
1625
- lastName: string | null
1626
- linkedinUrl: string | null
1627
- title: string | null
1628
- headline: string | null
1629
- filterReason: string | null
1630
- openingLine: string | null
1631
- source: string | null
1632
- sourceId: string | null
1633
- pipelineStatus: ContactPipelineStatus | null
1634
- enrichmentData: ContactEnrichmentData | null
1635
- /** Attio Person record ID - set when contact responds and is added to CRM */
1636
- attioPersonId: string | null
1637
- batchId: string | null
1638
- status: 'active' | 'invalid'
1639
- createdAt: Date
1640
- updatedAt: Date
1756
+ /**
1757
+ * Contact record in the acquisition database.
1758
+ * Contains enriched contact data and personalization content.
1759
+ * Transformed from AcqContactRow with camelCase properties.
1760
+ */
1761
+ export interface AcqContact {
1762
+ id: string
1763
+ organizationId: string
1764
+ companyId: string | null
1765
+ email: string
1766
+ emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
1767
+ firstName: string | null
1768
+ lastName: string | null
1769
+ linkedinUrl: string | null
1770
+ title: string | null
1771
+ headline: string | null
1772
+ filterReason: string | null
1773
+ openingLine: string | null
1774
+ source: string | null
1775
+ sourceId: string | null
1776
+ pipelineStatus: ContactPipelineStatus | null
1777
+ enrichmentData: ContactEnrichmentData | null
1778
+ /** Attio Person record ID - set when contact responds and is added to CRM */
1779
+ attioPersonId: string | null
1780
+ batchId: string | null
1781
+ status: 'active' | 'invalid'
1782
+ createdAt: Date
1783
+ updatedAt: Date
1641
1784
  }
1642
1785
  ```
1643
1786
 
1644
1787
  ### `ListTelemetry`
1645
1788
 
1646
1789
  ```typescript
1647
- /**
1790
+ /**
1648
1791
  * Live-scan aggregate telemetry for a single list, computed on demand from
1649
1792
  * the list junction tables and current contact deliverability state.
1650
1793
  * `stageCounts` are attempted counts from list-row processing_state.
1651
1794
  */
1652
- export interface ListTelemetry {
1653
- listId: string
1654
- totalCompanies: number
1655
- totalContacts: number
1656
- stageCounts: {
1657
- populated: number
1658
- extracted: number
1659
- qualified: number
1660
- discovered: number
1661
- verified: number
1662
- personalized: number
1663
- uploaded: number
1664
- }
1665
- deliverability: {
1666
- valid: number
1667
- risky: number
1668
- invalid: number
1669
- unknown: number
1670
- bounced: number
1671
- }
1672
- /** Reserved -- active workflow IDs associated with this list. */
1673
- activeWorkflows?: string[]
1795
+ export interface ListTelemetry {
1796
+ listId: string
1797
+ totalCompanies: number
1798
+ totalContacts: number
1799
+ stageCounts: {
1800
+ populated: number
1801
+ extracted: number
1802
+ qualified: number
1803
+ discovered: number
1804
+ verified: number
1805
+ personalized: number
1806
+ uploaded: number
1807
+ }
1808
+ deliverability: {
1809
+ valid: number
1810
+ risky: number
1811
+ invalid: number
1812
+ unknown: number
1813
+ bounced: number
1814
+ }
1815
+ /** Reserved -- active workflow IDs associated with this list. */
1816
+ activeWorkflows?: string[]
1674
1817
  }
1675
1818
  ```
1676
1819
 
@@ -1728,6 +1871,7 @@ export const CreateListRequestSchema = z
1728
1871
  name: z.string().trim().min(1).max(255),
1729
1872
  description: z.string().trim().nullable().optional(),
1730
1873
  status: ListStatusSchema.optional(),
1874
+ buildTemplateId: ProspectingBuildTemplateIdSchema.optional(),
1731
1875
  scrapingConfig: ScrapingConfigSchema.optional(),
1732
1876
  icp: IcpRubricSchema.optional(),
1733
1877
  pipelineConfig: PipelineConfigSchema.optional()
@@ -1742,11 +1886,24 @@ export const UpdateListRequestSchema = z
1742
1886
  .object({
1743
1887
  name: z.string().trim().min(1).max(255).optional(),
1744
1888
  description: z.string().trim().nullable().optional(),
1745
- batchIds: z.array(z.string()).optional()
1889
+ batchIds: z.array(z.string()).optional(),
1890
+ buildTemplateId: ProspectingBuildTemplateIdSchema.optional(),
1891
+ confirmBuildTemplateChange: z.literal(true).optional()
1746
1892
  })
1747
1893
  .strict()
1748
- .refine((data) => data.name !== undefined || data.description !== undefined || data.batchIds !== undefined, {
1749
- message: 'At least one field (name, description, or batchIds) must be provided'
1894
+ .refine(
1895
+ (data) =>
1896
+ data.name !== undefined ||
1897
+ data.description !== undefined ||
1898
+ data.batchIds !== undefined ||
1899
+ data.buildTemplateId !== undefined,
1900
+ {
1901
+ message: 'At least one field (name, description, batchIds, or buildTemplateId) must be provided'
1902
+ }
1903
+ )
1904
+ .refine((data) => data.buildTemplateId === undefined || data.confirmBuildTemplateChange === true, {
1905
+ message: 'confirmBuildTemplateChange must be true when changing buildTemplateId',
1906
+ path: ['confirmBuildTemplateChange']
1750
1907
  })
1751
1908
  ```
1752
1909
 
@@ -1823,12 +1980,11 @@ export const AcqListResponseSchema = z.object({
1823
1980
  organizationId: z.string(),
1824
1981
  name: z.string(),
1825
1982
  description: z.string().nullable(),
1826
- type: z.string(),
1827
1983
  batchIds: z.array(z.string()),
1828
1984
  instantlyCampaignId: z.string().nullable(),
1829
1985
  /** Lifecycle status (draft | enriching | launched | closing | archived). */
1830
1986
  status: ListStatusSchema,
1831
- metadata: z.record(z.string(), z.unknown()),
1987
+ metadata: AcqListMetadataSchema,
1832
1988
  launchedAt: z.string().nullable(),
1833
1989
  completedAt: z.string().nullable(),
1834
1990
  createdAt: z.string(),
@@ -1872,7 +2028,8 @@ export const ListExecutionSummarySchema = z.object({
1872
2028
  status: z.string(),
1873
2029
  createdAt: z.string(),
1874
2030
  completedAt: z.string().nullable(),
1875
- durationMs: z.number().int().nullable()
2031
+ durationMs: z.number().int().nullable(),
2032
+ input: z.unknown().nullable().optional()
1876
2033
  })
1877
2034
  ```
1878
2035
 
@@ -2362,6 +2519,9 @@ export const AcqListSchemas = {
2362
2519
  IcpRubric: IcpRubricSchema,
2363
2520
  PipelineConfig: PipelineConfigSchema,
2364
2521
  PipelineStage: PipelineStageSchema,
2522
+ BuildPlanSnapshot: BuildPlanSnapshotSchema,
2523
+ BuildPlanSnapshotStep: BuildPlanSnapshotStepSchema,
2524
+ AcqListMetadata: AcqListMetadataSchema,
2365
2525
  ProcessingStageStatus: ProcessingStageStatusSchema,
2366
2526
  ListStageCounts: ListStageCountsSchema,
2367
2527
  ListTelemetry: ListTelemetrySchema,
@@ -2592,97 +2752,98 @@ export const LEAD_GEN_PIPELINE_DEFINITIONS: Record<string, StatefulPipelineDefin
2592
2752
  ### `PaginationParams`
2593
2753
 
2594
2754
  ```typescript
2595
- export interface PaginationParams {
2596
- limit: number
2597
- offset: number
2755
+ export interface PaginationParams {
2756
+ limit: number
2757
+ offset: number
2598
2758
  }
2599
2759
  ```
2600
2760
 
2601
2761
  ### `PaginatedResult`
2602
2762
 
2603
2763
  ```typescript
2604
- export interface PaginatedResult<T> {
2605
- data: T[]
2606
- total: number
2607
- limit: number
2608
- offset: number
2764
+ export interface PaginatedResult<T> {
2765
+ data: T[]
2766
+ total: number
2767
+ limit: number
2768
+ offset: number
2609
2769
  }
2610
2770
  ```
2611
2771
 
2612
2772
  ### `CreateListParams`
2613
2773
 
2614
2774
  ```typescript
2615
- export interface CreateListParams {
2616
- organizationId: string
2617
- name: string
2618
- description?: string
2619
- type?: string
2620
- batchIds?: string[]
2621
- instantlyCampaignId?: string
2622
- status?: ListStatus
2623
- metadata?: Record<string, unknown>
2624
- scrapingConfig?: ScrapingConfig
2625
- icp?: IcpRubric
2626
- pipelineConfig?: PipelineConfig
2775
+ export interface CreateListParams {
2776
+ organizationId: string
2777
+ name: string
2778
+ description?: string
2779
+ type?: string
2780
+ batchIds?: string[]
2781
+ instantlyCampaignId?: string
2782
+ status?: ListStatus
2783
+ buildTemplateId?: string
2784
+ metadata?: Record<string, unknown>
2785
+ scrapingConfig?: ScrapingConfig
2786
+ icp?: IcpRubric
2787
+ pipelineConfig?: PipelineConfig
2627
2788
  }
2628
2789
  ```
2629
2790
 
2630
2791
  ### `UpdateListParams`
2631
2792
 
2632
2793
  ```typescript
2633
- export interface UpdateListParams {
2634
- name?: string
2635
- description?: string
2636
- batchIds?: string[]
2794
+ export interface UpdateListParams {
2795
+ name?: string
2796
+ description?: string
2797
+ batchIds?: string[]
2637
2798
  }
2638
2799
  ```
2639
2800
 
2640
2801
  ### `CreateCompanyParams`
2641
2802
 
2642
2803
  ```typescript
2643
- export interface CreateCompanyParams {
2644
- organizationId: string
2645
- name: string
2646
- domain?: string
2647
- linkedinUrl?: string
2648
- website?: string
2649
- numEmployees?: number
2650
- foundedYear?: number
2651
- locationCity?: string
2652
- locationState?: string
2653
- category?: string
2654
- source?: string
2655
- batchId?: string
2656
- verticalResearch?: string
2804
+ export interface CreateCompanyParams {
2805
+ organizationId: string
2806
+ name: string
2807
+ domain?: string
2808
+ linkedinUrl?: string
2809
+ website?: string
2810
+ numEmployees?: number
2811
+ foundedYear?: number
2812
+ locationCity?: string
2813
+ locationState?: string
2814
+ category?: string
2815
+ source?: string
2816
+ batchId?: string
2817
+ verticalResearch?: string
2657
2818
  }
2658
2819
  ```
2659
2820
 
2660
2821
  ### `UpdateCompanyParams`
2661
2822
 
2662
2823
  ```typescript
2663
- export interface UpdateCompanyParams {
2664
- name?: string
2665
- domain?: string
2666
- linkedinUrl?: string
2667
- website?: string
2668
- numEmployees?: number
2669
- foundedYear?: number
2670
- locationCity?: string
2671
- locationState?: string
2672
- category?: string
2673
- segment?: string
2674
- pipelineStatus?: Record<string, unknown>
2675
- enrichmentData?: Record<string, unknown>
2676
- source?: string
2677
- batchId?: string
2678
- status?: 'active' | 'invalid'
2679
- verticalResearch?: string | null
2680
- /** Track A: flat qualification score column (null until a scoring rubric is defined) */
2681
- qualificationScore?: number | null
2682
- /** Track A: flat qualification signals jsonb — mirrors the former pipeline_status.qualification shape */
2683
- qualificationSignals?: Record<string, unknown> | null
2684
- /** Track A: key identifying the rubric used for qualification */
2685
- qualificationRubricKey?: string | null
2824
+ export interface UpdateCompanyParams {
2825
+ name?: string
2826
+ domain?: string
2827
+ linkedinUrl?: string
2828
+ website?: string
2829
+ numEmployees?: number
2830
+ foundedYear?: number
2831
+ locationCity?: string
2832
+ locationState?: string
2833
+ category?: string
2834
+ segment?: string
2835
+ pipelineStatus?: Record<string, unknown>
2836
+ enrichmentData?: Record<string, unknown>
2837
+ source?: string
2838
+ batchId?: string
2839
+ status?: 'active' | 'invalid'
2840
+ verticalResearch?: string | null
2841
+ /** Track A: flat qualification score column (null until a scoring rubric is defined) */
2842
+ qualificationScore?: number | null
2843
+ /** Track A: flat qualification signals jsonb — mirrors the former pipeline_status.qualification shape */
2844
+ qualificationSignals?: Record<string, unknown> | null
2845
+ /** Track A: key identifying the rubric used for qualification */
2846
+ qualificationRubricKey?: string | null
2686
2847
  }
2687
2848
  ```
2688
2849
 
@@ -2695,56 +2856,57 @@ export type UpsertCompanyParams = CreateCompanyParams
2695
2856
  ### `CompanyFilters`
2696
2857
 
2697
2858
  ```typescript
2698
- export interface CompanyFilters {
2699
- listId?: string // Filter to companies in a specific list (via acq_list_companies)
2700
- search?: string
2701
- domain?: string
2702
- website?: string
2703
- segment?: string
2704
- category?: string
2705
- pipelineStatus?: Record<string, unknown>
2706
- /** Exclude companies whose pipeline_status contains this value (PostgREST NOT contains) */
2707
- pipelineStatusNot?: Record<string, unknown>
2708
- batchId?: string
2709
- status?: 'active' | 'invalid'
2710
- includeAll?: boolean
2711
- excludeColumns?: Array<'enrichmentData' | 'pipelineStatus'>
2859
+ export interface CompanyFilters {
2860
+ listId?: string // Filter to companies in a specific list (via acq_list_companies)
2861
+ search?: string
2862
+ domain?: string
2863
+ website?: string
2864
+ segment?: string
2865
+ category?: string
2866
+ pipelineStatus?: Record<string, unknown>
2867
+ /** Exclude companies whose pipeline_status contains this value (PostgREST NOT contains) */
2868
+ pipelineStatusNot?: Record<string, unknown>
2869
+ batchId?: string
2870
+ status?: 'active' | 'invalid'
2871
+ includeAll?: boolean
2872
+ excludeColumns?: Array<'enrichmentData' | 'pipelineStatus'>
2873
+ limit?: number
2712
2874
  }
2713
2875
  ```
2714
2876
 
2715
2877
  ### `CreateContactParams`
2716
2878
 
2717
2879
  ```typescript
2718
- export interface CreateContactParams {
2719
- organizationId: string
2720
- email: string
2721
- companyId?: string
2722
- firstName?: string
2723
- lastName?: string
2724
- linkedinUrl?: string
2725
- title?: string
2726
- source?: string
2727
- sourceId?: string
2728
- batchId?: string
2880
+ export interface CreateContactParams {
2881
+ organizationId: string
2882
+ email: string
2883
+ companyId?: string
2884
+ firstName?: string
2885
+ lastName?: string
2886
+ linkedinUrl?: string
2887
+ title?: string
2888
+ source?: string
2889
+ sourceId?: string
2890
+ batchId?: string
2729
2891
  }
2730
2892
  ```
2731
2893
 
2732
2894
  ### `UpdateContactParams`
2733
2895
 
2734
2896
  ```typescript
2735
- export interface UpdateContactParams {
2736
- companyId?: string
2737
- emailValid?: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN'
2738
- firstName?: string
2739
- lastName?: string
2740
- linkedinUrl?: string
2741
- title?: string
2742
- headline?: string
2743
- filterReason?: string
2744
- openingLine?: string
2745
- pipelineStatus?: Record<string, unknown>
2746
- enrichmentData?: Record<string, unknown>
2747
- status?: 'active' | 'invalid'
2897
+ export interface UpdateContactParams {
2898
+ companyId?: string
2899
+ emailValid?: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN'
2900
+ firstName?: string
2901
+ lastName?: string
2902
+ linkedinUrl?: string
2903
+ title?: string
2904
+ headline?: string
2905
+ filterReason?: string
2906
+ openingLine?: string
2907
+ pipelineStatus?: Record<string, unknown>
2908
+ enrichmentData?: Record<string, unknown>
2909
+ status?: 'active' | 'invalid'
2748
2910
  }
2749
2911
  ```
2750
2912
 
@@ -2757,87 +2919,87 @@ export type UpsertContactParams = CreateContactParams
2757
2919
  ### `ContactFilters`
2758
2920
 
2759
2921
  ```typescript
2760
- export interface ContactFilters {
2761
- listId?: string // Filter to contacts in a specific list (via acq_list_members)
2762
- search?: string
2763
- openingLineIsNull?: boolean // Filter to contacts without personalization
2764
- pipelineStatus?: Record<string, unknown>
2765
- batchId?: string
2766
- contactStatus?: 'active' | 'invalid' // Filter by contact status (soft-delete flag)
2922
+ export interface ContactFilters {
2923
+ listId?: string // Filter to contacts in a specific list (via acq_list_members)
2924
+ search?: string
2925
+ openingLineIsNull?: boolean // Filter to contacts without personalization
2926
+ pipelineStatus?: Record<string, unknown>
2927
+ batchId?: string
2928
+ contactStatus?: 'active' | 'invalid' // Filter by contact status (soft-delete flag)
2767
2929
  }
2768
2930
  ```
2769
2931
 
2770
2932
  ### `UpsertSocialPostParams`
2771
2933
 
2772
2934
  ```typescript
2773
- export interface UpsertSocialPostParams {
2774
- organizationId: string
2775
- platform: string
2776
- platformPostId: string
2777
- authorName: string
2778
- authorUrl?: string | null
2779
- postTitle: string
2780
- postText: string
2781
- postUrl: string
2782
- engagementCount?: number
2783
- commentsCount?: number
2784
- postedAt: string
2785
- metadata?: Record<string, unknown>
2786
- relevanceScore?: number
2787
- matchedKeywords?: string[]
2788
- matchedQuery?: string | null
2789
- initialDraft?: string | null
2790
- finalResponse?: string | null
2791
- sourceCategory?: string | null
2935
+ export interface UpsertSocialPostParams {
2936
+ organizationId: string
2937
+ platform: string
2938
+ platformPostId: string
2939
+ authorName: string
2940
+ authorUrl?: string | null
2941
+ postTitle: string
2942
+ postText: string
2943
+ postUrl: string
2944
+ engagementCount?: number
2945
+ commentsCount?: number
2946
+ postedAt: string
2947
+ metadata?: Record<string, unknown>
2948
+ relevanceScore?: number
2949
+ matchedKeywords?: string[]
2950
+ matchedQuery?: string | null
2951
+ initialDraft?: string | null
2952
+ finalResponse?: string | null
2953
+ sourceCategory?: string | null
2792
2954
  }
2793
2955
  ```
2794
2956
 
2795
2957
  ### `UpsertSocialPostsParams`
2796
2958
 
2797
2959
  ```typescript
2798
- export interface UpsertSocialPostsParams {
2799
- organizationId: string
2800
- posts: Omit<UpsertSocialPostParams, 'organizationId'>[]
2960
+ export interface UpsertSocialPostsParams {
2961
+ organizationId: string
2962
+ posts: Omit<UpsertSocialPostParams, 'organizationId'>[]
2801
2963
  }
2802
2964
  ```
2803
2965
 
2804
2966
  ### `UpsertSocialPostsResult`
2805
2967
 
2806
2968
  ```typescript
2807
- export interface UpsertSocialPostsResult {
2808
- inserted: number
2809
- duplicatesSkipped: number
2969
+ export interface UpsertSocialPostsResult {
2970
+ inserted: number
2971
+ duplicatesSkipped: number
2810
2972
  }
2811
2973
  ```
2812
2974
 
2813
2975
  ### `AddContactsToListParams`
2814
2976
 
2815
2977
  ```typescript
2816
- export interface AddContactsToListParams {
2817
- organizationId: string
2818
- listId: string
2819
- contactIds: string[]
2978
+ export interface AddContactsToListParams {
2979
+ organizationId: string
2980
+ listId: string
2981
+ contactIds: string[]
2820
2982
  }
2821
2983
  ```
2822
2984
 
2823
2985
  ### `AddContactsToListResult`
2824
2986
 
2825
2987
  ```typescript
2826
- export interface AddContactsToListResult {
2827
- added: number
2828
- alreadyExisted: number
2988
+ export interface AddContactsToListResult {
2989
+ added: number
2990
+ alreadyExisted: number
2829
2991
  }
2830
2992
  ```
2831
2993
 
2832
2994
  ### `UpdateListConfigParams`
2833
2995
 
2834
2996
  ```typescript
2835
- export interface UpdateListConfigParams {
2836
- organizationId: string
2837
- listId: string
2838
- scrapingConfig?: ScrapingConfig
2839
- icp?: IcpRubric
2840
- pipelineConfig?: PipelineConfig
2997
+ export interface UpdateListConfigParams {
2998
+ organizationId: string
2999
+ listId: string
3000
+ scrapingConfig?: ScrapingConfig
3001
+ icp?: IcpRubric
3002
+ pipelineConfig?: PipelineConfig
2841
3003
  }
2842
3004
  ```
2843
3005
 
@@ -2870,117 +3032,117 @@ export interface UpdateContactStageParams {
2870
3032
  ### `AddCompaniesToListParams`
2871
3033
 
2872
3034
  ```typescript
2873
- export interface AddCompaniesToListParams {
2874
- organizationId: string
2875
- listId: string
2876
- companyIds: string[]
3035
+ export interface AddCompaniesToListParams {
3036
+ organizationId: string
3037
+ listId: string
3038
+ companyIds: string[]
2877
3039
  }
2878
3040
  ```
2879
3041
 
2880
3042
  ### `AddCompaniesToListResult`
2881
3043
 
2882
3044
  ```typescript
2883
- export interface AddCompaniesToListResult {
2884
- added: number
2885
- alreadyExisted: number
3045
+ export interface AddCompaniesToListResult {
3046
+ added: number
3047
+ alreadyExisted: number
2886
3048
  }
2887
3049
  ```
2888
3050
 
2889
3051
  ### `RemoveCompaniesFromListParams`
2890
3052
 
2891
3053
  ```typescript
2892
- export interface RemoveCompaniesFromListParams {
2893
- organizationId: string
2894
- listId: string
2895
- companyIds: string[]
3054
+ export interface RemoveCompaniesFromListParams {
3055
+ organizationId: string
3056
+ listId: string
3057
+ companyIds: string[]
2896
3058
  }
2897
3059
  ```
2898
3060
 
2899
3061
  ### `RemoveCompaniesFromListResult`
2900
3062
 
2901
3063
  ```typescript
2902
- export interface RemoveCompaniesFromListResult {
2903
- removed: number
3064
+ export interface RemoveCompaniesFromListResult {
3065
+ removed: number
2904
3066
  }
2905
3067
  ```
2906
3068
 
2907
3069
  ### `RecordListExecutionParams`
2908
3070
 
2909
3071
  ```typescript
2910
- export interface RecordListExecutionParams {
2911
- organizationId: string
2912
- listId: string
2913
- executionId: string
2914
- configSnapshot?: Record<string, unknown>
3072
+ export interface RecordListExecutionParams {
3073
+ organizationId: string
3074
+ listId: string
3075
+ executionId: string
3076
+ configSnapshot?: Record<string, unknown>
2915
3077
  }
2916
3078
  ```
2917
3079
 
2918
3080
  ### `ListExecutionSummary`
2919
3081
 
2920
3082
  ```typescript
2921
- export interface ListExecutionSummary {
2922
- executionId: string
2923
- resourceId: string
2924
- status: string
2925
- createdAt: string
2926
- completedAt: string | null
2927
- durationMs: number | null
3083
+ export interface ListExecutionSummary {
3084
+ executionId: string
3085
+ resourceId: string
3086
+ status: string
3087
+ createdAt: string
3088
+ completedAt: string | null
3089
+ durationMs: number | null
2928
3090
  }
2929
3091
  ```
2930
3092
 
2931
3093
  ### `BulkImportParams`
2932
3094
 
2933
3095
  ```typescript
2934
- export interface BulkImportParams {
2935
- organizationId: string
2936
- contacts: CreateContactParams[]
2937
- listId?: string
3096
+ export interface BulkImportParams {
3097
+ organizationId: string
3098
+ contacts: CreateContactParams[]
3099
+ listId?: string
2938
3100
  }
2939
3101
  ```
2940
3102
 
2941
3103
  ### `BulkImportResult`
2942
3104
 
2943
3105
  ```typescript
2944
- export interface BulkImportResult {
2945
- created: number
2946
- updated: number
2947
- errors: Array<{ email: string; error: string }>
3106
+ export interface BulkImportResult {
3107
+ created: number
3108
+ updated: number
3109
+ errors: Array<{ email: string; error: string }>
2948
3110
  }
2949
3111
  ```
2950
3112
 
2951
3113
  ### `BulkImportCompanyEntry`
2952
3114
 
2953
3115
  ```typescript
2954
- export interface BulkImportCompanyEntry {
2955
- name: string
2956
- domain: string
2957
- website?: string
2958
- locationCity?: string
2959
- locationState?: string
2960
- category?: string
2961
- source?: string
2962
- enrichmentData?: Record<string, unknown>
2963
- pipelineStatus?: Record<string, unknown>
3116
+ export interface BulkImportCompanyEntry {
3117
+ name: string
3118
+ domain: string
3119
+ website?: string
3120
+ locationCity?: string
3121
+ locationState?: string
3122
+ category?: string
3123
+ source?: string
3124
+ enrichmentData?: Record<string, unknown>
3125
+ pipelineStatus?: Record<string, unknown>
2964
3126
  }
2965
3127
  ```
2966
3128
 
2967
3129
  ### `BulkImportCompaniesParams`
2968
3130
 
2969
3131
  ```typescript
2970
- export interface BulkImportCompaniesParams {
2971
- organizationId: string
2972
- batchId: string
2973
- companies: BulkImportCompanyEntry[]
3132
+ export interface BulkImportCompaniesParams {
3133
+ organizationId: string
3134
+ batchId: string
3135
+ companies: BulkImportCompanyEntry[]
2974
3136
  }
2975
3137
  ```
2976
3138
 
2977
3139
  ### `BulkImportCompaniesResult`
2978
3140
 
2979
3141
  ```typescript
2980
- export interface BulkImportCompaniesResult {
2981
- created: number
2982
- skipped: number
2983
- errors: Array<{ companyName: string; error: string }>
3142
+ export interface BulkImportCompaniesResult {
3143
+ created: number
3144
+ skipped: number
3145
+ errors: Array<{ companyName: string; error: string }>
2984
3146
  }
2985
3147
  ```
2986
3148
 
@@ -3045,6 +3207,7 @@ export type LeadToolMap = {
3045
3207
  markProposalReviewed: { params: Omit<MarkProposalReviewedParams, 'organizationId'>; result: void }
3046
3208
  updateCloseLostReason: { params: Omit<UpdateCloseLostReasonParams, 'organizationId'>; result: void }
3047
3209
  updateFees: { params: Omit<UpdateFeesParams, 'organizationId'>; result: void }
3210
+ cacheInstantlyThreadIds: { params: Omit<CacheInstantlyThreadIdsParams, 'organizationId'>; result: void }
3048
3211
  transitionItem: { params: Omit<TransitionItemParams, 'organizationId'>; result: void }
3049
3212
  setContactNurture: { params: Omit<SetContactNurtureParams, 'organizationId'>; result: void }
3050
3213
  cancelSchedulesAndHitlByEmail: {
@@ -3142,3 +3305,74 @@ export type ListToolMap = {
3142
3305
  }
3143
3306
  }
3144
3307
  ```
3308
+
3309
+ ## Knowledge Platform Primitives
3310
+
3311
+ ### `KnowledgeLinkSchema`
3312
+
3313
+ ```typescript
3314
+ export const KnowledgeLinkSchema = z.object({
3315
+ nodeId: NodeIdStringSchema
3316
+ })
3317
+ ```
3318
+
3319
+ ### `OrgKnowledgeKindSchema`
3320
+
3321
+ ```typescript
3322
+ export const OrgKnowledgeKindSchema = z.enum(['playbook', 'strategy', 'reference'])
3323
+ ```
3324
+
3325
+ ### `OrgKnowledgeNodeSchema`
3326
+
3327
+ ```typescript
3328
+ export const OrgKnowledgeNodeSchema = z.object({
3329
+ id: ModelIdSchema,
3330
+ kind: OrgKnowledgeKindSchema,
3331
+ title: z.string().trim().min(1).max(200),
3332
+ summary: z.string().trim().min(1).max(1000),
3333
+ icon: IconNameSchema.optional(),
3334
+ /** Raw MDX string. Phase 2 will introduce a structured block format. */
3335
+ body: z.string().trim().min(1),
3336
+ /**
3337
+ * Graph links to other OM nodes this knowledge node governs.
3338
+ * Each link emits a `governs` edge: knowledge-node -> target node.
3339
+ */
3340
+ links: z.array(KnowledgeLinkSchema).default([]),
3341
+ /** Identifiers of the roles or members who own this knowledge node. */
3342
+ ownerIds: z.array(ModelIdSchema).default([]),
3343
+ /** ISO date string (YYYY-MM-DD or full ISO 8601) of last meaningful update. */
3344
+ updatedAt: z.string().trim().min(1).max(50)
3345
+ })
3346
+ ```
3347
+
3348
+ ### `KnowledgeDomainSchema`
3349
+
3350
+ ```typescript
3351
+ export const KnowledgeDomainSchema = z.object({
3352
+ nodes: z.array(OrgKnowledgeNodeSchema).default([])
3353
+ })
3354
+ ```
3355
+
3356
+ ### `OrgKnowledgeNode`
3357
+
3358
+ ```typescript
3359
+ export type OrgKnowledgeNode = z.infer<typeof OrgKnowledgeNodeSchema>
3360
+ ```
3361
+
3362
+ ### `OrgKnowledgeKind`
3363
+
3364
+ ```typescript
3365
+ export type OrgKnowledgeKind = z.infer<typeof OrgKnowledgeKindSchema>
3366
+ ```
3367
+
3368
+ ### `KnowledgeLink`
3369
+
3370
+ ```typescript
3371
+ export type KnowledgeLink = z.infer<typeof KnowledgeLinkSchema>
3372
+ ```
3373
+
3374
+ ### `KnowledgeDomain`
3375
+
3376
+ ```typescript
3377
+ export type KnowledgeDomain = z.infer<typeof KnowledgeDomainSchema>
3378
+ ```