@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.
package/dist/index.esm.js CHANGED
@@ -35301,7 +35301,7 @@ During the task execution process, you can use the \`${TOOL_NAME$5}\` tool to in
35301
35301
  const VARIABLE_PROMPT = `
35302
35302
  * VARIABLE STORAGE
35303
35303
  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.
35304
- \`${TOOL_NAME$3}\` tool does not support parallel processing.
35304
+ The \`${TOOL_NAME$3}\` tool does not support parallel calls.
35305
35305
  `;
35306
35306
  const FOR_EACH_NODE = `
35307
35307
  <!-- duplicate task node, items support list and variable -->
@@ -35362,9 +35362,9 @@ function getAgentSystemPrompt(agent, agentNode, context, tools, extSysPrompt) {
35362
35362
  prompt += "\n Main task: " + context.chain.taskPrompt;
35363
35363
  prompt += "\n\n# Pre-task execution results";
35364
35364
  for (let i = 0; i < context.chain.agents.length; i++) {
35365
- let agentChain = context.chain.agents[i];
35365
+ const agentChain = context.chain.agents[i];
35366
35366
  if (agentChain.agentResult) {
35367
- prompt += `\n## ${agentChain.agent.task || agentChain.agent.name}\n${sub(agentChain.agentResult, 800, true)}`;
35367
+ prompt += `\n## ${agentChain.agent.task || agentChain.agent.name}\n<taskResult>\n${sub(agentChain.agentResult, 600, true)}\n</taskResult>`;
35368
35368
  }
35369
35369
  }
35370
35370
  }
@@ -35377,7 +35377,7 @@ function getAgentSystemPrompt(agent, agentNode, context, tools, extSysPrompt) {
35377
35377
  .trim();
35378
35378
  sysPrompt += "\n";
35379
35379
  if (agent.canParallelToolCalls()) {
35380
- 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.";
35380
+ 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.";
35381
35381
  }
35382
35382
  sysPrompt += "\nThe output language should follow the language corresponding to the user's task.";
35383
35383
  return sysPrompt;
@@ -35483,6 +35483,10 @@ class Agent {
35483
35483
  const user_messages = [];
35484
35484
  const toolResults = [];
35485
35485
  // results = memory.removeDuplicateToolUse(results);
35486
+ messages.push({
35487
+ role: "assistant",
35488
+ content: results,
35489
+ });
35486
35490
  if (results.length == 0) {
35487
35491
  return null;
35488
35492
  }
@@ -35503,10 +35507,6 @@ class Agent {
35503
35507
  toolResults.push(toolResult);
35504
35508
  }
35505
35509
  }
35506
- messages.push({
35507
- role: "assistant",
35508
- content: results,
35509
- });
35510
35510
  if (toolResults.length > 0) {
35511
35511
  messages.push({
35512
35512
  role: "tool",
@@ -37168,7 +37168,9 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
37168
37168
  if (config$1.parallelToolCalls) {
37169
37169
  description += `
37170
37170
  * Parallelism:
37171
- - 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.
37171
+ - Do not call the navigate_to tool simultaneously
37172
+ - Operations that support parallelism generally only include clicking and input operations
37173
+ - When filling out a form, fields that are not dependent on each other should be filled simultaneously
37172
37174
  - 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.`;
37173
37175
  }
37174
37176
  const _tools_ = [];