@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.
@@ -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[]>;
@@ -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 == 'INPUT' ||
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 = element.querySelector('input') || element.querySelector('textarea') || element;
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
- return true;
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 += text;
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) {
@@ -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 == 'INPUT' ||
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 = element.querySelector('input') || element.querySelector('textarea') || element;
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
- return true;
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 += text;
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
- generateWorkflowFromJson(json: any): Promise<Workflow>;
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 EkoConfig = ClaudeApiKey | ClaudeConfig | OpenaiConfig | LLMProvider;
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
  }
@@ -11,8 +11,6 @@ export interface ToolDefinition {
11
11
  required?: string[];
12
12
  };
13
13
  }
14
- export interface LLMConfig {
15
- }
16
14
  export interface ToolCall {
17
15
  id: string;
18
16
  name: string;
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
- return true;
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 += text;
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
- return true;
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 += text;
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eko-ai/eko",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "Empowering language to transform human words into action.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",