@elizaos/plugin-dummy-services 1.5.4 → 1.5.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.
package/dist/index.d.ts CHANGED
@@ -1,14 +1,205 @@
1
- import { type Plugin } from '@elizaos/core';
2
- import { DummyTokenDataService } from './tokenData/service';
3
- import { DummyLpService } from './lp/service';
4
- import { DummyWalletService } from './wallet/service';
5
- import { DummyPdfService } from './pdf/service';
6
- import { DummyVideoService } from './video/service';
7
- import { DummyBrowserService } from './browser/service';
8
- import { DummyTranscriptionService } from './transcription/service';
9
- import { DummyWebSearchService } from './web-search/service';
10
- import { DummyEmailService } from './email/service';
11
- export declare const dummyServicesPlugin: Plugin;
12
- export default dummyServicesPlugin;
13
- export { DummyTokenDataService, DummyLpService, DummyWalletService, DummyPdfService, DummyVideoService, DummyBrowserService, DummyTranscriptionService, DummyWebSearchService, DummyEmailService, };
14
- //# sourceMappingURL=index.d.ts.map
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
+
3
+ declare class DummyTokenDataService extends ITokenDataService {
4
+ readonly serviceName = "dummy-token-data";
5
+ static readonly serviceType: "token_data";
6
+ constructor(runtime?: IAgentRuntime);
7
+ private generateDummyToken;
8
+ getTokenDetails(address: string, chain: string): Promise<TokenData | null>;
9
+ getTrendingTokens(chain?: string, limit?: number, _timePeriod?: string): Promise<TokenData[]>;
10
+ searchTokens(query: string, chain?: string, limit?: number): Promise<TokenData[]>;
11
+ getTokensByAddresses(addresses: string[], chain: string): Promise<TokenData[]>;
12
+ static start(runtime: IAgentRuntime): Promise<DummyTokenDataService>;
13
+ static stop(runtime: IAgentRuntime): Promise<void>;
14
+ start(): Promise<void>;
15
+ stop(): Promise<void>;
16
+ }
17
+
18
+ declare class DummyLpService extends ILpService {
19
+ getDexName(): string;
20
+ static start(runtime: IAgentRuntime): Promise<DummyLpService>;
21
+ static stop(runtime: IAgentRuntime): Promise<void>;
22
+ start(runtime: IAgentRuntime): Promise<void>;
23
+ stop(): Promise<void>;
24
+ getPools(tokenAMint?: string, tokenBMint?: string): Promise<PoolInfo[]>;
25
+ addLiquidity(params: {
26
+ userVault: any;
27
+ poolId: string;
28
+ tokenAAmountLamports: string;
29
+ tokenBAmountLamports?: string;
30
+ slippageBps: number;
31
+ }): Promise<TransactionResult & {
32
+ lpTokensReceived?: TokenBalance;
33
+ }>;
34
+ removeLiquidity(params: {
35
+ userVault: any;
36
+ poolId: string;
37
+ lpTokenAmountLamports: string;
38
+ slippageBps: number;
39
+ }): Promise<TransactionResult & {
40
+ tokensReceived?: TokenBalance[];
41
+ }>;
42
+ getLpPositionDetails(userAccountPublicKey: string, poolOrPositionIdentifier: string): Promise<LpPositionDetails | null>;
43
+ getMarketDataForPools(poolIds: string[]): Promise<Record<string, Partial<PoolInfo>>>;
44
+ }
45
+
46
+ declare class DummyWalletService extends IWalletService {
47
+ static readonly serviceType: "wallet";
48
+ private balances;
49
+ private positions;
50
+ private quoteAssetSymbol;
51
+ constructor(runtime: AgentRuntime);
52
+ transferSol(from: any, to: any, lamports: number): Promise<string>;
53
+ static start(runtime: AgentRuntime): Promise<DummyWalletService>;
54
+ start(): Promise<void>;
55
+ stop(): Promise<void>;
56
+ addFunds(assetSymbolOrAddress: string, amount: number, _walletAddress?: string): Promise<void>;
57
+ setPortfolioHolding(assetSymbolOrAddress: string, quantity: number, averagePrice: number, _walletAddress?: string): Promise<void>;
58
+ resetWallet(initialCashAmount: number, cashAssetSymbol?: string, _walletAddress?: string): Promise<void>;
59
+ getBalance(assetSymbolOrAddress: string, _walletAddress?: string): Promise<number>;
60
+ getPortfolio(_walletAddress?: string): Promise<WalletPortfolio>;
61
+ }
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
+
203
+ declare const dummyServicesPlugin: Plugin;
204
+
205
+ export { DummyBrowserService, DummyEmailService, DummyLpService, DummyPdfService, DummyTokenDataService, DummyTranscriptionService, DummyVideoService, DummyWalletService, DummyWebSearchService, dummyServicesPlugin as default, dummyServicesPlugin };