Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- run: npm ci
- run: npm run check
- run: npm run build
- run: npm run test:client-smoke
- run: npm test

publish:
Expand Down
98 changes: 0 additions & 98 deletions examples/clients/typescript/elicitation-defaults-test.ts

This file was deleted.

49 changes: 47 additions & 2 deletions examples/clients/typescript/everything-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,46 @@ registerScenarios(
issValidationClient
);

// ============================================================================
// SSE retry scenario
// ============================================================================

async function runSSERetryClient(serverUrl: string): Promise<void> {
const client = new Client(
{ name: 'sse-retry-test-client', version: '1.0.0' },
{ capabilities: {} }
);

const transport = new StreamableHTTPClientTransport(new URL(serverUrl));

await client.connect(transport);
logger.debug('Successfully connected to MCP server');

const tools = await client.listTools();
logger.debug(
'Available tools:',
tools.tools.map((t) => t.name)
);

const testTool = tools.tools.find((t) => t.name === 'test_reconnection');
if (!testTool) {
throw new Error('Test tool not found: test_reconnection');
}

logger.debug('Calling test_reconnection tool...');
const result = await client.callTool({
name: 'test_reconnection',
arguments: {}
});

logger.debug('Tool result:', JSON.stringify(result, null, 2));

await transport.close();
logger.debug('Connection closed successfully');
}

registerScenario('sse-retry', runSSERetryClient);

// ============================================================================
// Elicitation defaults scenario
// ============================================================================
Expand All @@ -491,7 +531,9 @@ async function runElicitationDefaultsClient(serverUrl: string): Promise<void> {
{
capabilities: {
elicitation: {
applyDefaults: true
form: {
applyDefaults: true
}
}
}
}
Expand Down Expand Up @@ -545,7 +587,10 @@ async function runElicitationDefaultsClient(serverUrl: string): Promise<void> {
logger.debug('Connection closed successfully');
}

registerScenario('elicitation-defaults', runElicitationDefaultsClient);
registerScenario(
'elicitation-sep1034-client-defaults',
runElicitationDefaultsClient
);

// ============================================================================
// Client Credentials scenarios
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"scripts": {
"start": "tsx src/index.ts",
"test": "vitest run",
"test:client-smoke": "node dist/index.js client --command \"npx tsx examples/clients/typescript/everything-client.ts\" --suite core --timeout 60000",
"test:watch": "vitest",
"build": "tsdown src/index.ts --minify --clean --target node20 --no-fixed-extension",
"lint": "eslint src/ examples/ && prettier --check .",
Expand Down