Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

refactor(provider-webdriver): ship BrowserStack as the `@agent-device/browserstack` plugin

未关闭
#3,309 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
活跃
领域
devtools

调研方向

First confirm #3312 has landed on main, then read the existing BrowserStack implementation in packages/provider-webdriver and the packaging template in packages/provider-testmu. Move the named modules and tests into packages/provider-browserstack, update core, docs, and provider-scenario tests as specified, and run the listed checks plus a live session. Done when the package check and affected checks pass, the default install shrinks without budget exceptions, and the live session is recorded in the PR.

由索引模型根据 Issue 内容生成。

描述

needs-triage refactor

Purpose and evidence

0.22 stops bundling hosted device providers with the default installation. BrowserStack already presents the plugin factory shape inside core: packages/provider-webdriver/src/browserstack-provider.ts returns { webDriver, connection } next to a manifest-shaped declaration (CLOUD_WEBDRIVER_PROVIDER_DECLARATIONS in providers.ts), composed through the same route an installed WebDriver plugin uses (PR #3312). TestMu (packages/provider-testmu, #3118) is the packaging template: bundled ESM, agentDevicePlugin manifest, ./connection-verification subpath, test/package-smoke.mjs, release through scripts/release-workspace.mjs.

Required behavior and boundary

  • New workspace package packages/provider-browserstack publishing @agent-device/browserstack, versioned with core, built with tsdown like TestMu. Its default export is (host: ProviderPluginHost) => { webDriver, connection }; the manifest declares provider: "browserstack", the connection capabilities and credentialVariables: ["BROWSERSTACK_USERNAME", "BROWSERSTACK_ACCESS_KEY"] exactly as CLOUD_WEBDRIVER_PROVIDER_DECLARATIONS does today.
  • Move the BrowserStack modules out of provider-webdriver (browserstack.ts, browserstack-provider.ts, browserstack-connection.ts, browserstack-connection-verification.ts, browserstack-device-features.ts, their tests, and the bs:// helpers from providers.ts). provider-webdriver keeps the shared engine and the ./plugin surface only.
  • Core drops browserstack from BUNDLED_CLOUD_WEBDRIVER_PROVIDERS and from RESERVED_PLUGIN_PROVIDERS; the connect route, credential fingerprint, and daemon composition keep working through the plugin manifest with no provider-name branch left in src/.
  • agent-device connect browserstack without the plugin fails with the existing unknown-provider error naming plugins add @agent-device/browserstack; help, website/docs/docs/browserstack.md, device-clouds.md, plugins.md ("remain bundled"), and the README move the provider to the plugin install flow.
agent-device plugins add @agent-device/browserstack
export BROWSERSTACK_USERNAME=... BROWSERSTACK_ACCESS_KEY=...
agent-device connect browserstack --platform android --device "Google Pixel 8" --provider-os-version 14.0 --provider-app bs://app-id

Completion and validation

  • node scripts/check-provider-plugin.mjs packages/provider-browserstack passes (packed install, host-recognized errors, CLI connect).
  • Provider-scenario integration tests that today build the BrowserStack runtime through createBundledCloudWebDriverRuntimes run the plugin factory through createCloudWebDriverRuntime the way the TestMu scenarios do.
  • pnpm check:affected --run passes; the Size report shows the default install shrinking by the BrowserStack modules; eager-closure budgets need no approval row.
  • One live BrowserStack session (connect, open, snapshot, close, artifacts) with the packed plugin, recorded in the PR.

Dependencies and readiness

Blocked by: #3312 landing on main. Sibling: the AWS Device Farm and Limrun extractions in this milestone; land this one first, it needs no plugin-host change.

Effort: M. Risk: low (shape already proven by TestMu; user-visible change is the install step).

主要语言
TypeScript
星标
4.9k
派生
328
平均合并
12 小时 13 分钟
30 天内合并 PR
541

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstack/agent-device 的其他 Issue

查看 callstack/agent-device 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。