@apex-inc/mcp-server 0.71.0 → 0.72.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/setup-catchup-tools.d.ts +22 -9
- package/dist/setup-catchup-tools.d.ts.map +1 -1
- package/dist/setup-catchup-tools.js +106 -15
- package/dist/setup-catchup-tools.js.map +1 -1
- package/dist/setup-checklist.d.ts +1 -0
- package/dist/setup-checklist.d.ts.map +1 -1
- package/dist/setup-checklist.js +2 -1
- package/dist/setup-checklist.js.map +1 -1
- package/dist/tool-groups.d.ts.map +1 -1
- package/dist/tool-groups.js +3 -0
- package/dist/tool-groups.js.map +1 -1
- package/dist/tools/experiments.js +1 -1
- package/dist/tools/experiments.js.map +1 -1
- package/dist/tools/letters.d.ts +200 -1
- package/dist/tools/letters.d.ts.map +1 -1
- package/dist/tools/letters.js +134 -6
- package/dist/tools/letters.js.map +1 -1
- package/dist/tools/measurement.d.ts +29 -6
- package/dist/tools/measurement.d.ts.map +1 -1
- package/dist/tools/measurement.js +36 -4
- package/dist/tools/measurement.js.map +1 -1
- package/dist/tools/partners.d.ts +14 -14
- package/dist/tools.d.ts +267 -23
- package/dist/tools.d.ts.map +1 -1
- package/dist/workspace-target-url.d.ts.map +1 -1
- package/dist/workspace-target-url.js +8 -3
- package/dist/workspace-target-url.js.map +1 -1
- package/package.json +1 -1
|
@@ -287,8 +287,16 @@ export declare const setupCatchupTools: {
|
|
|
287
287
|
};
|
|
288
288
|
get_team_traffic: {
|
|
289
289
|
description: string;
|
|
290
|
-
schema: z.ZodObject<{
|
|
291
|
-
|
|
290
|
+
schema: z.ZodObject<{
|
|
291
|
+
host: z.ZodOptional<z.ZodString>;
|
|
292
|
+
}, "strip", z.ZodTypeAny, {
|
|
293
|
+
host?: string | undefined;
|
|
294
|
+
}, {
|
|
295
|
+
host?: string | undefined;
|
|
296
|
+
}>;
|
|
297
|
+
handler: (args?: {
|
|
298
|
+
host?: string;
|
|
299
|
+
}) => Promise<{
|
|
292
300
|
content: {
|
|
293
301
|
type: "text";
|
|
294
302
|
text: string;
|
|
@@ -301,11 +309,14 @@ export declare const setupCatchupTools: {
|
|
|
301
309
|
addMyAddress: z.ZodOptional<z.ZodBoolean>;
|
|
302
310
|
addresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
303
311
|
browserLink: z.ZodOptional<z.ZodEnum<["create", "remove"]>>;
|
|
312
|
+
host: z.ZodOptional<z.ZodString>;
|
|
304
313
|
}, "strip", z.ZodTypeAny, {
|
|
314
|
+
host?: string | undefined;
|
|
305
315
|
addMyAddress?: boolean | undefined;
|
|
306
316
|
addresses?: string[] | undefined;
|
|
307
317
|
browserLink?: "create" | "remove" | undefined;
|
|
308
318
|
}, {
|
|
319
|
+
host?: string | undefined;
|
|
309
320
|
addMyAddress?: boolean | undefined;
|
|
310
321
|
addresses?: string[] | undefined;
|
|
311
322
|
browserLink?: "create" | "remove" | undefined;
|
|
@@ -314,6 +325,7 @@ export declare const setupCatchupTools: {
|
|
|
314
325
|
addMyAddress?: boolean;
|
|
315
326
|
addresses?: string[];
|
|
316
327
|
browserLink?: "create" | "remove";
|
|
328
|
+
host?: string;
|
|
317
329
|
}) => Promise<{
|
|
318
330
|
content: {
|
|
319
331
|
type: "text";
|
|
@@ -1302,6 +1314,7 @@ export declare const setupCatchupTools: {
|
|
|
1302
1314
|
placement: z.ZodOptional<z.ZodEnum<["paid-ad", "social-post", "social-bio", "other"]>>;
|
|
1303
1315
|
platform: z.ZodOptional<z.ZodString>;
|
|
1304
1316
|
source: z.ZodOptional<z.ZodString>;
|
|
1317
|
+
medium: z.ZodOptional<z.ZodString>;
|
|
1305
1318
|
slug: z.ZodOptional<z.ZodString>;
|
|
1306
1319
|
name: z.ZodOptional<z.ZodString>;
|
|
1307
1320
|
campaignName: z.ZodOptional<z.ZodString>;
|
|
@@ -1320,6 +1333,7 @@ export declare const setupCatchupTools: {
|
|
|
1320
1333
|
storeRouting?: boolean | undefined;
|
|
1321
1334
|
placement?: "other" | "paid-ad" | "social-post" | "social-bio" | undefined;
|
|
1322
1335
|
source?: string | undefined;
|
|
1336
|
+
medium?: string | undefined;
|
|
1323
1337
|
campaignName?: string | undefined;
|
|
1324
1338
|
variant?: string | undefined;
|
|
1325
1339
|
previewTitle?: string | undefined;
|
|
@@ -1336,6 +1350,7 @@ export declare const setupCatchupTools: {
|
|
|
1336
1350
|
storeRouting?: boolean | undefined;
|
|
1337
1351
|
placement?: "other" | "paid-ad" | "social-post" | "social-bio" | undefined;
|
|
1338
1352
|
source?: string | undefined;
|
|
1353
|
+
medium?: string | undefined;
|
|
1339
1354
|
campaignName?: string | undefined;
|
|
1340
1355
|
variant?: string | undefined;
|
|
1341
1356
|
previewTitle?: string | undefined;
|
|
@@ -1352,6 +1367,7 @@ export declare const setupCatchupTools: {
|
|
|
1352
1367
|
placement?: CreateLinkPlacement;
|
|
1353
1368
|
platform?: string;
|
|
1354
1369
|
source?: string;
|
|
1370
|
+
medium?: string;
|
|
1355
1371
|
slug?: string;
|
|
1356
1372
|
name?: string;
|
|
1357
1373
|
campaignName?: string;
|
|
@@ -1618,15 +1634,12 @@ export declare const setupCatchupTools: {
|
|
|
1618
1634
|
export declare function resolvePaidPlatform(raw: string): string | null;
|
|
1619
1635
|
export declare function resolveOrganicPlatform(raw: string): string | null;
|
|
1620
1636
|
export declare function mediumForPaidAd(platform: string): string;
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
* (`app/src/lib/links/placements.ts`). Organic placements must write
|
|
1624
|
-
* `social`: the channel rules only file a visit as Organic Social on that
|
|
1625
|
-
* medium, and a paid medium bills the visit as an attributed conversion.
|
|
1626
|
-
*/
|
|
1627
|
-
export declare function resolveLinkUtm(placement: CreateLinkPlacement, rawPlatform: string, rawSource?: string): {
|
|
1637
|
+
export declare function utmTagFromInput(value: string): string;
|
|
1638
|
+
export declare function resolveLinkUtm(placement: CreateLinkPlacement, rawPlatform: string, rawSource?: string, rawMedium?: string): {
|
|
1628
1639
|
source?: string;
|
|
1629
1640
|
medium: string;
|
|
1641
|
+
} | {
|
|
1642
|
+
error: string;
|
|
1630
1643
|
} | null;
|
|
1631
1644
|
export declare function resolveMeasurementNetwork(raw: string): string;
|
|
1632
1645
|
export declare function slugFromName(name: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-catchup-tools.d.ts","sourceRoot":"","sources":["../src/setup-catchup-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,4JAMvB,CAAC;AA4BX,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,sGAMnB,CAAC;AAmCX,QAAA,MAAM,SAAS,sEAML,CAAC;AAEX,QAAA,MAAM,iBAAiB,iFAMb,CAAC;AAEX,QAAA,MAAM,eAAe,gFAQX,CAAC;AAEX,2GAA2G;AAC3G,QAAA,MAAM,sBAAsB,4DAA6D,CAAC;AAC1F,KAAK,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAkBnE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;mCAUO;YAAE,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kGA8C9D;YACD,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,QAAQ,CAAC,EAAE,CAAC,OAAO,SAAS,EAAE,MAAM,CAAC,CAAC;YACtC,eAAe,CAAC,EAAE,CAAC,OAAO,iBAAiB,EAAE,MAAM,CAAC,CAAC;YACrD,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;YACrC,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;2EAqDE;YACD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B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAwBD,8EAA8E;AAC9E,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc;;;;;;;;;;;;;;;EAenD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C"}
|
|
@@ -433,15 +433,21 @@ export const setupCatchupTools = {
|
|
|
433
433
|
},
|
|
434
434
|
},
|
|
435
435
|
get_team_traffic: {
|
|
436
|
-
description: `${APEX} — Read "Don't count my team": the home and office addresses whose visits are left out of visitor counts, page tests and ad platform sends, the link
|
|
437
|
-
schema: z.object({
|
|
438
|
-
|
|
439
|
-
|
|
436
|
+
description: `${APEX} — Read "Don't count my team": the home and office addresses whose visits are left out of visitor counts, page tests and ad platform sends, the browser-mark link(s) across every configured workspace host (browserMarkLink + browserMarkLinks), and whether the address this editor runs from is already listed. Note: ?apex_team= works on any host running the Apex snippet (opened once per domain); direct /api/events callers without the snippet should use IP exclusion (addresses) or pass teamMark.`,
|
|
437
|
+
schema: z.object({
|
|
438
|
+
host: z
|
|
439
|
+
.string()
|
|
440
|
+
.optional()
|
|
441
|
+
.describe("Optional hostname registered on this workspace to build browserMarkLink for. All workspace hosts are always returned in browserMarkLinks."),
|
|
442
|
+
}),
|
|
443
|
+
handler: async (args = {}) => {
|
|
444
|
+
const qs = args?.host?.trim() ? `?host=${encodeURIComponent(args.host.trim())}` : "";
|
|
445
|
+
const data = await apiGet(`/api/workspace/team-traffic${qs}`);
|
|
440
446
|
return jsonResult(data.data ?? data);
|
|
441
447
|
},
|
|
442
448
|
},
|
|
443
449
|
set_team_traffic: {
|
|
444
|
-
description: `${APEX} — Turn on "Don't count my team" so the owner's own visits stop counting as visitors, in page tests and in what Apex sends to ad platforms. Call it during setup: by default it adds the address this editor is running from, which is the owner's home or office. Visits stay on the record, labeled as the team; a team member's real purchase still counts as revenue. Admin only.`,
|
|
450
|
+
description: `${APEX} — Turn on "Don't count my team" so the owner's own visits stop counting as visitors, in page tests and in what Apex sends to ad platforms. Call it during setup: by default it adds the address this editor is running from, which is the owner's home or office. Visits stay on the record, labeled as the team; a team member's real purchase still counts as revenue. The browser link (?apex_team=...) works on any configured site running the Apex snippet (open it once per domain because browser storage is per origin); direct /api/events callers without the snippet should use IP exclusion (addresses) or pass teamMark. Admin only.`,
|
|
445
451
|
schema: z.object({
|
|
446
452
|
addMyAddress: z
|
|
447
453
|
.boolean()
|
|
@@ -455,26 +461,38 @@ export const setupCatchupTools = {
|
|
|
455
461
|
.enum(["create", "remove"])
|
|
456
462
|
.optional()
|
|
457
463
|
.describe("create: make a link that marks any browser (a phone, a teammate's laptop) as the team's when opened. remove: turn that link off."),
|
|
464
|
+
host: z
|
|
465
|
+
.string()
|
|
466
|
+
.optional()
|
|
467
|
+
.describe("Optional hostname registered on this workspace to build browserMarkLink for (all configured production/beta hosts are also returned in browserMarkLinks)."),
|
|
458
468
|
}),
|
|
459
469
|
handler: async (args) => {
|
|
460
470
|
let result = null;
|
|
461
|
-
|
|
471
|
+
const host = args.host?.trim();
|
|
472
|
+
const qs = host ? `?host=${encodeURIComponent(host)}` : "";
|
|
473
|
+
if (args.addresses !== undefined || args.browserLink !== undefined || host) {
|
|
462
474
|
const body = {};
|
|
463
475
|
if (args.addresses !== undefined)
|
|
464
476
|
body.addresses = args.addresses;
|
|
465
477
|
if (args.browserLink !== undefined)
|
|
466
478
|
body.browserMark = args.browserLink;
|
|
479
|
+
if (host)
|
|
480
|
+
body.host = host;
|
|
467
481
|
result = await apiPut("/api/workspace/team-traffic", body);
|
|
468
482
|
}
|
|
469
483
|
if (args.addMyAddress ?? true) {
|
|
470
|
-
result = await apiPost(
|
|
484
|
+
result = await apiPost(`/api/workspace/team-traffic/current-address${qs}`, {});
|
|
471
485
|
}
|
|
472
486
|
const data = result?.data ?? result;
|
|
473
|
-
const
|
|
487
|
+
const payload = (data ?? {});
|
|
488
|
+
const link = payload.browserMarkLink;
|
|
489
|
+
const multi = payload.browserMarkLinks && payload.browserMarkLinks.length > 1;
|
|
474
490
|
return jsonResult({
|
|
475
491
|
...data,
|
|
476
492
|
next: link
|
|
477
|
-
?
|
|
493
|
+
? multi
|
|
494
|
+
? `Saved. Open each host's link once in every browser you use (storage is per domain, and ?apex_team= works on any site running apex.js): ${payload.browserMarkLinks.map((l) => l.url).join(" · ")}`
|
|
495
|
+
: `Saved. Give the owner this link to open on their phone and any other browser they use away from this network (works on any site running apex.js; for direct /api/events callers without the snippet, exclude the IP or pass teamMark): ${link}`
|
|
478
496
|
: "Saved. To leave out their phone or a teammate's browser on another network, call set_team_traffic with browser_link: create and give them the link.",
|
|
479
497
|
});
|
|
480
498
|
},
|
|
@@ -1327,7 +1345,11 @@ export const setupCatchupTools = {
|
|
|
1327
1345
|
source: z
|
|
1328
1346
|
.string()
|
|
1329
1347
|
.optional()
|
|
1330
|
-
.describe("Required for other: the site, show, or community the link lives on (e.g. indie-hackers, product-hunt
|
|
1348
|
+
.describe("Required for other: the site, show, or community the link lives on (e.g. google_business, indie-hackers, product-hunt). Underscores are preserved in utm_source. Ignored for the other placements."),
|
|
1349
|
+
medium: z
|
|
1350
|
+
.string()
|
|
1351
|
+
.optional()
|
|
1352
|
+
.describe("Optional for placement 'other' only: custom non-paid utm_medium (e.g. local, direct_mail, podcast, community). Defaults to 'referral'. Paid mediums (cpc, paid_social, paid, etc.) are rejected — use placement: 'paid-ad' for paid traffic."),
|
|
1331
1353
|
slug: z
|
|
1332
1354
|
.string()
|
|
1333
1355
|
.optional()
|
|
@@ -1361,14 +1383,17 @@ export const setupCatchupTools = {
|
|
|
1361
1383
|
}),
|
|
1362
1384
|
handler: async (args) => {
|
|
1363
1385
|
const placement = args.placement ?? "paid-ad";
|
|
1364
|
-
const utm = resolveLinkUtm(placement, args.platform ?? "", args.source ?? "");
|
|
1386
|
+
const utm = resolveLinkUtm(placement, args.platform ?? "", args.source ?? "", args.medium);
|
|
1365
1387
|
if (!utm) {
|
|
1366
1388
|
return jsonResult(null, placement === "paid-ad"
|
|
1367
1389
|
? "Unknown ad platform. Use meta, google-ads, linkedin, tiktok, reddit, pinterest, or microsoft."
|
|
1368
1390
|
: placement === "other"
|
|
1369
|
-
? "Name where the link lives in source (e.g. indie-hackers). Without it, signups from this link credit nobody by name."
|
|
1391
|
+
? "Name where the link lives in source (e.g. google_business or indie-hackers). Without it, signups from this link credit nobody by name."
|
|
1370
1392
|
: "Unknown social platform. Use instagram, linkedin, x, tiktok, facebook, youtube, threads, reddit, or pinterest.");
|
|
1371
1393
|
}
|
|
1394
|
+
if ("error" in utm) {
|
|
1395
|
+
return jsonResult(null, utm.error);
|
|
1396
|
+
}
|
|
1372
1397
|
const slug = args.slug?.trim() ? slugFromName(args.slug) : undefined;
|
|
1373
1398
|
const preview = {
|
|
1374
1399
|
...(args.previewTitle?.trim() ? { title: args.previewTitle.trim() } : {}),
|
|
@@ -1384,11 +1409,22 @@ export const setupCatchupTools = {
|
|
|
1384
1409
|
title: args.name?.trim() || slug,
|
|
1385
1410
|
placement,
|
|
1386
1411
|
...(placement === "other" ? { source: utm.source } : { platform: utm.source }),
|
|
1412
|
+
...(placement === "other" && args.medium?.trim() ? { medium: utm.medium } : {}),
|
|
1387
1413
|
campaign: args.campaignName?.trim() || undefined,
|
|
1388
1414
|
variant: args.variant?.trim() || undefined,
|
|
1389
1415
|
...(Object.keys(preview).length > 0 ? { preview } : {}),
|
|
1390
1416
|
...(args.postUrl?.trim() ? { post_url: args.postUrl.trim() } : {}),
|
|
1391
1417
|
});
|
|
1418
|
+
const notes = [];
|
|
1419
|
+
if (placement === "other" && args.source?.trim() && args.source.trim() !== utm.source) {
|
|
1420
|
+
notes.push(`source normalized from "${args.source.trim()}" to "${utm.source}"`);
|
|
1421
|
+
}
|
|
1422
|
+
if (placement === "other" && args.medium?.trim() && args.medium.trim() !== utm.medium) {
|
|
1423
|
+
notes.push(`medium normalized from "${args.medium.trim()}" to "${utm.medium}"`);
|
|
1424
|
+
}
|
|
1425
|
+
if (notes.length > 0 && data && typeof data === "object") {
|
|
1426
|
+
return jsonResult({ ...data, normalization_note: notes.join("; ") });
|
|
1427
|
+
}
|
|
1392
1428
|
return jsonResult(data);
|
|
1393
1429
|
},
|
|
1394
1430
|
},
|
|
@@ -1694,10 +1730,65 @@ export function mediumForPaidAd(platform) {
|
|
|
1694
1730
|
* `social`: the channel rules only file a visit as Organic Social on that
|
|
1695
1731
|
* medium, and a paid medium bills the visit as an attributed conversion.
|
|
1696
1732
|
*/
|
|
1697
|
-
|
|
1733
|
+
const PAID_LINK_MEDIUMS = new Set([
|
|
1734
|
+
"cpc",
|
|
1735
|
+
"ppc",
|
|
1736
|
+
"cpm",
|
|
1737
|
+
"cpv",
|
|
1738
|
+
"cpa",
|
|
1739
|
+
"sem",
|
|
1740
|
+
"paid",
|
|
1741
|
+
"paid_social",
|
|
1742
|
+
"paid-social",
|
|
1743
|
+
"paidsocial",
|
|
1744
|
+
"paid_search",
|
|
1745
|
+
"paid-search",
|
|
1746
|
+
"paidsearch",
|
|
1747
|
+
"display",
|
|
1748
|
+
]);
|
|
1749
|
+
function isPaidLinkMedium(medium) {
|
|
1750
|
+
const m = medium.trim().toLowerCase();
|
|
1751
|
+
return PAID_LINK_MEDIUMS.has(m) || m.startsWith("paid");
|
|
1752
|
+
}
|
|
1753
|
+
export function utmTagFromInput(value) {
|
|
1754
|
+
if (!value)
|
|
1755
|
+
return "";
|
|
1756
|
+
const stripped = value
|
|
1757
|
+
.toLowerCase()
|
|
1758
|
+
.normalize("NFKD")
|
|
1759
|
+
.replace(/[^a-z0-9_-]+/g, "-")
|
|
1760
|
+
.replace(/-{2,}/g, "-")
|
|
1761
|
+
.replace(/^[-_]+/, "")
|
|
1762
|
+
.replace(/[-_]+$/, "");
|
|
1763
|
+
if (!stripped)
|
|
1764
|
+
return "";
|
|
1765
|
+
if (stripped.length <= 64)
|
|
1766
|
+
return stripped;
|
|
1767
|
+
return stripped.slice(0, 64).replace(/[-_]+$/, "");
|
|
1768
|
+
}
|
|
1769
|
+
export function resolveLinkUtm(placement, rawPlatform, rawSource = "", rawMedium) {
|
|
1770
|
+
if (rawMedium?.trim() && placement !== "other") {
|
|
1771
|
+
return {
|
|
1772
|
+
error: `medium can only be customized on placement "other". "${placement}" sets its own medium automatically.`,
|
|
1773
|
+
};
|
|
1774
|
+
}
|
|
1698
1775
|
if (placement === "other") {
|
|
1699
|
-
const source =
|
|
1700
|
-
|
|
1776
|
+
const source = utmTagFromInput(rawSource);
|
|
1777
|
+
if (!source)
|
|
1778
|
+
return null;
|
|
1779
|
+
if (rawMedium?.trim()) {
|
|
1780
|
+
const medium = utmTagFromInput(rawMedium);
|
|
1781
|
+
if (!medium) {
|
|
1782
|
+
return { error: "medium must contain letters or numbers (e.g. local, referral, podcast)." };
|
|
1783
|
+
}
|
|
1784
|
+
if (isPaidLinkMedium(medium)) {
|
|
1785
|
+
return {
|
|
1786
|
+
error: `Paid medium "${medium}" belongs on placement "paid-ad" so spend and attribution report accurately.`,
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
return { source, medium };
|
|
1790
|
+
}
|
|
1791
|
+
return { source, medium: "referral" };
|
|
1701
1792
|
}
|
|
1702
1793
|
if (placement === "paid-ad") {
|
|
1703
1794
|
const source = resolvePaidPlatform(rawPlatform);
|