@elizaos/plugin-dummy-services 1.4.5 → 1.5.1
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/browser/service.d.ts +60 -0
- package/dist/browser/service.d.ts.map +1 -0
- package/dist/e2e/scenarios.d.ts +3 -0
- package/dist/e2e/scenarios.d.ts.map +1 -0
- package/dist/e2e/test-utils.d.ts +29 -0
- package/dist/e2e/test-utils.d.ts.map +1 -0
- package/dist/email/service.d.ts +94 -0
- package/dist/email/service.d.ts.map +1 -0
- package/dist/index.d.ts +14 -205
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +829 -1344
- package/dist/index.js.map +20 -1
- package/dist/lp/service.d.ts +75 -0
- package/dist/lp/service.d.ts.map +1 -0
- package/dist/pdf/service.d.ts +44 -0
- package/dist/pdf/service.d.ts.map +1 -0
- package/dist/tokenData/service.d.ts +46 -0
- package/dist/tokenData/service.d.ts.map +1 -0
- package/dist/transcription/service.d.ts +58 -0
- package/dist/transcription/service.d.ts.map +1 -0
- package/dist/video/service.d.ts +51 -0
- package/dist/video/service.d.ts.map +1 -0
- package/dist/wallet/service.d.ts +33 -0
- package/dist/wallet/service.d.ts.map +1 -0
- package/dist/web-search/service.d.ts +61 -0
- package/dist/web-search/service.d.ts.map +1 -0
- package/package.json +6 -7
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { IAgentRuntime, Service } from '@elizaos/core';
|
|
2
|
+
export interface BrowserNavigationOptions {
|
|
3
|
+
waitUntil?: 'load' | 'domcontentloaded' | 'networkidle';
|
|
4
|
+
timeout?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ScreenshotOptions {
|
|
7
|
+
fullPage?: boolean;
|
|
8
|
+
quality?: number;
|
|
9
|
+
type?: 'png' | 'jpeg';
|
|
10
|
+
}
|
|
11
|
+
export interface ElementSelector {
|
|
12
|
+
selector: string;
|
|
13
|
+
type?: 'css' | 'xpath';
|
|
14
|
+
}
|
|
15
|
+
export interface ExtractedContent {
|
|
16
|
+
text?: string;
|
|
17
|
+
html?: string;
|
|
18
|
+
attributes?: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
export interface ClickOptions {
|
|
21
|
+
button?: 'left' | 'right' | 'middle';
|
|
22
|
+
clickCount?: number;
|
|
23
|
+
delay?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface TypeOptions {
|
|
26
|
+
delay?: number;
|
|
27
|
+
clearFirst?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Dummy browser service for testing purposes
|
|
31
|
+
* Provides mock implementations of browser automation operations
|
|
32
|
+
*/
|
|
33
|
+
export declare class DummyBrowserService extends Service {
|
|
34
|
+
static readonly serviceType: "browser";
|
|
35
|
+
capabilityDescription: string;
|
|
36
|
+
private currentUrl;
|
|
37
|
+
private history;
|
|
38
|
+
private historyIndex;
|
|
39
|
+
constructor(runtime: IAgentRuntime);
|
|
40
|
+
static start(runtime: IAgentRuntime): Promise<DummyBrowserService>;
|
|
41
|
+
initialize(): Promise<void>;
|
|
42
|
+
stop(): Promise<void>;
|
|
43
|
+
navigate(url: string, options?: BrowserNavigationOptions): Promise<void>;
|
|
44
|
+
screenshot(options?: ScreenshotOptions): Promise<Buffer>;
|
|
45
|
+
extractContent(selectors?: ElementSelector[]): Promise<ExtractedContent[]>;
|
|
46
|
+
waitForSelector(selector: ElementSelector, timeout?: number): Promise<boolean>;
|
|
47
|
+
click(selector: ElementSelector, options?: ClickOptions): Promise<void>;
|
|
48
|
+
type(selector: ElementSelector, text: string, options?: TypeOptions): Promise<void>;
|
|
49
|
+
evaluateScript<T = any>(script: string): Promise<T>;
|
|
50
|
+
goBack(): Promise<void>;
|
|
51
|
+
goForward(): Promise<void>;
|
|
52
|
+
refresh(): Promise<void>;
|
|
53
|
+
getUrl(): Promise<string>;
|
|
54
|
+
getTitle(): Promise<string>;
|
|
55
|
+
setCookies(cookies: any[]): Promise<void>;
|
|
56
|
+
getCookies(): Promise<any[]>;
|
|
57
|
+
clearCookies(): Promise<void>;
|
|
58
|
+
getDexName(): string;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/browser/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAuB,MAAM,eAAe,CAAC;AAG5E,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,aAAa,CAAC;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,OAAO;IAC9C,MAAM,CAAC,QAAQ,CAAC,WAAW,YAAuB;IAElD,qBAAqB,SAAuC;IAE5D,OAAO,CAAC,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AIzC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAK5B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAInC,UAAU,IAAI,MAAM;CAGrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenarios.d.ts","sourceRoot":"","sources":["../../src/e2e/scenarios.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,SAAS,EAAE,MAAM,eAAe,CAAC;AAGpD,eAAO,MAAM,2BAA2B,EAAE,SAWzC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type IAgentRuntime, type Entity, type Room, type Content, type World } from '@elizaos/core';
|
|
2
|
+
/**
|
|
3
|
+
* Sets up a standard scenario environment for an E2E test.
|
|
4
|
+
*
|
|
5
|
+
* This function creates a world, a user, and a room, providing an
|
|
6
|
+
* isolated environment for each test case.
|
|
7
|
+
*
|
|
8
|
+
* @param runtime The live IAgentRuntime instance provided by the TestRunner.
|
|
9
|
+
* @returns A promise that resolves to an object containing the created world, user, and room.
|
|
10
|
+
*/
|
|
11
|
+
export declare function setupScenario(runtime: IAgentRuntime): Promise<{
|
|
12
|
+
user: Entity;
|
|
13
|
+
room: Room;
|
|
14
|
+
world: World;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Simulates a user sending a message and waits for the agent's response.
|
|
18
|
+
*
|
|
19
|
+
* This function abstracts the event-driven nature of the message handler
|
|
20
|
+
* into a simple async function, making tests easier to write and read.
|
|
21
|
+
*
|
|
22
|
+
* @param runtime The live IAgentRuntime instance.
|
|
23
|
+
* @param room The room where the message is sent.
|
|
24
|
+
* @param user The user entity sending the message.
|
|
25
|
+
* @param text The content of the message.
|
|
26
|
+
* @returns A promise that resolves with the agent's response content.
|
|
27
|
+
*/
|
|
28
|
+
export declare function sendMessageAndWaitForResponse(runtime: IAgentRuntime, room: Room, user: Entity, text: string): Promise<Content>;
|
|
29
|
+
//# sourceMappingURL=test-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/e2e/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,IAAI,EACT,KAAK,OAAO,EAMZ,KAAK,KAAK,EACX,MAAM,eAAe,CAAC;AAIvB;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC,CA4CrD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,aAAa,EACtB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CA8BlB"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { IAgentRuntime, Service } from '@elizaos/core';
|
|
2
|
+
export interface EmailAddress {
|
|
3
|
+
name?: string;
|
|
4
|
+
address: string;
|
|
5
|
+
}
|
|
6
|
+
export interface EmailAttachment {
|
|
7
|
+
filename: string;
|
|
8
|
+
content: Buffer | string;
|
|
9
|
+
contentType?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface EmailMessage {
|
|
12
|
+
id: string;
|
|
13
|
+
from: EmailAddress;
|
|
14
|
+
to: EmailAddress[];
|
|
15
|
+
cc?: EmailAddress[];
|
|
16
|
+
bcc?: EmailAddress[];
|
|
17
|
+
subject: string;
|
|
18
|
+
body: string;
|
|
19
|
+
html?: string;
|
|
20
|
+
attachments?: EmailAttachment[];
|
|
21
|
+
date: Date;
|
|
22
|
+
messageId?: string;
|
|
23
|
+
inReplyTo?: string;
|
|
24
|
+
references?: string[];
|
|
25
|
+
}
|
|
26
|
+
export interface EmailSendOptions {
|
|
27
|
+
priority?: 'high' | 'normal' | 'low';
|
|
28
|
+
readReceipt?: boolean;
|
|
29
|
+
deliveryReceipt?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface EmailSearchOptions {
|
|
32
|
+
from?: string;
|
|
33
|
+
to?: string;
|
|
34
|
+
subject?: string;
|
|
35
|
+
body?: string;
|
|
36
|
+
since?: Date;
|
|
37
|
+
before?: Date;
|
|
38
|
+
hasAttachments?: boolean;
|
|
39
|
+
folder?: string;
|
|
40
|
+
limit?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface EmailFolder {
|
|
43
|
+
name: string;
|
|
44
|
+
path: string;
|
|
45
|
+
messageCount: number;
|
|
46
|
+
unreadCount: number;
|
|
47
|
+
}
|
|
48
|
+
export interface EmailAccount {
|
|
49
|
+
address: string;
|
|
50
|
+
name?: string;
|
|
51
|
+
provider: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Dummy email service for testing purposes
|
|
55
|
+
* Provides mock implementations of email operations
|
|
56
|
+
*/
|
|
57
|
+
export declare class DummyEmailService extends Service {
|
|
58
|
+
static readonly serviceType: "email";
|
|
59
|
+
capabilityDescription: string;
|
|
60
|
+
private emails;
|
|
61
|
+
private folders;
|
|
62
|
+
constructor(runtime: IAgentRuntime);
|
|
63
|
+
static start(runtime: IAgentRuntime): Promise<DummyEmailService>;
|
|
64
|
+
initialize(): Promise<void>;
|
|
65
|
+
stop(): Promise<void>;
|
|
66
|
+
sendEmail(to: EmailAddress[], subject: string, body: string, options?: {
|
|
67
|
+
cc?: EmailAddress[];
|
|
68
|
+
bcc?: EmailAddress[];
|
|
69
|
+
html?: string;
|
|
70
|
+
attachments?: EmailAttachment[];
|
|
71
|
+
sendOptions?: EmailSendOptions;
|
|
72
|
+
}): Promise<string>;
|
|
73
|
+
searchEmails(options?: EmailSearchOptions): Promise<EmailMessage[]>;
|
|
74
|
+
getEmail(messageId: string): Promise<EmailMessage | null>;
|
|
75
|
+
deleteEmail(messageId: string): Promise<boolean>;
|
|
76
|
+
markAsRead(messageId: string): Promise<boolean>;
|
|
77
|
+
markAsUnread(messageId: string): Promise<boolean>;
|
|
78
|
+
moveToFolder(messageId: string, folderPath: string): Promise<boolean>;
|
|
79
|
+
getFolders(): Promise<EmailFolder[]>;
|
|
80
|
+
createFolder(name: string, parentPath?: string): Promise<EmailFolder>;
|
|
81
|
+
deleteFolder(folderPath: string): Promise<boolean>;
|
|
82
|
+
replyToEmail(messageId: string, body: string, options?: {
|
|
83
|
+
html?: string;
|
|
84
|
+
attachments?: EmailAttachment[];
|
|
85
|
+
replyAll?: boolean;
|
|
86
|
+
}): Promise<string>;
|
|
87
|
+
forwardEmail(messageId: string, to: EmailAddress[], options?: {
|
|
88
|
+
body?: string;
|
|
89
|
+
html?: string;
|
|
90
|
+
attachments?: EmailAttachment[];
|
|
91
|
+
}): Promise<string>;
|
|
92
|
+
getDexName(): string;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/email/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAuB,MAAM,eAAe,CAAC;AAG5E,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;IACnB,EAAE,EAAE,YAAY,EAAE,CAAC;IACnB,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC;IACpB,GAAG,CAAC,EAAE,YAAY,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,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MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;QAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,GACA,OAAO,CAAC,MAAM,CAAC;IAUZ,YAAY,CAChB,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,YAAY,EAAE,EAClB,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;KACjC,GACA,OAAO,CAAC,MAAM,CAAC;IAUlB,UAAU,IAAI,MAAM;CAGrB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,205 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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 };
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,mBAAmB,EAAE,MAkBjC,CAAC;AAEF,eAAe,mBAAmB,CAAC;AAGnC,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,GAClB,CAAC"}
|