@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
|
@@ -88,10 +88,14 @@ eko.click = function(element) {
|
|
|
88
88
|
eko.sendKeys = function(element, str, clear, keypress) {
|
|
89
89
|
element.focus && element.focus()
|
|
90
90
|
if (clear) {
|
|
91
|
-
|
|
92
|
-
element.
|
|
91
|
+
if (element.value == undefined) {
|
|
92
|
+
element.textContent = ''
|
|
93
|
+
} else {
|
|
94
|
+
for (let i = 0; i < element.value.length; i++) {
|
|
95
|
+
element.dispatchEvent(new KeyboardEvent('keydown', { key: 'Backspace' }))
|
|
96
|
+
}
|
|
97
|
+
element.value = ''
|
|
93
98
|
}
|
|
94
|
-
element.value = ''
|
|
95
99
|
}
|
|
96
100
|
if (keypress) {
|
|
97
101
|
Array.from(str).forEach(key => {
|
|
@@ -100,7 +104,11 @@ eko.sendKeys = function(element, str, clear, keypress) {
|
|
|
100
104
|
element.value += str
|
|
101
105
|
element.dispatchEvent(new Event('input'))
|
|
102
106
|
} else {
|
|
103
|
-
element.value
|
|
107
|
+
if (element.value == undefined) {
|
|
108
|
+
element.textContent += str
|
|
109
|
+
} else {
|
|
110
|
+
element.value += str
|
|
111
|
+
}
|
|
104
112
|
element.dispatchEvent(new Event('input', { bubbles: true }))
|
|
105
113
|
}
|
|
106
114
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CancelWorkflowInput } from '../../types/tools.types';
|
|
2
|
+
import { Tool, InputSchema, ExecutionContext } from '../../types/action.types';
|
|
3
|
+
export declare class CancelWorkflow implements Tool<CancelWorkflowInput, void> {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
input_schema: InputSchema;
|
|
7
|
+
constructor();
|
|
8
|
+
execute(context: ExecutionContext, params: CancelWorkflowInput): Promise<void>;
|
|
9
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExecutionContext } from '../types/action.types';
|
|
2
2
|
export declare function getWindowId(context: ExecutionContext): Promise<number>;
|
|
3
3
|
export declare function getTabId(context: ExecutionContext): Promise<number>;
|
|
4
|
-
export declare function getCurrentTabId(windowId?: number): Promise<number>;
|
|
4
|
+
export declare function getCurrentTabId(windowId?: number | undefined): Promise<number | undefined>;
|
|
5
5
|
export declare function open_new_tab(url: string, newWindow: boolean, windowId?: number): Promise<chrome.tabs.Tab>;
|
|
6
6
|
export declare function executeScript(tabId: number, func: any, args: any[]): Promise<any>;
|
|
7
7
|
export declare function waitForTabComplete(tabId: number, timeout?: number): Promise<chrome.tabs.Tab>;
|
package/dist/extension.cjs.js
CHANGED
|
@@ -30,21 +30,12 @@ async function getWindowId(context) {
|
|
|
30
30
|
async function getTabId(context) {
|
|
31
31
|
let tabId = context.variables.get('tabId');
|
|
32
32
|
if (tabId) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
// Check if it's a valid integer
|
|
36
|
-
if (!Number.isInteger(tabId)) {
|
|
37
|
-
context.variables.delete('tabId');
|
|
38
|
-
tabId = null;
|
|
33
|
+
try {
|
|
34
|
+
await chrome.tabs.get(tabId);
|
|
39
35
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
catch (e) {
|
|
45
|
-
tabId = null;
|
|
46
|
-
context.variables.delete('tabId');
|
|
47
|
-
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
tabId = null;
|
|
38
|
+
context.variables.delete('tabId');
|
|
48
39
|
}
|
|
49
40
|
}
|
|
50
41
|
if (!tabId) {
|
|
@@ -68,24 +59,30 @@ async function getTabId(context) {
|
|
|
68
59
|
}
|
|
69
60
|
return tabId;
|
|
70
61
|
}
|
|
71
|
-
|
|
62
|
+
function getCurrentTabId(windowId) {
|
|
72
63
|
return new Promise((resolve, reject) => {
|
|
73
|
-
chrome.tabs.query({ active: true,
|
|
64
|
+
chrome.tabs.query({ windowId, active: true, lastFocusedWindow: true }, function (tabs) {
|
|
74
65
|
if (chrome.runtime.lastError) {
|
|
75
66
|
console.error('Chrome runtime error:', chrome.runtime.lastError);
|
|
76
67
|
reject(chrome.runtime.lastError);
|
|
77
68
|
return;
|
|
78
69
|
}
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
-
return;
|
|
70
|
+
if (tabs.length > 0) {
|
|
71
|
+
resolve(tabs[0].id);
|
|
82
72
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
73
|
+
else {
|
|
74
|
+
chrome.tabs.query({ windowId, active: true, currentWindow: true }, function (_tabs) {
|
|
75
|
+
if (_tabs.length > 0) {
|
|
76
|
+
resolve(_tabs[0].id);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
chrome.tabs.query({ windowId, status: 'complete', currentWindow: true }, function (__tabs) {
|
|
81
|
+
resolve(__tabs.length ? __tabs[__tabs.length - 1].id : undefined);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
});
|
|
87
85
|
}
|
|
88
|
-
resolve(tabId);
|
|
89
86
|
});
|
|
90
87
|
});
|
|
91
88
|
}
|
|
@@ -647,35 +644,35 @@ var browser = /*#__PURE__*/Object.freeze({
|
|
|
647
644
|
class BrowserUse {
|
|
648
645
|
constructor() {
|
|
649
646
|
this.name = 'browser_use';
|
|
650
|
-
this.description = `Use structured commands to interact with the browser, manipulating page elements through screenshots and webpage element extraction.
|
|
651
|
-
* This is a browser GUI interface where you need to analyze webpages by taking screenshots and extracting page element structures, and specify action sequences to complete designated tasks.
|
|
652
|
-
* Before any operation, you must first call the \`screenshot_extract_element\` command, which will return the browser page screenshot and structured element information, both specially processed.
|
|
653
|
-
* ELEMENT INTERACTION:
|
|
654
|
-
- Only use indexes that exist in the provided element list
|
|
655
|
-
- Each element has a unique index number (e.g., "[33]:<button>")
|
|
656
|
-
- Elements marked with "[]:" are non-interactive (for context only)
|
|
657
|
-
* NAVIGATION & ERROR HANDLING:
|
|
658
|
-
- If no suitable elements exist, use other functions to complete the task
|
|
659
|
-
- If stuck, try alternative approaches
|
|
660
|
-
- Handle popups/cookies by accepting or closing them
|
|
647
|
+
this.description = `Use structured commands to interact with the browser, manipulating page elements through screenshots and webpage element extraction.
|
|
648
|
+
* This is a browser GUI interface where you need to analyze webpages by taking screenshots and extracting page element structures, and specify action sequences to complete designated tasks.
|
|
649
|
+
* Before any operation, you must first call the \`screenshot_extract_element\` command, which will return the browser page screenshot and structured element information, both specially processed.
|
|
650
|
+
* ELEMENT INTERACTION:
|
|
651
|
+
- Only use indexes that exist in the provided element list
|
|
652
|
+
- Each element has a unique index number (e.g., "[33]:<button>")
|
|
653
|
+
- Elements marked with "[]:" are non-interactive (for context only)
|
|
654
|
+
* NAVIGATION & ERROR HANDLING:
|
|
655
|
+
- If no suitable elements exist, use other functions to complete the task
|
|
656
|
+
- If stuck, try alternative approaches
|
|
657
|
+
- Handle popups/cookies by accepting or closing them
|
|
661
658
|
- Use scroll to find elements you are looking for`;
|
|
662
659
|
this.input_schema = {
|
|
663
660
|
type: 'object',
|
|
664
661
|
properties: {
|
|
665
662
|
action: {
|
|
666
663
|
type: 'string',
|
|
667
|
-
description: `The action to perform. The available actions are:
|
|
668
|
-
* \`screenshot_extract_element\`: Take a screenshot of the web page and extract operable elements.
|
|
669
|
-
- Screenshots are used to understand page layouts, with labeled bounding boxes corresponding to element indexes. Each bounding box and its label share the same color, with labels typically positioned in the top-right corner of the box.
|
|
670
|
-
- Screenshots help verify element positions and relationships. Labels may sometimes overlap, so extracted elements are used to verify the correct elements.
|
|
671
|
-
- In addition to screenshots, simplified information about interactive elements is returned, with element indexes corresponding to those in the screenshots.
|
|
672
|
-
* \`input_text\`: Enter a string in the interactive element.
|
|
673
|
-
* \`click\`: Click to element.
|
|
674
|
-
* \`right_click\`: Right-click on the element.
|
|
675
|
-
* \`double_click\`: Double-click on the element.
|
|
676
|
-
* \`scroll_to\`: Scroll to the specified element.
|
|
677
|
-
* \`extract_content\`: Extract the text content of the current webpage.
|
|
678
|
-
* \`get_dropdown_options\`: Get all options from a native dropdown element.
|
|
664
|
+
description: `The action to perform. The available actions are:
|
|
665
|
+
* \`screenshot_extract_element\`: Take a screenshot of the web page and extract operable elements.
|
|
666
|
+
- Screenshots are used to understand page layouts, with labeled bounding boxes corresponding to element indexes. Each bounding box and its label share the same color, with labels typically positioned in the top-right corner of the box.
|
|
667
|
+
- Screenshots help verify element positions and relationships. Labels may sometimes overlap, so extracted elements are used to verify the correct elements.
|
|
668
|
+
- In addition to screenshots, simplified information about interactive elements is returned, with element indexes corresponding to those in the screenshots.
|
|
669
|
+
* \`input_text\`: Enter a string in the interactive element.
|
|
670
|
+
* \`click\`: Click to element.
|
|
671
|
+
* \`right_click\`: Right-click on the element.
|
|
672
|
+
* \`double_click\`: Double-click on the element.
|
|
673
|
+
* \`scroll_to\`: Scroll to the specified element.
|
|
674
|
+
* \`extract_content\`: Extract the text content of the current webpage.
|
|
675
|
+
* \`get_dropdown_options\`: Get all options from a native dropdown element.
|
|
679
676
|
* \`select_dropdown_option\`: Select dropdown option for interactive element index by the text of the option you want to select.`,
|
|
680
677
|
enum: [
|
|
681
678
|
'screenshot_extract_element',
|
|
@@ -828,7 +825,7 @@ class BrowserUse {
|
|
|
828
825
|
}
|
|
829
826
|
catch (e) {
|
|
830
827
|
console.error('Browser use error:', e);
|
|
831
|
-
return { success: false, error: e === null || e ===
|
|
828
|
+
return { success: false, error: e === null || e === undefined ? undefined : e.message };
|
|
832
829
|
}
|
|
833
830
|
}
|
|
834
831
|
destroy(context) {
|
|
@@ -906,7 +903,7 @@ function extractOperableElements() {
|
|
|
906
903
|
return NodeFilter.FILTER_SKIP;
|
|
907
904
|
}
|
|
908
905
|
// text <= 100
|
|
909
|
-
const text = (_a = node.innerText) === null || _a ===
|
|
906
|
+
const text = (_a = node.innerText) === null || _a === undefined ? undefined : _a.trim();
|
|
910
907
|
if (isElementVisible(node) &&
|
|
911
908
|
text &&
|
|
912
909
|
text.length <= 100 &&
|
|
@@ -1012,21 +1009,21 @@ async function executeWithHtmlElement$1(context, task_prompt) {
|
|
|
1012
1009
|
let messages = [
|
|
1013
1010
|
{
|
|
1014
1011
|
role: 'user',
|
|
1015
|
-
content: `# Task
|
|
1016
|
-
Determine the operation intent based on user input, find the element ID that the user needs to operate on in the webpage HTML, and if the element does not exist, do nothing.
|
|
1017
|
-
Output JSON format, no explanation required.
|
|
1018
|
-
|
|
1019
|
-
# User input
|
|
1020
|
-
${task_prompt}
|
|
1021
|
-
|
|
1022
|
-
# Output example (when the element exists)
|
|
1023
|
-
{"elementId": "1", "operationType": "click"}
|
|
1024
|
-
|
|
1025
|
-
# Output example (when the element does not exist)
|
|
1026
|
-
{"elementId": null, "operationType": "unknown"}
|
|
1027
|
-
|
|
1028
|
-
# HTML
|
|
1029
|
-
${pseudoHtml}
|
|
1012
|
+
content: `# Task
|
|
1013
|
+
Determine the operation intent based on user input, find the element ID that the user needs to operate on in the webpage HTML, and if the element does not exist, do nothing.
|
|
1014
|
+
Output JSON format, no explanation required.
|
|
1015
|
+
|
|
1016
|
+
# User input
|
|
1017
|
+
${task_prompt}
|
|
1018
|
+
|
|
1019
|
+
# Output example (when the element exists)
|
|
1020
|
+
{"elementId": "1", "operationType": "click"}
|
|
1021
|
+
|
|
1022
|
+
# Output example (when the element does not exist)
|
|
1023
|
+
{"elementId": null, "operationType": "unknown"}
|
|
1024
|
+
|
|
1025
|
+
# HTML
|
|
1026
|
+
${pseudoHtml}
|
|
1030
1027
|
`,
|
|
1031
1028
|
},
|
|
1032
1029
|
];
|
|
@@ -1167,8 +1164,15 @@ class ExportFile {
|
|
|
1167
1164
|
});
|
|
1168
1165
|
}
|
|
1169
1166
|
catch (e) {
|
|
1170
|
-
let tab
|
|
1171
|
-
|
|
1167
|
+
let tab;
|
|
1168
|
+
const url = 'https://www.google.com';
|
|
1169
|
+
if (context.ekoConfig.workingWindowId) {
|
|
1170
|
+
tab = await open_new_tab(url, false, context.ekoConfig.workingWindowId);
|
|
1171
|
+
}
|
|
1172
|
+
else {
|
|
1173
|
+
tab = await open_new_tab(url, true);
|
|
1174
|
+
}
|
|
1175
|
+
(_c = (_b = (_a = context.callback) === null || _a === undefined ? undefined : _a.hooks) === null || _b === undefined ? undefined : _b.onTabCreated) === null || _c === undefined ? undefined : _c.call(_b, tab.id);
|
|
1172
1176
|
let tabId = tab.id;
|
|
1173
1177
|
await chrome.scripting.executeScript({
|
|
1174
1178
|
target: { tabId: tabId },
|
|
@@ -1262,21 +1266,21 @@ async function executeWithHtmlElement(context, task_prompt) {
|
|
|
1262
1266
|
let messages = [
|
|
1263
1267
|
{
|
|
1264
1268
|
role: 'user',
|
|
1265
|
-
content: `# Task
|
|
1266
|
-
Find the element ID that the user needs to operate on in the webpage HTML, and if the element does not exist, do nothing.
|
|
1267
|
-
Output JSON format, no explanation required.
|
|
1268
|
-
|
|
1269
|
-
# User input
|
|
1270
|
-
${task_prompt}
|
|
1271
|
-
|
|
1272
|
-
# Output example (when the element exists)
|
|
1273
|
-
{"elementId": "1"}
|
|
1274
|
-
|
|
1275
|
-
# Output example (when the element does not exist)
|
|
1276
|
-
{"elementId": null}
|
|
1277
|
-
|
|
1278
|
-
# HTML
|
|
1279
|
-
${pseudoHtml}
|
|
1269
|
+
content: `# Task
|
|
1270
|
+
Find the element ID that the user needs to operate on in the webpage HTML, and if the element does not exist, do nothing.
|
|
1271
|
+
Output JSON format, no explanation required.
|
|
1272
|
+
|
|
1273
|
+
# User input
|
|
1274
|
+
${task_prompt}
|
|
1275
|
+
|
|
1276
|
+
# Output example (when the element exists)
|
|
1277
|
+
{"elementId": "1"}
|
|
1278
|
+
|
|
1279
|
+
# Output example (when the element does not exist)
|
|
1280
|
+
{"elementId": null}
|
|
1281
|
+
|
|
1282
|
+
# HTML
|
|
1283
|
+
${pseudoHtml}
|
|
1280
1284
|
`,
|
|
1281
1285
|
},
|
|
1282
1286
|
];
|
|
@@ -1425,12 +1429,12 @@ class OpenUrl {
|
|
|
1425
1429
|
let tab;
|
|
1426
1430
|
if (newWindow) {
|
|
1427
1431
|
tab = await open_new_tab(url, true);
|
|
1428
|
-
(_c = (_b = (_a = context.callback) === null || _a ===
|
|
1432
|
+
(_c = (_b = (_a = context.callback) === null || _a === undefined ? undefined : _a.hooks) === null || _b === undefined ? undefined : _b.onTabCreated) === null || _c === undefined ? undefined : _c.call(_b, tab.id);
|
|
1429
1433
|
}
|
|
1430
1434
|
else {
|
|
1431
1435
|
let windowId = await getWindowId(context);
|
|
1432
1436
|
tab = await open_new_tab(url, false, windowId);
|
|
1433
|
-
(_f = (_e = (_d = context.callback) === null || _d ===
|
|
1437
|
+
(_f = (_e = (_d = context.callback) === null || _d === undefined ? undefined : _d.hooks) === null || _e === undefined ? undefined : _e.onTabCreated) === null || _f === undefined ? undefined : _f.call(_e, tab.id);
|
|
1434
1438
|
}
|
|
1435
1439
|
let windowId = tab.windowId;
|
|
1436
1440
|
let tabId = tab.id;
|
|
@@ -1489,13 +1493,13 @@ class TabManagement {
|
|
|
1489
1493
|
properties: {
|
|
1490
1494
|
command: {
|
|
1491
1495
|
type: 'string',
|
|
1492
|
-
description: `The command to perform. The available commands are:
|
|
1493
|
-
* \`tab_all\`: View all tabs and return the tabId and title.
|
|
1494
|
-
* \`current_tab\`: Get current tab information (tabId, url, title).
|
|
1495
|
-
* \`go_back\`: Go back to the previous page in the current tab.
|
|
1496
|
-
* \`change_url [url]\`: open URL in the current tab, eg: \`change_url https://www.google.com\`.
|
|
1497
|
-
* \`close_tab\`: Close the current tab.
|
|
1498
|
-
* \`switch_tab [tabId]\`: Switch to the specified tab using tabId, eg: \`switch_tab 1000\`.
|
|
1496
|
+
description: `The command to perform. The available commands are:
|
|
1497
|
+
* \`tab_all\`: View all tabs and return the tabId and title.
|
|
1498
|
+
* \`current_tab\`: Get current tab information (tabId, url, title).
|
|
1499
|
+
* \`go_back\`: Go back to the previous page in the current tab.
|
|
1500
|
+
* \`change_url [url]\`: open URL in the current tab, eg: \`change_url https://www.google.com\`.
|
|
1501
|
+
* \`close_tab\`: Close the current tab.
|
|
1502
|
+
* \`switch_tab [tabId]\`: Switch to the specified tab using tabId, eg: \`switch_tab 1000\`.
|
|
1499
1503
|
* \`new_tab [url]\`: Open a new tab window and open the URL, eg: \`new_tab https://www.google.com\``,
|
|
1500
1504
|
},
|
|
1501
1505
|
},
|
|
@@ -1596,12 +1600,12 @@ class TabManagement {
|
|
|
1596
1600
|
let tab;
|
|
1597
1601
|
if (newWindow) {
|
|
1598
1602
|
tab = await open_new_tab(url, true);
|
|
1599
|
-
(_c = (_b = (_a = context.callback) === null || _a ===
|
|
1603
|
+
(_c = (_b = (_a = context.callback) === null || _a === undefined ? undefined : _a.hooks) === null || _b === undefined ? undefined : _b.onTabCreated) === null || _c === undefined ? undefined : _c.call(_b, tab.id);
|
|
1600
1604
|
}
|
|
1601
1605
|
else {
|
|
1602
1606
|
let windowId = await getWindowId(context);
|
|
1603
1607
|
tab = await open_new_tab(url, false, windowId);
|
|
1604
|
-
(_f = (_e = (_d = context.callback) === null || _d ===
|
|
1608
|
+
(_f = (_e = (_d = context.callback) === null || _d === undefined ? undefined : _d.hooks) === null || _e === undefined ? undefined : _e.onTabCreated) === null || _f === undefined ? undefined : _f.call(_e, tab.id);
|
|
1605
1609
|
}
|
|
1606
1610
|
let windowId = tab.windowId;
|
|
1607
1611
|
let tabId = tab.id;
|
|
@@ -1680,8 +1684,8 @@ class WebSearch {
|
|
|
1680
1684
|
}
|
|
1681
1685
|
let taskId = new Date().getTime() + '';
|
|
1682
1686
|
let searchs = [{ url: url, keyword: query }];
|
|
1683
|
-
let searchInfo = await deepSearch(context, taskId, searchs, maxResults || 5);
|
|
1684
|
-
let links = ((_a = searchInfo.result[0]) === null || _a ===
|
|
1687
|
+
let searchInfo = await deepSearch(context, taskId, searchs, maxResults || 5, context.ekoConfig.workingWindowId);
|
|
1688
|
+
let links = ((_a = searchInfo.result[0]) === null || _a === undefined ? undefined : _a.links) || [];
|
|
1685
1689
|
return links.filter((s) => s.content);
|
|
1686
1690
|
}
|
|
1687
1691
|
}
|
|
@@ -1753,25 +1757,27 @@ chrome.tabs.onUpdated.addListener(async function (tabId, changeInfo, tab) {
|
|
|
1753
1757
|
* @param {array} searchs search list => [{ url: 'https://bing.com', keyword: 'ai' }]
|
|
1754
1758
|
* @param {number} detailsMaxNum Maximum crawling quantity per search detail page
|
|
1755
1759
|
*/
|
|
1756
|
-
async function deepSearch(context, taskId, searchs, detailsMaxNum,
|
|
1760
|
+
async function deepSearch(context, taskId, searchs, detailsMaxNum, windowId) {
|
|
1757
1761
|
let closeWindow = false;
|
|
1758
|
-
if (!
|
|
1762
|
+
if (!windowId) {
|
|
1759
1763
|
// open new window
|
|
1760
|
-
window = await chrome.windows.create({
|
|
1764
|
+
let window = await chrome.windows.create({
|
|
1761
1765
|
type: 'normal',
|
|
1762
1766
|
state: 'maximized',
|
|
1763
1767
|
url: null,
|
|
1764
1768
|
});
|
|
1769
|
+
windowId = window.id;
|
|
1765
1770
|
closeWindow = true;
|
|
1766
1771
|
}
|
|
1772
|
+
windowId = windowId;
|
|
1767
1773
|
// crawler the search page details page link
|
|
1768
1774
|
// [{ links: [{ title, url }] }]
|
|
1769
|
-
let detailLinkGroups = await doDetailLinkGroups(context, taskId, searchs, detailsMaxNum,
|
|
1775
|
+
let detailLinkGroups = await doDetailLinkGroups(context, taskId, searchs, detailsMaxNum, windowId);
|
|
1770
1776
|
// crawler all details page content and comments
|
|
1771
|
-
let searchInfo = await doPageContent(context, taskId, detailLinkGroups,
|
|
1777
|
+
let searchInfo = await doPageContent(context, taskId, detailLinkGroups, windowId);
|
|
1772
1778
|
console.log('searchInfo: ', searchInfo);
|
|
1773
1779
|
// close window
|
|
1774
|
-
closeWindow && chrome.windows.remove(
|
|
1780
|
+
closeWindow && chrome.windows.remove(windowId);
|
|
1775
1781
|
return searchInfo;
|
|
1776
1782
|
}
|
|
1777
1783
|
/**
|
|
@@ -1783,7 +1789,7 @@ async function deepSearch(context, taskId, searchs, detailsMaxNum, window) {
|
|
|
1783
1789
|
* @param {*} window
|
|
1784
1790
|
* @returns [{ links: [{ title, url }] }]
|
|
1785
1791
|
*/
|
|
1786
|
-
async function doDetailLinkGroups(context, taskId, searchs, detailsMaxNum,
|
|
1792
|
+
async function doDetailLinkGroups(context, taskId, searchs, detailsMaxNum, windowId) {
|
|
1787
1793
|
var _a, _b, _c;
|
|
1788
1794
|
let detailLinkGroups = [];
|
|
1789
1795
|
let countDownLatch = new CountDownLatch(searchs.length);
|
|
@@ -1794,7 +1800,7 @@ async function doDetailLinkGroups(context, taskId, searchs, detailsMaxNum, windo
|
|
|
1794
1800
|
// open new Tab
|
|
1795
1801
|
let tab = await chrome.tabs.create({
|
|
1796
1802
|
url: url,
|
|
1797
|
-
windowId
|
|
1803
|
+
windowId,
|
|
1798
1804
|
});
|
|
1799
1805
|
(_c = (_b = (_a = context.callback) === null || _a === void 0 ? void 0 : _a.hooks) === null || _b === void 0 ? void 0 : _b.onTabCreated) === null || _c === void 0 ? void 0 : _c.call(_b, tab.id);
|
|
1800
1806
|
let eventId = taskId + '_' + i;
|
|
@@ -1847,7 +1853,7 @@ async function doDetailLinkGroups(context, taskId, searchs, detailsMaxNum, windo
|
|
|
1847
1853
|
* @param {*} window
|
|
1848
1854
|
* @returns search info
|
|
1849
1855
|
*/
|
|
1850
|
-
async function doPageContent(context, taskId, detailLinkGroups,
|
|
1856
|
+
async function doPageContent(context, taskId, detailLinkGroups, windowId) {
|
|
1851
1857
|
var _a, _b, _c;
|
|
1852
1858
|
const searchInfo = {
|
|
1853
1859
|
total: 0,
|
|
@@ -1870,9 +1876,9 @@ async function doPageContent(context, taskId, detailLinkGroups, window) {
|
|
|
1870
1876
|
// open new tab
|
|
1871
1877
|
let tab = await chrome.tabs.create({
|
|
1872
1878
|
url: link.url,
|
|
1873
|
-
windowId
|
|
1879
|
+
windowId,
|
|
1874
1880
|
});
|
|
1875
|
-
(_c = (_b = (_a = context.callback) === null || _a ===
|
|
1881
|
+
(_c = (_b = (_a = context.callback) === null || _a === undefined ? undefined : _a.hooks) === null || _b === undefined ? undefined : _b.onTabCreated) === null || _c === undefined ? undefined : _c.call(_b, tab.id);
|
|
1876
1882
|
searchInfo.running++;
|
|
1877
1883
|
let eventId = taskId + '_' + i + '_' + j;
|
|
1878
1884
|
// Create a timeout promise
|
|
@@ -2046,7 +2052,7 @@ class CancelWorkflow {
|
|
|
2046
2052
|
}
|
|
2047
2053
|
const reason = params.reason;
|
|
2048
2054
|
console.log("The workflow has been cancelled because: " + reason);
|
|
2049
|
-
await ((_a = context.workflow) === null || _a ===
|
|
2055
|
+
await ((_a = context.workflow) === null || _a === undefined ? undefined : _a.cancel());
|
|
2050
2056
|
return;
|
|
2051
2057
|
}
|
|
2052
2058
|
}
|
|
@@ -2073,7 +2079,7 @@ class HumanInputText {
|
|
|
2073
2079
|
}
|
|
2074
2080
|
const question = params.question;
|
|
2075
2081
|
console.log("question: " + question);
|
|
2076
|
-
let answer = await ((_c = (_a = context.callback) === null || _a ===
|
|
2082
|
+
let answer = await ((_c = (_a = context.callback) === null || _a === undefined ? undefined : (_b = _a.hooks).onHumanInputText) === null || _c === undefined ? undefined : _c.call(_b, question));
|
|
2077
2083
|
if (!answer) {
|
|
2078
2084
|
console.error("Cannot get user's answer.");
|
|
2079
2085
|
return { status: "Error: Cannot get user's answer.", answer: "" };
|
|
@@ -2112,7 +2118,7 @@ class HumanInputSingleChoice {
|
|
|
2112
2118
|
const choices = params.choices;
|
|
2113
2119
|
console.log("question: " + question);
|
|
2114
2120
|
console.log("choices: " + choices);
|
|
2115
|
-
let answer = await ((_c = (_a = context.callback) === null || _a ===
|
|
2121
|
+
let answer = await ((_c = (_a = context.callback) === null || _a === undefined ? undefined : (_b = _a.hooks).onHumanInputSingleChoice) === null || _c === undefined ? undefined : _c.call(_b, question, choices));
|
|
2116
2122
|
if (!answer) {
|
|
2117
2123
|
console.error("Cannot get user's answer.");
|
|
2118
2124
|
return { status: "Error: Cannot get user's answer.", answer: "" };
|
|
@@ -2151,7 +2157,7 @@ class HumanInputMultipleChoice {
|
|
|
2151
2157
|
const choices = params.choices;
|
|
2152
2158
|
console.log("question: " + question);
|
|
2153
2159
|
console.log("choices: " + choices);
|
|
2154
|
-
let answer = await ((_c = (_a = context.callback) === null || _a ===
|
|
2160
|
+
let answer = await ((_c = (_a = context.callback) === null || _a === undefined ? undefined : (_b = _a.hooks).onHumanInputMultipleChoice) === null || _c === undefined ? undefined : _c.call(_b, question, choices));
|
|
2155
2161
|
if (!answer) {
|
|
2156
2162
|
console.error("Cannot get user's answer.");
|
|
2157
2163
|
return { status: "Error: Cannot get user's answer.", answer: [] };
|
|
@@ -2184,7 +2190,7 @@ class HumanOperate {
|
|
|
2184
2190
|
}
|
|
2185
2191
|
const reason = params.reason;
|
|
2186
2192
|
console.log("reason: " + reason);
|
|
2187
|
-
let userOperation = await ((_c = (_a = context.callback) === null || _a ===
|
|
2193
|
+
let userOperation = await ((_c = (_a = context.callback) === null || _a === undefined ? undefined : (_b = _a.hooks).onHumanOperate) === null || _c === undefined ? undefined : _c.call(_b, reason));
|
|
2188
2194
|
if (!userOperation) {
|
|
2189
2195
|
console.error("Cannot get user's operation.");
|
|
2190
2196
|
return { status: "Error: Cannot get user's operation.", userOperation: "" };
|
|
@@ -2218,7 +2224,7 @@ class SummaryWorkflow {
|
|
|
2218
2224
|
}
|
|
2219
2225
|
const summary = params.summary;
|
|
2220
2226
|
console.log("summary: " + summary);
|
|
2221
|
-
await ((_c = (_a = context.callback) === null || _a ===
|
|
2227
|
+
await ((_c = (_a = context.callback) === null || _a === undefined ? undefined : (_b = _a.hooks).onSummaryWorkflow) === null || _c === undefined ? undefined : _c.call(_b, summary));
|
|
2222
2228
|
return { status: "OK" };
|
|
2223
2229
|
}
|
|
2224
2230
|
}
|