@apex-inc/mcp-server 0.74.0 → 0.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-client.d.ts +13 -19
- package/dist/api-client.d.ts.map +1 -1
- package/dist/api-client.js +173 -59
- package/dist/api-client.js.map +1 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +7 -6
- package/dist/auth.js.map +1 -1
- package/dist/fetch-timeout.d.ts +23 -0
- package/dist/fetch-timeout.d.ts.map +1 -0
- package/dist/fetch-timeout.js +78 -0
- package/dist/fetch-timeout.js.map +1 -0
- package/dist/hosted.d.ts +28 -0
- package/dist/hosted.d.ts.map +1 -0
- package/dist/hosted.js +56 -0
- package/dist/hosted.js.map +1 -0
- package/dist/index.js +40 -118
- package/dist/index.js.map +1 -1
- package/dist/live-test-files.d.ts +35 -0
- package/dist/live-test-files.d.ts.map +1 -0
- package/dist/live-test-files.js +114 -0
- package/dist/live-test-files.js.map +1 -0
- package/dist/live-test-guard.d.ts.map +1 -1
- package/dist/live-test-guard.js +7 -1
- package/dist/live-test-guard.js.map +1 -1
- package/dist/request-context.d.ts +38 -0
- package/dist/request-context.d.ts.map +1 -0
- package/dist/request-context.js +11 -0
- package/dist/request-context.js.map +1 -0
- package/dist/server-factory.d.ts +18 -0
- package/dist/server-factory.d.ts.map +1 -0
- package/dist/server-factory.js +221 -0
- package/dist/server-factory.js.map +1 -0
- package/dist/setup-catchup-tools.d.ts +4 -0
- package/dist/setup-catchup-tools.d.ts.map +1 -1
- package/dist/setup-catchup-tools.js +16 -5
- package/dist/setup-catchup-tools.js.map +1 -1
- package/dist/smoke-tools.d.ts.map +1 -1
- package/dist/smoke-tools.js +2 -0
- package/dist/smoke-tools.js.map +1 -1
- package/dist/tool-catalog.d.ts +2 -0
- package/dist/tool-catalog.d.ts.map +1 -1
- package/dist/tool-catalog.js +6 -1
- package/dist/tool-catalog.js.map +1 -1
- package/dist/tool-groups.d.ts.map +1 -1
- package/dist/tool-groups.js +14 -0
- package/dist/tool-groups.js.map +1 -1
- package/dist/tool-shared.d.ts +2 -1
- package/dist/tool-shared.d.ts.map +1 -1
- package/dist/tool-shared.js +17 -2
- package/dist/tool-shared.js.map +1 -1
- package/dist/tools/adoption.d.ts.map +1 -1
- package/dist/tools/adoption.js +2 -1
- package/dist/tools/adoption.js.map +1 -1
- package/dist/tools/apex-campaigns.d.ts +390 -0
- package/dist/tools/apex-campaigns.d.ts.map +1 -1
- package/dist/tools/apex-campaigns.js +253 -1
- package/dist/tools/apex-campaigns.js.map +1 -1
- package/dist/tools/context.d.ts +2 -2
- package/dist/tools/experiments.d.ts +69 -1
- package/dist/tools/experiments.d.ts.map +1 -1
- package/dist/tools/experiments.js +88 -24
- package/dist/tools/experiments.js.map +1 -1
- package/dist/tools/letters.d.ts +423 -65
- package/dist/tools/letters.d.ts.map +1 -1
- package/dist/tools/letters.js +383 -42
- package/dist/tools/letters.js.map +1 -1
- package/dist/tools/measurement.d.ts +80 -38
- package/dist/tools/measurement.d.ts.map +1 -1
- package/dist/tools/measurement.js +151 -13
- package/dist/tools/measurement.js.map +1 -1
- package/dist/tools.d.ts +1047 -157
- package/dist/tools.d.ts.map +1 -1
- package/package.json +11 -1
- package/skills/apex-growth-intelligence/SKILL.md +4 -0
- package/skills/apex-growth-tracking/SKILL.md +1 -1
- package/skills/apex-integration-cookbook/SKILL.md +23 -3
- package/skills/apex-setup/SKILL.md +1 -1
- package/skills/apex-spec/SKILL.md +6 -1
|
@@ -6,14 +6,14 @@ declare const keyEventSourceSchema: z.ZodObject<{
|
|
|
6
6
|
target_url: z.ZodOptional<z.ZodString>;
|
|
7
7
|
where: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8
8
|
field_path: z.ZodString;
|
|
9
|
-
operator: z.ZodEnum<["equals", "not_equals", "in", "exists", "not_exists"]>;
|
|
9
|
+
operator: z.ZodEnum<["equals", "not_equals", "in", "contains", "gt", "gte", "lt", "lte", "exists", "not_exists"]>;
|
|
10
10
|
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">]>>;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
12
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
13
13
|
field_path: string;
|
|
14
14
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
15
15
|
}, {
|
|
16
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
16
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
17
17
|
field_path: string;
|
|
18
18
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
19
19
|
}>, "many">>;
|
|
@@ -22,23 +22,23 @@ declare const keyEventSourceSchema: z.ZodObject<{
|
|
|
22
22
|
type: "form_submit" | "custom_event";
|
|
23
23
|
event_name?: string | undefined;
|
|
24
24
|
selector?: string | undefined;
|
|
25
|
-
target_url?: string | undefined;
|
|
26
25
|
where?: {
|
|
27
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
26
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
28
27
|
field_path: string;
|
|
29
28
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
30
29
|
}[] | undefined;
|
|
30
|
+
target_url?: string | undefined;
|
|
31
31
|
revenue_stream?: "dedupe_with_billing" | "additive" | undefined;
|
|
32
32
|
}, {
|
|
33
33
|
type: "form_submit" | "custom_event";
|
|
34
34
|
event_name?: string | undefined;
|
|
35
35
|
selector?: string | undefined;
|
|
36
|
-
target_url?: string | undefined;
|
|
37
36
|
where?: {
|
|
38
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
37
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
39
38
|
field_path: string;
|
|
40
39
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
41
40
|
}[] | undefined;
|
|
41
|
+
target_url?: string | undefined;
|
|
42
42
|
revenue_stream?: "dedupe_with_billing" | "additive" | undefined;
|
|
43
43
|
}>;
|
|
44
44
|
type KeyEventSourceArg = z.infer<typeof keyEventSourceSchema>;
|
|
@@ -87,13 +87,17 @@ export declare const measurementTools: {
|
|
|
87
87
|
description: string;
|
|
88
88
|
schema: z.ZodObject<{
|
|
89
89
|
days: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodLiteral<"all">]>>;
|
|
90
|
+
keyEventId: z.ZodOptional<z.ZodString>;
|
|
90
91
|
}, "strip", z.ZodTypeAny, {
|
|
91
92
|
days?: number | "all" | undefined;
|
|
93
|
+
keyEventId?: string | undefined;
|
|
92
94
|
}, {
|
|
93
95
|
days?: number | "all" | undefined;
|
|
96
|
+
keyEventId?: string | undefined;
|
|
94
97
|
}>;
|
|
95
|
-
handler: ({ days }: {
|
|
98
|
+
handler: ({ days, keyEventId, }: {
|
|
96
99
|
days?: number | "all";
|
|
100
|
+
keyEventId?: string;
|
|
97
101
|
}) => Promise<{
|
|
98
102
|
content: {
|
|
99
103
|
type: "text";
|
|
@@ -205,6 +209,44 @@ export declare const measurementTools: {
|
|
|
205
209
|
}[];
|
|
206
210
|
}>;
|
|
207
211
|
};
|
|
212
|
+
get_funnel: {
|
|
213
|
+
description: string;
|
|
214
|
+
schema: z.ZodObject<{
|
|
215
|
+
start: z.ZodOptional<z.ZodString>;
|
|
216
|
+
end: z.ZodOptional<z.ZodString>;
|
|
217
|
+
days: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
breakdownBy: z.ZodOptional<z.ZodString>;
|
|
219
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
220
|
+
breakdownLimit: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
steps?: string[] | undefined;
|
|
223
|
+
days?: number | undefined;
|
|
224
|
+
start?: string | undefined;
|
|
225
|
+
end?: string | undefined;
|
|
226
|
+
breakdownBy?: string | undefined;
|
|
227
|
+
breakdownLimit?: number | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
steps?: string[] | undefined;
|
|
230
|
+
days?: number | undefined;
|
|
231
|
+
start?: string | undefined;
|
|
232
|
+
end?: string | undefined;
|
|
233
|
+
breakdownBy?: string | undefined;
|
|
234
|
+
breakdownLimit?: number | undefined;
|
|
235
|
+
}>;
|
|
236
|
+
handler: (args?: {
|
|
237
|
+
start?: string;
|
|
238
|
+
end?: string;
|
|
239
|
+
days?: number;
|
|
240
|
+
breakdownBy?: string;
|
|
241
|
+
steps?: string[];
|
|
242
|
+
breakdownLimit?: number;
|
|
243
|
+
}) => Promise<{
|
|
244
|
+
content: {
|
|
245
|
+
type: "text";
|
|
246
|
+
text: string;
|
|
247
|
+
}[];
|
|
248
|
+
}>;
|
|
249
|
+
};
|
|
208
250
|
list_key_events: {
|
|
209
251
|
description: string;
|
|
210
252
|
schema: z.ZodObject<{
|
|
@@ -253,14 +295,14 @@ export declare const measurementTools: {
|
|
|
253
295
|
target_url: z.ZodOptional<z.ZodString>;
|
|
254
296
|
where: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
255
297
|
field_path: z.ZodString;
|
|
256
|
-
operator: z.ZodEnum<["equals", "not_equals", "in", "exists", "not_exists"]>;
|
|
298
|
+
operator: z.ZodEnum<["equals", "not_equals", "in", "contains", "gt", "gte", "lt", "lte", "exists", "not_exists"]>;
|
|
257
299
|
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">]>>;
|
|
258
300
|
}, "strip", z.ZodTypeAny, {
|
|
259
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
301
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
260
302
|
field_path: string;
|
|
261
303
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
262
304
|
}, {
|
|
263
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
305
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
264
306
|
field_path: string;
|
|
265
307
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
266
308
|
}>, "many">>;
|
|
@@ -269,26 +311,26 @@ export declare const measurementTools: {
|
|
|
269
311
|
type: "form_submit" | "custom_event";
|
|
270
312
|
event_name?: string | undefined;
|
|
271
313
|
selector?: string | undefined;
|
|
272
|
-
target_url?: string | undefined;
|
|
273
314
|
where?: {
|
|
274
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
315
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
275
316
|
field_path: string;
|
|
276
317
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
277
318
|
}[] | undefined;
|
|
319
|
+
target_url?: string | undefined;
|
|
278
320
|
revenue_stream?: "dedupe_with_billing" | "additive" | undefined;
|
|
279
321
|
}, {
|
|
280
322
|
type: "form_submit" | "custom_event";
|
|
281
323
|
event_name?: string | undefined;
|
|
282
324
|
selector?: string | undefined;
|
|
283
|
-
target_url?: string | undefined;
|
|
284
325
|
where?: {
|
|
285
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
326
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
286
327
|
field_path: string;
|
|
287
328
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
288
329
|
}[] | undefined;
|
|
330
|
+
target_url?: string | undefined;
|
|
289
331
|
revenue_stream?: "dedupe_with_billing" | "additive" | undefined;
|
|
290
332
|
}>, "many">;
|
|
291
|
-
category: z.ZodOptional<z.ZodEnum<["purchase", "lead", "qualified_lead", "activation", "signup", "subscribe", "add_to_cart", "engagement", "expansion", "referral", "completion", "retention", "advocacy", "churn", "reactivation", "other"]>>;
|
|
333
|
+
category: z.ZodOptional<z.ZodEnum<["install", "purchase", "lead", "qualified_lead", "activation", "signup", "subscribe", "add_to_cart", "checkout", "engagement", "expansion", "referral", "completion", "retention", "advocacy", "churn", "reactivation", "other"]>>;
|
|
292
334
|
entityScope: z.ZodOptional<z.ZodEnum<["person", "account"]>>;
|
|
293
335
|
description: z.ZodOptional<z.ZodString>;
|
|
294
336
|
template: z.ZodOptional<z.ZodString>;
|
|
@@ -301,18 +343,18 @@ export declare const measurementTools: {
|
|
|
301
343
|
type: "form_submit" | "custom_event";
|
|
302
344
|
event_name?: string | undefined;
|
|
303
345
|
selector?: string | undefined;
|
|
304
|
-
target_url?: string | undefined;
|
|
305
346
|
where?: {
|
|
306
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
347
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
307
348
|
field_path: string;
|
|
308
349
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
309
350
|
}[] | undefined;
|
|
351
|
+
target_url?: string | undefined;
|
|
310
352
|
revenue_stream?: "dedupe_with_billing" | "additive" | undefined;
|
|
311
353
|
}[];
|
|
312
354
|
description?: string | undefined;
|
|
313
355
|
position?: number | undefined;
|
|
314
356
|
template?: string | undefined;
|
|
315
|
-
category?: "other" | "engagement" | "referral" | "purchase" | "lead" | "qualified_lead" | "activation" | "signup" | "subscribe" | "add_to_cart" | "expansion" | "completion" | "retention" | "advocacy" | "churn" | "reactivation" | undefined;
|
|
357
|
+
category?: "other" | "engagement" | "referral" | "purchase" | "install" | "lead" | "qualified_lead" | "activation" | "signup" | "subscribe" | "add_to_cart" | "checkout" | "expansion" | "completion" | "retention" | "advocacy" | "churn" | "reactivation" | undefined;
|
|
316
358
|
entityScope?: "account" | "person" | undefined;
|
|
317
359
|
funnelRole?: "milestone" | "stage" | "off_ramp" | "return" | undefined;
|
|
318
360
|
reactivatesChurned?: boolean | undefined;
|
|
@@ -322,18 +364,18 @@ export declare const measurementTools: {
|
|
|
322
364
|
type: "form_submit" | "custom_event";
|
|
323
365
|
event_name?: string | undefined;
|
|
324
366
|
selector?: string | undefined;
|
|
325
|
-
target_url?: string | undefined;
|
|
326
367
|
where?: {
|
|
327
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
368
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
328
369
|
field_path: string;
|
|
329
370
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
330
371
|
}[] | undefined;
|
|
372
|
+
target_url?: string | undefined;
|
|
331
373
|
revenue_stream?: "dedupe_with_billing" | "additive" | undefined;
|
|
332
374
|
}[];
|
|
333
375
|
description?: string | undefined;
|
|
334
376
|
position?: number | undefined;
|
|
335
377
|
template?: string | undefined;
|
|
336
|
-
category?: "other" | "engagement" | "referral" | "purchase" | "lead" | "qualified_lead" | "activation" | "signup" | "subscribe" | "add_to_cart" | "expansion" | "completion" | "retention" | "advocacy" | "churn" | "reactivation" | undefined;
|
|
378
|
+
category?: "other" | "engagement" | "referral" | "purchase" | "install" | "lead" | "qualified_lead" | "activation" | "signup" | "subscribe" | "add_to_cart" | "checkout" | "expansion" | "completion" | "retention" | "advocacy" | "churn" | "reactivation" | undefined;
|
|
337
379
|
entityScope?: "account" | "person" | undefined;
|
|
338
380
|
funnelRole?: "milestone" | "stage" | "off_ramp" | "return" | undefined;
|
|
339
381
|
reactivatesChurned?: boolean | undefined;
|
|
@@ -368,14 +410,14 @@ export declare const measurementTools: {
|
|
|
368
410
|
target_url: z.ZodOptional<z.ZodString>;
|
|
369
411
|
where: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
370
412
|
field_path: z.ZodString;
|
|
371
|
-
operator: z.ZodEnum<["equals", "not_equals", "in", "exists", "not_exists"]>;
|
|
413
|
+
operator: z.ZodEnum<["equals", "not_equals", "in", "contains", "gt", "gte", "lt", "lte", "exists", "not_exists"]>;
|
|
372
414
|
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">]>>;
|
|
373
415
|
}, "strip", z.ZodTypeAny, {
|
|
374
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
416
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
375
417
|
field_path: string;
|
|
376
418
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
377
419
|
}, {
|
|
378
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
420
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
379
421
|
field_path: string;
|
|
380
422
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
381
423
|
}>, "many">>;
|
|
@@ -384,26 +426,26 @@ export declare const measurementTools: {
|
|
|
384
426
|
type: "form_submit" | "custom_event";
|
|
385
427
|
event_name?: string | undefined;
|
|
386
428
|
selector?: string | undefined;
|
|
387
|
-
target_url?: string | undefined;
|
|
388
429
|
where?: {
|
|
389
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
430
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
390
431
|
field_path: string;
|
|
391
432
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
392
433
|
}[] | undefined;
|
|
434
|
+
target_url?: string | undefined;
|
|
393
435
|
revenue_stream?: "dedupe_with_billing" | "additive" | undefined;
|
|
394
436
|
}, {
|
|
395
437
|
type: "form_submit" | "custom_event";
|
|
396
438
|
event_name?: string | undefined;
|
|
397
439
|
selector?: string | undefined;
|
|
398
|
-
target_url?: string | undefined;
|
|
399
440
|
where?: {
|
|
400
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
441
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
401
442
|
field_path: string;
|
|
402
443
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
403
444
|
}[] | undefined;
|
|
445
|
+
target_url?: string | undefined;
|
|
404
446
|
revenue_stream?: "dedupe_with_billing" | "additive" | undefined;
|
|
405
447
|
}>, "many">>;
|
|
406
|
-
category: z.ZodOptional<z.ZodEnum<["purchase", "lead", "qualified_lead", "activation", "signup", "subscribe", "add_to_cart", "engagement", "expansion", "referral", "completion", "retention", "advocacy", "churn", "reactivation", "other"]>>;
|
|
448
|
+
category: z.ZodOptional<z.ZodEnum<["install", "purchase", "lead", "qualified_lead", "activation", "signup", "subscribe", "add_to_cart", "checkout", "engagement", "expansion", "referral", "completion", "retention", "advocacy", "churn", "reactivation", "other"]>>;
|
|
407
449
|
entityScope: z.ZodOptional<z.ZodEnum<["person", "account"]>>;
|
|
408
450
|
description: z.ZodOptional<z.ZodString>;
|
|
409
451
|
position: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -419,15 +461,15 @@ export declare const measurementTools: {
|
|
|
419
461
|
type: "form_submit" | "custom_event";
|
|
420
462
|
event_name?: string | undefined;
|
|
421
463
|
selector?: string | undefined;
|
|
422
|
-
target_url?: string | undefined;
|
|
423
464
|
where?: {
|
|
424
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
465
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
425
466
|
field_path: string;
|
|
426
467
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
427
468
|
}[] | undefined;
|
|
469
|
+
target_url?: string | undefined;
|
|
428
470
|
revenue_stream?: "dedupe_with_billing" | "additive" | undefined;
|
|
429
471
|
}[] | undefined;
|
|
430
|
-
category?: "other" | "engagement" | "referral" | "purchase" | "lead" | "qualified_lead" | "activation" | "signup" | "subscribe" | "add_to_cart" | "expansion" | "completion" | "retention" | "advocacy" | "churn" | "reactivation" | undefined;
|
|
472
|
+
category?: "other" | "engagement" | "referral" | "purchase" | "install" | "lead" | "qualified_lead" | "activation" | "signup" | "subscribe" | "add_to_cart" | "checkout" | "expansion" | "completion" | "retention" | "advocacy" | "churn" | "reactivation" | undefined;
|
|
431
473
|
entityScope?: "account" | "person" | undefined;
|
|
432
474
|
funnelRole?: "milestone" | "stage" | "off_ramp" | "return" | null | undefined;
|
|
433
475
|
reactivatesChurned?: boolean | null | undefined;
|
|
@@ -441,15 +483,15 @@ export declare const measurementTools: {
|
|
|
441
483
|
type: "form_submit" | "custom_event";
|
|
442
484
|
event_name?: string | undefined;
|
|
443
485
|
selector?: string | undefined;
|
|
444
|
-
target_url?: string | undefined;
|
|
445
486
|
where?: {
|
|
446
|
-
operator: "equals" | "not_equals" | "exists" | "in" | "not_exists";
|
|
487
|
+
operator: "equals" | "not_equals" | "exists" | "contains" | "gt" | "lt" | "gte" | "lte" | "in" | "not_exists";
|
|
447
488
|
field_path: string;
|
|
448
489
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
449
490
|
}[] | undefined;
|
|
491
|
+
target_url?: string | undefined;
|
|
450
492
|
revenue_stream?: "dedupe_with_billing" | "additive" | undefined;
|
|
451
493
|
}[] | undefined;
|
|
452
|
-
category?: "other" | "engagement" | "referral" | "purchase" | "lead" | "qualified_lead" | "activation" | "signup" | "subscribe" | "add_to_cart" | "expansion" | "completion" | "retention" | "advocacy" | "churn" | "reactivation" | undefined;
|
|
494
|
+
category?: "other" | "engagement" | "referral" | "purchase" | "install" | "lead" | "qualified_lead" | "activation" | "signup" | "subscribe" | "add_to_cart" | "checkout" | "expansion" | "completion" | "retention" | "advocacy" | "churn" | "reactivation" | undefined;
|
|
453
495
|
entityScope?: "account" | "person" | undefined;
|
|
454
496
|
funnelRole?: "milestone" | "stage" | "off_ramp" | "return" | null | undefined;
|
|
455
497
|
reactivatesChurned?: boolean | null | undefined;
|
|
@@ -491,10 +533,10 @@ export declare const measurementTools: {
|
|
|
491
533
|
sourceOfTruth: z.ZodEnum<["stripe", "shopify", "quickbooks", "hubspot", "server", "sdk", "manual"]>;
|
|
492
534
|
confirm: z.ZodOptional<z.ZodBoolean>;
|
|
493
535
|
}, "strip", z.ZodTypeAny, {
|
|
494
|
-
sourceOfTruth: "manual" | "sdk" | "
|
|
536
|
+
sourceOfTruth: "manual" | "sdk" | "server" | "stripe" | "shopify" | "quickbooks" | "hubspot";
|
|
495
537
|
confirm?: boolean | undefined;
|
|
496
538
|
}, {
|
|
497
|
-
sourceOfTruth: "manual" | "sdk" | "
|
|
539
|
+
sourceOfTruth: "manual" | "sdk" | "server" | "stripe" | "shopify" | "quickbooks" | "hubspot";
|
|
498
540
|
confirm?: boolean | undefined;
|
|
499
541
|
}>;
|
|
500
542
|
handler: (args: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measurement.d.ts","sourceRoot":"","sources":["../../src/tools/measurement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyCxB,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYxB,CAAC;AAEH,KAAK,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;
|
|
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;;;;;;;;;oCAqFiC;YAAE,YAAY,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;wBA2BpC;YACpB,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;YACf,QAAQ,EAAE,MAAM,CAAC;YACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;SAC7B;;;;;;;CAyBJ,CAAC"}
|
|
@@ -9,11 +9,11 @@ function text(t, isError = false) {
|
|
|
9
9
|
// Nested keys are snake_case: the casing layer only translates top-level params.
|
|
10
10
|
const keyEventConditionSchema = z.object({
|
|
11
11
|
field_path: z.string().min(1).describe('A property on the event, dots for nested ones, e.g. "plan".'),
|
|
12
|
-
operator: z.enum(["equals", "not_equals", "in", "exists", "not_exists"]),
|
|
12
|
+
operator: z.enum(["equals", "not_equals", "in", "contains", "gt", "gte", "lt", "lte", "exists", "not_exists"]),
|
|
13
13
|
value: z
|
|
14
14
|
.union([z.string(), z.number(), z.boolean(), z.array(z.union([z.string(), z.number(), z.boolean()]))])
|
|
15
15
|
.optional()
|
|
16
|
-
.describe("One value for equals / not_equals, a list for in, none for exists."),
|
|
16
|
+
.describe("One value for equals / not_equals / contains / gt / gte / lt / lte, a list for in, none for exists."),
|
|
17
17
|
});
|
|
18
18
|
const keyEventSourceSchema = z.object({
|
|
19
19
|
type: z.enum(["custom_event", "form_submit"]).describe("custom_event: a named event. form_submit: a form sent on the site."),
|
|
@@ -28,6 +28,7 @@ const keyEventSourceSchema = z.object({
|
|
|
28
28
|
});
|
|
29
29
|
const keyEventCategorySchema = z
|
|
30
30
|
.enum([
|
|
31
|
+
"install",
|
|
31
32
|
"purchase",
|
|
32
33
|
"lead",
|
|
33
34
|
"qualified_lead",
|
|
@@ -35,6 +36,7 @@ const keyEventCategorySchema = z
|
|
|
35
36
|
"signup",
|
|
36
37
|
"subscribe",
|
|
37
38
|
"add_to_cart",
|
|
39
|
+
"checkout",
|
|
38
40
|
"engagement",
|
|
39
41
|
"expansion",
|
|
40
42
|
"referral",
|
|
@@ -73,7 +75,11 @@ function keyEventLine(k, i) {
|
|
|
73
75
|
k.definitionVersion > 1 ? `v${k.definitionVersion}` : null,
|
|
74
76
|
].filter(Boolean);
|
|
75
77
|
const head = ` ${i + 1}. ${k.name} [${k.id}]${tags.length ? ` (${tags.join(", ")})` : ""}: ${k.counts}`;
|
|
76
|
-
|
|
78
|
+
const warnings = [
|
|
79
|
+
k.nameWarning ? ` ⚠ ${k.nameWarning}` : null,
|
|
80
|
+
k.transportWarning ? ` ⚠ ${k.transportWarning.message}` : null,
|
|
81
|
+
].filter(Boolean);
|
|
82
|
+
return warnings.length > 0 ? [head, ...warnings].join("\n") : head;
|
|
77
83
|
}
|
|
78
84
|
const KEY_EVENT_USE_KIND = {
|
|
79
85
|
journey: "Adaptive Journey",
|
|
@@ -301,16 +307,23 @@ export const measurementTools = {
|
|
|
301
307
|
},
|
|
302
308
|
},
|
|
303
309
|
get_growth_reality: {
|
|
304
|
-
description: `${APEX} — "Is our growth real?" Per
|
|
310
|
+
description: `${APEX} — "Is our growth real?" Per key event, the four-way readout: exposed rate vs persistent do-nothing global holdout (with 95% CI and incremental conversions/revenue), previous-period baseline, and opt-in industry benchmark when available. Pass key_event_id to inspect one key event.`,
|
|
305
311
|
schema: z.object({
|
|
306
312
|
days: z
|
|
307
313
|
.union([z.number(), z.literal("all")])
|
|
308
314
|
.optional()
|
|
309
315
|
.describe("Trailing window in days, or 'all' for since-inception (default)."),
|
|
316
|
+
keyEventId: z
|
|
317
|
+
.string()
|
|
318
|
+
.optional()
|
|
319
|
+
.describe("Optional key event ID to return the four-way readout for one key event."),
|
|
310
320
|
}),
|
|
311
|
-
handler: async ({ days }) => {
|
|
312
|
-
const
|
|
313
|
-
|
|
321
|
+
handler: async ({ days, keyEventId, }) => {
|
|
322
|
+
const params = new URLSearchParams();
|
|
323
|
+
params.set("days", days && days !== "all" ? String(days) : "all");
|
|
324
|
+
if (keyEventId)
|
|
325
|
+
params.set("key_event_id", keyEventId);
|
|
326
|
+
const res = await apiGet(`/api/growth/reality?${params.toString()}`);
|
|
314
327
|
const goals = res.data?.goals ?? [];
|
|
315
328
|
const unmeasured = res.data?.unmeasuredKeyEvents ?? [];
|
|
316
329
|
if (goals.length === 0 && unmeasured.length === 0) {
|
|
@@ -324,6 +337,7 @@ export const measurementTools = {
|
|
|
324
337
|
};
|
|
325
338
|
}
|
|
326
339
|
const pctFmt = (v) => v == null ? "—" : `${v > 0 ? "+" : ""}${(v * 100).toFixed(1)}%`;
|
|
340
|
+
const rateFmt = (v) => v == null ? "—" : `${(v * 100).toFixed(1)}%`;
|
|
327
341
|
const lines = goals.map((g) => {
|
|
328
342
|
const totalConversions = (g.counts?.exposedConversions ?? 0) + (g.counts?.holdoutConversions ?? 0);
|
|
329
343
|
if (totalConversions === 0) {
|
|
@@ -331,8 +345,22 @@ export const measurementTools = {
|
|
|
331
345
|
const totalSubjects = (g.counts?.exposedSubjects ?? 0) + (g.counts?.holdoutSubjects ?? 0);
|
|
332
346
|
return ` • ${g.goalName}: NO EVENTS YET (0 ${evLabel}conversions across ${totalSubjects.toLocaleString()} holdout-tracked people since ${g.collectingSince || "—"} — check get_wiring_status or list_data_sources)`;
|
|
333
347
|
}
|
|
348
|
+
const extras = [];
|
|
349
|
+
if (g.exposedRate != null && g.holdoutRate != null) {
|
|
350
|
+
extras.push(`exposed ${rateFmt(g.exposedRate)} vs holdout ${rateFmt(g.holdoutRate)}`);
|
|
351
|
+
}
|
|
352
|
+
if (g.previousBaselineRate != null) {
|
|
353
|
+
extras.push(`prior baseline ${rateFmt(g.previousBaselineRate)}`);
|
|
354
|
+
}
|
|
355
|
+
if (typeof g.industryBenchmark === "object" && g.industryBenchmark != null) {
|
|
356
|
+
extras.push(`industry ${rateFmt(g.industryBenchmark.rate)}`);
|
|
357
|
+
}
|
|
358
|
+
else if (g.industryBenchmark === "opt_in_required") {
|
|
359
|
+
extras.push("industry benchmark: opt in via Workspace Settings");
|
|
360
|
+
}
|
|
361
|
+
const extraSuffix = extras.length > 0 ? ` (${extras.join(" · ")})` : "";
|
|
334
362
|
if (!g.isDecisive) {
|
|
335
|
-
return ` • ${g.goalName}: COLLECTING (directional ${pctFmt(g.lift)}, ${totalConversions.toLocaleString()} conversions since ${g.collectingSince || "—"})`;
|
|
363
|
+
return ` • ${g.goalName}: COLLECTING (directional ${pctFmt(g.lift)}, ${totalConversions.toLocaleString()} conversions since ${g.collectingSince || "—"})${extraSuffix}`;
|
|
336
364
|
}
|
|
337
365
|
const ci = g.liftCI
|
|
338
366
|
? ` [${pctFmt(g.liftCI.lower)}, ${pctFmt(g.liftCI.upper)}]`
|
|
@@ -340,7 +368,7 @@ export const measurementTools = {
|
|
|
340
368
|
const rev = typeof g.incrementalRevenue === "number"
|
|
341
369
|
? ` · ~$${Math.round(g.incrementalRevenue).toLocaleString()} incremental`
|
|
342
370
|
: "";
|
|
343
|
-
return ` • ${g.goalName}: ${pctFmt(g.lift)} vs holdout${ci} — DECISIVE${rev}`;
|
|
371
|
+
return ` • ${g.goalName}: ${pctFmt(g.lift)} vs holdout${ci} — DECISIVE${rev}${extraSuffix}`;
|
|
344
372
|
});
|
|
345
373
|
if (unmeasured.length > 0) {
|
|
346
374
|
for (const u of unmeasured) {
|
|
@@ -577,6 +605,107 @@ export const measurementTools = {
|
|
|
577
605
|
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
578
606
|
},
|
|
579
607
|
},
|
|
608
|
+
get_funnel: {
|
|
609
|
+
description: `${APEX} — Read the workspace's conversion funnel (Visitors → Key Events → Revenue), optionally broken down by any custom or governed event property (e.g. source_group, plan_tier, quiz_track). Pass breakdown_by to slice every funnel step by each person's earliest seen value for that property in the date window (sticky carryover across downstream steps, top N values plus Other and (not set)). Pass steps (event names or key event ids from list_key_events) to evaluate an ad-hoc step sequence on the same date window.`,
|
|
610
|
+
schema: z.object({
|
|
611
|
+
start: z.string().optional().describe("First day, YYYY-MM-DD (default 30 days ago)."),
|
|
612
|
+
end: z.string().optional().describe("Last day, YYYY-MM-DD, inclusive (default today)."),
|
|
613
|
+
days: z.number().int().min(1).max(365).optional().describe("Rolling days window when start is omitted (default 30)."),
|
|
614
|
+
breakdownBy: z
|
|
615
|
+
.string()
|
|
616
|
+
.optional()
|
|
617
|
+
.describe("Custom or governed event property path to group funnel steps by (e.g. source_group, plan_tier, meta.channel)."),
|
|
618
|
+
steps: z
|
|
619
|
+
.array(z.string())
|
|
620
|
+
.min(1)
|
|
621
|
+
.max(10)
|
|
622
|
+
.optional()
|
|
623
|
+
.describe("Optional ad-hoc step sequence (event names like page_view, quiz_started, purchase or key event ids). Defaults to the workspace's Key Events funnel."),
|
|
624
|
+
breakdownLimit: z
|
|
625
|
+
.number()
|
|
626
|
+
.int()
|
|
627
|
+
.min(1)
|
|
628
|
+
.max(50)
|
|
629
|
+
.optional()
|
|
630
|
+
.describe("Maximum distinct property values to list before rolling the rest into Other (default 20, max 50)."),
|
|
631
|
+
}),
|
|
632
|
+
handler: async (args = {}) => {
|
|
633
|
+
const params = new URLSearchParams();
|
|
634
|
+
if (args.start)
|
|
635
|
+
params.set("start", args.start);
|
|
636
|
+
if (args.end)
|
|
637
|
+
params.set("end", args.end);
|
|
638
|
+
if (args.days !== undefined && !args.start)
|
|
639
|
+
params.set("days", String(args.days));
|
|
640
|
+
if (args.breakdownBy)
|
|
641
|
+
params.set("breakdown_by", args.breakdownBy);
|
|
642
|
+
if (args.steps && args.steps.length > 0)
|
|
643
|
+
params.set("steps", args.steps.join(","));
|
|
644
|
+
if (args.breakdownLimit !== undefined)
|
|
645
|
+
params.set("breakdown_limit", String(args.breakdownLimit));
|
|
646
|
+
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
647
|
+
const funnel = await apiGet(`/api/funnel${suffix}`);
|
|
648
|
+
const windowLabel = args.start
|
|
649
|
+
? `${args.start} to ${args.end ?? "today"}`
|
|
650
|
+
: `last ${funnel.period?.days ?? args.days ?? 30} days`;
|
|
651
|
+
const lines = [`${APEX} Funnel (${windowLabel})`];
|
|
652
|
+
const fmtUsd = (n) => n.toLocaleString("en-US", {
|
|
653
|
+
style: "currency",
|
|
654
|
+
currency: "USD",
|
|
655
|
+
minimumFractionDigits: 2,
|
|
656
|
+
maximumFractionDigits: 2,
|
|
657
|
+
});
|
|
658
|
+
const stageRows = funnel.funnelStages ?? [];
|
|
659
|
+
if (stageRows.length > 0) {
|
|
660
|
+
lines.push("", "Stages:");
|
|
661
|
+
for (const s of stageRows) {
|
|
662
|
+
lines.push(` • ${s.label}: ${s.countMethod === "revenue_sum" ? fmtUsd(s.count) : s.count.toLocaleString("en-US")}`);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
else {
|
|
666
|
+
lines.push("", `Visitors: ${funnel.stages.visitors.toLocaleString("en-US")} | Goal completions: ${funnel.stages.goalCompletions.toLocaleString("en-US")} | Identified: ${funnel.stages.leads.toLocaleString("en-US")} | Customers: ${funnel.stages.customers.toLocaleString("en-US")} | Revenue: ${fmtUsd(funnel.stages.revenue)}`);
|
|
667
|
+
}
|
|
668
|
+
const pb = funnel.propertyBreakdown;
|
|
669
|
+
if (pb) {
|
|
670
|
+
lines.push("", `Breakdown by ${pb.property} (first-seen value carried across steps):`);
|
|
671
|
+
if (pb.servedFrom === "unavailable") {
|
|
672
|
+
lines.push(` Unavailable: ${pb.unavailableReason ?? "query could not run"}`);
|
|
673
|
+
}
|
|
674
|
+
else if (pb.rows.length === 0) {
|
|
675
|
+
lines.push(` No people in this range carried ${pb.property}.`);
|
|
676
|
+
}
|
|
677
|
+
else {
|
|
678
|
+
const stepLabels = pb.steps.map((s) => s.label);
|
|
679
|
+
lines.push(` Steps: ${stepLabels.join(" → ")}`);
|
|
680
|
+
for (const row of pb.rows) {
|
|
681
|
+
const name = row.isOther && pb.otherValueCount > 0
|
|
682
|
+
? `${row.value} (+${pb.otherValueCount} more)`
|
|
683
|
+
: row.value;
|
|
684
|
+
const seq = row.counts
|
|
685
|
+
.map((c, i) => {
|
|
686
|
+
const rate = row.stepRates[i];
|
|
687
|
+
const pctStr = rate !== null && rate !== undefined ? ` (${(rate * 100).toFixed(1)}%)` : "";
|
|
688
|
+
return `${stepLabels[i]}: ${c.toLocaleString("en-US")}${pctStr}`;
|
|
689
|
+
})
|
|
690
|
+
.join(" → ");
|
|
691
|
+
const overall = row.overallRate !== null ? ` | overall ${(row.overallRate * 100).toFixed(1)}%` : "";
|
|
692
|
+
lines.push(` • ${name}: ${seq}${overall}`);
|
|
693
|
+
}
|
|
694
|
+
const totalSeq = pb.totals
|
|
695
|
+
.map((t, i) => `${stepLabels[i]}: ${t.toLocaleString("en-US")}`)
|
|
696
|
+
.join(" → ");
|
|
697
|
+
lines.push(` Total: ${totalSeq}`);
|
|
698
|
+
if (pb.otherValueCount > 0) {
|
|
699
|
+
lines.push(` Showing top ${pb.cappedAt} of ${pb.totalDistinctValues} distinct values (${pb.otherValueCount} combined in Other).`);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
else if (funnel.availableProperties && funnel.availableProperties.length > 0) {
|
|
704
|
+
lines.push("", `Available event properties for breakdown_by: ${funnel.availableProperties.slice(0, 15).join(", ")}`);
|
|
705
|
+
}
|
|
706
|
+
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
707
|
+
},
|
|
708
|
+
},
|
|
580
709
|
list_key_events: {
|
|
581
710
|
description: `${APEX} — The workspace's key events (the actions that matter to the business: Lead captured, Qualified, Revenue realized) in funnel order: which events reach each one, its version, whether it counts people or companies, and which one is the main one. Pass include_archived: true to include archived key events too (needed to find an id for restore_key_event). These are the columns get_efforts shows; pass the ids to get_efforts key_event_ids or set_campaign_steps. Make one with create_key_event.`,
|
|
582
711
|
schema: z.object({
|
|
@@ -961,7 +1090,7 @@ export const measurementTools = {
|
|
|
961
1090
|
},
|
|
962
1091
|
},
|
|
963
1092
|
suggest_key_events: {
|
|
964
|
-
description: `${APEX} — What Apex suggests about key events, from the events it hears: events that mean the same moment and should count as one key event, a single event that is a standard moment (order_placed is a purchase) with no key event for it yet, events to add to a key event the workspace has, and two key events that count the same thing. Also lists key events Apex already set up automatically (each with its suggestion_id so the owner can undo it) and previously declined suggestions. Show the owner the suggestion and the why, then accept_key_event_suggestion, dismiss_key_event_suggestion, or undo_key_event_suggestion on their answer. Never accept on your own.`,
|
|
1093
|
+
description: `${APEX} — What Apex suggests about key events, from the events it hears and the workspace's Event Dictionary: events that mean the same moment and should count as one key event, a single event that is a standard moment (order_placed is a purchase) with no key event for it yet, a published custom event marked as a primary metric in the Event Dictionary with no key event yet, events to add to a key event the workspace has, and two key events that count the same thing. Also lists key events Apex already set up automatically (each with its suggestion_id so the owner can undo it) and previously declined suggestions. Show the owner the suggestion and the why, then accept_key_event_suggestion, dismiss_key_event_suggestion, or undo_key_event_suggestion on their answer. Never accept on your own.`,
|
|
965
1094
|
schema: z.object({}),
|
|
966
1095
|
handler: async () => {
|
|
967
1096
|
try {
|
|
@@ -1863,8 +1992,11 @@ Events fired through this tool carry a stable synthetic visitorId (mcp-agent-*,
|
|
|
1863
1992
|
}
|
|
1864
1993
|
const schemaLink = appUrl("/dashboard/settings/workspace/schema");
|
|
1865
1994
|
const status = res.status ?? (args.publish ? "published" : "draft");
|
|
1995
|
+
const keyEventHint = res._keyEventSuggestionReady
|
|
1996
|
+
? ` A Key Event suggestion is ready for "${res.name ?? args.name}" (marked as a primary metric). Run suggest_key_events to review and confirm it, or visit ${appUrl("/dashboard/key-events")}.`
|
|
1997
|
+
: "";
|
|
1866
1998
|
const msg = status === "published"
|
|
1867
|
-
? `Defined and published governed event "${res.name}" (SchemaVer ${res.schemaVer ?? "1-0-0"}, published). Manage governed events at ${schemaLink}
|
|
1999
|
+
? `Defined and published governed event "${res.name}" (SchemaVer ${res.schemaVer ?? "1-0-0"}, published). Manage governed events at ${schemaLink}.${keyEventHint}`
|
|
1868
2000
|
: `Defined governed event "${res.name}" (SchemaVer ${res.schemaVer ?? "1-0-0"}, draft). Draft definitions already work in journeys, key events, and experiments. Call publish_event_definition({ name: "${res.name}" }) when ready to publish, or manage it at ${schemaLink}.`;
|
|
1869
2001
|
return {
|
|
1870
2002
|
content: [
|
|
@@ -1936,7 +2068,10 @@ Events fired through this tool carry a stable synthetic visitorId (mcp-agent-*,
|
|
|
1936
2068
|
const changeNote = res._change
|
|
1937
2069
|
? ` Change: ${res._change}${res._breaking ? " (breaking)" : ""}.`
|
|
1938
2070
|
: "";
|
|
1939
|
-
|
|
2071
|
+
const keyEventHint = res._keyEventSuggestionReady
|
|
2072
|
+
? ` A Key Event suggestion is ready for "${res.name ?? args.name.trim()}" (marked as a primary metric). Run suggest_key_events to review and confirm it, or visit ${appUrl("/dashboard/key-events")}.`
|
|
2073
|
+
: "";
|
|
2074
|
+
return text(`${APEX} Updated governed event "${res.name ?? args.name.trim()}" (SchemaVer ${res.schemaVer ?? "1-0-0"}, status: ${res.status ?? "draft"}).${changeNote} Manage governed events at ${schemaLink}.${keyEventHint}`);
|
|
1940
2075
|
}
|
|
1941
2076
|
catch (err) {
|
|
1942
2077
|
return text(`${APEX} ${errMsg(err)}`, true);
|
|
@@ -1958,7 +2093,10 @@ Events fired through this tool carry a stable synthetic visitorId (mcp-agent-*,
|
|
|
1958
2093
|
return text(`${APEX} Could not publish "${name}": ${res.error}`, true);
|
|
1959
2094
|
}
|
|
1960
2095
|
const schemaLink = appUrl("/dashboard/settings/workspace/schema");
|
|
1961
|
-
|
|
2096
|
+
const keyEventHint = res._keyEventSuggestionReady
|
|
2097
|
+
? ` A Key Event suggestion is ready for "${res.name ?? name.trim()}" (marked as a primary metric). Run suggest_key_events to review and confirm it, or visit ${appUrl("/dashboard/key-events")}.`
|
|
2098
|
+
: "";
|
|
2099
|
+
return text(`${APEX} Published governed event "${res.name ?? name.trim()}" (SchemaVer ${res.schemaVer ?? "1-0-0"}, status: ${res.status ?? "published"}). Manage governed events at ${schemaLink}.${keyEventHint}`);
|
|
1962
2100
|
}
|
|
1963
2101
|
catch (err) {
|
|
1964
2102
|
return text(`${APEX} ${errMsg(err)}`, true);
|