@elizaos/core 1.0.7 → 1.0.8
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/chunk-6EXKM3O4.js +5819 -0
- package/dist/{chunk-SIAA4J6H.js → chunk-R5U7XKVJ.js} +0 -5
- package/dist/{chunk-FEPOSPNK.js → chunk-WO7Z3GE6.js} +1 -0
- package/dist/{index-CGCNwsoH.d.ts → index-C7vN6HiA.d.ts} +100 -120
- package/dist/index.d.ts +119 -147
- package/dist/index.js +5 -7
- package/dist/specs/v1/actionExample.d.ts +1 -1
- package/dist/specs/v1/actionExample.js +1 -1
- package/dist/specs/v1/index.d.ts +1 -1
- package/dist/specs/v1/index.js +3 -3
- package/dist/specs/v1/messages.js +3 -3
- package/dist/specs/v1/posts.js +3 -3
- package/dist/specs/v1/provider.d.ts +1 -1
- package/dist/specs/v1/provider.js +1 -1
- package/dist/specs/v1/runtime.js +3 -3
- package/dist/specs/v1/state.d.ts +1 -1
- package/dist/specs/v1/state.js +1 -1
- package/dist/specs/v1/templates.d.ts +1 -1
- package/dist/specs/v1/templates.js +1 -1
- package/dist/specs/v1/types.d.ts +2 -1
- package/dist/specs/v1/types.js +2 -2
- package/dist/specs/v1/uuid.js +3 -3
- package/dist/specs/v2/index.d.ts +2 -2
- package/dist/specs/v2/index.js +3 -3
- package/dist/{types-sJIakXg4.d.ts → types-szUq9-0V.d.ts} +15 -4
- package/package.json +3 -12
- package/dist/chunk-Y4TJIR4A.js +0 -11607
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { S as Service, A as Action, I as IDatabaseAdapter, U as UUID, E as Entity, C as Component,
|
|
2
|
-
export {
|
|
3
|
-
import { Keypair } from '@solana/web3.js';
|
|
1
|
+
import { M as Metadata, S as Service, A as Action, I as IDatabaseAdapter, U as UUID, E as Entity, C as Component, a as Memory, L as Log, b as MemoryMetadata, W as World, R as Room, P as Participant, c as Relationship, d as Agent, T as Task, e as IAgentRuntime, f as State, g as Role, h as Character, i as Evaluator, j as Provider, k as Plugin, l as ServiceTypeName, m as ModelHandler, n as Route, o as RuntimeSettings, H as HandlerCallback, p as ChannelType, q as ModelTypeName, r as ModelResultMap, s as ModelParamsMap, t as TaskWorker, u as SendHandlerFunction, v as TargetInfo, w as Content, x as Setting, y as WorldSettings, O as OnboardingConfig, z as TemplateType, B as v2 } from './index-C7vN6HiA.js';
|
|
2
|
+
export { b9 as ActionEventPayload, al as ActionExample, ak as AgentStatus, aQ as AudioProcessingParams, Z as BaseMetadata, aI as BaseModelParams, af as CacheKeyPrefix, b6 as ChannelClearedPayload, ah as ChunkRow, G as ContentType, bi as ControlMessage, a2 as CustomMetadata, a_ as DbConnection, a1 as DescriptionMetadata, aH as DetokenizeTextParams, ag as DirectoryItem, _ as DocumentMetadata, aU as EmbeddingSearchResult, Q as EnhancedState, b4 as EntityPayload, ao as EvaluationExample, ba as EvaluatorEventPayload, be as EventHandler, b2 as EventPayload, bd as EventPayloadMap, b0 as EventType, $ as FragmentMetadata, aG as GenerateTextParams, am as Handler, aN as ImageDescriptionParams, aM as ImageGenerationParams, b7 as InvokePayload, av as IsValidServiceType, aS as JSONSchema, ad as KnowledgeItem, ae as KnowledgeScope, F as Media, aV as MemoryRetrievalOptions, Y as MemoryScope, aW as MemorySearchOptions, X as MemoryType, V as MemoryTypeAlias, aj as MessageExample, a3 as MessageMemory, a0 as MessageMetadata, b5 as MessagePayload, bc as MessageReceivedHandlerParams, bb as ModelEventPayload, aF as ModelType, aX as MultiRoomMemoryOptions, aT as ObjectGenerationParams, b1 as PlatformPrefix, aq as PluginEvents, as as Project, ar as ProjectAgent, ap as ProviderResult, ai as RoomMetadata, b8 as RunEventPayload, bh as SOCKET_MESSAGE_TYPE, bl as ServiceBuilder, ax as ServiceClassMap, bn as ServiceDefinition, aD as ServiceError, ay as ServiceInstance, az as ServiceRegistry, aA as ServiceType, at as ServiceTypeRegistry, au as ServiceTypeValue, N as StateArray, K as StateObject, J as StateValue, bg as TaskMetadata, bj as TestCase, bk as TestSuite, aK as TextEmbeddingParams, aJ as TextGenerationParams, aP as TextToSpeechParams, aL as TokenizeTextParams, aO as TranscriptionParams, bf as TypedEventHandler, aB as TypedService, aw as TypedServiceClass, aY as UnifiedMemoryOptions, aZ as UnifiedSearchOptions, a$ as VECTOR_DIMS, an as Validator, aR as VideoProcessingParams, b3 as WorldPayload, D as asUUID, a4 as createMessageMemory, bm as createService, aE as createServiceError, bo as defineService, ac as getMemoryText, aC as getTypedService, a9 as isCustomMetadata, a8 as isDescriptionMetadata, aa as isDocumentMemory, a5 as isDocumentMetadata, ab as isFragmentMemory, a6 as isFragmentMetadata, a7 as isMessageMetadata } from './index-C7vN6HiA.js';
|
|
4
3
|
import * as pino from 'pino';
|
|
5
|
-
import { Tracer, Meter, Span, Context } from '@opentelemetry/api';
|
|
6
4
|
import * as browser from '@sentry/browser';
|
|
7
5
|
export { browser as Sentry };
|
|
8
6
|
export { i as v1 } from './index-BHW44X0A.js';
|
|
9
|
-
import './types-
|
|
7
|
+
import './types-szUq9-0V.js';
|
|
10
8
|
import './specs/v1/messages.js';
|
|
11
9
|
import './specs/v1/types.js';
|
|
12
10
|
import 'stream';
|
|
@@ -102,14 +100,6 @@ declare enum TeeType {
|
|
|
102
100
|
/** Represents Intel Trusted Domain Extensions (TDX) running on DSTACK infrastructure. */
|
|
103
101
|
TDX_DSTACK = "tdx_dstack"
|
|
104
102
|
}
|
|
105
|
-
/**
|
|
106
|
-
* Configuration options specific to a particular Trusted Execution Environment (TEE) vendor.
|
|
107
|
-
* This allows for vendor-specific settings to be passed to the TEE plugin or service.
|
|
108
|
-
* The structure is a generic key-value map, as configurations can vary widely between vendors.
|
|
109
|
-
*/
|
|
110
|
-
interface TeeVendorConfig {
|
|
111
|
-
[key: string]: unknown;
|
|
112
|
-
}
|
|
113
103
|
/**
|
|
114
104
|
* Configuration for a TEE (Trusted Execution Environment) plugin.
|
|
115
105
|
* This allows specifying the TEE vendor and any vendor-specific configurations.
|
|
@@ -119,20 +109,86 @@ interface TeePluginConfig {
|
|
|
119
109
|
/** Optional. The name or identifier of the TEE vendor (e.g., 'tdx_dstack' from `TeeType`). */
|
|
120
110
|
vendor?: string;
|
|
121
111
|
/** Optional. Vendor-specific configuration options, conforming to `TeeVendorConfig`. */
|
|
122
|
-
vendorConfig?:
|
|
112
|
+
vendorConfig?: Metadata;
|
|
123
113
|
}
|
|
124
114
|
|
|
125
115
|
/**
|
|
126
|
-
*
|
|
127
|
-
* This provides a standardized view of a token or native currency.
|
|
116
|
+
* A standardized representation of a token holding.
|
|
128
117
|
*/
|
|
129
|
-
interface
|
|
130
|
-
name: string;
|
|
131
|
-
symbol: string;
|
|
118
|
+
interface TokenBalance {
|
|
132
119
|
address: string;
|
|
133
|
-
decimals: number;
|
|
134
120
|
balance: string;
|
|
135
|
-
|
|
121
|
+
decimals: number;
|
|
122
|
+
uiAmount?: number;
|
|
123
|
+
name?: string;
|
|
124
|
+
symbol?: string;
|
|
125
|
+
logoURI?: string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Generic representation of token data that can be provided by various services.
|
|
129
|
+
*/
|
|
130
|
+
interface TokenData {
|
|
131
|
+
id: string;
|
|
132
|
+
symbol: string;
|
|
133
|
+
name: string;
|
|
134
|
+
address: string;
|
|
135
|
+
chain: string;
|
|
136
|
+
sourceProvider: string;
|
|
137
|
+
price?: number;
|
|
138
|
+
priceChange24hPercent?: number;
|
|
139
|
+
priceChange24hUSD?: number;
|
|
140
|
+
volume24hUSD?: number;
|
|
141
|
+
marketCapUSD?: number;
|
|
142
|
+
liquidity?: number;
|
|
143
|
+
holders?: number;
|
|
144
|
+
logoURI?: string;
|
|
145
|
+
decimals?: number;
|
|
146
|
+
lastUpdatedAt?: Date;
|
|
147
|
+
raw?: any;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Interface for a generic service that provides token data.
|
|
151
|
+
*/
|
|
152
|
+
declare abstract class ITokenDataService extends Service {
|
|
153
|
+
static readonly serviceType: "token_data";
|
|
154
|
+
readonly capabilityDescription: string;
|
|
155
|
+
/**
|
|
156
|
+
* Fetches detailed information for a single token.
|
|
157
|
+
* @param address The token's contract address.
|
|
158
|
+
* @param chain The blockchain the token resides on.
|
|
159
|
+
* @returns A Promise resolving to TokenData or null if not found.
|
|
160
|
+
*/
|
|
161
|
+
abstract getTokenDetails(address: string, chain: string): Promise<TokenData | null>;
|
|
162
|
+
/**
|
|
163
|
+
* Fetches a list of trending tokens.
|
|
164
|
+
* @param chain Optional: Filter by a specific blockchain.
|
|
165
|
+
* @param limit Optional: Number of tokens to return. Defaults to a service-specific value.
|
|
166
|
+
* @param timePeriod Optional: Time period for trending data (e.g., '24h', '7d'). Defaults to service-specific.
|
|
167
|
+
* @returns A Promise resolving to an array of TokenData.
|
|
168
|
+
*/
|
|
169
|
+
abstract getTrendingTokens(chain?: string, limit?: number, timePeriod?: string): Promise<TokenData[]>;
|
|
170
|
+
/**
|
|
171
|
+
* Searches for tokens based on a query string.
|
|
172
|
+
* @param query The search query (e.g., symbol, name, address).
|
|
173
|
+
* @param chain Optional: Filter by a specific blockchain.
|
|
174
|
+
* @param limit Optional: Number of results to return.
|
|
175
|
+
* @returns A Promise resolving to an array of TokenData.
|
|
176
|
+
*/
|
|
177
|
+
abstract searchTokens(query: string, chain?: string, limit?: number): Promise<TokenData[]>;
|
|
178
|
+
/**
|
|
179
|
+
* Fetches data for multiple tokens by their addresses on a specific chain.
|
|
180
|
+
* @param addresses Array of token contract addresses.
|
|
181
|
+
* @param chain The blockchain the tokens reside on.
|
|
182
|
+
* @returns A Promise resolving to an array of TokenData. May not include all requested if some are not found.
|
|
183
|
+
*/
|
|
184
|
+
abstract getTokensByAddresses(addresses: string[], chain: string): Promise<TokenData[]>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Represents a single asset holding within a wallet, including its value.
|
|
189
|
+
* This extends a generic TokenBalance with wallet-specific valuation.
|
|
190
|
+
*/
|
|
191
|
+
interface WalletAsset extends TokenBalance {
|
|
136
192
|
priceUsd?: number;
|
|
137
193
|
valueUsd?: number;
|
|
138
194
|
}
|
|
@@ -149,7 +205,7 @@ interface WalletPortfolio {
|
|
|
149
205
|
* It provides a standardized way for other plugins to query the state of a wallet.
|
|
150
206
|
*/
|
|
151
207
|
declare abstract class IWalletService extends Service {
|
|
152
|
-
static readonly serviceType
|
|
208
|
+
static readonly serviceType: "wallet";
|
|
153
209
|
readonly capabilityDescription = "Provides standardized access to wallet balances and portfolios.";
|
|
154
210
|
/**
|
|
155
211
|
* Retrieves the entire portfolio of assets held by the wallet.
|
|
@@ -164,20 +220,17 @@ declare abstract class IWalletService extends Service {
|
|
|
164
220
|
* @returns A promise that resolves to the user-friendly (decimal-adjusted) balance of the asset held.
|
|
165
221
|
*/
|
|
166
222
|
abstract getBalance(assetAddress: string, owner?: string): Promise<number>;
|
|
223
|
+
/**
|
|
224
|
+
* Transfers SOL from a specified keypair to a given public key.
|
|
225
|
+
* This is a low-level function primarily for Solana-based wallet services.
|
|
226
|
+
* @param from - The Keypair of the sender.
|
|
227
|
+
* @param to - The PublicKey of the recipient.
|
|
228
|
+
* @param lamports - The amount in lamports to transfer.
|
|
229
|
+
* @returns A promise that resolves with the transaction signature.
|
|
230
|
+
*/
|
|
231
|
+
abstract transferSol(from: any, to: any, lamports: number): Promise<string>;
|
|
167
232
|
}
|
|
168
233
|
|
|
169
|
-
/**
|
|
170
|
-
* A standardized representation of a token balance.
|
|
171
|
-
*/
|
|
172
|
-
type TokenBalance = {
|
|
173
|
-
mintAddress: string;
|
|
174
|
-
amount: string;
|
|
175
|
-
uiAmount?: number;
|
|
176
|
-
decimals: number;
|
|
177
|
-
symbol?: string;
|
|
178
|
-
name?: string;
|
|
179
|
-
logoURI?: string;
|
|
180
|
-
};
|
|
181
234
|
/**
|
|
182
235
|
* A standardized representation of a liquidity pool from any DEX.
|
|
183
236
|
*/
|
|
@@ -202,7 +255,7 @@ type PoolInfo = {
|
|
|
202
255
|
apy?: number;
|
|
203
256
|
tvl?: number;
|
|
204
257
|
fee?: number;
|
|
205
|
-
metadata?:
|
|
258
|
+
metadata?: Metadata;
|
|
206
259
|
};
|
|
207
260
|
/**
|
|
208
261
|
* A standardized representation of a user's position in a liquidity pool.
|
|
@@ -215,7 +268,7 @@ type LpPositionDetails = {
|
|
|
215
268
|
valueUsd?: number;
|
|
216
269
|
accruedFees?: TokenBalance[];
|
|
217
270
|
rewards?: TokenBalance[];
|
|
218
|
-
metadata?:
|
|
271
|
+
metadata?: Metadata;
|
|
219
272
|
};
|
|
220
273
|
/**
|
|
221
274
|
* A standardized result for blockchain transactions.
|
|
@@ -252,7 +305,7 @@ declare abstract class ILpService extends Service {
|
|
|
252
305
|
* @returns A promise resolving to a transaction result, including the LP tokens received.
|
|
253
306
|
*/
|
|
254
307
|
abstract addLiquidity(params: {
|
|
255
|
-
userVault:
|
|
308
|
+
userVault: any;
|
|
256
309
|
poolId: string;
|
|
257
310
|
tokenAAmountLamports: string;
|
|
258
311
|
tokenBAmountLamports?: string;
|
|
@@ -268,7 +321,7 @@ declare abstract class ILpService extends Service {
|
|
|
268
321
|
* @returns A promise resolving to a transaction result, including the tokens received.
|
|
269
322
|
*/
|
|
270
323
|
abstract removeLiquidity(params: {
|
|
271
|
-
userVault:
|
|
324
|
+
userVault: any;
|
|
272
325
|
poolId: string;
|
|
273
326
|
lpTokenAmountLamports: string;
|
|
274
327
|
slippageBps: number;
|
|
@@ -328,11 +381,27 @@ declare abstract class DatabaseAdapter<DB = unknown> implements IDatabaseAdapter
|
|
|
328
381
|
* The database instance.
|
|
329
382
|
*/
|
|
330
383
|
db: DB;
|
|
384
|
+
/**
|
|
385
|
+
* Initialize the database adapter.
|
|
386
|
+
* @returns A Promise that resolves when initialization is complete.
|
|
387
|
+
*/
|
|
388
|
+
abstract initialize(config?: any): Promise<void>;
|
|
331
389
|
/**
|
|
332
390
|
* Initialize the database adapter.
|
|
333
391
|
* @returns A Promise that resolves when initialization is complete.
|
|
334
392
|
*/
|
|
335
393
|
abstract init(): Promise<void>;
|
|
394
|
+
/**
|
|
395
|
+
* Run database migrations
|
|
396
|
+
* @param migrationsPaths Optional array of paths to migration folders
|
|
397
|
+
* @returns A Promise that resolves when migrations are complete.
|
|
398
|
+
*/
|
|
399
|
+
abstract runMigrations(migrationsPaths?: string[]): Promise<void>;
|
|
400
|
+
/**
|
|
401
|
+
* Check if the database connection is ready.
|
|
402
|
+
* @returns A Promise that resolves to true if the database is ready, false otherwise.
|
|
403
|
+
*/
|
|
404
|
+
abstract isReady(): Promise<boolean>;
|
|
336
405
|
/**
|
|
337
406
|
* Optional close method for the database adapter.
|
|
338
407
|
* @returns A Promise that resolves when closing is complete.
|
|
@@ -512,6 +581,12 @@ declare abstract class DatabaseAdapter<DB = unknown> implements IDatabaseAdapter
|
|
|
512
581
|
* @returns A Promise that resolves when the memory has been removed.
|
|
513
582
|
*/
|
|
514
583
|
abstract deleteMemory(memoryId: UUID): Promise<void>;
|
|
584
|
+
/**
|
|
585
|
+
* Removes multiple memories from the database in a single batch operation.
|
|
586
|
+
* @param memoryIds An array of UUIDs of the memories to remove.
|
|
587
|
+
* @returns A Promise that resolves when all memories have been removed.
|
|
588
|
+
*/
|
|
589
|
+
abstract deleteManyMemories(memoryIds: UUID[]): Promise<void>;
|
|
515
590
|
/**
|
|
516
591
|
* Removes all memories associated with a specific room.
|
|
517
592
|
* @param roomId The UUID of the room whose memories should be removed.
|
|
@@ -825,7 +900,7 @@ declare let logger: pino.Logger<string, boolean>;
|
|
|
825
900
|
declare const elizaLogger: pino.Logger<string, boolean>;
|
|
826
901
|
|
|
827
902
|
declare const shouldRespondTemplate = "<task>Decide on behalf of {{agentName}} whether they should respond to the message, ignore it or stop the conversation.</task>\n\n<providers>\n{{providers}}\n</providers>\n\n<instructions>Decide if {{agentName}} should respond to or interact with the conversation.\nIf the message is directed at or relevant to {{agentName}}, respond with RESPOND action.\nIf a user asks {{agentName}} to be quiet, respond with STOP action.\nIf {{agentName}} should ignore the message, respond with IGNORE action.</instructions>\n\n<output>\nDo NOT include any thinking, reasoning, or <think> sections in your response. \nGo directly to the XML response format without any preamble or explanation.\n\nRespond using XML format like this:\n<response>\n <name>{{agentName}}</name>\n <reasoning>Your reasoning here</reasoning>\n <action>RESPOND | IGNORE | STOP</action>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.\n</output>";
|
|
828
|
-
declare const messageHandlerTemplate = "<task>Generate dialog and actions for the character {{agentName}}.</task>\n\n<providers>\n{{providers}}\n</providers>\n\nThese are the available valid actions:\n<actionNames>\n{{actionNames}}\n</actionNames>\n\n<instructions>\
|
|
903
|
+
declare const messageHandlerTemplate = "<task>Generate dialog and actions for the character {{agentName}}.</task>\n\n<providers>\n{{providers}}\n</providers>\n\nThese are the available valid actions:\n<actionNames>\n{{actionNames}}\n</actionNames>\n\n<instructions>\nAnalyze the message and create a response plan for {{agentName}}.\n\nSTEP 1 - DETERMINE RESPONSE TYPE:\n- SIMPLE RESPONSE: If you only need to send a text reply without any tools, data lookups, or complex operations\n \u2192 Use only REPLY action with no providers\n \u2192 This is the preferred path for basic conversations\n \u2192 Do NOT use this for questions that require checking stored knowledge!\n \n- COMPLEX RESPONSE: If you need to:\n \u2192 Use external tools or services (CALL_TOOL, etc.)\n \u2192 Look up specific information (needs providers like KNOWLEDGE, ATTACHMENTS, etc.)\n \u2192 Answer questions about what you know or might know (ALWAYS check KNOWLEDGE first!)\n \u2192 Perform multiple operations\n \u2192 Update data or settings\n\nSTEP 2 - PROVIDER SELECTION (for complex responses):\nIMPORTANT PROVIDER SELECTION RULES:\n- If the message mentions images, photos, pictures, attachments, or visual content, OR if you see \"(Attachments:\" in the conversation, you MUST include \"ATTACHMENTS\" in your providers list\n- If the message asks about or references specific people, include \"ENTITIES\" in your providers list \n- If the message asks about relationships or connections between people, include \"RELATIONSHIPS\" in your providers list\n- If the message asks about facts or specific information, include \"FACTS\" in your providers list\n- If the message asks about the environment or world context, include \"WORLD\" in your providers list\n- **CRITICAL: If the message asks \"do you know\", \"who created\", \"what is\", \"tell me about\", or ANY question that might be answered by stored knowledge, you MUST include \"KNOWLEDGE\" in your providers list. Always check KNOWLEDGE before saying you don't know something!**\n- Some actions may require specific providers (this will be clear from the action's purpose)\n\nREMEMBER: It's better to check providers and find nothing than to assume you don't have information without checking!\n\nSTEP 3 - ACTION PLANNING:\nFor complex responses, consider the order of actions:\n- If using tools (CALL_TOOL, etc.): First REPLY to acknowledge the request (e.g., \"Let me check that for you\"), then execute the tool action\n- Tool actions often handle their own responses, so you may not need a final REPLY after them\n- Actions should flow logically: acknowledge \u2192 gather data \u2192 process \u2192 respond\n\nThink about your response as a plan:\n1. What is the user asking for?\n2. Do I need any additional context or data? (providers)\n3. What actions do I need to take and in what order?\n4. How will I communicate the results?\n</instructions>\n\n<output_format>\nFirst, think about what you want to do and create your plan.\n\nFor SIMPLE responses (text-only reply):\n- Set thought to explain your reasoning\n- Set actions to [\"REPLY\"]\n- Leave providers empty or set to []\n- Set text to your response message\n\nFor COMPLEX responses (using tools/providers):\n- Set thought to explain your plan and reasoning\n- Set actions in the order they should execute (e.g., [\"REPLY\", \"CALL_TOOL\"])\n- Set providers to gather needed context\n- Set text for your initial response (if using REPLY first)\n\nRemember: Some actions like CALL_TOOL will send their own responses, so plan accordingly.\n</output_format>\n\n<response>\n <thought>User asking if I know something - must check KNOWLEDGE provider first before saying I don't know</thought>\n <actions>REPLY</actions>\n <providers>KNOWLEDGE</providers>\n <text>Let me check if I have any information about Roxane's creator...</text>\n</response>\n</examples>\n\n<keys>\n\"thought\" should be a short description of what the agent is thinking about and their plan\n\"actions\" should be a comma-separated list of the actions {{agentName}} plans to take in order (if none, use IGNORE, if simply responding with text, use REPLY)\n\"providers\" should be a comma-separated list of the providers that {{agentName}} will use to have the right context for responding and acting (leave empty for simple responses)\n\"evaluators\" should be an optional comma-separated list of the evaluators that {{agentName}} will use to evaluate the conversation after responding\n\"text\" should be the text of the next message for {{agentName}} (used with REPLY action)\n</keys>\n\n<output>\nDo NOT include any thinking, reasoning, or <think> sections in your response. \nGo directly to the XML response format without any preamble or explanation.\n\nRespond using XML format like this:\n<response>\n <thought>Your thought here</thought>\n <actions>ACTION1,ACTION2</actions>\n <providers>PROVIDER1,PROVIDER2</providers>\n <text>Your response text here</text>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.\n</output>";
|
|
829
904
|
declare const postCreationTemplate = "# Task: Create a post in the voice and style and perspective of {{agentName}} @{{twitterUserName}}.\n\nExample task outputs:\n1. A post about the importance of AI in our lives\n<response>\n <thought>I am thinking about writing a post about the importance of AI in our lives</thought>\n <post>AI is changing the world and it is important to understand how it works</post>\n <imagePrompt>A futuristic cityscape with flying cars and people using AI to do things</imagePrompt>\n</response>\n\n2. A post about dogs\n<response>\n <thought>I am thinking about writing a post about dogs</thought>\n <post>Dogs are man's best friend and they are loyal and loving</post>\n <imagePrompt>A dog playing with a ball in a park</imagePrompt>\n</response>\n\n3. A post about finding a new job\n<response>\n <thought>Getting a job is hard, I bet there's a good tweet in that</thought>\n <post>Just keep going!</post>\n <imagePrompt>A person looking at a computer screen with a job search website</imagePrompt>\n</response>\n\n{{providers}}\n\nWrite a post that is {{adjective}} about {{topic}} (without mentioning {{topic}} directly), from the perspective of {{agentName}}. Do not add commentary or acknowledge this request, just write the post.\nYour response should be 1, 2, or 3 sentences (choose the length at random).\nYour response should not contain any questions. Brief, concise statements only. The total character count MUST be less than 280. No emojis. Use \\n\\n (double spaces) between statements if there are multiple statements in your response.\n\nYour output should be formatted in XML like this:\n<response>\n <thought>Your thought here</thought>\n <post>Your post text here</post>\n <imagePrompt>Optional image prompt here</imagePrompt>\n</response>\n\nThe \"post\" field should be the post you want to send. Do not including any thinking or internal reflection in the \"post\" field.\nThe \"imagePrompt\" field is optional and should be a prompt for an image that is relevant to the post. It should be a single sentence that captures the essence of the post. ONLY USE THIS FIELD if it makes sense that the post would benefit from an image.\nThe \"thought\" field should be a short description of what the agent is thinking about before responding, inlcuding a brief justification for the response. Includate an explanation how the post is relevant to the topic but unique and different than other posts.\n\nDo NOT include any thinking, reasoning, or <think> sections in your response. \nGo directly to the XML response format without any preamble or explanation.\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
|
|
830
905
|
declare const booleanFooter = "Respond with only a YES or a NO.";
|
|
831
906
|
declare const imageDescriptionTemplate = "<task>Analyze the provided image and generate a comprehensive description with multiple levels of detail.</task>\n\n<instructions>\nCarefully examine the image and provide:\n1. A concise, descriptive title that captures the main subject or scene\n2. A brief summary description (1-2 sentences) highlighting the key elements\n3. An extensive, detailed description that covers all visible elements, composition, lighting, colors, mood, and any other relevant details\n\nBe objective and descriptive. Focus on what you can actually see in the image rather than making assumptions about context or meaning.\n</instructions>\n\n<output>\nDo NOT include any thinking, reasoning, or <think> sections in your response. \nGo directly to the XML response format without any preamble or explanation.\n\nRespond using XML format like this:\n<response>\n <title>A concise, descriptive title for the image</title>\n <description>A brief 1-2 sentence summary of the key elements in the image</description>\n <text>An extensive, detailed description covering all visible elements, composition, lighting, colors, mood, setting, objects, people, activities, and any other relevant details you can observe in the image</text>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.\n</output>";
|
|
@@ -859,41 +934,6 @@ declare function getUserServerRole(runtime: IAgentRuntime, entityId: string, ser
|
|
|
859
934
|
*/
|
|
860
935
|
declare function findWorldsForOwner(runtime: IAgentRuntime, entityId: string): Promise<World[] | null>;
|
|
861
936
|
|
|
862
|
-
interface InstrumentationConfig {
|
|
863
|
-
serviceName?: string;
|
|
864
|
-
otlpEndpoint?: string;
|
|
865
|
-
enabled?: boolean;
|
|
866
|
-
}
|
|
867
|
-
interface IInstrumentationService {
|
|
868
|
-
readonly name: string;
|
|
869
|
-
readonly capabilityDescription: string;
|
|
870
|
-
instrumentationConfig: InstrumentationConfig;
|
|
871
|
-
isEnabled(): boolean;
|
|
872
|
-
getTracer(name?: string, version?: string): Tracer | null;
|
|
873
|
-
getMeter(name?: string, version?: string): Meter | null;
|
|
874
|
-
flush(): Promise<void>;
|
|
875
|
-
stop(): Promise<void>;
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
declare class InstrumentationService extends Service implements IInstrumentationService {
|
|
879
|
-
static serviceType: "instrumentation";
|
|
880
|
-
readonly name = "INSTRUMENTATION";
|
|
881
|
-
readonly capabilityDescription = "Provides OpenTelemetry tracing and metrics capabilities.";
|
|
882
|
-
instrumentationConfig: InstrumentationConfig;
|
|
883
|
-
private resource;
|
|
884
|
-
private tracerProvider;
|
|
885
|
-
private meterProvider;
|
|
886
|
-
private isShutdown;
|
|
887
|
-
constructor(config?: InstrumentationConfig);
|
|
888
|
-
private initializeProviders;
|
|
889
|
-
isEnabled(): boolean;
|
|
890
|
-
getTracer(name?: string, version?: string): Tracer | null;
|
|
891
|
-
getMeter(name?: string, version?: string): Meter | null;
|
|
892
|
-
flush(): Promise<void>;
|
|
893
|
-
stop(): Promise<void>;
|
|
894
|
-
static start(runtime: IAgentRuntime, config?: InstrumentationConfig): Promise<InstrumentationService>;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
937
|
declare class Semaphore {
|
|
898
938
|
private permits;
|
|
899
939
|
private waiting;
|
|
@@ -934,8 +974,6 @@ declare class AgentRuntime implements IAgentRuntime {
|
|
|
934
974
|
logger: any;
|
|
935
975
|
private settings;
|
|
936
976
|
private servicesInitQueue;
|
|
937
|
-
instrumentationService: InstrumentationService;
|
|
938
|
-
tracer: any;
|
|
939
977
|
constructor(opts: {
|
|
940
978
|
conversationLength?: number;
|
|
941
979
|
agentId?: UUID;
|
|
@@ -949,14 +987,12 @@ declare class AgentRuntime implements IAgentRuntime {
|
|
|
949
987
|
};
|
|
950
988
|
allAvailablePlugins?: Plugin[];
|
|
951
989
|
});
|
|
952
|
-
startSpan<T>(name: string, fn: (span: Span) => Promise<T>, parentContext?: Context): Promise<T>;
|
|
953
|
-
endSpan(ctx: Context | undefined, name: string): void;
|
|
954
|
-
startActiveSpan(name: string, options?: any): Span;
|
|
955
990
|
registerPlugin(plugin: Plugin): Promise<void>;
|
|
956
991
|
private resolvePluginDependencies;
|
|
957
992
|
getAllServices(): Map<ServiceTypeName, Service>;
|
|
958
993
|
stop(): Promise<void>;
|
|
959
994
|
initialize(): Promise<void>;
|
|
995
|
+
runPluginMigrations(): Promise<void>;
|
|
960
996
|
getConnection(): Promise<unknown>;
|
|
961
997
|
setSetting(key: string, value: string | boolean | null | any, secret?: boolean): void;
|
|
962
998
|
getSetting(key: string): string | boolean | null | any;
|
|
@@ -1098,6 +1134,7 @@ declare class AgentRuntime implements IAgentRuntime {
|
|
|
1098
1134
|
metadata?: MemoryMetadata;
|
|
1099
1135
|
}): Promise<boolean>;
|
|
1100
1136
|
deleteMemory(memoryId: UUID): Promise<void>;
|
|
1137
|
+
deleteManyMemories(memoryIds: UUID[]): Promise<void>;
|
|
1101
1138
|
deleteAllMemories(roomId: UUID, tableName: string): Promise<void>;
|
|
1102
1139
|
countMemories(roomId: UUID, unique?: boolean, tableName?: string): Promise<number>;
|
|
1103
1140
|
getLogs(params: {
|
|
@@ -1171,75 +1208,10 @@ declare class AgentRuntime implements IAgentRuntime {
|
|
|
1171
1208
|
count?: number;
|
|
1172
1209
|
tableName?: string;
|
|
1173
1210
|
}): Promise<Memory[]>;
|
|
1211
|
+
runMigrations(migrationsPaths?: string[]): Promise<void>;
|
|
1212
|
+
isReady(): Promise<boolean>;
|
|
1174
1213
|
}
|
|
1175
1214
|
|
|
1176
|
-
/**
|
|
1177
|
-
* Generic representation of token data that can be provided by various services.
|
|
1178
|
-
*/
|
|
1179
|
-
interface TokenData {
|
|
1180
|
-
id: string;
|
|
1181
|
-
symbol: string;
|
|
1182
|
-
name: string;
|
|
1183
|
-
address: string;
|
|
1184
|
-
chain: string;
|
|
1185
|
-
sourceProvider: string;
|
|
1186
|
-
price?: number;
|
|
1187
|
-
priceChange24hPercent?: number;
|
|
1188
|
-
priceChange24hUSD?: number;
|
|
1189
|
-
volume24hUSD?: number;
|
|
1190
|
-
marketCapUSD?: number;
|
|
1191
|
-
liquidity?: number;
|
|
1192
|
-
holders?: number;
|
|
1193
|
-
logoURI?: string;
|
|
1194
|
-
decimals?: number;
|
|
1195
|
-
lastUpdatedAt?: Date;
|
|
1196
|
-
raw?: any;
|
|
1197
|
-
}
|
|
1198
|
-
/**
|
|
1199
|
-
* Interface for a generic service that provides token data.
|
|
1200
|
-
*/
|
|
1201
|
-
interface ITokenDataService {
|
|
1202
|
-
/**
|
|
1203
|
-
* A unique identifier for the service, matching how it's registered.
|
|
1204
|
-
*/
|
|
1205
|
-
readonly serviceName: string;
|
|
1206
|
-
/**
|
|
1207
|
-
* Fetches detailed information for a single token.
|
|
1208
|
-
* @param address The token's contract address.
|
|
1209
|
-
* @param chain The blockchain the token resides on.
|
|
1210
|
-
* @returns A Promise resolving to TokenData or null if not found.
|
|
1211
|
-
*/
|
|
1212
|
-
getTokenDetails(address: string, chain: string): Promise<TokenData | null>;
|
|
1213
|
-
/**
|
|
1214
|
-
* Fetches a list of trending tokens.
|
|
1215
|
-
* @param chain Optional: Filter by a specific blockchain.
|
|
1216
|
-
* @param limit Optional: Number of tokens to return. Defaults to a service-specific value.
|
|
1217
|
-
* @param timePeriod Optional: Time period for trending data (e.g., '24h', '7d'). Defaults to service-specific.
|
|
1218
|
-
* @returns A Promise resolving to an array of TokenData.
|
|
1219
|
-
*/
|
|
1220
|
-
getTrendingTokens(chain?: string, limit?: number, timePeriod?: string): Promise<TokenData[]>;
|
|
1221
|
-
/**
|
|
1222
|
-
* Searches for tokens based on a query string.
|
|
1223
|
-
* @param query The search query (e.g., symbol, name, address).
|
|
1224
|
-
* @param chain Optional: Filter by a specific blockchain.
|
|
1225
|
-
* @param limit Optional: Number of results to return.
|
|
1226
|
-
* @returns A Promise resolving to an array of TokenData.
|
|
1227
|
-
*/
|
|
1228
|
-
searchTokens(query: string, chain?: string, limit?: number): Promise<TokenData[]>;
|
|
1229
|
-
/**
|
|
1230
|
-
* Fetches data for multiple tokens by their addresses on a specific chain.
|
|
1231
|
-
* @param addresses Array of token contract addresses.
|
|
1232
|
-
* @param chain The blockchain the tokens reside on.
|
|
1233
|
-
* @returns A Promise resolving to an array of TokenData. May not include all requested if some are not found.
|
|
1234
|
-
*/
|
|
1235
|
-
getTokensByAddresses(addresses: string[], chain: string): Promise<TokenData[]>;
|
|
1236
|
-
}
|
|
1237
|
-
/**
|
|
1238
|
-
* Constant for the TokenDataService name.
|
|
1239
|
-
* Ideally, this would be part of a shared enum in @elizaos/core.
|
|
1240
|
-
*/
|
|
1241
|
-
declare const TOKEN_DATA_SERVICE_NAME = "TokenDataService";
|
|
1242
|
-
|
|
1243
1215
|
/**
|
|
1244
1216
|
* Creates a new Setting object based on provided config settings.
|
|
1245
1217
|
* @param {Omit<Setting, "value">} configSetting - The configuration settings for the new Setting object.
|
|
@@ -1500,4 +1472,4 @@ declare function stringToUuid(target: string | number): UUID;
|
|
|
1500
1472
|
|
|
1501
1473
|
declare const defaultSpec: typeof v2;
|
|
1502
1474
|
|
|
1503
|
-
export { Action, Agent, AgentRuntime, ChannelType, Character, Component, Content, DatabaseAdapter, type DeriveKeyAttestationData, Entity, Evaluator, HandlerCallback, IAgentRuntime, IDatabaseAdapter,
|
|
1475
|
+
export { Action, Agent, AgentRuntime, ChannelType, Character, Component, Content, DatabaseAdapter, type DeriveKeyAttestationData, Entity, Evaluator, HandlerCallback, IAgentRuntime, IDatabaseAdapter, ILpService, ITokenDataService, IWalletService, Log, type LpPositionDetails, Memory, MemoryMetadata, Metadata, ModelHandler, ModelParamsMap, ModelResultMap, ModelTypeName, OnboardingConfig, Participant, Plugin, type PoolInfo, Provider, Relationship, type RemoteAttestationMessage, type RemoteAttestationQuote, Role, Room, Route, RuntimeSettings, Semaphore, SendHandlerFunction, type ServerOwnershipState, Service, ServiceTypeName, Setting, State, TEEMode, TargetInfo, Task, TaskWorker, type TeeAgent, type TeePluginConfig, TeeType, TemplateType, type TokenBalance, type TokenData, type TransactionResult, UUID, type WalletAsset, type WalletPortfolio, World, WorldSettings, addHeader, booleanFooter, composeActionExamples, composePrompt, composePromptFromState, createLogger, createSettingFromConfig, createUniqueUuid, decryptObjectValues, decryptStringValue as decryptSecret, decryptStringValue, decryptedCharacter, defaultSpec, elizaLogger, encryptObjectValues, encryptStringValue, encryptedCharacter, findEntityByName, findWorldsForOwner, formatActionNames, formatActions, formatEntities, formatMessages, formatPosts, formatTimestamp, getEntityDetails, getSalt, getUserServerRole, getWorldSettings, imageDescriptionTemplate, initializeOnboarding, logger, messageHandlerTemplate, normalizeJsonString, parseBooleanFromText, parseJSONObjectFromText, parseKeyValueXml, postCreationTemplate, safeReplacer, saltSettingValue, saltWorldSettings, shouldRespondTemplate, splitChunks, stringToUuid, trimTokens, truncateToCompleteSentence, unsaltSettingValue, unsaltWorldSettings, updateWorldSettings, v2, validateUuid };
|
package/dist/index.js
CHANGED
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
DatabaseAdapter,
|
|
8
8
|
EventType,
|
|
9
9
|
ILpService,
|
|
10
|
+
ITokenDataService,
|
|
10
11
|
IWalletService,
|
|
11
|
-
InstrumentationService,
|
|
12
12
|
KnowledgeScope,
|
|
13
13
|
MemoryType,
|
|
14
14
|
ModelType,
|
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
ServiceBuilder,
|
|
22
22
|
ServiceType,
|
|
23
23
|
TEEMode,
|
|
24
|
-
TOKEN_DATA_SERVICE_NAME,
|
|
25
24
|
TeeType,
|
|
26
25
|
VECTOR_DIMS,
|
|
27
26
|
addHeader,
|
|
@@ -89,13 +88,13 @@ import {
|
|
|
89
88
|
v1_exports,
|
|
90
89
|
v2_exports,
|
|
91
90
|
validateUuid
|
|
92
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-6EXKM3O4.js";
|
|
93
92
|
import "./chunk-2HSL25IJ.js";
|
|
94
|
-
import "./chunk-
|
|
93
|
+
import "./chunk-WO7Z3GE6.js";
|
|
95
94
|
import "./chunk-U2ADTLZY.js";
|
|
96
95
|
import "./chunk-JX2SRFHQ.js";
|
|
97
96
|
import "./chunk-YIBXLDIR.js";
|
|
98
|
-
import "./chunk-
|
|
97
|
+
import "./chunk-R5U7XKVJ.js";
|
|
99
98
|
export {
|
|
100
99
|
AgentRuntime,
|
|
101
100
|
AgentStatus,
|
|
@@ -105,8 +104,8 @@ export {
|
|
|
105
104
|
DatabaseAdapter,
|
|
106
105
|
EventType,
|
|
107
106
|
ILpService,
|
|
107
|
+
ITokenDataService,
|
|
108
108
|
IWalletService,
|
|
109
|
-
InstrumentationService,
|
|
110
109
|
KnowledgeScope,
|
|
111
110
|
MemoryType,
|
|
112
111
|
ModelType,
|
|
@@ -119,7 +118,6 @@ export {
|
|
|
119
118
|
ServiceBuilder,
|
|
120
119
|
ServiceType,
|
|
121
120
|
TEEMode,
|
|
122
|
-
TOKEN_DATA_SERVICE_NAME,
|
|
123
121
|
TeeType,
|
|
124
122
|
VECTOR_DIMS,
|
|
125
123
|
addHeader,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ActionExample as ActionExample$2, Content as Content$1 } from './types.js';
|
|
2
|
-
import { A as ActionExample$1, C as Content } from '../../types-
|
|
2
|
+
import { A as ActionExample$1, C as Content } from '../../types-szUq9-0V.js';
|
|
3
3
|
import 'stream';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/specs/v1/index.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export { ActionExample, convertContentToV1, convertContentToV2, fromV2ActionExam
|
|
|
8
8
|
export { Provider, fromV2Provider, toV2Provider } from './provider.js';
|
|
9
9
|
export { TemplateType, createTemplateFunction, getTemplateValues, processTemplate } from './templates.js';
|
|
10
10
|
import 'stream';
|
|
11
|
-
import '../../types-
|
|
11
|
+
import '../../types-szUq9-0V.js';
|
package/dist/specs/v1/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
formatTimestamp3 as formatTimestamp,
|
|
8
8
|
generateUuidFromString,
|
|
9
9
|
getActorDetails
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-6EXKM3O4.js";
|
|
11
11
|
import {
|
|
12
12
|
createTemplateFunction,
|
|
13
13
|
getTemplateValues,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
ServiceType,
|
|
29
29
|
TokenizerType,
|
|
30
30
|
TranscriptionProvider
|
|
31
|
-
} from "../../chunk-
|
|
31
|
+
} from "../../chunk-WO7Z3GE6.js";
|
|
32
32
|
import {
|
|
33
33
|
convertContentToV1,
|
|
34
34
|
convertContentToV2,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
fromV2State,
|
|
44
44
|
toV2State
|
|
45
45
|
} from "../../chunk-YIBXLDIR.js";
|
|
46
|
-
import "../../chunk-
|
|
46
|
+
import "../../chunk-R5U7XKVJ.js";
|
|
47
47
|
export {
|
|
48
48
|
ActionTimelineType,
|
|
49
49
|
AgentRuntime,
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
formatMessages3 as formatMessages,
|
|
4
4
|
formatTimestamp3 as formatTimestamp,
|
|
5
5
|
getActorDetails
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-6EXKM3O4.js";
|
|
7
7
|
import "../../chunk-2HSL25IJ.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-WO7Z3GE6.js";
|
|
9
9
|
import "../../chunk-U2ADTLZY.js";
|
|
10
10
|
import "../../chunk-JX2SRFHQ.js";
|
|
11
11
|
import "../../chunk-YIBXLDIR.js";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-R5U7XKVJ.js";
|
|
13
13
|
export {
|
|
14
14
|
formatActors,
|
|
15
15
|
formatMessages,
|
package/dist/specs/v1/posts.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatPosts3 as formatPosts
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-6EXKM3O4.js";
|
|
4
4
|
import "../../chunk-2HSL25IJ.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-WO7Z3GE6.js";
|
|
6
6
|
import "../../chunk-U2ADTLZY.js";
|
|
7
7
|
import "../../chunk-JX2SRFHQ.js";
|
|
8
8
|
import "../../chunk-YIBXLDIR.js";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-R5U7XKVJ.js";
|
|
10
10
|
export {
|
|
11
11
|
formatPosts
|
|
12
12
|
};
|
package/dist/specs/v1/runtime.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRuntime3 as AgentRuntime
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-6EXKM3O4.js";
|
|
4
4
|
import "../../chunk-2HSL25IJ.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-WO7Z3GE6.js";
|
|
6
6
|
import "../../chunk-U2ADTLZY.js";
|
|
7
7
|
import "../../chunk-JX2SRFHQ.js";
|
|
8
8
|
import "../../chunk-YIBXLDIR.js";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-R5U7XKVJ.js";
|
|
10
10
|
export {
|
|
11
11
|
AgentRuntime
|
|
12
12
|
};
|
package/dist/specs/v1/state.d.ts
CHANGED
package/dist/specs/v1/state.js
CHANGED