Skip MCP era probe for Bailian-compatible connect.

Omit Client versionNegotiation so the SDK stays on legacy initialize; Bailian answers the 2026 server/discover probe with HTTP 500 and never reaches search.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-10-10 15:10:46 +08:00
parent 4b4a1e4460
commit ada788a236
3 changed files with 11 additions and 5 deletions

View file

@ -12,7 +12,7 @@ test('package exports resolve and peerDependencies stay open', async () => {
assert.equal(pkg.exports['.'], './lib/index.js')
assert.equal(pkg.exports['./client'], './lib/client.browser.js')
assert.equal(pkg.engines.node, '>=20')
assert.equal(pkg.version, '0.2.41')
assert.equal(pkg.version, '0.2.42')
assert.equal(pkg.dsh.client.immediately, false)
assert.equal(pkg.dependencies['@modelcontextprotocol/client'], '2.0.0')
assert.ok(!Object.hasOwn(pkg.dependencies, '@modelcontextprotocol/sdk'))
@ -99,7 +99,10 @@ test('HTTP transport inherits DSH proxy with env fallback and pins DNS on direct
assert.match(transport, /parseHttpEndpoint/)
assert.match(transport, /validateHttpEndpoint\(server\.url, \{ signal \}\)/)
assert.match(transport, /redirect: 'error'/)
assert.match(transport, /versionNegotiation:\s*\{\s*mode:\s*['"]auto['"]/)
// Bailian rejects the MCP 2026 era probe (HTTP 500); keep Client options
// at legacy default (capabilities only — no negotiation field).
assert.match(transport, /\{\s*capabilities:\s*\{\s*\}\s*\}/)
assert.doesNotMatch(transport, /mode:\s*['"]auto['"]/)
})
test('bundle inserts search-mcp without pinning web.searchProvider (Desktop 0.2 boot-safe)', async () => {