@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.cjs.js CHANGED
@@ -18501,7 +18501,7 @@ During the task execution process, you can use the \`${TOOL_NAME$3}\` tool to in
18501
18501
  `;
18502
18502
  const VARIABLE_PROMPT = `
18503
18503
  * VARIABLE STORAGE
18504
- If you need to read and write the input/output variables in the node, require the use of the \`${TOOL_NAME$1}\` tool.
18504
+ 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.
18505
18505
  `;
18506
18506
  const FOR_EACH_NODE = `
18507
18507
  <!-- duplicate task node, items support list and variable -->
@@ -21253,7 +21253,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
21253
21253
  constructor(llms, ext_tools, mcpClient) {
21254
21254
  const description = `You are a browser operation agent, use structured commands to interact with the browser.
21255
21255
  * 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.
21256
- * 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.
21256
+ * 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.
21257
21257
  * Screenshot description:
21258
21258
  - 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.
21259
21259
  - Screenshot help verify element positions and relationships. Labels may sometimes overlap, so extracted elements are used to verify the correct elements.
@@ -21271,7 +21271,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
21271
21271
  - Handle popups/cookies by accepting or closing them
21272
21272
  * BROWSER OPERATION:
21273
21273
  - 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
21274
- * During execution, please output user-friendly step information. Do not output element and index information to users, as this would cause user confusion.
21274
+ * 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.
21275
21275
  `;
21276
21276
  const _tools_ = [];
21277
21277
  super({
@@ -21655,7 +21655,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
21655
21655
  return true;
21656
21656
  }
21657
21657
  async handleMessages(agentContext, messages, tools) {
21658
- const pseudoHtmlDescription = "This is the latest screenshot and page element information.\nindex and element:\n";
21658
+ 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";
21659
21659
  let lastTool = this.lastToolResult(messages);
21660
21660
  if (lastTool &&
21661
21661
  lastTool.toolName !== "extract_page_content" &&
@@ -21685,7 +21685,7 @@ class BaseBrowserLabelsAgent extends BaseBrowserAgent {
21685
21685
  ...image_contents,
21686
21686
  {
21687
21687
  type: "text",
21688
- text: pseudoHtmlDescription + result.pseudoHtml,
21688
+ text: pseudoHtmlDescription + "```html\n" + result.pseudoHtml + "\n```",
21689
21689
  },
21690
21690
  ],
21691
21691
  });