@elizaos/core 1.6.4-alpha.1 → 1.6.4-alpha.11
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/browser/index.browser.js +56 -56
- package/dist/browser/index.browser.js.map +6 -6
- package/dist/elizaos.d.ts +119 -16
- package/dist/elizaos.d.ts.map +1 -1
- package/dist/node/index.node.js +71 -22
- package/dist/node/index.node.js.map +6 -6
- package/dist/types/messaging.d.ts +42 -0
- package/dist/types/messaging.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Content, UUID } from './primitives';
|
|
2
2
|
import type { IAgentRuntime } from './runtime';
|
|
3
|
+
import type { Memory } from './memory';
|
|
3
4
|
/**
|
|
4
5
|
* Information describing the target of a message.
|
|
5
6
|
*/
|
|
@@ -42,4 +43,45 @@ export interface ControlMessage {
|
|
|
42
43
|
/** Room ID to ensure signal is directed to the correct chat window */
|
|
43
44
|
roomId: UUID;
|
|
44
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Handler options for async message processing (User → Agent)
|
|
48
|
+
* Follows the core pattern: HandlerOptions, HandlerCallback, etc.
|
|
49
|
+
*/
|
|
50
|
+
export interface MessageHandlerOptions {
|
|
51
|
+
/**
|
|
52
|
+
* Called when the agent generates a response
|
|
53
|
+
* If provided, method returns immediately (async mode)
|
|
54
|
+
* If not provided, method waits for response (sync mode)
|
|
55
|
+
*/
|
|
56
|
+
onResponse?: (content: Content) => Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Called if an error occurs during processing
|
|
59
|
+
*/
|
|
60
|
+
onError?: (error: Error) => Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Called when processing is complete
|
|
63
|
+
*/
|
|
64
|
+
onComplete?: () => Promise<void>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Result of sending a message to an agent (User → Agent)
|
|
68
|
+
* Follows the core pattern: ActionResult, ProviderResult, GenerateTextResult, etc.
|
|
69
|
+
*/
|
|
70
|
+
export interface MessageResult {
|
|
71
|
+
/** ID of the user message */
|
|
72
|
+
messageId: UUID;
|
|
73
|
+
/** The user message that was created (only in sync mode) */
|
|
74
|
+
userMessage?: Memory;
|
|
75
|
+
/**
|
|
76
|
+
* Agent responses (only in sync mode)
|
|
77
|
+
* Empty in async mode - use onResponse callback instead
|
|
78
|
+
*/
|
|
79
|
+
agentResponses?: Content[];
|
|
80
|
+
/** Usage information for billing (only in sync mode) */
|
|
81
|
+
usage?: {
|
|
82
|
+
inputTokens: number;
|
|
83
|
+
outputTokens: number;
|
|
84
|
+
model: string;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
45
87
|
//# sourceMappingURL=messaging.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../src/types/messaging.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../src/types/messaging.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAEnB;AAED;;GAEG;AACH,MAAM,MA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E,MAAM,CAAC;KACf,CAAC;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/core",
|
|
3
|
-
"version": "1.6.4-alpha.
|
|
3
|
+
"version": "1.6.4-alpha.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "5d015eb502044c055f06a924501ae1e91f976435"
|
|
84
84
|
}
|