@eko-ai/eko 1.0.10 → 1.0.12
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/core/eko.d.ts +3 -2
- package/dist/extension/script/common.js +12 -4
- package/dist/extension/utils.d.ts +1 -1
- package/dist/extension.cjs.js +42 -36
- package/dist/extension.esm.js +42 -36
- package/dist/extension_content_script.js +24 -6
- package/dist/index.cjs.js +8698 -8709
- package/dist/index.d.ts +1 -2
- package/dist/index.esm.js +8699 -8709
- package/dist/models/workflow.d.ts +3 -1
- package/dist/nodejs.cjs.js +24 -6
- package/dist/nodejs.esm.js +24 -6
- package/dist/services/parser/workflow-parser.d.ts +2 -1
- package/dist/services/workflow/generator.d.ts +3 -3
- package/dist/types/action.types.d.ts +2 -0
- package/dist/types/eko.types.d.ts +4 -1
- package/dist/types/llm.types.d.ts +0 -2
- package/dist/web.cjs.js +11 -4
- package/dist/web.esm.js +11 -4
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ExecutionLogger, LogOptions } from "@/utils/execution-logger";
|
|
2
2
|
import { Workflow, WorkflowNode, NodeOutput, LLMProvider, WorkflowCallback } from "../types";
|
|
3
|
+
import { EkoConfig } from "../types/eko.types";
|
|
3
4
|
export declare class WorkflowImpl implements Workflow {
|
|
4
5
|
id: string;
|
|
5
6
|
name: string;
|
|
7
|
+
private ekoConfig;
|
|
6
8
|
description?: string | undefined;
|
|
7
9
|
nodes: WorkflowNode[];
|
|
8
10
|
variables: Map<string, unknown>;
|
|
@@ -10,7 +12,7 @@ export declare class WorkflowImpl implements Workflow {
|
|
|
10
12
|
abort?: boolean;
|
|
11
13
|
private logger?;
|
|
12
14
|
abortControllers: Map<string, AbortController>;
|
|
13
|
-
constructor(id: string, name: string, description?: string | undefined, nodes?: WorkflowNode[], variables?: Map<string, unknown>, llmProvider?: LLMProvider | undefined, loggerOptions?: LogOptions);
|
|
15
|
+
constructor(id: string, name: string, ekoConfig: EkoConfig, description?: string | undefined, nodes?: WorkflowNode[], variables?: Map<string, unknown>, llmProvider?: LLMProvider | undefined, loggerOptions?: LogOptions);
|
|
14
16
|
setLogger(logger: ExecutionLogger): void;
|
|
15
17
|
cancel(): Promise<void>;
|
|
16
18
|
execute(callback?: WorkflowCallback): Promise<NodeOutput[]>;
|
package/dist/nodejs.cjs.js
CHANGED
|
@@ -71787,23 +71787,41 @@ function do_input(params) {
|
|
|
71787
71787
|
text = text.substring(0, text.length - 1);
|
|
71788
71788
|
}
|
|
71789
71789
|
let input;
|
|
71790
|
-
if (element.tagName == '
|
|
71790
|
+
if (element.tagName == 'IFRAME') {
|
|
71791
|
+
let iframeDoc = element.contentDocument || element.contentWindow.document;
|
|
71792
|
+
input =
|
|
71793
|
+
iframeDoc.querySelector('textarea') ||
|
|
71794
|
+
iframeDoc.querySelector('*[contenteditable="true"]') ||
|
|
71795
|
+
iframeDoc.querySelector('input');
|
|
71796
|
+
}
|
|
71797
|
+
else if (element.tagName == 'INPUT' ||
|
|
71791
71798
|
element.tagName == 'TEXTAREA' ||
|
|
71792
71799
|
element.childElementCount == 0) {
|
|
71793
71800
|
input = element;
|
|
71794
71801
|
}
|
|
71795
71802
|
else {
|
|
71796
|
-
input =
|
|
71803
|
+
input =
|
|
71804
|
+
element.querySelector('input') ||
|
|
71805
|
+
element.querySelector('textarea') ||
|
|
71806
|
+
element.querySelector('*[contenteditable="true"]') ||
|
|
71807
|
+
element;
|
|
71797
71808
|
}
|
|
71798
71809
|
input.focus && input.focus();
|
|
71799
71810
|
if (!text) {
|
|
71800
|
-
if (input.value ==
|
|
71801
|
-
|
|
71811
|
+
if (input.value == undefined) {
|
|
71812
|
+
input.textContent = '';
|
|
71813
|
+
}
|
|
71814
|
+
else {
|
|
71815
|
+
input.value = '';
|
|
71802
71816
|
}
|
|
71803
|
-
input.value = '';
|
|
71804
71817
|
}
|
|
71805
71818
|
else {
|
|
71806
|
-
input.value
|
|
71819
|
+
if (input.value == undefined) {
|
|
71820
|
+
input.textContent += text;
|
|
71821
|
+
}
|
|
71822
|
+
else {
|
|
71823
|
+
input.value += text;
|
|
71824
|
+
}
|
|
71807
71825
|
}
|
|
71808
71826
|
let result = input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
71809
71827
|
if (enter) {
|
package/dist/nodejs.esm.js
CHANGED
|
@@ -71785,23 +71785,41 @@ function do_input(params) {
|
|
|
71785
71785
|
text = text.substring(0, text.length - 1);
|
|
71786
71786
|
}
|
|
71787
71787
|
let input;
|
|
71788
|
-
if (element.tagName == '
|
|
71788
|
+
if (element.tagName == 'IFRAME') {
|
|
71789
|
+
let iframeDoc = element.contentDocument || element.contentWindow.document;
|
|
71790
|
+
input =
|
|
71791
|
+
iframeDoc.querySelector('textarea') ||
|
|
71792
|
+
iframeDoc.querySelector('*[contenteditable="true"]') ||
|
|
71793
|
+
iframeDoc.querySelector('input');
|
|
71794
|
+
}
|
|
71795
|
+
else if (element.tagName == 'INPUT' ||
|
|
71789
71796
|
element.tagName == 'TEXTAREA' ||
|
|
71790
71797
|
element.childElementCount == 0) {
|
|
71791
71798
|
input = element;
|
|
71792
71799
|
}
|
|
71793
71800
|
else {
|
|
71794
|
-
input =
|
|
71801
|
+
input =
|
|
71802
|
+
element.querySelector('input') ||
|
|
71803
|
+
element.querySelector('textarea') ||
|
|
71804
|
+
element.querySelector('*[contenteditable="true"]') ||
|
|
71805
|
+
element;
|
|
71795
71806
|
}
|
|
71796
71807
|
input.focus && input.focus();
|
|
71797
71808
|
if (!text) {
|
|
71798
|
-
if (input.value ==
|
|
71799
|
-
|
|
71809
|
+
if (input.value == undefined) {
|
|
71810
|
+
input.textContent = '';
|
|
71811
|
+
}
|
|
71812
|
+
else {
|
|
71813
|
+
input.value = '';
|
|
71800
71814
|
}
|
|
71801
|
-
input.value = '';
|
|
71802
71815
|
}
|
|
71803
71816
|
else {
|
|
71804
|
-
input.value
|
|
71817
|
+
if (input.value == undefined) {
|
|
71818
|
+
input.textContent += text;
|
|
71819
|
+
}
|
|
71820
|
+
else {
|
|
71821
|
+
input.value += text;
|
|
71822
|
+
}
|
|
71805
71823
|
}
|
|
71806
71824
|
let result = input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
71807
71825
|
if (enter) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Workflow } from '../../types/workflow.types';
|
|
2
2
|
import { ValidationResult } from '../../types/parser.types';
|
|
3
|
+
import { EkoConfig } from '@/types';
|
|
3
4
|
export declare class WorkflowParser {
|
|
4
5
|
/**
|
|
5
6
|
* Parse JSON string into runtime Workflow object
|
|
6
7
|
* @throws {Error} if JSON is invalid or schema validation fails
|
|
7
8
|
*/
|
|
8
|
-
static parse(json: string): Workflow;
|
|
9
|
+
static parse(json: string, ekoConfig: EkoConfig): Workflow;
|
|
9
10
|
/**
|
|
10
11
|
* Convert runtime Workflow object to JSON string
|
|
11
12
|
*/
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { LLMProvider, Message } from '../../types/llm.types';
|
|
2
2
|
import { Workflow } from '../../types/workflow.types';
|
|
3
3
|
import { ToolRegistry } from '../../core/tool-registry';
|
|
4
|
+
import { EkoConfig } from '@/types';
|
|
4
5
|
export declare class WorkflowGenerator {
|
|
5
6
|
private llmProvider;
|
|
6
7
|
private toolRegistry;
|
|
7
8
|
message_history: Message[];
|
|
8
9
|
constructor(llmProvider: LLMProvider, toolRegistry: ToolRegistry);
|
|
9
|
-
generateWorkflow(prompt: string): Promise<Workflow>;
|
|
10
|
-
|
|
11
|
-
modifyWorkflow(prompt: string): Promise<Workflow>;
|
|
10
|
+
generateWorkflow(prompt: string, ekoConfig: EkoConfig): Promise<Workflow>;
|
|
11
|
+
modifyWorkflow(prompt: string, ekoConfig: EkoConfig): Promise<Workflow>;
|
|
12
12
|
private doGenerateWorkflow;
|
|
13
13
|
private createWorkflowFromData;
|
|
14
14
|
}
|
|
@@ -2,6 +2,7 @@ import { Workflow } from "./workflow.types";
|
|
|
2
2
|
import { LLMProvider } from "./llm.types";
|
|
3
3
|
import { NodeOutput, WorkflowCallback } from "./workflow.types";
|
|
4
4
|
import { NodeInput } from "./workflow.types";
|
|
5
|
+
import { EkoConfig } from "./eko.types";
|
|
5
6
|
export interface Tool<T, R> {
|
|
6
7
|
name: string;
|
|
7
8
|
description: string;
|
|
@@ -26,6 +27,7 @@ export interface Property {
|
|
|
26
27
|
}
|
|
27
28
|
export interface ExecutionContext {
|
|
28
29
|
llmProvider: LLMProvider;
|
|
30
|
+
ekoConfig: EkoConfig;
|
|
29
31
|
variables: Map<string, unknown>;
|
|
30
32
|
workflow?: Workflow;
|
|
31
33
|
tools?: Map<string, Tool<any, any>>;
|
|
@@ -15,7 +15,10 @@ export interface OpenaiConfig {
|
|
|
15
15
|
options?: OpenAiClientOptions;
|
|
16
16
|
}
|
|
17
17
|
export type ClaudeApiKey = string;
|
|
18
|
-
export type
|
|
18
|
+
export type LLMConfig = ClaudeApiKey | ClaudeConfig | OpenaiConfig | LLMProvider;
|
|
19
|
+
export interface EkoConfig {
|
|
20
|
+
workingWindowId?: number;
|
|
21
|
+
}
|
|
19
22
|
export interface EkoInvokeParam {
|
|
20
23
|
tools?: Array<string> | Array<Tool<any, any>>;
|
|
21
24
|
}
|
package/dist/web.cjs.js
CHANGED
|
@@ -8603,13 +8603,20 @@ function do_input(text, xpath, highlightIndex) {
|
|
|
8603
8603
|
}
|
|
8604
8604
|
input.focus && input.focus();
|
|
8605
8605
|
if (!text) {
|
|
8606
|
-
if (input.value ==
|
|
8607
|
-
|
|
8606
|
+
if (input.value == undefined) {
|
|
8607
|
+
input.textContent = '';
|
|
8608
|
+
}
|
|
8609
|
+
else {
|
|
8610
|
+
input.value = '';
|
|
8608
8611
|
}
|
|
8609
|
-
input.value = '';
|
|
8610
8612
|
}
|
|
8611
8613
|
else {
|
|
8612
|
-
input.value
|
|
8614
|
+
if (input.value == undefined) {
|
|
8615
|
+
input.textContent += text;
|
|
8616
|
+
}
|
|
8617
|
+
else {
|
|
8618
|
+
input.value += text;
|
|
8619
|
+
}
|
|
8613
8620
|
}
|
|
8614
8621
|
let result = input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
8615
8622
|
if (enter) {
|
package/dist/web.esm.js
CHANGED
|
@@ -8601,13 +8601,20 @@ function do_input(text, xpath, highlightIndex) {
|
|
|
8601
8601
|
}
|
|
8602
8602
|
input.focus && input.focus();
|
|
8603
8603
|
if (!text) {
|
|
8604
|
-
if (input.value ==
|
|
8605
|
-
|
|
8604
|
+
if (input.value == undefined) {
|
|
8605
|
+
input.textContent = '';
|
|
8606
|
+
}
|
|
8607
|
+
else {
|
|
8608
|
+
input.value = '';
|
|
8606
8609
|
}
|
|
8607
|
-
input.value = '';
|
|
8608
8610
|
}
|
|
8609
8611
|
else {
|
|
8610
|
-
input.value
|
|
8612
|
+
if (input.value == undefined) {
|
|
8613
|
+
input.textContent += text;
|
|
8614
|
+
}
|
|
8615
|
+
else {
|
|
8616
|
+
input.value += text;
|
|
8617
|
+
}
|
|
8611
8618
|
}
|
|
8612
8619
|
let result = input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
8613
8620
|
if (enter) {
|