@leadbay/mcp 0.20.0 → 0.20.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,9 @@
1
1
  # Changelog — @leadbay/mcp
2
2
 
3
+ ## 0.20.1 — 2026-06-15
4
+
5
+ - **Triage board stays the first next-step option on a poor-fit batch** (`leadbay_daily_check_in`): when today's batch is an ICP mismatch (every lead AI-scored off-profile), the agent was demoting the interactive triage board below "refine audience" in the NEXT STEPS widget — the plain ordering rule kept losing to the agent's own leverage judgment ("the whole batch is junk, so lead with fixing the lens"). The workflow contract requires the named artifact to be the FIRST option. The ordering rule now holds the triage board at position 1 even on a mismatched batch; the mismatch is surfaced in the prose nudge and offered as a *later* "refine the lens" option, never by displacing the artifact. Verified 5/5/5/5 across 3 consecutive eval runs on an all-off-ICP batch (the exact case that defeated the weaker rule).
6
+
3
7
  ## 0.20.0 — 2026-06-15
4
8
 
5
9
  - **Proactive update proposal on a fresh session** (product#3742): the auto-update check already ran at boot, but the resulting proposal only reached the user if the agent happened to call `leadbay_account_status` — which a fresh session rarely does, so the "newer version available" prompt was effectively invisible. The cached `update_available` block now also rides along on `_meta.update_available` of the **first ordinary tool result** of a session while an upgrade is pending, gated once-per-version so it surfaces exactly once. `leadbay_account_status` keeps carrying it as a top-level field. The server-instruction paragraph now tells the agent to surface the `ask_user_input_v0` prompt whenever it sees the field on *any* response.
package/dist/bin.js CHANGED
@@ -22038,7 +22038,7 @@ Contact enrichment is offered in the NEXT STEPS widget below \u2014 do NOT emit
22038
22038
 
22039
22039
  **REQUIRED OPTIONS \u2014 triggers and position rules:**
22040
22040
  - **Recurring language** ("every day", "every morning", "I do this every", "remind me", "automate this", "recurring"): add "Schedule 'Daily prospecting check-in' as a recurring task" and place it **first**.
22041
- - **\u22655 leads returned**: add "Build an interactive lead triage board for this batch" and place it **first** (or second if the scheduling offer above also applies).
22041
+ - **\u22655 leads returned**: add "Build an interactive lead triage board for this batch" and place it **first** (or second if the scheduling offer above also applies). This holds **even when the batch is a poor fit** (e.g. every lead AI-scored as off-ICP / a vertical mismatch): the triage board is still the first artifact option because the user asked to see and act on *this batch*. When the batch is a mismatch, ALSO offer "Refine the audience / lens so future batches fit better" \u2014 but as a *later* option, never displacing the triage board from first. Leading with audience-refinement instead of the artifact is a contract violation: surface the mismatch in your prose nudge, not by demoting the triage board.
22042
22042
 
22043
22043
  ## NEXT STEPS \u2014 after rendering the pull_leads table
22044
22044
 
@@ -22079,7 +22079,7 @@ Pick 2\u20133 items below based on what was actually observed in the response. T
22079
22079
  If nothing in the menu applies cleanly, suggest only "pull next page" and "research a specific lead in depth" \u2014 never invent a tool that doesn't exist.
22080
22080
 
22081
22081
 
22082
- **Final ordering check (do this before rendering):** Recurring offer \u2192 option 1; triage board \u2192 option 1 (or 2 if scheduling is also required). Swap if needed.
22082
+ **Final ordering check (do this before rendering):** Recurring offer \u2192 option 1; triage board \u2192 option 1 (or 2 if scheduling is also required). A poor-fit / mismatched batch does NOT change this \u2014 triage board stays first, refine-audience goes later in the list. Swap if needed.
22083
22083
 
22084
22084
  # GATE \u2014 STOP
22085
22085
 
@@ -24623,6 +24623,7 @@ function buildServer(client, opts = {}) {
24623
24623
  endpoint: err._meta?.endpoint
24624
24624
  });
24625
24625
  }
24626
+ const httpStatus2 = err._meta?.http_status;
24626
24627
  telemetry.captureToolCall({
24627
24628
  tool: name,
24628
24629
  ok: false,
@@ -24630,6 +24631,7 @@ function buildServer(client, opts = {}) {
24630
24631
  format: "error-envelope",
24631
24632
  bytes: errText.length,
24632
24633
  error_code: code,
24634
+ ...typeof httpStatus2 === "number" ? { http_status: httpStatus2 } : {},
24633
24635
  triggered_by
24634
24636
  });
24635
24637
  if (COMPOSITE_FILE_TOOL_NAMES.has(name)) {
@@ -24638,7 +24640,8 @@ function buildServer(client, opts = {}) {
24638
24640
  last_prompt: triggered_by ?? "",
24639
24641
  ok: false,
24640
24642
  duration_ms: errDur,
24641
- error_code: code
24643
+ error_code: code,
24644
+ ...typeof httpStatus2 === "number" ? { http_status: httpStatus2 } : {}
24642
24645
  });
24643
24646
  }
24644
24647
  telemetry.captureException(err, buildBusinessCtx(name, err, triggered_by));
@@ -25925,7 +25928,7 @@ var OAUTH_BASE_URLS = {
25925
25928
  fr: "https://staging.api.leadbay.app"
25926
25929
  }
25927
25930
  };
25928
- var VERSION = "0.20.0";
25931
+ var VERSION = "0.20.1";
25929
25932
  var HELP = `
25930
25933
  leadbay-mcp ${VERSION} \u2014 Leadbay Model Context Protocol server
25931
25934
 
@@ -180,7 +180,7 @@ Contact enrichment is offered in the NEXT STEPS widget below \u2014 do NOT emit
180
180
 
181
181
  **REQUIRED OPTIONS \u2014 triggers and position rules:**
182
182
  - **Recurring language** ("every day", "every morning", "I do this every", "remind me", "automate this", "recurring"): add "Schedule 'Daily prospecting check-in' as a recurring task" and place it **first**.
183
- - **\u22655 leads returned**: add "Build an interactive lead triage board for this batch" and place it **first** (or second if the scheduling offer above also applies).
183
+ - **\u22655 leads returned**: add "Build an interactive lead triage board for this batch" and place it **first** (or second if the scheduling offer above also applies). This holds **even when the batch is a poor fit** (e.g. every lead AI-scored as off-ICP / a vertical mismatch): the triage board is still the first artifact option because the user asked to see and act on *this batch*. When the batch is a mismatch, ALSO offer "Refine the audience / lens so future batches fit better" \u2014 but as a *later* option, never displacing the triage board from first. Leading with audience-refinement instead of the artifact is a contract violation: surface the mismatch in your prose nudge, not by demoting the triage board.
184
184
 
185
185
  ## NEXT STEPS \u2014 after rendering the pull_leads table
186
186
 
@@ -221,7 +221,7 @@ Pick 2\u20133 items below based on what was actually observed in the response. T
221
221
  If nothing in the menu applies cleanly, suggest only "pull next page" and "research a specific lead in depth" \u2014 never invent a tool that doesn't exist.
222
222
 
223
223
 
224
- **Final ordering check (do this before rendering):** Recurring offer \u2192 option 1; triage board \u2192 option 1 (or 2 if scheduling is also required). Swap if needed.
224
+ **Final ordering check (do this before rendering):** Recurring offer \u2192 option 1; triage board \u2192 option 1 (or 2 if scheduling is also required). A poor-fit / mismatched batch does NOT change this \u2014 triage board stays first, refine-audience goes later in the list. Swap if needed.
225
225
 
226
226
  # GATE \u2014 STOP
227
227
 
@@ -22279,6 +22279,7 @@ function buildServer(client, opts = {}) {
22279
22279
  endpoint: err._meta?.endpoint
22280
22280
  });
22281
22281
  }
22282
+ const httpStatus2 = err._meta?.http_status;
22282
22283
  telemetry.captureToolCall({
22283
22284
  tool: name,
22284
22285
  ok: false,
@@ -22286,6 +22287,7 @@ function buildServer(client, opts = {}) {
22286
22287
  format: "error-envelope",
22287
22288
  bytes: errText.length,
22288
22289
  error_code: code,
22290
+ ...typeof httpStatus2 === "number" ? { http_status: httpStatus2 } : {},
22289
22291
  triggered_by
22290
22292
  });
22291
22293
  if (COMPOSITE_FILE_TOOL_NAMES.has(name)) {
@@ -22294,7 +22296,8 @@ function buildServer(client, opts = {}) {
22294
22296
  last_prompt: triggered_by ?? "",
22295
22297
  ok: false,
22296
22298
  duration_ms: errDur,
22297
- error_code: code
22299
+ error_code: code,
22300
+ ...typeof httpStatus2 === "number" ? { http_status: httpStatus2 } : {}
22298
22301
  });
22299
22302
  }
22300
22303
  telemetry.captureException(err, buildBusinessCtx(name, err, triggered_by));
@@ -22436,7 +22439,7 @@ function parseWriteEnv(env = process.env) {
22436
22439
  }
22437
22440
 
22438
22441
  // src/http-server.ts
22439
- var VERSION = true ? "0.20.0" : "0.0.0-dev";
22442
+ var VERSION = true ? "0.20.1" : "0.0.0-dev";
22440
22443
  var PORT = Number(process.env.PORT ?? 8080);
22441
22444
  var HOST = process.env.HOST ?? "0.0.0.0";
22442
22445
  var sseSessions = /* @__PURE__ */ new Map();
@@ -1466,7 +1466,7 @@ var init_installer_gui = __esm({
1466
1466
  init_install_dxt();
1467
1467
  init_install_shared();
1468
1468
  init_oauth();
1469
- VERSION = "0.20.0";
1469
+ VERSION = "0.20.1";
1470
1470
  PORT = Number(process.env.LEADBAY_INSTALLER_PORT ?? 0);
1471
1471
  sessions = /* @__PURE__ */ new Map();
1472
1472
  OAUTH_BASE_URLS = {
@@ -873,7 +873,7 @@ async function oauthLogin(opts) {
873
873
  }
874
874
 
875
875
  // installer/installer-gui.ts
876
- var VERSION = "0.20.0";
876
+ var VERSION = "0.20.1";
877
877
  var PORT = Number(process.env.LEADBAY_INSTALLER_PORT ?? 0);
878
878
  var sessions = /* @__PURE__ */ new Map();
879
879
  var OAUTH_BASE_URLS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leadbay/mcp",
3
- "version": "0.20.0",
3
+ "version": "0.20.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",