@eko-ai/eko 2.0.1 → 2.0.2-alpha.1
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/agent/base.d.ts.map +1 -1
- package/dist/agent/browser/browser_base.d.ts +7 -0
- package/dist/agent/browser/browser_base.d.ts.map +1 -1
- package/dist/agent/browser/browser_labels.d.ts.map +1 -1
- package/dist/agent/browser/browser_screen.d.ts.map +1 -1
- package/dist/agent/computer.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/plan.d.ts.map +1 -1
- package/dist/index.cjs.js +138 -42
- package/dist/index.esm.js +138 -42
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/types/core.types.d.ts +1 -0
- package/dist/types/core.types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/agent/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/agent/base.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAC;AACtD,OAAO,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAEL,qBAAqB,EAErB,uBAAuB,EACvB,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS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AqB,GAC9B,OAAO,CAAC,IAAI,CAAC;YAsDF,OAAO;cAqKL,aAAa,CAAC,GAAG,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAgB3E,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,KAAK,IAAI,IAAI,EAAE,CAElB;IAED,IAAI,eAAe,uBAElB;IAED,IAAI,SAAS,2BAEZ;CACF"}
|
|
@@ -24,6 +24,13 @@ export default abstract class BaseBrowserAgent extends Agent {
|
|
|
24
24
|
tabId?: string;
|
|
25
25
|
windowId?: string;
|
|
26
26
|
}>;
|
|
27
|
+
protected lastToolResult(messages: LanguageModelV1Prompt): {
|
|
28
|
+
id: string;
|
|
29
|
+
toolName: string;
|
|
30
|
+
args: unknown;
|
|
31
|
+
result: unknown;
|
|
32
|
+
isError?: boolean;
|
|
33
|
+
} | null;
|
|
27
34
|
protected abstract execute_script(agentContext: AgentContext, func: (...args: any[]) => void, args: any[]): Promise<any>;
|
|
28
35
|
protected execute_mcp_script(agentContext: AgentContext, script: string): Promise<string | number | Record<string, any> | undefined>;
|
|
29
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser_base.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/browser_base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"browser_base.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/browser_base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA+B,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAc,UAAU,EAAE,MAAM,aAAa,CAAC;AAEnE,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,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AAG,IAAI;IAyCR,SAAS,CAAC,QAAQ,CAAC,cAAc,CAC/B,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EAC9B,IAAI,EAAE,GAAG,EAAE,GACV,OAAO,CAAC,GAAG,CAAC;cAEC,kBAAkB,CAChC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;CAG9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser_labels.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/browser_labels.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAc,UAAU,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,sBAAuB,SAAQ,gBAAgB;gBAC/D,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS,CAAC,EAAE,UAAU;cAmCvD,UAAU,CACxB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"browser_labels.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/browser_labels.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAc,UAAU,EAAE,MAA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"version":3,"file":"browser_screen.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/browser_screen.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAc,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,sBAAuB,SAAQ,gBAAgB;gBAC/D,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS,CAAC,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"browser_screen.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/browser_screen.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAc,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,sBAAuB,SAAQ,gBAAgB;gBAC/D,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS,CAAC,EAAE,UAAU;IA6BvE,SAAS,CAAC,QAAQ,CAAC,MAAM,CACvB,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,QAAQ,CAAC,KAAK,CACtB,YAAY,EAAE,YAAY,EAC1B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAC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AAI,CAAC;IAEhB,SAAS,CAAC,QAAQ,CAAC,OAAO,CACxB,YAAY,EAAE,YAAY,EAC1B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,QAAQ,CAAC,KAAK,CACtB,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,QAAQ,CAAC,MAAM,CACvB,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC;IAEhB,SAAS,CAAC,QAAQ,CAAC,aAAa,CAC9B,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC;IAEhB,OAAO,CAAC,cAAc;cAwON,cAAc,CAC5B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,IAAI,CAAC;CAuCjB"}
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAA;AAED,QAAA,MAAM,MAAM,EAAE,YAKb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -9,8 +9,10 @@ export declare class Eko {
|
|
|
9
9
|
modify(taskId: string, modifyTaskPrompt: string): Promise<Workflow>;
|
|
10
10
|
execute(taskId: string): Promise<EkoResult>;
|
|
11
11
|
run(taskPrompt: string, taskId?: string, contextParams?: Record<string, any>): Promise<EkoResult>;
|
|
12
|
+
initContext(workflow: Workflow, contextParams?: Record<string, any>): Promise<Context>;
|
|
12
13
|
private doRunWorkflow;
|
|
13
14
|
getTask(taskId: string): Context | undefined;
|
|
15
|
+
getAllTaskId(): string[];
|
|
14
16
|
deleteTask(taskId: string): boolean;
|
|
15
17
|
abortTask(taskId: string): boolean;
|
|
16
18
|
addAgent(agent: Agent): void;
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAKjC,qBAAa,GAAG;IACd,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,OAAO,CAAuB;gBAE1B,MAAM,EAAE,SAAS;IAKhB,QAAQ,CACnB,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,MAAiB,EACzB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAClC,OAAO,CAAC,QAAQ,CAAC;IAwBP,MAAM,CACjB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,QAAQ,CAAC;IAcP,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAkB3C,GAAG,CACd,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,MAAiB,EACzB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAClC,OAAO,CAAC,SAAS,CAAC;IAKR,WAAW,CACtB,QAAQ,EAAE,QAAQ,EAClB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAClC,OAAO,CAAC,OAAO,CAAC;YAoBL,aAAa;IA+BpB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAI5C,YAAY,IAAI,MAAM,EAAE;IAIxB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAInC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAUlC,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAIpC"}
|
package/dist/core/plan.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/core/plan.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAK/C,qBAAa,OAAO;IAClB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAU;gBAEb,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM;IAKtC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI3C,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;YAIrC,MAAM;
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/core/plan.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAK/C,qBAAa,OAAO;IAClB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAU;gBAEb,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM;IAKtC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI3C,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;YAIrC,MAAM;CAmFrB"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -7,7 +7,8 @@ var buffer = require('buffer');
|
|
|
7
7
|
const config = {
|
|
8
8
|
name: "Fellou",
|
|
9
9
|
platform: "mac",
|
|
10
|
-
maxReactNum: 100
|
|
10
|
+
maxReactNum: 100,
|
|
11
|
+
maxTokens: 16000
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
var LogLevel;
|
|
@@ -12763,7 +12764,7 @@ class RetryLanguageModel {
|
|
|
12763
12764
|
constructor(llms, names, stream_first_timeout) {
|
|
12764
12765
|
this.llms = llms;
|
|
12765
12766
|
this.names = names || [];
|
|
12766
|
-
this.stream_first_timeout = stream_first_timeout ||
|
|
12767
|
+
this.stream_first_timeout = stream_first_timeout || 30000;
|
|
12767
12768
|
if (this.names.indexOf("default") == -1) {
|
|
12768
12769
|
this.names.push("default");
|
|
12769
12770
|
}
|
|
@@ -12777,7 +12778,7 @@ class RetryLanguageModel {
|
|
|
12777
12778
|
toolChoice: request.toolChoice,
|
|
12778
12779
|
},
|
|
12779
12780
|
prompt: request.messages,
|
|
12780
|
-
maxTokens: request.maxTokens,
|
|
12781
|
+
maxTokens: request.maxTokens || config.maxTokens,
|
|
12781
12782
|
temperature: request.temperature,
|
|
12782
12783
|
topP: request.topP,
|
|
12783
12784
|
topK: request.topK,
|
|
@@ -12800,6 +12801,9 @@ class RetryLanguageModel {
|
|
|
12800
12801
|
return result;
|
|
12801
12802
|
}
|
|
12802
12803
|
catch (e) {
|
|
12804
|
+
if (e?.name === "AbortError") {
|
|
12805
|
+
throw e;
|
|
12806
|
+
}
|
|
12803
12807
|
if (Log.isEnableInfo()) {
|
|
12804
12808
|
Log.info(`LLM nonstream request, name: ${name} => `, {
|
|
12805
12809
|
tools: options.mode?.tools,
|
|
@@ -12820,7 +12824,7 @@ class RetryLanguageModel {
|
|
|
12820
12824
|
toolChoice: request.toolChoice,
|
|
12821
12825
|
},
|
|
12822
12826
|
prompt: request.messages,
|
|
12823
|
-
maxTokens: request.maxTokens,
|
|
12827
|
+
maxTokens: request.maxTokens || config.maxTokens,
|
|
12824
12828
|
temperature: request.temperature,
|
|
12825
12829
|
topP: request.topP,
|
|
12826
12830
|
topK: request.topK,
|
|
@@ -12861,6 +12865,9 @@ class RetryLanguageModel {
|
|
|
12861
12865
|
return result;
|
|
12862
12866
|
}
|
|
12863
12867
|
catch (e) {
|
|
12868
|
+
if (e?.name === "AbortError") {
|
|
12869
|
+
throw e;
|
|
12870
|
+
}
|
|
12864
12871
|
if (Log.isEnableInfo()) {
|
|
12865
12872
|
Log.info(`LLM stream request, name: ${name} => `, {
|
|
12866
12873
|
tools: options.mode?.tools,
|
|
@@ -16250,7 +16257,7 @@ class Agent {
|
|
|
16250
16257
|
nodeId: agentContext.agentChain.agent.id,
|
|
16251
16258
|
environment: config.platform,
|
|
16252
16259
|
agent_name: agentContext.agent.Name,
|
|
16253
|
-
}
|
|
16260
|
+
},
|
|
16254
16261
|
});
|
|
16255
16262
|
},
|
|
16256
16263
|
};
|
|
@@ -16322,12 +16329,17 @@ class Agent {
|
|
|
16322
16329
|
else if (!isError && text.length == 0) {
|
|
16323
16330
|
text = "Successful";
|
|
16324
16331
|
}
|
|
16325
|
-
let
|
|
16332
|
+
let contentText = {
|
|
16333
|
+
type: "text",
|
|
16334
|
+
text: text,
|
|
16335
|
+
};
|
|
16336
|
+
let result = text;
|
|
16326
16337
|
if (text &&
|
|
16327
16338
|
((text.startsWith("{") && text.endsWith("}")) ||
|
|
16328
16339
|
(text.startsWith("[") && text.endsWith("]")))) {
|
|
16329
16340
|
try {
|
|
16330
16341
|
result = JSON.parse(text);
|
|
16342
|
+
contentText = null;
|
|
16331
16343
|
}
|
|
16332
16344
|
catch (e) { }
|
|
16333
16345
|
}
|
|
@@ -16336,6 +16348,7 @@ class Agent {
|
|
|
16336
16348
|
toolCallId: toolUse.toolCallId,
|
|
16337
16349
|
toolName: toolUse.toolName,
|
|
16338
16350
|
result: result,
|
|
16351
|
+
content: contentText ? [contentText] : undefined,
|
|
16339
16352
|
isError: isError,
|
|
16340
16353
|
};
|
|
16341
16354
|
}
|
|
@@ -16829,7 +16842,7 @@ class Planner {
|
|
|
16829
16842
|
];
|
|
16830
16843
|
}
|
|
16831
16844
|
let request = {
|
|
16832
|
-
maxTokens:
|
|
16845
|
+
maxTokens: 4096,
|
|
16833
16846
|
temperature: 0.7,
|
|
16834
16847
|
messages: messages,
|
|
16835
16848
|
abortSignal: this.context.controller.signal,
|
|
@@ -16882,6 +16895,7 @@ class Planner {
|
|
|
16882
16895
|
workflow: workflow,
|
|
16883
16896
|
});
|
|
16884
16897
|
}
|
|
16898
|
+
workflow.taskPrompt = taskPrompt;
|
|
16885
16899
|
return workflow;
|
|
16886
16900
|
}
|
|
16887
16901
|
}
|
|
@@ -16932,7 +16946,7 @@ class Eko {
|
|
|
16932
16946
|
throw new Error("The task does not exist");
|
|
16933
16947
|
}
|
|
16934
16948
|
try {
|
|
16935
|
-
return this.doRunWorkflow(context);
|
|
16949
|
+
return await this.doRunWorkflow(context);
|
|
16936
16950
|
}
|
|
16937
16951
|
catch (e) {
|
|
16938
16952
|
return {
|
|
@@ -16949,6 +16963,21 @@ class Eko {
|
|
|
16949
16963
|
await this.generate(taskPrompt, taskId, contextParams);
|
|
16950
16964
|
return await this.execute(taskId);
|
|
16951
16965
|
}
|
|
16966
|
+
async initContext(workflow, contextParams) {
|
|
16967
|
+
const agents = this.config.agents || [];
|
|
16968
|
+
let chain = new Chain(workflow.taskPrompt || workflow.name);
|
|
16969
|
+
let context = new Context(workflow.taskId, this.config, agents, chain);
|
|
16970
|
+
if (this.config.a2aClient) {
|
|
16971
|
+
let a2aList = await this.config.a2aClient.listAgents(workflow.taskPrompt || workflow.name);
|
|
16972
|
+
context.agents = mergeAgents(context.agents, a2aList);
|
|
16973
|
+
}
|
|
16974
|
+
if (contextParams) {
|
|
16975
|
+
Object.keys(contextParams).forEach((key) => context.variables.set(key, contextParams[key]));
|
|
16976
|
+
}
|
|
16977
|
+
context.workflow = workflow;
|
|
16978
|
+
this.taskMap.set(workflow.taskId, context);
|
|
16979
|
+
return context;
|
|
16980
|
+
}
|
|
16952
16981
|
async doRunWorkflow(context) {
|
|
16953
16982
|
let agents = context.agents;
|
|
16954
16983
|
let workflow = context.workflow;
|
|
@@ -16982,6 +17011,9 @@ class Eko {
|
|
|
16982
17011
|
getTask(taskId) {
|
|
16983
17012
|
return this.taskMap.get(taskId);
|
|
16984
17013
|
}
|
|
17014
|
+
getAllTaskId() {
|
|
17015
|
+
return [...this.taskMap.keys()];
|
|
17016
|
+
}
|
|
16985
17017
|
deleteTask(taskId) {
|
|
16986
17018
|
return this.taskMap.delete(taskId);
|
|
16987
17019
|
}
|
|
@@ -17633,14 +17665,16 @@ class BaseComputerAgent extends Agent {
|
|
|
17633
17665
|
properties: {
|
|
17634
17666
|
duration: {
|
|
17635
17667
|
type: "number",
|
|
17636
|
-
description: "Duration in
|
|
17637
|
-
default:
|
|
17668
|
+
description: "Duration in millisecond",
|
|
17669
|
+
default: 500,
|
|
17670
|
+
minimum: 200,
|
|
17671
|
+
maximum: 2000,
|
|
17638
17672
|
},
|
|
17639
17673
|
},
|
|
17640
17674
|
required: ["duration"],
|
|
17641
17675
|
},
|
|
17642
17676
|
execute: async (args, agentContext) => {
|
|
17643
|
-
return await this.callInnerTool(() => sleep((args.duration ||
|
|
17677
|
+
return await this.callInnerTool(() => sleep((args.duration || 200)));
|
|
17644
17678
|
},
|
|
17645
17679
|
},
|
|
17646
17680
|
];
|
|
@@ -17684,10 +17718,13 @@ class BaseComputerAgent extends Agent {
|
|
|
17684
17718
|
|
|
17685
17719
|
class BaseBrowserAgent extends Agent {
|
|
17686
17720
|
async go_back(agentContext) {
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
|
|
17690
|
-
|
|
17721
|
+
try {
|
|
17722
|
+
await this.execute_script(agentContext, () => {
|
|
17723
|
+
return window.navigation.back();
|
|
17724
|
+
}, []);
|
|
17725
|
+
await sleep(100);
|
|
17726
|
+
}
|
|
17727
|
+
catch (e) { }
|
|
17691
17728
|
}
|
|
17692
17729
|
async extract_content(agentContext) {
|
|
17693
17730
|
let content = await this.execute_script(agentContext, () => {
|
|
@@ -17723,7 +17760,7 @@ class BaseBrowserAgent extends Agent {
|
|
|
17723
17760
|
environment: "browser",
|
|
17724
17761
|
agent_name: agentContext.agent.Name,
|
|
17725
17762
|
browser_url: agentContext.variables.get("lastUrl"),
|
|
17726
|
-
}
|
|
17763
|
+
},
|
|
17727
17764
|
});
|
|
17728
17765
|
if (result.extInfo &&
|
|
17729
17766
|
result.extInfo["javascript"] &&
|
|
@@ -17763,6 +17800,42 @@ class BaseBrowserAgent extends Agent {
|
|
|
17763
17800
|
};
|
|
17764
17801
|
}, []);
|
|
17765
17802
|
}
|
|
17803
|
+
lastToolResult(messages) {
|
|
17804
|
+
let lastMessage = messages[messages.length - 1];
|
|
17805
|
+
if (lastMessage.role != "tool") {
|
|
17806
|
+
return null;
|
|
17807
|
+
}
|
|
17808
|
+
let toolResult = lastMessage.content.filter((t) => t.type == "tool-result")[0];
|
|
17809
|
+
if (!toolResult) {
|
|
17810
|
+
return null;
|
|
17811
|
+
}
|
|
17812
|
+
let result = toolResult.result;
|
|
17813
|
+
let isError = toolResult.isError;
|
|
17814
|
+
for (let i = messages.length - 2; i > 0; i--) {
|
|
17815
|
+
if (messages[i].role !== "assistant" ||
|
|
17816
|
+
typeof messages[i].content == "string") {
|
|
17817
|
+
continue;
|
|
17818
|
+
}
|
|
17819
|
+
for (let j = 0; j < messages[i].content.length; j++) {
|
|
17820
|
+
let content = messages[i].content[j];
|
|
17821
|
+
if (typeof content !== "string" && content.type !== "tool-call") {
|
|
17822
|
+
continue;
|
|
17823
|
+
}
|
|
17824
|
+
let toolUse = content;
|
|
17825
|
+
if (toolResult.toolCallId != toolUse.toolCallId) {
|
|
17826
|
+
continue;
|
|
17827
|
+
}
|
|
17828
|
+
return {
|
|
17829
|
+
id: toolResult.toolCallId,
|
|
17830
|
+
toolName: toolUse.toolName,
|
|
17831
|
+
args: toolUse.args,
|
|
17832
|
+
result,
|
|
17833
|
+
isError,
|
|
17834
|
+
};
|
|
17835
|
+
}
|
|
17836
|
+
}
|
|
17837
|
+
return null;
|
|
17838
|
+
}
|
|
17766
17839
|
async execute_mcp_script(agentContext, script) {
|
|
17767
17840
|
return;
|
|
17768
17841
|
}
|
|
@@ -17789,7 +17862,7 @@ function run_build_dom_tree() {
|
|
|
17789
17862
|
return window.clickable_elements[highlightIndex];
|
|
17790
17863
|
}
|
|
17791
17864
|
function remove_highlight() {
|
|
17792
|
-
let highlight = document.getElementById('
|
|
17865
|
+
let highlight = document.getElementById('eko-highlight-container');
|
|
17793
17866
|
if (highlight) {
|
|
17794
17867
|
highlight.remove();
|
|
17795
17868
|
}
|
|
@@ -17927,10 +18000,10 @@ function run_build_dom_tree() {
|
|
|
17927
18000
|
let highlightIndex = 0; // Reset highlight index
|
|
17928
18001
|
function highlightElement(element, index, parentIframe = null) {
|
|
17929
18002
|
// Create or get highlight container
|
|
17930
|
-
let container = document.getElementById('
|
|
18003
|
+
let container = document.getElementById('eko-highlight-container');
|
|
17931
18004
|
if (!container) {
|
|
17932
18005
|
container = document.createElement('div');
|
|
17933
|
-
container.id = '
|
|
18006
|
+
container.id = 'eko-highlight-container';
|
|
17934
18007
|
container.style.position = 'fixed';
|
|
17935
18008
|
container.style.pointerEvents = 'none';
|
|
17936
18009
|
container.style.top = '0';
|
|
@@ -17983,7 +18056,7 @@ function run_build_dom_tree() {
|
|
|
17983
18056
|
overlay.style.height = `${rect.height}px`;
|
|
17984
18057
|
// Create label
|
|
17985
18058
|
const label = document.createElement('div');
|
|
17986
|
-
label.className = '
|
|
18059
|
+
label.className = 'eko-highlight-label';
|
|
17987
18060
|
label.style.position = 'absolute';
|
|
17988
18061
|
label.style.background = baseColor;
|
|
17989
18062
|
label.style.color = 'white';
|
|
@@ -18017,7 +18090,7 @@ function run_build_dom_tree() {
|
|
|
18017
18090
|
container.appendChild(overlay);
|
|
18018
18091
|
container.appendChild(label);
|
|
18019
18092
|
// Store reference for cleanup
|
|
18020
|
-
element.setAttribute('
|
|
18093
|
+
element.setAttribute('eko-user-highlight-id', `eko-highlight-${index}`);
|
|
18021
18094
|
return index + 1;
|
|
18022
18095
|
}
|
|
18023
18096
|
// Helper function to generate XPath as a tree
|
|
@@ -18388,6 +18461,9 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18388
18461
|
}
|
|
18389
18462
|
async input_text(agentContext, index, text, enter) {
|
|
18390
18463
|
await this.execute_script(agentContext, typing, [{ index, text, enter }]);
|
|
18464
|
+
if (enter) {
|
|
18465
|
+
await sleep(200);
|
|
18466
|
+
}
|
|
18391
18467
|
}
|
|
18392
18468
|
async click_element(agentContext, index, num_clicks, button) {
|
|
18393
18469
|
await this.execute_script(agentContext, do_click, [
|
|
@@ -18562,15 +18638,22 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18562
18638
|
properties: {
|
|
18563
18639
|
amount: {
|
|
18564
18640
|
type: "number",
|
|
18565
|
-
description: "Scroll amount (
|
|
18566
|
-
minimum:
|
|
18641
|
+
description: "Scroll amount (up / down)",
|
|
18642
|
+
minimum: 1,
|
|
18567
18643
|
maximum: 10,
|
|
18568
18644
|
},
|
|
18645
|
+
direction: {
|
|
18646
|
+
type: "string",
|
|
18647
|
+
enum: ["up", "down"],
|
|
18648
|
+
},
|
|
18569
18649
|
},
|
|
18570
|
-
required: ["amount"],
|
|
18650
|
+
required: ["amount", "direction"],
|
|
18571
18651
|
},
|
|
18572
18652
|
execute: async (args, agentContext) => {
|
|
18573
|
-
return await this.callInnerTool(() =>
|
|
18653
|
+
return await this.callInnerTool(async () => {
|
|
18654
|
+
let amount = args.amount;
|
|
18655
|
+
await this.scroll_mouse_wheel(agentContext, args.direction == "up" ? -amount : amount);
|
|
18656
|
+
});
|
|
18574
18657
|
},
|
|
18575
18658
|
},
|
|
18576
18659
|
{
|
|
@@ -18609,22 +18692,23 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18609
18692
|
properties: {
|
|
18610
18693
|
duration: {
|
|
18611
18694
|
type: "number",
|
|
18612
|
-
description: "Duration in
|
|
18613
|
-
default:
|
|
18695
|
+
description: "Duration in millisecond",
|
|
18696
|
+
default: 500,
|
|
18697
|
+
minimum: 200,
|
|
18698
|
+
maximum: 2000,
|
|
18614
18699
|
},
|
|
18615
18700
|
},
|
|
18616
18701
|
required: ["duration"],
|
|
18617
18702
|
},
|
|
18618
18703
|
execute: async (args, agentContext) => {
|
|
18619
|
-
return await this.callInnerTool(() => sleep((args.duration ||
|
|
18704
|
+
return await this.callInnerTool(() => sleep((args.duration || 200)));
|
|
18620
18705
|
},
|
|
18621
18706
|
},
|
|
18622
18707
|
];
|
|
18623
18708
|
}
|
|
18624
18709
|
async handleMessages(agentContext, messages) {
|
|
18625
|
-
let
|
|
18626
|
-
if (
|
|
18627
|
-
lastMessage.content.filter((t) => t.type == "tool-result").length > 0) {
|
|
18710
|
+
let lastTool = this.lastToolResult(messages);
|
|
18711
|
+
if (lastTool && lastTool.toolName !== "extract_content") {
|
|
18628
18712
|
await sleep(200);
|
|
18629
18713
|
let result = await this.screenshot_and_html(agentContext);
|
|
18630
18714
|
let image = toImage(result.imageBase64);
|
|
@@ -18682,6 +18766,10 @@ function typing(params) {
|
|
|
18682
18766
|
}
|
|
18683
18767
|
else {
|
|
18684
18768
|
input.value = text;
|
|
18769
|
+
if (input.__proto__) {
|
|
18770
|
+
let value_setter = Object.getOwnPropertyDescriptor(input.__proto__, "value")?.set;
|
|
18771
|
+
value_setter && value_setter.call(input, text);
|
|
18772
|
+
}
|
|
18685
18773
|
}
|
|
18686
18774
|
input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
18687
18775
|
if (enter) {
|
|
@@ -18762,7 +18850,7 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
18762
18850
|
tools: _tools_,
|
|
18763
18851
|
llms: llms,
|
|
18764
18852
|
mcpClient: mcpClient,
|
|
18765
|
-
planDescription: "Browser operation agent, interact with the browser using the mouse and keyboard."
|
|
18853
|
+
planDescription: "Browser operation agent, interact with the browser using the mouse and keyboard.",
|
|
18766
18854
|
});
|
|
18767
18855
|
let init_tools = this.buildInitTools();
|
|
18768
18856
|
if (ext_tools && ext_tools.length > 0) {
|
|
@@ -18890,15 +18978,22 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
18890
18978
|
properties: {
|
|
18891
18979
|
amount: {
|
|
18892
18980
|
type: "number",
|
|
18893
|
-
description: "Scroll amount (
|
|
18894
|
-
minimum:
|
|
18981
|
+
description: "Scroll amount (up / down)",
|
|
18982
|
+
minimum: 1,
|
|
18895
18983
|
maximum: 10,
|
|
18896
18984
|
},
|
|
18985
|
+
direction: {
|
|
18986
|
+
type: "string",
|
|
18987
|
+
enum: ["up", "down"],
|
|
18988
|
+
},
|
|
18897
18989
|
},
|
|
18898
|
-
required: ["amount"],
|
|
18990
|
+
required: ["amount", "direction"],
|
|
18899
18991
|
},
|
|
18900
18992
|
execute: async (args, agentContext) => {
|
|
18901
|
-
return await this.callInnerTool(() =>
|
|
18993
|
+
return await this.callInnerTool(async () => {
|
|
18994
|
+
let amount = args.amount;
|
|
18995
|
+
await this.scroll(agentContext, args.direction == "up" ? -amount : amount);
|
|
18996
|
+
});
|
|
18902
18997
|
},
|
|
18903
18998
|
},
|
|
18904
18999
|
{
|
|
@@ -18967,22 +19062,23 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
18967
19062
|
properties: {
|
|
18968
19063
|
duration: {
|
|
18969
19064
|
type: "number",
|
|
18970
|
-
description: "Duration in
|
|
18971
|
-
default:
|
|
19065
|
+
description: "Duration in millisecond",
|
|
19066
|
+
default: 500,
|
|
19067
|
+
minimum: 200,
|
|
19068
|
+
maximum: 2000,
|
|
18972
19069
|
},
|
|
18973
19070
|
},
|
|
18974
19071
|
required: ["duration"],
|
|
18975
19072
|
},
|
|
18976
19073
|
execute: async (args, agentContext) => {
|
|
18977
|
-
return await this.callInnerTool(() => sleep((args.duration ||
|
|
19074
|
+
return await this.callInnerTool(() => sleep((args.duration || 200)));
|
|
18978
19075
|
},
|
|
18979
19076
|
},
|
|
18980
19077
|
];
|
|
18981
19078
|
}
|
|
18982
19079
|
async handleMessages(agentContext, messages) {
|
|
18983
|
-
let
|
|
18984
|
-
if (
|
|
18985
|
-
lastMessage.content.filter((t) => t.type == "tool-result").length > 0) {
|
|
19080
|
+
let lastTool = this.lastToolResult(messages);
|
|
19081
|
+
if (lastTool && lastTool.toolName !== "extract_content") {
|
|
18986
19082
|
await sleep(200);
|
|
18987
19083
|
let result = await this.screenshot(agentContext);
|
|
18988
19084
|
let image = toImage(result.imageBase64);
|
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const config = {
|
|
2
2
|
name: "Fellou",
|
|
3
3
|
platform: "mac",
|
|
4
|
-
maxReactNum: 100
|
|
4
|
+
maxReactNum: 100,
|
|
5
|
+
maxTokens: 16000
|
|
5
6
|
};
|
|
6
7
|
|
|
7
8
|
var LogLevel;
|
|
@@ -12728,7 +12729,7 @@ class RetryLanguageModel {
|
|
|
12728
12729
|
constructor(llms, names, stream_first_timeout) {
|
|
12729
12730
|
this.llms = llms;
|
|
12730
12731
|
this.names = names || [];
|
|
12731
|
-
this.stream_first_timeout = stream_first_timeout ||
|
|
12732
|
+
this.stream_first_timeout = stream_first_timeout || 30000;
|
|
12732
12733
|
if (this.names.indexOf("default") == -1) {
|
|
12733
12734
|
this.names.push("default");
|
|
12734
12735
|
}
|
|
@@ -12742,7 +12743,7 @@ class RetryLanguageModel {
|
|
|
12742
12743
|
toolChoice: request.toolChoice,
|
|
12743
12744
|
},
|
|
12744
12745
|
prompt: request.messages,
|
|
12745
|
-
maxTokens: request.maxTokens,
|
|
12746
|
+
maxTokens: request.maxTokens || config.maxTokens,
|
|
12746
12747
|
temperature: request.temperature,
|
|
12747
12748
|
topP: request.topP,
|
|
12748
12749
|
topK: request.topK,
|
|
@@ -12765,6 +12766,9 @@ class RetryLanguageModel {
|
|
|
12765
12766
|
return result;
|
|
12766
12767
|
}
|
|
12767
12768
|
catch (e) {
|
|
12769
|
+
if (e?.name === "AbortError") {
|
|
12770
|
+
throw e;
|
|
12771
|
+
}
|
|
12768
12772
|
if (Log.isEnableInfo()) {
|
|
12769
12773
|
Log.info(`LLM nonstream request, name: ${name} => `, {
|
|
12770
12774
|
tools: options.mode?.tools,
|
|
@@ -12785,7 +12789,7 @@ class RetryLanguageModel {
|
|
|
12785
12789
|
toolChoice: request.toolChoice,
|
|
12786
12790
|
},
|
|
12787
12791
|
prompt: request.messages,
|
|
12788
|
-
maxTokens: request.maxTokens,
|
|
12792
|
+
maxTokens: request.maxTokens || config.maxTokens,
|
|
12789
12793
|
temperature: request.temperature,
|
|
12790
12794
|
topP: request.topP,
|
|
12791
12795
|
topK: request.topK,
|
|
@@ -12826,6 +12830,9 @@ class RetryLanguageModel {
|
|
|
12826
12830
|
return result;
|
|
12827
12831
|
}
|
|
12828
12832
|
catch (e) {
|
|
12833
|
+
if (e?.name === "AbortError") {
|
|
12834
|
+
throw e;
|
|
12835
|
+
}
|
|
12829
12836
|
if (Log.isEnableInfo()) {
|
|
12830
12837
|
Log.info(`LLM stream request, name: ${name} => `, {
|
|
12831
12838
|
tools: options.mode?.tools,
|
|
@@ -16215,7 +16222,7 @@ class Agent {
|
|
|
16215
16222
|
nodeId: agentContext.agentChain.agent.id,
|
|
16216
16223
|
environment: config.platform,
|
|
16217
16224
|
agent_name: agentContext.agent.Name,
|
|
16218
|
-
}
|
|
16225
|
+
},
|
|
16219
16226
|
});
|
|
16220
16227
|
},
|
|
16221
16228
|
};
|
|
@@ -16287,12 +16294,17 @@ class Agent {
|
|
|
16287
16294
|
else if (!isError && text.length == 0) {
|
|
16288
16295
|
text = "Successful";
|
|
16289
16296
|
}
|
|
16290
|
-
let
|
|
16297
|
+
let contentText = {
|
|
16298
|
+
type: "text",
|
|
16299
|
+
text: text,
|
|
16300
|
+
};
|
|
16301
|
+
let result = text;
|
|
16291
16302
|
if (text &&
|
|
16292
16303
|
((text.startsWith("{") && text.endsWith("}")) ||
|
|
16293
16304
|
(text.startsWith("[") && text.endsWith("]")))) {
|
|
16294
16305
|
try {
|
|
16295
16306
|
result = JSON.parse(text);
|
|
16307
|
+
contentText = null;
|
|
16296
16308
|
}
|
|
16297
16309
|
catch (e) { }
|
|
16298
16310
|
}
|
|
@@ -16301,6 +16313,7 @@ class Agent {
|
|
|
16301
16313
|
toolCallId: toolUse.toolCallId,
|
|
16302
16314
|
toolName: toolUse.toolName,
|
|
16303
16315
|
result: result,
|
|
16316
|
+
content: contentText ? [contentText] : undefined,
|
|
16304
16317
|
isError: isError,
|
|
16305
16318
|
};
|
|
16306
16319
|
}
|
|
@@ -16794,7 +16807,7 @@ class Planner {
|
|
|
16794
16807
|
];
|
|
16795
16808
|
}
|
|
16796
16809
|
let request = {
|
|
16797
|
-
maxTokens:
|
|
16810
|
+
maxTokens: 4096,
|
|
16798
16811
|
temperature: 0.7,
|
|
16799
16812
|
messages: messages,
|
|
16800
16813
|
abortSignal: this.context.controller.signal,
|
|
@@ -16847,6 +16860,7 @@ class Planner {
|
|
|
16847
16860
|
workflow: workflow,
|
|
16848
16861
|
});
|
|
16849
16862
|
}
|
|
16863
|
+
workflow.taskPrompt = taskPrompt;
|
|
16850
16864
|
return workflow;
|
|
16851
16865
|
}
|
|
16852
16866
|
}
|
|
@@ -16897,7 +16911,7 @@ class Eko {
|
|
|
16897
16911
|
throw new Error("The task does not exist");
|
|
16898
16912
|
}
|
|
16899
16913
|
try {
|
|
16900
|
-
return this.doRunWorkflow(context);
|
|
16914
|
+
return await this.doRunWorkflow(context);
|
|
16901
16915
|
}
|
|
16902
16916
|
catch (e) {
|
|
16903
16917
|
return {
|
|
@@ -16914,6 +16928,21 @@ class Eko {
|
|
|
16914
16928
|
await this.generate(taskPrompt, taskId, contextParams);
|
|
16915
16929
|
return await this.execute(taskId);
|
|
16916
16930
|
}
|
|
16931
|
+
async initContext(workflow, contextParams) {
|
|
16932
|
+
const agents = this.config.agents || [];
|
|
16933
|
+
let chain = new Chain(workflow.taskPrompt || workflow.name);
|
|
16934
|
+
let context = new Context(workflow.taskId, this.config, agents, chain);
|
|
16935
|
+
if (this.config.a2aClient) {
|
|
16936
|
+
let a2aList = await this.config.a2aClient.listAgents(workflow.taskPrompt || workflow.name);
|
|
16937
|
+
context.agents = mergeAgents(context.agents, a2aList);
|
|
16938
|
+
}
|
|
16939
|
+
if (contextParams) {
|
|
16940
|
+
Object.keys(contextParams).forEach((key) => context.variables.set(key, contextParams[key]));
|
|
16941
|
+
}
|
|
16942
|
+
context.workflow = workflow;
|
|
16943
|
+
this.taskMap.set(workflow.taskId, context);
|
|
16944
|
+
return context;
|
|
16945
|
+
}
|
|
16917
16946
|
async doRunWorkflow(context) {
|
|
16918
16947
|
let agents = context.agents;
|
|
16919
16948
|
let workflow = context.workflow;
|
|
@@ -16947,6 +16976,9 @@ class Eko {
|
|
|
16947
16976
|
getTask(taskId) {
|
|
16948
16977
|
return this.taskMap.get(taskId);
|
|
16949
16978
|
}
|
|
16979
|
+
getAllTaskId() {
|
|
16980
|
+
return [...this.taskMap.keys()];
|
|
16981
|
+
}
|
|
16950
16982
|
deleteTask(taskId) {
|
|
16951
16983
|
return this.taskMap.delete(taskId);
|
|
16952
16984
|
}
|
|
@@ -17598,14 +17630,16 @@ class BaseComputerAgent extends Agent {
|
|
|
17598
17630
|
properties: {
|
|
17599
17631
|
duration: {
|
|
17600
17632
|
type: "number",
|
|
17601
|
-
description: "Duration in
|
|
17602
|
-
default:
|
|
17633
|
+
description: "Duration in millisecond",
|
|
17634
|
+
default: 500,
|
|
17635
|
+
minimum: 200,
|
|
17636
|
+
maximum: 2000,
|
|
17603
17637
|
},
|
|
17604
17638
|
},
|
|
17605
17639
|
required: ["duration"],
|
|
17606
17640
|
},
|
|
17607
17641
|
execute: async (args, agentContext) => {
|
|
17608
|
-
return await this.callInnerTool(() => sleep((args.duration ||
|
|
17642
|
+
return await this.callInnerTool(() => sleep((args.duration || 200)));
|
|
17609
17643
|
},
|
|
17610
17644
|
},
|
|
17611
17645
|
];
|
|
@@ -17649,10 +17683,13 @@ class BaseComputerAgent extends Agent {
|
|
|
17649
17683
|
|
|
17650
17684
|
class BaseBrowserAgent extends Agent {
|
|
17651
17685
|
async go_back(agentContext) {
|
|
17652
|
-
|
|
17653
|
-
|
|
17654
|
-
|
|
17655
|
-
|
|
17686
|
+
try {
|
|
17687
|
+
await this.execute_script(agentContext, () => {
|
|
17688
|
+
return window.navigation.back();
|
|
17689
|
+
}, []);
|
|
17690
|
+
await sleep(100);
|
|
17691
|
+
}
|
|
17692
|
+
catch (e) { }
|
|
17656
17693
|
}
|
|
17657
17694
|
async extract_content(agentContext) {
|
|
17658
17695
|
let content = await this.execute_script(agentContext, () => {
|
|
@@ -17688,7 +17725,7 @@ class BaseBrowserAgent extends Agent {
|
|
|
17688
17725
|
environment: "browser",
|
|
17689
17726
|
agent_name: agentContext.agent.Name,
|
|
17690
17727
|
browser_url: agentContext.variables.get("lastUrl"),
|
|
17691
|
-
}
|
|
17728
|
+
},
|
|
17692
17729
|
});
|
|
17693
17730
|
if (result.extInfo &&
|
|
17694
17731
|
result.extInfo["javascript"] &&
|
|
@@ -17728,6 +17765,42 @@ class BaseBrowserAgent extends Agent {
|
|
|
17728
17765
|
};
|
|
17729
17766
|
}, []);
|
|
17730
17767
|
}
|
|
17768
|
+
lastToolResult(messages) {
|
|
17769
|
+
let lastMessage = messages[messages.length - 1];
|
|
17770
|
+
if (lastMessage.role != "tool") {
|
|
17771
|
+
return null;
|
|
17772
|
+
}
|
|
17773
|
+
let toolResult = lastMessage.content.filter((t) => t.type == "tool-result")[0];
|
|
17774
|
+
if (!toolResult) {
|
|
17775
|
+
return null;
|
|
17776
|
+
}
|
|
17777
|
+
let result = toolResult.result;
|
|
17778
|
+
let isError = toolResult.isError;
|
|
17779
|
+
for (let i = messages.length - 2; i > 0; i--) {
|
|
17780
|
+
if (messages[i].role !== "assistant" ||
|
|
17781
|
+
typeof messages[i].content == "string") {
|
|
17782
|
+
continue;
|
|
17783
|
+
}
|
|
17784
|
+
for (let j = 0; j < messages[i].content.length; j++) {
|
|
17785
|
+
let content = messages[i].content[j];
|
|
17786
|
+
if (typeof content !== "string" && content.type !== "tool-call") {
|
|
17787
|
+
continue;
|
|
17788
|
+
}
|
|
17789
|
+
let toolUse = content;
|
|
17790
|
+
if (toolResult.toolCallId != toolUse.toolCallId) {
|
|
17791
|
+
continue;
|
|
17792
|
+
}
|
|
17793
|
+
return {
|
|
17794
|
+
id: toolResult.toolCallId,
|
|
17795
|
+
toolName: toolUse.toolName,
|
|
17796
|
+
args: toolUse.args,
|
|
17797
|
+
result,
|
|
17798
|
+
isError,
|
|
17799
|
+
};
|
|
17800
|
+
}
|
|
17801
|
+
}
|
|
17802
|
+
return null;
|
|
17803
|
+
}
|
|
17731
17804
|
async execute_mcp_script(agentContext, script) {
|
|
17732
17805
|
return;
|
|
17733
17806
|
}
|
|
@@ -17754,7 +17827,7 @@ function run_build_dom_tree() {
|
|
|
17754
17827
|
return window.clickable_elements[highlightIndex];
|
|
17755
17828
|
}
|
|
17756
17829
|
function remove_highlight() {
|
|
17757
|
-
let highlight = document.getElementById('
|
|
17830
|
+
let highlight = document.getElementById('eko-highlight-container');
|
|
17758
17831
|
if (highlight) {
|
|
17759
17832
|
highlight.remove();
|
|
17760
17833
|
}
|
|
@@ -17892,10 +17965,10 @@ function run_build_dom_tree() {
|
|
|
17892
17965
|
let highlightIndex = 0; // Reset highlight index
|
|
17893
17966
|
function highlightElement(element, index, parentIframe = null) {
|
|
17894
17967
|
// Create or get highlight container
|
|
17895
|
-
let container = document.getElementById('
|
|
17968
|
+
let container = document.getElementById('eko-highlight-container');
|
|
17896
17969
|
if (!container) {
|
|
17897
17970
|
container = document.createElement('div');
|
|
17898
|
-
container.id = '
|
|
17971
|
+
container.id = 'eko-highlight-container';
|
|
17899
17972
|
container.style.position = 'fixed';
|
|
17900
17973
|
container.style.pointerEvents = 'none';
|
|
17901
17974
|
container.style.top = '0';
|
|
@@ -17948,7 +18021,7 @@ function run_build_dom_tree() {
|
|
|
17948
18021
|
overlay.style.height = `${rect.height}px`;
|
|
17949
18022
|
// Create label
|
|
17950
18023
|
const label = document.createElement('div');
|
|
17951
|
-
label.className = '
|
|
18024
|
+
label.className = 'eko-highlight-label';
|
|
17952
18025
|
label.style.position = 'absolute';
|
|
17953
18026
|
label.style.background = baseColor;
|
|
17954
18027
|
label.style.color = 'white';
|
|
@@ -17982,7 +18055,7 @@ function run_build_dom_tree() {
|
|
|
17982
18055
|
container.appendChild(overlay);
|
|
17983
18056
|
container.appendChild(label);
|
|
17984
18057
|
// Store reference for cleanup
|
|
17985
|
-
element.setAttribute('
|
|
18058
|
+
element.setAttribute('eko-user-highlight-id', `eko-highlight-${index}`);
|
|
17986
18059
|
return index + 1;
|
|
17987
18060
|
}
|
|
17988
18061
|
// Helper function to generate XPath as a tree
|
|
@@ -18353,6 +18426,9 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18353
18426
|
}
|
|
18354
18427
|
async input_text(agentContext, index, text, enter) {
|
|
18355
18428
|
await this.execute_script(agentContext, typing, [{ index, text, enter }]);
|
|
18429
|
+
if (enter) {
|
|
18430
|
+
await sleep(200);
|
|
18431
|
+
}
|
|
18356
18432
|
}
|
|
18357
18433
|
async click_element(agentContext, index, num_clicks, button) {
|
|
18358
18434
|
await this.execute_script(agentContext, do_click, [
|
|
@@ -18527,15 +18603,22 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18527
18603
|
properties: {
|
|
18528
18604
|
amount: {
|
|
18529
18605
|
type: "number",
|
|
18530
|
-
description: "Scroll amount (
|
|
18531
|
-
minimum:
|
|
18606
|
+
description: "Scroll amount (up / down)",
|
|
18607
|
+
minimum: 1,
|
|
18532
18608
|
maximum: 10,
|
|
18533
18609
|
},
|
|
18610
|
+
direction: {
|
|
18611
|
+
type: "string",
|
|
18612
|
+
enum: ["up", "down"],
|
|
18613
|
+
},
|
|
18534
18614
|
},
|
|
18535
|
-
required: ["amount"],
|
|
18615
|
+
required: ["amount", "direction"],
|
|
18536
18616
|
},
|
|
18537
18617
|
execute: async (args, agentContext) => {
|
|
18538
|
-
return await this.callInnerTool(() =>
|
|
18618
|
+
return await this.callInnerTool(async () => {
|
|
18619
|
+
let amount = args.amount;
|
|
18620
|
+
await this.scroll_mouse_wheel(agentContext, args.direction == "up" ? -amount : amount);
|
|
18621
|
+
});
|
|
18539
18622
|
},
|
|
18540
18623
|
},
|
|
18541
18624
|
{
|
|
@@ -18574,22 +18657,23 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
|
|
|
18574
18657
|
properties: {
|
|
18575
18658
|
duration: {
|
|
18576
18659
|
type: "number",
|
|
18577
|
-
description: "Duration in
|
|
18578
|
-
default:
|
|
18660
|
+
description: "Duration in millisecond",
|
|
18661
|
+
default: 500,
|
|
18662
|
+
minimum: 200,
|
|
18663
|
+
maximum: 2000,
|
|
18579
18664
|
},
|
|
18580
18665
|
},
|
|
18581
18666
|
required: ["duration"],
|
|
18582
18667
|
},
|
|
18583
18668
|
execute: async (args, agentContext) => {
|
|
18584
|
-
return await this.callInnerTool(() => sleep((args.duration ||
|
|
18669
|
+
return await this.callInnerTool(() => sleep((args.duration || 200)));
|
|
18585
18670
|
},
|
|
18586
18671
|
},
|
|
18587
18672
|
];
|
|
18588
18673
|
}
|
|
18589
18674
|
async handleMessages(agentContext, messages) {
|
|
18590
|
-
let
|
|
18591
|
-
if (
|
|
18592
|
-
lastMessage.content.filter((t) => t.type == "tool-result").length > 0) {
|
|
18675
|
+
let lastTool = this.lastToolResult(messages);
|
|
18676
|
+
if (lastTool && lastTool.toolName !== "extract_content") {
|
|
18593
18677
|
await sleep(200);
|
|
18594
18678
|
let result = await this.screenshot_and_html(agentContext);
|
|
18595
18679
|
let image = toImage(result.imageBase64);
|
|
@@ -18647,6 +18731,10 @@ function typing(params) {
|
|
|
18647
18731
|
}
|
|
18648
18732
|
else {
|
|
18649
18733
|
input.value = text;
|
|
18734
|
+
if (input.__proto__) {
|
|
18735
|
+
let value_setter = Object.getOwnPropertyDescriptor(input.__proto__, "value")?.set;
|
|
18736
|
+
value_setter && value_setter.call(input, text);
|
|
18737
|
+
}
|
|
18650
18738
|
}
|
|
18651
18739
|
input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
18652
18740
|
if (enter) {
|
|
@@ -18727,7 +18815,7 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
18727
18815
|
tools: _tools_,
|
|
18728
18816
|
llms: llms,
|
|
18729
18817
|
mcpClient: mcpClient,
|
|
18730
|
-
planDescription: "Browser operation agent, interact with the browser using the mouse and keyboard."
|
|
18818
|
+
planDescription: "Browser operation agent, interact with the browser using the mouse and keyboard.",
|
|
18731
18819
|
});
|
|
18732
18820
|
let init_tools = this.buildInitTools();
|
|
18733
18821
|
if (ext_tools && ext_tools.length > 0) {
|
|
@@ -18855,15 +18943,22 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
18855
18943
|
properties: {
|
|
18856
18944
|
amount: {
|
|
18857
18945
|
type: "number",
|
|
18858
|
-
description: "Scroll amount (
|
|
18859
|
-
minimum:
|
|
18946
|
+
description: "Scroll amount (up / down)",
|
|
18947
|
+
minimum: 1,
|
|
18860
18948
|
maximum: 10,
|
|
18861
18949
|
},
|
|
18950
|
+
direction: {
|
|
18951
|
+
type: "string",
|
|
18952
|
+
enum: ["up", "down"],
|
|
18953
|
+
},
|
|
18862
18954
|
},
|
|
18863
|
-
required: ["amount"],
|
|
18955
|
+
required: ["amount", "direction"],
|
|
18864
18956
|
},
|
|
18865
18957
|
execute: async (args, agentContext) => {
|
|
18866
|
-
return await this.callInnerTool(() =>
|
|
18958
|
+
return await this.callInnerTool(async () => {
|
|
18959
|
+
let amount = args.amount;
|
|
18960
|
+
await this.scroll(agentContext, args.direction == "up" ? -amount : amount);
|
|
18961
|
+
});
|
|
18867
18962
|
},
|
|
18868
18963
|
},
|
|
18869
18964
|
{
|
|
@@ -18932,22 +19027,23 @@ class BaseBrowserScreenAgent extends BaseBrowserAgent {
|
|
|
18932
19027
|
properties: {
|
|
18933
19028
|
duration: {
|
|
18934
19029
|
type: "number",
|
|
18935
|
-
description: "Duration in
|
|
18936
|
-
default:
|
|
19030
|
+
description: "Duration in millisecond",
|
|
19031
|
+
default: 500,
|
|
19032
|
+
minimum: 200,
|
|
19033
|
+
maximum: 2000,
|
|
18937
19034
|
},
|
|
18938
19035
|
},
|
|
18939
19036
|
required: ["duration"],
|
|
18940
19037
|
},
|
|
18941
19038
|
execute: async (args, agentContext) => {
|
|
18942
|
-
return await this.callInnerTool(() => sleep((args.duration ||
|
|
19039
|
+
return await this.callInnerTool(() => sleep((args.duration || 200)));
|
|
18943
19040
|
},
|
|
18944
19041
|
},
|
|
18945
19042
|
];
|
|
18946
19043
|
}
|
|
18947
19044
|
async handleMessages(agentContext, messages) {
|
|
18948
|
-
let
|
|
18949
|
-
if (
|
|
18950
|
-
lastMessage.content.filter((t) => t.type == "tool-result").length > 0) {
|
|
19045
|
+
let lastTool = this.lastToolResult(messages);
|
|
19046
|
+
if (lastTool && lastTool.toolName !== "extract_content") {
|
|
18951
19047
|
await sleep(200);
|
|
18952
19048
|
let result = await this.screenshot(agentContext);
|
|
18953
19049
|
let image = toImage(result.imageBase64);
|
package/dist/llm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/llm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,0BAA0B,EAE3B,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/llm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,0BAA0B,EAE3B,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EACL,cAAc,EACd,UAAU,EACV,IAAI,EACJ,YAAY,EACb,MAAM,oBAAoB,CAAC;AAE5B,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,IAAI,CAAO;IACnB,OAAO,CAAC,KAAK,CAAW;IACxB,OAAO,CAAC,oBAAoB,CAAS;gBAEzB,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,oBAAoB,CAAC,EAAE,MAAM;IASjE,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC;IAkBlD,UAAU,CACd,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,cAAc,CAAC;IAgCpB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC;IAkBtD,QAAQ,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,YAAY,CAAC;IAsD1E,OAAO,CAAC,MAAM;IAoCd,OAAO,CAAC,aAAa;CA0BtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.types.d.ts","sourceRoot":"","sources":["../../src/types/core.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,IAA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