@elizaos/core 1.0.3 → 1.0.5

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 (35) hide show
  1. package/dist/chunk-2HSL25IJ.js +40 -0
  2. package/dist/{chunk-HRFT5KDK.js → chunk-AU4RQ3C3.js} +184 -402
  3. package/dist/chunk-FEPOSPNK.js +157 -0
  4. package/dist/chunk-JX2SRFHQ.js +59 -0
  5. package/dist/chunk-SIAA4J6H.js +21 -0
  6. package/dist/chunk-U2ADTLZY.js +50 -0
  7. package/dist/chunk-YIBXLDIR.js +42 -0
  8. package/dist/index-BHW44X0A.d.ts +112 -0
  9. package/dist/{index-DVKkCFlY.d.ts → index-S6eSMHDH.d.ts} +8 -9
  10. package/dist/index.d.ts +17 -9
  11. package/dist/index.js +7 -1
  12. package/dist/specs/v1/actionExample.d.ts +41 -0
  13. package/dist/specs/v1/actionExample.js +13 -0
  14. package/dist/specs/v1/index.d.ts +10 -4
  15. package/dist/specs/v1/index.js +30 -19
  16. package/dist/specs/v1/messages.d.ts +31 -0
  17. package/dist/specs/v1/messages.js +18 -0
  18. package/dist/specs/v1/posts.d.ts +10 -0
  19. package/dist/specs/v1/posts.js +12 -0
  20. package/dist/specs/v1/provider.d.ts +21 -0
  21. package/dist/specs/v1/provider.js +10 -0
  22. package/dist/specs/v1/runtime.d.ts +146 -0
  23. package/dist/specs/v1/runtime.js +12 -0
  24. package/dist/specs/v1/state.d.ts +21 -0
  25. package/dist/specs/v1/state.js +9 -0
  26. package/dist/specs/v1/templates.d.ts +42 -0
  27. package/dist/specs/v1/templates.js +11 -0
  28. package/dist/{index-Cy9ZgQIe.d.ts → specs/v1/types.d.ts} +137 -555
  29. package/dist/specs/v1/types.js +33 -0
  30. package/dist/specs/v1/uuid.d.ts +27 -0
  31. package/dist/specs/v1/uuid.js +14 -0
  32. package/dist/specs/v2/index.d.ts +2 -4
  33. package/dist/specs/v2/index.js +7 -1
  34. package/dist/{types-DzoA9aTJ.d.ts → types-D9v-eW3g.d.ts} +4 -7
  35. package/package.json +4 -4
@@ -0,0 +1,33 @@
1
+ import {
2
+ ActionTimelineType,
3
+ CacheKeyPrefix,
4
+ CacheStore,
5
+ GoalStatus,
6
+ IrysDataType,
7
+ IrysMessageType,
8
+ KnowledgeScope,
9
+ LoggingLevel,
10
+ ModelClass,
11
+ ModelProviderName,
12
+ Service,
13
+ ServiceType,
14
+ TokenizerType,
15
+ TranscriptionProvider
16
+ } from "../../chunk-FEPOSPNK.js";
17
+ import "../../chunk-SIAA4J6H.js";
18
+ export {
19
+ ActionTimelineType,
20
+ CacheKeyPrefix,
21
+ CacheStore,
22
+ GoalStatus,
23
+ IrysDataType,
24
+ IrysMessageType,
25
+ KnowledgeScope,
26
+ LoggingLevel,
27
+ ModelClass,
28
+ ModelProviderName,
29
+ Service,
30
+ ServiceType,
31
+ TokenizerType,
32
+ TranscriptionProvider
33
+ };
@@ -0,0 +1,27 @@
1
+ import { UUID as UUID$1 } from './types.js';
2
+ import 'stream';
3
+
4
+ /**
5
+ * Represents a UUID string in the format "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
6
+ * This is a v1 compatibility wrapper for v2 UUID
7
+ */
8
+ type UUID = UUID$1;
9
+ /**
10
+ * Helper function to safely cast a string to strongly typed UUID
11
+ * Wraps V2's validateUuid function
12
+ *
13
+ * @param id The string UUID to validate and cast
14
+ * @returns The same UUID with branded type information
15
+ * @throws Error if the UUID format is invalid
16
+ */
17
+ declare function asUUID(id: string): UUID;
18
+ /**
19
+ * Generates a UUID from a string input
20
+ * Wraps V2's stringToUuid function
21
+ *
22
+ * @param input The string to convert to a UUID
23
+ * @returns A UUID generated from the input string
24
+ */
25
+ declare function generateUuidFromString(input: string): UUID;
26
+
27
+ export { type UUID, asUUID, generateUuidFromString };
@@ -0,0 +1,14 @@
1
+ import {
2
+ asUUID3 as asUUID,
3
+ generateUuidFromString
4
+ } from "../../chunk-AU4RQ3C3.js";
5
+ import "../../chunk-2HSL25IJ.js";
6
+ import "../../chunk-FEPOSPNK.js";
7
+ import "../../chunk-U2ADTLZY.js";
8
+ import "../../chunk-JX2SRFHQ.js";
9
+ import "../../chunk-YIBXLDIR.js";
10
+ import "../../chunk-SIAA4J6H.js";
11
+ export {
12
+ asUUID,
13
+ generateUuidFromString
14
+ };
@@ -1,4 +1,2 @@
1
- export { a as Action, v as ActionEventPayload, A as ActionExample, f as Agent, w as AgentStatus, x as AudioProcessingParams, B as BaseMetadata, y as BaseModelParams, z as CacheKeyPrefix, D as ChannelType, l as Character, F as ChunkRow, b as Component, G as ComponentData, C as Content, J as ContentType, K as ControlMessage, N as CustomMetadata, O as DbConnection, Q as DeriveKeyAttestationData, V as DescriptionMetadata, X as DetokenizeTextParams, Y as DirectoryItem, Z as DocumentMetadata, _ as EmbeddingSearchResult, $ as EnhancedState, E as Entity, a0 as EntityPayload, a1 as EvaluationExample, m as Evaluator, a2 as EvaluatorEventPayload, a3 as EventDataObject, a4 as EventHandler, a5 as EventPayload, a6 as EventPayloadMap, a7 as EventType, a8 as FragmentMetadata, a9 as GenerateTextParams, aa as Handler, H as HandlerCallback, g as IAgentRuntime, I as IDatabaseAdapter, ab as ImageDescriptionParams, ac as ImageGenerationParams, ad as InvokePayload, ae as IsValidServiceType, af as JSONSchema, ag as KnowledgeItem, ah as KnowledgeScope, L as Log, ai as Media, M as Memory, c as MemoryMetadata, aj as MemoryRetrievalOptions, ak as MemoryScope, al as MemorySearchOptions, am as MemoryType, an as MemoryTypeAlias, ao as MessageExample, ap as MessageMemory, aq as MessageMetadata, ar as MessagePayload, as as MessageReceivedHandlerParams, at as MetadataObject, au as ModelEventPayload, av as ModelHandler, r as ModelParamsMap, q as ModelResultMap, aw as ModelType, p as ModelTypeName, ax as MultiRoomMemoryOptions, ay as ObjectGenerationParams, az as OnboardingConfig, d as Participant, aA as PlatformPrefix, n as Plugin, aB as PluginEvents, aC as Project, aD as ProjectAgent, P as Provider, aE as ProviderResult, e as Relationship, aF as RemoteAttestationMessage, aG as RemoteAttestationQuote, h as Role, R as Room, aH as RoomMetadata, k as Route, aI as RunEventPayload, o as RuntimeSettings, aJ as SOCKET_MESSAGE_TYPE, aK as SendHandlerFunction, j as Service, aL as ServiceClassMap, aM as ServiceConfig, aN as ServiceError, aO as ServiceInstance, aP as ServiceRegistry, aQ as ServiceType, i as ServiceTypeName, aR as ServiceTypeRegistry, aS as ServiceTypeValue, aT as Setting, S as State, aU as StateArray, aV as StateObject, aW as StateValue, aX as TEEMode, t as TargetInfo, T as Task, aY as TaskMetadata, s as TaskWorker, aZ as TeeAgent, a_ as TeePluginConfig, a$ as TeeType, b0 as TeeVendorConfig, u as TemplateType, b1 as TestCase, b2 as TestSuite, b3 as TextEmbeddingParams, b4 as TextGenerationParams, b5 as TextToSpeechParams, b6 as TokenizeTextParams, b7 as TranscriptionParams, b8 as TypedEventHandler, b9 as TypedService, ba as TypedServiceClass, U as UUID, bb as UnifiedMemoryOptions, bc as UnifiedSearchOptions, bd as VECTOR_DIMS, be as Validator, bf as VideoProcessingParams, W as World, bg as WorldPayload, bh as WorldSettings, bi as asUUID, bj as createMessageMemory, bk as createServiceError, bl as getMemoryText, bm as getTypedService, bn as isCustomMetadata, bo as isDescriptionMetadata, bp as isDocumentMemory, bq as isDocumentMetadata, br as isFragmentMemory, bs as isFragmentMetadata, bt as isMessageMetadata } from '../../types-DzoA9aTJ.js';
2
- export { bS as AgentRuntime, bC as DatabaseAdapter, bR as Semaphore, bO as ServerOwnershipState, ck as ServiceBuilder, cm as ServiceDefinition, c8 as addHeader, bM as booleanFooter, bz as composeActionExamples, c6 as composePrompt, c7 as composePromptFromState, cl as createService, bU as createSettingFromConfig, bE as createUniqueUuid, c5 as decryptObjectValues, bT as decryptSecret, bT as decryptStringValue, c3 as decryptedCharacter, cn as defineService, bI as elizaLogger, c4 as encryptObjectValues, bW as encryptStringValue, c2 as encryptedCharacter, bD as findEntityByName, bQ as findWorldsForOwner, bA as formatActionNames, bB as formatActions, bG as formatEntities, ca as formatMessages, c9 as formatPosts, cb as formatTimestamp, bF as getEntityDetails, bV as getSalt, bP as getUserServerRole, c0 as getWorldSettings, bN as imageDescriptionTemplate, c1 as initializeOnboarding, bH as logger, bK as messageHandlerTemplate, ch as parseBooleanFromText, cg as parseJSONObjectFromText, cf as parseKeyValueXml, bL as postCreationTemplate, ci as safeReplacer, bX as saltSettingValue, bZ as saltWorldSettings, bJ as shouldRespondTemplate, cd as stringToUuid, cj as trimTokens, ce as truncateToCompleteSentence, bY as unsaltSettingValue, b_ as unsaltWorldSettings, b$ as updateWorldSettings, cc as validateUuid } from '../../index-DVKkCFlY.js';
3
- import 'pg';
4
- import '@electric-sql/pglite';
1
+ export { a as Action, v as ActionEventPayload, A as ActionExample, f as Agent, w as AgentStatus, x as AudioProcessingParams, B as BaseMetadata, y as BaseModelParams, z as CacheKeyPrefix, D as ChannelType, l as Character, F as ChunkRow, b as Component, G as ComponentData, C as Content, J as ContentType, K as ControlMessage, N as CustomMetadata, O as DbConnection, Q as DeriveKeyAttestationData, V as DescriptionMetadata, X as DetokenizeTextParams, Y as DirectoryItem, Z as DocumentMetadata, _ as EmbeddingSearchResult, $ as EnhancedState, E as Entity, a0 as EntityPayload, a1 as EvaluationExample, m as Evaluator, a2 as EvaluatorEventPayload, a3 as EventDataObject, a4 as EventHandler, a5 as EventPayload, a6 as EventPayloadMap, a7 as EventType, a8 as FragmentMetadata, a9 as GenerateTextParams, aa as Handler, H as HandlerCallback, g as IAgentRuntime, I as IDatabaseAdapter, ab as ImageDescriptionParams, ac as ImageGenerationParams, ad as InvokePayload, ae as IsValidServiceType, af as JSONSchema, ag as KnowledgeItem, ah as KnowledgeScope, L as Log, ai as Media, M as Memory, c as MemoryMetadata, aj as MemoryRetrievalOptions, ak as MemoryScope, al as MemorySearchOptions, am as MemoryType, an as MemoryTypeAlias, ao as MessageExample, ap as MessageMemory, aq as MessageMetadata, ar as MessagePayload, as as MessageReceivedHandlerParams, at as MetadataObject, au as ModelEventPayload, av as ModelHandler, r as ModelParamsMap, q as ModelResultMap, aw as ModelType, p as ModelTypeName, ax as MultiRoomMemoryOptions, ay as ObjectGenerationParams, az as OnboardingConfig, d as Participant, aA as PlatformPrefix, n as Plugin, aB as PluginEvents, aC as Project, aD as ProjectAgent, P as Provider, aE as ProviderResult, e as Relationship, aF as RemoteAttestationMessage, aG as RemoteAttestationQuote, h as Role, R as Room, aH as RoomMetadata, k as Route, aI as RunEventPayload, o as RuntimeSettings, aJ as SOCKET_MESSAGE_TYPE, aK as SendHandlerFunction, j as Service, aL as ServiceClassMap, aM as ServiceConfig, aN as ServiceError, aO as ServiceInstance, aP as ServiceRegistry, aQ as ServiceType, i as ServiceTypeName, aR as ServiceTypeRegistry, aS as ServiceTypeValue, aT as Setting, S as State, aU as StateArray, aV as StateObject, aW as StateValue, aX as TEEMode, t as TargetInfo, T as Task, aY as TaskMetadata, s as TaskWorker, aZ as TeeAgent, a_ as TeePluginConfig, a$ as TeeType, b0 as TeeVendorConfig, u as TemplateType, b1 as TestCase, b2 as TestSuite, b3 as TextEmbeddingParams, b4 as TextGenerationParams, b5 as TextToSpeechParams, b6 as TokenizeTextParams, b7 as TranscriptionParams, b8 as TypedEventHandler, b9 as TypedService, ba as TypedServiceClass, U as UUID, bb as UnifiedMemoryOptions, bc as UnifiedSearchOptions, bd as VECTOR_DIMS, be as Validator, bf as VideoProcessingParams, W as World, bg as WorldPayload, bh as WorldSettings, bi as asUUID, bj as createMessageMemory, bk as createServiceError, bl as getMemoryText, bm as getTypedService, bn as isCustomMetadata, bo as isDescriptionMetadata, bp as isDocumentMemory, bq as isDocumentMetadata, br as isFragmentMemory, bs as isFragmentMetadata, bt as isMessageMetadata } from '../../types-D9v-eW3g.js';
2
+ export { bS as AgentRuntime, bC as DatabaseAdapter, bR as Semaphore, bO as ServerOwnershipState, ck as ServiceBuilder, cm as ServiceDefinition, c8 as addHeader, bM as booleanFooter, bz as composeActionExamples, c6 as composePrompt, c7 as composePromptFromState, cl as createService, bU as createSettingFromConfig, bE as createUniqueUuid, c5 as decryptObjectValues, bT as decryptSecret, bT as decryptStringValue, c3 as decryptedCharacter, cn as defineService, bI as elizaLogger, c4 as encryptObjectValues, bW as encryptStringValue, c2 as encryptedCharacter, bD as findEntityByName, bQ as findWorldsForOwner, bA as formatActionNames, bB as formatActions, bG as formatEntities, ca as formatMessages, c9 as formatPosts, cb as formatTimestamp, bF as getEntityDetails, bV as getSalt, bP as getUserServerRole, c0 as getWorldSettings, bN as imageDescriptionTemplate, c1 as initializeOnboarding, bH as logger, bK as messageHandlerTemplate, ch as parseBooleanFromText, cg as parseJSONObjectFromText, cf as parseKeyValueXml, bL as postCreationTemplate, ci as safeReplacer, bX as saltSettingValue, bZ as saltWorldSettings, bJ as shouldRespondTemplate, cd as stringToUuid, cj as trimTokens, ce as truncateToCompleteSentence, bY as unsaltSettingValue, b_ as unsaltWorldSettings, b$ as updateWorldSettings, cc as validateUuid } from '../../index-S6eSMHDH.js';
@@ -78,7 +78,13 @@ import {
78
78
  unsaltWorldSettings2 as unsaltWorldSettings,
79
79
  updateWorldSettings2 as updateWorldSettings,
80
80
  validateUuid2 as validateUuid
81
- } from "../../chunk-HRFT5KDK.js";
81
+ } from "../../chunk-AU4RQ3C3.js";
82
+ import "../../chunk-2HSL25IJ.js";
83
+ import "../../chunk-FEPOSPNK.js";
84
+ import "../../chunk-U2ADTLZY.js";
85
+ import "../../chunk-JX2SRFHQ.js";
86
+ import "../../chunk-YIBXLDIR.js";
87
+ import "../../chunk-SIAA4J6H.js";
82
88
  export {
83
89
  AgentRuntime,
84
90
  AgentStatus,
@@ -1,6 +1,3 @@
1
- import { Pool } from 'pg';
2
- import { PGlite } from '@electric-sql/pglite';
3
-
4
1
  /**
5
2
  * Defines a custom type UUID representing a universally unique identifier
6
3
  */
@@ -505,8 +502,8 @@ declare enum ContentType {
505
502
  }
506
503
  declare enum ChannelType {
507
504
  SELF = "SELF",// Messages to self
508
- DM = "dm",// Direct messages between two participants
509
- GROUP = "group",// Group messages with multiple participants
505
+ DM = "DM",// Direct messages between two participants
506
+ GROUP = "GROUP",// Group messages with multiple participants
510
507
  VOICE_DM = "VOICE_DM",// Voice direct messages
511
508
  VOICE_GROUP = "VOICE_GROUP",// Voice channels with multiple participants
512
509
  FEED = "FEED",// Social media feed
@@ -667,7 +664,7 @@ interface IDatabaseAdapter {
667
664
  init(): Promise<void>;
668
665
  /** Close database connection */
669
666
  close(): Promise<void>;
670
- getConnection(): Promise<PGlite | Pool>;
667
+ getConnection(): Promise<any>;
671
668
  getAgent(agentId: UUID): Promise<Agent | null>;
672
669
  /** Get all agents */
673
670
  getAgents(): Promise<Partial<Agent>[]>;
@@ -925,7 +922,7 @@ interface IAgentRuntime extends IDatabaseAdapter {
925
922
  routes: Route[];
926
923
  registerPlugin(plugin: Plugin): Promise<void>;
927
924
  initialize(): Promise<void>;
928
- getConnection(): Promise<PGlite | Pool>;
925
+ getConnection(): Promise<any>;
929
926
  getService<T extends Service>(service: ServiceTypeName | string): T | null;
930
927
  getAllServices(): Map<ServiceTypeName, Service>;
931
928
  registerService(service: typeof Service): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/core",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "clean": "rm -rf dist .turbo node_modules .turbo-tsconfig.json tsconfig.tsbuildinfo",
37
37
  "dev": "tsup --watch",
38
38
  "build:docs": "cd docs && bun run build",
39
- "test": "vitest run",
39
+ "test": "vitest run --coverage",
40
40
  "test:coverage": "vitest run --coverage",
41
41
  "test:watch": "vitest",
42
42
  "format": "prettier --write ./src",
@@ -94,11 +94,11 @@
94
94
  "stream-browserify": "^3.0.0",
95
95
  "unique-names-generator": "4.7.1",
96
96
  "uuid": "11.0.3",
97
- "vitest": "^3.1.3",
97
+ "vitest": "^3.1.4",
98
98
  "zod": "^3.24.4"
99
99
  },
100
100
  "publishConfig": {
101
101
  "access": "public"
102
102
  },
103
- "gitHead": "f22f2e8e548aa92d01489864d573b633725b1182"
103
+ "gitHead": "bd307f978c80ce6b9ff82a935f644bf10f07f8d1"
104
104
  }