@elizaos/plugin-rolodex 2.0.0-alpha.3
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/__tests__/test-utils.d.ts +5 -0
- package/dist/actions/addContact.d.ts +2 -0
- package/dist/actions/index.d.ts +7 -0
- package/dist/actions/removeContact.d.ts +2 -0
- package/dist/actions/scheduleFollowUp.d.ts +2 -0
- package/dist/actions/searchContacts.d.ts +2 -0
- package/dist/actions/sendMessage.d.ts +14 -0
- package/dist/actions/updateContact.d.ts +2 -0
- package/dist/actions/updateEntity.d.ts +42 -0
- package/dist/evaluators/index.d.ts +3 -0
- package/dist/evaluators/reflection.d.ts +2 -0
- package/dist/evaluators/relationshipExtraction.d.ts +16 -0
- package/dist/frontend/utils.d.ts +2 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9759 -0
- package/dist/index.js.map +49 -0
- package/dist/providers/contacts.d.ts +2 -0
- package/dist/providers/facts.d.ts +10 -0
- package/dist/providers/followUps.d.ts +2 -0
- package/dist/providers/index.d.ts +4 -0
- package/dist/providers/relationships.d.ts +11 -0
- package/dist/services/EntityResolutionService.d.ts +76 -0
- package/dist/services/FollowUpService.d.ts +37 -0
- package/dist/services/RolodexService.d.ts +73 -0
- package/dist/services/index.d.ts +3 -0
- package/dist/tests/ConversationSimulator.d.ts +71 -0
- package/dist/tests/ScenarioVerifier.d.ts +59 -0
- package/dist/tests/e2e.test.d.ts +2 -0
- package/dist/tests/entity-graph.test.d.ts +2 -0
- package/dist/tests/index.d.ts +6 -0
- package/dist/tests/scenarios.test.d.ts +9 -0
- package/dist/types/index.d.ts +281 -0
- package/dist/utils/graphTraversal.d.ts +86 -0
- package/dist/utils/relationshipStrength.d.ts +16 -0
- package/dist/utils/similarity.d.ts +58 -0
- package/dist/utils/timeWeighting.d.ts +64 -0
- package/package.json +49 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Entity, type IAgentRuntime, type Memory, type State, type UUID } from "@elizaos/core";
|
|
2
|
+
export declare function createMockRuntime(overrides?: Partial<IAgentRuntime>): IAgentRuntime;
|
|
3
|
+
export declare function createMockMemory(overrides?: Partial<Memory>): Memory;
|
|
4
|
+
export declare function createMockState(overrides?: Partial<State>): State;
|
|
5
|
+
export declare function createMockEntity(name: string, id?: UUID): Entity;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Action } from "@elizaos/core";
|
|
2
|
+
/**
|
|
3
|
+
* Represents an action to send a message to a user or room.
|
|
4
|
+
*
|
|
5
|
+
* @typedef {Action} sendMessageAction
|
|
6
|
+
* @property {string} name - The name of the action.
|
|
7
|
+
* @property {string[]} similes - Additional names for the action.
|
|
8
|
+
* @property {string} description - Description of the action.
|
|
9
|
+
* @property {function} validate - Asynchronous function to validate if the action can be executed.
|
|
10
|
+
* @property {function} handler - Asynchronous function to handle the action execution.
|
|
11
|
+
* @property {ActionExample[][]} examples - Examples demonstrating the usage of the action.
|
|
12
|
+
*/
|
|
13
|
+
export declare const sendMessageAction: Action;
|
|
14
|
+
export default sendMessageAction;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type Action } from "@elizaos/core";
|
|
2
|
+
/**
|
|
3
|
+
* Action for updating contact details for a user entity.
|
|
4
|
+
*
|
|
5
|
+
* @name UPDATE_ENTITY
|
|
6
|
+
* @description Add or edit contact details for a user entity (like twitter, discord, email address, etc.)
|
|
7
|
+
*
|
|
8
|
+
* @param {IAgentRuntime} _runtime - The runtime environment.
|
|
9
|
+
* @param {Memory} _message - The message data.
|
|
10
|
+
* @param {State} _state - The current state.
|
|
11
|
+
* @returns {Promise<boolean>} Returns a promise indicating if validation was successful.
|
|
12
|
+
*
|
|
13
|
+
* @param {IAgentRuntime} runtime - The runtime environment.
|
|
14
|
+
* @param {Memory} message - The message data.
|
|
15
|
+
* @param {State} state - The current state.
|
|
16
|
+
* @param {any} _options - Additional options.
|
|
17
|
+
* @param {HandlerCallback} callback - The callback function.
|
|
18
|
+
* @param {Memory[]} responses - Array of responses.
|
|
19
|
+
* @returns {Promise<void>} Promise that resolves after handling the update entity action.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* [
|
|
23
|
+
* [
|
|
24
|
+
* {
|
|
25
|
+
* name: "{{name1}}",
|
|
26
|
+
* content: {
|
|
27
|
+
* text: "Please update my telegram username to @dev_guru",
|
|
28
|
+
* },
|
|
29
|
+
* },
|
|
30
|
+
* {
|
|
31
|
+
* name: "{{name2}}",
|
|
32
|
+
* content: {
|
|
33
|
+
* text: "I've updated your telegram information.",
|
|
34
|
+
* actions: ["UPDATE_ENTITY"],
|
|
35
|
+
* },
|
|
36
|
+
* },
|
|
37
|
+
* ],
|
|
38
|
+
* ...
|
|
39
|
+
* ]
|
|
40
|
+
*/
|
|
41
|
+
export declare const updateEntityAction: Action;
|
|
42
|
+
export default updateEntityAction;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Relationship Extraction Evaluator
|
|
3
|
+
*
|
|
4
|
+
* Replaces the regex-based approach with LLM-powered extraction.
|
|
5
|
+
* Runs on every message and extracts:
|
|
6
|
+
* - Platform identities (with provenance and scope)
|
|
7
|
+
* - Relationship indicators between participants
|
|
8
|
+
* - Mentioned third parties
|
|
9
|
+
* - Disputes / corrections
|
|
10
|
+
* - Privacy boundaries
|
|
11
|
+
* - Trust signals
|
|
12
|
+
*
|
|
13
|
+
* The LLM does the understanding; we do the storage and bookkeeping.
|
|
14
|
+
*/
|
|
15
|
+
import { type Evaluator } from "@elizaos/core";
|
|
16
|
+
export declare const relationshipExtractionEvaluator: Evaluator;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Plugin } from "@elizaos/core";
|
|
2
|
+
export * from "./actions/index.ts";
|
|
3
|
+
export * from "./evaluators/index.ts";
|
|
4
|
+
export * from "./providers/index.ts";
|
|
5
|
+
export * from "./services/index.ts";
|
|
6
|
+
export * from "./tests/index.ts";
|
|
7
|
+
export * from "./types/index.ts";
|
|
8
|
+
export declare const rolodexPlugin: Plugin;
|
|
9
|
+
export default rolodexPlugin;
|
|
10
|
+
export { rolodexPlugin as testExports };
|