@oxygen-agent/cli 1.365.3 → 1.575.19

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 (99) hide show
  1. package/README.md +1 -1
  2. package/dist/column-run-notices.d.ts +11 -0
  3. package/dist/column-run-notices.js +37 -0
  4. package/dist/command-manifest.js +13 -8
  5. package/dist/help.js +78 -16
  6. package/dist/index.js +3873 -514
  7. package/dist/skills.js +106 -1
  8. package/node_modules/@oxygen/formula/dist/coerce.d.ts +8 -0
  9. package/node_modules/@oxygen/formula/dist/coerce.js +10 -0
  10. package/node_modules/@oxygen/formula/dist/evaluate.d.ts +31 -0
  11. package/node_modules/@oxygen/formula/dist/evaluate.js +248 -0
  12. package/node_modules/@oxygen/formula/dist/expression.d.ts +64 -0
  13. package/node_modules/@oxygen/formula/dist/expression.js +428 -0
  14. package/node_modules/@oxygen/formula/dist/formula-functions.d.ts +71 -0
  15. package/node_modules/@oxygen/formula/dist/formula-functions.js +1100 -0
  16. package/node_modules/@oxygen/formula/dist/index.d.ts +17 -0
  17. package/node_modules/@oxygen/formula/dist/index.js +17 -0
  18. package/node_modules/@oxygen/formula/dist/value-normalizers.d.ts +30 -0
  19. package/node_modules/@oxygen/formula/dist/value-normalizers.js +80 -0
  20. package/node_modules/@oxygen/formula/package.json +26 -0
  21. package/node_modules/@oxygen/recipe-sdk/dist/index.d.ts +30 -0
  22. package/node_modules/@oxygen/recipe-sdk/dist/index.js +2 -2
  23. package/node_modules/@oxygen/shared/dist/billing-anchors.d.ts +60 -0
  24. package/node_modules/@oxygen/shared/dist/billing-anchors.js +135 -0
  25. package/node_modules/@oxygen/shared/dist/billing.d.ts +101 -5
  26. package/node_modules/@oxygen/shared/dist/billing.js +192 -8
  27. package/node_modules/@oxygen/shared/dist/call-outcomes.d.ts +59 -0
  28. package/node_modules/@oxygen/shared/dist/call-outcomes.js +73 -0
  29. package/node_modules/@oxygen/shared/dist/cli-result.js +1 -0
  30. package/node_modules/@oxygen/shared/dist/credit-guidance.js +3 -1
  31. package/node_modules/@oxygen/shared/dist/crm-reply-events.d.ts +35 -0
  32. package/node_modules/@oxygen/shared/dist/crm-reply-events.js +31 -0
  33. package/node_modules/@oxygen/shared/dist/dial-guardrail-overrides.d.ts +50 -0
  34. package/node_modules/@oxygen/shared/dist/dial-guardrail-overrides.js +65 -0
  35. package/node_modules/@oxygen/shared/dist/directory.d.ts +1 -1
  36. package/node_modules/@oxygen/shared/dist/directory.js +1 -0
  37. package/node_modules/@oxygen/shared/dist/hosted-ai.d.ts +17 -1
  38. package/node_modules/@oxygen/shared/dist/hosted-ai.js +52 -3
  39. package/node_modules/@oxygen/shared/dist/index.d.ts +11 -0
  40. package/node_modules/@oxygen/shared/dist/index.js +15 -0
  41. package/node_modules/@oxygen/shared/dist/langfuse.d.ts +77 -0
  42. package/node_modules/@oxygen/shared/dist/langfuse.js +231 -0
  43. package/node_modules/@oxygen/shared/dist/linkedin-quota-denial.d.ts +31 -0
  44. package/node_modules/@oxygen/shared/dist/linkedin-quota-denial.js +56 -0
  45. package/node_modules/@oxygen/shared/dist/linkedin-sequences.d.ts +5 -4
  46. package/node_modules/@oxygen/shared/dist/linkedin-sequences.js +5 -4
  47. package/node_modules/@oxygen/shared/dist/linkedin-url.d.ts +22 -0
  48. package/node_modules/@oxygen/shared/dist/linkedin-url.js +7 -4
  49. package/node_modules/@oxygen/shared/dist/log.js +56 -4
  50. package/node_modules/@oxygen/shared/dist/microsoft-consent-url.d.ts +7 -0
  51. package/node_modules/@oxygen/shared/dist/microsoft-consent-url.js +29 -0
  52. package/node_modules/@oxygen/shared/dist/object-storage.d.ts +31 -0
  53. package/node_modules/@oxygen/shared/dist/object-storage.js +61 -0
  54. package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +636 -0
  55. package/node_modules/@oxygen/shared/dist/plan-limits.js +199 -0
  56. package/node_modules/@oxygen/shared/dist/pricing-sheet.d.ts +89 -23
  57. package/node_modules/@oxygen/shared/dist/pricing-sheet.js +88 -24
  58. package/node_modules/@oxygen/shared/dist/sequence-crm-events.d.ts +291 -0
  59. package/node_modules/@oxygen/shared/dist/sequence-crm-events.js +224 -0
  60. package/node_modules/@oxygen/shared/dist/sequence-template.d.ts +42 -1
  61. package/node_modules/@oxygen/shared/dist/sequence-template.js +0 -0
  62. package/node_modules/@oxygen/shared/dist/sequences.d.ts +287 -24
  63. package/node_modules/@oxygen/shared/dist/sequences.js +940 -60
  64. package/node_modules/@oxygen/shared/dist/spend-safety.d.ts +70 -0
  65. package/node_modules/@oxygen/shared/dist/spend-safety.js +106 -0
  66. package/node_modules/@oxygen/shared/dist/tags.d.ts +90 -1
  67. package/node_modules/@oxygen/shared/dist/tags.js +126 -6
  68. package/node_modules/@oxygen/shared/dist/version.d.ts +1 -1
  69. package/node_modules/@oxygen/shared/dist/version.js +1 -1
  70. package/node_modules/@oxygen/shared/dist/workflow-trigger-metadata.d.ts +1 -1
  71. package/node_modules/@oxygen/shared/dist/workflow-trigger-metadata.js +4 -0
  72. package/node_modules/@oxygen/shared/dist/workspace-agents.d.ts +8 -7
  73. package/node_modules/@oxygen/shared/dist/workspace-agents.js +34 -7
  74. package/node_modules/@oxygen/shared/package.json +95 -0
  75. package/node_modules/@oxygen/workflows/dist/event-dispatch.d.ts +126 -0
  76. package/node_modules/@oxygen/workflows/dist/event-dispatch.js +173 -0
  77. package/node_modules/@oxygen/workflows/dist/graph/expression.d.ts +78 -0
  78. package/node_modules/@oxygen/workflows/dist/graph/expression.js +700 -0
  79. package/node_modules/@oxygen/workflows/dist/graph/index.d.ts +20 -0
  80. package/node_modules/@oxygen/workflows/dist/graph/index.js +20 -0
  81. package/node_modules/@oxygen/workflows/dist/graph/lint.d.ts +4 -0
  82. package/node_modules/@oxygen/workflows/dist/graph/lint.js +812 -0
  83. package/node_modules/@oxygen/workflows/dist/graph/manifest-schema.d.ts +501 -0
  84. package/node_modules/@oxygen/workflows/dist/graph/manifest-schema.js +200 -0
  85. package/node_modules/@oxygen/workflows/dist/graph/params.d.ts +86 -0
  86. package/node_modules/@oxygen/workflows/dist/graph/params.js +173 -0
  87. package/node_modules/@oxygen/workflows/dist/graph/remap.d.ts +48 -0
  88. package/node_modules/@oxygen/workflows/dist/graph/remap.js +213 -0
  89. package/node_modules/@oxygen/workflows/dist/graph/topology.d.ts +46 -0
  90. package/node_modules/@oxygen/workflows/dist/graph/topology.js +280 -0
  91. package/node_modules/@oxygen/workflows/dist/graph/types.d.ts +270 -0
  92. package/node_modules/@oxygen/workflows/dist/graph/types.js +93 -0
  93. package/node_modules/@oxygen/workflows/dist/index.d.ts +113 -1
  94. package/node_modules/@oxygen/workflows/dist/index.js +179 -13
  95. package/node_modules/@oxygen/workflows/dist/tool-effects.d.ts +1 -0
  96. package/node_modules/@oxygen/workflows/dist/tool-effects.js +19 -0
  97. package/node_modules/@oxygen/workflows/dist/usage-estimate.js +135 -4
  98. package/node_modules/@oxygen/workflows/package.json +4 -0
  99. package/package.json +10 -5
@@ -0,0 +1,291 @@
1
+ /**
2
+ * Canonical sequencer activity vocabulary for CRM event sync.
3
+ *
4
+ * The worker source selectors, workflow payload, API, CLI/MCP descriptors, and
5
+ * Launch UI all consume this catalog. A row is only added when the sequencer has
6
+ * a durable source ledger for it; this keeps the mapping UI from advertising an
7
+ * event that can never fire.
8
+ */
9
+ export declare const SEQUENCE_CRM_EVENT_DEFINITIONS: readonly [{
10
+ readonly key: "linkedin_profile_visited";
11
+ readonly label: "LinkedIn profile visited";
12
+ readonly group: "LinkedIn";
13
+ readonly defaultHubSpotProperty: "oxygen_last_linkedin_profile_visited_at";
14
+ readonly source: {
15
+ readonly kind: "action";
16
+ readonly values: readonly ["visit_profile"];
17
+ };
18
+ }, {
19
+ readonly key: "linkedin_connection_sent";
20
+ readonly label: "LinkedIn connection sent";
21
+ readonly group: "LinkedIn";
22
+ readonly defaultHubSpotProperty: "oxygen_last_linkedin_connection_sent_at";
23
+ readonly source: {
24
+ readonly kind: "action";
25
+ readonly values: readonly ["invite"];
26
+ };
27
+ }, {
28
+ readonly key: "linkedin_connection_accepted";
29
+ readonly label: "LinkedIn connection accepted";
30
+ readonly group: "LinkedIn";
31
+ readonly defaultHubSpotProperty: "oxygen_last_linkedin_connection_accepted_at";
32
+ readonly source: {
33
+ readonly kind: "signal";
34
+ readonly values: readonly ["linkedin_connected"];
35
+ };
36
+ }, {
37
+ readonly key: "linkedin_message_sent";
38
+ readonly label: "LinkedIn message sent";
39
+ readonly group: "LinkedIn";
40
+ readonly defaultHubSpotProperty: "oxygen_last_linkedin_message_sent_at";
41
+ readonly source: {
42
+ readonly kind: "action";
43
+ readonly values: readonly ["message"];
44
+ };
45
+ }, {
46
+ readonly key: "linkedin_inmail_sent";
47
+ readonly label: "LinkedIn InMail sent";
48
+ readonly group: "LinkedIn";
49
+ readonly defaultHubSpotProperty: "oxygen_last_linkedin_inmail_sent_at";
50
+ readonly source: {
51
+ readonly kind: "action";
52
+ readonly values: readonly ["inmail"];
53
+ };
54
+ }, {
55
+ readonly key: "linkedin_reply_received";
56
+ readonly label: "LinkedIn reply received";
57
+ readonly group: "LinkedIn";
58
+ readonly defaultHubSpotProperty: "oxygen_last_linkedin_reply_at";
59
+ readonly source: {
60
+ readonly kind: "signal";
61
+ readonly values: readonly ["linkedin_replied"];
62
+ };
63
+ }, {
64
+ readonly key: "linkedin_followed";
65
+ readonly label: "LinkedIn profile followed";
66
+ readonly group: "LinkedIn";
67
+ readonly defaultHubSpotProperty: "oxygen_last_linkedin_followed_at";
68
+ readonly source: {
69
+ readonly kind: "action";
70
+ readonly values: readonly ["follow"];
71
+ };
72
+ }, {
73
+ readonly key: "linkedin_post_liked";
74
+ readonly label: "LinkedIn post liked";
75
+ readonly group: "LinkedIn";
76
+ readonly defaultHubSpotProperty: "oxygen_last_linkedin_post_liked_at";
77
+ readonly source: {
78
+ readonly kind: "action";
79
+ readonly values: readonly ["like_post"];
80
+ };
81
+ }, {
82
+ readonly key: "linkedin_post_commented";
83
+ readonly label: "LinkedIn post commented";
84
+ readonly group: "LinkedIn";
85
+ readonly defaultHubSpotProperty: "oxygen_last_linkedin_post_commented_at";
86
+ readonly source: {
87
+ readonly kind: "action";
88
+ readonly values: readonly ["comment_post"];
89
+ };
90
+ }, {
91
+ readonly key: "linkedin_connection_withdrawn";
92
+ readonly label: "LinkedIn connection withdrawn";
93
+ readonly group: "LinkedIn";
94
+ readonly defaultHubSpotProperty: "oxygen_last_linkedin_connection_withdrawn_at";
95
+ readonly source: {
96
+ readonly kind: "action";
97
+ readonly values: readonly ["withdraw_invite"];
98
+ };
99
+ }, {
100
+ readonly key: "email_sent";
101
+ readonly label: "Email sent";
102
+ readonly group: "Email";
103
+ readonly defaultHubSpotProperty: "oxygen_last_email_sent_at";
104
+ readonly source: {
105
+ readonly kind: "action";
106
+ readonly values: readonly ["email_send", "email_reply"];
107
+ };
108
+ readonly additionalSources: readonly [{
109
+ readonly kind: "signal";
110
+ readonly values: readonly ["email_sent"];
111
+ }];
112
+ }, {
113
+ readonly key: "email_campaign_enrolled";
114
+ readonly label: "Email campaign enrolled";
115
+ readonly group: "Email";
116
+ readonly defaultHubSpotProperty: "oxygen_last_email_campaign_enrolled_at";
117
+ readonly source: {
118
+ readonly kind: "action";
119
+ readonly values: readonly ["email_enroll"];
120
+ };
121
+ }, {
122
+ readonly key: "email_campaign_moved";
123
+ readonly label: "Email campaign moved";
124
+ readonly group: "Email";
125
+ readonly defaultHubSpotProperty: "oxygen_last_email_campaign_moved_at";
126
+ readonly source: {
127
+ readonly kind: "action";
128
+ readonly values: readonly ["email_move"];
129
+ };
130
+ }, {
131
+ readonly key: "email_campaign_stopped";
132
+ readonly label: "Email campaign stopped";
133
+ readonly group: "Email";
134
+ readonly defaultHubSpotProperty: "oxygen_last_email_campaign_stopped_at";
135
+ readonly source: {
136
+ readonly kind: "action";
137
+ readonly values: readonly ["email_stop"];
138
+ };
139
+ }, {
140
+ readonly key: "email_opened";
141
+ readonly label: "Email opened";
142
+ readonly group: "Email";
143
+ readonly defaultHubSpotProperty: "oxygen_last_email_opened_at";
144
+ readonly source: {
145
+ readonly kind: "tracking";
146
+ readonly values: readonly ["open"];
147
+ };
148
+ readonly additionalSources: readonly [{
149
+ readonly kind: "signal";
150
+ readonly values: readonly ["email_opened"];
151
+ }];
152
+ }, {
153
+ readonly key: "email_clicked";
154
+ readonly label: "Email link clicked";
155
+ readonly group: "Email";
156
+ readonly defaultHubSpotProperty: "oxygen_last_email_clicked_at";
157
+ readonly source: {
158
+ readonly kind: "tracking";
159
+ readonly values: readonly ["click"];
160
+ };
161
+ readonly additionalSources: readonly [{
162
+ readonly kind: "signal";
163
+ readonly values: readonly ["email_clicked"];
164
+ }];
165
+ }, {
166
+ readonly key: "email_reply_received";
167
+ readonly label: "Email reply received";
168
+ readonly group: "Email";
169
+ readonly defaultHubSpotProperty: "oxygen_last_email_reply_at";
170
+ readonly source: {
171
+ readonly kind: "signal";
172
+ readonly values: readonly ["email_replied"];
173
+ };
174
+ }, {
175
+ readonly key: "email_bounced";
176
+ readonly label: "Email bounced";
177
+ readonly group: "Email";
178
+ readonly defaultHubSpotProperty: "oxygen_last_email_bounced_at";
179
+ readonly source: {
180
+ readonly kind: "signal";
181
+ readonly values: readonly ["email_bounced"];
182
+ };
183
+ readonly additionalSources: readonly [{
184
+ readonly kind: "suppression";
185
+ readonly values: readonly ["hard_bounce"];
186
+ }];
187
+ }, {
188
+ readonly key: "email_unsubscribed";
189
+ readonly label: "Email unsubscribed";
190
+ readonly group: "Email";
191
+ readonly defaultHubSpotProperty: "oxygen_last_email_unsubscribed_at";
192
+ readonly source: {
193
+ readonly kind: "suppression";
194
+ readonly values: readonly ["unsubscribe"];
195
+ };
196
+ readonly additionalSources: readonly [{
197
+ readonly kind: "signal";
198
+ readonly values: readonly ["email_unsubscribed"];
199
+ }];
200
+ }, {
201
+ readonly key: "email_spam_complaint";
202
+ readonly label: "Email spam complaint";
203
+ readonly group: "Email";
204
+ readonly defaultHubSpotProperty: "oxygen_last_email_spam_complaint_at";
205
+ readonly source: {
206
+ readonly kind: "suppression";
207
+ readonly values: readonly ["complaint"];
208
+ };
209
+ }, {
210
+ readonly key: "whatsapp_message_sent";
211
+ readonly label: "WhatsApp message sent";
212
+ readonly group: "WhatsApp";
213
+ readonly defaultHubSpotProperty: "oxygen_last_whatsapp_message_sent_at";
214
+ readonly source: {
215
+ readonly kind: "action";
216
+ readonly values: readonly ["whatsapp_message"];
217
+ };
218
+ }, {
219
+ readonly key: "whatsapp_reply_received";
220
+ readonly label: "WhatsApp reply received";
221
+ readonly group: "WhatsApp";
222
+ readonly defaultHubSpotProperty: "oxygen_last_whatsapp_reply_at";
223
+ readonly source: {
224
+ readonly kind: "signal";
225
+ readonly values: readonly ["whatsapp_replied"];
226
+ };
227
+ }, {
228
+ readonly key: "call_task_created";
229
+ readonly label: "Call task created";
230
+ readonly group: "Calls & CRM";
231
+ readonly defaultHubSpotProperty: "oxygen_last_call_task_created_at";
232
+ readonly source: {
233
+ readonly kind: "call_task";
234
+ readonly values: readonly ["created"];
235
+ };
236
+ }, {
237
+ readonly key: "call_connected";
238
+ readonly label: "Call connected";
239
+ readonly group: "Calls & CRM";
240
+ readonly defaultHubSpotProperty: "oxygen_last_call_connected_at";
241
+ readonly source: {
242
+ readonly kind: "signal";
243
+ readonly values: readonly ["call_connected"];
244
+ };
245
+ }, {
246
+ readonly key: "call_no_answer";
247
+ readonly label: "Call — no answer";
248
+ readonly group: "Calls & CRM";
249
+ readonly defaultHubSpotProperty: "oxygen_last_call_no_answer_at";
250
+ readonly source: {
251
+ readonly kind: "signal";
252
+ readonly values: readonly ["call_no_answer"];
253
+ };
254
+ }, {
255
+ readonly key: "call_voicemail";
256
+ readonly label: "Call — voicemail";
257
+ readonly group: "Calls & CRM";
258
+ readonly defaultHubSpotProperty: "oxygen_last_call_voicemail_at";
259
+ readonly source: {
260
+ readonly kind: "signal";
261
+ readonly values: readonly ["call_voicemail"];
262
+ };
263
+ }, {
264
+ readonly key: "meeting_booked";
265
+ readonly label: "Meeting booked";
266
+ readonly group: "Calls & CRM";
267
+ readonly defaultHubSpotProperty: "oxygen_last_meeting_booked_at";
268
+ readonly source: {
269
+ readonly kind: "signal";
270
+ readonly values: readonly ["meeting_booked"];
271
+ };
272
+ }, {
273
+ readonly key: "crm_task_created";
274
+ readonly label: "CRM task created";
275
+ readonly group: "Calls & CRM";
276
+ readonly defaultHubSpotProperty: "oxygen_last_crm_task_created_at";
277
+ readonly source: {
278
+ readonly kind: "action";
279
+ readonly values: readonly ["crm_task"];
280
+ };
281
+ }];
282
+ export type SequenceCrmEventDefinition = (typeof SEQUENCE_CRM_EVENT_DEFINITIONS)[number];
283
+ export type SequenceCrmEventKey = SequenceCrmEventDefinition["key"];
284
+ export type SequenceCrmEventGroup = SequenceCrmEventDefinition["group"];
285
+ export declare const SEQUENCE_CRM_EVENT_KEYS: readonly SequenceCrmEventKey[];
286
+ export declare const SEQUENCE_HUBSPOT_EVENT_SYNC_TEMPLATE_ID = "sequencer-hubspot-event-sync";
287
+ export declare const SEQUENCE_WORKFLOW_EVENT_SOURCE = "sequencer";
288
+ export declare const SEQUENCE_CONTACT_ACTIVITY_EVENT = "contact_activity";
289
+ export declare const SEQUENCE_HUBSPOT_LINKEDIN_IDENTITY_PROPERTY = "oxygen_linkedin_url";
290
+ export declare const DEFAULT_SEQUENCE_HUBSPOT_EVENT_MAPPINGS: Readonly<Record<"linkedin_profile_visited" | "linkedin_connection_sent" | "linkedin_connection_accepted" | "linkedin_message_sent" | "linkedin_inmail_sent" | "linkedin_reply_received" | "linkedin_followed" | "linkedin_post_liked" | "linkedin_post_commented" | "linkedin_connection_withdrawn" | "email_sent" | "email_campaign_enrolled" | "email_campaign_moved" | "email_campaign_stopped" | "email_opened" | "email_clicked" | "email_reply_received" | "email_bounced" | "email_unsubscribed" | "email_spam_complaint" | "whatsapp_message_sent" | "whatsapp_reply_received" | "call_task_created" | "call_connected" | "call_no_answer" | "call_voicemail" | "meeting_booked" | "crm_task_created", string>>;
291
+ export declare function isSequenceCrmEventKey(value: unknown): value is SequenceCrmEventKey;
@@ -0,0 +1,224 @@
1
+ /**
2
+ * Canonical sequencer activity vocabulary for CRM event sync.
3
+ *
4
+ * The worker source selectors, workflow payload, API, CLI/MCP descriptors, and
5
+ * Launch UI all consume this catalog. A row is only added when the sequencer has
6
+ * a durable source ledger for it; this keeps the mapping UI from advertising an
7
+ * event that can never fire.
8
+ */
9
+ export const SEQUENCE_CRM_EVENT_DEFINITIONS = [
10
+ {
11
+ key: "linkedin_profile_visited",
12
+ label: "LinkedIn profile visited",
13
+ group: "LinkedIn",
14
+ defaultHubSpotProperty: "oxygen_last_linkedin_profile_visited_at",
15
+ source: { kind: "action", values: ["visit_profile"] },
16
+ },
17
+ {
18
+ key: "linkedin_connection_sent",
19
+ label: "LinkedIn connection sent",
20
+ group: "LinkedIn",
21
+ defaultHubSpotProperty: "oxygen_last_linkedin_connection_sent_at",
22
+ source: { kind: "action", values: ["invite"] },
23
+ },
24
+ {
25
+ key: "linkedin_connection_accepted",
26
+ label: "LinkedIn connection accepted",
27
+ group: "LinkedIn",
28
+ defaultHubSpotProperty: "oxygen_last_linkedin_connection_accepted_at",
29
+ source: { kind: "signal", values: ["linkedin_connected"] },
30
+ },
31
+ {
32
+ key: "linkedin_message_sent",
33
+ label: "LinkedIn message sent",
34
+ group: "LinkedIn",
35
+ defaultHubSpotProperty: "oxygen_last_linkedin_message_sent_at",
36
+ source: { kind: "action", values: ["message"] },
37
+ },
38
+ {
39
+ key: "linkedin_inmail_sent",
40
+ label: "LinkedIn InMail sent",
41
+ group: "LinkedIn",
42
+ defaultHubSpotProperty: "oxygen_last_linkedin_inmail_sent_at",
43
+ source: { kind: "action", values: ["inmail"] },
44
+ },
45
+ {
46
+ key: "linkedin_reply_received",
47
+ label: "LinkedIn reply received",
48
+ group: "LinkedIn",
49
+ defaultHubSpotProperty: "oxygen_last_linkedin_reply_at",
50
+ source: { kind: "signal", values: ["linkedin_replied"] },
51
+ },
52
+ {
53
+ key: "linkedin_followed",
54
+ label: "LinkedIn profile followed",
55
+ group: "LinkedIn",
56
+ defaultHubSpotProperty: "oxygen_last_linkedin_followed_at",
57
+ source: { kind: "action", values: ["follow"] },
58
+ },
59
+ {
60
+ key: "linkedin_post_liked",
61
+ label: "LinkedIn post liked",
62
+ group: "LinkedIn",
63
+ defaultHubSpotProperty: "oxygen_last_linkedin_post_liked_at",
64
+ source: { kind: "action", values: ["like_post"] },
65
+ },
66
+ {
67
+ key: "linkedin_post_commented",
68
+ label: "LinkedIn post commented",
69
+ group: "LinkedIn",
70
+ defaultHubSpotProperty: "oxygen_last_linkedin_post_commented_at",
71
+ source: { kind: "action", values: ["comment_post"] },
72
+ },
73
+ {
74
+ key: "linkedin_connection_withdrawn",
75
+ label: "LinkedIn connection withdrawn",
76
+ group: "LinkedIn",
77
+ defaultHubSpotProperty: "oxygen_last_linkedin_connection_withdrawn_at",
78
+ source: { kind: "action", values: ["withdraw_invite"] },
79
+ },
80
+ {
81
+ key: "email_sent",
82
+ label: "Email sent",
83
+ group: "Email",
84
+ defaultHubSpotProperty: "oxygen_last_email_sent_at",
85
+ source: { kind: "action", values: ["email_send", "email_reply"] },
86
+ additionalSources: [{ kind: "signal", values: ["email_sent"] }],
87
+ },
88
+ {
89
+ key: "email_campaign_enrolled",
90
+ label: "Email campaign enrolled",
91
+ group: "Email",
92
+ defaultHubSpotProperty: "oxygen_last_email_campaign_enrolled_at",
93
+ source: { kind: "action", values: ["email_enroll"] },
94
+ },
95
+ {
96
+ key: "email_campaign_moved",
97
+ label: "Email campaign moved",
98
+ group: "Email",
99
+ defaultHubSpotProperty: "oxygen_last_email_campaign_moved_at",
100
+ source: { kind: "action", values: ["email_move"] },
101
+ },
102
+ {
103
+ key: "email_campaign_stopped",
104
+ label: "Email campaign stopped",
105
+ group: "Email",
106
+ defaultHubSpotProperty: "oxygen_last_email_campaign_stopped_at",
107
+ source: { kind: "action", values: ["email_stop"] },
108
+ },
109
+ {
110
+ key: "email_opened",
111
+ label: "Email opened",
112
+ group: "Email",
113
+ defaultHubSpotProperty: "oxygen_last_email_opened_at",
114
+ source: { kind: "tracking", values: ["open"] },
115
+ additionalSources: [{ kind: "signal", values: ["email_opened"] }],
116
+ },
117
+ {
118
+ key: "email_clicked",
119
+ label: "Email link clicked",
120
+ group: "Email",
121
+ defaultHubSpotProperty: "oxygen_last_email_clicked_at",
122
+ source: { kind: "tracking", values: ["click"] },
123
+ additionalSources: [{ kind: "signal", values: ["email_clicked"] }],
124
+ },
125
+ {
126
+ key: "email_reply_received",
127
+ label: "Email reply received",
128
+ group: "Email",
129
+ defaultHubSpotProperty: "oxygen_last_email_reply_at",
130
+ source: { kind: "signal", values: ["email_replied"] },
131
+ },
132
+ {
133
+ key: "email_bounced",
134
+ label: "Email bounced",
135
+ group: "Email",
136
+ defaultHubSpotProperty: "oxygen_last_email_bounced_at",
137
+ source: { kind: "signal", values: ["email_bounced"] },
138
+ additionalSources: [{ kind: "suppression", values: ["hard_bounce"] }],
139
+ },
140
+ {
141
+ key: "email_unsubscribed",
142
+ label: "Email unsubscribed",
143
+ group: "Email",
144
+ defaultHubSpotProperty: "oxygen_last_email_unsubscribed_at",
145
+ source: { kind: "suppression", values: ["unsubscribe"] },
146
+ additionalSources: [{ kind: "signal", values: ["email_unsubscribed"] }],
147
+ },
148
+ {
149
+ key: "email_spam_complaint",
150
+ label: "Email spam complaint",
151
+ group: "Email",
152
+ defaultHubSpotProperty: "oxygen_last_email_spam_complaint_at",
153
+ source: { kind: "suppression", values: ["complaint"] },
154
+ },
155
+ {
156
+ key: "whatsapp_message_sent",
157
+ label: "WhatsApp message sent",
158
+ group: "WhatsApp",
159
+ defaultHubSpotProperty: "oxygen_last_whatsapp_message_sent_at",
160
+ source: { kind: "action", values: ["whatsapp_message"] },
161
+ },
162
+ {
163
+ key: "whatsapp_reply_received",
164
+ label: "WhatsApp reply received",
165
+ group: "WhatsApp",
166
+ defaultHubSpotProperty: "oxygen_last_whatsapp_reply_at",
167
+ source: { kind: "signal", values: ["whatsapp_replied"] },
168
+ },
169
+ {
170
+ key: "call_task_created",
171
+ label: "Call task created",
172
+ group: "Calls & CRM",
173
+ defaultHubSpotProperty: "oxygen_last_call_task_created_at",
174
+ source: { kind: "call_task", values: ["created"] },
175
+ },
176
+ {
177
+ key: "call_connected",
178
+ label: "Call connected",
179
+ group: "Calls & CRM",
180
+ defaultHubSpotProperty: "oxygen_last_call_connected_at",
181
+ source: { kind: "signal", values: ["call_connected"] },
182
+ },
183
+ {
184
+ key: "call_no_answer",
185
+ label: "Call — no answer",
186
+ group: "Calls & CRM",
187
+ defaultHubSpotProperty: "oxygen_last_call_no_answer_at",
188
+ source: { kind: "signal", values: ["call_no_answer"] },
189
+ },
190
+ {
191
+ key: "call_voicemail",
192
+ label: "Call — voicemail",
193
+ group: "Calls & CRM",
194
+ defaultHubSpotProperty: "oxygen_last_call_voicemail_at",
195
+ source: { kind: "signal", values: ["call_voicemail"] },
196
+ },
197
+ {
198
+ key: "meeting_booked",
199
+ label: "Meeting booked",
200
+ group: "Calls & CRM",
201
+ defaultHubSpotProperty: "oxygen_last_meeting_booked_at",
202
+ source: { kind: "signal", values: ["meeting_booked"] },
203
+ },
204
+ {
205
+ key: "crm_task_created",
206
+ label: "CRM task created",
207
+ group: "Calls & CRM",
208
+ defaultHubSpotProperty: "oxygen_last_crm_task_created_at",
209
+ source: { kind: "action", values: ["crm_task"] },
210
+ },
211
+ ];
212
+ export const SEQUENCE_CRM_EVENT_KEYS = SEQUENCE_CRM_EVENT_DEFINITIONS.map((definition) => definition.key);
213
+ export const SEQUENCE_HUBSPOT_EVENT_SYNC_TEMPLATE_ID = "sequencer-hubspot-event-sync";
214
+ export const SEQUENCE_WORKFLOW_EVENT_SOURCE = "sequencer";
215
+ export const SEQUENCE_CONTACT_ACTIVITY_EVENT = "contact_activity";
216
+ export const SEQUENCE_HUBSPOT_LINKEDIN_IDENTITY_PROPERTY = "oxygen_linkedin_url";
217
+ export const DEFAULT_SEQUENCE_HUBSPOT_EVENT_MAPPINGS = Object.freeze(Object.fromEntries(SEQUENCE_CRM_EVENT_DEFINITIONS.map((definition) => [
218
+ definition.key,
219
+ definition.defaultHubSpotProperty,
220
+ ])));
221
+ export function isSequenceCrmEventKey(value) {
222
+ return (typeof value === "string"
223
+ && SEQUENCE_CRM_EVENT_KEYS.includes(value));
224
+ }
@@ -3,7 +3,7 @@
3
3
  * step (LinkedIn message / InMail / invite note, native email subject/body,
4
4
  * WhatsApp message, Instantly custom fields) against a lead's row values in a
5
5
  * SINGLE deterministic pass. Beyond the original `{{column}}` substitution it
6
- * supports three composable, nestable constructs:
6
+ * supports four composable, nestable constructs:
7
7
  *
8
8
  * 1. Inline fallback — `{{column|fallback text}}` renders the column's value, or
9
9
  * the literal fallback text when the column is missing/empty. `{{column}}`
@@ -17,6 +17,17 @@
17
17
  * `{% if column contains "x" %}A{% endif %}` (case-insensitive substring).
18
18
  * The `{% else %}` arm and the operator/quoted value are optional; either
19
19
  * branch may nest any construct.
20
+ * 4. Bare spintax — `{Hi|Hey|Hello}` (the industry-standard form users bring
21
+ * from Instantly/Smartlead/Lemlist), nestable to MAX_SPINTAX_DEPTH:
22
+ * `{Would {Tuesday|Thursday} work|How does next week look}`. A lone `{…}`
23
+ * region is spintax ONLY when it contains at least one top-level `|` —
24
+ * literal braces (CSS in body_html, JSON, code) render untouched. Options
25
+ * render exactly as written (no trimming, unlike `{{RANDOM|…}}`) and may
26
+ * nest any construct in either direction (`{{RANDOM|{a|b}|c}}` works too).
27
+ * Sibling behavior deliberately differs from `{{RANDOM|…}}`: identical
28
+ * RANDOM blocks in one template always pick the SAME option (back-compat),
29
+ * while repeated bare blocks spin independently via an occurrence index —
30
+ * the deliverability point of spintax.
20
31
  *
21
32
  * Determinism contract: the SAME (template, values, seed) always renders
22
33
  * byte-identically. The sequencer dispatch passes an enrollment-scoped seed so a
@@ -43,6 +54,11 @@ export type RenderTemplateOptions = {
43
54
  * sequences.ts (which imports it from this module).
44
55
  */
45
56
  export declare function hashVariantKey(value: string): number;
57
+ /**
58
+ * Bare-spintax nesting cap enforced at WRITE time by spintaxSyntaxIssues — legit
59
+ * stored copy therefore never reaches the render-time MAX_RENDER_DEPTH guard.
60
+ */
61
+ export declare const MAX_SPINTAX_DEPTH = 10;
46
62
  /**
47
63
  * Render a sequence-copy template against a lead's row values. Supports
48
64
  * `{{column}}` substitution, `{{column|fallback}}`, `{{RANDOM|…}}` spintax, and
@@ -58,3 +74,28 @@ export declare function renderTemplate(template: string, values: Record<string,
58
74
  * nested construct still surfaces. Deduplicated.
59
75
  */
60
76
  export declare function templateColumnKeys(template: string): string[];
77
+ /**
78
+ * Whether a template contains any spintax — `{{RANDOM|…}}` or a valid bare
79
+ * `{a|b}` block (closed, with a top-level `|`), at any nesting position. Cheap
80
+ * pure scan used by the start-preview "spintax is not an A/B test" advisory.
81
+ */
82
+ export declare function templateHasSpintax(template: string): boolean;
83
+ /**
84
+ * Write-time lint of BARE spintax grammar. Returns human-readable issues for:
85
+ * an unclosed bare block that contains a top-level `|` (the renderer would emit
86
+ * it literally — never intended), an empty option (`{a||b}`, `{|a}`, `{a|}`),
87
+ * and nesting beyond MAX_SPINTAX_DEPTH. Deliberately silent on `{{RANDOM|…}}`
88
+ * malformations — stored sequences with a sloppy RANDOM block must keep
89
+ * re-validating (those get soft preview warnings instead). Literal braces
90
+ * without a top-level pipe (CSS/JSON/copy) are never flagged, mirroring the
91
+ * renderer's spintax-only-iff-top-level-pipe rule.
92
+ */
93
+ export declare function spintaxSyntaxIssues(template: string): string[];
94
+ /**
95
+ * Soft preview-time warnings for `{{RANDOM|…}}` malformations: a single-option
96
+ * block (always renders the same text) and an empty option (one spin renders
97
+ * nothing). Deliberately NOT part of write-time validation — sequences that
98
+ * already store such blocks must keep re-validating unchanged; the start
99
+ * preview surfaces these as advisories instead.
100
+ */
101
+ export declare function randomSpintaxWarnings(template: string): string[];