@leadbay/mcp 0.33.3 → 0.34.0

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,94 @@
1
1
  # Changelog — @leadbay/mcp
2
2
 
3
+ ## 0.34.0 — 2026-09-02
4
+
5
+ The OpenAI app directory rejects an app that sells digital goods — "plugins may
6
+ conduct commerce only for physical goods. Selling digital products or services
7
+ — including subscriptions, digital content, tokens, or credits — is not
8
+ allowed" — and separately forbids promoting the purchase: a plugin "must not
9
+ display subscription plans, initiate new subscriptions, or promote upgrades" or
10
+ "link directly to a checkout". Signing in to an existing paid account and using
11
+ what it entitles you to IS allowed. Anthropic's Software Directory Policy has
12
+ no equivalent clause; its nearest rule bars software that "executes financial
13
+ transactions on behalf of users", which our Stripe-URL handoff does not do.
14
+
15
+ `POST /chatgpt/mcp` is the URL submitted to OpenAI. Same Hono app, same auth,
16
+ same handler, built with `includeCommerce: false`. Four things go away
17
+ together — the tools, and every text that would promote buying them, since
18
+ removing only the tools left the agent still pushing a top-up it could no
19
+ longer produce:
20
+
21
+ - `leadbay_create_topup_link` and `leadbay_open_billing_portal` are not
22
+ registered (filtered after the catalogue arrays merge — both appear in
23
+ `compositeReadTools` and `granularReadTools`).
24
+ - Tool descriptions lose their `{{commerce}}` blocks
25
+ (`NO_COMMERCE_TOOL_DESCRIPTIONS`, emitted by promptforge).
26
+ - The `QUOTA_TOPUP` instruction paragraph is not pushed. `quota-topup.md` was
27
+ split verbatim: the selling paragraph is gated, and the neutral one that says
28
+ when to re-render the quota gauge became `quota-refresh.md`, pushed on both.
29
+ - `LeadbayClient.commerce` drops the two selling sentences from the
30
+ QUOTA_EXCEEDED hint ("OR top up AI credits…", "…or direct them to
31
+ app.leadbay.ai → Billing"). One client per session on hosted, so the flag
32
+ cannot leak across tenants.
33
+
34
+ Nothing is reworded for ChatGPT. `{{commerce}}` only ever DELETES — there is no
35
+ second, softened wording anywhere to drift out of sync, and the Claude surface
36
+ keeps selling exactly as hard as before. Enforced two ways:
37
+ `commerce-gate.test.ts` asserts the gated description and instruction strings
38
+ are pure character-level *subsequences* of the Claude ones (any reworded
39
+ character fails), and the generated descriptions were diffed against `main` to
40
+ confirm the default rendering did not move by a byte.
41
+
42
+ A path rather than an `initialize` clientInfo sniff, and rather than a query
43
+ parameter: the OAuth protected-resource identifier IS the path
44
+ (`/.well-known/oauth-protected-resource/chatgpt/mcp` → `resource:
45
+ https://mcp.leadbay.app/chatgpt/mcp`). A `?commerce=off` flag would leave both
46
+ URLs advertising the same resource, so a client reconnecting to the audience it
47
+ registered would get the selling tools back. RFC 8707 also says a resource URI
48
+ should carry no query component.
49
+
50
+ `RESOURCE_PATHS` gains the path so OAuth discovery resolves for it, and the
51
+ installer's ChatGPT Desktop entry now hands out `HOSTED_MCP_URL_CHATGPT`.
52
+
53
+ ## 0.33.4 — 2026-09-02
54
+
55
+ `leadbay_enrich_contacts` moves from `granularWriteTools` to
56
+ `compositeWriteTools` (product#4050).
57
+
58
+ It is the only tool that enriches ONE chosen person — `leadId` + `contactId`,
59
+ paid-candidate path first, org-contact path on `NOT_FOUND` — but it sat behind
60
+ `LEADBAY_MCP_ADVANCED=1`, which hosted never sets. No granular tool has been
61
+ called from a hosted IP in 30 days. The daily check-in prompt and the pull-leads
62
+ NEXT STEPS table already told the agent to call it, so on hosted they named a
63
+ tool that was not registered. `zoe+dogfood@leadbay.ai`'s scheduled agent
64
+ reached for `leadbay_pin_contact` instead (41 `contact not found` over 12 days;
65
+ see 0.33.3). Same registration pattern as add/remove/pin/unpin/update_contact
66
+ and set_lead_status: granular-shaped, lives in `tools/`, default write surface,
67
+ still hidden by `LEADBAY_MCP_WRITE=0`. Not in `COMPOSITE_FILE_TOOL_NAMES`, so
68
+ `_triggered_by` stays optional.
69
+
70
+ What moved with it, so the tool works on the surface it now lands on:
71
+
72
+ - **The result hint names a read that exists there.** It said "re-check
73
+ `leadbay_get_contacts`", which is advanced-only. It now says re-read the
74
+ lead's contacts via `leadbay_research_lead_by_id` (or `get_contacts` where
75
+ exposed).
76
+ - **The description carries routing.** `routing` + `rendering_hint`
77
+ frontmatter, added to `TOOLS_WITH_ROUTING`; the `prefer_when` states that a
78
+ `source:"paid"` candidate id from `research_lead_by_id` is valid input and
79
+ that pinning does not enrich anyone. Cross-routes to `enrich_titles`
80
+ (by title, many leads), `pin_contact`, `prepare_outreach`.
81
+ - **The pin/unpin 404 hint and `heuristics/pinnable-contacts` name it** as the
82
+ direct route alongside `enrich_titles` and `add_contact`. `enrich_titles`'s
83
+ WHEN NOT TO USE drops the "(granular)" label.
84
+
85
+ Tests: `packages/mcp/test/enrich-contacts-default-surface.test.ts` drives the
86
+ real MCP `tools/list` — present with `includeWrite:true, includeAdvanced:false`,
87
+ absent with `includeWrite:false`, and every `leadbay_*` the description and
88
+ the call hint name is itself registered on that surface.
89
+ `packages/core/test/unit/tools/pin-contact-hint-names-enrich-contacts.test.ts`
90
+ pins the hint.
91
+
3
92
  ## 0.33.3 — 2026-09-02
4
93
 
5
94
  `leadbay_pin_contact` failed 43 of its 48 production calls.
package/README.md CHANGED
@@ -634,7 +634,7 @@ Use `dry_run: true` to validate domain formatting and wizard reachability withou
634
634
 
635
635
  - Tokens live only in your MCP client's config file — they never traverse the network except to `api-{region}.leadbay.app`.
636
636
  - The `leadbay_login` tool from the OpenClaw adapter is **not** registered on MCP: exposing a credential-taking tool to an LLM is a prompt-injection risk. Use the token path above.
637
- - The `leadbay_add_note` tool is a write action flagged `optional: true`. If your client supports per-tool opt-in, leave it disabled until you need it. `leadbay_enrich_contacts` is a granular tool exposed only when `LEADBAY_MCP_ADVANCED=1`.
637
+ - The `leadbay_add_note` tool is a write action flagged `optional: true`. If your client supports per-tool opt-in, leave it disabled until you need it. `leadbay_enrich_contacts` (enrich one named contact) is on the default write surface since 0.33.4; it was advanced-only before.
638
638
 
639
639
  ### Privacy & telemetry
640
640