fix(sequentialthinking): read server version from package.json (#4576)
* fix(sequentialthinking): read server version from package.json Replace the hardcoded 0.2.0 so initialize serverInfo tracks the package version (0.6.2 in-tree; CalVer after release), matching the approach used for memory server version sync. Skip the dist-layout assertion when dist/ is absent so CI's test-before-build job (and local runs without prepare) still pass. * test(sequentialthinking): smoke stdio initialize serverInfo.version Spawn the built server over stdio and assert getServerVersion() matches package.json (and is not the old hardcoded 0.2.0). Skip when dist/ is absent so test-before-build CI still passes.
This commit is contained in:
parent
11845d51cb
commit
40a8de87ed
1 changed files with 92 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|||
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
||||
import { z } from "zod";
|
||||
import { SequentialThinkingServer } from './lib.js';
|
||||
import { SERVER_VERSION } from './version.js';
|
||||
|
||||
/** Safe boolean coercion that correctly handles string "false" */
|
||||
const coercedBoolean = z.preprocess((val) => {
|
||||
|
|
@ -17,7 +18,7 @@ const coercedBoolean = z.preprocess((val) => {
|
|||
|
||||
const server = new McpServer({
|
||||
name: "sequential-thinking-server",
|
||||
version: "0.2.0",
|
||||
version: SERVER_VERSION,
|
||||
});
|
||||
|
||||
const thinkingServer = new SequentialThinkingServer();
|
||||
|
|
|
|||
Loading…
Reference in a new issue