@eko-ai/eko 3.0.6 → 3.0.7

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 +1 @@
1
- {"version":3,"file":"browser_labels.d.ts","sourceRoot":"","sources":["../../../src/agent/browser/browser_labels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAc,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EACL,qBAAqB,EAErB,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAc,UAAU,EAAE,MAAM,aAAa,CAAC;AAG3D,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;cAkDvD,UAAU,CACxB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,GAAG,CAAC;cAOC,aAAa,CAC3B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAClC,OAAO,CAAC,GAAG,CAAC;cAMC,iBAAiB,CAC/B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC;cAaA,kBAAkB,CAChC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,OAAO,GAC5B,OAAO,CAAC,GAAG,CAAC;cAkCC,gBAAgB,CAC9B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC;c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CAAC,SAAS,CAAC,EAAE,2BAA2B,EAAE,GAAG,OAAO;IAiB/E,OAAO,CAAC,cAAc;cAuUN,kBAAkB,CAChC,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,qBAAqB,EAC/B,KAAK,EAAE,IAAI,EAAE,GACZ,OAAO,CAAC,OAAO,CAAC;cAIH,cAAc,CAC5B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,qBAAqB,EAC/B,KAAK,EAAE,IAAI,EAAE,GACZ,OAAO,CAAC,IAAI,CAAC;IA2ChB,OAAO,CAAC,oBAAoB;IAkC5B,OAAO,CAAC,oBAAoB;CA0B7B;AA4SD,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -35336,7 +35336,7 @@ During the task execution process, you can use the \`${TOOL_NAME$5}\` tool to in
35336
35336
  const VARIABLE_PROMPT = `
35337
35337
  * VARIABLE STORAGE
35338
35338
  When a step node has input/output variable attributes, use the \`${TOOL_NAME$3}\` tool to read from and write to these variables, these variables enable context sharing and coordination between multiple agents.
35339
- \`${TOOL_NAME$3}\` tool does not support parallel processing.
35339
+ The \`${TOOL_NAME$3}\` tool does not support parallel calls.
35340
35340
  `;
35341
35341
  const FOR_EACH_NODE = `
35342
35342
  <!-- duplicate task node, items support list and variable -->
@@ -35397,9 +35397,9 @@ function getAgentSystemPrompt(agent, agentNode, context, tools, extSysPrompt) {
35397
35397
  prompt += "\n Main task: " + context.chain.taskPrompt;
35398
35398
  prompt += "\n\n# Pre-task execution results";
35399
35399
  for (let i = 0; i < context.chain.agents.length; i++) {
35400
- let agentChain = context.chain.agents[i];
35400
+ const agentChain = context.chain.agents[i];
35401
35401
  if (agentChain.agentResult) {
35402
- prompt += `\n## ${agentChain.agent.task || agentChain.agent.name}\n${sub(agentChain.agentResult, 800, true)}`;
35402
+ prompt += `\n## ${agentChain.agent.task || agentChain.agent.name}\n<taskResult>\n${sub(agentChain.agentResult, 600, true)}\n</taskResult>`;
35403
35403
  }
35404
35404
  }
35405
35405
  }
@@ -35412,7 +35412,7 @@ function getAgentSystemPrompt(agent, agentNode, context, tools, extSysPrompt) {
35412
35412
  .trim();
35413
35413
  sysPrompt += "\n";
35414
35414
  if (agent.canParallelToolCalls()) {
35415
- sysPrompt += "\nFor maximum efficiency, whenever you need to perform multiple independent operations, invoke all relevant tools simultaneously rather than sequentially. Parallel execution should only be used when operations are truly independent and won't cause conflicts or race conditions.";
35415
+ sysPrompt += "\nFor maximum efficiency, when executing multiple independent operations that do not depend on each other or conflict with one another, these tools can be called in parallel simultaneously.";
35416
35416
  }
35417
35417
  sysPrompt += "\nThe output language should follow the language corresponding to the user's task.";
35418
35418
  return sysPrompt;
@@ -35518,6 +35518,10 @@ class Agent {
35518
35518
  const user_messages = [];
35519
35519
  const toolResults = [];
35520
35520
  // results = memory.removeDuplicateToolUse(results);
35521
+ messages.push({
35522
+ role: "assistant",
35523
+ content: results,
35524
+ });
35521
35525
  if (results.length == 0) {
35522
35526
  return null;
35523
35527
  }
@@ -35538,10 +35542,6 @@ class Agent {
35538
35542
  toolResults.push(toolResult);
35539
35543
  }
35540
35544
  }
35541
- messages.push({
35542
- role: "assistant",
35543
- content: results,
35544
- });
35545
35545
  if (toolResults.length > 0) {
35546
35546
  messages.push({
35547
35547
  role: "tool",
@@ -37203,7 +37203,9 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
37203
37203
  if (config$1.parallelToolCalls) {
37204
37204
  description += `
37205
37205
  * Parallelism:
37206
- - When performing multiple independent steps, they should be executed in parallel whenever possible. For example, when filling out a form, fields that are not dependent on each other should be filled simultaneously.
37206
+ - Do not call the navigate_to tool simultaneously
37207
+ - Operations that support parallelism generally only include clicking and input operations
37208
+ - When filling out a form, fields that are not dependent on each other should be filled simultaneously
37207
37209
  - Avoid parallel processing for dependent operations, such as those that need to wait for page loading, DOM changes, redirects, subsequent operations that depend on the results of previous operations, or operations that may interfere with each other and affect the same page elements. In these cases, please do not use parallelization.`;
37208
37210
  }
37209
37211
  const _tools_ = [];