@elizaos/plugin-bootstrap 1.6.1-alpha.4 → 1.6.1-alpha.6

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.
Files changed (81) hide show
  1. package/dist/index.js +89 -13
  2. package/dist/index.js.map +8 -7
  3. package/package.json +4 -4
  4. package/dist/actions/choice.d.ts +0 -14
  5. package/dist/actions/choice.d.ts.map +0 -1
  6. package/dist/actions/followRoom.d.ts +0 -25
  7. package/dist/actions/followRoom.d.ts.map +0 -1
  8. package/dist/actions/ignore.d.ts +0 -26
  9. package/dist/actions/ignore.d.ts.map +0 -1
  10. package/dist/actions/imageGeneration.d.ts +0 -8
  11. package/dist/actions/imageGeneration.d.ts.map +0 -1
  12. package/dist/actions/index.d.ts +0 -14
  13. package/dist/actions/index.d.ts.map +0 -1
  14. package/dist/actions/muteRoom.d.ts +0 -28
  15. package/dist/actions/muteRoom.d.ts.map +0 -1
  16. package/dist/actions/none.d.ts +0 -15
  17. package/dist/actions/none.d.ts.map +0 -1
  18. package/dist/actions/reply.d.ts +0 -16
  19. package/dist/actions/reply.d.ts.map +0 -1
  20. package/dist/actions/roles.d.ts +0 -13
  21. package/dist/actions/roles.d.ts.map +0 -1
  22. package/dist/actions/sendMessage.d.ts +0 -15
  23. package/dist/actions/sendMessage.d.ts.map +0 -1
  24. package/dist/actions/settings.d.ts +0 -21
  25. package/dist/actions/settings.d.ts.map +0 -1
  26. package/dist/actions/unfollowRoom.d.ts +0 -13
  27. package/dist/actions/unfollowRoom.d.ts.map +0 -1
  28. package/dist/actions/unmuteRoom.d.ts +0 -24
  29. package/dist/actions/unmuteRoom.d.ts.map +0 -1
  30. package/dist/actions/updateEntity.d.ts +0 -43
  31. package/dist/actions/updateEntity.d.ts.map +0 -1
  32. package/dist/evaluators/index.d.ts +0 -2
  33. package/dist/evaluators/index.d.ts.map +0 -1
  34. package/dist/evaluators/reflection.d.ts +0 -3
  35. package/dist/evaluators/reflection.d.ts.map +0 -1
  36. package/dist/index.d.ts +0 -46
  37. package/dist/index.d.ts.map +0 -1
  38. package/dist/providers/actionState.d.ts +0 -7
  39. package/dist/providers/actionState.d.ts.map +0 -1
  40. package/dist/providers/actions.d.ts +0 -35
  41. package/dist/providers/actions.d.ts.map +0 -1
  42. package/dist/providers/anxiety.d.ts +0 -16
  43. package/dist/providers/anxiety.d.ts.map +0 -1
  44. package/dist/providers/attachments.d.ts +0 -20
  45. package/dist/providers/attachments.d.ts.map +0 -1
  46. package/dist/providers/capabilities.d.ts +0 -14
  47. package/dist/providers/capabilities.d.ts.map +0 -1
  48. package/dist/providers/character.d.ts +0 -17
  49. package/dist/providers/character.d.ts.map +0 -1
  50. package/dist/providers/choice.d.ts +0 -11
  51. package/dist/providers/choice.d.ts.map +0 -1
  52. package/dist/providers/entities.d.ts +0 -7
  53. package/dist/providers/entities.d.ts.map +0 -1
  54. package/dist/providers/evaluators.d.ts +0 -27
  55. package/dist/providers/evaluators.d.ts.map +0 -1
  56. package/dist/providers/facts.d.ts +0 -11
  57. package/dist/providers/facts.d.ts.map +0 -1
  58. package/dist/providers/index.d.ts +0 -18
  59. package/dist/providers/index.d.ts.map +0 -1
  60. package/dist/providers/providers.d.ts +0 -18
  61. package/dist/providers/providers.d.ts.map +0 -1
  62. package/dist/providers/recentMessages.d.ts +0 -14
  63. package/dist/providers/recentMessages.d.ts.map +0 -1
  64. package/dist/providers/relationships.d.ts +0 -15
  65. package/dist/providers/relationships.d.ts.map +0 -1
  66. package/dist/providers/roles.d.ts +0 -19
  67. package/dist/providers/roles.d.ts.map +0 -1
  68. package/dist/providers/settings.d.ts +0 -7
  69. package/dist/providers/settings.d.ts.map +0 -1
  70. package/dist/providers/shouldRespond.d.ts +0 -7
  71. package/dist/providers/shouldRespond.d.ts.map +0 -1
  72. package/dist/providers/time.d.ts +0 -16
  73. package/dist/providers/time.d.ts.map +0 -1
  74. package/dist/providers/world.d.ts +0 -8
  75. package/dist/providers/world.d.ts.map +0 -1
  76. package/dist/services/embedding.d.ts +0 -43
  77. package/dist/services/embedding.d.ts.map +0 -1
  78. package/dist/services/index.d.ts +0 -2
  79. package/dist/services/index.d.ts.map +0 -1
  80. package/dist/services/task.d.ts +0 -77
  81. package/dist/services/task.d.ts.map +0 -1
@@ -1,27 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,11 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,18 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,18 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,14 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,15 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,19 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
1
- import { type Provider } from '@elizaos/core';
2
- /**
3
- * Creates an settings provider with the given configuration
4
- * Updated to use world metadata instead of cache
5
- */
6
- export declare const settingsProvider: Provider;
7
- //# sourceMappingURL=settings.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,7 +0,0 @@
1
- import type { Provider } from '@elizaos/core';
2
- /**
3
- * Represents a provider that generates response examples for the agent.
4
- * @type {Provider}
5
- */
6
- export declare const shouldRespondProvider: Provider;
7
- //# sourceMappingURL=shouldRespond.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,16 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,43 +0,0 @@
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
@@ -1 +0,0 @@
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;AAWvB;;;;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;IAiCpC;;;OAGG;IACH,OAAO,CAAC,eAAe;IAsCvB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAsC5B,OAAO,CAAC,eAAe;YAcT,YAAY;YAiEZ,iBAAiB;IA0DzB,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"}
@@ -1,2 +0,0 @@
1
- export * from './task';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC"}
@@ -1,77 +0,0 @@
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
@@ -1 +0,0 @@
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;IAqExB;;;;OAIG;YACW,WAAW;IA4CzB;;;;;OAKG;WACU,IAAI,CAAC,OAAO,EAAE,aAAa;IAOxC;;OAEG;IAEG,IAAI;CAMX"}