crawlio-browser 1.4.6 → 1.4.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.
@@ -1,7 +1,7 @@
1
1
  // src/shared/constants.ts
2
2
  import { homedir } from "os";
3
3
  import { join } from "path";
4
- var PKG_VERSION = "1.4.6";
4
+ var PKG_VERSION = "1.4.7";
5
5
  var WS_PORT = 9333;
6
6
  var WS_HOST = "127.0.0.1";
7
7
  var CRAWLIO_PORT_FILE = join(
@@ -7,7 +7,7 @@ import {
7
7
  WS_PORT,
8
8
  WS_RECONNECT_GRACE,
9
9
  WS_STALE_THRESHOLD
10
- } from "./chunk-WJU4IGLN.js";
10
+ } from "./chunk-RA3LVVKH.js";
11
11
 
12
12
  // src/mcp-server/index.ts
13
13
  import { randomBytes as randomBytes2 } from "crypto";
@@ -512,7 +512,15 @@ var WebSocketBridge = class {
512
512
  if (msg.success) {
513
513
  req.resolve(msg.data ?? {});
514
514
  } else {
515
- req.reject(new Error(msg.error ?? "Unknown extension error"));
515
+ const err = new Error(msg.error ?? "Unknown extension error");
516
+ const wire = msg;
517
+ if (wire.permission_required) {
518
+ const errObj = err;
519
+ errObj.permission_required = true;
520
+ errObj.missing = wire.missing;
521
+ errObj.suggestion = wire.suggestion;
522
+ }
523
+ req.reject(err);
516
524
  }
517
525
  this.pending.delete(msg.id);
518
526
  }
@@ -4015,6 +4023,10 @@ function createCodeModeTools(bridge2, crawlio2) {
4015
4023
  return toolSuccess(result);
4016
4024
  } catch (error) {
4017
4025
  const msg = error instanceof Error ? error.message : String(error);
4026
+ if (error instanceof Error && error.permission_required) {
4027
+ const missing = error.missing;
4028
+ return toolError(formatPermissionDenial(missing, "execute"));
4029
+ }
4018
4030
  return toolError(`Execution error: ${msg}`);
4019
4031
  } finally {
4020
4032
  clearTimeout(timer);
@@ -4030,7 +4042,7 @@ function createCodeModeTools(bridge2, crawlio2) {
4030
4042
  process.title = "Crawlio Agent";
4031
4043
  var initMode = process.argv.includes("init") || process.argv.includes("--setup") || process.argv.includes("setup");
4032
4044
  if (initMode) {
4033
- const { runInit } = await import("./init-E233DCMN.js");
4045
+ const { runInit } = await import("./init-4D3LCB7J.js");
4034
4046
  await runInit(process.argv.slice(2));
4035
4047
  process.exit(0);
4036
4048
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PKG_VERSION
3
- } from "./chunk-WJU4IGLN.js";
3
+ } from "./chunk-RA3LVVKH.js";
4
4
 
5
5
  // src/mcp-server/init.ts
6
6
  import { execFileSync, spawn } from "child_process";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crawlio-browser",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "MCP server with 96 CDP-backed tools for browser automation — screenshots, DOM, network capture, framework detection, cookies, storage, session recording, performance metrics via Chrome",
5
5
  "type": "module",
6
6
  "main": "dist/mcp-server/index.js",