pull/715/head
Travis Fischer 2025-06-09 01:50:35 +07:00
rodzic 2f22119876
commit 74b238593d
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -12,7 +12,7 @@ export type DurableMcpClientInfo = {
}
// TODO: not sure if there's a better way to handle re-using client connections
// across requests.
// across requests. Maybe we use one DurableObject per customer<>originUrl connection?
export class DurableMcpClient extends DurableObject<RawEnv> {
protected client?: McpClient
@ -75,9 +75,9 @@ export class DurableMcpClient extends DurableObject<RawEnv> {
arguments: args
})
// TODO: The `McpToolCallResponse` type is too complex for the CF
// TODO: The `McpToolCallResponse` type is seemingly too complex for the CF
// serialization type inference to handle, so bypass it by serializing to
// a string and parse on the other end.
// a string and parsing it on the other end.
return JSON.stringify(toolCallResponse)
}
}

Wyświetl plik

@ -228,6 +228,8 @@ export async function resolveOriginRequest(
updateOriginRequest(originRequest, { consumer, deployment })
}
assert(ctx.get('sessionId'), 500, 'Internal error: sessionId should be set')
return {
deployment,
consumer,