@elizaos/plugin-bootstrap 1.4.4 → 1.5.0
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/actions/choice.d.ts +14 -0
- package/dist/actions/choice.d.ts.map +1 -0
- package/dist/actions/followRoom.d.ts +25 -0
- package/dist/actions/followRoom.d.ts.map +1 -0
- package/dist/actions/ignore.d.ts +26 -0
- package/dist/actions/ignore.d.ts.map +1 -0
- package/dist/actions/imageGeneration.d.ts +8 -0
- package/dist/actions/imageGeneration.d.ts.map +1 -0
- package/dist/actions/index.d.ts +14 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/muteRoom.d.ts +28 -0
- package/dist/actions/muteRoom.d.ts.map +1 -0
- package/dist/actions/none.d.ts +15 -0
- package/dist/actions/none.d.ts.map +1 -0
- package/dist/actions/reply.d.ts +16 -0
- package/dist/actions/reply.d.ts.map +1 -0
- package/dist/actions/roles.d.ts +13 -0
- package/dist/actions/roles.d.ts.map +1 -0
- package/dist/actions/sendMessage.d.ts +15 -0
- package/dist/actions/sendMessage.d.ts.map +1 -0
- package/dist/actions/settings.d.ts +21 -0
- package/dist/actions/settings.d.ts.map +1 -0
- package/dist/actions/unfollowRoom.d.ts +13 -0
- package/dist/actions/unfollowRoom.d.ts.map +1 -0
- package/dist/actions/unmuteRoom.d.ts +24 -0
- package/dist/actions/unmuteRoom.d.ts.map +1 -0
- package/dist/actions/updateEntity.d.ts +43 -0
- package/dist/actions/updateEntity.d.ts.map +1 -0
- package/dist/evaluators/index.d.ts +2 -0
- package/dist/evaluators/index.d.ts.map +1 -0
- package/dist/evaluators/reflection.d.ts +3 -0
- package/dist/evaluators/reflection.d.ts.map +1 -0
- package/dist/index.d.ts +10 -421
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1196 -1268
- package/dist/index.js.map +49 -1
- package/dist/providers/actionState.d.ts +7 -0
- package/dist/providers/actionState.d.ts.map +1 -0
- package/dist/providers/actions.d.ts +35 -0
- package/dist/providers/actions.d.ts.map +1 -0
- package/dist/providers/anxiety.d.ts +16 -0
- package/dist/providers/anxiety.d.ts.map +1 -0
- package/dist/providers/attachments.d.ts +20 -0
- package/dist/providers/attachments.d.ts.map +1 -0
- package/dist/providers/capabilities.d.ts +14 -0
- package/dist/providers/capabilities.d.ts.map +1 -0
- package/dist/providers/character.d.ts +17 -0
- package/dist/providers/character.d.ts.map +1 -0
- package/dist/providers/choice.d.ts +11 -0
- package/dist/providers/choice.d.ts.map +1 -0
- package/dist/providers/entities.d.ts +7 -0
- package/dist/providers/entities.d.ts.map +1 -0
- package/dist/providers/evaluators.d.ts +27 -0
- package/dist/providers/evaluators.d.ts.map +1 -0
- package/dist/providers/facts.d.ts +11 -0
- package/dist/providers/facts.d.ts.map +1 -0
- package/dist/providers/index.d.ts +18 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/providers.d.ts +18 -0
- package/dist/providers/providers.d.ts.map +1 -0
- package/dist/providers/recentMessages.d.ts +14 -0
- package/dist/providers/recentMessages.d.ts.map +1 -0
- package/dist/providers/relationships.d.ts +15 -0
- package/dist/providers/relationships.d.ts.map +1 -0
- package/dist/providers/roles.d.ts +19 -0
- package/dist/providers/roles.d.ts.map +1 -0
- package/dist/providers/settings.d.ts +7 -0
- package/dist/providers/settings.d.ts.map +1 -0
- package/dist/providers/shouldRespond.d.ts +7 -0
- package/dist/providers/shouldRespond.d.ts.map +1 -0
- package/dist/providers/time.d.ts +16 -0
- package/dist/providers/time.d.ts.map +1 -0
- package/dist/providers/world.d.ts +8 -0
- package/dist/providers/world.d.ts.map +1 -0
- package/dist/services/embedding.d.ts +43 -0
- package/dist/services/embedding.d.ts.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/task.d.ts +77 -0
- package/dist/services/task.d.ts.map +1 -0
- package/package.json +8 -9
- package/tsup.config.ts +0 -23
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Provider for sharing action execution state and plan between actions
|
|
4
|
+
* Makes previous action results and execution plan available to subsequent actions
|
|
5
|
+
*/
|
|
6
|
+
export declare const actionStateProvider: Provider;
|
|
7
|
+
//# sourceMappingURL=actionState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actionState.d.ts","sourceRoot":"","sources":["../../src/providers/actionState.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EAGd,MAAM,eAAe,CAAC;AAEvB;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAsMjC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* A provider object that fetches possible response actions based on the provided runtime, message, and state.
|
|
4
|
+
* @type {Provider}
|
|
5
|
+
* @property {string} name - The name of the provider ("ACTIONS").
|
|
6
|
+
* @property {string} description - The description of the provider ("Possible response actions").
|
|
7
|
+
* @property {number} position - The position of the provider (-1).
|
|
8
|
+
* @property {Function} get - Asynchronous function that retrieves actions that validate for the given message.
|
|
9
|
+
* @param {IAgentRuntime} runtime - The runtime object.
|
|
10
|
+
* @param {Memory} message - The message memory.
|
|
11
|
+
* @param {State} state - The state object.
|
|
12
|
+
* @returns {Object} An object containing the actions data, values, and combined text sections.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Provider for ACTIONS
|
|
16
|
+
*
|
|
17
|
+
* @typedef {import('./Provider').Provider} Provider
|
|
18
|
+
* @typedef {import('./Runtime').IAgentRuntime} IAgentRuntime
|
|
19
|
+
* @typedef {import('./Memory').Memory} Memory
|
|
20
|
+
* @typedef {import('./State').State} State
|
|
21
|
+
* @typedef {import('./Action').Action} Action
|
|
22
|
+
*
|
|
23
|
+
* @type {Provider}
|
|
24
|
+
* @property {string} name - The name of the provider
|
|
25
|
+
* @property {string} description - Description of the provider
|
|
26
|
+
* @property {number} position - The position of the provider
|
|
27
|
+
* @property {Function} get - Asynchronous function to get actions that validate for a given message
|
|
28
|
+
*
|
|
29
|
+
* @param {IAgentRuntime} runtime - The agent runtime
|
|
30
|
+
* @param {Memory} message - The message memory
|
|
31
|
+
* @param {State} state - The state of the agent
|
|
32
|
+
* @returns {Object} Object containing data, values, and text related to actions
|
|
33
|
+
*/
|
|
34
|
+
export declare const actionsProvider: Provider;
|
|
35
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/providers/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiC,QAAQ,EAAS,MAAM,eAAe,CAAC;AAGpF;;;;;;;;;;;GAWG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,eAAe,EAAE,QAsD7B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an anxiety provider that provides examples and guidance for an AI roleplaying as a character.
|
|
4
|
+
* The anxiety provider offers suggestions on how to reduce verbosity and eagerness in responses based on the channel type.
|
|
5
|
+
* Randomly selects and returns three anxiety examples for the AI to follow.
|
|
6
|
+
*
|
|
7
|
+
* @type {Provider}
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Function that provides anxiety-related guidance for the AI based on the channel type.
|
|
11
|
+
* @param {IAgentRuntime} _runtime - The runtime environment for the AI agent
|
|
12
|
+
* @param {Memory} message - The message containing information about the channel type
|
|
13
|
+
* @returns {Object} - Object containing randomized anxiety examples, anxiety text, and formatted data
|
|
14
|
+
*/
|
|
15
|
+
export declare const anxietyProvider: Provider;
|
|
16
|
+
//# sourceMappingURL=anxiety.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anxiety.d.ts","sourceRoot":"","sources":["../../src/providers/anxiety.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,QAAQ,EAAE,MAAM,eAAe,CAAC;AAErE;;;;;;GAMG;AACH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,QA0F7B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Provides a list of attachments in the current conversation.
|
|
4
|
+
* @param {IAgentRuntime} runtime - The agent runtime object.
|
|
5
|
+
* @param {Memory} message - The message memory object.
|
|
6
|
+
* @returns {Object} The attachments values, data, and text.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Provides a list of attachments sent during the current conversation, including names, descriptions, and summaries.
|
|
10
|
+
* @type {Provider}
|
|
11
|
+
* @property {string} name - The name of the provider (ATTACHMENTS).
|
|
12
|
+
* @property {string} description - Description of the provider.
|
|
13
|
+
* @property {boolean} dynamic - Indicates if the provider is dynamic.
|
|
14
|
+
* @property {function} get - Asynchronous function that retrieves attachments based on the runtime and message provided.
|
|
15
|
+
* @param {IAgentRuntime} runtime - The runtime environment for the agent.
|
|
16
|
+
* @param {Memory} message - The message object containing content and attachments.
|
|
17
|
+
* @returns {Object} An object containing values, data, and text about the attachments retrieved.
|
|
18
|
+
*/
|
|
19
|
+
export declare const attachmentsProvider: Provider;
|
|
20
|
+
//# sourceMappingURL=attachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../src/providers/attachments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgC,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG5E;;;;;GAKG;AACH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAgGjC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Provider that collects capability descriptions from all registered services
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Provides capabilities information for the agent.
|
|
7
|
+
*
|
|
8
|
+
* @param {IAgentRuntime} runtime - The agent runtime instance.
|
|
9
|
+
* @param {Memory} _message - The memory message object.
|
|
10
|
+
* @returns {Promise<ProviderResult>} The provider result object containing capabilities information.
|
|
11
|
+
*/
|
|
12
|
+
export declare const capabilitiesProvider: Provider;
|
|
13
|
+
export default capabilitiesProvider;
|
|
14
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/providers/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,QAAQ,EAAkB,MAAM,eAAe,CAAC;AAGrF;;GAEG;AACH;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAmDlC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Character provider object.
|
|
4
|
+
* @typedef {Object} Provider
|
|
5
|
+
* @property {string} name - The name of the provider ("CHARACTER").
|
|
6
|
+
* @property {string} description - Description of the character information.
|
|
7
|
+
* @property {Function} get - Async function to get character information.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Provides character information.
|
|
11
|
+
* @param {IAgentRuntime} runtime - The agent runtime.
|
|
12
|
+
* @param {Memory} message - The message memory.
|
|
13
|
+
* @param {State} state - The state of the character.
|
|
14
|
+
* @returns {Object} Object containing values, data, and text sections.
|
|
15
|
+
*/
|
|
16
|
+
export declare const characterProvider: Provider;
|
|
17
|
+
//# sourceMappingURL=character.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character.d.ts","sourceRoot":"","sources":["../../src/providers/character.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,QAAQ,EAAS,MAAM,eAAe,CAAC;AAG5E;;;;;;GAMG;AACH;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,QA8L/B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Choice provider function that retrieves all pending tasks with options for a specific room
|
|
4
|
+
*
|
|
5
|
+
* @param {IAgentRuntime} runtime - The runtime object for the agent
|
|
6
|
+
* @param {Memory} message - The message memory object
|
|
7
|
+
* @returns {Promise<ProviderResult>} A promise that resolves with the provider result containing the pending tasks with options
|
|
8
|
+
*/
|
|
9
|
+
export declare const choiceProvider: Provider;
|
|
10
|
+
export default choiceProvider;
|
|
11
|
+
//# sourceMappingURL=choice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choice.d.ts","sourceRoot":"","sources":["../../src/providers/choice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,QAAQ,EAAyB,MAAM,eAAe,CAAC;AAqB5F;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,QA4F5B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/providers/entities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiC,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG7E;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAgC9B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Evaluator, Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Formats the names of evaluators into a comma-separated list, each enclosed in single quotes.
|
|
4
|
+
* @param evaluators - An array of evaluator objects.
|
|
5
|
+
* @returns A string that concatenates the names of all evaluators, each enclosed in single quotes and separated by commas.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Formats the names of the evaluators in the provided array.
|
|
9
|
+
*
|
|
10
|
+
* @param {Evaluator[]} evaluators - Array of evaluators.
|
|
11
|
+
* @returns {string} - Formatted string of evaluator names.
|
|
12
|
+
*/
|
|
13
|
+
export declare function formatEvaluatorNames(evaluators: Evaluator[]): string;
|
|
14
|
+
/**
|
|
15
|
+
* Formats evaluator examples into a readable string, replacing placeholders with generated names.
|
|
16
|
+
* @param evaluators - An array of evaluator objects, each containing examples to format.
|
|
17
|
+
* @returns A string that presents each evaluator example in a structured format, including context, messages, and outcomes, with placeholders replaced by generated names.
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatEvaluatorExamples(evaluators: Evaluator[]): string;
|
|
20
|
+
/**
|
|
21
|
+
* Formats evaluator details into a string, including both the name and description of each evaluator.
|
|
22
|
+
* @param evaluators - An array of evaluator objects.
|
|
23
|
+
* @returns A string that concatenates the name and description of each evaluator, separated by a colon and a newline character.
|
|
24
|
+
*/
|
|
25
|
+
export declare function formatEvaluators(evaluators: Evaluator[]): string;
|
|
26
|
+
export declare const evaluatorsProvider: Provider;
|
|
27
|
+
//# sourceMappingURL=evaluators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluators.d.ts","sourceRoot":"","sources":["../../src/providers/evaluators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,SAAS,EAGT,QAAQ,EAET,MAAM,eAAe,CAAC;AAIvB;;;;GAIG;AACH;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,SAAS,EAAE,UAE3D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,SAAS,EAAE,UAuC9D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,SAAS,EAAE,UAIvD;AAED,eAAO,MAAM,kBAAkB,EAAE,QAgDhC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Function to get key facts that the agent knows.
|
|
4
|
+
* @param {IAgentRuntime} runtime - The runtime environment for the agent.
|
|
5
|
+
* @param {Memory} message - The message object containing relevant information.
|
|
6
|
+
* @param {State} [_state] - Optional state information.
|
|
7
|
+
* @returns {Object} An object containing values, data, and text related to the key facts.
|
|
8
|
+
*/
|
|
9
|
+
declare const factsProvider: Provider;
|
|
10
|
+
export { factsProvider };
|
|
11
|
+
//# sourceMappingURL=facts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facts.d.ts","sourceRoot":"","sources":["../../src/providers/facts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,QAAQ,EAAS,MAAM,eAAe,CAAC;AAsBvF;;;;;;GAMG;AACH,QAAA,MAAM,aAAa,EAAE,QAwFpB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { actionsProvider } from './actions';
|
|
2
|
+
export { actionStateProvider } from './actionState';
|
|
3
|
+
export { anxietyProvider } from './anxiety';
|
|
4
|
+
export { attachmentsProvider } from './attachments';
|
|
5
|
+
export { capabilitiesProvider } from './capabilities';
|
|
6
|
+
export { characterProvider } from './character';
|
|
7
|
+
export { choiceProvider } from './choice';
|
|
8
|
+
export { entitiesProvider } from './entities';
|
|
9
|
+
export { evaluatorsProvider } from './evaluators';
|
|
10
|
+
export { factsProvider } from './facts';
|
|
11
|
+
export { providersProvider } from './providers';
|
|
12
|
+
export { recentMessagesProvider } from './recentMessages';
|
|
13
|
+
export { relationshipsProvider } from './relationships';
|
|
14
|
+
export { roleProvider } from './roles';
|
|
15
|
+
export { settingsProvider } from './settings';
|
|
16
|
+
export { timeProvider } from './time';
|
|
17
|
+
export { worldProvider } from './world';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Provider for retrieving list of all data providers available for the agent to use.
|
|
4
|
+
* @type { Provider }
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Object representing the providersProvider, which contains information about data providers available for the agent.
|
|
8
|
+
*
|
|
9
|
+
* @type {Provider}
|
|
10
|
+
* @property {string} name - The name of the provider ("PROVIDERS").
|
|
11
|
+
* @property {string} description - Description of the provider.
|
|
12
|
+
* @property {Function} get - Async function that filters dynamic providers, creates formatted text for each provider, and provides data for potential use.
|
|
13
|
+
* @param {IAgentRuntime} runtime - The runtime of the agent.
|
|
14
|
+
* @param {Memory} _message - The memory message.
|
|
15
|
+
* @returns {Object} An object containing the formatted text and data for potential programmatic use.
|
|
16
|
+
*/
|
|
17
|
+
export declare const providersProvider: Provider;
|
|
18
|
+
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/providers/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,QAAQ,EAAS,MAAM,eAAe,CAAC;AAG5E;;;GAGG;AACH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAsD/B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* A provider object that retrieves recent messages, interactions, and memories based on a given message.
|
|
4
|
+
* @typedef {object} Provider
|
|
5
|
+
* @property {string} name - The name of the provider ("RECENT_MESSAGES").
|
|
6
|
+
* @property {string} description - A description of the provider's purpose ("Recent messages, interactions and other memories").
|
|
7
|
+
* @property {number} position - The position of the provider (100).
|
|
8
|
+
* @property {Function} get - Asynchronous function that retrieves recent messages, interactions, and memories.
|
|
9
|
+
* @param {IAgentRuntime} runtime - The runtime context for the agent.
|
|
10
|
+
* @param {Memory} message - The message to retrieve data from.
|
|
11
|
+
* @returns {object} An object containing data, values, and text sections.
|
|
12
|
+
*/
|
|
13
|
+
export declare const recentMessagesProvider: Provider;
|
|
14
|
+
//# sourceMappingURL=recentMessages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recentMessages.d.ts","sourceRoot":"","sources":["../../src/providers/recentMessages.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,QAAQ,EAGd,MAAM,eAAe,CAAC;AAsCvB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,EAAE,QA4UpC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Provider for fetching relationships data.
|
|
4
|
+
*
|
|
5
|
+
* @type {Provider}
|
|
6
|
+
* @property {string} name - The name of the provider ("RELATIONSHIPS").
|
|
7
|
+
* @property {string} description - Description of the provider.
|
|
8
|
+
* @property {Function} get - Asynchronous function to fetch relationships data.
|
|
9
|
+
* @param {IAgentRuntime} runtime - The agent runtime object.
|
|
10
|
+
* @param {Memory} message - The message object containing entity ID.
|
|
11
|
+
* @returns {Promise<Object>} Object containing relationships data or error message.
|
|
12
|
+
*/
|
|
13
|
+
declare const relationshipsProvider: Provider;
|
|
14
|
+
export { relationshipsProvider };
|
|
15
|
+
//# sourceMappingURL=relationships.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/providers/relationships.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiC,QAAQ,EAAsB,MAAM,eAAe,CAAC;AA2EjG;;;;;;;;;;GAUG;AACH,QAAA,MAAM,qBAAqB,EAAE,QA8C5B,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Role provider that retrieves roles in the server based on the provided runtime, message, and state.
|
|
4
|
+
* * @type { Provider }
|
|
5
|
+
* @property { string } name - The name of the role provider.
|
|
6
|
+
* @property { string } description - A brief description of the role provider.
|
|
7
|
+
* @property { Function } get - Asynchronous function that retrieves and processes roles in the server.
|
|
8
|
+
* @param { IAgentRuntime } runtime - The agent runtime object.
|
|
9
|
+
* @param { Memory } message - The message memory object.
|
|
10
|
+
* @param { State } state - The state object.
|
|
11
|
+
* @returns {Promise<ProviderResult>} The result containing roles data, values, and text.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* A provider for retrieving and formatting the role hierarchy in a server.
|
|
15
|
+
* @type {Provider}
|
|
16
|
+
*/
|
|
17
|
+
export declare const roleProvider: Provider;
|
|
18
|
+
export default roleProvider;
|
|
19
|
+
//# sourceMappingURL=roles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/providers/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,QAAQ,EAId,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;GAUG;AACH;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,QA8J1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/providers/settings.ts"],"names":[],"mappings":"AAGA,OAAO,EAQL,KAAK,QAAQ,EAKd,MAAM,eAAe,CAAC;AA0GvB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAkL9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shouldRespond.d.ts","sourceRoot":"","sources":["../../src/providers/shouldRespond.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,QAAQ,EAAE,MAAM,eAAe,CAAC;AA8ErE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAgCnC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Time provider function that retrieves the current date and time in UTC
|
|
4
|
+
* for use in time-based operations or responses.
|
|
5
|
+
*
|
|
6
|
+
* @param _runtime - The runtime environment of the bot agent.
|
|
7
|
+
* @param _message - The memory object containing message data.
|
|
8
|
+
* @returns An object containing the current date and time data, human-readable date and time string,
|
|
9
|
+
* and a text response with the current date and time information.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Represents a time provider for retrieving current date and time information.
|
|
13
|
+
* @type {Provider}
|
|
14
|
+
*/
|
|
15
|
+
export declare const timeProvider: Provider;
|
|
16
|
+
//# sourceMappingURL=time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/providers/time.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,QAAQ,EAAE,MAAM,eAAe,CAAC;AAErE;;;;;;;;GAQG;AACH;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,QAsB1B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Provider } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Provider that exposes relevant world/environment information to agents.
|
|
4
|
+
* Includes details like channel list, world name, and other world metadata.
|
|
5
|
+
*/
|
|
6
|
+
export declare const worldProvider: Provider;
|
|
7
|
+
export default worldProvider;
|
|
8
|
+
//# sourceMappingURL=world.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../src/providers/world.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,QAAQ,EAId,MAAM,eAAe,CAAC;AAEvB;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,QAkM3B,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type IAgentRuntime, Service } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Service responsible for generating embeddings asynchronously
|
|
4
|
+
* This service listens for EMBEDDING_GENERATION_REQUESTED events
|
|
5
|
+
* and processes them in a queue to avoid blocking the main runtime
|
|
6
|
+
*/
|
|
7
|
+
export declare class EmbeddingGenerationService extends Service {
|
|
8
|
+
static serviceType: string;
|
|
9
|
+
capabilityDescription: string;
|
|
10
|
+
private queue;
|
|
11
|
+
private isProcessing;
|
|
12
|
+
private processingInterval;
|
|
13
|
+
private maxQueueSize;
|
|
14
|
+
private batchSize;
|
|
15
|
+
private processingIntervalMs;
|
|
16
|
+
static start(runtime: IAgentRuntime): Promise<Service>;
|
|
17
|
+
initialize(): Promise<void>;
|
|
18
|
+
private handleEmbeddingRequest;
|
|
19
|
+
/**
|
|
20
|
+
* Make room in the queue by removing items based on priority and age
|
|
21
|
+
* Removes 10% of the queue (minimum 1, maximum 10 items)
|
|
22
|
+
*/
|
|
23
|
+
private makeRoomInQueue;
|
|
24
|
+
/**
|
|
25
|
+
* Insert an item into the queue based on its priority
|
|
26
|
+
* High priority items go to the front, normal in the middle, low at the end
|
|
27
|
+
*/
|
|
28
|
+
private insertItemByPriority;
|
|
29
|
+
private startProcessing;
|
|
30
|
+
private processQueue;
|
|
31
|
+
private generateEmbedding;
|
|
32
|
+
stop(): Promise<void>;
|
|
33
|
+
getQueueSize(): number;
|
|
34
|
+
getQueueStats(): {
|
|
35
|
+
high: number;
|
|
36
|
+
normal: number;
|
|
37
|
+
low: number;
|
|
38
|
+
total: number;
|
|
39
|
+
};
|
|
40
|
+
clearQueue(): void;
|
|
41
|
+
}
|
|
42
|
+
export default EmbeddingGenerationService;
|
|
43
|
+
//# sourceMappingURL=embedding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../../src/services/embedding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,OAAO,EAKR,MAAM,eAAe,CAAC;AAUvB;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,OAAO;IACrD,MAAM,CAAC,WAAW,SAA0B;IAC5C,qBAAqB,SAA4D;IAEjF,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,kBAAkB,CAA+B;IACzD,OAAO,CAAC,YAAY,CAAQ;IAC5B,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,oBAAoB,CAAO;WAEtB,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;IAOtD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;YAanB,sBAAsB;IAgCpC;;;OAGG;IACH,OAAO,CAAC,eAAe;IAsCvB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAsC5B,OAAO,CAAC,eAAe;YAcT,YAAY;YAmDZ,iBAAiB;IA4CzB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA2B3B,YAAY,IAAI,MAAM;IAItB,aAAa,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;IAe7E,UAAU,IAAI,IAAI;CAKnB;AAED,eAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Service, type IAgentRuntime } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* TaskService class representing a service that schedules and executes tasks.
|
|
4
|
+
* @extends Service
|
|
5
|
+
* @property {NodeJS.Timeout|null} timer - Timer for executing tasks
|
|
6
|
+
* @property {number} TICK_INTERVAL - Interval in milliseconds to check for tasks
|
|
7
|
+
* @property {ServiceTypeName} serviceType - Service type of TASK
|
|
8
|
+
* @property {string} capabilityDescription - Description of the service's capability
|
|
9
|
+
* @static
|
|
10
|
+
* @method start - Static method to start the TaskService
|
|
11
|
+
* @method createTestTasks - Method to create test tasks
|
|
12
|
+
* @method startTimer - Private method to start the timer for checking tasks
|
|
13
|
+
* @method validateTasks - Private method to validate tasks
|
|
14
|
+
* @method checkTasks - Private method to check tasks and execute them
|
|
15
|
+
* @method executeTask - Private method to execute a task
|
|
16
|
+
* @static
|
|
17
|
+
* @method stop - Static method to stop the TaskService
|
|
18
|
+
* @method stop - Method to stop the TaskService
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Start the TaskService with the given runtime.
|
|
22
|
+
* @param {IAgentRuntime} runtime - The runtime for the TaskService.
|
|
23
|
+
*/
|
|
24
|
+
export declare class TaskService extends Service {
|
|
25
|
+
private timer;
|
|
26
|
+
private readonly TICK_INTERVAL;
|
|
27
|
+
static serviceType: "task";
|
|
28
|
+
capabilityDescription: string;
|
|
29
|
+
/**
|
|
30
|
+
* Start the TaskService with the given runtime.
|
|
31
|
+
* @param {IAgentRuntime} runtime - The runtime for the TaskService.
|
|
32
|
+
* @returns {Promise<Service>} A promise that resolves with the TaskService instance.
|
|
33
|
+
*/
|
|
34
|
+
static start(runtime: IAgentRuntime): Promise<Service>;
|
|
35
|
+
/**
|
|
36
|
+
* Asynchronously creates test tasks by registering task workers for repeating and one-time tasks,
|
|
37
|
+
* validates the tasks, executes the tasks, and creates the tasks if they do not already exist.
|
|
38
|
+
*/
|
|
39
|
+
createTestTasks(): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Starts a timer that runs a function to check tasks at a specified interval.
|
|
42
|
+
*/
|
|
43
|
+
private startTimer;
|
|
44
|
+
/**
|
|
45
|
+
* Validates an array of Task objects.
|
|
46
|
+
* Skips tasks without IDs or if no worker is found for the task.
|
|
47
|
+
* If a worker has a `validate` function, it will run the validation using the `runtime`, `Memory`, and `State` parameters.
|
|
48
|
+
* If the validation fails, the task will be skipped and the error will be logged.
|
|
49
|
+
* @param {Task[]} tasks - An array of Task objects to validate.
|
|
50
|
+
* @returns {Promise<Task[]>} - A Promise that resolves with an array of validated Task objects.
|
|
51
|
+
*/
|
|
52
|
+
private validateTasks;
|
|
53
|
+
/**
|
|
54
|
+
* Asynchronous method that checks tasks with "queue" tag, validates and sorts them, then executes them based on interval and tags.
|
|
55
|
+
*
|
|
56
|
+
* @returns {Promise<void>} Promise that resolves once all tasks are checked and executed
|
|
57
|
+
*/
|
|
58
|
+
private checkTasks;
|
|
59
|
+
/**
|
|
60
|
+
* Executes a given task asynchronously.
|
|
61
|
+
*
|
|
62
|
+
* @param {Task} task - The task to be executed.
|
|
63
|
+
*/
|
|
64
|
+
private executeTask;
|
|
65
|
+
/**
|
|
66
|
+
* Stops the TASK service in the given agent runtime.
|
|
67
|
+
*
|
|
68
|
+
* @param {IAgentRuntime} runtime - The agent runtime containing the service.
|
|
69
|
+
* @returns {Promise<void>} - A promise that resolves once the service has been stopped.
|
|
70
|
+
*/
|
|
71
|
+
static stop(runtime: IAgentRuntime): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Stops the timer if it is currently running.
|
|
74
|
+
*/
|
|
75
|
+
stop(): Promise<void>;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=task.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/services/task.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,OAAO,EAEP,KAAK,aAAa,EAInB,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;GAiBG;AACH;;;GAGG;AACH,qBAAa,WAAY,SAAQ,OAAO;IACtC,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAQ;IACtC,MAAM,CAAC,WAAW,SAAoB;IACtC,qBAAqB,SAAqD;IAE1E;;;;OAIG;WACU,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;IAO5D;;;OAGG;IACG,eAAe;IAoDrB;;OAEG;IACH,OAAO,CAAC,UAAU;IAclB;;;;;;;OAOG;YACW,aAAa;IAuC3B;;;;OAIG;YACW,UAAU;IAiExB;;;;OAIG;YACW,WAAW;IA4CzB;;;;;OAKG;WACU,IAAI,CAAC,OAAO,EAAE,aAAa;IAOxC;;OAEG;IAEG,IAAI;CAMX"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-bootstrap",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -22,24 +22,23 @@
|
|
|
22
22
|
"dist",
|
|
23
23
|
"scripts",
|
|
24
24
|
"package.json",
|
|
25
|
-
"LICENSE"
|
|
26
|
-
"tsup.config.ts"
|
|
25
|
+
"LICENSE"
|
|
27
26
|
],
|
|
28
27
|
"dependencies": {
|
|
29
|
-
"@elizaos/core": "1.
|
|
30
|
-
"@elizaos/plugin-sql": "1.
|
|
28
|
+
"@elizaos/core": "1.5.0",
|
|
29
|
+
"@elizaos/plugin-sql": "1.5.0",
|
|
31
30
|
"bun": "^1.2.17"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"@types/bun": "^1.2.16",
|
|
35
34
|
"@types/node": "^22.15.3",
|
|
36
35
|
"prettier": "3.5.3",
|
|
37
|
-
"
|
|
36
|
+
"typescript": "5.8.2",
|
|
38
37
|
"zod": "^3.22.4"
|
|
39
38
|
},
|
|
40
39
|
"scripts": {
|
|
41
|
-
"build": "
|
|
42
|
-
"dev": "
|
|
40
|
+
"build": "bun run build.ts",
|
|
41
|
+
"dev": "bun run build.ts --watch",
|
|
43
42
|
"lint": "prettier --write ./src",
|
|
44
43
|
"clean": "rm -rf dist .turbo node_modules .turbo-tsconfig.json tsconfig.tsbuildinfo",
|
|
45
44
|
"format": "prettier --write ./src",
|
|
@@ -54,5 +53,5 @@
|
|
|
54
53
|
"publishConfig": {
|
|
55
54
|
"access": "public"
|
|
56
55
|
},
|
|
57
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "412a6befe5a8ca2aacb99b7ba712520289dd2171"
|
|
58
57
|
}
|
package/tsup.config.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'tsup';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
entry: ['src/index.ts'],
|
|
5
|
-
outDir: 'dist',
|
|
6
|
-
tsconfig: './tsconfig.build.json', // Use build-specific tsconfig
|
|
7
|
-
sourcemap: true,
|
|
8
|
-
clean: true,
|
|
9
|
-
format: ['esm'], // Ensure you're targeting CommonJS
|
|
10
|
-
dts: true,
|
|
11
|
-
external: [
|
|
12
|
-
'dotenv', // Externalize dotenv to prevent bundling
|
|
13
|
-
'fs', // Externalize fs to use Node.js built-in module
|
|
14
|
-
'path', // Externalize other built-ins if necessary
|
|
15
|
-
'@reflink/reflink',
|
|
16
|
-
'https',
|
|
17
|
-
'http',
|
|
18
|
-
'agentkeepalive',
|
|
19
|
-
'zod',
|
|
20
|
-
'@elizaos/core',
|
|
21
|
-
// Add other modules you want to externalize
|
|
22
|
-
],
|
|
23
|
-
});
|