@elizaos/core 1.0.6 → 1.0.7
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-TF6QLZZY.js → chunk-Y4TJIR4A.js} +244 -172
- package/dist/{index-S6eSMHDH.d.ts → index-CGCNwsoH.d.ts} +874 -963
- package/dist/index.d.ts +344 -10
- package/dist/index.js +7 -1
- package/dist/specs/v1/actionExample.d.ts +1 -1
- package/dist/specs/v1/index.d.ts +1 -1
- package/dist/specs/v1/index.js +1 -1
- package/dist/specs/v1/messages.js +1 -1
- package/dist/specs/v1/posts.js +1 -1
- package/dist/specs/v1/provider.d.ts +1 -1
- package/dist/specs/v1/runtime.js +1 -1
- package/dist/specs/v1/state.d.ts +1 -1
- package/dist/specs/v1/templates.d.ts +1 -1
- package/dist/specs/v1/uuid.js +1 -1
- package/dist/specs/v2/index.d.ts +2 -2
- package/dist/specs/v2/index.js +1 -1
- package/dist/{types-D9v-eW3g.d.ts → types-sJIakXg4.d.ts} +0 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { A as Action, I as IDatabaseAdapter, U as UUID, E as Entity, C as Component, M as Memory, L as Log, a as MemoryMetadata, W as World, R as Room, P as Participant, b as Relationship, c as Agent, T as Task, d as IAgentRuntime,
|
|
2
|
-
export {
|
|
1
|
+
import { S as Service, A as Action, I as IDatabaseAdapter, U as UUID, E as Entity, C as Component, M as Memory, L as Log, a as MemoryMetadata, W as World, R as Room, P as Participant, b as Relationship, c as Agent, T as Task, d as IAgentRuntime, e as State, f as Role, g as Character, h as Evaluator, i as Provider, j as Plugin, k as ServiceTypeName, l as ModelHandler, m as Route, n as RuntimeSettings, H as HandlerCallback, o as ChannelType, p as ModelTypeName, q as ModelResultMap, r as ModelParamsMap, s as TaskWorker, t as SendHandlerFunction, u as TargetInfo, v as Content, w as Setting, x as WorldSettings, O as OnboardingConfig, y as TemplateType, z as v2 } from './index-CGCNwsoH.js';
|
|
2
|
+
export { ba as ActionEventPayload, al as ActionExample, ak as AgentStatus, aR as AudioProcessingParams, Y as BaseMetadata, aJ as BaseModelParams, ae as CacheKeyPrefix, ag as ChunkRow, ai as ComponentData, F as ContentType, bk as ControlMessage, a1 as CustomMetadata, a$ as DbConnection, a0 as DescriptionMetadata, aI as DetokenizeTextParams, af as DirectoryItem, Z as DocumentMetadata, aV as EmbeddingSearchResult, N as EnhancedState, b6 as EntityPayload, ao as EvaluationExample, bb as EvaluatorEventPayload, bg as EventDataObject, bf as EventHandler, b4 as EventPayload, be as EventPayloadMap, b2 as EventType, _ as FragmentMetadata, aH as GenerateTextParams, am as Handler, aO as ImageDescriptionParams, aN as ImageGenerationParams, b8 as InvokePayload, av as IsValidServiceType, aT as JSONSchema, ac as KnowledgeItem, ad as KnowledgeScope, D as Media, aW as MemoryRetrievalOptions, X as MemoryScope, aX as MemorySearchOptions, V as MemoryType, Q as MemoryTypeAlias, aj as MessageExample, a2 as MessageMemory, $ as MessageMetadata, b7 as MessagePayload, bd as MessageReceivedHandlerParams, b0 as MetadataObject, bc as ModelEventPayload, aG as ModelType, aY as MultiRoomMemoryOptions, aU as ObjectGenerationParams, b3 as PlatformPrefix, aq as PluginEvents, as as Project, ar as ProjectAgent, ap as ProviderResult, ah as RoomMetadata, b9 as RunEventPayload, bj as SOCKET_MESSAGE_TYPE, bn as ServiceBuilder, ax as ServiceClassMap, aF as ServiceConfig, bp as ServiceDefinition, aD as ServiceError, ay as ServiceInstance, az as ServiceRegistry, aA as ServiceType, at as ServiceTypeRegistry, au as ServiceTypeValue, K as StateArray, J as StateObject, G as StateValue, bi as TaskMetadata, bl as TestCase, bm as TestSuite, aL as TextEmbeddingParams, aK as TextGenerationParams, aQ as TextToSpeechParams, aM as TokenizeTextParams, aP as TranscriptionParams, bh as TypedEventHandler, aB as TypedService, aw as TypedServiceClass, aZ as UnifiedMemoryOptions, a_ as UnifiedSearchOptions, b1 as VECTOR_DIMS, an as Validator, aS as VideoProcessingParams, b5 as WorldPayload, B as asUUID, a3 as createMessageMemory, bo as createService, aE as createServiceError, bq as defineService, ab as getMemoryText, aC as getTypedService, a8 as isCustomMetadata, a7 as isDescriptionMetadata, a9 as isDocumentMemory, a4 as isDocumentMetadata, aa as isFragmentMemory, a5 as isFragmentMetadata, a6 as isMessageMetadata } from './index-CGCNwsoH.js';
|
|
3
|
+
import { Keypair } from '@solana/web3.js';
|
|
3
4
|
import * as pino from 'pino';
|
|
4
5
|
import { Tracer, Meter, Span, Context } from '@opentelemetry/api';
|
|
5
6
|
import * as browser from '@sentry/browser';
|
|
6
7
|
export { browser as Sentry };
|
|
7
8
|
export { i as v1 } from './index-BHW44X0A.js';
|
|
8
|
-
import './types-
|
|
9
|
+
import './types-sJIakXg4.js';
|
|
9
10
|
import './specs/v1/messages.js';
|
|
10
11
|
import './specs/v1/types.js';
|
|
11
12
|
import 'stream';
|
|
@@ -17,6 +18,278 @@ import './specs/v1/actionExample.js';
|
|
|
17
18
|
import './specs/v1/provider.js';
|
|
18
19
|
import './specs/v1/templates.js';
|
|
19
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Represents an agent's registration details within a Trusted Execution Environment (TEE) context.
|
|
23
|
+
* This is typically stored in a database table (e.g., `TeeAgent`) to manage agents operating in a TEE.
|
|
24
|
+
* It allows for multiple registrations of the same `agentId` to support scenarios where an agent might restart,
|
|
25
|
+
* generating a new keypair and attestation each time.
|
|
26
|
+
*/
|
|
27
|
+
interface TeeAgent {
|
|
28
|
+
/** Primary key for the TEE agent registration record (e.g., a UUID or auto-incrementing ID). */
|
|
29
|
+
id: string;
|
|
30
|
+
/** The core identifier of the agent, which can be duplicated across multiple TEE registrations. */
|
|
31
|
+
agentId: string;
|
|
32
|
+
/** The human-readable name of the agent. */
|
|
33
|
+
agentName: string;
|
|
34
|
+
/** Timestamp (e.g., Unix epoch in milliseconds) when this TEE registration was created. */
|
|
35
|
+
createdAt: number;
|
|
36
|
+
/** The public key associated with this specific TEE agent instance/session. */
|
|
37
|
+
publicKey: string;
|
|
38
|
+
/** The attestation document proving the authenticity and integrity of the TEE instance. */
|
|
39
|
+
attestation: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Defines the operational modes for a Trusted Execution Environment (TEE).
|
|
43
|
+
* This enum is used to configure how TEE functionalities are engaged, allowing for
|
|
44
|
+
* different setups for local development, Docker-based development, and production.
|
|
45
|
+
*/
|
|
46
|
+
declare enum TEEMode {
|
|
47
|
+
/** TEE functionality is completely disabled. */
|
|
48
|
+
OFF = "OFF",
|
|
49
|
+
/** For local development, potentially using a TEE simulator. */
|
|
50
|
+
LOCAL = "LOCAL",// For local development with simulator
|
|
51
|
+
/** For Docker-based development environments, possibly with a TEE simulator. */
|
|
52
|
+
DOCKER = "DOCKER",// For docker development with simulator
|
|
53
|
+
/** For production deployments, using actual TEE hardware without a simulator. */
|
|
54
|
+
PRODUCTION = "PRODUCTION"
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Represents a quote obtained during remote attestation for a Trusted Execution Environment (TEE).
|
|
58
|
+
* This quote is a piece of evidence provided by the TEE, cryptographically signed, which can be
|
|
59
|
+
* verified by a relying party to ensure the TEE's integrity and authenticity.
|
|
60
|
+
*/
|
|
61
|
+
interface RemoteAttestationQuote {
|
|
62
|
+
/** The attestation quote data, typically a base64 encoded string or similar format. */
|
|
63
|
+
quote: string;
|
|
64
|
+
/** Timestamp (e.g., Unix epoch in milliseconds) when the quote was generated or received. */
|
|
65
|
+
timestamp: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Data structure used in the attestation process for deriving a key within a Trusted Execution Environment (TEE).
|
|
69
|
+
* This information helps establish a secure channel or verify the identity of the agent instance
|
|
70
|
+
* requesting key derivation.
|
|
71
|
+
*/
|
|
72
|
+
interface DeriveKeyAttestationData {
|
|
73
|
+
/** The unique identifier of the agent for which the key derivation is being attested. */
|
|
74
|
+
agentId: string;
|
|
75
|
+
/** The public key of the agent instance involved in the key derivation process. */
|
|
76
|
+
publicKey: string;
|
|
77
|
+
/** Optional subject or context information related to the key derivation. */
|
|
78
|
+
subject?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Represents a message that has been attested by a Trusted Execution Environment (TEE).
|
|
82
|
+
* This structure binds a message to an agent's identity and a timestamp, all within the
|
|
83
|
+
* context of a remote attestation process, ensuring the message originated from a trusted TEE instance.
|
|
84
|
+
*/
|
|
85
|
+
interface RemoteAttestationMessage {
|
|
86
|
+
/** The unique identifier of the agent sending the attested message. */
|
|
87
|
+
agentId: string;
|
|
88
|
+
/** Timestamp (e.g., Unix epoch in milliseconds) when the message was attested or sent. */
|
|
89
|
+
timestamp: number;
|
|
90
|
+
/** The actual message content, including details about the entity, room, and the content itself. */
|
|
91
|
+
message: {
|
|
92
|
+
entityId: string;
|
|
93
|
+
roomId: string;
|
|
94
|
+
content: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Enumerates different types or vendors of Trusted Execution Environments (TEEs).
|
|
99
|
+
* This allows the system to adapt to specific TEE technologies, like Intel TDX on DSTACK.
|
|
100
|
+
*/
|
|
101
|
+
declare enum TeeType {
|
|
102
|
+
/** Represents Intel Trusted Domain Extensions (TDX) running on DSTACK infrastructure. */
|
|
103
|
+
TDX_DSTACK = "tdx_dstack"
|
|
104
|
+
}
|
|
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
|
+
/**
|
|
114
|
+
* Configuration for a TEE (Trusted Execution Environment) plugin.
|
|
115
|
+
* This allows specifying the TEE vendor and any vendor-specific configurations.
|
|
116
|
+
* It's used to initialize and configure TEE-related functionalities within the agent system.
|
|
117
|
+
*/
|
|
118
|
+
interface TeePluginConfig {
|
|
119
|
+
/** Optional. The name or identifier of the TEE vendor (e.g., 'tdx_dstack' from `TeeType`). */
|
|
120
|
+
vendor?: string;
|
|
121
|
+
/** Optional. Vendor-specific configuration options, conforming to `TeeVendorConfig`. */
|
|
122
|
+
vendorConfig?: TeeVendorConfig;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Represents a single asset holding within a wallet.
|
|
127
|
+
* This provides a standardized view of a token or native currency.
|
|
128
|
+
*/
|
|
129
|
+
interface WalletAsset {
|
|
130
|
+
name: string;
|
|
131
|
+
symbol: string;
|
|
132
|
+
address: string;
|
|
133
|
+
decimals: number;
|
|
134
|
+
balance: string;
|
|
135
|
+
uiAmount: number;
|
|
136
|
+
priceUsd?: number;
|
|
137
|
+
valueUsd?: number;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Represents the entire portfolio of assets in a wallet.
|
|
141
|
+
*/
|
|
142
|
+
interface WalletPortfolio {
|
|
143
|
+
totalValueUsd: number;
|
|
144
|
+
assets: WalletAsset[];
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Abstract interface for a Wallet Service.
|
|
148
|
+
* Plugins that provide wallet functionality (e.g., for Solana, EVM) should implement this service.
|
|
149
|
+
* It provides a standardized way for other plugins to query the state of a wallet.
|
|
150
|
+
*/
|
|
151
|
+
declare abstract class IWalletService extends Service {
|
|
152
|
+
static readonly serviceType = "wallet";
|
|
153
|
+
readonly capabilityDescription = "Provides standardized access to wallet balances and portfolios.";
|
|
154
|
+
/**
|
|
155
|
+
* Retrieves the entire portfolio of assets held by the wallet.
|
|
156
|
+
* @param owner - Optional: The specific wallet address/owner to query if the service manages multiple.
|
|
157
|
+
* @returns A promise that resolves to the wallet's portfolio.
|
|
158
|
+
*/
|
|
159
|
+
abstract getPortfolio(owner?: string): Promise<WalletPortfolio>;
|
|
160
|
+
/**
|
|
161
|
+
* Retrieves the balance of a specific asset in the wallet.
|
|
162
|
+
* @param assetAddress - The mint address or native identifier of the asset.
|
|
163
|
+
* @param owner - Optional: The specific wallet address/owner to query.
|
|
164
|
+
* @returns A promise that resolves to the user-friendly (decimal-adjusted) balance of the asset held.
|
|
165
|
+
*/
|
|
166
|
+
abstract getBalance(assetAddress: string, owner?: string): Promise<number>;
|
|
167
|
+
}
|
|
168
|
+
|
|
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
|
+
/**
|
|
182
|
+
* A standardized representation of a liquidity pool from any DEX.
|
|
183
|
+
*/
|
|
184
|
+
type PoolInfo = {
|
|
185
|
+
id: string;
|
|
186
|
+
displayName?: string;
|
|
187
|
+
dex: string;
|
|
188
|
+
tokenA: {
|
|
189
|
+
mint: string;
|
|
190
|
+
symbol?: string;
|
|
191
|
+
reserve?: string;
|
|
192
|
+
decimals?: number;
|
|
193
|
+
};
|
|
194
|
+
tokenB: {
|
|
195
|
+
mint: string;
|
|
196
|
+
symbol?: string;
|
|
197
|
+
reserve?: string;
|
|
198
|
+
decimals?: number;
|
|
199
|
+
};
|
|
200
|
+
lpTokenMint?: string;
|
|
201
|
+
apr?: number;
|
|
202
|
+
apy?: number;
|
|
203
|
+
tvl?: number;
|
|
204
|
+
fee?: number;
|
|
205
|
+
metadata?: Record<string, any>;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* A standardized representation of a user's position in a liquidity pool.
|
|
209
|
+
*/
|
|
210
|
+
type LpPositionDetails = {
|
|
211
|
+
poolId: string;
|
|
212
|
+
dex: string;
|
|
213
|
+
lpTokenBalance: TokenBalance;
|
|
214
|
+
underlyingTokens: TokenBalance[];
|
|
215
|
+
valueUsd?: number;
|
|
216
|
+
accruedFees?: TokenBalance[];
|
|
217
|
+
rewards?: TokenBalance[];
|
|
218
|
+
metadata?: Record<string, any>;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* A standardized result for blockchain transactions.
|
|
222
|
+
*/
|
|
223
|
+
type TransactionResult = {
|
|
224
|
+
success: boolean;
|
|
225
|
+
transactionId?: string;
|
|
226
|
+
error?: string;
|
|
227
|
+
data?: any;
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Abstract interface for a Liquidity Pool Service.
|
|
231
|
+
* DEX-specific plugins (e.g., for Orca, Raydium) must implement this service
|
|
232
|
+
* to allow the LP Manager to interact with them in a standardized way.
|
|
233
|
+
*/
|
|
234
|
+
declare abstract class ILpService extends Service {
|
|
235
|
+
static readonly serviceType = "lp";
|
|
236
|
+
readonly capabilityDescription = "Provides standardized access to DEX liquidity pools.";
|
|
237
|
+
/**
|
|
238
|
+
* Returns the name of the DEX this service interacts with.
|
|
239
|
+
* @returns The name of the DEX (e.g., "Orca", "Raydium").
|
|
240
|
+
*/
|
|
241
|
+
abstract getDexName(): string;
|
|
242
|
+
/**
|
|
243
|
+
* Fetches a list of available liquidity pools from the DEX.
|
|
244
|
+
* @param tokenAMint - Optional: Filter pools by the mint address of the first token.
|
|
245
|
+
* @param tokenBMint - Optional: Filter pools by the mint address of the second token.
|
|
246
|
+
* @returns A promise that resolves to an array of standardized PoolInfo objects.
|
|
247
|
+
*/
|
|
248
|
+
abstract getPools(tokenAMint?: string, tokenBMint?: string): Promise<PoolInfo[]>;
|
|
249
|
+
/**
|
|
250
|
+
* Adds liquidity to a specified pool.
|
|
251
|
+
* @param params - The parameters for adding liquidity.
|
|
252
|
+
* @returns A promise resolving to a transaction result, including the LP tokens received.
|
|
253
|
+
*/
|
|
254
|
+
abstract addLiquidity(params: {
|
|
255
|
+
userVault: Keypair;
|
|
256
|
+
poolId: string;
|
|
257
|
+
tokenAAmountLamports: string;
|
|
258
|
+
tokenBAmountLamports?: string;
|
|
259
|
+
slippageBps: number;
|
|
260
|
+
tickLowerIndex?: number;
|
|
261
|
+
tickUpperIndex?: number;
|
|
262
|
+
}): Promise<TransactionResult & {
|
|
263
|
+
lpTokensReceived?: TokenBalance;
|
|
264
|
+
}>;
|
|
265
|
+
/**
|
|
266
|
+
* Removes liquidity from a specified pool.
|
|
267
|
+
* @param params - The parameters for removing liquidity.
|
|
268
|
+
* @returns A promise resolving to a transaction result, including the tokens received.
|
|
269
|
+
*/
|
|
270
|
+
abstract removeLiquidity(params: {
|
|
271
|
+
userVault: Keypair;
|
|
272
|
+
poolId: string;
|
|
273
|
+
lpTokenAmountLamports: string;
|
|
274
|
+
slippageBps: number;
|
|
275
|
+
}): Promise<TransactionResult & {
|
|
276
|
+
tokensReceived?: TokenBalance[];
|
|
277
|
+
}>;
|
|
278
|
+
/**
|
|
279
|
+
* Fetches the details of a specific LP position for a user.
|
|
280
|
+
* @param userAccountPublicKey - The user's wallet public key.
|
|
281
|
+
* @param poolOrPositionIdentifier - The identifier for the pool or a specific position (e.g., position NFT mint).
|
|
282
|
+
* @returns A promise resolving to the position details or null if not found.
|
|
283
|
+
*/
|
|
284
|
+
abstract getLpPositionDetails(userAccountPublicKey: string, poolOrPositionIdentifier: string): Promise<LpPositionDetails | null>;
|
|
285
|
+
/**
|
|
286
|
+
* Fetches the latest market data (e.g., APY, TVL) for a list of pools.
|
|
287
|
+
* @param poolIds - An array of pool IDs to fetch data for.
|
|
288
|
+
* @returns A promise resolving to a map of pool IDs to their partial market data.
|
|
289
|
+
*/
|
|
290
|
+
abstract getMarketDataForPools(poolIds: string[]): Promise<Record<string, Partial<PoolInfo>>>;
|
|
291
|
+
}
|
|
292
|
+
|
|
20
293
|
/**
|
|
21
294
|
* Composes a set of example conversations based on provided actions and a specified count.
|
|
22
295
|
* It randomly selects examples from the provided actions and formats them with generated names.
|
|
@@ -423,12 +696,6 @@ declare abstract class DatabaseAdapter<DB = unknown> implements IDatabaseAdapter
|
|
|
423
696
|
* @returns A Promise that resolves to a boolean indicating success or failure of the deletion.
|
|
424
697
|
*/
|
|
425
698
|
abstract deleteAgent(agentId: UUID): Promise<boolean>;
|
|
426
|
-
/**
|
|
427
|
-
* Ensures an agent exists in the database.
|
|
428
|
-
* @param agent The agent object to ensure exists.
|
|
429
|
-
* @returns A Promise that resolves when the agent has been ensured to exist.
|
|
430
|
-
*/
|
|
431
|
-
abstract ensureAgentExists(agent: Partial<Agent>): Promise<Agent>;
|
|
432
699
|
/**
|
|
433
700
|
* Ensures an embedding dimension exists in the database.
|
|
434
701
|
* @param dimension The dimension to ensure exists.
|
|
@@ -906,6 +1173,73 @@ declare class AgentRuntime implements IAgentRuntime {
|
|
|
906
1173
|
}): Promise<Memory[]>;
|
|
907
1174
|
}
|
|
908
1175
|
|
|
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
|
+
|
|
909
1243
|
/**
|
|
910
1244
|
* Creates a new Setting object based on provided config settings.
|
|
911
1245
|
* @param {Omit<Setting, "value">} configSetting - The configuration settings for the new Setting object.
|
|
@@ -1166,4 +1500,4 @@ declare function stringToUuid(target: string | number): UUID;
|
|
|
1166
1500
|
|
|
1167
1501
|
declare const defaultSpec: typeof v2;
|
|
1168
1502
|
|
|
1169
|
-
export { Action, Agent, AgentRuntime, ChannelType, Character, Component, Content, DatabaseAdapter, Entity, Evaluator, HandlerCallback, IAgentRuntime, IDatabaseAdapter, type IInstrumentationService, type InstrumentationConfig, InstrumentationService, Log, Memory, MemoryMetadata, ModelHandler, ModelParamsMap, ModelResultMap, ModelTypeName, OnboardingConfig, Participant, Plugin, Provider, Relationship, Role, Room, Route, RuntimeSettings, Semaphore, SendHandlerFunction, type ServerOwnershipState, Service, ServiceTypeName, Setting, State, TargetInfo, Task, TaskWorker, TemplateType, UUID, 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 };
|
|
1503
|
+
export { Action, Agent, AgentRuntime, ChannelType, Character, Component, Content, DatabaseAdapter, type DeriveKeyAttestationData, Entity, Evaluator, HandlerCallback, IAgentRuntime, IDatabaseAdapter, type IInstrumentationService, ILpService, type ITokenDataService, IWalletService, type InstrumentationConfig, InstrumentationService, Log, type LpPositionDetails, Memory, MemoryMetadata, 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, TOKEN_DATA_SERVICE_NAME, TargetInfo, Task, TaskWorker, type TeeAgent, type TeePluginConfig, TeeType, type TeeVendorConfig, 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
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
ContentType,
|
|
7
7
|
DatabaseAdapter,
|
|
8
8
|
EventType,
|
|
9
|
+
ILpService,
|
|
10
|
+
IWalletService,
|
|
9
11
|
InstrumentationService,
|
|
10
12
|
KnowledgeScope,
|
|
11
13
|
MemoryType,
|
|
@@ -19,6 +21,7 @@ import {
|
|
|
19
21
|
ServiceBuilder,
|
|
20
22
|
ServiceType,
|
|
21
23
|
TEEMode,
|
|
24
|
+
TOKEN_DATA_SERVICE_NAME,
|
|
22
25
|
TeeType,
|
|
23
26
|
VECTOR_DIMS,
|
|
24
27
|
addHeader,
|
|
@@ -86,7 +89,7 @@ import {
|
|
|
86
89
|
v1_exports,
|
|
87
90
|
v2_exports,
|
|
88
91
|
validateUuid
|
|
89
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-Y4TJIR4A.js";
|
|
90
93
|
import "./chunk-2HSL25IJ.js";
|
|
91
94
|
import "./chunk-FEPOSPNK.js";
|
|
92
95
|
import "./chunk-U2ADTLZY.js";
|
|
@@ -101,6 +104,8 @@ export {
|
|
|
101
104
|
ContentType,
|
|
102
105
|
DatabaseAdapter,
|
|
103
106
|
EventType,
|
|
107
|
+
ILpService,
|
|
108
|
+
IWalletService,
|
|
104
109
|
InstrumentationService,
|
|
105
110
|
KnowledgeScope,
|
|
106
111
|
MemoryType,
|
|
@@ -114,6 +119,7 @@ export {
|
|
|
114
119
|
ServiceBuilder,
|
|
115
120
|
ServiceType,
|
|
116
121
|
TEEMode,
|
|
122
|
+
TOKEN_DATA_SERVICE_NAME,
|
|
117
123
|
TeeType,
|
|
118
124
|
VECTOR_DIMS,
|
|
119
125
|
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-sJIakXg4.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-sJIakXg4.js';
|
package/dist/specs/v1/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
formatMessages3 as formatMessages,
|
|
4
4
|
formatTimestamp3 as formatTimestamp,
|
|
5
5
|
getActorDetails
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-Y4TJIR4A.js";
|
|
7
7
|
import "../../chunk-2HSL25IJ.js";
|
|
8
8
|
import "../../chunk-FEPOSPNK.js";
|
|
9
9
|
import "../../chunk-U2ADTLZY.js";
|
package/dist/specs/v1/posts.js
CHANGED
package/dist/specs/v1/runtime.js
CHANGED
package/dist/specs/v1/state.d.ts
CHANGED
package/dist/specs/v1/uuid.js
CHANGED
package/dist/specs/v2/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as Action, v as ActionEventPayload, A as ActionExample, f as Agent, w as AgentStatus, x as AudioProcessingParams, B as BaseMetadata, y as BaseModelParams, z as CacheKeyPrefix, D as ChannelType, l as Character, F as ChunkRow, b as Component, G as ComponentData, C as Content, J as ContentType, K as ControlMessage, N as CustomMetadata, O as DbConnection, Q as DeriveKeyAttestationData, V as DescriptionMetadata, X as DetokenizeTextParams, Y as DirectoryItem, Z as DocumentMetadata, _ as EmbeddingSearchResult, $ as EnhancedState, E as Entity, a0 as EntityPayload, a1 as EvaluationExample, m as Evaluator, a2 as EvaluatorEventPayload, a3 as EventDataObject, a4 as EventHandler, a5 as EventPayload, a6 as EventPayloadMap, a7 as EventType, a8 as FragmentMetadata, a9 as GenerateTextParams, aa as Handler, H as HandlerCallback, g as IAgentRuntime, I as IDatabaseAdapter, ab as ImageDescriptionParams, ac as ImageGenerationParams, ad as InvokePayload, ae as IsValidServiceType, af as JSONSchema, ag as KnowledgeItem, ah as KnowledgeScope, L as Log, ai as Media, M as Memory, c as MemoryMetadata, aj as MemoryRetrievalOptions, ak as MemoryScope, al as MemorySearchOptions, am as MemoryType, an as MemoryTypeAlias, ao as MessageExample, ap as MessageMemory, aq as MessageMetadata, ar as MessagePayload, as as MessageReceivedHandlerParams, at as MetadataObject, au as ModelEventPayload, av as ModelHandler, r as ModelParamsMap, q as ModelResultMap, aw as ModelType, p as ModelTypeName, ax as MultiRoomMemoryOptions, ay as ObjectGenerationParams, az as OnboardingConfig, d as Participant, aA as PlatformPrefix, n as Plugin, aB as PluginEvents, aC as Project, aD as ProjectAgent, P as Provider, aE as ProviderResult, e as Relationship, aF as RemoteAttestationMessage, aG as RemoteAttestationQuote, h as Role, R as Room, aH as RoomMetadata, k as Route, aI as RunEventPayload, o as RuntimeSettings, aJ as SOCKET_MESSAGE_TYPE, aK as SendHandlerFunction, j as Service, aL as ServiceClassMap, aM as ServiceConfig, aN as ServiceError, aO as ServiceInstance, aP as ServiceRegistry, aQ as ServiceType, i as ServiceTypeName, aR as ServiceTypeRegistry, aS as ServiceTypeValue, aT as Setting, S as State, aU as StateArray, aV as StateObject, aW as StateValue, aX as TEEMode, t as TargetInfo, T as Task, aY as TaskMetadata, s as TaskWorker, aZ as TeeAgent, a_ as TeePluginConfig, a$ as TeeType, b0 as TeeVendorConfig, u as TemplateType, b1 as TestCase, b2 as TestSuite, b3 as TextEmbeddingParams, b4 as TextGenerationParams, b5 as TextToSpeechParams, b6 as TokenizeTextParams, b7 as TranscriptionParams, b8 as TypedEventHandler, b9 as TypedService, ba as TypedServiceClass, U as UUID, bb as UnifiedMemoryOptions, bc as UnifiedSearchOptions, bd as VECTOR_DIMS, be as Validator, bf as VideoProcessingParams, W as World, bg as WorldPayload, bh as WorldSettings, bi as asUUID, bj as createMessageMemory, bk as createServiceError, bl as getMemoryText, bm as getTypedService, bn as isCustomMetadata, bo as isDescriptionMetadata, bp as isDocumentMemory, bq as isDocumentMetadata, br as isFragmentMemory, bs as isFragmentMetadata, bt as isMessageMetadata } from '../../types-
|
|
2
|
-
export {
|
|
1
|
+
export { a as Action, v as ActionEventPayload, A as ActionExample, f as Agent, w as AgentStatus, x as AudioProcessingParams, B as BaseMetadata, y as BaseModelParams, z as CacheKeyPrefix, D as ChannelType, l as Character, F as ChunkRow, b as Component, G as ComponentData, C as Content, J as ContentType, K as ControlMessage, N as CustomMetadata, O as DbConnection, Q as DeriveKeyAttestationData, V as DescriptionMetadata, X as DetokenizeTextParams, Y as DirectoryItem, Z as DocumentMetadata, _ as EmbeddingSearchResult, $ as EnhancedState, E as Entity, a0 as EntityPayload, a1 as EvaluationExample, m as Evaluator, a2 as EvaluatorEventPayload, a3 as EventDataObject, a4 as EventHandler, a5 as EventPayload, a6 as EventPayloadMap, a7 as EventType, a8 as FragmentMetadata, a9 as GenerateTextParams, aa as Handler, H as HandlerCallback, g as IAgentRuntime, I as IDatabaseAdapter, ab as ImageDescriptionParams, ac as ImageGenerationParams, ad as InvokePayload, ae as IsValidServiceType, af as JSONSchema, ag as KnowledgeItem, ah as KnowledgeScope, L as Log, ai as Media, M as Memory, c as MemoryMetadata, aj as MemoryRetrievalOptions, ak as MemoryScope, al as MemorySearchOptions, am as MemoryType, an as MemoryTypeAlias, ao as MessageExample, ap as MessageMemory, aq as MessageMetadata, ar as MessagePayload, as as MessageReceivedHandlerParams, at as MetadataObject, au as ModelEventPayload, av as ModelHandler, r as ModelParamsMap, q as ModelResultMap, aw as ModelType, p as ModelTypeName, ax as MultiRoomMemoryOptions, ay as ObjectGenerationParams, az as OnboardingConfig, d as Participant, aA as PlatformPrefix, n as Plugin, aB as PluginEvents, aC as Project, aD as ProjectAgent, P as Provider, aE as ProviderResult, e as Relationship, aF as RemoteAttestationMessage, aG as RemoteAttestationQuote, h as Role, R as Room, aH as RoomMetadata, k as Route, aI as RunEventPayload, o as RuntimeSettings, aJ as SOCKET_MESSAGE_TYPE, aK as SendHandlerFunction, j as Service, aL as ServiceClassMap, aM as ServiceConfig, aN as ServiceError, aO as ServiceInstance, aP as ServiceRegistry, aQ as ServiceType, i as ServiceTypeName, aR as ServiceTypeRegistry, aS as ServiceTypeValue, aT as Setting, S as State, aU as StateArray, aV as StateObject, aW as StateValue, aX as TEEMode, t as TargetInfo, T as Task, aY as TaskMetadata, s as TaskWorker, aZ as TeeAgent, a_ as TeePluginConfig, a$ as TeeType, b0 as TeeVendorConfig, u as TemplateType, b1 as TestCase, b2 as TestSuite, b3 as TextEmbeddingParams, b4 as TextGenerationParams, b5 as TextToSpeechParams, b6 as TokenizeTextParams, b7 as TranscriptionParams, b8 as TypedEventHandler, b9 as TypedService, ba as TypedServiceClass, U as UUID, bb as UnifiedMemoryOptions, bc as UnifiedSearchOptions, bd as VECTOR_DIMS, be as Validator, bf as VideoProcessingParams, W as World, bg as WorldPayload, bh as WorldSettings, bi as asUUID, bj as createMessageMemory, bk as createServiceError, bl as getMemoryText, bm as getTypedService, bn as isCustomMetadata, bo as isDescriptionMetadata, bp as isDocumentMemory, bq as isDocumentMetadata, br as isFragmentMemory, bs as isFragmentMetadata, bt as isMessageMetadata } from '../../types-sJIakXg4.js';
|
|
2
|
+
export { bK as AgentRuntime, bu as DatabaseAdapter, bJ as Semaphore, bG as ServerOwnershipState, cc as ServiceBuilder, ce as ServiceDefinition, c0 as addHeader, bE as booleanFooter, br as composeActionExamples, b_ as composePrompt, b$ as composePromptFromState, cd as createService, bM as createSettingFromConfig, bw as createUniqueUuid, bZ as decryptObjectValues, bL as decryptSecret, bL as decryptStringValue, bX as decryptedCharacter, cf as defineService, bA as elizaLogger, bY as encryptObjectValues, bO as encryptStringValue, bW as encryptedCharacter, bv as findEntityByName, bI as findWorldsForOwner, bs as formatActionNames, bt as formatActions, by as formatEntities, c2 as formatMessages, c1 as formatPosts, c3 as formatTimestamp, bx as getEntityDetails, bN as getSalt, bH as getUserServerRole, bU as getWorldSettings, bF as imageDescriptionTemplate, bV as initializeOnboarding, bz as logger, bC as messageHandlerTemplate, c9 as parseBooleanFromText, c8 as parseJSONObjectFromText, c7 as parseKeyValueXml, bD as postCreationTemplate, ca as safeReplacer, bP as saltSettingValue, bR as saltWorldSettings, bB as shouldRespondTemplate, c5 as stringToUuid, cb as trimTokens, c6 as truncateToCompleteSentence, bQ as unsaltSettingValue, bS as unsaltWorldSettings, bT as updateWorldSettings, c4 as validateUuid } from '../../index-CGCNwsoH.js';
|
package/dist/specs/v2/index.js
CHANGED
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
unsaltWorldSettings2 as unsaltWorldSettings,
|
|
79
79
|
updateWorldSettings2 as updateWorldSettings,
|
|
80
80
|
validateUuid2 as validateUuid
|
|
81
|
-
} from "../../chunk-
|
|
81
|
+
} from "../../chunk-Y4TJIR4A.js";
|
|
82
82
|
import "../../chunk-2HSL25IJ.js";
|
|
83
83
|
import "../../chunk-FEPOSPNK.js";
|
|
84
84
|
import "../../chunk-U2ADTLZY.js";
|
|
@@ -671,7 +671,6 @@ interface IDatabaseAdapter {
|
|
|
671
671
|
createAgent(agent: Partial<Agent>): Promise<boolean>;
|
|
672
672
|
updateAgent(agentId: UUID, agent: Partial<Agent>): Promise<boolean>;
|
|
673
673
|
deleteAgent(agentId: UUID): Promise<boolean>;
|
|
674
|
-
ensureAgentExists(agent: Partial<Agent>): Promise<Agent>;
|
|
675
674
|
ensureEmbeddingDimension(dimension: number): Promise<void>;
|
|
676
675
|
/** Get entity by IDs */
|
|
677
676
|
getEntityByIds(entityIds: UUID[]): Promise<Entity[] | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"publishConfig": {
|
|
101
101
|
"access": "public"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "f856bb24b382729f14796f7b3368a7d3c2fea119"
|
|
104
104
|
}
|