@elizaos/core 1.0.8 → 1.0.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/{chunk-6EXKM3O4.js → chunk-4RZR75QG.js} +115 -70
- package/dist/{index-C7vN6HiA.d.ts → index-BQQJMuGB.d.ts} +20 -2
- package/dist/index.d.ts +22 -4
- package/dist/index.js +1 -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-szUq9-0V.d.ts → types-CTfMiLYi.d.ts} +5 -1
- package/package.json +2 -2
|
@@ -717,12 +717,6 @@ var formatSelectedExamples = (examples) => {
|
|
|
717
717
|
);
|
|
718
718
|
const conversation = example.map((message) => {
|
|
719
719
|
let messageText = `${message.name}: ${message.content.text}`;
|
|
720
|
-
if (message.content.action) {
|
|
721
|
-
messageText += ` (action: ${message.content.action})`;
|
|
722
|
-
}
|
|
723
|
-
if (message.content.actions?.length) {
|
|
724
|
-
messageText += ` (actions: ${message.content.actions.join(", ")})`;
|
|
725
|
-
}
|
|
726
720
|
for (let i = 0; i < randomNames.length; i++) {
|
|
727
721
|
messageText = messageText.replaceAll(`{{name${i + 1}}}`, randomNames[i]);
|
|
728
722
|
}
|
|
@@ -1388,78 +1382,36 @@ These are the available valid actions:
|
|
|
1388
1382
|
</actionNames>
|
|
1389
1383
|
|
|
1390
1384
|
<instructions>
|
|
1391
|
-
|
|
1385
|
+
Write a thought and plan for {{agentName}} and decide what actions to take. Also include the providers that {{agentName}} will use to have the right context for responding and acting, if any.
|
|
1392
1386
|
|
|
1393
|
-
|
|
1394
|
-
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
\u2192 Perform multiple operations
|
|
1404
|
-
\u2192 Update data or settings
|
|
1387
|
+
IMPORTANT ACTION ORDERING RULES:
|
|
1388
|
+
- Actions are executed in the ORDER you list them - the order MATTERS!
|
|
1389
|
+
- REPLY should come FIRST to acknowledge the user's request before executing other actions
|
|
1390
|
+
- Common patterns:
|
|
1391
|
+
- For requests requiring tool use: REPLY,CALL_MCP_TOOL (acknowledge first, then gather info)
|
|
1392
|
+
- For task execution: REPLY,SEND_MESSAGE or REPLY,EVM_SWAP_TOKENS (acknowledge first, then do the task)
|
|
1393
|
+
- For multi-step operations: REPLY,ACTION1,ACTION2 (acknowledge first, then complete all steps)
|
|
1394
|
+
- REPLY is used to acknowledge and inform the user about what you're going to do
|
|
1395
|
+
- Follow-up actions execute the actual tasks after acknowledgment
|
|
1396
|
+
- Use IGNORE only when you should not respond at all
|
|
1405
1397
|
|
|
1406
|
-
STEP 2 - PROVIDER SELECTION (for complex responses):
|
|
1407
1398
|
IMPORTANT PROVIDER SELECTION RULES:
|
|
1408
1399
|
- 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
|
|
1409
1400
|
- If the message asks about or references specific people, include "ENTITIES" in your providers list
|
|
1410
1401
|
- If the message asks about relationships or connections between people, include "RELATIONSHIPS" in your providers list
|
|
1411
1402
|
- If the message asks about facts or specific information, include "FACTS" in your providers list
|
|
1412
1403
|
- If the message asks about the environment or world context, include "WORLD" in your providers list
|
|
1413
|
-
-
|
|
1414
|
-
- Some actions may require specific providers (this will be clear from the action's purpose)
|
|
1415
|
-
|
|
1416
|
-
REMEMBER: It's better to check providers and find nothing than to assume you don't have information without checking!
|
|
1404
|
+
- If you need external knowledge, information, or context beyond the current conversation to provide a helpful response, include "KNOWLEDGE" in your providers list
|
|
1417
1405
|
|
|
1418
|
-
|
|
1419
|
-
For complex responses, consider the order of actions:
|
|
1420
|
-
- 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
|
|
1421
|
-
- Tool actions often handle their own responses, so you may not need a final REPLY after them
|
|
1422
|
-
- Actions should flow logically: acknowledge \u2192 gather data \u2192 process \u2192 respond
|
|
1423
|
-
|
|
1424
|
-
Think about your response as a plan:
|
|
1425
|
-
1. What is the user asking for?
|
|
1426
|
-
2. Do I need any additional context or data? (providers)
|
|
1427
|
-
3. What actions do I need to take and in what order?
|
|
1428
|
-
4. How will I communicate the results?
|
|
1406
|
+
First, think about what you want to do next and plan your actions. Then, write the next message and include the actions you plan to take.
|
|
1429
1407
|
</instructions>
|
|
1430
1408
|
|
|
1431
|
-
<output_format>
|
|
1432
|
-
First, think about what you want to do and create your plan.
|
|
1433
|
-
|
|
1434
|
-
For SIMPLE responses (text-only reply):
|
|
1435
|
-
- Set thought to explain your reasoning
|
|
1436
|
-
- Set actions to ["REPLY"]
|
|
1437
|
-
- Leave providers empty or set to []
|
|
1438
|
-
- Set text to your response message
|
|
1439
|
-
|
|
1440
|
-
For COMPLEX responses (using tools/providers):
|
|
1441
|
-
- Set thought to explain your plan and reasoning
|
|
1442
|
-
- Set actions in the order they should execute (e.g., ["REPLY", "CALL_TOOL"])
|
|
1443
|
-
- Set providers to gather needed context
|
|
1444
|
-
- Set text for your initial response (if using REPLY first)
|
|
1445
|
-
|
|
1446
|
-
Remember: Some actions like CALL_TOOL will send their own responses, so plan accordingly.
|
|
1447
|
-
</output_format>
|
|
1448
|
-
|
|
1449
|
-
<response>
|
|
1450
|
-
<thought>User asking if I know something - must check KNOWLEDGE provider first before saying I don't know</thought>
|
|
1451
|
-
<actions>REPLY</actions>
|
|
1452
|
-
<providers>KNOWLEDGE</providers>
|
|
1453
|
-
<text>Let me check if I have any information about Roxane's creator...</text>
|
|
1454
|
-
</response>
|
|
1455
|
-
</examples>
|
|
1456
|
-
|
|
1457
1409
|
<keys>
|
|
1458
|
-
"thought" should be a short description of what the agent is thinking about and
|
|
1459
|
-
"actions" should be a comma-separated list of the actions {{agentName}} plans to take
|
|
1460
|
-
"providers" should be a comma-separated list of the providers that {{agentName}} will use to have the right context for responding and acting (
|
|
1410
|
+
"thought" should be a short description of what the agent is thinking about and planning.
|
|
1411
|
+
"actions" should be a comma-separated list of the actions {{agentName}} plans to take based on the thought, IN THE ORDER THEY SHOULD BE EXECUTED (if none, use IGNORE, if simply responding with text, use REPLY)
|
|
1412
|
+
"providers" should be a comma-separated list of the providers that {{agentName}} will use to have the right context for responding and acting (NEVER use "IGNORE" as a provider - use specific provider names like ATTACHMENTS, ENTITIES, FACTS, KNOWLEDGE, etc.)
|
|
1461
1413
|
"evaluators" should be an optional comma-separated list of the evaluators that {{agentName}} will use to evaluate the conversation after responding
|
|
1462
|
-
"text" should be the text of the next message for {{agentName}}
|
|
1414
|
+
"text" should be the text of the next message for {{agentName}} which they will send to the conversation.
|
|
1463
1415
|
</keys>
|
|
1464
1416
|
|
|
1465
1417
|
<output>
|
|
@@ -2639,9 +2591,9 @@ var AgentRuntime = class {
|
|
|
2639
2591
|
this.character = opts.character;
|
|
2640
2592
|
const logLevel = process.env.LOG_LEVEL || "info";
|
|
2641
2593
|
this.logger = createLogger({
|
|
2642
|
-
agentName: this.character?.name
|
|
2594
|
+
agentName: this.character?.name,
|
|
2595
|
+
logLevel
|
|
2643
2596
|
});
|
|
2644
|
-
this.logger.debug(`[AgentRuntime] Process working directory: ${process.cwd()}`);
|
|
2645
2597
|
this.#conversationLength = opts.conversationLength ?? this.#conversationLength;
|
|
2646
2598
|
if (opts.adapter) {
|
|
2647
2599
|
this.registerDatabaseAdapter(opts.adapter);
|
|
@@ -2658,8 +2610,37 @@ var AgentRuntime = class {
|
|
|
2658
2610
|
}
|
|
2659
2611
|
}
|
|
2660
2612
|
this.logger.debug(`Success: Agent ID: ${this.agentId}`);
|
|
2613
|
+
this.currentRunId = void 0;
|
|
2661
2614
|
}
|
|
2662
2615
|
#conversationLength;
|
|
2616
|
+
/**
|
|
2617
|
+
* Create a new run ID for tracking a sequence of model calls
|
|
2618
|
+
*/
|
|
2619
|
+
createRunId() {
|
|
2620
|
+
return uuidv4();
|
|
2621
|
+
}
|
|
2622
|
+
/**
|
|
2623
|
+
* Start a new run for tracking prompts
|
|
2624
|
+
*/
|
|
2625
|
+
startRun() {
|
|
2626
|
+
this.currentRunId = this.createRunId();
|
|
2627
|
+
return this.currentRunId;
|
|
2628
|
+
}
|
|
2629
|
+
/**
|
|
2630
|
+
* End the current run
|
|
2631
|
+
*/
|
|
2632
|
+
endRun() {
|
|
2633
|
+
this.currentRunId = void 0;
|
|
2634
|
+
}
|
|
2635
|
+
/**
|
|
2636
|
+
* Get the current run ID (creates one if it doesn't exist)
|
|
2637
|
+
*/
|
|
2638
|
+
getCurrentRunId() {
|
|
2639
|
+
if (!this.currentRunId) {
|
|
2640
|
+
this.currentRunId = this.createRunId();
|
|
2641
|
+
}
|
|
2642
|
+
return this.currentRunId;
|
|
2643
|
+
}
|
|
2663
2644
|
async registerPlugin(plugin) {
|
|
2664
2645
|
if (!plugin?.name) {
|
|
2665
2646
|
const errorMsg = "Plugin or plugin name is undefined";
|
|
@@ -3045,6 +3026,12 @@ var AgentRuntime = class {
|
|
|
3045
3026
|
}
|
|
3046
3027
|
try {
|
|
3047
3028
|
this.logger.debug(`Executing handler for action: ${action.name}`);
|
|
3029
|
+
const actionId = uuidv4();
|
|
3030
|
+
this.currentActionContext = {
|
|
3031
|
+
actionName: action.name,
|
|
3032
|
+
actionId,
|
|
3033
|
+
prompts: []
|
|
3034
|
+
};
|
|
3048
3035
|
const result = await action.handler(this, message, state, {}, callback, responses);
|
|
3049
3036
|
this.logger.debug(`Success: Action ${action.name} executed successfully.`);
|
|
3050
3037
|
this.adapter.log({
|
|
@@ -3053,15 +3040,20 @@ var AgentRuntime = class {
|
|
|
3053
3040
|
type: "action",
|
|
3054
3041
|
body: {
|
|
3055
3042
|
action: action.name,
|
|
3043
|
+
actionId,
|
|
3056
3044
|
message: message.content.text,
|
|
3057
3045
|
messageId: message.id,
|
|
3058
3046
|
state,
|
|
3059
|
-
responses
|
|
3047
|
+
responses,
|
|
3048
|
+
prompts: this.currentActionContext?.prompts || [],
|
|
3049
|
+
promptCount: this.currentActionContext?.prompts.length || 0
|
|
3060
3050
|
}
|
|
3061
3051
|
});
|
|
3052
|
+
this.currentActionContext = void 0;
|
|
3062
3053
|
} catch (error) {
|
|
3063
3054
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
3064
3055
|
this.logger.error(error);
|
|
3056
|
+
this.currentActionContext = void 0;
|
|
3065
3057
|
const actionMemory = {
|
|
3066
3058
|
id: uuidv4(),
|
|
3067
3059
|
content: {
|
|
@@ -3609,13 +3601,43 @@ var AgentRuntime = class {
|
|
|
3609
3601
|
`[useModel] ${modelKey} output (took ${Number(elapsedTime.toFixed(2)).toLocaleString()}ms):`,
|
|
3610
3602
|
Array.isArray(response) ? `${JSON.stringify(response.slice(0, 5))}...${JSON.stringify(response.slice(-5))} (${response.length} items)` : JSON.stringify(response, safeReplacer(), 2).replace(/\\n/g, "\n")
|
|
3611
3603
|
);
|
|
3604
|
+
if (modelKey !== ModelType2.TEXT_EMBEDDING && promptContent) {
|
|
3605
|
+
if (this.currentActionContext) {
|
|
3606
|
+
this.currentActionContext.prompts.push({
|
|
3607
|
+
modelType: modelKey,
|
|
3608
|
+
prompt: promptContent,
|
|
3609
|
+
timestamp: Date.now()
|
|
3610
|
+
});
|
|
3611
|
+
}
|
|
3612
|
+
await this.adapter.log({
|
|
3613
|
+
entityId: this.agentId,
|
|
3614
|
+
roomId: this.agentId,
|
|
3615
|
+
body: {
|
|
3616
|
+
modelType,
|
|
3617
|
+
modelKey,
|
|
3618
|
+
prompt: promptContent,
|
|
3619
|
+
runId: this.getCurrentRunId(),
|
|
3620
|
+
timestamp: Date.now(),
|
|
3621
|
+
executionTime: elapsedTime,
|
|
3622
|
+
provider: provider || this.models.get(modelKey)?.[0]?.provider || "unknown",
|
|
3623
|
+
actionContext: this.currentActionContext ? {
|
|
3624
|
+
actionName: this.currentActionContext.actionName,
|
|
3625
|
+
actionId: this.currentActionContext.actionId
|
|
3626
|
+
} : void 0
|
|
3627
|
+
},
|
|
3628
|
+
type: `prompt:${modelKey}`
|
|
3629
|
+
});
|
|
3630
|
+
}
|
|
3612
3631
|
this.adapter.log({
|
|
3613
3632
|
entityId: this.agentId,
|
|
3614
3633
|
roomId: this.agentId,
|
|
3615
3634
|
body: {
|
|
3616
3635
|
modelType,
|
|
3617
3636
|
modelKey,
|
|
3618
|
-
params:
|
|
3637
|
+
params: {
|
|
3638
|
+
...typeof params === "object" && !Array.isArray(params) && params ? params : {},
|
|
3639
|
+
prompt: promptContent
|
|
3640
|
+
},
|
|
3619
3641
|
response: Array.isArray(response) && response.every((x) => typeof x === "number") ? "[array]" : response
|
|
3620
3642
|
},
|
|
3621
3643
|
type: `useModel:${modelKey}`
|
|
@@ -5510,15 +5532,38 @@ var AgentRuntime2 = class {
|
|
|
5510
5532
|
async sendControlMessage(params) {
|
|
5511
5533
|
return this._runtime.sendControlMessage(params);
|
|
5512
5534
|
}
|
|
5535
|
+
/**
|
|
5536
|
+
* Register a message send handler for a specific source
|
|
5537
|
+
* @param source - The source identifier (e.g., 'discord', 'telegram')
|
|
5538
|
+
* @param handler - The handler function to send messages
|
|
5539
|
+
*/
|
|
5513
5540
|
registerSendHandler(source, handler) {
|
|
5514
|
-
|
|
5541
|
+
this._runtime.registerSendHandler(source, handler);
|
|
5515
5542
|
}
|
|
5543
|
+
/**
|
|
5544
|
+
* Send a message to a specific target
|
|
5545
|
+
* @param target - The target information including source and channel/user ID
|
|
5546
|
+
* @param content - The message content to send
|
|
5547
|
+
*/
|
|
5516
5548
|
async sendMessageToTarget(target, content) {
|
|
5517
5549
|
return this._runtime.sendMessageToTarget(target, content);
|
|
5518
5550
|
}
|
|
5519
5551
|
async getMemoriesByWorldId(params) {
|
|
5520
5552
|
return this._runtime.getMemoriesByWorldId(params);
|
|
5521
5553
|
}
|
|
5554
|
+
// Run tracking methods
|
|
5555
|
+
createRunId() {
|
|
5556
|
+
return this._runtime.createRunId();
|
|
5557
|
+
}
|
|
5558
|
+
startRun() {
|
|
5559
|
+
return this._runtime.startRun();
|
|
5560
|
+
}
|
|
5561
|
+
endRun() {
|
|
5562
|
+
return this._runtime.endRun();
|
|
5563
|
+
}
|
|
5564
|
+
getCurrentRunId() {
|
|
5565
|
+
return this._runtime.getCurrentRunId();
|
|
5566
|
+
}
|
|
5522
5567
|
};
|
|
5523
5568
|
|
|
5524
5569
|
// src/specs/v2/settings.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Action$1, I as IDatabaseAdapter$1, U as UUID$1, E as Entity$1, b as Component$1, M as Memory$1, L as Log$1, c as MemoryMetadata$1, W as World$1, R as Room$1, d as Participant$1, e as Relationship$1, f as Agent$1, T as Task$1, g as IAgentRuntime$1, h as Role$1, i as ServiceTypeName$1, j as Service$1, k as Route$1, l as Character$1, P as Provider$1, m as Evaluator$1, n as Plugin$1, o as RuntimeSettings$1, S as State$1, H as HandlerCallback$1, p as ModelTypeName$1, q as ModelResultMap$1, r as ModelParamsMap$1, s as TaskWorker$1, t as TargetInfo$1, C as Content$1,
|
|
1
|
+
import { a as Action$1, I as IDatabaseAdapter$1, U as UUID$1, E as Entity$1, b as Component$1, M as Memory$1, L as Log$1, c as MemoryMetadata$1, W as World$1, R as Room$1, d as Participant$1, e as Relationship$1, f as Agent$1, T as Task$1, g as IAgentRuntime$1, h as Role$1, i as ServiceTypeName$1, j as Service$1, k as Route$1, l as Character$1, P as Provider$1, m as Evaluator$1, n as Plugin$1, o as RuntimeSettings$1, S as State$1, H as HandlerCallback$1, p as ModelTypeName$1, q as ModelResultMap$1, r as ModelParamsMap$1, s as TaskWorker$1, t as SendHandlerFunction$1, u as TargetInfo$1, C as Content$1, v as TemplateType$1, w as ActionEventPayload$1, A as ActionExample$1, x as AgentStatus$1, y as AudioProcessingParams$1, B as BaseMetadata$1, z as BaseModelParams$1, D as CacheKeyPrefix$1, F as ChannelClearedPayload$1, G as ChannelType$1, J as ChunkRow$1, K as ComponentData, N as ContentType$1, O as ControlMessage$1, Q as CustomMetadata$1, V as DbConnection$1, X as DeriveKeyAttestationData, Y as DescriptionMetadata$1, Z as DetokenizeTextParams$1, _ as DirectoryItem$1, $ as DocumentMetadata$1, a0 as EmbeddingSearchResult$1, a1 as EnhancedState$1, a2 as EntityPayload$1, a3 as EvaluationExample$1, a4 as EvaluatorEventPayload$1, a5 as EventDataObject, a6 as EventHandler$1, a7 as EventPayload$1, a8 as EventPayloadMap$1, a9 as EventType$1, aa as FragmentMetadata$1, ab as GenerateTextParams$1, ac as Handler$1, ad as ImageDescriptionParams$1, ae as ImageGenerationParams$1, af as InvokePayload$1, ag as IsValidServiceType$1, ah as JSONSchema$1, ai as KnowledgeItem$1, aj as KnowledgeScope$1, ak as Media$1, al as MemoryRetrievalOptions$1, am as MemoryScope$1, an as MemorySearchOptions$1, ao as MemoryType$1, ap as MemoryTypeAlias$1, aq as MessageExample$1, ar as MessageMemory$1, as as MessageMetadata$1, at as MessagePayload$1, au as MessageReceivedHandlerParams$1, av as MetadataObject, aw as ModelEventPayload$1, ax as ModelHandler$1, ay as ModelType$1, az as MultiRoomMemoryOptions$1, aA as ObjectGenerationParams$1, aB as OnboardingConfig$1, aC as PlatformPrefix$1, aD as PluginEvents$1, aE as Project$1, aF as ProjectAgent$1, aG as ProviderResult$1, aH as RemoteAttestationMessage, aI as RemoteAttestationQuote, aJ as RoomMetadata$1, aK as RunEventPayload$1, aL as SOCKET_MESSAGE_TYPE$1, aM as ServiceClassMap$1, aN as ServiceConfig, aO as ServiceError$1, aP as ServiceInstance$1, aQ as ServiceRegistry$1, aR as ServiceType$1, aS as ServiceTypeRegistry$1, aT as ServiceTypeValue$1, aU as Setting$1, aV as StateArray$1, aW as StateObject$1, aX as StateValue$1, aY as TEEMode, aZ as TaskMetadata$1, a_ as TeeAgent, a$ as TeePluginConfig, b0 as TeeType, b1 as TeeVendorConfig, b2 as TestCase$1, b3 as TestSuite$1, b4 as TextEmbeddingParams$1, b5 as TextGenerationParams$1, b6 as TextToSpeechParams$1, b7 as TokenizeTextParams$1, b8 as TranscriptionParams$1, b9 as TypedEventHandler$1, ba as TypedService$1, bb as TypedServiceClass$1, bc as UnifiedMemoryOptions$1, bd as UnifiedSearchOptions$1, be as VECTOR_DIMS$1, bf as Validator$1, bg as VideoProcessingParams$1, bh as WorldPayload$1, bi as WorldSettings$1, bj as asUUID$1, bk as createMessageMemory$1, bl as createServiceError$1, bm as getMemoryText$1, bn as getTypedService$1, bo as isCustomMetadata$1, bp as isDescriptionMetadata$1, bq as isDocumentMemory$1, br as isDocumentMetadata$1, bs as isFragmentMemory$1, bt as isFragmentMetadata$1, bu as isMessageMetadata$1 } from './types-CTfMiLYi.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Defines a custom type UUID representing a universally unique identifier
|
|
@@ -1672,6 +1672,10 @@ interface IAgentRuntime extends IDatabaseAdapter {
|
|
|
1672
1672
|
getTaskWorker(name: string): TaskWorker | undefined;
|
|
1673
1673
|
stop(): Promise<void>;
|
|
1674
1674
|
addEmbeddingToMemory(memory: Memory): Promise<Memory>;
|
|
1675
|
+
createRunId(): UUID;
|
|
1676
|
+
startRun(): UUID;
|
|
1677
|
+
endRun(): void;
|
|
1678
|
+
getCurrentRunId(): UUID;
|
|
1675
1679
|
getEntityById(entityId: UUID): Promise<Entity | null>;
|
|
1676
1680
|
getRoom(roomId: UUID): Promise<Room | null>;
|
|
1677
1681
|
createEntity(entity: Entity): Promise<boolean>;
|
|
@@ -2711,13 +2715,27 @@ declare class AgentRuntime implements IAgentRuntime$1 {
|
|
|
2711
2715
|
action: 'enable_input' | 'disable_input';
|
|
2712
2716
|
target?: string;
|
|
2713
2717
|
}): Promise<void>;
|
|
2714
|
-
|
|
2718
|
+
/**
|
|
2719
|
+
* Register a message send handler for a specific source
|
|
2720
|
+
* @param source - The source identifier (e.g., 'discord', 'telegram')
|
|
2721
|
+
* @param handler - The handler function to send messages
|
|
2722
|
+
*/
|
|
2723
|
+
registerSendHandler(source: string, handler: SendHandlerFunction$1): void;
|
|
2724
|
+
/**
|
|
2725
|
+
* Send a message to a specific target
|
|
2726
|
+
* @param target - The target information including source and channel/user ID
|
|
2727
|
+
* @param content - The message content to send
|
|
2728
|
+
*/
|
|
2715
2729
|
sendMessageToTarget(target: TargetInfo$1, content: Content$1): Promise<void>;
|
|
2716
2730
|
getMemoriesByWorldId(params: {
|
|
2717
2731
|
worldId: UUID$1;
|
|
2718
2732
|
count?: number;
|
|
2719
2733
|
tableName?: string;
|
|
2720
2734
|
}): Promise<Memory$1[]>;
|
|
2735
|
+
createRunId(): UUID$1;
|
|
2736
|
+
startRun(): UUID$1;
|
|
2737
|
+
endRun(): void;
|
|
2738
|
+
getCurrentRunId(): UUID$1;
|
|
2721
2739
|
}
|
|
2722
2740
|
|
|
2723
2741
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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-
|
|
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-
|
|
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-BQQJMuGB.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-BQQJMuGB.js';
|
|
3
3
|
import * as pino from 'pino';
|
|
4
4
|
import * as browser from '@sentry/browser';
|
|
5
5
|
export { browser as Sentry };
|
|
6
6
|
export { i as v1 } from './index-BHW44X0A.js';
|
|
7
|
-
import './types-
|
|
7
|
+
import './types-CTfMiLYi.js';
|
|
8
8
|
import './specs/v1/messages.js';
|
|
9
9
|
import './specs/v1/types.js';
|
|
10
10
|
import 'stream';
|
|
@@ -900,7 +900,7 @@ declare let logger: pino.Logger<string, boolean>;
|
|
|
900
900
|
declare const elizaLogger: pino.Logger<string, boolean>;
|
|
901
901
|
|
|
902
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>";
|
|
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>\
|
|
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>\nWrite a thought and plan for {{agentName}} and decide what actions to take. Also include the providers that {{agentName}} will use to have the right context for responding and acting, if any.\n\nIMPORTANT ACTION ORDERING RULES:\n- Actions are executed in the ORDER you list them - the order MATTERS!\n- REPLY should come FIRST to acknowledge the user's request before executing other actions\n- Common patterns:\n - For requests requiring tool use: REPLY,CALL_MCP_TOOL (acknowledge first, then gather info)\n - For task execution: REPLY,SEND_MESSAGE or REPLY,EVM_SWAP_TOKENS (acknowledge first, then do the task)\n - For multi-step operations: REPLY,ACTION1,ACTION2 (acknowledge first, then complete all steps)\n- REPLY is used to acknowledge and inform the user about what you're going to do\n- Follow-up actions execute the actual tasks after acknowledgment\n- Use IGNORE only when you should not respond at all\n\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- If you need external knowledge, information, or context beyond the current conversation to provide a helpful response, include \"KNOWLEDGE\" in your providers list\n\nFirst, think about what you want to do next and plan your actions. Then, write the next message and include the actions you plan to take.\n</instructions>\n\n<keys>\n\"thought\" should be a short description of what the agent is thinking about and planning.\n\"actions\" should be a comma-separated list of the actions {{agentName}} plans to take based on the thought, IN THE ORDER THEY SHOULD BE EXECUTED (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 (NEVER use \"IGNORE\" as a provider - use specific provider names like ATTACHMENTS, ENTITIES, FACTS, KNOWLEDGE, etc.)\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}} which they will send to the conversation.\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>";
|
|
904
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>.";
|
|
905
905
|
declare const booleanFooter = "Respond with only a YES or a NO.";
|
|
906
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>";
|
|
@@ -974,6 +974,8 @@ declare class AgentRuntime implements IAgentRuntime {
|
|
|
974
974
|
logger: any;
|
|
975
975
|
private settings;
|
|
976
976
|
private servicesInitQueue;
|
|
977
|
+
private currentRunId?;
|
|
978
|
+
private currentActionContext?;
|
|
977
979
|
constructor(opts: {
|
|
978
980
|
conversationLength?: number;
|
|
979
981
|
agentId?: UUID;
|
|
@@ -987,6 +989,22 @@ declare class AgentRuntime implements IAgentRuntime {
|
|
|
987
989
|
};
|
|
988
990
|
allAvailablePlugins?: Plugin[];
|
|
989
991
|
});
|
|
992
|
+
/**
|
|
993
|
+
* Create a new run ID for tracking a sequence of model calls
|
|
994
|
+
*/
|
|
995
|
+
createRunId(): UUID;
|
|
996
|
+
/**
|
|
997
|
+
* Start a new run for tracking prompts
|
|
998
|
+
*/
|
|
999
|
+
startRun(): UUID;
|
|
1000
|
+
/**
|
|
1001
|
+
* End the current run
|
|
1002
|
+
*/
|
|
1003
|
+
endRun(): void;
|
|
1004
|
+
/**
|
|
1005
|
+
* Get the current run ID (creates one if it doesn't exist)
|
|
1006
|
+
*/
|
|
1007
|
+
getCurrentRunId(): UUID;
|
|
990
1008
|
registerPlugin(plugin: Plugin): Promise<void>;
|
|
991
1009
|
private resolvePluginDependencies;
|
|
992
1010
|
getAllServices(): Map<ServiceTypeName, Service>;
|
package/dist/index.js
CHANGED
|
@@ -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-CTfMiLYi.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-CTfMiLYi.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-4RZR75QG.js";
|
|
7
7
|
import "../../chunk-2HSL25IJ.js";
|
|
8
8
|
import "../../chunk-WO7Z3GE6.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,
|
|
2
|
-
export { bI as AgentRuntime, bs as DatabaseAdapter, bH as Semaphore, bE as ServerOwnershipState, ca as ServiceBuilder, cc as ServiceDefinition, b_ as addHeader, bC as booleanFooter, bp as composeActionExamples, bY as composePrompt, bZ as composePromptFromState, cb as createService, bK as createSettingFromConfig, bu as createUniqueUuid, bX as decryptObjectValues, bJ as decryptSecret, bJ as decryptStringValue, bV as decryptedCharacter, cd as defineService, by as elizaLogger, bW as encryptObjectValues, bM as encryptStringValue, bU as encryptedCharacter, bt as findEntityByName, bG as findWorldsForOwner, bq as formatActionNames, br as formatActions, bw as formatEntities, c0 as formatMessages, b$ as formatPosts, c1 as formatTimestamp, bv as getEntityDetails, bL as getSalt, bF as getUserServerRole, bS as getWorldSettings, bD as imageDescriptionTemplate, bT as initializeOnboarding, bx as logger, bA as messageHandlerTemplate, c7 as parseBooleanFromText, c6 as parseJSONObjectFromText, c5 as parseKeyValueXml, bB as postCreationTemplate, c8 as safeReplacer, bN as saltSettingValue, bP as saltWorldSettings, bz as shouldRespondTemplate, c3 as stringToUuid, c9 as trimTokens, c4 as truncateToCompleteSentence, bO as unsaltSettingValue, bQ as unsaltWorldSettings, bR as updateWorldSettings, c2 as validateUuid } from '../../index-
|
|
1
|
+
export { a as Action, w as ActionEventPayload, A as ActionExample, f as Agent, x as AgentStatus, y as AudioProcessingParams, B as BaseMetadata, z as BaseModelParams, D as CacheKeyPrefix, F as ChannelClearedPayload, G as ChannelType, l as Character, J as ChunkRow, b as Component, K as ComponentData, C as Content, N as ContentType, O as ControlMessage, Q as CustomMetadata, V as DbConnection, X as DeriveKeyAttestationData, Y as DescriptionMetadata, Z as DetokenizeTextParams, _ as DirectoryItem, $ as DocumentMetadata, a0 as EmbeddingSearchResult, a1 as EnhancedState, E as Entity, a2 as EntityPayload, a3 as EvaluationExample, m as Evaluator, a4 as EvaluatorEventPayload, a5 as EventDataObject, a6 as EventHandler, a7 as EventPayload, a8 as EventPayloadMap, a9 as EventType, aa as FragmentMetadata, ab as GenerateTextParams, ac as Handler, H as HandlerCallback, g as IAgentRuntime, I as IDatabaseAdapter, ad as ImageDescriptionParams, ae as ImageGenerationParams, af as InvokePayload, ag as IsValidServiceType, ah as JSONSchema, ai as KnowledgeItem, aj as KnowledgeScope, L as Log, ak as Media, M as Memory, c as MemoryMetadata, al as MemoryRetrievalOptions, am as MemoryScope, an as MemorySearchOptions, ao as MemoryType, ap as MemoryTypeAlias, aq as MessageExample, ar as MessageMemory, as as MessageMetadata, at as MessagePayload, au as MessageReceivedHandlerParams, av as MetadataObject, aw as ModelEventPayload, ax as ModelHandler, r as ModelParamsMap, q as ModelResultMap, ay as ModelType, p as ModelTypeName, az as MultiRoomMemoryOptions, aA as ObjectGenerationParams, aB as OnboardingConfig, d as Participant, aC as PlatformPrefix, n as Plugin, aD as PluginEvents, aE as Project, aF as ProjectAgent, P as Provider, aG as ProviderResult, e as Relationship, aH as RemoteAttestationMessage, aI as RemoteAttestationQuote, h as Role, R as Room, aJ as RoomMetadata, k as Route, aK as RunEventPayload, o as RuntimeSettings, aL as SOCKET_MESSAGE_TYPE, t as SendHandlerFunction, j as Service, aM as ServiceClassMap, aN as ServiceConfig, aO as ServiceError, aP as ServiceInstance, aQ as ServiceRegistry, aR as ServiceType, i as ServiceTypeName, aS as ServiceTypeRegistry, aT as ServiceTypeValue, aU as Setting, S as State, aV as StateArray, aW as StateObject, aX as StateValue, aY as TEEMode, u as TargetInfo, T as Task, aZ as TaskMetadata, s as TaskWorker, a_ as TeeAgent, a$ as TeePluginConfig, b0 as TeeType, b1 as TeeVendorConfig, v as TemplateType, b2 as TestCase, b3 as TestSuite, b4 as TextEmbeddingParams, b5 as TextGenerationParams, b6 as TextToSpeechParams, b7 as TokenizeTextParams, b8 as TranscriptionParams, b9 as TypedEventHandler, ba as TypedService, bb as TypedServiceClass, U as UUID, bc as UnifiedMemoryOptions, bd as UnifiedSearchOptions, be as VECTOR_DIMS, bf as Validator, bg as VideoProcessingParams, W as World, bh as WorldPayload, bi as WorldSettings, bj as asUUID, bk as createMessageMemory, bl as createServiceError, bm as getMemoryText, bn as getTypedService, bo as isCustomMetadata, bp as isDescriptionMetadata, bq as isDocumentMemory, br as isDocumentMetadata, bs as isFragmentMemory, bt as isFragmentMetadata, bu as isMessageMetadata } from '../../types-CTfMiLYi.js';
|
|
2
|
+
export { bI as AgentRuntime, bs as DatabaseAdapter, bH as Semaphore, bE as ServerOwnershipState, ca as ServiceBuilder, cc as ServiceDefinition, b_ as addHeader, bC as booleanFooter, bp as composeActionExamples, bY as composePrompt, bZ as composePromptFromState, cb as createService, bK as createSettingFromConfig, bu as createUniqueUuid, bX as decryptObjectValues, bJ as decryptSecret, bJ as decryptStringValue, bV as decryptedCharacter, cd as defineService, by as elizaLogger, bW as encryptObjectValues, bM as encryptStringValue, bU as encryptedCharacter, bt as findEntityByName, bG as findWorldsForOwner, bq as formatActionNames, br as formatActions, bw as formatEntities, c0 as formatMessages, b$ as formatPosts, c1 as formatTimestamp, bv as getEntityDetails, bL as getSalt, bF as getUserServerRole, bS as getWorldSettings, bD as imageDescriptionTemplate, bT as initializeOnboarding, bx as logger, bA as messageHandlerTemplate, c7 as parseBooleanFromText, c6 as parseJSONObjectFromText, c5 as parseKeyValueXml, bB as postCreationTemplate, c8 as safeReplacer, bN as saltSettingValue, bP as saltWorldSettings, bz as shouldRespondTemplate, c3 as stringToUuid, c9 as trimTokens, c4 as truncateToCompleteSentence, bO as unsaltSettingValue, bQ as unsaltWorldSettings, bR as updateWorldSettings, c2 as validateUuid } from '../../index-BQQJMuGB.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-4RZR75QG.js";
|
|
82
82
|
import "../../chunk-2HSL25IJ.js";
|
|
83
83
|
import "../../chunk-WO7Z3GE6.js";
|
|
84
84
|
import "../../chunk-U2ADTLZY.js";
|
|
@@ -969,6 +969,10 @@ interface IAgentRuntime extends IDatabaseAdapter {
|
|
|
969
969
|
getTaskWorker(name: string): TaskWorker | undefined;
|
|
970
970
|
stop(): Promise<void>;
|
|
971
971
|
addEmbeddingToMemory(memory: Memory): Promise<Memory>;
|
|
972
|
+
createRunId(): UUID;
|
|
973
|
+
startRun(): UUID;
|
|
974
|
+
endRun(): void;
|
|
975
|
+
getCurrentRunId(): UUID;
|
|
972
976
|
getEntityById(entityId: UUID): Promise<Entity | null>;
|
|
973
977
|
getRoom(roomId: UUID): Promise<Room | null>;
|
|
974
978
|
createEntity(entity: Entity): Promise<boolean>;
|
|
@@ -1955,4 +1959,4 @@ declare abstract class Service {
|
|
|
1955
1959
|
static stop(_runtime: IAgentRuntime): Promise<unknown>;
|
|
1956
1960
|
}
|
|
1957
1961
|
|
|
1958
|
-
export { type
|
|
1962
|
+
export { type DocumentMetadata as $, type ActionExample as A, type BaseMetadata as B, type Content as C, CacheKeyPrefix as D, type Entity as E, type ChannelClearedPayload as F, ChannelType as G, type HandlerCallback as H, type IDatabaseAdapter as I, type ChunkRow as J, type ComponentData as K, type Log as L, type Memory as M, ContentType as N, type ControlMessage as O, type Provider as P, type CustomMetadata as Q, type Room as R, type State as S, type Task as T, type UUID as U, type DbConnection as V, type World as W, type DeriveKeyAttestationData as X, type DescriptionMetadata as Y, type DetokenizeTextParams as Z, type DirectoryItem as _, type Action as a, type TeePluginConfig as a$, type EmbeddingSearchResult as a0, type EnhancedState as a1, type EntityPayload as a2, type EvaluationExample as a3, type EvaluatorEventPayload as a4, type EventDataObject as a5, type EventHandler as a6, type EventPayload as a7, type EventPayloadMap as a8, EventType as a9, type ObjectGenerationParams as aA, type OnboardingConfig as aB, PlatformPrefix as aC, type PluginEvents as aD, type Project as aE, type ProjectAgent as aF, type ProviderResult as aG, type RemoteAttestationMessage as aH, type RemoteAttestationQuote as aI, type RoomMetadata as aJ, type RunEventPayload as aK, SOCKET_MESSAGE_TYPE as aL, type ServiceClassMap as aM, type ServiceConfig as aN, type ServiceError as aO, type ServiceInstance as aP, type ServiceRegistry as aQ, ServiceType as aR, type ServiceTypeRegistry as aS, type ServiceTypeValue as aT, type Setting as aU, type StateArray as aV, type StateObject as aW, type StateValue as aX, TEEMode as aY, type TaskMetadata as aZ, type TeeAgent as a_, type FragmentMetadata as aa, type GenerateTextParams as ab, type Handler as ac, type ImageDescriptionParams as ad, type ImageGenerationParams as ae, type InvokePayload as af, type IsValidServiceType as ag, type JSONSchema as ah, type KnowledgeItem as ai, KnowledgeScope as aj, type Media as ak, type MemoryRetrievalOptions as al, type MemoryScope as am, type MemorySearchOptions as an, MemoryType as ao, type MemoryTypeAlias as ap, type MessageExample as aq, type MessageMemory as ar, type MessageMetadata as as, type MessagePayload as at, type MessageReceivedHandlerParams as au, type MetadataObject as av, type ModelEventPayload as aw, type ModelHandler as ax, ModelType as ay, type MultiRoomMemoryOptions as az, type Component as b, TeeType as b0, type TeeVendorConfig as b1, type TestCase as b2, type TestSuite as b3, type TextEmbeddingParams as b4, type TextGenerationParams as b5, type TextToSpeechParams as b6, type TokenizeTextParams as b7, type TranscriptionParams as b8, type TypedEventHandler as b9, type TypedService as ba, type TypedServiceClass as bb, type UnifiedMemoryOptions as bc, type UnifiedSearchOptions as bd, VECTOR_DIMS as be, type Validator as bf, type VideoProcessingParams as bg, type WorldPayload as bh, type WorldSettings as bi, asUUID as bj, createMessageMemory as bk, createServiceError as bl, getMemoryText as bm, getTypedService as bn, isCustomMetadata as bo, isDescriptionMetadata as bp, isDocumentMemory as bq, isDocumentMetadata as br, isFragmentMemory as bs, isFragmentMetadata as bt, isMessageMetadata as bu, type MemoryMetadata as c, type Participant as d, type Relationship as e, type Agent as f, type IAgentRuntime as g, Role as h, type ServiceTypeName as i, Service as j, type Route as k, type Character as l, type Evaluator as m, type Plugin as n, type RuntimeSettings as o, type ModelTypeName as p, type ModelResultMap as q, type ModelParamsMap as r, type TaskWorker as s, type SendHandlerFunction as t, type TargetInfo as u, type TemplateType as v, type ActionEventPayload as w, AgentStatus as x, type AudioProcessingParams as y, type BaseModelParams as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"access": "public"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "056c917d1068894f25419aa6ea7ce94b6b957c3d"
|
|
95
95
|
}
|