You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, when someone want to create a new service, they must add new type as string to enum ServiceType in packages/core/src/types.
Describe the solution you'd like
I want to add new service type in my new plugin without modify enum ServiceType in package core. In some case they import packages/cores from node-modules, so they can not edit that enum
Describe alternatives you've considered
May be remove that enum, so that getService function in packages/core/src/runtime.ts we can use
hi @fibonacci998 I'm aware of this issue as well and have outlined my thoughts in #2348. So for custom services (not part of plugin-node), we want to avoid touching the core code or core types. Instead, we can let each custom service register whichever methods it needs, and then external code can invoke those methods through a function in runtime.ts.
For example, if I need to call the web search service from the image plugin, I could do:
const latestNews = await runtime.callServiceMethod(
"web_search",
"search",
"latest news on AI Agents",
{limit: 5, includeImages: true}
);
Is your feature request related to a problem? Please describe.
Currently, when someone want to create a new service, they must add new type as string to enum ServiceType in packages/core/src/types.
Describe the solution you'd like
I want to add new service type in my new plugin without modify enum ServiceType in package core. In some case they import packages/cores from node-modules, so they can not edit that enum
Describe alternatives you've considered
May be remove that enum, so that getService function in packages/core/src/runtime.ts we can use
instead of
The text was updated successfully, but these errors were encountered: