@elizaos/core 0.25.8 → 0.25.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +30 -21
- package/dist/index.js +2344 -10694
- package/dist/index.js.map +1 -1
- package/package.json +10 -35
- package/dist/_esm-34ZFAN5D.js +0 -3913
- package/dist/_esm-34ZFAN5D.js.map +0 -1
- package/dist/ccip-3UWHPADM.js +0 -14
- package/dist/ccip-3UWHPADM.js.map +0 -1
- package/dist/chunk-3M76AWJP.js +0 -2556
- package/dist/chunk-3M76AWJP.js.map +0 -1
- package/dist/chunk-LOF3UYFD.js +0 -4821
- package/dist/chunk-LOF3UYFD.js.map +0 -1
- package/dist/chunk-PR4QN5HX.js +0 -43
- package/dist/chunk-PR4QN5HX.js.map +0 -1
- package/dist/secp256k1-POFHGYGH.js +0 -14
- package/dist/secp256k1-POFHGYGH.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -496,8 +496,11 @@ type Client = {
|
|
|
496
496
|
/** Start client connection */
|
|
497
497
|
start: (runtime: IAgentRuntime) => Promise<ClientInstance>;
|
|
498
498
|
};
|
|
499
|
+
/**
|
|
500
|
+
* Database adapter initialization
|
|
501
|
+
*/
|
|
499
502
|
type Adapter = {
|
|
500
|
-
/** Initialize adapter */
|
|
503
|
+
/** Initialize the adapter */
|
|
501
504
|
init: (runtime: IAgentRuntime) => IDatabaseAdapter & IDatabaseCacheAdapter;
|
|
502
505
|
};
|
|
503
506
|
/**
|
|
@@ -506,6 +509,8 @@ type Adapter = {
|
|
|
506
509
|
type Plugin = {
|
|
507
510
|
/** Plugin name */
|
|
508
511
|
name: string;
|
|
512
|
+
/** Plugin npm name */
|
|
513
|
+
npmName?: string;
|
|
509
514
|
/** Plugin configuration */
|
|
510
515
|
config?: {
|
|
511
516
|
[key: string]: any;
|
|
@@ -524,6 +529,8 @@ type Plugin = {
|
|
|
524
529
|
clients?: Client[];
|
|
525
530
|
/** Optional adapters */
|
|
526
531
|
adapters?: Adapter[];
|
|
532
|
+
/** Optional post charactor processor handler */
|
|
533
|
+
handlePostCharacterLoaded?: (char: Character) => Promise<Character>;
|
|
527
534
|
};
|
|
528
535
|
interface IAgentConfig {
|
|
529
536
|
[key: string]: string;
|
|
@@ -642,9 +649,14 @@ type Character = {
|
|
|
642
649
|
knowledge?: (string | {
|
|
643
650
|
path: string;
|
|
644
651
|
shared?: boolean;
|
|
652
|
+
} | {
|
|
653
|
+
directory: string;
|
|
654
|
+
shared?: boolean;
|
|
645
655
|
})[];
|
|
646
656
|
/** Available plugins */
|
|
647
657
|
plugins: Plugin[];
|
|
658
|
+
/** Character Processor Plugins */
|
|
659
|
+
postProcessors?: Pick<Plugin, 'name' | 'description' | 'handlePostCharacterLoaded'>[];
|
|
648
660
|
/** Optional configuration */
|
|
649
661
|
settings?: {
|
|
650
662
|
secrets?: {
|
|
@@ -1778,6 +1790,20 @@ declare function formatEvaluatorExampleDescriptions(evaluators: Evaluator[]): st
|
|
|
1778
1790
|
|
|
1779
1791
|
type Tool = CoreTool<any, any>;
|
|
1780
1792
|
type StepResult = StepResult$1<any>;
|
|
1793
|
+
type GenerationResult = GenerateObjectResult<unknown>;
|
|
1794
|
+
interface ProviderOptions {
|
|
1795
|
+
runtime: IAgentRuntime;
|
|
1796
|
+
provider: ModelProviderName;
|
|
1797
|
+
model: string;
|
|
1798
|
+
apiKey: string;
|
|
1799
|
+
schema?: ZodSchema;
|
|
1800
|
+
schemaName?: string;
|
|
1801
|
+
schemaDescription?: string;
|
|
1802
|
+
mode?: "auto" | "json" | "tool";
|
|
1803
|
+
modelOptions: ModelSettings;
|
|
1804
|
+
modelClass: ModelClass;
|
|
1805
|
+
context: string;
|
|
1806
|
+
}
|
|
1781
1807
|
/**
|
|
1782
1808
|
* Trims the provided text context to a specified token limit using a tokenizer model and type.
|
|
1783
1809
|
*
|
|
@@ -1976,30 +2002,13 @@ interface ModelSettings {
|
|
|
1976
2002
|
* @throws {Error} - Throws an error if the provider is unsupported or if generation fails.
|
|
1977
2003
|
*/
|
|
1978
2004
|
declare const generateObject: ({ runtime, context, modelClass, schema, schemaName, schemaDescription, stop, mode, }: GenerationOptions) => Promise<GenerateObjectResult<unknown>>;
|
|
1979
|
-
/**
|
|
1980
|
-
* Interface for provider-specific generation options.
|
|
1981
|
-
*/
|
|
1982
|
-
interface ProviderOptions {
|
|
1983
|
-
runtime: IAgentRuntime;
|
|
1984
|
-
provider: ModelProviderName;
|
|
1985
|
-
model: any;
|
|
1986
|
-
apiKey: string;
|
|
1987
|
-
schema?: ZodSchema;
|
|
1988
|
-
schemaName?: string;
|
|
1989
|
-
schemaDescription?: string;
|
|
1990
|
-
mode?: "auto" | "json" | "tool";
|
|
1991
|
-
experimental_providerMetadata?: Record<string, unknown>;
|
|
1992
|
-
modelOptions: ModelSettings;
|
|
1993
|
-
modelClass: ModelClass;
|
|
1994
|
-
context: string;
|
|
1995
|
-
}
|
|
1996
2005
|
/**
|
|
1997
2006
|
* Handles AI generation based on the specified provider.
|
|
1998
2007
|
*
|
|
1999
2008
|
* @param {ProviderOptions} options - Configuration options specific to the provider.
|
|
2000
2009
|
* @returns {Promise<any[]>} - A promise that resolves to an array of generated objects.
|
|
2001
2010
|
*/
|
|
2002
|
-
declare function handleProvider(options: ProviderOptions): Promise<
|
|
2011
|
+
declare function handleProvider(options: ProviderOptions): Promise<GenerationResult>;
|
|
2003
2012
|
declare function generateTweetActions({ runtime, context, modelClass, }: {
|
|
2004
2013
|
runtime: IAgentRuntime;
|
|
2005
2014
|
context: string;
|
|
@@ -2815,6 +2824,7 @@ declare const CharacterSchema: z.ZodObject<{
|
|
|
2815
2824
|
shared?: boolean;
|
|
2816
2825
|
directory?: string;
|
|
2817
2826
|
})[];
|
|
2827
|
+
name?: string;
|
|
2818
2828
|
settings?: {
|
|
2819
2829
|
model?: string;
|
|
2820
2830
|
secrets?: Record<string, string>;
|
|
@@ -2832,7 +2842,6 @@ declare const CharacterSchema: z.ZodObject<{
|
|
|
2832
2842
|
embeddingModel?: string;
|
|
2833
2843
|
};
|
|
2834
2844
|
modelProvider?: ModelProviderName;
|
|
2835
|
-
name?: string;
|
|
2836
2845
|
id?: string;
|
|
2837
2846
|
system?: string;
|
|
2838
2847
|
plugins?: string[] | {
|
|
@@ -2895,6 +2904,7 @@ declare const CharacterSchema: z.ZodObject<{
|
|
|
2895
2904
|
shared?: boolean;
|
|
2896
2905
|
directory?: string;
|
|
2897
2906
|
})[];
|
|
2907
|
+
name?: string;
|
|
2898
2908
|
settings?: {
|
|
2899
2909
|
model?: string;
|
|
2900
2910
|
secrets?: Record<string, string>;
|
|
@@ -2912,7 +2922,6 @@ declare const CharacterSchema: z.ZodObject<{
|
|
|
2912
2922
|
embeddingModel?: string;
|
|
2913
2923
|
};
|
|
2914
2924
|
modelProvider?: ModelProviderName;
|
|
2915
|
-
name?: string;
|
|
2916
2925
|
id?: string;
|
|
2917
2926
|
system?: string;
|
|
2918
2927
|
plugins?: string[] | {
|