@sellable/mcp 0.1.226 → 0.1.228
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/tools/leads.js
CHANGED
|
@@ -2404,11 +2404,14 @@ function removeUndefinedValues(input) {
|
|
|
2404
2404
|
return Object.fromEntries(Object.entries(input).filter(([, value]) => value !== undefined));
|
|
2405
2405
|
}
|
|
2406
2406
|
function normalizeProspeoCompanySearchInputForMcp(input) {
|
|
2407
|
+
const seedDomains = normalizeMcpSeeds(input.seedDomains, "domain");
|
|
2408
|
+
const seedCompanies = seedDomains.length > 0
|
|
2409
|
+
? []
|
|
2410
|
+
: normalizeMcpSeeds(input.seedCompanies, "company");
|
|
2407
2411
|
const filters = input?.filters && typeof input.filters === "object"
|
|
2408
2412
|
? clonePlainObject(input.filters)
|
|
2409
2413
|
: {};
|
|
2410
|
-
const hasSeeds =
|
|
2411
|
-
(input.seedDomains?.length ?? 0) > 0;
|
|
2414
|
+
const hasSeeds = seedCompanies.length > 0 || seedDomains.length > 0;
|
|
2412
2415
|
if (hasSeeds) {
|
|
2413
2416
|
const lookalike = filters.company_lookalike;
|
|
2414
2417
|
if (lookalike &&
|
|
@@ -2420,11 +2423,15 @@ function normalizeProspeoCompanySearchInputForMcp(input) {
|
|
|
2420
2423
|
}
|
|
2421
2424
|
}
|
|
2422
2425
|
normalizeMcpCompanyKeywords(filters);
|
|
2426
|
+
normalizeMcpCompanyWebsiteSearch(filters);
|
|
2423
2427
|
normalizeMcpCompanyIcp(filters);
|
|
2424
2428
|
stripMcpDuplicateCompanyIndustry(filters);
|
|
2429
|
+
stripMcpSeededLookalikeRiskyRefinements(filters, hasSeeds);
|
|
2425
2430
|
stripMcpKeyCustomerCompanionFilters(filters);
|
|
2426
2431
|
return {
|
|
2427
2432
|
...input,
|
|
2433
|
+
seedCompanies: seedCompanies.length > 0 ? seedCompanies : undefined,
|
|
2434
|
+
seedDomains: seedDomains.length > 0 ? seedDomains : undefined,
|
|
2428
2435
|
filters,
|
|
2429
2436
|
};
|
|
2430
2437
|
}
|
|
@@ -2460,6 +2467,21 @@ function normalizeMcpCompanyKeywords(filters) {
|
|
|
2460
2467
|
}
|
|
2461
2468
|
removeEmptyObjectFilter(filters, "company_keywords");
|
|
2462
2469
|
}
|
|
2470
|
+
function normalizeMcpCompanyWebsiteSearch(filters) {
|
|
2471
|
+
const websiteSearch = filters.company_website_search;
|
|
2472
|
+
if (!isPlainObject(websiteSearch)) {
|
|
2473
|
+
return;
|
|
2474
|
+
}
|
|
2475
|
+
const includeKeywords = normalizeStringArray(websiteSearch.include_keywords);
|
|
2476
|
+
const hasPositiveWebsiteSignal = includeKeywords.length > 0 ||
|
|
2477
|
+
normalizeStringArray(websiteSearch.url_contains).length > 0 ||
|
|
2478
|
+
normalizeStringArray(websiteSearch.urls).length > 0 ||
|
|
2479
|
+
Object.entries(websiteSearch).some(([key, value]) => key.startsWith("has_") && typeof value === "boolean" && value);
|
|
2480
|
+
if (!hasPositiveWebsiteSignal) {
|
|
2481
|
+
delete websiteSearch.exclude_keywords;
|
|
2482
|
+
}
|
|
2483
|
+
removeEmptyObjectFilter(filters, "company_website_search");
|
|
2484
|
+
}
|
|
2463
2485
|
function normalizeMcpCompanyIcp(filters) {
|
|
2464
2486
|
const icp = filters.company_icp;
|
|
2465
2487
|
if (!isPlainObject(icp)) {
|
|
@@ -2545,6 +2567,21 @@ function stripMcpDuplicateCompanyIndustry(filters) {
|
|
|
2545
2567
|
delete filters.company_industry;
|
|
2546
2568
|
}
|
|
2547
2569
|
}
|
|
2570
|
+
function stripMcpSeededLookalikeRiskyRefinements(filters, hasSeeds) {
|
|
2571
|
+
if (!hasSeeds || !isPlainObject(filters.company_lookalike)) {
|
|
2572
|
+
return;
|
|
2573
|
+
}
|
|
2574
|
+
const icp = filters.company_icp;
|
|
2575
|
+
if (isPlainObject(icp) &&
|
|
2576
|
+
Array.isArray(icp.industries) &&
|
|
2577
|
+
icp.industries.length > 0 &&
|
|
2578
|
+
!filters.company_industry) {
|
|
2579
|
+
filters.company_industry = { include: icp.industries };
|
|
2580
|
+
}
|
|
2581
|
+
delete filters.company_icp;
|
|
2582
|
+
delete filters.company_keywords;
|
|
2583
|
+
delete filters.company_website_search;
|
|
2584
|
+
}
|
|
2548
2585
|
function stripMcpKeyCustomerCompanionFilters(filters) {
|
|
2549
2586
|
const keyCustomers = filters.company_key_customers;
|
|
2550
2587
|
if (!isPlainObject(keyCustomers)) {
|
|
@@ -2586,6 +2623,20 @@ function normalizeStringArray(input) {
|
|
|
2586
2623
|
.map((value) => value.trim())
|
|
2587
2624
|
.filter((value) => value.length > 0);
|
|
2588
2625
|
}
|
|
2626
|
+
function normalizeMcpSeeds(input, kind) {
|
|
2627
|
+
return uniqueStrings(normalizeStringArray(input).filter((seed) => kind === "domain" ? isLikelyConcreteDomain(seed) : isLikelyConcreteSeedCompany(seed)));
|
|
2628
|
+
}
|
|
2629
|
+
function isLikelyConcreteDomain(input) {
|
|
2630
|
+
return /^[a-z0-9.-]+\.[a-z]{2,}$/i.test(input);
|
|
2631
|
+
}
|
|
2632
|
+
function isLikelyConcreteSeedCompany(input) {
|
|
2633
|
+
const normalized = input.toLowerCase();
|
|
2634
|
+
return !(normalized.includes("placeholder") ||
|
|
2635
|
+
normalized.includes("another approved") ||
|
|
2636
|
+
normalized.includes("approved seed") ||
|
|
2637
|
+
normalized.includes("best-customer seed") ||
|
|
2638
|
+
normalized.includes("example seed"));
|
|
2639
|
+
}
|
|
2589
2640
|
function uniqueStrings(input) {
|
|
2590
2641
|
return Array.from(new Set(input));
|
|
2591
2642
|
}
|
package/package.json
CHANGED
|
@@ -252,6 +252,13 @@ without an include keyword, and do not duplicate `company_industry` when
|
|
|
252
252
|
search, prefer `person_job_title.boolean_search` for long role synonym lists
|
|
253
253
|
instead of many `person_job_title.include` values plus broad department/seniority
|
|
254
254
|
filters.
|
|
255
|
+
For seeded company lookalikes, keep the first call simple: resolved seed
|
|
256
|
+
company/domain plus `company_lookalike.minimum_tier` and simple confirmed
|
|
257
|
+
attributes, headcount, or industry. Do not add `company_website_search`,
|
|
258
|
+
`company_keywords`, or `company_icp` until the account sample proves the seed
|
|
259
|
+
works. Do not send placeholder seed names like `another approved best-customer seed`,
|
|
260
|
+
and only use concrete companies or domains you actually resolved. Prefer `seedDomains`
|
|
261
|
+
over `seedCompanies`; do not mix both in one seeded lookalike call. Do not send `company_website_search.exclude_keywords` without a positive website include signal.
|
|
255
262
|
Do not use `AI`, `API`, `GTM`, or `SaaS` as company keyword terms.
|
|
256
263
|
Do not combine `company_key_customers` with ICP, website-search, keyword,
|
|
257
264
|
attribute, industry, or headcount filters until the standalone pass proves
|
|
@@ -427,6 +427,13 @@ Use first for broad persona expansion, ABM/domain targeting, hiring-led targetin
|
|
|
427
427
|
- Do not send `company_keywords.exclude` unless at least one include keyword is
|
|
428
428
|
present. Do not duplicate `company_industry` when `company_icp.industries`
|
|
429
429
|
already carries the industry.
|
|
430
|
+
- For seeded company lookalikes, keep the first call simple: resolved seed
|
|
431
|
+
company/domain plus `company_lookalike.minimum_tier` and simple confirmed
|
|
432
|
+
attributes, headcount, or industry. Do not add `company_website_search`,
|
|
433
|
+
`company_keywords`, or `company_icp` until the account sample proves the seed
|
|
434
|
+
works. Do not send placeholder seed names like `another approved best-customer seed`,
|
|
435
|
+
and only use concrete companies or domains you actually resolved. Prefer `seedDomains`
|
|
436
|
+
over `seedCompanies`; do not mix both in one seeded lookalike call. Do not send `company_website_search.exclude_keywords` without a positive website include signal.
|
|
430
437
|
- Do not use `company_intent`. Do not invent unsupported support-channel filters
|
|
431
438
|
or AI Attribute guesses like phone/email/chat/ticket/social.
|
|
432
439
|
- Company/account search returns an account sample only; account rows are not people leads yet. Ask the user to approve the account sample.
|
|
@@ -106,6 +106,10 @@ Avoidable-400 guardrails:
|
|
|
106
106
|
- Do not use `AI`, `API`, `GTM`, or `SaaS` as company keyword terms. Use confirmed attributes such as `uses_ai` / `has_api`, or spell out `artificial intelligence`, `application programming interface`, `go to market`, and `software as a service`.
|
|
107
107
|
- Do not send `company_keywords.exclude` unless at least one include keyword is present.
|
|
108
108
|
- Do not duplicate `company_industry` when `company_icp.industries` already carries the industry.
|
|
109
|
+
- For seeded company lookalikes, keep the first call simple: seed company/domain + `company_lookalike.minimum_tier` + confirmed attributes, headcount, or industry. Do not add `company_website_search`, `company_keywords`, or `company_icp` until the account sample proves the seed works.
|
|
110
|
+
- Do not send placeholder seed names such as `another approved best-customer seed`; use only concrete company names or domains you have actually resolved.
|
|
111
|
+
- Prefer seed domains over seed company names. Do not mix `seedDomains` and `seedCompanies` in the same lookalike call; use concrete domains when available.
|
|
112
|
+
- Do not send `company_website_search.exclude_keywords` without a positive website include signal.
|
|
109
113
|
- For post-confirm people search, prefer `person_job_title.boolean_search` for long role synonym lists instead of many `person_job_title.include` values plus broad department/seniority filters.
|
|
110
114
|
|
|
111
115
|
Unsupported/caveats:
|
|
@@ -249,6 +253,8 @@ Preference rules:
|
|
|
249
253
|
- `company_keywords.include/exclude` values must be at least 3 characters; use `artificial intelligence` instead of `AI`, or use confirmed attributes such as `uses_ai` when that is the real signal.
|
|
250
254
|
- Do not use `AI`, `API`, `GTM`, or `SaaS` as company keyword terms; use longer phrases such as `artificial intelligence`, `application programming interface`, `go to market`, or `software as a service`.
|
|
251
255
|
- Run `company_key_customers` as a standalone first-pass filter. Do not combine `company_key_customers` with ICP, website-search, keyword, attribute, industry, or headcount filters until the standalone pass proves useful.
|
|
256
|
+
- For seeded lookalikes, avoid first-call `company_website_search`, `company_keywords`, and `company_icp`; use resolved seeds plus lookalike tier and simple attributes/headcount/industry first.
|
|
257
|
+
- Prefer `seedDomains` over `seedCompanies`; do not mix both in one seeded lookalike call.
|
|
252
258
|
|
|
253
259
|
### Person Filters
|
|
254
260
|
|