@elevasis/sdk 1.12.0 → 1.13.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.
- package/dist/cli.cjs +1 -1
- package/dist/index.d.ts +287 -55
- package/dist/index.js +62 -117
- package/dist/test-utils/index.d.ts +275 -15
- package/dist/test-utils/index.js +10 -1
- package/dist/worker/index.js +10 -1
- package/package.json +1 -1
- package/reference/claude-config/rules/agent-start-here.md +13 -7
- package/reference/claude-config/rules/organization-os.md +10 -6
- package/reference/claude-config/rules/platform.md +2 -1
- package/reference/claude-config/rules/ui.md +8 -6
- package/reference/claude-config/rules/vibe.md +11 -5
- package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +1 -5
- package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +110 -0
- package/reference/packages/ui/src/test-utils/README.md +2 -0
- package/reference/scaffold/index.mdx +8 -5
- package/reference/scaffold/recipes/customize-crm-actions.md +411 -0
- package/reference/scaffold/recipes/extend-crm.md +255 -0
- package/reference/scaffold/recipes/extend-lead-gen.md +297 -0
- package/reference/scaffold/recipes/index.md +20 -11
- package/reference/scaffold/reference/contracts.md +2612 -0
- package/reference/scaffold/ui/customization.md +4 -0
|
@@ -889,6 +889,53 @@ type Database = {
|
|
|
889
889
|
};
|
|
890
890
|
public: {
|
|
891
891
|
Tables: {
|
|
892
|
+
acq_artifacts: {
|
|
893
|
+
Row: {
|
|
894
|
+
content: Json;
|
|
895
|
+
created_at: string;
|
|
896
|
+
created_by: string | null;
|
|
897
|
+
id: string;
|
|
898
|
+
kind: string;
|
|
899
|
+
organization_id: string;
|
|
900
|
+
owner_id: string;
|
|
901
|
+
owner_kind: string;
|
|
902
|
+
source_execution_id: string | null;
|
|
903
|
+
version: number;
|
|
904
|
+
};
|
|
905
|
+
Insert: {
|
|
906
|
+
content: Json;
|
|
907
|
+
created_at?: string;
|
|
908
|
+
created_by?: string | null;
|
|
909
|
+
id?: string;
|
|
910
|
+
kind: string;
|
|
911
|
+
organization_id: string;
|
|
912
|
+
owner_id: string;
|
|
913
|
+
owner_kind: string;
|
|
914
|
+
source_execution_id?: string | null;
|
|
915
|
+
version?: number;
|
|
916
|
+
};
|
|
917
|
+
Update: {
|
|
918
|
+
content?: Json;
|
|
919
|
+
created_at?: string;
|
|
920
|
+
created_by?: string | null;
|
|
921
|
+
id?: string;
|
|
922
|
+
kind?: string;
|
|
923
|
+
organization_id?: string;
|
|
924
|
+
owner_id?: string;
|
|
925
|
+
owner_kind?: string;
|
|
926
|
+
source_execution_id?: string | null;
|
|
927
|
+
version?: number;
|
|
928
|
+
};
|
|
929
|
+
Relationships: [
|
|
930
|
+
{
|
|
931
|
+
foreignKeyName: "acq_artifacts_organization_id_fkey";
|
|
932
|
+
columns: ["organization_id"];
|
|
933
|
+
isOneToOne: false;
|
|
934
|
+
referencedRelation: "organizations";
|
|
935
|
+
referencedColumns: ["id"];
|
|
936
|
+
}
|
|
937
|
+
];
|
|
938
|
+
};
|
|
892
939
|
acq_companies: {
|
|
893
940
|
Row: {
|
|
894
941
|
batch_id: string | null;
|
|
@@ -907,6 +954,9 @@ type Database = {
|
|
|
907
954
|
num_employees: number | null;
|
|
908
955
|
organization_id: string;
|
|
909
956
|
pipeline_status: Json;
|
|
957
|
+
qualification_rubric_key: string | null;
|
|
958
|
+
qualification_score: number | null;
|
|
959
|
+
qualification_signals: Json | null;
|
|
910
960
|
segment: string | null;
|
|
911
961
|
source: string | null;
|
|
912
962
|
status: string;
|
|
@@ -930,6 +980,9 @@ type Database = {
|
|
|
930
980
|
num_employees?: number | null;
|
|
931
981
|
organization_id: string;
|
|
932
982
|
pipeline_status?: Json;
|
|
983
|
+
qualification_rubric_key?: string | null;
|
|
984
|
+
qualification_score?: number | null;
|
|
985
|
+
qualification_signals?: Json | null;
|
|
933
986
|
segment?: string | null;
|
|
934
987
|
source?: string | null;
|
|
935
988
|
status?: string;
|
|
@@ -953,6 +1006,9 @@ type Database = {
|
|
|
953
1006
|
num_employees?: number | null;
|
|
954
1007
|
organization_id?: string;
|
|
955
1008
|
pipeline_status?: Json;
|
|
1009
|
+
qualification_rubric_key?: string | null;
|
|
1010
|
+
qualification_score?: number | null;
|
|
1011
|
+
qualification_signals?: Json | null;
|
|
956
1012
|
segment?: string | null;
|
|
957
1013
|
source?: string | null;
|
|
958
1014
|
status?: string;
|
|
@@ -989,6 +1045,9 @@ type Database = {
|
|
|
989
1045
|
opening_line: string | null;
|
|
990
1046
|
organization_id: string;
|
|
991
1047
|
pipeline_status: Json;
|
|
1048
|
+
qualification_rubric_key: string | null;
|
|
1049
|
+
qualification_score: number | null;
|
|
1050
|
+
qualification_signals: Json | null;
|
|
992
1051
|
source: string | null;
|
|
993
1052
|
source_id: string | null;
|
|
994
1053
|
status: string;
|
|
@@ -1014,6 +1073,9 @@ type Database = {
|
|
|
1014
1073
|
opening_line?: string | null;
|
|
1015
1074
|
organization_id: string;
|
|
1016
1075
|
pipeline_status?: Json;
|
|
1076
|
+
qualification_rubric_key?: string | null;
|
|
1077
|
+
qualification_score?: number | null;
|
|
1078
|
+
qualification_signals?: Json | null;
|
|
1017
1079
|
source?: string | null;
|
|
1018
1080
|
source_id?: string | null;
|
|
1019
1081
|
status?: string;
|
|
@@ -1039,6 +1101,9 @@ type Database = {
|
|
|
1039
1101
|
opening_line?: string | null;
|
|
1040
1102
|
organization_id?: string;
|
|
1041
1103
|
pipeline_status?: Json;
|
|
1104
|
+
qualification_rubric_key?: string | null;
|
|
1105
|
+
qualification_score?: number | null;
|
|
1106
|
+
qualification_signals?: Json | null;
|
|
1042
1107
|
source?: string | null;
|
|
1043
1108
|
source_id?: string | null;
|
|
1044
1109
|
status?: string;
|
|
@@ -1418,40 +1483,46 @@ type Database = {
|
|
|
1418
1483
|
};
|
|
1419
1484
|
acq_list_companies: {
|
|
1420
1485
|
Row: {
|
|
1486
|
+
activity_log: Json;
|
|
1421
1487
|
added_at: string;
|
|
1422
1488
|
added_by: string | null;
|
|
1423
1489
|
company_id: string;
|
|
1424
1490
|
id: string;
|
|
1425
1491
|
list_id: string;
|
|
1492
|
+
pipeline_key: string;
|
|
1426
1493
|
source_execution_id: string | null;
|
|
1427
1494
|
source_input_hash: string | null;
|
|
1428
1495
|
source_resource_id: string | null;
|
|
1429
|
-
|
|
1430
|
-
|
|
1496
|
+
stage_key: string;
|
|
1497
|
+
state_key: string;
|
|
1431
1498
|
};
|
|
1432
1499
|
Insert: {
|
|
1500
|
+
activity_log?: Json;
|
|
1433
1501
|
added_at?: string;
|
|
1434
1502
|
added_by?: string | null;
|
|
1435
1503
|
company_id: string;
|
|
1436
1504
|
id?: string;
|
|
1437
1505
|
list_id: string;
|
|
1506
|
+
pipeline_key?: string;
|
|
1438
1507
|
source_execution_id?: string | null;
|
|
1439
1508
|
source_input_hash?: string | null;
|
|
1440
1509
|
source_resource_id?: string | null;
|
|
1441
|
-
|
|
1442
|
-
|
|
1510
|
+
stage_key: string;
|
|
1511
|
+
state_key: string;
|
|
1443
1512
|
};
|
|
1444
1513
|
Update: {
|
|
1514
|
+
activity_log?: Json;
|
|
1445
1515
|
added_at?: string;
|
|
1446
1516
|
added_by?: string | null;
|
|
1447
1517
|
company_id?: string;
|
|
1448
1518
|
id?: string;
|
|
1449
1519
|
list_id?: string;
|
|
1520
|
+
pipeline_key?: string;
|
|
1450
1521
|
source_execution_id?: string | null;
|
|
1451
1522
|
source_input_hash?: string | null;
|
|
1452
1523
|
source_resource_id?: string | null;
|
|
1453
|
-
|
|
1454
|
-
|
|
1524
|
+
stage_key?: string;
|
|
1525
|
+
state_key?: string;
|
|
1455
1526
|
};
|
|
1456
1527
|
Relationships: [
|
|
1457
1528
|
{
|
|
@@ -1518,40 +1589,46 @@ type Database = {
|
|
|
1518
1589
|
};
|
|
1519
1590
|
acq_list_members: {
|
|
1520
1591
|
Row: {
|
|
1592
|
+
activity_log: Json;
|
|
1521
1593
|
added_at: string;
|
|
1522
1594
|
added_by: string | null;
|
|
1523
1595
|
contact_id: string;
|
|
1524
1596
|
id: string;
|
|
1525
1597
|
list_id: string;
|
|
1598
|
+
pipeline_key: string;
|
|
1526
1599
|
source_execution_id: string | null;
|
|
1527
1600
|
source_input_hash: string | null;
|
|
1528
1601
|
source_resource_id: string | null;
|
|
1529
|
-
|
|
1530
|
-
|
|
1602
|
+
stage_key: string;
|
|
1603
|
+
state_key: string;
|
|
1531
1604
|
};
|
|
1532
1605
|
Insert: {
|
|
1606
|
+
activity_log?: Json;
|
|
1533
1607
|
added_at?: string;
|
|
1534
1608
|
added_by?: string | null;
|
|
1535
1609
|
contact_id: string;
|
|
1536
1610
|
id?: string;
|
|
1537
1611
|
list_id: string;
|
|
1612
|
+
pipeline_key?: string;
|
|
1538
1613
|
source_execution_id?: string | null;
|
|
1539
1614
|
source_input_hash?: string | null;
|
|
1540
1615
|
source_resource_id?: string | null;
|
|
1541
|
-
|
|
1542
|
-
|
|
1616
|
+
stage_key: string;
|
|
1617
|
+
state_key: string;
|
|
1543
1618
|
};
|
|
1544
1619
|
Update: {
|
|
1620
|
+
activity_log?: Json;
|
|
1545
1621
|
added_at?: string;
|
|
1546
1622
|
added_by?: string | null;
|
|
1547
1623
|
contact_id?: string;
|
|
1548
1624
|
id?: string;
|
|
1549
1625
|
list_id?: string;
|
|
1626
|
+
pipeline_key?: string;
|
|
1550
1627
|
source_execution_id?: string | null;
|
|
1551
1628
|
source_input_hash?: string | null;
|
|
1552
1629
|
source_resource_id?: string | null;
|
|
1553
|
-
|
|
1554
|
-
|
|
1630
|
+
stage_key?: string;
|
|
1631
|
+
state_key?: string;
|
|
1555
1632
|
};
|
|
1556
1633
|
Relationships: [
|
|
1557
1634
|
{
|
|
@@ -1579,6 +1656,7 @@ type Database = {
|
|
|
1579
1656
|
};
|
|
1580
1657
|
acq_lists: {
|
|
1581
1658
|
Row: {
|
|
1659
|
+
activity_log: Json;
|
|
1582
1660
|
batch_ids: string[];
|
|
1583
1661
|
completed_at: string | null;
|
|
1584
1662
|
config: Json;
|
|
@@ -1590,10 +1668,13 @@ type Database = {
|
|
|
1590
1668
|
metadata: Json;
|
|
1591
1669
|
name: string;
|
|
1592
1670
|
organization_id: string;
|
|
1593
|
-
|
|
1671
|
+
pipeline_key: string;
|
|
1672
|
+
stage_key: string;
|
|
1673
|
+
state_key: string;
|
|
1594
1674
|
type: string;
|
|
1595
1675
|
};
|
|
1596
1676
|
Insert: {
|
|
1677
|
+
activity_log?: Json;
|
|
1597
1678
|
batch_ids?: string[];
|
|
1598
1679
|
completed_at?: string | null;
|
|
1599
1680
|
config?: Json;
|
|
@@ -1605,10 +1686,13 @@ type Database = {
|
|
|
1605
1686
|
metadata?: Json;
|
|
1606
1687
|
name: string;
|
|
1607
1688
|
organization_id: string;
|
|
1608
|
-
|
|
1689
|
+
pipeline_key?: string;
|
|
1690
|
+
stage_key?: string;
|
|
1691
|
+
state_key?: string;
|
|
1609
1692
|
type?: string;
|
|
1610
1693
|
};
|
|
1611
1694
|
Update: {
|
|
1695
|
+
activity_log?: Json;
|
|
1612
1696
|
batch_ids?: string[];
|
|
1613
1697
|
completed_at?: string | null;
|
|
1614
1698
|
config?: Json;
|
|
@@ -1620,7 +1704,9 @@ type Database = {
|
|
|
1620
1704
|
metadata?: Json;
|
|
1621
1705
|
name?: string;
|
|
1622
1706
|
organization_id?: string;
|
|
1623
|
-
|
|
1707
|
+
pipeline_key?: string;
|
|
1708
|
+
stage_key?: string;
|
|
1709
|
+
state_key?: string;
|
|
1624
1710
|
type?: string;
|
|
1625
1711
|
};
|
|
1626
1712
|
Relationships: [
|
|
@@ -1901,6 +1987,62 @@ type Database = {
|
|
|
1901
1987
|
}
|
|
1902
1988
|
];
|
|
1903
1989
|
};
|
|
1990
|
+
acq_touchpoints: {
|
|
1991
|
+
Row: {
|
|
1992
|
+
artifact_id: string | null;
|
|
1993
|
+
channel: string;
|
|
1994
|
+
contact_id: string | null;
|
|
1995
|
+
created_at: string;
|
|
1996
|
+
direction: string;
|
|
1997
|
+
id: string;
|
|
1998
|
+
kind: string;
|
|
1999
|
+
list_id: string | null;
|
|
2000
|
+
list_member_id: string | null;
|
|
2001
|
+
occurred_at: string;
|
|
2002
|
+
organization_id: string;
|
|
2003
|
+
payload: Json | null;
|
|
2004
|
+
source_execution_id: string | null;
|
|
2005
|
+
};
|
|
2006
|
+
Insert: {
|
|
2007
|
+
artifact_id?: string | null;
|
|
2008
|
+
channel: string;
|
|
2009
|
+
contact_id?: string | null;
|
|
2010
|
+
created_at?: string;
|
|
2011
|
+
direction: string;
|
|
2012
|
+
id?: string;
|
|
2013
|
+
kind: string;
|
|
2014
|
+
list_id?: string | null;
|
|
2015
|
+
list_member_id?: string | null;
|
|
2016
|
+
occurred_at: string;
|
|
2017
|
+
organization_id: string;
|
|
2018
|
+
payload?: Json | null;
|
|
2019
|
+
source_execution_id?: string | null;
|
|
2020
|
+
};
|
|
2021
|
+
Update: {
|
|
2022
|
+
artifact_id?: string | null;
|
|
2023
|
+
channel?: string;
|
|
2024
|
+
contact_id?: string | null;
|
|
2025
|
+
created_at?: string;
|
|
2026
|
+
direction?: string;
|
|
2027
|
+
id?: string;
|
|
2028
|
+
kind?: string;
|
|
2029
|
+
list_id?: string | null;
|
|
2030
|
+
list_member_id?: string | null;
|
|
2031
|
+
occurred_at?: string;
|
|
2032
|
+
organization_id?: string;
|
|
2033
|
+
payload?: Json | null;
|
|
2034
|
+
source_execution_id?: string | null;
|
|
2035
|
+
};
|
|
2036
|
+
Relationships: [
|
|
2037
|
+
{
|
|
2038
|
+
foreignKeyName: "acq_touchpoints_organization_id_fkey";
|
|
2039
|
+
columns: ["organization_id"];
|
|
2040
|
+
isOneToOne: false;
|
|
2041
|
+
referencedRelation: "organizations";
|
|
2042
|
+
referencedColumns: ["id"];
|
|
2043
|
+
}
|
|
2044
|
+
];
|
|
2045
|
+
};
|
|
1904
2046
|
activities: {
|
|
1905
2047
|
Row: {
|
|
1906
2048
|
activity_type: string;
|
|
@@ -3809,6 +3951,10 @@ interface ContactEnrichmentData {
|
|
|
3809
3951
|
/**
|
|
3810
3952
|
* Acquisition list for organizing contacts and companies.
|
|
3811
3953
|
* Transformed from AcqListRow with camelCase properties.
|
|
3954
|
+
*
|
|
3955
|
+
* Track B: acq_lists adopts the Stateful trait (pipeline_key / stage_key / state_key / activity_log).
|
|
3956
|
+
* `status` is preserved as a convenience alias for `state_key` so existing consumers continue to
|
|
3957
|
+
* compile until they are migrated to read the trait fields directly.
|
|
3812
3958
|
*/
|
|
3813
3959
|
interface AcqList {
|
|
3814
3960
|
id: string;
|
|
@@ -3818,7 +3964,14 @@ interface AcqList {
|
|
|
3818
3964
|
type: string;
|
|
3819
3965
|
batchIds: string[];
|
|
3820
3966
|
instantlyCampaignId: string | null;
|
|
3967
|
+
/** @deprecated Use state_key. Retained as alias mapped from state_key for backward-compatibility. */
|
|
3821
3968
|
status: string;
|
|
3969
|
+
/** Stateful trait: pipeline identifier (always 'lead-gen' for acq_lists). Added by W2 migration. */
|
|
3970
|
+
pipelineKey: string;
|
|
3971
|
+
/** Stateful trait: stage within the pipeline (always 'lifecycle' for acq_lists). Added by W2 migration. */
|
|
3972
|
+
stageKey: string;
|
|
3973
|
+
/** Stateful trait: lifecycle state (draft | enriching | launched | closing | archived). Added by W2 migration. */
|
|
3974
|
+
stateKey: string;
|
|
3822
3975
|
metadata: Record<string, unknown>;
|
|
3823
3976
|
launchedAt: Date | null;
|
|
3824
3977
|
completedAt: Date | null;
|
|
@@ -3850,6 +4003,12 @@ interface AcqCompany {
|
|
|
3850
4003
|
batchId: string | null;
|
|
3851
4004
|
status: 'active' | 'invalid';
|
|
3852
4005
|
verticalResearch: string | null;
|
|
4006
|
+
/** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
|
|
4007
|
+
qualificationScore: number | null;
|
|
4008
|
+
/** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
|
|
4009
|
+
qualificationSignals: Record<string, unknown> | null;
|
|
4010
|
+
/** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
|
|
4011
|
+
qualificationRubricKey: string | null;
|
|
3853
4012
|
createdAt: Date;
|
|
3854
4013
|
updatedAt: Date;
|
|
3855
4014
|
}
|
|
@@ -3971,6 +4130,11 @@ interface ListConfig {
|
|
|
3971
4130
|
excludeFranchises: boolean;
|
|
3972
4131
|
/** Free-form LLM rules layered on top of the structured criteria. */
|
|
3973
4132
|
customRules: string;
|
|
4133
|
+
/**
|
|
4134
|
+
* Free-form text key identifying the ICP qualification rubric applied to this list.
|
|
4135
|
+
* Decision C4: stays as free-form text until an Org OS rubric registry lands.
|
|
4136
|
+
*/
|
|
4137
|
+
qualificationRubricKey?: string | null;
|
|
3974
4138
|
};
|
|
3975
4139
|
enrichment?: {
|
|
3976
4140
|
emailDiscovery?: {
|
|
@@ -4057,6 +4221,12 @@ interface UpdateCompanyParams {
|
|
|
4057
4221
|
batchId?: string;
|
|
4058
4222
|
status?: 'active' | 'invalid';
|
|
4059
4223
|
verticalResearch?: string | null;
|
|
4224
|
+
/** Track A: flat qualification score column (null until a scoring rubric is defined) */
|
|
4225
|
+
qualificationScore?: number | null;
|
|
4226
|
+
/** Track A: flat qualification signals jsonb — mirrors the former pipeline_status.qualification shape */
|
|
4227
|
+
qualificationSignals?: Record<string, unknown> | null;
|
|
4228
|
+
/** Track A: key identifying the rubric used for qualification */
|
|
4229
|
+
qualificationRubricKey?: string | null;
|
|
4060
4230
|
}
|
|
4061
4231
|
type UpsertCompanyParams = CreateCompanyParams;
|
|
4062
4232
|
interface CompanyFilters {
|
|
@@ -4511,6 +4681,24 @@ interface ProjectDetail extends ProjectRow {
|
|
|
4511
4681
|
} | null;
|
|
4512
4682
|
}
|
|
4513
4683
|
|
|
4684
|
+
/**
|
|
4685
|
+
* Canonical vocabulary for `acq_touchpoints.kind`.
|
|
4686
|
+
* DB CHECK constraint was dropped (Decision #9); validation lives here.
|
|
4687
|
+
* Subtype/intent detail (e.g. triggered_by_action, subtype) goes in the touchpoint `payload` JSONB.
|
|
4688
|
+
*/
|
|
4689
|
+
|
|
4690
|
+
declare const TouchpointKindSchema: z.ZodEnum<{
|
|
4691
|
+
initial: "initial";
|
|
4692
|
+
followup: "followup";
|
|
4693
|
+
reply: "reply";
|
|
4694
|
+
nudge: "nudge";
|
|
4695
|
+
reminder: "reminder";
|
|
4696
|
+
breakup: "breakup";
|
|
4697
|
+
bounce: "bounce";
|
|
4698
|
+
auto_reply: "auto_reply";
|
|
4699
|
+
}>;
|
|
4700
|
+
type TouchpointKind = z.infer<typeof TouchpointKindSchema>;
|
|
4701
|
+
|
|
4514
4702
|
declare const DealSchemas: {
|
|
4515
4703
|
DealIdParams: z.ZodObject<{
|
|
4516
4704
|
dealId: z.ZodString;
|
|
@@ -4567,6 +4755,13 @@ declare const DealSchemas: {
|
|
|
4567
4755
|
reason: z.ZodOptional<z.ZodString>;
|
|
4568
4756
|
expectedUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
4569
4757
|
}, z.core.$strict>;
|
|
4758
|
+
ExecuteActionParams: z.ZodObject<{
|
|
4759
|
+
dealId: z.ZodString;
|
|
4760
|
+
actionKey: z.ZodString;
|
|
4761
|
+
}, z.core.$strict>;
|
|
4762
|
+
ExecuteActionRequest: z.ZodObject<{
|
|
4763
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4764
|
+
}, z.core.$strict>;
|
|
4570
4765
|
DealListResponse: z.ZodObject<{
|
|
4571
4766
|
data: z.ZodArray<z.ZodObject<{
|
|
4572
4767
|
id: z.ZodString;
|
|
@@ -4629,6 +4824,7 @@ declare const DealSchemas: {
|
|
|
4629
4824
|
stageSummary: z.ZodArray<z.ZodObject<{
|
|
4630
4825
|
stage: z.ZodString;
|
|
4631
4826
|
count: z.ZodNumber;
|
|
4827
|
+
totalValue: z.ZodNumber;
|
|
4632
4828
|
oldestUpdatedAt: z.ZodNullable<z.ZodString>;
|
|
4633
4829
|
newestUpdatedAt: z.ZodNullable<z.ZodString>;
|
|
4634
4830
|
}, z.core.$strip>>;
|
|
@@ -7532,6 +7728,70 @@ type LeadToolMap = {
|
|
|
7532
7728
|
};
|
|
7533
7729
|
result: UpsertSocialPostsResult;
|
|
7534
7730
|
};
|
|
7731
|
+
recordTouchpoint: {
|
|
7732
|
+
params: {
|
|
7733
|
+
contactId?: string;
|
|
7734
|
+
listMemberId?: string;
|
|
7735
|
+
listId?: string;
|
|
7736
|
+
direction: 'inbound' | 'outbound';
|
|
7737
|
+
channel: string;
|
|
7738
|
+
kind: TouchpointKind;
|
|
7739
|
+
payload?: Record<string, unknown>;
|
|
7740
|
+
artifactId?: string;
|
|
7741
|
+
sourceExecutionId?: string;
|
|
7742
|
+
occurredAt?: string;
|
|
7743
|
+
};
|
|
7744
|
+
result: {
|
|
7745
|
+
id: string;
|
|
7746
|
+
};
|
|
7747
|
+
};
|
|
7748
|
+
setDealStateKey: {
|
|
7749
|
+
params: {
|
|
7750
|
+
dealId: string;
|
|
7751
|
+
stateKey: string;
|
|
7752
|
+
};
|
|
7753
|
+
result: {
|
|
7754
|
+
ok: true;
|
|
7755
|
+
};
|
|
7756
|
+
};
|
|
7757
|
+
transitionDeal: {
|
|
7758
|
+
params: {
|
|
7759
|
+
dealId: string;
|
|
7760
|
+
toStage: string;
|
|
7761
|
+
toState?: string;
|
|
7762
|
+
};
|
|
7763
|
+
result: {
|
|
7764
|
+
deal: AcqDeal;
|
|
7765
|
+
};
|
|
7766
|
+
};
|
|
7767
|
+
loadDeal: {
|
|
7768
|
+
params: {
|
|
7769
|
+
dealId: string;
|
|
7770
|
+
};
|
|
7771
|
+
result: DealDetail | null;
|
|
7772
|
+
};
|
|
7773
|
+
listDealTouchpoints: {
|
|
7774
|
+
params: {
|
|
7775
|
+
dealId: string;
|
|
7776
|
+
kind?: string;
|
|
7777
|
+
limit?: number;
|
|
7778
|
+
};
|
|
7779
|
+
result: Array<{
|
|
7780
|
+
id: string;
|
|
7781
|
+
organization_id: string;
|
|
7782
|
+
contact_id: string | null;
|
|
7783
|
+
list_id: string | null;
|
|
7784
|
+
list_member_id: string | null;
|
|
7785
|
+
direction: string;
|
|
7786
|
+
channel: string;
|
|
7787
|
+
kind: string;
|
|
7788
|
+
payload: Record<string, unknown> | null;
|
|
7789
|
+
artifact_id: string | null;
|
|
7790
|
+
source_execution_id: string | null;
|
|
7791
|
+
occurred_at: string;
|
|
7792
|
+
created_at: string;
|
|
7793
|
+
}>;
|
|
7794
|
+
};
|
|
7535
7795
|
};
|
|
7536
7796
|
type ListToolMap = {
|
|
7537
7797
|
getConfig: {
|
package/dist/test-utils/index.js
CHANGED
|
@@ -6494,7 +6494,11 @@ var RETRYABLE_CODES = /* @__PURE__ */ new Set([
|
|
|
6494
6494
|
"timeout_error",
|
|
6495
6495
|
"api_error",
|
|
6496
6496
|
"service_unavailable",
|
|
6497
|
-
"server_unavailable"
|
|
6497
|
+
"server_unavailable",
|
|
6498
|
+
// Leaked JS runtime errors from the parent dispatcher (TypeError / ReferenceError).
|
|
6499
|
+
// The dispatcher self-heals what it can; remaining instances are likely transient
|
|
6500
|
+
// (half-initialized state, race conditions) and should retry rather than poison the worker.
|
|
6501
|
+
"platform_internal"
|
|
6498
6502
|
]);
|
|
6499
6503
|
var PlatformToolError = class extends Error {
|
|
6500
6504
|
constructor(message, code, retryable) {
|
|
@@ -6754,6 +6758,11 @@ createAdapter("acqDb", [
|
|
|
6754
6758
|
"clearDealFields",
|
|
6755
6759
|
"deleteDeal",
|
|
6756
6760
|
"recordDealActivity",
|
|
6761
|
+
"recordTouchpoint",
|
|
6762
|
+
"setDealStateKey",
|
|
6763
|
+
"transitionDeal",
|
|
6764
|
+
"loadDeal",
|
|
6765
|
+
"listDealTouchpoints",
|
|
6757
6766
|
// Deal note operations
|
|
6758
6767
|
"createDealNote",
|
|
6759
6768
|
"listDealNotes",
|
package/dist/worker/index.js
CHANGED
|
@@ -4586,7 +4586,11 @@ var RETRYABLE_CODES = /* @__PURE__ */ new Set([
|
|
|
4586
4586
|
"timeout_error",
|
|
4587
4587
|
"api_error",
|
|
4588
4588
|
"service_unavailable",
|
|
4589
|
-
"server_unavailable"
|
|
4589
|
+
"server_unavailable",
|
|
4590
|
+
// Leaked JS runtime errors from the parent dispatcher (TypeError / ReferenceError).
|
|
4591
|
+
// The dispatcher self-heals what it can; remaining instances are likely transient
|
|
4592
|
+
// (half-initialized state, race conditions) and should retry rather than poison the worker.
|
|
4593
|
+
"platform_internal"
|
|
4590
4594
|
]);
|
|
4591
4595
|
var PlatformToolError = class extends Error {
|
|
4592
4596
|
constructor(message, code, retryable) {
|
|
@@ -5000,6 +5004,11 @@ var acqDb = createAdapter("acqDb", [
|
|
|
5000
5004
|
"clearDealFields",
|
|
5001
5005
|
"deleteDeal",
|
|
5002
5006
|
"recordDealActivity",
|
|
5007
|
+
"recordTouchpoint",
|
|
5008
|
+
"setDealStateKey",
|
|
5009
|
+
"transitionDeal",
|
|
5010
|
+
"loadDeal",
|
|
5011
|
+
"listDealTouchpoints",
|
|
5003
5012
|
// Deal note operations
|
|
5004
5013
|
"createDealNote",
|
|
5005
5014
|
"listDealNotes",
|
package/package.json
CHANGED
|
@@ -89,11 +89,14 @@ Load first:
|
|
|
89
89
|
|
|
90
90
|
- `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` (scaffold index -- UI recipes, feature flags, customization)
|
|
91
91
|
- `.claude/rules/ui.md`
|
|
92
|
-
- `ui/src/routes/README.md`
|
|
92
|
+
- `ui/src/routes/README.md`
|
|
93
93
|
- `core/config/README.md`
|
|
94
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- specifically recipe 6 when building a "run this resource" surface
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- specifically recipe 6 when building a "run this resource" surface
|
|
95
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md` -- when building or extending CRM pages, sidebars, hooks, workflows, or deal data surfaces
|
|
96
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- when building or extending lead-gen pages, sidebars, hooks, workflows, list/member state, artifacts, or touchpoint surfaces
|
|
97
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md` -- when changing CRM deal action buttons or adding a workflow-backed deal action
|
|
98
|
+
|
|
99
|
+
Then inspect:
|
|
97
100
|
|
|
98
101
|
- `ui/src/routes/__root.tsx`
|
|
99
102
|
- `ui/src/config/*`
|
|
@@ -137,9 +140,12 @@ Load first:
|
|
|
137
140
|
|
|
138
141
|
- `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` (scaffold index -- contracts, gating patterns, glossary)
|
|
139
142
|
- `core/config/README.md`
|
|
140
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`
|
|
141
|
-
- typed feature/surface constants from `@elevasis/core/organization-model` -- `CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`, `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`, `SEO_FEATURE_ID`, `CRM_PIPELINE_SURFACE_ID`, `LEAD_GEN_LISTS_SURFACE_ID`, `PROJECTS_INDEX_SURFACE_ID`, `OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID`. Use these typed constants instead of magic strings when overriding feature/surface IDs.
|
|
142
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/
|
|
143
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`
|
|
144
|
+
- typed feature/surface constants from `@elevasis/core/organization-model` -- `CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`, `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`, `SEO_FEATURE_ID`, `CRM_PIPELINE_SURFACE_ID`, `LEAD_GEN_LISTS_SURFACE_ID`, `PROJECTS_INDEX_SURFACE_ID`, `OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID`. Use these typed constants instead of magic strings when overriding feature/surface IDs.
|
|
145
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md` -- CRM is an Organization OS + UI + hooks + workflow-adapter surface; read this before extending CRM structure.
|
|
146
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- lead gen is an Organization OS + UI + hooks + workflow-adapter surface; read this before extending lead-gen lists, members, artifacts, touchpoints, or state transitions.
|
|
147
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md` -- CRM action buttons are not `sales.actions` org-model config in v1; use the recipe's provider/custom-button path.
|
|
148
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md`
|
|
143
149
|
|
|
144
150
|
Then inspect:
|
|
145
151
|
|
|
@@ -49,10 +49,11 @@ All paths under `node_modules/@elevasis/sdk/reference/scaffold/`:
|
|
|
49
49
|
- `node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- copy-paste UI recipes for pages, nav items, components
|
|
50
50
|
- `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` -- three-concept gating model
|
|
51
51
|
- `node_modules/@elevasis/sdk/reference/scaffold/ui/customization.md` -- sidebar composition via manifest overrides
|
|
52
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-feature.md` -- end-to-end from org model key through manifest, routes, gating
|
|
53
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md` -- author and deploy a workflow or agent
|
|
54
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/gate-by-feature-or-admin.md` -- decision table for access control patterns
|
|
55
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/
|
|
52
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-feature.md` -- end-to-end from org model key through manifest, routes, gating
|
|
53
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md` -- author and deploy a workflow or agent
|
|
54
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/gate-by-feature-or-admin.md` -- decision table for access control patterns
|
|
55
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- build or extend lead-gen pages, sidebars, hooks, list/member state, artifacts, touchpoints, workflow adapters, and prospecting semantics
|
|
56
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- workflow anatomy, adapter patterns, trigger patterns
|
|
56
57
|
- `node_modules/@elevasis/sdk/reference/scaffold/operations/propagation-pipeline.md` -- how sync and verification work across projects
|
|
57
58
|
- `node_modules/@elevasis/sdk/reference/scaffold/operations/scaffold-maintenance.md` -- content placement and auto-generation pipeline
|
|
58
59
|
- `node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md` -- Organization OS term definitions
|
|
@@ -76,8 +77,11 @@ All paths under `node_modules/@elevasis/sdk/reference/scaffold/`:
|
|
|
76
77
|
|
|
77
78
|
## When Working with Organization OS
|
|
78
79
|
|
|
79
|
-
- **Changing org model (structural reality):** Use `/configure` as the entry point. Direct edits to `foundations/config/organization-model.ts` are discouraged -- `/configure` runs the read → propose → confirm → write → validate ceremony. Run `/configure` for the full layered flow or `/configure \<domain>` for a targeted domain.
|
|
80
|
-
- **
|
|
80
|
+
- **Changing org model (structural reality):** Use `/configure` as the entry point. Direct edits to `foundations/config/organization-model.ts` are discouraged -- `/configure` runs the read → propose → confirm → write → validate ceremony. Run `/configure` for the full layered flow or `/configure \<domain>` for a targeted domain.
|
|
81
|
+
- **Building or extending CRM:** Start with `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md`. CRM spans Organization OS sales semantics, shared UI primitives, deal hooks, workflow adapters, and generated contracts.
|
|
82
|
+
- **Building or extending lead gen:** Start with `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md`. Lead gen spans Organization OS prospecting semantics, shared UI primitives, list/member hooks, artifact and touchpoint hooks, workflow adapters, and generated contracts.
|
|
83
|
+
- **Customizing CRM deal actions:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md`. Do not add `sales.actions` to the org model; the v1 server-side override surface is intentionally deferred.
|
|
84
|
+
- **Adding a feature:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-feature.md`. For toggling an existing feature, use `/configure features`.
|
|
81
85
|
- **Adding a resource:** Follow `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md`.
|
|
82
86
|
- **Extending entities:** Start with `foundations/types/entities.ts` for the demo extension pattern. Base shapes come from `@elevasis/core/entities`.
|
|
83
87
|
- **Authoring a workflow that takes a Project/Deal/etc.:** Reference entity types from `foundations/types/entities.ts` in the input schema -- do not redeclare them.
|
|
@@ -16,7 +16,7 @@ paths:
|
|
|
16
16
|
## Imports
|
|
17
17
|
|
|
18
18
|
- `@elevasis/sdk` for types (`WorkflowDefinition`, `DeploymentSpec`)
|
|
19
|
-
- `@elevasis/sdk/worker` for runtime utilities (`platform`, adapters: `llm`, `storage`, `scheduler`, `notifications`)
|
|
19
|
+
- `@elevasis/sdk/worker` for runtime utilities (`platform`, adapters: `llm`, `storage`, `scheduler`, `notifications`, `acqDb`, `list`)
|
|
20
20
|
- `@shared/*` resolves to `../shared/*` for shared type imports
|
|
21
21
|
- Never import from `ui/src/` -- separate runtimes
|
|
22
22
|
|
|
@@ -38,4 +38,5 @@ paths:
|
|
|
38
38
|
|
|
39
39
|
- `node_modules/@elevasis/sdk/reference/scaffold/operations/workflow-recipes.md` -- workflow anatomy, adapter patterns, trigger patterns
|
|
40
40
|
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/add-a-resource.md` -- end-to-end resource authoring guide
|
|
41
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- lead-gen UI, hooks, list/member state, artifacts, touchpoints, and workflow adapter extension guide
|
|
41
42
|
- SDK reference docs: `operations/node_modules/@elevasis/sdk/reference/` (concepts, framework, platform-tools, runtime, CLI)
|