From 59b7cbdc6e9df3d16bfbb40371c8b6e9beed0730 Mon Sep 17 00:00:00 2001 From: Ilyaas Kapadia <86218345+IlyaasK@users.noreply.github.com> Date: Fri, 29 May 2026 11:10:59 -0400 Subject: [PATCH 1/2] Update Kernel SDK compatibility --- bun.lock | 4 ++-- package.json | 2 +- src/app/[transport]/route.ts | 14 +++++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/bun.lock b/bun.lock index f292c43..32f8101 100644 --- a/bun.lock +++ b/bun.lock @@ -10,7 +10,7 @@ "@clerk/themes": "^2.4.19", "@mcp-ui/server": "^5.10.0", "@modelcontextprotocol/sdk": "1.26.0", - "@onkernel/sdk": "^0.35.0", + "@onkernel/sdk": "^0.58.0", "@types/jsonwebtoken": "^9.0.10", "@types/redis": "^4.0.11", "builtin-modules": "^5.0.0", @@ -145,7 +145,7 @@ "@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@16.0.10", "", { "os": "win32", "cpu": "x64" }, "sha512-E+njfCoFLb01RAFEnGZn6ERoOqhK1Gl3Lfz1Kjnj0Ulfu7oJbuMyvBKNj/bw8XZnenHDASlygTjZICQW+rYW1Q=="], - "@onkernel/sdk": ["@onkernel/sdk@0.35.0", "", {}, "sha512-EnTEyTm85WwOOXZziDTySNHl46ZO+DSJjVDJDJNarwkD+kv623TzXDLpgH7vwy4LfQjQ4DzOQe0hHKgCYrAv5A=="], + "@onkernel/sdk": ["@onkernel/sdk@0.58.0", "", {}, "sha512-eJNydQ8WzZWq837EX+V2QMUhK4O8feVnj9EXZukOvOHXH9PfIr40IQXUxIZ1ic/s08witQ6hQmtlCqY7VeF2aQ=="], "@redis/bloom": ["@redis/bloom@5.6.0", "", { "peerDependencies": { "@redis/client": "^5.6.0" } }, "sha512-l13/d6BaZDJzogzZJEphIeZ8J0hpQpjkMiozomTm6nJiMNYkoPsNOBOOQua4QsG0fFjyPmLMDJFPAp5FBQtTXg=="], diff --git a/package.json b/package.json index 72027ff..dca4937 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@clerk/themes": "^2.4.19", "@mcp-ui/server": "^5.10.0", "@modelcontextprotocol/sdk": "1.26.0", - "@onkernel/sdk": "^0.35.0", + "@onkernel/sdk": "^0.58.0", "@types/jsonwebtoken": "^9.0.10", "@types/redis": "^4.0.11", "builtin-modules": "^5.0.0", diff --git a/src/app/[transport]/route.ts b/src/app/[transport]/route.ts index 74c5e19..e7e2a24 100644 --- a/src/app/[transport]/route.ts +++ b/src/app/[transport]/route.ts @@ -67,6 +67,14 @@ function createAuthErrorResponse( ); } +async function listProfiles(client: ReturnType) { + const profiles: Awaited>[] = []; + for await (const profile of client.profiles.list()) { + profiles.push(profile); + } + return profiles; +} + // Create MCP handler with tools const handler = createMcpHandler((server) => { // Register MCP resources @@ -80,7 +88,7 @@ const handler = createMcpHandler((server) => { if (uriString === "profiles://") { // List all profiles - const profiles = await client.profiles.list(); + const profiles = await listProfiles(client); return { contents: [ { @@ -915,7 +923,7 @@ Based on your issue "${issue_description}", start with: }, ], }; - const existingProfiles = await client.profiles.list(); + const existingProfiles = await listProfiles(client); const existingProfile = existingProfiles?.find( (p) => p.name === params.profile_name, ); @@ -973,7 +981,7 @@ Based on your issue "${issue_description}", start with: }; } case "list": { - const profiles = await client.profiles.list(); + const profiles = await listProfiles(client); return { content: [ { From 078dc8fb8d9db91805298e79984eb1c006f310dd Mon Sep 17 00:00:00 2001 From: Ilyaas Kapadia <86218345+IlyaasK@users.noreply.github.com> Date: Fri, 29 May 2026 11:27:40 -0400 Subject: [PATCH 2/2] Handle empty profile resource lists --- src/app/[transport]/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/[transport]/route.ts b/src/app/[transport]/route.ts index e7e2a24..00973fa 100644 --- a/src/app/[transport]/route.ts +++ b/src/app/[transport]/route.ts @@ -94,7 +94,7 @@ const handler = createMcpHandler((server) => { { uri: "profiles://", mimeType: "application/json", - text: profiles + text: profiles.length > 0 ? JSON.stringify(profiles, null, 2) : "No profiles found", },