Skip to content

Commit 59b7cbd

Browse files
committed
Update Kernel SDK compatibility
1 parent 74f8ac7 commit 59b7cbd

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@clerk/themes": "^2.4.19",
3535
"@mcp-ui/server": "^5.10.0",
3636
"@modelcontextprotocol/sdk": "1.26.0",
37-
"@onkernel/sdk": "^0.35.0",
37+
"@onkernel/sdk": "^0.58.0",
3838
"@types/jsonwebtoken": "^9.0.10",
3939
"@types/redis": "^4.0.11",
4040
"builtin-modules": "^5.0.0",

src/app/[transport]/route.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ function createAuthErrorResponse(
6767
);
6868
}
6969

70+
async function listProfiles(client: ReturnType<typeof createKernelClient>) {
71+
const profiles: Awaited<ReturnType<typeof client.profiles.retrieve>>[] = [];
72+
for await (const profile of client.profiles.list()) {
73+
profiles.push(profile);
74+
}
75+
return profiles;
76+
}
77+
7078
// Create MCP handler with tools
7179
const handler = createMcpHandler((server) => {
7280
// Register MCP resources
@@ -80,7 +88,7 @@ const handler = createMcpHandler((server) => {
8088

8189
if (uriString === "profiles://") {
8290
// List all profiles
83-
const profiles = await client.profiles.list();
91+
const profiles = await listProfiles(client);
8492
return {
8593
contents: [
8694
{
@@ -915,7 +923,7 @@ Based on your issue "${issue_description}", start with:
915923
},
916924
],
917925
};
918-
const existingProfiles = await client.profiles.list();
926+
const existingProfiles = await listProfiles(client);
919927
const existingProfile = existingProfiles?.find(
920928
(p) => p.name === params.profile_name,
921929
);
@@ -973,7 +981,7 @@ Based on your issue "${issue_description}", start with:
973981
};
974982
}
975983
case "list": {
976-
const profiles = await client.profiles.list();
984+
const profiles = await listProfiles(client);
977985
return {
978986
content: [
979987
{

0 commit comments

Comments
 (0)