@eko-ai/eko 2.1.9-alpha.3 → 2.2.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.
package/dist/index.esm.js CHANGED
@@ -18466,7 +18466,7 @@ During the task execution process, you can use the \`${TOOL_NAME$3}\` tool to in
18466
18466
  `;
18467
18467
  const VARIABLE_PROMPT = `
18468
18468
  * VARIABLE STORAGE
18469
- If you need to read and write the input/output variables in the node, require the use of the \`${TOOL_NAME$1}\` tool.
18469
+ When a step node has input/output variable attributes, use the \`${TOOL_NAME$1}\` tool to read from and write to these variables, these variables enable context sharing and coordination between multiple agents.
18470
18470
  `;
18471
18471
  const FOR_EACH_NODE = `
18472
18472
  <!-- duplicate task node, items support list and variable -->
@@ -21218,7 +21218,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
21218
21218
  constructor(llms, ext_tools, mcpClient) {
21219
21219
  const description = `You are a browser operation agent, use structured commands to interact with the browser.
21220
21220
  * This is a browser GUI interface where you need to analyze webpages by taking screenshot and page element structures, and specify action sequences to complete designated tasks.
21221
- * For the first visit, please call the \`navigate_to\` or \`current_page\` tool first. After that, each of your actions will return a screenshot of the page and structured element information, both of which have been specially processed.
21221
+ * For your first visit, please start by calling either the \`navigate_to\` or \`current_page\` tool. After each action you perform, I will provide you with updated information about the current state, including page screenshots and structured element data that has been specially processed for easier analysis.
21222
21222
  * Screenshot description:
21223
21223
  - Screenshot are used to understand page layouts, with labeled bounding boxes corresponding to element indexes. Each bounding box and its label share the same color, with labels typically positioned in the top-right corner of the box.
21224
21224
  - Screenshot help verify element positions and relationships. Labels may sometimes overlap, so extracted elements are used to verify the correct elements.
@@ -21236,7 +21236,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
21236
21236
  - Handle popups/cookies by accepting or closing them
21237
21237
  * BROWSER OPERATION:
21238
21238
  - Use scroll to find elements you are looking for, When extracting content, prioritize using extract_page_content, only scroll when you need to load more content
21239
- * During execution, please output user-friendly step information. Do not output element and index information to users, as this would cause user confusion.
21239
+ * During execution, please output user-friendly step information. Do not output HTML-related element and index information to users, as this would cause user confusion.
21240
21240
  `;
21241
21241
  const _tools_ = [];
21242
21242
  super({
@@ -21620,7 +21620,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
21620
21620
  return true;
21621
21621
  }
21622
21622
  async handleMessages(agentContext, messages, tools) {
21623
- const pseudoHtmlDescription = "This is the latest screenshot and page element information.\nindex and element:\n";
21623
+ const pseudoHtmlDescription = "This is the environmental information after the operation, including the latest browser screenshot and page elements. Please perform the next operation based on the environmental information. Do not output the following elements and index information in your response.\n\nIndex and elements:\n";
21624
21624
  let lastTool = this.lastToolResult(messages);
21625
21625
  if (lastTool &&
21626
21626
  lastTool.toolName !== "extract_page_content" &&
@@ -21650,7 +21650,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
21650
21650
  ...image_contents,
21651
21651
  {
21652
21652
  type: "text",
21653
- text: pseudoHtmlDescription + result.pseudoHtml,
21653
+ text: pseudoHtmlDescription + "```html\n" + result.pseudoHtml + "\n```",
21654
21654
  },
21655
21655
  ],
21656
21656
  });