browse 0.6.0 → 0.6.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.
@@ -37,10 +37,12 @@ export async function runDriverCommandFromFlags(command, params, flags) {
37
37
  outputJson(await runDriverCommandWithTarget(session, target, command, params));
38
38
  }
39
39
  export async function resolveTargetForCommand(session, flags) {
40
- if (!hasExplicitDriverTarget(flags)) {
40
+ const hasExplicitTarget = hasExplicitDriverTarget(flags);
41
+ if (!hasExplicitTarget || hasModeOnlyFlag(flags)) {
41
42
  const status = await getDriverStatus(session);
42
- if (status?.target)
43
+ if (status?.target && (!hasExplicitTarget || targetMatchesRequestedMode(status.target, flags))) {
43
44
  return status.target;
45
+ }
44
46
  }
45
47
  return resolveConnectionTarget(flags);
46
48
  }
@@ -53,6 +55,22 @@ export function hasExplicitDriverTarget(flags) {
53
55
  flags.headed ||
54
56
  flags.headless);
55
57
  }
58
+ function hasModeOnlyFlag(flags) {
59
+ return Boolean((flags.local || flags.remote) &&
60
+ !flags["auto-connect"] &&
61
+ !flags.cdp &&
62
+ !flags["target-id"] &&
63
+ !flags.headed &&
64
+ !flags.headless &&
65
+ flags.local !== flags.remote);
66
+ }
67
+ function targetMatchesRequestedMode(target, flags) {
68
+ if (flags.local)
69
+ return target.kind === "managed-local";
70
+ if (flags.remote)
71
+ return target.kind === "remote";
72
+ return false;
73
+ }
56
74
  export function parseClip(value) {
57
75
  if (!value)
58
76
  return undefined;
@@ -58,7 +58,7 @@ export class DriverSessionManager {
58
58
  target: this.target,
59
59
  };
60
60
  }
61
- const page = this.context.activePage();
61
+ const page = this.activePageIfPresent();
62
62
  const pages = await this.pageSummaries();
63
63
  return {
64
64
  browserConnected: true,
@@ -66,7 +66,7 @@ export class DriverSessionManager {
66
66
  mode: this.target.kind,
67
67
  pages,
68
68
  pid: process.pid,
69
- selectedTargetId: page?.targetId(),
69
+ selectedTargetId: page?.targetId() ?? this.selectedTargetId,
70
70
  session: this.session,
71
71
  target: this.target,
72
72
  title: page ? await safeTitle(page) : undefined,
@@ -129,15 +129,27 @@ export class DriverSessionManager {
129
129
  this.selectedTargetId = page.targetId();
130
130
  return page;
131
131
  }
132
+ const existingPage = this.activePageIfPresent() ?? this.context.pages()[0];
133
+ if (existingPage) {
134
+ this.context.setActivePage(existingPage);
135
+ this.selectedTargetId = existingPage.targetId();
136
+ return existingPage;
137
+ }
132
138
  if (options.createIfMissing) {
133
- const page = this.context.activePage() ?? this.context.pages()[0] ?? (await this.context.newPage());
139
+ const page = await this.context.newPage();
134
140
  this.context.setActivePage(page);
135
141
  this.selectedTargetId = page.targetId();
136
142
  return page;
137
143
  }
138
- const page = await this.context.awaitActivePage();
139
- this.selectedTargetId = page.targetId();
140
- return page;
144
+ throw new Error(`No active page in session "${this.session}". Run browse open <url> --session ${this.session} or browse tab new <url> --session ${this.session}.`);
145
+ }
146
+ activePageIfPresent() {
147
+ try {
148
+ return this.context?.activePage() ?? undefined;
149
+ }
150
+ catch {
151
+ return undefined;
152
+ }
141
153
  }
142
154
  async ensureInitialized() {
143
155
  if (this.stagehand && this.context)
@@ -3460,6 +3460,156 @@
3460
3460
  "install.js"
3461
3461
  ]
3462
3462
  },
3463
+ "templates:clone": {
3464
+ "aliases": [],
3465
+ "args": {
3466
+ "slug": {
3467
+ "description": "Template slug.",
3468
+ "name": "slug",
3469
+ "required": true
3470
+ },
3471
+ "path": {
3472
+ "description": "Destination directory. Defaults to the template slug.",
3473
+ "name": "path",
3474
+ "required": false
3475
+ }
3476
+ },
3477
+ "description": "Scaffold a ready-to-run project from a Browserbase template.",
3478
+ "examples": [
3479
+ "browse templates clone google-trends-keywords",
3480
+ "browse templates clone amazon-product-scraping --language python ./my-scraper",
3481
+ "browse templates clone dynamic-form-filling ./form-bot --language typescript"
3482
+ ],
3483
+ "flags": {
3484
+ "json": {
3485
+ "description": "Print clone result as JSON.",
3486
+ "name": "json",
3487
+ "allowNo": false,
3488
+ "type": "boolean"
3489
+ },
3490
+ "language": {
3491
+ "description": "Template language. Defaults to TypeScript when available, then Python.",
3492
+ "name": "language",
3493
+ "hasDynamicHelp": false,
3494
+ "helpValue": "<language>",
3495
+ "multiple": false,
3496
+ "options": [
3497
+ "typescript",
3498
+ "python"
3499
+ ],
3500
+ "type": "option"
3501
+ }
3502
+ },
3503
+ "hasDynamicHelp": false,
3504
+ "hiddenAliases": [],
3505
+ "id": "templates:clone",
3506
+ "pluginAlias": "browse",
3507
+ "pluginName": "browse",
3508
+ "pluginType": "core",
3509
+ "strict": true,
3510
+ "isESM": true,
3511
+ "relativePath": [
3512
+ "dist",
3513
+ "commands",
3514
+ "templates",
3515
+ "clone.js"
3516
+ ]
3517
+ },
3518
+ "templates:find": {
3519
+ "aliases": [],
3520
+ "args": {
3521
+ "query": {
3522
+ "description": "Template slug or search query.",
3523
+ "name": "query",
3524
+ "required": true
3525
+ }
3526
+ },
3527
+ "description": "Find Browserbase templates by slug, title, category, or tag.",
3528
+ "examples": [
3529
+ "browse templates find google-trends-keywords",
3530
+ "browse templates find amazon",
3531
+ "browse templates find Python --json"
3532
+ ],
3533
+ "flags": {
3534
+ "json": {
3535
+ "description": "Print matching templates as JSON.",
3536
+ "name": "json",
3537
+ "allowNo": false,
3538
+ "type": "boolean"
3539
+ }
3540
+ },
3541
+ "hasDynamicHelp": false,
3542
+ "hiddenAliases": [],
3543
+ "id": "templates:find",
3544
+ "pluginAlias": "browse",
3545
+ "pluginName": "browse",
3546
+ "pluginType": "core",
3547
+ "strict": true,
3548
+ "isESM": true,
3549
+ "relativePath": [
3550
+ "dist",
3551
+ "commands",
3552
+ "templates",
3553
+ "find.js"
3554
+ ]
3555
+ },
3556
+ "templates:list": {
3557
+ "aliases": [],
3558
+ "args": {},
3559
+ "description": "List Browserbase templates.",
3560
+ "examples": [
3561
+ "browse templates list",
3562
+ "browse templates list --category \"Web Automation\"",
3563
+ "browse templates list --tag Python --source Browserbase",
3564
+ "browse templates list --json"
3565
+ ],
3566
+ "flags": {
3567
+ "category": {
3568
+ "description": "Filter templates by category.",
3569
+ "name": "category",
3570
+ "hasDynamicHelp": false,
3571
+ "helpValue": "<category>",
3572
+ "multiple": false,
3573
+ "type": "option"
3574
+ },
3575
+ "json": {
3576
+ "description": "Print templates as JSON.",
3577
+ "name": "json",
3578
+ "allowNo": false,
3579
+ "type": "boolean"
3580
+ },
3581
+ "source": {
3582
+ "description": "Filter templates by source.",
3583
+ "name": "source",
3584
+ "hasDynamicHelp": false,
3585
+ "helpValue": "<source>",
3586
+ "multiple": false,
3587
+ "type": "option"
3588
+ },
3589
+ "tag": {
3590
+ "description": "Filter templates by tag.",
3591
+ "name": "tag",
3592
+ "hasDynamicHelp": false,
3593
+ "helpValue": "<tag>",
3594
+ "multiple": false,
3595
+ "type": "option"
3596
+ }
3597
+ },
3598
+ "hasDynamicHelp": false,
3599
+ "hiddenAliases": [],
3600
+ "id": "templates:list",
3601
+ "pluginAlias": "browse",
3602
+ "pluginName": "browse",
3603
+ "pluginType": "core",
3604
+ "strict": true,
3605
+ "isESM": true,
3606
+ "relativePath": [
3607
+ "dist",
3608
+ "commands",
3609
+ "templates",
3610
+ "list.js"
3611
+ ]
3612
+ },
3463
3613
  "tab:close": {
3464
3614
  "aliases": [],
3465
3615
  "args": {
@@ -3802,320 +3952,15 @@
3802
3952
  "tab",
3803
3953
  "switch.js"
3804
3954
  ]
3805
- },
3806
- "templates:clone": {
3807
- "aliases": [],
3808
- "args": {
3809
- "slug": {
3810
- "description": "Template slug.",
3811
- "name": "slug",
3812
- "required": true
3813
- },
3814
- "path": {
3815
- "description": "Destination directory. Defaults to the template slug.",
3816
- "name": "path",
3817
- "required": false
3818
- }
3819
- },
3820
- "description": "Scaffold a ready-to-run project from a Browserbase template.",
3821
- "examples": [
3822
- "browse templates clone google-trends-keywords",
3823
- "browse templates clone amazon-product-scraping --language python ./my-scraper",
3824
- "browse templates clone dynamic-form-filling ./form-bot --language typescript"
3825
- ],
3826
- "flags": {
3827
- "json": {
3828
- "description": "Print clone result as JSON.",
3829
- "name": "json",
3830
- "allowNo": false,
3831
- "type": "boolean"
3832
- },
3833
- "language": {
3834
- "description": "Template language. Defaults to TypeScript when available, then Python.",
3835
- "name": "language",
3836
- "hasDynamicHelp": false,
3837
- "helpValue": "<language>",
3838
- "multiple": false,
3839
- "options": [
3840
- "typescript",
3841
- "python"
3842
- ],
3843
- "type": "option"
3844
- }
3845
- },
3846
- "hasDynamicHelp": false,
3847
- "hiddenAliases": [],
3848
- "id": "templates:clone",
3849
- "pluginAlias": "browse",
3850
- "pluginName": "browse",
3851
- "pluginType": "core",
3852
- "strict": true,
3853
- "isESM": true,
3854
- "relativePath": [
3855
- "dist",
3856
- "commands",
3857
- "templates",
3858
- "clone.js"
3859
- ]
3860
- },
3861
- "templates:find": {
3862
- "aliases": [],
3863
- "args": {
3864
- "query": {
3865
- "description": "Template slug or search query.",
3866
- "name": "query",
3867
- "required": true
3868
- }
3869
- },
3870
- "description": "Find Browserbase templates by slug, title, category, or tag.",
3871
- "examples": [
3872
- "browse templates find google-trends-keywords",
3873
- "browse templates find amazon",
3874
- "browse templates find Python --json"
3875
- ],
3876
- "flags": {
3877
- "json": {
3878
- "description": "Print matching templates as JSON.",
3879
- "name": "json",
3880
- "allowNo": false,
3881
- "type": "boolean"
3882
- }
3883
- },
3884
- "hasDynamicHelp": false,
3885
- "hiddenAliases": [],
3886
- "id": "templates:find",
3887
- "pluginAlias": "browse",
3888
- "pluginName": "browse",
3889
- "pluginType": "core",
3890
- "strict": true,
3891
- "isESM": true,
3892
- "relativePath": [
3893
- "dist",
3894
- "commands",
3895
- "templates",
3896
- "find.js"
3897
- ]
3898
- },
3899
- "templates:list": {
3900
- "aliases": [],
3901
- "args": {},
3902
- "description": "List Browserbase templates.",
3903
- "examples": [
3904
- "browse templates list",
3905
- "browse templates list --category \"Web Automation\"",
3906
- "browse templates list --tag Python --source Browserbase",
3907
- "browse templates list --json"
3908
- ],
3909
- "flags": {
3910
- "category": {
3911
- "description": "Filter templates by category.",
3912
- "name": "category",
3913
- "hasDynamicHelp": false,
3914
- "helpValue": "<category>",
3915
- "multiple": false,
3916
- "type": "option"
3917
- },
3918
- "json": {
3919
- "description": "Print templates as JSON.",
3920
- "name": "json",
3921
- "allowNo": false,
3922
- "type": "boolean"
3923
- },
3924
- "source": {
3925
- "description": "Filter templates by source.",
3926
- "name": "source",
3927
- "hasDynamicHelp": false,
3928
- "helpValue": "<source>",
3929
- "multiple": false,
3930
- "type": "option"
3931
- },
3932
- "tag": {
3933
- "description": "Filter templates by tag.",
3934
- "name": "tag",
3935
- "hasDynamicHelp": false,
3936
- "helpValue": "<tag>",
3937
- "multiple": false,
3938
- "type": "option"
3939
- }
3940
- },
3941
- "hasDynamicHelp": false,
3942
- "hiddenAliases": [],
3943
- "id": "templates:list",
3944
- "pluginAlias": "browse",
3945
- "pluginName": "browse",
3946
- "pluginType": "core",
3947
- "strict": true,
3948
- "isESM": true,
3949
- "relativePath": [
3950
- "dist",
3951
- "commands",
3952
- "templates",
3953
- "list.js"
3954
- ]
3955
- },
3956
- "cloud:contexts:create": {
3957
- "aliases": [],
3958
- "args": {},
3959
- "description": "Create a Browserbase context.",
3960
- "examples": [
3961
- "browse cloud contexts create",
3962
- "browse cloud contexts create --body '{\"region\":\"us-west-2\"}'",
3963
- "echo '{\"region\":\"us-west-2\"}' | browse cloud contexts create --stdin"
3964
- ],
3965
- "flags": {
3966
- "api-key": {
3967
- "description": "Override the Browserbase API key.",
3968
- "name": "api-key",
3969
- "hasDynamicHelp": false,
3970
- "helpValue": "<apiKey>",
3971
- "multiple": false,
3972
- "type": "option"
3973
- },
3974
- "base-url": {
3975
- "description": "Override the Browserbase API base URL.",
3976
- "name": "base-url",
3977
- "hasDynamicHelp": false,
3978
- "helpValue": "<baseUrl>",
3979
- "multiple": false,
3980
- "type": "option"
3981
- },
3982
- "body": {
3983
- "description": "Optional JSON request body.",
3984
- "name": "body",
3985
- "hasDynamicHelp": false,
3986
- "helpValue": "<body>",
3987
- "multiple": false,
3988
- "type": "option"
3989
- },
3990
- "stdin": {
3991
- "description": "Read JSON request body from stdin.",
3992
- "name": "stdin",
3993
- "allowNo": false,
3994
- "type": "boolean"
3995
- }
3996
- },
3997
- "hasDynamicHelp": false,
3998
- "hiddenAliases": [],
3999
- "id": "cloud:contexts:create",
4000
- "pluginAlias": "browse",
4001
- "pluginName": "browse",
4002
- "pluginType": "core",
4003
- "strict": true,
4004
- "isESM": true,
4005
- "relativePath": [
4006
- "dist",
4007
- "commands",
4008
- "cloud",
4009
- "contexts",
4010
- "create.js"
4011
- ]
4012
- },
4013
- "cloud:contexts:delete": {
4014
- "aliases": [],
4015
- "args": {
4016
- "id": {
4017
- "description": "Context ID.",
4018
- "name": "id",
4019
- "required": true
4020
- }
4021
- },
4022
- "description": "Delete a Browserbase context.",
4023
- "examples": [
4024
- "browse cloud contexts delete <context-id>"
4025
- ],
4026
- "flags": {
4027
- "api-key": {
4028
- "description": "Override the Browserbase API key.",
4029
- "name": "api-key",
4030
- "hasDynamicHelp": false,
4031
- "helpValue": "<apiKey>",
4032
- "multiple": false,
4033
- "type": "option"
4034
- },
4035
- "base-url": {
4036
- "description": "Override the Browserbase API base URL.",
4037
- "name": "base-url",
4038
- "hasDynamicHelp": false,
4039
- "helpValue": "<baseUrl>",
4040
- "multiple": false,
4041
- "type": "option"
4042
- }
4043
- },
4044
- "hasDynamicHelp": false,
4045
- "hiddenAliases": [],
4046
- "id": "cloud:contexts:delete",
4047
- "pluginAlias": "browse",
4048
- "pluginName": "browse",
4049
- "pluginType": "core",
4050
- "strict": true,
4051
- "isESM": true,
4052
- "relativePath": [
4053
- "dist",
4054
- "commands",
4055
- "cloud",
4056
- "contexts",
4057
- "delete.js"
4058
- ]
4059
- },
4060
- "cloud:contexts:get": {
4061
- "aliases": [],
4062
- "args": {
4063
- "id": {
4064
- "description": "Context ID.",
4065
- "name": "id",
4066
- "required": true
4067
- }
4068
- },
4069
- "description": "Get a Browserbase context by ID.",
4070
- "examples": [
4071
- "browse cloud contexts get <context-id>"
4072
- ],
4073
- "flags": {
4074
- "api-key": {
4075
- "description": "Override the Browserbase API key.",
4076
- "name": "api-key",
4077
- "hasDynamicHelp": false,
4078
- "helpValue": "<apiKey>",
4079
- "multiple": false,
4080
- "type": "option"
4081
- },
4082
- "base-url": {
4083
- "description": "Override the Browserbase API base URL.",
4084
- "name": "base-url",
4085
- "hasDynamicHelp": false,
4086
- "helpValue": "<baseUrl>",
4087
- "multiple": false,
4088
- "type": "option"
4089
- }
4090
- },
4091
- "hasDynamicHelp": false,
4092
- "hiddenAliases": [],
4093
- "id": "cloud:contexts:get",
4094
- "pluginAlias": "browse",
4095
- "pluginName": "browse",
4096
- "pluginType": "core",
4097
- "strict": true,
4098
- "isESM": true,
4099
- "relativePath": [
4100
- "dist",
4101
- "commands",
4102
- "cloud",
4103
- "contexts",
4104
- "get.js"
4105
- ]
4106
- },
4107
- "cloud:contexts:update": {
4108
- "aliases": [],
4109
- "args": {
4110
- "id": {
4111
- "description": "Context ID.",
4112
- "name": "id",
4113
- "required": true
4114
- }
4115
- },
4116
- "description": "Refresh the upload URL for a Browserbase context.",
3955
+ },
3956
+ "cloud:contexts:create": {
3957
+ "aliases": [],
3958
+ "args": {},
3959
+ "description": "Create a Browserbase context.",
4117
3960
  "examples": [
4118
- "browse cloud contexts update <context-id>"
3961
+ "browse cloud contexts create",
3962
+ "browse cloud contexts create --body '{\"region\":\"us-west-2\"}'",
3963
+ "echo '{\"region\":\"us-west-2\"}' | browse cloud contexts create --stdin"
4119
3964
  ],
4120
3965
  "flags": {
4121
3966
  "api-key": {
@@ -4133,11 +3978,25 @@
4133
3978
  "helpValue": "<baseUrl>",
4134
3979
  "multiple": false,
4135
3980
  "type": "option"
3981
+ },
3982
+ "body": {
3983
+ "description": "Optional JSON request body.",
3984
+ "name": "body",
3985
+ "hasDynamicHelp": false,
3986
+ "helpValue": "<body>",
3987
+ "multiple": false,
3988
+ "type": "option"
3989
+ },
3990
+ "stdin": {
3991
+ "description": "Read JSON request body from stdin.",
3992
+ "name": "stdin",
3993
+ "allowNo": false,
3994
+ "type": "boolean"
4136
3995
  }
4137
3996
  },
4138
3997
  "hasDynamicHelp": false,
4139
3998
  "hiddenAliases": [],
4140
- "id": "cloud:contexts:update",
3999
+ "id": "cloud:contexts:create",
4141
4000
  "pluginAlias": "browse",
4142
4001
  "pluginName": "browse",
4143
4002
  "pluginType": "core",
@@ -4148,21 +4007,21 @@
4148
4007
  "commands",
4149
4008
  "cloud",
4150
4009
  "contexts",
4151
- "update.js"
4010
+ "create.js"
4152
4011
  ]
4153
4012
  },
4154
- "cloud:extensions:delete": {
4013
+ "cloud:contexts:delete": {
4155
4014
  "aliases": [],
4156
4015
  "args": {
4157
4016
  "id": {
4158
- "description": "Extension ID.",
4017
+ "description": "Context ID.",
4159
4018
  "name": "id",
4160
4019
  "required": true
4161
4020
  }
4162
4021
  },
4163
- "description": "Delete a Chrome extension.",
4022
+ "description": "Delete a Browserbase context.",
4164
4023
  "examples": [
4165
- "browse cloud extensions delete <extension-id>"
4024
+ "browse cloud contexts delete <context-id>"
4166
4025
  ],
4167
4026
  "flags": {
4168
4027
  "api-key": {
@@ -4184,7 +4043,7 @@
4184
4043
  },
4185
4044
  "hasDynamicHelp": false,
4186
4045
  "hiddenAliases": [],
4187
- "id": "cloud:extensions:delete",
4046
+ "id": "cloud:contexts:delete",
4188
4047
  "pluginAlias": "browse",
4189
4048
  "pluginName": "browse",
4190
4049
  "pluginType": "core",
@@ -4194,22 +4053,22 @@
4194
4053
  "dist",
4195
4054
  "commands",
4196
4055
  "cloud",
4197
- "extensions",
4056
+ "contexts",
4198
4057
  "delete.js"
4199
4058
  ]
4200
4059
  },
4201
- "cloud:extensions:get": {
4060
+ "cloud:contexts:get": {
4202
4061
  "aliases": [],
4203
4062
  "args": {
4204
4063
  "id": {
4205
- "description": "Extension ID.",
4064
+ "description": "Context ID.",
4206
4065
  "name": "id",
4207
4066
  "required": true
4208
4067
  }
4209
4068
  },
4210
- "description": "Get a Chrome extension by ID.",
4069
+ "description": "Get a Browserbase context by ID.",
4211
4070
  "examples": [
4212
- "browse cloud extensions get <extension-id>"
4071
+ "browse cloud contexts get <context-id>"
4213
4072
  ],
4214
4073
  "flags": {
4215
4074
  "api-key": {
@@ -4231,7 +4090,7 @@
4231
4090
  },
4232
4091
  "hasDynamicHelp": false,
4233
4092
  "hiddenAliases": [],
4234
- "id": "cloud:extensions:get",
4093
+ "id": "cloud:contexts:get",
4235
4094
  "pluginAlias": "browse",
4236
4095
  "pluginName": "browse",
4237
4096
  "pluginType": "core",
@@ -4241,22 +4100,22 @@
4241
4100
  "dist",
4242
4101
  "commands",
4243
4102
  "cloud",
4244
- "extensions",
4103
+ "contexts",
4245
4104
  "get.js"
4246
4105
  ]
4247
4106
  },
4248
- "cloud:extensions:upload": {
4107
+ "cloud:contexts:update": {
4249
4108
  "aliases": [],
4250
4109
  "args": {
4251
- "file": {
4252
- "description": "Path to extension ZIP file.",
4253
- "name": "file",
4110
+ "id": {
4111
+ "description": "Context ID.",
4112
+ "name": "id",
4254
4113
  "required": true
4255
4114
  }
4256
4115
  },
4257
- "description": "Upload a Chrome extension ZIP file.",
4116
+ "description": "Refresh the upload URL for a Browserbase context.",
4258
4117
  "examples": [
4259
- "browse cloud extensions upload ./extension.zip"
4118
+ "browse cloud contexts update <context-id>"
4260
4119
  ],
4261
4120
  "flags": {
4262
4121
  "api-key": {
@@ -4278,7 +4137,7 @@
4278
4137
  },
4279
4138
  "hasDynamicHelp": false,
4280
4139
  "hiddenAliases": [],
4281
- "id": "cloud:extensions:upload",
4140
+ "id": "cloud:contexts:update",
4282
4141
  "pluginAlias": "browse",
4283
4142
  "pluginName": "browse",
4284
4143
  "pluginType": "core",
@@ -4288,22 +4147,22 @@
4288
4147
  "dist",
4289
4148
  "commands",
4290
4149
  "cloud",
4291
- "extensions",
4292
- "upload.js"
4150
+ "contexts",
4151
+ "update.js"
4293
4152
  ]
4294
4153
  },
4295
- "cloud:projects:get": {
4154
+ "cloud:extensions:delete": {
4296
4155
  "aliases": [],
4297
4156
  "args": {
4298
4157
  "id": {
4299
- "description": "Project ID.",
4158
+ "description": "Extension ID.",
4300
4159
  "name": "id",
4301
4160
  "required": true
4302
4161
  }
4303
4162
  },
4304
- "description": "Get a project by ID.",
4163
+ "description": "Delete a Chrome extension.",
4305
4164
  "examples": [
4306
- "browse cloud projects get <project-id>"
4165
+ "browse cloud extensions delete <extension-id>"
4307
4166
  ],
4308
4167
  "flags": {
4309
4168
  "api-key": {
@@ -4325,7 +4184,7 @@
4325
4184
  },
4326
4185
  "hasDynamicHelp": false,
4327
4186
  "hiddenAliases": [],
4328
- "id": "cloud:projects:get",
4187
+ "id": "cloud:extensions:delete",
4329
4188
  "pluginAlias": "browse",
4330
4189
  "pluginName": "browse",
4331
4190
  "pluginType": "core",
@@ -4335,16 +4194,22 @@
4335
4194
  "dist",
4336
4195
  "commands",
4337
4196
  "cloud",
4338
- "projects",
4339
- "get.js"
4197
+ "extensions",
4198
+ "delete.js"
4340
4199
  ]
4341
4200
  },
4342
- "cloud:projects:list": {
4201
+ "cloud:extensions:get": {
4343
4202
  "aliases": [],
4344
- "args": {},
4345
- "description": "List projects visible to the current API key.",
4203
+ "args": {
4204
+ "id": {
4205
+ "description": "Extension ID.",
4206
+ "name": "id",
4207
+ "required": true
4208
+ }
4209
+ },
4210
+ "description": "Get a Chrome extension by ID.",
4346
4211
  "examples": [
4347
- "browse cloud projects list"
4212
+ "browse cloud extensions get <extension-id>"
4348
4213
  ],
4349
4214
  "flags": {
4350
4215
  "api-key": {
@@ -4366,7 +4231,7 @@
4366
4231
  },
4367
4232
  "hasDynamicHelp": false,
4368
4233
  "hiddenAliases": [],
4369
- "id": "cloud:projects:list",
4234
+ "id": "cloud:extensions:get",
4370
4235
  "pluginAlias": "browse",
4371
4236
  "pluginName": "browse",
4372
4237
  "pluginType": "core",
@@ -4376,22 +4241,22 @@
4376
4241
  "dist",
4377
4242
  "commands",
4378
4243
  "cloud",
4379
- "projects",
4380
- "list.js"
4244
+ "extensions",
4245
+ "get.js"
4381
4246
  ]
4382
4247
  },
4383
- "cloud:projects:usage": {
4248
+ "cloud:extensions:upload": {
4384
4249
  "aliases": [],
4385
4250
  "args": {
4386
- "id": {
4387
- "description": "Project ID.",
4388
- "name": "id",
4251
+ "file": {
4252
+ "description": "Path to extension ZIP file.",
4253
+ "name": "file",
4389
4254
  "required": true
4390
4255
  }
4391
4256
  },
4392
- "description": "Get project usage.",
4257
+ "description": "Upload a Chrome extension ZIP file.",
4393
4258
  "examples": [
4394
- "browse cloud projects usage <project-id>"
4259
+ "browse cloud extensions upload ./extension.zip"
4395
4260
  ],
4396
4261
  "flags": {
4397
4262
  "api-key": {
@@ -4413,7 +4278,7 @@
4413
4278
  },
4414
4279
  "hasDynamicHelp": false,
4415
4280
  "hiddenAliases": [],
4416
- "id": "cloud:projects:usage",
4281
+ "id": "cloud:extensions:upload",
4417
4282
  "pluginAlias": "browse",
4418
4283
  "pluginName": "browse",
4419
4284
  "pluginType": "core",
@@ -4423,8 +4288,8 @@
4423
4288
  "dist",
4424
4289
  "commands",
4425
4290
  "cloud",
4426
- "projects",
4427
- "usage.js"
4291
+ "extensions",
4292
+ "upload.js"
4428
4293
  ]
4429
4294
  },
4430
4295
  "cloud:sessions:create": {
@@ -4851,6 +4716,141 @@
4851
4716
  "update.js"
4852
4717
  ]
4853
4718
  },
4719
+ "cloud:projects:get": {
4720
+ "aliases": [],
4721
+ "args": {
4722
+ "id": {
4723
+ "description": "Project ID.",
4724
+ "name": "id",
4725
+ "required": true
4726
+ }
4727
+ },
4728
+ "description": "Get a project by ID.",
4729
+ "examples": [
4730
+ "browse cloud projects get <project-id>"
4731
+ ],
4732
+ "flags": {
4733
+ "api-key": {
4734
+ "description": "Override the Browserbase API key.",
4735
+ "name": "api-key",
4736
+ "hasDynamicHelp": false,
4737
+ "helpValue": "<apiKey>",
4738
+ "multiple": false,
4739
+ "type": "option"
4740
+ },
4741
+ "base-url": {
4742
+ "description": "Override the Browserbase API base URL.",
4743
+ "name": "base-url",
4744
+ "hasDynamicHelp": false,
4745
+ "helpValue": "<baseUrl>",
4746
+ "multiple": false,
4747
+ "type": "option"
4748
+ }
4749
+ },
4750
+ "hasDynamicHelp": false,
4751
+ "hiddenAliases": [],
4752
+ "id": "cloud:projects:get",
4753
+ "pluginAlias": "browse",
4754
+ "pluginName": "browse",
4755
+ "pluginType": "core",
4756
+ "strict": true,
4757
+ "isESM": true,
4758
+ "relativePath": [
4759
+ "dist",
4760
+ "commands",
4761
+ "cloud",
4762
+ "projects",
4763
+ "get.js"
4764
+ ]
4765
+ },
4766
+ "cloud:projects:list": {
4767
+ "aliases": [],
4768
+ "args": {},
4769
+ "description": "List projects visible to the current API key.",
4770
+ "examples": [
4771
+ "browse cloud projects list"
4772
+ ],
4773
+ "flags": {
4774
+ "api-key": {
4775
+ "description": "Override the Browserbase API key.",
4776
+ "name": "api-key",
4777
+ "hasDynamicHelp": false,
4778
+ "helpValue": "<apiKey>",
4779
+ "multiple": false,
4780
+ "type": "option"
4781
+ },
4782
+ "base-url": {
4783
+ "description": "Override the Browserbase API base URL.",
4784
+ "name": "base-url",
4785
+ "hasDynamicHelp": false,
4786
+ "helpValue": "<baseUrl>",
4787
+ "multiple": false,
4788
+ "type": "option"
4789
+ }
4790
+ },
4791
+ "hasDynamicHelp": false,
4792
+ "hiddenAliases": [],
4793
+ "id": "cloud:projects:list",
4794
+ "pluginAlias": "browse",
4795
+ "pluginName": "browse",
4796
+ "pluginType": "core",
4797
+ "strict": true,
4798
+ "isESM": true,
4799
+ "relativePath": [
4800
+ "dist",
4801
+ "commands",
4802
+ "cloud",
4803
+ "projects",
4804
+ "list.js"
4805
+ ]
4806
+ },
4807
+ "cloud:projects:usage": {
4808
+ "aliases": [],
4809
+ "args": {
4810
+ "id": {
4811
+ "description": "Project ID.",
4812
+ "name": "id",
4813
+ "required": true
4814
+ }
4815
+ },
4816
+ "description": "Get project usage.",
4817
+ "examples": [
4818
+ "browse cloud projects usage <project-id>"
4819
+ ],
4820
+ "flags": {
4821
+ "api-key": {
4822
+ "description": "Override the Browserbase API key.",
4823
+ "name": "api-key",
4824
+ "hasDynamicHelp": false,
4825
+ "helpValue": "<apiKey>",
4826
+ "multiple": false,
4827
+ "type": "option"
4828
+ },
4829
+ "base-url": {
4830
+ "description": "Override the Browserbase API base URL.",
4831
+ "name": "base-url",
4832
+ "hasDynamicHelp": false,
4833
+ "helpValue": "<baseUrl>",
4834
+ "multiple": false,
4835
+ "type": "option"
4836
+ }
4837
+ },
4838
+ "hasDynamicHelp": false,
4839
+ "hiddenAliases": [],
4840
+ "id": "cloud:projects:usage",
4841
+ "pluginAlias": "browse",
4842
+ "pluginName": "browse",
4843
+ "pluginType": "core",
4844
+ "strict": true,
4845
+ "isESM": true,
4846
+ "relativePath": [
4847
+ "dist",
4848
+ "commands",
4849
+ "cloud",
4850
+ "projects",
4851
+ "usage.js"
4852
+ ]
4853
+ },
4854
4854
  "cloud:sessions:downloads:get": {
4855
4855
  "aliases": [],
4856
4856
  "args": {
@@ -4962,5 +4962,5 @@
4962
4962
  ]
4963
4963
  }
4964
4964
  },
4965
- "version": "0.6.0"
4965
+ "version": "0.6.1"
4966
4966
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browse",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Unified Browserbase CLI for browser automation and cloud APIs.",
5
5
  "type": "module",
6
6
  "private": false,