@leadbay/mcp 0.35.0 → 0.35.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog — @leadbay/mcp
2
2
 
3
+ ## 0.35.2 — 2026-09-08
4
+
5
+ A backend `bad_request` 400 is now `BAD_INPUT` (product#4085).
6
+
7
+ **What happened.** On 8 Sep an unattended routine on the hosted server called
8
+ `leadbay_research_lead_by_id` twenty times in 39 seconds with the first block
9
+ of each lead UUID (`/lenses/48110/leads/5585c198`, …). The backend rejected
10
+ every call in ~30 ms with `400 {"error":{"code":"bad_request","message":"bad
11
+ 'leadId' parameter"}}`. `client.ts` `mapErrorResponse` filed that under the
12
+ `API_ERROR` catch-all, whose hint reads "Try again or check the Leadbay API
13
+ status". The agent did what it was told. The same pattern ran on 31 Aug.
14
+
15
+ **Change.** A 400 whose body carries the backend's `bad_request` code (a path
16
+ or query parameter that failed to parse, a body that failed to deserialize) is
17
+ `BAD_INPUT`, with the backend message verbatim and a hint that the call fails
18
+ identically on retry and that ids are the full values Leadbay returned. Other
19
+ 400 codes (`duplicate`, `unpaid_invoice`, `not_allowed`, …) are domain answers
20
+ and stay `API_ERROR`. `leadbay_research_lead_by_id`'s `leadId` schema
21
+ description now says the id is the full 36-character UUID from
22
+ `leadbay_pull_leads` `items[].id`, never shortened. No template change.
23
+
24
+ ## 0.35.1 — 2026-09-08
25
+
26
+ Release-pipeline only. No source change, no behaviour change: `packages/core`
27
+ and `packages/mcp` are byte-identical to 0.35.0. This version exists because
28
+ the MCP Registry can only be reached by a tag push, and the two `release.yml`
29
+ bugs fixed in #208 had to ship before a tag could carry it.
30
+
31
+ **What was broken.** 0.35.0 published to npm and then the workflow died
32
+ before creating the GitHub Release: the release-notes pipeline ended in
33
+ `head -60` under `set -euo pipefail`, the 0.35.0 changelog section is 115
34
+ lines, so `head` closed the pipe, GNU sed failed its final flush and the step
35
+ exited 4. No Release meant no `.dxt`/`.mcpb`, and `Publish to MCP Registry`
36
+ was skipped for `needs:`-ing the job that failed. Separately, on 0.34.1 the
37
+ registry job did run and the registry refused it — it re-checks npm itself and
38
+ got a 404 for a version published seconds earlier. Between the two, the
39
+ directory listing sat at 0.34.0 and the desktop bundle at 0.34.x while npm and
40
+ the hosted server were on 0.35.0.
41
+
42
+ 0.35.0's Release and its four assets were created by hand once #208 landed;
43
+ this release is what carries the fix through the pipeline itself.
44
+
3
45
  ## 0.35.0 — 2026-09-02
4
46
 
5
47
  The MCP no longer keeps any record of the jobs it starts (product#4005,
package/dist/bin.js CHANGED
@@ -661,6 +661,9 @@ var init_client = __esm({
661
661
  if (status === 404) {
662
662
  return this.makeError("NOT_FOUND", parsed?.message || parsed?.error?.message || "Resource not found", "Verify the ID is correct", endpoint, null, status);
663
663
  }
664
+ if (status === 400 && parsed?.error?.code === "bad_request") {
665
+ return this.makeError("BAD_INPUT", parsed?.error?.message || parsed?.message || "Leadbay rejected the request as malformed", "Leadbay's input validation rejected this call, so the same call will fail the same way \u2014 do not retry it unchanged. Fix the parameter named in the message first; if it is an id, pass it exactly as Leadbay returned it, never shortened or reconstructed.", endpoint, null, status);
666
+ }
664
667
  return this.makeError("API_ERROR", parsed?.message || parsed?.error?.message || `API error (${status})`, "Try again or check the Leadbay API status", endpoint, null, status);
665
668
  }
666
669
  // /me cache (60s TTL). Separate from resolveOrgId() which still works for
@@ -14817,7 +14820,10 @@ var init_research_lead_by_id = __esm({
14817
14820
  inputSchema: {
14818
14821
  type: "object",
14819
14822
  properties: {
14820
- leadId: { type: "string", description: "Lead UUID (required)" },
14823
+ leadId: {
14824
+ type: "string",
14825
+ description: "Full 36-character lead UUID exactly as returned in leadbay_pull_leads items[].id (never shortened)"
14826
+ },
14821
14827
  lensId: {
14822
14828
  type: "number",
14823
14829
  description: "Lens id (escape hatch \u2014 normally omit; auto-resolves to the active lens)"
@@ -28045,7 +28051,7 @@ var OAUTH_BASE_URLS = {
28045
28051
  fr: "https://staging.api.leadbay.app"
28046
28052
  }
28047
28053
  };
28048
- var VERSION = "0.35.0";
28054
+ var VERSION = "0.35.2";
28049
28055
  var HELP = `
28050
28056
  leadbay-mcp ${VERSION} \u2014 Leadbay Model Context Protocol server
28051
28057
 
@@ -3649,6 +3649,9 @@ var LeadbayClient = class _LeadbayClient {
3649
3649
  if (status === 404) {
3650
3650
  return this.makeError("NOT_FOUND", parsed?.message || parsed?.error?.message || "Resource not found", "Verify the ID is correct", endpoint, null, status);
3651
3651
  }
3652
+ if (status === 400 && parsed?.error?.code === "bad_request") {
3653
+ return this.makeError("BAD_INPUT", parsed?.error?.message || parsed?.message || "Leadbay rejected the request as malformed", "Leadbay's input validation rejected this call, so the same call will fail the same way \u2014 do not retry it unchanged. Fix the parameter named in the message first; if it is an id, pass it exactly as Leadbay returned it, never shortened or reconstructed.", endpoint, null, status);
3654
+ }
3652
3655
  return this.makeError("API_ERROR", parsed?.message || parsed?.error?.message || `API error (${status})`, "Try again or check the Leadbay API status", endpoint, null, status);
3653
3656
  }
3654
3657
  // /me cache (60s TTL). Separate from resolveOrgId() which still works for
@@ -16962,7 +16965,10 @@ var researchLeadById = {
16962
16965
  inputSchema: {
16963
16966
  type: "object",
16964
16967
  properties: {
16965
- leadId: { type: "string", description: "Lead UUID (required)" },
16968
+ leadId: {
16969
+ type: "string",
16970
+ description: "Full 36-character lead UUID exactly as returned in leadbay_pull_leads items[].id (never shortened)"
16971
+ },
16966
16972
  lensId: {
16967
16973
  type: "number",
16968
16974
  description: "Lens id (escape hatch \u2014 normally omit; auto-resolves to the active lens)"
@@ -25410,7 +25416,7 @@ function parseWriteEnv(env = process.env) {
25410
25416
  }
25411
25417
 
25412
25418
  // src/http-server.ts
25413
- var VERSION = true ? "0.35.0" : "0.0.0-dev";
25419
+ var VERSION = true ? "0.35.2" : "0.0.0-dev";
25414
25420
  var PORT = Number(process.env.PORT ?? 8080);
25415
25421
  var HOST = process.env.HOST ?? "0.0.0.0";
25416
25422
  var logger = {
@@ -1805,7 +1805,7 @@ var init_installer_gui = __esm({
1805
1805
  init_install_dxt();
1806
1806
  init_install_shared();
1807
1807
  init_oauth();
1808
- VERSION = true ? "0.35.0" : "0.0.0-dev";
1808
+ VERSION = true ? "0.35.2" : "0.0.0-dev";
1809
1809
  MESSAGES = {
1810
1810
  en: {
1811
1811
  installer: {
@@ -1068,7 +1068,7 @@ async function oauthLogin(opts) {
1068
1068
  }
1069
1069
 
1070
1070
  // installer/installer-gui.ts
1071
- var VERSION = true ? "0.35.0" : "0.0.0-dev";
1071
+ var VERSION = true ? "0.35.2" : "0.0.0-dev";
1072
1072
  var MESSAGES = {
1073
1073
  en: {
1074
1074
  installer: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leadbay/mcp",
3
- "version": "0.35.0",
3
+ "version": "0.35.2",
4
4
  "mcpName": "io.github.leadbay/leadbay-mcp",
5
5
  "description": "Model Context Protocol (MCP) server for Leadbay — AI lead discovery, qualification, and enrichment for Claude Desktop, Cursor, and Claude Code.",
6
6
  "type": "module",