@eko-ai/eko 1.0.9 → 1.0.11
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/LICENSE +21 -21
- package/README.md +139 -139
- package/dist/core/eko.d.ts +3 -2
- package/dist/extension/script/bing.js +0 -0
- package/dist/extension/script/build_dom_tree.js +661 -661
- package/dist/extension/script/common.js +12 -4
- package/dist/extension/script/duckduckgo.js +0 -0
- package/dist/extension/script/google.js +0 -0
- package/dist/extension/tools/cancel_workflow.d.ts +9 -0
- package/dist/extension/utils.d.ts +1 -1
- package/dist/extension.cjs.js +117 -111
- package/dist/extension.esm.js +117 -111
- package/dist/extension_content_script.js +79 -61
- package/dist/fellou.cjs.js +18 -18
- package/dist/fellou.esm.js +18 -18
- package/dist/index.cjs.js +262 -172
- package/dist/index.esm.js +262 -172
- package/dist/jest.config.js +10 -0
- package/dist/jest.config.js.map +1 -0
- package/dist/models/workflow.d.ts +3 -1
- package/dist/nodejs.cjs.js +1651 -1633
- package/dist/nodejs.esm.js +1651 -1633
- package/dist/rollup.config.js +171 -0
- package/dist/rollup.config.js.map +1 -0
- package/dist/script.js +10 -0
- package/dist/script.js.map +1 -0
- package/dist/services/llm/deepseek-provider.d.ts +13 -0
- package/dist/services/llm/provider-factory.d.ts +4 -0
- package/dist/services/llm/siliconflow-provider.d.ts +13 -0
- package/dist/services/parser/workflow-parser.d.ts +2 -1
- package/dist/services/workflow/generator.d.ts +3 -2
- package/dist/src/core/eko.js +99 -0
- package/dist/src/core/eko.js.map +1 -0
- package/dist/src/core/tool-registry.js +51 -0
- package/dist/src/core/tool-registry.js.map +1 -0
- package/dist/src/extension/content/index.js +409 -0
- package/dist/src/extension/content/index.js.map +1 -0
- package/dist/src/extension/core.js +29 -0
- package/dist/src/extension/core.js.map +1 -0
- package/dist/src/extension/index.js +12 -0
- package/dist/src/extension/index.js.map +1 -0
- package/dist/src/extension/script/bing.js +25 -0
- package/dist/src/extension/script/bing.js.map +1 -0
- package/dist/src/extension/script/build_dom_tree.js +585 -0
- package/dist/src/extension/script/build_dom_tree.js.map +1 -0
- package/dist/src/extension/script/common.js +203 -0
- package/dist/src/extension/script/common.js.map +1 -0
- package/dist/src/extension/script/duckduckgo.js +25 -0
- package/dist/src/extension/script/duckduckgo.js.map +1 -0
- package/dist/src/extension/script/google.js +26 -0
- package/dist/src/extension/script/google.js.map +1 -0
- package/dist/src/extension/tools/browser.js +174 -0
- package/dist/src/extension/tools/browser.js.map +1 -0
- package/dist/src/extension/tools/browser_use.js +186 -0
- package/dist/src/extension/tools/browser_use.js.map +1 -0
- package/dist/src/extension/tools/element_click.js +123 -0
- package/dist/src/extension/tools/element_click.js.map +1 -0
- package/dist/src/extension/tools/export_file.js +93 -0
- package/dist/src/extension/tools/export_file.js.map +1 -0
- package/dist/src/extension/tools/extract_content.js +38 -0
- package/dist/src/extension/tools/extract_content.js.map +1 -0
- package/dist/src/extension/tools/find_element_position.js +125 -0
- package/dist/src/extension/tools/find_element_position.js.map +1 -0
- package/dist/src/extension/tools/html_script.js +219 -0
- package/dist/src/extension/tools/html_script.js.map +1 -0
- package/dist/src/extension/tools/index.js +12 -0
- package/dist/src/extension/tools/index.js.map +1 -0
- package/dist/src/extension/tools/open_url.js +68 -0
- package/dist/src/extension/tools/open_url.js.map +1 -0
- package/dist/src/extension/tools/request_login.js +87 -0
- package/dist/src/extension/tools/request_login.js.map +1 -0
- package/dist/src/extension/tools/screenshot.js +26 -0
- package/dist/src/extension/tools/screenshot.js.map +1 -0
- package/dist/src/extension/tools/tab_management.js +160 -0
- package/dist/src/extension/tools/tab_management.js.map +1 -0
- package/dist/src/extension/tools/web_search.js +281 -0
- package/dist/src/extension/tools/web_search.js.map +1 -0
- package/dist/src/extension/utils.js +244 -0
- package/dist/src/extension/utils.js.map +1 -0
- package/dist/src/fellou/computer.js +104 -0
- package/dist/src/fellou/computer.js.map +1 -0
- package/dist/src/fellou/index.js +7 -0
- package/dist/src/fellou/index.js.map +1 -0
- package/dist/src/fellou/tools/computer_use.js +111 -0
- package/dist/src/fellou/tools/computer_use.js.map +1 -0
- package/dist/src/index.js +9 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/models/action.js +364 -0
- package/dist/src/models/action.js.map +1 -0
- package/dist/src/models/workflow.js +120 -0
- package/dist/src/models/workflow.js.map +1 -0
- package/dist/src/nodejs/core.js +18 -0
- package/dist/src/nodejs/core.js.map +1 -0
- package/dist/src/nodejs/index.js +6 -0
- package/dist/src/nodejs/index.js.map +1 -0
- package/dist/src/nodejs/script/build_dom_tree.js +586 -0
- package/dist/src/nodejs/script/build_dom_tree.js.map +1 -0
- package/dist/src/nodejs/tools/browser_use.js +458 -0
- package/dist/src/nodejs/tools/browser_use.js.map +1 -0
- package/dist/src/nodejs/tools/command_execute.js +65 -0
- package/dist/src/nodejs/tools/command_execute.js.map +1 -0
- package/dist/src/nodejs/tools/file_read.js +45 -0
- package/dist/src/nodejs/tools/file_read.js.map +1 -0
- package/dist/src/nodejs/tools/file_write.js +95 -0
- package/dist/src/nodejs/tools/file_write.js.map +1 -0
- package/dist/src/nodejs/tools/index.js +5 -0
- package/dist/src/nodejs/tools/index.js.map +1 -0
- package/dist/src/schemas/workflow.schema.js +64 -0
- package/dist/src/schemas/workflow.schema.js.map +1 -0
- package/dist/src/services/llm/claude-provider.js +140 -0
- package/dist/src/services/llm/claude-provider.js.map +1 -0
- package/dist/src/services/llm/deepseek-provider.js +432 -0
- package/dist/src/services/llm/deepseek-provider.js.map +1 -0
- package/dist/src/services/llm/glm-provider.js +317 -0
- package/dist/src/services/llm/glm-provider.js.map +1 -0
- package/dist/src/services/llm/openai-provider copy.js +317 -0
- package/dist/src/services/llm/openai-provider copy.js.map +1 -0
- package/dist/src/services/llm/openai-provider.js +317 -0
- package/dist/src/services/llm/openai-provider.js.map +1 -0
- package/dist/src/services/parser/workflow-parser.js +208 -0
- package/dist/src/services/parser/workflow-parser.js.map +1 -0
- package/dist/src/services/workflow/generator.js +105 -0
- package/dist/src/services/workflow/generator.js.map +1 -0
- package/dist/src/services/workflow/templates.js +42 -0
- package/dist/src/services/workflow/templates.js.map +1 -0
- package/dist/src/types/action.types.js +2 -0
- package/dist/src/types/action.types.js.map +1 -0
- package/dist/src/types/eko.types.js +2 -0
- package/dist/src/types/eko.types.js.map +1 -0
- package/dist/src/types/index.js +6 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/llm.types.js +2 -0
- package/dist/src/types/llm.types.js.map +1 -0
- package/dist/src/types/parser.types.js +2 -0
- package/dist/src/types/parser.types.js.map +1 -0
- package/dist/src/types/tools.types.js +2 -0
- package/dist/src/types/tools.types.js.map +1 -0
- package/dist/src/types/workflow.types.js +3 -0
- package/dist/src/types/workflow.types.js.map +1 -0
- package/dist/src/web/core.js +18 -0
- package/dist/src/web/core.js.map +1 -0
- package/dist/src/web/index.js +9 -0
- package/dist/src/web/index.js.map +1 -0
- package/dist/src/web/script/build_dom_tree.js +584 -0
- package/dist/src/web/script/build_dom_tree.js.map +1 -0
- package/dist/src/web/tools/browser.js +249 -0
- package/dist/src/web/tools/browser.js.map +1 -0
- package/dist/src/web/tools/browser_use.js +176 -0
- package/dist/src/web/tools/browser_use.js.map +1 -0
- package/dist/src/web/tools/element_click.js +121 -0
- package/dist/src/web/tools/element_click.js.map +1 -0
- package/dist/src/web/tools/export_file.js +74 -0
- package/dist/src/web/tools/export_file.js.map +1 -0
- package/dist/src/web/tools/extract_content.js +24 -0
- package/dist/src/web/tools/extract_content.js.map +1 -0
- package/dist/src/web/tools/find_element_position.js +121 -0
- package/dist/src/web/tools/find_element_position.js.map +1 -0
- package/dist/src/web/tools/html_script.js +219 -0
- package/dist/src/web/tools/html_script.js.map +1 -0
- package/dist/src/web/tools/index.js +8 -0
- package/dist/src/web/tools/index.js.map +1 -0
- package/dist/src/web/tools/screenshot.js +24 -0
- package/dist/src/web/tools/screenshot.js.map +1 -0
- package/dist/test/integration/claude-provider.test.js +170 -0
- package/dist/test/integration/claude-provider.test.js.map +1 -0
- package/dist/test/integration/deepseek-provider.test.js +171 -0
- package/dist/test/integration/deepseek-provider.test.js.map +1 -0
- package/dist/test/integration/glm-provider.test.js +173 -0
- package/dist/test/integration/glm-provider.test.js.map +1 -0
- package/dist/test/integration/openai-provider.test copy.js +170 -0
- package/dist/test/integration/openai-provider.test copy.js.map +1 -0
- package/dist/test/integration/openai-provider.test.js +170 -0
- package/dist/test/integration/openai-provider.test.js.map +1 -0
- package/dist/test/integration/qwen-provider.js +170 -0
- package/dist/test/integration/qwen-provider.js.map +1 -0
- package/dist/test/integration/qwen-provider.test copy.js +170 -0
- package/dist/test/integration/qwen-provider.test copy.js.map +1 -0
- package/dist/test/integration/qwen-provider.test.js +170 -0
- package/dist/test/integration/qwen-provider.test.js.map +1 -0
- package/dist/test/integration/workflow.execution.test.js +152 -0
- package/dist/test/integration/workflow.execution.test.js.map +1 -0
- package/dist/test/integration/workflow.generation-and-execution.test.js +131 -0
- package/dist/test/integration/workflow.generation-and-execution.test.js.map +1 -0
- package/dist/test/integration/workflow.generator.test.js +207 -0
- package/dist/test/integration/workflow.generator.test.js.map +1 -0
- package/dist/test/unit/action.test.js +186 -0
- package/dist/test/unit/action.test.js.map +1 -0
- package/dist/test/unit/tool-registry.test.js +99 -0
- package/dist/test/unit/tool-registry.test.js.map +1 -0
- package/dist/test/unit/workflow-parser.test.js +189 -0
- package/dist/test/unit/workflow-parser.test.js.map +1 -0
- package/dist/test/unit/workflow.test.js +102 -0
- package/dist/test/unit/workflow.test.js.map +1 -0
- package/dist/types/action.types.d.ts +2 -0
- package/dist/types/eko.types.d.ts +4 -1
- package/dist/types/jest.config.d.ts +10 -0
- package/dist/types/llm.types.d.ts +0 -2
- package/dist/types/rollup.config.d.ts +16 -0
- package/dist/types/script.d.ts +1 -0
- package/dist/types/src/core/eko.d.ts +20 -0
- package/dist/types/src/core/tool-registry.d.ts +13 -0
- package/dist/types/src/extension/content/index.d.ts +16 -0
- package/dist/types/src/extension/core.d.ts +11 -0
- package/dist/types/src/extension/index.d.ts +7 -0
- package/dist/types/src/extension/script/bing.d.ts +0 -0
- package/dist/types/src/extension/script/build_dom_tree.d.ts +38 -0
- package/dist/types/src/extension/script/common.d.ts +0 -0
- package/dist/types/src/extension/script/duckduckgo.d.ts +0 -0
- package/dist/types/src/extension/script/google.d.ts +0 -0
- package/dist/types/src/extension/tools/browser.d.ts +22 -0
- package/dist/types/src/extension/tools/browser_use.d.ts +19 -0
- package/dist/types/src/extension/tools/element_click.d.ts +12 -0
- package/dist/types/src/extension/tools/export_file.d.ts +18 -0
- package/dist/types/src/extension/tools/extract_content.d.ts +18 -0
- package/dist/types/src/extension/tools/find_element_position.d.ts +12 -0
- package/dist/types/src/extension/tools/html_script.d.ts +10 -0
- package/dist/types/src/extension/tools/index.d.ts +11 -0
- package/dist/types/src/extension/tools/open_url.d.ts +18 -0
- package/dist/{extension/tools/form_autofill.d.ts → types/src/extension/tools/request_login.d.ts} +3 -4
- package/dist/types/src/extension/tools/screenshot.d.ts +18 -0
- package/dist/types/src/extension/tools/tab_management.d.ts +19 -0
- package/dist/types/src/extension/tools/web_search.d.ts +18 -0
- package/dist/types/src/extension/utils.d.ts +31 -0
- package/dist/types/src/fellou/computer.d.ts +20 -0
- package/dist/types/src/fellou/index.d.ts +6 -0
- package/dist/types/src/fellou/tools/computer_use.d.ts +18 -0
- package/dist/types/src/index.d.ts +8 -0
- package/dist/types/src/models/action.d.ts +22 -0
- package/dist/types/src/models/workflow.d.ts +16 -0
- package/dist/types/src/nodejs/core.d.ts +2 -0
- package/dist/types/src/nodejs/index.d.ts +3 -0
- package/dist/types/src/nodejs/script/build_dom_tree.d.ts +1 -0
- package/dist/types/src/nodejs/tools/browser_use.d.ts +28 -0
- package/dist/types/src/nodejs/tools/command_execute.d.ts +12 -0
- package/dist/types/src/nodejs/tools/file_read.d.ts +11 -0
- package/dist/types/src/nodejs/tools/file_write.d.ts +15 -0
- package/dist/types/src/nodejs/tools/index.d.ts +4 -0
- package/dist/types/src/schemas/workflow.schema.d.ts +88 -0
- package/dist/types/src/services/llm/claude-provider.d.ts +11 -0
- package/dist/types/src/services/llm/deepseek-provider.d.ts +15 -0
- package/dist/types/src/services/llm/glm-provider.d.ts +11 -0
- package/dist/types/src/services/llm/openai-provider copy.d.ts +11 -0
- package/dist/types/src/services/llm/openai-provider.d.ts +11 -0
- package/dist/types/src/services/parser/workflow-parser.d.ts +29 -0
- package/dist/types/src/services/workflow/generator.d.ts +13 -0
- package/dist/types/src/services/workflow/templates.d.ts +8 -0
- package/dist/types/src/types/action.types.d.ts +38 -0
- package/dist/types/src/types/eko.types.d.ts +21 -0
- package/dist/types/src/types/index.d.ts +5 -0
- package/dist/types/src/types/llm.types.d.ts +54 -0
- package/dist/types/src/types/parser.types.d.ts +9 -0
- package/dist/types/src/types/tools.types.d.ts +88 -0
- package/dist/types/src/types/workflow.types.d.ts +39 -0
- package/dist/types/src/web/core.d.ts +2 -0
- package/dist/types/src/web/index.d.ts +5 -0
- package/dist/types/src/web/script/build_dom_tree.d.ts +10 -0
- package/dist/types/src/web/tools/browser.d.ts +21 -0
- package/dist/types/src/web/tools/browser_use.d.ts +19 -0
- package/dist/types/src/web/tools/element_click.d.ts +12 -0
- package/dist/types/src/web/tools/export_file.d.ts +18 -0
- package/dist/types/src/web/tools/extract_content.d.ts +17 -0
- package/dist/types/src/web/tools/find_element_position.d.ts +12 -0
- package/dist/types/src/web/tools/html_script.d.ts +10 -0
- package/dist/types/src/web/tools/index.d.ts +7 -0
- package/dist/types/src/web/tools/screenshot.d.ts +18 -0
- package/dist/types/test/integration/claude-provider.test.d.ts +1 -0
- package/dist/types/test/integration/deepseek-provider.test.d.ts +1 -0
- package/dist/types/test/integration/glm-provider.test.d.ts +1 -0
- package/dist/types/test/integration/openai-provider.test copy.d.ts +1 -0
- package/dist/types/test/integration/openai-provider.test.d.ts +1 -0
- package/dist/types/test/integration/qwen-provider.d.ts +1 -0
- package/dist/types/test/integration/qwen-provider.test copy.d.ts +1 -0
- package/dist/types/test/integration/qwen-provider.test.d.ts +1 -0
- package/dist/types/test/integration/workflow.execution.test.d.ts +1 -0
- package/dist/types/test/integration/workflow.generation-and-execution.test.d.ts +1 -0
- package/dist/types/test/integration/workflow.generator.test.d.ts +1 -0
- package/dist/types/test/unit/action.test.d.ts +1 -0
- package/dist/types/test/unit/tool-registry.test.d.ts +1 -0
- package/dist/types/test/unit/workflow-parser.test.d.ts +1 -0
- package/dist/types/test/unit/workflow.test.d.ts +1 -0
- package/dist/universal_tools/human/text.d.ts +9 -0
- package/dist/web.cjs.js +128 -121
- package/dist/web.esm.js +128 -121
- package/package.json +106 -106
- package/dist/fellou/tools/index.d.ts +0 -2
- package/dist/types/framework.types.d.ts +0 -11
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export interface ComputerUseParam {
|
|
2
|
+
action: string;
|
|
3
|
+
coordinate?: [number, number];
|
|
4
|
+
text?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ComputerUseResult {
|
|
7
|
+
success: boolean;
|
|
8
|
+
image?: ScreenshotImage;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export interface BrowserUseParam {
|
|
12
|
+
action: string;
|
|
13
|
+
index?: number;
|
|
14
|
+
text?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface BrowserUseResult {
|
|
17
|
+
success: boolean;
|
|
18
|
+
image?: ScreenshotImage;
|
|
19
|
+
text?: string;
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}
|
|
22
|
+
export interface ExportFileParam {
|
|
23
|
+
content: string;
|
|
24
|
+
fileType: 'txt' | 'csv' | 'md' | 'html' | 'js' | 'xml' | 'json' | 'yml' | 'sql';
|
|
25
|
+
filename?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ExtractContentResult {
|
|
28
|
+
tabId: number;
|
|
29
|
+
result: {
|
|
30
|
+
title?: string;
|
|
31
|
+
url?: string;
|
|
32
|
+
content: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface OpenUrlParam {
|
|
36
|
+
url: string;
|
|
37
|
+
newWindow?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface OpenUrlResult {
|
|
40
|
+
tabId: number;
|
|
41
|
+
windowId: number;
|
|
42
|
+
title?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface ScreenshotResult {
|
|
45
|
+
image: ScreenshotImage;
|
|
46
|
+
}
|
|
47
|
+
export interface ScreenshotImage {
|
|
48
|
+
type: 'base64';
|
|
49
|
+
media_type: 'image/png' | 'image/jpeg';
|
|
50
|
+
data: string;
|
|
51
|
+
}
|
|
52
|
+
export interface TabManagementParam {
|
|
53
|
+
commond: string;
|
|
54
|
+
}
|
|
55
|
+
export type TabManagementResult = TabInfo | CloseTabInfo | TabInfo[];
|
|
56
|
+
export interface TabInfo {
|
|
57
|
+
tabId?: number;
|
|
58
|
+
windowId?: number;
|
|
59
|
+
title?: string;
|
|
60
|
+
url?: string;
|
|
61
|
+
active?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface CloseTabInfo {
|
|
64
|
+
closedTabId: number;
|
|
65
|
+
newTabId?: number;
|
|
66
|
+
newTabTitle?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface WebSearchParam {
|
|
69
|
+
url?: string;
|
|
70
|
+
query: string;
|
|
71
|
+
maxResults?: number;
|
|
72
|
+
}
|
|
73
|
+
export interface WebSearchResult {
|
|
74
|
+
title: string;
|
|
75
|
+
url: string;
|
|
76
|
+
content: string;
|
|
77
|
+
}
|
|
78
|
+
export interface TaskPrompt {
|
|
79
|
+
task_prompt: string;
|
|
80
|
+
}
|
|
81
|
+
export interface ElementRect {
|
|
82
|
+
left: number;
|
|
83
|
+
top: number;
|
|
84
|
+
right?: number;
|
|
85
|
+
bottom?: number;
|
|
86
|
+
width?: number;
|
|
87
|
+
height?: number;
|
|
88
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Action, ExecutionContext, Tool } from "./action.types";
|
|
2
|
+
import { LLMProvider } from "./llm.types";
|
|
3
|
+
export interface WorkflowNode {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
input: NodeIO;
|
|
8
|
+
output: NodeIO;
|
|
9
|
+
action: Action;
|
|
10
|
+
dependencies: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface NodeIO {
|
|
13
|
+
type: string;
|
|
14
|
+
schema: object;
|
|
15
|
+
value: unknown;
|
|
16
|
+
}
|
|
17
|
+
export interface Workflow {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
nodes: WorkflowNode[];
|
|
22
|
+
variables: Map<string, any>;
|
|
23
|
+
llmProvider?: LLMProvider;
|
|
24
|
+
execute(callback?: WorkflowCallback): Promise<void>;
|
|
25
|
+
addNode(node: WorkflowNode): void;
|
|
26
|
+
removeNode(nodeId: string): void;
|
|
27
|
+
getNode(nodeId: string): WorkflowNode;
|
|
28
|
+
validateDAG(): boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface WorkflowCallback {
|
|
31
|
+
hooks: {
|
|
32
|
+
beforeWorkflow?: (workflow: Workflow) => Promise<void>;
|
|
33
|
+
beforeSubtask?: (subtask: WorkflowNode, context: ExecutionContext) => Promise<void>;
|
|
34
|
+
beforeToolUse?: (tool: Tool<any, any>, context: ExecutionContext, input: any) => Promise<any>;
|
|
35
|
+
afterToolUse?: (tool: Tool<any, any>, context: ExecutionContext, result: any) => Promise<any>;
|
|
36
|
+
afterSubtask?: (subtask: WorkflowNode, context: ExecutionContext, result: any) => Promise<void>;
|
|
37
|
+
afterWorkflow?: (workflow: Workflow, variables: Map<string, unknown>) => Promise<void>;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get clickable elements on the page
|
|
3
|
+
*
|
|
4
|
+
* @param {*} doHighlightElements Is highlighted
|
|
5
|
+
* @param {*} includeAttributes [attr_names...]
|
|
6
|
+
* @returns { element_str, selector_map }
|
|
7
|
+
*/
|
|
8
|
+
export function get_clickable_elements(doHighlightElements: any | undefined, includeAttributes: any): string;
|
|
9
|
+
export function get_highlight_element(highlightIndex: any): any;
|
|
10
|
+
export function remove_highlight(): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ScreenshotResult } from '../../types/tools.types';
|
|
2
|
+
export declare function type(text: string, xpath?: string, highlightIndex?: number): boolean;
|
|
3
|
+
export declare function clear_input(xpath?: string, highlightIndex?: number): boolean;
|
|
4
|
+
export declare function left_click(xpath?: string, highlightIndex?: number): boolean;
|
|
5
|
+
export declare function right_click(xpath?: string, highlightIndex?: number): boolean;
|
|
6
|
+
export declare function double_click(xpath?: string, highlightIndex?: number): boolean;
|
|
7
|
+
export declare function screenshot(compress?: boolean): Promise<ScreenshotResult>;
|
|
8
|
+
export declare function compress_image(dataUrl: string, scale?: number, quality?: number): Promise<string>;
|
|
9
|
+
export declare function scroll_to(xpath?: string, highlightIndex?: number): boolean;
|
|
10
|
+
export declare function get_dropdown_options(xpath?: string, highlightIndex?: number): {
|
|
11
|
+
options: Array<{
|
|
12
|
+
index: number;
|
|
13
|
+
text: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
}>;
|
|
16
|
+
id?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
} | null;
|
|
19
|
+
export declare function select_dropdown_option(text: string, xpath?: string, highlightIndex?: number): any;
|
|
20
|
+
export declare function extractHtmlContent(): string;
|
|
21
|
+
export declare function size(): [number, number];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BrowserUseParam, BrowserUseResult } from '../../types/tools.types';
|
|
2
|
+
import { Tool, InputSchema, ExecutionContext } from '../../types/action.types';
|
|
3
|
+
/**
|
|
4
|
+
* Browser Use for general
|
|
5
|
+
*/
|
|
6
|
+
export declare class BrowserUse implements Tool<BrowserUseParam, BrowserUseResult> {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
input_schema: InputSchema;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* browser
|
|
13
|
+
*
|
|
14
|
+
* @param {*} params { action: 'input_text', index: 1, text: 'string' }
|
|
15
|
+
* @returns > { success: true, image?: { type: 'base64', media_type: 'image/jpeg', data: '/9j...' }, text?: string }
|
|
16
|
+
*/
|
|
17
|
+
execute(context: ExecutionContext, params: BrowserUseParam): Promise<BrowserUseResult>;
|
|
18
|
+
destroy(context: ExecutionContext): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Tool, InputSchema, ExecutionContext } from '../../types/action.types';
|
|
2
|
+
import { TaskPrompt } from '../../types/tools.types';
|
|
3
|
+
/**
|
|
4
|
+
* Element click
|
|
5
|
+
*/
|
|
6
|
+
export declare class ElementClick implements Tool<TaskPrompt, any> {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
input_schema: InputSchema;
|
|
10
|
+
constructor();
|
|
11
|
+
execute(context: ExecutionContext, params: TaskPrompt): Promise<any>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ExportFileParam } from '../../types/tools.types';
|
|
2
|
+
import { Tool, InputSchema, ExecutionContext } from '../../types/action.types';
|
|
3
|
+
/**
|
|
4
|
+
* Export file
|
|
5
|
+
*/
|
|
6
|
+
export declare class ExportFile implements Tool<ExportFileParam, unknown> {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
input_schema: InputSchema;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* export
|
|
13
|
+
*
|
|
14
|
+
* @param {*} params { fileType: 'csv', content: 'field1,field2\ndata1,data2' }
|
|
15
|
+
* @returns > { success: true }
|
|
16
|
+
*/
|
|
17
|
+
execute(context: ExecutionContext, params: ExportFileParam): Promise<unknown>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Tool, InputSchema, ExecutionContext } from '../../types/action.types';
|
|
2
|
+
/**
|
|
3
|
+
* Extract Page Content
|
|
4
|
+
*/
|
|
5
|
+
export declare class ExtractContent implements Tool<any, string> {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
input_schema: InputSchema;
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Extract Page Content
|
|
12
|
+
*
|
|
13
|
+
* @param {*} params {}
|
|
14
|
+
* @returns > string
|
|
15
|
+
*/
|
|
16
|
+
execute(context: ExecutionContext, params: any): Promise<string>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Tool, InputSchema, ExecutionContext } from '../../types/action.types';
|
|
2
|
+
import { TaskPrompt, ElementRect } from '../../types/tools.types';
|
|
3
|
+
/**
|
|
4
|
+
* Find Element Position
|
|
5
|
+
*/
|
|
6
|
+
export declare class FindElementPosition implements Tool<TaskPrompt, ElementRect | null> {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
input_schema: InputSchema;
|
|
10
|
+
constructor();
|
|
11
|
+
execute(context: ExecutionContext, params: TaskPrompt): Promise<ElementRect | null>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ElementRect } from '../../types/tools.types';
|
|
2
|
+
export declare function exportFile(filename: string, type: string, content: string): void;
|
|
3
|
+
export declare function xpath(element: any): string;
|
|
4
|
+
export declare function queryWithXpath(xpath: string): any;
|
|
5
|
+
/**
|
|
6
|
+
* Extract the elements related to html operability and wrap them into pseudo-html code.
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractOperableElements(): string;
|
|
9
|
+
export declare function clickOperableElement(id: any): any;
|
|
10
|
+
export declare function getOperableElementRect(id: any): ElementRect | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BrowserUse } from './browser_use';
|
|
2
|
+
import { ElementClick } from './element_click';
|
|
3
|
+
import { ExportFile } from './export_file';
|
|
4
|
+
import { ExtractContent } from './extract_content';
|
|
5
|
+
import { FindElementPosition } from './find_element_position';
|
|
6
|
+
import { Screenshot } from './screenshot';
|
|
7
|
+
export { BrowserUse, ElementClick, ExportFile, ExtractContent, FindElementPosition, Screenshot, };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Tool, InputSchema, ExecutionContext } from '../../types/action.types';
|
|
2
|
+
import { ScreenshotResult } from '../../types/tools.types';
|
|
3
|
+
/**
|
|
4
|
+
* Current Page Screenshot
|
|
5
|
+
*/
|
|
6
|
+
export declare class Screenshot implements Tool<any, ScreenshotResult> {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
input_schema: InputSchema;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Current Page Screenshot
|
|
13
|
+
*
|
|
14
|
+
* @param {*} params {}
|
|
15
|
+
* @returns > { image: { type: 'base64', media_type: 'image/png', data } }
|
|
16
|
+
*/
|
|
17
|
+
execute(context: ExecutionContext, params: unknown): Promise<ScreenshotResult>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HumanInputTextInput, HumanInputTextResult } from '../../types/tools.types';
|
|
2
|
+
import { Tool, InputSchema, ExecutionContext } from '../../types/action.types';
|
|
3
|
+
export declare class HumanInputText implements Tool<HumanInputTextInput, HumanInputTextResult> {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
input_schema: InputSchema;
|
|
7
|
+
constructor();
|
|
8
|
+
execute(context: ExecutionContext, params: HumanInputTextInput): Promise<HumanInputTextResult>;
|
|
9
|
+
}
|