Skip to content

Commit

Permalink
feat: Add database adapter and plugin adapter types to core types
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Pereira committed Feb 22, 2025
1 parent e91e527 commit b7d01db
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,14 @@ export type Client = {
stop: (runtime: IAgentRuntime) => Promise<unknown>;
};

/**
* Database adapter initialization
*/
export type Adapter = {
/** Initialize the adapter */
init: (runtime: IAgentRuntime) => IDatabaseAdapter & IDatabaseCacheAdapter;
};

/**
* Plugin for extending agent functionality
*/
Expand All @@ -642,6 +650,9 @@ export type Plugin = {

/** Optional clients */
clients?: Client[];

/** Optional adapters */
adapters?: Adapter[];
};

/**
Expand Down

0 comments on commit b7d01db

Please sign in to comment.