@coldiq/mcp 0.5.4 → 5.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"provider-availability.d.ts","sourceRoot":"","sources":["../src/provider-availability.ts"],"names":[],"mappings":"AAqBA,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI3D"}
1
+ {"version":3,"file":"provider-availability.d.ts","sourceRoot":"","sources":["../src/provider-availability.ts"],"names":[],"mappings":"AAwBA,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI3D"}
@@ -6,9 +6,12 @@
6
6
  * configured and testable while public routing and tool schemas omit them.
7
7
  */
8
8
  const DISABLED_PROVIDERS = new Set([
9
+ 'companyenrich',
9
10
  'people-data-labs',
10
11
  ]);
11
12
  const PROVIDER_ALIASES = {
13
+ 'company-enrich': 'companyenrich',
14
+ 'companyenrich-props': 'companyenrich',
12
15
  pdl: 'people-data-labs',
13
16
  'pdl-person-enrich': 'people-data-labs',
14
17
  'pdl-person-identify': 'people-data-labs',
@@ -1 +1 @@
1
- {"version":3,"file":"provider-availability.js","sourceRoot":"","sources":["../src/provider-availability.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,kBAAkB;CACnB,CAAC,CAAA;AAEF,MAAM,gBAAgB,GAA2B;IAC/C,GAAG,EAAE,kBAAkB;IACvB,mBAAmB,EAAE,kBAAkB;IACvC,qBAAqB,EAAE,kBAAkB;CAC1C,CAAA;AAED,SAAS,oBAAoB,CAAC,QAAgB;IAC5C,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAA;AAC9D,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,iBAAiB,CAAC,QAAgB;IAChD,MAAM,UAAU,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAA;IACjD,MAAM,SAAS,GAAG,gBAAgB,CAAC,UAAU,CAAC,IAAI,UAAU,CAAA;IAC5D,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;AAC3C,CAAC"}
1
+ {"version":3,"file":"provider-availability.js","sourceRoot":"","sources":["../src/provider-availability.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,eAAe;IACf,kBAAkB;CACnB,CAAC,CAAA;AAEF,MAAM,gBAAgB,GAA2B;IAC/C,gBAAgB,EAAE,eAAe;IACjC,qBAAqB,EAAE,eAAe;IACtC,GAAG,EAAE,kBAAkB;IACvB,mBAAmB,EAAE,kBAAkB;IACvC,qBAAqB,EAAE,kBAAkB;CAC1C,CAAA;AAED,SAAS,oBAAoB,CAAC,QAAgB;IAC5C,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAA;AAC9D,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,iBAAiB,CAAC,QAAgB;IAChD,MAAM,UAAU,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAA;IACjD,MAAM,SAAS,GAAG,gBAAgB,CAAC,UAAU,CAAC,IAAI,UAAU,CAAA;IAC5D,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;AAC3C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coldiq/mcp",
3
- "version": "0.5.4",
3
+ "version": "5.4.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -6,10 +6,13 @@
6
6
  * configured and testable while public routing and tool schemas omit them.
7
7
  */
8
8
  const DISABLED_PROVIDERS = new Set([
9
+ 'companyenrich',
9
10
  'people-data-labs',
10
11
  ])
11
12
 
12
13
  const PROVIDER_ALIASES: Record<string, string> = {
14
+ 'company-enrich': 'companyenrich',
15
+ 'companyenrich-props': 'companyenrich',
13
16
  pdl: 'people-data-labs',
14
17
  'pdl-person-enrich': 'people-data-labs',
15
18
  'pdl-person-identify': 'people-data-labs',
@@ -34,8 +34,18 @@ const CAPABILITIES: Capability[] = [
34
34
  ]
35
35
 
36
36
  describe('standalone MCP provider availability', () => {
37
- it('mirrors every People Data Labs alias from the Worker policy', () => {
38
- for (const alias of ['people-data-labs', 'People Data Labs', 'pdl', 'pdl-person-enrich', 'pdl-person-identify']) {
37
+ it('mirrors every disabled-provider alias from the Worker policy', () => {
38
+ for (const alias of [
39
+ 'companyenrich',
40
+ 'CompanyEnrich',
41
+ 'Company Enrich',
42
+ 'companyenrich_props',
43
+ 'people-data-labs',
44
+ 'People Data Labs',
45
+ 'pdl',
46
+ 'pdl-person-enrich',
47
+ 'pdl-person-identify',
48
+ ]) {
39
49
  expect(isProviderEnabled(alias), alias).toBe(false)
40
50
  expect(isProviderEnabled(alias), alias).toBe(isWorkerProviderEnabled(alias))
41
51
  }
@@ -46,6 +56,8 @@ describe('standalone MCP provider availability', () => {
46
56
  // pdl-person-enrich left find_email entirely (2026-07-24 reorder); the dormant
47
57
  // PDL definition still lives in find_people for when the account is re-enabled.
48
58
  expect(getConfiguredProviders('find_people').some((provider) => provider.id === 'pdl')).toBe(true)
59
+ expect(getConfiguredProviders('search_companies').some((provider) => provider.id === 'companyenrich')).toBe(true)
60
+ expect(getConfiguredProviders('enrich_company').some((provider) => provider.id === 'companyenrich_props')).toBe(true)
49
61
 
50
62
  for (const capability of CAPABILITIES) {
51
63
  expect(getProviders(capability).every((provider) => isProviderEnabled(provider.id))).toBe(true)
@@ -55,8 +67,13 @@ describe('standalone MCP provider availability', () => {
55
67
  })
56
68
 
57
69
  it('rejects an explicit disabled-provider pin without advertising it as available', () => {
58
- for (const capability of ['find_email', 'find_emails'] as const) {
59
- const result = resolvePreferredProviders(capability, {}, ['pdl-person-enrich'])
70
+ for (const [capability, provider] of [
71
+ ['find_email', 'pdl-person-enrich'],
72
+ ['find_emails', 'pdl-person-enrich'],
73
+ ['search_companies', 'companyenrich'],
74
+ ['enrich_company', 'companyenrich_props'],
75
+ ] as const) {
76
+ const result = resolvePreferredProviders(capability, {}, [provider])
60
77
  expect(result.ok).toBe(false)
61
78
  if (!result.ok) {
62
79
  expect(result.error.available_providers.every(isProviderEnabled)).toBe(true)
@@ -79,5 +96,7 @@ describe('standalone MCP provider availability', () => {
79
96
 
80
97
  expect(publicMetadata).not.toContain('people data labs')
81
98
  expect(publicMetadata).not.toMatch(/\bpdl\b/)
99
+ expect(publicMetadata).not.toContain('companyenrich')
100
+ expect(publicMetadata).not.toContain('/companyenrich')
82
101
  })
83
102
  })
@@ -1,9 +1,9 @@
1
1
  import { describe, it, expect } from 'vitest'
2
- import { getProviders, prospeoHeadcountBuckets } from '../src/registry.js'
2
+ import { getConfiguredProviders, getProviders, prospeoHeadcountBuckets } from '../src/registry.js'
3
3
 
4
4
  const providers = () => getProviders('search_companies')
5
5
  const get = (id: string) => {
6
- const p = providers().find((p) => p.id === id)
6
+ const p = getConfiguredProviders('search_companies').find((p) => p.id === id)
7
7
  if (!p) throw new Error(`Provider '${id}' not found in search_companies`)
8
8
  return p
9
9
  }
@@ -59,7 +59,7 @@ describe('registry', () => {
59
59
  // `query` matches company NAME + domain, so a theme like "SaaS" returns
60
60
  // companies merely NAMED "SaaS …". "SaaS" is a controlled category → routes to
61
61
  // the precise `category` filter; "Software" has no category → stays free-text.
62
- const providers = getProviders('search_companies')
62
+ const providers = getConfiguredProviders('search_companies')
63
63
  const ce = providers.find((p) => p.id === 'companyenrich')!
64
64
  const result = ce.mapParams({
65
65
  keywords: ['SaaS'],
@@ -81,7 +81,7 @@ describe('registry', () => {
81
81
  })
82
82
 
83
83
  it('CompanyEnrich routes "B2B SaaS" to category=[saas,b2b] with And (the user-intended conjunction)', () => {
84
- const providers = getProviders('search_companies')
84
+ const providers = getConfiguredProviders('search_companies')
85
85
  const ce = providers.find((p) => p.id === 'companyenrich')!
86
86
  const body = ce.mapParams({ keywords: ['SaaS', 'B2B'], countries: ['FR'] }).body as Record<string, unknown>
87
87
  expect(body.category).toEqual(['saas', 'b2b'])
@@ -94,7 +94,7 @@ describe('registry', () => {
94
94
  // The unified `keywords` param means topics/business-models/themes — brand-name
95
95
  // lookups belong to enrich_company or the `names`/`domains` fields, not here.
96
96
  // "fintech" is not a controlled category, so it stays in the keyword tag filter.
97
- const providers = getProviders('search_companies')
97
+ const providers = getConfiguredProviders('search_companies')
98
98
  const ce = providers.find((p) => p.id === 'companyenrich')!
99
99
  const result = ce.mapParams({ keywords: ['fintech'], limit: 5 })
100
100
  const body = result.body as Record<string, unknown>
@@ -106,7 +106,7 @@ describe('registry', () => {
106
106
  })
107
107
 
108
108
  it('CompanyEnrich omits both category and keyword filters when no keywords/industries provided', () => {
109
- const providers = getProviders('search_companies')
109
+ const providers = getConfiguredProviders('search_companies')
110
110
  const ce = providers.find((p) => p.id === 'companyenrich')!
111
111
  const result = ce.mapParams({ countries: ['US'], limit: 5 })
112
112
  const body = result.body as Record<string, unknown>
@@ -469,7 +469,6 @@ describe('registry', () => {
469
469
  it('search_companies omits disabled providers while preserving priority order', () => {
470
470
  const providers = getProviders('search_companies')
471
471
  expect(providers.map((p) => p.id)).toEqual([
472
- 'companyenrich',
473
472
  'fullenrich',
474
473
  'theirstack',
475
474
  'signalbase',
@@ -800,14 +799,14 @@ describe('registry', () => {
800
799
  it('providers preserve their order with disabled providers omitted', () => {
801
800
  const ids = getProviders('enrich_company').map((p) => p.id)
802
801
  expect(ids).toEqual([
803
- 'companyenrich', 'apollo', 'limadata', 'prospeo',
804
- 'companyenrich_props', 'blitzapi', 'wiza', 'findymail', 'icypeas',
802
+ 'apollo', 'limadata', 'prospeo',
803
+ 'blitzapi', 'wiza', 'findymail', 'icypeas',
805
804
  'builtwith', 'openmart', 'linkupapi-by-domain', 'linkupapi-by-url', 'discolike',
806
805
  ])
807
806
  })
808
807
 
809
808
  it('CompanyEnrich uses GET with queryParams and is gated on domain', () => {
810
- const ce = getProviders('enrich_company').find((p) => p.id === 'companyenrich')!
809
+ const ce = getConfiguredProviders('enrich_company').find((p) => p.id === 'companyenrich')!
811
810
  expect(ce.method).toBe('GET')
812
811
  expect(ce.mapParams({ domain: 'stripe.com' }).queryParams).toEqual({ domain: 'stripe.com' })
813
812
  expect(ce.isApplicable!({ domain: 'stripe.com' })).toBe(true)
@@ -881,7 +880,7 @@ describe('registry', () => {
881
880
  })
882
881
 
883
882
  it('CompanyEnrich POST maps name and linkedinUrl (camelCase)', () => {
884
- const cp = getProviders('enrich_company').find((p) => p.id === 'companyenrich_props')!
883
+ const cp = getConfiguredProviders('enrich_company').find((p) => p.id === 'companyenrich_props')!
885
884
  expect(cp.method).toBe('POST')
886
885
  expect(cp.isApplicable!({ name: 'Stripe' })).toBe(true)
887
886
  expect(cp.isApplicable!({ linkedin_url: 'https://linkedin.com/company/stripe' })).toBe(true)
@@ -1195,10 +1194,11 @@ describe('registry', () => {
1195
1194
 
1196
1195
  it('top-tier active providers have no postFilter', () => {
1197
1196
  const providers = getProviders('search_companies')
1198
- for (const id of ['companyenrich', 'fullenrich', 'signalbase']) {
1197
+ for (const id of ['fullenrich', 'signalbase']) {
1199
1198
  const p = providers.find((x) => x.id === id)!
1200
1199
  expect(p.postFilter, `${id} should not have postFilter`).toBeUndefined()
1201
1200
  }
1201
+ expect(getConfiguredProviders('search_companies').find((provider) => provider.id === 'companyenrich')?.postFilter).toBeUndefined()
1202
1202
  expect(getConfiguredProviders('search_companies').find((provider) => provider.id === 'pdl')?.postFilter).toBeUndefined()
1203
1203
  })
1204
1204
 
@@ -1238,7 +1238,7 @@ describe('registry', () => {
1238
1238
 
1239
1239
  describe('search_companies Phase B GTM filters', () => {
1240
1240
  it('CompanyEnrich maps technologies, fundingAmount, fundingYear, revenue, workforceGrowth, and exclude', () => {
1241
- const ce = getProviders('search_companies').find((p) => p.id === 'companyenrich')!
1241
+ const ce = getConfiguredProviders('search_companies').find((p) => p.id === 'companyenrich')!
1242
1242
  const result = ce.mapParams({
1243
1243
  keywords: ['SaaS'],
1244
1244
  technologies: ['Salesforce', 'HubSpot'],
@@ -1274,7 +1274,7 @@ describe('registry', () => {
1274
1274
  })
1275
1275
 
1276
1276
  it('CompanyEnrich omits optional Phase B fields when not provided', () => {
1277
- const ce = getProviders('search_companies').find((p) => p.id === 'companyenrich')!
1277
+ const ce = getConfiguredProviders('search_companies').find((p) => p.id === 'companyenrich')!
1278
1278
  const result = ce.mapParams({ countries: ['US'], limit: 5 })
1279
1279
  const body = result.body as Record<string, unknown>
1280
1280
  expect(body.technologies).toBeUndefined()
@@ -1286,7 +1286,7 @@ describe('registry', () => {
1286
1286
  })
1287
1287
 
1288
1288
  it('CompanyEnrich exclude object only includes keys that were provided', () => {
1289
- const ce = getProviders('search_companies').find((p) => p.id === 'companyenrich')!
1289
+ const ce = getConfiguredProviders('search_companies').find((p) => p.id === 'companyenrich')!
1290
1290
  const result = ce.mapParams({ exclude_domains: ['a.com'], limit: 5 })
1291
1291
  expect((result.body as Record<string, unknown>).exclude).toEqual({ domains: ['a.com'] })
1292
1292
  })