Skip to content

Commit 6050aa9

Browse files
committed
lint
1 parent eeda5d6 commit 6050aa9

File tree

4 files changed

+13
-264
lines changed

4 files changed

+13
-264
lines changed

src/examples/client/multipleClientsParallel.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
CallToolRequest,
55
CallToolResultSchema,
66
LoggingMessageNotificationSchema,
7+
CallToolResult,
78
} from '../../types.js';
89

910
/**
@@ -23,12 +24,12 @@ interface ClientConfig {
2324
id: string;
2425
name: string;
2526
toolName: string;
26-
toolArguments: Record<string, any>;
27+
toolArguments: Record<string, string | number | boolean>;
2728
}
2829

29-
async function createAndRunClient(config: ClientConfig): Promise<{ id: string; result: any }> {
30+
async function createAndRunClient(config: ClientConfig): Promise<{ id: string; result: CallToolResult }> {
3031
console.log(`[${config.id}] Creating client: ${config.name}`);
31-
32+
3233
const client = new Client({
3334
name: config.name,
3435
version: '1.0.0'
@@ -101,7 +102,7 @@ async function main(): Promise<void> {
101102
}
102103
},
103104
{
104-
id: 'client2',
105+
id: 'client2',
105106
name: 'basic-client-2',
106107
toolName: 'start-notification-stream',
107108
toolArguments: {

src/examples/client/parallelToolCallsClient.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { StreamableHTTPClientTransport } from '../../client/streamableHttp.js';
33
import {
44
ListToolsRequest,
55
ListToolsResultSchema,
6-
CallToolRequest,
76
CallToolResultSchema,
87
LoggingMessageNotificationSchema,
8+
CallToolResult,
99
} from '../../types.js';
1010

1111
/**
@@ -57,11 +57,11 @@ async function main(): Promise<void> {
5757
// 2. Start multiple notification tools in parallel
5858
console.log('\n=== Starting Multiple Notification Streams in Parallel ===');
5959
const toolResults = await startParallelNotificationTools(client);
60-
60+
6161
// Log the results from each tool call
6262
for (const [caller, result] of Object.entries(toolResults)) {
6363
console.log(`\n=== Tool result for ${caller} ===`);
64-
result.content.forEach((item: { type: string; text: any; }) => {
64+
result.content.forEach((item: { type: string; text?: string; }) => {
6565
if (item.type === 'text') {
6666
console.log(` ${item.text}`);
6767
} else {
@@ -113,7 +113,7 @@ async function listTools(client: Client): Promise<void> {
113113
* Start multiple notification tools in parallel with different configurations
114114
* Each tool call includes a caller parameter to identify its notifications
115115
*/
116-
async function startParallelNotificationTools(client: Client): Promise<Record<string, any>> {
116+
async function startParallelNotificationTools(client: Client): Promise<Record<string, CallToolResult>> {
117117
try {
118118
// Define multiple tool calls with different configurations
119119
const toolCalls = [
@@ -162,7 +162,7 @@ async function startParallelNotificationTools(client: Client): Promise<Record<st
162162
];
163163

164164
console.log(`Starting ${toolCalls.length} notification tools in parallel...`);
165-
165+
166166
// Start all tool calls in parallel
167167
const toolPromises = toolCalls.map(({ caller, request }) => {
168168
console.log(`Starting tool call for ${caller}...`);
@@ -176,9 +176,9 @@ async function startParallelNotificationTools(client: Client): Promise<Record<st
176176

177177
// Wait for all tool calls to complete
178178
const results = await Promise.all(toolPromises);
179-
179+
180180
// Organize results by caller
181-
const resultsByTool: Record<string, any> = {};
181+
const resultsByTool: Record<string, CallToolResult> = {};
182182
results.forEach(({ caller, result }) => {
183183
resultsByTool[caller] = result;
184184
});

src/integration-tests/streamableHttpBatchMessages.test.ts

Lines changed: 0 additions & 252 deletions
This file was deleted.

src/server/streamableHttp.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ describe("StreamableHTTPServerTransport", () => {
288288
});
289289
});
290290

291-
it.only("should reject requests without a valid session ID", async () => {
291+
it("should reject requests without a valid session ID", async () => {
292292
const response = await sendPostRequest(baseUrl, TEST_MESSAGES.toolsList);
293293

294294
expect(response.status).toBe(400);

0 commit comments

Comments
 (0)