@elevasis/sdk 1.25.0 → 1.26.1

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 (64) hide show
  1. package/dist/cli.cjs +87 -120
  2. package/dist/index.d.ts +220 -50
  3. package/dist/index.js +4 -435
  4. package/dist/node/index.d.ts +46 -38
  5. package/dist/test-utils/index.d.ts +154 -40
  6. package/dist/test-utils/index.js +27 -355
  7. package/dist/types/worker/adapters/clickup.d.ts +22 -0
  8. package/dist/types/worker/adapters/index.d.ts +1 -0
  9. package/dist/worker/index.js +32 -354
  10. package/package.json +2 -2
  11. package/reference/_navigation.md +11 -1
  12. package/reference/_reference-manifest.json +70 -0
  13. package/reference/claude-config/rules/organization-model.md +12 -1
  14. package/reference/claude-config/rules/organization-os.md +12 -1
  15. package/reference/claude-config/skills/om/SKILL.md +13 -5
  16. package/reference/claude-config/skills/om/operations/codify-level-a.md +109 -100
  17. package/reference/claude-config/skills/om/operations/customers.md +10 -6
  18. package/reference/claude-config/skills/om/operations/features.md +7 -3
  19. package/reference/claude-config/skills/om/operations/goals.md +10 -6
  20. package/reference/claude-config/skills/om/operations/identity.md +8 -5
  21. package/reference/claude-config/skills/om/operations/labels.md +17 -1
  22. package/reference/claude-config/skills/om/operations/offerings.md +11 -7
  23. package/reference/claude-config/skills/om/operations/roles.md +11 -7
  24. package/reference/claude-config/skills/om/operations/techStack.md +10 -2
  25. package/reference/claude-config/skills/setup/SKILL.md +2 -2
  26. package/reference/claude-config/sync-notes/2026-05-20-om-define-helpers.md +32 -0
  27. package/reference/claude-config/sync-notes/2026-05-22-access-model-and-right-panel.md +43 -0
  28. package/reference/claude-config/sync-notes/2026-05-22-lead-gen-tenant-config.md +40 -0
  29. package/reference/claude-config/sync-notes/2026-05-22-org-model-multi-file-split.md +61 -0
  30. package/reference/claude-config/sync-notes/2026-05-23-branding-names-to-identity.md +49 -0
  31. package/reference/claude-config/sync-notes/2026-05-23-om-deployment-drift-detection.md +42 -0
  32. package/reference/cli-management.mdx +541 -0
  33. package/reference/cli.mdx +4 -532
  34. package/reference/concepts.mdx +134 -146
  35. package/reference/deployment/api.mdx +296 -297
  36. package/reference/deployment/command-center.mdx +208 -209
  37. package/reference/deployment/index.mdx +194 -195
  38. package/reference/deployment/provided-features.mdx +110 -107
  39. package/reference/deployment/ui-execution.mdx +249 -250
  40. package/reference/examples/organization-model.ts +14 -4
  41. package/reference/framework/index.mdx +111 -195
  42. package/reference/framework/resource-documentation.mdx +90 -0
  43. package/reference/framework/tutorial-system.mdx +135 -135
  44. package/reference/getting-started.mdx +141 -142
  45. package/reference/index.mdx +95 -106
  46. package/reference/packages/ui/src/auth/README.md +6 -6
  47. package/reference/platform-tools/adapters-integration.mdx +300 -301
  48. package/reference/platform-tools/adapters-platform.mdx +552 -553
  49. package/reference/platform-tools/index.mdx +216 -217
  50. package/reference/platform-tools/type-safety.mdx +82 -82
  51. package/reference/resources/index.mdx +348 -349
  52. package/reference/resources/patterns.mdx +446 -449
  53. package/reference/resources/types.mdx +115 -116
  54. package/reference/roadmap.mdx +164 -165
  55. package/reference/rules/organization-model.md +14 -0
  56. package/reference/runtime.mdx +172 -173
  57. package/reference/scaffold/operations/propagation-pipeline.md +1 -1
  58. package/reference/scaffold/recipes/extend-lead-gen.md +130 -77
  59. package/reference/scaffold/reference/contracts.md +376 -446
  60. package/reference/scaffold/reference/glossary.md +8 -6
  61. package/reference/scaffold/ui/feature-flags-and-gating.md +59 -46
  62. package/reference/scaffold/ui/feature-shell.mdx +11 -11
  63. package/reference/scaffold/ui/recipes.md +24 -24
  64. package/reference/troubleshooting.mdx +222 -223
@@ -1371,77 +1371,77 @@ export interface DeploymentSpec {
1371
1371
  ### `AcqCompany`
1372
1372
 
1373
1373
  ```typescript
1374
- /**
1375
- * Company record in the acquisition database.
1376
- * Contains enriched company data from various sources.
1377
- * Transformed from AcqCompanyRow with camelCase properties.
1378
- */
1379
- export interface AcqCompany {
1380
- id: string
1381
- organizationId: string
1382
- name: string
1383
- domain: string | null
1384
- linkedinUrl: string | null
1385
- website: string | null
1386
- numEmployees: number | null
1387
- foundedYear: number | null
1388
- locationCity: string | null
1389
- locationState: string | null
1390
- category: string | null
1391
- categoryPain: string | null
1392
- segment: string | null
1393
- processingState: CompanyProcessingState | null
1394
- /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
1395
- pipelineStatus?: LegacyPipelineStatus | null
1396
- enrichmentData: CompanyEnrichmentData | null
1397
- source: string | null
1398
- batchId: string | null
1399
- status: 'active' | 'invalid'
1400
- verticalResearch: string | null
1401
- /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
1402
- qualificationScore: number | null
1403
- /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
1404
- qualificationSignals: Record<string, unknown> | null
1405
- /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
1406
- qualificationRubricKey: string | null
1407
- createdAt: Date
1408
- updatedAt: Date
1374
+ /**
1375
+ * Company record in the acquisition database.
1376
+ * Contains enriched company data from various sources.
1377
+ * Transformed from AcqCompanyRow with camelCase properties.
1378
+ */
1379
+ export interface AcqCompany {
1380
+ id: string
1381
+ organizationId: string
1382
+ name: string
1383
+ domain: string | null
1384
+ linkedinUrl: string | null
1385
+ website: string | null
1386
+ numEmployees: number | null
1387
+ foundedYear: number | null
1388
+ locationCity: string | null
1389
+ locationState: string | null
1390
+ category: string | null
1391
+ categoryPain: string | null
1392
+ segment: string | null
1393
+ processingState: CompanyProcessingState | null
1394
+ /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
1395
+ pipelineStatus?: LegacyPipelineStatus | null
1396
+ enrichmentData: CompanyEnrichmentData | null
1397
+ source: string | null
1398
+ batchId: string | null
1399
+ status: 'active' | 'invalid'
1400
+ verticalResearch: string | null
1401
+ /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
1402
+ qualificationScore: number | null
1403
+ /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
1404
+ qualificationSignals: Record<string, unknown> | null
1405
+ /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
1406
+ qualificationRubricKey: string | null
1407
+ createdAt: Date
1408
+ updatedAt: Date
1409
1409
  }
1410
1410
  ```
1411
1411
 
1412
1412
  ### `AcqContact`
1413
1413
 
1414
1414
  ```typescript
1415
- /**
1416
- * Contact record in the acquisition database.
1417
- * Contains enriched contact data and personalization content.
1418
- * Transformed from AcqContactRow with camelCase properties.
1419
- */
1420
- export interface AcqContact {
1421
- id: string
1422
- organizationId: string
1423
- companyId: string | null
1424
- email: string
1425
- emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
1426
- firstName: string | null
1427
- lastName: string | null
1428
- linkedinUrl: string | null
1429
- title: string | null
1430
- headline: string | null
1431
- filterReason: string | null
1432
- openingLine: string | null
1433
- source: string | null
1434
- sourceId: string | null
1435
- processingState: ContactProcessingState | null
1436
- /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
1437
- pipelineStatus?: LegacyPipelineStatus | null
1438
- enrichmentData: ContactEnrichmentData | null
1439
- /** Attio Person record ID - set when contact responds and is added to CRM */
1440
- attioPersonId: string | null
1441
- batchId: string | null
1442
- status: 'active' | 'invalid'
1443
- createdAt: Date
1444
- updatedAt: Date
1415
+ /**
1416
+ * Contact record in the acquisition database.
1417
+ * Contains enriched contact data and personalization content.
1418
+ * Transformed from AcqContactRow with camelCase properties.
1419
+ */
1420
+ export interface AcqContact {
1421
+ id: string
1422
+ organizationId: string
1423
+ companyId: string | null
1424
+ email: string
1425
+ emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
1426
+ firstName: string | null
1427
+ lastName: string | null
1428
+ linkedinUrl: string | null
1429
+ title: string | null
1430
+ headline: string | null
1431
+ filterReason: string | null
1432
+ openingLine: string | null
1433
+ source: string | null
1434
+ sourceId: string | null
1435
+ processingState: ContactProcessingState | null
1436
+ /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
1437
+ pipelineStatus?: LegacyPipelineStatus | null
1438
+ enrichmentData: ContactEnrichmentData | null
1439
+ /** Attio Person record ID - set when contact responds and is added to CRM */
1440
+ attioPersonId: string | null
1441
+ batchId: string | null
1442
+ status: 'active' | 'invalid'
1443
+ createdAt: Date
1444
+ updatedAt: Date
1445
1445
  }
1446
1446
  ```
1447
1447
 
@@ -1460,23 +1460,23 @@ export type DealPriorityBucketKey = 'needs_response' | 'follow_up_due' | 'waitin
1460
1460
  ### `DealPriority`
1461
1461
 
1462
1462
  ```typescript
1463
- export interface DealPriority {
1464
- bucketKey: DealPriorityBucketKey
1465
- rank: number
1466
- label: string
1467
- color: string
1468
- reason: string
1469
- latestActivityAt: string | null
1470
- nextActionAt: string | null
1463
+ export interface DealPriority {
1464
+ bucketKey: DealPriorityBucketKey
1465
+ rank: number
1466
+ label: string
1467
+ color: string
1468
+ reason: string
1469
+ latestActivityAt: string | null
1470
+ nextActionAt: string | null
1471
1471
  }
1472
1472
  ```
1473
1473
 
1474
1474
  ### `KanbanStageConfig`
1475
1475
 
1476
1476
  ```typescript
1477
- export interface KanbanStageConfig {
1478
- color: string // Mantine color token (e.g. 'blue', 'teal')
1479
- label?: string // Optional display label override
1477
+ export interface KanbanStageConfig {
1478
+ color: string // Mantine color token (e.g. 'blue', 'teal')
1479
+ label?: string // Optional display label override
1480
1480
  }
1481
1481
  ```
1482
1482
 
@@ -1489,49 +1489,49 @@ export type KanbanBoardConfig = Partial<Record<DealStage, KanbanStageConfig>>
1489
1489
  ### `DealContact`
1490
1490
 
1491
1491
  ```typescript
1492
- export interface DealContact {
1493
- id: string
1494
- first_name: string | null
1495
- last_name: string | null
1496
- email: string
1497
- title: string | null
1498
- headline: string | null
1499
- linkedin_url: string | null
1500
- processing_state: Record<string, unknown> | null
1501
- enrichment_data: Record<string, unknown> | null
1502
- company: {
1503
- id: string
1504
- name: string
1505
- domain: string | null
1506
- website: string | null
1507
- linkedin_url: string | null
1508
- segment: string | null
1509
- category: string | null
1510
- num_employees: number | null
1511
- } | null
1492
+ export interface DealContact {
1493
+ id: string
1494
+ first_name: string | null
1495
+ last_name: string | null
1496
+ email: string
1497
+ title: string | null
1498
+ headline: string | null
1499
+ linkedin_url: string | null
1500
+ processing_state: Record<string, unknown> | null
1501
+ enrichment_data: Record<string, unknown> | null
1502
+ company: {
1503
+ id: string
1504
+ name: string
1505
+ domain: string | null
1506
+ website: string | null
1507
+ linkedin_url: string | null
1508
+ segment: string | null
1509
+ category: string | null
1510
+ num_employees: number | null
1511
+ } | null
1512
1512
  }
1513
1513
  ```
1514
1514
 
1515
1515
  ### `DealFilters`
1516
1516
 
1517
1517
  ```typescript
1518
- export interface DealFilters {
1519
- stage?: DealStage
1520
- search?: string
1521
- limit?: number
1522
- offset?: number
1518
+ export interface DealFilters {
1519
+ stage?: DealStage
1520
+ search?: string
1521
+ limit?: number
1522
+ offset?: number
1523
1523
  }
1524
1524
  ```
1525
1525
 
1526
1526
  ### `DealListItem`
1527
1527
 
1528
1528
  ```typescript
1529
- /** Deal list item with joined contact and company data */
1530
- export interface DealListItem extends AcqDealRow {
1531
- priority: DealPriority
1532
- ownership: 'us' | 'them' | null
1533
- nextAction: string | null
1534
- contact: DealContact | null
1529
+ /** Deal list item with joined contact and company data */
1530
+ export interface DealListItem extends AcqDealRow {
1531
+ priority: DealPriority
1532
+ ownership: 'us' | 'them' | null
1533
+ nextAction: string | null
1534
+ contact: DealContact | null
1535
1535
  }
1536
1536
  ```
1537
1537
 
@@ -1544,31 +1544,31 @@ export type DealDetail = DealListItem
1544
1544
  ### `AcqDealTaskKind`
1545
1545
 
1546
1546
  ```typescript
1547
- /** Task kind options for a deal task (human follow-up action type) */
1547
+ /** Task kind options for a deal task (human follow-up action type) */
1548
1548
  export type AcqDealTaskKind = 'call' | 'email' | 'meeting' | 'other'
1549
1549
  ```
1550
1550
 
1551
1551
  ### `AcqDealTask`
1552
1552
 
1553
1553
  ```typescript
1554
- /**
1555
- * A CRM to-do item attached to a deal representing a human follow-up action.
1556
- * Transformed from AcqDealTaskRow with camelCase properties.
1557
- */
1558
- export interface AcqDealTask {
1559
- id: string
1560
- organizationId: string
1561
- dealId: string
1562
- title: string
1563
- description: string | null
1564
- kind: AcqDealTaskKind
1565
- dueAt: string | null
1566
- assigneeUserId: string | null
1567
- completedAt: string | null
1568
- completedByUserId: string | null
1569
- createdAt: string
1570
- updatedAt: string
1571
- createdByUserId: string | null
1554
+ /**
1555
+ * A CRM to-do item attached to a deal representing a human follow-up action.
1556
+ * Transformed from AcqDealTaskRow with camelCase properties.
1557
+ */
1558
+ export interface AcqDealTask {
1559
+ id: string
1560
+ organizationId: string
1561
+ dealId: string
1562
+ title: string
1563
+ description: string | null
1564
+ kind: AcqDealTaskKind
1565
+ dueAt: string | null
1566
+ assigneeUserId: string | null
1567
+ completedAt: string | null
1568
+ completedByUserId: string | null
1569
+ createdAt: string
1570
+ updatedAt: string
1571
+ createdByUserId: string | null
1572
1572
  }
1573
1573
  ```
1574
1574
 
@@ -1982,222 +1982,222 @@ export type CrmToolMap = {
1982
1982
  ### `WebPost`
1983
1983
 
1984
1984
  ```typescript
1985
- /**
1986
- * Represents a web post from company website scraping.
1987
- * Used for recent blog posts, news, or announcements.
1988
- */
1989
- export interface WebPost {
1990
- /** ISO date string of when the post was published */
1991
- date: string
1992
- /** Title of the web post */
1993
- title: string
1994
- /** Brief summary of the post content */
1995
- summary: string
1996
- /** AI-generated insight about the post's relevance */
1997
- aiInsight?: string
1985
+ /**
1986
+ * Represents a web post from company website scraping.
1987
+ * Used for recent blog posts, news, or announcements.
1988
+ */
1989
+ export interface WebPost {
1990
+ /** ISO date string of when the post was published */
1991
+ date: string
1992
+ /** Title of the web post */
1993
+ title: string
1994
+ /** Brief summary of the post content */
1995
+ summary: string
1996
+ /** AI-generated insight about the post's relevance */
1997
+ aiInsight?: string
1998
1998
  }
1999
1999
  ```
2000
2000
 
2001
2001
  ### `CompanyEnrichmentData`
2002
2002
 
2003
2003
  ```typescript
2004
- /**
2005
- * Enrichment data collected for a company from various sources.
2006
- */
2007
- export interface CompanyEnrichmentData {
2008
- googleMaps?: {
2009
- placeId?: string
2010
- totalScore?: number
2011
- reviewsCount?: number
2012
- address?: string
2013
- phone?: string
2014
- categoryName?: string
2015
- googleMapsUrl?: string
2016
- scrapedAt?: string
2017
- }
2018
- websiteCrawl?: {
2019
- companyDescription?: string
2020
- services?: string[]
2021
- specialties?: string[]
2022
- staff?: Array<{ name: string; title?: string; email?: string }>
2023
- automationGaps?: string[]
2024
- targetAudience?: string
2025
- category?: string
2026
- segment?: string
2027
- recentWin?: string
2028
- emailCount?: number
2029
- pageCount?: number
2030
- totalChars?: number
2031
- crawledAt?: string
2032
- extractedAt?: string
2033
- }
2034
- website?: {
2035
- missionVision?: string
2036
- uniqueAttributes?: string
2037
- coreOfferings?: string
2038
- targetAudience?: string
2039
- companyValues?: string
2040
- businessDescription?: string
2041
- recentPosts?: Array<{ date?: string; title?: string; summary?: string; aiInsight?: string }>
2042
- }
2043
- tomba?: {
2044
- waterfallEmail?: {
2045
- email: string
2046
- name?: string
2047
- title?: string
2048
- department?: string
2049
- } | null
2050
- genericEmail?: string | null
2051
- totalFound?: number
2052
- searchedAt?: string
2053
- }
2004
+ /**
2005
+ * Enrichment data collected for a company from various sources.
2006
+ */
2007
+ export interface CompanyEnrichmentData {
2008
+ googleMaps?: {
2009
+ placeId?: string
2010
+ totalScore?: number
2011
+ reviewsCount?: number
2012
+ address?: string
2013
+ phone?: string
2014
+ categoryName?: string
2015
+ googleMapsUrl?: string
2016
+ scrapedAt?: string
2017
+ }
2018
+ websiteCrawl?: {
2019
+ companyDescription?: string
2020
+ services?: string[]
2021
+ specialties?: string[]
2022
+ staff?: Array<{ name: string; title?: string; email?: string }>
2023
+ automationGaps?: string[]
2024
+ targetAudience?: string
2025
+ category?: string
2026
+ segment?: string
2027
+ recentWin?: string
2028
+ emailCount?: number
2029
+ pageCount?: number
2030
+ totalChars?: number
2031
+ crawledAt?: string
2032
+ extractedAt?: string
2033
+ }
2034
+ website?: {
2035
+ missionVision?: string
2036
+ uniqueAttributes?: string
2037
+ coreOfferings?: string
2038
+ targetAudience?: string
2039
+ companyValues?: string
2040
+ businessDescription?: string
2041
+ recentPosts?: Array<{ date?: string; title?: string; summary?: string; aiInsight?: string }>
2042
+ }
2043
+ tomba?: {
2044
+ waterfallEmail?: {
2045
+ email: string
2046
+ name?: string
2047
+ title?: string
2048
+ department?: string
2049
+ } | null
2050
+ genericEmail?: string | null
2051
+ totalFound?: number
2052
+ searchedAt?: string
2053
+ }
2054
2054
  }
2055
2055
  ```
2056
2056
 
2057
2057
  ### `ContactEnrichmentData`
2058
2058
 
2059
2059
  ```typescript
2060
- /**
2061
- * Enrichment data collected for a contact from various sources.
2062
- */
2063
- export interface ContactEnrichmentData {
2064
- linkedin?: {
2065
- summary?: string
2066
- pastExperience?: string
2067
- education?: string
2068
- activity?: Array<{ date?: string; content?: string }>
2069
- }
2060
+ /**
2061
+ * Enrichment data collected for a contact from various sources.
2062
+ */
2063
+ export interface ContactEnrichmentData {
2064
+ linkedin?: {
2065
+ summary?: string
2066
+ pastExperience?: string
2067
+ education?: string
2068
+ activity?: Array<{ date?: string; content?: string }>
2069
+ }
2070
2070
  }
2071
2071
  ```
2072
2072
 
2073
2073
  ### `AcqList`
2074
2074
 
2075
2075
  ```typescript
2076
- export interface AcqList {
2077
- id: string
2078
- organizationId: string
2079
- name: string
2080
- description: string | null
2081
- batchIds: string[]
2082
- instantlyCampaignId: string | null
2083
- status: ListStatus
2084
- scrapingConfig: ScrapingConfig
2085
- icp: IcpRubric
2086
- pipelineConfig: PipelineConfig
2087
- metadata: AcqListMetadata
2088
- launchedAt: Date | null
2089
- completedAt: Date | null
2090
- createdAt: Date
2076
+ export interface AcqList {
2077
+ id: string
2078
+ organizationId: string
2079
+ name: string
2080
+ description: string | null
2081
+ batchIds: string[]
2082
+ instantlyCampaignId: string | null
2083
+ status: ListStatus
2084
+ scrapingConfig: ScrapingConfig
2085
+ icp: IcpRubric
2086
+ pipelineConfig: PipelineConfig
2087
+ metadata: AcqListMetadata
2088
+ launchedAt: Date | null
2089
+ completedAt: Date | null
2090
+ createdAt: Date
2091
2091
  }
2092
2092
  ```
2093
2093
 
2094
2094
  ### `AcqCompany`
2095
2095
 
2096
2096
  ```typescript
2097
- /**
2098
- * Company record in the acquisition database.
2099
- * Contains enriched company data from various sources.
2100
- * Transformed from AcqCompanyRow with camelCase properties.
2101
- */
2102
- export interface AcqCompany {
2103
- id: string
2104
- organizationId: string
2105
- name: string
2106
- domain: string | null
2107
- linkedinUrl: string | null
2108
- website: string | null
2109
- numEmployees: number | null
2110
- foundedYear: number | null
2111
- locationCity: string | null
2112
- locationState: string | null
2113
- category: string | null
2114
- categoryPain: string | null
2115
- segment: string | null
2116
- processingState: CompanyProcessingState | null
2117
- /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
2118
- pipelineStatus?: LegacyPipelineStatus | null
2119
- enrichmentData: CompanyEnrichmentData | null
2120
- source: string | null
2121
- batchId: string | null
2122
- status: 'active' | 'invalid'
2123
- verticalResearch: string | null
2124
- /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
2125
- qualificationScore: number | null
2126
- /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
2127
- qualificationSignals: Record<string, unknown> | null
2128
- /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
2129
- qualificationRubricKey: string | null
2130
- createdAt: Date
2131
- updatedAt: Date
2097
+ /**
2098
+ * Company record in the acquisition database.
2099
+ * Contains enriched company data from various sources.
2100
+ * Transformed from AcqCompanyRow with camelCase properties.
2101
+ */
2102
+ export interface AcqCompany {
2103
+ id: string
2104
+ organizationId: string
2105
+ name: string
2106
+ domain: string | null
2107
+ linkedinUrl: string | null
2108
+ website: string | null
2109
+ numEmployees: number | null
2110
+ foundedYear: number | null
2111
+ locationCity: string | null
2112
+ locationState: string | null
2113
+ category: string | null
2114
+ categoryPain: string | null
2115
+ segment: string | null
2116
+ processingState: CompanyProcessingState | null
2117
+ /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
2118
+ pipelineStatus?: LegacyPipelineStatus | null
2119
+ enrichmentData: CompanyEnrichmentData | null
2120
+ source: string | null
2121
+ batchId: string | null
2122
+ status: 'active' | 'invalid'
2123
+ verticalResearch: string | null
2124
+ /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
2125
+ qualificationScore: number | null
2126
+ /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
2127
+ qualificationSignals: Record<string, unknown> | null
2128
+ /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
2129
+ qualificationRubricKey: string | null
2130
+ createdAt: Date
2131
+ updatedAt: Date
2132
2132
  }
2133
2133
  ```
2134
2134
 
2135
2135
  ### `AcqContact`
2136
2136
 
2137
2137
  ```typescript
2138
- /**
2139
- * Contact record in the acquisition database.
2140
- * Contains enriched contact data and personalization content.
2141
- * Transformed from AcqContactRow with camelCase properties.
2142
- */
2143
- export interface AcqContact {
2144
- id: string
2145
- organizationId: string
2146
- companyId: string | null
2147
- email: string
2148
- emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
2149
- firstName: string | null
2150
- lastName: string | null
2151
- linkedinUrl: string | null
2152
- title: string | null
2153
- headline: string | null
2154
- filterReason: string | null
2155
- openingLine: string | null
2156
- source: string | null
2157
- sourceId: string | null
2158
- processingState: ContactProcessingState | null
2159
- /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
2160
- pipelineStatus?: LegacyPipelineStatus | null
2161
- enrichmentData: ContactEnrichmentData | null
2162
- /** Attio Person record ID - set when contact responds and is added to CRM */
2163
- attioPersonId: string | null
2164
- batchId: string | null
2165
- status: 'active' | 'invalid'
2166
- createdAt: Date
2167
- updatedAt: Date
2138
+ /**
2139
+ * Contact record in the acquisition database.
2140
+ * Contains enriched contact data and personalization content.
2141
+ * Transformed from AcqContactRow with camelCase properties.
2142
+ */
2143
+ export interface AcqContact {
2144
+ id: string
2145
+ organizationId: string
2146
+ companyId: string | null
2147
+ email: string
2148
+ emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
2149
+ firstName: string | null
2150
+ lastName: string | null
2151
+ linkedinUrl: string | null
2152
+ title: string | null
2153
+ headline: string | null
2154
+ filterReason: string | null
2155
+ openingLine: string | null
2156
+ source: string | null
2157
+ sourceId: string | null
2158
+ processingState: ContactProcessingState | null
2159
+ /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
2160
+ pipelineStatus?: LegacyPipelineStatus | null
2161
+ enrichmentData: ContactEnrichmentData | null
2162
+ /** Attio Person record ID - set when contact responds and is added to CRM */
2163
+ attioPersonId: string | null
2164
+ batchId: string | null
2165
+ status: 'active' | 'invalid'
2166
+ createdAt: Date
2167
+ updatedAt: Date
2168
2168
  }
2169
2169
  ```
2170
2170
 
2171
2171
  ### `ListTelemetry`
2172
2172
 
2173
2173
  ```typescript
2174
- /**
2175
- * Live-scan aggregate telemetry for a single list, computed on demand from
2176
- * the list junction tables and current contact deliverability state.
2177
- * `stageCounts` are attempted counts from list-row processing_state.
2178
- */
2179
- export interface ListTelemetry {
2180
- listId: string
2181
- totalCompanies: number
2182
- totalContacts: number
2183
- stageCounts: {
2184
- populated: number
2185
- extracted: number
2186
- qualified: number
2187
- discovered: number
2188
- verified: number
2189
- personalized: number
2190
- uploaded: number
2191
- }
2192
- deliverability: {
2193
- valid: number
2194
- risky: number
2195
- invalid: number
2196
- unknown: number
2197
- bounced: number
2198
- }
2199
- /** Reserved -- active workflow IDs associated with this list. */
2200
- activeWorkflows?: string[]
2174
+ /**
2175
+ * Live-scan aggregate telemetry for a single list, computed on demand from
2176
+ * the list junction tables and current contact deliverability state.
2177
+ * `stageCounts` are attempted counts from list-row processing_state.
2178
+ */
2179
+ export interface ListTelemetry {
2180
+ listId: string
2181
+ totalCompanies: number
2182
+ totalContacts: number
2183
+ stageCounts: {
2184
+ populated: number
2185
+ extracted: number
2186
+ qualified: number
2187
+ discovered: number
2188
+ verified: number
2189
+ personalized: number
2190
+ uploaded: number
2191
+ }
2192
+ deliverability: {
2193
+ valid: number
2194
+ risky: number
2195
+ invalid: number
2196
+ unknown: number
2197
+ bounced: number
2198
+ }
2199
+ /** Reserved -- active workflow IDs associated with this list. */
2200
+ activeWorkflows?: string[]
2201
2201
  }
2202
2202
  ```
2203
2203
 
@@ -2921,6 +2921,7 @@ export const AcqListSchemas = {
2921
2921
  ScrapingConfig: ScrapingConfigSchema,
2922
2922
  IcpRubric: IcpRubricSchema,
2923
2923
  PipelineConfig: PipelineConfigSchema,
2924
+ DataMode: DataModeSchema,
2924
2925
  PipelineStage: PipelineStageSchema,
2925
2926
  BuildPlanSnapshot: BuildPlanSnapshotSchema,
2926
2927
  BuildPlanSnapshotStep: BuildPlanSnapshotStepSchema,
@@ -3074,100 +3075,6 @@ export interface StatefulPipelineDefinition {
3074
3075
  }
3075
3076
  ```
3076
3077
 
3077
- ### `ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE`
3078
-
3079
- ```typescript
3080
- /**
3081
- * Lead-gen pipeline definition for acq_list_members (contacts).
3082
- * Three stages matching the post-restructure sales subdomain tree.
3083
- *
3084
- * Note: members visit outreach and prospecting states depending on which
3085
- * workflow last processed them. stage_key is set per-transition by the workflow.
3086
- */
3087
- export const ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE: StatefulPipelineDefinition = {
3088
- pipelineKey: 'lead-gen',
3089
- label: 'Lead Generation',
3090
- entityKey: 'acq.list-member',
3091
- stages: [
3092
- {
3093
- stageKey: 'outreach',
3094
- label: 'Outreach',
3095
- states: [
3096
- PENDING_STATE,
3097
- { stateKey: 'personalized', label: 'Personalized' },
3098
- { stateKey: 'uploaded', label: 'Uploaded' },
3099
- { stateKey: 'interested', label: 'Interested' }
3100
- ]
3101
- },
3102
- {
3103
- stageKey: 'prospecting',
3104
- label: 'Prospecting',
3105
- states: [
3106
- PENDING_STATE,
3107
- { stateKey: 'discovered', label: 'Discovered' },
3108
- { stateKey: 'verified', label: 'Verified' }
3109
- ]
3110
- },
3111
- {
3112
- stageKey: 'qualification',
3113
- label: 'Qualification',
3114
- states: [PENDING_STATE]
3115
- }
3116
- ]
3117
- }
3118
- ```
3119
-
3120
- ### `ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE`
3121
-
3122
- ```typescript
3123
- /**
3124
- * Lead-gen pipeline definition for acq_list_companies.
3125
- * Three stages matching the post-restructure sales subdomain tree.
3126
- *
3127
- * Note: companies visit prospecting and qualification states depending on which
3128
- * workflow last processed them. stage_key is set per-transition by the workflow.
3129
- */
3130
- export const ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE: StatefulPipelineDefinition = {
3131
- pipelineKey: 'lead-gen',
3132
- label: 'Lead Generation',
3133
- entityKey: 'acq.list-company',
3134
- stages: [
3135
- {
3136
- stageKey: 'outreach',
3137
- label: 'Outreach',
3138
- states: [PENDING_STATE, { stateKey: 'uploaded', label: 'Uploaded' }]
3139
- },
3140
- {
3141
- stageKey: 'prospecting',
3142
- label: 'Prospecting',
3143
- states: [
3144
- PENDING_STATE,
3145
- { stateKey: 'populated', label: 'Populated' },
3146
- { stateKey: 'extracted', label: 'Extracted' }
3147
- ]
3148
- },
3149
- {
3150
- stageKey: 'qualification',
3151
- label: 'Qualification',
3152
- states: [PENDING_STATE, { stateKey: 'qualified', label: 'Qualified' }]
3153
- }
3154
- ]
3155
- }
3156
- ```
3157
-
3158
- ### `LEAD_GEN_PIPELINE_DEFINITIONS`
3159
-
3160
- ```typescript
3161
- /**
3162
- * All lead-gen pipeline definitions indexed by entity key.
3163
- * Use findPipeline() to locate a definition by pipeline_key within any array.
3164
- */
3165
- export const LEAD_GEN_PIPELINE_DEFINITIONS: Record<string, StatefulPipelineDefinition[]> = {
3166
- 'acq.list-member': [ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE],
3167
- 'acq.list-company': [ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE]
3168
- }
3169
- ```
3170
-
3171
3078
  ### `PaginationParams`
3172
3079
 
3173
3080
  ```typescript
@@ -3437,26 +3344,28 @@ export interface UpdateListConfigParams {
3437
3344
  ### `UpdateCompanyStageParams`
3438
3345
 
3439
3346
  ```typescript
3440
- export interface UpdateCompanyStageParams {
3441
- organizationId: string
3442
- listId: string
3443
- companyId: string
3444
- stage: string
3445
- status?: ProcessingStageStatus
3446
- executionId?: string
3347
+ export interface UpdateCompanyStageParams {
3348
+ organizationId: string
3349
+ listId: string
3350
+ companyId: string
3351
+ stage: string
3352
+ status?: ProcessingStageStatus
3353
+ data?: unknown
3354
+ executionId?: string
3447
3355
  }
3448
3356
  ```
3449
3357
 
3450
3358
  ### `UpdateContactStageParams`
3451
3359
 
3452
3360
  ```typescript
3453
- export interface UpdateContactStageParams {
3454
- organizationId: string
3455
- listId: string
3456
- contactId: string
3457
- stage: string
3458
- status?: ProcessingStageStatus
3459
- executionId?: string
3361
+ export interface UpdateContactStageParams {
3362
+ organizationId: string
3363
+ listId: string
3364
+ contactId: string
3365
+ stage: string
3366
+ status?: ProcessingStageStatus
3367
+ data?: unknown
3368
+ executionId?: string
3460
3369
  }
3461
3370
  ```
3462
3371
 
@@ -3511,13 +3420,14 @@ export interface RecordListExecutionParams {
3511
3420
  ### `ListExecutionSummary`
3512
3421
 
3513
3422
  ```typescript
3514
- export interface ListExecutionSummary {
3515
- executionId: string
3516
- resourceId: string
3517
- status: string
3518
- createdAt: string
3519
- completedAt: string | null
3520
- durationMs: number | null
3423
+ export interface ListExecutionSummary {
3424
+ executionId: string
3425
+ resourceId: string
3426
+ status: string
3427
+ createdAt: string
3428
+ completedAt: string | null
3429
+ durationMs: number | null
3430
+ input?: unknown
3521
3431
  }
3522
3432
  ```
3523
3433
 
@@ -3596,6 +3506,14 @@ export type LeadToolMap = {
3596
3506
  params: Omit<UpdateContactStageParams, 'organizationId'>
3597
3507
  result: void
3598
3508
  }
3509
+ clearCompanyStages: {
3510
+ params: Omit<ClearCompanyStagesParams, 'organizationId'>
3511
+ result: void
3512
+ }
3513
+ clearContactStages: {
3514
+ params: Omit<ClearContactStagesParams, 'organizationId'>
3515
+ result: void
3516
+ }
3599
3517
  // Company operations
3600
3518
  createCompany: { params: Omit<CreateCompanyParams, 'organizationId'>; result: AcqCompany }
3601
3519
  upsertCompany: { params: Omit<UpsertCompanyParams, 'organizationId'>; result: AcqCompany }
@@ -3720,7 +3638,11 @@ export type LeadToolMap = {
3720
3638
  export type ListToolMap = {
3721
3639
  getConfig: {
3722
3640
  params: { listId: string }
3723
- result: { scrapingConfig: ScrapingConfig; icp: IcpRubric; pipelineConfig: PipelineConfig }
3641
+ result: {
3642
+ scrapingConfig: ScrapingConfig
3643
+ icp: IcpRubric
3644
+ pipelineConfig: PipelineConfig & { dataMode: 'mock' | 'live' }
3645
+ }
3724
3646
  }
3725
3647
  recordExecution: {
3726
3648
  params: Omit<RecordListExecutionParams, 'organizationId'>
@@ -3734,6 +3656,14 @@ export type ListToolMap = {
3734
3656
  params: Omit<UpdateContactStageParams, 'organizationId'>
3735
3657
  result: void
3736
3658
  }
3659
+ clearCompanyStages: {
3660
+ params: Omit<ClearCompanyStagesParams, 'organizationId'>
3661
+ result: void
3662
+ }
3663
+ clearContactStages: {
3664
+ params: Omit<ClearContactStagesParams, 'organizationId'>
3665
+ result: void
3666
+ }
3737
3667
  listPendingCompanyIds: {
3738
3668
  params: Omit<ListPendingCompanyIdsParams, 'organizationId'>
3739
3669
  result: string[]
@@ -3750,33 +3680,33 @@ export type ListToolMap = {
3750
3680
  ### `KnowledgeLinkSchema`
3751
3681
 
3752
3682
  ```typescript
3753
- export const KnowledgeLinkSchema = z
3754
- .union([CanonicalKnowledgeLinkSchema, LegacyKnowledgeLinkSchema])
3755
- .transform((link) => {
3756
- const target = 'target' in link ? link.target : targetFromNodeId(link.nodeId)
3757
- return {
3758
- target,
3759
- nodeId: nodeIdFromTarget(target)
3760
- }
3683
+ export const KnowledgeLinkSchema = z
3684
+ .union([CanonicalKnowledgeLinkSchema, LegacyKnowledgeLinkSchema])
3685
+ .transform((link) => {
3686
+ const target = 'target' in link ? link.target : targetFromNodeId(link.nodeId)
3687
+ return {
3688
+ target,
3689
+ nodeId: nodeIdFromTarget(target)
3690
+ }
3761
3691
  })
3762
3692
  ```
3763
3693
 
3764
3694
  ### `OrgKnowledgeKindSchema`
3765
3695
 
3766
3696
  ```typescript
3767
- export const OrgKnowledgeKindSchema = z
3768
- .enum(['playbook', 'strategy', 'reference'])
3697
+ export const OrgKnowledgeKindSchema = z
3698
+ .enum(['playbook', 'strategy', 'reference'])
3769
3699
  .meta({ label: 'Knowledge kind', color: 'grape' })
3770
3700
  ```
3771
3701
 
3772
3702
  ### `OrgKnowledgeNodeSchema`
3773
3703
 
3774
3704
  ```typescript
3775
- export const OrgKnowledgeNodeSchema = z.object({
3776
- id: ModelIdSchema,
3777
- kind: OrgKnowledgeKindSchema,
3778
- title: z.string().trim().min(1).max(200),
3779
- summary: z.string().trim().min(1).max(1000),
3705
+ export const OrgKnowledgeNodeSchema = z.object({
3706
+ id: ModelIdSchema,
3707
+ kind: OrgKnowledgeKindSchema,
3708
+ title: z.string().trim().min(1).max(200),
3709
+ summary: z.string().trim().min(1).max(1000),
3780
3710
  icon: IconNameSchema.optional(),
3781
3711
  /** Canonical documentation URL when body content is a local summary. */
3782
3712
  externalUrl: z.string().trim().url().max(500).optional(),
@@ -3784,15 +3714,15 @@ export const OrgKnowledgeNodeSchema = z.object({
3784
3714
  sourceFilePath: z.string().trim().min(1).max(500).optional(),
3785
3715
  /** Raw MDX string. Phase 2 will introduce a structured block format. */
3786
3716
  body: z.string().trim().min(1),
3787
- /**
3788
- * Graph links to other OM nodes this knowledge node governs.
3789
- * Each link emits a `governs` edge: knowledge-node -> target node.
3790
- */
3791
- links: z.array(KnowledgeLinkSchema).default([]),
3792
- /** Role identifiers that own this knowledge node. */
3793
- ownerIds: z.array(RoleIdSchema.meta({ ref: 'role' })).default([]),
3794
- /** ISO date string (YYYY-MM-DD or full ISO 8601) of last meaningful update. */
3795
- updatedAt: z.string().trim().min(1).max(50)
3717
+ /**
3718
+ * Graph links to other OM nodes this knowledge node governs.
3719
+ * Each link emits a `governs` edge: knowledge-node -> target node.
3720
+ */
3721
+ links: z.array(KnowledgeLinkSchema).default([]),
3722
+ /** Role identifiers that own this knowledge node. */
3723
+ ownerIds: z.array(RoleIdSchema.meta({ ref: 'role' })).default([]),
3724
+ /** ISO date string (YYYY-MM-DD or full ISO 8601) of last meaningful update. */
3725
+ updatedAt: z.string().trim().min(1).max(50)
3796
3726
  })
3797
3727
  ```
3798
3728