@elizaos/core 2.0.0-alpha.7 → 2.0.0-alpha.71

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 (132) hide show
  1. package/README.md +213 -16
  2. package/dist/testing/index.js +22 -0
  3. package/dist/testing/index.js.map +9 -0
  4. package/package.json +46 -27
  5. package/dist/actions.d.ts +0 -22
  6. package/dist/actions.d.ts.map +0 -1
  7. package/dist/browser/index.browser.js +0 -771
  8. package/dist/browser/index.browser.js.map +0 -427
  9. package/dist/browser/index.d.ts +0 -2
  10. package/dist/character.d.ts +0 -39
  11. package/dist/character.d.ts.map +0 -1
  12. package/dist/constants/index.d.ts +0 -7
  13. package/dist/constants/secrets.d.ts +0 -67
  14. package/dist/database.d.ts +0 -494
  15. package/dist/database.d.ts.map +0 -1
  16. package/dist/elizaos.d.ts +0 -194
  17. package/dist/elizaos.d.ts.map +0 -1
  18. package/dist/entities.d.ts +0 -40
  19. package/dist/entities.d.ts.map +0 -1
  20. package/dist/index.browser.d.ts +0 -39
  21. package/dist/index.browser.d.ts.map +0 -1
  22. package/dist/index.d.ts +0 -40
  23. package/dist/index.d.ts.map +0 -1
  24. package/dist/index.js +0 -2
  25. package/dist/index.node.d.ts +0 -37
  26. package/dist/index.node.d.ts.map +0 -1
  27. package/dist/logger.d.ts +0 -72
  28. package/dist/logger.d.ts.map +0 -1
  29. package/dist/memory.d.ts +0 -63
  30. package/dist/memory.d.ts.map +0 -1
  31. package/dist/node/index.d.ts +0 -2
  32. package/dist/node/index.node.js +0 -53403
  33. package/dist/node/index.node.js.map +0 -511
  34. package/dist/onboarding-state.d.ts +0 -209
  35. package/dist/plugin.d.ts +0 -55
  36. package/dist/plugin.d.ts.map +0 -1
  37. package/dist/prompts.d.ts +0 -7
  38. package/dist/prompts.d.ts.map +0 -1
  39. package/dist/request-context.d.ts +0 -142
  40. package/dist/request-context.d.ts.map +0 -1
  41. package/dist/request-context.node.d.ts +0 -36
  42. package/dist/request-context.node.d.ts.map +0 -1
  43. package/dist/roles.d.ts +0 -23
  44. package/dist/roles.d.ts.map +0 -1
  45. package/dist/runtime.d.ts +0 -366
  46. package/dist/runtime.d.ts.map +0 -1
  47. package/dist/schemas/character.d.ts +0 -151
  48. package/dist/schemas/character.d.ts.map +0 -1
  49. package/dist/search.d.ts +0 -316
  50. package/dist/search.d.ts.map +0 -1
  51. package/dist/secrets.d.ts +0 -11
  52. package/dist/secrets.d.ts.map +0 -1
  53. package/dist/services/default-message-service.d.ts +0 -69
  54. package/dist/services/default-message-service.d.ts.map +0 -1
  55. package/dist/services/message-service.d.ts +0 -171
  56. package/dist/services/message-service.d.ts.map +0 -1
  57. package/dist/services.d.ts +0 -56
  58. package/dist/services.d.ts.map +0 -1
  59. package/dist/sessions/index.d.ts +0 -10
  60. package/dist/sessions/paths.d.ts +0 -56
  61. package/dist/sessions/provider.d.ts +0 -73
  62. package/dist/sessions/session-key.d.ts +0 -133
  63. package/dist/sessions/store.d.ts +0 -75
  64. package/dist/sessions/types.d.ts +0 -195
  65. package/dist/settings.d.ts +0 -90
  66. package/dist/settings.d.ts.map +0 -1
  67. package/dist/streaming-context.browser.d.ts +0 -26
  68. package/dist/streaming-context.browser.d.ts.map +0 -1
  69. package/dist/streaming-context.d.ts +0 -95
  70. package/dist/streaming-context.d.ts.map +0 -1
  71. package/dist/streaming-context.node.d.ts +0 -15
  72. package/dist/streaming-context.node.d.ts.map +0 -1
  73. package/dist/types/agent.d.ts +0 -97
  74. package/dist/types/agent.d.ts.map +0 -1
  75. package/dist/types/components.d.ts +0 -155
  76. package/dist/types/components.d.ts.map +0 -1
  77. package/dist/types/database.d.ts +0 -414
  78. package/dist/types/database.d.ts.map +0 -1
  79. package/dist/types/elizaos.d.ts +0 -159
  80. package/dist/types/elizaos.d.ts.map +0 -1
  81. package/dist/types/environment.d.ts +0 -116
  82. package/dist/types/environment.d.ts.map +0 -1
  83. package/dist/types/events.d.ts +0 -203
  84. package/dist/types/events.d.ts.map +0 -1
  85. package/dist/types/index.d.ts +0 -20
  86. package/dist/types/index.d.ts.map +0 -1
  87. package/dist/types/knowledge.d.ts +0 -30
  88. package/dist/types/knowledge.d.ts.map +0 -1
  89. package/dist/types/memory.d.ts +0 -102
  90. package/dist/types/memory.d.ts.map +0 -1
  91. package/dist/types/messaging.d.ts +0 -137
  92. package/dist/types/messaging.d.ts.map +0 -1
  93. package/dist/types/model.d.ts +0 -513
  94. package/dist/types/model.d.ts.map +0 -1
  95. package/dist/types/plugin.d.ts +0 -91
  96. package/dist/types/plugin.d.ts.map +0 -1
  97. package/dist/types/primitives.d.ts +0 -96
  98. package/dist/types/primitives.d.ts.map +0 -1
  99. package/dist/types/runtime.d.ts +0 -140
  100. package/dist/types/runtime.d.ts.map +0 -1
  101. package/dist/types/service.d.ts +0 -150
  102. package/dist/types/service.d.ts.map +0 -1
  103. package/dist/types/settings.d.ts +0 -29
  104. package/dist/types/settings.d.ts.map +0 -1
  105. package/dist/types/state.d.ts +0 -56
  106. package/dist/types/state.d.ts.map +0 -1
  107. package/dist/types/streaming.d.ts +0 -71
  108. package/dist/types/streaming.d.ts.map +0 -1
  109. package/dist/types/task.d.ts +0 -67
  110. package/dist/types/task.d.ts.map +0 -1
  111. package/dist/types/tee.d.ts +0 -96
  112. package/dist/types/tee.d.ts.map +0 -1
  113. package/dist/types/testing.d.ts +0 -28
  114. package/dist/types/testing.d.ts.map +0 -1
  115. package/dist/utils/buffer.d.ts +0 -104
  116. package/dist/utils/buffer.d.ts.map +0 -1
  117. package/dist/utils/crypto-compat.d.ts +0 -183
  118. package/dist/utils/crypto-compat.d.ts.map +0 -1
  119. package/dist/utils/environment.d.ts +0 -50
  120. package/dist/utils/environment.d.ts.map +0 -1
  121. package/dist/utils/node.d.ts +0 -5
  122. package/dist/utils/node.d.ts.map +0 -1
  123. package/dist/utils/paths.d.ts +0 -92
  124. package/dist/utils/paths.d.ts.map +0 -1
  125. package/dist/utils/server-health.d.ts +0 -22
  126. package/dist/utils/server-health.d.ts.map +0 -1
  127. package/dist/utils/streaming.d.ts +0 -179
  128. package/dist/utils/streaming.d.ts.map +0 -1
  129. package/dist/utils/type-guards.d.ts +0 -23
  130. package/dist/utils/type-guards.d.ts.map +0 -1
  131. package/dist/utils.d.ts +0 -182
  132. package/dist/utils.d.ts.map +0 -1
@@ -1,96 +0,0 @@
1
- import type { Metadata } from './primitives';
2
- /**
3
- * Represents an agent's registration details within a Trusted Execution Environment (TEE) context.
4
- * This is typically stored in a database table (e.g., `TeeAgent`) to manage agents operating in a TEE.
5
- * It allows for multiple registrations of the same `agentId` to support scenarios where an agent might restart,
6
- * generating a new keypair and attestation each time.
7
- */
8
- export interface TeeAgent {
9
- /** Primary key for the TEE agent registration record (e.g., a UUID or auto-incrementing ID). */
10
- id: string;
11
- /** The core identifier of the agent, which can be duplicated across multiple TEE registrations. */
12
- agentId: string;
13
- /** The human-readable name of the agent. */
14
- agentName: string;
15
- /** Timestamp (e.g., Unix epoch in milliseconds) when this TEE registration was created. */
16
- createdAt: number;
17
- /** The public key associated with this specific TEE agent instance/session. */
18
- publicKey: string;
19
- /** The attestation document proving the authenticity and integrity of the TEE instance. */
20
- attestation: string;
21
- }
22
- /**
23
- * Defines the operational modes for a Trusted Execution Environment (TEE).
24
- * This enum is used to configure how TEE functionalities are engaged, allowing for
25
- * different setups for local development, Docker-based development, and production.
26
- */
27
- export declare enum TEEMode {
28
- /** TEE functionality is completely disabled. */
29
- OFF = "OFF",
30
- /** For local development, potentially using a TEE simulator. */
31
- LOCAL = "LOCAL",// For local development with simulator
32
- /** For Docker-based development environments, possibly with a TEE simulator. */
33
- DOCKER = "DOCKER",// For docker development with simulator
34
- /** For production deployments, using actual TEE hardware without a simulator. */
35
- PRODUCTION = "PRODUCTION"
36
- }
37
- /**
38
- * Represents a quote obtained during remote attestation for a Trusted Execution Environment (TEE).
39
- * This quote is a piece of evidence provided by the TEE, cryptographically signed, which can be
40
- * verified by a relying party to ensure the TEE's integrity and authenticity.
41
- */
42
- export interface RemoteAttestationQuote {
43
- /** The attestation quote data, typically a base64 encoded string or similar format. */
44
- quote: string;
45
- /** Timestamp (e.g., Unix epoch in milliseconds) when the quote was generated or received. */
46
- timestamp: number;
47
- }
48
- /**
49
- * Data structure used in the attestation process for deriving a key within a Trusted Execution Environment (TEE).
50
- * This information helps establish a secure channel or verify the identity of the agent instance
51
- * requesting key derivation.
52
- */
53
- export interface DeriveKeyAttestationData {
54
- /** The unique identifier of the agent for which the key derivation is being attested. */
55
- agentId: string;
56
- /** The public key of the agent instance involved in the key derivation process. */
57
- publicKey: string;
58
- /** Optional subject or context information related to the key derivation. */
59
- subject?: string;
60
- }
61
- /**
62
- * Represents a message that has been attested by a Trusted Execution Environment (TEE).
63
- * This structure binds a message to an agent's identity and a timestamp, all within the
64
- * context of a remote attestation process, ensuring the message originated from a trusted TEE instance.
65
- */
66
- export interface RemoteAttestationMessage {
67
- /** The unique identifier of the agent sending the attested message. */
68
- agentId: string;
69
- /** Timestamp (e.g., Unix epoch in milliseconds) when the message was attested or sent. */
70
- timestamp: number;
71
- /** The actual message content, including details about the entity, room, and the content itself. */
72
- message: {
73
- entityId: string;
74
- roomId: string;
75
- content: string;
76
- };
77
- }
78
- /**
79
- * Enumerates different types or vendors of Trusted Execution Environments (TEEs).
80
- * This allows the system to adapt to specific TEE technologies, like Intel TDX on DSTACK.
81
- */
82
- export declare enum TeeType {
83
- /** Represents Intel Trusted Domain Extensions (TDX) running on DSTACK infrastructure. */
84
- TDX_DSTACK = "tdx_dstack"
85
- }
86
- /**
87
- * Configuration for a TEE (Trusted Execution Environment) plugin.
88
- * This allows specifying the TEE vendor and any vendor-specific configurations.
89
- * It's used to initialize and configure TEE-related functionalities within the agent system.
90
- */
91
- export interface TeePluginConfig {
92
- /** Optional. The name or identifier of the TEE vendor (e.g., 'tdx_dstack' from `TeeType`). */
93
- vendor?: string;
94
- /** Optional. Vendor-specific configuration options, conforming to `TeeVendorConfig`. */
95
- vendorConfig?: Metadata;
96
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CAAC;KACjB,CAAC;CACH;AAED;;;GAGG;AACH,oBAAY,OAAO;IACjB,yFAAyF;IACzF,UAAU,eAAe;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,8FAA8F;IAC9F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,YAAY,CAAC,EAAE,QAAQ,CAAC;CACzB"}
@@ -1,28 +0,0 @@
1
- import type { IAgentRuntime } from './runtime';
2
- /**
3
- * Represents a test case for evaluating agent or plugin functionality.
4
- * Each test case has a name and a function that contains the test logic.
5
- * The test function receives the `IAgentRuntime` instance, allowing it to interact with the agent's capabilities.
6
- * Test cases are typically grouped into `TestSuite`s.
7
- */
8
- export interface TestCase {
9
- /** A descriptive name for the test case, e.g., "should respond to greetings". */
10
- name: string;
11
- /**
12
- * The function that executes the test logic. It can be synchronous or asynchronous.
13
- * It receives the `IAgentRuntime` to interact with the agent and its services.
14
- * The function should typically contain assertions to verify expected outcomes.
15
- */
16
- fn: (runtime: IAgentRuntime) => Promise<void> | void;
17
- }
18
- /**
19
- * Represents a suite of related test cases for an agent or plugin.
20
- * This helps in organizing tests and running them collectively.
21
- * A `ProjectAgent` can define one or more `TestSuite`s.
22
- */
23
- export interface TestSuite {
24
- /** A descriptive name for the test suite, e.g., "Core Functionality Tests". */
25
- name: string;
26
- /** An array of `TestCase` objects that belong to this suite. */
27
- tests: TestCase[];
28
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/types/testing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,EAAE,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB"}
@@ -1,104 +0,0 @@
1
- /**
2
- * Browser and Node.js compatible buffer abstraction
3
- * This module provides a unified interface for buffer operations
4
- * that works in both browser and Node.js environments.
5
- *
6
- * In browsers, we use Uint8Array as a Buffer replacement.
7
- * In Node.js, we use the native Buffer.
8
- */
9
- /**
10
- * Type representing a buffer-like object that works in both environments
11
- */
12
- export type BufferLike = Buffer | Uint8Array;
13
- /**
14
- * Convert a hex string to a buffer-like object
15
- * @param hex - The hexadecimal string to convert
16
- * @returns A BufferLike object
17
- */
18
- export declare function fromHex(hex: string): BufferLike;
19
- /**
20
- * Convert a string to a buffer-like object
21
- * @param str - The string to convert
22
- * @param encoding - The encoding to use (default: 'utf8')
23
- * @returns A BufferLike object
24
- */
25
- export declare function fromString(str: string, encoding?: 'utf8' | 'utf-8' | 'base64'): BufferLike;
26
- /**
27
- * Convert a buffer-like object to a hexadecimal string
28
- * @param buffer - The buffer to convert
29
- * @returns A hexadecimal string
30
- */
31
- export declare function toHex(buffer: BufferLike): string;
32
- /**
33
- * Convert a buffer-like object to a string
34
- * @param buffer - The buffer to convert
35
- * @param encoding - The encoding to use (default: 'utf8')
36
- * @returns A string
37
- */
38
- export declare function toString(buffer: BufferLike, encoding?: 'utf8' | 'utf-8' | 'base64' | 'hex'): string;
39
- /**
40
- * Check if an object is a Buffer or buffer-like object
41
- * @param obj - The object to check
42
- * @returns True if the object is buffer-like
43
- */
44
- export declare function isBuffer(obj: unknown): obj is BufferLike;
45
- /**
46
- * Create a buffer of a specific size filled with zeros
47
- * @param size - The size of the buffer
48
- * @returns A BufferLike object
49
- */
50
- export declare function alloc(size: number): BufferLike;
51
- /**
52
- * Create a buffer from an array of bytes
53
- * @param bytes - Array of byte values
54
- * @returns A BufferLike object
55
- */
56
- export declare function fromBytes(bytes: number[] | Uint8Array): BufferLike;
57
- /**
58
- * Concatenate multiple buffers
59
- * @param buffers - Array of buffers to concatenate
60
- * @returns A new BufferLike object
61
- */
62
- export declare function concat(buffers: BufferLike[]): BufferLike;
63
- /**
64
- * Slice a buffer to create a new buffer
65
- * @param buffer - The buffer to slice
66
- * @param start - Start index
67
- * @param end - End index (optional)
68
- * @returns A new BufferLike object
69
- */
70
- export declare function slice(buffer: BufferLike, start: number, end?: number): BufferLike;
71
- /**
72
- * Compare two buffers for equality
73
- * @param a - First buffer
74
- * @param b - Second buffer
75
- * @returns True if buffers are equal
76
- */
77
- export declare function equals(a: BufferLike, b: BufferLike): boolean;
78
- /**
79
- * Get the byte length of a buffer
80
- * @param buffer - The buffer
81
- * @returns The byte length
82
- */
83
- export declare function byteLength(buffer: BufferLike): number;
84
- /**
85
- * Create a random buffer of specified size
86
- * @param size - The size of the buffer
87
- * @returns A BufferLike object filled with random bytes
88
- */
89
- export declare function randomBytes(size: number): BufferLike;
90
- export declare const BufferUtils: {
91
- fromHex: typeof fromHex;
92
- fromString: typeof fromString;
93
- fromBytes: typeof fromBytes;
94
- toHex: typeof toHex;
95
- toString: typeof toString;
96
- isBuffer: typeof isBuffer;
97
- alloc: typeof alloc;
98
- concat: typeof concat;
99
- slice: typeof slice;
100
- equals: typeof equals;
101
- byteLength: typeof byteLength;
102
- randomBytes: typeof randomBytes;
103
- };
104
- export type { BufferLike as Buffer };
@@ -1 +0,0 @@
1
- {"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../src/utils/buffer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;AAiB7C;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAiB/C;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,MAAM,GAAG,OAAO,GAAG,QAAiB,GAC7C,UAAU,CAqBZ;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAchD;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,UAAU,EAClB,QAAQ,GAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAc,GACrD,MAAM,CA0BR;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,UAAU,CAkBxD;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAM9C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU,CAMlE;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAsBxD;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,UAAU,CAOjF;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,OAAO,CAe5D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAErD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAwBpD;AAGD,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAavB,CAAC;AAGF,YAAY,EAAE,UAAU,IAAI,MAAM,EAAE,CAAC"}
@@ -1,183 +0,0 @@
1
- /**
2
- * Browser and Node.js compatible crypto abstraction
3
- * Provides unified interface for cryptographic operations
4
- *
5
- * @module crypto-compat
6
- *
7
- * This module provides both synchronous (Node.js only) and asynchronous (cross-platform)
8
- * APIs for cryptographic operations. Use async methods for browser compatibility.
9
- *
10
- * @example
11
- * ```typescript
12
- * // Node.js synchronous API
13
- * const hash = createHash('sha256').update('data').digest();
14
- *
15
- * // Cross-platform async API
16
- * const hash = await createHashAsync('sha256', 'data');
17
- * ```
18
- */
19
- /**
20
- * Hash data using Web Crypto API (browser-compatible)
21
- * @param {string} algorithm - Hash algorithm ('sha256', 'sha1', 'sha512')
22
- * @param {Uint8Array} data - Data to hash
23
- * @returns {Promise<Uint8Array>} Hash result
24
- * @throws {Error} If Web Crypto API is not available or algorithm is unsupported
25
- */
26
- declare function webCryptoHash(algorithm: string, data: Uint8Array): Promise<Uint8Array>;
27
- /**
28
- * Encrypt data using AES-256-CBC with Web Crypto API (browser-compatible)
29
- * @param {Uint8Array} key - 256-bit (32-byte) encryption key
30
- * @param {Uint8Array} iv - 128-bit (16-byte) initialization vector
31
- * @param {Uint8Array} data - Data to encrypt
32
- * @returns {Promise<Uint8Array>} Encrypted data
33
- * @throws {Error} If Web Crypto API is not available or key/IV lengths are invalid
34
- */
35
- declare function webCryptoEncrypt(key: Uint8Array, iv: Uint8Array, data: Uint8Array): Promise<Uint8Array>;
36
- /**
37
- * Decrypt data using AES-256-CBC with Web Crypto API (browser-compatible)
38
- * @param {Uint8Array} key - 256-bit (32-byte) decryption key
39
- * @param {Uint8Array} iv - 128-bit (16-byte) initialization vector
40
- * @param {Uint8Array} data - Data to decrypt
41
- * @returns {Promise<Uint8Array>} Decrypted data
42
- * @throws {Error} If Web Crypto API is not available or key/IV lengths are invalid
43
- */
44
- declare function webCryptoDecrypt(key: Uint8Array, iv: Uint8Array, data: Uint8Array): Promise<Uint8Array>;
45
- /**
46
- * Create a hash object for incremental hashing (cross-platform - synchronous)
47
- *
48
- * This function works in both Node.js and browser environments. In browsers, it uses
49
- * crypto-browserify to provide synchronous hashing compatible with Node.js crypto API.
50
- *
51
- * @param {string} algorithm - Hash algorithm ('sha256', 'sha1', 'sha512')
52
- * @returns {object} Hash object with update() and digest() methods
53
- *
54
- * @example
55
- * ```typescript
56
- * const hash = createHash('sha256')
57
- * .update('hello')
58
- * .update('world')
59
- * .digest();
60
- * ```
61
- */
62
- export declare function createHash(algorithm: string): {
63
- update(data: string | Uint8Array): ReturnType<typeof createHash>;
64
- digest(): Uint8Array;
65
- };
66
- /**
67
- * Create a hash asynchronously (works in both Node.js and browser)
68
- *
69
- * This is the recommended method for cross-platform code as it works in both
70
- * Node.js and browser environments.
71
- *
72
- * @param {string} algorithm - Hash algorithm ('sha256', 'sha1', 'sha512')
73
- * @param {string | Uint8Array} data - Data to hash
74
- * @returns {Promise<Uint8Array>} Hash result
75
- * @throws {Error} If algorithm is unsupported or Web Crypto API is unavailable
76
- *
77
- * @example
78
- * ```typescript
79
- * // Works in both Node.js and browser
80
- * const hash = await createHashAsync('sha256', 'hello world');
81
- * ```
82
- */
83
- export declare function createHashAsync(algorithm: string, data: string | Uint8Array): Promise<Uint8Array>;
84
- /**
85
- * Create a cipher for encryption (cross-platform - synchronous)
86
- *
87
- * This function works in both Node.js and browser environments. In browsers, it uses
88
- * crypto-browserify to provide synchronous encryption compatible with Node.js crypto API.
89
- *
90
- * @param {string} algorithm - Cipher algorithm (currently only 'aes-256-cbc' is supported)
91
- * @param {Uint8Array} key - 256-bit (32-byte) encryption key
92
- * @param {Uint8Array} iv - 128-bit (16-byte) initialization vector
93
- * @returns {object} Cipher object with update() and final() methods
94
- * @throws {Error} If algorithm is unsupported
95
- *
96
- * @example
97
- * ```typescript
98
- * const cipher = createCipheriv('aes-256-cbc', key, iv);
99
- * let encrypted = cipher.update('data', 'utf8', 'hex');
100
- * encrypted += cipher.final('hex');
101
- * ```
102
- */
103
- export declare function createCipheriv(algorithm: string, key: Uint8Array, iv: Uint8Array): {
104
- update(data: string, inputEncoding: string, outputEncoding: string): string;
105
- final(encoding: string): string;
106
- };
107
- /**
108
- * Create a decipher for decryption (cross-platform - synchronous)
109
- *
110
- * This function works in both Node.js and browser environments. In browsers, it uses
111
- * crypto-browserify to provide synchronous decryption compatible with Node.js crypto API.
112
- *
113
- * @param {string} algorithm - Cipher algorithm (currently only 'aes-256-cbc' is supported)
114
- * @param {Uint8Array} key - 256-bit (32-byte) decryption key
115
- * @param {Uint8Array} iv - 128-bit (16-byte) initialization vector
116
- * @returns {object} Decipher object with update() and final() methods
117
- * @throws {Error} If algorithm is unsupported
118
- *
119
- * @example
120
- * ```typescript
121
- * const decipher = createDecipheriv('aes-256-cbc', key, iv);
122
- * let decrypted = decipher.update(encrypted, 'hex', 'utf8');
123
- * decrypted += decipher.final('utf8');
124
- * ```
125
- */
126
- export declare function createDecipheriv(algorithm: string, key: Uint8Array, iv: Uint8Array): {
127
- update(data: string, inputEncoding: string, outputEncoding: string): string;
128
- final(encoding: string): string;
129
- };
130
- /**
131
- * Encrypt data asynchronously (works in both Node.js and browser)
132
- *
133
- * This is the recommended method for cross-platform code as it works in both
134
- * Node.js and browser environments using AES-256-CBC.
135
- *
136
- * @param {Uint8Array} key - 256-bit (32-byte) encryption key
137
- * @param {Uint8Array} iv - 128-bit (16-byte) initialization vector
138
- * @param {Uint8Array} data - Data to encrypt
139
- * @returns {Promise<Uint8Array>} Encrypted data
140
- * @throws {Error} If key/IV lengths are invalid or Web Crypto API is unavailable
141
- *
142
- * @example
143
- * ```typescript
144
- * // Works in both Node.js and browser
145
- * const encrypted = await encryptAsync(key, iv, data);
146
- * ```
147
- */
148
- export declare function encryptAsync(key: Uint8Array, iv: Uint8Array, data: Uint8Array): Promise<Uint8Array>;
149
- /**
150
- * Decrypt data asynchronously (works in both Node.js and browser)
151
- *
152
- * This is the recommended method for cross-platform code as it works in both
153
- * Node.js and browser environments using AES-256-CBC.
154
- *
155
- * @param {Uint8Array} key - 256-bit (32-byte) decryption key
156
- * @param {Uint8Array} iv - 128-bit (16-byte) initialization vector
157
- * @param {Uint8Array} data - Data to decrypt
158
- * @returns {Promise<Uint8Array>} Decrypted data
159
- * @throws {Error} If key/IV lengths are invalid or Web Crypto API is unavailable
160
- *
161
- * @example
162
- * ```typescript
163
- * // Works in both Node.js and browser
164
- * const decrypted = await decryptAsync(key, iv, encryptedData);
165
- * ```
166
- */
167
- export declare function decryptAsync(key: Uint8Array, iv: Uint8Array, data: Uint8Array): Promise<Uint8Array>;
168
- /**
169
- * Legacy Web Crypto API export for backward compatibility
170
- *
171
- * **Deprecated:** Use the top-level async functions instead:
172
- * - `createHashAsync()` instead of `webCrypto.hash()`
173
- * - `encryptAsync()` instead of `webCrypto.encrypt()`
174
- * - `decryptAsync()` instead of `webCrypto.decrypt()`
175
- *
176
- * @deprecated Use top-level async functions for better cross-platform support
177
- */
178
- export declare const webCrypto: {
179
- hash: typeof webCryptoHash;
180
- encrypt: typeof webCryptoEncrypt;
181
- decrypt: typeof webCryptoDecrypt;
182
- };
183
- export {};
@@ -1 +0,0 @@
1
- {"version":3,"file":"crypto-compat.d.ts","sourceRoot":"","sources":["../../src/utils/crypto-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AA+CH;;;;;;GAMG;AACH,iBAAe,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAuBrF;AAED;;;;;;;GAOG;AACH,iBAAe,gBAAgB,CAC7B,GAAG,EAAE,UAAU,EACf,EAAE,EAAE,UAAU,EACd,IAAI,EAAE,UAAU,GACf,OAAO,CAAC,UAAU,CAAC,CA+BrB;AAED;;;;;;;GAOG;AACH,iBAAe,gBAAgB,CAC7B,GAAG,EAAE,UAAU,EACf,EAAE,EAAE,UAAU,EACd,IAAI,EAAE,UAAU,GACf,OAAO,CAAC,UAAU,CAAC,CA+BrB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG;IAC7C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IACjE,M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entConfig {
3
- [key: string]: string | boolean | number | undefined;
4
- }
5
- export declare function detectEnvironment(): RuntimeEnvironment;
6
- /**
7
- * Resets the cached environment detection result.
8
- * This is primarily for testing purposes when mocking different environments.
9
- */
10
- export declare function resetEnvironmentCache(): void;
11
- declare class Environment {
12
- private runtime;
13
- private browserStore?;
14
- private cache;
15
- constructor();
16
- getRuntime(): RuntimeEnvironment;
17
- isNode(): boolean;
18
- isBrowser(): boolean;
19
- get(key: string, defaultValue?: string): string | undefined;
20
- set(key: string, value: string | boolean | number): void;
21
- has(key: string): boolean;
22
- getAll(): EnvironmentConfig;
23
- private static readonly TRUTHY_VALUES;
24
- getBoolean(key: string, defaultValue?: boolean): boolean;
25
- getNumber(key: string, defaultValue?: number): number | undefined;
26
- clearCache(): void;
27
- }
28
- export declare function getEnvironment(): Environment;
29
- export declare function getEnv(key: string, defaultValue?: string): string | undefined;
30
- export declare function setEnv(key: string, value: string | boolean | number): void;
31
- export declare function hasEnv(key: string): boolean;
32
- export declare function getBooleanEnv(key: string, defaultValue?: boolean): boolean;
33
- export declare function getNumberEnv(key: string, defaultValue?: number): number | undefined;
34
- export declare function initBrowserEnvironment(config: EnvironmentConfig): void;
35
- export declare const currentRuntime: RuntimeEnvironment;
36
- export { Environment };
37
- export declare function findEnvFile(startDir?: string, filenames?: string[]): string | null;
38
- export interface LoadEnvOptions {
39
- override?: boolean;
40
- }
41
- export declare function loadEnvFile(envPath?: string, options?: LoadEnvOptions): boolean;
42
- export declare function findAllEnvFiles(startDir: string, boundaryDir?: string): string[];
43
- /**
44
- * Loads .env files with proper precedence (closest file wins).
45
- */
46
- export declare function loadEnvFilesWithPrecedence(startDir: string, options?: {
47
- boundaryDir?: string;
48
- clearBeforeLoad?: boolean;
49
- varsToClear?: string[];
50
- }): string[];
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/utils/environment.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,MAAM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AAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE3C;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,UAAQ,GAAG,OAAO,CAExE;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEnF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAOtE;AAED,eAAO,MAAM,cAAc,oBAAsB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,wBAAgB,WAAW,CACzB,QAAQ,CAAC,EAAE,MAAM,EACjB,SAAS,GAAE,MAAM,EAA2B,GAC3C,MAAM,GAAG,IAAI,CAoBf;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAa/E;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAuBhF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GACpF,MAAM,EAAE,CAgBV"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Node.js-specific utilities that should not be imported in browser environments
3
- */
4
- export * from './paths';
5
- export * from './server-health';
@@ -1 +0,0 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/utils/node.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC"}
@@ -1,92 +0,0 @@
1
- /**
2
- * ElizaOS data directory paths configuration
3
- * This module provides a unified interface for accessing data directory paths
4
- * that can be customized via environment variables.
5
- */
6
- /**
7
- * Interface for ElizaOS paths configuration
8
- */
9
- export interface ElizaPathsConfig {
10
- dataDir: string;
11
- databaseDir: string;
12
- charactersDir: string;
13
- generatedDir: string;
14
- uploadsAgentsDir: string;
15
- uploadsChannelsDir: string;
16
- }
17
- /**
18
- * ElizaOS paths management class
19
- * Provides centralized access to all ElizaOS data directory paths
20
- */
21
- declare class ElizaPaths {
22
- private cache;
23
- /**
24
- * Get the base data directory
25
- */
26
- getDataDir(): string;
27
- /**
28
- * Get the database directory (backward compatible with PGLITE_DATA_DIR)
29
- */
30
- getDatabaseDir(): string;
31
- /**
32
- * Get the characters storage directory
33
- */
34
- getCharactersDir(): string;
35
- /**
36
- * Get the AI-generated content directory
37
- */
38
- getGeneratedDir(): string;
39
- /**
40
- * Get the agent uploads directory
41
- */
42
- getUploadsAgentsDir(): string;
43
- /**
44
- * Get the channel uploads directory
45
- */
46
- getUploadsChannelsDir(): string;
47
- /**
48
- * Get all paths as a configuration object
49
- */
50
- getAllPaths(): ElizaPathsConfig;
51
- /**
52
- * Clear the cache (useful for testing)
53
- */
54
- clearCache(): void;
55
- }
56
- /**
57
- * Get the singleton ElizaPaths instance
58
- */
59
- export declare function getElizaPaths(): ElizaPaths;
60
- /**
61
- * Convenience function to get the data directory
62
- */
63
- export declare function getDataDir(): string;
64
- /**
65
- * Convenience function to get the database directory
66
- */
67
- export declare function getDatabaseDir(): string;
68
- /**
69
- * Convenience function to get the characters directory
70
- */
71
- export declare function getCharactersDir(): string;
72
- /**
73
- * Convenience function to get the generated content directory
74
- */
75
- export declare function getGeneratedDir(): string;
76
- /**
77
- * Convenience function to get the agent uploads directory
78
- */
79
- export declare function getUploadsAgentsDir(): string;
80
- /**
81
- * Convenience function to get the channel uploads directory
82
- */
83
- export declare function getUploadsChannelsDir(): string;
84
- /**
85
- * Convenience function to get all paths
86
- */
87
- export declare function getAllElizaPaths(): ElizaPathsConfig;
88
- /**
89
- * Reset the singleton instance (mainly for testing)
90
- */
91
- export declare function resetPaths(): void;
92
- export {};
@@ -1 +0,0 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiBH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,cAAM,UAAU;IACd,OAAO,CAAC,KAAK,CAAkC;IAE/C;;OAEG;IACH,UAAU,IAAI,MAAM;IAapB;;OAEG;IACH,cAAc,IAAI,MAAM;IAYxB;;OAEG;IACH,gBAAgB,IAAI,MAAM;IAW1B;;OAEG;IACH,eAAe,IAAI,MAAM;IAWzB;;OAEG;IACH,mBAAmB,IAAI,MAAM;IAW7B;;OAEG;IACH,qBAAqB,IAAI,MAAM;IAW/B;;OAEG;IACH,WAAW,IAAI,gBAAgB;IAW/B;;OAEG;IACH,UAAU,IAAI,IAAI;CAGnB;AAOD;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAK1C;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,gBAAgB,CAEnD;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAKjC"}
@@ -1,22 +0,0 @@
1
- /**
2
- * Server health check utilities for waiting for servers to be ready
3
- */
4
- export interface ServerHealthOptions {
5
- port: number;
6
- endpoint?: string;
7
- maxWaitTime?: number;
8
- pollInterval?: number;
9
- requestTimeout?: number;
10
- host?: string;
11
- protocol?: 'http' | 'https';
12
- }
13
- /**
14
- * Wait for server to be ready by polling health endpoint
15
- * @param options - Configuration options for server health check
16
- */
17
- export declare function waitForServerReady(options: ServerHealthOptions): Promise<void>;
18
- /**
19
- * Simple ping check for server availability (no stabilization wait)
20
- * @param options - Configuration options for server ping
21
- */
22
- export declare function pingServer(options: ServerHealthOptions): Promise<boolean>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"server-health.d.ts","sourceRoot":"","sources":["../../src/utils/server-health.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4CpF;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CA8B/E"}