Skip to content

Commit 62adcb0

Browse files
committed
fix(deps): update AI SDK dependencies and fix type definitions in MCPToolWithExecute interface
1 parent 1004590 commit 62adcb0

File tree

5 files changed

+96
-112
lines changed

5 files changed

+96
-112
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@
7878
}
7979
},
8080
"dependencies": {
81-
"@ai-sdk/anthropic": "2.0.0-beta.5",
82-
"@ai-sdk/google": "2.0.0-beta.8",
83-
"@ai-sdk/openai": "2.0.0-beta.7",
84-
"@ai-sdk/react": "2.0.0-beta.16",
85-
"@ai-sdk/xai": "2.0.0-beta.4",
81+
"@ai-sdk/anthropic": "2.0.5",
82+
"@ai-sdk/google": "2.0.7",
83+
"@ai-sdk/openai": "2.0.18",
84+
"@ai-sdk/react": "2.0.20",
85+
"@ai-sdk/xai": "2.0.10",
8686
"@johnlindquist/open": "^10.1.1",
8787
"@modelcontextprotocol/sdk": "1.13.3",
8888
"@octokit/auth-oauth-device": "8.0.1",
@@ -102,7 +102,7 @@
102102
"acorn": "^8.15.0",
103103
"acorn-typescript": "^1.4.13",
104104
"advanced-calculator": "1.1.1",
105-
"ai": "5.0.0-beta.18",
105+
"ai": "5.0.20",
106106
"axios": "1.10.0",
107107
"body-parser": "^2.2.0",
108108
"bottleneck": "^2.19.5",

pnpm-lock.yaml

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

src/lib/ai.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ Please provide a helpful summary.`
940940
}
941941

942942
switch (part.type) {
943-
case 'text':
943+
case 'text-delta':
944944
fullResponseText += part.text;
945945
// Emit chunk event for observability
946946
aiObservability.emit('assistant:stream:chunk', { chunk: part.text });
@@ -1155,4 +1155,4 @@ export interface AiOptionsWithMCP extends AiOptions {
11551155
};
11561156
}
11571157

1158-
export { }
1158+
export { }

src/lib/mcp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type { Tool as MCPTool, CallToolResult as MCPToolResult } from '@modelcon
1616
// This type should only include properties that are compatible with AI SDK's Tool type
1717
export interface MCPToolWithExecute {
1818
description?: string;
19-
inputSchema?: any; // AI SDK v5 compatible schema (Zod schema or jsonSchema)
19+
inputSchema: any; // AI SDK v5 compatible schema (Zod schema or jsonSchema)
2020
execute: (args: any) => Promise<any>;
2121
// Explicitly exclude outputSchema and other MCP-specific properties from the interface
2222
}
@@ -416,4 +416,4 @@ global.mcp = lazyMCP;
416416
export { createMCPInstance };
417417

418418
// Export the assistant wrapper
419-
export { createMCPAssistant } from './mcp-assistant-wrapper.js';
419+
export { createMCPAssistant } from './mcp-assistant-wrapper.js';

src/target/path/path.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,19 @@ export const createPathChoices = async (
109109
return statCache.get(path)
110110
}
111111

112+
// Helper to get base path for a Dirent. Some Node versions expose
113+
// an undocumented `path` field on `Dirent`; types may not include it.
114+
const getDirentBasePath = (dirent: Dirent | any, fallback: string) =>
115+
typeof dirent?.path === 'string' ? (dirent.path as string) : fallback
116+
112117
// Process symlinks in parallel
113118
await Promise.all(
114119
dirents.map(async (dirent) => {
115120
if (dirent.isSymbolicLink()) {
116121
try {
117-
const resolved = await fs.promises.realpath(ogPath.resolve(dirent.path as string, dirent.name))
122+
const resolved = await fs.promises.realpath(
123+
ogPath.resolve(getDirentBasePath(dirent, startPath), dirent.name)
124+
)
118125
const stats = await getCachedStat(resolved)
119126

120127
Object.assign(dirent, {
@@ -144,7 +151,10 @@ export const createPathChoices = async (
144151

145152
const mapDirents = async (dirents: Dirent[]): Promise<Choice[]> => {
146153
const choices = await Promise.all(dirents.map(async (dirent) => {
147-
const fullPath = ogPath.resolve(dirent.path as string, dirent.name)
154+
const fullPath = ogPath.resolve(
155+
getDirentBasePath(dirent, startPath),
156+
dirent.name
157+
)
148158
const { size, mtime } = await getCachedStat(fullPath)
149159

150160
const type = folderSet.has(dirent.name) ? 'folder' : 'file'
@@ -670,4 +680,4 @@ global.path = new Proxy(__pathSelector, {
670680
}
671681
}) as any
672682

673-
export const path = global.path
683+
export const path = global.path

0 commit comments

Comments
 (0)