@eko-ai/eko 1.3.5 → 2.0.0

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.
Files changed (161) hide show
  1. package/README.md +37 -19
  2. package/dist/agent/a2a.d.ts +7 -0
  3. package/dist/agent/a2a.d.ts.map +1 -0
  4. package/dist/agent/base.d.ts +47 -0
  5. package/dist/agent/base.d.ts.map +1 -0
  6. package/dist/agent/browser/browser_base.d.ts +30 -0
  7. package/dist/agent/browser/browser_base.d.ts.map +1 -0
  8. package/dist/agent/browser/browser_labels.d.ts +21 -0
  9. package/dist/agent/browser/browser_labels.d.ts.map +1 -0
  10. package/dist/agent/browser/browser_screen.d.ts +16 -0
  11. package/dist/agent/browser/browser_screen.d.ts.map +1 -0
  12. package/dist/agent/browser/build_dom_tree.d.ts +2 -0
  13. package/dist/agent/browser/build_dom_tree.d.ts.map +1 -0
  14. package/dist/agent/browser/index.d.ts +6 -0
  15. package/dist/agent/browser/index.d.ts.map +1 -0
  16. package/dist/agent/chat.d.ts +7 -0
  17. package/dist/agent/chat.d.ts.map +1 -0
  18. package/dist/agent/computer.d.ts +23 -0
  19. package/dist/agent/computer.d.ts.map +1 -0
  20. package/dist/agent/file.d.ts +14 -0
  21. package/dist/agent/file.d.ts.map +1 -0
  22. package/dist/agent/index.d.ts +9 -0
  23. package/dist/agent/index.d.ts.map +1 -0
  24. package/dist/agent/shell.d.ts +14 -0
  25. package/dist/agent/shell.d.ts.map +1 -0
  26. package/dist/agent/timer.d.ts +5 -0
  27. package/dist/agent/timer.d.ts.map +1 -0
  28. package/dist/common/log.d.ts +43 -2
  29. package/dist/common/log.d.ts.map +1 -0
  30. package/dist/common/utils.d.ts +12 -0
  31. package/dist/common/utils.d.ts.map +1 -0
  32. package/dist/common/xml.d.ts +7 -0
  33. package/dist/common/xml.d.ts.map +1 -0
  34. package/dist/config/index.d.ts +8 -0
  35. package/dist/config/index.d.ts.map +1 -0
  36. package/dist/core/chain.d.ts +45 -0
  37. package/dist/core/chain.d.ts.map +1 -0
  38. package/dist/core/context.d.ts +23 -0
  39. package/dist/core/context.d.ts.map +1 -0
  40. package/dist/core/index.d.ts +18 -0
  41. package/dist/core/index.d.ts.map +1 -0
  42. package/dist/core/plan.d.ts +11 -0
  43. package/dist/core/plan.d.ts.map +1 -0
  44. package/dist/index.cjs.js +18163 -10856
  45. package/dist/index.d.ts +13 -10
  46. package/dist/index.d.ts.map +1 -0
  47. package/dist/index.esm.js +18147 -10888
  48. package/dist/llm/index.d.ts +15 -0
  49. package/dist/llm/index.d.ts.map +1 -0
  50. package/dist/mcp/client.d.ts +28 -0
  51. package/dist/mcp/client.d.ts.map +1 -0
  52. package/dist/mcp/index.d.ts +28 -0
  53. package/dist/mcp/index.d.ts.map +1 -0
  54. package/dist/prompt/agent.d.ts +6 -0
  55. package/dist/prompt/agent.d.ts.map +1 -0
  56. package/dist/prompt/plan.d.ts +4 -0
  57. package/dist/prompt/plan.d.ts.map +1 -0
  58. package/dist/tools/foreach_task.d.ts +12 -0
  59. package/dist/tools/foreach_task.d.ts.map +1 -0
  60. package/dist/tools/human_interact.d.ts +12 -0
  61. package/dist/tools/human_interact.d.ts.map +1 -0
  62. package/dist/tools/index.d.ts +19 -0
  63. package/dist/tools/index.d.ts.map +1 -0
  64. package/dist/tools/task_node_status.d.ts +12 -0
  65. package/dist/tools/task_node_status.d.ts.map +1 -0
  66. package/dist/tools/variable_storage.d.ts +12 -0
  67. package/dist/tools/variable_storage.d.ts.map +1 -0
  68. package/dist/tools/watch_trigger.d.ts +12 -0
  69. package/dist/tools/watch_trigger.d.ts.map +1 -0
  70. package/dist/tools/wrapper.d.ts +12 -0
  71. package/dist/tools/wrapper.d.ts.map +1 -0
  72. package/dist/types/core.types.d.ts +114 -0
  73. package/dist/types/core.types.d.ts.map +1 -0
  74. package/dist/types/index.d.ts +3 -3
  75. package/dist/types/index.d.ts.map +1 -0
  76. package/dist/types/llm.types.d.ts +80 -51
  77. package/dist/types/llm.types.d.ts.map +1 -0
  78. package/dist/types/mcp.types.d.ts +35 -0
  79. package/dist/types/mcp.types.d.ts.map +1 -0
  80. package/dist/types/tools.types.d.ts +56 -152
  81. package/dist/types/tools.types.d.ts.map +1 -0
  82. package/package.json +18 -58
  83. package/dist/common/chrome/proxy.d.ts +0 -24
  84. package/dist/common/context-compressor.d.ts +0 -10
  85. package/dist/common/summarize-workflow.d.ts +0 -2
  86. package/dist/common/tools/cancel_workflow.d.ts +0 -9
  87. package/dist/common/tools/document_agent.d.ts +0 -8
  88. package/dist/common/tools/human.d.ts +0 -30
  89. package/dist/common/tools/index.d.ts +0 -4
  90. package/dist/common/tools/write_context.d.ts +0 -7
  91. package/dist/core/eko.d.ts +0 -30
  92. package/dist/core/tool-registry.d.ts +0 -13
  93. package/dist/extension/content/index.d.ts +0 -1
  94. package/dist/extension/core.d.ts +0 -11
  95. package/dist/extension/index.d.ts +0 -7
  96. package/dist/extension/script/bing.js +0 -25
  97. package/dist/extension/script/build_dom_tree.d.ts +0 -38
  98. package/dist/extension/script/build_dom_tree.js +0 -662
  99. package/dist/extension/script/common.js +0 -212
  100. package/dist/extension/script/duckduckgo.js +0 -25
  101. package/dist/extension/script/google.js +0 -26
  102. package/dist/extension/tools/browser.d.ts +0 -23
  103. package/dist/extension/tools/browser_action.d.ts +0 -20
  104. package/dist/extension/tools/export_file.d.ts +0 -18
  105. package/dist/extension/tools/extract_content.d.ts +0 -18
  106. package/dist/extension/tools/get_all_tabs.d.ts +0 -9
  107. package/dist/extension/tools/html_script.d.ts +0 -10
  108. package/dist/extension/tools/index.d.ts +0 -12
  109. package/dist/extension/tools/open_url.d.ts +0 -19
  110. package/dist/extension/tools/request_login.d.ts +0 -10
  111. package/dist/extension/tools/screenshot.d.ts +0 -18
  112. package/dist/extension/tools/switch_tab.d.ts +0 -8
  113. package/dist/extension/tools/tab_management.d.ts +0 -13
  114. package/dist/extension/tools/tool_returns_screenshot.d.ts +0 -8
  115. package/dist/extension/tools/web_search.d.ts +0 -18
  116. package/dist/extension/utils.d.ts +0 -31
  117. package/dist/extension.cjs.js +0 -2796
  118. package/dist/extension.esm.js +0 -2789
  119. package/dist/extension_content_script.js +0 -1078
  120. package/dist/fellou/computer.d.ts +0 -20
  121. package/dist/fellou/index.d.ts +0 -6
  122. package/dist/fellou/tools/computer_use.d.ts +0 -18
  123. package/dist/fellou.cjs.js +0 -238
  124. package/dist/fellou.esm.js +0 -235
  125. package/dist/models/action.d.ts +0 -33
  126. package/dist/models/workflow.d.ts +0 -25
  127. package/dist/nodejs/core.d.ts +0 -2
  128. package/dist/nodejs/index.d.ts +0 -3
  129. package/dist/nodejs/script/build_dom_tree.d.ts +0 -1
  130. package/dist/nodejs/tools/browser_use.d.ts +0 -28
  131. package/dist/nodejs/tools/command_execute.d.ts +0 -12
  132. package/dist/nodejs/tools/file_read.d.ts +0 -11
  133. package/dist/nodejs/tools/file_write.d.ts +0 -15
  134. package/dist/nodejs/tools/index.d.ts +0 -5
  135. package/dist/nodejs.cjs.js +0 -73507
  136. package/dist/nodejs.esm.js +0 -73504
  137. package/dist/schemas/workflow.schema.d.ts +0 -44
  138. package/dist/services/llm/claude-provider.d.ts +0 -12
  139. package/dist/services/llm/openai-provider.d.ts +0 -12
  140. package/dist/services/llm/provider-factory.d.ts +0 -4
  141. package/dist/services/parser/workflow-parser.d.ts +0 -23
  142. package/dist/services/workflow/generator.d.ts +0 -16
  143. package/dist/services/workflow/templates.d.ts +0 -8
  144. package/dist/types/action.types.d.ts +0 -53
  145. package/dist/types/eko.types.d.ts +0 -37
  146. package/dist/types/parser.types.d.ts +0 -9
  147. package/dist/types/workflow.types.d.ts +0 -57
  148. package/dist/utils/execution-logger.d.ts +0 -69
  149. package/dist/utils/sleep.d.ts +0 -1
  150. package/dist/web/core.d.ts +0 -2
  151. package/dist/web/index.d.ts +0 -5
  152. package/dist/web/script/build_dom_tree.d.ts +0 -10
  153. package/dist/web/tools/browser.d.ts +0 -21
  154. package/dist/web/tools/browser_use.d.ts +0 -19
  155. package/dist/web/tools/export_file.d.ts +0 -18
  156. package/dist/web/tools/extract_content.d.ts +0 -17
  157. package/dist/web/tools/html_script.d.ts +0 -10
  158. package/dist/web/tools/index.d.ts +0 -6
  159. package/dist/web/tools/screenshot.d.ts +0 -18
  160. package/dist/web.cjs.js +0 -9952
  161. package/dist/web.esm.js +0 -9948
@@ -1,44 +0,0 @@
1
- export declare const workflowSchema: {
2
- type: string;
3
- required: string[];
4
- properties: {
5
- thinking: {
6
- type: string;
7
- description: string;
8
- };
9
- id: {
10
- type: string;
11
- };
12
- name: {
13
- type: string;
14
- };
15
- description: {
16
- type: string;
17
- };
18
- nodes: {
19
- type: string;
20
- items: {
21
- type: string;
22
- required: string[];
23
- properties: {
24
- id: {
25
- type: string;
26
- };
27
- action: {
28
- type: string;
29
- required: string[];
30
- properties: {
31
- name: {
32
- type: string;
33
- };
34
- description: {
35
- type: string;
36
- description: string;
37
- };
38
- };
39
- };
40
- };
41
- };
42
- };
43
- };
44
- };
@@ -1,12 +0,0 @@
1
- import Anthropic, { ClientOptions } from '@anthropic-ai/sdk';
2
- import { LLMProvider, LLMParameters, LLMResponse, Message, LLMStreamHandler } from '../../types/llm.types';
3
- export declare class ClaudeProvider implements LLMProvider {
4
- client: Anthropic;
5
- defaultModel: string;
6
- constructor(options: Anthropic, defaultModel?: string);
7
- constructor(options: ClientOptions, defaultModel?: string);
8
- constructor(apiKey: string, defaultModel?: string | null, options?: ClientOptions);
9
- private processResponse;
10
- generateText(messages: Message[], params: LLMParameters): Promise<LLMResponse>;
11
- generateStream(messages: Message[], params: LLMParameters, handler: LLMStreamHandler): Promise<void>;
12
- }
@@ -1,12 +0,0 @@
1
- import OpenAI, { ClientOptions } from 'openai';
2
- import { LLMProvider, LLMParameters, LLMResponse, Message, LLMStreamHandler } from '../../types/llm.types';
3
- export declare class OpenaiProvider implements LLMProvider {
4
- client: OpenAI;
5
- defaultModel: string;
6
- constructor(client: OpenAI, defaultModel?: string);
7
- constructor(options: ClientOptions, defaultModel?: string);
8
- constructor(apiKey: string, defaultModel?: string | null, options?: ClientOptions);
9
- private buildParams;
10
- generateText(messages: Message[], params: LLMParameters): Promise<LLMResponse>;
11
- generateStream(messages: Message[], params: LLMParameters, handler: LLMStreamHandler): Promise<void>;
12
- }
@@ -1,4 +0,0 @@
1
- import { LLMConfig, LLMProvider } from "../../types";
2
- export declare class LLMProviderFactory {
3
- static buildLLMProvider(config: LLMConfig): LLMProvider;
4
- }
@@ -1,23 +0,0 @@
1
- import { Workflow } from '../../types/workflow.types';
2
- import { ValidationResult } from '../../types/parser.types';
3
- import { EkoConfig } from '@/types';
4
- export declare class WorkflowParser {
5
- /**
6
- * Parse JSON string into runtime Workflow object
7
- * @throws {Error} if JSON is invalid or schema validation fails
8
- */
9
- static parse(json: string, ekoConfig: EkoConfig): Workflow;
10
- /**
11
- * Convert runtime Workflow object to JSON string
12
- */
13
- static serialize(workflow: Workflow): string;
14
- /**
15
- * Validate workflow JSON structure against schema
16
- */
17
- static validate(json: unknown): ValidationResult;
18
- private static toRuntime;
19
- /**
20
- * Convert runtime Workflow object to JSON structure
21
- */
22
- private static fromRuntime;
23
- }
@@ -1,16 +0,0 @@
1
- import { LLMProvider, Message } from '../../types/llm.types';
2
- import { Workflow } from '../../types/workflow.types';
3
- import { ToolRegistry } from '../../core/tool-registry';
4
- import { EkoConfig } from '@/types';
5
- export declare class WorkflowGenerator {
6
- private llmProvider;
7
- private toolRegistry;
8
- message_history: Message[];
9
- constructor(llmProvider: LLMProvider, toolRegistry: ToolRegistry);
10
- generateWorkflow(prompt: string, ekoConfig: EkoConfig): Promise<Workflow>;
11
- generateWorkflowFromJson(json: any, ekoConfig: EkoConfig): Promise<Workflow>;
12
- modifyWorkflow(prompt: string, ekoConfig: EkoConfig): Promise<Workflow>;
13
- private doGenerateWorkflow;
14
- private createWorkflowFromData;
15
- private createFastWorkflowFromData;
16
- }
@@ -1,8 +0,0 @@
1
- import { ToolDefinition } from '../../types/llm.types';
2
- import { ToolRegistry } from '../../core/tool-registry';
3
- export declare function createWorkflowPrompts(tools: ToolDefinition[]): {
4
- formatSystemPrompt: () => string;
5
- formatUserPrompt: (requirement: string) => string;
6
- modifyUserPrompt: (prompt: string) => string;
7
- };
8
- export declare function createWorkflowGenerationTool(registry: ToolRegistry): ToolDefinition;
@@ -1,53 +0,0 @@
1
- import { Workflow } from "./workflow.types";
2
- import { LLMProvider, Message } from "./llm.types";
3
- import { NodeOutput, WorkflowCallback } from "./workflow.types";
4
- import { NodeInput } from "./workflow.types";
5
- import { EkoConfig } from "./eko.types";
6
- export interface Tool<T, R> {
7
- name: string;
8
- description: string;
9
- input_schema: InputSchema;
10
- execute: (context: ExecutionContext, params: T) => Promise<R>;
11
- destroy?: (context: ExecutionContext) => void;
12
- }
13
- export interface InputSchema {
14
- type: 'object';
15
- properties?: Properties;
16
- required?: Array<string>;
17
- }
18
- export interface Properties {
19
- [key: string]: Property;
20
- }
21
- export interface Property {
22
- type: 'string' | 'integer' | 'boolean' | 'array' | 'object';
23
- description?: string;
24
- items?: InputSchema;
25
- enum?: Array<string | number>;
26
- properties?: Properties;
27
- }
28
- export interface ExecutionContext {
29
- llmProvider: LLMProvider;
30
- ekoConfig: EkoConfig;
31
- variables: Map<string, unknown>;
32
- workflow?: Workflow;
33
- tools?: Map<string, Tool<any, any>>;
34
- callback?: WorkflowCallback;
35
- signal?: AbortSignal;
36
- [key: string]: any;
37
- }
38
- export interface Action {
39
- type: 'prompt' | 'script' | 'hybrid';
40
- name: string;
41
- description: string;
42
- execute: (input: NodeInput, output: NodeOutput, context: ExecutionContext) => Promise<{
43
- nodeOutput: unknown;
44
- reacts: Message[];
45
- }>;
46
- tools: Array<Tool<any, any>>;
47
- llmProvider?: LLMProvider;
48
- tabs: chrome.tabs.Tab[];
49
- }
50
- export interface PatchItem {
51
- task: string;
52
- patch: string;
53
- }
@@ -1,37 +0,0 @@
1
- import { ClientOptions as OpenAiClientOptions } from 'openai';
2
- import { ClientOptions as ClaudeClientOption } from '@anthropic-ai/sdk';
3
- import { LLMProvider } from './llm.types';
4
- import { Tool } from './action.types';
5
- import { WorkflowCallback } from './workflow.types';
6
- export interface ClaudeConfig {
7
- llm: 'claude';
8
- apiKey: string;
9
- modelName?: string;
10
- options?: ClaudeClientOption;
11
- }
12
- export interface OpenaiConfig {
13
- llm: 'openai';
14
- apiKey: string;
15
- modelName?: string;
16
- options?: OpenAiClientOptions;
17
- }
18
- export type ClaudeApiKey = string;
19
- export type LLMConfig = ClaudeApiKey | ClaudeConfig | OpenaiConfig | LLMProvider;
20
- export interface EkoConfig {
21
- workingWindowId?: number;
22
- chromeProxy?: any;
23
- callback?: WorkflowCallback;
24
- patchServerUrl?: string;
25
- loggerInstaceUUID?: string;
26
- }
27
- export interface EkoInvokeParam {
28
- tools?: Array<string> | Array<Tool<any, any>>;
29
- }
30
- export interface WorkflowResult {
31
- isSuccessful?: boolean;
32
- summary?: string;
33
- payload?: WorkflowTranscript | WorkflowArtifact;
34
- }
35
- export type WorkflowTranscript = string;
36
- export interface WorkflowArtifact {
37
- }
@@ -1,9 +0,0 @@
1
- export interface ValidationError {
2
- type: "schema" | "reference" | "type" | "tool";
3
- message: string;
4
- path?: string;
5
- }
6
- export interface ValidationResult {
7
- valid: boolean;
8
- errors: ValidationError[];
9
- }
@@ -1,57 +0,0 @@
1
- import { Action, ExecutionContext, Tool } from "./action.types";
2
- import { LLMProvider } from "./llm.types";
3
- import { ExecutionLogger } from "@/utils/execution-logger";
4
- import { ExportFileParam } from "./tools.types";
5
- import { WorkflowResult } from "./eko.types";
6
- export interface NodeOutput {
7
- name: string;
8
- description: string;
9
- value?: unknown;
10
- }
11
- export interface NodeInput {
12
- items: NodeOutput[];
13
- }
14
- export interface WorkflowNode {
15
- id: string;
16
- name: string;
17
- description?: string;
18
- dependencies: string[];
19
- action: Action;
20
- input: NodeInput;
21
- output: NodeOutput;
22
- }
23
- export interface Workflow {
24
- id: string;
25
- name: string;
26
- description?: string;
27
- nodes: WorkflowNode[];
28
- variables: Map<string, any>;
29
- llmProvider?: LLMProvider;
30
- setLogger(logger: ExecutionLogger): void;
31
- execute(callback?: WorkflowCallback): Promise<WorkflowResult>;
32
- cancel(): Promise<void>;
33
- addNode(node: WorkflowNode): void;
34
- removeNode(nodeId: string): void;
35
- getNode(nodeId: string): WorkflowNode;
36
- validateDAG(): boolean;
37
- getRawWorkflowJson(): string;
38
- }
39
- export interface WorkflowCallback {
40
- hooks: {
41
- beforeWorkflow?: (workflow: Workflow) => Promise<void>;
42
- beforeSubtask?: (subtask: WorkflowNode, context: ExecutionContext) => Promise<void>;
43
- beforeToolUse?: (tool: Tool<any, any>, context: ExecutionContext, input: any) => Promise<any>;
44
- afterToolUse?: (tool: Tool<any, any>, context: ExecutionContext, result: any) => Promise<any>;
45
- afterSubtask?: (subtask: WorkflowNode, context: ExecutionContext, result: any) => Promise<void>;
46
- afterWorkflow?: (workflow: Workflow, variables: Map<string, unknown>) => Promise<void>;
47
- onTabCreated?: (tabId: number) => Promise<void>;
48
- onLlmMessage?: (textContent: string) => Promise<void>;
49
- onLlmMessageUserSidePrompt?: (text: string, toolName: string) => Promise<void>;
50
- onHumanInputText?: (question: string) => Promise<string>;
51
- onHumanInputSingleChoice?: (question: string, choices: string[]) => Promise<string>;
52
- onHumanInputMultipleChoice?: (question: string, choices: string[]) => Promise<string[]>;
53
- onHumanOperate?: (reason: string) => Promise<string>;
54
- onSummaryWorkflow?: (summary: string) => Promise<void>;
55
- onExportFile?: (param: ExportFileParam) => Promise<void>;
56
- };
57
- }
@@ -1,69 +0,0 @@
1
- import { Message } from '../types/llm.types';
2
- import { ExecutionContext } from '../types/action.types';
3
- interface ImageData {
4
- type: 'base64';
5
- media_type: string;
6
- data: string;
7
- }
8
- export interface LogOptions {
9
- maxHistoryLength?: number;
10
- logLevel?: 'debug' | 'info' | 'warn' | 'error';
11
- includeTimestamp?: boolean;
12
- debugImagePath?: string;
13
- imageSaver?: (imageData: ImageData, filename: string) => Promise<string>;
14
- }
15
- /**
16
- * Manages logging for action execution, providing a cleaner view of the execution
17
- * flow while maintaining important context and history.
18
- */
19
- export declare class ExecutionLogger {
20
- private history;
21
- private readonly maxHistoryLength;
22
- private readonly logLevel;
23
- private readonly includeTimestamp;
24
- private readonly debugImagePath?;
25
- private readonly imageSaver?;
26
- private readonly isNode;
27
- constructor(options?: LogOptions);
28
- /**
29
- * Logs a message with execution context
30
- */
31
- log(level: string, message: string, context?: ExecutionContext): void;
32
- /**
33
- * Updates conversation history while maintaining size limit
34
- */
35
- updateHistory(messages: Message[]): void;
36
- /**
37
- * Gets current conversation history
38
- */
39
- getHistory(): Message[];
40
- /**
41
- * Summarizes the execution context for logging
42
- */
43
- private summarizeContext;
44
- /**
45
- * Checks if message should be logged based on log level
46
- */
47
- private shouldLog;
48
- /**
49
- * Logs the start of an action execution
50
- */
51
- logActionStart(actionName: string, input: unknown, context?: ExecutionContext): void;
52
- /**
53
- * Logs the completion of an action execution
54
- */
55
- logActionComplete(actionName: string, result: unknown, context?: ExecutionContext): void;
56
- /**
57
- * Logs a tool execution
58
- */
59
- logToolExecution(toolName: string, input: unknown, context?: ExecutionContext): void;
60
- /**
61
- * Logs an error that occurred during execution
62
- */
63
- logError(error: Error, context?: ExecutionContext): void;
64
- private extractFromDataUrl;
65
- private saveDebugImage;
66
- private formatToolResult;
67
- logToolResult(toolName: string, result: unknown, context?: ExecutionContext): Promise<void>;
68
- }
69
- export {};
@@ -1 +0,0 @@
1
- export declare function sleep(time: number): Promise<void>;
@@ -1,2 +0,0 @@
1
- import { Tool } from '../types';
2
- export declare function loadTools(): Map<string, Tool<any, any>>;
@@ -1,5 +0,0 @@
1
- export * from './core';
2
- import * as tools from './tools';
3
- export { tools };
4
- import * as browser from './tools/browser';
5
- export { browser };
@@ -1,10 +0,0 @@
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;
@@ -1,21 +0,0 @@
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];
@@ -1,19 +0,0 @@
1
- import { BrowserActionParam, BrowserActionResult } 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<BrowserActionParam, BrowserActionResult> {
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: BrowserActionParam): Promise<BrowserActionResult>;
18
- destroy(context: ExecutionContext): void;
19
- }
@@ -1,18 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
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
- }
@@ -1,10 +0,0 @@
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;
@@ -1,6 +0,0 @@
1
- import { BrowserUse } from './browser_use';
2
- import { ExportFile } from './export_file';
3
- import { ExtractContent } from './extract_content';
4
- import { Screenshot } from './screenshot';
5
- export * from '../../common/tools';
6
- export { BrowserUse, ExportFile, ExtractContent, Screenshot, };
@@ -1,18 +0,0 @@
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
- }