browse 0.11.2 → 0.11.3

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/README.md CHANGED
@@ -29,6 +29,8 @@ npm install -g browse
29
29
 
30
30
  ## Quick start
31
31
 
32
+ Requires Node.js 22.18+.
33
+
32
34
  ```bash
33
35
  npm install -g browse
34
36
 
package/bin/run.js CHANGED
@@ -1,5 +1,16 @@
1
1
  #!/usr/bin/env node
2
+ import { createRequire } from "node:module";
2
3
  import { config as loadDotenvConfig } from "dotenv";
4
+ import satisfies from "semver/functions/satisfies.js";
5
+
6
+ const require = createRequire(import.meta.url);
7
+ const { engines } = require("../package.json");
8
+ if (!satisfies(process.versions.node, engines.node)) {
9
+ console.error(
10
+ `[browse] Node.js ${engines.node} is required; found ${process.versions.node}. Upgrade Node.js and rerun browse.`,
11
+ );
12
+ process.exit(1);
13
+ }
3
14
 
4
15
  // `BROWSE_LOAD_DOTENV` controls whether `browse` auto-loads a `.env` file
5
16
  // from the current working directory. This is deprecated: a future release
@@ -3310,25 +3310,13 @@
3310
3310
  "publish.js"
3311
3311
  ]
3312
3312
  },
3313
- "mouse:click": {
3313
+ "network:clear": {
3314
3314
  "aliases": [],
3315
- "args": {
3316
- "x": {
3317
- "description": "Viewport x coordinate.",
3318
- "name": "x",
3319
- "required": true
3320
- },
3321
- "y": {
3322
- "description": "Viewport y coordinate.",
3323
- "name": "y",
3324
- "required": true
3325
- }
3326
- },
3327
- "description": "Click raw viewport coordinates in the active page.",
3315
+ "args": {},
3316
+ "description": "Clear captured network request directories for the active browser session.",
3328
3317
  "examples": [
3329
- "browse mouse click 240 320",
3330
- "browse mouse click 240 320 --button right",
3331
- "browse mouse click 240 320 --click-count 2"
3318
+ "browse network clear",
3319
+ "browse network clear --session research"
3332
3320
  ],
3333
3321
  "flags": {
3334
3322
  "auto-connect": {
@@ -3419,34 +3407,11 @@
3419
3407
  "name": "verified",
3420
3408
  "allowNo": false,
3421
3409
  "type": "boolean"
3422
- },
3423
- "button": {
3424
- "description": "Mouse button to use.",
3425
- "name": "button",
3426
- "default": "left",
3427
- "hasDynamicHelp": false,
3428
- "helpValue": "<button>",
3429
- "multiple": false,
3430
- "options": [
3431
- "left",
3432
- "middle",
3433
- "right"
3434
- ],
3435
- "type": "option"
3436
- },
3437
- "click-count": {
3438
- "description": "Number of clicks to send.",
3439
- "name": "click-count",
3440
- "default": 1,
3441
- "hasDynamicHelp": false,
3442
- "helpValue": "<count>",
3443
- "multiple": false,
3444
- "type": "option"
3445
3410
  }
3446
3411
  },
3447
3412
  "hasDynamicHelp": false,
3448
3413
  "hiddenAliases": [],
3449
- "id": "mouse:click",
3414
+ "id": "network:clear",
3450
3415
  "pluginAlias": "browse",
3451
3416
  "pluginName": "browse",
3452
3417
  "pluginType": "core",
@@ -3455,38 +3420,17 @@
3455
3420
  "relativePath": [
3456
3421
  "dist",
3457
3422
  "commands",
3458
- "mouse",
3459
- "click.js"
3423
+ "network",
3424
+ "clear.js"
3460
3425
  ]
3461
3426
  },
3462
- "mouse:drag": {
3427
+ "network:off": {
3463
3428
  "aliases": [],
3464
- "args": {
3465
- "fromX": {
3466
- "description": "Starting viewport x coordinate.",
3467
- "name": "fromX",
3468
- "required": true
3469
- },
3470
- "fromY": {
3471
- "description": "Starting viewport y coordinate.",
3472
- "name": "fromY",
3473
- "required": true
3474
- },
3475
- "toX": {
3476
- "description": "Ending viewport x coordinate.",
3477
- "name": "toX",
3478
- "required": true
3479
- },
3480
- "toY": {
3481
- "description": "Ending viewport y coordinate.",
3482
- "name": "toY",
3483
- "required": true
3484
- }
3485
- },
3486
- "description": "Drag from one raw viewport coordinate to another.",
3429
+ "args": {},
3430
+ "description": "Disable network capture for the active browser session.",
3487
3431
  "examples": [
3488
- "browse mouse drag 100 100 400 400",
3489
- "browse mouse drag 100 100 400 400 --steps 20 --delay 10"
3432
+ "browse network off",
3433
+ "browse network off --session research"
3490
3434
  ],
3491
3435
  "flags": {
3492
3436
  "auto-connect": {
@@ -3577,43 +3521,11 @@
3577
3521
  "name": "verified",
3578
3522
  "allowNo": false,
3579
3523
  "type": "boolean"
3580
- },
3581
- "button": {
3582
- "description": "Mouse button to use.",
3583
- "name": "button",
3584
- "default": "left",
3585
- "hasDynamicHelp": false,
3586
- "helpValue": "<button>",
3587
- "multiple": false,
3588
- "options": [
3589
- "left",
3590
- "middle",
3591
- "right"
3592
- ],
3593
- "type": "option"
3594
- },
3595
- "delay": {
3596
- "description": "Delay between drag steps in milliseconds.",
3597
- "name": "delay",
3598
- "default": 0,
3599
- "hasDynamicHelp": false,
3600
- "helpValue": "<ms>",
3601
- "multiple": false,
3602
- "type": "option"
3603
- },
3604
- "steps": {
3605
- "description": "Number of intermediate drag steps.",
3606
- "name": "steps",
3607
- "default": 10,
3608
- "hasDynamicHelp": false,
3609
- "helpValue": "<steps>",
3610
- "multiple": false,
3611
- "type": "option"
3612
3524
  }
3613
3525
  },
3614
3526
  "hasDynamicHelp": false,
3615
3527
  "hiddenAliases": [],
3616
- "id": "mouse:drag",
3528
+ "id": "network:off",
3617
3529
  "pluginAlias": "browse",
3618
3530
  "pluginName": "browse",
3619
3531
  "pluginType": "core",
@@ -3622,28 +3534,17 @@
3622
3534
  "relativePath": [
3623
3535
  "dist",
3624
3536
  "commands",
3625
- "mouse",
3626
- "drag.js"
3537
+ "network",
3538
+ "off.js"
3627
3539
  ]
3628
3540
  },
3629
- "mouse:hover": {
3541
+ "network:on": {
3630
3542
  "aliases": [],
3631
- "args": {
3632
- "x": {
3633
- "description": "Viewport x coordinate.",
3634
- "name": "x",
3635
- "required": true
3636
- },
3637
- "y": {
3638
- "description": "Viewport y coordinate.",
3639
- "name": "y",
3640
- "required": true
3641
- }
3642
- },
3643
- "description": "Move the mouse to raw viewport coordinates in the active page.",
3543
+ "args": {},
3544
+ "description": "Enable network capture for the active browser session.",
3644
3545
  "examples": [
3645
- "browse mouse hover 240 320",
3646
- "browse mouse hover 240 320 --session research"
3546
+ "browse network on",
3547
+ "browse network on --session research"
3647
3548
  ],
3648
3549
  "flags": {
3649
3550
  "auto-connect": {
@@ -3738,7 +3639,7 @@
3738
3639
  },
3739
3640
  "hasDynamicHelp": false,
3740
3641
  "hiddenAliases": [],
3741
- "id": "mouse:hover",
3642
+ "id": "network:on",
3742
3643
  "pluginAlias": "browse",
3743
3644
  "pluginName": "browse",
3744
3645
  "pluginType": "core",
@@ -3747,38 +3648,17 @@
3747
3648
  "relativePath": [
3748
3649
  "dist",
3749
3650
  "commands",
3750
- "mouse",
3751
- "hover.js"
3651
+ "network",
3652
+ "on.js"
3752
3653
  ]
3753
3654
  },
3754
- "mouse:scroll": {
3655
+ "network:path": {
3755
3656
  "aliases": [],
3756
- "args": {
3757
- "x": {
3758
- "description": "Viewport x coordinate.",
3759
- "name": "x",
3760
- "required": true
3761
- },
3762
- "y": {
3763
- "description": "Viewport y coordinate.",
3764
- "name": "y",
3765
- "required": true
3766
- },
3767
- "deltaX": {
3768
- "description": "Horizontal scroll delta.",
3769
- "name": "deltaX",
3770
- "required": true
3771
- },
3772
- "deltaY": {
3773
- "description": "Vertical scroll delta.",
3774
- "name": "deltaY",
3775
- "required": true
3776
- }
3777
- },
3778
- "description": "Scroll from raw viewport coordinates in the active page.",
3657
+ "args": {},
3658
+ "description": "Print the network capture directory for the active browser session.",
3779
3659
  "examples": [
3780
- "browse mouse scroll 400 500 0 600",
3781
- "browse mouse scroll 400 500 0 -600"
3660
+ "browse network path",
3661
+ "browse network path --session research"
3782
3662
  ],
3783
3663
  "flags": {
3784
3664
  "auto-connect": {
@@ -3873,7 +3753,7 @@
3873
3753
  },
3874
3754
  "hasDynamicHelp": false,
3875
3755
  "hiddenAliases": [],
3876
- "id": "mouse:scroll",
3756
+ "id": "network:path",
3877
3757
  "pluginAlias": "browse",
3878
3758
  "pluginName": "browse",
3879
3759
  "pluginType": "core",
@@ -3882,8 +3762,8 @@
3882
3762
  "relativePath": [
3883
3763
  "dist",
3884
3764
  "commands",
3885
- "mouse",
3886
- "scroll.js"
3765
+ "network",
3766
+ "path.js"
3887
3767
  ]
3888
3768
  },
3889
3769
  "skills:add": {
@@ -4101,13 +3981,25 @@
4101
3981
  "show.js"
4102
3982
  ]
4103
3983
  },
4104
- "network:clear": {
3984
+ "mouse:click": {
4105
3985
  "aliases": [],
4106
- "args": {},
4107
- "description": "Clear captured network request directories for the active browser session.",
3986
+ "args": {
3987
+ "x": {
3988
+ "description": "Viewport x coordinate.",
3989
+ "name": "x",
3990
+ "required": true
3991
+ },
3992
+ "y": {
3993
+ "description": "Viewport y coordinate.",
3994
+ "name": "y",
3995
+ "required": true
3996
+ }
3997
+ },
3998
+ "description": "Click raw viewport coordinates in the active page.",
4108
3999
  "examples": [
4109
- "browse network clear",
4110
- "browse network clear --session research"
4000
+ "browse mouse click 240 320",
4001
+ "browse mouse click 240 320 --button right",
4002
+ "browse mouse click 240 320 --click-count 2"
4111
4003
  ],
4112
4004
  "flags": {
4113
4005
  "auto-connect": {
@@ -4198,11 +4090,34 @@
4198
4090
  "name": "verified",
4199
4091
  "allowNo": false,
4200
4092
  "type": "boolean"
4093
+ },
4094
+ "button": {
4095
+ "description": "Mouse button to use.",
4096
+ "name": "button",
4097
+ "default": "left",
4098
+ "hasDynamicHelp": false,
4099
+ "helpValue": "<button>",
4100
+ "multiple": false,
4101
+ "options": [
4102
+ "left",
4103
+ "middle",
4104
+ "right"
4105
+ ],
4106
+ "type": "option"
4107
+ },
4108
+ "click-count": {
4109
+ "description": "Number of clicks to send.",
4110
+ "name": "click-count",
4111
+ "default": 1,
4112
+ "hasDynamicHelp": false,
4113
+ "helpValue": "<count>",
4114
+ "multiple": false,
4115
+ "type": "option"
4201
4116
  }
4202
4117
  },
4203
4118
  "hasDynamicHelp": false,
4204
4119
  "hiddenAliases": [],
4205
- "id": "network:clear",
4120
+ "id": "mouse:click",
4206
4121
  "pluginAlias": "browse",
4207
4122
  "pluginName": "browse",
4208
4123
  "pluginType": "core",
@@ -4211,17 +4126,38 @@
4211
4126
  "relativePath": [
4212
4127
  "dist",
4213
4128
  "commands",
4214
- "network",
4215
- "clear.js"
4129
+ "mouse",
4130
+ "click.js"
4216
4131
  ]
4217
4132
  },
4218
- "network:off": {
4133
+ "mouse:drag": {
4219
4134
  "aliases": [],
4220
- "args": {},
4221
- "description": "Disable network capture for the active browser session.",
4135
+ "args": {
4136
+ "fromX": {
4137
+ "description": "Starting viewport x coordinate.",
4138
+ "name": "fromX",
4139
+ "required": true
4140
+ },
4141
+ "fromY": {
4142
+ "description": "Starting viewport y coordinate.",
4143
+ "name": "fromY",
4144
+ "required": true
4145
+ },
4146
+ "toX": {
4147
+ "description": "Ending viewport x coordinate.",
4148
+ "name": "toX",
4149
+ "required": true
4150
+ },
4151
+ "toY": {
4152
+ "description": "Ending viewport y coordinate.",
4153
+ "name": "toY",
4154
+ "required": true
4155
+ }
4156
+ },
4157
+ "description": "Drag from one raw viewport coordinate to another.",
4222
4158
  "examples": [
4223
- "browse network off",
4224
- "browse network off --session research"
4159
+ "browse mouse drag 100 100 400 400",
4160
+ "browse mouse drag 100 100 400 400 --steps 20 --delay 10"
4225
4161
  ],
4226
4162
  "flags": {
4227
4163
  "auto-connect": {
@@ -4312,11 +4248,43 @@
4312
4248
  "name": "verified",
4313
4249
  "allowNo": false,
4314
4250
  "type": "boolean"
4251
+ },
4252
+ "button": {
4253
+ "description": "Mouse button to use.",
4254
+ "name": "button",
4255
+ "default": "left",
4256
+ "hasDynamicHelp": false,
4257
+ "helpValue": "<button>",
4258
+ "multiple": false,
4259
+ "options": [
4260
+ "left",
4261
+ "middle",
4262
+ "right"
4263
+ ],
4264
+ "type": "option"
4265
+ },
4266
+ "delay": {
4267
+ "description": "Delay between drag steps in milliseconds.",
4268
+ "name": "delay",
4269
+ "default": 0,
4270
+ "hasDynamicHelp": false,
4271
+ "helpValue": "<ms>",
4272
+ "multiple": false,
4273
+ "type": "option"
4274
+ },
4275
+ "steps": {
4276
+ "description": "Number of intermediate drag steps.",
4277
+ "name": "steps",
4278
+ "default": 10,
4279
+ "hasDynamicHelp": false,
4280
+ "helpValue": "<steps>",
4281
+ "multiple": false,
4282
+ "type": "option"
4315
4283
  }
4316
4284
  },
4317
4285
  "hasDynamicHelp": false,
4318
4286
  "hiddenAliases": [],
4319
- "id": "network:off",
4287
+ "id": "mouse:drag",
4320
4288
  "pluginAlias": "browse",
4321
4289
  "pluginName": "browse",
4322
4290
  "pluginType": "core",
@@ -4325,17 +4293,28 @@
4325
4293
  "relativePath": [
4326
4294
  "dist",
4327
4295
  "commands",
4328
- "network",
4329
- "off.js"
4296
+ "mouse",
4297
+ "drag.js"
4330
4298
  ]
4331
4299
  },
4332
- "network:on": {
4300
+ "mouse:hover": {
4333
4301
  "aliases": [],
4334
- "args": {},
4335
- "description": "Enable network capture for the active browser session.",
4302
+ "args": {
4303
+ "x": {
4304
+ "description": "Viewport x coordinate.",
4305
+ "name": "x",
4306
+ "required": true
4307
+ },
4308
+ "y": {
4309
+ "description": "Viewport y coordinate.",
4310
+ "name": "y",
4311
+ "required": true
4312
+ }
4313
+ },
4314
+ "description": "Move the mouse to raw viewport coordinates in the active page.",
4336
4315
  "examples": [
4337
- "browse network on",
4338
- "browse network on --session research"
4316
+ "browse mouse hover 240 320",
4317
+ "browse mouse hover 240 320 --session research"
4339
4318
  ],
4340
4319
  "flags": {
4341
4320
  "auto-connect": {
@@ -4430,7 +4409,7 @@
4430
4409
  },
4431
4410
  "hasDynamicHelp": false,
4432
4411
  "hiddenAliases": [],
4433
- "id": "network:on",
4412
+ "id": "mouse:hover",
4434
4413
  "pluginAlias": "browse",
4435
4414
  "pluginName": "browse",
4436
4415
  "pluginType": "core",
@@ -4439,17 +4418,38 @@
4439
4418
  "relativePath": [
4440
4419
  "dist",
4441
4420
  "commands",
4442
- "network",
4443
- "on.js"
4421
+ "mouse",
4422
+ "hover.js"
4444
4423
  ]
4445
4424
  },
4446
- "network:path": {
4425
+ "mouse:scroll": {
4447
4426
  "aliases": [],
4448
- "args": {},
4449
- "description": "Print the network capture directory for the active browser session.",
4427
+ "args": {
4428
+ "x": {
4429
+ "description": "Viewport x coordinate.",
4430
+ "name": "x",
4431
+ "required": true
4432
+ },
4433
+ "y": {
4434
+ "description": "Viewport y coordinate.",
4435
+ "name": "y",
4436
+ "required": true
4437
+ },
4438
+ "deltaX": {
4439
+ "description": "Horizontal scroll delta.",
4440
+ "name": "deltaX",
4441
+ "required": true
4442
+ },
4443
+ "deltaY": {
4444
+ "description": "Vertical scroll delta.",
4445
+ "name": "deltaY",
4446
+ "required": true
4447
+ }
4448
+ },
4449
+ "description": "Scroll from raw viewport coordinates in the active page.",
4450
4450
  "examples": [
4451
- "browse network path",
4452
- "browse network path --session research"
4451
+ "browse mouse scroll 400 500 0 600",
4452
+ "browse mouse scroll 400 500 0 -600"
4453
4453
  ],
4454
4454
  "flags": {
4455
4455
  "auto-connect": {
@@ -4544,7 +4544,7 @@
4544
4544
  },
4545
4545
  "hasDynamicHelp": false,
4546
4546
  "hiddenAliases": [],
4547
- "id": "network:path",
4547
+ "id": "mouse:scroll",
4548
4548
  "pluginAlias": "browse",
4549
4549
  "pluginName": "browse",
4550
4550
  "pluginType": "core",
@@ -4553,8 +4553,8 @@
4553
4553
  "relativePath": [
4554
4554
  "dist",
4555
4555
  "commands",
4556
- "network",
4557
- "path.js"
4556
+ "mouse",
4557
+ "scroll.js"
4558
4558
  ]
4559
4559
  },
4560
4560
  "tab:close": {
@@ -6928,5 +6928,5 @@
6928
6928
  ]
6929
6929
  }
6930
6930
  },
6931
- "version": "0.11.2"
6931
+ "version": "0.11.3"
6932
6932
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browse",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "Unified Browserbase CLI for browser automation and cloud APIs.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -90,7 +90,7 @@
90
90
  },
91
91
  "homepage": "https://github.com/browserbase/stagehand/tree/main/packages/cli#readme",
92
92
  "engines": {
93
- "node": "^20.19.0 || >=22.12.0"
93
+ "node": ">=22.18.0"
94
94
  },
95
95
  "dependencies": {
96
96
  "@browserbasehq/sdk": "^2.14.0",
@@ -110,7 +110,7 @@
110
110
  "tsx": "^4.20.6",
111
111
  "ws": "^8.18.3",
112
112
  "zod": "^4.2.1",
113
- "@browserbasehq/stagehand": "4.2.1"
113
+ "@browserbasehq/stagehand": "4.3.0"
114
114
  },
115
115
  "devDependencies": {
116
116
  "@eslint/js": "^10.0.1",