Skip to content

Commit 771d8e9

Browse files
committed
lint
1 parent dec9c29 commit 771d8e9

File tree

2 files changed

+26
-25
lines changed

2 files changed

+26
-25
lines changed

src/utils/tools-loader.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export async function loadToolsFromInput(
107107
} // else: selectors provided but none are actors => do not load defaults
108108

109109
// Compose final tool list
110-
let result: ToolEntry[] = [];
110+
const result: ToolEntry[] = [];
111111

112112
// Internal tools
113113
if (selectorsProvided) {
@@ -144,13 +144,13 @@ export async function loadToolsFromInput(
144144
// TEMP: for now we disable this swapping logic as the add-actor tool was misbehaving in some clients
145145
// Handle client capabilities logic for 'actors' category to swap call-actor for add-actor
146146
// if client supports dynamic tools.
147-
//const selectorContainsCallActor = selectors?.some((s) => s === HelperTools.ACTOR_CALL);
148-
//if (doesMcpClientSupportDynamicTools(initializeRequestData) && hasCallActor && !selectorContainsCallActor) {
147+
// const selectorContainsCallActor = selectors?.some((s) => s === HelperTools.ACTOR_CALL);
148+
// if (doesMcpClientSupportDynamicTools(initializeRequestData) && hasCallActor && !selectorContainsCallActor) {
149149
// // Remove call-actor
150150
// result = result.filter((entry) => entry.tool.name !== HelperTools.ACTOR_CALL);
151151
// // Replace with add-actor if not already present
152152
// if (!hasAddActorTool) result.push(addTool);
153-
//}
153+
// }
154154

155155
// De-duplicate by tool name for safety
156156
const seen = new Set<string>();

tests/integration/suite.ts

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -979,27 +979,28 @@ export function createIntegrationTestsSuite(
979979
expect(tools.tools.length).toBeGreaterThan(0);
980980
});
981981

982-
// TEMP: this logic is currently disabled, see src/utils/tools-loader.ts
983-
//it.runIf(options.transport === 'streamable-http')('should swap call-actor for add-actor when client supports dynamic tools', async () => {
984-
// client = await createClientFn({ clientName: 'Visual Studio Code', tools: ['actors'] });
985-
// const names = getToolNames(await client.listTools());
986-
987-
// // should not contain call-actor but should contain add-actor
988-
// expect(names).not.toContain('call-actor');
989-
// expect(names).toContain('add-actor');
990-
991-
// await client.close();
992-
//});
993-
//it.runIf(options.transport === 'streamable-http')(`should swap call-actor for add-actor when client supports dynamic tools for default tools`, async () => {
994-
// client = await createClientFn({ clientName: 'Visual Studio Code' });
995-
// const names = getToolNames(await client.listTools());
996-
997-
// // should not contain call-actor but should contain add-actor
998-
// expect(names).not.toContain('call-actor');
999-
// expect(names).toContain('add-actor');
1000-
1001-
// await client.close();
1002-
//});
982+
// TEMP: this logic is currently disabled, see src/utils/tools-loader.ts
983+
// it.runIf(options.transport === 'streamable-http')('should swap call-actor for add-actor when client supports dynamic tools', async () => {
984+
// client = await createClientFn({ clientName: 'Visual Studio Code', tools: ['actors'] });
985+
// const names = getToolNames(await client.listTools());
986+
987+
// // should not contain call-actor but should contain add-actor
988+
// expect(names).not.toContain('call-actor');
989+
// expect(names).toContain('add-actor');
990+
991+
// await client.close();
992+
// });
993+
// it.runIf(options.transport === 'streamable-http')(
994+
// `should swap call-actor for add-actor when client supports dynamic tools for default tools`, async () => {
995+
// client = await createClientFn({ clientName: 'Visual Studio Code' });
996+
// const names = getToolNames(await client.listTools());
997+
998+
// // should not contain call-actor but should contain add-actor
999+
// expect(names).not.toContain('call-actor');
1000+
// expect(names).toContain('add-actor');
1001+
1002+
// await client.close();
1003+
// });
10031004
it.runIf(options.transport === 'streamable-http')('should NOT swap call-actor for add-actor even when client supports dynamic tools', async () => {
10041005
client = await createClientFn({ clientName: 'Visual Studio Code', tools: ['actors'] });
10051006
const names = getToolNames(await client.listTools());

0 commit comments

Comments
 (0)