@elizaos/api-client 1.3.2 → 1.4.3-alpha.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.
Files changed (140) hide show
  1. package/README.md +19 -0
  2. package/dist/api-client/src/client.d.ts +25 -0
  3. package/dist/api-client/src/client.d.ts.map +1 -0
  4. package/dist/api-client/src/index.d.ts +20 -0
  5. package/dist/api-client/src/index.d.ts.map +1 -0
  6. package/dist/api-client/src/lib/base-client.d.ts +31 -0
  7. package/dist/api-client/src/lib/base-client.d.ts.map +1 -0
  8. package/dist/api-client/src/services/agents.d.ts +107 -0
  9. package/dist/api-client/src/services/agents.d.ts.map +1 -0
  10. package/dist/api-client/src/services/audio.d.ts +48 -0
  11. package/dist/api-client/src/services/audio.d.ts.map +1 -0
  12. package/dist/api-client/src/services/media.d.ts +14 -0
  13. package/dist/api-client/src/services/media.d.ts.map +1 -0
  14. package/dist/api-client/src/services/memory.d.ts +107 -0
  15. package/dist/api-client/src/services/memory.d.ts.map +1 -0
  16. package/dist/api-client/src/services/messaging.d.ts +164 -0
  17. package/dist/api-client/src/services/messaging.d.ts.map +1 -0
  18. package/dist/api-client/src/services/server.d.ts +47 -0
  19. package/dist/api-client/src/services/server.d.ts.map +1 -0
  20. package/dist/api-client/src/services/sessions.d.ts +52 -0
  21. package/dist/api-client/src/services/sessions.d.ts.map +1 -0
  22. package/dist/api-client/src/services/system.d.ts +56 -0
  23. package/dist/api-client/src/services/system.d.ts.map +1 -0
  24. package/dist/api-client/src/types/agents.d.ts +67 -0
  25. package/dist/api-client/src/types/agents.d.ts.map +1 -0
  26. package/dist/api-client/src/types/audio.d.ts +42 -0
  27. package/dist/api-client/src/types/audio.d.ts.map +1 -0
  28. package/dist/api-client/src/types/base.d.ts +30 -0
  29. package/dist/api-client/src/types/base.d.ts.map +1 -0
  30. package/dist/api-client/src/types/media.d.ts +21 -0
  31. package/dist/api-client/src/types/media.d.ts.map +1 -0
  32. package/dist/api-client/src/types/memory.d.ts +43 -0
  33. package/dist/api-client/src/types/memory.d.ts.map +1 -0
  34. package/dist/api-client/src/types/messaging.d.ts +186 -0
  35. package/dist/api-client/src/types/messaging.d.ts.map +1 -0
  36. package/dist/api-client/src/types/server.d.ts +44 -0
  37. package/dist/api-client/src/types/server.d.ts.map +1 -0
  38. package/dist/api-client/src/types/sessions.d.ts +134 -0
  39. package/dist/api-client/src/types/sessions.d.ts.map +1 -0
  40. package/dist/api-client/src/types/system.d.ts +16 -0
  41. package/dist/api-client/src/types/system.d.ts.map +1 -0
  42. package/dist/core/src/actions.d.ts +23 -0
  43. package/dist/core/src/actions.d.ts.map +1 -0
  44. package/dist/core/src/database.d.ts +481 -0
  45. package/dist/core/src/database.d.ts.map +1 -0
  46. package/dist/core/src/entities.d.ts +49 -0
  47. package/dist/core/src/entities.d.ts.map +1 -0
  48. package/dist/core/src/index.d.ts +27 -0
  49. package/dist/core/src/index.d.ts.map +1 -0
  50. package/dist/core/src/logger.d.ts +47 -0
  51. package/dist/core/src/logger.d.ts.map +1 -0
  52. package/dist/core/src/prompts.d.ts +8 -0
  53. package/dist/core/src/prompts.d.ts.map +1 -0
  54. package/dist/core/src/roles.d.ts +30 -0
  55. package/dist/core/src/roles.d.ts.map +1 -0
  56. package/dist/core/src/runtime.d.ts +328 -0
  57. package/dist/core/src/runtime.d.ts.map +1 -0
  58. package/dist/core/src/schemas/character.d.ts +228 -0
  59. package/dist/core/src/schemas/character.d.ts.map +1 -0
  60. package/dist/core/src/search.d.ts +317 -0
  61. package/dist/core/src/search.d.ts.map +1 -0
  62. package/dist/core/src/sentry/instrument.d.ts +12 -0
  63. package/dist/core/src/sentry/instrument.d.ts.map +1 -0
  64. package/dist/core/src/services.d.ts +49 -0
  65. package/dist/core/src/services.d.ts.map +1 -0
  66. package/dist/core/src/settings.d.ts +87 -0
  67. package/dist/core/src/settings.d.ts.map +1 -0
  68. package/dist/core/src/types/agent.d.ts +98 -0
  69. package/dist/core/src/types/agent.d.ts.map +1 -0
  70. package/dist/core/src/types/browser.d.ts +127 -0
  71. package/dist/core/src/types/browser.d.ts.map +1 -0
  72. package/dist/core/src/types/components.d.ts +135 -0
  73. package/dist/core/src/types/components.d.ts.map +1 -0
  74. package/dist/core/src/types/database.d.ts +278 -0
  75. package/dist/core/src/types/database.d.ts.map +1 -0
  76. package/dist/core/src/types/email.d.ts +143 -0
  77. package/dist/core/src/types/email.d.ts.map +1 -0
  78. package/dist/core/src/types/environment.d.ts +109 -0
  79. package/dist/core/src/types/environment.d.ts.map +1 -0
  80. package/dist/core/src/types/events.d.ts +207 -0
  81. package/dist/core/src/types/events.d.ts.map +1 -0
  82. package/dist/core/src/types/index.d.ts +30 -0
  83. package/dist/core/src/types/index.d.ts.map +1 -0
  84. package/dist/core/src/types/knowledge.d.ts +60 -0
  85. package/dist/core/src/types/knowledge.d.ts.map +1 -0
  86. package/dist/core/src/types/lp.d.ts +115 -0
  87. package/dist/core/src/types/lp.d.ts.map +1 -0
  88. package/dist/core/src/types/memory.d.ts +165 -0
  89. package/dist/core/src/types/memory.d.ts.map +1 -0
  90. package/dist/core/src/types/message.d.ts +202 -0
  91. package/dist/core/src/types/message.d.ts.map +1 -0
  92. package/dist/core/src/types/messaging.d.ts +45 -0
  93. package/dist/core/src/types/messaging.d.ts.map +1 -0
  94. package/dist/core/src/types/model.d.ts +319 -0
  95. package/dist/core/src/types/model.d.ts.map +1 -0
  96. package/dist/core/src/types/pdf.d.ts +68 -0
  97. package/dist/core/src/types/pdf.d.ts.map +1 -0
  98. package/dist/core/src/types/plugin.d.ts +64 -0
  99. package/dist/core/src/types/plugin.d.ts.map +1 -0
  100. package/dist/core/src/types/post.d.ts +242 -0
  101. package/dist/core/src/types/post.d.ts.map +1 -0
  102. package/dist/core/src/types/primitives.d.ts +72 -0
  103. package/dist/core/src/types/primitives.d.ts.map +1 -0
  104. package/dist/core/src/types/runtime.d.ts +106 -0
  105. package/dist/core/src/types/runtime.d.ts.map +1 -0
  106. package/dist/core/src/types/service.d.ts +147 -0
  107. package/dist/core/src/types/service.d.ts.map +1 -0
  108. package/dist/core/src/types/settings.d.ts +30 -0
  109. package/dist/core/src/types/settings.d.ts.map +1 -0
  110. package/dist/core/src/types/state.d.ts +59 -0
  111. package/dist/core/src/types/state.d.ts.map +1 -0
  112. package/dist/core/src/types/task.d.ts +68 -0
  113. package/dist/core/src/types/task.d.ts.map +1 -0
  114. package/dist/core/src/types/tee.d.ts +97 -0
  115. package/dist/core/src/types/tee.d.ts.map +1 -0
  116. package/dist/core/src/types/testing.d.ts +29 -0
  117. package/dist/core/src/types/testing.d.ts.map +1 -0
  118. package/dist/core/src/types/token.d.ts +73 -0
  119. package/dist/core/src/types/token.d.ts.map +1 -0
  120. package/dist/core/src/types/transcription.d.ts +108 -0
  121. package/dist/core/src/types/transcription.d.ts.map +1 -0
  122. package/dist/core/src/types/video.d.ts +93 -0
  123. package/dist/core/src/types/video.d.ts.map +1 -0
  124. package/dist/core/src/types/wallet.d.ts +49 -0
  125. package/dist/core/src/types/wallet.d.ts.map +1 -0
  126. package/dist/core/src/types/web-search.d.ts +112 -0
  127. package/dist/core/src/types/web-search.d.ts.map +1 -0
  128. package/dist/core/src/utils/buffer.d.ts +105 -0
  129. package/dist/core/src/utils/buffer.d.ts.map +1 -0
  130. package/dist/core/src/utils/environment.d.ts +106 -0
  131. package/dist/core/src/utils/environment.d.ts.map +1 -0
  132. package/dist/core/src/utils/server-health.d.ts +23 -0
  133. package/dist/core/src/utils/server-health.d.ts.map +1 -0
  134. package/dist/core/src/utils.d.ts +177 -0
  135. package/dist/core/src/utils.d.ts.map +1 -0
  136. package/dist/index.d.ts +1 -919
  137. package/dist/index.js +210 -408
  138. package/dist/index.js.map +19 -1
  139. package/dist/tsconfig.build.tsbuildinfo +1 -0
  140. package/package.json +5 -6
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Interface representing settings with string key-value pairs.
3
+ */
4
+ export interface RuntimeSettings {
5
+ [key: string]: string | undefined;
6
+ }
7
+ export interface Setting {
8
+ name: string;
9
+ description: string;
10
+ usageDescription: string;
11
+ value: string | boolean | null;
12
+ required: boolean;
13
+ public?: boolean;
14
+ secret?: boolean;
15
+ validation?: (value: any) => boolean;
16
+ dependsOn?: string[];
17
+ onSetAction?: (value: any) => string;
18
+ visibleIf?: (settings: {
19
+ [key: string]: Setting;
20
+ }) => boolean;
21
+ }
22
+ export interface WorldSettings {
23
+ [key: string]: Setting;
24
+ }
25
+ export interface OnboardingConfig {
26
+ settings: {
27
+ [key: string]: Omit<Setting, 'value'>;
28
+ };
29
+ }
30
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../../core/src/types/settings.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;IACrC,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;CAC/D;AAED,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;KACvC,CAAC;CACH"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Represents the current state or context of a conversation or agent interaction.
3
+ * This interface is a flexible container for various pieces of information that define the agent's
4
+ * understanding at a point in time. It includes:
5
+ * - `values`: A key-value store for general state variables, often populated by providers.
6
+ * - `data`: Another key-value store, potentially for more structured or internal data.
7
+ * - `text`: A string representation of the current context, often a summary or concatenated history.
8
+ * The `[key: string]: any;` allows for dynamic properties, though `EnhancedState` offers better typing.
9
+ * This state object is passed to handlers for actions, evaluators, and providers.
10
+ */
11
+ export interface State {
12
+ /** Additional dynamic properties */
13
+ [key: string]: any;
14
+ values: {
15
+ [key: string]: any;
16
+ };
17
+ data: {
18
+ [key: string]: any;
19
+ };
20
+ text: string;
21
+ }
22
+ /**
23
+ * Defines the possible primitive types or structured types for a value within the agent's state.
24
+ * This type is used to provide more specific typing for properties within `StateObject` and `StateArray`,
25
+ * moving away from a generic 'any' type for better type safety and clarity in state management.
26
+ */
27
+ export type StateValue = string | number | boolean | null | StateObject | StateArray;
28
+ /**
29
+ * Represents a generic object structure within the agent's state, where keys are strings
30
+ * and values can be any `StateValue`. This allows for nested objects within the state.
31
+ * It's a fundamental part of the `EnhancedState` interface.
32
+ */
33
+ export interface StateObject {
34
+ [key: string]: StateValue;
35
+ }
36
+ /**
37
+ * Represents an array of `StateValue` types within the agent's state.
38
+ * This allows for lists of mixed or uniform types to be stored in the state,
39
+ * contributing to the structured definition of `EnhancedState`.
40
+ */
41
+ export type StateArray = StateValue[];
42
+ /**
43
+ * Enhanced State interface with more specific types for its core properties.
44
+ * This interface provides a more structured representation of an agent's conversational state,
45
+ * building upon the base `State` by typing `values` and `data` as `StateObject`.
46
+ * The `text` property typically holds a textual summary or context derived from the state.
47
+ * Additional dynamic properties are still allowed via the index signature `[key: string]: StateValue;`.
48
+ */
49
+ export interface EnhancedState {
50
+ /** Holds directly accessible state values, often used for template rendering or quick lookups. */
51
+ values: StateObject;
52
+ /** Stores more complex or structured data, potentially namespaced by providers or internal systems. */
53
+ data: StateObject;
54
+ /** A textual representation or summary of the current state, often used as context for models. */
55
+ text: string;
56
+ /** Allows for additional dynamic properties to be added to the state object. */
57
+ [key: string]: StateValue;
58
+ }
59
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../core/src/types/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,KAAK;IACpB,oCAAoC;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,MAAM,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,WAAW,GAAG,UAAU,CAAC;AACrF;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3B;AACD;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,EAAE,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,kGAAkG;IAClG,MAAM,EAAE,WAAW,CAAC;IACpB,uGAAuG;IACvG,IAAI,EAAE,WAAW,CAAC;IAClB,kGAAkG;IAClG,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3B"}
@@ -0,0 +1,68 @@
1
+ import type { Memory } from './memory';
2
+ import type { UUID } from './primitives';
3
+ import type { IAgentRuntime } from './runtime';
4
+ import type { State } from './state';
5
+ /**
6
+ * Defines the contract for a Task Worker, which is responsible for executing a specific type of task.
7
+ * Task workers are registered with the `AgentRuntime` and are invoked when a `Task` of their designated `name` needs processing.
8
+ * This pattern allows for modular and extensible background task processing.
9
+ */
10
+ export interface TaskWorker {
11
+ /** The unique name of the task type this worker handles. This name links `Task` instances to this worker. */
12
+ name: string;
13
+ /**
14
+ * The core execution logic for the task. This function is called by the runtime when a task needs to be processed.
15
+ * It receives the `AgentRuntime`, task-specific `options`, and the `Task` object itself.
16
+ */
17
+ execute: (runtime: IAgentRuntime, options: {
18
+ [key: string]: unknown;
19
+ }, task: Task) => Promise<void>;
20
+ /**
21
+ * Optional validation function that can be used to determine if a task is valid or should be executed,
22
+ * often based on the current message and state. This might be used by an action or evaluator
23
+ * before creating or queueing a task.
24
+ */
25
+ validate?: (runtime: IAgentRuntime, message: Memory, state: State) => Promise<boolean>;
26
+ }
27
+ /**
28
+ * Defines metadata associated with a `Task`.
29
+ * This can include scheduling information like `updateInterval` or UI-related details
30
+ * for presenting task options to a user.
31
+ * The `[key: string]: unknown;` allows for additional, unspecified metadata fields.
32
+ */
33
+ export type TaskMetadata = {
34
+ /** Optional. If the task is recurring, this specifies the interval in milliseconds between updates or executions. */
35
+ updateInterval?: number;
36
+ /** Optional. Describes options or parameters that can be configured for this task, often for UI presentation. */
37
+ options?: {
38
+ name: string;
39
+ description: string;
40
+ }[];
41
+ /** Allows for other dynamic metadata properties related to the task. */
42
+ [key: string]: unknown;
43
+ };
44
+ /**
45
+ * Represents a task to be performed, often in the background or at a later time.
46
+ * Tasks are managed by the `AgentRuntime` and processed by registered `TaskWorker`s.
47
+ * They can be associated with a room, world, and tagged for categorization and retrieval.
48
+ * The `IDatabaseAdapter` handles persistence of task data.
49
+ */
50
+ export interface Task {
51
+ /** Optional. A Universally Unique Identifier for the task. Generated if not provided. */
52
+ id?: UUID;
53
+ /** The name of the task, which should correspond to a registered `TaskWorker.name`. */
54
+ name: string;
55
+ /** Optional. Timestamp of the last update to this task. */
56
+ updatedAt?: number;
57
+ /** Optional. Metadata associated with the task, conforming to `TaskMetadata`. */
58
+ metadata?: TaskMetadata;
59
+ /** A human-readable description of what the task does or its purpose. */
60
+ description: string;
61
+ /** Optional. The UUID of the room this task is associated with. */
62
+ roomId?: UUID;
63
+ /** Optional. The UUID of the world this task is associated with. */
64
+ worldId?: UUID;
65
+ entityId?: UUID;
66
+ tags: string[];
67
+ }
68
+ //# sourceMappingURL=task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../../../core/src/types/task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,6GAA6G;IAC7G,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,EAAE,CACP,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,EACnC,IAAI,EAAE,IAAI,KACP,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACxF;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,qHAAqH;IACrH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iHAAiH;IACjH,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;KACrB,EAAE,CAAC;IACJ,wEAAwE;IACxE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,IAAI;IACnB,yFAAyF;IACzF,EAAE,CAAC,EAAE,IAAI,CAAC;IACV,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,oEAAoE;IACpE,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB"}
@@ -0,0 +1,97 @@
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
+ }
97
+ //# sourceMappingURL=tee.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tee.d.ts","sourceRoot":"","sources":["../../../../../core/src/types/tee.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,gGAAgG;IAChG,EAAE,EAAE,MAAM,CAAC;IAIX,mGAAmG;IACnG,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,2FAA2F;IAC3F,SAAS,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB,2FAA2F;IAC3F,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,oBAAY,OAAO;IACjB,gDAAgD;IAChD,GAAG,QAAQ;IACX,gEAAgE;IAChE,KAAK,UAAU,CAAE,uCAAuC;IACxD,gFAAgF;IAChF,MAAM,WAAW,CAAE,wCAAwC;IAC3D,iFAAiF;IACjF,UAAU,eAAe;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,uFAAuF;IACvF,KAAK,EAAE,MAAM,CAAC;IACd,6FAA6F;IAC7F,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,yFAAyF;IACzF,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;IAChB,0FAA0F;IAC1F,SAAS,EAAE,MAAM,CAAC;IAClB,oGAAoG;IACpG,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,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"}
@@ -0,0 +1,29 @@
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
+ }
29
+ //# sourceMappingURL=testing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../../core/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"}
@@ -0,0 +1,73 @@
1
+ import { Service } from './service';
2
+ /**
3
+ * A standardized representation of a token holding.
4
+ */
5
+ export interface TokenBalance {
6
+ address: string;
7
+ balance: string;
8
+ decimals: number;
9
+ uiAmount?: number;
10
+ name?: string;
11
+ symbol?: string;
12
+ logoURI?: string;
13
+ }
14
+ /**
15
+ * Generic representation of token data that can be provided by various services.
16
+ */
17
+ export interface TokenData {
18
+ id: string;
19
+ symbol: string;
20
+ name: string;
21
+ address: string;
22
+ chain: string;
23
+ sourceProvider: string;
24
+ price?: number;
25
+ priceChange24hPercent?: number;
26
+ priceChange24hUSD?: number;
27
+ volume24hUSD?: number;
28
+ marketCapUSD?: number;
29
+ liquidity?: number;
30
+ holders?: number;
31
+ logoURI?: string;
32
+ decimals?: number;
33
+ lastUpdatedAt?: Date;
34
+ raw?: any;
35
+ }
36
+ /**
37
+ * Interface for a generic service that provides token data.
38
+ */
39
+ export declare abstract class ITokenDataService extends Service {
40
+ static readonly serviceType: "token_data";
41
+ readonly capabilityDescription: string;
42
+ /**
43
+ * Fetches detailed information for a single token.
44
+ * @param address The token's contract address.
45
+ * @param chain The blockchain the token resides on.
46
+ * @returns A Promise resolving to TokenData or null if not found.
47
+ */
48
+ abstract getTokenDetails(address: string, chain: string): Promise<TokenData | null>;
49
+ /**
50
+ * Fetches a list of trending tokens.
51
+ * @param chain Optional: Filter by a specific blockchain.
52
+ * @param limit Optional: Number of tokens to return. Defaults to a service-specific value.
53
+ * @param timePeriod Optional: Time period for trending data (e.g., '24h', '7d'). Defaults to service-specific.
54
+ * @returns A Promise resolving to an array of TokenData.
55
+ */
56
+ abstract getTrendingTokens(chain?: string, limit?: number, timePeriod?: string): Promise<TokenData[]>;
57
+ /**
58
+ * Searches for tokens based on a query string.
59
+ * @param query The search query (e.g., symbol, name, address).
60
+ * @param chain Optional: Filter by a specific blockchain.
61
+ * @param limit Optional: Number of results to return.
62
+ * @returns A Promise resolving to an array of TokenData.
63
+ */
64
+ abstract searchTokens(query: string, chain?: string, limit?: number): Promise<TokenData[]>;
65
+ /**
66
+ * Fetches data for multiple tokens by their addresses on a specific chain.
67
+ * @param addresses Array of token contract addresses.
68
+ * @param chain The blockchain the tokens reside on.
69
+ * @returns A Promise resolving to an array of TokenData. May not include all requested if some are not found.
70
+ */
71
+ abstract getTokensByAddresses(addresses: string[], chain: string): Promise<TokenData[]>;
72
+ }
73
+ //# sourceMappingURL=token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../../../core/src/types/token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,WAAW,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EA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E,CAAC;IAEvB;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAE1F;;;;;OAKG;IACH,QAAQ,CAAC,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;CAKxF"}
@@ -0,0 +1,108 @@
1
+ import { Service } from './service';
2
+ export interface TranscriptionOptions {
3
+ language?: string;
4
+ model?: string;
5
+ temperature?: number;
6
+ prompt?: string;
7
+ response_format?: 'json' | 'text' | 'srt' | 'vtt' | 'verbose_json';
8
+ timestamp_granularities?: ('word' | 'segment')[];
9
+ word_timestamps?: boolean;
10
+ segment_timestamps?: boolean;
11
+ }
12
+ export interface TranscriptionResult {
13
+ text: string;
14
+ language?: string;
15
+ duration?: number;
16
+ segments?: TranscriptionSegment[];
17
+ words?: TranscriptionWord[];
18
+ confidence?: number;
19
+ }
20
+ export interface TranscriptionSegment {
21
+ id: number;
22
+ text: string;
23
+ start: number;
24
+ end: number;
25
+ confidence?: number;
26
+ tokens?: number[];
27
+ temperature?: number;
28
+ avg_logprob?: number;
29
+ compression_ratio?: number;
30
+ no_speech_prob?: number;
31
+ }
32
+ export interface TranscriptionWord {
33
+ word: string;
34
+ start: number;
35
+ end: number;
36
+ confidence?: number;
37
+ }
38
+ export interface SpeechToTextOptions {
39
+ language?: string;
40
+ model?: string;
41
+ continuous?: boolean;
42
+ interimResults?: boolean;
43
+ maxAlternatives?: number;
44
+ }
45
+ export interface TextToSpeechOptions {
46
+ voice?: string;
47
+ model?: string;
48
+ speed?: number;
49
+ format?: 'mp3' | 'wav' | 'flac' | 'aac';
50
+ response_format?: 'mp3' | 'opus' | 'aac' | 'flac';
51
+ }
52
+ /**
53
+ * Interface for audio transcription and speech services
54
+ */
55
+ export declare abstract class ITranscriptionService extends Service {
56
+ static readonly serviceType: "transcription";
57
+ readonly capabilityDescription = "Audio transcription and speech processing capabilities";
58
+ /**
59
+ * Transcribe audio file to text
60
+ * @param audioPath - Path to audio file or audio buffer
61
+ * @param options - Transcription options
62
+ * @returns Promise resolving to transcription result
63
+ */
64
+ abstract transcribeAudio(audioPath: string | Buffer, options?: TranscriptionOptions): Promise<TranscriptionResult>;
65
+ /**
66
+ * Transcribe video file to text (extracts audio first)
67
+ * @param videoPath - Path to video file or video buffer
68
+ * @param options - Transcription options
69
+ * @returns Promise resolving to transcription result
70
+ */
71
+ abstract transcribeVideo(videoPath: string | Buffer, options?: TranscriptionOptions): Promise<TranscriptionResult>;
72
+ /**
73
+ * Real-time speech to text from audio stream
74
+ * @param audioStream - Audio stream or buffer
75
+ * @param options - Speech to text options
76
+ * @returns Promise resolving to transcription result
77
+ */
78
+ abstract speechToText(audioStream: NodeJS.ReadableStream | Buffer, options?: SpeechToTextOptions): Promise<TranscriptionResult>;
79
+ /**
80
+ * Convert text to speech
81
+ * @param text - Text to convert to speech
82
+ * @param options - Text to speech options
83
+ * @returns Promise resolving to audio buffer
84
+ */
85
+ abstract textToSpeech(text: string, options?: TextToSpeechOptions): Promise<Buffer>;
86
+ /**
87
+ * Get supported languages for transcription
88
+ * @returns Promise resolving to array of supported language codes
89
+ */
90
+ abstract getSupportedLanguages(): Promise<string[]>;
91
+ /**
92
+ * Get available voices for text to speech
93
+ * @returns Promise resolving to array of available voices
94
+ */
95
+ abstract getAvailableVoices(): Promise<Array<{
96
+ id: string;
97
+ name: string;
98
+ language: string;
99
+ gender?: 'male' | 'female' | 'neutral';
100
+ }>>;
101
+ /**
102
+ * Detect language of audio file
103
+ * @param audioPath - Path to audio file or audio buffer
104
+ * @returns Promise resolving to detected language code
105
+ */
106
+ abstract detectLanguage(audioPath: string | Buffer): Promise<string>;
107
+ }
108
+ //# sourceMappingURL=transcription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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OAAO,CAAC,MAAM,CAAC;IAEnF;;;OAGG;IACH,QAAQ,CAAC,qBAAqB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAEnD;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,IAAI,OAAO,CACpC,KAAK,CAAC;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;KACxC,CAAC,CACH;IAED;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CACrE"}
@@ -0,0 +1,93 @@
1
+ import { Service } from './service';
2
+ export interface VideoInfo {
3
+ title?: string;
4
+ duration?: number;
5
+ url: string;
6
+ thumbnail?: string;
7
+ description?: string;
8
+ uploader?: string;
9
+ viewCount?: number;
10
+ uploadDate?: Date;
11
+ formats?: VideoFormat[];
12
+ }
13
+ export interface VideoFormat {
14
+ formatId: string;
15
+ url: string;
16
+ extension: string;
17
+ quality: string;
18
+ fileSize?: number;
19
+ videoCodec?: string;
20
+ audioCodec?: string;
21
+ resolution?: string;
22
+ fps?: number;
23
+ bitrate?: number;
24
+ }
25
+ export interface VideoDownloadOptions {
26
+ format?: string;
27
+ quality?: 'best' | 'worst' | 'bestvideo' | 'bestaudio' | string;
28
+ outputPath?: string;
29
+ audioOnly?: boolean;
30
+ videoOnly?: boolean;
31
+ subtitles?: boolean;
32
+ embedSubs?: boolean;
33
+ writeInfoJson?: boolean;
34
+ }
35
+ export interface VideoProcessingOptions {
36
+ startTime?: number;
37
+ endTime?: number;
38
+ outputFormat?: string;
39
+ resolution?: string;
40
+ bitrate?: string;
41
+ framerate?: number;
42
+ audioCodec?: string;
43
+ videoCodec?: string;
44
+ }
45
+ /**
46
+ * Interface for video processing and download services
47
+ */
48
+ export declare abstract class IVideoService extends Service {
49
+ static readonly serviceType: "video";
50
+ readonly capabilityDescription = "Video download, processing, and conversion capabilities";
51
+ /**
52
+ * Get video information without downloading
53
+ * @param url - Video URL
54
+ * @returns Promise resolving to video information
55
+ */
56
+ abstract getVideoInfo(url: string): Promise<VideoInfo>;
57
+ /**
58
+ * Download a video from URL
59
+ * @param url - Video URL
60
+ * @param options - Download options
61
+ * @returns Promise resolving to downloaded file path
62
+ */
63
+ abstract downloadVideo(url: string, options?: VideoDownloadOptions): Promise<string>;
64
+ /**
65
+ * Extract audio from video
66
+ * @param videoPath - Path to video file or video URL
67
+ * @param outputPath - Optional output path for audio file
68
+ * @returns Promise resolving to audio file path
69
+ */
70
+ abstract extractAudio(videoPath: string, outputPath?: string): Promise<string>;
71
+ /**
72
+ * Generate thumbnail from video
73
+ * @param videoPath - Path to video file or video URL
74
+ * @param timestamp - Timestamp in seconds to capture thumbnail
75
+ * @returns Promise resolving to thumbnail image path
76
+ */
77
+ abstract getThumbnail(videoPath: string, timestamp?: number): Promise<string>;
78
+ /**
79
+ * Convert video to different format
80
+ * @param videoPath - Path to input video file
81
+ * @param outputPath - Path for output video file
82
+ * @param options - Processing options
83
+ * @returns Promise resolving to converted video path
84
+ */
85
+ abstract convertVideo(videoPath: string, outputPath: string, options?: VideoProcessingOptions): Promise<string>;
86
+ /**
87
+ * Get available formats for a video URL
88
+ * @param url - Video URL
89
+ * @returns Promise resolving to available formats
90
+ */
91
+ abstract getAvailableFormats(url: string): Promise<VideoFormat[]>;
92
+ }
93
+ //# sourceMappingURL=video.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../../core/src/types/video.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,WAAW,CAAC;AAEjD,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ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M,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,8BAAsB,aAAc,SAAQ,OAAO;IACjD,gBAAyB,WAAW,UAAqB;IAEzD,SAAgB,qBAAqB,6DAA6D;IAElG;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAEtD;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;IAEpF;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAE9E;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAE7E;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,CACnB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,MAAM,CAAC;IAElB;;;;OAIG;IACH,QAAQ,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAClE"}
@@ -0,0 +1,49 @@
1
+ import { Service } from './service';
2
+ import type { TokenBalance } from './token';
3
+ /**
4
+ * Represents a single asset holding within a wallet, including its value.
5
+ * This extends a generic TokenBalance with wallet-specific valuation.
6
+ */
7
+ export interface WalletAsset extends TokenBalance {
8
+ priceUsd?: number;
9
+ valueUsd?: number;
10
+ }
11
+ /**
12
+ * Represents the entire portfolio of assets in a wallet.
13
+ */
14
+ export interface WalletPortfolio {
15
+ totalValueUsd: number;
16
+ assets: WalletAsset[];
17
+ }
18
+ /**
19
+ * Abstract interface for a Wallet Service.
20
+ * Plugins that provide wallet functionality (e.g., for Solana, EVM) should implement this service.
21
+ * It provides a standardized way for other plugins to query the state of a wallet.
22
+ */
23
+ export declare abstract class IWalletService extends Service {
24
+ static readonly serviceType: "wallet";
25
+ readonly capabilityDescription = "Provides standardized access to wallet balances and portfolios.";
26
+ /**
27
+ * Retrieves the entire portfolio of assets held by the wallet.
28
+ * @param owner - Optional: The specific wallet address/owner to query if the service manages multiple.
29
+ * @returns A promise that resolves to the wallet's portfolio.
30
+ */
31
+ abstract getPortfolio(owner?: string): Promise<WalletPortfolio>;
32
+ /**
33
+ * Retrieves the balance of a specific asset in the wallet.
34
+ * @param assetAddress - The mint address or native identifier of the asset.
35
+ * @param owner - Optional: The specific wallet address/owner to query.
36
+ * @returns A promise that resolves to the user-friendly (decimal-adjusted) balance of the asset held.
37
+ */
38
+ abstract getBalance(assetAddress: string, owner?: string): Promise<number>;
39
+ /**
40
+ * Transfers SOL from a specified keypair to a given public key.
41
+ * This is a low-level function primarily for Solana-based wallet services.
42
+ * @param from - The Keypair of the sender.
43
+ * @param to - The PublicKey of the recipient.
44
+ * @param lamports - The amount in lamports to transfer.
45
+ * @returns A promise that resolves with the transaction signature.
46
+ */
47
+ abstract transferSol(from: any, to: any, lamports: number): Promise<string>;
48
+ }
49
+ //# sourceMappingURL=wallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../../../../core/src/types/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED;;;;GAIG;AACH,8BAAsB,cAAe,SAAQ,OAAO;IAClD,gBAAyB,WAAW,WAAsB;IAE1D,SAAgB,qBAAqB,qEAC+B;IAEpE;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAE/D;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAE1E;;;;;;;OAOG;IACH,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAC5E"}