gogcli-mcp-docs 2.30.0 → 4.0.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.
@@ -565,7 +565,7 @@ describe('gog_docs_comments_list', () => {
565
565
  });
566
566
 
567
567
  it('description states the extra fetch, the Docs scope, and that --tab drops orphans', async () => {
568
- const { McpServer } = await import('@modelcontextprotocol/sdk/server/mcp.js');
568
+ const { McpServer } = await import('@modelcontextprotocol/server');
569
569
  const server = new McpServer({ name: 'test', version: '0.0.0' });
570
570
  const configs = new Map<string, { description?: string }>();
571
571
  vi.spyOn(server, 'registerTool').mockImplementation((name, config) => {
@@ -796,7 +796,7 @@ describe('gog_docs_append', () => {
796
796
  it('description warns about all 3 known upstream markdown limitations', async () => {
797
797
  // Local mock to capture the registration config (the shared harness only
798
798
  // captures the handler callback).
799
- const { McpServer } = await import('@modelcontextprotocol/sdk/server/mcp.js');
799
+ const { McpServer } = await import('@modelcontextprotocol/server');
800
800
  const server = new McpServer({ name: 'test', version: '0.0.0' });
801
801
  const configs = new Map<string, { description?: string }>();
802
802
  vi.spyOn(server, 'registerTool').mockImplementation((name, config) => {
@@ -2262,15 +2262,10 @@ describe('server-side file params never advertise stdin as usable', () => {
2262
2262
  ];
2263
2263
 
2264
2264
  it.each(STDIN_PARAMS)('%s.%s warns that stdin hangs instead of offering it', async (tool, param) => {
2265
- const { McpServer } = await import('@modelcontextprotocol/sdk/server/mcp.js');
2266
- const server = new McpServer({ name: 'test', version: '0.0.0' });
2267
- const schemas = new Map<string, Record<string, { description?: string }>>();
2268
- vi.spyOn(server, 'registerTool').mockImplementation((name, config) => {
2269
- schemas.set(name, (config as { inputSchema: Record<string, { description?: string }> }).inputSchema);
2270
- return undefined as never;
2271
- });
2272
- registerExtraDocsTools(server);
2273
- const desc = schemas.get(tool)?.[param]?.description ?? '';
2265
+ const harness = await setupHandlers();
2266
+ const listed = (await harness.client.listTools()).tools.find((candidate) => candidate.name === tool);
2267
+ const properties = listed?.inputSchema.properties as Record<string, { description?: string }> | undefined;
2268
+ const desc = properties?.[param]?.description ?? '';
2274
2269
  expect(desc).not.toBe('');
2275
2270
  expect(desc).not.toMatch(/(?:use|or)\s+"?-"?\s*(?:for|to read)/i);
2276
2271
  expect(desc).toMatch(/stdin/i);
package/tsconfig.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "rootDir": "../"
6
6
  },
7
7
  "include": ["src/**/*", "../gogcli-mcp/src/**/*"],
8
- "exclude": ["node_modules", "dist", "../gogcli-mcp/src/worker.ts"]
8
+ "exclude": ["node_modules", "dist"]
9
9
  }