I tried the following code, but I get a compile error.
import { MastraClient } from '@mastra/client-js';import { RuntimeContext } from '@mastra/core/runtime-context';export const mastraClient = new MastraClient({ baseUrl: 'http://localhost:4111',});const weatherAgent = mastraClient.getAgent('weatherAgent');const runtimeContext = new RuntimeContext<{ project: { id: string; apiKey: string; };}>();runtimeContext.set('project', { id: '123', apiKey: '123',});const result = await weatherAgent.generate({ messages: [{ role: 'user', content: 'What is the weather in Tokyo?' }], runtimeContext, // Type 'RuntimeContext<{ project: { id: string; apiKey: string; }; }>' is not assignable to type 'RuntimeContext<unknown>'. // Types have separate declarations of a private property 'registry'.ts(2322)});
import { MastraClient } from '@mastra/client-js';import { RuntimeContext } from '@mastra/core/runtime-context';export const mastraClient = new MastraClient({ baseUrl: 'http://localhost:4111',});const weatherAgent = mastraClient.getAgent('weatherAgent');const runtimeContext = new RuntimeContext<{ project: { id: string; apiKey: string; };}>();runtimeContext.set('project', { id: '123', apiKey: '123',});const result = await weatherAgent.generate({ messages: [{ role: 'user', content: 'What is the weather in Tokyo?' }], runtimeContext, // Type 'RuntimeContext<{ project: { id: string; apiKey: string; }; }>' is not assignable to type 'RuntimeContext<unknown>'. // Types have separate declarations of a private property 'registry'.ts(2322)});