@elizaos/core 1.6.0-alpha.0 → 1.6.0-alpha.4
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/index.browser.js +130 -604
- package/dist/browser/index.browser.js.map +90 -230
- package/dist/browser/index.d.ts +0 -1
- package/dist/elizaos.d.ts +153 -0
- package/dist/elizaos.d.ts.map +1 -0
- package/dist/index.browser.d.ts +2 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.d.ts +29 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.node.d.ts +3 -2
- package/dist/index.node.d.ts.map +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/memory.d.ts +64 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/node/index.d.ts +0 -1
- package/dist/node/index.node.js +1669 -44894
- package/dist/node/index.node.js.map +32 -737
- package/dist/prompts.d.ts +1 -1
- package/dist/runtime.d.ts +23 -18
- package/dist/runtime.d.ts.map +1 -1
- package/dist/schemas/character.d.ts +23 -180
- package/dist/schemas/character.d.ts.map +1 -1
- package/dist/settings.d.ts +5 -1
- package/dist/settings.d.ts.map +1 -1
- package/dist/types/components.d.ts +32 -13
- package/dist/types/components.d.ts.map +1 -1
- package/dist/types/events.d.ts +2 -16
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -11
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/knowledge.d.ts +0 -29
- package/dist/types/knowledge.d.ts.map +1 -1
- package/dist/types/memory.d.ts +0 -62
- package/dist/types/memory.d.ts.map +1 -1
- package/dist/types/model.d.ts +23 -58
- package/dist/types/model.d.ts.map +1 -1
- package/dist/types/primitives.d.ts +2 -1
- package/dist/types/primitives.d.ts.map +1 -1
- package/dist/types/runtime.d.ts +7 -6
- package/dist/types/runtime.d.ts.map +1 -1
- package/dist/types/state.d.ts +1 -38
- package/dist/types/state.d.ts.map +1 -1
- package/dist/utils/node.d.ts +6 -0
- package/dist/utils/node.d.ts.map +1 -0
- package/dist/utils/paths.d.ts +93 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils.d.ts.map +1 -1
- package/package.json +4 -5
- package/dist/sentry/instrument.browser.d.ts +0 -12
- package/dist/sentry/instrument.browser.d.ts.map +0 -1
- package/dist/sentry/instrument.d.ts +0 -12
- package/dist/sentry/instrument.d.ts.map +0 -1
- package/dist/sentry/instrument.node.d.ts +0 -11
- package/dist/sentry/instrument.node.d.ts.map +0 -1
- package/dist/types/browser.d.ts +0 -127
- package/dist/types/browser.d.ts.map +0 -1
- package/dist/types/email.d.ts +0 -143
- package/dist/types/email.d.ts.map +0 -1
- package/dist/types/lp.d.ts +0 -115
- package/dist/types/lp.d.ts.map +0 -1
- package/dist/types/message.d.ts +0 -202
- package/dist/types/message.d.ts.map +0 -1
- package/dist/types/pdf.d.ts +0 -68
- package/dist/types/pdf.d.ts.map +0 -1
- package/dist/types/post.d.ts +0 -242
- package/dist/types/post.d.ts.map +0 -1
- package/dist/types/token.d.ts +0 -73
- package/dist/types/token.d.ts.map +0 -1
- package/dist/types/transcription.d.ts +0 -108
- package/dist/types/transcription.d.ts.map +0 -1
- package/dist/types/video.d.ts +0 -93
- package/dist/types/video.d.ts.map +0 -1
- package/dist/types/wallet.d.ts +0 -49
- package/dist/types/wallet.d.ts.map +0 -1
- package/dist/types/web-search.d.ts +0 -112
- package/dist/types/web-search.d.ts.map +0 -1
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type SentryBrowserModule = {
|
|
2
|
-
init: (options: Record<string, any>) => void;
|
|
3
|
-
captureException: (error: unknown) => void;
|
|
4
|
-
flush?: (timeout?: number) => Promise<boolean>;
|
|
5
|
-
onLoad?: (cb: () => void) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare const Sentry: {
|
|
8
|
-
captureException(error: unknown): Promise<void>;
|
|
9
|
-
flush(timeout?: number): Promise<boolean>;
|
|
10
|
-
};
|
|
11
|
-
export type { SentryBrowserModule };
|
|
12
|
-
//# sourceMappingURL=instrument.browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrument.browser.d.ts","sourceRoot":"","sources":["../../src/sentry/instrument.browser.ts"],"names":[],"mappings":"AAEA,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAC7C,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACnC,CAAC;AAyCF,eAAO,MAAM,MAAM;4BACa,OAAO;oBAMf,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAOhD,CAAC;AAEF,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type SentryModule = {
|
|
2
|
-
init: (options: Record<string, any>) => void;
|
|
3
|
-
captureException: (error: unknown) => void;
|
|
4
|
-
flush?: (timeout?: number) => Promise<boolean>;
|
|
5
|
-
onLoad?: (cb: () => void) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare const Sentry: {
|
|
8
|
-
captureException(error: unknown): Promise<void>;
|
|
9
|
-
flush(timeout?: number): Promise<boolean>;
|
|
10
|
-
};
|
|
11
|
-
export type { SentryModule };
|
|
12
|
-
//# sourceMappingURL=instrument.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrument.d.ts","sourceRoot":"","sources":["../../src/sentry/instrument.ts"],"names":[],"mappings":"AAEA,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAC7C,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACnC,CAAC;AA0DF,eAAO,MAAM,MAAM;4BACa,OAAO;oBAMf,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAOhD,CAAC;AAEF,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type SentryNodeModule = {
|
|
2
|
-
init: (options: Record<string, any>) => void;
|
|
3
|
-
captureException: (error: unknown) => void;
|
|
4
|
-
flush?: (timeout?: number) => Promise<boolean>;
|
|
5
|
-
};
|
|
6
|
-
export declare const Sentry: {
|
|
7
|
-
captureException(error: unknown): Promise<void>;
|
|
8
|
-
flush(timeout?: number): Promise<boolean>;
|
|
9
|
-
};
|
|
10
|
-
export type { SentryNodeModule };
|
|
11
|
-
//# sourceMappingURL=instrument.node.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrument.node.d.ts","sourceRoot":"","sources":["../../src/sentry/instrument.node.ts"],"names":[],"mappings":"AAEA,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAC7C,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD,CAAC;AAkCF,eAAO,MAAM,MAAM;4BACa,OAAO;oBAMf,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAOhD,CAAC;AAEF,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
package/dist/types/browser.d.ts
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { Service } from './service';
|
|
2
|
-
export interface BrowserNavigationOptions {
|
|
3
|
-
timeout?: number;
|
|
4
|
-
waitUntil?: 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2';
|
|
5
|
-
viewport?: {
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
};
|
|
9
|
-
userAgent?: string;
|
|
10
|
-
headers?: Record<string, string>;
|
|
11
|
-
}
|
|
12
|
-
export interface ScreenshotOptions {
|
|
13
|
-
fullPage?: boolean;
|
|
14
|
-
clip?: {
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
width: number;
|
|
18
|
-
height: number;
|
|
19
|
-
};
|
|
20
|
-
format?: 'png' | 'jpeg' | 'webp';
|
|
21
|
-
quality?: number;
|
|
22
|
-
omitBackground?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface ElementSelector {
|
|
25
|
-
selector: string;
|
|
26
|
-
text?: string;
|
|
27
|
-
timeout?: number;
|
|
28
|
-
}
|
|
29
|
-
export interface ExtractedContent {
|
|
30
|
-
text: string;
|
|
31
|
-
html: string;
|
|
32
|
-
links: Array<{
|
|
33
|
-
url: string;
|
|
34
|
-
text: string;
|
|
35
|
-
}>;
|
|
36
|
-
images: Array<{
|
|
37
|
-
src: string;
|
|
38
|
-
alt?: string;
|
|
39
|
-
}>;
|
|
40
|
-
title?: string;
|
|
41
|
-
metadata?: Record<string, string>;
|
|
42
|
-
}
|
|
43
|
-
export interface ClickOptions {
|
|
44
|
-
timeout?: number;
|
|
45
|
-
force?: boolean;
|
|
46
|
-
waitForNavigation?: boolean;
|
|
47
|
-
}
|
|
48
|
-
export interface TypeOptions {
|
|
49
|
-
delay?: number;
|
|
50
|
-
timeout?: number;
|
|
51
|
-
clear?: boolean;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Interface for browser automation services
|
|
55
|
-
*/
|
|
56
|
-
export declare abstract class IBrowserService extends Service {
|
|
57
|
-
static readonly serviceType: "browser";
|
|
58
|
-
readonly capabilityDescription = "Web browser automation and scraping capabilities";
|
|
59
|
-
/**
|
|
60
|
-
* Navigate to a URL
|
|
61
|
-
* @param url - URL to navigate to
|
|
62
|
-
* @param options - Navigation options
|
|
63
|
-
* @returns Promise resolving when navigation completes
|
|
64
|
-
*/
|
|
65
|
-
abstract navigate(url: string, options?: BrowserNavigationOptions): Promise<void>;
|
|
66
|
-
/**
|
|
67
|
-
* Take a screenshot of the current page
|
|
68
|
-
* @param options - Screenshot options
|
|
69
|
-
* @returns Promise resolving to screenshot buffer
|
|
70
|
-
*/
|
|
71
|
-
abstract screenshot(options?: ScreenshotOptions): Promise<Buffer>;
|
|
72
|
-
/**
|
|
73
|
-
* Extract text and content from the current page
|
|
74
|
-
* @param selector - Optional CSS selector to extract from specific element
|
|
75
|
-
* @returns Promise resolving to extracted content
|
|
76
|
-
*/
|
|
77
|
-
abstract extractContent(selector?: string): Promise<ExtractedContent>;
|
|
78
|
-
/**
|
|
79
|
-
* Click on an element
|
|
80
|
-
* @param selector - CSS selector or element selector
|
|
81
|
-
* @param options - Click options
|
|
82
|
-
* @returns Promise resolving when click completes
|
|
83
|
-
*/
|
|
84
|
-
abstract click(selector: string | ElementSelector, options?: ClickOptions): Promise<void>;
|
|
85
|
-
/**
|
|
86
|
-
* Type text into an input field
|
|
87
|
-
* @param selector - CSS selector for input field
|
|
88
|
-
* @param text - Text to type
|
|
89
|
-
* @param options - Typing options
|
|
90
|
-
* @returns Promise resolving when typing completes
|
|
91
|
-
*/
|
|
92
|
-
abstract type(selector: string, text: string, options?: TypeOptions): Promise<void>;
|
|
93
|
-
/**
|
|
94
|
-
* Wait for an element to appear
|
|
95
|
-
* @param selector - CSS selector or element selector
|
|
96
|
-
* @returns Promise resolving when element is found
|
|
97
|
-
*/
|
|
98
|
-
abstract waitForElement(selector: string | ElementSelector): Promise<void>;
|
|
99
|
-
/**
|
|
100
|
-
* Evaluate JavaScript in the browser context
|
|
101
|
-
* @param script - JavaScript code to evaluate
|
|
102
|
-
* @param args - Arguments to pass to the script
|
|
103
|
-
* @returns Promise resolving to evaluation result
|
|
104
|
-
*/
|
|
105
|
-
abstract evaluate<T = any>(script: string, ...args: any[]): Promise<T>;
|
|
106
|
-
/**
|
|
107
|
-
* Get the current page URL
|
|
108
|
-
* @returns Promise resolving to current URL
|
|
109
|
-
*/
|
|
110
|
-
abstract getCurrentUrl(): Promise<string>;
|
|
111
|
-
/**
|
|
112
|
-
* Go back in browser history
|
|
113
|
-
* @returns Promise resolving when navigation completes
|
|
114
|
-
*/
|
|
115
|
-
abstract goBack(): Promise<void>;
|
|
116
|
-
/**
|
|
117
|
-
* Go forward in browser history
|
|
118
|
-
* @returns Promise resolving when navigation completes
|
|
119
|
-
*/
|
|
120
|
-
abstract goForward(): Promise<void>;
|
|
121
|
-
/**
|
|
122
|
-
* Refresh the current page
|
|
123
|
-
* @returns Promise resolving when refresh completes
|
|
124
|
-
*/
|
|
125
|
-
abstract refresh(): Promise<void>;
|
|
126
|
-
}
|
|
127
|
-
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/types/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,WAAW,CAAC;AAEjD,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,cAAc,GAAG,cAAc,CAAC;IAC1E,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAA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O,CAAC,IAAI,CAAC;CAClC"}
|
package/dist/types/email.d.ts
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { Service } from './service';
|
|
2
|
-
export interface EmailAddress {
|
|
3
|
-
email: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface EmailAttachment {
|
|
7
|
-
filename: string;
|
|
8
|
-
content: Buffer | string;
|
|
9
|
-
contentType?: string;
|
|
10
|
-
contentDisposition?: 'attachment' | 'inline';
|
|
11
|
-
cid?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface EmailMessage {
|
|
14
|
-
from: EmailAddress;
|
|
15
|
-
to: EmailAddress[];
|
|
16
|
-
cc?: EmailAddress[];
|
|
17
|
-
bcc?: EmailAddress[];
|
|
18
|
-
subject: string;
|
|
19
|
-
text?: string;
|
|
20
|
-
html?: string;
|
|
21
|
-
attachments?: EmailAttachment[];
|
|
22
|
-
replyTo?: EmailAddress;
|
|
23
|
-
date?: Date;
|
|
24
|
-
messageId?: string;
|
|
25
|
-
references?: string[];
|
|
26
|
-
inReplyTo?: string;
|
|
27
|
-
priority?: 'high' | 'normal' | 'low';
|
|
28
|
-
}
|
|
29
|
-
export interface EmailSendOptions {
|
|
30
|
-
retry?: number;
|
|
31
|
-
timeout?: number;
|
|
32
|
-
trackOpens?: boolean;
|
|
33
|
-
trackClicks?: boolean;
|
|
34
|
-
tags?: string[];
|
|
35
|
-
}
|
|
36
|
-
export interface EmailSearchOptions {
|
|
37
|
-
query?: string;
|
|
38
|
-
from?: string;
|
|
39
|
-
to?: string;
|
|
40
|
-
subject?: string;
|
|
41
|
-
folder?: string;
|
|
42
|
-
since?: Date;
|
|
43
|
-
before?: Date;
|
|
44
|
-
limit?: number;
|
|
45
|
-
offset?: number;
|
|
46
|
-
unread?: boolean;
|
|
47
|
-
flagged?: boolean;
|
|
48
|
-
hasAttachments?: boolean;
|
|
49
|
-
}
|
|
50
|
-
export interface EmailFolder {
|
|
51
|
-
name: string;
|
|
52
|
-
path: string;
|
|
53
|
-
type: 'inbox' | 'sent' | 'drafts' | 'trash' | 'spam' | 'custom';
|
|
54
|
-
messageCount?: number;
|
|
55
|
-
unreadCount?: number;
|
|
56
|
-
children?: EmailFolder[];
|
|
57
|
-
}
|
|
58
|
-
export interface EmailAccount {
|
|
59
|
-
email: string;
|
|
60
|
-
name?: string;
|
|
61
|
-
provider?: string;
|
|
62
|
-
folders?: EmailFolder[];
|
|
63
|
-
quotaUsed?: number;
|
|
64
|
-
quotaLimit?: number;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Interface for email services
|
|
68
|
-
*/
|
|
69
|
-
export declare abstract class IEmailService extends Service {
|
|
70
|
-
static readonly serviceType: "email";
|
|
71
|
-
readonly capabilityDescription = "Email sending, receiving, and management capabilities";
|
|
72
|
-
/**
|
|
73
|
-
* Send an email
|
|
74
|
-
* @param message - Email message to send
|
|
75
|
-
* @param options - Send options
|
|
76
|
-
* @returns Promise resolving to message ID
|
|
77
|
-
*/
|
|
78
|
-
abstract sendEmail(message: EmailMessage, options?: EmailSendOptions): Promise<string>;
|
|
79
|
-
/**
|
|
80
|
-
* Get emails from a folder
|
|
81
|
-
* @param options - Search options
|
|
82
|
-
* @returns Promise resolving to array of emails
|
|
83
|
-
*/
|
|
84
|
-
abstract getEmails(options?: EmailSearchOptions): Promise<EmailMessage[]>;
|
|
85
|
-
/**
|
|
86
|
-
* Get a specific email by ID
|
|
87
|
-
* @param messageId - Message ID
|
|
88
|
-
* @returns Promise resolving to email message
|
|
89
|
-
*/
|
|
90
|
-
abstract getEmail(messageId: string): Promise<EmailMessage>;
|
|
91
|
-
/**
|
|
92
|
-
* Delete an email
|
|
93
|
-
* @param messageId - Message ID
|
|
94
|
-
* @returns Promise resolving when deletion completes
|
|
95
|
-
*/
|
|
96
|
-
abstract deleteEmail(messageId: string): Promise<void>;
|
|
97
|
-
/**
|
|
98
|
-
* Mark an email as read/unread
|
|
99
|
-
* @param messageId - Message ID
|
|
100
|
-
* @param read - True to mark as read, false for unread
|
|
101
|
-
* @returns Promise resolving when operation completes
|
|
102
|
-
*/
|
|
103
|
-
abstract markEmailAsRead(messageId: string, read: boolean): Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* Flag/unflag an email
|
|
106
|
-
* @param messageId - Message ID
|
|
107
|
-
* @param flagged - True to flag, false to unflag
|
|
108
|
-
* @returns Promise resolving when operation completes
|
|
109
|
-
*/
|
|
110
|
-
abstract flagEmail(messageId: string, flagged: boolean): Promise<void>;
|
|
111
|
-
/**
|
|
112
|
-
* Move email to a different folder
|
|
113
|
-
* @param messageId - Message ID
|
|
114
|
-
* @param folderPath - Destination folder path
|
|
115
|
-
* @returns Promise resolving when move completes
|
|
116
|
-
*/
|
|
117
|
-
abstract moveEmail(messageId: string, folderPath: string): Promise<void>;
|
|
118
|
-
/**
|
|
119
|
-
* Get available folders
|
|
120
|
-
* @returns Promise resolving to array of folders
|
|
121
|
-
*/
|
|
122
|
-
abstract getFolders(): Promise<EmailFolder[]>;
|
|
123
|
-
/**
|
|
124
|
-
* Create a new folder
|
|
125
|
-
* @param folderName - Name of the folder
|
|
126
|
-
* @param parentPath - Optional parent folder path
|
|
127
|
-
* @returns Promise resolving when folder is created
|
|
128
|
-
*/
|
|
129
|
-
abstract createFolder(folderName: string, parentPath?: string): Promise<void>;
|
|
130
|
-
/**
|
|
131
|
-
* Get account information
|
|
132
|
-
* @returns Promise resolving to account details
|
|
133
|
-
*/
|
|
134
|
-
abstract getAccountInfo(): Promise<EmailAccount>;
|
|
135
|
-
/**
|
|
136
|
-
* Search emails
|
|
137
|
-
* @param query - Search query
|
|
138
|
-
* @param options - Search options
|
|
139
|
-
* @returns Promise resolving to search results
|
|
140
|
-
*/
|
|
141
|
-
abstract searchEmails(query: string, options?: EmailSearchOptions): Promise<EmailMessage[]>;
|
|
142
|
-
}
|
|
143
|
-
//# sourceMappingURL=email.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3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OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAEzE;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAE3D;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAEtD;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAEzE;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAEtE;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAExE;;;OAGG;IACH,QAAQ,CAAC,UAAU,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAE7C;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAE7E;;;OAGG;IACH,QAAQ,CAAC,cAAc,IAAI,OAAO,CAAC,YAAY,CAAC;IAEhD;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;CAC5F"}
|
package/dist/types/lp.d.ts
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import type { Metadata } from './primitives';
|
|
2
|
-
import { Service } from './service';
|
|
3
|
-
import type { TokenBalance } from './token';
|
|
4
|
-
/**
|
|
5
|
-
* A standardized representation of a liquidity pool from any DEX.
|
|
6
|
-
*/
|
|
7
|
-
export type PoolInfo = {
|
|
8
|
-
id: string;
|
|
9
|
-
displayName?: string;
|
|
10
|
-
dex: string;
|
|
11
|
-
tokenA: {
|
|
12
|
-
mint: string;
|
|
13
|
-
symbol?: string;
|
|
14
|
-
reserve?: string;
|
|
15
|
-
decimals?: number;
|
|
16
|
-
};
|
|
17
|
-
tokenB: {
|
|
18
|
-
mint: string;
|
|
19
|
-
symbol?: string;
|
|
20
|
-
reserve?: string;
|
|
21
|
-
decimals?: number;
|
|
22
|
-
};
|
|
23
|
-
lpTokenMint?: string;
|
|
24
|
-
apr?: number;
|
|
25
|
-
apy?: number;
|
|
26
|
-
tvl?: number;
|
|
27
|
-
fee?: number;
|
|
28
|
-
metadata?: Metadata;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* A standardized representation of a user's position in a liquidity pool.
|
|
32
|
-
*/
|
|
33
|
-
export type LpPositionDetails = {
|
|
34
|
-
poolId: string;
|
|
35
|
-
dex: string;
|
|
36
|
-
lpTokenBalance: TokenBalance;
|
|
37
|
-
underlyingTokens: TokenBalance[];
|
|
38
|
-
valueUsd?: number;
|
|
39
|
-
accruedFees?: TokenBalance[];
|
|
40
|
-
rewards?: TokenBalance[];
|
|
41
|
-
metadata?: Metadata;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* A standardized result for blockchain transactions.
|
|
45
|
-
*/
|
|
46
|
-
export type TransactionResult = {
|
|
47
|
-
success: boolean;
|
|
48
|
-
transactionId?: string;
|
|
49
|
-
error?: string;
|
|
50
|
-
data?: any;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Abstract interface for a Liquidity Pool Service.
|
|
54
|
-
* DEX-specific plugins (e.g., for Orca, Raydium) must implement this service
|
|
55
|
-
* to allow the LP Manager to interact with them in a standardized way.
|
|
56
|
-
*/
|
|
57
|
-
export declare abstract class ILpService extends Service {
|
|
58
|
-
static readonly serviceType = "lp";
|
|
59
|
-
readonly capabilityDescription = "Provides standardized access to DEX liquidity pools.";
|
|
60
|
-
/**
|
|
61
|
-
* Returns the name of the DEX this service interacts with.
|
|
62
|
-
* @returns The name of the DEX (e.g., "Orca", "Raydium").
|
|
63
|
-
*/
|
|
64
|
-
abstract getDexName(): string;
|
|
65
|
-
/**
|
|
66
|
-
* Fetches a list of available liquidity pools from the DEX.
|
|
67
|
-
* @param tokenAMint - Optional: Filter pools by the mint address of the first token.
|
|
68
|
-
* @param tokenBMint - Optional: Filter pools by the mint address of the second token.
|
|
69
|
-
* @returns A promise that resolves to an array of standardized PoolInfo objects.
|
|
70
|
-
*/
|
|
71
|
-
abstract getPools(tokenAMint?: string, tokenBMint?: string): Promise<PoolInfo[]>;
|
|
72
|
-
/**
|
|
73
|
-
* Adds liquidity to a specified pool.
|
|
74
|
-
* @param params - The parameters for adding liquidity.
|
|
75
|
-
* @returns A promise resolving to a transaction result, including the LP tokens received.
|
|
76
|
-
*/
|
|
77
|
-
abstract addLiquidity(params: {
|
|
78
|
-
userVault: any;
|
|
79
|
-
poolId: string;
|
|
80
|
-
tokenAAmountLamports: string;
|
|
81
|
-
tokenBAmountLamports?: string;
|
|
82
|
-
slippageBps: number;
|
|
83
|
-
tickLowerIndex?: number;
|
|
84
|
-
tickUpperIndex?: number;
|
|
85
|
-
}): Promise<TransactionResult & {
|
|
86
|
-
lpTokensReceived?: TokenBalance;
|
|
87
|
-
}>;
|
|
88
|
-
/**
|
|
89
|
-
* Removes liquidity from a specified pool.
|
|
90
|
-
* @param params - The parameters for removing liquidity.
|
|
91
|
-
* @returns A promise resolving to a transaction result, including the tokens received.
|
|
92
|
-
*/
|
|
93
|
-
abstract removeLiquidity(params: {
|
|
94
|
-
userVault: any;
|
|
95
|
-
poolId: string;
|
|
96
|
-
lpTokenAmountLamports: string;
|
|
97
|
-
slippageBps: number;
|
|
98
|
-
}): Promise<TransactionResult & {
|
|
99
|
-
tokensReceived?: TokenBalance[];
|
|
100
|
-
}>;
|
|
101
|
-
/**
|
|
102
|
-
* Fetches the details of a specific LP position for a user.
|
|
103
|
-
* @param userAccountPublicKey - The user's wallet public key.
|
|
104
|
-
* @param poolOrPositionIdentifier - The identifier for the pool or a specific position (e.g., position NFT mint).
|
|
105
|
-
* @returns A promise resolving to the position details or null if not found.
|
|
106
|
-
*/
|
|
107
|
-
abstract getLpPositionDetails(userAccountPublicKey: string, poolOrPositionIdentifier: string): Promise<LpPositionDetails | null>;
|
|
108
|
-
/**
|
|
109
|
-
* Fetches the latest market data (e.g., APY, TVL) for a list of pools.
|
|
110
|
-
* @param poolIds - An array of pool IDs to fetch data for.
|
|
111
|
-
* @returns A promise resolving to a map of pool IDs to their partial market data.
|
|
112
|
-
*/
|
|
113
|
-
abstract getMarketDataForPools(poolIds: string[]): Promise<Record<string, Partial<PoolInfo>>>;
|
|
114
|
-
}
|
|
115
|
-
//# sourceMappingURL=lp.d.ts.map
|
package/dist/types/lp.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lp.d.ts","sourceRoot":"","sources":["../../src/types/lp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,CA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E;QAC5B,SAAS,EAAE,GAAG,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,oBAAoB,EAAE,MAAM,CAAC;QAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,WAAW,EAAE,MAAM,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,GAAG,OAAO,CAAC,iBAAiB,GAAG;QAAE,gBAAgB,CAAC,EAAE,YAAY,CAAA;KAAE,CAAC;IAEpE;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,MAAM,EAAE;QAC/B,SAAS,EAAE,GAAG,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,qBAAqB,EAAE,MAAM,CAAC;QAC9B,WAAW,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,iBAAiB,GAAG;QAAE,cAAc,CAAC,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IAEpE;;;;;OAKG;IACH,QAAQ,CAAC,oBAAoB,CAC3B,oBAAoB,EAAE,MAAM,EAC5B,wBAAwB,EAAE,MAAM,GAC/B,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAEpC;;;;OAIG;IACH,QAAQ,CAAC,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC9F"}
|
package/dist/types/message.d.ts
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { Service } from './service';
|
|
2
|
-
import type { UUID } from './primitives';
|
|
3
|
-
export interface MessageParticipant {
|
|
4
|
-
id: UUID;
|
|
5
|
-
name: string;
|
|
6
|
-
username?: string;
|
|
7
|
-
avatar?: string;
|
|
8
|
-
status?: 'online' | 'offline' | 'away' | 'busy';
|
|
9
|
-
}
|
|
10
|
-
export interface MessageAttachment {
|
|
11
|
-
id: UUID;
|
|
12
|
-
filename: string;
|
|
13
|
-
url: string;
|
|
14
|
-
mimeType: string;
|
|
15
|
-
size: number;
|
|
16
|
-
width?: number;
|
|
17
|
-
height?: number;
|
|
18
|
-
duration?: number;
|
|
19
|
-
thumbnail?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface MessageReaction {
|
|
22
|
-
emoji: string;
|
|
23
|
-
count: number;
|
|
24
|
-
users: UUID[];
|
|
25
|
-
hasReacted: boolean;
|
|
26
|
-
}
|
|
27
|
-
export interface MessageReference {
|
|
28
|
-
messageId: UUID;
|
|
29
|
-
channelId: UUID;
|
|
30
|
-
type: 'reply' | 'forward' | 'quote';
|
|
31
|
-
}
|
|
32
|
-
export interface MessageContent {
|
|
33
|
-
text?: string;
|
|
34
|
-
html?: string;
|
|
35
|
-
markdown?: string;
|
|
36
|
-
attachments?: MessageAttachment[];
|
|
37
|
-
reactions?: MessageReaction[];
|
|
38
|
-
reference?: MessageReference;
|
|
39
|
-
mentions?: UUID[];
|
|
40
|
-
embeds?: Array<{
|
|
41
|
-
title?: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
url?: string;
|
|
44
|
-
image?: string;
|
|
45
|
-
fields?: Array<{
|
|
46
|
-
name: string;
|
|
47
|
-
value: string;
|
|
48
|
-
inline?: boolean;
|
|
49
|
-
}>;
|
|
50
|
-
}>;
|
|
51
|
-
}
|
|
52
|
-
export interface MessageInfo {
|
|
53
|
-
id: UUID;
|
|
54
|
-
channelId: UUID;
|
|
55
|
-
senderId: UUID;
|
|
56
|
-
content: MessageContent;
|
|
57
|
-
timestamp: Date;
|
|
58
|
-
edited?: Date;
|
|
59
|
-
deleted?: Date;
|
|
60
|
-
pinned?: boolean;
|
|
61
|
-
thread?: {
|
|
62
|
-
id: UUID;
|
|
63
|
-
messageCount: number;
|
|
64
|
-
participants: UUID[];
|
|
65
|
-
lastMessageAt: Date;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export interface MessageSendOptions {
|
|
69
|
-
replyTo?: UUID;
|
|
70
|
-
ephemeral?: boolean;
|
|
71
|
-
silent?: boolean;
|
|
72
|
-
scheduled?: Date;
|
|
73
|
-
thread?: UUID;
|
|
74
|
-
nonce?: string;
|
|
75
|
-
}
|
|
76
|
-
export interface MessageSearchOptions {
|
|
77
|
-
query?: string;
|
|
78
|
-
channelId?: UUID;
|
|
79
|
-
senderId?: UUID;
|
|
80
|
-
before?: Date;
|
|
81
|
-
after?: Date;
|
|
82
|
-
limit?: number;
|
|
83
|
-
offset?: number;
|
|
84
|
-
hasAttachments?: boolean;
|
|
85
|
-
pinned?: boolean;
|
|
86
|
-
mentions?: UUID;
|
|
87
|
-
}
|
|
88
|
-
export interface MessageChannel {
|
|
89
|
-
id: UUID;
|
|
90
|
-
name: string;
|
|
91
|
-
type: 'text' | 'voice' | 'dm' | 'group' | 'announcement' | 'thread';
|
|
92
|
-
description?: string;
|
|
93
|
-
participants?: MessageParticipant[];
|
|
94
|
-
permissions?: {
|
|
95
|
-
canSend: boolean;
|
|
96
|
-
canRead: boolean;
|
|
97
|
-
canDelete: boolean;
|
|
98
|
-
canPin: boolean;
|
|
99
|
-
canManage: boolean;
|
|
100
|
-
};
|
|
101
|
-
lastMessageAt?: Date;
|
|
102
|
-
messageCount?: number;
|
|
103
|
-
unreadCount?: number;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Interface for messaging services
|
|
107
|
-
*/
|
|
108
|
-
export declare abstract class IMessageService extends Service {
|
|
109
|
-
static readonly serviceType: "message";
|
|
110
|
-
readonly capabilityDescription = "Message sending, receiving, and management capabilities";
|
|
111
|
-
/**
|
|
112
|
-
* Send a message to a channel
|
|
113
|
-
* @param channelId - Channel ID
|
|
114
|
-
* @param content - Message content
|
|
115
|
-
* @param options - Send options
|
|
116
|
-
* @returns Promise resolving to message ID
|
|
117
|
-
*/
|
|
118
|
-
abstract sendMessage(channelId: UUID, content: MessageContent, options?: MessageSendOptions): Promise<UUID>;
|
|
119
|
-
/**
|
|
120
|
-
* Get messages from a channel
|
|
121
|
-
* @param channelId - Channel ID
|
|
122
|
-
* @param options - Search options
|
|
123
|
-
* @returns Promise resolving to array of messages
|
|
124
|
-
*/
|
|
125
|
-
abstract getMessages(channelId: UUID, options?: MessageSearchOptions): Promise<MessageInfo[]>;
|
|
126
|
-
/**
|
|
127
|
-
* Get a specific message by ID
|
|
128
|
-
* @param messageId - Message ID
|
|
129
|
-
* @returns Promise resolving to message
|
|
130
|
-
*/
|
|
131
|
-
abstract getMessage(messageId: UUID): Promise<MessageInfo>;
|
|
132
|
-
/**
|
|
133
|
-
* Edit a message
|
|
134
|
-
* @param messageId - Message ID
|
|
135
|
-
* @param content - New message content
|
|
136
|
-
* @returns Promise resolving when edit completes
|
|
137
|
-
*/
|
|
138
|
-
abstract editMessage(messageId: UUID, content: MessageContent): Promise<void>;
|
|
139
|
-
/**
|
|
140
|
-
* Delete a message
|
|
141
|
-
* @param messageId - Message ID
|
|
142
|
-
* @returns Promise resolving when deletion completes
|
|
143
|
-
*/
|
|
144
|
-
abstract deleteMessage(messageId: UUID): Promise<void>;
|
|
145
|
-
/**
|
|
146
|
-
* Add a reaction to a message
|
|
147
|
-
* @param messageId - Message ID
|
|
148
|
-
* @param emoji - Reaction emoji
|
|
149
|
-
* @returns Promise resolving when reaction is added
|
|
150
|
-
*/
|
|
151
|
-
abstract addReaction(messageId: UUID, emoji: string): Promise<void>;
|
|
152
|
-
/**
|
|
153
|
-
* Remove a reaction from a message
|
|
154
|
-
* @param messageId - Message ID
|
|
155
|
-
* @param emoji - Reaction emoji
|
|
156
|
-
* @returns Promise resolving when reaction is removed
|
|
157
|
-
*/
|
|
158
|
-
abstract removeReaction(messageId: UUID, emoji: string): Promise<void>;
|
|
159
|
-
/**
|
|
160
|
-
* Pin a message
|
|
161
|
-
* @param messageId - Message ID
|
|
162
|
-
* @returns Promise resolving when message is pinned
|
|
163
|
-
*/
|
|
164
|
-
abstract pinMessage(messageId: UUID): Promise<void>;
|
|
165
|
-
/**
|
|
166
|
-
* Unpin a message
|
|
167
|
-
* @param messageId - Message ID
|
|
168
|
-
* @returns Promise resolving when message is unpinned
|
|
169
|
-
*/
|
|
170
|
-
abstract unpinMessage(messageId: UUID): Promise<void>;
|
|
171
|
-
/**
|
|
172
|
-
* Get available channels
|
|
173
|
-
* @returns Promise resolving to array of channels
|
|
174
|
-
*/
|
|
175
|
-
abstract getChannels(): Promise<MessageChannel[]>;
|
|
176
|
-
/**
|
|
177
|
-
* Get channel information
|
|
178
|
-
* @param channelId - Channel ID
|
|
179
|
-
* @returns Promise resolving to channel info
|
|
180
|
-
*/
|
|
181
|
-
abstract getChannel(channelId: UUID): Promise<MessageChannel>;
|
|
182
|
-
/**
|
|
183
|
-
* Create a new channel
|
|
184
|
-
* @param name - Channel name
|
|
185
|
-
* @param type - Channel type
|
|
186
|
-
* @param options - Channel options
|
|
187
|
-
* @returns Promise resolving to new channel ID
|
|
188
|
-
*/
|
|
189
|
-
abstract createChannel(name: string, type: MessageChannel['type'], options?: {
|
|
190
|
-
description?: string;
|
|
191
|
-
participants?: UUID[];
|
|
192
|
-
private?: boolean;
|
|
193
|
-
}): Promise<UUID>;
|
|
194
|
-
/**
|
|
195
|
-
* Search messages across channels
|
|
196
|
-
* @param query - Search query
|
|
197
|
-
* @param options - Search options
|
|
198
|
-
* @returns Promise resolving to search results
|
|
199
|
-
*/
|
|
200
|
-
abstract searchMessages(query: string, options?: MessageSearchOptions): Promise<MessageInfo[]>;
|
|
201
|
-
}
|
|
202
|
-
//# sourceMappingURL=message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,MAAM,C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