@leadbay/mcp 0.33.0 → 0.33.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog — @leadbay/mcp
2
2
 
3
+ ## 0.33.1 — 2026-09-02
4
+
5
+ Follow-up to 0.32.0 (product#4007). A review finding landed after the merge.
6
+
7
+ - **Only a REFUSAL counts as a commit failure.** The detached finisher's catch
8
+ recorded ANY rejection from the `pollPreprocess` → `commitMappings` chain as a
9
+ permanent commit failure — including the `ImportPhaseTimeout` raised when
10
+ preprocess still hasn't finished after the finisher's own 10-minute window.
11
+ That is not a backend refusal; the import is merely slow and may yet finish.
12
+ The registry has no expiry, so `leadbay_import_status` would have answered
13
+ `failed` for ever on a healthy import — worse than the forever-polling 0.32.0
14
+ set out to remove. A budget timeout now leaves the status at `committing`,
15
+ which is the honest reading; only an error from `commitMappings` itself is
16
+ recorded.
17
+ - The finisher's window is deliberately not caller-controllable — a caller
18
+ shrinking it is the bug that budget exists to prevent — so the test reaches it
19
+ through a named module seam beside the existing `clearCommitFailures`, rather
20
+ than a parameter that would leak into the tool's public schema.
21
+
3
22
  ## 0.33.0 — 2026-09-01
4
23
 
5
24
  Agent memory is removed (product#3996). The three `leadbay_agent_memory_*`
package/dist/bin.js CHANGED
@@ -9389,7 +9389,15 @@ function resumeParkedUpload(client, upload, mappings, ctx) {
9389
9389
  const { importId } = upload;
9390
9390
  setTimeout(() => {
9391
9391
  void (async () => {
9392
- await pollPreprocess(client, importId, RESUME_COMMIT_BUDGET_MS, bgCtx, void 0);
9392
+ try {
9393
+ await pollPreprocess(client, importId, resumeCommitBudgetMs, bgCtx, void 0);
9394
+ } catch (err) {
9395
+ if (err instanceof ImportPhaseTimeout) {
9396
+ bgCtx.logger?.warn?.(`import-leads: parked upload ${importId} still preprocessing after ${resumeCommitBudgetMs}ms; leaving it to the backend`);
9397
+ return;
9398
+ }
9399
+ throw err;
9400
+ }
9393
9401
  await commitMappings(client, importId, mappings, bgCtx);
9394
9402
  })().then(() => ctx?.logger?.info?.(`import-leads: parked upload ${importId} committed; backend is processing`), (err) => {
9395
9403
  recordCommitFailure(importId, err?.message ?? err?.code ?? "mapping commit failed");
@@ -9437,7 +9445,7 @@ async function runImportInBackground(client, prep, uploadedChunks, opts, ctx, ha
9437
9445
  })();
9438
9446
  }, 0);
9439
9447
  }
9440
- var CHUNK_SIZE, POLL_INTERVAL_MS2, DEFAULT_PER_PHASE_BUDGET_MS, DEFAULT_TOTAL_BUDGET_MS, STABILIZATION_POLLS, MAX_COLUMN_NAME_LEN, RESERVED_COLUMN_RE, CUSTOM_FIELD_RE, IMPORT_RESOLVER_FIELDS, ImportPhaseTimeout, LEAD_STATUSES, LEAD_STATUS_SET, importLeads, RESUME_COMMIT_BUDGET_MS;
9448
+ var CHUNK_SIZE, POLL_INTERVAL_MS2, DEFAULT_PER_PHASE_BUDGET_MS, DEFAULT_TOTAL_BUDGET_MS, STABILIZATION_POLLS, MAX_COLUMN_NAME_LEN, RESERVED_COLUMN_RE, CUSTOM_FIELD_RE, IMPORT_RESOLVER_FIELDS, ImportPhaseTimeout, LEAD_STATUSES, LEAD_STATUS_SET, importLeads, DEFAULT_RESUME_COMMIT_BUDGET_MS, resumeCommitBudgetMs;
9441
9449
  var init_import_leads = __esm({
9442
9450
  "../core/dist/composite/import-leads.js"() {
9443
9451
  "use strict";
@@ -9829,7 +9837,8 @@ var init_import_leads = __esm({
9829
9837
  return buildImportLeadsResult(client, prep, importIds, matched, notImported, dryRun, cancelled, notificationIds);
9830
9838
  }
9831
9839
  };
9832
- RESUME_COMMIT_BUDGET_MS = 10 * 6e4;
9840
+ DEFAULT_RESUME_COMMIT_BUDGET_MS = 10 * 6e4;
9841
+ resumeCommitBudgetMs = DEFAULT_RESUME_COMMIT_BUDGET_MS;
9833
9842
  }
9834
9843
  });
9835
9844
 
@@ -27853,7 +27862,7 @@ var OAUTH_BASE_URLS = {
27853
27862
  fr: "https://staging.api.leadbay.app"
27854
27863
  }
27855
27864
  };
27856
- var VERSION = "0.33.0";
27865
+ var VERSION = "0.33.1";
27857
27866
  var HELP = `
27858
27867
  leadbay-mcp ${VERSION} \u2014 Leadbay Model Context Protocol server
27859
27868
 
@@ -12159,13 +12159,22 @@ var importLeads = {
12159
12159
  return buildImportLeadsResult(client, prep, importIds, matched, notImported, dryRun, cancelled, notificationIds);
12160
12160
  }
12161
12161
  };
12162
- var RESUME_COMMIT_BUDGET_MS = 10 * 6e4;
12162
+ var DEFAULT_RESUME_COMMIT_BUDGET_MS = 10 * 6e4;
12163
+ var resumeCommitBudgetMs = DEFAULT_RESUME_COMMIT_BUDGET_MS;
12163
12164
  function resumeParkedUpload(client, upload, mappings, ctx) {
12164
12165
  const bgCtx = { logger: ctx?.logger };
12165
12166
  const { importId } = upload;
12166
12167
  setTimeout(() => {
12167
12168
  void (async () => {
12168
- await pollPreprocess(client, importId, RESUME_COMMIT_BUDGET_MS, bgCtx, void 0);
12169
+ try {
12170
+ await pollPreprocess(client, importId, resumeCommitBudgetMs, bgCtx, void 0);
12171
+ } catch (err) {
12172
+ if (err instanceof ImportPhaseTimeout) {
12173
+ bgCtx.logger?.warn?.(`import-leads: parked upload ${importId} still preprocessing after ${resumeCommitBudgetMs}ms; leaving it to the backend`);
12174
+ return;
12175
+ }
12176
+ throw err;
12177
+ }
12169
12178
  await commitMappings(client, importId, mappings, bgCtx);
12170
12179
  })().then(() => ctx?.logger?.info?.(`import-leads: parked upload ${importId} committed; backend is processing`), (err) => {
12171
12180
  recordCommitFailure(importId, err?.message ?? err?.code ?? "mapping commit failed");
@@ -24620,7 +24629,7 @@ function parseWriteEnv(env = process.env) {
24620
24629
  }
24621
24630
 
24622
24631
  // src/http-server.ts
24623
- var VERSION = true ? "0.33.0" : "0.0.0-dev";
24632
+ var VERSION = true ? "0.33.1" : "0.0.0-dev";
24624
24633
  var PORT = Number(process.env.PORT ?? 8080);
24625
24634
  var HOST = process.env.HOST ?? "0.0.0.0";
24626
24635
  var logger = {
@@ -1804,7 +1804,7 @@ var init_installer_gui = __esm({
1804
1804
  init_install_dxt();
1805
1805
  init_install_shared();
1806
1806
  init_oauth();
1807
- VERSION = true ? "0.33.0" : "0.0.0-dev";
1807
+ VERSION = true ? "0.33.1" : "0.0.0-dev";
1808
1808
  MESSAGES = {
1809
1809
  en: {
1810
1810
  installer: {
@@ -1067,7 +1067,7 @@ async function oauthLogin(opts) {
1067
1067
  }
1068
1068
 
1069
1069
  // installer/installer-gui.ts
1070
- var VERSION = true ? "0.33.0" : "0.0.0-dev";
1070
+ var VERSION = true ? "0.33.1" : "0.0.0-dev";
1071
1071
  var MESSAGES = {
1072
1072
  en: {
1073
1073
  installer: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leadbay/mcp",
3
- "version": "0.33.0",
3
+ "version": "0.33.1",
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",