agentic-browser 2.7.0 → 2.7.1

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,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as isConnectionError, o as ensurePrivateDir, r as createCliRuntime, s as writePrivateFileSync } from "../runtime-CfQ0xGAm.mjs";
2
+ import { a as isConnectionError, o as ensurePrivateDir, r as createCliRuntime, s as writePrivateFileSync } from "../runtime-CnexYwrf.mjs";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import crypto from "node:crypto";
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export { t as AgenticBrowserCore, n as createAgenticBrowserCore, i as createMockAgenticBrowserCore } from "./runtime-CfQ0xGAm.mjs";
2
+ export { t as AgenticBrowserCore, n as createAgenticBrowserCore, i as createMockAgenticBrowserCore } from "./runtime-CnexYwrf.mjs";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as createAgenticBrowserCore } from "../runtime-CfQ0xGAm.mjs";
2
+ import { n as createAgenticBrowserCore } from "../runtime-CnexYwrf.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -1597,7 +1597,7 @@ var ChromeCdpBrowserController = class {
1597
1597
  if (result && typeof result === 'object' && typeof result.then === 'function') {
1598
1598
  result = await result;
1599
1599
  }
1600
- return typeof result === 'string' ? result : JSON.stringify(result);
1600
+ return result === undefined ? 'undefined' : JSON.stringify(result);
1601
1601
  }
1602
1602
  if (payload.action === 'scroll') {
1603
1603
  if (payload.selector) {
@@ -1631,7 +1631,8 @@ var ChromeCdpBrowserController = class {
1631
1631
  expression: scoped.action === "evaluate" ? `(async () => {
1632
1632
  const __agenticResult = await (${scoped.text ?? "undefined"}
1633
1633
  );
1634
- return typeof __agenticResult === 'string' ? __agenticResult : JSON.stringify(__agenticResult);
1634
+ // Always JSON-encode so strings like "42" or "" survive the round trip as strings.
1635
+ return __agenticResult === undefined ? 'undefined' : JSON.stringify(__agenticResult);
1635
1636
  })()` : buildExpression(scoped),
1636
1637
  returnByValue: true,
1637
1638
  awaitPromise: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-browser",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "CLI and MCP server for AI agents to control Chrome via CDP",
5
5
  "keywords": [
6
6
  "agent",