@agentium/browser 2.2.2 → 2.3.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 CHANGED
@@ -640,7 +640,7 @@ var BrowserProvider = class {
640
640
  return globalThis.__buaExtract(limit, 0, 0, "main");
641
641
  }, max);
642
642
  });
643
- let collected = mainResult.elements;
643
+ const collected = mainResult.elements;
644
644
  const scroll = mainResult.scroll;
645
645
  try {
646
646
  const frames = this.page.frames();
@@ -1228,9 +1228,7 @@ function buildSystemPrompt(viewport, extraInstructions, credentialKeys, options)
1228
1228
  `- A PNG screenshot of the same viewport at exactly ${viewport.width}\xD7${viewport.height} pixels. Use it for visual context (layout, icons, charts) when the DOM snapshot is ambiguous.`
1229
1229
  );
1230
1230
  } else {
1231
- lines.push(
1232
- `- (Vision is disabled \u2014 no screenshot. Rely entirely on the DOM snapshot and page text.)`
1233
- );
1231
+ lines.push(`- (Vision is disabled \u2014 no screenshot. Rely entirely on the DOM snapshot and page text.)`);
1234
1232
  }
1235
1233
  lines.push(
1236
1234
  `- A short list of your previous actions (so you don't repeat yourself).`,
@@ -1930,7 +1928,7 @@ ${memoryContext}` : memoryContext;
1930
1928
  try {
1931
1929
  json = JSON.parse(s);
1932
1930
  } catch {
1933
- const m = s.match(/[\[{][\s\S]*[\]}]/);
1931
+ const m = s.match(/[[{][\s\S]*[\]}]/);
1934
1932
  if (!m) return null;
1935
1933
  try {
1936
1934
  json = JSON.parse(m[0]);
@@ -2195,7 +2193,9 @@ ${pageText}`
2195
2193
  */
2196
2194
  extractClickKeyword(description) {
2197
2195
  if (!description) return void 0;
2198
- const match = description.match(/['"\u2018\u2019\u201C\u201D]([^'"\u2018\u2019\u201C\u201D]{1,80})['"\u2018\u2019\u201C\u201D]/);
2196
+ const match = description.match(
2197
+ /['"\u2018\u2019\u201C\u201D]([^'"\u2018\u2019\u201C\u201D]{1,80})['"\u2018\u2019\u201C\u201D]/
2198
+ );
2199
2199
  if (!match) return void 0;
2200
2200
  const keyword = match[1].trim();
2201
2201
  if (!keyword || keyword.length < 2) return void 0;
package/dist/index.js CHANGED
@@ -602,7 +602,7 @@ var BrowserProvider = class {
602
602
  return globalThis.__buaExtract(limit, 0, 0, "main");
603
603
  }, max);
604
604
  });
605
- let collected = mainResult.elements;
605
+ const collected = mainResult.elements;
606
606
  const scroll = mainResult.scroll;
607
607
  try {
608
608
  const frames = this.page.frames();
@@ -1190,9 +1190,7 @@ function buildSystemPrompt(viewport, extraInstructions, credentialKeys, options)
1190
1190
  `- A PNG screenshot of the same viewport at exactly ${viewport.width}\xD7${viewport.height} pixels. Use it for visual context (layout, icons, charts) when the DOM snapshot is ambiguous.`
1191
1191
  );
1192
1192
  } else {
1193
- lines.push(
1194
- `- (Vision is disabled \u2014 no screenshot. Rely entirely on the DOM snapshot and page text.)`
1195
- );
1193
+ lines.push(`- (Vision is disabled \u2014 no screenshot. Rely entirely on the DOM snapshot and page text.)`);
1196
1194
  }
1197
1195
  lines.push(
1198
1196
  `- A short list of your previous actions (so you don't repeat yourself).`,
@@ -1892,7 +1890,7 @@ ${memoryContext}` : memoryContext;
1892
1890
  try {
1893
1891
  json = JSON.parse(s);
1894
1892
  } catch {
1895
- const m = s.match(/[\[{][\s\S]*[\]}]/);
1893
+ const m = s.match(/[[{][\s\S]*[\]}]/);
1896
1894
  if (!m) return null;
1897
1895
  try {
1898
1896
  json = JSON.parse(m[0]);
@@ -2157,7 +2155,9 @@ ${pageText}`
2157
2155
  */
2158
2156
  extractClickKeyword(description) {
2159
2157
  if (!description) return void 0;
2160
- const match = description.match(/['"\u2018\u2019\u201C\u201D]([^'"\u2018\u2019\u201C\u201D]{1,80})['"\u2018\u2019\u201C\u201D]/);
2158
+ const match = description.match(
2159
+ /['"\u2018\u2019\u201C\u201D]([^'"\u2018\u2019\u201C\u201D]{1,80})['"\u2018\u2019\u201C\u201D]/
2160
+ );
2161
2161
  if (!match) return void 0;
2162
2162
  const keyword = match[1].trim();
2163
2163
  if (!keyword || keyword.length < 2) return void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentium/browser",
3
- "version": "2.2.2",
3
+ "version": "2.3.0",
4
4
  "description": "Browser automation agent for Agentium using Playwright",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -46,7 +46,7 @@
46
46
  "typescript": "^5.6.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@agentium/core": "^2.2.2",
49
+ "@agentium/core": "^2.3.0",
50
50
  "playwright": ">=1.40.0"
51
51
  },
52
52
  "peerDependenciesMeta": {