browser-pilot-cli 0.3.0-rc.2 → 0.3.0-rc.4
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 +2 -1
- package/dist/cli.js +10 -2
- package/dist/daemon.js +241 -251
- package/docs/architecture/browser-pilot-platform-spec.md +24 -15
- package/docs/integration/stdio-bridge.md +22 -11
- package/docs/plans/profile-context-routing.md +13 -13
- package/docs/plans/universal-agent-integration.md +8 -6
- package/docs/plans/v0.3.0-stabilization.md +51 -0
- package/docs/releases/v0.3.0-rc.1.md +9 -3
- package/docs/releases/v0.3.0-rc.2.md +17 -2
- package/docs/releases/v0.3.0-rc.3.md +56 -0
- package/docs/releases/v0.3.0-rc.4.md +28 -0
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -182,7 +182,7 @@ A project can pin Browser Pilot locally and run the same CLI without a global
|
|
|
182
182
|
installation:
|
|
183
183
|
|
|
184
184
|
```bash
|
|
185
|
-
npm install --save-exact browser-pilot-cli@0.3.0-rc.
|
|
185
|
+
npm install --save-exact browser-pilot-cli@0.3.0-rc.4
|
|
186
186
|
npx --no-install browser-pilot tabs
|
|
187
187
|
```
|
|
188
188
|
|
|
@@ -421,6 +421,7 @@ non-blocking canaries so a third-party outage cannot fail the release gate:
|
|
|
421
421
|
```bash
|
|
422
422
|
npm test # unit + local core, compat, and network gates
|
|
423
423
|
npm run test:capabilities # isolated-Chrome quantitative capability gate
|
|
424
|
+
npm run test:host-acceptance # two embedded hosts + CLI + Artifacts + reconnect
|
|
424
425
|
npm run test:distribution # packed global/local/product-bundled launch modes
|
|
425
426
|
npm run test:canary # real-site drift report; non-blocking
|
|
426
427
|
npm run test:canary:strict # fail on drift or unavailability
|
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import { writeFileSync as writeFileSync2, readFileSync as readFileSync4, existsS
|
|
|
6
6
|
import { resolve as resolvePath } from "path";
|
|
7
7
|
|
|
8
8
|
// src/version.ts
|
|
9
|
-
var BROWSER_PILOT_VERSION = "0.3.0-rc.
|
|
9
|
+
var BROWSER_PILOT_VERSION = "0.3.0-rc.4";
|
|
10
10
|
|
|
11
11
|
// src/protocol/errors.ts
|
|
12
12
|
var ERROR_CODES = [
|
|
@@ -3283,6 +3283,13 @@ var CompatibilityBrokerClient = class _CompatibilityBrokerClient {
|
|
|
3283
3283
|
}
|
|
3284
3284
|
await this.callTool("browser.connect", { browserId: selected.id });
|
|
3285
3285
|
}
|
|
3286
|
+
async listBrowsers(browser) {
|
|
3287
|
+
const result = await this.callTool("browser.discover", browser ? { browser } : {});
|
|
3288
|
+
if (!Array.isArray(result.browsers)) {
|
|
3289
|
+
throw new BrowserPilotError("internal_error", "browser.discover returned invalid browsers");
|
|
3290
|
+
}
|
|
3291
|
+
return result.browsers;
|
|
3292
|
+
}
|
|
3286
3293
|
async listTabs(scope = "all") {
|
|
3287
3294
|
const result = await this.callTool("browser.tabs.list", { scope });
|
|
3288
3295
|
if (!Array.isArray(result.targets)) {
|
|
@@ -3709,7 +3716,8 @@ function readStdin() {
|
|
|
3709
3716
|
}
|
|
3710
3717
|
program.command("browsers").description("List supported local browsers and their setup state").option("-b, --browser <name>", "filter by browser ID, product, or channel").action(action(async (opts) => {
|
|
3711
3718
|
const filter = typeof opts.browser === "string" ? opts.browser.toLowerCase() : void 0;
|
|
3712
|
-
const
|
|
3719
|
+
const client = await resumeCompatibility(BROWSER_PILOT_VERSION);
|
|
3720
|
+
const browsers = client ? await client.listBrowsers(filter) : (await discoverBrowserCandidates()).map((discovered) => discovered.candidate).filter((candidate) => !filter || [candidate.id, candidate.product, candidate.channel].some((value) => value?.toLowerCase().includes(filter)));
|
|
3713
3721
|
if (useJson()) {
|
|
3714
3722
|
console.log(JSON.stringify({ ok: true, browsers }));
|
|
3715
3723
|
return;
|