@elizaos/plugin-dummy-services 1.2.4 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import { Service, ITokenDataService, IAgentRuntime, TokenData, ILpService, PoolInfo, TransactionResult, TokenBalance, LpPositionDetails, IWalletService, AgentRuntime, WalletPortfolio, Plugin } from '@elizaos/core';
1
+ import { ITokenDataService, IAgentRuntime, TokenData, ILpService, PoolInfo, TransactionResult, TokenBalance, LpPositionDetails, IWalletService, AgentRuntime, WalletPortfolio, IPdfService, PdfExtractionResult, PdfGenerationOptions, PdfConversionOptions, IVideoService, VideoInfo, VideoDownloadOptions, VideoProcessingOptions, VideoFormat, IBrowserService, BrowserNavigationOptions, ScreenshotOptions, ExtractedContent, ElementSelector, ClickOptions, TypeOptions, ITranscriptionService, TranscriptionOptions, TranscriptionResult, SpeechToTextOptions, TextToSpeechOptions, IWebSearchService, SearchOptions, SearchResponse, NewsSearchOptions, ImageSearchOptions, VideoSearchOptions, IEmailService, EmailMessage, EmailSendOptions, EmailSearchOptions, EmailFolder, EmailAccount, Plugin } from '@elizaos/core';
2
2
 
3
- declare class DummyTokenDataService extends Service implements ITokenDataService {
3
+ declare class DummyTokenDataService extends ITokenDataService {
4
4
  readonly serviceName = "dummy-token-data";
5
5
  static readonly serviceType: "token_data";
6
- readonly capabilityDescription = "Provides dummy token data for testing and development purposes.";
7
6
  constructor(runtime?: IAgentRuntime);
8
7
  private generateDummyToken;
9
8
  getTokenDetails(address: string, chain: string): Promise<TokenData | null>;
@@ -44,9 +43,8 @@ declare class DummyLpService extends ILpService {
44
43
  getMarketDataForPools(poolIds: string[]): Promise<Record<string, Partial<PoolInfo>>>;
45
44
  }
46
45
 
47
- declare class DummyWalletService extends Service implements IWalletService {
46
+ declare class DummyWalletService extends IWalletService {
48
47
  static readonly serviceType: "wallet";
49
- readonly capabilityDescription = "Provides standardized access to wallet balances and portfolios.";
50
48
  private balances;
51
49
  private positions;
52
50
  private quoteAssetSymbol;
@@ -62,6 +60,146 @@ declare class DummyWalletService extends Service implements IWalletService {
62
60
  getPortfolio(_walletAddress?: string): Promise<WalletPortfolio>;
63
61
  }
64
62
 
63
+ /**
64
+ * Dummy PDF service for testing purposes
65
+ * Provides mock implementations of PDF processing operations
66
+ */
67
+ declare class DummyPdfService extends IPdfService {
68
+ static readonly serviceType: "pdf";
69
+ constructor(runtime: IAgentRuntime);
70
+ static start(runtime: IAgentRuntime): Promise<DummyPdfService>;
71
+ initialize(): Promise<void>;
72
+ stop(): Promise<void>;
73
+ extractText(pdfPath: string | Buffer): Promise<PdfExtractionResult>;
74
+ generatePdf(htmlContent: string, options?: PdfGenerationOptions): Promise<Buffer>;
75
+ convertToPdf(filePath: string, options?: PdfConversionOptions): Promise<Buffer>;
76
+ mergePdfs(pdfPaths: (string | Buffer)[]): Promise<Buffer>;
77
+ splitPdf(pdfPath: string | Buffer): Promise<Buffer[]>;
78
+ }
79
+
80
+ /**
81
+ * Dummy video service for testing purposes
82
+ * Provides mock implementations of video processing operations
83
+ */
84
+ declare class DummyVideoService extends IVideoService {
85
+ static readonly serviceType: "video";
86
+ constructor(runtime: IAgentRuntime);
87
+ static start(runtime: IAgentRuntime): Promise<DummyVideoService>;
88
+ initialize(): Promise<void>;
89
+ stop(): Promise<void>;
90
+ getVideoInfo(url: string): Promise<VideoInfo>;
91
+ downloadVideo(url: string, options?: VideoDownloadOptions): Promise<string>;
92
+ extractAudio(videoPath: string, outputPath?: string): Promise<string>;
93
+ getThumbnail(videoPath: string, timestamp?: number): Promise<string>;
94
+ convertVideo(videoPath: string, outputPath: string, options?: VideoProcessingOptions): Promise<string>;
95
+ getAvailableFormats(url: string): Promise<VideoFormat[]>;
96
+ }
97
+
98
+ /**
99
+ * Dummy browser service for testing purposes
100
+ * Provides mock implementations of browser automation operations
101
+ */
102
+ declare class DummyBrowserService extends IBrowserService {
103
+ static readonly serviceType: "browser";
104
+ private currentUrl;
105
+ private history;
106
+ private historyIndex;
107
+ constructor(runtime: IAgentRuntime);
108
+ static start(runtime: IAgentRuntime): Promise<DummyBrowserService>;
109
+ initialize(): Promise<void>;
110
+ stop(): Promise<void>;
111
+ navigate(url: string, options?: BrowserNavigationOptions): Promise<void>;
112
+ screenshot(options?: ScreenshotOptions): Promise<Buffer>;
113
+ extractContent(selector?: string): Promise<ExtractedContent>;
114
+ click(selector: string | ElementSelector, options?: ClickOptions): Promise<void>;
115
+ type(selector: string, text: string, options?: TypeOptions): Promise<void>;
116
+ waitForElement(selector: string | ElementSelector): Promise<void>;
117
+ evaluate<T = any>(script: string, ...args: any[]): Promise<T>;
118
+ getCurrentUrl(): Promise<string>;
119
+ goBack(): Promise<void>;
120
+ goForward(): Promise<void>;
121
+ refresh(): Promise<void>;
122
+ }
123
+
124
+ /**
125
+ * Dummy transcription service for testing purposes
126
+ * Provides mock implementations of transcription operations
127
+ */
128
+ declare class DummyTranscriptionService extends ITranscriptionService {
129
+ static readonly serviceType: "transcription";
130
+ private supportedLanguages;
131
+ private availableVoices;
132
+ constructor(runtime: IAgentRuntime);
133
+ static start(runtime: IAgentRuntime): Promise<DummyTranscriptionService>;
134
+ initialize(): Promise<void>;
135
+ stop(): Promise<void>;
136
+ transcribeAudio(audioPath: string | Buffer, options?: TranscriptionOptions): Promise<TranscriptionResult>;
137
+ transcribeVideo(videoPath: string | Buffer, options?: TranscriptionOptions): Promise<TranscriptionResult>;
138
+ speechToText(audioStream: NodeJS.ReadableStream | Buffer, options?: SpeechToTextOptions): Promise<TranscriptionResult>;
139
+ textToSpeech(text: string, options?: TextToSpeechOptions): Promise<Buffer>;
140
+ getSupportedLanguages(): Promise<string[]>;
141
+ getAvailableVoices(): Promise<Array<{
142
+ id: string;
143
+ name: string;
144
+ language: string;
145
+ gender?: 'male' | 'female' | 'neutral';
146
+ }>>;
147
+ detectLanguage(audioPath: string | Buffer): Promise<string>;
148
+ }
149
+
150
+ /**
151
+ * Dummy web search service for testing purposes
152
+ * Provides mock implementations of web search operations
153
+ */
154
+ declare class DummyWebSearchService extends IWebSearchService {
155
+ static readonly serviceType: "web_search";
156
+ private trendingSearches;
157
+ constructor(runtime: IAgentRuntime);
158
+ static start(runtime: IAgentRuntime): Promise<DummyWebSearchService>;
159
+ initialize(): Promise<void>;
160
+ stop(): Promise<void>;
161
+ search(query: string, options?: SearchOptions): Promise<SearchResponse>;
162
+ searchNews(query: string, options?: NewsSearchOptions): Promise<SearchResponse>;
163
+ searchImages(query: string, options?: ImageSearchOptions): Promise<SearchResponse>;
164
+ searchVideos(query: string, options?: VideoSearchOptions): Promise<SearchResponse>;
165
+ getSuggestions(query: string): Promise<string[]>;
166
+ getTrendingSearches(region?: string): Promise<string[]>;
167
+ getPageInfo(url: string): Promise<{
168
+ title: string;
169
+ description: string;
170
+ content: string;
171
+ metadata: Record<string, string>;
172
+ images: string[];
173
+ links: string[];
174
+ }>;
175
+ }
176
+
177
+ /**
178
+ * Dummy email service for testing purposes
179
+ * Provides mock implementations of email operations
180
+ */
181
+ declare class DummyEmailService extends IEmailService {
182
+ static readonly serviceType: "email";
183
+ private mockEmails;
184
+ private mockFolders;
185
+ constructor(runtime: IAgentRuntime);
186
+ static start(runtime: IAgentRuntime): Promise<DummyEmailService>;
187
+ initialize(): Promise<void>;
188
+ stop(): Promise<void>;
189
+ private initializeMockEmails;
190
+ sendEmail(message: EmailMessage, options?: EmailSendOptions): Promise<string>;
191
+ getEmails(options?: EmailSearchOptions): Promise<EmailMessage[]>;
192
+ getEmail(messageId: string): Promise<EmailMessage>;
193
+ deleteEmail(messageId: string): Promise<void>;
194
+ markEmailAsRead(messageId: string, read: boolean): Promise<void>;
195
+ flagEmail(messageId: string, flagged: boolean): Promise<void>;
196
+ moveEmail(messageId: string, folderPath: string): Promise<void>;
197
+ getFolders(): Promise<EmailFolder[]>;
198
+ createFolder(folderName: string, parentPath?: string): Promise<void>;
199
+ getAccountInfo(): Promise<EmailAccount>;
200
+ searchEmails(query: string, options?: EmailSearchOptions): Promise<EmailMessage[]>;
201
+ }
202
+
65
203
  declare const dummyServicesPlugin: Plugin;
66
204
 
67
- export { DummyLpService, DummyTokenDataService, DummyWalletService, dummyServicesPlugin as default, dummyServicesPlugin };
205
+ export { DummyBrowserService, DummyEmailService, DummyLpService, DummyPdfService, DummyTokenDataService, DummyTranscriptionService, DummyVideoService, DummyWalletService, DummyWebSearchService, dummyServicesPlugin as default, dummyServicesPlugin };