@leadbay/mcp 0.33.4 → 0.34.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 +88 -0
- package/dist/bin.js +418 -19
- package/dist/http-server.js +427 -19
- package/dist/installer-electron.js +5 -4
- package/dist/installer-gui.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,93 @@
|
|
|
1
1
|
# Changelog — @leadbay/mcp
|
|
2
2
|
|
|
3
|
+
## 0.34.1 — 2026-09-07
|
|
4
|
+
|
|
5
|
+
`leadbay_set_lead_status` threw `TypeError: (params.lead_ids ?? []).filter is
|
|
6
|
+
not a function` five times in 29 s on the hosted route (product#4079, Sentry
|
|
7
|
+
MCP-3T): a scheduled agent passed `lead_ids` as something other than an array.
|
|
8
|
+
The same class hit `leadbay_new_lens` on 2026-08-04 (`texts.filter is not a
|
|
9
|
+
function`, `locations` as a string, MCP-3B). Both times the agent retried the
|
|
10
|
+
identical call four or five times, because a raw TypeError names no argument.
|
|
11
|
+
|
|
12
|
+
The CallTool handler in `server.ts` never checked `inputSchema` before
|
|
13
|
+
`tool.execute`; its own comment said enforcement was ours, and it only enforced
|
|
14
|
+
`_triggered_by`. 32 tools declare a top-level `array` or `object` parameter and
|
|
15
|
+
none of them defended against a string: four threw, two silently corrupted
|
|
16
|
+
(`adjust_audience` spread `"tech"` into `["t","e","c","h"]`), the rest forwarded
|
|
17
|
+
the string to the backend.
|
|
18
|
+
|
|
19
|
+
One guard now runs before `execute`, after the `LAST_PROMPT_REQUIRED` check
|
|
20
|
+
(`findShapeMismatch`): for each top-level schema property whose `type` is
|
|
21
|
+
`array` or `object`, a present non-null argument of the wrong JSON shape returns
|
|
22
|
+
`BAD_INPUT` naming the field, the expected shape and the received type
|
|
23
|
+
(`lead_ids must be a JSON array (got string)`), through the same envelope branch
|
|
24
|
+
a tool's own `BAD_INPUT` takes. So PostHog sees `ok:false error_code:BAD_INPUT`
|
|
25
|
+
and Sentry groups the event with the tool's existing `BAD_INPUT` issue
|
|
26
|
+
(`source:business`) instead of a `source:unexpected` stack fingerprint.
|
|
27
|
+
|
|
28
|
+
Deliberately not done: no coercion of a bare string into a one-element array (a
|
|
29
|
+
JSON-stringified array would become one bogus id and fail per lead inside
|
|
30
|
+
`failed[]`); no scalar checks (hosts send `"20"` for a number and tools coerce);
|
|
31
|
+
no `required`, `items`, nested or `additionalProperties` validation; no runtime
|
|
32
|
+
dependency. `null` counts as absent. One visible change on an existing tool:
|
|
33
|
+
`leadbay_report_outreach` with `verification` given as a string answered
|
|
34
|
+
`VERIFICATION_REQUIRED`; it now answers `BAD_INPUT … must be a JSON object (got
|
|
35
|
+
string)`. Tools executed directly outside the MCP server (OpenClaw consumes
|
|
36
|
+
`@leadbay/core` without `buildServer`) keep the raw throw.
|
|
37
|
+
|
|
38
|
+
Test: `packages/mcp/test/unit/input-shape-guard.test.ts` drives `tools/call`
|
|
39
|
+
through `buildServer` with the incident shapes.
|
|
40
|
+
|
|
41
|
+
## 0.34.0 — 2026-09-02
|
|
42
|
+
|
|
43
|
+
The OpenAI app directory rejects an app that sells digital goods — "plugins may
|
|
44
|
+
conduct commerce only for physical goods. Selling digital products or services
|
|
45
|
+
— including subscriptions, digital content, tokens, or credits — is not
|
|
46
|
+
allowed" — and separately forbids promoting the purchase: a plugin "must not
|
|
47
|
+
display subscription plans, initiate new subscriptions, or promote upgrades" or
|
|
48
|
+
"link directly to a checkout". Signing in to an existing paid account and using
|
|
49
|
+
what it entitles you to IS allowed. Anthropic's Software Directory Policy has
|
|
50
|
+
no equivalent clause; its nearest rule bars software that "executes financial
|
|
51
|
+
transactions on behalf of users", which our Stripe-URL handoff does not do.
|
|
52
|
+
|
|
53
|
+
`POST /chatgpt/mcp` is the URL submitted to OpenAI. Same Hono app, same auth,
|
|
54
|
+
same handler, built with `includeCommerce: false`. Four things go away
|
|
55
|
+
together — the tools, and every text that would promote buying them, since
|
|
56
|
+
removing only the tools left the agent still pushing a top-up it could no
|
|
57
|
+
longer produce:
|
|
58
|
+
|
|
59
|
+
- `leadbay_create_topup_link` and `leadbay_open_billing_portal` are not
|
|
60
|
+
registered (filtered after the catalogue arrays merge — both appear in
|
|
61
|
+
`compositeReadTools` and `granularReadTools`).
|
|
62
|
+
- Tool descriptions lose their `{{commerce}}` blocks
|
|
63
|
+
(`NO_COMMERCE_TOOL_DESCRIPTIONS`, emitted by promptforge).
|
|
64
|
+
- The `QUOTA_TOPUP` instruction paragraph is not pushed. `quota-topup.md` was
|
|
65
|
+
split verbatim: the selling paragraph is gated, and the neutral one that says
|
|
66
|
+
when to re-render the quota gauge became `quota-refresh.md`, pushed on both.
|
|
67
|
+
- `LeadbayClient.commerce` drops the two selling sentences from the
|
|
68
|
+
QUOTA_EXCEEDED hint ("OR top up AI credits…", "…or direct them to
|
|
69
|
+
app.leadbay.ai → Billing"). One client per session on hosted, so the flag
|
|
70
|
+
cannot leak across tenants.
|
|
71
|
+
|
|
72
|
+
Nothing is reworded for ChatGPT. `{{commerce}}` only ever DELETES — there is no
|
|
73
|
+
second, softened wording anywhere to drift out of sync, and the Claude surface
|
|
74
|
+
keeps selling exactly as hard as before. Enforced two ways:
|
|
75
|
+
`commerce-gate.test.ts` asserts the gated description and instruction strings
|
|
76
|
+
are pure character-level *subsequences* of the Claude ones (any reworded
|
|
77
|
+
character fails), and the generated descriptions were diffed against `main` to
|
|
78
|
+
confirm the default rendering did not move by a byte.
|
|
79
|
+
|
|
80
|
+
A path rather than an `initialize` clientInfo sniff, and rather than a query
|
|
81
|
+
parameter: the OAuth protected-resource identifier IS the path
|
|
82
|
+
(`/.well-known/oauth-protected-resource/chatgpt/mcp` → `resource:
|
|
83
|
+
https://mcp.leadbay.app/chatgpt/mcp`). A `?commerce=off` flag would leave both
|
|
84
|
+
URLs advertising the same resource, so a client reconnecting to the audience it
|
|
85
|
+
registered would get the selling tools back. RFC 8707 also says a resource URI
|
|
86
|
+
should carry no query component.
|
|
87
|
+
|
|
88
|
+
`RESOURCE_PATHS` gains the path so OAuth discovery resolves for it, and the
|
|
89
|
+
installer's ChatGPT Desktop entry now hands out `HOSTED_MCP_URL_CHATGPT`.
|
|
90
|
+
|
|
3
91
|
## 0.33.4 — 2026-09-02
|
|
4
92
|
|
|
5
93
|
`leadbay_enrich_contacts` moves from `granularWriteTools` to
|