Skip to content

Commit b73bd7c

Browse files
committed
fix: resolve TypeScript type error for agent property in fetch
- Use spread operator with type assertion for Node.js-specific agent property - Ensures compatibility with standard RequestInit type while allowing HTTPS agent
1 parent a158c21 commit b73bd7c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/mcp/McpHub.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,10 +859,11 @@ export class McpHub {
859859
// Custom fetch function that includes the HTTPS agent
860860
reconnectingEventSourceOptions.fetch = (url: string | URL, init: RequestInit) => {
861861
const headers = new Headers({ ...(init?.headers || {}), ...(configInjected.headers || {}) })
862+
// Use type assertion for Node.js-specific agent property
862863
return fetch(url, {
863864
...init,
864865
headers,
865-
agent: agent as any,
866+
...({ agent } as any),
866867
})
867868
}
868869
}

0 commit comments

Comments
 (0)